text string | size int64 | token_count int64 |
|---|---|---|
/****************************************************************************
Copyright (c) 2011-2013,WebJet Business Division,CYOU
http://www.genesis-3d.com.cn
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.
****************************************************************************/
#ifndef __PHYSX_COMMIT__
#include "PxRigidDynamic.h"
#include "PhysicsDynamic.h"
#include "PhysicsServer.h"
#include "PhysicsShape.h"
#include "PxScene.h"
#include "PxShape.h"
#include "PxFlags.h"
#include "PxRigidBodyExt.h"
#include "PxRigidDynamic.h"
#include "PhysicsUtil.h"
#include "physXfeature/PhysicsBodyComponent.h"
namespace App
{
__ImplementClass(PhysicsDynamic, 'PYDY', PhysicsEntity);
PhysicsDynamic::PhysicsDynamic()
: m_pPxActor(NULL)
, m_bJointFather(false)
, m_bUseGravity(true)
, m_bKinematic(false)
, m_fLinearDamping(0.0f)
, m_fAngularDamping(0.05f)
, m_vContantForce(0.f)
, m_vContantVelocity(0.f)
, m_vContantTorques(0.f)
, m_vContantAngularVel(0.f)
{
m_eType = PHYSICSDYNAMIC;
m_fMaxAngularVel = PhysicsServer::Instance()->GetMaxAngularVelocity();
m_fSleepThreshold = PhysicsServer::Instance()->GetSleepThreshold();
}
PhysicsDynamic::~PhysicsDynamic()
{
OnDestory();
}
PxRigidActor* PhysicsDynamic::GetRigidActor()
{
return m_pPxActor;
}
bool PhysicsDynamic::OnCreate(GPtr<PhysicsBodyComponent> body)
{
if ( !m_bJointFather && body.isvalid() && body->GetActor() )
{
OnDestory();
PxPhysics* pSDK = PhysicsServer::Instance()->GetPhysics();
n_assert(pSDK);
Math::vector pos = body->GetActor()->GetWorldPosition();
Math::quaternion rot = body->GetActor()->GetWorldRotation();
PxTransform _ActorPose(PxVec3(pos.x(), pos.y(), pos.z()), PxQuat(rot.x(), rot.y(), rot.z(), rot.w()));
m_pPxActor = pSDK->createRigidDynamic(_ActorPose);
n_assert(m_pPxActor)
m_pPxActor->userData = body.get();
m_pPxActor->setActorFlag(PxActorFlag::eVISUALIZATION, true);
if ( m_bKinematic )
{
m_pPxActor->setRigidDynamicFlag(PxRigidDynamicFlag::eKINEMATIC, m_bKinematic);
}
else
{
m_pPxActor->setAngularDamping (m_fAngularDamping);
m_pPxActor->setLinearDamping(m_fLinearDamping );
m_pPxActor->setRigidDynamicFlag(PxRigidDynamicFlag::eKINEMATIC, false);
m_pPxActor->setMaxAngularVelocity(PhysicsServer::Instance()->GetMaxAngularVelocity());
m_pPxActor->setSleepThreshold(PhysicsServer::Instance()->GetSleepThreshold());
m_pPxActor->setActorFlag(PxActorFlag::eDISABLE_GRAVITY, !m_bUseGravity);
}
for ( int i=0; i<m_arrPhysicsShapePtr.Size(); ++i )
{
if (!m_arrPhysicsShapePtr[i]->IsValid())
{
m_arrPhysicsShapePtr[i]->OnCreate(body);
}
m_arrPhysicsShapePtr[i]->SetPhysicsEntity(this);
m_arrPhysicsShapePtr[i]->CreatePxShape(m_pPxActor, GetGroupID());
}
UpdateEntityMass();
// Not using
// CaptureShapeFromChildren();
return true;
}
return m_bJointFather;
}
void PhysicsDynamic::CaptureShapeFromChildren()
{
if ( m_pPxActor == NULL )
{
return;
}
for ( int i=0; i<m_pComponent->GetActor()->GetChildCount(); ++i )
{
GPtr<PhysicsEntity> _pChildEntity = GetEntityInActor(m_pComponent->GetActor()->GetChild(i));
if ( _pChildEntity.isvalid() && _pChildEntity->GetType()&m_eType )
{
GPtr<PhysicsDynamic> _pDynamic = _pChildEntity.downcast<PhysicsDynamic>();
if ( !_pDynamic->IsJointFather() )
{
continue;
}
for ( int i=0; i<_pChildEntity->GetShapeCount(); ++i )
{
_pChildEntity->GetShape(i)->CreatePxShape(m_pPxActor, GetGroupID());
}
}
}
}
bool PhysicsDynamic::OnDestory()
{
if ( IsValid() )
{
Super::OnDestory();
//ReleaseChildShape();
m_pPxActor->release();
m_pPxActor = NULL;
}
return true;
}
void PhysicsDynamic::OnShapeReBuild(PhysicsShape* shape)
{
if ( GetRigidActor() && shape != NULL)
{
shape->CreatePxShape(GetRigidActor(),m_eGroup);
UpdateEntityMass();
}
}
void PhysicsDynamic::ReleaseChildShape()
{
if ( m_pPxActor == NULL || m_pComponent == NULL || !m_pComponent->GetActor() )
{
return;
}
for ( int i=0; i<m_pComponent->GetActor()->GetChildCount(); ++i )
{
GPtr<PhysicsEntity> _pChildEntity = GetEntityInActor(m_pComponent->GetActor()->GetChild(i));
if ( _pChildEntity.isvalid() && _pChildEntity->GetType()&m_eType )
{
GPtr<PhysicsDynamic> _pDynamic = _pChildEntity.downcast<PhysicsDynamic>();
if ( !_pDynamic->IsJointFather() )
{
continue;
}
for ( int i=0; i<_pChildEntity->GetShapeCount(); ++i )
{
_pChildEntity->GetShape(i)->ReleasePxShape();
}
}
}
}
void PhysicsDynamic::SetKinematic( bool kinematic )
{
m_bKinematic = kinematic;
if ( m_pPxActor )
{
m_pPxActor->setRigidDynamicFlag(PxRigidDynamicFlag::eKINEMATIC, m_bKinematic);
}
}
void PhysicsDynamic::SetJointFather( bool joint )
{
if ( m_bJointFather == joint )
{
return;
}
m_bJointFather = joint;
OnCreate(m_pComponent);
}
void PhysicsDynamic::SetUseGravity( bool usege )
{
m_bUseGravity = usege;
if ( m_pPxActor && !m_bKinematic )
{
m_pPxActor->setActorFlag(PxActorFlag::eDISABLE_GRAVITY, !m_bUseGravity);
m_pPxActor->wakeUp();
}
}
void PhysicsDynamic::SetLinearVelocity( Math::float3& vel )
{
if ( m_pPxActor && !m_bKinematic )
{
m_pPxActor->setLinearVelocity(PxVec3(vel.x(),vel.y(),vel.z()));
}
}
void PhysicsDynamic::SetAngularVelocity( Math::float3& vel )
{
if ( m_pPxActor && !m_bKinematic )
{
m_pPxActor->setAngularVelocity(PxVec3(vel.x(),vel.y(),vel.z()));
}
}
Math::float3 PhysicsDynamic::GetLinearVelocity() const
{
Math::float3 vel(0.0f,0.0f,0.0f);
if ( m_pPxActor && !m_bKinematic )
{
PxVec3 v = m_pPxActor->getLinearVelocity();
vel.x() = v.x;
vel.y() = v.y;
vel.z() = v.z;
}
return vel;
}
Math::float3 PhysicsDynamic::GetAngularVelocity() const
{
Math::float3 vel(0.0f,0.0f,0.0f);
if ( m_pPxActor && !m_bKinematic )
{
PxVec3 v = m_pPxActor->getAngularVelocity();
vel.x() = v.x;
vel.y() = v.y;
vel.z() = v.z;
}
return vel;
}
void PhysicsDynamic::SetLinearDamping( float damping )
{
if ( damping < 0.f )
{
damping = 0.f;
}
m_fLinearDamping = damping;
if ( m_pPxActor )
{
m_pPxActor->setLinearDamping(m_fLinearDamping);
}
}
void PhysicsDynamic::SetAngularDamping( float damping )
{
if ( damping < 0.f )
{
damping = 0.f;
}
m_fAngularDamping = damping;
if ( m_pPxActor )
{
m_pPxActor->setAngularDamping(m_fAngularDamping);
}
}
void PhysicsDynamic::SetMaxAngularVel( float vel )
{
if ( vel < 0.f )
{
vel = 0.f;
}
m_fMaxAngularVel = vel;
if ( m_pPxActor )
{
m_pPxActor->setMaxAngularVelocity(m_fMaxAngularVel);
}
}
void PhysicsDynamic::SetSleepThreshold( float threshold )
{
if (threshold < 0.f)
{
threshold = 0.f;
}
m_fSleepThreshold = threshold;
if ( m_pPxActor )
{
m_pPxActor->setSleepThreshold(m_fSleepThreshold);
}
}
//------------------------------------------------------------------------
void PhysicsDynamic::AddForce( const Math::float3& force,ForceType forcetype /*= FORCE_NORMAL*/,bool bWakeUp /*= true*/ )
{
if (NULL != m_pPxActor && !m_bKinematic)
{
m_pPxActor->addForce(PxVec3(force.x(),force.y(),force.z()),(PxForceMode::Enum)forcetype,bWakeUp);
}
}
//------------------------------------------------------------------------
void PhysicsDynamic::AddForceAtPos(const Math::float3& force,const Math::float3& pos,ForceType forcetype /*= FORCE_NORMAL*/,bool bWakeUp /*= true*/)
{
if (NULL != m_pPxActor && !m_bKinematic)
{
PxRigidBodyExt::addForceAtPos(*(PxRigidBody*)m_pPxActor, PxVec3(force.x(),force.y(),force.z()),
PxVec3(pos.x(),pos.y(),pos.z()), (PxForceMode::Enum)forcetype, bWakeUp);
}
}
//------------------------------------------------------------------------
void PhysicsDynamic::AddForceAtLocalPos(const Math::float3& force,const Math::float3& pos,ForceType forcetype /*= FORCE_NORMAL*/,bool bWakeUp /*= true*/)
{
if (NULL != m_pPxActor && !m_bKinematic)
{
PxRigidBodyExt::addForceAtLocalPos(*(PxRigidBody*)m_pPxActor, PxVec3(force.x(),force.y(),force.z()),
PxVec3(pos.x(),pos.y(),pos.z()), (PxForceMode::Enum)forcetype, bWakeUp);
}
}
//------------------------------------------------------------------------
void PhysicsDynamic::AddLocalForceAtPos(const Math::float3& force,const Math::float3& pos,ForceType forcetype /*= FORCE_NORMAL*/,bool bWakeUp /*= true*/)
{
if (NULL != m_pPxActor && !m_bKinematic)
{
PxRigidBodyExt::addLocalForceAtPos(*(PxRigidBody*)m_pPxActor, PxVec3(force.x(),force.y(),force.z()),
PxVec3(pos.x(),pos.y(),pos.z()), (PxForceMode::Enum)forcetype, bWakeUp);
}
}
//------------------------------------------------------------------------
void PhysicsDynamic::AddLocalForceAtLocalPos(const Math::float3& force,const Math::float3& pos,ForceType forcetype /*= FORCE_NORMAL*/,bool bWakeUp /*= true*/)
{
if (NULL != m_pPxActor && !m_bKinematic)
{
PxRigidBodyExt::addLocalForceAtLocalPos(*(PxRigidBody*)m_pPxActor, PxVec3(force.x(),force.y(),force.z()),
PxVec3(pos.x(),pos.y(),pos.z()), (PxForceMode::Enum)forcetype, bWakeUp);
}
}
void PhysicsDynamic::AddTorque( const Math::float3& torque,ForceType forcetype /*= FORCE_NORMAL*/,bool bWakeUp /*= true*/ )
{
if ( NULL != m_pPxActor && !m_bKinematic)
{
m_pPxActor->addTorque(PxVec3(torque.x(),torque.y(),torque.z()),(PxForceMode::Enum)forcetype,bWakeUp);
}
}
void PhysicsDynamic::Move( const Math::float3& dir )
{
if ( m_pPxActor )
{
PxTransform _pos = m_pPxActor->getGlobalPose();
_pos.p.x += dir.x();
_pos.p.y += dir.y();
_pos.p.z += dir.z();
if ( !m_bKinematic )
{
m_pPxActor->setGlobalPose(_pos);
}
else
{
m_pPxActor->setKinematicTarget(_pos);
}
}
}
void PhysicsDynamic::MoveToPostion( const Math::float3& pos )
{
if ( m_pPxActor )
{
PxTransform _pos = m_pPxActor->getGlobalPose();
_pos.p.x = pos.x();
_pos.p.y = pos.y();
_pos.p.z = pos.z();
m_pPxActor->setGlobalPose(_pos);
}
}
void PhysicsDynamic::Rotate( const Math::quaternion& quat )
{
if ( m_pPxActor )
{
PxTransform _pos = m_pPxActor->getGlobalPose();
Math::quaternion _quat = Math::quaternion::multiply(PxQuatToQuat(_pos.q), quat);
_pos.q.x = _quat.x();
_pos.q.y = _quat.y();
_pos.q.z = _quat.z();
_pos.q.w = _quat.w();
if ( !m_bKinematic )
{
m_pPxActor->setGlobalPose(_pos);
}
else
{
m_pPxActor->setKinematicTarget(_pos);
}
}
}
void PhysicsDynamic::RotateToRotation( const Math::quaternion& quat )
{
if ( m_pPxActor )
{
PxTransform _pos = m_pPxActor->getGlobalPose();
_pos.q.x = quat.x();
_pos.q.y = quat.y();
_pos.q.z = quat.z();
_pos.q.w = quat.w();
m_pPxActor->setGlobalPose(_pos);
}
}
void PhysicsDynamic::Tick( float time )
{
if ( m_pPxActor )
{
if ( !m_bKinematic )
{
if ( m_vContantForce.length() > 0.01f )
{
m_pPxActor->addForce((PxVec3&)m_vContantForce);
}
else if ( m_vContantVelocity.length() > 0.01f )
{
m_pPxActor->setLinearVelocity((PxVec3&)m_vContantVelocity);
}
if ( m_vContantTorques.length() > 0.01f )
{
m_pPxActor->addTorque((PxVec3&)m_vContantTorques);
}
else if ( m_vContantAngularVel.length() > 0.01f )
{
m_pPxActor->setAngularVelocity((PxVec3&)m_vContantAngularVel);
}
}
if ( m_pComponent && m_pComponent->GetActor() )
{
PxTransform _GlobalPos = m_pPxActor->getGlobalPose();
Math::float4 pos(_GlobalPos.p.x, _GlobalPos.p.y, _GlobalPos.p.z, 1.0f);
Math::quaternion rot(_GlobalPos.q.x, _GlobalPos.q.y, _GlobalPos.q.z, _GlobalPos.q.w);
m_pComponent->GetActor()->SetWorldPosition(pos);
m_pComponent->GetActor()->SetWorldRotation(rot);
}
}
}
bool PhysicsDynamic::CopyFrom( GPtr<PhysicsEntity> src )
{
if ( !src.isvalid() || src->GetType() != m_eType )
{
return false;
}
Super::CopyFrom(src);
GPtr<PhysicsDynamic> _pSrc = src.downcast<PhysicsDynamic>();
this->m_bJointFather = _pSrc->IsJointFather();
this->m_bUseGravity = _pSrc->IsUseGravity();
this->m_bKinematic = _pSrc->IsKinematic();
this->m_fLinearDamping = _pSrc->GetLinearDamping();
this->m_fAngularDamping = _pSrc->GetAngularDamping();
this->m_fMaxAngularVel = _pSrc->GetMaxAngularVel();
this->m_fSleepThreshold = _pSrc->GetSleepThreshold();
this->m_vContantForce = _pSrc->GetConstantForce();
this->m_vContantVelocity = _pSrc->GetConstantVelocity();
this->m_vContantTorques = _pSrc->GetConstantTorques();
this->m_vContantAngularVel = _pSrc->GetConstantAngularVel();
return true;
}
void PhysicsDynamic::UpdateEntityMass()
{
if (m_pPxActor != NULL)
{
int cnt = m_arrPhysicsShapePtr.Size();
int nb = m_pPxActor->getNbShapes();
PxReal* fDensities = new PxReal[nb];
PxShape** mShapes = new PxShape*[nb];
m_pPxActor->getShapes(mShapes,nb*sizeof(PxShape*));
int k=0;
for(int i=0;i<nb;i++)
{
int j=0;
for(j=0;j<cnt;j++)
{
if ( !m_arrPhysicsShapePtr[j]->IsValid() )
{
continue;
}
if(m_arrPhysicsShapePtr[j]->GetName() == mShapes[i]->getName())
break;
}
if(j>=cnt)
{
delete []fDensities;
delete []mShapes;
m_pPxActor->setMass(0.01f);
return;
}
if((PxU8)(mShapes[i]->getFlags() & PxShapeFlag::eSIMULATION_SHAPE) == 0)
{
continue;
}
fDensities[k++] = m_arrPhysicsShapePtr[j]->GetDensity();
}
if(k<=0)
{
delete []fDensities;
delete []mShapes;
m_pPxActor->setMass(0.01f);
return;
}
PxRigidBodyExt::updateMassAndInertia(*m_pPxActor, fDensities,k);
delete []fDensities;
delete []mShapes;
}
}
float PhysicsDynamic::GetMass()
{
if ( m_pPxActor == NULL )
{
return 0.01f;
}
bool _needUpdate = false;
for ( int i=0; i<m_arrPhysicsShapePtr.Size(); ++i )
{
if ( !m_arrPhysicsShapePtr[i]->IsValid() )
{
//m_pPxActor->setMass(0.01f);
//return 0.01f;
continue;
}
if ( m_arrPhysicsShapePtr[i]->IsMassUpdate() )
{
_needUpdate = true;
m_arrPhysicsShapePtr[i]->UpdateMass();
}
}
if ( _needUpdate )
{
UpdateEntityMass();
}
return m_pPxActor->getMass();
}
void PhysicsDynamic::Save( AppWriter* pSerialize )
{
Super::Save(pSerialize);
pSerialize->SerializeBool("JointFather", m_bJointFather);
pSerialize->SerializeBool("UseGravity", m_bUseGravity);
pSerialize->SerializeBool("Kinematic", m_bKinematic);
pSerialize->SerializeFloat("LinearDamp", m_fLinearDamping);
pSerialize->SerializeFloat("AngularDamp", m_fAngularDamping);
pSerialize->SerializeFloat("MaxAngularVel", m_fMaxAngularVel);
pSerialize->SerializeFloat("SleepThrehold", m_fSleepThreshold);
pSerialize->SerializeFloat3("ContantForce", m_vContantForce);
pSerialize->SerializeFloat3("ContantVelocity", m_vContantVelocity);
pSerialize->SerializeFloat3("ContantTorques", m_vContantTorques);
pSerialize->SerializeFloat3("ContantAngularVel", m_vContantAngularVel);
}
void PhysicsDynamic::Load( Version ver, AppReader* pReader )
{
Super::Load(ver,pReader);
pReader->SerializeBool("JointFather", m_bJointFather);
pReader->SerializeBool("UseGravity", m_bUseGravity);
pReader->SerializeBool("Kinematic", m_bKinematic);
pReader->SerializeFloat("LinearDamp", m_fLinearDamping);
pReader->SerializeFloat("AngularDamp", m_fAngularDamping);
pReader->SerializeFloat("MaxAngularVel", m_fMaxAngularVel);
pReader->SerializeFloat("SleepThrehold", m_fSleepThreshold);
pReader->SerializeFloat3("ContantForce", m_vContantForce);
pReader->SerializeFloat3("ContantVelocity", m_vContantVelocity);
pReader->SerializeFloat3("ContantTorques", m_vContantTorques);
pReader->SerializeFloat3("ContantAngularVel", m_vContantAngularVel);
}
}
#endif | 16,817 | 7,878 |
// MIT License (c) 2019 BYU PCCL see LICENSE file
#include "Holodeck.h"
#include "RangeFinderSensor.h"
#include "Json.h"
URangeFinderSensor::URangeFinderSensor() {
SensorName = "RangeFinderSensor";
}
// Allows sensor parameters to be set programmatically from client.
void URangeFinderSensor::ParseSensorParms(FString ParmsJson) {
Super::ParseSensorParms(ParmsJson);
TSharedPtr<FJsonObject> JsonParsed;
TSharedRef<TJsonReader<TCHAR>> JsonReader = TJsonReaderFactory<TCHAR>::Create(ParmsJson);
if (FJsonSerializer::Deserialize(JsonReader, JsonParsed)) {
if (JsonParsed->HasTypedField<EJson::Number>("LaserCount")) {
LaserCount = JsonParsed->GetIntegerField("LaserCount");
}
if (JsonParsed->HasTypedField<EJson::Number>("LaserAngle")) {
LaserAngle = -JsonParsed->GetIntegerField("LaserAngle"); // in client positive angles point up
}
if (JsonParsed->HasTypedField<EJson::Number>("LaserMaxDistance")) {
LaserMaxDistance = JsonParsed->GetIntegerField("LaserMaxDistance") * 100; // meters to centimeters
}
if (JsonParsed->HasTypedField<EJson::Boolean>("LaserDebug")) {
LaserDebug = JsonParsed->GetBoolField("LaserDebug");
}
}
else {
UE_LOG(LogHolodeck, Fatal, TEXT("URangeFinderSensor::ParseSensorParms:: Unable to parse json."));
}
}
void URangeFinderSensor::InitializeSensor() {
Super::InitializeSensor();
//You need to get the pointer to the object you are attached to.
Parent = this->GetAttachmentRootActor();
}
void URangeFinderSensor::TickSensorComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) {
float* FloatBuffer = static_cast<float*>(Buffer);
for (int i = 0; i < LaserCount; i++) {
FVector start = GetComponentLocation();
FVector end = GetForwardVector();
FVector right = GetRightVector();
end = end.RotateAngleAxis(360 * i / LaserCount, GetUpVector());
right = right.RotateAngleAxis(360 * i / LaserCount, GetUpVector());
end = end.RotateAngleAxis(LaserAngle, right);
end = end * LaserMaxDistance;
end = start + end;
FCollisionQueryParams QueryParams = FCollisionQueryParams();
QueryParams.AddIgnoredActor(Parent);
FHitResult Hit = FHitResult();
bool TraceResult = GetWorld()->LineTraceSingleByChannel(Hit, start, end, ECollisionChannel::ECC_Visibility, QueryParams);
FloatBuffer[i] = (TraceResult ? Hit.Distance : LaserMaxDistance) / 100; // centimeter to meters
if (LaserDebug) {
DrawDebugLine(GetWorld(), start, end, FColor::Green, false, .01, ECC_WorldStatic, 1.f);
}
}
}
| 2,528 | 930 |
/**
* (210704) λ‘ν
* https://www.acmicpc.net/problem/2217
*
* [νμ΄]
* λ‘νλ¬Έμ λ κ° λ‘νλ₯Ό μ νν΄μ μ΅λμ€λμ μμλ΄λ λ¬Έμ μ
λλ€.
* μ¬κΈ°μ μ΅λμ€λμ μ νν λ‘ν μ€ μ΅μμ€λμ κ°μ§ λ‘νμ
* μ€λμ μ νν λ‘νμ κ°μλ₯Ό κ³±νλ©΄ μΌλ§λ μ€λμ λ²νΈμ μλμ§
* κ³μ°ν μ μμ΅λλ€.
*
* μ΄λ€ λ‘νλ€μ μ¬μ©ν΄μΌ μ΅λμ€λμ μ»μ μ μλμ§ μκ³ λ¦¬μ¦μ
* λ€μκ³Ό κ°μ΅λλ€.
*
* 1) μ
λ ₯λ°μ μ«μλ€μ λ°°μ΄μ λ£κ³ μ€λ¦μ°¨μμΌλ‘ μ λ ¬ν©λλ€.
* 2) μ°¨λ‘λλ‘ λ°°μ΄μ μννλ©΄μ (λ‘νμ κ°μ)-(νμ¬ index)
* λ₯Ό κ³±νκ³ μ΄λ₯Ό μ μ₯ν©λλ€.
* 3) λ°°μ΄μμμ μ΅λκ°μ μ λ΅μΌλ‘ μΆλ ₯ν©λλ€.
*/
#include <cstdio>
#include <cstdlib>
#include <algorithm>
using namespace std;
int main() {
int N;
scanf("%d", &N);
int* ropes = (int*)malloc(sizeof(int)*N);
for (int i=0; i<N; i++) {
scanf("%d", ropes+i);
}
sort(ropes, ropes+N);
for (int i=0; i<N; i++) {
ropes[i] *= N-i;
}
printf("%d\n", *max_element(ropes, ropes+N));
free(ropes);
return 0;
}
| 755 | 653 |
class Solution
{
public:
vector<int> res;
void subset(vector<int> arr, int l, int r, int sum){
if(l>r){
res.push_back(sum);
return;
}
subset(arr, l+1, r, sum + arr[l]);
subset(arr, l+1, r, sum);
}
vector<int> subsetSums(vector<int> arr, int N)
{
// Write Your Code here
subset(arr, 0, N-1, 0);
return res;
}
}; | 423 | 153 |
/* ===========================================================================
* The MIT License (MIT)
*
* Copyright (c) 2016 Jedidiah Buck McCready <jbuckmccready@gmail.com>
*
* 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.
* ===========================================================================*/
#include "Models/modelsrepo.h"
#include "QmlHelpers/systemintegrator.h"
#include <QApplication>
#include <QHash>
#include <QObject>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QtQml>
#include <QQuickWindow>
int main(int argc, char *argv[]) {
// uncomment and modify for additional logging
// see: http://doc.qt.io/qt-5/qloggingcategory.html
// qputenv("QT_LOGGING_RULES", "qt.scenegraph.general=false;qt.scenegraph.time.renderloop=false;qt.scenegraph.time.renderer=false;qt.qpa.gl=true");
// Smoother rendering when resizing the window using the basic render loop
// see: http://doc.qt.io/qt-5/qtquick-visualcanvas-scenegraph.html
// for details of how it works
qputenv("QSG_RENDER_LOOP", "basic");
// Qt::AA_UseSoftwareOpenGL will attempt to force the use of opengl32sw.dll
// can be deployed with the llvm mesa library
// QApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
// Setting the scene graph backend to software will use the internal Qt
// QSG software renderer
// QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software);
QApplication app(argc, argv);
using namespace staticpendulum;
qmlRegisterType<SystemIntegrator>("QmlHelpers", 1, 0, "SystemIntegrator");
qmlRegisterSingletonType<ModelsRepo>("ModelsRepo", 1, 0, "ModelsRepo",
&ModelsRepo::qmlInstance);
QQmlApplicationEngine engine;
// Add import path to resolve Qml modules, note: using qrc path
engine.addImportPath("qrc:/Qml/");
engine.rootContext()->setContextProperty("applicationDirPath",
qApp->applicationDirPath());
engine.load(QUrl(QLatin1String("qrc:/Qml/Main/Main.qml")));
return app.exec();
}
| 3,076 | 979 |
#include "GPaddleProcess.h"
static const TInt DELTA_X = 4;
GPaddleProcess::GPaddleProcess(GGameState *aGameState) {
mGameState = aGameState;
mState = MOVE_STATE;
mSprite = new BSprite(0, PLAYER_SLOT, IMG_PADDLE, STYPE_PLAYER);
mSprite->w = 8;
mSprite->h = 32;
mSprite->flags |= SFLAG_RENDER | SFLAG_CHECK;
mSprite->cMask |= STYPE_EBULLET;
mGameState->AddSprite(mSprite);
Reset();
}
GPaddleProcess::~GPaddleProcess() {
mSprite->Remove();
delete mSprite;
}
void GPaddleProcess::Reset() {
mSprite->x = 8;
mSprite->y = (SCREEN_HEIGHT / 2) - 16;
}
void GPaddleProcess::Pause(TBool aPause) {
if (aPause) {
mSprite->flags &= ~SFLAG_RENDER;
mState = WAIT_STATE;
} else {
mSprite->flags |= SFLAG_RENDER;
mState = MOVE_STATE;
}
}
TBool GPaddleProcess::WaitState() {
return ETrue;
}
TBool GPaddleProcess::MoveState() {
if (mGameState->GameOver()) {
return ETrue;
}
if (mSprite->cType) {
mSprite->cType = 0;
}
if (gControls.IsPressed(JOYUP)) {
mSprite->y = mSprite->y - DELTA_X;
if (mSprite->y < 0) {
mSprite->y = 0;
}
} else if (gControls.IsPressed(JOYDOWN)) {
mSprite->y = mSprite->y + DELTA_X;
if (mSprite->y > (SCREEN_HEIGHT - 32)) {
mSprite->y = SCREEN_HEIGHT - 32;
}
}
return ETrue;
}
TBool GPaddleProcess::RunBefore() {
return ETrue;
}
TBool GPaddleProcess::RunAfter() {
switch (mState) {
case MOVE_STATE:
return MoveState();
case WAIT_STATE:
return WaitState();
default:
return EFalse;
}
}
| 1,544 | 699 |
/****************************************************************************
// Usagi Engine, Copyright Β© Vitei, Inc. 2013
****************************************************************************/
// NavigationGrid.cpp
#include "Engine/Common/Common.h"
#include "Engine/Debug/Rendering/DebugRender.h"
#include "NavigationGrid.h"
#include "Path.h"
#include <float.h>
namespace usg
{
namespace ai
{
NavigationGrid::NavigationGrid() :
m_uBlockingAreaUIDCounter(0),
m_blocks(NavigationGrid::MaxNumBlocks),
m_waypoints(NavigationGrid::MaxNumWaypoints)
{
}
NavigationGrid::~NavigationGrid()
{
m_blocks.Clear();
m_waypoints.Clear();
}
#ifdef DEBUG_BUILD
bool NavigationGrid::CheckIntegrity()
{
for (FastPool<Waypoint>::Iterator it = m_waypoints.Begin(); !it.IsEnd(); ++it)
{
const Waypoint* pWaypoint = (*it);
if (!CanPlacePoint(pWaypoint->GetPosition()))
{
DEBUG_PRINT("Waypoint at (%f,%f) is inside blocking area.\n",pWaypoint->GetPosition().x,pWaypoint->GetPosition().y);
return false;
}
}
return true;
}
#endif
bool NavigationGrid::CreateWaypoint(const Vector3f& vPos, uint32 uNameHash)
{
return CreateWaypoint(Vector2f(vPos.x, vPos.z), uNameHash);
}
const Waypoint* NavigationGrid::GetWaypoint(uint32 uNameHash) const
{
for (FastPool<Waypoint>::Iterator it = m_waypoints.Begin(); !it.IsEnd(); ++it)
{
const Waypoint* pWaypoint = *it;
if (pWaypoint->GetNameHash() == uNameHash)
{
return pWaypoint;
}
}
return NULL;
}
bool NavigationGrid::CreateWaypoint(const Vector2f& vPos, uint32 uNameHash)
{
Waypoint* pWaypoint = m_waypoints.Alloc();
pWaypoint->SetPosition(vPos);
pWaypoint->SetNameHash(uNameHash);
return true;
}
Waypoint* NavigationGrid::GetClosestWaypointAccessibleFrom(const Vector2f& vPos) const
{
Waypoint* pWaypoint = NULL;
Line line;
line.m_vFrom = vPos;
float fMinSqrDist = FLT_MAX;
for (FastPool<Waypoint>::Iterator it = m_waypoints.Begin(); !it.IsEnd(); ++it)
{
const Vector2f& vWaypointPosition = (*it)->GetPosition();
const float fSqrDist = vPos.GetSquaredDistanceFrom(vWaypointPosition);
if (fSqrDist < fMinSqrDist)
{
line.m_vTo = vWaypointPosition;
if (!LineTest(line))
{
fMinSqrDist = fSqrDist;
pWaypoint = (*it);
}
}
}
return pWaypoint;
}
Waypoint* NavigationGrid::GetClosestWaypoint(const Vector2f& vPos) const
{
Waypoint* pWaypoint = NULL;
float fMinSqrDist = FLT_MAX;
for(FastPool<Waypoint>::Iterator it = m_waypoints.Begin(); !it.IsEnd(); ++it)
{
const float fSqrDist = vPos.GetSquaredDistanceFrom((*it)->GetPosition());
if(fSqrDist < fMinSqrDist)
{
fMinSqrDist = fSqrDist;
pWaypoint = (*it);
}
}
return pWaypoint;
}
int NavigationGrid::FindPath(const Vector3f& vStart, const Vector3f& vEnd, usg::ai::Path& path) const
{
Vector2f vStartV2(vStart.x, vStart.z);
Vector2f vEndV2(vEnd.x, vEnd.z);
return FindPath(vStartV2, vEndV2, path);
}
int NavigationGrid::FindPath(const Vector2f& vStart, const Vector2f& vEnd, usg::ai::Path& path) const
{
int rval = NAVIGATION_SUCCESS;
path.Reset();
Waypoint start(vStart);
Waypoint end(vEnd);
// An important optimization: if you can go straight to target, construct a minimal path:
if (!LineTest(usg::ai::Line(vStart, vEnd)))
{
path.AddLast(vEnd);
return NAVIGATION_SUCCESS;
}
// Test if start/end point is inside blocking area. If yes, go to nearest waypoint as a fallback.
Waypoint* pClosestToStart = GetClosestWaypointAccessibleFrom(vStart);
if (pClosestToStart == NULL) pClosestToStart = GetClosestWaypoint(vStart);
if (!pClosestToStart)
{
path.AddLast(vEnd);
return NAVIGATION_START_BLOCKED;
}
Waypoint* pClosestToEnd = GetClosestWaypointAccessibleFrom(vEnd);
if (pClosestToEnd == NULL) pClosestToEnd = GetClosestWaypoint(vEnd);
if (!CanPlacePoint(vEnd))
{
if (pClosestToEnd != NULL)
{
const float fDistToToTarget = vStart.GetSquaredDistanceFrom(vEnd);
const float fDistToToClosestWaypoint = vStart.GetSquaredDistanceFrom(pClosestToEnd->GetPosition());
if (fDistToToClosestWaypoint > fDistToToTarget)
{
// At least going to nearest waypoint takes us closer to target, so let
path.AddLast(vEnd);
return NAVIGATION_END_BLOCKED;
}
}
else
{
path.AddLast(vEnd);
return NAVIGATION_END_BLOCKED;
}
}
FindPath(pClosestToStart, pClosestToEnd, path);
path.AddFirst(&start);
path.AddLast(&end);
SubdividePath(path);
SubdividePath(path);
PathVisibility(path);
path.GetNext(); // remove the first position because this is basically where we are standing right now, unless we changed it
return rval;
}
void NavigationGrid::SubdividePath(usg::ai::Path& path) const
{
usg::ai::Path res;
Vector2f* pvPrev = NULL;
for(Vector2f* it = path.Begin(); it != path.End(); ++it)
{
const Vector2f& vPos = (*it);
if(pvPrev != NULL)
{
res.AddLast(Vector2f((pvPrev->x + vPos.x) * 0.5f, (pvPrev->y + vPos.y) * 0.5f));
}
res.AddLast(vPos);
pvPrev = it;
}
path = res;
}
void NavigationGrid::PathVisibility(usg::ai::Path& path) const
{
usg::ai::Path res;
for (Vector2f* it = path.Begin(); it != path.End(); ++it)
{
res.AddLast(*it);
}
Vector2f* pvPrev = NULL;
Vector2f* pvPrevPrev = NULL;
Vector2f* pvCurrent = NULL;
Vector2f* pvNext = NULL;
Vector2f* pvLast = NULL;
path.Reset();
pvPrev = (res.Begin());
pvCurrent = (res.Last());
if (!LineTest(usg::ai::Line(*pvCurrent, *pvPrev)))
{
path.AddLast(*pvPrev);
path.AddLast(*pvCurrent);
return;
}
pvCurrent = res.Begin();
path.AddLast(*pvCurrent);
pvLast = (res.Last());
Vector2f* nextIt = res.Begin();
Vector2f* prevIt = res.Begin();
int iT = 0;
while (pvCurrent != NULL && nextIt != res.End())
{
++nextIt;
pvNext = nextIt;
if (!LineTest(usg::ai::Line(*pvCurrent, *pvNext)))
{
pvPrev = pvNext;
prevIt = nextIt;
}
else
{
// If the previous of the previous location is the same, then the subdivision probably slightly pushed it inside a block se lets just move on.
if (pvPrev != pvPrevPrev)
{
path.AddLast(*pvPrev);
pvPrevPrev = pvPrev;
pvCurrent = pvPrev;
nextIt = prevIt;
}
else
{
pvPrev = pvNext;
prevIt = nextIt;
}
}
if (pvNext == pvLast)
{
break;
}
}
path.AddLast(*pvLast);
}
const BlockingArea& NavigationGrid::CreateBlock(const Vector3f& vPos, float fWidth, float fHeight, float fAngle, bool bAddWaypoints)
{
Vector2f vPosV2(vPos.x, vPos.z);
return CreateBlock(vPosV2, fWidth, fHeight, fAngle, bAddWaypoints);
}
const BlockingArea& NavigationGrid::CreateBlock(float fX, float fY, float fWidth, float fHeight, float fAngle, bool bAddWaypoints)
{
return CreateBlock(Vector2f(fX, fY), fWidth, fHeight, fAngle, bAddWaypoints);
}
void NavigationGrid::RemoveBlock(uint32 uUID)
{
for (FastPool<usg::ai::BlockingArea>::Iterator it = m_blocks.Begin(); !it.IsEnd(); ++it)
{
if ((*it)->uUID == uUID)
{
m_blocks.Free(*it);
break;
}
}
}
const BlockingArea& NavigationGrid::CreateBlock(const Vector2f& vPos, float fWidth, float fHeight, float fAngle, bool bAddWaypoints)
{
usg::ai::BlockingArea* pNewBlockingArea = m_blocks.Alloc();
pNewBlockingArea->uUID = m_uBlockingAreaUIDCounter++;
usg::ai::OBB* pOBB = &pNewBlockingArea->shape;
pOBB->SetCenter(vPos);
pOBB->SetScale(Vector2f(fWidth, fHeight));
pOBB->SetRotation(fAngle);
if(bAddWaypoints)
{
const uint32 uCount = pOBB->GetNumVerts();
const Vector2f* pVerts = pOBB->GetVerts();
const float fOffset = 2.5f;
for(uint32 i = 0; i < uCount; i++)
{
Vector2f vPoint = vPos + pVerts[i];
const Vector2f vDirToCenter = (vPoint - vPos).GetNormalised();
vPoint += vDirToCenter * fOffset;
CreateWaypoint(vPoint,0);
}
}
return *pNewBlockingArea;
}
void NavigationGrid::FindPath(Waypoint* pStart, Waypoint* pEnd, usg::ai::Path& path) const
{
if(!pStart || !pEnd)
{
return;
}
Reset();
pStart->SetG(0.0f);
pStart->SetF(0.0f);
pStart->SetOpen(true);
m_openList.AddToEnd(pStart);
Waypoint* pCurrent = NULL;
while(m_openList.GetSize() > 0)
{
float fDistance = FLT_MAX;
for(List<Waypoint>::Iterator it = m_openList.Begin(); !it.IsEnd(); ++it)
{
Waypoint* pWp = (*it);
if(pWp->F() < fDistance)
{
pCurrent = pWp;
fDistance = pWp->F();
}
}
if(pCurrent == pEnd)
{
while(pCurrent != NULL)
{
#ifdef DEBUG_BUILD
pCurrent->m_debugDrawColor = Color::Red;
#endif
path.AddFirst(pCurrent);
pCurrent = pCurrent->GetParent();
}
return;
}
m_openList.Remove(pCurrent);
pCurrent->SetClosed(true);
pCurrent->SetOpen(false);
for(FastPool<Link>::Iterator it = pCurrent->GetLinkIterator(); !it.IsEnd(); ++it)
{
Link* pLink = (*it);
Waypoint* pLinkWp = pLink->GetWaypoint();
if(!pLinkWp->IsClosed())
{
const float fTentativeG = pCurrent->G() + pLink->Distance();
bool bIsBetter = false;
if(!pLinkWp->IsOpen())
{
m_openList.AddToFront(pLinkWp);
pLinkWp->SetOpen(true);
pLinkWp->SetClosed(false);
bIsBetter = true;
}
else
{
if(fTentativeG < pLinkWp->G())
{
bIsBetter = true;
}
}
if(bIsBetter)
{
pLinkWp->SetParent(pCurrent);
pLinkWp->SetG(fTentativeG);
pLinkWp->SetF(pLinkWp->G() + pLinkWp->GetPosition().Distance(pEnd->GetPosition()));
}
}
}
}
pCurrent = pEnd;
while(pCurrent != NULL)
{
path.AddFirst(pCurrent);
#ifdef DEBUG_BUILD
pCurrent->m_debugDrawColor = Color::Red;
#endif
pCurrent = pCurrent->GetParent();
}
}
void NavigationGrid::BuildLinks()
{
for(FastPool<Waypoint>::Iterator it = m_waypoints.Begin(); !it.IsEnd(); ++it)
{
Waypoint* pCurrent = (*it);
pCurrent->ClearLinks();
const Vector2f vFrom = pCurrent->GetPosition();
for(FastPool<Waypoint>::Iterator it2 = m_waypoints.Begin(); !it2.IsEnd(); ++it2)
{
Waypoint* pTarget = (*it2);
if(pCurrent != pTarget)
{
const Vector2f vTo = pTarget->GetPosition();
if(!LineTest(usg::ai::Line(vFrom, vTo)))
{
const float fDistance = vFrom.Distance(vTo);
pCurrent->AddLink((pTarget), fDistance);
}
}
}
}
}
bool NavigationGrid::LineTest(const Vector2f& vFrom, const Vector2f& vTo) const
{
Line line;
line.m_vFrom = vFrom;
line.m_vTo = vTo;
return LineTest(line);
}
bool NavigationGrid::LineTest(const usg::ai::Line& line) const
{
IShape* pShapes[32];
uint32 uSize = GetOverlappingShapes(&pShapes[0], 32, line);
for (uint32 i = 0; i < uSize; i++)
{
if (pShapes[i]->Intersects(line))
{
return true;
}
}
return false;
}
bool NavigationGrid::CanPlacePoint(const Vector2f& vPoint) const
{
const uint64 uPointMask = shape_details::ComputeGridMask(vPoint);
for(FastPool<usg::ai::BlockingArea>::Iterator it = m_blocks.Begin(); !it.IsEnd(); ++it)
{
const bool bMaskFail = ((*it)->shape.GetGridMask() & uPointMask) == 0;
if (!bMaskFail)
{
if ((*it)->shape.Intersects(vPoint))
{
return false;
}
}
}
return true;
}
uint32 NavigationGrid::GetOverlappingShapes(IShape** pShapes, uint32 uSize, usg::ai::Line line) const
{
uint32 uCounter = 0;
Vector2f hit;
const uint64 uLineMask = shape_details::ComputeGridMask(line.m_vFrom, line.m_vTo);
for(FastPool<usg::ai::BlockingArea>::Iterator it = m_blocks.Begin(); !it.IsEnd() && (uCounter < uSize); ++it)
{
const bool bMaskFail = ((*it)->shape.GetGridMask() & uLineMask) == 0;
if (!bMaskFail)
{
if ((*it)->shape.Intersects(line, hit))
{
pShapes[uCounter++] = &(*it)->shape;
}
}
}
return uCounter;
}
const usg::ai::OBB* NavigationGrid::GetNearestOBB(const Vector3f& vPos) const
{
return GetNearestOBB(Vector2f(vPos.x, vPos.z));
}
const usg::ai::OBB* NavigationGrid::GetNearestOBB(const Vector2f& vPos) const
{
float fDistance = FLT_MAX;
const usg::ai::OBB* pClosestOBB = NULL;
for(FastPool<usg::ai::BlockingArea>::Iterator it = m_blocks.Begin(); !it.IsEnd(); ++it)
{
const usg::ai::OBB* pOBB = &(*it)->shape;
const Vector2f& vOBB = pOBB->GetCenter();
const float fDistanceToTargetSq = (vOBB - vPos).MagnitudeSquared();
if(fDistanceToTargetSq < fDistance)
{
fDistance = fDistanceToTargetSq;
pClosestOBB = pOBB;
}
}
return pClosestOBB;
}
uint32 NavigationGrid::GetNearestOBBs(const Vector2f& vPos, usg::ai::OBB** pBuffer, uint32 uSize) const
{
if (uSize == 0)
{
return 0;
}
float fDistance = FLT_MAX;
for(FastPool<usg::ai::BlockingArea>::Iterator it = m_blocks.Begin(); !it.IsEnd(); ++it)
{
usg::ai::OBB* pOBB = &(*it)->shape;
const float fDistanceToTargetSq = pOBB->GetSquaredDistanceToPoint(vPos);
if(fDistanceToTargetSq < fDistance)
{
fDistance = fDistanceToTargetSq;
utl::MoveElements(pBuffer, 1, 0, uSize - 1);
pBuffer[0] = pOBB;
}
else
{
for(uint32 i = 1; i < uSize; i++)
{
if(pBuffer[i] == NULL)
{
pBuffer[i] = pOBB;
break;
}
else if(fDistanceToTargetSq < pBuffer[i]->GetSquaredDistanceToPoint(vPos))
{
if(i < uSize - 2)
{
utl::MoveElements(pBuffer, i + 1, i, uSize - i - 1);
}
pBuffer[i] = pOBB;
break;
}
}
}
}
if (pBuffer[uSize - 1] != NULL)
{
// Super likely
return uSize;
}
uint32 uCount = 0;
for (uint32 i = 1; i < uSize; i++)
{
if (pBuffer[i] != NULL)
{
uCount++;
}
}
return uCount;
}
uint32 NavigationGrid::GetNearestOBBs(const Vector3f& vPos, usg::ai::OBB** pBuffer, uint32 uSize) const
{
return GetNearestOBBs(Vector2f(vPos.x, vPos.z), pBuffer, uSize);
}
const usg::ai::OBB* NavigationGrid::GetNearestIntersectingOBB(const Vector3f& vPos) const
{
return GetNearestIntersectingOBB(Vector2f(vPos.x, vPos.z));
}
const usg::ai::OBB* NavigationGrid::GetNearestIntersectingOBB(const Vector2f& vPos) const
{
const uint64 uPointMask = shape_details::ComputeGridMask(vPos);
for(FastPool<usg::ai::BlockingArea>::Iterator it = m_blocks.Begin(); !it.IsEnd(); ++it)
{
const bool bMaskFail = ((*it)->shape.GetGridMask() & uPointMask) == 0;
if (bMaskFail)
{
continue;
}
if((*it)->shape.Intersects(vPos))
{
return &(*it)->shape;
}
}
return NULL;
}
void NavigationGrid::Reset() const
{
for(FastPool<Waypoint>::Iterator it = m_waypoints.Begin(); !it.IsEnd(); ++it)
{
(*it)->Reset();
}
m_openList.Clear();
}
void NavigationGrid::DebugDrawBlocks(Debug3D* pDebugRender) const
{
ASSERT(pDebugRender != NULL);
Color blue = Color::Blue;
blue.m_fA = 0.5f;
for(FastPool<usg::ai::BlockingArea>::Iterator it = m_blocks.Begin(); !it.IsEnd(); ++it)
{
const usg::ai::OBB* pOBB = &(*it)->shape;
const Vector2f vPos = pOBB->GetCenter();
const Vector2f vScale = pOBB->GetScale();
const float fAngle = pOBB->GetAngle();
usg::Matrix4x4 m;
m.LoadIdentity();
m.MakeRotateY(usg::Math::DegToRad(fAngle));
m.Scale(vScale.x * 0.5f, 20.0f, vScale.y * 0.5f, 1.0f);
m.SetPos(usg::Vector3f(vPos.x, 10.0f, vPos.y));
pDebugRender->AddCube(m, blue);
}
}
void NavigationGrid::DebugDrawWaypoints(Debug3D* pDebugRender) const
{
#ifdef DEBUG_BUILD
ASSERT(pDebugRender != NULL);
for(FastPool<usg::ai::Waypoint>::Iterator it = m_waypoints.Begin(); !it.IsEnd(); ++it)
{
usg::ai::Waypoint& wp = *(*it);
const Vector2f& vPos = wp.GetPosition();
usg::Matrix4x4 m;
m.LoadIdentity();
m.Scale(1.0f,1.0f,1.0f, 1.0f);
m.SetPos(usg::Vector3f(vPos.x, 10.0f, vPos.y));
Color green = wp.m_debugDrawColor;
green.m_fA = 0.5f;
pDebugRender->AddCube(m, green);
}
#endif
}
void NavigationGrid::DebugDrawLinks(Debug3D* pDebugRender) const
{
ASSERT(pDebugRender != NULL);
Color red = Color::Red;
red.m_fA = 0.5f;
for(FastPool<usg::ai::Waypoint>::Iterator it = m_waypoints.Begin(); !it.IsEnd(); ++it)
{
usg::ai::Waypoint& wp = *(*it);
const Vector2f& vPos = wp.GetPosition();
FastPool<usg::ai::Link>::Iterator it2 = wp.GetLinkIterator();
for(; !it2.IsEnd(); ++it2)
{
const Vector2f vV = (*it2)->GetWaypoint()->GetPosition();
pDebugRender->AddLine(Vector3f(vPos.x, 20.0f, vPos.y), Vector3f(vV.x, 20.0f, vV.y), red, 1.0f);
}
}
}
bool NavigationGrid::GetNearestValidPoint(const IShape* pShape, const Vector2f& vPoint, const Vector2f& vOrigin, Vector2f& vOutPoint) const
{
const IShape* pOBB = (pShape == NULL) ? GetNearestIntersectingOBB(vPoint) : pShape;
if(pOBB != NULL)
{
Vector2f vIP1, vIP2;
usg::ai::Line line;
line.m_vFrom = vOrigin;
line.m_vTo = vPoint;
int iIntersectionCount = pOBB->Intersects(line, vIP1, vIP2);
if (iIntersectionCount == 1)
{
// Great! Move slightly toward vOrigin from the intersection points
vOutPoint = vIP1 + (vOrigin-vIP1)*0.001f;
return true;
}
}
return false;
}
} // namespace ai
} // namespace usg
| 16,504 | 7,353 |
// $Id: ClientRequestInterceptor.cpp 91652 2010-09-08 14:42:59Z johnnyw $
#include "ClientRequestInterceptor.h"
#include "tao/CORBA_String.h"
#include "ace/Log_Msg.h"
#include "ace/OS_NS_string.h"
ClientRequestInterceptor::ClientRequestInterceptor (
PortableInterceptor::SlotId id,
PortableInterceptor::Current_ptr pi_current)
: slot_id_ (id),
pi_current_ (PortableInterceptor::Current::_duplicate (pi_current))
{
}
char *
ClientRequestInterceptor::name ()
{
return CORBA::string_dup ("ClientRequestInterceptor");
}
void
ClientRequestInterceptor::destroy (void)
{
}
void
ClientRequestInterceptor::send_request (
PortableInterceptor::ClientRequestInfo_ptr ri)
{
CORBA::String_var op = ri->operation ();
if (ACE_OS::strcmp (op.in (), "invoke_me") != 0)
return; // Don't mess with PICurrent if not invoking test method.
try
{
// Retrieve data from the RSC (request scope current).
CORBA::Long number = 0;
CORBA::Any_var data =
ri->get_slot (this->slot_id_);
if (!(data.in () >>= number))
{
ACE_ERROR ((LM_ERROR,
"(%P|%t) ERROR: Unable to extract data from Any.\n"));
throw CORBA::INTERNAL ();
}
ACE_DEBUG ((LM_DEBUG,
"(%P|%t) Extracted <%d> from RSC slot %u\n",
number,
this->slot_id_));
CORBA::Any new_data;
CORBA::String_var s = CORBA::string_dup ("Et tu Brute?");
new_data <<= s.in ();
// Now reset the contents of our slot in the thread-scope
// current (TSC).
this->pi_current_->set_slot (this->slot_id_,
new_data);
// Now retrieve the data from the RSC again. It should not have
// changed!
CORBA::Long number2 = -1;
CORBA::Any_var data2 =
ri->get_slot (this->slot_id_);
if (!(data2.in () >>= number2)
|| number != number2)
{
ACE_ERROR ((LM_ERROR,
"(%P|%t) ERROR: RSC was modified after "
"TSC was modified.\n"));
throw CORBA::INTERNAL ();
}
}
catch (const PortableInterceptor::InvalidSlot& ex)
{
ex._tao_print_exception ("Exception thrown in ""send_request()\n");
ACE_DEBUG ((LM_DEBUG,
"Invalid slot: %u\n",
this->slot_id_));
throw CORBA::INTERNAL ();
}
ACE_DEBUG ((LM_INFO,
"(%P|%t) Client side RSC/TSC semantics appear "
"to be correct.\n"));
}
void
ClientRequestInterceptor::send_poll (
PortableInterceptor::ClientRequestInfo_ptr)
{
}
void
ClientRequestInterceptor::receive_reply (
PortableInterceptor::ClientRequestInfo_ptr)
{
}
void
ClientRequestInterceptor::receive_exception (
PortableInterceptor::ClientRequestInfo_ptr)
{
}
void
ClientRequestInterceptor::receive_other (
PortableInterceptor::ClientRequestInfo_ptr)
{
}
| 2,953 | 984 |
// Copyright (c) 2021 Chadwick Boulay
#include "LSLOutletComponent.h"
#include "LSLPrivatePCH.h"
#include <string>
// Sets default values for this component's properties
ULSLOutletComponent::ULSLOutletComponent() :
StreamName(),
StreamType(),
SamplingRate(LSL_IRREGULAR_RATE),
ChannelFormat(EChannelFormat::cfmt_float32),
StreamID("NoStreamID")
{
// Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features
// off to improve performance if you don't need them.
bWantsInitializeComponent = true;
}
// Called when the game starts
void ULSLOutletComponent::BeginPlay()
{
Super::BeginPlay();
//lsl_streaminfo lsl_myinfo = lsl_create_streaminfo(TCHAR_TO_ANSI(*StreamName), TCHAR_TO_ANSI(*StreamType), ChannelCount, SamplingRate, (lsl_channel_format_t)ChannelFormat, TCHAR_TO_ANSI(*StreamID));
UE_LOG(LogLSL, Log, TEXT("Attempting to create stream outlet with name %s, type %s, sampling rate %d."), *StreamName, *StreamType, SamplingRate);
lsl::stream_info data_info(
TCHAR_TO_ANSI(*StreamName),
TCHAR_TO_ANSI(*StreamType),
(int16)Channels.Num(),
(double)SamplingRate,
lsl::channel_format_t(ChannelFormat),
TCHAR_TO_ANSI(*StreamID)
);
lsl::xml_element channels = data_info.desc().append_child("channels");
for (auto& ch : Channels)
{
channels.append_child("channel")
.append_child_value("label", TCHAR_TO_UTF8(*(ch.Label)))
.append_child_value("unit", TCHAR_TO_UTF8(*(ch.Unit)));
}
//TODO: Check to see if the stream already exists.
my_outlet = new lsl::stream_outlet(data_info);
}
void ULSLOutletComponent::EndPlay(const EEndPlayReason::Type EndPlayReason)
{
if (my_outlet != nullptr)
{
delete my_outlet;
my_outlet = nullptr;
}
Super::EndPlay(EndPlayReason);
}
//push_sample functions
void ULSLOutletComponent::PushSampleFloat(TArray<float> data)
{
my_outlet->push_sample(data.GetData());
}
/*
void ULSLOutletComponent::PushSampleDouble(TArray<double> data)
{
my_outlet->push_sample(data.GetData());
}
*/
void ULSLOutletComponent::PushSampleLong(TArray<int32> data)
{
my_outlet->push_sample(data.GetData());
}
/*
void ULSLOutletComponent::PushSampleInt(TArray<int16> data)
{
my_outlet->push_sample(data.GetData());
}
*/
/*
void ULSLOutletComponent::PushSampleShort(TArray<int16> data)
{
my_outlet->push_sample(data.GetData());
}
*/
void ULSLOutletComponent::PushSampleString(TArray<FString> data)
{
std::vector<std::string> strVec;
int32 b;
for(b=0; b < data.Num(); b++)
{
strVec.push_back(TCHAR_TO_UTF8(*data[b]));
}
my_outlet->push_sample(strVec);
}
/*
void ULSLOutletComponent::PushSampleChar(TArray<char> data)
{
lsl_push_sample_ctp(lsl_myoutlet,const_cast<char*>(data),0.0,true);
}
*/
| 2,820 | 1,045 |
#ifndef ULMBLAS_LEVEL3_MKERNEL_MTRLSM_TCC
#define ULMBLAS_LEVEL3_MKERNEL_MTRLSM_TCC 1
#include <ulmblas/level3/ukernel/ugemm.h>
#include <ulmblas/level3/mkernel/mtrlsm.h>
#include <ulmblas/level3/ukernel/utrlsm.h>
namespace ulmBLAS {
template <typename IndexType, typename T, typename TB>
void
mtrlsm(IndexType mc,
IndexType nc,
const T &alpha,
const T *A_,
T *B_,
TB *B,
IndexType incRowB,
IndexType incColB)
{
const IndexType MR = BlockSizeUGemm<T>::MR;
const IndexType NR = BlockSizeUGemm<T>::NR;
const IndexType mp = (mc+MR-1) / MR;
const IndexType np = (nc+NR-1) / NR;
const IndexType mr_ = mc % MR;
const IndexType nr_ = nc % NR;
IndexType mr, nr;
IndexType kc;
const T *nextA;
const T *nextB;
for (IndexType j=0; j<np; ++j) {
nr = (j!=np-1 || nr_==0) ? NR : nr_;
nextB = &B_[j*mc*NR];
IndexType ia = 0;
for (IndexType i=0; i<mp; ++i) {
mr = (i!=mp-1 || mr_==0) ? MR : mr_;
kc = std::min(i*MR, mc-mr);
nextA = &A_[(ia+i+1)*MR*MR];
if (i==mp-1) {
nextA = A_;
nextB = &B_[(j+1)*mc*NR];
if (j==np-1) {
nextB = B_;
}
}
if (mr==MR && nr==NR) {
ugemm(kc,
T(-1), &A_[ia*MR*MR], &B_[j*mc*NR],
alpha,
&B_[(j*mc+kc)*NR], NR, IndexType(1),
nextA, nextB);
utrlsm(&A_[(ia*MR+kc)*MR], &B_[(j*mc+kc)*NR],
&B_[(j*mc+kc)*NR], NR, IndexType(1));
} else {
// Call buffered micro kernels
ugemm(mr, nr, kc,
T(-1), &A_[ia*MR*MR], &B_[j*mc*NR],
alpha,
&B_[(j*mc+kc)*NR], NR, IndexType(1),
nextA, nextB);
utrlsm(mr, nr,
&A_[(ia*MR+kc)*MR], &B_[(j*mc+kc)*NR],
&B_[(j*mc+kc)*NR], NR, IndexType(1));
}
ia += i+1;
}
}
for (IndexType j=0; j<np; ++j) {
nr = (j!=np-1 || nr_==0) ? NR : nr_;
gecopy(mc, nr, false,
&B_[j*mc*NR], NR, IndexType(1),
&B[j*NR*incColB], incRowB, incColB);
}
}
} // namespace ulmBLAS
#endif // ULMBLAS_LEVEL3_MKERNEL_MTRLSM_TCC
| 2,510 | 1,009 |
#include <iostream>
#include <vector>
#include <random>
#include <iomanip>
#include <fstream>
struct RGB {
int r;
int g;
int b;
};
unsigned distance(const RGB& a, const RGB& b) {
return unsigned(sqrt( (a.r-b.r)*(a.r-b.r)
+ (a.g-b.g)*(a.g-b.g)
+ (a.b-b.b)*(a.b-b.b) ));
}
int main(int argc, char *argv[]) {
std::ofstream f("out");
std::srand(time(0));
const unsigned len = 1000;
const unsigned gradient_len = 50;
const unsigned min_distance = 30;
const unsigned max_distance = 100;
std::vector<RGB> colors;
colors.resize(len);
colors[0] = {0, 0, 0};
RGB last_color{0, 0, 0};
RGB target_color{0, 0, 0};
for (unsigned i = 0; i < len - 1; ++i) {
if (i % gradient_len == 0) { //generate next color goal
last_color = colors[i];
if (i == len-gradient_len) {
target_color.r = 255;
target_color.g = 255;
target_color.b = 255;
} else {
unsigned dist;
do {
target_color.r = rand() % 256;
target_color.g = rand() % 256;
target_color.b = rand() % 256;
dist = distance(target_color, last_color);
} while (dist > max_distance || dist < min_distance);
}
std::cout << "Target color: " << std::setw(3) << std::setfill('0') << unsigned(target_color.r) << ", "
<< std::setw(3) << std::setfill('0') << unsigned(target_color.g) << ", "
<< std::setw(3) << std::setfill('0') << unsigned(target_color.b) << std::endl;
}
colors[i + 1].r = last_color.r + double(target_color.r - last_color.r) * double(i%gradient_len)/double(gradient_len);
colors[i + 1].g = last_color.g + double(target_color.g - last_color.g) * double(i%gradient_len)/double(gradient_len);
colors[i + 1].b = last_color.b + double(target_color.b - last_color.b) * double(i%gradient_len)/double(gradient_len);
f << colors[i].r << " " << colors[i].g << " " << colors[i].b << std::endl;
}
return 0;
}
| 1,889 | 877 |
#pragma once
class IGameTypes
{
public:
virtual ~IGameTypes() {}
virtual bool Initialize(bool force) = 0;
virtual bool IsInitialized() const = 0;
virtual bool SetGameTypeAndMode(const char* gameType, const char* gameMode) = 0;
virtual bool GetGameTypeAndModeFromAlias(const char* alias, int& gameType, int& gameMode) = 0;
virtual bool SetGameTypeAndMode(int gameType, int gameMode) = 0;
virtual void SetAndParseExtendedServerInfo(void* pExtendedServerInfo) = 0;
virtual bool CheckShouldSetDefaultGameModeAndType(const char* mapName) = 0;
virtual int GetCurrentGameType() const = 0;
virtual int GetCurrentGameMode() const = 0;
virtual const char* GetCurrentMapName() = 0;
virtual const char* GetCurrentGameTypeNameID() = 0;
virtual const char* GetCurrentGameModeNameID() = 0;
virtual bool ApplyConvarsForCurrentMode(bool isMultiplayer) = 0;
virtual void DisplayConvarsForCurrentMode() = 0;
virtual const void* GetWeaponProgressionForCurrentModeCT() = 0;
virtual const void* GetWeaponProgressionForCurrentModeT() = 0;
virtual int GetNoResetVoteThresholdForCurrentModeCT() = 0;
virtual int GetNoResetVoteThresholdForCurrentModeT() = 0;
virtual const char* GetGameTypeFromInt(int gameType) = 0;
virtual const char* GetGameModeFromInt(int gameType, int gameMode) = 0;
virtual bool GetGameModeAndTypeIntsFromStrings(const char* szGameType, const char* szGameMode, int& iOutGameType, int& iOutGameMode) = 0;
virtual bool GetGameModeAndTypeNameIdsFromStrings(const char* szGameType, const char* szGameMode, const char*& szOutGameTypeNameId, const char*& szOutGameModeNameId) = 0;
virtual void CreateOrUpdateWorkshopMapGroup(const char* mapGroup, const void* mapList) = 0;
virtual bool IsWorkshopMapGroup(const char* mapGroup) = 0;
virtual const char* GetRandomMapGroup(const char* gameType, const char* gameMode) = 0;
virtual const char* GetFirstMap(const char* mapGroup) = 0;
virtual const char* GetRandomMap(const char* mapGroup) = 0;
virtual const char* GetNextMap(const char* mapGroup, const char* mapName) = 0;
virtual int GetMaxPlayersForTypeAndMode(int iType, int iMode) = 0;
virtual bool IsValidMapGroupName(const char* mapGroup) = 0;
virtual bool IsValidMapInMapGroup(const char* mapGroup, const char* mapName) = 0;
virtual bool IsValidMapGroupForTypeAndMode(const char* mapGroup, const char* gameType, const char* gameMode) = 0;
virtual bool ApplyConvarsForMap(const char* mapName, bool isMultiplayer) = 0;
virtual bool GetMapInfo(const char* mapName, unsigned int& richPresence) = 0;
virtual const void* GetTModelsForMap(const char* mapName) = 0;
virtual const void* GetCTModelsForMap(const char* mapName) = 0;
virtual const void* GetHostageModelsForMap(const char* mapName) = 0;
virtual int GetDefaultGameTypeForMap(const char* mapName) = 0;
virtual int GetDefaultGameModeForMap(const char* mapName) = 0;
virtual const char* GetTViewModelArmsForMap(const char* mapName) = 0;
virtual const char* GetCTViewModelArmsForMap(const char* mapName) = 0;
virtual const char* GetRequiredAttrForMap(const char* mapName) = 0;
virtual int GetRequiredAttrValueForMap(const char* mapName) = 0;
virtual const char* GetRequiredAttrRewardForMap(const char* mapName) = 0;
virtual int GetRewardDropListForMap(const char* mapName) = 0;
virtual const void* GetMapGroupMapList(const char* mapGroup) = 0;
virtual bool GetRunMapWithDefaultGametype() = 0;
virtual void SetRunMapWithDefaultGameType(bool bUseDefault) = 0;
virtual bool GetLoadingScreenDataIsCorrect() = 0;
virtual void SetLoadingScreenDataIsCorrect(bool bIsCorrect) = 0;
virtual bool SetCustomBotDifficulty(int botDiff) = 0;
virtual int GetCustomBotDifficulty() = 0;
virtual int GetCurrentServerNumSlots() = 0;
virtual int GetCurrentServerSettingInt(const char* settingName, int defaultValue) = 0;
}; | 3,829 | 1,269 |
//
// This source file is part of appleseed.
// Visit https://appleseedhq.net/ for additional information and resources.
//
// This software is released under the MIT license.
//
// Copyright (c) 2014-2018 Esteban Tovagliari, The appleseedhq Organization
//
// 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.
//
// Interface header.
#include "oslshadergroupexec.h"
// appleseed.renderer headers.
#include "renderer/kernel/shading/closures.h"
#include "renderer/kernel/shading/oslshadingsystem.h"
#include "renderer/kernel/shading/shadingpoint.h"
#include "renderer/kernel/shading/shadingray.h"
#include "renderer/modeling/bsdf/bsdf.h"
#include "renderer/modeling/shadergroup/shadergroup.h"
// Standard headers.
#include <cassert>
using namespace foundation;
namespace renderer
{
//
// OSLShaderGroupExec class implementation.
//
OSLShaderGroupExec::OSLShaderGroupExec(OSLShadingSystem& shading_system, Arena& arena)
: m_osl_shading_system(shading_system)
, m_arena(arena)
, m_osl_thread_info(shading_system.create_thread_info())
, m_osl_shading_context(shading_system.get_context(m_osl_thread_info))
{
}
OSLShaderGroupExec::~OSLShaderGroupExec()
{
if (m_osl_shading_context)
m_osl_shading_system.release_context(m_osl_shading_context);
if (m_osl_thread_info)
m_osl_shading_system.destroy_thread_info(m_osl_thread_info);
}
void OSLShaderGroupExec::execute_shading(
const ShaderGroup& shader_group,
const ShadingPoint& shading_point) const
{
do_execute(
shader_group,
shading_point,
shading_point.get_ray().m_flags);
}
void OSLShaderGroupExec::execute_subsurface(
const ShaderGroup& shader_group,
const ShadingPoint& shading_point) const
{
do_execute(
shader_group,
shading_point,
VisibilityFlags::SubsurfaceRay);
}
void OSLShaderGroupExec::execute_transparency(
const ShaderGroup& shader_group,
const ShadingPoint& shading_point,
Alpha& alpha,
float* holdout) const
{
do_execute(
shader_group,
shading_point,
VisibilityFlags::TransparencyRay);
process_transparency_tree(shading_point.get_osl_shader_globals().Ci, alpha);
if (holdout)
*holdout = process_holdout_tree(shading_point.get_osl_shader_globals().Ci);
}
void OSLShaderGroupExec::execute_shadow(
const ShaderGroup& shader_group,
const ShadingPoint& shading_point,
Alpha& alpha) const
{
do_execute(
shader_group,
shading_point,
VisibilityFlags::ShadowRay);
process_transparency_tree(shading_point.get_osl_shader_globals().Ci, alpha);
}
void OSLShaderGroupExec::execute_emission(
const ShaderGroup& shader_group,
const ShadingPoint& shading_point) const
{
do_execute(
shader_group,
shading_point,
VisibilityFlags::LightRay);
}
void OSLShaderGroupExec::execute_bump(
const ShaderGroup& shader_group,
const ShadingPoint& shading_point,
const Vector2f& s) const
{
// Choose between BSSRDF and BSDF.
if (shader_group.has_subsurface() && s[0] < 0.5f)
{
do_execute(
shader_group,
shading_point,
VisibilityFlags::SubsurfaceRay);
CompositeSubsurfaceClosure c(
Basis3f(shading_point.get_shading_basis()),
shading_point.get_osl_shader_globals().Ci,
m_arena);
// Pick a shading basis from one of the BSSRDF closures.
if (c.get_closure_count() > 0)
{
const size_t index = c.choose_closure(s[1]);
shading_point.set_shading_basis(
Basis3d(c.get_closure_shading_basis(index)));
}
}
else
{
do_execute(
shader_group,
shading_point,
VisibilityFlags::CameraRay);
choose_bsdf_closure_shading_basis(shading_point, s);
}
}
Color3f OSLShaderGroupExec::execute_background(
const ShaderGroup& shader_group,
const Vector3f& outgoing) const
{
assert(m_osl_shading_context);
assert(m_osl_thread_info);
OSL::ShaderGlobals sg;
memset(&sg, 0, sizeof(OSL::ShaderGlobals));
sg.I = outgoing;
sg.renderer = m_osl_shading_system.renderer();
sg.raytype = VisibilityFlags::CameraRay;
m_osl_shading_system.execute(
m_osl_shading_context,
*reinterpret_cast<OSL::ShaderGroup*>(shader_group.osl_shader_group()),
sg);
return process_background_tree(sg.Ci);
}
void OSLShaderGroupExec::do_execute(
const ShaderGroup& shader_group,
const ShadingPoint& shading_point,
const VisibilityFlags::Type ray_flags) const
{
assert(m_osl_shading_context);
assert(m_osl_thread_info);
shading_point.initialize_osl_shader_globals(
shader_group,
ray_flags,
m_osl_shading_system.renderer());
m_osl_shading_system.execute(
m_osl_shading_context,
*reinterpret_cast<OSL::ShaderGroup*>(shader_group.osl_shader_group()),
shading_point.get_osl_shader_globals());
}
void OSLShaderGroupExec::choose_bsdf_closure_shading_basis(
const ShadingPoint& shading_point,
const Vector2f& s) const
{
CompositeSurfaceClosure c(
Basis3f(shading_point.get_shading_basis()),
shading_point.get_osl_shader_globals().Ci,
m_arena);
float pdfs[CompositeSurfaceClosure::MaxClosureEntries];
const size_t num_closures = c.compute_pdfs(ScatteringMode::All, pdfs);
if (num_closures == 0)
return;
const size_t index = c.choose_closure(s[1], num_closures, pdfs);
shading_point.set_shading_basis(
Basis3d(c.get_closure_shading_basis(index)));
}
} // namespace renderer
| 7,020 | 2,398 |
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <assert.h>
#include <string.h>
#include "hvr_avl_tree.h"
struct hvr_avl_node dummy = { {&dummy, &dummy}, 0, 0, 0 }, *nnil = &dummy;
static struct hvr_avl_node *new_node(uint32_t key, uint64_t value,
hvr_avl_node_allocator *tracker) {
struct hvr_avl_node *n = hvr_avl_node_allocator_alloc(tracker);
n->kid[0] = nnil;
n->kid[1] = nnil;
n->value = value;
n->key = key;
n->height = 1;
return n;
}
static inline int16_t max(int16_t a, int16_t b) { return a > b ? a : b; }
static inline void set_height(struct hvr_avl_node *n) {
n->height = 1 + max(n->kid[0]->height, n->kid[1]->height);
}
static inline int balance(struct hvr_avl_node *n) {
return n->kid[0]->height - n->kid[1]->height;
}
// rotate a subtree according to dir; if new root is nil, old root is freed
static struct hvr_avl_node * rotate(struct hvr_avl_node **rootp, int dir,
hvr_avl_node_allocator *tracker)
{
struct hvr_avl_node *old_r = *rootp, *new_r = old_r->kid[dir];
if (nnil == (*rootp = new_r))
hvr_avl_node_allocator_free(old_r, tracker);
else {
old_r->kid[dir] = new_r->kid[!dir];
set_height(old_r);
new_r->kid[!dir] = old_r;
}
return new_r;
}
static void adjust_balance(struct hvr_avl_node **rootp,
hvr_avl_node_allocator *tracker)
{
struct hvr_avl_node *root = *rootp;
int b = balance(root)/2;
if (b) {
int dir = (1 - b)/2;
if (balance(root->kid[dir]) == -b) {
rotate(&root->kid[dir], !dir, tracker);
}
root = rotate(rootp, dir, tracker);
}
if (root != nnil) set_height(root);
}
// find the node that contains value as payload; or returns 0
static struct hvr_avl_node *query(struct hvr_avl_node *root, uint32_t key)
{
return root == nnil
? 0
: root->key == key
? root
: query(root->kid[key > root->key], key);
}
int hvr_avl_insert(struct hvr_avl_node **rootp, uint32_t key, uint64_t value,
hvr_avl_node_allocator *tracker) {
int result;
struct hvr_avl_node *root = *rootp;
if (root == nnil) {
*rootp = new_node(key, value, tracker);
result = 1;
} else if (key != root->key) { // don't allow dup keys
result = hvr_avl_insert(&root->kid[key > root->key], key, value,
tracker);
adjust_balance(rootp, tracker);
} else {
// Duplicate key
result = 0;
}
return result;
}
int hvr_avl_delete(struct hvr_avl_node **rootp, uint32_t key,
hvr_avl_node_allocator *tracker)
{
struct hvr_avl_node *root = *rootp;
if (root == nnil) return 0; // not found
// if this is the node we want, rotate until off the tree
if (root->key == key)
if (nnil == (root = rotate(rootp, balance(root) < 0, tracker)))
return 1;
int success = hvr_avl_delete(&root->kid[key > root->key], key,
tracker);
adjust_balance(rootp, tracker);
return success;
}
void hvr_avl_delete_all(struct hvr_avl_node *root,
hvr_avl_node_allocator *tracker) {
if (root == nnil) return;
hvr_avl_delete_all(root->kid[0], tracker);
hvr_avl_delete_all(root->kid[1], tracker);
hvr_avl_node_allocator_free(root, tracker);
}
static void hvr_avl_serialize_helper(struct hvr_avl_node *root,
uint64_t *values, int arr_capacity, int *index) {
if (root == nnil) return;
assert(*index < arr_capacity);
values[*index] = root->value;
*index += 1;
hvr_avl_serialize_helper(root->kid[0], values, arr_capacity, index);
hvr_avl_serialize_helper(root->kid[1], values, arr_capacity, index);
}
int hvr_avl_serialize(struct hvr_avl_node *root,
uint64_t *values, int arr_capacity) {
int index = 0;
hvr_avl_serialize_helper(root, values, arr_capacity, &index);
return index;
}
struct hvr_avl_node *hvr_avl_find(const struct hvr_avl_node *root,
const uint32_t key) {
while (root != nnil && root->key != key) {
root = hvr_avl_find(root->kid[key > root->key], key);
}
return (struct hvr_avl_node *)root;
/*
if (root == nnil) {
return nnil;
} else if (root->key == key) {
return (struct hvr_avl_node *)root;
} else {
return hvr_avl_find(root->kid[key > root->key], key);
}
*/
}
static void hvr_avl_size_helper(struct hvr_avl_node *curr, unsigned *counter) {
if (curr != nnil) {
*counter += 1;
hvr_avl_size_helper(curr->kid[0], counter);
hvr_avl_size_helper(curr->kid[1], counter);
}
}
unsigned hvr_avl_size(struct hvr_avl_node *root) {
unsigned counter = 0;
hvr_avl_size_helper(root, &counter);
return counter;
}
void hvr_avl_node_allocator_init(hvr_avl_node_allocator *allocator,
size_t pool_size, const char *envvar) {
struct hvr_avl_node *pool = (struct hvr_avl_node *)malloc_helper(
pool_size * sizeof(*pool));
assert(pool);
allocator->head = pool;
for (size_t i = 0; i < pool_size - 1; i++) {
pool[i].kid[0] = &pool[i + 1];
}
pool[pool_size - 1].kid[0] = NULL;
allocator->mem = pool;
allocator->pool_size = pool_size;
allocator->n_reserved = 0;
allocator->envvar = (char *)malloc(strlen(envvar) + 1);
memcpy(allocator->envvar, envvar, strlen(envvar) + 1);
}
struct hvr_avl_node *hvr_avl_node_allocator_alloc(
hvr_avl_node_allocator *allocator) {
struct hvr_avl_node *result = allocator->head;
if (!result) {
fprintf(stderr, "ERROR failed allocating AVL node. Increase %s "
"(%lu).\n", allocator->envvar, allocator->pool_size);
abort();
}
allocator->head = result->kid[0];
allocator->n_reserved += 1;
return result;
}
void hvr_avl_node_allocator_free(struct hvr_avl_node *node,
hvr_avl_node_allocator *allocator) {
node->kid[0] = allocator->head;
allocator->head = node;
allocator->n_reserved -= 1;
}
void hvr_avl_node_allocator_bytes_usage(hvr_avl_node_allocator *allocator,
size_t *out_allocated, size_t *out_used) {
*out_used = allocator->n_reserved * sizeof(struct hvr_avl_node);
*out_allocated = allocator->pool_size * sizeof(struct hvr_avl_node);
}
| 6,125 | 2,521 |
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/aura/window_port_local.h"
#include "ui/aura/client/cursor_client.h"
#include "ui/aura/env.h"
#include "ui/aura/window.h"
#include "ui/aura/window_delegate.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
namespace aura {
namespace {
class ScopedCursorHider {
public:
explicit ScopedCursorHider(Window* window)
: window_(window), hid_cursor_(false) {
if (!window_->IsRootWindow())
return;
const bool cursor_is_in_bounds = window_->GetBoundsInScreen().Contains(
Env::GetInstance()->last_mouse_location());
client::CursorClient* cursor_client = client::GetCursorClient(window_);
if (cursor_is_in_bounds && cursor_client &&
cursor_client->IsCursorVisible()) {
cursor_client->HideCursor();
hid_cursor_ = true;
}
}
~ScopedCursorHider() {
if (!window_->IsRootWindow())
return;
// Update the device scale factor of the cursor client only when the last
// mouse location is on this root window.
if (hid_cursor_) {
client::CursorClient* cursor_client = client::GetCursorClient(window_);
if (cursor_client) {
const display::Display& display =
display::Screen::GetScreen()->GetDisplayNearestWindow(window_);
cursor_client->SetDisplay(display);
cursor_client->ShowCursor();
}
}
}
private:
Window* window_;
bool hid_cursor_;
DISALLOW_COPY_AND_ASSIGN(ScopedCursorHider);
};
} // namespace
WindowPortLocal::WindowPortLocal(Window* window) : window_(window) {}
WindowPortLocal::~WindowPortLocal() {}
void WindowPortLocal::OnPreInit(Window* window) {}
void WindowPortLocal::OnDeviceScaleFactorChanged(float device_scale_factor) {
ScopedCursorHider hider(window_);
if (window_->delegate())
window_->delegate()->OnDeviceScaleFactorChanged(device_scale_factor);
}
void WindowPortLocal::OnWillAddChild(Window* child) {}
void WindowPortLocal::OnWillRemoveChild(Window* child) {}
void WindowPortLocal::OnWillMoveChild(size_t current_index, size_t dest_index) {
}
void WindowPortLocal::OnVisibilityChanged(bool visible) {}
void WindowPortLocal::OnDidChangeBounds(const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) {}
std::unique_ptr<WindowPortPropertyData> WindowPortLocal::OnWillChangeProperty(
const void* key) {
return nullptr;
}
void WindowPortLocal::OnPropertyChanged(
const void* key,
std::unique_ptr<WindowPortPropertyData> data) {}
} // namespace aura
| 2,677 | 827 |
//----------------------------------*-C++-*----------------------------------//
/*!
* \file SPn/spn/Fixed_Source_Solver.pt.cc
* \author Thomas M. Evans
* \date Fri Feb 21 14:41:20 2014
* \brief Fixed_Source_Solver explicit instantiation.
* \note Copyright (C) 2014 Oak Ridge National Laboratory, UT-Battelle, LLC.
*/
//---------------------------------------------------------------------------//
#include "Fixed_Source_Solver.t.hh"
#include "solvers/LinAlgTypedefs.hh"
namespace profugus
{
template class Fixed_Source_Solver<EpetraTypes>;
template class Fixed_Source_Solver<TpetraTypes>;
} // end namespace profugus
//---------------------------------------------------------------------------//
// end of Fixed_Source_Solver.pt.cc
//---------------------------------------------------------------------------//
| 847 | 249 |
#include "Sprite.h"
#include "ResourceManager.h"
Sprite::Sprite(SpriteType sprite)
{
m_texture = ResourceManager::getInstance().loadTexture(sprite.filename);
m_columnCount = sprite.columnCount;
m_rowCount = sprite.rowCount;
m_animSpeed = sprite.animSpeed;
m_sheetWidth = m_texture->as<aie::Texture>()->getWidth();
m_sheetHeight = m_texture->as<aie::Texture>()->getHeight();
m_spriteWidth = m_texture->as<aie::Texture>()->getWidth() / m_columnCount;
m_spriteHeight = m_texture->as<aie::Texture>()->getHeight() / m_rowCount;
}
void Sprite::changeSprite(SpriteType sprite)
{
m_texture = ResourceManager::getInstance().loadTexture(sprite.filename);
m_columnCount = sprite.columnCount;
m_rowCount = sprite.rowCount;
m_animSpeed = sprite.animSpeed;
m_sheetWidth = m_texture->as<aie::Texture>()->getWidth();
m_sheetHeight = m_texture->as<aie::Texture>()->getHeight();
m_spriteWidth = m_texture->as<aie::Texture>()->getWidth() / m_columnCount;
m_spriteHeight = m_texture->as<aie::Texture>()->getHeight() / m_rowCount;
}
void Sprite::updateUVRect(aie::Renderer2D* renderer)
{
//get size of single frame as percentage of total spritesheet
float width = 1.0f / m_columnCount;
float height = 1.0f / m_rowCount;
//initialise
renderer->setUVRect(width * m_currentCol, height * m_currentRow, width, height);
//play animation
if (m_timer > m_animSpeed)
{
++m_currentCol;
if (m_currentCol == m_columnCount)
{
++m_currentRow;
m_currentCol = 0;
}
if (m_currentRow == m_rowCount)
m_currentRow = 0;
renderer->setUVRect(width * m_currentCol, height * m_currentRow, width, height);
m_timer = 0;
}
}
void Sprite::draw(GameObject* gameObject, aie::Renderer2D* renderer)
{
updateUVRect(renderer);
renderer->drawSpriteTransformed3x3(m_texture->as<aie::Texture>(),
gameObject->getGlobalTransformFloat(), m_spriteWidth, m_spriteHeight);
renderer->setUVRect(1, 1, 1, 1); //reset UV
} | 1,920 | 757 |
#include "difference.h"
#include "json.hpp"
#include "clean.h"
#include "myersDiff.h"
// FIXME: Thus function has terrible variable names (diff1, diff2, a, b)
// and the code is insufficiently commented for long term maintenance.
void Difference::printJSON(std::ostream & file_out) {
std::string diff1_name;
std::string diff2_name;
switch (type) {
// ByLineByChar;
// ByWordByChar;
// VectorVectorStringType;
// ByLineByWord;
// VectorOtherType;
case ByLineByChar:
diff1_name = "line";
diff2_name = "char";
break;
case ByWordByChar:
diff1_name = "word";
diff2_name = "char";
break;
case ByLineByWord:
diff1_name = "line";
diff2_name = "word";
break;
default:
diff1_name = "line";
diff2_name = "char";
break;
}
nlohmann::json whole_file;
// always have a "differences" tag, even if it is an empty array
whole_file["differences"] = nlohmann::json::array();
for (unsigned int block = 0; block < changes.size(); block++) {
nlohmann::json blob;
nlohmann::json student;
nlohmann::json expected;
student["start"] = changes[block].a_start;
for (unsigned int line = 0; line < changes[block].a_changes.size(); line++) {
nlohmann::json d1;
d1[diff1_name+"_number"] = changes[block].a_changes[line];
if (changes[block].a_characters.size() > line &&
changes[block].a_characters[line].size() > 0) {
nlohmann::json d2;
for (unsigned int character=0; character< changes[block].a_characters[line].size(); character++) {
d2.push_back(changes[block].a_characters[line][character]);
}
d1[diff2_name+"_number"] = d2;
}
student[diff1_name].push_back(d1);
}
expected["start"] = changes[block].b_start;
for (unsigned int line = 0; line < changes[block].b_changes.size(); line++) {
nlohmann::json d1;
d1[diff1_name+"_number"] = changes[block].b_changes[line];
if (changes[block].b_characters.size() > line &&
changes[block].b_characters[line].size() > 0) {
nlohmann::json d2;
for (unsigned int character=0; character< changes[block].b_characters[line].size(); character++) {
d2.push_back(changes[block].b_characters[line][character]);
}
d1[diff2_name+"_number"] = d2;
}
expected[diff1_name].push_back(d1);
}
blob["actual"] = student;
blob["expected"] = expected;
whole_file["differences"].push_back(blob);
}
file_out << whole_file.dump(4) << std::endl;
return;
}
void find_spot(const std::vector<std::string> &adata,
int num_rows,
int start_row,
int offset,
int &which_line,
int &which_character) {
which_line = start_row;
which_character = offset;
while (1) {
if (adata[which_line].size()+1 > which_character) {
break;
}
which_character -= (adata[which_line].size())+1;
which_line++;
if (which_line >= adata.size() -1) break;
}
}
void IMPROVE(Change &c,
const std::vector<std::string> &adata,
const std::vector<std::string> &bdata,
std::string &added,
std::string &deleted,
int &tmp_line_added,
int &tmp_line_deleted,
int &tmp_char_added,
int &tmp_char_deleted) {
// std::cout << "SOMETHING BETTER NEEDED HERE" << std::endl;
nlohmann::json j;
vectorOfLines a;
vectorOfLines b;
a.push_back(added);
b.push_back(deleted);
Difference *HERE = ses(j, &a, &b, true);
assert (HERE != NULL);
//std::cout << "EXTRA " << HERE->char_added << " " << HERE->char_deleted << std::endl;
tmp_char_added += HERE->char_added;
tmp_char_deleted += HERE->char_deleted;
assert (HERE->changes.size() == 1);
Change &change = HERE->changes[0];
assert (change.a_start == 0);
assert (change.b_start == 0);
assert (change.a_changes.size() == 1);
assert (change.b_changes.size() == 1);
assert (change.a_changes[0] == 0);
assert (change.b_changes[0] == 0);
int num_a_rows = c.a_changes.size();
int num_b_rows = c.b_changes.size();
int a_start = c.a_changes[0];
int b_start = c.b_changes[0];
c.a_characters.resize(num_a_rows);
c.b_characters.resize(num_b_rows);
for (int i = 0; i < change.a_characters[0].size(); i++) {
int offset = change.a_characters[0][i];
int which_line;
int which_character;
find_spot(adata,num_a_rows,a_start,offset,which_line,which_character);
c.a_characters[which_line-a_start].push_back(which_character);
//std::cout << "a: " << offset << " " << which_line << " " << which_character << std::endl;
}
for (int i = 0; i < change.b_characters[0].size(); i++) {
int offset = change.b_characters[0][i];
int which_line;
int which_character;
find_spot(bdata,num_b_rows,b_start,offset,which_line,which_character);
c.b_characters[which_line-b_start].push_back(which_character);
//std::cout << "b: " << offset << " " << which_line << " " << which_character << std::endl;
}
//std::cout << "DONE SOMETHING BETTER NEEDED HERE" << std::endl;
}
void INSPECT_IMPROVE_CHANGES(std::ostream& ostr, Change &c,
const std::vector<std::string> &adata,
const std::vector<std::string> &bdata,
const nlohmann::json& j,
bool &only_whitespace,
bool extra_student_output_ok,
int &line_added,
int &line_deleted,
int &char_added,
int &char_deleted) {
// std::cout << "IN INSPECT IMPROVE CHANGES" << std::endl;
std::string added;
std::string deleted;
int tmp_line_added = 0;
int tmp_line_deleted = 0;
int tmp_char_added = 0;
int tmp_char_deleted = 0;
//std::cout << "before" << std::endl;
bool ignore_line_endings = false;
if (j != nlohmann::json()) {
j.value("ignore_line_endings",false);
}
//std::cout << "after" << std::endl;
bool further_check = false;
if (c.a_changes.size() != 0 && c.b_changes.size() != 0 &&
c.a_changes.size() != c.b_changes.size()) {
further_check = true;
}
for (int i = 0; i < c.a_changes.size(); i++) {
int line = c.a_changes[i];
tmp_line_added++;
assert (line >= 0 && line < adata.size());
added+=adata[line] + '\n';
}
if (!further_check && c.a_characters.size()==0) {
c.a_characters.resize(c.a_changes.size());
for (int i = 0; i < c.a_changes.size(); i++) {
int line = c.a_changes[i];
// highlight rows!
for (int ch = 0; ch < adata[line].size(); ch++) {
c.a_characters[i].push_back(ch);
}
}
}
for (int i = 0; i < c.b_changes.size(); i++) {
int line = c.b_changes[i];
tmp_line_deleted++;
assert (line >= 0 && line < bdata.size());
deleted+=bdata[line] + '\n';
}
if (!further_check && c.b_characters.size()==0) {
c.b_characters.resize(c.b_changes.size());
for (int i = 0; i < c.b_changes.size(); i++) {
int line = c.b_changes[i];
// highlight rows!
for (int ch = 0; ch < bdata[line].size(); ch++) {
c.b_characters[i].push_back(ch);
}
}
}
// if there are more lines in b (expected)
if (c.a_changes.size() < c.b_changes.size()) only_whitespace = false;
// if there are more lines in a (student), that might be ok...
if (c.a_changes.size() != c.b_changes.size()) {
// but if extra student output is not ok
if (!extra_student_output_ok || c.b_changes.size() != 0)
only_whitespace = false;
}
if (!further_check) {
for (int i = 0; i < c.a_characters.size(); i++) {
for (int j = 0; j < c.a_characters[i].size(); j++) {
int row = c.a_changes[i];
int col = c.a_characters[i][j];
if (adata[row][col] != ' ') only_whitespace = false;
tmp_char_added++;
added.push_back(adata[row][col]);
}
}
for (int i = 0; i < c.b_characters.size(); i++) {
for (int j = 0; j < c.b_characters[i].size(); j++) {
int row = c.b_changes[i];
int col = c.b_characters[i][j];
if (bdata[row][col] != ' ') only_whitespace = false;
tmp_char_deleted++;
deleted.push_back(bdata[row][col]);
}
}
}
#if 0
std::cout << "-----------" << std::endl;
std::cout << "added '" << added << "'" << std::endl;
std::cout << "deleted '" << deleted << "'" << std::endl;
#endif
if (further_check) {
IMPROVE(c,adata,bdata,added,deleted,
tmp_line_added,tmp_line_deleted,tmp_char_added,tmp_char_deleted);
}
line_added += tmp_line_added;
line_deleted += tmp_line_deleted;
char_added += tmp_char_added;
char_deleted += tmp_char_deleted;
#if 0
if (j != nlohmann::json()) {
std::cout << "line_added=" << std::setw(6) << tmp_line_added << " " << " line_deleted=" << std::setw(6) << tmp_line_deleted
<< " char_added=" << std::setw(6) << tmp_char_added << " " << " char_deleted=" << std::setw(6) << tmp_char_deleted << " | cumm: ";
std::cout << "line_added=" << std::setw(6) << line_added << " " << " line_deleted=" << std::setw(6) << line_deleted
<< " char_added=" << std::setw(6) << char_added << " " << " char_deleted=" << std::setw(6) << char_deleted << std::endl;
}
#endif
// std::cout << "LEAVING INSPECT IMPROVE CHANGES" << std::endl;
}
| 9,494 | 3,494 |
/**
* @file TeamCommReceiveEmulator.cpp
*/
#include "TeamCommReceiveEmulator.h"
unsigned int robotNumber = 999; //An arbitrary robot number that does not stand in conflict with real robots' messages
TeamCommReceiveEmulator::TeamCommReceiveEmulator():
nextMessageTime(getFrameInfo().getTime())
{}
TeamCommReceiveEmulator::~TeamCommReceiveEmulator()
{}
void TeamCommReceiveEmulator::execute() {
//If enough time has passed, place another message in the inbox
if (nextMessageTime <= getFrameInfo().getTime()) {
TeamMessageData messageData;
messageData.playerNumber = robotNumber;
messageData.frameInfo = getFrameInfo();
getTeamMessage().data[messageData.playerNumber] = messageData;
//Generate the frame number, at which we are going to receive the next message
if (parameters.normalDistribution) {
getFrameInfo().getFrameNumber();
nextMessageTime = getFrameInfo().getTime() + ((unsigned int) fabs(floor(
Math::sampleNormalDistribution(parameters.standardDeviation) + parameters.mean + 0.5)));
}
if (parameters.uniformDistribution) {
nextMessageTime = getFrameInfo().getTime() + ((unsigned int) fabs(floor(
Math::random(parameters.uniformMin, parameters.uniformMax) + 0.5)));
}
if (parameters.randomPerturbations) {
//TODO: Implement other perturbations in the message intervals
}
}//endIf
}//endExecute
void TeamCommReceiveEmulator::reset() {
}
| 1,457 | 412 |
#pragma once
#include <UniqueID.hpp>
#include <Collections/Dynarray.hpp>
#include <ECS/ComponentBase.hpp>
#include <Rendering/MeshRenderingComponent.hpp>
#include <Rendering/PostprocessSettingsComponent.hpp>
#include <Rendering/Lighting/LightSourceComponent.hpp>
using namespace Poly;
class GameManagerWorldComponent : public ComponentBase
{
public:
SafePtr<Entity> Camera;
PostprocessSettingsComponent* PostCmp;
SafePtr<Entity> Model;
bool IsDrawingDebugMeshes = true;
Dynarray<SafePtr<Entity>> GameEntities;
ParticleComponent* particleDefault;
ParticleComponent* particleAmbient;
ParticleComponent* particleAmbientWind;
ParticleComponent* particleLocalSpace;
ParticleComponent* particleWorldSpace;
ParticleComponent* particleHeart;
ParticleComponent* particleHeartImpact0;
ParticleComponent* particleHeartImpact1;
ParticleComponent* particleHeartImpact2;
Dynarray<Vector> LightsStartPositions;
Dynarray<Entity*> PointLightEntities;
}; | 958 | 300 |
// This file was generated based on '(multiple files)'.
// WARNING: Changes might be lost if you edit this file directly.
#include <Android.Base.AndroidB-e9b6d531.h>
#include <Android.Base.JNI.h>
#include <Android.Base.Primitiv-2b9696be.h>
#include <Android.Base.Primitiv-45253430.h>
#include <Android.Base.Primitiv-e437692f.h>
#include <Android.Base.Wrappers.JWrapper.h>
#include <Android.com.fuse.Expe-9d584358.h>
#include <Uno.Bool.h>
#include <Uno.Exception.h>
#include <Uno.Int.h>
#include <Uno.Long.h>
#include <Uno.Type.h>
//~Callbacks forHttpRequest
//#if !#{Android.com.fuse.ExperimentalHttp.HttpRequest.OnDataReceived(Android.Base.Wrappers.IJWrapper,int):IsStripped}
JNFUN(void,Android_com_fuse_ExperimentalHttp_HttpRequest__OnDataReceived44285,jlong ujPtr, jobject arg0, jint arg1, jlong arg2, jlong arg3) {
INITCALLBACK(uPtr,::g::Android::com::fuse::ExperimentalHttp::HttpRequest*);
JARG_TO_UNO(arg2,uObject*,((::g::Android::Base::Wrappers::JWrapper*)::g::Android::Base::Wrappers::JWrapper::New2(arg0, (uType*)::g::Android::Base::Wrappers::JWrapper_typeof(), false, false, true)));
JTRY
uPtr->OnDataReceived(tmparg2, ((int32_t)arg1));
JCATCH
}
//#endif
//#if !#{Android.com.fuse.ExperimentalHttp.HttpRequest.OnAborted():IsStripped}
JNFUN(void,Android_com_fuse_ExperimentalHttp_HttpRequest__OnAborted44286,jlong ujPtr) {
INITCALLBACK(uPtr,::g::Android::com::fuse::ExperimentalHttp::HttpRequest*);
JTRY
uPtr->OnAborted();
JCATCH
}
//#endif
//#if !#{Android.com.fuse.ExperimentalHttp.HttpRequest.OnError(Android.Base.Wrappers.IJWrapper):IsStripped}
JNFUN(void,Android_com_fuse_ExperimentalHttp_HttpRequest__OnError44287,jlong ujPtr, jobject arg0, jlong arg1) {
INITCALLBACK(uPtr,::g::Android::com::fuse::ExperimentalHttp::HttpRequest*);
JARG_TO_UNO(arg1,uObject*,((::g::Android::Base::Wrappers::JWrapper*)::g::Android::Base::Wrappers::JWrapper::New2(arg0, (uType*)::g::Android::Base::Wrappers::JWrapper_typeof(), false, false, true)));
JTRY
uPtr->OnError(tmparg1);
JCATCH
}
//#endif
//#if !#{Android.com.fuse.ExperimentalHttp.HttpRequest.OnTimeout():IsStripped}
JNFUN(void,Android_com_fuse_ExperimentalHttp_HttpRequest__OnTimeout44288,jlong ujPtr) {
INITCALLBACK(uPtr,::g::Android::com::fuse::ExperimentalHttp::HttpRequest*);
JTRY
uPtr->OnTimeout();
JCATCH
}
//#endif
//#if !#{Android.com.fuse.ExperimentalHttp.HttpRequest.OnDone():IsStripped}
JNFUN(void,Android_com_fuse_ExperimentalHttp_HttpRequest__OnDone44289,jlong ujPtr) {
INITCALLBACK(uPtr,::g::Android::com::fuse::ExperimentalHttp::HttpRequest*);
JTRY
uPtr->OnDone();
JCATCH
}
//#endif
//#if !#{Android.com.fuse.ExperimentalHttp.HttpRequest.OnHeadersReceived():IsStripped}
JNFUN(void,Android_com_fuse_ExperimentalHttp_HttpRequest__OnHeadersReceived44290,jlong ujPtr) {
INITCALLBACK(uPtr,::g::Android::com::fuse::ExperimentalHttp::HttpRequest*);
JTRY
uPtr->OnHeadersReceived();
JCATCH
}
//#endif
//#if !#{Android.com.fuse.ExperimentalHttp.HttpRequest.OnProgress(int,int,bool):IsStripped}
JNFUN(void,Android_com_fuse_ExperimentalHttp_HttpRequest__OnProgress44291,jlong ujPtr, jint arg0, jint arg1, jboolean arg2, jlong arg3, jlong arg4, jlong arg5) {
INITCALLBACK(uPtr,::g::Android::com::fuse::ExperimentalHttp::HttpRequest*);
JTRY
uPtr->OnProgress(((int32_t)arg0), ((int32_t)arg1), ((bool)arg2));
JCATCH
}
//#endi
namespace g{
namespace Android{
namespace com{
namespace fuse{
namespace ExperimentalHttp{
// C:\Users\JuanJose\AppData\Local\Fusetools\Packages\Uno.Net.Http\1.9.0\Implementation\Android\ExperimentalHttp\HttpRequest.uno
// -----------------------------------------------------------------------------------------------------------------------------
// public abstract extern class HttpRequest :7
// {
static void HttpRequest_build(uType* type)
{
type->SetInterfaces(
::g::Android::Base::Wrappers::IJWrapper_typeof(), offsetof(HttpRequest_type, interface0),
::g::Uno::IDisposable_typeof(), offsetof(HttpRequest_type, interface1));
type->SetFields(4,
::g::Android::Base::Primitives::ujclass_typeof(), (uintptr_t)&HttpRequest::_javaClass1_, uFieldFlagsStatic,
::g::Android::Base::Primitives::ujclass_typeof(), (uintptr_t)&HttpRequest::_javaProxyClass1_, uFieldFlagsStatic,
::g::Android::Base::Primitives::jmethodID_typeof(), (uintptr_t)&HttpRequest::InstallCache_44279_ID_, uFieldFlagsStatic,
::g::Android::Base::Primitives::jmethodID_typeof(), (uintptr_t)&HttpRequest::HttpRequest_44284_ID_c_, uFieldFlagsStatic,
::g::Android::Base::Primitives::jmethodID_typeof(), (uintptr_t)&HttpRequest::HttpRequest_44284_ID_c_prox_, uFieldFlagsStatic,
::g::Android::Base::Primitives::jmethodID_typeof(), (uintptr_t)&HttpRequest::SetResponseType_44292_ID_, uFieldFlagsStatic,
::g::Android::Base::Primitives::jmethodID_typeof(), (uintptr_t)&HttpRequest::SetHeader_44293_ID_, uFieldFlagsStatic,
::g::Android::Base::Primitives::jmethodID_typeof(), (uintptr_t)&HttpRequest::SetTimeout_44294_ID_, uFieldFlagsStatic,
::g::Android::Base::Primitives::jmethodID_typeof(), (uintptr_t)&HttpRequest::SetCaching_44295_ID_, uFieldFlagsStatic,
::g::Android::Base::Primitives::jmethodID_typeof(), (uintptr_t)&HttpRequest::GetResponseString_44297_ID_, uFieldFlagsStatic,
::g::Android::Base::Primitives::jmethodID_typeof(), (uintptr_t)&HttpRequest::SendAsync_44299_ID_, uFieldFlagsStatic,
::g::Android::Base::Primitives::jmethodID_typeof(), (uintptr_t)&HttpRequest::SendAsyncBuf_44300_ID_, uFieldFlagsStatic,
::g::Android::Base::Primitives::jmethodID_typeof(), (uintptr_t)&HttpRequest::SendAsyncStr_44301_ID_, uFieldFlagsStatic,
::g::Android::Base::Primitives::jmethodID_typeof(), (uintptr_t)&HttpRequest::Abort_44305_ID_, uFieldFlagsStatic,
::g::Android::Base::Primitives::jmethodID_typeof(), (uintptr_t)&HttpRequest::GetResponseStatus_44306_ID_, uFieldFlagsStatic,
::g::Android::Base::Primitives::jmethodID_typeof(), (uintptr_t)&HttpRequest::GetResponseHeader_44307_ID_, uFieldFlagsStatic,
::g::Android::Base::Primitives::jmethodID_typeof(), (uintptr_t)&HttpRequest::GetResponseHeaders_44308_ID_, uFieldFlagsStatic);
type->Reflection.SetFunctions(37,
new uFunction("_Init", NULL, (void*)HttpRequest___Init1_fn, 0, true, uVoid_typeof(), 0),
new uFunction("_InitProxy", NULL, (void*)HttpRequest___InitProxy1_fn, 0, true, uVoid_typeof(), 0),
new uFunction("_IsThisType", NULL, (void*)HttpRequest___IsThisType1_fn, 0, true, ::g::Uno::Bool_typeof(), 1, ::g::Android::Base::Wrappers::IJWrapper_typeof()),
new uFunction("Abort", NULL, (void*)HttpRequest__Abort_fn, 0, false, uVoid_typeof(), 0),
new uFunction("Abort_IMPL_44305", NULL, (void*)HttpRequest__Abort_IMPL_44305_fn, 0, true, uVoid_typeof(), 2, ::g::Uno::Bool_typeof(), ::g::Android::Base::Primitives::ujobject_typeof()),
new uFunction("GetResponseHeader", NULL, (void*)HttpRequest__GetResponseHeader_fn, 0, false, ::g::Android::Base::Wrappers::IJWrapper_typeof(), 1, ::g::Android::Base::Wrappers::IJWrapper_typeof()),
new uFunction("GetResponseHeader_IMPL_44307", NULL, (void*)HttpRequest__GetResponseHeader_IMPL_44307_fn, 0, true, ::g::Android::Base::Wrappers::IJWrapper_typeof(), 3, ::g::Uno::Bool_typeof(), ::g::Android::Base::Primitives::ujobject_typeof(), ::g::Android::Base::Wrappers::IJWrapper_typeof()),
new uFunction("GetResponseHeaders", NULL, (void*)HttpRequest__GetResponseHeaders_fn, 0, false, ::g::Android::Base::Wrappers::IJWrapper_typeof(), 0),
new uFunction("GetResponseHeaders_IMPL_44308", NULL, (void*)HttpRequest__GetResponseHeaders_IMPL_44308_fn, 0, true, ::g::Android::Base::Wrappers::IJWrapper_typeof(), 2, ::g::Uno::Bool_typeof(), ::g::Android::Base::Primitives::ujobject_typeof()),
new uFunction("GetResponseStatus", NULL, (void*)HttpRequest__GetResponseStatus_fn, 0, false, ::g::Uno::Int_typeof(), 0),
new uFunction("GetResponseStatus_IMPL_44306", NULL, (void*)HttpRequest__GetResponseStatus_IMPL_44306_fn, 0, true, ::g::Uno::Int_typeof(), 2, ::g::Uno::Bool_typeof(), ::g::Android::Base::Primitives::ujobject_typeof()),
new uFunction("GetResponseString", NULL, (void*)HttpRequest__GetResponseString_fn, 0, false, ::g::Android::Base::Wrappers::IJWrapper_typeof(), 0),
new uFunction("GetResponseString_IMPL_44297", NULL, (void*)HttpRequest__GetResponseString_IMPL_44297_fn, 0, true, ::g::Android::Base::Wrappers::IJWrapper_typeof(), 2, ::g::Uno::Bool_typeof(), ::g::Android::Base::Primitives::ujobject_typeof()),
new uFunction("HttpRequest_IMPL_44284", NULL, (void*)HttpRequest__HttpRequest_IMPL_44284_fn, 0, true, ::g::Android::Base::Primitives::ujobject_typeof(), 4, ::g::Android::Base::Wrappers::IJWrapper_typeof(), ::g::Android::Base::Wrappers::IJWrapper_typeof(), ::g::Android::Base::Wrappers::IJWrapper_typeof(), ::g::Android::Base::Wrappers::IJWrapper_typeof()),
new uFunction("InstallCache", NULL, (void*)HttpRequest__InstallCache_fn, 0, true, ::g::Uno::Bool_typeof(), 2, ::g::Android::Base::Wrappers::IJWrapper_typeof(), ::g::Uno::Long_typeof()),
new uFunction("InstallCache_IMPL_44279", NULL, (void*)HttpRequest__InstallCache_IMPL_44279_fn, 0, true, ::g::Uno::Bool_typeof(), 2, ::g::Android::Base::Wrappers::IJWrapper_typeof(), ::g::Uno::Long_typeof()),
new uFunction("OnAborted", NULL, NULL, offsetof(HttpRequest_type, fp_OnAborted), false, uVoid_typeof(), 0),
new uFunction("OnDataReceived", NULL, NULL, offsetof(HttpRequest_type, fp_OnDataReceived), false, uVoid_typeof(), 2, ::g::Android::Base::Wrappers::IJWrapper_typeof(), ::g::Uno::Int_typeof()),
new uFunction("OnDone", NULL, NULL, offsetof(HttpRequest_type, fp_OnDone), false, uVoid_typeof(), 0),
new uFunction("OnError", NULL, NULL, offsetof(HttpRequest_type, fp_OnError), false, uVoid_typeof(), 1, ::g::Android::Base::Wrappers::IJWrapper_typeof()),
new uFunction("OnHeadersReceived", NULL, NULL, offsetof(HttpRequest_type, fp_OnHeadersReceived), false, uVoid_typeof(), 0),
new uFunction("OnProgress", NULL, NULL, offsetof(HttpRequest_type, fp_OnProgress), false, uVoid_typeof(), 3, ::g::Uno::Int_typeof(), ::g::Uno::Int_typeof(), ::g::Uno::Bool_typeof()),
new uFunction("OnTimeout", NULL, NULL, offsetof(HttpRequest_type, fp_OnTimeout), false, uVoid_typeof(), 0),
new uFunction("SendAsync", NULL, (void*)HttpRequest__SendAsync_fn, 0, false, uVoid_typeof(), 0),
new uFunction("SendAsync_IMPL_44299", NULL, (void*)HttpRequest__SendAsync_IMPL_44299_fn, 0, true, uVoid_typeof(), 2, ::g::Uno::Bool_typeof(), ::g::Android::Base::Primitives::ujobject_typeof()),
new uFunction("SendAsyncBuf", NULL, (void*)HttpRequest__SendAsyncBuf_fn, 0, false, uVoid_typeof(), 1, ::g::Android::Base::Wrappers::IJWrapper_typeof()),
new uFunction("SendAsyncBuf_IMPL_44300", NULL, (void*)HttpRequest__SendAsyncBuf_IMPL_44300_fn, 0, true, uVoid_typeof(), 3, ::g::Uno::Bool_typeof(), ::g::Android::Base::Primitives::ujobject_typeof(), ::g::Android::Base::Wrappers::IJWrapper_typeof()),
new uFunction("SendAsyncStr", NULL, (void*)HttpRequest__SendAsyncStr_fn, 0, false, uVoid_typeof(), 1, ::g::Android::Base::Wrappers::IJWrapper_typeof()),
new uFunction("SendAsyncStr_IMPL_44301", NULL, (void*)HttpRequest__SendAsyncStr_IMPL_44301_fn, 0, true, uVoid_typeof(), 3, ::g::Uno::Bool_typeof(), ::g::Android::Base::Primitives::ujobject_typeof(), ::g::Android::Base::Wrappers::IJWrapper_typeof()),
new uFunction("SetCaching", NULL, (void*)HttpRequest__SetCaching_fn, 0, false, uVoid_typeof(), 1, ::g::Uno::Bool_typeof()),
new uFunction("SetCaching_IMPL_44295", NULL, (void*)HttpRequest__SetCaching_IMPL_44295_fn, 0, true, uVoid_typeof(), 3, ::g::Uno::Bool_typeof(), ::g::Android::Base::Primitives::ujobject_typeof(), ::g::Uno::Bool_typeof()),
new uFunction("SetHeader", NULL, (void*)HttpRequest__SetHeader_fn, 0, false, uVoid_typeof(), 2, ::g::Android::Base::Wrappers::IJWrapper_typeof(), ::g::Android::Base::Wrappers::IJWrapper_typeof()),
new uFunction("SetHeader_IMPL_44293", NULL, (void*)HttpRequest__SetHeader_IMPL_44293_fn, 0, true, uVoid_typeof(), 4, ::g::Uno::Bool_typeof(), ::g::Android::Base::Primitives::ujobject_typeof(), ::g::Android::Base::Wrappers::IJWrapper_typeof(), ::g::Android::Base::Wrappers::IJWrapper_typeof()),
new uFunction("SetResponseType", NULL, (void*)HttpRequest__SetResponseType_fn, 0, false, uVoid_typeof(), 1, ::g::Uno::Int_typeof()),
new uFunction("SetResponseType_IMPL_44292", NULL, (void*)HttpRequest__SetResponseType_IMPL_44292_fn, 0, true, uVoid_typeof(), 3, ::g::Uno::Bool_typeof(), ::g::Android::Base::Primitives::ujobject_typeof(), ::g::Uno::Int_typeof()),
new uFunction("SetTimeout", NULL, (void*)HttpRequest__SetTimeout_fn, 0, false, uVoid_typeof(), 1, ::g::Uno::Int_typeof()),
new uFunction("SetTimeout_IMPL_44294", NULL, (void*)HttpRequest__SetTimeout_IMPL_44294_fn, 0, true, uVoid_typeof(), 3, ::g::Uno::Bool_typeof(), ::g::Android::Base::Primitives::ujobject_typeof(), ::g::Uno::Int_typeof()));
}
HttpRequest_type* HttpRequest_typeof()
{
static uSStrong<HttpRequest_type*> type;
if (type != NULL) return type;
uTypeOptions options;
options.BaseDefinition = ::g::Android::Base::Wrappers::JWrapper_typeof();
options.FieldCount = 21;
options.InterfaceCount = 2;
options.ObjectSize = sizeof(HttpRequest);
options.TypeSize = sizeof(HttpRequest_type);
type = (HttpRequest_type*)uClassType::New("Android.com.fuse.ExperimentalHttp.HttpRequest", options);
type->fp_build_ = HttpRequest_build;
type->interface1.fp_Dispose = (void(*)(uObject*))::g::Android::Base::Wrappers::JWrapper__UnoIDisposableDispose_fn;
type->interface0.fp__GetJavaObject = (void(*)(uObject*, jobject*))::g::Android::Base::Wrappers::JWrapper___GetJavaObject_fn;
type->interface0.fp__IsSubclassed = (void(*)(uObject*, bool*))::g::Android::Base::Wrappers::JWrapper___IsSubclassed_fn;
return type;
}
// protected HttpRequest(Android.Base.Wrappers.IJWrapper arg0, Android.Base.Wrappers.IJWrapper arg1, Android.Base.Wrappers.IJWrapper arg2) :59
void HttpRequest__ctor_4_fn(HttpRequest* __this, uObject* arg0, uObject* arg1, uObject* arg2)
{
__this->ctor_4(arg0, arg1, arg2);
}
// public static extern new void _Init() :17
void HttpRequest___Init1_fn()
{
HttpRequest::_Init1();
}
// public static extern new void _InitProxy() :13
void HttpRequest___InitProxy1_fn()
{
HttpRequest::_InitProxy1();
}
// public static extern new bool _IsThisType(Android.Base.Wrappers.IJWrapper obj) :15
void HttpRequest___IsThisType1_fn(uObject* obj_, bool* __retval)
{
*__retval = HttpRequest::_IsThisType1(obj_);
}
// public void Abort() :141
void HttpRequest__Abort_fn(HttpRequest* __this)
{
__this->Abort();
}
// public static extern void Abort_IMPL_44305(bool arg0, Android.Base.Primitives.ujobject arg1) :230
void HttpRequest__Abort_IMPL_44305_fn(bool* arg0_, jobject* arg1_)
{
HttpRequest::Abort_IMPL_44305(*arg0_, *arg1_);
}
// public Android.Base.Wrappers.IJWrapper GetResponseHeader(Android.Base.Wrappers.IJWrapper arg0) :151
void HttpRequest__GetResponseHeader_fn(HttpRequest* __this, uObject* arg0, uObject** __retval)
{
*__retval = __this->GetResponseHeader(arg0);
}
// public static extern Android.Base.Wrappers.IJWrapper GetResponseHeader_IMPL_44307(bool arg0, Android.Base.Primitives.ujobject arg1, Android.Base.Wrappers.IJWrapper arg2) :236
void HttpRequest__GetResponseHeader_IMPL_44307_fn(bool* arg0_, jobject* arg1_, uObject* arg2_, uObject** __retval)
{
*__retval = HttpRequest::GetResponseHeader_IMPL_44307(*arg0_, *arg1_, arg2_);
}
// public Android.Base.Wrappers.IJWrapper GetResponseHeaders() :156
void HttpRequest__GetResponseHeaders_fn(HttpRequest* __this, uObject** __retval)
{
*__retval = __this->GetResponseHeaders();
}
// public static extern Android.Base.Wrappers.IJWrapper GetResponseHeaders_IMPL_44308(bool arg0, Android.Base.Primitives.ujobject arg1) :239
void HttpRequest__GetResponseHeaders_IMPL_44308_fn(bool* arg0_, jobject* arg1_, uObject** __retval)
{
*__retval = HttpRequest::GetResponseHeaders_IMPL_44308(*arg0_, *arg1_);
}
// public int GetResponseStatus() :146
void HttpRequest__GetResponseStatus_fn(HttpRequest* __this, int32_t* __retval)
{
*__retval = __this->GetResponseStatus();
}
// public static extern int GetResponseStatus_IMPL_44306(bool arg0, Android.Base.Primitives.ujobject arg1) :233
void HttpRequest__GetResponseStatus_IMPL_44306_fn(bool* arg0_, jobject* arg1_, int32_t* __retval)
{
*__retval = HttpRequest::GetResponseStatus_IMPL_44306(*arg0_, *arg1_);
}
// public Android.Base.Wrappers.IJWrapper GetResponseString() :106
void HttpRequest__GetResponseString_fn(HttpRequest* __this, uObject** __retval)
{
*__retval = __this->GetResponseString();
}
// public static extern Android.Base.Wrappers.IJWrapper GetResponseString_IMPL_44297(bool arg0, Android.Base.Primitives.ujobject arg1) :209
void HttpRequest__GetResponseString_IMPL_44297_fn(bool* arg0_, jobject* arg1_, uObject** __retval)
{
*__retval = HttpRequest::GetResponseString_IMPL_44297(*arg0_, *arg1_);
}
// public static extern Android.Base.Primitives.ujobject HttpRequest_IMPL_44284(Android.Base.Wrappers.IJWrapper arg0, Android.Base.Wrappers.IJWrapper arg1, Android.Base.Wrappers.IJWrapper arg2, Android.Base.Wrappers.IJWrapper arg3) :191
void HttpRequest__HttpRequest_IMPL_44284_fn(uObject* arg0_, uObject* arg1_, uObject* arg2_, uObject* arg3_, jobject* __retval)
{
*__retval = HttpRequest::HttpRequest_IMPL_44284(arg0_, arg1_, arg2_, arg3_);
}
// public static bool InstallCache(Android.Base.Wrappers.IJWrapper arg0, long arg1) :34
void HttpRequest__InstallCache_fn(uObject* arg0, int64_t* arg1, bool* __retval)
{
*__retval = HttpRequest::InstallCache(arg0, *arg1);
}
// public static extern bool InstallCache_IMPL_44279(Android.Base.Wrappers.IJWrapper arg0, long arg1) :175
void HttpRequest__InstallCache_IMPL_44279_fn(uObject* arg0_, int64_t* arg1_, bool* __retval)
{
*__retval = HttpRequest::InstallCache_IMPL_44279(arg0_, *arg1_);
}
// public void SendAsync() :111
void HttpRequest__SendAsync_fn(HttpRequest* __this)
{
__this->SendAsync();
}
// public static extern void SendAsync_IMPL_44299(bool arg0, Android.Base.Primitives.ujobject arg1) :212
void HttpRequest__SendAsync_IMPL_44299_fn(bool* arg0_, jobject* arg1_)
{
HttpRequest::SendAsync_IMPL_44299(*arg0_, *arg1_);
}
// public void SendAsyncBuf(Android.Base.Wrappers.IJWrapper arg0) :116
void HttpRequest__SendAsyncBuf_fn(HttpRequest* __this, uObject* arg0)
{
__this->SendAsyncBuf(arg0);
}
// public static extern void SendAsyncBuf_IMPL_44300(bool arg0, Android.Base.Primitives.ujobject arg1, Android.Base.Wrappers.IJWrapper arg2) :215
void HttpRequest__SendAsyncBuf_IMPL_44300_fn(bool* arg0_, jobject* arg1_, uObject* arg2_)
{
HttpRequest::SendAsyncBuf_IMPL_44300(*arg0_, *arg1_, arg2_);
}
// public void SendAsyncStr(Android.Base.Wrappers.IJWrapper arg0) :121
void HttpRequest__SendAsyncStr_fn(HttpRequest* __this, uObject* arg0)
{
__this->SendAsyncStr(arg0);
}
// public static extern void SendAsyncStr_IMPL_44301(bool arg0, Android.Base.Primitives.ujobject arg1, Android.Base.Wrappers.IJWrapper arg2) :218
void HttpRequest__SendAsyncStr_IMPL_44301_fn(bool* arg0_, jobject* arg1_, uObject* arg2_)
{
HttpRequest::SendAsyncStr_IMPL_44301(*arg0_, *arg1_, arg2_);
}
// public void SetCaching(bool arg0) :96
void HttpRequest__SetCaching_fn(HttpRequest* __this, bool* arg0)
{
__this->SetCaching(*arg0);
}
// public static extern void SetCaching_IMPL_44295(bool arg0, Android.Base.Primitives.ujobject arg1, bool arg2) :203
void HttpRequest__SetCaching_IMPL_44295_fn(bool* arg0_, jobject* arg1_, bool* arg2_)
{
HttpRequest::SetCaching_IMPL_44295(*arg0_, *arg1_, *arg2_);
}
// public void SetHeader(Android.Base.Wrappers.IJWrapper arg0, Android.Base.Wrappers.IJWrapper arg1) :86
void HttpRequest__SetHeader_fn(HttpRequest* __this, uObject* arg0, uObject* arg1)
{
__this->SetHeader(arg0, arg1);
}
// public static extern void SetHeader_IMPL_44293(bool arg0, Android.Base.Primitives.ujobject arg1, Android.Base.Wrappers.IJWrapper arg2, Android.Base.Wrappers.IJWrapper arg3) :197
void HttpRequest__SetHeader_IMPL_44293_fn(bool* arg0_, jobject* arg1_, uObject* arg2_, uObject* arg3_)
{
HttpRequest::SetHeader_IMPL_44293(*arg0_, *arg1_, arg2_, arg3_);
}
// public void SetResponseType(int arg0) :81
void HttpRequest__SetResponseType_fn(HttpRequest* __this, int32_t* arg0)
{
__this->SetResponseType(*arg0);
}
// public static extern void SetResponseType_IMPL_44292(bool arg0, Android.Base.Primitives.ujobject arg1, int arg2) :194
void HttpRequest__SetResponseType_IMPL_44292_fn(bool* arg0_, jobject* arg1_, int32_t* arg2_)
{
HttpRequest::SetResponseType_IMPL_44292(*arg0_, *arg1_, *arg2_);
}
// public void SetTimeout(int arg0) :91
void HttpRequest__SetTimeout_fn(HttpRequest* __this, int32_t* arg0)
{
__this->SetTimeout(*arg0);
}
// public static extern void SetTimeout_IMPL_44294(bool arg0, Android.Base.Primitives.ujobject arg1, int arg2) :200
void HttpRequest__SetTimeout_IMPL_44294_fn(bool* arg0_, jobject* arg1_, int32_t* arg2_)
{
HttpRequest::SetTimeout_IMPL_44294(*arg0_, *arg1_, *arg2_);
}
jclass HttpRequest::_javaClass1_;
jclass HttpRequest::_javaProxyClass1_;
jmethodID HttpRequest::InstallCache_44279_ID_;
jmethodID HttpRequest::HttpRequest_44284_ID_c_;
jmethodID HttpRequest::HttpRequest_44284_ID_c_prox_;
jmethodID HttpRequest::SetResponseType_44292_ID_;
jmethodID HttpRequest::SetHeader_44293_ID_;
jmethodID HttpRequest::SetTimeout_44294_ID_;
jmethodID HttpRequest::SetCaching_44295_ID_;
jmethodID HttpRequest::GetResponseString_44297_ID_;
jmethodID HttpRequest::SendAsync_44299_ID_;
jmethodID HttpRequest::SendAsyncBuf_44300_ID_;
jmethodID HttpRequest::SendAsyncStr_44301_ID_;
jmethodID HttpRequest::Abort_44305_ID_;
jmethodID HttpRequest::GetResponseStatus_44306_ID_;
jmethodID HttpRequest::GetResponseHeader_44307_ID_;
jmethodID HttpRequest::GetResponseHeaders_44308_ID_;
// protected HttpRequest(Android.Base.Wrappers.IJWrapper arg0, Android.Base.Wrappers.IJWrapper arg1, Android.Base.Wrappers.IJWrapper arg2) [instance] :59
void HttpRequest::ctor_4(uObject* arg0, uObject* arg1, uObject* arg2)
{
uStackFrame __("Android.com.fuse.ExperimentalHttp.HttpRequest", ".ctor(Android.Base.Wrappers.IJWrapper,Android.Base.Wrappers.IJWrapper,Android.Base.Wrappers.IJWrapper)");
ctor_1(::g::Android::Base::JNI::GetDefaultObject(), ::g::Android::Base::JNI::GetDefaultType(), false, false);
_subclassed = HttpRequest::_IsThisType1((uObject*)this);
HttpRequest* wrapper = _subclassed ? this : NULL;
_javaObject = HttpRequest::HttpRequest_IMPL_44284((uObject*)wrapper, arg0, arg1, arg2);
}
// public void Abort() [instance] :141
void HttpRequest::Abort()
{
HttpRequest::Abort_IMPL_44305(_subclassed, _javaObject);
}
// public Android.Base.Wrappers.IJWrapper GetResponseHeader(Android.Base.Wrappers.IJWrapper arg0) [instance] :151
uObject* HttpRequest::GetResponseHeader(uObject* arg0)
{
return HttpRequest::GetResponseHeader_IMPL_44307(_subclassed, _javaObject, arg0);
}
// public Android.Base.Wrappers.IJWrapper GetResponseHeaders() [instance] :156
uObject* HttpRequest::GetResponseHeaders()
{
return HttpRequest::GetResponseHeaders_IMPL_44308(_subclassed, _javaObject);
}
// public int GetResponseStatus() [instance] :146
int32_t HttpRequest::GetResponseStatus()
{
return HttpRequest::GetResponseStatus_IMPL_44306(_subclassed, _javaObject);
}
// public Android.Base.Wrappers.IJWrapper GetResponseString() [instance] :106
uObject* HttpRequest::GetResponseString()
{
return HttpRequest::GetResponseString_IMPL_44297(_subclassed, _javaObject);
}
// public void SendAsync() [instance] :111
void HttpRequest::SendAsync()
{
HttpRequest::SendAsync_IMPL_44299(_subclassed, _javaObject);
}
// public void SendAsyncBuf(Android.Base.Wrappers.IJWrapper arg0) [instance] :116
void HttpRequest::SendAsyncBuf(uObject* arg0)
{
HttpRequest::SendAsyncBuf_IMPL_44300(_subclassed, _javaObject, arg0);
}
// public void SendAsyncStr(Android.Base.Wrappers.IJWrapper arg0) [instance] :121
void HttpRequest::SendAsyncStr(uObject* arg0)
{
HttpRequest::SendAsyncStr_IMPL_44301(_subclassed, _javaObject, arg0);
}
// public void SetCaching(bool arg0) [instance] :96
void HttpRequest::SetCaching(bool arg0)
{
bool arg0_ = arg0;
HttpRequest::SetCaching_IMPL_44295(_subclassed, _javaObject, arg0_);
}
// public void SetHeader(Android.Base.Wrappers.IJWrapper arg0, Android.Base.Wrappers.IJWrapper arg1) [instance] :86
void HttpRequest::SetHeader(uObject* arg0, uObject* arg1)
{
HttpRequest::SetHeader_IMPL_44293(_subclassed, _javaObject, arg0, arg1);
}
// public void SetResponseType(int arg0) [instance] :81
void HttpRequest::SetResponseType(int32_t arg0)
{
int32_t arg0_ = arg0;
HttpRequest::SetResponseType_IMPL_44292(_subclassed, _javaObject, arg0_);
}
// public void SetTimeout(int arg0) [instance] :91
void HttpRequest::SetTimeout(int32_t arg0)
{
int32_t arg0_ = arg0;
HttpRequest::SetTimeout_IMPL_44294(_subclassed, _javaObject, arg0_);
}
// public static extern new void _Init() [static] :17
void HttpRequest::_Init1()
{
if (HttpRequest::_javaClass1_) { return; }
INIT_JNI;
HttpRequest::_javaClass1_ = NEW_GLOBAL_REF(jclass,LOAD_SYS_CLASS("com/fuse/ExperimentalHttp/HttpRequest"));
::g::Android::Base::JNI::CheckException1(U_JNIVAR);
if (!HttpRequest::_javaClass1_) { THROW_UNO_EXCEPTION("Unable to cache class 'com.fuse.ExperimentalHttp.HttpRequest'", 61);; }
}
// public static extern new void _InitProxy() [static] :13
void HttpRequest::_InitProxy1()
{
if (HttpRequest::_javaProxyClass1_) { return; }
INIT_JNI;
HttpRequest::_javaProxyClass1_ = NEW_GLOBAL_REF(jclass,::g::Android::Base::JNI::LoadClass(jni, "com.Bindings.Android_com_fuse_ExperimentalHttp_HttpRequest"));
::g::Android::Base::JNI::CheckException1(U_JNIVAR);
if (!HttpRequest::_javaProxyClass1_) { THROW_UNO_EXCEPTION("Unable to cache class 'Android_com_fuse_ExperimentalHttp_HttpRequest'", 69);; }
BEGIN_REG_MTD(7);
//#if !#{Android.com.fuse.ExperimentalHttp.HttpRequest.OnDataReceived(Android.Base.Wrappers.IJWrapper,int):IsStripped}
REG_MTD(0,"__n_OnDataReceived","(J[BIJJ)V",::Android_com_fuse_ExperimentalHttp_HttpRequest__OnDataReceived44285);
//#endif
//#if !#{Android.com.fuse.ExperimentalHttp.HttpRequest.OnAborted():IsStripped}
REG_MTD(1,"__n_OnAborted","(J)V",::Android_com_fuse_ExperimentalHttp_HttpRequest__OnAborted44286);
//#endif
//#if !#{Android.com.fuse.ExperimentalHttp.HttpRequest.OnError(Android.Base.Wrappers.IJWrapper):IsStripped}
REG_MTD(2,"__n_OnError","(JLjava/lang/String;J)V",::Android_com_fuse_ExperimentalHttp_HttpRequest__OnError44287);
//#endif
//#if !#{Android.com.fuse.ExperimentalHttp.HttpRequest.OnTimeout():IsStripped}
REG_MTD(3,"__n_OnTimeout","(J)V",::Android_com_fuse_ExperimentalHttp_HttpRequest__OnTimeout44288);
//#endif
//#if !#{Android.com.fuse.ExperimentalHttp.HttpRequest.OnDone():IsStripped}
REG_MTD(4,"__n_OnDone","(J)V",::Android_com_fuse_ExperimentalHttp_HttpRequest__OnDone44289);
//#endif
//#if !#{Android.com.fuse.ExperimentalHttp.HttpRequest.OnHeadersReceived():IsStripped}
REG_MTD(5,"__n_OnHeadersReceived","(J)V",::Android_com_fuse_ExperimentalHttp_HttpRequest__OnHeadersReceived44290);
//#endif
//#if !#{Android.com.fuse.ExperimentalHttp.HttpRequest.OnProgress(int,int,bool):IsStripped}
REG_MTD(6,"__n_OnProgress","(JIIZJJJ)V",::Android_com_fuse_ExperimentalHttp_HttpRequest__OnProgress44291);
//#endif
COMMIT_REG_MTD(HttpRequest::_javaProxyClass1_);
}
// public static extern new bool _IsThisType(Android.Base.Wrappers.IJWrapper obj) [static] :15
bool HttpRequest::_IsThisType1(uObject* obj_)
{
int N = 44;
const char* typ = "Android.com.fuse.ExperimentalHttp.HttpRequest";
const char* potential = obj_->__type->FullName;
for (int i = 0; i < N; ++i)
{
if (potential[i]==0 || (potential[i] != typ[i])) {
return true;
}
}
return false;
}
// public static extern void Abort_IMPL_44305(bool arg0, Android.Base.Primitives.ujobject arg1) [static] :230
void HttpRequest::Abort_IMPL_44305(bool arg0_, jobject arg1_)
{
INIT_JNI;
CLASS_INIT(HttpRequest::_javaClass1_,HttpRequest::_Init1());
CACHE_METHOD(HttpRequest::Abort_44305_ID_,HttpRequest::_javaClass1_,"Abort","()V",GetMethodID,"Id for fallback method com.fuse.ExperimentalHttp.HttpRequest.Abort could not be cached",86);
if (arg0_) {
U_JNIVAR->CallNonvirtualVoidMethod(arg1_, HttpRequest::_javaClass1_, HttpRequest::Abort_44305_ID_);
}
else
{
U_JNIVAR->CallVoidMethod(arg1_, HttpRequest::Abort_44305_ID_);
}
::g::Android::Base::JNI::CheckException1(U_JNIVAR);
}
// public static extern Android.Base.Wrappers.IJWrapper GetResponseHeader_IMPL_44307(bool arg0, Android.Base.Primitives.ujobject arg1, Android.Base.Wrappers.IJWrapper arg2) [static] :236
uObject* HttpRequest::GetResponseHeader_IMPL_44307(bool arg0_, jobject arg1_, uObject* arg2_)
{
INIT_JNI;
jobject _obArg2 = ((!arg2_) ? NULL : ::g::Android::Base::Wrappers::IJWrapper::_GetJavaObject(uInterface(arg2_, ::g::Android::Base::Wrappers::IJWrapper_typeof())));
uObject* result;
CLASS_INIT(HttpRequest::_javaClass1_,HttpRequest::_Init1());
CACHE_METHOD(HttpRequest::GetResponseHeader_44307_ID_,HttpRequest::_javaClass1_,"GetResponseHeader","(Ljava/lang/String;)Ljava/lang/String;",GetMethodID,"Id for fallback method com.fuse.ExperimentalHttp.HttpRequest.GetResponseHeader could not be cached",98);
if (arg0_) {
NEW_UNO(U_JNIVAR->CallNonvirtualObjectMethod(arg1_, HttpRequest::_javaClass1_, HttpRequest::GetResponseHeader_44307_ID_, _obArg2),result,::g::Android::Base::Wrappers::JWrapper_typeof(),::g::Android::Base::Wrappers::JWrapper*,false,false);
}
else
{
NEW_UNO(U_JNIVAR->CallObjectMethod(arg1_, HttpRequest::GetResponseHeader_44307_ID_, _obArg2),result,::g::Android::Base::Wrappers::JWrapper_typeof(),::g::Android::Base::Wrappers::JWrapper*,false,false);
}
::g::Android::Base::JNI::CheckException1(U_JNIVAR);
return result;
}
// public static extern Android.Base.Wrappers.IJWrapper GetResponseHeaders_IMPL_44308(bool arg0, Android.Base.Primitives.ujobject arg1) [static] :239
uObject* HttpRequest::GetResponseHeaders_IMPL_44308(bool arg0_, jobject arg1_)
{
INIT_JNI;
uObject* result;
CLASS_INIT(HttpRequest::_javaClass1_,HttpRequest::_Init1());
CACHE_METHOD(HttpRequest::GetResponseHeaders_44308_ID_,HttpRequest::_javaClass1_,"GetResponseHeaders","()Ljava/lang/String;",GetMethodID,"Id for fallback method com.fuse.ExperimentalHttp.HttpRequest.GetResponseHeaders could not be cached",99);
if (arg0_) {
NEW_UNO(U_JNIVAR->CallNonvirtualObjectMethod(arg1_, HttpRequest::_javaClass1_, HttpRequest::GetResponseHeaders_44308_ID_),result,::g::Android::Base::Wrappers::JWrapper_typeof(),::g::Android::Base::Wrappers::JWrapper*,false,false);
}
else
{
NEW_UNO(U_JNIVAR->CallObjectMethod(arg1_, HttpRequest::GetResponseHeaders_44308_ID_),result,::g::Android::Base::Wrappers::JWrapper_typeof(),::g::Android::Base::Wrappers::JWrapper*,false,false);
}
::g::Android::Base::JNI::CheckException1(U_JNIVAR);
return result;
}
// public static extern int GetResponseStatus_IMPL_44306(bool arg0, Android.Base.Primitives.ujobject arg1) [static] :233
int32_t HttpRequest::GetResponseStatus_IMPL_44306(bool arg0_, jobject arg1_)
{
INIT_JNI;
int32_t result;
CLASS_INIT(HttpRequest::_javaClass1_,HttpRequest::_Init1());
CACHE_METHOD(HttpRequest::GetResponseStatus_44306_ID_,HttpRequest::_javaClass1_,"GetResponseStatus","()I",GetMethodID,"Id for fallback method com.fuse.ExperimentalHttp.HttpRequest.GetResponseStatus could not be cached",98);
if (arg0_) {
result = ((int32_t)U_JNIVAR->CallNonvirtualIntMethod(arg1_, HttpRequest::_javaClass1_, HttpRequest::GetResponseStatus_44306_ID_));
}
else
{
result = ((int32_t)U_JNIVAR->CallIntMethod(arg1_, HttpRequest::GetResponseStatus_44306_ID_));
}
::g::Android::Base::JNI::CheckException1(U_JNIVAR);
return result;
}
// public static extern Android.Base.Wrappers.IJWrapper GetResponseString_IMPL_44297(bool arg0, Android.Base.Primitives.ujobject arg1) [static] :209
uObject* HttpRequest::GetResponseString_IMPL_44297(bool arg0_, jobject arg1_)
{
INIT_JNI;
uObject* result;
CLASS_INIT(HttpRequest::_javaClass1_,HttpRequest::_Init1());
CACHE_METHOD(HttpRequest::GetResponseString_44297_ID_,HttpRequest::_javaClass1_,"GetResponseString","()Ljava/lang/String;",GetMethodID,"Id for fallback method com.fuse.ExperimentalHttp.HttpRequest.GetResponseString could not be cached",98);
if (arg0_) {
NEW_UNO(U_JNIVAR->CallNonvirtualObjectMethod(arg1_, HttpRequest::_javaClass1_, HttpRequest::GetResponseString_44297_ID_),result,::g::Android::Base::Wrappers::JWrapper_typeof(),::g::Android::Base::Wrappers::JWrapper*,false,false);
}
else
{
NEW_UNO(U_JNIVAR->CallObjectMethod(arg1_, HttpRequest::GetResponseString_44297_ID_),result,::g::Android::Base::Wrappers::JWrapper_typeof(),::g::Android::Base::Wrappers::JWrapper*,false,false);
}
::g::Android::Base::JNI::CheckException1(U_JNIVAR);
return result;
}
// public static extern Android.Base.Primitives.ujobject HttpRequest_IMPL_44284(Android.Base.Wrappers.IJWrapper arg0, Android.Base.Wrappers.IJWrapper arg1, Android.Base.Wrappers.IJWrapper arg2, Android.Base.Wrappers.IJWrapper arg3) [static] :191
jobject HttpRequest::HttpRequest_IMPL_44284(uObject* arg0_, uObject* arg1_, uObject* arg2_, uObject* arg3_)
{
INIT_JNI;
CLASS_INIT(HttpRequest::_javaClass1_,HttpRequest::_Init1());
CACHE_METHOD(HttpRequest::HttpRequest_44284_ID_c_,HttpRequest::_javaClass1_,"<init>","(Landroid/app/Activity;Ljava/lang/String;Ljava/lang/String;)V",GetMethodID,"Id for fallback method com.fuse.ExperimentalHttp.HttpRequest.<init> could not be cached",87);
if (arg0_) {
CLASS_INIT(HttpRequest::_javaProxyClass1_,HttpRequest::_InitProxy1());
CACHE_METHOD(HttpRequest::HttpRequest_44284_ID_c_prox_,HttpRequest::_javaProxyClass1_,"<init>","(JLandroid/app/Activity;Ljava/lang/String;Ljava/lang/String;)V",GetMethodID,"Proxy Id for method Android_com_fuse_ExperimentalHttp_HttpRequest.HttpRequest_44284_ID_c_prox could not be cached",113);
}
jobject _obArg1 = ((!arg1_) ? NULL : ::g::Android::Base::Wrappers::IJWrapper::_GetJavaObject(uInterface(arg1_, ::g::Android::Base::Wrappers::IJWrapper_typeof())));
jobject _obArg2 = ((!arg2_) ? NULL : ::g::Android::Base::Wrappers::IJWrapper::_GetJavaObject(uInterface(arg2_, ::g::Android::Base::Wrappers::IJWrapper_typeof())));
jobject _obArg3 = ((!arg3_) ? NULL : ::g::Android::Base::Wrappers::IJWrapper::_GetJavaObject(uInterface(arg3_, ::g::Android::Base::Wrappers::IJWrapper_typeof())));
jobject result;
jobject _tmp;
if (!arg0_) {
_tmp = U_JNIVAR->NewObject(HttpRequest::_javaClass1_, HttpRequest::HttpRequest_44284_ID_c_, _obArg1, _obArg2, _obArg3);
result = NEW_GLOBAL_REF(jobject,_tmp);
::g::Android::Base::JNI::CheckException1(U_JNIVAR);
} else {
_tmp = U_JNIVAR->NewObject(HttpRequest::_javaProxyClass1_, HttpRequest::HttpRequest_44284_ID_c_prox_, (jlong)arg0_->__weakptr, _obArg1, _obArg2, _obArg3);
result = NEW_GLOBAL_REF(jobject,_tmp);
::g::Android::Base::JNI::CheckException1(U_JNIVAR);
}
U_JNIVAR->DeleteLocalRef(_tmp);
return result;
}
// public static bool InstallCache(Android.Base.Wrappers.IJWrapper arg0, long arg1) [static] :34
bool HttpRequest::InstallCache(uObject* arg0, int64_t arg1)
{
return HttpRequest::InstallCache_IMPL_44279(arg0, arg1);
}
// public static extern bool InstallCache_IMPL_44279(Android.Base.Wrappers.IJWrapper arg0, long arg1) [static] :175
bool HttpRequest::InstallCache_IMPL_44279(uObject* arg0_, int64_t arg1_)
{
INIT_JNI;
jobject _obArg0 = ((!arg0_) ? NULL : ::g::Android::Base::Wrappers::IJWrapper::_GetJavaObject(uInterface(arg0_, ::g::Android::Base::Wrappers::IJWrapper_typeof())));
bool result;
CLASS_INIT(HttpRequest::_javaClass1_,HttpRequest::_Init1());
CACHE_METHOD(HttpRequest::InstallCache_44279_ID_,HttpRequest::_javaClass1_,"InstallCache","(Landroid/app/Activity;J)Z",GetStaticMethodID,"Id for fallback method com.fuse.ExperimentalHttp.HttpRequest.InstallCache could not be cached",93);
result = ((bool)U_JNIVAR->CallStaticBooleanMethod(HttpRequest::_javaClass1_, HttpRequest::InstallCache_44279_ID_, _obArg0, ((jlong)arg1_)));
::g::Android::Base::JNI::CheckException1(U_JNIVAR);
return result;
}
// public static extern void SendAsync_IMPL_44299(bool arg0, Android.Base.Primitives.ujobject arg1) [static] :212
void HttpRequest::SendAsync_IMPL_44299(bool arg0_, jobject arg1_)
{
INIT_JNI;
CLASS_INIT(HttpRequest::_javaClass1_,HttpRequest::_Init1());
CACHE_METHOD(HttpRequest::SendAsync_44299_ID_,HttpRequest::_javaClass1_,"SendAsync","()V",GetMethodID,"Id for fallback method com.fuse.ExperimentalHttp.HttpRequest.SendAsync could not be cached",90);
if (arg0_) {
U_JNIVAR->CallNonvirtualVoidMethod(arg1_, HttpRequest::_javaClass1_, HttpRequest::SendAsync_44299_ID_);
}
else
{
U_JNIVAR->CallVoidMethod(arg1_, HttpRequest::SendAsync_44299_ID_);
}
::g::Android::Base::JNI::CheckException1(U_JNIVAR);
}
// public static extern void SendAsyncBuf_IMPL_44300(bool arg0, Android.Base.Primitives.ujobject arg1, Android.Base.Wrappers.IJWrapper arg2) [static] :215
void HttpRequest::SendAsyncBuf_IMPL_44300(bool arg0_, jobject arg1_, uObject* arg2_)
{
INIT_JNI;
jobject _obArg2 = ((!arg2_) ? NULL : ::g::Android::Base::Wrappers::IJWrapper::_GetJavaObject(uInterface(arg2_, ::g::Android::Base::Wrappers::IJWrapper_typeof())));
CLASS_INIT(HttpRequest::_javaClass1_,HttpRequest::_Init1());
CACHE_METHOD(HttpRequest::SendAsyncBuf_44300_ID_,HttpRequest::_javaClass1_,"SendAsyncBuf","(Ljava/nio/ByteBuffer;)V",GetMethodID,"Id for fallback method com.fuse.ExperimentalHttp.HttpRequest.SendAsyncBuf could not be cached",93);
if (arg0_) {
U_JNIVAR->CallNonvirtualVoidMethod(arg1_, HttpRequest::_javaClass1_, HttpRequest::SendAsyncBuf_44300_ID_, _obArg2);
}
else
{
U_JNIVAR->CallVoidMethod(arg1_, HttpRequest::SendAsyncBuf_44300_ID_, _obArg2);
}
::g::Android::Base::JNI::CheckException1(U_JNIVAR);
}
// public static extern void SendAsyncStr_IMPL_44301(bool arg0, Android.Base.Primitives.ujobject arg1, Android.Base.Wrappers.IJWrapper arg2) [static] :218
void HttpRequest::SendAsyncStr_IMPL_44301(bool arg0_, jobject arg1_, uObject* arg2_)
{
INIT_JNI;
jobject _obArg2 = ((!arg2_) ? NULL : ::g::Android::Base::Wrappers::IJWrapper::_GetJavaObject(uInterface(arg2_, ::g::Android::Base::Wrappers::IJWrapper_typeof())));
CLASS_INIT(HttpRequest::_javaClass1_,HttpRequest::_Init1());
CACHE_METHOD(HttpRequest::SendAsyncStr_44301_ID_,HttpRequest::_javaClass1_,"SendAsyncStr","(Ljava/lang/String;)V",GetMethodID,"Id for fallback method com.fuse.ExperimentalHttp.HttpRequest.SendAsyncStr could not be cached",93);
if (arg0_) {
U_JNIVAR->CallNonvirtualVoidMethod(arg1_, HttpRequest::_javaClass1_, HttpRequest::SendAsyncStr_44301_ID_, _obArg2);
}
else
{
U_JNIVAR->CallVoidMethod(arg1_, HttpRequest::SendAsyncStr_44301_ID_, _obArg2);
}
::g::Android::Base::JNI::CheckException1(U_JNIVAR);
}
// public static extern void SetCaching_IMPL_44295(bool arg0, Android.Base.Primitives.ujobject arg1, bool arg2) [static] :203
void HttpRequest::SetCaching_IMPL_44295(bool arg0_, jobject arg1_, bool arg2_)
{
INIT_JNI;
CLASS_INIT(HttpRequest::_javaClass1_,HttpRequest::_Init1());
CACHE_METHOD(HttpRequest::SetCaching_44295_ID_,HttpRequest::_javaClass1_,"SetCaching","(Z)V",GetMethodID,"Id for fallback method com.fuse.ExperimentalHttp.HttpRequest.SetCaching could not be cached",91);
if (arg0_) {
U_JNIVAR->CallNonvirtualVoidMethod(arg1_, HttpRequest::_javaClass1_, HttpRequest::SetCaching_44295_ID_, ((jboolean)arg2_));
}
else
{
U_JNIVAR->CallVoidMethod(arg1_, HttpRequest::SetCaching_44295_ID_, ((jboolean)arg2_));
}
::g::Android::Base::JNI::CheckException1(U_JNIVAR);
}
// public static extern void SetHeader_IMPL_44293(bool arg0, Android.Base.Primitives.ujobject arg1, Android.Base.Wrappers.IJWrapper arg2, Android.Base.Wrappers.IJWrapper arg3) [static] :197
void HttpRequest::SetHeader_IMPL_44293(bool arg0_, jobject arg1_, uObject* arg2_, uObject* arg3_)
{
INIT_JNI;
jobject _obArg2 = ((!arg2_) ? NULL : ::g::Android::Base::Wrappers::IJWrapper::_GetJavaObject(uInterface(arg2_, ::g::Android::Base::Wrappers::IJWrapper_typeof())));
jobject _obArg3 = ((!arg3_) ? NULL : ::g::Android::Base::Wrappers::IJWrapper::_GetJavaObject(uInterface(arg3_, ::g::Android::Base::Wrappers::IJWrapper_typeof())));
CLASS_INIT(HttpRequest::_javaClass1_,HttpRequest::_Init1());
CACHE_METHOD(HttpRequest::SetHeader_44293_ID_,HttpRequest::_javaClass1_,"SetHeader","(Ljava/lang/String;Ljava/lang/String;)V",GetMethodID,"Id for fallback method com.fuse.ExperimentalHttp.HttpRequest.SetHeader could not be cached",90);
if (arg0_) {
U_JNIVAR->CallNonvirtualVoidMethod(arg1_, HttpRequest::_javaClass1_, HttpRequest::SetHeader_44293_ID_, _obArg2, _obArg3);
}
else
{
U_JNIVAR->CallVoidMethod(arg1_, HttpRequest::SetHeader_44293_ID_, _obArg2, _obArg3);
}
::g::Android::Base::JNI::CheckException1(U_JNIVAR);
}
// public static extern void SetResponseType_IMPL_44292(bool arg0, Android.Base.Primitives.ujobject arg1, int arg2) [static] :194
void HttpRequest::SetResponseType_IMPL_44292(bool arg0_, jobject arg1_, int32_t arg2_)
{
INIT_JNI;
CLASS_INIT(HttpRequest::_javaClass1_,HttpRequest::_Init1());
CACHE_METHOD(HttpRequest::SetResponseType_44292_ID_,HttpRequest::_javaClass1_,"SetResponseType","(I)V",GetMethodID,"Id for fallback method com.fuse.ExperimentalHttp.HttpRequest.SetResponseType could not be cached",96);
if (arg0_) {
U_JNIVAR->CallNonvirtualVoidMethod(arg1_, HttpRequest::_javaClass1_, HttpRequest::SetResponseType_44292_ID_, ((jint)arg2_));
}
else
{
U_JNIVAR->CallVoidMethod(arg1_, HttpRequest::SetResponseType_44292_ID_, ((jint)arg2_));
}
::g::Android::Base::JNI::CheckException1(U_JNIVAR);
}
// public static extern void SetTimeout_IMPL_44294(bool arg0, Android.Base.Primitives.ujobject arg1, int arg2) [static] :200
void HttpRequest::SetTimeout_IMPL_44294(bool arg0_, jobject arg1_, int32_t arg2_)
{
INIT_JNI;
CLASS_INIT(HttpRequest::_javaClass1_,HttpRequest::_Init1());
CACHE_METHOD(HttpRequest::SetTimeout_44294_ID_,HttpRequest::_javaClass1_,"SetTimeout","(I)V",GetMethodID,"Id for fallback method com.fuse.ExperimentalHttp.HttpRequest.SetTimeout could not be cached",91);
if (arg0_) {
U_JNIVAR->CallNonvirtualVoidMethod(arg1_, HttpRequest::_javaClass1_, HttpRequest::SetTimeout_44294_ID_, ((jint)arg2_));
}
else
{
U_JNIVAR->CallVoidMethod(arg1_, HttpRequest::SetTimeout_44294_ID_, ((jint)arg2_));
}
::g::Android::Base::JNI::CheckException1(U_JNIVAR);
}
// }
}}}}} // ::g::Android::com::fuse::ExperimentalHttp
| 43,741 | 16,290 |
#include <string>
#include <iostream>
#include <cstdio>
#include <cassert>
class Solution {
public:
std::string longestPalindrome(std::string s) {
int slen = s.length();
if (slen == 0)
return s;
// at least one.
int beginInd = 0, endInd = 0, maxLen = 1;
// try odds first.
for (int i = 0; i < slen; ++i) {
int j;
// try different lengths
for (j = 1; i-j >= 0 && i+j < slen; ++j) {
if (s[i-j] != s[i+j])
break;
}
// either j just outside of range or we have a mismatch
--j;
if (i-j >= 0 && i+j < slen && j*2+1 > maxLen) {
beginInd = i-j;
endInd = i+j;
maxLen = j*2 + 1;
}
}
// try evens
for (int i = 0; i < slen; ++i) {
int j;
// now i stands for using s[i] | s[i+1] as middle point.
for (j = 1; i-j+1 >= 0 && i+j < slen; ++j) {
if (s[i-j+1] != s[i+j])
break;
}
--j;
if (i-j+1 >= 0 && i+j < slen && j*2 > maxLen) {
beginInd = i-j+1;
endInd = i+j;
maxLen = j*2;
}
}
return s.substr(beginInd, maxLen);
}
};
int main() {
Solution s = Solution();
std::cout << s.longestPalindrome("fasdffdsafcabacgg");
return 0;
}
| 1,491 | 522 |
#ifndef SERVER_HH_
# define SERVER_HH_
namespace Server
{
void init();
void doIO();
}
#endif
| 99 | 42 |
// Copyright (C) 2019. Huawei Technologies Co., Ltd. All rights reserved.
// 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.
#include <string.h>
#include "tensor_computing.h"
#include "blas_enhance.h"
#ifdef _USE_MALI
#include "gpu/mali/tensor_computing_mali.h"
#endif
// input format: NCHW|NCHWC8|NORMAL
// weight(filter) format: NORMAL
// result format: NORMAL
inline EE fully_connected_infer_output_size_cpu(
TensorDesc inputDesc, TensorDesc filterDesc, TensorDesc *outputDesc)
{
if (outputDesc == nullptr) {
CHECK_STATUS(NULL_POINTER);
}
DataType idt, fdt;
DataFormat idf, fdf;
U32 in, ic, ih, iw;
U32 fh, fw;
if (tensorIs2d(inputDesc)) {
CHECK_STATUS(tensor2dGet(inputDesc, &idt, &idf, &in, &iw));
ic = 1;
ih = 1;
} else if (tensorIs4d(inputDesc)) {
CHECK_STATUS(tensor4dGet(inputDesc, &idt, &idf, &in, &ic, &ih, &iw));
if (idf != DF_NCHW && idf != DF_NCHWC8) {
CHECK_STATUS(NOT_MATCH);
}
} else {
return NOT_MATCH;
}
CHECK_REQUIREMENT(tensorIs2d(filterDesc));
CHECK_STATUS(tensor2dGet(filterDesc, &fdt, &fdf, &fh, &fw));
if (fdf != DF_TRANSPOSE) {
CHECK_STATUS(NOT_MATCH);
}
if (fw != ic * ih * iw) {
CHECK_STATUS(NOT_MATCH);
}
*outputDesc = tensor2df(idt, DF_NORMAL, in, fh);
return SUCCESS;
}
EE fully_connected_infer_output_size(
Tensor *inputTensor, Tensor filterTensor, Tensor *outputTensor, ArchInfo_t archInfo)
{
if (inputTensor == nullptr) {
CHECK_STATUS(NULL_POINTER);
}
if (outputTensor == nullptr) {
CHECK_STATUS(NULL_POINTER);
}
TensorDesc inputDesc = inputTensor->get_desc();
TensorDesc filterDesc = filterTensor.get_desc();
TensorDesc outputDesc = outputTensor->get_desc();
EE ret = NOT_SUPPORTED;
if (IS_MALI_GPU(archInfo->arch)) {
#ifdef _USE_MALI
GCLMemDesc gclmemInputDesc = ocl_get_desc(*inputTensor);
GCLMemDesc gclmemOutputDesc = ocl_get_desc(*outputTensor);
ret = fully_connected_infer_output_size_mali(
inputDesc, filterDesc, &outputDesc, &gclmemInputDesc, &gclmemOutputDesc);
ocl_set_desc(inputTensor, gclmemInputDesc);
ocl_set_desc(outputTensor, gclmemOutputDesc);
#endif
} else {
ret = fully_connected_infer_output_size_cpu(inputDesc, filterDesc, &outputDesc);
}
outputTensor->resize(outputDesc);
return ret;
}
EE fully_connected_infer_forward_algorithm(
Tensor inputTensor, Tensor filterTensor, Tensor outputTensor, ArchInfo_t archInfo)
{
EE ret = NOT_SUPPORTED;
if (IS_MALI_GPU(archInfo->arch)) {
#ifdef _USE_MALI
TensorDesc inputDesc = inputTensor.get_desc();
TensorDesc filterDesc = filterTensor.get_desc();
TensorDesc outputDesc = outputTensor.get_desc();
GCLMemDesc gclmemInputDesc = ocl_get_desc(inputTensor);
GCLMemDesc gclmemOutputDesc = ocl_get_desc(outputTensor);
ret = fully_connected_infer_forward_algorithm_mali(
((MaliPara_t)(archInfo->archPara))->handle, inputDesc, filterDesc, outputDesc,
gclmemInputDesc, gclmemOutputDesc, ((MaliPara_t)(archInfo->archPara))->forwardRunInfo);
#endif
} else {
UNUSED(inputTensor);
UNUSED(filterTensor);
UNUSED(outputTensor);
}
return ret;
}
EE fully_connected_infer_forward_tmp_bytes(
Tensor inputTensor, Tensor filterTensor, U32 *bytes, ArchInfo_t archInfo)
{
TensorDesc inputDesc = inputTensor.get_desc();
TensorDesc filterDesc = filterTensor.get_desc();
// Match dt in int8 inference
inputDesc.dt = filterDesc.dt;
EE ret = NOT_SUPPORTED;
if (IS_MALI_GPU(archInfo->arch)) {
#ifdef _USE_MALI
ret = fully_connected_infer_forward_tmp_bytes_mali(
inputDesc, filterDesc, bytes, ((MaliPara_t)(archInfo->archPara))->forwardRunInfo);
#endif
} else {
if (bytes == nullptr) {
CHECK_STATUS(NULL_POINTER);
}
DataType idt;
DataFormat idf;
U32 in, ic, ih, iw;
if (tensorIs2d(inputDesc)) {
CHECK_STATUS(tensor2dGet(inputDesc, &idt, &idf, &in, &iw));
ic = ih = 1;
} else if (tensorIs4d(inputDesc)) {
CHECK_STATUS(tensor4dGet(inputDesc, &idt, &idf, &in, &ic, &ih, &iw));
} else {
return NOT_MATCH;
}
if (in != 1) {
// call gemm
TensorDesc in_desc = tensor2df(idt, DF_NORMAL, in, ic * ih * iw);
ret = matrix_matrix_multiply_tmp_bytes(in_desc, filterDesc, bytes, archInfo->arch);
} else {
// call gemv
TensorDesc in_desc = tensor1d(idt, ic * ih * iw);
ret = matrix_vector_multiply_tmp_bytes(filterDesc, in_desc, bytes, archInfo->arch);
}
if (DT_I8 == filterDesc.dt) {
if (DT_F16 == inputTensor.get_desc().dt) {
*bytes += tensorNumBytes(inputDesc);
}
*bytes += filterDesc.dims[0] * bytesOf(DT_I32); // Bias
*bytes += in * filterDesc.dims[1] * bytesOf(DT_I32); // Results before quantization
}
}
return ret;
}
EE fully_connected_transform_filter_bytes(Tensor filterTensor, U32 *bytes, ArchInfo_t archInfo)
{
TensorDesc filterDesc = filterTensor.get_desc();
if (IS_MALI_GPU(archInfo->arch)) {
#ifdef _USE_MALI
CHECK_STATUS(fully_connected_transform_filter_bytes_mali(filterDesc,
((MaliPara_t)(archInfo->archPara))->gclmemFilterDesc, bytes,
((MaliPara_t)(archInfo->archPara))->forwardRunInfo));
#endif
} else {
if (bytes == nullptr) {
CHECK_STATUS(NULL_POINTER);
}
*bytes = tensorNumBytes(filterDesc) + 32;
}
return SUCCESS;
}
template <typename T>
EE fully_connected_transform_filter_kernel(TensorDesc inputDesc,
TensorDesc filterDesc,
const void *filter,
TensorDesc *ftmDesc,
void *filterTransformed)
{
if (filter == nullptr || ftmDesc == nullptr || filterTransformed == nullptr) {
CHECK_STATUS(NULL_POINTER);
}
DataType idt, fdt;
DataFormat idf, fdf;
U32 in, ic, ih, iw;
U32 fh, fw;
if (tensorIs2d(inputDesc)) {
CHECK_STATUS(tensor2dGet(inputDesc, &idt, &idf, &in, &iw));
ic = ih = 1;
} else if (tensorIs4d(inputDesc)) {
CHECK_STATUS(tensor4dGet(inputDesc, &idt, &idf, &in, &ic, &ih, &iw));
} else {
return NOT_MATCH;
}
CHECK_STATUS(tensor2dGet(filterDesc, &fdt, &fdf, &fh, &fw));
if (fw != ic * ih * iw) {
CHECK_STATUS(NOT_MATCH);
}
bool need_transpose = false;
if (in > 1) {
need_transpose = true;
}
if (idf == DF_NCHW || idf == DF_NORMAL) {
if (need_transpose) {
T *f_ptr = (T *)filter;
T *ftm_ptr = (T *)filterTransformed;
for (U32 h = 0; h < fh; h++) {
for (U32 w = 0; w < fw; w++) {
U32 f_index = h * fw + w;
U32 ftm_index = w * fh + h;
ftm_ptr[ftm_index] = f_ptr[f_index];
}
}
} else {
memcpy(filterTransformed, filter, tensorNumBytes(filterDesc));
}
} else if (idf == DF_NCHWC8) {
U32 align = 8;
if (ic % align != 0) {
align = 1;
}
U32 ic_new = ic / align;
T *f_ptr = (T *)filter;
T *ftm_ptr = (T *)filterTransformed;
for (U32 h = 0; h < fh; h++) {
for (U32 w = 0; w < fw; w++) {
U32 i_n = w / (ic * ih * iw);
U32 remain = w % (ic * ih * iw);
U32 i_c = remain / (ih * iw);
remain = remain % (ih * iw);
U32 i_h = remain / iw;
U32 i_w = remain % iw;
U32 i_c_outer = i_c / align;
U32 i_c_inner = i_c % align;
U32 h_new = h;
U32 w_new = (((i_n * ic_new + i_c_outer) * ih + i_h) * iw + i_w) * align + i_c_inner;
U32 ld = fw;
if (need_transpose) {
U32 tmp = h_new;
h_new = w_new;
w_new = tmp;
ld = fh;
}
U32 f_index = h * fw + w;
U32 ftm_index = h_new * ld + w_new;
ftm_ptr[ftm_index] = f_ptr[f_index];
}
}
} else {
return NOT_MATCH;
}
U32 fh_after = fh;
U32 fw_after = fw;
if (need_transpose) {
fh_after = fw;
fw_after = fh;
}
*ftmDesc = tensor2df(fdt, DF_NORMAL, fh_after, fw_after);
return SUCCESS;
}
EE fully_connected_transform_filter(
Tensor inputTensor, Tensor filterTensor, Tensor *ftmTensor, ArchInfo_t archInfo)
{
auto arch = archInfo->arch;
TensorDesc inputDesc = inputTensor.get_desc();
TensorDesc filterDesc = filterTensor.get_desc();
void *filter = get_ptr_from_tensor(filterTensor, arch);
TensorDesc ftmDesc = ftmTensor->get_desc();
void *filterTransformed = get_ptr_from_tensor(*ftmTensor, arch);
EE ret = NOT_SUPPORTED;
if (IS_MALI_GPU(arch)) {
#ifdef _USE_MALI
ret = fully_connected_transform_filter_mali(((MaliPara_t)(archInfo->archPara))->handle,
filterDesc, (GCLMem_t)filter, &ftmDesc, (GCLMem_t)filterTransformed,
((MaliPara_t)(archInfo->archPara))->forwardRunInfo);
#endif
} else {
switch (filterDesc.dt) {
#ifdef _USE_FP16
case DT_F16: {
ret = fully_connected_transform_filter_kernel<F16>(
inputDesc, filterDesc, filter, &ftmDesc, filterTransformed);
break;
}
#endif
#ifdef _USE_FP32
case DT_F32: {
ret = fully_connected_transform_filter_kernel<F32>(
inputDesc, filterDesc, filter, &ftmDesc, filterTransformed);
break;
}
#endif
default:
ret = NOT_SUPPORTED;
break;
}
}
ftmTensor->resize(ftmDesc);
return ret;
}
EE fully_connected(Tensor inputTensor,
Tensor filterTensor,
Tensor biasTensor,
Tensor tmpTensor,
Tensor outputTensor,
ArchInfo_t archInfo)
{
auto arch = archInfo->arch;
TensorDesc inputDesc = inputTensor.get_desc();
void *input = get_ptr_from_tensor(inputTensor, arch);
TensorDesc filterDesc = filterTensor.get_desc();
void *filter = get_ptr_from_tensor(filterTensor, arch);
TensorDesc biasDesc = biasTensor.get_desc();
void *bias = get_ptr_from_tensor(biasTensor, arch);
U32 tmpBytes = tmpTensor.bytes();
void *tmp = get_ptr_from_tensor(tmpTensor, arch);
TensorDesc outputDesc = outputTensor.get_desc();
void *output = get_ptr_from_tensor(outputTensor, arch);
EE ret = NOT_SUPPORTED;
if (IS_MALI_GPU(arch)) {
#ifdef _USE_MALI
ret = fully_connected_mali(((MaliPara_t)(archInfo->archPara))->handle, inputDesc,
(GCLMem_t)input, filterDesc, (GCLMem_t)filter, biasDesc, (GCLMem_t)bias, tmpBytes,
(GCLMem_t)tmp, outputDesc, (GCLMem_t)output,
((MaliPara_t)(archInfo->archPara))->forwardRunInfo);
#endif
} else {
if (input == nullptr || filter == nullptr || output == nullptr) {
CHECK_STATUS(NULL_POINTER);
}
#ifdef _USE_INT8
F32 scaleI = inputTensor.get_scale();
if (DT_I8 == filterDesc.dt) {
if (DT_F16 == inputDesc.dt) {
F16 *inD = (F16 *)input;
INT8 *inQ = (INT8 *)tmp;
F16 scale = scaleI;
quantize_tensor(inputDesc, inD, &inputDesc, inQ, &scale);
scaleI = scale;
input = (U8 *)tmp;
tmp = (U8 *)tmp + tensorNumBytes(inputDesc);
}
if (nullptr != bias) {
if (DT_F16 == outputDesc.dt) { // dequantize and then add bias
bias = nullptr;
} else {
CHECK_REQUIREMENT(DT_I8 == outputDesc.dt);
biasDesc.dt = DT_I32;
F16 *biasF = (F16 *)bias;
I32 *biasI = (I32 *)tmp;
F32 scale = scaleI * filterTensor.get_scale();
for (U32 i = 0; i < tensorNumElements(biasDesc); i++) {
biasI[i] = round(scale * biasF[i]);
}
bias = tmp;
tmp = (U8 *)tmp + tensorNumBytes(biasDesc);
}
}
outputDesc.dt = DT_I32;
output = tmp;
tmp = (U8 *)tmp + tensorNumBytes(outputDesc);
}
#endif
U32 in, ic, ih, iw;
U32 oh, ow;
U32 fh, fw, bw;
DataType idt, fdt, odt, bdt;
DataFormat idf, fdf, odf, bdf;
if (tensorIs2d(inputDesc)) {
CHECK_STATUS(tensor2dGet(inputDesc, &idt, &idf, &in, &iw));
ic = ih = 1;
} else if (tensorIs4d(inputDesc)) {
CHECK_STATUS(tensor4dGet(inputDesc, &idt, &idf, &in, &ic, &ih, &iw));
} else {
CHECK_STATUS(NOT_MATCH);
}
CHECK_REQUIREMENT(tensorIs2d(filterDesc));
CHECK_STATUS(tensor2dGet(filterDesc, &fdt, &fdf, &fh, &fw));
CHECK_STATUS(tensor2dGet(outputDesc, &odt, &odf, &oh, &ow));
if (bias != nullptr) {
CHECK_STATUS(tensor1dGet(biasDesc, &bdt, &bdf, &bw));
if (bw != ow) {
CHECK_STATUS(NOT_MATCH);
} else {
U8 *outArray = (U8 *)output;
U32 size = tensorNumBytes(biasDesc);
for (U32 i = 0; i < in; i++) {
memcpy(outArray + i * size, bias, size);
}
}
} else {
memset(output, 0, tensorNumBytes(outputDesc));
}
if (in == 1 &&
fdf != targetFormat4MatrixB(fdt)) { // If weight is transformed for mmm, don't run as mvm
TensorDesc vectorDesc = tensor1d(idt, ic * ih * iw);
TensorDesc resultDesc = tensor1d(odt, ow);
ret = matrix_vector_multiply(filterDesc, filter, vectorDesc, input, tmpBytes, tmp,
resultDesc, output, archInfo->arch);
} else {
TensorDesc in_desc = tensor2df(idt, DF_NORMAL, in, ic * ih * iw);
ret = matrix_matrix_multiply(in_desc, input, filterDesc, filter, tmpBytes, tmp,
outputDesc, output, archInfo->arch);
}
#ifdef _USE_INT8
F32 scale = scaleI * filterTensor.get_scale();
if (DT_I8 == filterDesc.dt) {
if (DT_I8 == outputTensor.get_desc().dt) {
CHECK_STATUS(quantize_tensor(outputDesc, output, &outputDesc,
get_ptr_from_tensor(outputTensor, arch), &scale));
outputTensor.set_scale(scale);
} else {
CHECK_REQUIREMENT(DT_F16 == outputTensor.get_desc().dt);
F16 *biasF = (F16 *)get_ptr_from_tensor(biasTensor, arch);
U32 biasLen = nullptr == biasF ? 0 : tensorNumElements(biasDesc);
dequantize_int32_to_fp16(tensorNumElements(outputDesc), (I32 *)output, scale,
(F16 *)get_ptr_from_tensor(outputTensor, arch), biasLen, biasF);
}
}
#endif
}
return ret;
}
| 16,367 | 5,734 |
/**
Let's call an array A a mountain if the following properties hold:
A.length >= 3
There exists some 0 < i < A.length - 1 such that A[0] < A[1] < ... A[i-1] < A[i] > A[i+1] > ... > A[A.length - 1]
Given an array that is definitely a mountain, return any i such that A[0] < A[1] < ... A[i-1] < A[i] > A[i+1] > ... > A[A.length - 1].
Example 1:
Input: [0,1,0]
Output: 1
Example 2:
Input: [0,2,1,0]
Output: 1
Note:
3 <= A.length <= 10000
0 <= A[i] <= 10^6
A is a mountain, as defined above.
**/
//Your runtime beats 52.46 % of cpp submissions.
class Solution {
public:
int peakIndexInMountainArray(vector<int>& A) {
//binary search
int low = 0;
int up = A.size()-1;
int cur = A.size()/2;
// cout << low << " " << up << " " << cur << endl;
while(true){
// cout << low << " " << up << " " << cur << endl;
if(A[cur-1] < A[cur] && A[cur] < A[cur+1]){ //left side of mountain
low = cur;
cur = (cur+up)/2;
}else if(A[cur-1] > A[cur] && A[cur] > A[cur+1]){ //right side
up = cur;
cur = (cur+low)/2;
}else{
return cur;
}
}
}
};
/**
Approach 1: Linear Scan
Intuition and Algorithm
The mountain increases until it doesn't. The point at which it stops increasing is the peak.
//Java
class Solution {
public int peakIndexInMountainArray(int[] A) {
int i = 0;
while (A[i] < A[i+1]) i++;
return i;
}
}
Complexity Analysis
Time Complexity: O(N), where N is the length of A.
Space Complexity: O(1).
Approach 2: Binary Search
Intuition and Algorithm
The comparison A[i] < A[i+1] in a mountain array looks like [True, True, True, ..., True, False, False, ..., False]:
1 or more boolean Trues, followed by 1 or more boolean False.
For example, in the mountain array [1, 2, 3, 4, 1], the comparisons A[i] < A[i+1] would be True, True, True, False.
We can binary search over this array of comparisons, to find the largest index i such that A[i] < A[i+1].
For more on binary search, see the LeetCode explore topic here.
//Your runtime beats 52.46 % of cpp submissions.
class Solution {
public:
int peakIndexInMountainArray(vector<int>& A) {
//binary search
int low = 0;
int up = A.size()-1;
while(low < up){
int mi = (low+up)/2;
if(A[mi] < A[mi+1]){
low = mi+1;
}else{
up = mi;
}
}
return low;
}
};
Complexity Analysis
Time Complexity: O(logN), where N is the length of A.
Space Complexity: O(1).
**/
| 2,668 | 959 |
/*
** Copyright 2013,2015 Centreon
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
**
** For more information : contact@centreon.com
*/
#include <cmath>
#include <cstdlib>
#include "com/centreon/broker/neb/host_status.hh"
using namespace com::centreon::broker;
/**
* Check host_status' default constructor.
*
* @return EXIT_SUCCESS on success.
*/
int main() {
// Object.
neb::host_status hs;
// Check.
return (((hs.source_id != 0)
|| (hs.destination_id != 0)
|| hs.acknowledged
|| (hs.acknowledgement_type != 0)
|| hs.active_checks_enabled
|| !hs.check_command.isEmpty()
|| (fabs(hs.check_interval) > 0.0001)
|| !hs.check_period.isEmpty()
|| (hs.check_type != 0)
|| (hs.current_check_attempt != 0)
|| (hs.current_state != 4)
|| (hs.downtime_depth != 0)
|| !hs.enabled
|| !hs.event_handler.isEmpty()
|| hs.event_handler_enabled
|| (fabs(hs.execution_time) > 0.0001)
|| hs.flap_detection_enabled
|| hs.has_been_checked
|| (hs.host_id != 0)
|| hs.is_flapping
|| (hs.last_check != 0)
|| (hs.last_hard_state != 4)
|| (hs.last_hard_state_change != 0)
|| (hs.last_notification != 0)
|| (hs.last_state_change != 0)
|| (hs.last_time_down != 0)
|| (hs.last_time_unreachable != 0)
|| (hs.last_time_up != 0)
|| (hs.last_update != 0)
|| (fabs(hs.latency) > 0.0001)
|| (hs.max_check_attempts != 0)
|| (hs.next_check != 0)
|| (hs.next_notification != 0)
|| hs.no_more_notifications
|| (hs.notification_number != 0)
|| hs.notifications_enabled
|| hs.obsess_over
|| !hs.output.isEmpty()
|| hs.passive_checks_enabled
|| (fabs(hs.percent_state_change) > 0.0001)
|| !hs.perf_data.isEmpty()
|| (fabs(hs.retry_interval) > 0.0001)
|| hs.should_be_scheduled
|| (hs.state_type != 0))
? EXIT_FAILURE
: EXIT_SUCCESS);
}
| 2,714 | 944 |
#include <iostream>
#include <stdexcept>
#include <cassert>
#include <botan/aead.h>
#include <botan/hex.h>
#include <botan/block_cipher.h>
#include <botan/auto_rng.h>
/*BAD example MS1(BlockCiphers)
#define __CIPHER "Twofish/CBC"
*/
#define __CIPHER "AES-256/CBC"
#define __KEY_LENGTH 32
#define __IV_LENGTH 16
/* BAD example MS1(UseRandomIV)
Botan::InitializationVector __IV("deadbeefdeadbeefdeadbeefdeadbeef");
*/
Botan::InitializationVector __IV;
Botan::secure_vector<uint8_t> do_crypt(const std::string &cipher,
const std::vector<uint8_t> &input,
const Botan::SymmetricKey &key,
const Botan::InitializationVector &iv,
Botan::Cipher_Dir direction)
{
if(iv.size() == 0)
throw std::runtime_error("IV must not be empty");
std::unique_ptr<Botan::Cipher_Mode> processor(Botan::get_cipher_mode(cipher, direction));
if(!processor)
throw std::runtime_error("Cipher algorithm not found");
// Set key
processor->set_key(key);
// Set IV
processor->start(iv.bits_of());
Botan::secure_vector<uint8_t> buf(input.begin(), input.end());
processor->finish(buf);
return buf;
}
std::string encrypt(std::string cleartext) {
const std::string key_hex = "f00dbabef00dbabef00dbabef00dbabef00dbabef00dbabef00dbabef00dbabe";
const Botan::SymmetricKey key(key_hex);
assert(key.length() == __KEY_LENGTH);
Botan::AutoSeeded_RNG rng;
__IV = rng.random_vec(__IV_LENGTH);
const std::vector<uint8_t> input(cleartext.begin(), cleartext.end());
std::cerr << "Got " << input.size() << " bytes of input data.\n";
Botan::secure_vector<uint8_t> cipherblob = do_crypt(__CIPHER, input, key, __IV, Botan::Cipher_Dir::ENCRYPTION);
return Botan::hex_encode(cipherblob);
}
std::string decrypt(const std::string& ciphertext) {
const std::string key_hex = "f00dbabef00dbabef00dbabef00dbabef00dbabef00dbabef00dbabef00dbabe";
const Botan::SymmetricKey key(key_hex);
assert(key.length() == __KEY_LENGTH);
const std::vector<uint8_t> input = Botan::hex_decode(ciphertext);
std::cerr << "Got " << input.size() << " bytes of ciphertext data.\n";
Botan::secure_vector<uint8_t> clearblob = do_crypt(__CIPHER, input, key, __IV, Botan::Cipher_Dir::DECRYPTION);
return std::string(clearblob.begin(), clearblob.end());
}
int main() {
std::string cleartext = "Hello World";
auto ciphertext = encrypt(cleartext);
std::cout << "ciphertext: " << ciphertext << std::endl;
auto cleartext_decrypted = decrypt(ciphertext);
std::cout << "cleartext_decrypted: " << cleartext_decrypted << std::endl;
return 0;
}
| 2,773 | 1,002 |
#include<iostream>
#include<string>
using namespace std;
int main(){
//Array of string
//Method 1
char *str[3]={"Hi","Hello","Bye"};
for(int i=0;i<3;i++){
cout << str[i];
}
//Method 2
char s[3][10]={"Hi","Hello","Bye"};
for(int i=0;i<3;i++){
cout << s[i];
}
return 0;
}
| 289 | 145 |
/*******************************************************************************
+
+ LEDA 6.3
+
+
+ lclock.c
+
+
+ Copyright (c) 1995-2010
+ by Algorithmic Solutions Software GmbH
+ All rights reserved.
+
*******************************************************************************/
#include <LEDA/graphics/window.h>
using namespace leda;
#if defined(LEDA_STD_HEADERS)
#include <ctime>
#else
#include <time.h>
#endif
#if defined(__BORLANDC__)
#include <time.h>
#endif
static void display_time(window* wp)
{ time_t clock;
time(&clock);
tm* T = localtime(&clock);
int s = T->tm_sec;
int m = T->tm_min;
int h = T->tm_hour;
//double x = (wp->xmax() - wp->xmin())/2;
//double y = (wp->ymax() - wp->ymin())/2;
string time("%02d:%02d:%02d",h,m,s);
wp->set_frame_label(time);
}
int main()
{ panel P;
P.button("continue");
P.button("exit");
P.buttons_per_line(2);
P.display();
P.start_timer(1000,display_time);
P.read_mouse();
return 0;
}
| 983 | 395 |
/*
* Modification History
*
* 2002-May-25 Jason Rohrer
* Changed to use minorGems endian.h
* Added a function for hashing an entire string to a hex digest.
* Added a function for getting a raw digest.
* Fixed a deletion bug.
*
* 2003-August-24 Jason Rohrer
* Switched to use minorGems hex encoding.
*
* 2003-September-15 Jason Rohrer
* Added support for hashing raw (non-string) data.
*
* 2003-September-21 Jason Rohrer
* Fixed bug that was causing overwrite of input data.
*
* 2004-January-13 Jason Rohrer
* Fixed system includes.
*
* 2013-January-7 Jason Rohrer
* Added HMAC-SHA1 implementation.
*/
/*
* sha1.c
*
* Originally witten by Steve Reid <steve@edmweb.com>
*
* Modified by Aaron D. Gifford <agifford@infowest.com>
*
* NO COPYRIGHT - THIS IS 100% IN THE PUBLIC DOMAIN
*
* The original unmodified version is available at:
* ftp://ftp.funet.fi/pub/crypt/hash/sha/sha1.c
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) 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 AUTHOR(S) 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 "sha1.h"
#include <string.h>
#include <stdio.h>
// for hex encoding
#include "minorGems/formats/encodingUtils.h"
#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
/* blk0() and blk() perform the initial expand. */
/* I got the idea of expanding during the round function from SSLeay */
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define blk0(i) (block->l[i] = (rol(block->l[i],24)&(sha1_quadbyte)0xFF00FF00) \
|(rol(block->l[i],8)&(sha1_quadbyte)0x00FF00FF))
#else
#define blk0(i) block->l[i]
#endif
#define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \
^block->l[(i+2)&15]^block->l[i&15],1))
/* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */
#define R0(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30);
#define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30);
#define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30);
#define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30);
#define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30);
typedef union _BYTE64QUAD16 {
sha1_byte c[64];
sha1_quadbyte l[16];
} BYTE64QUAD16;
/* Hash a single 512-bit block. This is the core of the algorithm. */
void SHA1_Transform(sha1_quadbyte state[5], sha1_byte buffer[64]) {
sha1_quadbyte a, b, c, d, e;
BYTE64QUAD16 *block;
block = (BYTE64QUAD16*)buffer;
/* Copy context->state[] to working vars */
a = state[0];
b = state[1];
c = state[2];
d = state[3];
e = state[4];
/* 4 rounds of 20 operations each. Loop unrolled. */
R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3);
R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7);
R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11);
R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15);
R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19);
R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23);
R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27);
R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31);
R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35);
R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39);
R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43);
R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47);
R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51);
R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55);
R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59);
R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63);
R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67);
R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71);
R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75);
R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79);
/* Add the working vars back into context.state[] */
state[0] += a;
state[1] += b;
state[2] += c;
state[3] += d;
state[4] += e;
/* Wipe variables */
a = b = c = d = e = 0;
}
/* SHA1_Init - Initialize new context */
void SHA1_Init(SHA_CTX* context) {
/* SHA1 initialization constants */
context->state[0] = 0x67452301;
context->state[1] = 0xEFCDAB89;
context->state[2] = 0x98BADCFE;
context->state[3] = 0x10325476;
context->state[4] = 0xC3D2E1F0;
context->count[0] = context->count[1] = 0;
}
/* Run your data through this. */
void SHA1_Update(SHA_CTX *context, sha1_byte *data, unsigned int len) {
unsigned int i, j;
j = (context->count[0] >> 3) & 63;
if ((context->count[0] += len << 3) < (len << 3)) context->count[1]++;
context->count[1] += (len >> 29);
if ((j + len) > 63) {
memcpy(&context->buffer[j], data, (i = 64-j));
SHA1_Transform(context->state, context->buffer);
for ( ; i + 63 < len; i += 64) {
SHA1_Transform(context->state, &data[i]);
}
j = 0;
}
else i = 0;
memcpy(&context->buffer[j], &data[i], len - i);
}
/* Add padding and return the message digest. */
void SHA1_Final(sha1_byte digest[SHA1_DIGEST_LENGTH], SHA_CTX *context) {
sha1_quadbyte i, j;
sha1_byte finalcount[8];
for (i = 0; i < 8; i++) {
finalcount[i] = (sha1_byte)((context->count[(i >= 4 ? 0 : 1)]
>> ((3-(i & 3)) * 8) ) & 255); /* Endian independent */
}
SHA1_Update(context, (sha1_byte *)"\200", 1);
while ((context->count[0] & 504) != 448) {
SHA1_Update(context, (sha1_byte *)"\0", 1);
}
/* Should cause a SHA1_Transform() */
SHA1_Update(context, finalcount, 8);
for (i = 0; i < SHA1_DIGEST_LENGTH; i++) {
digest[i] = (sha1_byte)
((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255);
}
/* Wipe variables */
i = j = 0;
memset(context->buffer, 0, SHA1_BLOCK_LENGTH);
memset(context->state, 0, SHA1_DIGEST_LENGTH);
memset(context->count, 0, 8);
memset(&finalcount, 0, 8);
}
unsigned char *computeRawSHA1Digest( unsigned char *inData,
int inDataLength ) {
SHA_CTX context;
SHA1_Init( &context );
// copy into buffer, since this SHA1 implementation seems to overwrite
// parts of the data buffer.
unsigned char *buffer = new unsigned char[ inDataLength ];
memcpy( (void *)buffer, (void *)inData, inDataLength );
SHA1_Update( &context, buffer, inDataLength );
delete [] buffer;
unsigned char *digest = new unsigned char[ SHA1_DIGEST_LENGTH ];
SHA1_Final( digest, &context );
return digest;
}
unsigned char *computeRawSHA1Digest( char *inString ) {
SHA_CTX context;
SHA1_Init( &context );
// copy into buffer, since this SHA1 implementation seems to overwrite
// parts of the data buffer.
int dataLength = strlen( inString );
unsigned char *buffer = new unsigned char[ dataLength ];
memcpy( (void *)buffer, (void *)inString, dataLength );
SHA1_Update( &context, buffer, strlen( inString ) );
delete [] buffer;
unsigned char *digest = new unsigned char[ SHA1_DIGEST_LENGTH ];
SHA1_Final( digest, &context );
return digest;
}
char *computeSHA1Digest( char *inString ) {
unsigned char *digest = computeRawSHA1Digest( inString );
char *digestHexString = hexEncode( digest, SHA1_DIGEST_LENGTH );
delete [] digest;
return digestHexString;
}
char *computeSHA1Digest( unsigned char *inData, int inDataLength ) {
unsigned char *digest = computeRawSHA1Digest( inData, inDataLength );
char *digestHexString = hexEncode( digest, SHA1_DIGEST_LENGTH );
delete [] digest;
return digestHexString;
}
// returns new data buffer of length inALength + inBLength
static unsigned char *dataConcat( unsigned char *inA, int inALength,
unsigned char *inB, int inBLength ) {
int netLength = inALength + inBLength;
unsigned char *netData = new unsigned char[ netLength ];
int i=0;
for( int j=0; j<inALength; j++ ) {
netData[i] = inA[j];
i++;
}
for( int j=0; j<inBLength; j++ ) {
netData[i] = inB[j];
i++;
}
return netData;
}
#include "minorGems/util/stringUtils.h"
char *hmac_sha1( const char *inKey, const char *inData ) {
unsigned char *keyRaw = (unsigned char*)stringDuplicate( inKey );
int keyLength = strlen( inKey );
//unsigned char *computeRawSHA1Digest( unsigned char *inData, int inDataLength
// shorten long keys down to 20 byte hash of key, if needed
if( keyLength > SHA1_BLOCK_LENGTH ) {
unsigned char *newKey = computeRawSHA1Digest( keyRaw, keyLength );
delete [] keyRaw;
keyRaw = newKey;
keyLength = SHA1_DIGEST_LENGTH;
}
// pad key out to blocksize with zeros
if( keyLength < SHA1_BLOCK_LENGTH ) {
unsigned char *newKey = new unsigned char[ SHA1_BLOCK_LENGTH ];
memset( newKey, 0, SHA1_BLOCK_LENGTH );
memcpy( newKey, keyRaw, keyLength );
delete [] keyRaw;
keyRaw = newKey;
keyLength = SHA1_BLOCK_LENGTH;
}
// computer inner and outer keys by XORing with data block
unsigned char *outerKey = new unsigned char[ keyLength ];
unsigned char *innerKey = new unsigned char[ keyLength ];
for( int i=0; i<keyLength; i++ ) {
outerKey[i] = 0x5c ^ keyRaw[i];
innerKey[i] = 0x36 ^ keyRaw[i];
}
delete [] keyRaw;
int dataLength = strlen( inData );
int innerDataLength = keyLength +dataLength;
unsigned char *innerData = dataConcat( innerKey, keyLength,
(unsigned char*)inData,
dataLength );
delete [] innerKey;
unsigned char *innerHash = computeRawSHA1Digest( innerData,
innerDataLength );
delete [] innerData;
int outerDataLength = keyLength + SHA1_DIGEST_LENGTH;
unsigned char *outerData = dataConcat( outerKey, keyLength,
innerHash, SHA1_DIGEST_LENGTH );
delete [] outerKey;
delete [] innerHash;
char *digest = computeSHA1Digest( outerData, outerDataLength );
delete [] outerData;
return digest;
}
| 11,227 | 5,211 |
/*
* Copyright 2018 Mike Reed
*/
#include "GPath.h"
#include "GMatrix.h"
GPath::GPath() {}
GPath::~GPath() {}
GPath& GPath::operator=(const GPath& src) {
if (this != &src) {
fPts = src.fPts;
fVbs = src.fVbs;
}
return *this;
}
GPath& GPath::reset() {
fPts.clear();
fVbs.clear();
return *this;
}
void GPath::dump() const {
Iter iter(*this);
GPoint pts[GPath::kMaxNextPoints];
for (;;) {
switch (iter.next(pts)) {
case kMove:
printf("M %g %g\n", pts[0].fX, pts[0].fY);
break;
case kLine:
printf("L %g %g\n", pts[1].fX, pts[1].fY);
break;
case kQuad:
printf("Q %g %g %g %g\n", pts[1].fX, pts[1].fY, pts[2].fX, pts[2].fY);
break;
case kCubic:
printf("C %g %g %g %g %g %g\n",
pts[1].fX, pts[1].fY,
pts[2].fX, pts[2].fY,
pts[3].fX, pts[3].fY);
break;
case kDone: return;
}
}
}
GPath& GPath::quadTo(GPoint p1, GPoint p2) {
assert(fVbs.size() > 0);
fPts.push_back(p1);
fPts.push_back(p2);
fVbs.push_back(kQuad);
return *this;
}
GPath& GPath::cubicTo(GPoint p1, GPoint p2, GPoint p3) {
assert(fVbs.size() > 0);
fPts.push_back(p1);
fPts.push_back(p2);
fPts.push_back(p3);
fVbs.push_back(kCubic);
return *this;
}
/////////////////////////////////////////////////////////////////
GPath::Iter::Iter(const GPath& path) {
fPrevMove = nullptr;
fCurrPt = path.fPts.data();
fCurrVb = path.fVbs.data();
fStopVb = fCurrVb + path.fVbs.size();
}
GPath::Verb GPath::Iter::next(GPoint pts[]) {
assert(fCurrVb <= fStopVb);
if (fCurrVb == fStopVb) {
return kDone;
}
Verb v = *fCurrVb++;
switch (v) {
case kMove:
fPrevMove = fCurrPt;
pts[0] = *fCurrPt++;
break;
case kLine:
pts[0] = fCurrPt[-1];
pts[1] = *fCurrPt++;
break;
case kQuad:
pts[0] = fCurrPt[-1];
pts[1] = *fCurrPt++;
pts[2] = *fCurrPt++;
break;
case kCubic:
pts[0] = fCurrPt[-1];
pts[1] = *fCurrPt++;
pts[2] = *fCurrPt++;
pts[3] = *fCurrPt++;
break;
case kDone:
assert(false); // not reached
}
return v;
}
GPath::Edger::Edger(const GPath& path) {
fPrevMove = nullptr;
fCurrPt = path.fPts.data();
fCurrVb = path.fVbs.data();
fStopVb = fCurrVb + path.fVbs.size();
fPrevVerb = kDone;
}
GPath::Verb GPath::Edger::next(GPoint pts[]) {
assert(fCurrVb <= fStopVb);
bool do_return = false;
while (fCurrVb < fStopVb) {
switch (*fCurrVb++) {
case kMove:
if (fPrevVerb == kLine) {
pts[0] = fCurrPt[-1];
pts[1] = *fPrevMove;
do_return = true;
}
fPrevMove = fCurrPt++;
fPrevVerb = kMove;
break;
case kLine:
pts[0] = fCurrPt[-1];
pts[1] = *fCurrPt++;
fPrevVerb = kLine;
return kLine;
case kQuad:
pts[0] = fCurrPt[-1];
pts[1] = *fCurrPt++;
pts[2] = *fCurrPt++;
fPrevVerb = kQuad;
return kQuad;
case kCubic:
pts[0] = fCurrPt[-1];
pts[1] = *fCurrPt++;
pts[2] = *fCurrPt++;
pts[3] = *fCurrPt++;
fPrevVerb = kCubic;
return kCubic;
default:
assert(false); // not reached
}
if (do_return) {
return kLine;
}
}
if (fPrevVerb >= kLine && fPrevVerb <= kCubic) {
pts[0] = fCurrPt[-1];
pts[1] = *fPrevMove;
fPrevVerb = kDone;
return kLine;
} else {
return kDone;
}
}
| 4,137 | 1,634 |
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "SimFastTiming/FastTimingCommon/interface/MTDShapeBase.h"
MTDShapeBase::~MTDShapeBase() { }
MTDShapeBase::MTDShapeBase() :
qNSecPerBin_ ( 1./kNBinsPerNSec ),
indexOfMax_ ( 0 ),
timeOfMax_ ( 0. ),
shape_ ( DVec(k1NSecBinsTotal, 0.0) ) { }
std::array<float,3> MTDShapeBase::timeAtThr(const float scale,
const float threshold1,
const float threshold2) const
{
std::array<float,3> times_tmp = { {0., 0., 0.} };
// --- Check if the pulse amplitude is greater than threshold 2
if ( shape_[indexOfMax_]*scale < threshold2 )
return times_tmp;
// --- Find the times corresponding to thresholds 1 and 2 on the pulse leading edge
// NB: To speed up the search we loop only on the rising edge
unsigned int index_LT1 = 0;
unsigned int index_LT2 = 0;
for( unsigned int i=0; i<indexOfMax_; ++i ){
float amplitude = shape_[i]*scale;
if( amplitude > threshold1 && index_LT1 == 0 )
index_LT1 = i;
if( amplitude > threshold2 && index_LT2 == 0 ){
index_LT2 = i;
break;
}
}
// --- Find the time corresponding to thresholds 1 on the pulse falling edge
unsigned int index_FT1 = 0;
for( unsigned int i=shape_.size()-1; i>indexOfMax_; i-- ){
float amplitude = shape_[i]*scale;
if( amplitude>threshold1 && index_FT1==0){
index_FT1 = i+1;
break;
}
}
if ( index_LT1 != 0 )
times_tmp[0] = linear_interpolation( threshold1,
(index_LT1-1)*qNSecPerBin_,
index_LT1*qNSecPerBin_,
shape_[index_LT1-1]*scale,
shape_[index_LT1]*scale );
if ( index_LT2 != 0 )
times_tmp[1] = linear_interpolation( threshold2,
(index_LT2-1)*qNSecPerBin_,
index_LT2*qNSecPerBin_,
shape_[index_LT2-1]*scale,
shape_[index_LT2]*scale );
if ( index_FT1 != 0 )
times_tmp[2] = linear_interpolation( threshold1,
(index_FT1-1)*qNSecPerBin_,
index_FT1*qNSecPerBin_,
shape_[index_FT1-1]*scale,
shape_[index_FT1]*scale );
return times_tmp;
}
unsigned int MTDShapeBase::indexOfMax() const
{
return indexOfMax_;
}
double MTDShapeBase::timeOfMax() const
{
return timeOfMax_;
}
void MTDShapeBase::buildMe()
{
// --- Fill the vector with the pulse shape
fillShape( shape_ );
// --- Find the index of maximum
for( unsigned int i=0; i<shape_.size(); ++i ) {
if( shape_[indexOfMax_] < shape_[i] )
indexOfMax_ = i;
}
if ( indexOfMax_ != 0 )
timeOfMax_ = indexOfMax_*qNSecPerBin_;
}
unsigned int MTDShapeBase::timeIndex( double aTime ) const
{
const unsigned int index = aTime*kNBinsPerNSec;
const bool bad = ( k1NSecBinsTotal <= index );
if( bad )
LogDebug("MTDShapeBase") << " MTD pulse shape requested for out of range time " << aTime;
return ( bad ? k1NSecBinsTotal : index ) ;
}
double MTDShapeBase::operator() ( double aTime ) const
{
// return pulse amplitude for request time in ns
const unsigned int index ( timeIndex( aTime ) ) ;
return ( k1NSecBinsTotal == index ? 0 : shape_[ index ] ) ;
}
double MTDShapeBase::linear_interpolation(const double& y,
const double& x1, const double& x2,
const double& y1, const double& y2) const
{
if ( x1 == x2 )
throw cms::Exception("BadValue") << " MTDShapeBase: Trying to interpolate two points with the same x coordinate!";
double a = (y2-y1)/(x2-x1);
double b = y1 - a*x1;
return (y-b)/a;
}
| 3,508 | 1,404 |
#include <bits/stdc++.h>
using namespace std;
void all(int a[], int n, int x, int i)
{
if (n == 0)
return;
if (a[0] == x)
{
cout << i << " ";
}
i++;
return all(a + 1, n - 1, x, i);
}
void all1(int a[], int n, int x)
{
if (n == 0)
return;
if (a[n - 1] == x)
cout << n - 1 << " ";
return all1(a, n - 1, x);
}
int main()
{
int n;
cin >> n;
int a[n];
for (int i = 0; i < n; i++)
{
cin >> a[i];
}
int x;
cin >> x;
int i = 0;
all(a, n, x, i);
cout << endl;
all1(a, n, x);
cout << endl;
}
| 614 | 286 |
#include "gtest/gtest.h"
#include "gmock/gmock.h"
#include <utilities/zip.h>
#include <communication/communication.h>
#include <cstring>
#include <fstream>
#include <sys/time.h>
// Mock function that is only available using root privilages
int settimeofday (const struct timeval *__tv, const struct timezone *__tz) __THROW
{
(void)__tv;
(void)__tz;
return 0;
}
using namespace comm;
namespace {
const char compressed_file_name[] = "compressed_123.mp3";
int LinesCount(std::string& s)
{
return std::count(s.begin(), s.end(), '\n');
}
std::string ReadLine(std::string& s, int line_num) {
std::istringstream f(s);
std::string line;
int line_count = 0;
while (std::getline(f, line)) {
++line_count;
if (line_count == line_num) {
return line;
}
}
return "";
}
}
class CommunicationFixture : public ::testing::Test
{
public:
CommunicationFixture()
: logger_m(false, true)
, config_manager_m(logger_m) {
utils::ZipCompress("123.mp3", compressed_file_name);
config_manager_m.ParseConfigFile("audio_app_cfg.xml");
}
~CommunicationFixture() {
std::string file_to_remove = "rm /tmp/";
file_to_remove += compressed_file_name;
system(file_to_remove.c_str());
}
virtual void SetUp() {}
virtual void TearDown() {}
protected:
utils::Logger logger_m;
config::ConfigManager config_manager_m;
};
// Wrong command structure
TEST_F (CommunicationFixture, EmptyCommand) {
// Empty Command:
// ""
comm::Communication communication(config_manager_m, logger_m);
char command[1024] = "";
char reply[1024] = {0};
communication.handleCommand(command, reply);
std::string reply_str(reply);
int lines_count = LinesCount(reply_str);
EXPECT_EQ(3, lines_count);
EXPECT_STREQ("UNKNOWN_COMMAND" ,ReadLine(reply_str, 1).c_str());
EXPECT_STREQ("END" ,ReadLine(reply_str, 3).c_str());
}
TEST_F (CommunicationFixture, WrongCommand) {
// Wrong Command:
// TCP_STATUS\n
comm::Communication communication(config_manager_m, logger_m);
char command[1024] = "TCP_STATUS\n";
char reply[1024] = {0};
communication.handleCommand(command, reply);
std::string reply_str(reply);
int lines_count = LinesCount(reply_str);
EXPECT_EQ(3, lines_count);
EXPECT_STREQ("UNKNOWN_COMMAND" ,ReadLine(reply_str, 1).c_str());
EXPECT_STREQ("END" ,ReadLine(reply_str, 3).c_str());
}
TEST_F (CommunicationFixture, WrongCommandStructure) {
// Wrong Command:
// TCP_STATUS\n
// WWRONG_ATTR\n
// END\n
comm::Communication communication(config_manager_m, logger_m);
char command[1024] = "TCP_STATUS\nWWRONG_ATTR\nEND\n";
char reply[1024] = {0};
communication.handleCommand(command, reply);
std::string reply_str(reply);
int lines_count = LinesCount(reply_str);
EXPECT_EQ(3, lines_count);
EXPECT_STREQ("UNKNOWN_COMMAND" ,ReadLine(reply_str, 1).c_str());
EXPECT_STREQ("END" ,ReadLine(reply_str, 3).c_str());
}
TEST_F (CommunicationFixture, NoNewLineAtEndOfCommand) {
// Wrong Command:
// TCP_STATUS\n
// END
comm::Communication communication(config_manager_m, logger_m);
char command[1024] = "TCP_STATUS\nEND";
char reply[1024] = {0};
communication.handleCommand(command, reply);
std::string reply_str(reply);
int lines_count = LinesCount(reply_str);
EXPECT_EQ(3, lines_count);
EXPECT_STREQ("UNKNOWN_COMMAND" ,ReadLine(reply_str, 1).c_str());
EXPECT_STREQ("END" ,ReadLine(reply_str, 3).c_str());
}
TEST_F (CommunicationFixture, MissingNewLineInCommand) {
// Wrong Command:
// TCP_STATUS
// END\n
comm::Communication communication(config_manager_m, logger_m);
char command[1024] = "TCP_STATUSEND\n";
char reply[1024] = {0};
communication.handleCommand(command, reply);
std::string reply_str(reply);
int lines_count = LinesCount(reply_str);
EXPECT_EQ(3, lines_count);
EXPECT_STREQ("UNKNOWN_COMMAND" ,ReadLine(reply_str, 1).c_str());
EXPECT_STREQ("END" ,ReadLine(reply_str, 3).c_str());
}
// TCP_STATUS
TEST_F (CommunicationFixture, StatusCommand) {
// Command:
// TCP_STATUS\n
// END\n
comm::Communication communication(config_manager_m, logger_m);
char command[1024] = "TCP_STATUS\nEND\n";
char reply[1024] = {0};
communication.handleCommand(command, reply);
std::string reply_str(reply);
int lines_count = LinesCount(reply_str);
EXPECT_EQ(5, lines_count);
EXPECT_STREQ("COMMAND_7_RECEIVED" ,ReadLine(reply_str, 1).c_str());
EXPECT_STREQ("ERROR_CODE:0" ,ReadLine(reply_str, 4).c_str());
EXPECT_STREQ("END" ,ReadLine(reply_str, 5).c_str());
}
//TCP_PLAY
TEST_F (CommunicationFixture, PlayOncePlayOncePlayWrongFileCommand) {
// Command:
// TCP_PLAY\n
// NR_PLIKU\n
// ONCE\n
// END\n
comm::Communication communication(config_manager_m, logger_m);
char reply[1024] = {0};
communication.handleCommand("TCP_PLAY\n1\nONCE\nEND\n", reply);
std::string reply_str(reply);
int lines_count = LinesCount(reply_str);
EXPECT_EQ(5, lines_count);
EXPECT_STREQ("COMMAND_1_RECEIVED" ,ReadLine(reply_str, 1).c_str());
EXPECT_STREQ("AUDIO_PLAY_ONCE" ,ReadLine(reply_str, 3).c_str());
EXPECT_STREQ("ERROR_CODE:0" ,ReadLine(reply_str, 4).c_str());
EXPECT_STREQ("END" ,ReadLine(reply_str, 5).c_str());
communication.handleCommand("TCP_PLAY\n1\nONCE\nEND\n", reply);
reply_str = std::string(reply);
lines_count = LinesCount(reply_str);
EXPECT_EQ(5, lines_count);
EXPECT_STREQ("COMMAND_1_RECEIVED" ,ReadLine(reply_str, 1).c_str());
EXPECT_STREQ("AUDIO_PLAY_ONCE" ,ReadLine(reply_str, 3).c_str());
EXPECT_STREQ("ERROR_CODE:0" ,ReadLine(reply_str, 4).c_str());
EXPECT_STREQ("END" ,ReadLine(reply_str, 5).c_str());
// Rename file to try open file that no longer exists
rename("/tmp/compressed_123.mp3", "/tmp/tmp.mp3");
communication.handleCommand("TCP_PLAY\n1\nONCE\nEND\n", reply);
reply_str = std::string(reply);
lines_count = LinesCount(reply_str);
EXPECT_EQ(5, lines_count);
EXPECT_STREQ("COMMAND_1_RECEIVED" ,ReadLine(reply_str, 1).c_str());
EXPECT_STREQ("AUDIO_IDLE" ,ReadLine(reply_str, 3).c_str());
EXPECT_STREQ("ERROR_CODE:3" ,ReadLine(reply_str, 4).c_str());
EXPECT_STREQ("END" ,ReadLine(reply_str, 5).c_str());
rename("/tmp/tmp.mp3", "/tmp/compressed_123.mp3");
}
TEST_F (CommunicationFixture, PlayInLoopCommand) {
// Command:
// TCP_PLAY\n
// NR_PLIKU\n
// ONCE\n
// END\n
comm::Communication communication(config_manager_m, logger_m);
char reply[1024] = {0};
communication.handleCommand("TCP_PLAY\n1\nIN_LOOP\nEND\n", reply);
std::string reply_str(reply);
int lines_count = LinesCount(reply_str);
EXPECT_EQ(5, lines_count);
EXPECT_STREQ("COMMAND_1_RECEIVED" ,ReadLine(reply_str, 1).c_str());
EXPECT_STREQ("AUDIO_PLAY_IN_LOOP" ,ReadLine(reply_str, 3).c_str());
EXPECT_STREQ("ERROR_CODE:0" ,ReadLine(reply_str, 4).c_str());
EXPECT_STREQ("END" ,ReadLine(reply_str, 5).c_str());
}
TEST_F (CommunicationFixture, PlayWrongModeCommand) {
// Command:
// TCP_PLAY\n
// NR_PLIKU\n
// WRONG_MODE\n
// END\n
comm::Communication communication(config_manager_m, logger_m);
char reply[1024] = {0};
communication.handleCommand("TCP_PLAY\n1\nWRONG_MODE\nEND\n", reply);
std::string reply_str(reply);
int lines_count = LinesCount(reply_str);
EXPECT_EQ(5, lines_count);
EXPECT_STREQ("COMMAND_1_RECEIVED" ,ReadLine(reply_str, 1).c_str());
EXPECT_STREQ("AUDIO_IDLE" ,ReadLine(reply_str, 3).c_str());
EXPECT_STREQ("ERROR_CODE:2" ,ReadLine(reply_str, 4).c_str());
EXPECT_STREQ("END" ,ReadLine(reply_str, 5).c_str());
}
// TCP_STOP
TEST_F (CommunicationFixture, StopPlayStopCommand) {
// Command:
// TCP_STOP\n
// END\n
comm::Communication communication(config_manager_m, logger_m);
char reply[1024] = {0};
communication.handleCommand("TCP_STOP\nEND\n", reply);
std::string reply_str(reply);
int lines_count = LinesCount(reply_str);
EXPECT_EQ(5, lines_count);
EXPECT_STREQ("COMMAND_2_RECEIVED" ,ReadLine(reply_str, 1).c_str());
EXPECT_STREQ("AUDIO_IDLE" ,ReadLine(reply_str, 3).c_str());
EXPECT_STREQ("ERROR_CODE:0" ,ReadLine(reply_str, 4).c_str());
EXPECT_STREQ("END" ,ReadLine(reply_str, 5).c_str());
communication.handleCommand("TCP_PLAY\n1\nONCE\nEND\n", reply);
reply_str = std::string(reply);
lines_count = LinesCount(reply_str);
EXPECT_EQ(5, lines_count);
EXPECT_STREQ("COMMAND_1_RECEIVED" ,ReadLine(reply_str, 1).c_str());
EXPECT_STREQ("AUDIO_PLAY_ONCE" ,ReadLine(reply_str, 3).c_str());
EXPECT_STREQ("ERROR_CODE:0" ,ReadLine(reply_str, 4).c_str());
EXPECT_STREQ("END" ,ReadLine(reply_str, 5).c_str());
communication.handleCommand("TCP_STOP\nEND\n", reply);
reply_str = std::string(reply);
lines_count = LinesCount(reply_str);
EXPECT_EQ(5, lines_count);
EXPECT_STREQ("COMMAND_2_RECEIVED" ,ReadLine(reply_str, 1).c_str());
EXPECT_STREQ("AUDIO_IDLE" ,ReadLine(reply_str, 3).c_str());
EXPECT_STREQ("ERROR_CODE:0" ,ReadLine(reply_str, 4).c_str());
EXPECT_STREQ("END" ,ReadLine(reply_str, 5).c_str());
}
//TCP_SET_TIME
TEST_F (CommunicationFixture, SetTimeCommand) {
// Command:
//TCP_SET_TIME\n
//GG:MM:SS_DD.MM.RRRR\n
//END\n
comm::Communication communication(config_manager_m, logger_m);
char reply[1024] = {0};
communication.handleCommand("TCP_SET_TIME\n12:12:12_01.01.1971\nEND\n", reply);
std::string reply_str(reply);
int lines_count = LinesCount(reply_str);
EXPECT_EQ(4, lines_count);
EXPECT_STREQ("COMMAND_0_RECEIVED" ,ReadLine(reply_str, 1).c_str());
EXPECT_STREQ("ERROR_CODE:0" ,ReadLine(reply_str, 3).c_str());
EXPECT_STREQ("END" ,ReadLine(reply_str, 4).c_str());
}
// TCP_SET_CFG
TEST_F (CommunicationFixture, SetCfgCommand) {
// Command:
// TCP_SET_CFG\n
// length_in_bytes\n
// charactes_of_configuration\n
// END\n
std::string config = "<?xml version=\"1.0\"?>\n"
"<audio_app_cfg>\n"
"\t<network>\n"
"\t\t<ip>127.0.0.1</ip>\n"
"\t\t<mask>255.255.255.0</mask>\n"
"\t\t<gateway>192.168.0.1</gateway>\n"
"\t\t<port>9999</port>\n"
"\t</network>\n"
"\t<sounds>\n"
"\t\t<sound>file1</sound>\n"
"\t\t<sound>file2</sound>\n"
"\t\t<sound>file3</sound>\n"
"\t\t<sound>file4</sound>\n"
"\t</sounds>\n"
"</audio_app_cfg>\n";
std::string msg_cmd = "TCP_SET_CFG\n";
std::ostringstream oss;
oss << config.length() << std::endl;
msg_cmd += oss.str();
msg_cmd += config;
msg_cmd += "END\n";
comm::Communication communication(config_manager_m, logger_m);
char reply[1024] = {0};
communication.handleCommand(msg_cmd.c_str(), reply);
std::string reply_str(reply);
int lines_count = LinesCount(reply_str);
EXPECT_EQ(4, lines_count);
EXPECT_STREQ("COMMAND_3_RECEIVED" ,ReadLine(reply_str, 1).c_str());
// Error code was not tested as on real system file can exists ath this will succes on others will fail writtung
EXPECT_STREQ("END" ,ReadLine(reply_str, 4).c_str());
}
// TCP_GET_CFG
TEST_F (CommunicationFixture, GetCfgCommand) {
// Command:
//TCP_GET_CFG\n
//END\n
comm::Communication communication(config_manager_m, logger_m);
char reply[1024] = {0};
communication.handleCommand("TCP_GET_CFG\nEND\n", reply);
std::string reply_str(reply);
int lines_count = LinesCount(reply_str);
EXPECT_EQ(6, lines_count);
EXPECT_STREQ("COMMAND_4_RECEIVED" ,ReadLine(reply_str, 1).c_str());
// Do not test following lines as it vary depending on sytem it runs tests
// 2nd line: Time
// 3rd line: size
// 4th line: config content
EXPECT_STREQ("END" ,ReadLine(reply_str, 6).c_str());
}
// TCP_SET_VOLUME
TEST_F (CommunicationFixture, SetVolumeCommand) {
// Command:
//TCP_SET_VOLUME\n
//20\n
//END\n
comm::Communication communication(config_manager_m, logger_m);
char reply[1024] = {0};
communication.handleCommand("TCP_SET_VOLUME\n20\nEND\n", reply);
std::string reply_str(reply);
int lines_count = LinesCount(reply_str);
EXPECT_EQ(5, lines_count);
EXPECT_STREQ("COMMAND_5_RECEIVED" ,ReadLine(reply_str, 1).c_str());
EXPECT_STREQ("AUDIO_IDLE" ,ReadLine(reply_str, 3).c_str());
EXPECT_STREQ("ERROR_CODE:0" ,ReadLine(reply_str, 4).c_str());
EXPECT_STREQ("END" ,ReadLine(reply_str, 5).c_str());
}
// TCP_RESET
TEST_F (CommunicationFixture, RebootCallback) {
// Command:
// TCP_RESET\n
// END\n
bool reboot_called = false;
comm::Communication communication(config_manager_m, logger_m, [&reboot_called]() { reboot_called = true; });
char command[1024] = "TCP_RESET\nEND\n";
char reply[1024] = {0};
communication.handleCommand(command, reply);
std::string reply_str(reply);
int lines_count = LinesCount(reply_str);
EXPECT_EQ(4, lines_count);
EXPECT_STREQ("COMMAND_6_RECEIVED" ,ReadLine(reply_str, 1).c_str());
EXPECT_STREQ("ERROR_CODE:0" ,ReadLine(reply_str, 3).c_str());
EXPECT_STREQ("END" ,ReadLine(reply_str, 4).c_str());
EXPECT_TRUE(reboot_called);
}
| 13,683 | 5,590 |
#include "iostream"
#include "stdlib.h"
#include "stdarg.h"
#include "sstream"
#include "QPMatrix.hpp"
QPMatrix::QPMatrix(): fElement(0), fM(0), fN(0){
// Init();
}
QPMatrix::QPMatrix(const int n): fElement(0), fM(n), fN(n){
Init();
}
QPMatrix::QPMatrix(const int m, const int n): fElement(0), fM(m), fN(n){
Init();
}
QPMatrix::QPMatrix(const int m, const int n, const int npassed, ...): fElement(0), fM(m), fN(n){
Init();
va_list vl;
va_start( vl, npassed );
for(int i=0; i<m*n && i<npassed; i++){
fElement[i] = va_arg(vl, double);
}
va_end(vl);
}
QPMatrix::QPMatrix(QPVector& vec, int ncomp): fElement(0), fM(ncomp), fN(1){
Init();
for(int i=0; i<ncomp && i<3; i++){
fElement[i] = vec(i);
}
}
QPMatrix::QPMatrix(const QPMatrix& other): fElement(0), fM(other.fM), fN(other.fN){
Init();
int fMN = fM*fN;
for(int i=0; i<fMN; i++){
fElement[i] = other.fElement[i];
}
}
QPMatrix& QPMatrix::operator=(const QPMatrix& other){
Freeing();
fM = other.fM;
fN = other.fN;
Init();
for(int i=0; i<fM*fN; i++){
fElement[i] = other.fElement[i];
// std::cout<<"COPIED\t"<<fElement[i]<<"\t"<<At(i)<<std::endl;
}
return *this;
}
QPMatrix::~QPMatrix(){
Freeing();
}
void QPMatrix::Init(){
fElement = (double*) std::malloc(fM*fN*sizeof(double));
for(int i=0; i<fN*fM; i++){
fElement[i] = 0.;
}
}
void QPMatrix::Freeing(){
// if(fElement == nullptr){
// return;
// }
std::free(fElement);
}
bool QPMatrix::IsInside(int i){
if(i >= 0 && i< fN*fM) return true;
return false;
}
bool QPMatrix::IsInside(int i, int j){
if (i>=0 && i<fM && j>=0 && j<fN){
return true;
}
return false;
}
double QPMatrix::At(int i){
if( !IsInside(i) ){
std::cout<<"QPMatrix::At(1) - Out if index"<<"["<<i<<"]"<<std::endl;
return -1;
}
return fElement[i];
}
double QPMatrix::At(int i, int j){
if( !IsInside(i,j) ){
std::cout<<"QPMatrix::At(2) - Out if index "<<"["<<i<<","<<j<<"]"<<std::endl;
return -1;
}
return fElement[i*fN+j];
}
bool QPMatrix::IsSameShape(QPMatrix & other){
if(fN == other.fN && fM == other.fM) return true;
return false;
}
bool QPMatrix::IsTransShape(QPMatrix & other){
if(fN == other.fM && fM == other.fN) return true;
return false;
}
double& QPMatrix::operator[](int i){
if( !IsInside(i) ){
std::cout<<"QPMatrix::operator[](1) - Out if index"<<"["<<i<<"]"<<std::endl;
return nval;
}
return fElement[i];
}
double& QPMatrix::operator()(int i){
if( !IsInside(i) ){
std::cout<<"QPMatrix::operator()(1) - Out if index"<<"["<<i<<"]"<<std::endl;
return nval;
}
return fElement[i];
}
double& QPMatrix::operator()(int i, int j){
if( !IsInside(i, j) ){
std::cout<<"QPMatrix::operator()(2) - Out if index"<<"["<<i<<"]"<<std::endl;
return nval;
}
return fElement[i*fM+j];
}
double QPMatrix::Det(){
if(fM != fN){
std::cout<<"QPMatrix::Det() - Determinant can be defined only for square matrix "<<"["<<fM<<","<<fN<<"]"<<std::endl;
return 0.;
}
if(fM==0) return 0.;
if(fM==1) return At(0);
if(fM==2){
return At(0,0)*At(1,1) - At(0,1)*At(1,0);
}
double ans = 0;
for(int i=0; i<fN; i++){
ans += pow(-1, i)*At(0,i)*SubMatrix(0, i).Det();
}
return ans;
}
double QPMatrix::Trace(){
double ans = 0;
int ii = fN>fM ? fM : fN;
for(int i=0; i<ii; i++){
ans += operator()(i,i);
}
return ans;
}
QPMatrix QPMatrix::SubMatrix(const int i_, const int j_){
QPMatrix ans = QPMatrix(fM-1, fN-1);
for(int i=0; i<fM-1; i++){
for(int j=0; j<fN-1; j++){
ans(i,j) = At(
i < i_ ? i : i+1,
j < j_ ? j : j+1
);
}
}
return ans;
}
double QPMatrix::Cofactor(const int i, const int j){
if(fM != fN){
std::cout<<"QPMatrix::Cofactor() - Cofactor can be defined only for square matrix "<<"["<<fM<<","<<fN<<"]"<<std::endl;
return 0;
}
return pow(-1, i+j) * (SubMatrix(i,j).Det());
}
QPMatrix QPMatrix::Inverse(){
if(fM != fN){
std::cout<<"QPMatrix::Inverse() - Inverse can be defined only for square matrix "<<"["<<fM<<","<<fN<<"]"<<std::endl;
return QPMatrix();
}
double det = Det();
if(det<0.0000000001 && det>-0.0000000001 ){
std::cout<<"QPMatrix::Inverse() - Determinant is near zero. No inverse matrix "<<"["<<det<<"]"<<std::endl;
return QPMatrix();
}
QPMatrix ans = QPMatrix(fM, fN);
for(int i=0; i<fM; i++){
for(int j=0; j<fN; j++){
ans(i,j) = Cofactor(j,i);
}
}
ans*=(1/Det());
return ans;
}
QPMatrix QPMatrix::Transpose(){
QPMatrix ans(fN, fM);
for(int i=0; i<fM; i++){
for(int j=0; j<fN; j++){
ans(j,i) = At(i,j);
}
}
return ans;
}
QPMatrix operator*(QPMatrix self, double other){
QPMatrix ans = QPMatrix(self);
for(int i=0; i<(self.fN*self.fM); i++){
ans(i) *= other;
}
return ans;
}
QPMatrix operator*(double other, QPMatrix self){
QPMatrix ans = QPMatrix(self);
for(int i=0; i<(self.fN*self.fM); i++){
ans(i) *= other;
}
return ans;
}
QPMatrix operator*(QPMatrix self, QPMatrix other){
if(self.fN != other.fM){
std::cout<<"QPMatrix::operator*()(3) - inner part of 2 matrices are not same : "<<self.fN<<", "<<other.fM<<std::endl;
return QPMatrix();
}
QPMatrix ans = QPMatrix(self.fM, other.fN);
for(int i=0; i<(ans.fM); i++){
for(int j=0; j<(ans.fN); j++){
for(int k=0; k<(self.fN); k++){
ans(i,j)+= self.At(i,k) * other.At(k,j);
}
}
}
return ans;
}
QPMatrix operator+(QPMatrix & self, QPMatrix & other){
if(! self.IsSameShape(other) ){
std::cout<<"operator+ (QPMatrix&, QPMatrix&) - Not same shape"<<std::endl;
return QPMatrix();
}
QPMatrix ans = QPMatrix(self.fM, self.fN);
int length = self.fN * self.fM;
for(int i=0; i<length; i++){
ans[i] = self[i] + other[i];
}
return ans;
}
QPMatrix operator-(QPMatrix & self, QPMatrix & other){
if(! self.IsSameShape(other) ){
std::cout<<"operator- (QPMatrix&, QPMatrix&) - Not same shape"<<std::endl;
return QPMatrix();
}
QPMatrix ans(self.fM, self.fN);
int length = self.fN * self.fM;
for(int i=0; i<length; i++){
ans[i] = self[i] - other[i];
}
return ans;
}
std::string QPMatrix::Print(bool quite){
std::ostringstream anss;
anss.precision(4);
for(int i=0; i<fM; i++){
for(int j=0; j<fN; j++){
anss << At(i,j) << "\t";
}
anss<<std::endl;
}
anss.unsetf(std::ios::fixed);
std::string ans = anss.str();
if(!quite){
std::cout<<ans;
}
return ans;
}
| 7,092 | 2,990 |
/*
* Copyright (C) 1994-2021 OpenTV, Inc. and Nagravision S.A.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "RSkTextLayoutManager.h"
using namespace skia::textlayout;
namespace facebook {
namespace react {
Point calculateFramePoint( Point origin , Size rect , float layoutWidth) {
/* Calculate the (x,y) cordinates of fragment attachments,based on the fragment width provided*/
if(origin.x + rect.width < layoutWidth)
origin.x += rect.width ;
else {
auto delta = layoutWidth - origin.x ;
origin.x = rect.width - delta ;
origin.y += rect.height;
}
return origin;
}
TextAlign convertTextAlign (TextAlignment alignment) {
switch(alignment) {
case TextAlignment::Natural :
case TextAlignment::Left : return TextAlign::kLeft;
case TextAlignment::Center : return TextAlign::kCenter;
case TextAlignment::Right : return TextAlign::kRight;
case TextAlignment::Justified : return TextAlign::kJustify;
}
return TextAlign::kLeft;
}
SkPaint convertTextColor ( SharedColor textColor ) {
SkPaint paint;
float ratio = 255.9999;
auto color = colorComponentsFromColor(textColor);
paint.setColor(SkColorSetARGB( color.alpha * ratio,
color.red * ratio,
color.green * ratio,
color.blue * ratio));
paint.setAntiAlias(true);
return paint;
}
RSkTextLayoutManager::RSkTextLayoutManager() {
/* Set default font collection */
collection_ = sk_make_sp<FontCollection>();
collection_->setDefaultFontManager(SkFontMgr::RefDefault());
}
TextMeasurement RSkTextLayoutManager::doMeasure (AttributedString attributedString,
ParagraphAttributes paragraphAttributes,
LayoutConstraints layoutConstraints) const {
TextMeasurement::Attachments attachments;
ParagraphStyle paraStyle;
Size size;
std::shared_ptr<ParagraphBuilder> builder = std::static_pointer_cast<ParagraphBuilder>(std::make_shared<ParagraphBuilderImpl>(paraStyle,collection_));
buildParagraph(attributedString, paragraphAttributes, false, builder);
auto paragraph = builder->Build();
paragraph->layout(layoutConstraints.maximumSize.width);
size.width = paragraph->getMaxIntrinsicWidth() < paragraph->getMaxWidth() ? paragraph->getMaxIntrinsicWidth() : paragraph->getMaxWidth();
size.height = paragraph->getHeight();
Point attachmentPoint = calculateFramePoint({0,0}, size, layoutConstraints.maximumSize.width);
for (auto const &fragment : attributedString.getFragments()) {
if (fragment.isAttachment()) {
Rect rect;
rect.size.width = fragment.parentShadowView.layoutMetrics.frame.size.width;
rect.size.height = fragment.parentShadowView.layoutMetrics.frame.size.height;
/* TODO : We will be unable to calculate exact (x,y) cordinates for the attachments*/
/* Reason : attachment fragment width is clamped width wrt layout width; */
/* so we do not know actual position at which the previous attachment cordinate ends*/
/* But we need to still calculate total container height here, from all attachments */
/* NOTE : height value calculated would be approximate,since we lack the knowledge of actual frag width here*/
attachmentPoint = calculateFramePoint(attachmentPoint, rect.size, layoutConstraints.maximumSize.width);
attachments.push_back(TextMeasurement::Attachment{rect, false});
}
}
/* Update the container height from all attachments */
if(!attachments.empty()) {
size.height = attachmentPoint.y + attachments[attachments.size()-1].frame.size.height;
}
return TextMeasurement{size, attachments};
}
uint32_t RSkTextLayoutManager::buildParagraph (AttributedString attributedString,
ParagraphAttributes paragraphAttributes,
bool fontDecorationRequired,
std::shared_ptr<ParagraphBuilder> builder) const {
uint32_t attachmentCount = 0;
std::unique_ptr<Paragraph> fPara;
TextStyle style;
ParagraphStyle paraStyle;
auto fontSize = TextAttributes::defaultTextAttributes().fontSize;
auto fontSizeMultiplier = TextAttributes::defaultTextAttributes().fontSizeMultiplier;
for(auto &fragment: attributedString.getFragments()) {
if(fragment.isAttachment()) {
attachmentCount++;
continue;
}
fontSize = !std::isnan(fragment.textAttributes.fontSize) ?
fragment.textAttributes.fontSize :
TextAttributes::defaultTextAttributes().fontSize;
fontSizeMultiplier = !std::isnan(fragment.textAttributes.fontSizeMultiplier) ?
fragment.textAttributes.fontSizeMultiplier :
TextAttributes::defaultTextAttributes().fontSizeMultiplier;
style.setFontSize(fontSize * fontSizeMultiplier);
style.setFontFamilies({SkString(fragment.textAttributes.fontFamily.c_str())});
/* Build paragraph considering text decoration attributes*/
/* Required during text paint */
if(fontDecorationRequired) {
style.setForegroundColor(convertTextColor(fragment.textAttributes.foregroundColor ?
fragment.textAttributes.foregroundColor :
TextAttributes::defaultTextAttributes().foregroundColor));
style.setBackgroundColor(convertTextColor(fragment.textAttributes.backgroundColor ?
fragment.textAttributes.backgroundColor :
TextAttributes::defaultTextAttributes().backgroundColor));
}
if(fragment.textAttributes.alignment.has_value())
paraStyle.setTextAlign(convertTextAlign(fragment.textAttributes.alignment.value()));
builder->setParagraphStyle(paraStyle);
builder->pushStyle(style);
builder->addText(fragment.string.c_str(),fragment.string.length());
}
return attachmentCount;
}
} // namespace react
} // namespace facebook
| 6,485 | 1,618 |
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ehpc/model/ListInvocationStatusResult.h>
#include <json/json.h>
using namespace AlibabaCloud::EHPC;
using namespace AlibabaCloud::EHPC::Model;
ListInvocationStatusResult::ListInvocationStatusResult() :
ServiceResult()
{}
ListInvocationStatusResult::ListInvocationStatusResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListInvocationStatusResult::~ListInvocationStatusResult()
{}
void ListInvocationStatusResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allInvokeInstancesNode = value["InvokeInstances"]["InvokeInstance"];
for (auto valueInvokeInstancesInvokeInstance : allInvokeInstancesNode)
{
InvokeInstance invokeInstancesObject;
if(!valueInvokeInstancesInvokeInstance["InstanceId"].isNull())
invokeInstancesObject.instanceId = valueInvokeInstancesInvokeInstance["InstanceId"].asString();
if(!valueInvokeInstancesInvokeInstance["InstanceInvokeStatus"].isNull())
invokeInstancesObject.instanceInvokeStatus = valueInvokeInstancesInvokeInstance["InstanceInvokeStatus"].asString();
invokeInstances_.push_back(invokeInstancesObject);
}
if(!value["CommandId"].isNull())
commandId_ = value["CommandId"].asString();
if(!value["InvokeStatus"].isNull())
invokeStatus_ = value["InvokeStatus"].asString();
}
std::string ListInvocationStatusResult::getInvokeStatus()const
{
return invokeStatus_;
}
std::string ListInvocationStatusResult::getCommandId()const
{
return commandId_;
}
std::vector<ListInvocationStatusResult::InvokeInstance> ListInvocationStatusResult::getInvokeInstances()const
{
return invokeInstances_;
}
| 2,344 | 675 |
// Copyright 2021 NVIDIA CORPORATION
// SPDX-License-Identifier: Apache-2.0
// Implementation functions for Julia Set compute shader.
#include "julia.hpp"
#include "nvh/container_utils.hpp"
#include "make_compute_pipeline.hpp"
// GLSL polyglot
#include "shaders/julia.h"
Julia::Julia(VkDevice device,
VkPhysicalDevice physicalDevice,
bool dumpPipelineStats,
uint32_t textureWidth,
uint32_t textureHeight)
: m_device(device)
, m_scopedImage(device, physicalDevice)
{
// Push constant defaults
update(0.0, 64);
// Set up color texture.
m_scopedImage.reallocImage(textureWidth, textureHeight);
// Set up compute pipeline.
uint32_t pcSize = uint32_t(sizeof(JuliaPushConstant));
VkPushConstantRange range = {VK_SHADER_STAGE_COMPUTE_BIT, 0, pcSize};
VkDescriptorSetLayout descriptorLayout =
m_scopedImage.getStorageDescriptorSetLayout();
makeComputePipeline(m_device, "julia.comp.spv", dumpPipelineStats,
1, &descriptorLayout, 1, &range,
&m_pipeline, &m_pipelineLayout);
}
Julia::~Julia()
{
// Destroy pipelines.
vkDestroyPipelineLayout(m_device, m_pipelineLayout, nullptr);
vkDestroyPipeline(m_device, m_pipeline, nullptr);
}
void Julia::resize(uint32_t x, uint32_t y)
{
m_scopedImage.reallocImage(x, y);
update(0.0, 0);
}
uint32_t Julia::getWidth() const
{
return m_scopedImage.getImageWidth();
}
uint32_t Julia::getHeight() const
{
return m_scopedImage.getImageHeight();
}
void Julia::update(double dt, int maxIterations)
{
m_alphaNormalized += uint32_t(dt * 0x0600'0000);
double alphaRadians = m_alphaNormalized * 1.4629180792671596e-09;
m_pushConstant.c_real = float(0.7885 * sin(alphaRadians));
m_pushConstant.c_imag = float(0.7885 * cos(alphaRadians));
float textureWidth = float(m_scopedImage.getImageWidth());
float textureHeight = float(m_scopedImage.getImageHeight());
m_pushConstant.offset_real = -2.0f;
m_pushConstant.scale = 4.0f / textureWidth;
m_pushConstant.offset_imag = 2.0f * textureHeight / textureWidth;
if (maxIterations > 0)
m_pushConstant.maxIterations = int32_t(maxIterations);
}
void Julia::cmdFillColorTexture(VkCommandBuffer cmdBuf)
{
// Transition color texture image to general layout, protect
// earlier reads.
VkImageMemoryBarrier imageBarrier = {
VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, nullptr,
VK_ACCESS_MEMORY_READ_BIT, VK_ACCESS_MEMORY_WRITE_BIT,
VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_GENERAL,
0, 0, m_scopedImage.getImage(),
{VK_IMAGE_ASPECT_COLOR_BIT, 0, VK_REMAINING_MIP_LEVELS, 0, 1} };
vkCmdPipelineBarrier(cmdBuf, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT,
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT,
0, 0, nullptr, 0, nullptr, 1, &imageBarrier);
// Bind pipeline, push constant, and descriptors.
vkCmdBindPipeline(cmdBuf, VK_PIPELINE_BIND_POINT_COMPUTE, m_pipeline);
VkDescriptorSet descriptorSet = m_scopedImage.getStorageDescriptorSet();
vkCmdPushConstants(cmdBuf, m_pipelineLayout, VK_SHADER_STAGE_COMPUTE_BIT,
0, sizeof(m_pushConstant), &m_pushConstant);
vkCmdBindDescriptorSets(cmdBuf, VK_PIPELINE_BIND_POINT_COMPUTE,
m_pipelineLayout, 0, 1, &descriptorSet,
0, nullptr);
// Fill the image.
vkCmdDispatch(cmdBuf, (m_scopedImage.getImageWidth() + 15) / 16,
(m_scopedImage.getImageHeight() + 15) / 16, 1);
// Pipeline barrier.
VkMemoryBarrier barrier = {
VK_STRUCTURE_TYPE_MEMORY_BARRIER, nullptr,
VK_ACCESS_MEMORY_WRITE_BIT, VK_ACCESS_MEMORY_READ_BIT };
vkCmdPipelineBarrier(cmdBuf, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT,
VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, 0, 1, &barrier,
0, nullptr, 0, nullptr);
}
| 3,943 | 1,523 |
#ifndef __WMMAE_MMA_F32_F32_DETAIL_INCLUDE_HPP__
#define __WMMAE_MMA_F32_F32_DETAIL_INCLUDE_HPP__
#include "../../wmma_extension.hpp"
#include "../../wmma_mma.hpp"
#endif
| 171 | 95 |
/****************************************************************************************************************************************************
* Copyright (c) 2015 Freescale Semiconductor, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* * Neither the name of the Freescale Semiconductor, Inc. nor the names of
* its contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER 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 <FslBase/Exceptions.hpp>
#include <FslBase/Log/Log.hpp>
#include <FslDemoApp/Base/Service/Content/IContentManager.hpp>
#include <FslDemoApp/Base/Service/Graphics/IGraphicsService.hpp>
#include <FslGraphics/Bitmap/Bitmap.hpp>
#include <FslGraphics/Vertices/VertexPositionTexture.hpp>
#include "GausianHelper.hpp"
#include "VBHelper.hpp"
#include "TwoPassLinearScaledBlurredDraw.hpp"
#include <FslGraphics/Exceptions.hpp>
#include <algorithm>
#include <cassert>
#include <iostream>
namespace Fsl
{
using namespace GLES2;
int UpdateScaledKernelLength(const int32_t kernelLength)
{
int32_t moddedKernelLength = std::max(kernelLength, 5);
int32_t newKernelLength = ((moddedKernelLength / 4) * 4) + 1;
return (newKernelLength < moddedKernelLength ? newKernelLength + 4 : newKernelLength);
}
int UpdateKernelLength(const int32_t kernelLength)
{
int32_t moddedKernelLength = UpdateScaledKernelLength(kernelLength / 2);
moddedKernelLength = (moddedKernelLength * 2) + 1;
return moddedKernelLength;
}
//! Uses the two pass linear technique and further reduces the bandwidth requirement by
//! downscaling the 'source image' to 1/4 its size (1/2w x 1/2h) before applying the blur and
//! and then upscaling the blurred image to provide the final image.
//! This works well for large kernel sizes and relatively high sigma's but the downscaling
//! produces visible artifacts with low sigma's
TwoPassLinearScaledBlurredDraw::TwoPassLinearScaledBlurredDraw(const DemoAppConfig& config, const Config& blurConfig)
: ABlurredDraw("Two pass linear scaled")
, m_batch2D(std::dynamic_pointer_cast<NativeBatch2D>(config.DemoServiceProvider.Get<IGraphicsService>()->GetNativeBatch2D()))
, m_screenResolution(config.ScreenResolution)
, m_framebufferOrg(Point2(m_screenResolution.X, m_screenResolution.Y), GLTextureParameters(GL_LINEAR, GL_LINEAR, GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE), GL_RGB565, GL_DEPTH_COMPONENT16)
, m_framebufferBlur1()
, m_framebufferBlur2()
, m_shaders()
{
if (!m_batch2D)
throw std::runtime_error("NativeBatch2D unavailable");
// Ensure that the kernel size is correct
int moddedKernelLength = UpdateKernelLength(blurConfig.KernelLength);
FSLLOG_WARNING_IF(moddedKernelLength != blurConfig.KernelLength, "The two pass linear scaled shader is not compatible with the supplied kernel length of " << blurConfig.KernelLength << " using " << moddedKernelLength);
// Simplistic scaling of the kernel so it handles the down-sampling of the image correctly
moddedKernelLength = UpdateScaledKernelLength(moddedKernelLength / 2);
float moddedSigma = blurConfig.Sigma / 2.0f;
FSLLOG("Scaled actual kernel length: " << moddedKernelLength << " which becomes a " << ((moddedKernelLength / 2)+1) << " linear kernel" );
// The downscaled framebuffer needs to contain 'half of the kernel width' extra pixels on the left to ensure that we can use
// them for the blur calc of the first pixel we are interested in
const int quadWidth = m_screenResolution.X / 4;
int blurFBWidth = quadWidth + (moddedKernelLength / 2);
blurFBWidth += ((blurFBWidth % 16) != 0 ? (16 - (blurFBWidth % 16)) : 0);
int addedPixels = blurFBWidth - quadWidth;
m_framebufferBlur1.Reset(Point2(blurFBWidth, m_screenResolution.Y / 2), GLTextureParameters(GL_LINEAR, GL_LINEAR, GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE), GL_RGB565);
m_framebufferBlur2.Reset(Point2(blurFBWidth, m_screenResolution.Y / 2), GLTextureParameters(GL_LINEAR, GL_LINEAR, GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE), GL_RGB565);
// Prepare the shaders
const std::shared_ptr<IContentManager> contentManager = config.DemoServiceProvider.Get<IContentManager>();
moddedSigma = blurConfig.UseOptimalSigma ? -1.0f : moddedSigma;
m_shaders.Reset(contentManager, moddedKernelLength, moddedSigma, m_framebufferBlur1.GetSize(), m_framebufferBlur2.GetSize(),
TwoPassShaders::Linear, blurConfig.TheShaderType);
const float xOrg = ((m_framebufferOrg.GetSize().X - ((m_framebufferOrg.GetSize().X / 2) + addedPixels * 2)) / float(m_framebufferOrg.GetSize().X));
const float xFinal = addedPixels / float(m_framebufferBlur2.GetSize().X);
VBHelper::BuildVB(m_vertexBufferLeft, BoxF(-1, -1, 0, 1), BoxF(0.0f, 0.0f, 0.5f, 1.0f));
VBHelper::BuildVB(m_vertexBufferRightX, BoxF(-1, -1, 1, 1), BoxF(xOrg, 0.0f, 1.0f, 1.0f));
VBHelper::BuildVB(m_vertexBufferRightX2, BoxF(-1, -1, 1, 1), BoxF(0.0f, 0.0f, 1.0f, 1.0f));
VBHelper::BuildVB(m_vertexBufferRightY, BoxF(0, -1, 1, 1), BoxF(xFinal, 0.0f, 1.0f, 1.0f));
}
void TwoPassLinearScaledBlurredDraw::Draw(AScene*const pScene)
{
assert(pScene != nullptr);
// Render the 'source' image that we want to partially blur
glBindFramebuffer(GL_FRAMEBUFFER, m_framebufferOrg.Get());
{
glViewport(0, 0, m_framebufferOrg.GetSize().X, m_framebufferOrg.GetSize().Y);
pScene->Draw();
}
// Since we are only doing opaque 2d-composition type operations we can disable blend and depth testing
glDisable(GL_BLEND);
glDisable(GL_DEPTH_TEST);
// Downscale the right side of the image to 1/4 of its size (1/2w x 1/2h)
glBindFramebuffer(GL_FRAMEBUFFER, m_framebufferBlur1.Get());
{
glViewport(0, 0, m_framebufferBlur1.GetSize().X, m_framebufferBlur1.GetSize().Y);
glClear(GL_COLOR_BUFFER_BIT);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, m_framebufferOrg.GetTextureInfo().Handle);
glUseProgram(m_shaders.ProgramNormal.Get());
glBindBuffer(m_vertexBufferRightX.GetTarget(), m_vertexBufferRightX.Get());
m_vertexBufferRightX.EnableAttribArrays();
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
}
// Blur the scaled image in X
glBindFramebuffer(GL_FRAMEBUFFER, m_framebufferBlur2.Get());
{
glViewport(0, 0, m_framebufferBlur2.GetSize().X, m_framebufferBlur2.GetSize().Y);
glClear(GL_COLOR_BUFFER_BIT);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, m_framebufferBlur1.GetTextureInfo().Handle);
glUseProgram(m_shaders.ProgramBlurX.Get());
glBindBuffer(m_vertexBufferRightX2.GetTarget(), m_vertexBufferRightX2.Get());
m_vertexBufferRightX2.EnableAttribArrays();
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
}
// Blur the scaled image in Y
glBindFramebuffer(GL_FRAMEBUFFER, m_framebufferBlur1.Get());
{
glViewport(0, 0, m_framebufferBlur1.GetSize().X, m_framebufferBlur1.GetSize().Y);
glClear(GL_COLOR_BUFFER_BIT);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, m_framebufferBlur2.GetTextureInfo().Handle);
glUseProgram(m_shaders.ProgramBlurY.Get());
glBindBuffer(m_vertexBufferRightX2.GetTarget(), m_vertexBufferRightX2.Get());
m_vertexBufferRightX2.EnableAttribArrays();
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
}
// Since we are only doing opaque non-overlapping 2d-composition type operations we can disable blend and depth testing
glBindFramebuffer(GL_FRAMEBUFFER, 0);
{
glViewport(0, 0, m_screenResolution.X, m_screenResolution.Y);
glClear(GL_COLOR_BUFFER_BIT);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, m_framebufferOrg.GetTextureInfo().Handle);
// Draw the left side using the normal shader
glUseProgram(m_shaders.ProgramNormal.Get());
glBindBuffer(m_vertexBufferLeft.GetTarget(), m_vertexBufferLeft.Get());
m_vertexBufferLeft.EnableAttribArrays();
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
// Draw the right side using a normal shader, scaling the blurred image back to normal size
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, m_framebufferBlur1.GetTextureInfo().Handle);
glUseProgram(m_shaders.ProgramNormal.Get());
glBindBuffer(m_vertexBufferRightY.GetTarget(), m_vertexBufferRightY.Get());
m_vertexBufferRightY.EnableAttribArrays();
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
}
}
}
| 9,953 | 3,501 |
/*=========================================================================
*
* Copyright NumFOCUS
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
// First include the header file to be tested:
#include "itkIndex.h"
#include <gtest/gtest.h>
#include <initializer_list>
#include <limits>
namespace
{
template <unsigned int VDimension>
void
Expect_Filled_returns_Index_with_specified_value_for_each_element()
{
using itk::IndexValueType;
using IndexType = itk::Index<VDimension>;
// Tests that all elements from IndexType::Filled(indexValue) get the specified value.
const auto Expect_Filled_with_value = [](const IndexValueType indexValue) {
for (const auto filledIndexValue : IndexType::Filled(indexValue))
{
EXPECT_EQ(filledIndexValue, indexValue);
}
};
// Test for indexValue 0, 1, 2, and its maximum.
for (IndexValueType indexValue = 0; indexValue <= 2; ++indexValue)
{
Expect_Filled_with_value(indexValue);
}
Expect_Filled_with_value(std::numeric_limits<IndexValueType>::max());
}
template <itk::IndexValueType VFillValue>
constexpr bool
Is_Filled_Index_correctly_filled()
{
for (const auto actualValue : itk::Index<>::Filled(VFillValue).m_InternalArray)
{
if (actualValue != VFillValue)
{
return false;
}
}
return true;
}
} // namespace
static_assert(Is_Filled_Index_correctly_filled<0>() && Is_Filled_Index_correctly_filled<1>() &&
Is_Filled_Index_correctly_filled<std::numeric_limits<itk::IndexValueType>::min()>() &&
Is_Filled_Index_correctly_filled<std::numeric_limits<itk::IndexValueType>::max()>(),
"itk::Index::Filled(value) should be correctly filled at compile-time");
// Tests that itk::Index::Filled(value) returns an itk::Index with the
// specified value for each element.
TEST(Index, FilledReturnsIndexWithSpecifiedValueForEachElement)
{
// Test for 1-D and 3-D.
Expect_Filled_returns_Index_with_specified_value_for_each_element<1>();
Expect_Filled_returns_Index_with_specified_value_for_each_element<3>();
}
TEST(Index, Make)
{
static_assert((decltype(itk::MakeIndex(1, 1))::Dimension == 2) && (decltype(itk::MakeIndex(1, 1, 1))::Dimension == 3),
"The dimension of the created itk::Size should equal the number of arguments");
EXPECT_EQ(itk::MakeIndex(0, 0), itk::Index<2>());
EXPECT_EQ(itk::MakeIndex(0, 0, 0), itk::Index<3>());
const auto itkIndex = itk::MakeIndex(1, 2, 3, 4);
const auto values = { 1, 2, 3, 4 };
EXPECT_TRUE(std::equal(itkIndex.begin(), itkIndex.end(), values.begin(), values.end()));
}
| 3,200 | 1,060 |
// consensus/server/src/consensusobject.cpp
//
// Copyright (c) 2011, 2012 Valentin Palade (vipalade @ gmail . com)
//
// This file is part of SolidFrame framework.
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.
//
#include <deque>
#include <queue>
#include <vector>
#include <algorithm>
#include "system/common.hpp"
#include "system/exception.hpp"
#ifdef HAS_CPP11
#include <unordered_map>
#include <unordered_set>
#else
#include <map>
#include <set>
#endif
#include "system/timespec.hpp"
#include "serialization/binary.hpp"
#include "frame/object.hpp"
#include "frame/manager.hpp"
#include "frame/message.hpp"
#include "frame/ipc/ipcservice.hpp"
#include "utility/stack.hpp"
#include "utility/queue.hpp"
#include "utility/timerqueue.hpp"
#include "consensus/consensusregistrar.hpp"
#include "consensus/consensusrequest.hpp"
#include "consensus/server/consensusobject.hpp"
#include "consensusmessages.hpp"
using namespace std;
namespace solid{
namespace consensus{
namespace server{
struct TimerValue{
TimerValue(
uint32 _idx = 0,
uint16 _uid = 0,
uint16 _val = 0
):index(_idx), uid(_uid), value(_val){}
uint32 index;
uint16 uid;
uint16 value;
};
typedef TimerQueue<TimerValue> TimerQueueT;
typedef DynamicPointer<consensus::WriteRequestMessage> WriteRequestMessagePointerT;
//========================================================
struct RequestStub{
enum{
InitState = 0,
WaitProposeState,
WaitProposeConfirmState,
WaitAcceptState,
WaitAcceptConfirmState,
AcceptWaitRequestState,
AcceptState,
AcceptPendingState,
AcceptRunState,
EraseState,
};
enum{
SignaledEvent = 1,
TimeoutEvent = 2,
};
enum{
HaveRequestFlag = 1,
HaveProposeFlag = 2,
HaveAcceptFlag = 4,
};
RequestStub(
):
evs(0), flags(0), proposeid(0xffffffff/2), acceptid(-1),
timerid(0), recvpropconf(0), recvpropdecl(0), st(InitState){}
RequestStub(
DynamicPointer<consensus::WriteRequestMessage> &_rmsgptr
):
msgptr(_rmsgptr), evs(0), flags(0), proposeid(-1), acceptid(-1), timerid(0),
recvpropconf(0), recvpropdecl(0), st(InitState){}
bool hasRequest()const{
return flags & HaveRequestFlag;
}
void reinit(){
evs = 0;
flags = 0;
st = InitState;
proposeid = -1;
acceptid = -1;
recvpropconf = 0;
}
void state(uint8 _st);
uint8 state()const{
return st;
}
bool isValidProposeState()const;
bool isValidProposeConfirmState()const;
bool isValidProposeDeclineState()const;
bool isValidAcceptState()const;
bool isValidFastAcceptState()const;
bool isValidAcceptConfirmState()const;
bool isValidAcceptDeclineState()const;
WriteRequestMessagePointerT msgptr;
uint16 evs;
uint16 flags;
uint32 proposeid;
uint32 acceptid;
uint16 timerid;
uint8 recvpropconf;//received accepts for propose
uint8 recvpropdecl;//received accepts for propose
private:
uint8 st;
};
void RequestStub::state(uint8 _st){
//checking the safetyness of state change
switch(_st){
//case WaitProposeState:
//case WaitProposeConfirmState:
//case WaitAcceptConfirmState:
//case AcceptWaitRequestState:
case AcceptState:
if(
st == InitState ||
st == WaitProposeState ||
st == WaitAcceptConfirmState ||
st == WaitAcceptState ||
st == AcceptPendingState
){
break;
}else{
THROW_EXCEPTION_EX("Invalid state for request ", (int)st);
break;
}
//case AcceptPendingState:
//case EraseState:
default:
break;
}
st = _st;
}
inline bool RequestStub::isValidProposeState()const{
switch(st){
case InitState:
case WaitProposeState:
case WaitProposeConfirmState:
case WaitAcceptConfirmState:
case WaitAcceptState:
return true;
default:
return false;
}
}
inline bool RequestStub::isValidProposeConfirmState()const{
switch(st){
case InitState:
case WaitProposeState:
return false;
case WaitProposeConfirmState:
return true;
case WaitAcceptConfirmState:
case WaitAcceptState:
default:
return false;
}
}
inline bool RequestStub::isValidProposeDeclineState()const{
return isValidProposeConfirmState();
}
inline bool RequestStub::isValidAcceptState()const{
switch(st){
case WaitAcceptState:
return true;
case AcceptWaitRequestState:
case AcceptState:
case AcceptPendingState:
default:
return false;
}
}
inline bool RequestStub::isValidFastAcceptState()const{
switch(st){
case InitState:
case WaitProposeState:
case WaitProposeConfirmState:
return true;
case WaitAcceptConfirmState:
case WaitAcceptState:
default:
return false;
}
}
inline bool RequestStub::isValidAcceptConfirmState()const{
switch(st){
case InitState:
case WaitProposeState:
case WaitProposeConfirmState:
return false;
case WaitAcceptConfirmState:
return true;
case WaitAcceptState:
default:
return false;
}
}
inline bool RequestStub::isValidAcceptDeclineState()const{
return isValidAcceptConfirmState();
}
typedef std::deque<RequestStub> RequestStubVectorT;
typedef DynamicPointer<Configuration> ConfigurationPointerT;
struct Object::Data{
enum{
ProposeOperation = 1,
ProposeConfirmOperation,
ProposeDeclineOperation,
AcceptOperation,
FastAcceptOperation,
AcceptConfirmOperation,
AcceptDeclineOperation,
};
struct ReqCmpEqual{
bool operator()(const consensus::RequestId* const & _req1, const consensus::RequestId* const & _req2)const;
};
struct ReqCmpLess{
bool operator()(const consensus::RequestId* const & _req1, const consensus::RequestId* const & _req2)const;
};
struct ReqHash{
size_t operator()(const consensus::RequestId* const & _req1)const;
};
struct SenderCmpEqual{
bool operator()(const consensus::RequestId & _req1, const consensus::RequestId& _req2)const;
};
struct SenderCmpLess{
bool operator()(const consensus::RequestId& _req1, const consensus::RequestId& _req2)const;
};
struct SenderHash{
size_t operator()(const consensus::RequestId& _req1)const;
};
#ifdef HAS_CPP11
typedef std::unordered_map<const consensus::RequestId*, size_t, ReqHash, ReqCmpEqual> RequestStubMapT;
typedef std::unordered_set<consensus::RequestId, SenderHash, SenderCmpEqual> SenderSetT;
#else
typedef std::map<const consensus::RequestId*, size_t, ReqCmpLess> RequestStubMapT;
typedef std::set<consensus::RequestId, SenderCmpLess> SenderSetT;
#endif
typedef Stack<size_t> SizeTStackT;
typedef Queue<size_t> SizeTQueueT;
typedef std::vector<DynamicPointer<> > DynamicPointerVectorT;
//methods:
Data(DynamicPointer<Configuration> &_rcfgptr);
~Data();
bool insertRequestStub(DynamicPointer<WriteRequestMessage> &_rmsgptr, size_t &_ridx);
void eraseRequestStub(const size_t _idx);
RequestStub& requestStub(const size_t _idx);
RequestStub& safeRequestStub(const consensus::RequestId &_reqid, size_t &_rreqidx);
RequestStub* requestStubPointer(const consensus::RequestId &_reqid, size_t &_rreqidx);
const RequestStub& requestStub(const size_t _idx)const;
bool checkAlreadyReceived(DynamicPointer<WriteRequestMessage> &_rmsgptr);
bool isCoordinator()const;
bool canSendFastAccept()const;
void coordinatorId(int8 _coordid);
//data:
ConfigurationPointerT cfgptr;
DynamicPointerVectorT dv;
uint32 proposeid;
frame::IndexT srvidx;
uint32 acceptid;
uint32 proposedacceptid;
uint32 confirmedacceptid;
uint32 continuousacceptedproposes;
size_t pendingacceptwaitidx;
int8 coordinatorid;
int8 distancefromcoordinator;
uint8 acceptpendingcnt;//the number of stubs in waitrequest state
bool isnotjuststarted;
TimeSpec lastaccepttime;
RequestStubMapT reqmap;
RequestStubVectorT reqvec;
SizeTQueueT reqq;
SizeTStackT freeposstk;
SenderSetT senderset;
TimerQueueT timerq;
int state;
};
inline bool Object::Data::ReqCmpEqual::operator()(
const consensus::RequestId* const & _req1,
const consensus::RequestId* const & _req2
)const{
return *_req1 == *_req2;
}
inline bool Object::Data::ReqCmpLess::operator()(
const consensus::RequestId* const & _req1,
const consensus::RequestId* const & _req2
)const{
return *_req1 < *_req2;
}
inline size_t Object::Data::ReqHash::operator()(
const consensus::RequestId* const & _req1
)const{
return _req1->hash();
}
inline bool Object::Data::SenderCmpEqual::operator()(
const consensus::RequestId & _req1,
const consensus::RequestId& _req2
)const{
return _req1.senderEqual(_req2);
}
inline bool Object::Data::SenderCmpLess::operator()(
const consensus::RequestId& _req1,
const consensus::RequestId& _req2
)const{
return _req1.senderLess(_req2);
}
inline size_t Object::Data::SenderHash::operator()(
const consensus::RequestId& _req1
)const{
return _req1.senderHash();
}
/*
NOTE:
the 0 value for proposeid is only valid for the beginning of the algorithm.
A replica should only accept a proposeid==0 if its proposeid is 0.
On overflow, the proposeid should skip the 0 value.
*/
Object::Data::Data(DynamicPointer<Configuration> &_rcfgptr):
cfgptr(_rcfgptr),
proposeid(0), srvidx(INVALID_INDEX), acceptid(0), proposedacceptid(0), confirmedacceptid(0),
continuousacceptedproposes(0), pendingacceptwaitidx(-1),
coordinatorid(-2), distancefromcoordinator(-1), acceptpendingcnt(0), isnotjuststarted(false)
{
if(cfgptr->crtidx){
coordinatorId(0);
}else{
coordinatorId(-1);
}
}
Object::Data::~Data(){
}
void Object::Data::coordinatorId(int8 _coordid){
coordinatorid = _coordid;
if(_coordid != (int8)-1){
int8 maxsz(cfgptr->addrvec.size());
distancefromcoordinator = circular_distance(static_cast<int8>(cfgptr->crtidx), coordinatorid, maxsz);
idbg("non-coordinator with distance from coordinator: "<<(int)distancefromcoordinator);
}else{
distancefromcoordinator = -1;
idbg("coordinator");
}
}
bool Object::Data::insertRequestStub(DynamicPointer<WriteRequestMessage> &_rmsgptr, size_t &_ridx){
RequestStubMapT::iterator it(reqmap.find(&_rmsgptr->consensusRequestId()));
if(it != reqmap.end()){
_ridx = it->second;
reqmap.erase(it);
RequestStub &rreq(requestStub(_ridx));
if(rreq.flags & RequestStub::HaveRequestFlag){
edbg("conflict "<<_rmsgptr->consensusRequestId()<<" against existing "<<rreq.msgptr->consensusRequestId()<<" idx = "<<_ridx);
}
cassert(!(rreq.flags & RequestStub::HaveRequestFlag));
rreq.msgptr = _rmsgptr;
reqmap[&rreq.msgptr->consensusRequestId()] = _ridx;
return false;
}
if(freeposstk.size()){
_ridx = freeposstk.top();
freeposstk.pop();
RequestStub &rreq(requestStub(_ridx));
rreq.reinit();
rreq.msgptr = _rmsgptr;
}else{
_ridx = reqvec.size();
reqvec.push_back(RequestStub(_rmsgptr));
}
reqmap[&requestStub(_ridx).msgptr->consensusRequestId()] = _ridx;
return true;
}
void Object::Data::eraseRequestStub(const size_t _idx){
RequestStub &rreq(requestStub(_idx));
//cassert(rreq.sig.get());
if(rreq.msgptr.get()){
reqmap.erase(&rreq.msgptr->consensusRequestId());
}
rreq.msgptr.clear();
rreq.state(RequestStub::InitState);
++rreq.timerid;
freeposstk.push(_idx);
}
inline RequestStub& Object::Data::requestStub(const size_t _idx){
cassert(_idx < reqvec.size());
return reqvec[_idx];
}
inline const RequestStub& Object::Data::requestStub(const size_t _idx)const{
cassert(_idx < reqvec.size());
return reqvec[_idx];
}
inline bool Object::Data::isCoordinator()const{
return coordinatorid == -1;
}
bool Object::Data::checkAlreadyReceived(DynamicPointer<WriteRequestMessage> &_rmsgptr){
SenderSetT::iterator it(senderset.find(_rmsgptr->consensusRequestId()));
if(it != senderset.end()){
if(overflow_safe_less(_rmsgptr->consensusRequestId().requid, it->requid)){
return true;
}
senderset.erase(it);
senderset.insert(_rmsgptr->consensusRequestId());
}else{
senderset.insert(_rmsgptr->consensusRequestId());
}
return false;
}
bool Object::Data::canSendFastAccept()const{
TimeSpec ct(frame::Object::currentTime());
ct -= lastaccepttime;
idbg("continuousacceptedproposes = "<<continuousacceptedproposes<<" ct.sec = "<<ct.seconds());
return (continuousacceptedproposes >= 5) && ct.seconds() < 60;
}
struct DummyWriteRequestMessage: public WriteRequestMessage{
DummyWriteRequestMessage(const consensus::RequestId &_reqid):WriteRequestMessage(_reqid){}
/*virtual*/ void consensusNotifyServerWithThis(){}
/*virtual*/ void consensusNotifyClientWithThis(){}
/*virtual*/ void consensusNotifyClientWithFail(){}
};
RequestStub& Object::Data::safeRequestStub(const consensus::RequestId &_reqid, size_t &_rreqidx){
RequestStubMapT::const_iterator it(reqmap.find(&_reqid));
if(it != reqmap.end()){
_rreqidx = it->second;
}else{
DynamicPointer<WriteRequestMessage> reqsig(new DummyWriteRequestMessage(_reqid));
insertRequestStub(reqsig, _rreqidx);
}
return requestStub(_rreqidx);
}
RequestStub* Object::Data::requestStubPointer(const consensus::RequestId &_reqid, size_t &_rreqidx){
RequestStubMapT::const_iterator it(reqmap.find(&_reqid));
if(it != reqmap.end()){
_rreqidx = it->second;
return &requestStub(it->second);
}else{
return NULL;
}
}
//========================================================
//Runntime data
struct Object::RunData{
enum{
OperationCapacity = 32
};
struct OperationStub{
size_t reqidx;
uint8 operation;
uint32 proposeid;
uint32 acceptid;
};
RunData(
ulong _sig,
TimeSpec const &_rts,
int8 _coordinatorid
):signals(_sig), rtimepos(_rts), coordinatorid(_coordinatorid), opcnt(0), crtacceptincrement(1){}
bool isOperationsTableFull()const{
return opcnt == OperationCapacity;
}
bool isCoordinator()const{
return coordinatorid == -1;
}
ulong signals;
TimeSpec const &rtimepos;
int8 coordinatorid;
size_t opcnt;
size_t crtacceptincrement;
OperationStub ops[OperationCapacity];
};
//========================================================
Object::DynamicMapperT Object::dm;
/*static*/ void Object::dynamicRegister(){
dm.insert<WriteRequestMessage, Object>();
dm.insert<ReadRequestMessage, Object>();
dm.insert<OperationMessage<1>, Object>();
dm.insert<OperationMessage<2>, Object>();
dm.insert<OperationMessage<4>, Object>();
dm.insert<OperationMessage<8>, Object>();
dm.insert<OperationMessage<16>, Object>();
dm.insert<OperationMessage<32>, Object>();
//TODO: add here the other consensus Messages
}
/*static*/ void Object::registerMessages(frame::ipc::Service &_ripcsvc){
_ripcsvc.registerMessageType<OperationMessage<1> >();
_ripcsvc.registerMessageType<OperationMessage<2> >();
_ripcsvc.registerMessageType<OperationMessage<4> >();
_ripcsvc.registerMessageType<OperationMessage<8> >();
_ripcsvc.registerMessageType<OperationMessage<16> >();
_ripcsvc.registerMessageType<OperationMessage<32> >();
}
Object::Object(DynamicPointer<Configuration> &_rcfgptr):d(*(new Data(_rcfgptr))){
idbg((void*)this);
}
//---------------------------------------------------------
Object::~Object(){
Registrar::the().unregisterObject(d.srvidx);
delete &d;
idbg((void*)this);
}
//---------------------------------------------------------
void Object::state(int _st){
d.state = _st;
}
//---------------------------------------------------------
int Object::state()const{
return d.state;
}
//---------------------------------------------------------
void Object::serverIndex(const frame::IndexT &_ridx){
d.srvidx = _ridx;
}
//---------------------------------------------------------
frame::IndexT Object::serverIndex()const{
return d.srvidx;
}
//---------------------------------------------------------
bool Object::isRecoveryState()const{
return state() >= PrepareRecoveryState && state() <= LastRecoveryState;
}
//---------------------------------------------------------
void Object::dynamicHandle(DynamicPointer<> &_dp, RunData &_rrd){
}
//---------------------------------------------------------
void Object::dynamicHandle(DynamicPointer<WriteRequestMessage> &_rmsgptr, RunData &_rrd){
if(d.checkAlreadyReceived(_rmsgptr)) return;
size_t idx;
bool alreadyexisted(!d.insertRequestStub(_rmsgptr, idx));
RequestStub &rreq(d.requestStub(idx));
idbg("adding new request "<<rreq.msgptr->consensusRequestId()<<" on idx = "<<idx<<" existing = "<<alreadyexisted);
rreq.flags |= RequestStub::HaveRequestFlag;
if(!(rreq.evs & RequestStub::SignaledEvent)){
rreq.evs |= RequestStub::SignaledEvent;
d.reqq.push(idx);
}
}
void Object::dynamicHandle(DynamicPointer<ReadRequestMessage> &_rmsgptr, RunData &_rrd){
}
void Object::dynamicHandle(DynamicPointer<OperationMessage<1> > &_rmsgptr, RunData &_rrd){
idbg("opcount = 1");
doExecuteOperation(_rrd, _rmsgptr->replicaidx, _rmsgptr->op);
}
void Object::dynamicHandle(DynamicPointer<OperationMessage<2> > &_rmsgptr, RunData &_rrd){
idbg("opcount = 2");
doExecuteOperation(_rrd, _rmsgptr->replicaidx, _rmsgptr->op[0]);
doExecuteOperation(_rrd, _rmsgptr->replicaidx, _rmsgptr->op[1]);
}
void Object::dynamicHandle(DynamicPointer<OperationMessage<4> > &_rmsgptr, RunData &_rrd){
idbg("opcount = "<<_rmsgptr->opsz);
for(size_t i(0); i < _rmsgptr->opsz; ++i){
doExecuteOperation(_rrd, _rmsgptr->replicaidx, _rmsgptr->op[i]);
}
}
void Object::dynamicHandle(DynamicPointer<OperationMessage<8> > &_rmsgptr, RunData &_rrd){
idbg("opcount = "<<_rmsgptr->opsz);
for(size_t i(0); i < _rmsgptr->opsz; ++i){
doExecuteOperation(_rrd, _rmsgptr->replicaidx, _rmsgptr->op[i]);
}
}
void Object::dynamicHandle(DynamicPointer<OperationMessage<16> > &_rmsgptr, RunData &_rrd){
idbg("opcount = "<<_rmsgptr->opsz);
for(size_t i(0); i < _rmsgptr->opsz; ++i){
doExecuteOperation(_rrd, _rmsgptr->replicaidx, _rmsgptr->op[i]);
}
}
void Object::dynamicHandle(DynamicPointer<OperationMessage<32> > &_rmsgptr, RunData &_rrd){
idbg("opcount = "<<_rmsgptr->opsz);
for(size_t i(0); i < _rmsgptr->opsz; ++i){
doExecuteOperation(_rrd, _rmsgptr->replicaidx, _rmsgptr->op[i]);
}
}
void Object::doExecuteOperation(RunData &_rd, const uint8 _replicaidx, OperationStub &_rop){
switch(_rop.operation){
case Data::ProposeOperation:
doExecuteProposeOperation(_rd, _replicaidx, _rop);
break;
case Data::ProposeConfirmOperation:
doExecuteProposeConfirmOperation(_rd, _replicaidx, _rop);
break;
case Data::ProposeDeclineOperation:
doExecuteProposeDeclineOperation(_rd, _replicaidx, _rop);
break;
case Data::AcceptOperation:
doExecuteAcceptOperation(_rd, _replicaidx, _rop);
break;
case Data::FastAcceptOperation:
doExecuteFastAcceptOperation(_rd, _replicaidx, _rop);
break;
case Data::AcceptConfirmOperation:
doExecuteAcceptConfirmOperation(_rd, _replicaidx, _rop);
break;
case Data::AcceptDeclineOperation:
doExecuteAcceptDeclineOperation(_rd, _replicaidx, _rop);
break;
default:
THROW_EXCEPTION_EX("Unknown operation ", (int)_rop.operation);
}
}
//on replica
void Object::doExecuteProposeOperation(RunData &_rd, const uint8 _replicaidx, OperationStub &_rop){
idbg("op = ("<<(int)_rop.operation<<' '<<_rop.proposeid<<' '<<'('<<_rop.reqid<<')'<<" crtproposeid = "<<d.proposeid);
if(!_rop.proposeid && d.proposeid/* && !isRecoveryState()*/){
idbg("");
doSendDeclinePropose(_rd, _replicaidx, _rop);
return;
}
if(overflow_safe_less(_rop.proposeid, d.proposeid)/* && !isRecoveryState()*/){
idbg("");
//we cannot accept the propose
doSendDeclinePropose(_rd, _replicaidx, _rop);
return;
}
size_t reqidx;
//we can accept the propose
d.proposeid = _rop.proposeid;
d.isnotjuststarted = true;
RequestStub &rreq(d.safeRequestStub(_rop.reqid, reqidx));
if(!rreq.isValidProposeState() && !isRecoveryState()){
wdbg("Invalid state "<<rreq.state()<<" for reqidx "<<reqidx);
return;
}
rreq.proposeid = d.proposeid;
rreq.flags |= RequestStub::HaveProposeFlag;
if(!(rreq.flags & RequestStub::HaveAcceptFlag)){
++d.proposedacceptid;
rreq.acceptid = d.proposedacceptid;
}
rreq.state(RequestStub::WaitAcceptState);
++rreq.timerid;
TimeSpec ts(frame::Object::currentTime());
ts += 10 * 1000;//ms
d.timerq.push(ts, TimerValue(reqidx, rreq.timerid));
doSendConfirmPropose(_rd, _replicaidx, reqidx);
}
//on coordinator
void Object::doExecuteProposeConfirmOperation(RunData &_rd, const uint8 _replicaidx, OperationStub &_rop){
idbg("op = ("<<(int)_rop.operation<<' '<<_rop.proposeid<<' '<<'('<<_rop.reqid<<')');
if(isRecoveryState()){
idbg("Recovery state!!!");
return;
}
size_t reqidx;
RequestStub *preq(d.requestStubPointer(_rop.reqid, reqidx));
if(!preq){
idbg("no such request");
return;
}
if(preq->proposeid != _rop.proposeid){
idbg("req->proposeid("<<preq->proposeid<<") != _rop.proposeid("<<_rop.proposeid<<")");
return;
}
if(!preq->isValidProposeConfirmState()){
wdbg("Invalid state "<<(int)preq->state()<<" for reqidx "<<reqidx);
return;
}
cassert(preq->flags & RequestStub::HaveAcceptFlag);
cassert(preq->flags & RequestStub::HaveProposeFlag);
const uint32 tmpaccid = overflow_safe_max(preq->acceptid, _rop.acceptid);
// if(_rop.acceptid != tmpaccid){
// idbg("ignore a propose confirm operation from an outdated replica "<<tmpaccid<<" > "<<_rop.acceptid);
// return;
// }
preq->acceptid = tmpaccid;
++preq->recvpropconf;
if(preq->recvpropconf == d.cfgptr->quorum){
++d.continuousacceptedproposes;
preq->state(RequestStub::WaitAcceptConfirmState);
TimeSpec ts(frame::Object::currentTime());
ts += 60 * 1000;//ms
++preq->timerid;
d.timerq.push(ts, TimerValue(reqidx, preq->timerid));
doSendAccept(_rd, reqidx);
}
}
//on coordinator
void Object::doExecuteProposeDeclineOperation(RunData &_rd, const uint8 _replicaidx, OperationStub &_rop){
idbg("op = ("<<(int)_rop.operation<<' '<<_rop.proposeid<<' '<<'('<<_rop.reqid<<')');
if(isRecoveryState()){
idbg("Recovery state!!!");
return;
}
size_t reqidx;
RequestStub *preq(d.requestStubPointer(_rop.reqid, reqidx));
if(!preq){
idbg("no such request");
return;
}
if(!preq->isValidProposeDeclineState()){
wdbg("Invalid state "<<(int)preq->state()<<" for reqidx "<<reqidx);
return;
}
if(
preq->proposeid == 0 &&
preq->proposeid != _rop.proposeid &&
d.acceptid != _rop.acceptid
){
idbg("req->proposeid("<<preq->proposeid<<") != _rop.proposeid("<<_rop.proposeid<<")");
doEnterRecoveryState();
return;
}
++preq->recvpropdecl;
if(preq->recvpropdecl == d.cfgptr->quorum){
++preq->timerid;
preq->state(RequestStub::InitState);
d.continuousacceptedproposes = 0;
if(!(preq->evs & RequestStub::SignaledEvent)){
preq->evs |= RequestStub::SignaledEvent;
d.reqq.push(reqidx);
}
}
return;
}
//on replica
void Object::doExecuteAcceptOperation(RunData &_rd, const uint8 _replicaidx, OperationStub &_rop){
idbg("op = ("<<(int)_rop.operation<<' '<<_rop.proposeid<<' '<<'('<<_rop.reqid<<')');
size_t reqidx;
RequestStub *preq(d.requestStubPointer(_rop.reqid, reqidx));
if(!preq){
idbg("no such request");
if(!isRecoveryState()){
doSendDeclineAccept(_rd, _replicaidx, _rop);
}
return;
}
if(preq->proposeid != _rop.proposeid && !isRecoveryState()){
idbg("req->proposeid("<<preq->proposeid<<") != _rop.proposeid("<<_rop.proposeid<<")");
doSendDeclineAccept(_rd, _replicaidx, _rop);
return;
}
if(!preq->isValidAcceptState() && !isRecoveryState()){
wdbg("Invalid state "<<(int)preq->state()<<" for reqidx "<<reqidx);
return;
}
preq->acceptid = _rop.acceptid;
preq->flags |= RequestStub::HaveAcceptFlag;
preq->state(RequestStub::AcceptState);
if(!(preq->evs & RequestStub::SignaledEvent)){
preq->evs |= RequestStub::SignaledEvent;
d.reqq.push(reqidx);
}
doSendConfirmAccept(_rd, _replicaidx, reqidx);
}
//on replica
void Object::doExecuteFastAcceptOperation(RunData &_rd, const uint8 _replicaidx, OperationStub &_rop){
idbg("op = ("<<(int)_rop.operation<<' '<<_rop.proposeid<<' '<<'('<<_rop.reqid<<')');
if(!isRecoveryState() && !overflow_safe_less(d.proposeid, _rop.proposeid)){
//we cannot accept the propose
doSendDeclineAccept(_rd, _replicaidx, _rop);
return;
}
size_t reqidx;
//we can accept the propose
d.proposeid = _rop.proposeid;
RequestStub &rreq(d.safeRequestStub(_rop.reqid, reqidx));
if(!rreq.isValidFastAcceptState() && !isRecoveryState()){
wdbg("Invalid state "<<(int)rreq.state()<<" for reqidx "<<reqidx);
return;
}
rreq.proposeid = _rop.proposeid;
rreq.acceptid = _rop.acceptid;
d.proposedacceptid = overflow_safe_max(d.proposedacceptid, _rop.acceptid);
rreq.flags |= (RequestStub::HaveProposeFlag | RequestStub::HaveAcceptFlag);
rreq.state(RequestStub::AcceptState);
if(!(rreq.evs & RequestStub::SignaledEvent)){
rreq.evs |= RequestStub::SignaledEvent;
d.reqq.push(reqidx);
}
doSendConfirmAccept(_rd, _replicaidx, reqidx);
}
//on coordinator
void Object::doExecuteAcceptConfirmOperation(RunData &_rd, const uint8 _replicaidx, OperationStub &_rop){
idbg("op = ("<<(int)_rop.operation<<' '<<_rop.proposeid<<' '<<'('<<_rop.reqid<<')');
if(isRecoveryState()){
idbg("Recovery state!!!");
return;
}
size_t reqidx;
RequestStub *preq(d.requestStubPointer(_rop.reqid, reqidx));
if(!preq){
idbg("no such request");
return;
}
if(preq->proposeid != _rop.proposeid || preq->acceptid != _rop.acceptid){
idbg("req->proposeid("<<preq->proposeid<<") != _rop.proposeid("<<_rop.proposeid<<")");
return;
}
if(preq->acceptid != _rop.acceptid){
idbg("req->acceptid("<<preq->acceptid<<") != _rop.acceptid("<<_rop.acceptid<<")");
return;
}
if(!preq->isValidAcceptConfirmState()){
wdbg("Invalid state "<<(int)preq->state()<<" for reqidx "<<reqidx);
return;
}
preq->state(RequestStub::AcceptState);
if(!(preq->evs & RequestStub::SignaledEvent)){
preq->evs |= RequestStub::SignaledEvent;
d.reqq.push(reqidx);
}
}
//on coordinator
void Object::doExecuteAcceptDeclineOperation(RunData &_rd, const uint8 _replicaidx, OperationStub &_rop){
idbg("op = ("<<(int)_rop.operation<<' '<<_rop.proposeid<<' '<<'('<<_rop.reqid<<')');
if(isRecoveryState()){
idbg("Recovery state!!!");
return;
}
size_t reqidx;
RequestStub *preq(d.requestStubPointer(_rop.reqid, reqidx));
if(!preq){
idbg("no such request");
return;
}
if(preq->proposeid != _rop.proposeid || preq->acceptid != _rop.acceptid){
idbg("req->proposeid("<<preq->proposeid<<") != _rop.proposeid("<<_rop.proposeid<<")");
return;
}
if(preq->acceptid != _rop.acceptid){
idbg("req->acceptid("<<preq->acceptid<<") != _rop.acceptid("<<_rop.acceptid<<")");
return;
}
if(!preq->isValidAcceptConfirmState()){
wdbg("Invalid state "<<preq->state()<<" for reqidx "<<reqidx);
return;
}
//do nothing for now
return;
}
//---------------------------------------------------------
/*virtual*/ bool Object::notify(DynamicPointer<frame::Message> &_rmsgptr){
if(this->state() < 0){
_rmsgptr.clear();
return false;//no reason to raise the pool thread!!
}
DynamicPointer<> dp(_rmsgptr);
d.dv.push_back(dp);
return frame::Object::notify(frame::S_SIG | frame::S_RAISE);
}
//---------------------------------------------------------
/*virtual*/ void Object::init(){
}
//---------------------------------------------------------
/*virtual*/ void Object::prepareRun(){
}
//---------------------------------------------------------
/*virtual*/ void Object::prepareRecovery(){
}
//---------------------------------------------------------
/*virtual*/ void Object::execute(ExecuteContext &_rexectx){
frame::Manager &rm(frame::Manager::specific());
RunData rd(_rexectx.eventMask(), _rexectx.currentTime(), d.coordinatorid);
if(notified()){//we've received a signal
ulong sm(0);
DynamicHandler<DynamicMapperT> dh(dm);
if(state() != InitState && state() != PrepareRunState && state() != PrepareRecoveryState){
Locker<Mutex> lock(rm.mutex(*this));
sm = grabSignalMask(0);//grab all bits of the signal mask
if(sm & frame::S_KILL){
_rexectx.close();
return;
}
if(sm & frame::S_SIG){//we have signals
dh.init(d.dv.begin(), d.dv.end());
d.dv.clear();
}
}
if(sm & frame::S_SIG){//we've grabed signals, execute them
for(size_t i = 0; i < dh.size(); ++i){
dh.handle(*this, i, rd);
}
}
}
AsyncE rv;
switch(state()){
case InitState: rv = doInit(rd); break;
case PrepareRunState: rv = doPrepareRun(rd); break;
case RunState: rv = doRun(rd); break;
case PrepareRecoveryState: rv = doPrepareRecovery(rd); break;
default:
if(state() >= FirstRecoveryState && state() <= LastRecoveryState){
rv = doRecovery(rd);
}
break;
}
if(rv == AsyncSuccess){
_rexectx.reschedule();
}else if(rv == AsyncError){
_rexectx.close();
}else if(d.timerq.size()){
if(d.timerq.isHit(_rexectx.currentTime())){
_rexectx.reschedule();
return;
}
_rexectx.waitUntil(d.timerq.frontTime());
}
}
//---------------------------------------------------------
bool Object::isCoordinator()const{
return d.isCoordinator();
}
uint32 Object::acceptId()const{
return d.acceptid;
}
uint32 Object::proposeId()const{
return d.proposeid;
}
//---------------------------------------------------------
AsyncE Object::doInit(RunData &_rd){
this->init();
state(PrepareRunState);
return AsyncSuccess;
}
//---------------------------------------------------------
AsyncE Object::doPrepareRun(RunData &_rd){
this->prepareRun();
state(RunState);
return AsyncSuccess;
}
//---------------------------------------------------------
AsyncE Object::doRun(RunData &_rd){
idbg("");
//first we scan for timeout:
while(d.timerq.isHit(_rd.rtimepos)){
RequestStub &rreq(d.requestStub(d.timerq.frontValue().index));
if(rreq.timerid == d.timerq.frontValue().uid){
rreq.evs |= RequestStub::TimeoutEvent;
if(!(rreq.evs & RequestStub::SignaledEvent)){
rreq.evs |= RequestStub::SignaledEvent;
d.reqq.push(d.timerq.frontValue().index);
}
}
d.timerq.pop();
}
//next we process all requests
size_t cnt(d.reqq.size());
while(cnt--){
size_t pos(d.reqq.front());
d.reqq.pop();
doProcessRequest(_rd, pos);
}
doFlushOperations(_rd);
if(d.reqq.size()) return AsyncSuccess;
return AsyncWait;
}
//---------------------------------------------------------
AsyncE Object::doPrepareRecovery(RunData &_rd){
//erase all requests in erase state
for(RequestStubVectorT::const_iterator it(d.reqvec.begin()); it != d.reqvec.end(); ++it){
const RequestStub &rreq(*it);
if(rreq.state() == RequestStub::EraseState){
d.eraseRequestStub(it - d.reqvec.begin());
}
}
prepareRecovery();
state(FirstRecoveryState);
return AsyncSuccess;
}
//---------------------------------------------------------
AsyncE Object::doRecovery(RunData &_rd){
idbg("");
return recovery();
}
//---------------------------------------------------------
void Object::doProcessRequest(RunData &_rd, const size_t _reqidx){
RequestStub &rreq(d.requestStub(_reqidx));
uint32 events = rreq.evs;
rreq.evs = 0;
switch(rreq.state()){
case RequestStub::InitState://any
if(d.isCoordinator()){
if(d.canSendFastAccept()){
idbg("InitState coordinator - send fast accept for "<<rreq.msgptr->consensusRequestId());
doSendFastAccept(_rd, _reqidx);
rreq.state(RequestStub::WaitAcceptConfirmState);
}else{
idbg("InitState coordinator - send propose for "<<rreq.msgptr->consensusRequestId());
doSendPropose(_rd, _reqidx);
rreq.state(RequestStub::WaitProposeConfirmState);
TimeSpec ts(frame::Object::currentTime());
ts += 60 * 1000;//ms
d.timerq.push(ts, TimerValue(_reqidx, rreq.timerid));
rreq.recvpropconf = 1;//one is the propose_accept from current coordinator
}
}else{
idbg("InitState non-coordinator - wait propose/accept for "<<rreq.msgptr->consensusRequestId())
rreq.state(RequestStub::WaitProposeState);
TimeSpec ts(frame::Object::currentTime());
ts += d.distancefromcoordinator * 1000;//ms
d.timerq.push(ts, TimerValue(_reqidx, rreq.timerid));
}
break;
case RequestStub::WaitProposeState://on replica
idbg("WaitProposeState for "<<rreq.msgptr->consensusRequestId());
if(events & RequestStub::TimeoutEvent){
idbg("WaitProposeState - timeout for "<<rreq.msgptr->consensusRequestId());
doSendPropose(_rd, _reqidx);
rreq.state(RequestStub::WaitProposeConfirmState);
TimeSpec ts(frame::Object::currentTime());
ts += 60 * 1000;//ms
d.timerq.push(ts, TimerValue(_reqidx, rreq.timerid));
rreq.recvpropconf = 1;//one is the propose_accept from current coordinator
break;
}
break;
case RequestStub::WaitProposeConfirmState://on coordinator
idbg("WaitProposeAcceptState for "<<rreq.msgptr->consensusRequestId());
if(events & RequestStub::TimeoutEvent){
idbg("WaitProposeAcceptState - timeout: erase request "<<rreq.msgptr->consensusRequestId());
doEraseRequest(_rd, _reqidx);
break;
}
break;
case RequestStub::WaitAcceptState://on replica
if(events & RequestStub::TimeoutEvent){
idbg("WaitAcceptState - timeout "<<rreq.msgptr->consensusRequestId());
rreq.state(RequestStub::WaitProposeState);
TimeSpec ts(frame::Object::currentTime());
ts += d.distancefromcoordinator * 1000;//ms
++rreq.timerid;
d.timerq.push(ts, TimerValue(_reqidx, rreq.timerid));
break;
}
break;
case RequestStub::WaitAcceptConfirmState://on coordinator
idbg("WaitProposeAcceptConfirmState "<<rreq.msgptr->consensusRequestId());
if(events & RequestStub::TimeoutEvent){
idbg("WaitProposeAcceptConfirmState - timeout: erase request "<<rreq.msgptr->consensusRequestId());
doEraseRequest(_rd, _reqidx);
break;
}
break;
case RequestStub::AcceptWaitRequestState://any
idbg("AcceptWaitRequestState "<<rreq.msgptr->consensusRequestId());
if(events & RequestStub::TimeoutEvent){
idbg("AcceptWaitRequestState - timeout: enter recovery state "<<rreq.msgptr->consensusRequestId());
doEnterRecoveryState();
break;
}
if(!(rreq.flags & RequestStub::HaveRequestFlag)){
break;
}
case RequestStub::AcceptState://any
idbg("AcceptState "<<_reqidx<<" "<<rreq.msgptr->consensusRequestId()<<" rreq.acceptid = "<<rreq.acceptid<<" d.acceptid = "<<d.acceptid<<" acceptpendingcnt = "<<(int)d.acceptpendingcnt);
++rreq.timerid;
//for recovery reasons, we do this check before
//haverequestflag check
if(overflow_safe_less(rreq.acceptid, d.acceptid + 1)){
doEraseRequest(_rd, _reqidx);
break;
}
if(!(rreq.flags & RequestStub::HaveRequestFlag)){
idbg("norequestflag "<<_reqidx<<" acceptpendingcnt "<<(int)d.acceptpendingcnt);
rreq.state(RequestStub::AcceptWaitRequestState);
TimeSpec ts(frame::Object::currentTime());
ts.add(60);//60 secs
d.timerq.push(ts, TimerValue(_reqidx, rreq.timerid));
if(d.acceptpendingcnt < 255){
++d.acceptpendingcnt;
}
break;
}
if(d.acceptid + _rd.crtacceptincrement != rreq.acceptid){
idbg("enterpending "<<_reqidx);
rreq.state(RequestStub::AcceptPendingState);
if(d.acceptpendingcnt < 255){
++d.acceptpendingcnt;
}
if(d.acceptpendingcnt == 1){
cassert(d.pendingacceptwaitidx == -1);
d.pendingacceptwaitidx = _reqidx;
TimeSpec ts(frame::Object::currentTime());
ts.add(2*60);//2 mins
d.timerq.push(ts, TimerValue(_reqidx, rreq.timerid));
if(d.acceptpendingcnt < 255){
++d.acceptpendingcnt;
}
}
break;
}
d.lastaccepttime = frame::Object::currentTime();
++_rd.crtacceptincrement;
//we cannot do erase or Accept here, we must wait for the
//send operations to be flushed away
rreq.state(RequestStub::AcceptRunState);
if(!(rreq.evs & RequestStub::SignaledEvent)){
rreq.evs |= RequestStub::SignaledEvent;
d.reqq.push(_reqidx);
}
break;
case RequestStub::AcceptPendingState:
idbg("AcceptPendingState "<<rreq.msgptr->consensusRequestId());
if(events & RequestStub::TimeoutEvent){
idbg("AcceptPendingState - timeout: enter recovery state "<<rreq.msgptr->consensusRequestId());
doEnterRecoveryState();
break;
}
//the status is changed within doScanPendingRequests
break;
case RequestStub::AcceptRunState:
doAcceptRequest(_rd, _reqidx);
if(d.acceptpendingcnt){
if(d.pendingacceptwaitidx == _reqidx){
d.pendingacceptwaitidx = -1;
}
doScanPendingRequests(_rd);
}
case RequestStub::EraseState:
doEraseRequest(_rd, _reqidx);
break;
default:
THROW_EXCEPTION_EX("Unknown state ",rreq.state());
}
}
void Object::doSendAccept(RunData &_rd, const size_t _reqidx){
if(isRecoveryState()){
idbg("recovery state: no sends");
return;
}
if(!_rd.isCoordinator()){
idbg("");
doFlushOperations(_rd);
_rd.coordinatorid = -1;
}
d.coordinatorId(-1);
RequestStub &rreq(d.requestStub(_reqidx));
idbg(""<<_reqidx<<" rreq.proposeid = "<<rreq.proposeid<<" rreq.acceptid = "<<rreq.acceptid<<" "<<rreq.msgptr->consensusRequestId());
_rd.ops[_rd.opcnt].operation = Data::AcceptOperation;
_rd.ops[_rd.opcnt].acceptid = rreq.acceptid;
_rd.ops[_rd.opcnt].proposeid = rreq.proposeid;
_rd.ops[_rd.opcnt].reqidx = _reqidx;
++_rd.opcnt;
if(_rd.isOperationsTableFull()){
idbg("");
doFlushOperations(_rd);
}
}
void Object::doSendFastAccept(RunData &_rd, const size_t _reqidx){
if(isRecoveryState()){
idbg("recovery state: no sends");
return;
}
if(!_rd.isCoordinator()){
doFlushOperations(_rd);
_rd.coordinatorid = -1;
}
RequestStub &rreq(d.requestStub(_reqidx));
++d.proposeid;
if(!d.proposeid) d.proposeid = 1;
++d.proposedacceptid;
rreq.acceptid = d.proposedacceptid;
rreq.proposeid = d.proposeid;
rreq.flags |= (RequestStub::HaveProposeFlag | RequestStub::HaveAcceptFlag);
idbg(""<<_reqidx<<" rreq.proposeid = "<<rreq.proposeid<<" rreq.acceptid = "<<rreq.acceptid<<" "<<rreq.msgptr->consensusRequestId());
_rd.ops[_rd.opcnt].operation = Data::FastAcceptOperation;
_rd.ops[_rd.opcnt].acceptid = rreq.acceptid;
_rd.ops[_rd.opcnt].proposeid = rreq.proposeid;
_rd.ops[_rd.opcnt].reqidx = _reqidx;
++_rd.opcnt;
if(_rd.isOperationsTableFull()){
doFlushOperations(_rd);
}
}
void Object::doSendPropose(RunData &_rd, const size_t _reqidx){
idbg(""<<_reqidx);
if(isRecoveryState()){
idbg("recovery state: no sends");
return;
}
if(!_rd.isCoordinator()){
doFlushOperations(_rd);
_rd.coordinatorid = -1;
}
RequestStub &rreq(d.requestStub(_reqidx));
if(d.isnotjuststarted){
++d.proposeid;
if(!d.proposeid) d.proposeid = 1;
}else{
d.isnotjuststarted = true;
}
++d.proposedacceptid;
rreq.acceptid = d.proposedacceptid;
rreq.proposeid = d.proposeid;
rreq.flags |= (RequestStub::HaveProposeFlag | RequestStub::HaveAcceptFlag);
idbg("sendpropose: proposeid = "<<rreq.proposeid<<" acceptid = "<<rreq.acceptid<<" "<<rreq.msgptr->consensusRequestId());
_rd.ops[_rd.opcnt].operation = Data::ProposeOperation;
_rd.ops[_rd.opcnt].acceptid = rreq.acceptid;
_rd.ops[_rd.opcnt].proposeid = rreq.proposeid;
_rd.ops[_rd.opcnt].reqidx = _reqidx;
++_rd.opcnt;
if(_rd.isOperationsTableFull()){
doFlushOperations(_rd);
}
}
void Object::doSendConfirmPropose(RunData &_rd, const uint8 _replicaidx, const size_t _reqidx){
if(isRecoveryState()){
idbg("recovery state: no sends");
return;
}
if(_rd.coordinatorid != _replicaidx){
doFlushOperations(_rd);
_rd.coordinatorid = _replicaidx;
}
RequestStub &rreq(d.requestStub(_reqidx));
idbg(""<<_reqidx<<" "<<(int)_replicaidx<<" "<<rreq.msgptr->consensusRequestId());
//rreq.state =
_rd.ops[_rd.opcnt].operation = Data::ProposeConfirmOperation;
_rd.ops[_rd.opcnt].acceptid = rreq.acceptid;
_rd.ops[_rd.opcnt].proposeid = rreq.proposeid;
_rd.ops[_rd.opcnt].reqidx = _reqidx;
++_rd.opcnt;
if(_rd.isOperationsTableFull()){
doFlushOperations(_rd);
}
}
void Object::doSendDeclinePropose(RunData &_rd, const uint8 _replicaidx, const OperationStub &_rop){
idbg(""<<(int)_replicaidx<<" "<<_rop.reqid);
if(isRecoveryState()){
idbg("recovery state: no sends");
return;
}
OperationMessage<1> *po(new OperationMessage<1>);
po->replicaidx = d.cfgptr->crtidx;
po->srvidx = serverIndex();
po->op.operation = Data::ProposeDeclineOperation;
po->op.proposeid = d.proposeid;
po->op.acceptid = d.acceptid;
po->op.reqid = _rop.reqid;
DynamicPointer<frame::ipc::Message> msgptr(po);
this->doSendMessage(msgptr, d.cfgptr->addrvec[_replicaidx]);
}
void Object::doSendConfirmAccept(RunData &_rd, const uint8 _replicaidx, const size_t _reqidx){
if(isRecoveryState()){
idbg("recovery state: no sends");
return;
}
if(_rd.coordinatorid != _replicaidx){
doFlushOperations(_rd);
_rd.coordinatorid = _replicaidx;
}
d.coordinatorId(_replicaidx);
RequestStub &rreq(d.requestStub(_reqidx));
idbg(""<<(int)_replicaidx<<" "<<_reqidx<<" "<<rreq.msgptr->consensusRequestId());
_rd.ops[_rd.opcnt].operation = Data::AcceptConfirmOperation;
_rd.ops[_rd.opcnt].acceptid = rreq.acceptid;
_rd.ops[_rd.opcnt].proposeid = rreq.proposeid;
_rd.ops[_rd.opcnt].reqidx = _reqidx;
++_rd.opcnt;
if(_rd.isOperationsTableFull()){
doFlushOperations(_rd);
}
}
void Object::doSendDeclineAccept(RunData &_rd, const uint8 _replicaidx, const OperationStub &_rop){
idbg(""<<(int)_replicaidx<<" "<<_rop.reqid);
if(isRecoveryState()){
idbg("recovery state: no sends");
return;
}
OperationMessage<1> *po(new OperationMessage<1>);
po->replicaidx = d.cfgptr->crtidx;
po->srvidx = serverIndex();
po->op.operation = Data::AcceptDeclineOperation;
po->op.proposeid = d.proposeid;
po->op.acceptid = d.acceptid;
po->op.reqid = _rop.reqid;
DynamicPointer<frame::ipc::Message> msgptr(po);
this->doSendMessage(msgptr, d.cfgptr->addrvec[_replicaidx]);
}
void Object::doFlushOperations(RunData &_rd){
idbg("");
Message *pm(NULL);
OperationStub *pos(NULL);
const size_t opcnt = _rd.opcnt;
_rd.opcnt = 0;
if(opcnt == 0){
return;
}else if(opcnt == 1){
OperationMessage<1> *po(new OperationMessage<1>);
RequestStub &rreq(d.requestStub(_rd.ops[0].reqidx));
pm = po;
po->replicaidx = d.cfgptr->crtidx;
po->srvidx = serverIndex();
po->op.operation = _rd.ops[0].operation;
po->op.acceptid = _rd.ops[0].acceptid;
po->op.proposeid = _rd.ops[0].proposeid;
po->op.reqid = rreq.msgptr->consensusRequestId();
}else if(opcnt == 2){
OperationMessage<2> *po(new OperationMessage<2>);
pm = po;
po->replicaidx = d.cfgptr->crtidx;
po->srvidx = serverIndex();
pos = po->op;
}else if(opcnt <= 4){
OperationMessage<4> *po(new OperationMessage<4>);
pm = po;
po->replicaidx = d.cfgptr->crtidx;
po->srvidx = serverIndex();
po->opsz = opcnt;
pos = po->op;
}else if(opcnt <= 8){
OperationMessage<8> *po(new OperationMessage<8>);
pm = po;
po->replicaidx = d.cfgptr->crtidx;
po->srvidx = serverIndex();
po->opsz = opcnt;
pos = po->op;
}else if(opcnt <= 16){
OperationMessage<16> *po(new OperationMessage<16>);
pm = po;
po->replicaidx = d.cfgptr->crtidx;
po->srvidx = serverIndex();
po->opsz = opcnt;
pos = po->op;
}else if(opcnt <= 32){
OperationMessage<32> *po(new OperationMessage<32>);
pm = po;
po->replicaidx = d.cfgptr->crtidx;
po->srvidx = serverIndex();
po->opsz = opcnt;
pos = po->op;
}else{
THROW_EXCEPTION_EX("invalid opcnt ",opcnt);
}
if(pos){
for(size_t i(0); i < opcnt; ++i){
RequestStub &rreq(d.requestStub(_rd.ops[i].reqidx));
//po->oparr.push_back(OperationStub());
pos[i].operation = _rd.ops[i].operation;
pos[i].acceptid = _rd.ops[i].acceptid;
pos[i].proposeid = _rd.ops[i].proposeid;
pos[i].reqid = rreq.msgptr->consensusRequestId();
idbg("pos["<<i<<"].operation = "<<(int)pos[i].operation<<" proposeid = "<<pos[i].proposeid);
}
}
if(_rd.isCoordinator()){
DynamicSharedPointer<Message> sharedmsgptr(pm);
idbg("broadcast to other replicas");
//broadcast to replicas
for(uint i(0); i < d.cfgptr->addrvec.size(); ++i){
if(i != d.cfgptr->crtidx){
DynamicPointer<frame::ipc::Message> msgptr(sharedmsgptr);
this->doSendMessage(msgptr, d.cfgptr->addrvec[i]);
}
}
}else{
idbg("send to "<<(int)_rd.coordinatorid);
DynamicPointer<frame::ipc::Message> msgptr(pm);
this->doSendMessage(msgptr, d.cfgptr->addrvec[_rd.coordinatorid]);
}
}
/*
Scans all the requests for acceptpending requests, and pushes em onto d.reqq
*/
struct RequestStubAcceptCmp{
const RequestStubVectorT &rreqvec;
RequestStubAcceptCmp(const RequestStubVectorT &_rreqvec):rreqvec(_rreqvec){}
bool operator()(const size_t &_ridx1, const size_t &_ridx2)const{
return overflow_safe_less(rreqvec[_ridx1].acceptid, rreqvec[_ridx2].acceptid);
}
};
void Object::doScanPendingRequests(RunData &_rd){
idbg(""<<(int)d.acceptpendingcnt);
const size_t accpendcnt = d.acceptpendingcnt;
size_t cnt(0);
d.acceptpendingcnt = 0;
if(accpendcnt != 255){
size_t posarr[256];
size_t idx(0);
for(RequestStubVectorT::const_iterator it(d.reqvec.begin()); it != d.reqvec.end(); ++it){
const RequestStub &rreq(*it);
if(
rreq.state() == RequestStub::AcceptPendingState
){
posarr[idx] = it - d.reqvec.begin();
++idx;
}else if(rreq.state() == RequestStub::AcceptWaitRequestState){
++cnt;
}
}
RequestStubAcceptCmp cmp(d.reqvec);
std::sort(posarr, posarr + idx, cmp);
uint32 crtacceptid(d.acceptid);
for(size_t i(0); i < idx; ++i){
RequestStub &rreq(d.reqvec[posarr[i]]);
++crtacceptid;
if(crtacceptid == rreq.acceptid){
if(!(rreq.evs & RequestStub::SignaledEvent)){
rreq.evs |= RequestStub::SignaledEvent;
d.reqq.push(posarr[i]);
}
rreq.state(RequestStub::AcceptState);
if(d.pendingacceptwaitidx == posarr[i]){
d.pendingacceptwaitidx = -1;
}
}else{
const size_t tmp = cnt + idx - i;
d.acceptpendingcnt = tmp <= 255 ? tmp : 255;
if(tmp != cnt && d.pendingacceptwaitidx == -1){
//we have at least one pending request wich is not in waitrequest state
RequestStub &rreq(d.requestStub(posarr[i]));
TimeSpec ts(frame::Object::currentTime());
ts.add(2*60);//2 mins
d.timerq.push(ts, TimerValue(posarr[i], rreq.timerid));
d.pendingacceptwaitidx = posarr[i];
}
break;
}
}
idbg("d.acceptpendingcnt = "<<(int)d.acceptpendingcnt<<" d.pendingacceptwaitidx = "<<d.pendingacceptwaitidx);
}else{
std::deque<size_t> posvec;
for(RequestStubVectorT::const_iterator it(d.reqvec.begin()); it != d.reqvec.end(); ++it){
const RequestStub &rreq(*it);
if(rreq.state() == RequestStub::AcceptPendingState){
posvec.push_back(it - d.reqvec.begin());
}else if(rreq.state() == RequestStub::AcceptWaitRequestState){
++cnt;
}
}
RequestStubAcceptCmp cmp(d.reqvec);
std::sort(posvec.begin(), posvec.end(), cmp);
uint32 crtacceptid(d.acceptid);
for(std::deque<size_t>::const_iterator it(posvec.begin()); it != posvec.end(); ++it){
RequestStub &rreq(d.reqvec[*it]);
++crtacceptid;
if(crtacceptid == rreq.acceptid){
if(!(rreq.evs & RequestStub::SignaledEvent)){
rreq.evs |= RequestStub::SignaledEvent;
d.reqq.push(*it);
}
if(d.pendingacceptwaitidx == *it){
d.pendingacceptwaitidx = -1;
}
rreq.state(RequestStub::AcceptState);
}else{
size_t sz(it - posvec.begin());
size_t tmp = cnt + posvec.size() - sz;
d.acceptpendingcnt = tmp <= 255 ? tmp : 255;;
if(tmp != cnt && d.pendingacceptwaitidx == -1){
//we have at least one pending request wich is not in waitrequest state
RequestStub &rreq(d.requestStub(*it));
TimeSpec ts(frame::Object::currentTime());
ts.add(2*60);//2 mins
d.timerq.push(ts, TimerValue(*it, rreq.timerid));
d.pendingacceptwaitidx = *it;
}
break;
}
}
}
}
void Object::doAcceptRequest(RunData &_rd, const size_t _reqidx){
idbg(""<<_reqidx);
RequestStub &rreq(d.requestStub(_reqidx));
cassert(rreq.flags & RequestStub::HaveRequestFlag);
cassert(rreq.acceptid == d.acceptid + 1);
++d.acceptid;
d.reqmap.erase(&rreq.msgptr->consensusRequestId());
this->accept(rreq.msgptr);
rreq.msgptr.clear();
rreq.flags &= (~RequestStub::HaveRequestFlag);
}
void Object::doEraseRequest(RunData &_rd, const size_t _reqidx){
idbg(""<<_reqidx);
if(d.pendingacceptwaitidx == _reqidx){
d.pendingacceptwaitidx = -1;
}
d.eraseRequestStub(_reqidx);
}
void Object::doStartCoordinate(RunData &_rd, const size_t _reqidx){
idbg(""<<_reqidx);
}
void Object::doEnterRecoveryState(){
idbg("ENTER RECOVERY STATE");
state(PrepareRecoveryState);
}
void Object::enterRunState(){
idbg("");
state(PrepareRunState);
}
//========================================================
}//namespace server
}//namespace consensus
}//namespace distributed
| 48,623 | 19,690 |
/*
* File: KPoints.cpp
* Copyright (C) 2014 K M Masum Habib <masum.habib@gmail.com>
*
* Created on February 17, 2014, 12:21 AM
*/
#include "kpoints/KPoints.h"
#include "boostpython.hpp"
/**
* Python exporters.
*/
namespace qmicad{
namespace python{
using namespace kpoints;
void export_KPoints(){
void (KPoints::*KPoints_addKLine1)(const point&, const point&, double) = &KPoints::addKLine;
void (KPoints::*KPoints_addKLine2)(const point&, const point&, uint) = &KPoints::addKLine;
void (KPoints::*KPoints_addKRect1)(const point&, const point&, double, double) = &KPoints::addKRect;
void (KPoints::*KPoints_addKRect2)(const point&, const point&, uint, uint) = &KPoints::addKRect;
class_<KPoints, bases<Printable>, shared_ptr<KPoints>, noncopyable>("KPoints",
init<optional<const string&> >())
.def("addKPoint", &KPoints::addKPoint)
.def("addKLine", KPoints_addKLine1, "Creates k-grid along a line for a given interval.")
.def("addKLine", KPoints_addKLine2, "Creates k-grid along a line for a given number of k-points.")
.def("addKRect", KPoints_addKRect1, "Creates a rectangular k-grid for a given interval.")
.def("addKRect", KPoints_addKRect2, "Creates a rectangular k-grid for a given number of k-points.")
.add_property("kp", &KPoints::kp, "k-points property, readonly.")
.add_property("N", &KPoints::N, "Total number of k-points, readonly.")
;
}
}
}
| 1,471 | 528 |
// Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
// Including type: IRichPresenceData
#include "GlobalNamespace/IRichPresenceData.hpp"
// Completed includes
// Begin il2cpp-utils forward declares
struct Il2CppString;
// Completed il2cpp-utils forward declares
// Type namespace:
namespace GlobalNamespace {
// Size: 0x0
#pragma pack(push, 1)
// Autogenerated type: IMultiplayerRichPresenceData
class IMultiplayerRichPresenceData/*, public GlobalNamespace::IRichPresenceData*/ {
public:
// Creating value type constructor for type: IMultiplayerRichPresenceData
IMultiplayerRichPresenceData() noexcept {}
// Creating interface conversion operator: operator GlobalNamespace::IRichPresenceData
operator GlobalNamespace::IRichPresenceData() noexcept {
return *reinterpret_cast<GlobalNamespace::IRichPresenceData*>(this);
}
// public System.String get_multiplayerLobbyCode()
// Offset: 0xFFFFFFFF
::Il2CppString* get_multiplayerLobbyCode();
// public System.Void set_multiplayerLobbyCode(System.String value)
// Offset: 0xFFFFFFFF
void set_multiplayerLobbyCode(::Il2CppString* value);
// public System.Boolean get_isJoinable()
// Offset: 0xFFFFFFFF
bool get_isJoinable();
}; // IMultiplayerRichPresenceData
#pragma pack(pop)
}
#include "extern/beatsaber-hook/shared/utils/il2cpp-type-check.hpp"
DEFINE_IL2CPP_ARG_TYPE(GlobalNamespace::IMultiplayerRichPresenceData*, "", "IMultiplayerRichPresenceData");
| 1,632 | 496 |
ο»Ώ#ifndef GUARD_JAMTEMPLATE_CAMERA_HPP_GUARD
#define GUARD_JAMTEMPLATE_CAMERA_HPP_GUARD
#include "cam_interface.hpp"
#include <functional>
namespace jt {
class Camera : public CamInterface {
public:
/// Constructor
explicit Camera(float zoom = 1.0f);
jt::Vector2 getCamOffset() override;
void setCamOffset(jt::Vector2 const& ofs) override;
void move(jt::Vector2 const& v) override;
float getZoom() const override;
void setZoom(float zoom) override;
void shake(float t, float strength, float shakeInterval = 0.005f) override;
jt::Vector2 getShakeOffset() override;
void reset() override;
void update(float elapsed) override;
/// Set random function that will be used to determine the cam displacement
/// \param randomFunction the random function
void setRandomFunction(std::function<float(float)> randomFunction);
private:
jt::Vector2 m_CamOffset { 0.0f, 0.0f };
float m_zoom { 1.0f };
float m_shakeTimer { -1.0f };
float m_shakeStrength { 0.0f };
float m_shakeInterval { 0.0f };
float m_shakeIntervalMax { 0.0f };
jt::Vector2 m_shakeOffset { 0, 0 };
std::function<float(float)> m_randomFunc = nullptr;
virtual void updateShake(float elapsed);
virtual void resetShake();
void setDefaultRandomFunction();
};
} // namespace jt
#endif
| 1,345 | 471 |
#include <vector>
#include <utility>
#include <iostream>
#include <sstream>
#include <climits>
using namespace std;
typedef pair<int, int> intpair;
// This is using a much better algorithm that I did used in python
// Instead of creating an array tracking each point each wire covers, then looping over these for both wires to find cross points,
// we just track the endpoints of each movement of each wire, then calculate intersection points between them
vector<string> tokenize(const string &str) {
vector<string> tokens;
stringstream splitter(str);
string token;
while(getline(splitter, token, ',')) {
tokens.push_back(token);
}
return tokens;
}
vector<intpair> create_wire_points(const vector<string> &path) {
vector<intpair> wire = { {0, 0} };
int x = 0, y = 0;
for (auto s: path) {
char dir = s[0];
int dist = stoi((char *)&s[1]);
switch(dir) {
case 'U':
y += dist;
wire.push_back({ x, y });
break;
case 'D':
y -= dist;
wire.push_back({ x, y });
break;
case 'L':
x -= dist;
wire.push_back({ x, y });
break;
case 'R':
x += dist;
wire.push_back({ x, y });
break;
default:
throw "Unkown direction";
}
}
return wire;
}
bool is_between(const int &i, const int &j, const int &k) {
if (i <= j) {
return i <= k && k <= j;
}
return j <= k && k <= i;
}
vector<intpair> find_cp(const vector<intpair> &first_wire, const vector<intpair> &second_wire) {
vector<intpair> result;
int a_dist = 0;
for (int i = 0; i < first_wire.size() - 1; i++) {
intpair a_first_point = first_wire[i],
a_second_point = first_wire[i+1];
int a_x_1 = a_first_point.first,
a_y_1 = a_first_point.second;
int a_x_2 = a_second_point.first,
a_y_2 = a_second_point.second;
bool a_vert = a_x_1 == a_x_2;
int b_dist = 0;
for (int j = 0; j < second_wire.size() - 1; j++) {
intpair b_first_point = second_wire[j],
b_second_point = second_wire[j+1];
int b_x_1 = b_first_point.first,
b_y_1 = b_first_point.second;
int b_x_2 = b_second_point.first,
b_y_2 = b_second_point.second;
bool b_vert = b_x_1 == b_x_2;
if (a_vert != b_vert) {
if (a_vert) {
// intpair cp = { a_x_1, b_y_1 };
if (is_between(b_x_1, b_x_2, a_x_1) && is_between(a_y_1, a_y_2, b_y_1)) {
result.push_back({
abs(a_x_1) + abs(b_y_1),
a_dist + abs(a_y_1 - b_y_1) + b_dist + abs(b_x_1 - a_x_1)
});
}
} else {
// intpair cp = { b_x_1, a_y_1 };
if (is_between(a_x_1, a_x_2, b_x_1) && is_between(b_y_1, b_y_2, a_y_1)) {
result.push_back({
abs(b_x_1) + abs(a_y_1),
a_dist + abs(a_x_1 - b_x_1) + b_dist + abs(b_y_1 - a_y_1)
});
}
}
}
b_dist += (b_vert ? abs(b_y_1 - b_y_2) : abs(b_x_1 - b_x_2));
}
a_dist += (a_vert ? abs(a_y_1 - a_y_2) : abs(a_x_1 - a_x_2));
}
return result;
}
int main() {
string first_line, second_line;
getline(cin, first_line);
getline(cin, second_line);
auto first_path = tokenize(first_line);
auto second_path = tokenize(second_line);
auto first_wire = create_wire_points(first_path);
auto second_wire = create_wire_points(second_path);
std::cout << first_wire.size() << " " << second_wire.size() << endl;
auto crosspoints = find_cp(first_wire, second_wire);
int man_min = INT_MAX;
int len_min = INT_MAX;
for (auto cp: crosspoints) {
int man_dist = cp.first;
if (man_dist < man_min) {
man_min = man_dist;
}
int len_dist = cp.second;
if (len_dist < len_min) {
len_min = len_dist;
}
}
std::cout << "The nearest cross intpair by Manhatten distance is this far away: " << man_min << endl;
std::cout << "The nearest cross intpair by wire length is this far away: " << len_min << endl;
} | 4,593 | 1,588 |
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2014 Torus Knot Software Ltd
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.
-----------------------------------------------------------------------------
*/
#include "OgreStableHeaders.h"
#include "Compositor/Pass/OgreCompositorPassDef.h"
#include "Compositor/Pass/PassClear/OgreCompositorPassClearDef.h"
#include "Compositor/Pass/PassCompute/OgreCompositorPassComputeDef.h"
#include "Compositor/Pass/PassDepthCopy/OgreCompositorPassDepthCopyDef.h"
#include "Compositor/Pass/PassMipmap/OgreCompositorPassMipmapDef.h"
#include "Compositor/Pass/PassQuad/OgreCompositorPassQuadDef.h"
#include "Compositor/Pass/PassScene/OgreCompositorPassSceneDef.h"
#include "Compositor/Pass/PassStencil/OgreCompositorPassStencilDef.h"
#include "Compositor/Pass/PassUav/OgreCompositorPassUavDef.h"
#include "Compositor/OgreCompositorNodeDef.h"
#include "Compositor/OgreCompositorManager2.h"
#include "Compositor/Pass/OgreCompositorPassProvider.h"
namespace Ogre
{
CompositorTargetDef::~CompositorTargetDef()
{
CompositorPassDefVec::const_iterator itor = mCompositorPasses.begin();
CompositorPassDefVec::const_iterator end = mCompositorPasses.end();
while( itor != end )
{
OGRE_DELETE *itor;
++itor;
}
mCompositorPasses.clear();
}
//-----------------------------------------------------------------------------------
CompositorPassDef* CompositorTargetDef::addPass( CompositorPassType passType, IdString customId )
{
CompositorPassDef *retVal = 0;
switch( passType )
{
case PASS_CLEAR:
retVal = OGRE_NEW CompositorPassClearDef( mRtIndex );
break;
case PASS_QUAD:
retVal = OGRE_NEW CompositorPassQuadDef( mParentNodeDef, mRtIndex );
break;
case PASS_SCENE:
retVal = OGRE_NEW CompositorPassSceneDef( mRtIndex );
break;
case PASS_STENCIL:
retVal = OGRE_NEW CompositorPassStencilDef( mRtIndex );
break;
case PASS_DEPTHCOPY:
retVal = OGRE_NEW CompositorPassDepthCopyDef( mParentNodeDef, mRtIndex );
break;
case PASS_UAV:
retVal = OGRE_NEW CompositorPassUavDef( mParentNodeDef, mRtIndex );
break;
case PASS_MIPMAP:
retVal = OGRE_NEW CompositorPassMipmapDef();
break;
case PASS_COMPUTE:
retVal = OGRE_NEW CompositorPassComputeDef( mParentNodeDef, mRtIndex );
break;
case PASS_CUSTOM:
{
CompositorPassProvider *passProvider = mParentNodeDef->getCompositorManager()->
getCompositorPassProvider();
if( !passProvider )
{
OGRE_EXCEPT( Exception::ERR_INVALID_STATE,
"Using custom compositor passes but no provider is set",
"CompositorTargetDef::addPass" );
}
retVal = passProvider->addPassDef( passType, customId, mRtIndex, mParentNodeDef );
}
break;
default:
break;
}
mParentNodeDef->postInitializePassDef( retVal );
mCompositorPasses.push_back( retVal );
return retVal;
}
//-----------------------------------------------------------------------------------
}
| 4,669 | 1,402 |
#include "utils.h"
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/**
* Check to see if the input starts with "0x"; if it does, return the decoded
* bytes of the following data (presumed to be hex coded). If not, just return
* the contents. This routine allocates memory, so has to be free'd.
*/
bool hex_decode( const uint8_t *input, uint8_t **decoded, uint64_t &len)
{
if (!decoded) return false;
uint8_t *output = *decoded;
if (output == nullptr) return false;
if ((input[0] != '0') && (input[1] != 'x')) {
len = strlen((char *)input);
*decoded = (uint8_t *)calloc(1, (size_t)len+1);
memcpy(*decoded, input, (size_t)len);
} else {
len = ( strlen((const char *)input ) >> 1 ) - 1;
*decoded = (uint8_t *)malloc( (size_t)len );
for ( size_t i = 2; i < strlen( (const char *)input ); i += 2 )
{
output[ ( ( i / 2 ) - 1 ) ] =
( ( ( input[ i ] <= '9' ) ? input[ i ] - '0' :
( ( tolower( input[ i ] ) ) - 'a' + 10 ) ) << 4 ) |
( ( input[ i + 1 ] <= '9' ) ? input[ i + 1 ] - '0' :
( ( tolower( input[ i + 1 ] ) ) - 'a' + 10 ) );
}
}
return true;
}
bool hex_print( const uint8_t *data, uint64_t length )
{
while ( length-- ) {
printf( "%.02x", *data++ );
}
return true;
}
bool hex_puts( const uint8_t *data, uint64_t length )
{
hex_print(data, length);
printf("\n");
return true;
}
| 1,477 | 588 |
//==============================================================================
// Copyright 2003 - 2011 LASMEA UMR 6602 CNRS/Univ. Clermont II
// Copyright 2009 - 2011 LRI UMR 8623 CNRS/Univ Paris Sud XI
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
//==============================================================================
#include <boost/simd/sdk/config/types.hpp>
#include <boost/simd/memory/allocate.hpp>
#include <boost/simd/memory/align_ptr.hpp>
#include <boost/simd/memory/deallocate.hpp>
#include <boost/simd/memory/is_aligned.hpp>
#include <boost/simd/preprocessor/aligned_type.hpp>
#include <boost/simd/meta/align_ptr.hpp>
#include <nt2/sdk/unit/module.hpp>
#include <nt2/sdk/unit/tests/basic.hpp>
#include <nt2/sdk/unit/tests/relation.hpp>
////////////////////////////////////////////////////////////////////////////////
// Test make_aligned on simple type
////////////////////////////////////////////////////////////////////////////////
NT2_TEST_CASE(make_aligned)
{
using boost::simd::is_aligned;
BOOST_SIMD_ALIGNED_TYPE(double ) ad;
BOOST_SIMD_ALIGNED_TYPE(float ) af;
BOOST_SIMD_ALIGNED_TYPE(boost::simd::uint64_t) aui64;
BOOST_SIMD_ALIGNED_TYPE(boost::simd::uint32_t) aui32;
BOOST_SIMD_ALIGNED_TYPE(boost::simd::uint16_t) aui16;
BOOST_SIMD_ALIGNED_TYPE(boost::simd::uint8_t ) aui8;
BOOST_SIMD_ALIGNED_TYPE(boost::simd::int64_t ) ai64;
BOOST_SIMD_ALIGNED_TYPE(boost::simd::int32_t ) ai32;
BOOST_SIMD_ALIGNED_TYPE(boost::simd::int16_t ) ai16;
BOOST_SIMD_ALIGNED_TYPE(boost::simd::int8_t ) ai8;
BOOST_SIMD_ALIGNED_TYPE(bool ) ab;
NT2_TEST( is_aligned(&ad) );
NT2_TEST( is_aligned(&af) );
NT2_TEST( is_aligned(&aui64) );
NT2_TEST( is_aligned(&aui32) );
NT2_TEST( is_aligned(&aui16) );
NT2_TEST( is_aligned(&aui8) );
NT2_TEST( is_aligned(&ai64) );
NT2_TEST( is_aligned(&ai32) );
NT2_TEST( is_aligned(&ai16) );
NT2_TEST( is_aligned(&ai8) );
NT2_TEST( is_aligned(&ab) );
}
////////////////////////////////////////////////////////////////////////////////
// Test make_aligned on array type
////////////////////////////////////////////////////////////////////////////////
NT2_TEST_CASE(make_aligned_array)
{
using boost::simd::is_aligned;
BOOST_SIMD_ALIGNED_TYPE(double ) ad[3];
BOOST_SIMD_ALIGNED_TYPE(float ) af[3];
BOOST_SIMD_ALIGNED_TYPE(boost::simd::uint64_t) aui64[3];
BOOST_SIMD_ALIGNED_TYPE(boost::simd::uint32_t) aui32[3];
BOOST_SIMD_ALIGNED_TYPE(boost::simd::uint16_t) aui16[3];
BOOST_SIMD_ALIGNED_TYPE(boost::simd::uint8_t ) aui8[3];
BOOST_SIMD_ALIGNED_TYPE(boost::simd::int64_t ) ai64[3];
BOOST_SIMD_ALIGNED_TYPE(boost::simd::int32_t ) ai32[3];
BOOST_SIMD_ALIGNED_TYPE(boost::simd::int16_t ) ai16[3];
BOOST_SIMD_ALIGNED_TYPE(boost::simd::int8_t ) ai8[3];
BOOST_SIMD_ALIGNED_TYPE(bool ) ab[3];
NT2_TEST( is_aligned(&ad[0]) );
NT2_TEST( is_aligned(&af[0]) );
NT2_TEST( is_aligned(&aui64[0]) );
NT2_TEST( is_aligned(&aui32[0]) );
NT2_TEST( is_aligned(&aui16[0]) );
NT2_TEST( is_aligned(&aui8[0]) );
NT2_TEST( is_aligned(&ai64[0]) );
NT2_TEST( is_aligned(&ai32[0]) );
NT2_TEST( is_aligned(&ai16[0]) );
NT2_TEST( is_aligned(&ai8[0]) );
NT2_TEST( is_aligned(&ab[0]) );
}
////////////////////////////////////////////////////////////////////////////////
// Test make_aligned metafunction
////////////////////////////////////////////////////////////////////////////////
NT2_TEST_CASE(align_ptr)
{
using boost::simd::is_aligned;
using boost::simd::align_ptr;
using boost::simd::allocate;
using boost::simd::deallocate;
void* ptr = allocate(15, 32);
boost::simd::meta::align_ptr<void, 32>::type p = align_ptr<32>(ptr);
NT2_TEST( is_aligned(p, 32) );
NT2_TEST_EQUAL(p, ptr);
deallocate(ptr);
}
| 3,964 | 1,600 |
#include "EstCore.h"
#include "Modules/ModuleManager.h"
extern ENGINE_API float GAverageFPS;
IMPLEMENT_GAME_MODULE(FEstCoreModule, EstCore);
// Default to something low so we don't start at zero
float FEstCoreModule::LongAverageFrameRate = 25.f;
void FEstCoreModule::StartupModule()
{
TickDelegate = FTickerDelegate::CreateRaw(this, &FEstCoreModule::Tick);
TickDelegateHandle = FTicker::GetCoreTicker().AddTicker(TickDelegate);
}
bool FEstCoreModule::Tick(float DeltaTime)
{
LongAverageFrameRate = LongAverageFrameRate * .99f + GAverageFPS * .01f;
return true;
}
void FEstCoreModule::ShutdownModule()
{
FTicker::GetCoreTicker().RemoveTicker(TickDelegateHandle);
}
DEFINE_LOG_CATEGORY(LogEstGeneral);
ESTCORE_API const FEstImpactEffect FEstImpactEffect::None = FEstImpactEffect(); | 792 | 293 |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
//------------------------------------------------------------------------------
// OrbFeatureDetector.cpp
//
// The feature detector detects the orb features in an image and
// also computes the BRIEF descriptors for them. The init settings
// control the properties of the features.
//------------------------------------------------------------------------------
#include "OrbFeatureDetector.h"
#include "MageSettings.h"
#include <opencv2/core/core.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/core.hpp>
#include "Utils/Logging.h"
#include "OpenCVModified.h"
#include "Analysis/DataFlow.h"
#include <gsl/gsl_algorithm>
namespace mage
{
void OrbFeatureDetector::UndistortKeypoints(
gsl::span<cv::KeyPoint> inoutKeypoints,
const CameraCalibration& distortedCalibration,
const CameraCalibration& undistortedCalibration,
thread_memory memory)
{
SCOPE_TIMER(OrbFeatureDetector::UndistortKeypoints);
assert(distortedCalibration.GetDistortionType() != mage::calibration::DistortionType::None && "expecting distorted keypoints to undistort");
if (inoutKeypoints.empty())
{
return;
}
auto sourceMem = memory.stack_buffer<cv::Point2f>(inoutKeypoints.size());
for (size_t i = 0; i < sourceMem.size(); ++i)
{
sourceMem[i] = inoutKeypoints[i].pt;
}
cv::Mat distortedPointsMat{ (int)sourceMem.size(), 1, CV_32FC2, sourceMem.data() };
auto destMem = memory.stack_buffer<cv::Point2f>(inoutKeypoints.size());
cv::Mat undistortedPointsMat{ (int)destMem.size(), 1, CV_32FC2, destMem.data() };
undistortPoints(distortedPointsMat, undistortedPointsMat, distortedCalibration.GetCameraMatrix(), distortedCalibration.GetCVDistortionCoeffs(), cv::noArray(), undistortedCalibration.GetCameraMatrix());
// now adjust the points in undistorted
for (size_t i = 0; i < destMem.size(); ++i)
{
inoutKeypoints[i].pt = destMem[i];
}
}
OrbFeatureDetector::OrbFeatureDetector(const FeatureExtractorSettings& settings)
: m_detector{
settings.GaussianKernelSize,
(unsigned int)settings.NumFeatures,
settings.ScaleFactor,
settings.NumLevels,
settings.PatchSize,
settings.FastThreshold,
settings.UseOrientation,
settings.FeatureFactor,
settings.FeatureStrength,
settings.StrongResponse,
settings.MinRobustnessFactor,
settings.MaxRobustnessFactor,
settings.NumCellsX,
settings.NumCellsY
}
{
}
void OrbFeatureDetector::Process(const CameraCalibration& distortedCalibration, const CameraCalibration& undistortedCalibration, thread_memory memory, ImageHandle& imageData, const cv::Mat& image)
{
SCOPE_TIMER(OrbFeatureDetector::Process);
assert(undistortedCalibration.GetDistortionType() == calibration::DistortionType::None && "Expecting undistorted cal to be undistorted");
DATAFLOW(
DF_OUTPUT(imageData->GetKeypoints())
);
m_detector.DetectAndCompute(memory, *imageData, image);
if(distortedCalibration != undistortedCalibration)
{
UndistortKeypoints(imageData->GetKeypoints(), distortedCalibration, undistortedCalibration, memory);
}
}
}
| 3,521 | 1,052 |
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: ls.proto.systems.proto
#include "ls.proto.systems.pb.h"
#include <algorithm>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
PROTOBUF_PRAGMA_INIT_SEG
namespace ls {
namespace proto {
namespace systems {
constexpr StateSpace::StateSpace(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: a_(nullptr)
, b_(nullptr)
, c_(nullptr)
, d_(nullptr)
, dt_(0)
, isdiscrete_(false){}
struct StateSpaceDefaultTypeInternal {
constexpr StateSpaceDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~StateSpaceDefaultTypeInternal() {}
union {
StateSpace _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT StateSpaceDefaultTypeInternal _StateSpace_default_instance_;
constexpr TransferFunction::TransferFunction(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: num_(nullptr)
, den_(nullptr){}
struct TransferFunctionDefaultTypeInternal {
constexpr TransferFunctionDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~TransferFunctionDefaultTypeInternal() {}
union {
TransferFunction _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TransferFunctionDefaultTypeInternal _TransferFunction_default_instance_;
} // namespace systems
} // namespace proto
} // namespace ls
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_ls_2eproto_2esystems_2eproto[2];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_ls_2eproto_2esystems_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_ls_2eproto_2esystems_2eproto = nullptr;
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_ls_2eproto_2esystems_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
PROTOBUF_FIELD_OFFSET(::ls::proto::systems::StateSpace, _has_bits_),
PROTOBUF_FIELD_OFFSET(::ls::proto::systems::StateSpace, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::ls::proto::systems::StateSpace, a_),
PROTOBUF_FIELD_OFFSET(::ls::proto::systems::StateSpace, b_),
PROTOBUF_FIELD_OFFSET(::ls::proto::systems::StateSpace, c_),
PROTOBUF_FIELD_OFFSET(::ls::proto::systems::StateSpace, d_),
PROTOBUF_FIELD_OFFSET(::ls::proto::systems::StateSpace, isdiscrete_),
PROTOBUF_FIELD_OFFSET(::ls::proto::systems::StateSpace, dt_),
0,
1,
2,
3,
5,
4,
PROTOBUF_FIELD_OFFSET(::ls::proto::systems::TransferFunction, _has_bits_),
PROTOBUF_FIELD_OFFSET(::ls::proto::systems::TransferFunction, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::ls::proto::systems::TransferFunction, num_),
PROTOBUF_FIELD_OFFSET(::ls::proto::systems::TransferFunction, den_),
0,
1,
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, 11, sizeof(::ls::proto::systems::StateSpace)},
{ 17, 24, sizeof(::ls::proto::systems::TransferFunction)},
};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::ls::proto::systems::_StateSpace_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::ls::proto::systems::_TransferFunction_default_instance_),
};
const char descriptor_table_protodef_ls_2eproto_2esystems_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\026ls.proto.systems.proto\022\020ls.proto.syste"
"ms\032\024ls.proto.eigen.proto\"\214\002\n\nStateSpace\022"
"(\n\001A\030\001 \001(\0132\030.ls.proto.eigen.MatrixXdH\000\210\001"
"\001\022(\n\001B\030\002 \001(\0132\030.ls.proto.eigen.MatrixXdH\001"
"\210\001\001\022(\n\001C\030\003 \001(\0132\030.ls.proto.eigen.MatrixXd"
"H\002\210\001\001\022(\n\001D\030\004 \001(\0132\030.ls.proto.eigen.Matrix"
"XdH\003\210\001\001\022\027\n\nisDiscrete\030\005 \001(\010H\004\210\001\001\022\017\n\002dt\030\006"
" \001(\001H\005\210\001\001B\004\n\002_AB\004\n\002_BB\004\n\002_CB\004\n\002_DB\r\n\013_is"
"DiscreteB\005\n\003_dt\"z\n\020TransferFunction\022*\n\003n"
"um\030\001 \001(\0132\030.ls.proto.eigen.VectorXdH\000\210\001\001\022"
"*\n\003den\030\002 \001(\0132\030.ls.proto.eigen.VectorXdH\001"
"\210\001\001B\006\n\004_numB\006\n\004_denb\006proto3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_ls_2eproto_2esystems_2eproto_deps[1] = {
&::descriptor_table_ls_2eproto_2eeigen_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_ls_2eproto_2esystems_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ls_2eproto_2esystems_2eproto = {
false, false, 467, descriptor_table_protodef_ls_2eproto_2esystems_2eproto, "ls.proto.systems.proto",
&descriptor_table_ls_2eproto_2esystems_2eproto_once, descriptor_table_ls_2eproto_2esystems_2eproto_deps, 1, 2,
schemas, file_default_instances, TableStruct_ls_2eproto_2esystems_2eproto::offsets,
file_level_metadata_ls_2eproto_2esystems_2eproto, file_level_enum_descriptors_ls_2eproto_2esystems_2eproto, file_level_service_descriptors_ls_2eproto_2esystems_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_ls_2eproto_2esystems_2eproto_getter() {
return &descriptor_table_ls_2eproto_2esystems_2eproto;
}
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_ls_2eproto_2esystems_2eproto(&descriptor_table_ls_2eproto_2esystems_2eproto);
namespace ls {
namespace proto {
namespace systems {
// ===================================================================
class StateSpace::_Internal {
public:
using HasBits = decltype(std::declval<StateSpace>()._has_bits_);
static const ::ls::proto::eigen::MatrixXd& a(const StateSpace* msg);
static void set_has_a(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static const ::ls::proto::eigen::MatrixXd& b(const StateSpace* msg);
static void set_has_b(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static const ::ls::proto::eigen::MatrixXd& c(const StateSpace* msg);
static void set_has_c(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static const ::ls::proto::eigen::MatrixXd& d(const StateSpace* msg);
static void set_has_d(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static void set_has_isdiscrete(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
static void set_has_dt(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
};
const ::ls::proto::eigen::MatrixXd&
StateSpace::_Internal::a(const StateSpace* msg) {
return *msg->a_;
}
const ::ls::proto::eigen::MatrixXd&
StateSpace::_Internal::b(const StateSpace* msg) {
return *msg->b_;
}
const ::ls::proto::eigen::MatrixXd&
StateSpace::_Internal::c(const StateSpace* msg) {
return *msg->c_;
}
const ::ls::proto::eigen::MatrixXd&
StateSpace::_Internal::d(const StateSpace* msg) {
return *msg->d_;
}
void StateSpace::clear_a() {
if (a_ != nullptr) a_->Clear();
_has_bits_[0] &= ~0x00000001u;
}
void StateSpace::clear_b() {
if (b_ != nullptr) b_->Clear();
_has_bits_[0] &= ~0x00000002u;
}
void StateSpace::clear_c() {
if (c_ != nullptr) c_->Clear();
_has_bits_[0] &= ~0x00000004u;
}
void StateSpace::clear_d() {
if (d_ != nullptr) d_->Clear();
_has_bits_[0] &= ~0x00000008u;
}
StateSpace::StateSpace(::PROTOBUF_NAMESPACE_ID::Arena* arena)
: ::PROTOBUF_NAMESPACE_ID::Message(arena) {
SharedCtor();
RegisterArenaDtor(arena);
// @@protoc_insertion_point(arena_constructor:ls.proto.systems.StateSpace)
}
StateSpace::StateSpace(const StateSpace& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
if (from._internal_has_a()) {
a_ = new ::ls::proto::eigen::MatrixXd(*from.a_);
} else {
a_ = nullptr;
}
if (from._internal_has_b()) {
b_ = new ::ls::proto::eigen::MatrixXd(*from.b_);
} else {
b_ = nullptr;
}
if (from._internal_has_c()) {
c_ = new ::ls::proto::eigen::MatrixXd(*from.c_);
} else {
c_ = nullptr;
}
if (from._internal_has_d()) {
d_ = new ::ls::proto::eigen::MatrixXd(*from.d_);
} else {
d_ = nullptr;
}
::memcpy(&dt_, &from.dt_,
static_cast<size_t>(reinterpret_cast<char*>(&isdiscrete_) -
reinterpret_cast<char*>(&dt_)) + sizeof(isdiscrete_));
// @@protoc_insertion_point(copy_constructor:ls.proto.systems.StateSpace)
}
void StateSpace::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&a_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&isdiscrete_) -
reinterpret_cast<char*>(&a_)) + sizeof(isdiscrete_));
}
StateSpace::~StateSpace() {
// @@protoc_insertion_point(destructor:ls.proto.systems.StateSpace)
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
void StateSpace::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
if (this != internal_default_instance()) delete a_;
if (this != internal_default_instance()) delete b_;
if (this != internal_default_instance()) delete c_;
if (this != internal_default_instance()) delete d_;
}
void StateSpace::ArenaDtor(void* object) {
StateSpace* _this = reinterpret_cast< StateSpace* >(object);
(void)_this;
}
void StateSpace::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void StateSpace::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void StateSpace::Clear() {
// @@protoc_insertion_point(message_clear_start:ls.proto.systems.StateSpace)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(a_ != nullptr);
a_->Clear();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(b_ != nullptr);
b_->Clear();
}
if (cached_has_bits & 0x00000004u) {
GOOGLE_DCHECK(c_ != nullptr);
c_->Clear();
}
if (cached_has_bits & 0x00000008u) {
GOOGLE_DCHECK(d_ != nullptr);
d_->Clear();
}
}
if (cached_has_bits & 0x00000030u) {
::memset(&dt_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&isdiscrete_) -
reinterpret_cast<char*>(&dt_)) + sizeof(isdiscrete_));
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* StateSpace::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional .ls.proto.eigen.MatrixXd A = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
ptr = ctx->ParseMessage(_internal_mutable_a(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// optional .ls.proto.eigen.MatrixXd B = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
ptr = ctx->ParseMessage(_internal_mutable_b(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// optional .ls.proto.eigen.MatrixXd C = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
ptr = ctx->ParseMessage(_internal_mutable_c(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// optional .ls.proto.eigen.MatrixXd D = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
ptr = ctx->ParseMessage(_internal_mutable_d(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// optional bool isDiscrete = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
_Internal::set_has_isdiscrete(&has_bits);
isdiscrete_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// optional double dt = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 49)) {
_Internal::set_has_dt(&has_bits);
dt_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
ptr += sizeof(double);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
::PROTOBUF_NAMESPACE_ID::uint8* StateSpace::_InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:ls.proto.systems.StateSpace)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// optional .ls.proto.eigen.MatrixXd A = 1;
if (_internal_has_a()) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
1, _Internal::a(this), target, stream);
}
// optional .ls.proto.eigen.MatrixXd B = 2;
if (_internal_has_b()) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
2, _Internal::b(this), target, stream);
}
// optional .ls.proto.eigen.MatrixXd C = 3;
if (_internal_has_c()) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
3, _Internal::c(this), target, stream);
}
// optional .ls.proto.eigen.MatrixXd D = 4;
if (_internal_has_d()) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
4, _Internal::d(this), target, stream);
}
// optional bool isDiscrete = 5;
if (_internal_has_isdiscrete()) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_isdiscrete(), target);
}
// optional double dt = 6;
if (_internal_has_dt()) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(6, this->_internal_dt(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:ls.proto.systems.StateSpace)
return target;
}
size_t StateSpace::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:ls.proto.systems.StateSpace)
size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
// optional .ls.proto.eigen.MatrixXd A = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*a_);
}
// optional .ls.proto.eigen.MatrixXd B = 2;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*b_);
}
// optional .ls.proto.eigen.MatrixXd C = 3;
if (cached_has_bits & 0x00000004u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*c_);
}
// optional .ls.proto.eigen.MatrixXd D = 4;
if (cached_has_bits & 0x00000008u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*d_);
}
// optional double dt = 6;
if (cached_has_bits & 0x00000010u) {
total_size += 1 + 8;
}
// optional bool isDiscrete = 5;
if (cached_has_bits & 0x00000020u) {
total_size += 1 + 1;
}
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
_internal_metadata_, total_size, &_cached_size_);
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void StateSpace::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:ls.proto.systems.StateSpace)
GOOGLE_DCHECK_NE(&from, this);
const StateSpace* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<StateSpace>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:ls.proto.systems.StateSpace)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:ls.proto.systems.StateSpace)
MergeFrom(*source);
}
}
void StateSpace::MergeFrom(const StateSpace& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:ls.proto.systems.StateSpace)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
if (cached_has_bits & 0x00000001u) {
_internal_mutable_a()->::ls::proto::eigen::MatrixXd::MergeFrom(from._internal_a());
}
if (cached_has_bits & 0x00000002u) {
_internal_mutable_b()->::ls::proto::eigen::MatrixXd::MergeFrom(from._internal_b());
}
if (cached_has_bits & 0x00000004u) {
_internal_mutable_c()->::ls::proto::eigen::MatrixXd::MergeFrom(from._internal_c());
}
if (cached_has_bits & 0x00000008u) {
_internal_mutable_d()->::ls::proto::eigen::MatrixXd::MergeFrom(from._internal_d());
}
if (cached_has_bits & 0x00000010u) {
dt_ = from.dt_;
}
if (cached_has_bits & 0x00000020u) {
isdiscrete_ = from.isdiscrete_;
}
_has_bits_[0] |= cached_has_bits;
}
}
void StateSpace::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:ls.proto.systems.StateSpace)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void StateSpace::CopyFrom(const StateSpace& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:ls.proto.systems.StateSpace)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool StateSpace::IsInitialized() const {
return true;
}
void StateSpace::InternalSwap(StateSpace* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(StateSpace, isdiscrete_)
+ sizeof(StateSpace::isdiscrete_)
- PROTOBUF_FIELD_OFFSET(StateSpace, a_)>(
reinterpret_cast<char*>(&a_),
reinterpret_cast<char*>(&other->a_));
}
::PROTOBUF_NAMESPACE_ID::Metadata StateSpace::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_ls_2eproto_2esystems_2eproto_getter, &descriptor_table_ls_2eproto_2esystems_2eproto_once,
file_level_metadata_ls_2eproto_2esystems_2eproto[0]);
}
// ===================================================================
class TransferFunction::_Internal {
public:
using HasBits = decltype(std::declval<TransferFunction>()._has_bits_);
static const ::ls::proto::eigen::VectorXd& num(const TransferFunction* msg);
static void set_has_num(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static const ::ls::proto::eigen::VectorXd& den(const TransferFunction* msg);
static void set_has_den(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
};
const ::ls::proto::eigen::VectorXd&
TransferFunction::_Internal::num(const TransferFunction* msg) {
return *msg->num_;
}
const ::ls::proto::eigen::VectorXd&
TransferFunction::_Internal::den(const TransferFunction* msg) {
return *msg->den_;
}
void TransferFunction::clear_num() {
if (num_ != nullptr) num_->Clear();
_has_bits_[0] &= ~0x00000001u;
}
void TransferFunction::clear_den() {
if (den_ != nullptr) den_->Clear();
_has_bits_[0] &= ~0x00000002u;
}
TransferFunction::TransferFunction(::PROTOBUF_NAMESPACE_ID::Arena* arena)
: ::PROTOBUF_NAMESPACE_ID::Message(arena) {
SharedCtor();
RegisterArenaDtor(arena);
// @@protoc_insertion_point(arena_constructor:ls.proto.systems.TransferFunction)
}
TransferFunction::TransferFunction(const TransferFunction& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
if (from._internal_has_num()) {
num_ = new ::ls::proto::eigen::VectorXd(*from.num_);
} else {
num_ = nullptr;
}
if (from._internal_has_den()) {
den_ = new ::ls::proto::eigen::VectorXd(*from.den_);
} else {
den_ = nullptr;
}
// @@protoc_insertion_point(copy_constructor:ls.proto.systems.TransferFunction)
}
void TransferFunction::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&num_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&den_) -
reinterpret_cast<char*>(&num_)) + sizeof(den_));
}
TransferFunction::~TransferFunction() {
// @@protoc_insertion_point(destructor:ls.proto.systems.TransferFunction)
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
void TransferFunction::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
if (this != internal_default_instance()) delete num_;
if (this != internal_default_instance()) delete den_;
}
void TransferFunction::ArenaDtor(void* object) {
TransferFunction* _this = reinterpret_cast< TransferFunction* >(object);
(void)_this;
}
void TransferFunction::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TransferFunction::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void TransferFunction::Clear() {
// @@protoc_insertion_point(message_clear_start:ls.proto.systems.TransferFunction)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(num_ != nullptr);
num_->Clear();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(den_ != nullptr);
den_->Clear();
}
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* TransferFunction::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional .ls.proto.eigen.VectorXd num = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
ptr = ctx->ParseMessage(_internal_mutable_num(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// optional .ls.proto.eigen.VectorXd den = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
ptr = ctx->ParseMessage(_internal_mutable_den(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
::PROTOBUF_NAMESPACE_ID::uint8* TransferFunction::_InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:ls.proto.systems.TransferFunction)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// optional .ls.proto.eigen.VectorXd num = 1;
if (_internal_has_num()) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
1, _Internal::num(this), target, stream);
}
// optional .ls.proto.eigen.VectorXd den = 2;
if (_internal_has_den()) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
2, _Internal::den(this), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:ls.proto.systems.TransferFunction)
return target;
}
size_t TransferFunction::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:ls.proto.systems.TransferFunction)
size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional .ls.proto.eigen.VectorXd num = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*num_);
}
// optional .ls.proto.eigen.VectorXd den = 2;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*den_);
}
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
_internal_metadata_, total_size, &_cached_size_);
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void TransferFunction::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:ls.proto.systems.TransferFunction)
GOOGLE_DCHECK_NE(&from, this);
const TransferFunction* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<TransferFunction>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:ls.proto.systems.TransferFunction)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:ls.proto.systems.TransferFunction)
MergeFrom(*source);
}
}
void TransferFunction::MergeFrom(const TransferFunction& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:ls.proto.systems.TransferFunction)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
_internal_mutable_num()->::ls::proto::eigen::VectorXd::MergeFrom(from._internal_num());
}
if (cached_has_bits & 0x00000002u) {
_internal_mutable_den()->::ls::proto::eigen::VectorXd::MergeFrom(from._internal_den());
}
}
}
void TransferFunction::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:ls.proto.systems.TransferFunction)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void TransferFunction::CopyFrom(const TransferFunction& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:ls.proto.systems.TransferFunction)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool TransferFunction::IsInitialized() const {
return true;
}
void TransferFunction::InternalSwap(TransferFunction* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(TransferFunction, den_)
+ sizeof(TransferFunction::den_)
- PROTOBUF_FIELD_OFFSET(TransferFunction, num_)>(
reinterpret_cast<char*>(&num_),
reinterpret_cast<char*>(&other->num_));
}
::PROTOBUF_NAMESPACE_ID::Metadata TransferFunction::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_ls_2eproto_2esystems_2eproto_getter, &descriptor_table_ls_2eproto_2esystems_2eproto_once,
file_level_metadata_ls_2eproto_2esystems_2eproto[1]);
}
// @@protoc_insertion_point(namespace_scope)
} // namespace systems
} // namespace proto
} // namespace ls
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::ls::proto::systems::StateSpace* Arena::CreateMaybeMessage< ::ls::proto::systems::StateSpace >(Arena* arena) {
return Arena::CreateMessageInternal< ::ls::proto::systems::StateSpace >(arena);
}
template<> PROTOBUF_NOINLINE ::ls::proto::systems::TransferFunction* Arena::CreateMaybeMessage< ::ls::proto::systems::TransferFunction >(Arena* arena) {
return Arena::CreateMessageInternal< ::ls::proto::systems::TransferFunction >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
| 32,049 | 12,609 |
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "doctest.h"
#include "vk_queue_selector.h"
#include <cstdio>
#include <vector>
static void fakeGetPhysicalDeviceQueueFamilyProperties0(VkPhysicalDevice, uint32_t *pQueueFamilyPropertyCount, VkQueueFamilyProperties *pQueueFamilyProperties) {
if(pQueueFamilyPropertyCount)
*pQueueFamilyPropertyCount = 4;
if(pQueueFamilyProperties) {
pQueueFamilyProperties[0].queueFlags = VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT | VK_QUEUE_TRANSFER_BIT;
pQueueFamilyProperties[0].queueCount = 10;
pQueueFamilyProperties[1].queueFlags = VK_QUEUE_GRAPHICS_BIT;
pQueueFamilyProperties[1].queueCount = 3;
pQueueFamilyProperties[2].queueFlags = VK_QUEUE_TRANSFER_BIT;
pQueueFamilyProperties[2].queueCount = 2;
pQueueFamilyProperties[3].queueFlags = VK_QUEUE_COMPUTE_BIT;
pQueueFamilyProperties[3].queueCount = 1;
}
}
static VkResult fakeGetPhysicalDeviceSurfaceSupportKHR0(VkPhysicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR, VkBool32 *pSupported) {
constexpr VkBool32 kSurfaceSupport[] = {0, 1, 0, 0};
*pSupported = kSurfaceSupport[queueFamilyIndex];
return VK_SUCCESS;
}
TEST_CASE("Large requirements and different priorities") {
VqsVulkanFunctions functions = {};
functions.vkGetPhysicalDeviceQueueFamilyProperties = fakeGetPhysicalDeviceQueueFamilyProperties0;
functions.vkGetPhysicalDeviceSurfaceSupportKHR = fakeGetPhysicalDeviceSurfaceSupportKHR0;
VqsQueryCreateInfo createInfo = {};
createInfo.physicalDevice = NULL;
VqsQueueRequirements requirements[] = {
{VK_QUEUE_GRAPHICS_BIT, 1.0f, (VkSurfaceKHR)(main)},
{VK_QUEUE_GRAPHICS_BIT, 0.8f, (VkSurfaceKHR)(main)},
{VK_QUEUE_COMPUTE_BIT, 1.0f, (VkSurfaceKHR)(main)},
{VK_QUEUE_COMPUTE_BIT, 0.5f, nullptr},
{VK_QUEUE_COMPUTE_BIT, 0.5f, nullptr},
{VK_QUEUE_COMPUTE_BIT, 0.5f, nullptr},
{VK_QUEUE_COMPUTE_BIT, 0.5f, nullptr},
{VK_QUEUE_COMPUTE_BIT, 0.5f, nullptr},
{VK_QUEUE_COMPUTE_BIT, 0.5f, nullptr},
{VK_QUEUE_COMPUTE_BIT, 0.5f, nullptr},
{VK_QUEUE_COMPUTE_BIT, 0.5f, nullptr},
{VK_QUEUE_COMPUTE_BIT, 1.0f, nullptr},
{VK_QUEUE_COMPUTE_BIT, 0.5f, nullptr},
{VK_QUEUE_COMPUTE_BIT, 0.5f, nullptr},
{VK_QUEUE_COMPUTE_BIT, 0.5f, nullptr},
{VK_QUEUE_COMPUTE_BIT, 0.5f, nullptr},
{VK_QUEUE_COMPUTE_BIT, 0.5f, nullptr},
{VK_QUEUE_COMPUTE_BIT, 0.5f, nullptr},
{VK_QUEUE_COMPUTE_BIT, 0.5f, nullptr},
{VK_QUEUE_COMPUTE_BIT, 0.5f, nullptr},
{VK_QUEUE_TRANSFER_BIT, 1.0f, nullptr},
{VK_QUEUE_TRANSFER_BIT, 1.0f, nullptr},
{VK_QUEUE_TRANSFER_BIT, 1.0f, nullptr},
{VK_QUEUE_TRANSFER_BIT, 1.0f, nullptr},
};
createInfo.queueRequirementCount = std::size(requirements);
createInfo.pQueueRequirements = requirements;
createInfo.pVulkanFunctions = &functions;
VqsQuery query;
REQUIRE( vqsCreateQuery(&createInfo, &query) == VK_SUCCESS );
REQUIRE( vqsPerformQuery(query) == VK_SUCCESS );
std::vector<VqsQueueSelection> selections;
selections.resize(std::size(requirements));
vqsGetQueueSelections(query, selections.data());
printf("Selections:\n");
for(const VqsQueueSelection &i : selections) {
printf("{familyIndex:%d, queueIndex:%d, presentFamilyIndex:%d, presentQueueIndex:%d}\n",
i.queueFamilyIndex, i.queueIndex, i.presentQueueFamilyIndex, i.presentQueueIndex);
}
uint32_t queueCreateInfoCount, queuePriorityCount;
vqsEnumerateDeviceQueueCreateInfos(query, &queueCreateInfoCount, nullptr, &queuePriorityCount, nullptr);
std::vector<VkDeviceQueueCreateInfo> queueCreateInfos(queueCreateInfoCount);
std::vector<float> queuePriorities(queuePriorityCount);
vqsEnumerateDeviceQueueCreateInfos(query, &queueCreateInfoCount, queueCreateInfos.data(), &queuePriorityCount, queuePriorities.data());
printf("Creations:\n");
for(const VkDeviceQueueCreateInfo &i : queueCreateInfos) {
printf("{familyIndex:%u, queueCount:%u, queuePriorities:[", i.queueFamilyIndex, i.queueCount);
for(uint32_t j = 0; j < i.queueCount; ++j) {
printf("%.2f", i.pQueuePriorities[j]);
if(j < i.queueCount - 1) printf(", ");
}
printf("]}\n");
}
vqsDestroyQuery(query);
REQUIRE( queueCreateInfos[2].queueCount == 2 );
REQUIRE( selections[11].queueFamilyIndex == 3 );
}
| 4,155 | 1,740 |
/*
* Add.cpp
*
* Created on: 02.05.2016
* Author: mklimke
*/
/**
* \file Add.cpp
* \brief This file contains the method definitions for Add-class.
*/
#include "Add.h"
Add::Add(Expression* summand1, Expression* summand2) : left(summand1), right(summand2)
{
}
Add::~Add()
{
delete left;
delete right;
}
double Add::evaluate() const
{
return left->evaluate() + right->evaluate();
}
std::string Add::print() const
{
return ("( " + left->print() + " + " + right->print() + " )");
}
| 501 | 198 |
//
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/CPPAlliance/url
//
#ifndef BOOST_URL_RFC_HOST_RULE_HPP
#define BOOST_URL_RFC_HOST_RULE_HPP
#include <boost/url/detail/config.hpp>
#include <boost/url/error_code.hpp>
#include <boost/url/host_type.hpp>
#include <boost/url/pct_encoding_types.hpp>
#include <boost/url/string_view.hpp>
#include <boost/url/ipv4_address.hpp>
#include <boost/url/ipv6_address.hpp>
#include <boost/url/grammar/parse_tag.hpp>
namespace boost {
namespace urls {
/** Rule for host
@par BNF
@code
host = IP-literal / IPv4address / reg-name
@endcode
@par Specification
@li <a href="https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.2"
>3.2.2. Host (rfc3986)</a>
@see
@ref host_type,
@ref ipv4_address,
@ref ipv6_address.
*/
struct host_rule
{
urls::host_type host_type =
urls::host_type::none;
pct_encoded_str name;
ipv4_address ipv4;
ipv6_address ipv6;
string_view ipvfuture;
string_view host_part;
friend
void
tag_invoke(
grammar::parse_tag const&,
char const*& it,
char const* const end,
error_code& ec,
host_rule& t) noexcept
{
return parse(it, end, ec, t);
}
private:
BOOST_URL_DECL
static
void
parse(
char const*& it,
char const* const end,
error_code& ec,
host_rule& t) noexcept;
};
} // urls
} // boost
#endif
| 1,706 | 657 |
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/public/cpp/autotest_private_api_utils.h"
#include "ash/app_list/app_list_controller_impl.h"
#include "ash/frame/non_client_frame_view_ash.h"
#include "ash/shell.h"
#include "ash/wm/mru_window_tracker.h"
#include "ash/wm/tablet_mode/scoped_skip_user_session_blocked_check.h"
#include "base/callback_helpers.h"
#include "base/optional.h"
#include "base/scoped_observation.h"
#include "ui/compositor/layer_animation_observer.h"
namespace ash {
namespace {
class HomeLauncherStateWaiter {
public:
HomeLauncherStateWaiter(bool target_shown, base::OnceClosure closure)
: target_shown_(target_shown), closure_(std::move(closure)) {
Shell::Get()
->app_list_controller()
->SetHomeLauncherAnimationCallbackForTesting(base::BindRepeating(
&HomeLauncherStateWaiter::OnHomeLauncherAnimationCompleted,
base::Unretained(this)));
}
~HomeLauncherStateWaiter() {
Shell::Get()
->app_list_controller()
->SetHomeLauncherAnimationCallbackForTesting(base::NullCallback());
}
private:
// Passed to AppListControllerImpl as a callback to run when home launcher
// transition animation is complete.
void OnHomeLauncherAnimationCompleted(bool shown) {
if (shown == target_shown_) {
std::move(closure_).Run();
delete this;
}
}
bool target_shown_;
base::OnceClosure closure_;
DISALLOW_COPY_AND_ASSIGN(HomeLauncherStateWaiter);
};
// A waiter that waits until the animation ended with the target state, and
// execute the callback. This self destruction upon completion.
class LauncherStateWaiter {
public:
LauncherStateWaiter(ash::AppListViewState state, base::OnceClosure closure)
: target_state_(state), closure_(std::move(closure)) {
Shell::Get()
->app_list_controller()
->SetStateTransitionAnimationCallbackForTesting(base::BindRepeating(
&LauncherStateWaiter::OnStateChanged, base::Unretained(this)));
}
~LauncherStateWaiter() {
Shell::Get()
->app_list_controller()
->SetStateTransitionAnimationCallbackForTesting(base::NullCallback());
}
void OnStateChanged(ash::AppListViewState state) {
if (target_state_ == state) {
std::move(closure_).Run();
delete this;
}
}
private:
ash::AppListViewState target_state_;
base::OnceClosure closure_;
DISALLOW_COPY_AND_ASSIGN(LauncherStateWaiter);
};
class LauncherAnimationWaiter : public ui::LayerAnimationObserver {
public:
LauncherAnimationWaiter(AppListView* view, base::OnceClosure closure)
: closure_(std::move(closure)) {
observation_.Observe(view->GetWidget()->GetLayer()->GetAnimator());
}
~LauncherAnimationWaiter() override = default;
LauncherAnimationWaiter(const LauncherAnimationWaiter&) = delete;
LauncherAnimationWaiter& operator=(const LauncherAnimationWaiter&) = delete;
private:
// ui::LayerAnimationObserver:
void OnLayerAnimationEnded(ui::LayerAnimationSequence* sequence) override {
std::move(closure_).Run();
delete this;
}
void OnLayerAnimationAborted(ui::LayerAnimationSequence* sequence) override {
OnLayerAnimationEnded(sequence);
}
void OnLayerAnimationScheduled(
ui::LayerAnimationSequence* sequence) override {}
base::OnceClosure closure_;
base::ScopedObservation<ui::LayerAnimator, ui::LayerAnimationObserver>
observation_{this};
};
bool WaitForHomeLauncherState(bool target_visible, base::OnceClosure closure) {
if (Shell::Get()->app_list_controller()->IsVisible(
/*display_id=*/base::nullopt) == target_visible) {
std::move(closure).Run();
return true;
}
new HomeLauncherStateWaiter(target_visible, std::move(closure));
return false;
}
bool WaitForLauncherAnimation(base::OnceClosure closure) {
auto* app_list_view =
Shell::Get()->app_list_controller()->presenter()->GetView();
if (!app_list_view) {
std::move(closure).Run();
return true;
}
bool animating =
app_list_view->GetWidget()->GetLayer()->GetAnimator()->is_animating();
if (!animating) {
std::move(closure).Run();
return true;
}
new LauncherAnimationWaiter(app_list_view, std::move(closure));
return false;
}
} // namespace
std::vector<aura::Window*> GetAppWindowList() {
ScopedSkipUserSessionBlockedCheck skip_session_blocked;
return Shell::Get()->mru_window_tracker()->BuildAppWindowList(kAllDesks);
}
bool WaitForLauncherState(AppListViewState target_state,
base::OnceClosure closure) {
const bool in_tablet_mode =
Shell::Get()->tablet_mode_controller()->InTabletMode();
if (in_tablet_mode) {
// App-list can't enter kPeeking or kHalf state in tablet mode. Thus
// |target_state| should be either kClosed, kFullscreenAllApps or
// kFullscreenSearch.
DCHECK(target_state == AppListViewState::kClosed ||
target_state == AppListViewState::kFullscreenAllApps ||
target_state == AppListViewState::kFullscreenSearch);
}
// In the tablet mode, home launcher visibility state needs special handling,
// as app list view visibility does not match home launcher visibility. The
// app list view is always visible, but the home launcher may be obscured by
// app windows. The waiter interprets waits for kClosed state as waits
// "home launcher not visible" state - note that the app list view
// is actually expected to be in a visible state.
AppListViewState effective_target_state =
in_tablet_mode && target_state == AppListViewState::kClosed
? AppListViewState::kFullscreenAllApps
: target_state;
base::Optional<bool> target_home_launcher_visibility;
if (in_tablet_mode)
target_home_launcher_visibility = target_state != AppListViewState::kClosed;
// Don't wait if the launcher is already in the target state and not
// animating.
auto* app_list_view =
Shell::Get()->app_list_controller()->presenter()->GetView();
bool animating =
app_list_view &&
app_list_view->GetWidget()->GetLayer()->GetAnimator()->is_animating();
bool at_target_state =
(!app_list_view && effective_target_state == AppListViewState::kClosed) ||
(app_list_view &&
app_list_view->app_list_state() == effective_target_state);
if (at_target_state && !animating) {
// In tablet mode, ensure that the home launcher is in the expected state.
if (target_home_launcher_visibility.has_value()) {
return WaitForHomeLauncherState(*target_home_launcher_visibility,
std::move(closure));
}
std::move(closure).Run();
return true;
}
// In tablet mode, ensure that the home launcher is in the expected state.
base::OnceClosure callback =
target_home_launcher_visibility.has_value()
? base::BindOnce(base::IgnoreResult(&WaitForHomeLauncherState),
*target_home_launcher_visibility, std::move(closure))
: std::move(closure);
if (at_target_state)
return WaitForLauncherAnimation(std::move(callback));
new LauncherStateWaiter(
target_state,
base::BindOnce(base::IgnoreResult(&WaitForLauncherAnimation),
std::move(callback)));
return false;
}
} // namespace ash
| 7,407 | 2,264 |
/*
MIT LICENSE
Copyright 2014-2019 Inertial Sense, Inc. - http://inertialsense.com
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.
*/
#include <asf.h>
#include <string>
#include <stream_buffer.h>
#include "sd_mmc_mem.h"
#include "wifi.h"
#include "xbee.h"
#include "globals.h"
#include "communications.h"
#include "user_interface.h"
#include "sd_card_logger.h"
#include "control_law.h"
#undef printf
#define printf(...)
#define printf_mutex(...)
// RTOS Task Configuration
#define TASK_COMM_PERIOD_MS 1
#define TASK_LOGGER_PERIOD_MS 1
#define TASK_WIFI_PERIOD_MS 10
#define TASK_MAINT_PERIOD_MS 10
#define TASK_MAINT_SLOW_SEC_PERIOD_MS 1000
// #define TASK_COMM_STACK_SIZE (4096/sizeof(portSTACK_TYPE))
#define TASK_COMM_STACK_SIZE (8192/sizeof(portSTACK_TYPE))
#define TASK_MAINT_STACK_SIZE (4096/sizeof(portSTACK_TYPE))
// #define TASK_LOGGER_STACK_SIZE (4096/sizeof(portSTACK_TYPE))
#define TASK_LOGGER_STACK_SIZE (8192/sizeof(portSTACK_TYPE))
#define TASK_WIFI_STACK_SIZE (2048/sizeof(portSTACK_TYPE))
#define TASK_COMM_PRIORITY (tskIDLE_PRIORITY + 4) // Highest
#define TASK_LOGGER_PRIORITY (tskIDLE_PRIORITY + 3)
#define TASK_WIFI_PRIORITY (tskIDLE_PRIORITY + 2)
#define TASK_MAINT_PRIORITY (tskIDLE_PRIORITY + 1)
#include "CAN.h"
static void vTaskComm(void *pvParameters)
{
UNUSED(pvParameters);
rtos_task_t *task = &g_rtos.task[EVB_TASK_COMMUNICATIONS];
static is_comm_instance_t comm;
static uint8_t comm_buffer[PKT_BUF_SIZE];
is_comm_init(&comm, comm_buffer, PKT_BUF_SIZE);
#ifdef CONF_BOARD_CAN_TEST
//if(/*g_can_test == CAN_TEST_MASTER - or something like that*/ 1)
//mcan_test_master();
if(/*g_can_test == CAN_TEST_SLAVE - or something like that*/ 1)
mcan_test_slave();
#endif
// Start USB CDC after everything is running
#ifdef USB_PORT_NUM
serInit(USB_PORT_NUM, 0, NULL, 0);
#endif
vTaskDelay(200);
refresh_CFG_LED();
while(1)
{
vTaskDelay(task->periodMs);
g_comm_time_ms = time_msec();
#ifdef ENABLE_WDT
// Feed Watchdog to prevent reset
wdt_restart(WDT);
#endif
// Turn off communications LEDs - first thing after vTaskDelay()
LED_OFF(LED_INS_RXD_PIN);
LED_OFF(LED_INS_TXD_PIN);
// Forward data between communications ports
step_com_bridge(comm);
velocity_control(comm);
// Read buttons and update LEDs
step_user_interface();
//////////////////////////////////////////////////////////////////////////
// Suggested USER CODE Section
// Update period: 1ms (Adjust by changing TASK_COMM_PERIOD_MS)
// Priority: high
//
// Ensure code added here does not run longer than 1ms. Consider
// adding code to vTaskMaint if it runs longer than 1ms and does not
// require a high priority.
// Add code here...
//////////////////////////////////////////////////////////////////////////
}
}
/**
* \brief RTOS logger task.
*/
static void vTaskLogger(void *pvParameters)
{
UNUSED(pvParameters);
rtos_task_t *task = &g_rtos.task[EVB_TASK_LOGGER];
static is_comm_instance_t comm;
static uint8_t comm_buffer[PKT_BUF_SIZE];
is_comm_init(&comm, comm_buffer, PKT_BUF_SIZE);
uINS_stream_stop_all(comm);
vTaskDelay(200);
LED_LOG_OFF();
vTaskDelay(800);
#if STREAM_INS_FOR_TIME_SYNC // Stream INS message on startup. Necessary to update EVB RTC for correct data log date and time.
//uINS0_stream_stop_all(comm);
//uINS0_stream_enable_std(comm);
#endif
cISLogger logger;
for (;;)
{
vTaskDelay(task->periodMs);
step_logger_control(logger, comm);
// Ready uINS data from com task. Log to file.
log_uINS_data(logger, comm);
// Mount/unmount SD card
sd_card_maintenance();
update_led_log();
}
}
/**
* \brief RTOS maintenance task.
*/
static void vTaskMaint(void *pvParameters)
{
UNUSED(pvParameters);
rtos_task_t *task = &g_rtos.task[EVB_TASK_MAINTENANCE];
uint32_t m2sPeriodMs = 0;
for (;;)
{
vTaskDelay(task->periodMs);
//////////////////////////////////////////////////////////////////////////
// Fast Maintenance - 10ms period
//////////////////////////////////////////////////////////////////////////
// Suggested USER CODE Section
// Update period: 10ms (Adjust by changing TASK_MAINT_PERIOD_MS)
// Priority: low
//
// Consider adding code to vTaskComm if it needs to run faster than every
// 10ms or requires a higher priority.
// Add code here...
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
// Slow Maintenance - 1000ms period
if ((m2sPeriodMs += TASK_MAINT_PERIOD_MS) < TASK_MAINT_SLOW_SEC_PERIOD_MS || g_loggerEnabled)
{
continue;
}
m2sPeriodMs = 0;
// Sync local time from uINS
time_sync_from_uINS();
nvr_slow_maintenance();
// Update RTOS stats
if (g_enRtosStats)
{
rtos_monitor(EVB_RTOS_NUM_TASKS);
}
if (g_uInsBootloaderEnableTimeMs)
{ // uINS bootloader mode enabled
if ( (g_comm_time_ms-g_uInsBootloaderEnableTimeMs) > 180000 )
{ // Automatically disable uINS after 3 minutes
g_uInsBootloaderEnableTimeMs = 0;
}
}
//////////////////////////////////////////////////////////////////////////
// Suggested USER CODE Section
// Update period: 1000ms (Adjust by changing TASK_MAINT_SUB_TASK_PERIOD_MS)
// Priority: low
//
// Consider adding code to vTaskComm if it needs to run faster than every
// 10ms or requires a higher priority.
// Add code here...
//////////////////////////////////////////////////////////////////////////
}
}
int main(void)
{
//XDMAC channel interrupt enables do not get cleared by a software reset. Clear them before they cause issues.
XDMAC->XDMAC_GID = 0xFFFFFFFF;
for(int i=0;i<XDMACCHID_NUMBER;i++)
XDMAC->XDMAC_CHID[i].XDMAC_CID = 0xFFFFFFFF;
// Force USB to disconnect. Helps to make sure the USB port starts up correctly when debugging.
udc_stop();
// Initialize the SAM system
board_init();
// Init globals and flash parameters
globals_init();
nvr_init();
// Hold config while resetting
if(!ioport_get_pin_level(BUTTON_CFG_PIN))
{
g_flashCfg->cbPreset = EVB2_CB_PRESET_DEFAULT;
}
// Init hardware I/O, SD card logger, and communications
board_IO_config();
init_control();
sd_card_logger_init();
communications_init();
// Create RTOS tasks
createTask(EVB_TASK_COMMUNICATIONS, vTaskComm, "COMM", TASK_COMM_STACK_SIZE, NULL, TASK_COMM_PRIORITY, TASK_COMM_PERIOD_MS);
createTask(EVB_TASK_LOGGER, vTaskLogger,"LOGGER", TASK_LOGGER_STACK_SIZE, NULL, TASK_LOGGER_PRIORITY, TASK_LOGGER_PERIOD_MS);
#ifdef CONF_BOARD_SPI_ATWINC_WIFI // ATWINC WIFI
createTask(EVB_TASK_WIFI, vTaskWiFi, "WIFI", TASK_WIFI_STACK_SIZE, NULL, TASK_WIFI_PRIORITY, TASK_WIFI_PERIOD_MS);
#endif
createTask(EVB_TASK_MAINTENANCE, vTaskMaint, "MAINT", TASK_MAINT_STACK_SIZE, NULL, TASK_MAINT_PRIORITY, TASK_MAINT_PERIOD_MS);
strncpy(g_rtos.task[EVB_TASK_IDLE].name, "IDLE", MAX_TASK_NAME_LEN);
strncpy(g_rtos.task[EVB_TASK_TIMER].name, "TIMER", MAX_TASK_NAME_LEN);
strncpy(g_rtos.task[EVB_TASK_SPI_UINS_COM].name,"INSSPI", MAX_TASK_NAME_LEN);
#ifdef ENABLE_WDT
// Setup Watchdog
uint32_t timeout_value = wdt_get_timeout_value(1000000, BOARD_FREQ_SLCK_XTAL); //Timeout in us, configured for 1 second.
wdt_init(WDT, WDT_MR_WDRSTEN | WDT_MR_WDDBGHLT, timeout_value, timeout_value);
#endif
// Start the scheduler
printf("Starting FreeRTOS\n\r");
vTaskStartScheduler((TaskHandle_t*)&g_rtos.task[EVB_TASK_IDLE].handle, (TaskHandle_t*)&g_rtos.task[EVB_TASK_TIMER].handle);
// Will only get here if there was insufficient memory to create the idle task.
return 0;
}
| 9,139 | 3,524 |
#include "VigenerFrequencyAnalysis.h"
VigenerFrequencyAnalysis::VigenerFrequencyAnalysis(std::string pathIn, std::string pathOut,
std::string pathExample, int keySize) {
finEncrypt_.open(pathIn);
finExample_.open(pathExample);
foutOutput_.open(pathOut);
keySize_ = keySize;
}
VigenerFrequencyAnalysis::~VigenerFrequencyAnalysis() {
finExample_.close();
finEncrypt_.close();
foutOutput_.close();
}
int VigenerFrequencyAnalysis::getMax(std::map<unsigned char, double> statistic) {
double max = -1.000;
int symbol = 0;
for (auto it = statistic.begin(); it != statistic.end(); it++) {
if (max < it->second) {
max = it->second;
symbol = it->first;
}
}
return symbol;
}
std::map<unsigned char, double> VigenerFrequencyAnalysis::getStatistics(std::ifstream &file, int start, int step) {
file.clear();
file.seekg(0, std::ios::beg);
std::map<unsigned char, double> statistics;
int symbol = 0;
int count = -1;
while ((symbol = file.get()) != EOF) {
count++;
if (count != start)
continue;
start += step;
if (statistics.find(symbol) == statistics.end())
statistics.insert(std::pair<unsigned char, double>(symbol, 1.000));
else
statistics[symbol]++;
}
for (auto it = statistics.begin(); it != statistics.end(); ++it)
it->second = ((it->second * 100.000) / (double) count);
return statistics;
}
std::string VigenerFrequencyAnalysis::decipherByAnalisis() {
if (!finExample_.is_open())
std::cout << "example file can't open" << std::endl;
else {
std::map<unsigned char, double> statisticExample = getStatistics(finExample_, 0, 1);
int maxSymbolExamle = getMax(statisticExample);
std::string key = "";
for (int i = 0; i < keySize_; i++) {
std::map<unsigned char, double> statisticEncrypt = getStatistics(finEncrypt_, i, keySize_);
int maxSymbolEncrypt = getMax(statisticEncrypt);
int newSymbolInKey = (maxSymbolEncrypt - maxSymbolExamle - 32) % 223;
while(newSymbolInKey < 0)
newSymbolInKey += 223;
key += (char) newSymbolInKey;
}
return key;
}
} | 2,339 | 741 |
#include <chrono>
#include <client/graphical/gui/gui_button.hpp>
using namespace familyline::graphics::gui;
using namespace familyline::input;
Button::Button(unsigned width, unsigned height, std::string text)
: width_(width), height_(height), label_(Label{1, 1, ""})
{
// We set the text after we set the resize callback, so we can get the
// text size correctly already when we build the button class
label_.setResizeCallback([&](Control* c, size_t w, size_t h) {
label_width_ = w;
label_height_ = h;
cairo_surface_destroy(l_canvas_);
cairo_destroy(l_context_);
l_canvas_ = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, w, h);
l_context_ = cairo_create(l_canvas_);
});
ControlAppearance ca = label_.getAppearance();
ca.fontFace = "Arial";
ca.fontSize = 20;
ca.foreground = {1.0, 1.0, 1.0, 1.0};
label_.setAppearance(ca);
ca.background = {0.0, 0.0, 0.0, 0.5};
ca.borderColor = {0.0, 0.0, 0.0, 1.0};
appearance_ = ca;
l_canvas_ = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
l_context_ = cairo_create(l_canvas_);
label_.update(l_context_, l_canvas_);
label_.setText(text);
}
bool Button::update(cairo_t* context, cairo_surface_t* canvas)
{
size_t label_x = width_ / 2 - label_width_ / 2;
size_t label_y = height_ / 2 - label_height_ / 2;
auto [br, bg, bb, ba] = this->appearance_.background;
auto [bor, bog, bob, boa] = this->appearance_.borderColor;
// draw the background
if (clicked_ ||
std::chrono::steady_clock::now() - last_click_ < std::chrono::milliseconds(100)) {
cairo_set_source_rgba(context, br, bg, bb, ba * 4);
} else if (hovered_) {
cairo_set_source_rgba(context, br, bg, bb, ba * 2);
} else {
cairo_set_source_rgba(context, br, bg, bb, ba);
}
cairo_set_operator(context, CAIRO_OPERATOR_SOURCE);
cairo_paint(context);
// draw a border
cairo_set_line_width(context, 6);
cairo_set_source_rgba(context, bor, bog, bob, boa);
cairo_rectangle(context, 0, 0, width_, height_);
cairo_stroke(context);
label_.update(l_context_, l_canvas_);
cairo_set_operator(context, CAIRO_OPERATOR_OVER);
cairo_set_source_surface(context, l_canvas_, label_x, label_y);
cairo_paint(context);
return true;
}
std::tuple<int, int> Button::getNeededSize(cairo_t* parent_context) const
{
return std::tie(width_, height_);
}
void Button::receiveEvent(const familyline::input::HumanInputAction& ev, CallbackQueue& cq)
{
if (std::holds_alternative<ClickAction>(ev.type)) {
auto ca = std::get<ClickAction>(ev.type);
clicked_ = ca.isPressed;
}
if (clicked_) {
click_active_ = true;
this->enqueueCallback(cq, click_cb_);
/// BUG: if the line below is uncommented, the game crashes, probably due to some
/// cross-thread access.
///
/// Maybe make the GUI run in its own thread, and run the callbacks on the main thread.
// click_fut_ = std::async(this->click_cb_, this);
clicked_ = false;
}
// Separating the click action (the clicked_ variable) from the "is clicked" question
// allows us to set the last click only when the user releases the click. This is a better
// and more reliable way than activating it on the button down event, or when the clicked_
// is false
if (click_active_) {
if (!clicked_) {
last_click_ = std::chrono::steady_clock::now();
click_active_ = false;
}
}
}
void Button::setText(std::string v) { label_.setText(v); }
Button::~Button()
{
cairo_surface_destroy(l_canvas_);
cairo_destroy(l_context_);
}
| 3,794 | 1,350 |
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#include "tensorflow/core/platform/file_system_helper.h"
#include <deque>
#include <string>
#include <vector>
#include "tensorflow/core/platform/env.h"
#include "tensorflow/core/platform/file_system.h"
#include "tensorflow/core/platform/path.h"
#include "tensorflow/core/platform/platform.h"
#include "tensorflow/core/platform/status.h"
#include "tensorflow/core/platform/str_util.h"
#include "tensorflow/core/platform/threadpool.h"
namespace tensorflow {
namespace internal {
namespace {
constexpr int kNumThreads = 8;
// Run a function in parallel using a ThreadPool, but skip the ThreadPool
// on the iOS platform due to its problems with more than a few threads.
void ForEach(int first, int last, const std::function<void(int)>& f) {
#if TARGET_OS_IPHONE
for (int i = first; i < last; i++) {
f(i);
}
#else
int num_threads = std::min(kNumThreads, last - first);
thread::ThreadPool threads(Env::Default(), "ForEach", num_threads);
for (int i = first; i < last; i++) {
threads.Schedule([f, i] { f(i); });
}
#endif
}
} // namespace
Status GetMatchingPaths(FileSystem* fs, Env* env, const string& pattern,
std::vector<string>* results) {
results->clear();
// Find the fixed prefix by looking for the first wildcard.
string fixed_prefix = pattern.substr(0, pattern.find_first_of("*?[\\"));
string eval_pattern = pattern;
std::vector<string> all_files;
string dir(io::Dirname(fixed_prefix));
// If dir is empty then we need to fix up fixed_prefix and eval_pattern to
// include . as the top level directory.
if (dir.empty()) {
dir = ".";
fixed_prefix = io::JoinPath(dir, fixed_prefix);
eval_pattern = io::JoinPath(dir, pattern);
}
// Setup a BFS to explore everything under dir.
std::deque<string> dir_q;
dir_q.push_back(dir);
Status ret; // Status to return.
// children_dir_status holds is_dir status for children. It can have three
// possible values: OK for true; FAILED_PRECONDITION for false; CANCELLED
// if we don't calculate IsDirectory (we might do that because there isn't
// any point in exploring that child path).
std::vector<Status> children_dir_status;
while (!dir_q.empty()) {
string current_dir = dir_q.front();
dir_q.pop_front();
std::vector<string> children;
Status s = fs->GetChildren(current_dir, &children);
// In case PERMISSION_DENIED is encountered, we bail here.
if (s.code() == tensorflow::error::PERMISSION_DENIED) {
continue;
}
ret.Update(s);
if (children.empty()) continue;
// This IsDirectory call can be expensive for some FS. Parallelizing it.
children_dir_status.resize(children.size());
ForEach(0, children.size(),
[fs, ¤t_dir, &children, &fixed_prefix,
&children_dir_status](int i) {
const string child_path = io::JoinPath(current_dir, children[i]);
// In case the child_path doesn't start with the fixed_prefix then
// we don't need to explore this path.
if (!absl::StartsWith(child_path, fixed_prefix)) {
children_dir_status[i] = Status(tensorflow::error::CANCELLED,
"Operation not needed");
} else {
children_dir_status[i] = fs->IsDirectory(child_path);
}
});
for (size_t i = 0; i < children.size(); ++i) {
const string child_path = io::JoinPath(current_dir, children[i]);
// If the IsDirectory call was cancelled we bail.
if (children_dir_status[i].code() == tensorflow::error::CANCELLED) {
continue;
}
// If the child is a directory add it to the queue.
if (children_dir_status[i].ok()) {
dir_q.push_back(child_path);
}
all_files.push_back(child_path);
}
}
// Match all obtained files to the input pattern.
for (const auto& f : all_files) {
if (fs->Match(f, eval_pattern)) {
results->push_back(f);
}
}
return ret;
}
} // namespace internal
} // namespace tensorflow
| 4,743 | 1,454 |
#include "cv/Output.h"
void Output::display(Image *image) {
if (image->data.empty()) {
std::cerr << "Display Error: Image empty" << std::endl;
} else {
// Temp (imshow doesn't work without GUI. << Coprocessor error)
#ifdef COPROC
// Use other means of displaying image. (Web Stream)
#else
cv::imshow(image->name, image->data);
#endif
}
cv::waitKey(30);
} | 377 | 150 |
//========= Copyright οΏ½ Valve LLC, All rights reserved. =======================
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================
#include "cbase.h"
#include "nav_mesh/tf_nav_mesh.h"
#include "tf_team.h"
#include "tf_obj_teleporter.h"
#include "tf_obj_sentrygun.h"
#include "tf_populators.h"
#include "tf_population_manager.h"
#include "eventqueue.h"
#include "tier1/UtlSortVector.h"
#include "tf_objective_resource.h"
#include "tf_tank_boss.h"
#include "tf_mann_vs_machine_stats.h"
extern ConVar tf_populator_debug;
extern ConVar tf_populator_active_buffer_range;
ConVar tf_mvm_engineer_teleporter_uber_duration( "tf_mvm_engineer_teleporter_uber_duration", "5.0", FCVAR_CHEAT | FCVAR_DEVELOPMENTONLY );
ConVar tf_mvm_currency_bonus_ratio_min( "tf_mvm_currency_bonus_ratio_min", "0.95f", FCVAR_CHEAT | FCVAR_DEVELOPMENTONLY, "The minimum percentage of wave money players must collect in order to qualify for min bonus - 0.1 to 1.0. Half the bonus amount will be awarded when reaching min ratio, and half when reaching max.", true, 0.1, true, 1.0 );
ConVar tf_mvm_currency_bonus_ratio_max( "tf_mvm_currency_bonus_ratio_max", "1.f", FCVAR_CHEAT | FCVAR_DEVELOPMENTONLY, "The highest percentage of wave money players must collect in order to qualify for max bonus - 0.1 to 1.0. Half the bonus amount will be awarded when reaching min ratio, and half when reaching max.", true, 0.1, true, 1.0 );
static CHandle<CBaseEntity> s_lastTeleporter = NULL;
static float s_flLastTeleportTime = -1;
LINK_ENTITY_TO_CLASS( populator_internal_spawn_point, CPopulatorInternalSpawnPoint );
CHandle<CPopulatorInternalSpawnPoint> g_internalSpawnPoint = NULL;
class CTFNavAreaIncursionLess
{
public:
bool Less( const CTFNavArea *a, const CTFNavArea *b, void *pCtx )
{
return a->GetIncursionDistance( TF_TEAM_BLUE ) < b->GetIncursionDistance( TF_TEAM_BLUE );
}
};
//-----------------------------------------------------------------------------
// Purpose: Fire off output events
//-----------------------------------------------------------------------------
void FireEvent( EventInfo *eventInfo, const char *eventName )
{
if ( eventInfo )
{
CBaseEntity *targetEntity = gEntList.FindEntityByName( NULL, eventInfo->m_target );
if ( !targetEntity )
{
Warning( "WaveSpawnPopulator: Can't find target entity '%s' for %s\n", eventInfo->m_target.Access(), eventName );
}
else
{
g_EventQueue.AddEvent( targetEntity, eventInfo->m_action, 0.0f, NULL, NULL );
}
}
}
//-----------------------------------------------------------------------------
// Purpose: Create output event pairings
//-----------------------------------------------------------------------------
EventInfo *ParseEvent( KeyValues *data )
{
EventInfo *eventInfo = new EventInfo();
FOR_EACH_SUBKEY( data, pSubKey )
{
const char *pszKey = pSubKey->GetName();
if ( !Q_stricmp( pszKey, "Target" ) )
{
eventInfo->m_target.sprintf( "%s", pSubKey->GetString() );
}
else if ( !Q_stricmp( pszKey, "Action" ) )
{
eventInfo->m_action.sprintf( "%s", pSubKey->GetString() );
}
else
{
Warning( "Unknown field '%s' in WaveSpawn event definition.\n", pSubKey->GetString() );
delete eventInfo;
return NULL;
}
}
return eventInfo;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
SpawnLocationResult DoTeleporterOverride( CBaseEntity *spawnEnt, Vector *vSpawnPosition, bool bClosestPointOnNav )
{
CUtlVector<CBaseEntity *> activeTeleporters;
FOR_EACH_VEC( IBaseObjectAutoList::AutoList(), i )
{
CBaseObject *pObj = static_cast<CBaseObject *>( IBaseObjectAutoList::AutoList()[i] );
if ( pObj->GetType() != OBJ_TELEPORTER || pObj->GetTeamNumber() != TF_TEAM_MVM_BOTS )
continue;
if ( pObj->IsBuilding() || pObj->HasSapper() || pObj->IsDisabled() )
continue;
CObjectTeleporter *teleporter = assert_cast<CObjectTeleporter *>( pObj );
const CUtlStringList &teleportWhereNames = teleporter->m_TeleportWhere;
const char *pszSpawnPointName = STRING( spawnEnt->GetEntityName() );
for ( int iTelePoints =0; iTelePoints < teleportWhereNames.Count(); ++iTelePoints )
{
if ( !V_stricmp( teleportWhereNames[ iTelePoints ], pszSpawnPointName ) )
{
activeTeleporters.AddToTail( teleporter );
break;
}
}
}
if ( activeTeleporters.Count() > 0 )
{
int which = RandomInt( 0, activeTeleporters.Count() - 1 );
*vSpawnPosition = activeTeleporters[ which ]->WorldSpaceCenter();
s_lastTeleporter = activeTeleporters[ which ];
return SPAWN_LOCATION_TELEPORTER;
}
CTFNavArea *pArea = (CTFNavArea *)TheNavMesh->GetNearestNavArea( spawnEnt->WorldSpaceCenter() );
if ( pArea )
{
if ( bClosestPointOnNav )
{
pArea->GetClosestPointOnArea( spawnEnt->WorldSpaceCenter(), vSpawnPosition );
}
else
{
*vSpawnPosition = pArea->GetCenter();
}
return SPAWN_LOCATION_NORMAL;
}
return SPAWN_LOCATION_NOT_FOUND;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void OnBotTeleported( CTFBot *pBot )
{
if ( gpGlobals->curtime - s_flLastTeleportTime > 0.1f )
{
s_lastTeleporter->EmitSound( "MVM.Robot_Teleporter_Deliver" );
s_flLastTeleportTime = gpGlobals->curtime;
}
// force bot to face in the direction specified by the teleporter
Vector vForward;
AngleVectors( s_lastTeleporter->GetAbsAngles(), &vForward, NULL, NULL );
pBot->GetLocomotionInterface()->FaceTowards( pBot->GetAbsOrigin() + 50 * vForward );
// spy shouldn't get any effect from the teleporter
if ( !pBot->IsPlayerClass( TF_CLASS_SPY ) )
{
pBot->TeleportEffect();
// invading bots get uber while they leave their spawn so they don't drop their cash where players can't pick it up
float flUberTime = tf_mvm_engineer_teleporter_uber_duration.GetFloat();
pBot->m_Shared.AddCond( TF_COND_INVULNERABLE, flUberTime );
pBot->m_Shared.AddCond( TF_COND_INVULNERABLE_WEARINGOFF, flUberTime );
}
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
CSpawnLocation::CSpawnLocation()
{
m_nRandomSeed = RandomInt( 0, 9999 );
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
bool CSpawnLocation::Parse( KeyValues *data )
{
const char *pszKey = data->GetName();
const char *pszValue = data->GetString();
if ( !V_stricmp( pszKey, "Where" ) || !V_stricmp( pszKey, "ClosestPoint" ) )
{
if ( !V_stricmp( pszValue, "Ahead" ) )
{
m_eRelative = AHEAD;
}
else if ( !V_stricmp( pszValue, "Behind" ) )
{
m_eRelative = BEHIND;
}
else if ( !V_stricmp( pszValue, "Anywhere" ) )
{
m_eRelative = ANYWHERE;
}
else
{
m_bClosestPointOnNav = V_stricmp( pszKey, "ClosestPoint" ) == 0;
// collect entities with given name
bool bFound = false;
for ( int i=0; i < ITFTeamSpawnAutoList::AutoList().Count(); ++i )
{
CTFTeamSpawn *pTeamSpawn = static_cast<CTFTeamSpawn *>( ITFTeamSpawnAutoList::AutoList()[i] );
if ( !V_stricmp( STRING( pTeamSpawn->GetEntityName() ), pszValue ) )
{
m_TeamSpawns.AddToTail( pTeamSpawn );
bFound = true;
}
}
if ( !bFound )
{
Warning( "Invalid Where argument '%s'\n", pszValue );
return false;
}
}
return true;
}
return false;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
SpawnLocationResult CSpawnLocation::FindSpawnLocation( Vector *vSpawnPosition )
{
CUtlVector< CHandle<CTFTeamSpawn> > activeSpawns;
FOR_EACH_VEC( m_TeamSpawns, i )
{
if ( m_TeamSpawns[i]->IsDisabled() )
continue;
activeSpawns.AddToTail( m_TeamSpawns[i] );
}
if ( m_nSpawnCount >= activeSpawns.Count() )
{
m_nRandomSeed = RandomInt( 0, 9999 );
m_nSpawnCount = 0;
}
CUniformRandomStream randomSpawn;
randomSpawn.SetSeed( m_nRandomSeed );
activeSpawns.Shuffle( &randomSpawn );
if ( activeSpawns.Count() > 0 )
{
SpawnLocationResult result = DoTeleporterOverride( activeSpawns[ m_nSpawnCount ], vSpawnPosition, m_bClosestPointOnNav );
if ( result != SPAWN_LOCATION_NOT_FOUND )
{
m_nSpawnCount++;
return result;
}
}
CTFNavArea *spawnArea = SelectSpawnArea();
if ( spawnArea )
{
*vSpawnPosition = spawnArea->GetCenter();
return SPAWN_LOCATION_NORMAL;
}
return SPAWN_LOCATION_NOT_FOUND;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
CTFNavArea *CSpawnLocation::SelectSpawnArea( void ) const
{
VPROF_BUDGET( __FUNCTION__, "NextBot" );
if ( m_eRelative == UNDEFINED )
return nullptr;
CUtlSortVector<CTFNavArea *, CTFNavAreaIncursionLess> theaterAreas;
CUtlVector<INextBot *> bots;
TheNextBots().CollectAllBots( &bots );
CTFNavArea::MakeNewTFMarker();
FOR_EACH_VEC( bots, i )
{
CTFBot *pBot = ToTFBot( bots[i]->GetEntity() );
if ( pBot == nullptr )
continue;
if ( !pBot->IsAlive() )
continue;
if ( !pBot->GetLastKnownArea() )
continue;
CUtlVector<CTFNavArea *> nearbyAreas;
CollectSurroundingAreas( &nearbyAreas, pBot->GetLastKnownArea(), tf_populator_active_buffer_range.GetFloat() );
FOR_EACH_VEC( nearbyAreas, j )
{
CTFNavArea *pArea = nearbyAreas[i];
if ( !pArea->IsTFMarked() )
{
pArea->TFMark();
if ( pArea->IsPotentiallyVisibleToTeam( TF_TEAM_BLUE ) )
continue;
if ( !pArea->IsValidForWanderingPopulation() )
continue;
theaterAreas.Insert( pArea );
if ( tf_populator_debug.GetBool() )
TheNavMesh->AddToSelectedSet( pArea );
}
}
}
if ( theaterAreas.Count() == 0 )
{
if ( tf_populator_debug.GetBool() )
DevMsg( "%3.2f: SelectSpawnArea: Empty theater!\n", gpGlobals->curtime );
return nullptr;
}
for ( int i=0; i < 5; ++i )
{
int which = 0;
switch ( m_eRelative )
{
case AHEAD:
which = Max( RandomFloat( 0.0f, 1.0f ), RandomFloat( 0.0f, 1.0f ) ) * theaterAreas.Count();
break;
case BEHIND:
which = ( 1.0f - Max( RandomFloat( 0.0f, 1.0f ), RandomFloat( 0.0f, 1.0f ) ) ) * theaterAreas.Count();
break;
case ANYWHERE:
which = RandomFloat( 0.0f, 1.0f ) * theaterAreas.Count();
break;
}
if ( which >= theaterAreas.Count() )
which = theaterAreas.Count() - 1;
return theaterAreas[which];
}
return nullptr;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
CMissionPopulator::CMissionPopulator( CPopulationManager *pManager )
: m_pManager( pManager ), m_pSpawner( NULL )
{
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
CMissionPopulator::~CMissionPopulator()
{
if ( m_pSpawner )
{
delete m_pSpawner;
m_pSpawner = NULL;
}
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
bool CMissionPopulator::Parse( KeyValues *data )
{
int nWaveDuration = 99999;
FOR_EACH_SUBKEY( data, pSubKey )
{
const char *pszKey = pSubKey->GetName();
if ( !V_stricmp( pszKey, "Objective" ) )
{
if ( !V_stricmp( pSubKey->GetString(), "DestroySentries" ) )
{
m_eMission = CTFBot::MissionType::DESTROY_SENTRIES;
}
else if ( !V_stricmp( pSubKey->GetString(), "Sniper" ) )
{
m_eMission = CTFBot::MissionType::SNIPER;
}
else if ( !V_stricmp( pSubKey->GetString(), "Spy" ) )
{
m_eMission = CTFBot::MissionType::SPY;
}
else if ( !V_stricmp( pSubKey->GetString(), "Engineer" ) )
{
m_eMission = CTFBot::MissionType::ENGINEER;
}
else if ( !V_stricmp( pSubKey->GetString(), "SeekAndDestroy" ) )
{
m_eMission = CTFBot::MissionType::DESTROY_SENTRIES;
}
else
{
Warning( "Invalid mission '%s'\n", data->GetString() );
return false;
}
}
else if ( !V_stricmp( pszKey, "InitialCooldown" ) )
{
m_flInitialCooldown = data->GetFloat();
}
else if ( !V_stricmp( pszKey, "CooldownTime" ) )
{
m_flCooldownDuration = data->GetFloat();
}
else if ( !V_stricmp( pszKey, "BeginAtWave" ) )
{
m_nStartWave = data->GetInt() - 1;
}
else if ( !V_stricmp( pszKey, "RunForThisManyWaves" ) )
{
nWaveDuration = data->GetInt();
}
else if ( !V_stricmp( pszKey, "DesiredCount" ) )
{
m_nDesiredCount = data->GetInt();
}
else
{
m_pSpawner = IPopulationSpawner::ParseSpawner( this, pSubKey );
if ( m_pSpawner == NULL )
{
Warning( "Unknown attribute '%s' in Mission definition.\n", pszKey );
}
}
}
m_nEndWave = m_nStartWave + nWaveDuration;
return true;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CMissionPopulator::Update( void )
{
VPROF_BUDGET( __FUNCTION__, "NextBot" );
if ( TFGameRules()->InSetup() || TFObjectiveResource()->GetMannVsMachineIsBetweenWaves() )
{
m_eState = NOT_STARTED;
return;
}
if ( m_pManager->m_nCurrentWaveIndex < m_nStartWave || m_pManager->m_nCurrentWaveIndex >= m_nEndWave )
{
m_eState = NOT_STARTED;
return;
}
if ( m_eState == NOT_STARTED )
{
if ( m_flInitialCooldown > 0.0f )
{
m_eState = INITIAL_COOLDOWN;
m_cooldownTimer.Start( m_flInitialCooldown );
return;
}
m_eState = RUNNING;
m_cooldownTimer.Invalidate();
}
else if ( m_eState == INITIAL_COOLDOWN )
{
if ( !m_cooldownTimer.IsElapsed() )
{
return;
}
m_eState = RUNNING;
m_cooldownTimer.Invalidate();
}
if ( m_eMission == CTFBot::MissionType::DESTROY_SENTRIES )
{
UpdateMissionDestroySentries();
}
else if ( m_eMission >= CTFBot::MissionType::SNIPER && m_eMission <= CTFBot::MissionType::ENGINEER )
{
UpdateMission( m_eMission );
}
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CMissionPopulator::UnpauseSpawning( void )
{
m_cooldownTimer.Start( m_flCooldownDuration );
m_checkSentriesTimer.Start( RandomFloat( 5.0f, 10.0f ) );
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
bool CMissionPopulator::UpdateMission( CTFBot::MissionType mission )
{
VPROF_BUDGET( __FUNCTION__, "NextBot" );
// TODO: Move away from depending on players
CUtlVector<CTFPlayer *> bots;
CollectPlayers( &bots, TF_TEAM_MVM_BOTS, true );
int nActiveMissions = 0;
FOR_EACH_VEC( bots, i )
{
CTFBot *pBot = ToTFBot( bots[i] );
if ( pBot )
{
if ( pBot->HasMission( mission ) )
nActiveMissions++;
}
}
if ( g_pPopulationManager->IsSpawningPaused() )
return false;
if ( nActiveMissions > 0 )
{
m_cooldownTimer.Start( m_flCooldownDuration );
return false;
}
if ( !m_cooldownTimer.IsElapsed() )
return false;
int nCurrentBotCount = GetGlobalTeam( TF_TEAM_MVM_BOTS )->GetNumPlayers();
if ( nCurrentBotCount + m_nDesiredCount > k_nMvMBotTeamSize )
{
if ( tf_populator_debug.GetBool() )
{
DevMsg( "MANN VS MACHINE: %3.2f: Waiting for slots to spawn mission.\n", gpGlobals->curtime );
}
return false;
}
if ( tf_populator_debug.GetBool() )
{
DevMsg( "MANN VS MACHINE: %3.2f: <<<< Spawning Mission >>>>\n", gpGlobals->curtime );
}
int nSniperCount = 0;
FOR_EACH_VEC( bots, i )
{
CTFBot *pBot = ToTFBot( bots[i] );
if ( pBot && pBot->IsPlayerClass( TF_CLASS_SNIPER ) )
nSniperCount++;
}
for ( int i=0; i < m_nDesiredCount; ++i )
{
Vector vecSpawnPos;
SpawnLocationResult spawnLocationResult = m_where.FindSpawnLocation( &vecSpawnPos );
if ( spawnLocationResult != SPAWN_LOCATION_NOT_FOUND )
{
CUtlVector<EHANDLE> spawnedBots;
if ( m_pSpawner && m_pSpawner->Spawn( vecSpawnPos, &spawnedBots ) )
{
FOR_EACH_VEC( spawnedBots, j )
{
CTFBot *pBot = ToTFBot( spawnedBots[j] );
if ( pBot == NULL )
continue;
pBot->SetFlagTarget( NULL );
pBot->SetMission( mission );
if ( TFObjectiveResource() )
{
unsigned int iFlags = MVM_CLASS_FLAG_MISSION;
if ( pBot->IsMiniBoss() )
{
iFlags |= MVM_CLASS_FLAG_MINIBOSS;
}
if ( pBot->HasAttribute( CTFBot::AttributeType::ALWAYSCRIT ) )
{
iFlags |= MVM_CLASS_FLAG_ALWAYSCRIT;
}
TFObjectiveResource()->IncrementMannVsMachineWaveClassCount( m_pSpawner->GetClassIcon( j ), iFlags );
}
if ( TFGameRules()->IsMannVsMachineMode() )
{
if ( pBot->HasMission( CTFBot::MissionType::SNIPER ) )
{
nSniperCount++;
if ( nSniperCount == 1 )
TFGameRules()->HaveAllPlayersSpeakConceptIfAllowed( MP_CONCEPT_MVM_SNIPER_CALLOUT, TF_TEAM_MVM_BOTS );
}
}
if ( spawnLocationResult == SPAWN_LOCATION_TELEPORTER )
OnBotTeleported( pBot );
}
}
}
else if ( tf_populator_debug.GetBool() )
{
Warning( "MissionPopulator: %3.2f: Skipped a member - can't find a place to spawn\n", gpGlobals->curtime );
}
}
m_cooldownTimer.Start( m_flCooldownDuration );
return true;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
bool CMissionPopulator::UpdateMissionDestroySentries( void )
{
VPROF_BUDGET( __FUNCTION__, "NextBot" );
if ( !m_cooldownTimer.IsElapsed() || !m_checkSentriesTimer.IsElapsed() )
return false;
if ( g_pPopulationManager->IsSpawningPaused() )
return false;
m_checkSentriesTimer.Start( RandomFloat( 5.0f, 10.0f ) );
int nDmgLimit = 0;
int nKillLimit = 0;
m_pManager->GetSentryBusterDamageAndKillThreshold( nDmgLimit, nKillLimit );
CUtlVector<CObjectSentrygun *> dangerousSentries;
FOR_EACH_VEC( IBaseObjectAutoList::AutoList(), i )
{
CBaseObject *pObj = static_cast<CBaseObject *>( IBaseObjectAutoList::AutoList()[i] );
if ( pObj->ObjectType() != OBJ_SENTRYGUN )
continue;
if ( pObj->IsDisposableBuilding() )
continue;
if ( pObj->GetTeamNumber() != TF_TEAM_MVM_BOTS )
continue;
CTFPlayer *pOwner = pObj->GetOwner();
if ( pOwner )
{
int nDmgDone = pOwner->GetAccumulatedSentryGunDamageDealt();
int nKillsMade = pOwner->GetAccumulatedSentryGunKillCount();
if ( nDmgDone >= nDmgLimit || nKillsMade >= nKillLimit )
{
dangerousSentries.AddToTail( static_cast<CObjectSentrygun *>( pObj ) );
}
}
}
// TODO: Move away from depending on players
CUtlVector<CTFPlayer *> bots;
CollectPlayers( &bots, TF_TEAM_MVM_BOTS, true );
bool bSpawned = false;
FOR_EACH_VEC( dangerousSentries, i )
{
CObjectSentrygun *pSentry = dangerousSentries[i];
int nValidCount = 0;
FOR_EACH_VEC( bots, j )
{
CTFBot *pBot = ToTFBot( bots[j] );
if ( pBot )
{
if ( pBot->HasMission( CTFBot::MissionType::DESTROY_SENTRIES ) && pBot->GetMissionTarget() == pSentry )
break;
}
nValidCount++;
}
if ( nValidCount < bots.Count() )
continue;
Vector vecSpawnPos;
SpawnLocationResult spawnLocationResult = m_where.FindSpawnLocation( &vecSpawnPos );
if ( spawnLocationResult != SPAWN_LOCATION_NOT_FOUND )
{
CUtlVector<EHANDLE> spawnedBots;
if ( m_pSpawner && m_pSpawner->Spawn( vecSpawnPos, &spawnedBots ) )
{
if ( tf_populator_debug.GetBool() )
{
DevMsg( "MANN VS MACHINE: %3.2f: <<<< Spawning Sentry Busting Mission >>>>\n", gpGlobals->curtime );
}
FOR_EACH_VEC( spawnedBots, k )
{
CTFBot *pBot = ToTFBot( spawnedBots[k] );
if ( pBot == NULL )
continue;
bSpawned = true;
pBot->SetMission( CTFBot::MissionType::DESTROY_SENTRIES );
pBot->SetMissionTarget( pSentry );
pBot->SetFlagTarget( NULL );
pBot->SetBloodColor( DONT_BLEED );
pBot->Update();
pBot->GetPlayerClass()->SetCustomModel( "models/bots/demo/bot_sentry_buster.mdl", true );
pBot->UpdateModel();
if ( TFObjectiveResource() )
{
unsigned int iFlags = MVM_CLASS_FLAG_MISSION;
if ( pBot->IsMiniBoss() )
iFlags |= MVM_CLASS_FLAG_MINIBOSS;
if ( pBot->HasAttribute( CTFBot::AttributeType::ALWAYSCRIT ) )
iFlags |= MVM_CLASS_FLAG_ALWAYSCRIT;
TFObjectiveResource()->IncrementMannVsMachineWaveClassCount( m_pSpawner->GetClassIcon( k ), iFlags );
}
if ( TFGameRules() )
TFGameRules()->HaveAllPlayersSpeakConceptIfAllowed( MP_CONCEPT_MVM_SENTRY_BUSTER, TF_TEAM_MVM_BOTS );
if ( spawnLocationResult == SPAWN_LOCATION_TELEPORTER )
OnBotTeleported( pBot );
}
}
}
else if ( tf_populator_debug.GetBool() )
{
Warning( "MissionPopulator: %3.2f: Can't find a place to spawn a sentry destroying squad\n", gpGlobals->curtime );
}
}
if ( bSpawned )
{
float flCoolDown = m_flCooldownDuration;
CWave *pWave = m_pManager->GetCurrentWave();
if ( pWave )
{
pWave->m_nNumSentryBustersKilled++;
if ( TFGameRules() )
{
if ( pWave->m_nNumSentryBustersKilled > 1 )
{
TFGameRules()->BroadcastSound( 255, "Announcer.MVM_Sentry_Buster_Alert_Another" );
}
else
{
TFGameRules()->BroadcastSound( 255, "Announcer.MVM_Sentry_Buster_Alert" );
}
}
flCoolDown = m_flCooldownDuration + pWave->m_nNumSentryBustersKilled * m_flCooldownDuration;
pWave->m_nNumSentryBustersKilled = 0;;
}
m_cooldownTimer.Start( flCoolDown );
}
return bSpawned;
}
int CWaveSpawnPopulator::sm_reservedPlayerSlotCount = 0;
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
CWaveSpawnPopulator::CWaveSpawnPopulator( CPopulationManager *pManager )
: m_pManager( pManager ), m_pSpawner( NULL )
{
m_iMaxActive = 999;
m_nSpawnCount = 1;
m_iTotalCurrency = -1;
m_startWaveEvent = NULL;
m_firstSpawnEvent = NULL;
m_lastSpawnEvent = NULL;
m_doneEvent = NULL;
m_parentWave = NULL;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
CWaveSpawnPopulator::~CWaveSpawnPopulator()
{
if ( m_pSpawner )
{
delete m_pSpawner;
m_pSpawner = NULL;
}
delete m_startWaveEvent;
delete m_firstSpawnEvent;
delete m_lastSpawnEvent;
delete m_doneEvent;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
bool CWaveSpawnPopulator::Parse( KeyValues *data )
{
KeyValues *pTemplate = data->FindKey( "Template" );
if ( pTemplate )
{
KeyValues *pTemplateKV = m_pManager->GetTemplate( pTemplate->GetString() );
if ( pTemplateKV )
{
if ( !Parse( pTemplateKV ) )
return false;
}
else
{
Warning( "Unknown Template '%s' in WaveSpawn definition\n", pTemplate->GetString() );
}
}
FOR_EACH_SUBKEY( data, pSubKey )
{
if ( m_where.Parse( pSubKey ) )
continue;
const char *pszKey = pSubKey->GetName();
if ( !V_stricmp( pszKey, "TotalCount" ) )
{
m_iTotalCount = data->GetInt();
}
else if ( !V_stricmp( pszKey, "MaxActive" ) )
{
m_iMaxActive = data->GetInt();
}
else if ( !V_stricmp( pszKey, "SpawnCount" ) )
{
m_nSpawnCount = data->GetInt();
}
else if ( !V_stricmp( pszKey, "WaitBeforeStarting" ) )
{
m_flWaitBeforeStarting = data->GetFloat();
}
else if ( !V_stricmp( pszKey, "WaitBetweenSpawns" ) )
{
if ( m_flWaitBetweenSpawns != 0 && m_bWaitBetweenSpawnsAfterDeath )
{
Warning( "Already specified WaitBetweenSpawnsAfterDeath time, WaitBetweenSpawns won't be used\n" );
continue;
}
m_flWaitBetweenSpawns = data->GetFloat();
}
else if ( !V_stricmp( pszKey, "WaitBetweenSpawnsAfterDeath" ) )
{
if ( m_flWaitBetweenSpawns != 0 )
{
Warning( "Already specified WaitBetweenSpawns time, WaitBetweenSpawnsAfterDeath won't be used\n" );
continue;
}
m_bWaitBetweenSpawnsAfterDeath = true;
m_flWaitBetweenSpawns = data->GetFloat();
}
else if ( !V_stricmp( pszKey, "StartWaveWarningSound" ) )
{
m_startWaveWarningSound.sprintf( "%s", data->GetString() );
}
else if ( !V_stricmp( pszKey, "StartWaveOutput" ) )
{
m_startWaveEvent = ParseEvent( data );
}
else if ( !V_stricmp( pszKey, "FirstSpawnWarningSound" ) )
{
m_firstSpawnWarningSound.sprintf( "%s", data->GetString() );
}
else if ( !V_stricmp( pszKey, "FirstSpawnOutput" ) )
{
m_firstSpawnEvent = ParseEvent( data );
}
else if ( !V_stricmp( pszKey, "LastSpawnWarningSound" ) )
{
m_lastSpawnWarningSound.sprintf( "%s", data->GetString() );
}
else if ( !V_stricmp( pszKey, "LastSpawnOutput" ) )
{
m_lastSpawnEvent = ParseEvent( data );
}
else if ( !V_stricmp( pszKey, "DoneWarningSound" ) )
{
m_doneWarningSound.sprintf( "%s", data->GetString() );
}
else if ( !V_stricmp( pszKey, "DoneOutput" ) )
{
m_doneEvent = ParseEvent( data );
}
else if ( !V_stricmp( pszKey, "TotalCurrency" ) )
{
m_iTotalCurrency = data->GetInt();
}
else if ( !V_stricmp( pszKey, "Name" ) )
{
m_name = data->GetString();
}
else if ( !V_stricmp( pszKey, "WaitForAllSpawned" ) )
{
m_szWaitForAllSpawned = data->GetString();
}
else if ( !V_stricmp( pszKey, "WaitForAllDead" ) )
{
m_szWaitForAllDead = data->GetString();
}
else if ( !V_stricmp( pszKey, "Support" ) )
{
m_bLimitedSupport = !V_stricmp( data->GetString(), "Limited" );
m_bSupportWave = true;
}
else if ( !V_stricmp( pszKey, "RandomSpawn" ) )
{
m_bRandomSpawn = data->GetBool();
}
else
{
m_pSpawner = IPopulationSpawner::ParseSpawner( this, data );
if ( m_pSpawner == NULL )
{
Warning( "Unknown attribute '%s' in WaveSpawn definition.\n", pszKey );
}
}
m_iRemainingCurrency = m_iTotalCurrency;
m_iRemainingCount = m_iTotalCount;
}
return true;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CWaveSpawnPopulator::Update( void )
{
VPROF_BUDGET( __FUNCTION__, "NextBot" );
switch ( m_eState )
{
case PENDING:
{
m_timer.Start( m_flWaitBeforeStarting );
SetState( PRE_SPAWN_DELAY );
sm_reservedPlayerSlotCount = 0;
if ( m_startWaveWarningSound.Length() > 0 )
TFGameRules()->BroadcastSound( 255, m_startWaveWarningSound );
FireEvent( m_startWaveEvent, "StartWaveOutput" );
if ( tf_populator_debug.GetBool() )
{
DevMsg( "%3.2f: WaveSpawn(%s) started PRE_SPAWN_DELAY\n", gpGlobals->curtime, m_name.IsEmpty() ? "" : m_name.Get() );
}
}
break;
case PRE_SPAWN_DELAY:
{
if ( !m_timer.IsElapsed() )
return;
m_nNumSpawnedSoFar = 0;
m_nReservedPlayerSlots = 0;
SetState( SPAWNING );
if ( m_firstSpawnWarningSound.Length() > 0 )
TFGameRules()->BroadcastSound( 255, m_firstSpawnWarningSound );
FireEvent( m_firstSpawnEvent, "FirstSpawnOutput" );
if ( tf_populator_debug.GetBool() )
{
DevMsg( "%3.2f: WaveSpawn(%s) started SPAWNING\n", gpGlobals->curtime, m_name.IsEmpty() ? "" : m_name.Get() );
}
}
break;
case SPAWNING:
{
if ( !m_timer.IsElapsed() || g_pPopulationManager->IsSpawningPaused() )
return;
if ( !m_pSpawner )
{
Warning( "Invalid spawner\n" );
SetState( DONE );
return;
}
int nNumActive = 0;
FOR_EACH_VEC( m_activeSpawns, i )
{
if ( m_activeSpawns[i] && m_activeSpawns[i]->IsAlive() )
nNumActive++;
}
if ( m_bWaitBetweenSpawnsAfterDeath )
{
if ( nNumActive != 0 )
{
return;
}
else
{
if ( m_spawnLocationResult )
{
m_spawnLocationResult = SPAWN_LOCATION_NOT_FOUND;
if ( m_flWaitBetweenSpawns > 0 )
m_timer.Start( m_flWaitBetweenSpawns );
return;
}
}
}
if ( nNumActive >= m_iMaxActive )
return;
if ( m_nReservedPlayerSlots <= 0 )
{
if ( nNumActive - m_iMaxActive < m_nSpawnCount )
return;
int nTotalBotCount = GetGlobalTeam( TF_TEAM_MVM_BOTS )->GetNumPlayers();
if ( nTotalBotCount + m_nSpawnCount + sm_reservedPlayerSlotCount > k_nMvMBotTeamSize )
return;
sm_reservedPlayerSlotCount += m_nSpawnCount;
m_nReservedPlayerSlots = m_nSpawnCount;
}
Vector vecSpawnPos = vec3_origin;
if ( m_pSpawner && m_pSpawner->IsWhereRequired() )
{
if ( m_spawnLocationResult == SPAWN_LOCATION_NOT_FOUND || m_spawnLocationResult == SPAWN_LOCATION_TELEPORTER )
{
m_spawnLocationResult = m_where.FindSpawnLocation( &m_vecSpawnPosition );
if ( m_spawnLocationResult == SPAWN_LOCATION_NOT_FOUND )
return;
}
vecSpawnPos = m_vecSpawnPosition;
if ( m_bRandomSpawn )
m_spawnLocationResult = SPAWN_LOCATION_NOT_FOUND;
}
CUtlVector<EHANDLE> spawnedBots;
if ( m_pSpawner && m_pSpawner->Spawn( vecSpawnPos, &spawnedBots ) )
{
FOR_EACH_VEC( spawnedBots, i )
{
CTFBot *pBot = ToTFBot( spawnedBots[i] );
if ( pBot )
{
pBot->SetCurrency( 0 );
pBot->m_pWaveSpawnPopulator = this;
TFObjectiveResource()->SetMannVsMachineWaveClassActive( pBot->GetPlayerClass()->GetClassIconName() );
if ( m_bLimitedSupport )
pBot->m_bLimitedSupport = true;
if ( m_spawnLocationResult == SPAWN_LOCATION_TELEPORTER )
OnBotTeleported( pBot );
}
else
{
CTFTankBoss *pTank = dynamic_cast<CTFTankBoss *>( spawnedBots[i].Get() );
if ( pTank )
{
pTank->SetCurrencyValue( 0 );
pTank->SetWaveSpawnPopulator( this );
m_parentWave->m_nNumTanksSpawned++;
}
}
}
int nNumSpawned = spawnedBots.Count();
m_nNumSpawnedSoFar += nNumSpawned;
int nNumSlotsToFree = ( nNumSpawned <= m_nReservedPlayerSlots ) ? nNumSpawned : m_nReservedPlayerSlots;
m_nReservedPlayerSlots -= nNumSlotsToFree;
sm_reservedPlayerSlotCount -= nNumSlotsToFree;
FOR_EACH_VEC( spawnedBots, i )
{
CBaseEntity *pEntity = spawnedBots[i];
FOR_EACH_VEC( m_activeSpawns, j )
{
if ( m_activeSpawns[j] && m_activeSpawns[j]->entindex() == pEntity->entindex() )
{
Warning( "WaveSpawn duplicate entry in active vector\n" );
continue;
}
}
m_activeSpawns.AddToTail( pEntity );
}
if ( IsFinishedSpawning() )
{
SetState( WAIT_FOR_ALL_DEAD );
return;
}
if ( m_nReservedPlayerSlots <= 0 && !m_bWaitBetweenSpawnsAfterDeath )
{
m_spawnLocationResult = SPAWN_LOCATION_NOT_FOUND;
if ( m_flWaitBetweenSpawns > 0 )
m_timer.Start( m_flWaitBetweenSpawns );
}
return;
}
m_timer.Start( 1.0f );
}
break;
case WAIT_FOR_ALL_DEAD:
{
FOR_EACH_VEC( m_activeSpawns, i )
{
if ( m_activeSpawns[i] && m_activeSpawns[i]->IsAlive() )
return;
}
SetState( DONE );
}
break;
}
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CWaveSpawnPopulator::OnPlayerKilled( CTFPlayer *pPlayer )
{
m_activeSpawns.FindAndFastRemove( pPlayer );
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CWaveSpawnPopulator::ForceFinish( void )
{
if ( m_eState < WAIT_FOR_ALL_DEAD )
{
SetState( WAIT_FOR_ALL_DEAD );
}
else if ( m_eState != WAIT_FOR_ALL_DEAD )
{
SetState( DONE );
}
FOR_EACH_VEC( m_activeSpawns, i )
{
CTFBot *pBot = ToTFBot( m_activeSpawns[i] );
if ( pBot )
{
pBot->ChangeTeam( TEAM_SPECTATOR, false, true );
}
else
{
m_activeSpawns[i]->Remove();
}
}
m_activeSpawns.Purge();
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
int CWaveSpawnPopulator::GetCurrencyAmountPerDeath( void )
{
int nCurrency = 0;
if ( m_bSupportWave )
{
if ( m_eState == WAIT_FOR_ALL_DEAD )
m_iRemainingCount = m_activeSpawns.Count();
}
if ( m_iRemainingCurrency > 0 )
{
m_iRemainingCount = m_iRemainingCount <= 0 ? 1 : m_iRemainingCount;
nCurrency = m_iRemainingCurrency / m_iRemainingCount--;
m_iRemainingCurrency -= nCurrency;
}
return nCurrency;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
bool CWaveSpawnPopulator::IsFinishedSpawning( void )
{
if ( m_bSupportWave && !m_bLimitedSupport )
return false;
return ( m_nNumSpawnedSoFar >= m_iTotalCount );
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CWaveSpawnPopulator::OnNonSupportWavesDone( void )
{
if ( m_bSupportWave )
{
switch ( m_eState )
{
case PENDING:
case PRE_SPAWN_DELAY:
SetState( DONE );
break;
case SPAWNING:
case WAIT_FOR_ALL_DEAD:
if ( TFGameRules() && ( m_iRemainingCurrency > 0 ) )
{
TFGameRules()->DistributeCurrencyAmount( m_iRemainingCurrency, NULL, true, true );
m_iRemainingCurrency = 0;
}
SetState( WAIT_FOR_ALL_DEAD );
break;
}
}
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CWaveSpawnPopulator::SetState( InternalStateType eState )
{
m_eState = eState;
if ( eState == WAIT_FOR_ALL_DEAD )
{
if ( m_lastSpawnWarningSound.Length() > 0 )
{
TFGameRules()->BroadcastSound( 255, m_lastSpawnWarningSound );
}
FireEvent( m_lastSpawnEvent, "LastSpawnOutput" );
if ( tf_populator_debug.GetBool() )
{
DevMsg( "%3.2f: WaveSpawn(%s) started WAIT_FOR_ALL_DEAD\n", gpGlobals->curtime, m_name.IsEmpty() ? "" : m_name.Get() );
}
}
else if ( eState == DONE )
{
if ( m_doneWarningSound.Length() > 0 )
{
TFGameRules()->BroadcastSound( 255, m_doneWarningSound );
}
FireEvent( m_doneEvent, "DoneOutput" );
if ( tf_populator_debug.GetBool() )
{
DevMsg( "%3.2f: WaveSpawn(%s) DONE\n", gpGlobals->curtime, m_name.IsEmpty() ? "" : m_name.Get() );
}
}
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
CPeriodicSpawnPopulator::CPeriodicSpawnPopulator( CPopulationManager *pManager )
: m_pManager( pManager ), m_pSpawner( NULL )
{
m_flMinInterval = 30.0f;
m_flMaxInterval = 30.0f;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
CPeriodicSpawnPopulator::~CPeriodicSpawnPopulator()
{
if ( m_pSpawner )
{
delete m_pSpawner;
m_pSpawner = NULL;
}
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
bool CPeriodicSpawnPopulator::Parse( KeyValues *data )
{
FOR_EACH_SUBKEY( data, pSubKey )
{
if ( m_where.Parse( pSubKey ) )
continue;
const char *pszKey = pSubKey->GetName();
if ( !V_stricmp( pszKey, "When" ) )
{
if ( pSubKey->GetFirstSubKey() )
{
FOR_EACH_SUBKEY( pSubKey, pWhenSubKey )
{
if ( !V_stricmp( pWhenSubKey->GetName(), "MinInterval" ) )
{
m_flMinInterval = pWhenSubKey->GetFloat();
}
else if ( !V_stricmp( pWhenSubKey->GetName(), "MaxInterval" ) )
{
m_flMaxInterval = pWhenSubKey->GetFloat();
}
else
{
Warning( "Invalid field '%s' encountered in When\n", pWhenSubKey->GetName() );
return false;
}
}
}
else
{
m_flMinInterval = pSubKey->GetFloat();
m_flMaxInterval = m_flMinInterval;
}
}
else
{
m_pSpawner = IPopulationSpawner::ParseSpawner( this, pSubKey );
if ( m_pSpawner == NULL )
{
Warning( "Unknown attribute '%s' in PeriodicSpawn definition.\n", pszKey );
}
}
}
return true;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CPeriodicSpawnPopulator::PostInitialize( void )
{
m_timer.Start( RandomFloat( m_flMinInterval, m_flMaxInterval ) );
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CPeriodicSpawnPopulator::Update( void )
{
if ( !m_timer.IsElapsed() || g_pPopulationManager->IsSpawningPaused() )
return;
Vector vecSpawnPos;
SpawnLocationResult spawnLocationResult = m_where.FindSpawnLocation( &vecSpawnPos );
if ( spawnLocationResult != SPAWN_LOCATION_NOT_FOUND )
{
CUtlVector<EHANDLE> spawnedBots;
if ( m_pSpawner && m_pSpawner->Spawn( vecSpawnPos, &spawnedBots ) )
{
m_timer.Start( RandomFloat( m_flMinInterval, m_flMaxInterval ) );
FOR_EACH_VEC( spawnedBots, k )
{
CTFBot *pBot = ToTFBot( spawnedBots[k] );
if ( pBot && spawnLocationResult == SPAWN_LOCATION_TELEPORTER )
OnBotTeleported( pBot );
}
return;
}
}
m_timer.Start( 2.0f );
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CPeriodicSpawnPopulator::UnpauseSpawning( void )
{
m_timer.Start( RandomFloat( m_flMinInterval, m_flMaxInterval ) );
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
CRandomPlacementPopulator::CRandomPlacementPopulator( CPopulationManager *pManager )
: m_pManager( pManager ), m_pSpawner( NULL )
{
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
CRandomPlacementPopulator::~CRandomPlacementPopulator()
{
if ( m_pSpawner )
{
delete m_pSpawner;
m_pSpawner = NULL;
}
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
bool CRandomPlacementPopulator::Parse( KeyValues *data )
{
FOR_EACH_SUBKEY( data, pSubKey )
{
const char *pszKey = pSubKey->GetName();
if ( !V_stricmp( pszKey, "Count" ) )
{
m_iCount = pSubKey->GetInt();
}
else if ( !V_stricmp( pszKey, "MinimumSeparation" ) )
{
m_flMinSeparation = pSubKey->GetFloat();
}
else if ( !V_stricmp( pszKey, "NavAreaFilter" ) )
{
if ( !V_stricmp( pSubKey->GetString(), "SENTRY_SPOT" ) )
{
m_nNavAreaFilter = TF_NAV_SENTRY_SPOT;
}
else if ( !V_stricmp( pSubKey->GetString(), "SNIPER_SPOT" ) )
{
m_nNavAreaFilter = TF_NAV_SNIPER_SPOT;
}
else
{
Warning( "Unknown NavAreaFilter value '%s'\n", pSubKey->GetString() );
}
}
else
{
m_pSpawner = IPopulationSpawner::ParseSpawner( this, pSubKey );
if ( m_pSpawner == NULL )
{
Warning( "Unknown attribute '%s' in RandomPlacement definition.\n", pszKey );
}
}
}
return true;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CRandomPlacementPopulator::PostInitialize( void )
{
CUtlVector<CTFNavArea *> markedAreas;;
FOR_EACH_VEC( TheNavAreas, i )
{
CTFNavArea *pArea = (CTFNavArea *)TheNavAreas[i];
if ( pArea->HasTFAttributes( m_nNavAreaFilter ) )
markedAreas.AddToTail( pArea );
}
CUtlVector<CTFNavArea *> selectedAreas;
SelectSeparatedShuffleSet< CTFNavArea >( m_iCount, m_flMinSeparation, markedAreas, &selectedAreas );
if ( m_pSpawner )
{
FOR_EACH_VEC( selectedAreas, i )
{
m_pSpawner->Spawn( selectedAreas[i]->GetCenter() );
}
}
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
CWave::CWave( CPopulationManager *pManager )
: m_pManager( pManager ), m_pSpawner( NULL )
{
m_startWaveEvent = NULL;
m_doneEvent = NULL;
m_initWaveEvent = NULL;
m_bCheckBonusCreditsMin = true;
m_bCheckBonusCreditsMax = true;
m_doneTimer.Invalidate();
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
CWave::~CWave()
{
if ( m_pSpawner )
{
delete m_pSpawner;
m_pSpawner = NULL;
}
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
bool CWave::Parse( KeyValues *data )
{
FOR_EACH_SUBKEY( data, pSubKey )
{
const char *pszKey = pSubKey->GetName();
if ( !V_stricmp( pszKey, "WaveSpawn" ) )
{
CWaveSpawnPopulator *pWavePopulator = new CWaveSpawnPopulator( m_pManager );
if ( !pWavePopulator->Parse( pSubKey ) )
{
Warning( "Error reading WaveSpawn definition\n" );
return false;
}
if ( !pWavePopulator->m_bSupportWave )
m_nTotalEnemyCount += pWavePopulator->m_iTotalCount;
m_iTotalCurrency += pWavePopulator->m_iTotalCurrency;
pWavePopulator->m_parentWave = this;
m_WaveSpawns.AddToTail( pWavePopulator );
if ( pWavePopulator->GetSpawner() )
{
if ( pWavePopulator->GetSpawner()->IsVarious() )
{
for ( int i = 0; i < pWavePopulator->m_iTotalCount; ++i )
{
unsigned int iFlags = pWavePopulator->m_bSupportWave ? MVM_CLASS_FLAG_SUPPORT : MVM_CLASS_FLAG_NORMAL;
if ( pWavePopulator->GetSpawner()->IsMiniBoss( i ) )
iFlags |= MVM_CLASS_FLAG_MINIBOSS;
if ( pWavePopulator->GetSpawner()->HasAttribute( CTFBot::AttributeType::ALWAYSCRIT, i ) )
iFlags |= MVM_CLASS_FLAG_ALWAYSCRIT;
if ( pWavePopulator->m_bLimitedSupport )
iFlags |= MVM_CLASS_FLAG_SUPPORT_LIMITED;
AddClassType( pWavePopulator->GetSpawner()->GetClassIcon( i ), 1, iFlags );
}
}
else
{
unsigned int iFlags = pWavePopulator->m_bSupportWave ? MVM_CLASS_FLAG_SUPPORT : MVM_CLASS_FLAG_NORMAL;
if ( pWavePopulator->GetSpawner()->IsMiniBoss() )
iFlags |= MVM_CLASS_FLAG_MINIBOSS;
if ( pWavePopulator->GetSpawner()->HasAttribute( CTFBot::AttributeType::ALWAYSCRIT ) )
iFlags |= MVM_CLASS_FLAG_ALWAYSCRIT;
if ( pWavePopulator->m_bLimitedSupport )
iFlags |= MVM_CLASS_FLAG_SUPPORT_LIMITED;
AddClassType( pWavePopulator->GetSpawner()->GetClassIcon(), pWavePopulator->m_iTotalCount, iFlags );
}
}
}
else if ( !V_stricmp( pszKey, "Sound" ) )
{
m_soundName.sprintf( "%s", pSubKey->GetString() );
}
else if ( !V_stricmp( pszKey, "Description" ) )
{
m_description.sprintf( "%s", pSubKey->GetString() );
}
else if ( !V_stricmp( pszKey, "WaitWhenDone" ) )
{
m_flWaitWhenDone = pSubKey->GetFloat();
}
else if ( !V_stricmp( pszKey, "Checkpoint" ) )
{
}
else if ( !V_stricmp( pszKey, "StartWaveOutput" ) )
{
m_startWaveEvent = ParseEvent( pSubKey );
}
else if ( !V_stricmp( pszKey, "DoneOutput" ) )
{
m_doneEvent = ParseEvent( pSubKey );
}
else if ( !V_stricmp( pszKey, "InitWaveOutput" ) )
{
m_initWaveEvent = ParseEvent( pSubKey );
}
else
{
Warning( "Unknown attribute '%s' in Wave definition.\n", pszKey );
}
}
return true;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CWave::Update( void )
{
VPROF_BUDGET( __FUNCTION__, "NextBot" );
if ( TFGameRules()->State_Get() == GR_STATE_RND_RUNNING )
{
ActiveWaveUpdate();
}
else if ( TFGameRules()->State_Get() == GR_STATE_BETWEEN_RNDS || TFGameRules()->State_Get() == GR_STATE_TEAM_WIN )
{
WaveIntermissionUpdate();
}
if ( m_bEveryWaveSpawnDone && TFGameRules()->State_Get() == GR_STATE_RND_RUNNING )
{
if ( m_pManager->byte58A )
{
if ( m_pManager->ehandle58C && m_pManager->ehandle58C->IsAlive() )
return;
}
WaveCompleteUpdate();
}
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CWave::OnPlayerKilled( CTFPlayer *pPlayer )
{
FOR_EACH_VEC( m_WaveSpawns, i )
{
m_WaveSpawns[i]->OnPlayerKilled( pPlayer );
}
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
bool CWave::HasEventChangeAttributes( const char *pszEventName ) const
{
bool bHasEventChangeAttributes = false;
FOR_EACH_VEC( m_WaveSpawns, i )
{
bHasEventChangeAttributes |= m_WaveSpawns[i]->HasEventChangeAttributes( pszEventName );
}
return bHasEventChangeAttributes;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CWave::AddClassType( string_t iszClassIconName, int nCount, unsigned int iFlags )
{
int nIndex = -1;
FOR_EACH_VEC( m_WaveClassCounts, i )
{
WaveClassCount_t const &count = m_WaveClassCounts[i];
if ( ( count.iszClassIconName == iszClassIconName ) && ( count.iFlags & iFlags ) )
{
nIndex = i;
break;
}
}
if ( nIndex == -1 )
{
nIndex = m_WaveClassCounts.AddToTail( {0, iszClassIconName, MVM_CLASS_FLAG_NONE} );
}
m_WaveClassCounts[ nIndex ].nClassCount += nCount;
m_WaveClassCounts[ nIndex ].iFlags |= iFlags;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
CWaveSpawnPopulator *CWave::FindWaveSpawnPopulator( const char *name )
{
FOR_EACH_VEC( m_WaveSpawns, i )
{
CWaveSpawnPopulator *pPopulator = m_WaveSpawns[i];
if ( !V_stricmp( pPopulator->m_name, name ) )
return pPopulator;
}
return nullptr;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CWave::ForceFinish()
{
FOR_EACH_VEC( m_WaveSpawns, i )
{
m_WaveSpawns[i]->ForceFinish();
}
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CWave::ForceReset()
{
m_bStarted = false;
m_bFiredInitWaveOutput = false;
m_bEveryWaveSpawnDone = false;
m_flStartTime = 0;
m_doneTimer.Invalidate();
FOR_EACH_VEC( m_WaveSpawns, i )
{
m_WaveSpawns[i]->m_iRemainingCurrency = m_WaveSpawns[i]->m_iTotalCurrency;
m_WaveSpawns[i]->m_iRemainingCount = m_WaveSpawns[i]->m_iTotalCount;
m_WaveSpawns[i]->m_eState = CWaveSpawnPopulator::PENDING;
}
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
bool CWave::IsDoneWithNonSupportWaves( void )
{
FOR_EACH_VEC( m_WaveSpawns, i )
{
CWaveSpawnPopulator *pPopulator = m_WaveSpawns[i];
if ( pPopulator->m_bSupportWave && pPopulator->m_eState != CWaveSpawnPopulator::DONE )
return false;
}
return true;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CWave::ActiveWaveUpdate( void )
{
VPROF_BUDGET( __FUNCTION__, "NextBot" );
if ( !m_bStarted )
{
if ( m_pManager->IsInEndlessWaves() && m_flStartTime > gpGlobals->curtime )
return;
m_bStarted = true;
FireEvent( m_startWaveEvent, "StartWaveOutput" );
if ( m_soundName.Length() > 0 )
TFGameRules()->BroadcastSound( 255, m_soundName );
m_pManager->AdjustMinPlayerSpawnTime();
}
m_bEveryWaveSpawnDone = true;
FOR_EACH_VEC( m_WaveSpawns, i )
{
CWaveSpawnPopulator *pPopulator = m_WaveSpawns[i];
bool bWaiting = false;
if ( !pPopulator->m_szWaitForAllSpawned.IsEmpty() )
{
FOR_EACH_VEC( m_WaveSpawns, j )
{
CWaveSpawnPopulator *pWaitingPopulator = m_WaveSpawns[j];
if ( pWaitingPopulator == NULL )
continue;
if ( V_stricmp( pWaitingPopulator->m_name, pPopulator->m_szWaitForAllSpawned ) )
continue;
if ( pWaitingPopulator->m_eState <= CWaveSpawnPopulator::SPAWNING )
{
bWaiting = true;
break;
}
}
}
if ( !bWaiting && !pPopulator->m_szWaitForAllDead.IsEmpty() )
{
FOR_EACH_VEC( m_WaveSpawns, j )
{
CWaveSpawnPopulator *pWaitingPopulator = m_WaveSpawns[j];
if ( pWaitingPopulator == NULL )
continue;
if ( V_stricmp( pWaitingPopulator->m_name, pPopulator->m_szWaitForAllSpawned ) )
continue;
if ( pWaitingPopulator->m_eState != CWaveSpawnPopulator::DONE )
{
bWaiting = true;
break;
}
}
}
if ( bWaiting )
continue;
pPopulator->Update();
m_bEveryWaveSpawnDone &= ( pPopulator->m_eState == CWaveSpawnPopulator::DONE );
}
if ( IsDoneWithNonSupportWaves() )
{
FOR_EACH_VEC( m_WaveSpawns, i )
{
m_WaveSpawns[i]->OnNonSupportWavesDone();
}
for ( int i = 0; i <= gpGlobals->maxClients; ++i )
{
CTFPlayer *pPlayer = ToTFPlayer( UTIL_PlayerByIndex( i ) );
if ( !pPlayer || !pPlayer->IsAlive() )
continue;
if ( pPlayer->GetTeamNumber() != TF_TEAM_MVM_BOTS )
continue;
pPlayer->CommitSuicide( true );
}
}
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CWave::WaveCompleteUpdate( void )
{
FireEvent( m_doneEvent, "DoneOutput" );
bool bAdvancedPopfile = ( g_pPopulationManager ? g_pPopulationManager->IsAdvanced() : false );
IGameEvent *event = gameeventmanager->CreateEvent( "mvm_wave_complete" );
if ( event )
{
event->SetBool( "advanced", bAdvancedPopfile );
gameeventmanager->FireEvent( event );
}
if ( TFGameRules() && TFGameRules()->IsMannVsMachineMode() && bAdvancedPopfile )
{
CTeamControlPointMaster *pMaster = g_hControlPointMasters.Count() ? g_hControlPointMasters[0] : NULL;
if ( pMaster && ( pMaster->GetNumPoints() > 0 ) )
{
if ( pMaster->GetNumPointsOwnedByTeam( TF_TEAM_MVM_BOTS ) == pMaster->GetNumPoints() )
{
IGameEvent *event = gameeventmanager->CreateEvent( "mvm_adv_wave_complete_no_gates" );
if ( event )
{
event->SetInt( "index", m_pManager->m_nCurrentWaveIndex );
gameeventmanager->FireEvent( event );
}
}
}
}
if ( ( m_pManager->m_nCurrentWaveIndex + 1 ) >= m_pManager->m_Waves.Count() && !m_pManager->IsInEndlessWaves() )
{
m_pManager->MvMVictory();
if ( TFGameRules() )
{
/*if ( GTFGCClientSystem()->dword3B8 && GTFGCClientSystem()->dword3B8->dword10 == 1 )
TFGameRules()->BroadcastSound( 255, "Announcer.MVM_Manned_Up_Wave_End" );
else*/
TFGameRules()->BroadcastSound( 255, "Announcer.MVM_Final_Wave_End" );
TFGameRules()->BroadcastSound( 255, "music.mvm_end_last_wave" );
}
event = gameeventmanager->CreateEvent( "mvm_mission_complete" );
if ( event )
{
event->SetString( "mission", m_pManager->GetPopulationFilename() );
gameeventmanager->FireEvent( event );
}
}
else
{
if ( TFGameRules() )
{
TFGameRules()->BroadcastSound( 255, "Announcer.MVM_Wave_End" );
if ( m_nNumTanksSpawned >= 1 )
TFGameRules()->BroadcastSound( 255, "music.mvm_end_tank_wave" );
else if ( ( m_pManager->m_nCurrentWaveIndex + 1 ) >= ( m_pManager->m_Waves.Count() / 2 ) )
TFGameRules()->BroadcastSound( 255, "music.mvm_end_mid_wave" );
else
TFGameRules()->BroadcastSound( 255, "music.mvm_end_wave" );
}
}
CReliableBroadcastRecipientFilter filter;
UserMessageBegin( filter, "MVMAnnouncement" );
WRITE_CHAR( MVM_ANNOUNCEMENT_WAVE_COMPLETE );
WRITE_CHAR( m_pManager->m_nCurrentWaveIndex );
MessageEnd();
// Why does this care about the resource?
if ( TFObjectiveResource() )
{
CUtlVector<CTFPlayer *> players;
CollectPlayers( &players, TF_TEAM_MVM_PLAYERS );
FOR_EACH_VEC( players, i )
{
if ( !players[i]->IsAlive() )
players[i]->ForceRespawn();
players[i]->m_nAccumulatedSentryGunDamageDealt = 0;
players[i]->m_nAccumulatedSentryGunKillCount = 0;
}
}
m_pManager->WaveEnd( true );
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CWave::WaveIntermissionUpdate( void )
{
if ( !m_bFiredInitWaveOutput )
{
FireEvent( m_initWaveEvent, "InitWaveOutput" );
m_bFiredInitWaveOutput = true;
}
if ( m_upgradeAlertTimer.HasStarted() && m_upgradeAlertTimer.IsElapsed() )
{
if ( ( m_bCheckBonusCreditsMin || m_bCheckBonusCreditsMax ) && gpGlobals->curtime > m_flBonusCreditsTime )
{
int nWaveNum = m_pManager->m_nCurrentWaveIndex - 1;
int nDropped = MannVsMachineStats_GetDroppedCredits( nWaveNum );
int nAcquired = MannVsMachineStats_GetAcquiredCredits( nWaveNum, false );
float flRatioCollected = clamp( ( (float)nAcquired / (float)nDropped ), 0.1f, 1.f );
float flMinBonus = tf_mvm_currency_bonus_ratio_min.GetFloat();
float flMaxBonus = tf_mvm_currency_bonus_ratio_max.GetFloat();
if ( m_bCheckBonusCreditsMax && nDropped > 0 && flRatioCollected >= flMaxBonus )
{
int nAmount = TFGameRules()->CalculateCurrencyAmount_ByType( CURRENCY_WAVE_COLLECTION_BONUS );
TFGameRules()->DistributeCurrencyAmount( (float)nAmount * 0.5f, NULL, true, false, true );
TFGameRules()->BroadcastSound( 255, "Announcer.MVM_Bonus" );
IGameEvent *event = gameeventmanager->CreateEvent( "mvm_creditbonus_wave" );
if ( event )
{
gameeventmanager->FireEvent( event );
}
m_bCheckBonusCreditsMax = false;
m_upgradeAlertTimer.Reset();
}
if ( m_bCheckBonusCreditsMin && nDropped > 0 && flRatioCollected >= fminf( flMinBonus, flMaxBonus ) )
{
int nAmount = TFGameRules()->CalculateCurrencyAmount_ByType( CURRENCY_WAVE_COLLECTION_BONUS );
TFGameRules()->DistributeCurrencyAmount( (float)nAmount * 0.5f, NULL, true, false, true );
TFGameRules()->BroadcastSound( 255, "Announcer.MVM_Bonus" );
IGameEvent *event = gameeventmanager->CreateEvent( "mvm_creditbonus_wave" );
if ( event )
{
gameeventmanager->FireEvent( event );
}
m_bCheckBonusCreditsMin = false;
}
m_flBonusCreditsTime = gpGlobals->curtime + 0.25f;
}
}
if ( m_doneTimer.HasStarted() && m_doneTimer.IsElapsed() )
{
m_doneTimer.Invalidate();
m_pManager->StartCurrentWave();
}
}
| 55,600 | 23,437 |
#include <taiju/dfuds-trie.h>
namespace taiju {
UInt64 DfudsTrie::size() const
{
return sizeof(TrieType) + sizeof(UInt64) + dfuds_.size()
+ labels_.size() + is_terminals_.size();
}
void DfudsTrie::clear()
{
num_keys_ = 0;
dfuds_.clear();
labels_.clear();
is_terminals_.clear();
}
void DfudsTrie::swap(DfudsTrie *target)
{
std::swap(num_keys_, target->num_keys_);
dfuds_.swap(&target->dfuds_);
labels_.swap(&target->labels_);
is_terminals_.swap(&target->is_terminals_);
}
const void *DfudsTrie::map(Mapper mapper, bool checks_type)
{
DfudsTrie temp;
if (checks_type)
{
if (*mapper.map<TrieType>() != type())
TAIJU_THROW("failed to map DfudsTrie: wrong TrieType");
}
temp.num_keys_ = *mapper.map<UInt64>();
mapper = temp.dfuds_.map(mapper);
mapper = temp.labels_.map(mapper);
mapper = temp.is_terminals_.map(mapper);
swap(&temp);
return mapper.address();
}
void DfudsTrie::read(Reader reader, bool checks_type)
{
DfudsTrie temp;
if (checks_type)
{
TrieType trie_type;
reader.read(&trie_type);
if (trie_type != type())
TAIJU_THROW("failed to read DfudsTrie: wrong TrieType");
}
reader.read(&temp.num_keys_);
temp.dfuds_.read(reader);
temp.labels_.read(reader);
temp.is_terminals_.read(reader);
swap(&temp);
}
void DfudsTrie::write(Writer writer) const
{
writer.write(num_keys_);
dfuds_.write(writer);
labels_.write(writer);
is_terminals_.write(writer);
}
} // namespace taiju
| 1,437 | 634 |
#include "Map/MapMainCharacter.h"
#include "Map/DynamicTiles/DoorMapTile.h"
#include "Screens/MapScreen.h"
MapMainCharacter::MapMainCharacter(Map* map, Screen* screen) : MapMovableGameObject(map) {
m_screen = screen;
load();
m_isAlwaysUpdate = true;
}
MapMainCharacter::~MapMainCharacter() {
}
void MapMainCharacter::setCharacterCore(CharacterCore* core) {
m_core = core;
setPosition(m_core->getData().currentMapPosition);
}
void MapMainCharacter::update(const sf::Time& frameTime) {
m_previousFramePosition = getPosition();
handleInput();
sf::Vector2f nextPosition;
calculateNextPosition(frameTime, nextPosition);
checkCollisions(nextPosition);
MovableGameObject::update(frameTime);
updateAnimation(frameTime);
handleInteraction();
}
void MapMainCharacter::checkCollisions(const sf::Vector2f& nextPosition) {
const sf::FloatRect& bb = *getBoundingBox();
sf::FloatRect nextBoundingBoxX(nextPosition.x, bb.top, bb.width, bb.height);
sf::FloatRect nextBoundingBoxY(bb.left, nextPosition.y, bb.width, bb.height);
WorldCollisionQueryRecord rec;
auto const isMovingY = nextPosition.y != bb.top;
auto const isMovingX = nextPosition.x != bb.left;
auto const isMovingRight = nextPosition.x > bb.left;
auto const isMovingDown = nextPosition.y > bb.top;
if (!isMovingX && !isMovingY) return;
// should we use strategy 2: try y direction first, then x direction?
auto tryYfirst = false;
rec.boundingBox = nextBoundingBoxX;
rec.collisionDirection = isMovingRight ? CollisionDirection::Right : CollisionDirection::Left;
if (m_map->collides(rec)) {
if (std::abs(nextPosition.x - rec.safeLeft) > 5.f) {
tryYfirst = true;
}
}
if (!tryYfirst) {
// check for collision on x axis
rec.boundingBox = nextBoundingBoxX;
rec.collisionDirection = isMovingRight ? CollisionDirection::Right : CollisionDirection::Left;
if (isMovingX && m_map->collides(rec)) {
setAccelerationX(0.f);
setVelocityX(0.f);
if (!rec.noSafePos) {
setPositionX(rec.safeLeft);
nextBoundingBoxY.left = rec.safeLeft;
}
}
else {
nextBoundingBoxY.left = nextPosition.x;
}
// check for collision on y axis
rec.boundingBox = nextBoundingBoxY;
rec.collisionDirection = isMovingDown ? CollisionDirection::Down : CollisionDirection::Up;
if (isMovingY && m_map->collides(rec)) {
setAccelerationY(0.f);
setVelocityY(0.f);
if (!rec.noSafePos) {
setPositionY(rec.safeTop);
}
}
}
else {
// check for collision on y axis
rec.boundingBox = nextBoundingBoxY;
rec.collisionDirection = isMovingDown ? CollisionDirection::Down : CollisionDirection::Up;
if (isMovingY && m_map->collides(rec)) {
setAccelerationY(0.f);
setVelocityY(0.f);
if (!rec.noSafePos) {
setPositionY(rec.safeTop);
nextBoundingBoxX.top = rec.safeTop;
}
}
else {
nextBoundingBoxX.top = nextPosition.y;
}
// check for collision on x axis
rec.boundingBox = nextBoundingBoxX;
rec.collisionDirection = isMovingRight ? CollisionDirection::Right : CollisionDirection::Left;
if (isMovingX & m_map->collides(rec)) {
setAccelerationX(0.f);
setVelocityX(0.f);
if (!rec.noSafePos) {
setPositionX(rec.safeLeft);
}
}
}
}
void MapMainCharacter::render(sf::RenderTarget& target) {
MapMovableGameObject::render(target);
dynamic_cast<MapScreen*>(m_screen)->renderEquipment(target);
}
void MapMainCharacter::handleInput() {
sf::Vector2f currentAcceleration;
if (g_inputController->isDown()) {
currentAcceleration += sf::Vector2f(0.f, 1.f);
}
if (g_inputController->isUp()) {
currentAcceleration += sf::Vector2f(0.f, -1.f);
}
if (g_inputController->isLeft()) {
currentAcceleration += sf::Vector2f(-1.f, 0.f);
}
if (g_inputController->isRight()) {
currentAcceleration += sf::Vector2f(1.f, 0.f);
}
currentAcceleration *= WALK_ACCELERATION;
setAcceleration(currentAcceleration);
}
void MapMainCharacter::load() {
g_resourceManager->loadTexture(getSpritePath(), ResourceType::Map);
const sf::Texture* tex = g_resourceManager->getTexture(getSpritePath());
setBoundingBox(sf::FloatRect(0.f, 0.f, 18.f, 15.f));
setSpriteOffset(sf::Vector2f(-16.f, -35.f));
Animation* walkingAnimationDown = new Animation(sf::seconds(0.15f));
walkingAnimationDown->setSpriteSheet(tex);
walkingAnimationDown->addFrame(sf::IntRect(0, 0, 50, 50));
walkingAnimationDown->addFrame(sf::IntRect(50, 0, 50, 50));
walkingAnimationDown->addFrame(sf::IntRect(100, 0, 50, 50));
walkingAnimationDown->addFrame(sf::IntRect(50, 0, 50, 50));
addAnimation(GameObjectState::Walking_down, walkingAnimationDown);
Animation* walkingAnimationLeft = new Animation(sf::seconds(0.15f));
walkingAnimationLeft->setSpriteSheet(tex);
walkingAnimationLeft->addFrame(sf::IntRect(0, 50, 50, 50));
walkingAnimationLeft->addFrame(sf::IntRect(50, 50, 50, 50));
walkingAnimationLeft->addFrame(sf::IntRect(100, 50, 50, 50));
walkingAnimationLeft->addFrame(sf::IntRect(50, 50, 50, 50));
addAnimation(GameObjectState::Walking_left, walkingAnimationLeft);
Animation* walkingAnimationRight = new Animation(sf::seconds(0.15f));
walkingAnimationRight->setSpriteSheet(tex);
walkingAnimationRight->addFrame(sf::IntRect(0, 100, 50, 50));
walkingAnimationRight->addFrame(sf::IntRect(50, 100, 50, 50));
walkingAnimationRight->addFrame(sf::IntRect(100, 100, 50, 50));
walkingAnimationRight->addFrame(sf::IntRect(50, 100, 50, 50));
addAnimation(GameObjectState::Walking_right, walkingAnimationRight);
Animation* walkingAnimationUp = new Animation(sf::seconds(0.15f));
walkingAnimationUp->setSpriteSheet(tex);
walkingAnimationUp->addFrame(sf::IntRect(0, 150, 50, 50));
walkingAnimationUp->addFrame(sf::IntRect(50, 150, 50, 50));
walkingAnimationUp->addFrame(sf::IntRect(100, 150, 50, 50));
walkingAnimationUp->addFrame(sf::IntRect(50, 150, 50, 50));
addAnimation(GameObjectState::Walking_up, walkingAnimationUp);
Animation* idleAnimationDown = new Animation();
idleAnimationDown->setSpriteSheet(tex);
idleAnimationDown->addFrame(sf::IntRect(50, 0, 50, 50));
addAnimation(GameObjectState::Idle_down, idleAnimationDown);
Animation* idleAnimationLeft = new Animation();
idleAnimationLeft->setSpriteSheet(tex);
idleAnimationLeft->addFrame(sf::IntRect(50, 50, 50, 50));
addAnimation(GameObjectState::Idle_left, idleAnimationLeft);
Animation* idleAnimationRight = new Animation();
idleAnimationRight->setSpriteSheet(tex);
idleAnimationRight->addFrame(sf::IntRect(50, 100, 50, 50));
addAnimation(GameObjectState::Idle_right, idleAnimationRight);
Animation* idleAnimationUp = new Animation();
idleAnimationUp->setSpriteSheet(tex);
idleAnimationUp->addFrame(sf::IntRect(50, 150, 50, 50));
addAnimation(GameObjectState::Idle_up, idleAnimationUp);
setDebugBoundingBox(COLOR_WHITE);
// initial values
m_state = GameObjectState::Idle_down;
setCurrentAnimation(getAnimation(m_state), false);
playCurrentAnimation(true);
}
void MapMainCharacter::calculateUnboundedVelocity(const sf::Time& frameTime, sf::Vector2f& nextVel) const {
if (getAcceleration().x == 0.f) {
nextVel.x = 0.f;
}
else {
nextVel.x = (getVelocity().x + getAcceleration().x * frameTime.asSeconds());
}
if (getAcceleration().y == 0.f) {
nextVel.y = 0.f;
}
else {
nextVel.y = (getVelocity().y + getAcceleration().y * frameTime.asSeconds());
}
}
void MapMainCharacter::boundVelocity(sf::Vector2f& vel) const {
// check bounds
if (std::abs(vel.x) > getConfiguredMaxVelocityX() || std::abs(vel.y) > getConfiguredMaxVelocityX()) {
normalize(vel);
vel *= getConfiguredMaxVelocityX();
}
}
const sf::Vector2f& MapMainCharacter::getPreviousPosition() const {
return m_previousFramePosition;
}
float MapMainCharacter::getConfiguredMaxVelocityX() const {
return 200.f;
}
GameObjectType MapMainCharacter::getConfiguredType() const {
return _MapMovableGameObject;
}
std::string MapMainCharacter::getSpritePath() const {
if (!m_screen->getCharacterCore()->isConditionFulfilled("boss", "BossVelius")) {
return "res/texture/cendric/spritesheet_cendric_map.png";
}
return "res/texture/cendric/spritesheet_cendric_map_end.png";
} | 8,082 | 3,176 |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
Notes to self:
- at some point, strings will be accessible from JS, so we won't have to wrap
flavors in an nsISupportsCString. Until then, we're kinda stuck with
this crappy API of nsISupportsArrays.
*/
#include "nsTransferable.h"
#include "nsString.h"
#include "nsReadableUtils.h"
#include "nsTArray.h"
#include "nsIFormatConverter.h"
#include "nsIComponentManager.h"
#include "nsCOMPtr.h"
#include "nsXPCOM.h"
#include "nsISupportsPrimitives.h"
#include "nsMemory.h"
#include "nsPrimitiveHelpers.h"
#include "nsXPIDLString.h"
#include "nsDirectoryServiceDefs.h"
#include "nsDirectoryService.h"
#include "nsCRT.h"
#include "nsNetUtil.h"
#include "nsIOutputStream.h"
#include "nsIInputStream.h"
#include "nsIFile.h"
#include "nsILoadContext.h"
#include "nsAutoPtr.h"
NS_IMPL_ISUPPORTS1(nsTransferable, nsITransferable)
uint32_t GetDataForFlavor (const nsTArray<DataStruct>& aArray,
const char* aDataFlavor)
{
for (uint32_t i = 0 ; i < aArray.Length () ; ++i) {
if (aArray[i].GetFlavor().Equals (aDataFlavor))
return i;
}
return aArray.NoIndex;
}
//-------------------------------------------------------------------------
DataStruct::~DataStruct()
{
if (mCacheFileName) nsCRT::free(mCacheFileName);
//nsIFileSpec * cacheFile = GetFileSpec(mCacheFileName);
//cacheFile->Remove();
}
//-------------------------------------------------------------------------
void
DataStruct::SetData ( nsISupports* aData, uint32_t aDataLen )
{
// Now, check to see if we consider the data to be "too large"
if (aDataLen > kLargeDatasetSize) {
// if so, cache it to disk instead of memory
if ( NS_SUCCEEDED(WriteCache(aData, aDataLen)) )
return;
else
NS_WARNING("Oh no, couldn't write data to the cache file");
}
mData = aData;
mDataLen = aDataLen;
}
//-------------------------------------------------------------------------
void
DataStruct::GetData ( nsISupports** aData, uint32_t *aDataLen )
{
// check here to see if the data is cached on disk
if ( !mData && mCacheFileName ) {
// if so, read it in and pass it back
// ReadCache creates memory and copies the data into it.
if ( NS_SUCCEEDED(ReadCache(aData, aDataLen)) )
return;
else {
// oh shit, something went horribly wrong here.
NS_WARNING("Oh no, couldn't read data in from the cache file");
*aData = nullptr;
*aDataLen = 0;
return;
}
}
*aData = mData;
if ( mData )
NS_ADDREF(*aData);
*aDataLen = mDataLen;
}
//-------------------------------------------------------------------------
nsIFile*
DataStruct::GetFileSpec(const char * aFileName)
{
nsIFile* cacheFile;
NS_GetSpecialDirectory(NS_OS_TEMP_DIR, &cacheFile);
if (cacheFile == nullptr)
return nullptr;
// if the param aFileName contains a name we should use that
// because the file probably already exists
// otherwise create a unique name
if (!aFileName) {
cacheFile->AppendNative(NS_LITERAL_CSTRING("clipboardcache"));
cacheFile->CreateUnique(nsIFile::NORMAL_FILE_TYPE, 0600);
} else {
cacheFile->AppendNative(nsDependentCString(aFileName));
}
return cacheFile;
}
//-------------------------------------------------------------------------
nsresult
DataStruct::WriteCache(nsISupports* aData, uint32_t aDataLen)
{
// Get a new path and file to the temp directory
nsCOMPtr<nsIFile> cacheFile ( getter_AddRefs(GetFileSpec(mCacheFileName)) );
if (cacheFile) {
// remember the file name
if (!mCacheFileName) {
nsXPIDLCString fName;
cacheFile->GetNativeLeafName(fName);
mCacheFileName = nsCRT::strdup(fName);
}
// write out the contents of the clipboard
// to the file
//uint32_t bytes;
nsCOMPtr<nsIOutputStream> outStr;
NS_NewLocalFileOutputStream(getter_AddRefs(outStr),
cacheFile);
if (!outStr) return NS_ERROR_FAILURE;
void* buff = nullptr;
nsPrimitiveHelpers::CreateDataFromPrimitive ( mFlavor.get(), aData, &buff, aDataLen );
if ( buff ) {
uint32_t ignored;
outStr->Write(reinterpret_cast<char*>(buff), aDataLen, &ignored);
nsMemory::Free(buff);
return NS_OK;
}
}
return NS_ERROR_FAILURE;
}
//-------------------------------------------------------------------------
nsresult
DataStruct::ReadCache(nsISupports** aData, uint32_t* aDataLen)
{
// if we don't have a cache filename we are out of luck
if (!mCacheFileName)
return NS_ERROR_FAILURE;
// get the path and file name
nsCOMPtr<nsIFile> cacheFile ( getter_AddRefs(GetFileSpec(mCacheFileName)) );
bool exists;
if ( cacheFile && NS_SUCCEEDED(cacheFile->Exists(&exists)) && exists ) {
// get the size of the file
int64_t fileSize;
int64_t max32(LL_INIT(0, 0xFFFFFFFF));
cacheFile->GetFileSize(&fileSize);
if (fileSize > max32)
return NS_ERROR_OUT_OF_MEMORY;
uint32_t size;
LL_L2UI(size, fileSize);
// create new memory for the large clipboard data
nsAutoArrayPtr<char> data(new char[size]);
if ( !data )
return NS_ERROR_OUT_OF_MEMORY;
// now read it all in
nsCOMPtr<nsIInputStream> inStr;
NS_NewLocalFileInputStream( getter_AddRefs(inStr),
cacheFile);
if (!cacheFile) return NS_ERROR_FAILURE;
nsresult rv = inStr->Read(data, fileSize, aDataLen);
// make sure we got all the data ok
if (NS_SUCCEEDED(rv) && *aDataLen == size) {
nsPrimitiveHelpers::CreatePrimitiveForData ( mFlavor.get(), data, fileSize, aData );
return *aData ? NS_OK : NS_ERROR_FAILURE;
}
// zero the return params
*aData = nullptr;
*aDataLen = 0;
}
return NS_ERROR_FAILURE;
}
//-------------------------------------------------------------------------
//
// Transferable constructor
//
//-------------------------------------------------------------------------
nsTransferable::nsTransferable()
: mPrivateData(false)
#ifdef DEBUG
, mInitialized(false)
#endif
{
}
//-------------------------------------------------------------------------
//
// Transferable destructor
//
//-------------------------------------------------------------------------
nsTransferable::~nsTransferable()
{
}
NS_IMETHODIMP
nsTransferable::Init(nsILoadContext* aContext)
{
MOZ_ASSERT(!mInitialized);
if (aContext) {
mPrivateData = aContext->UsePrivateBrowsing();
}
#ifdef DEBUG
mInitialized = true;
#endif
return NS_OK;
}
//
// GetTransferDataFlavors
//
// Returns a copy of the internal list of flavors. This does NOT take into
// account any converter that may be registered. This list consists of
// nsISupportsCString objects so that the flavor list can be accessed from JS.
//
nsresult
nsTransferable::GetTransferDataFlavors(nsISupportsArray ** aDataFlavorList)
{
MOZ_ASSERT(mInitialized);
nsresult rv = NS_NewISupportsArray ( aDataFlavorList );
if (NS_FAILED(rv)) return rv;
for ( uint32_t i=0; i<mDataArray.Length(); ++i ) {
DataStruct& data = mDataArray.ElementAt(i);
nsCOMPtr<nsISupportsCString> flavorWrapper = do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID);
if ( flavorWrapper ) {
flavorWrapper->SetData ( data.GetFlavor() );
nsCOMPtr<nsISupports> genericWrapper ( do_QueryInterface(flavorWrapper) );
(*aDataFlavorList)->AppendElement( genericWrapper );
}
}
return NS_OK;
}
//
// GetTransferData
//
// Returns the data of the requested flavor, obtained from either having the data on hand or
// using a converter to get it. The data is wrapped in a nsISupports primitive so that it is
// accessible from JS.
//
NS_IMETHODIMP
nsTransferable::GetTransferData(const char *aFlavor, nsISupports **aData, uint32_t *aDataLen)
{
MOZ_ASSERT(mInitialized);
NS_ENSURE_ARG_POINTER(aFlavor && aData && aDataLen);
nsresult rv = NS_OK;
nsCOMPtr<nsISupports> savedData;
// first look and see if the data is present in one of the intrinsic flavors
uint32_t i;
for (i = 0; i < mDataArray.Length(); ++i ) {
DataStruct& data = mDataArray.ElementAt(i);
if ( data.GetFlavor().Equals(aFlavor) ) {
nsCOMPtr<nsISupports> dataBytes;
uint32_t len;
data.GetData(getter_AddRefs(dataBytes), &len);
if (len == kFlavorHasDataProvider && dataBytes) {
// do we have a data provider?
nsCOMPtr<nsIFlavorDataProvider> dataProvider = do_QueryInterface(dataBytes);
if (dataProvider) {
rv = dataProvider->GetFlavorData(this, aFlavor,
getter_AddRefs(dataBytes), &len);
if (NS_FAILED(rv))
break; // the provider failed. fall into the converter code below.
}
}
if (dataBytes && len > 0) { // XXXmats why is zero length not ok?
*aDataLen = len;
dataBytes.forget(aData);
return NS_OK;
}
savedData = dataBytes; // return this if format converter fails
break;
}
}
bool found = false;
// if not, try using a format converter to get the requested flavor
if ( mFormatConv ) {
for (i = 0; i < mDataArray.Length(); ++i) {
DataStruct& data = mDataArray.ElementAt(i);
bool canConvert = false;
mFormatConv->CanConvert(data.GetFlavor().get(), aFlavor, &canConvert);
if ( canConvert ) {
nsCOMPtr<nsISupports> dataBytes;
uint32_t len;
data.GetData(getter_AddRefs(dataBytes), &len);
if (len == kFlavorHasDataProvider && dataBytes) {
// do we have a data provider?
nsCOMPtr<nsIFlavorDataProvider> dataProvider = do_QueryInterface(dataBytes);
if (dataProvider) {
rv = dataProvider->GetFlavorData(this, aFlavor,
getter_AddRefs(dataBytes), &len);
if (NS_FAILED(rv))
break; // give up
}
}
mFormatConv->Convert(data.GetFlavor().get(), dataBytes, len, aFlavor, aData, aDataLen);
found = true;
break;
}
}
}
// for backward compatibility
if (!found) {
savedData.forget(aData);
*aDataLen = 0;
}
return found ? NS_OK : NS_ERROR_FAILURE;
}
//
// GetAnyTransferData
//
// Returns the data of the first flavor found. Caller is responsible for deleting the
// flavor string.
//
NS_IMETHODIMP
nsTransferable::GetAnyTransferData(char **aFlavor, nsISupports **aData, uint32_t *aDataLen)
{
MOZ_ASSERT(mInitialized);
NS_ENSURE_ARG_POINTER(aFlavor && aData && aDataLen);
for ( uint32_t i=0; i < mDataArray.Length(); ++i ) {
DataStruct& data = mDataArray.ElementAt(i);
if (data.IsDataAvailable()) {
*aFlavor = ToNewCString(data.GetFlavor());
data.GetData(aData, aDataLen);
return NS_OK;
}
}
return NS_ERROR_FAILURE;
}
//
// SetTransferData
//
//
//
NS_IMETHODIMP
nsTransferable::SetTransferData(const char *aFlavor, nsISupports *aData, uint32_t aDataLen)
{
MOZ_ASSERT(mInitialized);
NS_ENSURE_ARG(aFlavor);
// first check our intrinsic flavors to see if one has been registered.
uint32_t i = 0;
for (i = 0; i < mDataArray.Length(); ++i) {
DataStruct& data = mDataArray.ElementAt(i);
if ( data.GetFlavor().Equals(aFlavor) ) {
data.SetData ( aData, aDataLen );
return NS_OK;
}
}
// if not, try using a format converter to find a flavor to put the data in
if ( mFormatConv ) {
for (i = 0; i < mDataArray.Length(); ++i) {
DataStruct& data = mDataArray.ElementAt(i);
bool canConvert = false;
mFormatConv->CanConvert(aFlavor, data.GetFlavor().get(), &canConvert);
if ( canConvert ) {
nsCOMPtr<nsISupports> ConvertedData;
uint32_t ConvertedLen;
mFormatConv->Convert(aFlavor, aData, aDataLen, data.GetFlavor().get(), getter_AddRefs(ConvertedData), &ConvertedLen);
data.SetData(ConvertedData, ConvertedLen);
return NS_OK;
}
}
}
// Can't set data neither directly nor through converter. Just add this flavor and try again
nsresult result = NS_ERROR_FAILURE;
if ( NS_SUCCEEDED(AddDataFlavor(aFlavor)) )
result = SetTransferData (aFlavor, aData, aDataLen);
return result;
}
//
// AddDataFlavor
//
// Adds a data flavor to our list with no data. Error if it already exists.
//
NS_IMETHODIMP
nsTransferable::AddDataFlavor(const char *aDataFlavor)
{
MOZ_ASSERT(mInitialized);
if (GetDataForFlavor (mDataArray, aDataFlavor) != mDataArray.NoIndex)
return NS_ERROR_FAILURE;
// Create a new "slot" for the data
mDataArray.AppendElement(DataStruct ( aDataFlavor ));
return NS_OK;
}
//
// RemoveDataFlavor
//
// Removes a data flavor (and causes the data to be destroyed). Error if
// the requested flavor is not present.
//
NS_IMETHODIMP
nsTransferable::RemoveDataFlavor(const char *aDataFlavor)
{
MOZ_ASSERT(mInitialized);
uint32_t idx;
if ((idx = GetDataForFlavor(mDataArray, aDataFlavor)) != mDataArray.NoIndex) {
mDataArray.RemoveElementAt (idx);
return NS_OK;
}
return NS_ERROR_FAILURE;
}
/**
*
*
*/
NS_IMETHODIMP
nsTransferable::IsLargeDataSet(bool *_retval)
{
MOZ_ASSERT(mInitialized);
NS_ENSURE_ARG_POINTER(_retval);
*_retval = false;
return NS_OK;
}
/**
*
*
*/
NS_IMETHODIMP nsTransferable::SetConverter(nsIFormatConverter * aConverter)
{
MOZ_ASSERT(mInitialized);
mFormatConv = aConverter;
return NS_OK;
}
/**
*
*
*/
NS_IMETHODIMP nsTransferable::GetConverter(nsIFormatConverter * *aConverter)
{
MOZ_ASSERT(mInitialized);
NS_ENSURE_ARG_POINTER(aConverter);
*aConverter = mFormatConv;
NS_IF_ADDREF(*aConverter);
return NS_OK;
}
//
// FlavorsTransferableCanImport
//
// Computes a list of flavors that the transferable can accept into it, either through
// intrinsic knowledge or input data converters.
//
NS_IMETHODIMP
nsTransferable::FlavorsTransferableCanImport(nsISupportsArray **_retval)
{
MOZ_ASSERT(mInitialized);
NS_ENSURE_ARG_POINTER(_retval);
// Get the flavor list, and on to the end of it, append the list of flavors we
// can also get to through a converter. This is so that we can just walk the list
// in one go, looking for the desired flavor.
GetTransferDataFlavors(_retval); // addrefs
nsCOMPtr<nsIFormatConverter> converter;
GetConverter(getter_AddRefs(converter));
if ( converter ) {
nsCOMPtr<nsISupportsArray> convertedList;
converter->GetInputDataFlavors(getter_AddRefs(convertedList));
if ( convertedList ) {
uint32_t importListLen;
convertedList->Count(&importListLen);
for ( uint32_t i=0; i < importListLen; ++i ) {
nsCOMPtr<nsISupports> genericFlavor;
convertedList->GetElementAt ( i, getter_AddRefs(genericFlavor) );
nsCOMPtr<nsISupportsCString> flavorWrapper ( do_QueryInterface (genericFlavor) );
nsAutoCString flavorStr;
flavorWrapper->GetData( flavorStr );
if (GetDataForFlavor (mDataArray, flavorStr.get())
== mDataArray.NoIndex) // Don't append if already in intrinsic list
(*_retval)->AppendElement (genericFlavor);
} // foreach flavor that can be converted to
}
} // if a converter exists
return NS_OK;
} // FlavorsTransferableCanImport
//
// FlavorsTransferableCanExport
//
// Computes a list of flavors that the transferable can export, either through
// intrinsic knowledge or output data converters.
//
NS_IMETHODIMP
nsTransferable::FlavorsTransferableCanExport(nsISupportsArray **_retval)
{
MOZ_ASSERT(mInitialized);
NS_ENSURE_ARG_POINTER(_retval);
// Get the flavor list, and on to the end of it, append the list of flavors we
// can also get to through a converter. This is so that we can just walk the list
// in one go, looking for the desired flavor.
GetTransferDataFlavors(_retval); // addrefs
nsCOMPtr<nsIFormatConverter> converter;
GetConverter(getter_AddRefs(converter));
if ( converter ) {
nsCOMPtr<nsISupportsArray> convertedList;
converter->GetOutputDataFlavors(getter_AddRefs(convertedList));
if ( convertedList ) {
uint32_t importListLen;
convertedList->Count(&importListLen);
for ( uint32_t i=0; i < importListLen; ++i ) {
nsCOMPtr<nsISupports> genericFlavor;
convertedList->GetElementAt ( i, getter_AddRefs(genericFlavor) );
nsCOMPtr<nsISupportsCString> flavorWrapper ( do_QueryInterface (genericFlavor) );
nsAutoCString flavorStr;
flavorWrapper->GetData( flavorStr );
if (GetDataForFlavor (mDataArray, flavorStr.get())
== mDataArray.NoIndex) // Don't append if already in intrinsic list
(*_retval)->AppendElement (genericFlavor);
} // foreach flavor that can be converted to
}
} // if a converter exists
return NS_OK;
} // FlavorsTransferableCanExport
NS_IMETHODIMP
nsTransferable::GetIsPrivateData(bool *aIsPrivateData)
{
MOZ_ASSERT(mInitialized);
NS_ENSURE_ARG_POINTER(aIsPrivateData);
*aIsPrivateData = mPrivateData;
return NS_OK;
}
NS_IMETHODIMP
nsTransferable::SetIsPrivateData(bool aIsPrivateData)
{
MOZ_ASSERT(mInitialized);
mPrivateData = aIsPrivateData;
return NS_OK;
}
| 17,478 | 6,061 |
#include "packet.hpp"
#include "utils.hpp"
using namespace VictoryConnect;
Packet::Packet(PacketType type, std::string path){
mPacketType = type;
mPath = path;
}
Packet::Packet(PacketType type, std::string path, std::vector<std::string> data){
mPacketType = type;
mPath = path;
mData = data;
}
void Packet::addData(std::string dataToAdd){
mData.push_back(dataToAdd);
}
void Packet::setProtocol(std::string protocol){
mProtocol = protocol;
}
void Packet::setRaw(std::string raw){
mRaw = raw;
}
void Packet::setPath(std::string path){
mPath = path;
}
void Packet::setType(PacketType type){
mPacketType = type;
}
// Get Functions
std::string Packet::getString(){
std::string final = std::to_string(mPacketType);
final += " " + mPath + " " + "{";
final += Utils::vectorJoin(mData, ";");
final += "}~\n";
return final;
}
std::string Packet::toString(){
std::string final = getProtocol() + "->";
final += std::to_string(mPacketType);
final += " " + mPath + " " + "{";
final += Utils::vectorJoin(mData, ";");
final += "}~\n";
return final;
}
std::string Packet::getPath(){
return mPath;
}
std::string Packet::getRaw(){
return mRaw;
}
std::string Packet::getProtocol(){
return mProtocol;
}
std::vector<std::string> Packet::getData(){
return mData;
}
PacketType Packet::getType(){
return mPacketType;
} | 1,433 | 509 |
/* Copyright Β© 2017-2020 ABBYY Production LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--------------------------------------------------------------------------------------------------------------*/
#include <common.h>
#pragma hdrstop
#include <stdlib.h>
#include <NeoMathEngine/CrtAllocatedObject.h>
#include <MathEngineCommon.h>
namespace NeoML {
void* CCrtAllocatedObject::operator new(size_t size)
{
void* result = malloc(size);
if( result == 0 ) {
THROW_MEMORY_EXCEPTION;
}
return result;
}
void CCrtAllocatedObject::operator delete(void* ptr)
{
free(ptr);
}
void* CCrtAllocatedObject::operator new[](size_t size)
{
void* result = malloc(size);
if( result == 0 ) {
THROW_MEMORY_EXCEPTION;
}
return result;
}
void CCrtAllocatedObject::operator delete[](void* ptr)
{
free(ptr);
}
} // namespace NeoML
| 1,308 | 431 |
/* SPIFFS filesystem example.
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#include <stdio.h>
#include <string.h>
#include <sys/unistd.h>
#include <sys/stat.h>
#include <WiFi.h>
#include <HardwareSerial.h>
#include "esp_err.h"
#include "esp_log.h"
#include "esp_spiffs.h"
#include "SPIFFS.h"
#include "nvs_flash.h"
const char* ssid = "YOUR_SSID";
const char* password = "YOUR_PASS";
static const char *TAG = "example";
void setup()
{
Serial.begin(115200);
if(!SPIFFS.begin(true, "/spiffs", 5)){
Serial.println("SPIFFS Mount Failed");
return;
}
nvs_flash_init();
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
}
extern "C" void app_main(void)
{
setup();
}
| 1,126 | 437 |
/*
* Copyright (C) 2012 Igalia S.L.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include "config.h"
#include "WebKitPrivate.h"
#include "APIError.h"
#include "WebEvent.h"
#include "WebKitError.h"
#if PLATFORM(GTK)
#include <WebCore/GtkVersioning.h>
#elif PLATFORM(WPE)
#include <wpe/wpe.h>
#endif
#if PLATFORM(GTK)
unsigned toPlatformModifiers(OptionSet<WebKit::WebEvent::Modifier> wkModifiers)
{
unsigned modifiers = 0;
if (wkModifiers.contains(WebKit::WebEvent::Modifier::ShiftKey))
modifiers |= GDK_SHIFT_MASK;
if (wkModifiers.contains(WebKit::WebEvent::Modifier::ControlKey))
modifiers |= GDK_CONTROL_MASK;
if (wkModifiers.contains(WebKit::WebEvent::Modifier::AltKey))
modifiers |= GDK_MOD1_MASK;
if (wkModifiers.contains(WebKit::WebEvent::Modifier::MetaKey))
modifiers |= GDK_META_MASK;
if (wkModifiers.contains(WebKit::WebEvent::Modifier::CapsLockKey))
modifiers |= GDK_LOCK_MASK;
return modifiers;
}
#elif PLATFORM(WPE)
unsigned toPlatformModifiers(OptionSet<WebKit::WebEvent::Modifier> wkModifiers)
{
unsigned modifiers = 0;
if (wkModifiers.contains(WebKit::WebEvent::Modifier::ShiftKey))
modifiers |= wpe_input_keyboard_modifier_shift;
if (wkModifiers.contains(WebKit::WebEvent::Modifier::ControlKey))
modifiers |= wpe_input_keyboard_modifier_control;
if (wkModifiers.contains(WebKit::WebEvent::Modifier::AltKey))
modifiers |= wpe_input_keyboard_modifier_alt;
if (wkModifiers.contains(WebKit::WebEvent::Modifier::MetaKey))
modifiers |= wpe_input_keyboard_modifier_meta;
return modifiers;
}
#endif
WebKitNavigationType toWebKitNavigationType(WebCore::NavigationType type)
{
switch (type) {
case WebCore::NavigationType::LinkClicked:
return WEBKIT_NAVIGATION_TYPE_LINK_CLICKED;
case WebCore::NavigationType::FormSubmitted:
return WEBKIT_NAVIGATION_TYPE_FORM_SUBMITTED;
case WebCore::NavigationType::BackForward:
return WEBKIT_NAVIGATION_TYPE_BACK_FORWARD;
case WebCore::NavigationType::Reload:
return WEBKIT_NAVIGATION_TYPE_RELOAD;
case WebCore::NavigationType::FormResubmitted:
return WEBKIT_NAVIGATION_TYPE_FORM_RESUBMITTED;
case WebCore::NavigationType::Other:
return WEBKIT_NAVIGATION_TYPE_OTHER;
default:
ASSERT_NOT_REACHED();
return WEBKIT_NAVIGATION_TYPE_OTHER;
}
}
unsigned toWebKitMouseButton(WebKit::WebMouseEvent::Button button)
{
switch (button) {
case WebKit::WebMouseEvent::Button::NoButton:
return 0;
case WebKit::WebMouseEvent::Button::LeftButton:
return 1;
case WebKit::WebMouseEvent::Button::MiddleButton:
return 2;
case WebKit::WebMouseEvent::Button::RightButton:
return 3;
}
ASSERT_NOT_REACHED();
return 0;
}
unsigned toWebKitError(unsigned webCoreError)
{
switch (webCoreError) {
case API::Error::Network::Cancelled:
return WEBKIT_NETWORK_ERROR_CANCELLED;
case API::Error::Network::FileDoesNotExist:
return WEBKIT_NETWORK_ERROR_FILE_DOES_NOT_EXIST;
case API::Error::Policy::CannotShowMIMEType:
return WEBKIT_POLICY_ERROR_CANNOT_SHOW_MIME_TYPE;
case API::Error::Policy::CannotShowURL:
return WEBKIT_POLICY_ERROR_CANNOT_SHOW_URI;
case API::Error::Policy::FrameLoadInterruptedByPolicyChange:
return WEBKIT_POLICY_ERROR_FRAME_LOAD_INTERRUPTED_BY_POLICY_CHANGE;
case API::Error::Policy::CannotUseRestrictedPort:
return WEBKIT_POLICY_ERROR_CANNOT_USE_RESTRICTED_PORT;
case API::Error::Plugin::CannotFindPlugIn:
return WEBKIT_PLUGIN_ERROR_CANNOT_FIND_PLUGIN;
case API::Error::Plugin::CannotLoadPlugIn:
return WEBKIT_PLUGIN_ERROR_CANNOT_LOAD_PLUGIN;
case API::Error::Plugin::JavaUnavailable:
return WEBKIT_PLUGIN_ERROR_JAVA_UNAVAILABLE;
case API::Error::Plugin::PlugInCancelledConnection:
return WEBKIT_PLUGIN_ERROR_CONNECTION_CANCELLED;
case API::Error::Plugin::PlugInWillHandleLoad:
return WEBKIT_PLUGIN_ERROR_WILL_HANDLE_LOAD;
case API::Error::Download::Transport:
return WEBKIT_DOWNLOAD_ERROR_NETWORK;
case API::Error::Download::CancelledByUser:
return WEBKIT_DOWNLOAD_ERROR_CANCELLED_BY_USER;
case API::Error::Download::Destination:
return WEBKIT_DOWNLOAD_ERROR_DESTINATION;
#if PLATFORM(GTK)
case API::Error::Print::Generic:
return WEBKIT_PRINT_ERROR_GENERAL;
case API::Error::Print::PrinterNotFound:
return WEBKIT_PRINT_ERROR_PRINTER_NOT_FOUND;
case API::Error::Print::InvalidPageRange:
return WEBKIT_PRINT_ERROR_INVALID_PAGE_RANGE;
#endif
default:
// This may be a user app defined error, which needs to be passed as-is.
return webCoreError;
}
}
unsigned toWebCoreError(unsigned webKitError)
{
switch (webKitError) {
case WEBKIT_NETWORK_ERROR_CANCELLED:
return API::Error::Network::Cancelled;
case WEBKIT_NETWORK_ERROR_FILE_DOES_NOT_EXIST:
return API::Error::Network::FileDoesNotExist;
case WEBKIT_POLICY_ERROR_CANNOT_SHOW_MIME_TYPE:
return API::Error::Policy::CannotShowMIMEType;
case WEBKIT_POLICY_ERROR_CANNOT_SHOW_URI:
return API::Error::Policy::CannotShowURL;
case WEBKIT_POLICY_ERROR_FRAME_LOAD_INTERRUPTED_BY_POLICY_CHANGE:
return API::Error::Policy::FrameLoadInterruptedByPolicyChange;
case WEBKIT_POLICY_ERROR_CANNOT_USE_RESTRICTED_PORT:
return API::Error::Policy::CannotUseRestrictedPort;
case WEBKIT_PLUGIN_ERROR_CANNOT_FIND_PLUGIN:
return API::Error::Plugin::CannotFindPlugIn;
case WEBKIT_PLUGIN_ERROR_CANNOT_LOAD_PLUGIN:
return API::Error::Plugin::CannotLoadPlugIn;
case WEBKIT_PLUGIN_ERROR_JAVA_UNAVAILABLE:
return API::Error::Plugin::JavaUnavailable;
case WEBKIT_PLUGIN_ERROR_CONNECTION_CANCELLED:
return API::Error::Plugin::PlugInCancelledConnection;
case WEBKIT_PLUGIN_ERROR_WILL_HANDLE_LOAD:
return API::Error::Plugin::PlugInWillHandleLoad;
case WEBKIT_DOWNLOAD_ERROR_NETWORK:
return API::Error::Download::Transport;
case WEBKIT_DOWNLOAD_ERROR_CANCELLED_BY_USER:
return API::Error::Download::CancelledByUser;
case WEBKIT_DOWNLOAD_ERROR_DESTINATION:
return API::Error::Download::Destination;
#if PLATFORM(GTK)
case WEBKIT_PRINT_ERROR_GENERAL:
return API::Error::Print::Generic;
case WEBKIT_PRINT_ERROR_PRINTER_NOT_FOUND:
return API::Error::Print::PrinterNotFound;
case WEBKIT_PRINT_ERROR_INVALID_PAGE_RANGE:
return API::Error::Print::InvalidPageRange;
#endif
default:
// This may be a user app defined error, which needs to be passed as-is.
return webKitError;
}
}
| 7,506 | 2,640 |
#include <bits/stdc++.h>
using namespace std;
int solve(vector<int> &a, vector<int> &b, int lower, int upper) {
transform(b.begin(), b.end(), b.begin(), [](int v) { return v * v; });
sort(b.begin(), b.end());
int n = 0;
for (int v : a) {
v *= v;
int lp = lower_bound(b.begin(), b.end(), lower - v) - b.begin();
int up = upper_bound(b.begin(), b.end(), upper - v) - b.begin();
n += max(up - lp, 0);
}
return n;
} | 427 | 190 |
/**********************************************************************
* Copyright (c) 2008-2015, Alliance for Sustainable Energy.
* All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**********************************************************************/
#include "AirLoopHVAC.hpp"
#include "AirLoopHVAC_Impl.hpp"
#include "AirLoopHVACZoneSplitter.hpp"
#include "AirLoopHVACZoneSplitter_Impl.hpp"
#include "AirLoopHVACSupplyPlenum.hpp"
#include "AirLoopHVACSupplyPlenum_Impl.hpp"
#include "AirLoopHVACReturnPlenum.hpp"
#include "AirLoopHVACReturnPlenum_Impl.hpp"
#include "AirLoopHVACZoneMixer.hpp"
#include "AirLoopHVACZoneMixer_Impl.hpp"
#include "ThermalZone.hpp"
#include "ThermalZone_Impl.hpp"
#include "Model.hpp"
#include "Model_Impl.hpp"
#include "Node.hpp"
#include "Node_Impl.hpp"
#include "AirTerminalSingleDuctUncontrolled.hpp"
#include "AirTerminalSingleDuctUncontrolled_Impl.hpp"
#include <utilities/idd/OS_AirLoopHVAC_SupplyPlenum_FieldEnums.hxx>
#include <utilities/idd/IddEnums.hxx>
namespace openstudio {
namespace model {
namespace detail {
AirLoopHVACSupplyPlenum_Impl::AirLoopHVACSupplyPlenum_Impl(const IdfObject& idfObject,
Model_Impl* model,
bool keepHandle)
: Splitter_Impl(idfObject,model,keepHandle)
{
OS_ASSERT(idfObject.iddObject().type() == AirLoopHVACSupplyPlenum::iddObjectType());
}
AirLoopHVACSupplyPlenum_Impl::AirLoopHVACSupplyPlenum_Impl(const openstudio::detail::WorkspaceObject_Impl& other,
Model_Impl* model,
bool keepHandle)
: Splitter_Impl(other,model,keepHandle)
{
OS_ASSERT(other.iddObject().type() == AirLoopHVACSupplyPlenum::iddObjectType());
}
AirLoopHVACSupplyPlenum_Impl::AirLoopHVACSupplyPlenum_Impl(const AirLoopHVACSupplyPlenum_Impl& other,
Model_Impl* model,
bool keepHandle)
: Splitter_Impl(other,model,keepHandle)
{}
const std::vector<std::string>& AirLoopHVACSupplyPlenum_Impl::outputVariableNames() const
{
static std::vector<std::string> result;
if (result.empty()){
}
return result;
}
IddObjectType AirLoopHVACSupplyPlenum_Impl::iddObjectType() const {
return AirLoopHVACSupplyPlenum::iddObjectType();
}
boost::optional<ThermalZone> AirLoopHVACSupplyPlenum_Impl::thermalZone() const {
return getObject<ModelObject>().getModelObjectTarget<ThermalZone>(OS_AirLoopHVAC_SupplyPlenumFields::ThermalZone);
}
bool AirLoopHVACSupplyPlenum_Impl::setThermalZone(const boost::optional<ThermalZone>& thermalZone) {
bool result(false);
if( ! thermalZone )
{
resetThermalZone();
result = true;
}
else if( (! thermalZone->getImpl<ThermalZone_Impl>()->airLoopHVACSupplyPlenum()) &&
(! thermalZone->getImpl<ThermalZone_Impl>()->airLoopHVACReturnPlenum()) &&
(thermalZone->equipment().size() == 0) &&
(! thermalZone->useIdealAirLoads()) )
{
result = setPointer(OS_AirLoopHVAC_SupplyPlenumFields::ThermalZone, thermalZone.get().handle());
}
return result;
}
void AirLoopHVACSupplyPlenum_Impl::resetThermalZone() {
bool result = setString(OS_AirLoopHVAC_SupplyPlenumFields::ThermalZone, "");
OS_ASSERT(result);
}
unsigned AirLoopHVACSupplyPlenum_Impl::inletPort()
{
return OS_AirLoopHVAC_SupplyPlenumFields::InletNode;
}
unsigned AirLoopHVACSupplyPlenum_Impl::outletPort(unsigned branchIndex)
{
unsigned result;
result = numNonextensibleFields();
result = result + branchIndex;
return result;
}
unsigned AirLoopHVACSupplyPlenum_Impl::nextOutletPort()
{
return outletPort( this->nextBranchIndex() );
}
bool AirLoopHVACSupplyPlenum_Impl::addToNode(Node & node)
{
bool result = true;
Model _model = model();
// Is the node in this model
if( node.model() != _model )
{
result = false;
}
// Is the node part of an air loop
boost::optional<AirLoopHVAC> nodeAirLoop = node.airLoopHVAC();
if( ! nodeAirLoop )
{
result = false;
}
// Is this plenum already connected to a different air loop
boost::optional<AirLoopHVAC> currentAirLoopHVAC = airLoopHVAC();
if( currentAirLoopHVAC && (currentAirLoopHVAC.get() != nodeAirLoop) )
{
result = false;
}
boost::optional<ModelObject> inletObj = node.inletModelObject();
boost::optional<ModelObject> outletObj = node.outletModelObject();
boost::optional<AirTerminalSingleDuctUncontrolled> directAirModelObject;
boost::optional<ModelObject> directAirInletModelObject;
if( inletObj && inletObj->optionalCast<AirTerminalSingleDuctUncontrolled>() )
{
directAirModelObject = inletObj->cast<AirTerminalSingleDuctUncontrolled>();
directAirInletModelObject = directAirModelObject->inletModelObject();
}
// Is the immediate upstream object to the node a splitter
// or a direct air terminal (special case since this guy oddly does not have an inlet node)
boost::optional<AirLoopHVACZoneSplitter> splitter;
if( result )
{
splitter = nodeAirLoop->zoneSplitter();
if( directAirInletModelObject )
{
if( ! (splitter && ( directAirInletModelObject.get() == splitter.get() )) )
{
result = false;
}
}
else if( ! (inletObj && splitter && ( inletObj.get() == splitter.get() )) )
{
result = false;
}
}
// Is there a zone on this branch
if( result )
{
Mixer mixer = nodeAirLoop->zoneMixer();
if( nodeAirLoop->demandComponents(node,mixer,ThermalZone::iddObjectType()).empty() )
{
result = false;
}
}
unsigned oldOutletObjectPort;
unsigned oldInletObjectPort;
boost::optional<ModelObject> oldInletModelObject;
boost::optional<ModelObject> oldOutletModelObject;
// Record the old port connections
if( result )
{
oldInletModelObject = splitter;
if( directAirModelObject )
{
oldOutletModelObject = directAirModelObject;
oldOutletObjectPort = directAirModelObject->inletPort();
oldInletObjectPort = directAirModelObject->connectedObjectPort(directAirModelObject->inletPort()).get();
}
else
{
oldOutletModelObject = node;
oldOutletObjectPort = node.inletPort();
oldInletObjectPort = node.connectedObjectPort(node.inletPort()).get();
}
}
// Create a new node and connect the plenum
if( result )
{
AirLoopHVACSupplyPlenum thisObject = getObject<AirLoopHVACSupplyPlenum>();
if( currentAirLoopHVAC )
{
splitter->removePortForBranch(splitter->branchIndexForOutletModelObject(oldOutletModelObject.get()));
_model.connect(thisObject,thisObject.nextOutletPort(),oldOutletModelObject.get(),oldOutletObjectPort);
}
else
{
Node plenumInletNode(_model);
plenumInletNode.createName();
_model.connect(oldInletModelObject.get(),oldInletObjectPort,plenumInletNode,plenumInletNode.inletPort());
_model.connect(plenumInletNode,plenumInletNode.outletPort(),thisObject,thisObject.inletPort());
_model.connect(thisObject,thisObject.nextOutletPort(),oldOutletModelObject.get(),oldOutletObjectPort);
}
}
return result;
}
bool AirLoopHVACSupplyPlenum_Impl::addBranchForZone(openstudio::model::ThermalZone & thermalZone, StraightComponent & terminal)
{
boost::optional<StraightComponent> t_terminal = terminal;
return AirLoopHVACSupplyPlenum_Impl::addBranchForZoneImpl(thermalZone,t_terminal);
}
bool AirLoopHVACSupplyPlenum_Impl::addBranchForZone(openstudio::model::ThermalZone & thermalZone)
{
boost::optional<StraightComponent> t_terminal;
return AirLoopHVACSupplyPlenum_Impl::addBranchForZoneImpl(thermalZone,t_terminal);
}
bool AirLoopHVACSupplyPlenum_Impl::addBranchForZoneImpl(openstudio::model::ThermalZone & thermalZone, boost::optional<StraightComponent> & terminal)
{
boost::optional<Splitter> splitter = getObject<AirLoopHVACSupplyPlenum>();
boost::optional<Mixer> mixer;
boost::optional<AirLoopHVAC> t_airLoopHVAC = airLoopHVAC();
if( ! t_airLoopHVAC )
{
return false;
}
std::vector<ModelObject> returnPlenums;
returnPlenums = t_airLoopHVAC->demandComponents(splitter.get(),
t_airLoopHVAC->demandOutletNode(),
AirLoopHVACReturnPlenum::iddObjectType());
if( returnPlenums.size() == 1u )
{
mixer = returnPlenums.front().cast<Mixer>();
}
else
{
mixer = t_airLoopHVAC->zoneMixer();
}
OS_ASSERT(splitter);
OS_ASSERT(mixer);
return AirLoopHVAC_Impl::addBranchForZoneImpl(thermalZone,t_airLoopHVAC.get(),splitter.get(),mixer.get(),terminal);
}
std::vector<IdfObject> AirLoopHVACSupplyPlenum_Impl::remove()
{
Model t_model = model();
if( boost::optional<AirLoopHVAC> t_airLoopHVAC = airLoopHVAC() )
{
AirLoopHVACZoneSplitter zoneSplitter= t_airLoopHVAC->zoneSplitter();
std::vector<ModelObject> t_outletModelObjects = outletModelObjects();
for( auto it = t_outletModelObjects.rbegin();
it != t_outletModelObjects.rend();
++it )
{
unsigned branchIndex = branchIndexForOutletModelObject(*it);
unsigned t_outletPort = outletPort(branchIndex);
unsigned connectedObjectInletPort = connectedObjectPort(t_outletPort).get();
t_model.connect(zoneSplitter,zoneSplitter.nextOutletPort(),*it,connectedObjectInletPort);
}
boost::optional<ModelObject> mo = inletModelObject();
OS_ASSERT(mo);
boost::optional<Node> node = mo->optionalCast<Node>();
OS_ASSERT(node);
zoneSplitter.removePortForBranch(zoneSplitter.branchIndexForOutletModelObject(node.get()));
node->remove();
}
return Splitter_Impl::remove();
}
} // detail
AirLoopHVACSupplyPlenum::AirLoopHVACSupplyPlenum(const Model& model)
: Splitter(AirLoopHVACSupplyPlenum::iddObjectType(),model)
{
OS_ASSERT(getImpl<detail::AirLoopHVACSupplyPlenum_Impl>());
}
IddObjectType AirLoopHVACSupplyPlenum::iddObjectType() {
return IddObjectType(IddObjectType::OS_AirLoopHVAC_SupplyPlenum);
}
boost::optional<ThermalZone> AirLoopHVACSupplyPlenum::thermalZone() const {
return getImpl<detail::AirLoopHVACSupplyPlenum_Impl>()->thermalZone();
}
bool AirLoopHVACSupplyPlenum::setThermalZone(const ThermalZone& thermalZone) {
return getImpl<detail::AirLoopHVACSupplyPlenum_Impl>()->setThermalZone(thermalZone);
}
void AirLoopHVACSupplyPlenum::resetThermalZone() {
getImpl<detail::AirLoopHVACSupplyPlenum_Impl>()->resetThermalZone();
}
unsigned AirLoopHVACSupplyPlenum::inletPort()
{
return getImpl<detail::AirLoopHVACSupplyPlenum_Impl>()->inletPort();
}
unsigned AirLoopHVACSupplyPlenum::outletPort(unsigned branchIndex)
{
return getImpl<detail::AirLoopHVACSupplyPlenum_Impl>()->outletPort(branchIndex);
}
unsigned AirLoopHVACSupplyPlenum::nextOutletPort()
{
return getImpl<detail::AirLoopHVACSupplyPlenum_Impl>()->nextOutletPort();
}
bool AirLoopHVACSupplyPlenum::addToNode(Node & node)
{
return getImpl<detail::AirLoopHVACSupplyPlenum_Impl>()->addToNode(node);
}
bool AirLoopHVACSupplyPlenum::addBranchForZone(openstudio::model::ThermalZone & thermalZone)
{
return getImpl<detail::AirLoopHVACSupplyPlenum_Impl>()->addBranchForZone(thermalZone);
}
bool AirLoopHVACSupplyPlenum::addBranchForZone(openstudio::model::ThermalZone & thermalZone, StraightComponent & terminal)
{
return getImpl<detail::AirLoopHVACSupplyPlenum_Impl>()->addBranchForZone(thermalZone,terminal);
}
/// @cond
AirLoopHVACSupplyPlenum::AirLoopHVACSupplyPlenum(std::shared_ptr<detail::AirLoopHVACSupplyPlenum_Impl> impl)
: Splitter(impl)
{}
/// @endcond
} // model
} // openstudio
| 12,909 | 4,335 |
/*
20. La pizzerΓa Bella Rita ofrece pizzas vegetarianas y no vegetarianas a sus clientes. Los ingredientes para cada tipo de pizza aparecen a continuaciΓ³n.
β’ Ingredientes vegetarianos: Pimiento y tofu.
β’ Ingredientes no vegetarianos: Peperoni, JamΓ³n y SalmΓ³n.
Escribir un programa que pregunte al usuario si quiere una pizza vegetariana o no, y en funciΓ³n de su respuesta le muestre un menΓΊ con los ingredientes disponibles para que elija. Solo se puede eligir un ingrediente ademΓ‘s de la mozzarella y el tomate que estΓ‘n en todas las pizzas. Al final se debe mostrar por pantalla si la pizza elegida es vegetariana o no y todos los ingredientes que lleva.
*/
#include <iostream>
using namespace std;
int main()
{
int tipo, ingrediente;
cout << "Bienvenido a la pizzeria Bella Rita.\nTipos de pizza\n\t1- Vegetariana\n\t2- No vegetariana\n"
<< endl;
cout << "Introduce el numero correspondiente al tipo de pizza que quieres: ";
cin >> tipo;
if (tipo == 1) {
cout << "Ingredientes de pizzas vegetarianas\n\t1- Pimiento\n\t2- Tofu\n"
<< endl;
cout << "Introduce el ingrediente que deseas: ";
cin >> ingrediente;
cout << "Pizza vegetariana con mozzarella, tomate y ";
ingrediente == 1 ? cout << "pimiento" : cout << "tofu\n\n";
} else {
cout << "Ingredientes de pizzas no vegetarianas\n\t1- Peperoni\n\t2- Jamon\n\t3- Salmon\n";
cout << "Introduce el ingrediente que deseas: ";
cin >> ingrediente;
cout << "Pizza no vegetarina con mozarrella, tomate y ";
ingrediente == 1 ? cout << "peperoni" : ingrediente == 2 ? cout << "jamon"
: cout << "salmon\n\n";
}
return 0;
}
| 1,766 | 597 |
#include "syntaxhighlighter.h"
#include <QTextDocument>
SyntaxHighlighter::SyntaxHighlighter(QTextDocument *document) : QSyntaxHighlighter(document)
{
addDefualtRules();
}
void SyntaxHighlighter::addDefualtRules()
{
HighlightingRule rule;
QFont boldFont(this->document()->defaultFont());
boldFont.setBold(true);
QStringList keywordPatterns;
keywordPatterns << "\\bchar\\b" << "\\bclass\\b" << "\\bconst\\b"
<< "\\bdouble\\b" << "\\benum\\b" << "\\bexplicit\\b"
<< "\\bfriend\\b" << "\\binline\\b" << "\\bint\\b"
<< "\\blong\\b" << "\\bnamespace\\b" << "\\boperator\\b"
<< "\\bprivate\\b" << "\\bprotected\\b" << "\\bpublic\\b"
<< "\\bshort\\b" << "\\bsignals\\b" << "\\bsigned\\b"
<< "\\bslots\\b" << "\\bstatic\\b" << "\\bstruct\\b"
<< "\\btemplate\\b" << "\\btypedef\\b" << "\\btypename\\b"
<< "\\bunion\\b" << "\\bunsigned\\b" << "\\bvirtual\\b"
<< "\\bvoid\\b" << "\\bvolatile\\b" << "\\bbool\\b";
foreach (const QString &pattern, keywordPatterns)
setRule(QRegularExpression(pattern), QColor(0, 0, 255), boldFont);
multiLineCommentFormat.setForeground(Qt::red);
setRule(QRegularExpression("\\bQ[A-Za-z]+\\b"), QColor(139,0,139), boldFont); //classes
setRule(QRegularExpression("//[^\n]*"), QColor(255, 0, 0)); //single line comments
setRule(QRegularExpression("\".*\""), QColor(0, 100, 0)); //quotes
setRule(QRegularExpression("\\b[A-Za-z0-9_]+(?=\\()"), QColor(0, 0, 255)); //functions
commentStartExpression = QRegularExpression("/\\*");
commentEndExpression = QRegularExpression("\\*/");
}
void SyntaxHighlighter::setRule(QRegularExpression matchExprn, QBrush brushForeground)
{
static HighlightingRule rule;
QTextCharFormat format;
format.setForeground(brushForeground);
rule.format = format;
//Set match expression for the rule
rule.pattern = matchExprn;
//Add new rule
highlightingRules.append(rule);
}
void SyntaxHighlighter::setRule(QRegularExpression matchExprn, QBrush brushForeground, QFont font)
{
static HighlightingRule rule;
QTextCharFormat format;
format.setFontWeight(font.weight());
format.setFontItalic(font.italic());
format.setFontCapitalization(font.capitalization());
format.setFontOverline(font.overline());
format.setFontUnderline(font.underline());
format.setFontLetterSpacing(font.letterSpacing());
format.setFontWordSpacing(font.wordSpacing());
format.setFontStretch(font.stretch());
format.setFontStrikeOut(font.strikeOut());
format.setForeground(brushForeground);
rule.format = format;
//Set match expression for the rule
rule.pattern = matchExprn;
//Add new rule
highlightingRules.append(rule);
}
void SyntaxHighlighter::highlightBlock(const QString &text)
{
foreach (const HighlightingRule &rule, highlightingRules)
{
QRegularExpressionMatchIterator matchIterator = rule.pattern.globalMatch(text);
while (matchIterator.hasNext())
{
QRegularExpressionMatch match = matchIterator.next();
setFormat(match.capturedStart(), match.capturedLength(), rule.format);
}
}
setCurrentBlockState(0);
int startIndex = 0;
if (previousBlockState() != 1)
startIndex = text.indexOf(commentStartExpression);
while (startIndex >= 0)
{
QRegularExpressionMatch match = commentEndExpression.match(text, startIndex);
int endIndex = match.capturedStart();
int commentLength = 0;
if (endIndex == -1)
{
setCurrentBlockState(1);
commentLength = text.length() - startIndex;
}
else
{
commentLength = endIndex - startIndex
+ match.capturedLength();
}
setFormat(startIndex, commentLength, multiLineCommentFormat);
startIndex = text.indexOf(commentStartExpression, startIndex + commentLength);
}
}
| 4,124 | 1,313 |
/*
Idea:
- Dynamic Programming.
- The regular DP using NxN time and memory complexity does not work. It is give correct solutions, but it does not fit the time
and memory limits.
- To change this solution to accepted one we need to reduce the size of our DP, we need the index where we are now, but the
distance we want to jump we can always write it as d + offset, where d is the original d from the question and offset if some
value maybe negative or positive. Now we can take the offset with us in the DP and leave d, but what is the lower and upper
limits for offset?
- To calculate this imagine that we always take the +1 step, so in the first step we are add d then add d + 1, d + 2, ..., d + x.
- x value equals to ~245, why? because (d + (d + 1) + (d + 2) + ... + (d + 245)) = 30135 > 30001 (d = 1), so we can take the offset
in the DP array and solve the problem.
*/
#include <bits/stdc++.h>
using namespace std;
int const N = 3e4 + 10;
int n, d, a[N], dp[N][600];
int rec(int cur, int off) {
if(cur >= N)
return 0;
int &ret = dp[cur][300 + off];
if(ret != -1)
return ret;
ret = 0;
if(cur + d + off - 1 > cur)
ret = max(ret, rec(cur + (d + off - 1), off - 1) + a[cur]);
ret = max(ret, rec(cur + d + off, off) + a[cur]);
ret = max(ret, rec(cur + (d + off + 1), off + 1) + a[cur]);
return ret;
}
int main() {
scanf("%d %d", &n, &d);
for(int i = 0, tmp; i < n; ++i) {
scanf("%d", &tmp);
++a[tmp];
}
memset(dp, -1, sizeof dp);
printf("%d\n", rec(d, 0));
return 0;
}
| 1,583 | 603 |
#pragma once
#include "StatusEffectCalculator.hpp"
#include "Creature.hpp"
// Class used to determine whether a creature is blinded (typically by
// the smoke from a flaming attack), and if so, for how long.
class BlindedCalculator : public StatusEffectCalculator
{
public:
int calculate_pct_chance_effect(CreaturePtr creature) const override;
int calculate_duration_in_minutes(CreaturePtr creature) const override;
protected:
static const int BASE_BLINDED_DURATION_MEAN;
static const int BASE_BLINDED_PCT_CHANCE;
static const int BASE_BLINDED_CHANCE_HEALTH_MODIFIER;
};
| 598 | 192 |
#include "HydraAPI.h"
#include "HydraInternal.h"
#include <memory>
#include <vector>
#include <string>
#include <sstream>
#include <map>
#ifdef WIN32
#include <direct.h>
#else
#endif
int hr_mkdir(const char* a_folder)
{
return _mkdir(a_folder);
}
int hr_mkdir(const wchar_t* a_folder)
{
return _wmkdir(a_folder);
}
int hr_cleardir(const char* a_folder)
{
std::string tempFolder = std::string(a_folder) + "/";
std::string tempName = tempFolder + "*";
WIN32_FIND_DATAA fd;
HANDLE hFind = ::FindFirstFileA(tempName.c_str(), &fd);
if (hFind != INVALID_HANDLE_VALUE)
{
do
{
std::string tempName2 = tempFolder + fd.cFileName;
DeleteFileA(tempName2.c_str());
} while (::FindNextFileA(hFind, &fd));
::FindClose(hFind);
}
return 0;
}
int hr_cleardir(const wchar_t* a_folder)
{
std::wstring tempFolder = std::wstring(a_folder) + L"/";
std::wstring tempName = tempFolder + L"*";
WIN32_FIND_DATAW fd;
HANDLE hFind = ::FindFirstFileW(tempName.c_str(), &fd);
if (hFind != INVALID_HANDLE_VALUE)
{
do
{
std::wstring tempName2 = tempFolder + fd.cFileName;
DeleteFileW(tempName2.c_str());
} while (::FindNextFileW(hFind, &fd));
::FindClose(hFind);
}
return 0;
}
std::vector<std::wstring> hr_listfiles(const wchar_t* a_folder, bool excludeFolders)
{
std::vector<std::wstring> result;
std::wstring tempFolder = std::wstring(a_folder) + L"/";
std::wstring tempName = tempFolder + L"*";
WIN32_FIND_DATAW fd;
HANDLE hFind = ::FindFirstFileW(tempName.c_str(), &fd);
if (hFind != INVALID_HANDLE_VALUE)
{
do
{
std::wstring tempName2 = tempFolder + fd.cFileName;
result.push_back(tempName2);
} while (::FindNextFileW(hFind, &fd));
::FindClose(hFind);
}
return result;
}
std::vector<std::string> hr_listfiles(const char* a_folder, bool excludeFolders)
{
std::vector<std::string> result;
std::string tempFolder = std::string(a_folder) + "/";
std::string tempName = tempFolder + "*";
WIN32_FIND_DATAA fd;
HANDLE hFind = ::FindFirstFileA(tempName.c_str(), &fd);
if (hFind != INVALID_HANDLE_VALUE)
{
do
{
std::string tempName2 = tempFolder + fd.cFileName;
result.push_back(tempName2);
} while (::FindNextFileA(hFind, &fd));
::FindClose(hFind);
}
return result;
}
void hr_copy_file(const char* a_file1, const char* a_file2)
{
CopyFileA(a_file1, a_file2, FALSE);
}
void hr_copy_file(const wchar_t* a_file1, const wchar_t* a_file2)
{
CopyFileW(a_file1, a_file2, FALSE);
}
void hr_deletefile(const wchar_t* a_file)
{
DeleteFileW(a_file);
}
void hr_deletefile(const char* a_file)
{
DeleteFileA(a_file);
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
struct HRSystemMutex
{
HANDLE mutex;
std::string name;
bool owner;
};
HRSystemMutex* hr_create_system_mutex(const char* a_mutexName)
{
HRSystemMutex* a_mutex = new HRSystemMutex;
a_mutex->mutex = OpenMutexA(MUTEX_ALL_ACCESS, FALSE, a_mutexName);
if (a_mutex->mutex == NULL || a_mutex->mutex == INVALID_HANDLE_VALUE)
a_mutex->mutex = CreateMutexA(NULL, FALSE, a_mutexName);
return a_mutex;
}
void hr_free_system_mutex(HRSystemMutex*& a_mutex) // logic of this function is not strictly correct, but its ok for our usage case.
{
if(a_mutex == nullptr)
return;
if (a_mutex->mutex != INVALID_HANDLE_VALUE && a_mutex->mutex != NULL)
{
CloseHandle(a_mutex->mutex);
a_mutex->mutex = NULL;
}
delete a_mutex;
a_mutex = nullptr;
}
bool hr_lock_system_mutex(HRSystemMutex* a_mutex, int a_msToWait)
{
if (a_mutex == nullptr)
return false;
const DWORD res = WaitForSingleObject(a_mutex->mutex, a_msToWait);
if (res == WAIT_TIMEOUT || res == WAIT_FAILED)
return false;
else
return true;
}
void hr_unlock_system_mutex(HRSystemMutex* a_mutex)
{
if (a_mutex == nullptr)
return;
ReleaseMutex(a_mutex->mutex);
}
#include <fstream>
void hr_ifstream_open(std::ifstream& a_stream, const wchar_t* a_fileName)
{
a_stream.open(a_fileName, std::ios::binary);
}
void hr_ofstream_open(std::ofstream& a_stream, const wchar_t* a_fileName)
{
a_stream.open(a_fileName, std::ios::binary);
} | 4,259 | 1,756 |
#include <Alembic/Util/All.h>
#include <Alembic/AbcCoreAbstract/All.h>
#include <Alembic/AbcCoreOgawa/All.h>
#ifdef SIMBA_ENABLE_ALEMBIC_HDF5
#include <Alembic/AbcCoreHDF5/All.h>
#endif // SIMBA_ENABLE_ALEMBIC_HDF5
#include <Alembic/Abc/All.h>
#include <Alembic/AbcCoreFactory/All.h>
#include <Alembic/AbcGeom/All.h>
#include <Alembic/AbcCollection/All.h>
#include <Alembic/AbcMaterial/All.h>
#include <vector>
#include <boost/format.hpp>
#include <boost/program_options.hpp>
#include <OpenEXR/ImathVec.h>
#include "VelocitySideCar.h"
namespace po = boost::program_options;
Alembic::AbcGeom::OXform
addXform(Alembic::Abc::OObject parent, std::string name)
{
Alembic::AbcGeom::OXform xform(parent, name.c_str());
return xform;
}
void write_velocities_sidecar(const std::string& i_filename, const VelocitySideCar& i_vsc)
{
Alembic::Abc::OArchive archive(Alembic::Abc::CreateArchiveWithInfo(Alembic::AbcCoreHDF5::WriteArchive(),
std::string(i_filename.c_str()),
std::string("Procedural Insight"),
std::string("SIMBA Velocity Sidecar"),
Alembic::Abc::ErrorHandler::kThrowPolicy));
Alembic::AbcGeom::OXform xform = addXform(archive.getTop(),"Xform");
}
int main(int argc, char** argv)
{
try {
std::string alembic_file;
std::string velocity_file;
po::options_description desc("Allowed options");
desc.add_options()
("help", "produce help message")
("abc", po::value<std::string>(&alembic_file),
"name of alembic file")
("vsc", po::value<std::string>(&velocity_file),
"name of velocity file")
;
po::variables_map vm;
po::store(po::parse_command_line(argc, argv, desc), vm);
po::notify(vm);
if (vm.count("help") || alembic_file.empty() || velocity_file.empty()) {
std::cout << desc << "\n";
return 1;
}
// std::string sha;
// get_sha(alembic_file, sha);
// std::cout << boost::format("sha = '%1%'") % sha << std::endl;
VelocitySideCar vsc;
vsc.compute(alembic_file);
}
catch(std::exception& e) {
std::cerr << "error: " << e.what() << "\n";
return 1;
}
catch(...) {
std::cerr << "Exception of unknown type!\n";
}
return 0;
}
| 2,140 | 930 |
// Written by Philipp Czerner, 2018. Public Domain.
// See LICENSE.md for license information.
#pragma once
// I usually do not pay attention to assertions with side-effects, so let us define them here to
// execute the expressions regardless. Also, the compiler cannot figure out that assert(false) means
// unreachable, so just search-replace all of those with assert_false once going to release.
#ifndef NDEBUG
#include <cassert>
#define assert_false assert(false)
#else
#define assert(x) (void)__builtin_expect(not (expr), 0)
#define assert_false __builtin_unreachable()
#endif
#include <cerrno>
#include <cmath>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <cstdio>
// TODO: Get rid of all C++ headers
#include <algorithm>
#include <initializer_list>
// Defer macro. Based on Jonathan Blow's code at https://pastebin.com/3YvWQa5c, although rewritten
// from scratch.
template <typename T>
struct Deferrer {
T t;
Deferrer(T const& t): t{t} {}
~Deferrer() { t(); }
};
struct Deferrer_helper {
template <typename T>
auto operator+ (T const& t) { return Deferrer<T> {t}; }
};
#define DEFER_NAME1(x, y) x##y
#define DEFER_NAME(x) DEFER_NAME1(_defer, x)
#define defer auto DEFER_NAME(__LINE__) = Deferrer_helper{} + [&]
// Standard integer types
using s64 = long long; // gcc and emcc (well, their shipped standard libraries) have different opinions about using long long or just long as 64-bit integer types. But for printf I just want to write one of them. Yay.
using u64 = unsigned long long;
//using s64 = std::int64_t;
//using u64 = std::uint64_t;
using s32 = std::int32_t;
using u32 = std::uint32_t;
using s16 = std::int16_t;
using u16 = std::uint16_t;
using s8 = std::int8_t;
using u8 = std::uint8_t;
// General data structures
// Array_t is just a pointer with a size, and Array_dyn a pointer with a size and capacity. They
// conform to my personal data structure invariants: Can be initialised by zeroing the memory, can
// be copied using memcpy. Obviously, this means that there is no hidden allocation happening in
// here, that is all done by the call-site. Also, no const.
template <typename T_>
struct Array_t {
using T = T_;
T* data = nullptr;
s64 size = 0;
T& operator[] (int pos) {
assert(0 <= pos and pos < size);
return data[pos];
}
// See the E macro below.
//T& dbg(int pos, int line) {
// if (not (0 <= pos and pos < size)) {
// printf("line: %d\n", line);
// abort();
// }
// return data[pos];
//}
T* begin() { return data; }
T* end() { return data + size; }
};
template <typename T_>
struct Array_dyn: public Array_t<T_> {
using T = T_;
s64 capacity;
Array_dyn(T* data = nullptr, s64 size = 0, s64 capacity = 0):
Array_t<T>::Array_t{data, size},
capacity{capacity} {}
explicit Array_dyn(Array_t<T> arr) :
Array_t<T>::Array_t{arr.data, 0},
capacity{arr.size} {}
T& operator[] (int pos) {
assert(0 <= pos and pos < Array_t<T>::size);
return Array_t<T>::data[pos];
}
// See the E macro below.
//T& dbg (int pos, int line) {
// if (0 <= pos and pos < Array_t<T>::size) {
// return Array_t<T>::data[pos];
// } else {
// printf("out of bounds, index %d size %lld, line %d\n", pos, Array_t<T>::size, line);
// abort();
// }
//}
T* begin() const { return (T*)Array_t<T>::data; }
T* end() const { return (T*)(Array_t<T>::data + Array_t<T>::size); }
};
// This is to help debugging if the stacktraces stop working. (Which, for some reason, they do.) As
// ~90% of runtime errors are out-of-bounds accesses, I often want to know precisely which one. To
// this end, replace arr[pos] by E(arr,pos) in the places you want to monitor.
//#define E(x, y) ((x).dbg((y), __LINE__))
// Allocation. Returns zeroed memory.
template <typename T>
Array_t<T> array_create(s64 size) {
return {(T*)calloc(sizeof(T), size), size};
}
// Take some bytes from an already existing memory location. Advance p by the number of bytes used.
template <typename T>
Array_t<T> array_create_from(u8** p, s64 size) {
Array_t<T> result = {(T*)*p, size};
*p += sizeof(T) * size;
return result;
}
// Free the memory, re-initialise the array.
template <typename T>
void array_free(Array_t<T>* arr) {
assert(arr);
free(arr->data);
arr->data = nullptr;
arr->size = 0;
}
template <typename T>
void array_free(Array_dyn<T>* arr) {
assert(arr);
free(arr->data);
arr->data = nullptr;
arr->size = 0;
arr->capacity = 0;
}
// Ensure that there is space for at least count elements.
template <typename T>
void array_reserve(Array_dyn<T>* into, s64 count) {
if (count > into->capacity) {
s64 capacity_new = 2 * into->capacity;
if (capacity_new < count) {
capacity_new = count;
}
into->data = (T*)std::realloc(into->data, capacity_new * sizeof(T));
assert(into->data);
into->capacity = capacity_new;
assert(into->data);
}
}
// Set the array's size to count, reallocate if necessary.
template <typename T>
void array_resize(Array_t<T>* arr, s64 count) {
if (arr->size == count) return;
arr->data = (T*)realloc(arr->data, count * sizeof(T));
if (arr->size < count) {
memset(arr->data + arr->size, 0, (count - arr->size) * sizeof(T));
}
arr->size = count;
}
template <typename T>
void array_resize(Array_dyn<T>* arr, s64 count) {
array_reserve(arr, count);
if (arr->size < count) {
memset(arr->data + arr->size, 0, (count - arr->size) * sizeof(T));
}
arr->size = count;
}
// Add element to the end of an array, reallocate if necessary.
template <typename T>
void array_push_back(Array_dyn<T>* into, T elem) {
array_reserve(into, into->size + 1);
++into->size;
into->data[into->size-1] = elem;
}
// Insert an element into the array, such that its position is index. Reallocate if necessary.
template <typename T>
void array_insert(Array_dyn<T>* into, s64 index, T elem) {
assert(into and 0 <= index and index <= into->size);
array_reserve(into, into->size + 1);
memmove(into->data + (index+1), into->data + index, (into->size - index) * sizeof(T));
++into->size;
into->data[index] = elem;
}
// Append a number of elements to the array.
template <typename T>
void array_append(Array_dyn<T>* into, Array_t<T> data) {
array_reserve(into, into->size + data.size);
memcpy(into->end(), data.data, data.size * sizeof(T));
into->size += data.size;
}
template <typename T>
void array_append(Array_dyn<T>* into, std::initializer_list<T> data) {
array_reserve(into, into->size + data.size());
memcpy(into->end(), data.begin(), data.size() * sizeof(T));
into->size += data.size();
}
// Append a number of zero-initialised elements to the array.
template <typename T>
void array_append_zero(Array_dyn<T>* into, s64 size) {
array_reserve(into, into->size + size);
memset(into->end(), 0, size * sizeof(T));
into->size += size;
}
// Return an array that represents the sub-range [start, end). start == end is fine (but the result
// will use a nullptr).
template <typename T>
Array_t<T> array_subarray(Array_t<T> arr, s64 start, s64 end) {
assert(0 <= start and start <= arr.size);
assert(0 <= end and end <= arr.size);
assert(start <= end);
if (start == end)
return {nullptr, 0};
else
return {arr.data + start, end - start};
}
template <typename... Args>
void array_printf(Array_dyn<u8>* arr, char const* fmt, Args... args) {
assert(arr);
array_reserve(arr, arr->size + snprintf(0, 0, fmt, args...)+1);
arr->size += snprintf((char*)arr->end(), arr->capacity - arr->size, fmt, args...);
}
void array_printf(Array_dyn<u8>* arr, char const* str) {
assert(arr);
array_append(arr, {(u8*)str, (s64)strlen(str) + 1});
--arr->size;
}
template <typename T>
bool array_equal(Array_t<T> a, Array_t<T> b) {
return a.size == b.size and memcmp(a.data, b.data, a.size * sizeof(T)) == 0;
}
bool array_equal_str(Array_t<u8> a, char const* str) {
return a.size == (s64)strlen(str) and memcmp(a.data, str, a.size) == 0;
}
// These two functions implement a bitset.
void bitset_set(Array_t<u64>* bitset, u64 bit, u8 val) {
u64 index = bit / 64;
u64 offset = bit % 64;
(*bitset)[index] ^= (((*bitset)[index] >> offset & 1) ^ val) << offset;
}
bool bitset_get(Array_t<u64> bitset, u64 bit) {
u64 index = bit / 64;
u64 offset = bit % 64;
return bitset[index] >> offset & 1;
}
#define JUP_STOX_IMPLEMENTATION
#include "stox.hpp"
| 8,689 | 3,147 |
#include "Application.h"
#include "ComponentCharacterController.h"
#include "ComponentTransform.h"
#include "ComponentPhysics.h"
#include "ComponentCollider.h"
#include "ComponentRigidBody.h"
#include "ComponentScript.h"
#include "ImGuizmos/ImGuizmo.h"
#include "CollisionLayers.h"
#include "GameObject.h"
#include "Alien.h"
#include "Event.h"
#include "Time.h"
#include "RandomHelper.h"
ComponentPhysics::ComponentPhysics(GameObject* go) : Component(go)
{
this->go = go;
serialize = false; // Not save & load
ID = (PxU32)Random::GetRandom32ID();
transform = go->GetComponent<ComponentTransform>();
state = PhysicState::DISABLED;
layers = &App->physx->layers;
scale = GetValidPhysicScale();
std::vector<ComponentScript*> found_script = go->GetComponents<ComponentScript>();
for (ComponentScript* script : found_script)
if (script->need_alien == true)
scripts.push_back(script);
}
ComponentPhysics::~ComponentPhysics()
{
if (actor) // Dettach and Delete Actor
{
PxU32 num_shapes = actor->getNbShapes();
PxShape* shapes[10];
actor->getShapes(shapes, num_shapes);
for (PxU32 i = 0; i < num_shapes; ++i)
actor->detachShape(*shapes[i]);
App->physx->RemoveBody(actor);
actor = nullptr;
}
rigid_body = nullptr;
}
ComponentRigidBody* ComponentPhysics::GetRigidBody()
{
return (rigid_body && IsDynamic()) ? rigid_body : nullptr;
}
void ComponentPhysics::OnEnable()
{
if (CheckChangeState())
UpdateBody();
}
void ComponentPhysics::OnDisable()
{
if (CheckChangeState())
UpdateBody();
}
void ComponentPhysics::Update()
{
GizmoManipulation(); // Check if gizmo is selected
UpdatePositioning(); // Move body or gameobject
}
void ComponentPhysics::PostUpdate()
{
float3 current_scale = GetValidPhysicScale();
if (!scale.Equals(current_scale)) {
scale = current_scale;
go->SendAlientEventThis(this, AlienEventType::PHYSICS_SCALE_CHANGED);
}
}
void ComponentPhysics::HandleAlienEvent(const AlienEvent& e)
{
switch (e.type) {
case AlienEventType::SCRIPT_ADDED: {
ComponentScript* script = (ComponentScript*)e.object;
if (script->game_object_attached == game_object_attached && script->need_alien == true)
scripts.push_back(script);
break; }
case AlienEventType::SCRIPT_DELETED: {
ComponentScript* script = (ComponentScript*)e.object;
if (script->game_object_attached == game_object_attached && script->need_alien == true)
scripts.remove(script);
break; }
case AlienEventType::COLLIDER_DELETED: {
ComponentCollider* object = (ComponentCollider*)e.object;
RemoveCollider(object);
break; }
case AlienEventType::RIGIDBODY_DELETED: {
ComponentRigidBody* object = (ComponentRigidBody*)e.object;
RemoveRigidBody(object);
break; }
case AlienEventType::CHARACTER_CTRL_DELETED: {
ComponentCharacterController* object = (ComponentCharacterController*)e.object;
RemoveController(object);
break; }
}
}
bool ComponentPhysics::AddRigidBody(ComponentRigidBody* rb)
{
if (CheckRigidBody(rb))
{
rigid_body = rb;
if (CheckChangeState()) UpdateBody();
return true;
}
return true;
}
bool ComponentPhysics::RemoveRigidBody(ComponentRigidBody* rb)
{
if (rb == rigid_body)
{
rigid_body = nullptr;
if (CheckChangeState()) UpdateBody();
return true;
}
return true;
}
void ComponentPhysics::SwitchedRigidBody(ComponentRigidBody* rb)
{
if (rb == rigid_body)
if (CheckChangeState()) UpdateBody();
}
void ComponentPhysics::AttachCollider(ComponentCollider* collider, bool only_update)
{
bool do_attach = false;
if (!only_update && CheckCollider(collider) && collider->IsEnabled())
{
if (CheckChangeState())
UpdateBody();
else
do_attach = true;
}
if (actor && (do_attach || only_update))
{
if (!ShapeAttached(collider->shape))
actor->attachShape(*collider->shape);
WakeUp();
}
}
void ComponentPhysics::DettachCollider(ComponentCollider* collider, bool only_update)
{
bool do_dettach = false;
if (!only_update && CheckCollider(collider) && !collider->IsEnabled())
{
if (CheckChangeState())
UpdateBody();
else
do_dettach = true;
}
if (actor && (do_dettach || only_update))
{
if (ShapeAttached(collider->shape))
actor->detachShape(*collider->shape);
WakeUp();
}
}
// Add Collider from Phisic System
bool ComponentPhysics::AddCollider(ComponentCollider* collider)
{
if (CheckCollider(collider))
{
if (!FindCollider(collider)) // Add Collider if is not found
colliders.push_back(collider);
if (CheckChangeState()) // Check if added collider change state
UpdateBody();
else // Else only attach
{
AttachCollider(collider, true);
}
return true;
}
return false;
}
// Remove Collider from Phisic System
bool ComponentPhysics::RemoveCollider(ComponentCollider* collider)
{
if (FindCollider(collider))
{
colliders.remove(collider);
if (CheckChangeState()) UpdateBody();
else
{
DettachCollider(collider, true);
}
return true;
}
return false;
}
bool ComponentPhysics::FindCollider(ComponentCollider* collider)
{
return (std::find(colliders.begin(), colliders.end(), collider) != colliders.end());
}
bool ComponentPhysics::CheckCollider(ComponentCollider* collider)
{
return (collider != nullptr && collider->game_object_attached == game_object_attached);
}
bool ComponentPhysics::CheckRigidBody(ComponentRigidBody* rb)
{
return (rb != nullptr && rb->game_object_attached == game_object_attached);
}
// Controller Logic -------------------------------
bool ComponentPhysics::AddController(ComponentCharacterController* ctrl)
{
if (CheckController(ctrl)) // TODO: review this
{
character_ctrl = ctrl;
return true;
}
return false;
}
bool ComponentPhysics::RemoveController(ComponentCharacterController* ctrl)
{
if (ctrl == character_ctrl) // TODO: review this
{
character_ctrl = nullptr;
if (CheckChangeState())
UpdateBody();
return true;
}
return false;
}
bool ComponentPhysics::CheckController(ComponentCharacterController* ctrl)
{
return (ctrl != nullptr && ctrl->game_object_attached == game_object_attached);
}
bool ComponentPhysics::CheckChangeState()
{
if ( !character_ctrl && !rigid_body && colliders.empty()) { // Delete if not has physic components
Destroy();
state = PhysicState::DISABLED;
return true;
}
PhysicState new_state = PhysicState::DISABLED;
if (!go->IsEnabled()) {
new_state = PhysicState::DISABLED;
}
else if (rigid_body /*&& rigid_body->IsEnabled()*/) {
new_state = PhysicState::DYNAMIC;
}
else if (HasEnabledColliders()) {
new_state = PhysicState::STATIC;
}
if (new_state != state) { // If state is different
state = new_state;
return true;
}
return false;
}
void ComponentPhysics::UpdateBody()
{
if (actor) // Dettach and Delete Actor
{
PxU32 num_shapes = actor->getNbShapes();
PxShape* shapes[10]; // Buffer Shapes
actor->getShapes(shapes, num_shapes);
for (PxU32 i = 0; i < num_shapes; ++i)
actor->detachShape(*shapes[i]);
App->physx->RemoveBody(actor);
actor = nullptr;
}
if (state == PhysicState::STATIC || state == PhysicState::DYNAMIC)
{
actor = App->physx->CreateBody(transform->GetGlobalMatrix(), IsDynamic());
if (actor == nullptr) {
LOG_ENGINE("PhyX Rigid Actor Created at Infinite Transform (Scale x,y,z = 0 ? )");
state == PhysicState::INVALID_TRANS;
return;
}
for (ComponentCollider* collider : colliders)
if (collider->enabled && collider->shape) // TODO: check this
actor->attachShape(*collider->shape);
if (IsDynamic())
rigid_body->SetBodyProperties();
}
}
float3 ComponentPhysics::GetValidPhysicScale()
{
float3 scale = transform->GetGlobalScale();
for (int i = 0; i < 3; ++i)
if (scale[i] == 0.f)
scale[i] = 0.01f;
return scale;
}
void ComponentPhysics::GizmoManipulation()
{
bool is_using_gizmo = ImGuizmo::IsUsing() && game_object_attached->IsSelected();
if (gizmo_selected)
{
if (!is_using_gizmo)
{
WakeUp();
gizmo_selected = false;
}
else
PutToSleep();
}
else
if (is_using_gizmo)
gizmo_selected = true;
}
void ComponentPhysics::UpdateActorTransform()
{
PxTransform trans;
if (!F4X4_TO_PXTRANS(transform->GetGlobalMatrix(), trans)) {
LOG_ENGINE("Error! GameObject %s transform is NaN or Infinite -> Physics Can't be updated ");
return;
}
actor->setGlobalPose(trans);
}
void ComponentPhysics::UpdatePositioning()
{
if (IsDisabled()) return;
if (character_ctrl && character_ctrl->IsEnabled()) {
UpdateActorTransform();
PutToSleep();
return;
}
if ( !Time::IsPlaying() || gizmo_selected) {
UpdateActorTransform();
}
else
{
if (IsDynamic()) {
PxTransform trans = actor->getGlobalPose(); // Get Controller Position
transform->SetGlobalPosition(PXVEC3_TO_F3(trans.p));
transform->SetGlobalRotation(PXQUAT_TO_QUAT(trans.q));
}
else {
PxTransform trans;
if (!F4X4_TO_PXTRANS(transform->GetGlobalMatrix(), trans)) {
LOG_ENGINE("Error! GameObject %s transform is NaN or Infinite -> Physics Can't be updated ");
return;
}
actor->setGlobalPose(trans);
}
}
}
void ComponentPhysics::WakeUp()
{
if (IsDynamic() && !IsKinematic())
actor->is<PxRigidDynamic>()->wakeUp();
}
void ComponentPhysics::PutToSleep()
{
if (IsDynamic() && !IsKinematic())
actor->is<PxRigidDynamic>()->putToSleep();
}
void ComponentPhysics::ChangedFilters()
{
if (IsDisabled()) return;
//App->physx->px_scene->resetFiltering(*actor);
}
bool ComponentPhysics::HasEnabledColliders()
{
for (ComponentCollider* collider : colliders)
if (collider->enabled)
return true;
return false;
}
bool ComponentPhysics::ShapeAttached(PxShape* shape)
{
bool ret = false;
PxU32 num_shapes = actor->getNbShapes();
PxShape* shapes[10]; // Buffer Shapes
actor->getShapes(shapes, num_shapes);
for (PxU32 i = 0; i < num_shapes; i++)
if (shapes[i] == shape) {
ret = true;
break;
}
return ret;
}
bool ComponentPhysics::IsDynamic() { return state == PhysicState::DYNAMIC; }
bool ComponentPhysics::IsKinematic() { return state == PhysicState::DYNAMIC && rigid_body->is_kinematic; }
bool ComponentPhysics::IsDisabled() { return state == PhysicState::DISABLED; }
| 10,107 | 3,847 |
//
// Created by alex on 12/12/15.
//
#include <GameTimer.h>
#include <chrono>
using namespace engine::sdl2;
using namespace std::chrono;
auto Game_timer::start() -> void
{
is_running = true;
start_time = high_resolution_clock::now();
last_dt = start_time;
}
auto Game_timer::stop() -> void
{
is_running = false;
stop_time = start_time;
start_time = timestamp();
}
auto Game_timer::delta_time() -> float
{
auto current_dt = high_resolution_clock::now();
auto diff = duration_cast<nanoseconds>(current_dt - last_dt);
last_dt = current_dt;
float dt = diff.count() / 1000000000.f;
return dt;
}
auto Game_timer::stopped() const -> bool
{
return !is_running;
}; | 710 | 264 |
#include "uipriv_qt5.hpp"
#include <QGroupBox>
#include <QVBoxLayout>
struct uiGroup : public uiQt5Control {};
char *uiGroupTitle(uiGroup *g)
{
if (auto groupBox = uiValidateAndCastObjTo<QGroupBox>(g)) {
return uiQt5StrdupQString(groupBox->title());
}
return nullptr;
}
void uiGroupSetTitle(uiGroup *g, const char *text)
{
if (auto groupBox = uiValidateAndCastObjTo<QGroupBox>(g)) {
groupBox->setTitle(QString::fromUtf8(text));
}
}
void uiGroupSetChild(uiGroup *g, uiControl *child)
{
if (auto groupBox = uiValidateAndCastObjTo<QGroupBox>(g)) {
auto obj = uiValidateAndCastObjTo<QObject>(child);
if (groupBox->layout()) {
groupBox->layout()->deleteLater();
}
if (auto layout = qobject_cast<QLayout*>(obj)) {
groupBox->setLayout(layout);
} else if (auto widget = qobject_cast<QWidget*>(obj)) {
auto layout = new QVBoxLayout;
layout->setMargin(0); // ?
layout->addWidget(widget);
groupBox->setLayout(layout);
} else {
qWarning("object is neither layout nor widget");
}
}
}
int uiGroupMargined(uiGroup *g)
{
qWarning("TODO: %p", (void*)g);
return 0;
}
void uiGroupSetMargined(uiGroup *g, int margined)
{
qWarning("TODO: %p, %d", (void*)g, margined);
}
uiGroup *uiNewGroup(const char *text)
{
auto groupBox = new QGroupBox(QString::fromUtf8(text));
// note styling is being set in main.cpp -> styleSheet
return uiAllocQt5ControlType(uiGroup,groupBox,uiQt5Control::DeleteControlOnQObjectFree);
}
| 1,455 | 574 |
using namespace Eigen;
using namespace std;
// inputs
Map<ArrayXXd> eAT(A,M,M);
Map<ArrayXXd> eaBl(aBl,M,T);
Map<ArrayXXd> ebetal(betal,rtot,T);
Map<ArrayXXd> esuperbetal(superbetal,M,T);
// locals
int t, state, substate, end;
double total, pi;
ArrayXd logdomain(M);
ArrayXd nextstate_unsmoothed(M);
ArrayXd nextstate_distr(M);
ArrayXd pair(2);
// code!
// sample first state
// logdomain = esuperbetal.col(0) + eaBl.col(0);
// nextstate_distr = (logdomain - logdomain.maxCoeff()).exp() * epi0;
// total = nextstate_distr.sum() * (((double)random())/((double)RAND_MAX));
// for (state=0; (total -= nextstate_distr(state)) > 0; state++) ;
// stateseq[0] = state;
t = 0;
state = initial_superstate;
substate = initial_substate;
pi = ps[state];
end = end_indices[state];
while (t < T) {
// loop inside the substates
while ((substate < end) && (t < T)) {
pair = eaBl(state,t) + ebetal.col(t).segment(substate,2);
pair = (pair - pair.maxCoeff()).exp();
total = (1.0-pi)*pair(1) / ((1.0-pi)*pair(1) + pi*pair(0));
substate += (((double)random())/((double)RAND_MAX)) < total;
stateseq[t] = state;
t += 1;
}
// sample the 'end' row just like a regular HMM transition
nextstate_unsmoothed = eAT.col(state);
int current_state = state;
while ((state == current_state) && (t < T)) {
logdomain = esuperbetal.col(t) + eaBl.col(t);
logdomain(state) = ebetal(end,t) + eaBl(state,t);
nextstate_distr = (logdomain - logdomain.maxCoeff()).exp() * nextstate_unsmoothed;
total = nextstate_distr.sum() * (((double)random())/((double)RAND_MAX));
for (state=0; (total -= nextstate_distr(state)) > 0; state++) ;
stateseq[t] = current_state;
t += 1;
}
substate = start_indices[state];
end = end_indices[state];
pi = ps[state];
}
| 1,866 | 733 |
/**********************************************************************
* Copyright (c) 2021, Filip Vasiljevic
* All rights reserved.
*
* This file is subject to the terms and conditions of the BSD 2-Clause
* License. See the file LICENSE in the root directory of the Rinvid
* repository for more details.
**********************************************************************/
#include <cstdint>
#include <iostream>
#include <string>
#include <vector>
#include "extern/include/stb_image.h"
#include "util/include/error_handler.h"
#include "util/include/image_loader.h"
namespace rinvid
{
bool load_image(const char* file_name, std::vector<std::uint8_t>& image_data, std::int32_t& width,
std::int32_t& height)
{
std::int32_t number_of_channels;
std::uint8_t* data = stbi_load(file_name, &width, &height, &number_of_channels, STBI_rgb_alpha);
if (data == NULL)
{
std::string error_description = "STBI: Image loading failed because: ";
error_description += stbi_failure_reason();
rinvid::errors::put_error_to_log(error_description);
return false;
}
for (std::int32_t i{0}; i < width * height * STBI_rgb_alpha; ++i)
{
image_data.push_back(data[i]);
}
stbi_image_free(data);
return true;
}
} // namespace rinvid
| 1,323 | 433 |
#include "parameters.h"
const float A_MIN = 100;
const float A_HUGE = 500;
const float ALPHA = 1.3f;
const float R_MIN = 5.f;
const int N_DOMINANT = 20;
const bool SAVE_PATCH_MATCH = false;
const int MIN_PATCH_OFFSET = 20;
const int RELEVANT_OFFSET_NORM = 25;
const float VARIANCE_THRESHOLD = 2.f; | 298 | 141 |
#include "_text.h"
int j(text txt)
{
std::list<std::string>::iterator cursor_line = txt->cursor->line;
std::list<std::string>::iterator cursor_next = txt->cursor->line;
cursor_next++;
/* ΠΡΠΎΠ²Π΅ΡΠΊΠ° Π½Π° ΠΏΠΎΡΠ»Π΅Π΄Π½ΡΡ ΡΡΡΠΎΠΊΡ */
if (cursor_next == txt->lines->end()) {
printf
("ΠΠ΅Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎ. Π’Π΅ΠΊΡΡΠ°Ρ ΡΡΡΠΎΠΊΠ° ΠΏΠΎΡΠ»Π΅Π΄Π½ΡΡ\n");
return -1;
}
// /* ΠΡΠΈΡΠΎΠ΅Π΄ΠΈΠ½ΡΠ΅ΠΌ ΡΠ»Π΅Π΄ΡΡΡΡΡ ΡΡΡΠΎΠΊΡ */
// strcat(cursor_line->contents, cursor_next->contents);
if (cursor_next != txt->lines->end()) {
/*ΠΠ°ΠΏΠΎΠΌΠΈΠ½Π°Π΅ΠΌ ΡΠΊΠ°Π·Π°ΡΠ΅Π»Ρ Π½Π° ΡΠ»Π΅Π΄ΡΡΡΡΡ ΡΡΡΠΎΠΊΡ Π΄Π»Ρ ΠΏΠΎΡΠ»Π΅Π΄ΡΡΡΠ΅Π³ΠΎ ΠΎΡΠΈΡΠ΅Π½ΠΈΡ */
*cursor_line += *cursor_next;
txt->lines->erase(cursor_next);
}
return 0;
}
| 711 | 249 |
#pragma once
#include <iostream>
#include <librealsense2/rs.hpp>
#include <iostream>
#include <memory>
#include "Types.hpp"
#include "NavPose2d_Pub.hpp"
#include "Position3d_Pub.hpp"
#include "Velocity3d_Pub.hpp"
class Localizer
{
public:
Localizer();
~Localizer();
// TODO: refactor as virtual sensor interface
void step();
private:
void setNavPose2d(NavPose2d& gNavPose) const;
void setPose3d(Position3d& pose) const;
void setVel3d(Velocity3d& vel) const;
void setState3d(NavPose2d& gNavPose, VehicleState& gState) const; // not used
std::unique_ptr<rs2::pipeline> m_pipe = nullptr;
rs2_pose m_pose = {0};
NavPose2d_Pub::NavPose2d_Pub m_NavPose2d_PubNode;
Position3d_Pub::Position3d_Pub m_Position3d_PubNode;
Velocity3d_Pub::Velocity3d_Pub m_Velocity3d_PubNode;
}; | 901 | 337 |
#ifndef _Actuator_hpp_
#define _Actuator_hpp_
#include <Utilities\Logger.hpp>
#include <Utilities\Conversion.hpp>
class Actuator
{
protected:
sf::Mutex confmtx;
private:
virtual float getRawVector() = 0;
float multiplier;
float adjustment;
public:
Actuator();
~Actuator();
float getControlVector();
void setMultiplier(float);
void setAdjustment(float);
float getMultiplier();
float getAdjustment();
};
#endif // !_Actuator_hpp_
| 478 | 192 |
#include<cstdio>
using namespace std;
int main(){
char a[13];
int n,b[13];
for (int i=0;i<13;i++){
a[i]=getchar();
}
for (int i=0;i<13;i++){
b[i]=a[i]-48;
}
n=(b[0]*1+b[2]*2+b[3]*3+b[4]*4+b[6]*5+b[7]*6+b[8]*7+b[9]*8+b[10]*9)%11;
if (n==10){
if (a[12]=='X') printf("Right");
else {
for (int i=0;i<12;i++) printf("%c",a[i]);
printf("X");
}
}
else {
if (b[12]==n) printf("Right");
else {
for (int i=0;i<12;i++) printf("%c",a[i]);
printf("%d",n);
}
}
return 0;
} | 498 | 310 |
/********************************************************************************
MaxFlow Ford-Fulkerson algorithm. O(M|f|), |f| - maxflow value
Based on problem 2783 from informatics.mccme.ru
http://informatics.mccme.ru/mod/statements/view3.php?chapterid=2783#1
********************************************************************************/
#include <iostream>
#include <fstream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <cstdlib>
#include <cstdio>
#include <string>
#include <cstring>
#include <cassert>
#include <utility>
#include <iomanip>
using namespace std;
const int MAXN = 1050;
const int INF = (int) 1e9;
struct edge {
int from, to, f, cap;
};
int n, m;
vector <edge> e;
vector <int> g[MAXN];
bool used[MAXN];
int s, t;
int ans;
void addEdge(int from, int to, int cap) {
edge ed;
ed.from = from; ed.to = to; ed.f = 0; ed.cap = cap;
e.push_back(ed);
g[from].push_back((int) e.size() - 1);
ed.from = to; ed.to = from; ed.f = cap; ed.cap = cap;
e.push_back(ed);
g[to].push_back((int) e.size() - 1);
}
int pushFlow(int v, int flow = INF) {
used[v] = true;
if (v == t)
return flow;
for (int i = 0; i < (int) g[v].size(); i++) {
int ind = g[v][i];
int to = e[ind].to;
int f = e[ind].f;
int cap = e[ind].cap;
if (used[to] || cap - f == 0)
continue;
int pushed = pushFlow(to, min(flow, cap - f));
if (pushed > 0) {
e[ind].f += pushed;
e[ind ^ 1].f -= pushed;
return pushed;
}
}
return 0;
}
int main() {
//assert(freopen("input.txt","r",stdin));
//assert(freopen("output.txt","w",stdout));
scanf("%d %d", &n, &m);
s = 1; t = n;
for (int i = 1; i <= m; i++) {
int from, to, cap;
scanf("%d %d %d", &from, &to, &cap);
addEdge(from, to, cap);
}
while (true) {
memset(used, 0, sizeof(used));
int add = pushFlow(s);
if (add == 0)
break;
ans += add;
}
printf("%d\n", ans);
return 0;
}
| 2,297 | 875 |
#include <map>
#include <string>
#include <iostream>
typedef std::map<std::string, std::string>::const_iterator it_type;
class ArgParser
{
public:
ArgParser(const int argc, char* const argv[])
{
for (int i = 0; i < argc; i++)
{
std::string str = argv[i];
if (str[0] != '-')
continue;
if (str[1] == '-')
index[str.substr(2, str.length() - 2)] = " ";
else if (i < argc - 1)
index[str.substr(1, str.length() - 1)] = argv[++i];
}
}
std::string operator()(const std::string key)
{
if (exists(key))
return index[key];
return "";
}
bool exists(const std::string key)
{
return index.count(key);
}
private:
std::map<std::string, std::string> index;
friend std::ostream& operator<<(std::ostream& os, const ArgParser& ap)
{
for(auto& it : ap.index)
{
os << it.first << " " << it.second << std::endl;
}
return os;
}
ArgParser() { }
};
| 936 | 408 |
// Copyright 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "sling/task/dashboard.h"
#include <time.h>
#include <unistd.h>
#include <sstream>
#include "sling/base/perf.h"
namespace sling {
namespace task {
Dashboard::Dashboard() {
start_time_ = time(0);
}
Dashboard::~Dashboard() {
for (auto *j : jobs_) delete j;
}
void Dashboard::Register(HTTPServer *http) {
http->Register("/status", this, &Dashboard::HandleStatus);
common_.Register(http);
app_.Register(http);
}
string Dashboard::GetStatus() {
MutexLock lock(&mu_);
std::stringstream out;
// Output current time and status.
bool running = (status_ < FINAL);
out << "{\"time\":" << (running ? time(0) : end_time_);
out << ",\"started\":" << start_time_;
out << ",\"finished\":" << (running ? 0 : 1);
// Output jobs.
out << ",\"jobs\":[";
bool first_job = true;
for (JobStatus *status : jobs_) {
if (!first_job) out << ",";
first_job = false;
out << "{\"name\":\"" << status->name << "\"";
out << ",\"started\":" << status->started;
if (status->ended != 0) out << ",\"ended\":" << status->ended;
if (status->job != nullptr) {
// Output stages for running job.
out << ",\"stages\":[";
bool first_stage = true;
for (Stage *stage : status->job->stages()) {
if (!first_stage) out << ",";
first_stage = false;
out << "{\"tasks\":" << stage->num_tasks()
<< ",\"done\":" << stage->num_completed_tasks() << "}";
}
out << "],";
// Output counters for running job.
out << "\"counters\":{";
bool first_counter = true;
status->job->IterateCounters(
[&out, &first_counter](const string &name, Counter *counter) {
if (!first_counter) out << ",";
first_counter = false;
out << "\"" << name << "\":" << counter->value();
}
);
out << "}";
} else {
// Output counters for completed job.
out << ",\"counters\":{";
bool first_counter = true;
for (auto &counter : status->counters) {
if (!first_counter) out << ",";
first_counter = false;
out << "\"" << counter.first << "\":" << counter.second;
}
out << "}";
}
out << "}";
}
out << "]";
// Output resource usage.
Perf perf;
perf.Sample();
out << ",\"utime\":" << perf.utime();
out << ",\"stime\":" << perf.stime();
out << ",\"mem\":" << (running ? perf.memory() : Perf::peak_memory_usage());
out << ",\"ioread\":" << perf.ioread();
out << ",\"iowrite\":" << perf.iowrite();
out << ",\"flops\":" << perf.flops();
out << ",\"temperature\":"
<< (running ? perf.cputemp() : Perf::peak_cpu_temperature());
out << "}";
return out.str();
}
void Dashboard::HandleStatus(HTTPRequest *request, HTTPResponse *response) {
response->set_content_type("text/json; charset=utf-8");
response->Append(GetStatus());
if (status_ == IDLE) status_ = MONITORED;
if (status_ == FINAL) status_ = SYNCHED;
}
void Dashboard::OnJobStart(Job *job) {
MutexLock lock(&mu_);
// Add job to job list.
JobStatus *status = new JobStatus(job);
jobs_.push_back(status);
status->name = job->name();
status->started = time(0);
active_jobs_[job] = status;
}
void Dashboard::OnJobDone(Job *job) {
MutexLock lock(&mu_);
// Get job status.
JobStatus *status = active_jobs_[job];
CHECK(status != nullptr);
// Record job completion time.
status->ended = time(0);
// Update final counter values.
job->IterateCounters([status](const string &name, Counter *counter) {
status->counters.emplace_back(name, counter->value());
});
// Remove job from active job list.
active_jobs_.erase(job);
status->job = nullptr;
}
void Dashboard::Finalize(int timeout) {
if (status_ == MONITORED) {
// Signal that all jobs are done.
end_time_ = time(0);
status_ = FINAL;
// Wait until final status has been sent back.
for (int wait = 0; wait < timeout && status_ != SYNCHED; ++wait) sleep(1);
}
status_ = TERMINAL;
}
} // namespace task
} // namespace sling
| 4,631 | 1,606 |
const unsigned char licence[] = {
/* 00000000 */ 0x47, 0x4e, 0x55, 0x20, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c,
/* 00000010 */ 0x49, 0x43, 0x20, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20,
/* 00000020 */ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
/* 00000030 */ 0x20, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x2c, 0x20, 0x32, 0x39, 0x20,
/* 00000040 */ 0x4a, 0x75, 0x6e, 0x65, 0x20, 0x32, 0x30, 0x30, 0x37, 0x0a, 0x0a, 0x20, 0x43, 0x6f, 0x70, 0x79,
/* 00000050 */ 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x28, 0x43, 0x29, 0x20, 0x32, 0x30, 0x30, 0x37, 0x20, 0x46,
/* 00000060 */ 0x72, 0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x46, 0x6f, 0x75,
/* 00000070 */ 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x3c, 0x68,
/* 00000080 */ 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x66, 0x73, 0x66, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x3e, 0x0a,
/* 00000090 */ 0x20, 0x45, 0x76, 0x65, 0x72, 0x79, 0x6f, 0x6e, 0x65, 0x20, 0x69, 0x73, 0x20, 0x70, 0x65, 0x72,
/* 000000a0 */ 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x61,
/* 000000b0 */ 0x6e, 0x64, 0x20, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, 0x65,
/* 000000c0 */ 0x72, 0x62, 0x61, 0x74, 0x69, 0x6d, 0x20, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x73, 0x0a, 0x20, 0x6f,
/* 000000d0 */ 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x64,
/* 000000e0 */ 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x63, 0x68, 0x61,
/* 000000f0 */ 0x6e, 0x67, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20,
/* 00000100 */ 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
/* 00000110 */ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
/* 00000120 */ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x72, 0x65, 0x61, 0x6d, 0x62, 0x6c, 0x65, 0x0a, 0x0a,
/* 00000130 */ 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61,
/* 00000140 */ 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,
/* 00000150 */ 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x66, 0x72, 0x65, 0x65, 0x2c, 0x20, 0x63, 0x6f, 0x70, 0x79,
/* 00000160 */ 0x6c, 0x65, 0x66, 0x74, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x66, 0x6f, 0x72,
/* 00000170 */ 0x0a, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x74,
/* 00000180 */ 0x68, 0x65, 0x72, 0x20, 0x6b, 0x69, 0x6e, 0x64, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x77, 0x6f, 0x72,
/* 00000190 */ 0x6b, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e,
/* 000001a0 */ 0x73, 0x65, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x73, 0x6f, 0x66,
/* 000001b0 */ 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20,
/* 000001c0 */ 0x70, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x20,
/* 000001d0 */ 0x61, 0x72, 0x65, 0x20, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x0a, 0x74, 0x6f, 0x20,
/* 000001e0 */ 0x74, 0x61, 0x6b, 0x65, 0x20, 0x61, 0x77, 0x61, 0x79, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x66,
/* 000001f0 */ 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x68, 0x61, 0x72, 0x65, 0x20,
/* 00000200 */ 0x61, 0x6e, 0x64, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77,
/* 00000210 */ 0x6f, 0x72, 0x6b, 0x73, 0x2e, 0x20, 0x20, 0x42, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61,
/* 00000220 */ 0x73, 0x74, 0x2c, 0x0a, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x65, 0x6e, 0x65,
/* 00000230 */ 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e,
/* 00000240 */ 0x73, 0x65, 0x20, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x20, 0x74,
/* 00000250 */ 0x6f, 0x20, 0x67, 0x75, 0x61, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x20, 0x79, 0x6f, 0x75, 0x72,
/* 00000260 */ 0x20, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x20, 0x74, 0x6f, 0x0a, 0x73, 0x68, 0x61, 0x72,
/* 00000270 */ 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x61, 0x6c, 0x6c,
/* 00000280 */ 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x70,
/* 00000290 */ 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x2d, 0x2d, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20,
/* 000002a0 */ 0x73, 0x75, 0x72, 0x65, 0x20, 0x69, 0x74, 0x20, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x20,
/* 000002b0 */ 0x66, 0x72, 0x65, 0x65, 0x0a, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x66, 0x6f,
/* 000002c0 */ 0x72, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x69, 0x74, 0x73, 0x20, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e,
/* 000002d0 */ 0x20, 0x20, 0x57, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x46, 0x72, 0x65, 0x65, 0x20, 0x53,
/* 000002e0 */ 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69,
/* 000002f0 */ 0x6f, 0x6e, 0x2c, 0x20, 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x47, 0x4e, 0x55, 0x20,
/* 00000300 */ 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c,
/* 00000310 */ 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6d, 0x6f, 0x73, 0x74, 0x20,
/* 00000320 */ 0x6f, 0x66, 0x20, 0x6f, 0x75, 0x72, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x3b,
/* 00000330 */ 0x20, 0x69, 0x74, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x20, 0x61, 0x6c, 0x73, 0x6f,
/* 00000340 */ 0x20, 0x74, 0x6f, 0x0a, 0x61, 0x6e, 0x79, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x77, 0x6f,
/* 00000350 */ 0x72, 0x6b, 0x20, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x64, 0x20, 0x74, 0x68, 0x69, 0x73,
/* 00000360 */ 0x20, 0x77, 0x61, 0x79, 0x20, 0x62, 0x79, 0x20, 0x69, 0x74, 0x73, 0x20, 0x61, 0x75, 0x74, 0x68,
/* 00000370 */ 0x6f, 0x72, 0x73, 0x2e, 0x20, 0x20, 0x59, 0x6f, 0x75, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x61, 0x70,
/* 00000380 */ 0x70, 0x6c, 0x79, 0x20, 0x69, 0x74, 0x20, 0x74, 0x6f, 0x0a, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x70,
/* 00000390 */ 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x73, 0x2c, 0x20, 0x74, 0x6f, 0x6f, 0x2e, 0x0a, 0x0a, 0x20,
/* 000003a0 */ 0x20, 0x57, 0x68, 0x65, 0x6e, 0x20, 0x77, 0x65, 0x20, 0x73, 0x70, 0x65, 0x61, 0x6b, 0x20, 0x6f,
/* 000003b0 */ 0x66, 0x20, 0x66, 0x72, 0x65, 0x65, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x2c,
/* 000003c0 */ 0x20, 0x77, 0x65, 0x20, 0x61, 0x72, 0x65, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x69, 0x6e,
/* 000003d0 */ 0x67, 0x20, 0x74, 0x6f, 0x20, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x2c, 0x20, 0x6e, 0x6f,
/* 000003e0 */ 0x74, 0x0a, 0x70, 0x72, 0x69, 0x63, 0x65, 0x2e, 0x20, 0x20, 0x4f, 0x75, 0x72, 0x20, 0x47, 0x65,
/* 000003f0 */ 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63,
/* 00000400 */ 0x65, 0x6e, 0x73, 0x65, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e,
/* 00000410 */ 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x73, 0x75, 0x72, 0x65, 0x20,
/* 00000420 */ 0x74, 0x68, 0x61, 0x74, 0x20, 0x79, 0x6f, 0x75, 0x0a, 0x68, 0x61, 0x76, 0x65, 0x20, 0x74, 0x68,
/* 00000430 */ 0x65, 0x20, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x20, 0x74, 0x6f, 0x20, 0x64, 0x69, 0x73,
/* 00000440 */ 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x73, 0x20, 0x6f,
/* 00000450 */ 0x66, 0x20, 0x66, 0x72, 0x65, 0x65, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20,
/* 00000460 */ 0x28, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x0a,
/* 00000470 */ 0x74, 0x68, 0x65, 0x6d, 0x20, 0x69, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x77, 0x69, 0x73, 0x68,
/* 00000480 */ 0x29, 0x2c, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x72, 0x65, 0x63, 0x65,
/* 00000490 */ 0x69, 0x76, 0x65, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20,
/* 000004a0 */ 0x6f, 0x72, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x67, 0x65, 0x74, 0x20, 0x69, 0x74, 0x20, 0x69, 0x66,
/* 000004b0 */ 0x20, 0x79, 0x6f, 0x75, 0x0a, 0x77, 0x61, 0x6e, 0x74, 0x20, 0x69, 0x74, 0x2c, 0x20, 0x74, 0x68,
/* 000004c0 */ 0x61, 0x74, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67,
/* 000004d0 */ 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x6f,
/* 000004e0 */ 0x72, 0x20, 0x75, 0x73, 0x65, 0x20, 0x70, 0x69, 0x65, 0x63, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20,
/* 000004f0 */ 0x69, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x6e, 0x65, 0x77, 0x0a, 0x66, 0x72, 0x65, 0x65, 0x20, 0x70,
/* 00000500 */ 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x73, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x61,
/* 00000510 */ 0x74, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6b, 0x6e, 0x6f, 0x77, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63,
/* 00000520 */ 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20, 0x74, 0x68, 0x69, 0x6e,
/* 00000530 */ 0x67, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x6f, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63,
/* 00000540 */ 0x74, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x2c, 0x20, 0x77,
/* 00000550 */ 0x65, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e,
/* 00000560 */ 0x74, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x64, 0x65,
/* 00000570 */ 0x6e, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x79, 0x6f, 0x75, 0x0a, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20,
/* 00000580 */ 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67,
/* 00000590 */ 0x20, 0x79, 0x6f, 0x75, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x64, 0x65,
/* 000005a0 */ 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x2e, 0x20, 0x20, 0x54,
/* 000005b0 */ 0x68, 0x65, 0x72, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x68, 0x61,
/* 000005c0 */ 0x76, 0x65, 0x0a, 0x63, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f,
/* 000005d0 */ 0x6e, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x20, 0x69, 0x66, 0x20, 0x79,
/* 000005e0 */ 0x6f, 0x75, 0x20, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x63, 0x6f,
/* 000005f0 */ 0x70, 0x69, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x6f, 0x66, 0x74,
/* 00000600 */ 0x77, 0x61, 0x72, 0x65, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x69, 0x66, 0x0a, 0x79, 0x6f, 0x75, 0x20,
/* 00000610 */ 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x20, 0x69, 0x74, 0x3a, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f,
/* 00000620 */ 0x6e, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x72,
/* 00000630 */ 0x65, 0x73, 0x70, 0x65, 0x63, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x72, 0x65, 0x65, 0x64,
/* 00000640 */ 0x6f, 0x6d, 0x20, 0x6f, 0x66, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x73, 0x2e, 0x0a, 0x0a, 0x20,
/* 00000650 */ 0x20, 0x46, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2c, 0x20, 0x69, 0x66,
/* 00000660 */ 0x20, 0x79, 0x6f, 0x75, 0x20, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20,
/* 00000670 */ 0x63, 0x6f, 0x70, 0x69, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x61,
/* 00000680 */ 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x2c, 0x20, 0x77, 0x68, 0x65, 0x74, 0x68, 0x65,
/* 00000690 */ 0x72, 0x0a, 0x67, 0x72, 0x61, 0x74, 0x69, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20,
/* 000006a0 */ 0x61, 0x20, 0x66, 0x65, 0x65, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20,
/* 000006b0 */ 0x70, 0x61, 0x73, 0x73, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72,
/* 000006c0 */ 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61,
/* 000006d0 */ 0x6d, 0x65, 0x0a, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74,
/* 000006e0 */ 0x20, 0x79, 0x6f, 0x75, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x2e, 0x20, 0x20,
/* 000006f0 */ 0x59, 0x6f, 0x75, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x73, 0x75,
/* 00000700 */ 0x72, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x79, 0x2c, 0x20, 0x74, 0x6f,
/* 00000710 */ 0x6f, 0x2c, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x0a, 0x6f, 0x72, 0x20, 0x63, 0x61,
/* 00000720 */ 0x6e, 0x20, 0x67, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
/* 00000730 */ 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x20, 0x20, 0x41, 0x6e, 0x64, 0x20, 0x79, 0x6f, 0x75, 0x20,
/* 00000740 */ 0x6d, 0x75, 0x73, 0x74, 0x20, 0x73, 0x68, 0x6f, 0x77, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x20, 0x74,
/* 00000750 */ 0x68, 0x65, 0x73, 0x65, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x73, 0x6f, 0x20, 0x74, 0x68,
/* 00000760 */ 0x65, 0x79, 0x0a, 0x6b, 0x6e, 0x6f, 0x77, 0x20, 0x74, 0x68, 0x65, 0x69, 0x72, 0x20, 0x72, 0x69,
/* 00000770 */ 0x67, 0x68, 0x74, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x44, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70,
/* 00000780 */ 0x65, 0x72, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65,
/* 00000790 */ 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74,
/* 000007a0 */ 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x77, 0x69, 0x74,
/* 000007b0 */ 0x68, 0x20, 0x74, 0x77, 0x6f, 0x20, 0x73, 0x74, 0x65, 0x70, 0x73, 0x3a, 0x0a, 0x28, 0x31, 0x29,
/* 000007c0 */ 0x20, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68,
/* 000007d0 */ 0x74, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72,
/* 000007e0 */ 0x65, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x28, 0x32, 0x29, 0x20, 0x6f, 0x66, 0x66, 0x65, 0x72,
/* 000007f0 */ 0x20, 0x79, 0x6f, 0x75, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73,
/* 00000800 */ 0x65, 0x0a, 0x67, 0x69, 0x76, 0x69, 0x6e, 0x67, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6c, 0x65, 0x67,
/* 00000810 */ 0x61, 0x6c, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f,
/* 00000820 */ 0x20, 0x63, 0x6f, 0x70, 0x79, 0x2c, 0x20, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
/* 00000830 */ 0x65, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x20,
/* 00000840 */ 0x69, 0x74, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64,
/* 00000850 */ 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x27, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61,
/* 00000860 */ 0x75, 0x74, 0x68, 0x6f, 0x72, 0x73, 0x27, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69,
/* 00000870 */ 0x6f, 0x6e, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x50, 0x4c, 0x20, 0x63, 0x6c, 0x65, 0x61,
/* 00000880 */ 0x72, 0x6c, 0x79, 0x20, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x73, 0x0a, 0x74, 0x68, 0x61,
/* 00000890 */ 0x74, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x20, 0x77, 0x61,
/* 000008a0 */ 0x72, 0x72, 0x61, 0x6e, 0x74, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20,
/* 000008b0 */ 0x66, 0x72, 0x65, 0x65, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x20, 0x20,
/* 000008c0 */ 0x46, 0x6f, 0x72, 0x20, 0x62, 0x6f, 0x74, 0x68, 0x20, 0x75, 0x73, 0x65, 0x72, 0x73, 0x27, 0x20,
/* 000008d0 */ 0x61, 0x6e, 0x64, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x73, 0x27, 0x20, 0x73, 0x61, 0x6b,
/* 000008e0 */ 0x65, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x50, 0x4c, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69,
/* 000008f0 */ 0x72, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,
/* 00000900 */ 0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x62, 0x65, 0x20, 0x6d, 0x61,
/* 00000910 */ 0x72, 0x6b, 0x65, 0x64, 0x20, 0x61, 0x73, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x2c,
/* 00000920 */ 0x20, 0x73, 0x6f, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x69, 0x72, 0x20, 0x70,
/* 00000930 */ 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x6e, 0x6f, 0x74,
/* 00000940 */ 0x20, 0x62, 0x65, 0x20, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x20, 0x65,
/* 00000950 */ 0x72, 0x72, 0x6f, 0x6e, 0x65, 0x6f, 0x75, 0x73, 0x6c, 0x79, 0x20, 0x74, 0x6f, 0x0a, 0x61, 0x75,
/* 00000960 */ 0x74, 0x68, 0x6f, 0x72, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75,
/* 00000970 */ 0x73, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x53,
/* 00000980 */ 0x6f, 0x6d, 0x65, 0x20, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20,
/* 00000990 */ 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x64, 0x65, 0x6e, 0x79,
/* 000009a0 */ 0x20, 0x75, 0x73, 0x65, 0x72, 0x73, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x6f,
/* 000009b0 */ 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x20, 0x6f, 0x72, 0x20, 0x72, 0x75, 0x6e, 0x0a,
/* 000009c0 */ 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
/* 000009d0 */ 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72,
/* 000009e0 */ 0x65, 0x20, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x2c, 0x20, 0x61,
/* 000009f0 */ 0x6c, 0x74, 0x68, 0x6f, 0x75, 0x67, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x6e, 0x75,
/* 00000a00 */ 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x0a, 0x63, 0x61, 0x6e, 0x20, 0x64, 0x6f, 0x20,
/* 00000a10 */ 0x73, 0x6f, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x66, 0x75, 0x6e,
/* 00000a20 */ 0x64, 0x61, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x69, 0x6e, 0x63, 0x6f, 0x6d,
/* 00000a30 */ 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65,
/* 00000a40 */ 0x20, 0x61, 0x69, 0x6d, 0x20, 0x6f, 0x66, 0x0a, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69,
/* 00000a50 */ 0x6e, 0x67, 0x20, 0x75, 0x73, 0x65, 0x72, 0x73, 0x27, 0x20, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f,
/* 00000a60 */ 0x6d, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20,
/* 00000a70 */ 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x73,
/* 00000a80 */ 0x79, 0x73, 0x74, 0x65, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x0a, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72,
/* 00000a90 */ 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x61, 0x62, 0x75, 0x73, 0x65, 0x20,
/* 00000aa0 */ 0x6f, 0x63, 0x63, 0x75, 0x72, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x72,
/* 00000ab0 */ 0x65, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x20, 0x66,
/* 00000ac0 */ 0x6f, 0x72, 0x20, 0x69, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x73, 0x20, 0x74,
/* 00000ad0 */ 0x6f, 0x0a, 0x75, 0x73, 0x65, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20,
/* 00000ae0 */ 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x65, 0x6c, 0x79, 0x20, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20,
/* 00000af0 */ 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x75, 0x6e, 0x61, 0x63, 0x63,
/* 00000b00 */ 0x65, 0x70, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65, 0x66,
/* 00000b10 */ 0x6f, 0x72, 0x65, 0x2c, 0x20, 0x77, 0x65, 0x0a, 0x68, 0x61, 0x76, 0x65, 0x20, 0x64, 0x65, 0x73,
/* 00000b20 */ 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69,
/* 00000b30 */ 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x50, 0x4c, 0x20, 0x74, 0x6f,
/* 00000b40 */ 0x20, 0x70, 0x72, 0x6f, 0x68, 0x69, 0x62, 0x69, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72,
/* 00000b50 */ 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x6f, 0x73, 0x65,
/* 00000b60 */ 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2e, 0x20, 0x20, 0x49, 0x66, 0x20, 0x73,
/* 00000b70 */ 0x75, 0x63, 0x68, 0x20, 0x70, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x73, 0x20, 0x61, 0x72, 0x69,
/* 00000b80 */ 0x73, 0x65, 0x20, 0x73, 0x75, 0x62, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x6c, 0x79,
/* 00000b90 */ 0x20, 0x69, 0x6e, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e,
/* 00000ba0 */ 0x73, 0x2c, 0x20, 0x77, 0x65, 0x0a, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x61, 0x64,
/* 00000bb0 */ 0x79, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x69, 0x73,
/* 00000bc0 */ 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68,
/* 00000bd0 */ 0x6f, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x66,
/* 00000be0 */ 0x75, 0x74, 0x75, 0x72, 0x65, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x6f,
/* 00000bf0 */ 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x50, 0x4c, 0x2c, 0x20, 0x61, 0x73, 0x20, 0x6e, 0x65,
/* 00000c00 */ 0x65, 0x64, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x20,
/* 00000c10 */ 0x74, 0x68, 0x65, 0x20, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x20, 0x6f, 0x66, 0x20, 0x75,
/* 00000c20 */ 0x73, 0x65, 0x72, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x6c, 0x79,
/* 00000c30 */ 0x2c, 0x20, 0x65, 0x76, 0x65, 0x72, 0x79, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20,
/* 00000c40 */ 0x69, 0x73, 0x20, 0x74, 0x68, 0x72, 0x65, 0x61, 0x74, 0x65, 0x6e, 0x65, 0x64, 0x20, 0x63, 0x6f,
/* 00000c50 */ 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x6c, 0x79, 0x20, 0x62, 0x79, 0x20, 0x73, 0x6f, 0x66, 0x74,
/* 00000c60 */ 0x77, 0x61, 0x72, 0x65, 0x20, 0x70, 0x61, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x0a, 0x53, 0x74,
/* 00000c70 */ 0x61, 0x74, 0x65, 0x73, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20,
/* 00000c80 */ 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x20, 0x70, 0x61, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x6f,
/* 00000c90 */ 0x20, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x20, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f,
/* 00000ca0 */ 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66,
/* 00000cb0 */ 0x0a, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x6f, 0x6e, 0x20, 0x67, 0x65, 0x6e,
/* 00000cc0 */ 0x65, 0x72, 0x61, 0x6c, 0x2d, 0x70, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x20, 0x63, 0x6f, 0x6d,
/* 00000cd0 */ 0x70, 0x75, 0x74, 0x65, 0x72, 0x73, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x74,
/* 00000ce0 */ 0x68, 0x6f, 0x73, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x2c, 0x20, 0x77, 0x65,
/* 00000cf0 */ 0x20, 0x77, 0x69, 0x73, 0x68, 0x20, 0x74, 0x6f, 0x0a, 0x61, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x74,
/* 00000d00 */ 0x68, 0x65, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x20, 0x64, 0x61, 0x6e, 0x67, 0x65,
/* 00000d10 */ 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x70, 0x61, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61,
/* 00000d20 */ 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x66, 0x72, 0x65, 0x65,
/* 00000d30 */ 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x63, 0x6f, 0x75, 0x6c, 0x64, 0x0a, 0x6d,
/* 00000d40 */ 0x61, 0x6b, 0x65, 0x20, 0x69, 0x74, 0x20, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65,
/* 00000d50 */ 0x6c, 0x79, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x72, 0x69, 0x65, 0x74, 0x61, 0x72, 0x79, 0x2e, 0x20,
/* 00000d60 */ 0x20, 0x54, 0x6f, 0x20, 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x68, 0x69, 0x73,
/* 00000d70 */ 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x50, 0x4c, 0x20, 0x61, 0x73, 0x73, 0x75, 0x72, 0x65,
/* 00000d80 */ 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x0a, 0x70, 0x61, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x63,
/* 00000d90 */ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f,
/* 00000da0 */ 0x20, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x67,
/* 00000db0 */ 0x72, 0x61, 0x6d, 0x20, 0x6e, 0x6f, 0x6e, 0x2d, 0x66, 0x72, 0x65, 0x65, 0x2e, 0x0a, 0x0a, 0x20,
/* 00000dc0 */ 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x65, 0x20, 0x74, 0x65, 0x72,
/* 00000dd0 */ 0x6d, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,
/* 00000de0 */ 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x69, 0x6e, 0x67, 0x2c, 0x20, 0x64,
/* 00000df0 */ 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x0a,
/* 00000e00 */ 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x6c,
/* 00000e10 */ 0x6c, 0x6f, 0x77, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
/* 00000e20 */ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x54, 0x45, 0x52,
/* 00000e30 */ 0x4d, 0x53, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e,
/* 00000e40 */ 0x53, 0x0a, 0x0a, 0x20, 0x20, 0x30, 0x2e, 0x20, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69,
/* 00000e50 */ 0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x22, 0x54, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69,
/* 00000e60 */ 0x63, 0x65, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f,
/* 00000e70 */ 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,
/* 00000e80 */ 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75,
/* 00000e90 */ 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x0a, 0x0a, 0x20,
/* 00000ea0 */ 0x20, 0x22, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x22, 0x20, 0x61, 0x6c, 0x73,
/* 00000eb0 */ 0x6f, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68,
/* 00000ec0 */ 0x74, 0x2d, 0x6c, 0x69, 0x6b, 0x65, 0x20, 0x6c, 0x61, 0x77, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74,
/* 00000ed0 */ 0x20, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20,
/* 00000ee0 */ 0x6b, 0x69, 0x6e, 0x64, 0x73, 0x20, 0x6f, 0x66, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x2c, 0x20,
/* 00000ef0 */ 0x73, 0x75, 0x63, 0x68, 0x20, 0x61, 0x73, 0x20, 0x73, 0x65, 0x6d, 0x69, 0x63, 0x6f, 0x6e, 0x64,
/* 00000f00 */ 0x75, 0x63, 0x74, 0x6f, 0x72, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20,
/* 00000f10 */ 0x22, 0x54, 0x68, 0x65, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x22, 0x20, 0x72, 0x65,
/* 00000f20 */ 0x66, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x63, 0x6f, 0x70, 0x79,
/* 00000f30 */ 0x72, 0x69, 0x67, 0x68, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x6c,
/* 00000f40 */ 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x64, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68,
/* 00000f50 */ 0x69, 0x73, 0x0a, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x20, 0x20, 0x45, 0x61, 0x63,
/* 00000f60 */ 0x68, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x64,
/* 00000f70 */ 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x20, 0x61, 0x73, 0x20, 0x22, 0x79, 0x6f, 0x75, 0x22,
/* 00000f80 */ 0x2e, 0x20, 0x20, 0x22, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x65, 0x73, 0x22, 0x20, 0x61,
/* 00000f90 */ 0x6e, 0x64, 0x0a, 0x22, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x20,
/* 00000fa0 */ 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61,
/* 00000fb0 */ 0x6c, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
/* 00000fc0 */ 0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x6f, 0x20, 0x22, 0x6d, 0x6f, 0x64, 0x69,
/* 00000fd0 */ 0x66, 0x79, 0x22, 0x20, 0x61, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x73,
/* 00000fe0 */ 0x20, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x6f, 0x72,
/* 00000ff0 */ 0x20, 0x61, 0x64, 0x61, 0x70, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x6f, 0x72, 0x20, 0x70, 0x61,
/* 00001000 */ 0x72, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x0a, 0x69,
/* 00001010 */ 0x6e, 0x20, 0x61, 0x20, 0x66, 0x61, 0x73, 0x68, 0x69, 0x6f, 0x6e, 0x20, 0x72, 0x65, 0x71, 0x75,
/* 00001020 */ 0x69, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20,
/* 00001030 */ 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x6f, 0x74, 0x68, 0x65,
/* 00001040 */ 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x6b, 0x69, 0x6e,
/* 00001050 */ 0x67, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x0a, 0x65, 0x78, 0x61, 0x63, 0x74, 0x20, 0x63, 0x6f,
/* 00001060 */ 0x70, 0x79, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x69,
/* 00001070 */ 0x6e, 0x67, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x69, 0x73, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x65,
/* 00001080 */ 0x64, 0x20, 0x61, 0x20, 0x22, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x76, 0x65,
/* 00001090 */ 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x65, 0x61,
/* 000010a0 */ 0x72, 0x6c, 0x69, 0x65, 0x72, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x20,
/* 000010b0 */ 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x22, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x22, 0x20,
/* 000010c0 */ 0x74, 0x68, 0x65, 0x20, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x72, 0x20, 0x77, 0x6f, 0x72, 0x6b,
/* 000010d0 */ 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41, 0x20, 0x22, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20,
/* 000010e0 */ 0x77, 0x6f, 0x72, 0x6b, 0x22, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x20, 0x65, 0x69, 0x74, 0x68,
/* 000010f0 */ 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x6e, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,
/* 00001100 */ 0x64, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x77,
/* 00001110 */ 0x6f, 0x72, 0x6b, 0x20, 0x62, 0x61, 0x73, 0x65, 0x64, 0x0a, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65,
/* 00001120 */ 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x6f, 0x20,
/* 00001130 */ 0x22, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x65, 0x22, 0x20, 0x61, 0x20, 0x77, 0x6f,
/* 00001140 */ 0x72, 0x6b, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x64, 0x6f, 0x20, 0x61,
/* 00001150 */ 0x6e, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x69, 0x74, 0x20,
/* 00001160 */ 0x74, 0x68, 0x61, 0x74, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x0a, 0x70, 0x65,
/* 00001170 */ 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x20,
/* 00001180 */ 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6c,
/* 00001190 */ 0x79, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x69, 0x6c, 0x79,
/* 000011a0 */ 0x20, 0x6c, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x0a, 0x69, 0x6e, 0x66, 0x72,
/* 000011b0 */ 0x69, 0x6e, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x61,
/* 000011c0 */ 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69,
/* 000011d0 */ 0x67, 0x68, 0x74, 0x20, 0x6c, 0x61, 0x77, 0x2c, 0x20, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x20,
/* 000011e0 */ 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x74, 0x20, 0x6f, 0x6e, 0x20,
/* 000011f0 */ 0x61, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x20, 0x6f, 0x72, 0x20, 0x6d, 0x6f,
/* 00001200 */ 0x64, 0x69, 0x66, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74,
/* 00001210 */ 0x65, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x2e, 0x20, 0x20, 0x50, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61,
/* 00001220 */ 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x73, 0x20, 0x63, 0x6f,
/* 00001230 */ 0x70, 0x79, 0x69, 0x6e, 0x67, 0x2c, 0x0a, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
/* 00001240 */ 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x72, 0x20, 0x77, 0x69, 0x74,
/* 00001250 */ 0x68, 0x6f, 0x75, 0x74, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
/* 00001260 */ 0x6e, 0x29, 0x2c, 0x20, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c,
/* 00001270 */ 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x70, 0x75, 0x62, 0x6c,
/* 00001280 */ 0x69, 0x63, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20,
/* 00001290 */ 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20,
/* 000012a0 */ 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x69, 0x65, 0x73, 0x20, 0x61, 0x73, 0x20, 0x77, 0x65,
/* 000012b0 */ 0x6c, 0x6c, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x6f, 0x20, 0x22, 0x63, 0x6f, 0x6e, 0x76, 0x65,
/* 000012c0 */ 0x79, 0x22, 0x20, 0x61, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x20,
/* 000012d0 */ 0x61, 0x6e, 0x79, 0x20, 0x6b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x72, 0x6f, 0x70,
/* 000012e0 */ 0x61, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x65, 0x6e, 0x61,
/* 000012f0 */ 0x62, 0x6c, 0x65, 0x73, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69,
/* 00001300 */ 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x72, 0x65,
/* 00001310 */ 0x63, 0x65, 0x69, 0x76, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x73, 0x2e, 0x20, 0x20, 0x4d,
/* 00001320 */ 0x65, 0x72, 0x65, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20,
/* 00001330 */ 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x74, 0x68, 0x72, 0x6f,
/* 00001340 */ 0x75, 0x67, 0x68, 0x0a, 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x72, 0x20, 0x6e,
/* 00001350 */ 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6e, 0x6f, 0x20,
/* 00001360 */ 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x63, 0x6f,
/* 00001370 */ 0x70, 0x79, 0x2c, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65,
/* 00001380 */ 0x79, 0x69, 0x6e, 0x67, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41, 0x6e, 0x20, 0x69, 0x6e, 0x74, 0x65,
/* 00001390 */ 0x72, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x74,
/* 000013a0 */ 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x20, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x20,
/* 000013b0 */ 0x22, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x70, 0x72, 0x69, 0x61, 0x74, 0x65, 0x20, 0x4c, 0x65, 0x67,
/* 000013c0 */ 0x61, 0x6c, 0x20, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x73, 0x22, 0x0a, 0x74, 0x6f, 0x20, 0x74,
/* 000013d0 */ 0x68, 0x65, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69,
/* 000013e0 */ 0x74, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x73, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6e,
/* 000013f0 */ 0x76, 0x65, 0x6e, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x6d,
/* 00001400 */ 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x20, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x0a,
/* 00001410 */ 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x28, 0x31, 0x29,
/* 00001420 */ 0x20, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x70, 0x70,
/* 00001430 */ 0x72, 0x6f, 0x70, 0x72, 0x69, 0x61, 0x74, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67,
/* 00001440 */ 0x68, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x28,
/* 00001450 */ 0x32, 0x29, 0x0a, 0x74, 0x65, 0x6c, 0x6c, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65,
/* 00001460 */ 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x69, 0x73, 0x20,
/* 00001470 */ 0x6e, 0x6f, 0x20, 0x77, 0x61, 0x72, 0x72, 0x61, 0x6e, 0x74, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x20,
/* 00001480 */ 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x28, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74,
/* 00001490 */ 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x74,
/* 000014a0 */ 0x68, 0x61, 0x74, 0x20, 0x77, 0x61, 0x72, 0x72, 0x61, 0x6e, 0x74, 0x69, 0x65, 0x73, 0x20, 0x61,
/* 000014b0 */ 0x72, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x29, 0x2c, 0x20, 0x74, 0x68,
/* 000014c0 */ 0x61, 0x74, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x65, 0x73, 0x20, 0x6d, 0x61, 0x79,
/* 000014d0 */ 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x77, 0x6f, 0x72, 0x6b,
/* 000014e0 */ 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65,
/* 000014f0 */ 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x68, 0x6f, 0x77, 0x20, 0x74, 0x6f, 0x20,
/* 00001500 */ 0x76, 0x69, 0x65, 0x77, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74,
/* 00001510 */ 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x20, 0x20, 0x49, 0x66,
/* 00001520 */ 0x0a, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x20, 0x70,
/* 00001530 */ 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f,
/* 00001540 */ 0x66, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x20,
/* 00001550 */ 0x6f, 0x72, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2c, 0x20, 0x73, 0x75, 0x63, 0x68,
/* 00001560 */ 0x20, 0x61, 0x73, 0x20, 0x61, 0x0a, 0x6d, 0x65, 0x6e, 0x75, 0x2c, 0x20, 0x61, 0x20, 0x70, 0x72,
/* 00001570 */ 0x6f, 0x6d, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x74, 0x65, 0x6d, 0x20, 0x69, 0x6e, 0x20,
/* 00001580 */ 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6d, 0x65, 0x65, 0x74, 0x73, 0x20, 0x74,
/* 00001590 */ 0x68, 0x69, 0x73, 0x20, 0x63, 0x72, 0x69, 0x74, 0x65, 0x72, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x0a,
/* 000015a0 */ 0x20, 0x20, 0x31, 0x2e, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x43, 0x6f, 0x64, 0x65,
/* 000015b0 */ 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x22, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
/* 000015c0 */ 0x20, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x77, 0x6f, 0x72,
/* 000015d0 */ 0x6b, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x65, 0x66,
/* 000015e0 */ 0x65, 0x72, 0x72, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,
/* 000015f0 */ 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x0a, 0x66, 0x6f, 0x72, 0x20, 0x6d, 0x61, 0x6b, 0x69, 0x6e,
/* 00001600 */ 0x67, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20,
/* 00001610 */ 0x74, 0x6f, 0x20, 0x69, 0x74, 0x2e, 0x20, 0x20, 0x22, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20,
/* 00001620 */ 0x63, 0x6f, 0x64, 0x65, 0x22, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x79, 0x20,
/* 00001630 */ 0x6e, 0x6f, 0x6e, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x0a, 0x66, 0x6f, 0x72, 0x6d, 0x20,
/* 00001640 */ 0x6f, 0x66, 0x20, 0x61, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41, 0x20,
/* 00001650 */ 0x22, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x20, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66,
/* 00001660 */ 0x61, 0x63, 0x65, 0x22, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e,
/* 00001670 */ 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x65, 0x69, 0x74,
/* 00001680 */ 0x68, 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x69,
/* 00001690 */ 0x61, 0x6c, 0x0a, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x20, 0x64, 0x65, 0x66, 0x69,
/* 000016a0 */ 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x61, 0x20, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69,
/* 000016b0 */ 0x7a, 0x65, 0x64, 0x20, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x73, 0x20, 0x62, 0x6f,
/* 000016c0 */ 0x64, 0x79, 0x2c, 0x20, 0x6f, 0x72, 0x2c, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63,
/* 000016d0 */ 0x61, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x0a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65,
/* 000016e0 */ 0x73, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20,
/* 000016f0 */ 0x61, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x70, 0x72, 0x6f,
/* 00001700 */ 0x67, 0x72, 0x61, 0x6d, 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67,
/* 00001710 */ 0x65, 0x2c, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x0a, 0x69, 0x73, 0x20, 0x77,
/* 00001720 */ 0x69, 0x64, 0x65, 0x6c, 0x79, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x61, 0x6d, 0x6f, 0x6e, 0x67,
/* 00001730 */ 0x20, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x20, 0x77, 0x6f, 0x72, 0x6b,
/* 00001740 */ 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6c, 0x61, 0x6e, 0x67,
/* 00001750 */ 0x75, 0x61, 0x67, 0x65, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x22, 0x53, 0x79,
/* 00001760 */ 0x73, 0x74, 0x65, 0x6d, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x22, 0x20,
/* 00001770 */ 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65,
/* 00001780 */ 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x61, 0x6e,
/* 00001790 */ 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2c, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x0a, 0x74, 0x68,
/* 000017a0 */ 0x61, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x61, 0x73, 0x20, 0x61,
/* 000017b0 */ 0x20, 0x77, 0x68, 0x6f, 0x6c, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x28, 0x61, 0x29,
/* 000017c0 */ 0x20, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20,
/* 000017d0 */ 0x74, 0x68, 0x65, 0x20, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20,
/* 000017e0 */ 0x6f, 0x66, 0x0a, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x4d,
/* 000017f0 */ 0x61, 0x6a, 0x6f, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2c, 0x20,
/* 00001800 */ 0x62, 0x75, 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74,
/* 00001810 */ 0x20, 0x70, 0x61, 0x72, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x4d, 0x61,
/* 00001820 */ 0x6a, 0x6f, 0x72, 0x0a, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2c, 0x20, 0x61,
/* 00001830 */ 0x6e, 0x64, 0x20, 0x28, 0x62, 0x29, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x73, 0x20, 0x6f, 0x6e,
/* 00001840 */ 0x6c, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x75, 0x73, 0x65,
/* 00001850 */ 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x77, 0x69, 0x74,
/* 00001860 */ 0x68, 0x20, 0x74, 0x68, 0x61, 0x74, 0x0a, 0x4d, 0x61, 0x6a, 0x6f, 0x72, 0x20, 0x43, 0x6f, 0x6d,
/* 00001870 */ 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6d,
/* 00001880 */ 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x20, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61,
/* 00001890 */ 0x72, 0x64, 0x20, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x20, 0x66, 0x6f, 0x72,
/* 000018a0 */ 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x61, 0x6e, 0x0a, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d,
/* 000018b0 */ 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x61, 0x76, 0x61, 0x69,
/* 000018c0 */ 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x75, 0x62,
/* 000018d0 */ 0x6c, 0x69, 0x63, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f,
/* 000018e0 */ 0x64, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x20, 0x20, 0x41, 0x0a, 0x22, 0x4d, 0x61, 0x6a,
/* 000018f0 */ 0x6f, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x22, 0x2c, 0x20, 0x69,
/* 00001900 */ 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2c, 0x20,
/* 00001910 */ 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x20, 0x65, 0x73,
/* 00001920 */ 0x73, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e,
/* 00001930 */ 0x74, 0x0a, 0x28, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x2c, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f,
/* 00001940 */ 0x77, 0x20, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x6f,
/* 00001950 */ 0x20, 0x6f, 0x6e, 0x29, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x70, 0x65, 0x63,
/* 00001960 */ 0x69, 0x66, 0x69, 0x63, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x73,
/* 00001970 */ 0x79, 0x73, 0x74, 0x65, 0x6d, 0x0a, 0x28, 0x69, 0x66, 0x20, 0x61, 0x6e, 0x79, 0x29, 0x20, 0x6f,
/* 00001980 */ 0x6e, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x78, 0x65, 0x63,
/* 00001990 */ 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x72, 0x75, 0x6e, 0x73,
/* 000019a0 */ 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20,
/* 000019b0 */ 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x20,
/* 000019c0 */ 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x20,
/* 000019d0 */ 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x6e, 0x74, 0x65,
/* 000019e0 */ 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x72, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20,
/* 000019f0 */ 0x72, 0x75, 0x6e, 0x20, 0x69, 0x74, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x22,
/* 00001a00 */ 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f,
/* 00001a10 */ 0x75, 0x72, 0x63, 0x65, 0x22, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x77, 0x6f, 0x72, 0x6b,
/* 00001a20 */ 0x20, 0x69, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20,
/* 00001a30 */ 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x20, 0x61, 0x6c, 0x6c, 0x0a, 0x74,
/* 00001a40 */ 0x68, 0x65, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x6e,
/* 00001a50 */ 0x65, 0x65, 0x64, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
/* 00001a60 */ 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20,
/* 00001a70 */ 0x28, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62,
/* 00001a80 */ 0x6c, 0x65, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x29, 0x20, 0x72, 0x75, 0x6e, 0x20, 0x74, 0x68, 0x65,
/* 00001a90 */ 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x61, 0x6e, 0x64,
/* 00001aa0 */ 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77,
/* 00001ab0 */ 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x73,
/* 00001ac0 */ 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
/* 00001ad0 */ 0x6c, 0x20, 0x74, 0x68, 0x6f, 0x73, 0x65, 0x20, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x69,
/* 00001ae0 */ 0x65, 0x73, 0x2e, 0x20, 0x20, 0x48, 0x6f, 0x77, 0x65, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x69, 0x74,
/* 00001af0 */ 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64,
/* 00001b00 */ 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x27, 0x73, 0x0a, 0x53, 0x79, 0x73,
/* 00001b10 */ 0x74, 0x65, 0x6d, 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x2c, 0x20, 0x6f,
/* 00001b20 */ 0x72, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x2d, 0x70, 0x75, 0x72, 0x70, 0x6f, 0x73,
/* 00001b30 */ 0x65, 0x20, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72,
/* 00001b40 */ 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x66,
/* 00001b50 */ 0x72, 0x65, 0x65, 0x0a, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x73, 0x20, 0x77, 0x68, 0x69,
/* 00001b60 */ 0x63, 0x68, 0x20, 0x61, 0x72, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x75, 0x6e, 0x6d, 0x6f,
/* 00001b70 */ 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72,
/* 00001b80 */ 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x6f, 0x73, 0x65, 0x20, 0x61, 0x63, 0x74, 0x69, 0x76,
/* 00001b90 */ 0x69, 0x74, 0x69, 0x65, 0x73, 0x20, 0x62, 0x75, 0x74, 0x0a, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20,
/* 00001ba0 */ 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x70, 0x61, 0x72, 0x74, 0x20, 0x6f, 0x66, 0x20,
/* 00001bb0 */ 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x20, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x65,
/* 00001bc0 */ 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2c, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f,
/* 00001bd0 */ 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x0a, 0x69, 0x6e, 0x63,
/* 00001be0 */ 0x6c, 0x75, 0x64, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x20,
/* 00001bf0 */ 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73,
/* 00001c00 */ 0x20, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68,
/* 00001c10 */ 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x66, 0x6f,
/* 00001c20 */ 0x72, 0x0a, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20,
/* 00001c30 */ 0x74, 0x68, 0x65, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20,
/* 00001c40 */ 0x66, 0x6f, 0x72, 0x20, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61,
/* 00001c50 */ 0x72, 0x69, 0x65, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63,
/* 00001c60 */ 0x61, 0x6c, 0x6c, 0x79, 0x0a, 0x6c, 0x69, 0x6e, 0x6b, 0x65, 0x64, 0x20, 0x73, 0x75, 0x62, 0x70,
/* 00001c70 */ 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65,
/* 00001c80 */ 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x69, 0x73, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69,
/* 00001c90 */ 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x74,
/* 00001ca0 */ 0x6f, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x2c, 0x0a, 0x73, 0x75, 0x63, 0x68, 0x20,
/* 00001cb0 */ 0x61, 0x73, 0x20, 0x62, 0x79, 0x20, 0x69, 0x6e, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x20, 0x64,
/* 00001cc0 */ 0x61, 0x74, 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
/* 00001cd0 */ 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x20, 0x66, 0x6c, 0x6f,
/* 00001ce0 */ 0x77, 0x20, 0x62, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x6f, 0x73, 0x65, 0x0a,
/* 00001cf0 */ 0x73, 0x75, 0x62, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20,
/* 00001d00 */ 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x61, 0x72, 0x74, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74,
/* 00001d10 */ 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20,
/* 00001d20 */ 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f,
/* 00001d30 */ 0x75, 0x72, 0x63, 0x65, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x69, 0x6e,
/* 00001d40 */ 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x61, 0x6e, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x74,
/* 00001d50 */ 0x68, 0x61, 0x74, 0x20, 0x75, 0x73, 0x65, 0x72, 0x73, 0x0a, 0x63, 0x61, 0x6e, 0x20, 0x72, 0x65,
/* 00001d60 */ 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74,
/* 00001d70 */ 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x6f, 0x74, 0x68, 0x65,
/* 00001d80 */ 0x72, 0x20, 0x70, 0x61, 0x72, 0x74, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43,
/* 00001d90 */ 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x0a, 0x53, 0x6f, 0x75,
/* 00001da0 */ 0x72, 0x63, 0x65, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x72, 0x72,
/* 00001db0 */ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
/* 00001dc0 */ 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x69, 0x6e, 0x20, 0x73,
/* 00001dd0 */ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20,
/* 00001de0 */ 0x69, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x0a, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x77, 0x6f, 0x72,
/* 00001df0 */ 0x6b, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x32, 0x2e, 0x20, 0x42, 0x61, 0x73, 0x69, 0x63, 0x20, 0x50,
/* 00001e00 */ 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41,
/* 00001e10 */ 0x6c, 0x6c, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65,
/* 00001e20 */ 0x64, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63,
/* 00001e30 */ 0x65, 0x6e, 0x73, 0x65, 0x20, 0x61, 0x72, 0x65, 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x64,
/* 00001e40 */ 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x20, 0x6f, 0x66,
/* 00001e50 */ 0x0a, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68,
/* 00001e60 */ 0x65, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61,
/* 00001e70 */ 0x72, 0x65, 0x20, 0x69, 0x72, 0x72, 0x65, 0x76, 0x6f, 0x63, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x70,
/* 00001e80 */ 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74,
/* 00001e90 */ 0x65, 0x64, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x72,
/* 00001ea0 */ 0x65, 0x20, 0x6d, 0x65, 0x74, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63,
/* 00001eb0 */ 0x65, 0x6e, 0x73, 0x65, 0x20, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x6c, 0x79, 0x20,
/* 00001ec0 */ 0x61, 0x66, 0x66, 0x69, 0x72, 0x6d, 0x73, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x75, 0x6e, 0x6c,
/* 00001ed0 */ 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x0a, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f,
/* 00001ee0 */ 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x75, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x6e, 0x6d,
/* 00001ef0 */ 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x2e,
/* 00001f00 */ 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x66, 0x72, 0x6f,
/* 00001f10 */ 0x6d, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x0a, 0x63, 0x6f, 0x76, 0x65,
/* 00001f20 */ 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x69, 0x73, 0x20, 0x63, 0x6f, 0x76, 0x65,
/* 00001f30 */ 0x72, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65,
/* 00001f40 */ 0x6e, 0x73, 0x65, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20,
/* 00001f50 */ 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2c, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x69, 0x74,
/* 00001f60 */ 0x73, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74,
/* 00001f70 */ 0x69, 0x74, 0x75, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64,
/* 00001f80 */ 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63,
/* 00001f90 */ 0x65, 0x6e, 0x73, 0x65, 0x20, 0x61, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65,
/* 00001fa0 */ 0x73, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x0a, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x6f, 0x66,
/* 00001fb0 */ 0x20, 0x66, 0x61, 0x69, 0x72, 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x6f, 0x74, 0x68,
/* 00001fc0 */ 0x65, 0x72, 0x20, 0x65, 0x71, 0x75, 0x69, 0x76, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x2c, 0x20, 0x61,
/* 00001fd0 */ 0x73, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x63, 0x6f,
/* 00001fe0 */ 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6c, 0x61, 0x77, 0x2e, 0x0a, 0x0a, 0x20, 0x20,
/* 00001ff0 */ 0x59, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x2c, 0x20, 0x72, 0x75,
/* 00002000 */ 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x65, 0x20,
/* 00002010 */ 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x20, 0x74, 0x68,
/* 00002020 */ 0x61, 0x74, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x64, 0x6f, 0x20, 0x6e, 0x6f, 0x74, 0x0a, 0x63, 0x6f,
/* 00002030 */ 0x6e, 0x76, 0x65, 0x79, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x63, 0x6f,
/* 00002040 */ 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x73, 0x6f, 0x20, 0x6c, 0x6f, 0x6e, 0x67,
/* 00002050 */ 0x20, 0x61, 0x73, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,
/* 00002060 */ 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x77, 0x69, 0x73, 0x65, 0x20, 0x72, 0x65, 0x6d, 0x61, 0x69,
/* 00002070 */ 0x6e, 0x73, 0x0a, 0x69, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x2e, 0x20, 0x20, 0x59, 0x6f,
/* 00002080 */ 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x63, 0x6f, 0x76,
/* 00002090 */ 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x6f, 0x74,
/* 000020a0 */ 0x68, 0x65, 0x72, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x6f, 0x6c,
/* 000020b0 */ 0x65, 0x20, 0x70, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x0a, 0x6f, 0x66, 0x20, 0x68, 0x61, 0x76,
/* 000020c0 */ 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x6d, 0x6f,
/* 000020d0 */ 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x65, 0x78, 0x63, 0x6c,
/* 000020e0 */ 0x75, 0x73, 0x69, 0x76, 0x65, 0x6c, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x79, 0x6f, 0x75, 0x2c,
/* 000020f0 */ 0x20, 0x6f, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x20, 0x79, 0x6f, 0x75, 0x0a,
/* 00002100 */ 0x77, 0x69, 0x74, 0x68, 0x20, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x20,
/* 00002110 */ 0x66, 0x6f, 0x72, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x6f, 0x73,
/* 00002120 */ 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
/* 00002130 */ 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6c,
/* 00002140 */ 0x79, 0x20, 0x77, 0x69, 0x74, 0x68, 0x0a, 0x74, 0x68, 0x65, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73,
/* 00002150 */ 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,
/* 00002160 */ 0x20, 0x69, 0x6e, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x6c,
/* 00002170 */ 0x6c, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x77,
/* 00002180 */ 0x68, 0x69, 0x63, 0x68, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x64, 0x6f, 0x0a, 0x6e, 0x6f, 0x74, 0x20,
/* 00002190 */ 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68,
/* 000021a0 */ 0x74, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x6f, 0x73, 0x65, 0x20, 0x74, 0x68, 0x75, 0x73, 0x20, 0x6d,
/* 000021b0 */ 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x72, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67,
/* 000021c0 */ 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72,
/* 000021d0 */ 0x6b, 0x73, 0x0a, 0x66, 0x6f, 0x72, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20,
/* 000021e0 */ 0x64, 0x6f, 0x20, 0x73, 0x6f, 0x20, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x6c,
/* 000021f0 */ 0x79, 0x20, 0x6f, 0x6e, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x62, 0x65, 0x68, 0x61, 0x6c, 0x66,
/* 00002200 */ 0x2c, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x64, 0x69, 0x72,
/* 00002210 */ 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72,
/* 00002220 */ 0x6f, 0x6c, 0x2c, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x74, 0x68, 0x61,
/* 00002230 */ 0x74, 0x20, 0x70, 0x72, 0x6f, 0x68, 0x69, 0x62, 0x69, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x20,
/* 00002240 */ 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x6e, 0x79, 0x20,
/* 00002250 */ 0x63, 0x6f, 0x70, 0x69, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x0a, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x63,
/* 00002260 */ 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72,
/* 00002270 */ 0x69, 0x61, 0x6c, 0x20, 0x6f, 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x69,
/* 00002280 */ 0x72, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x20, 0x77,
/* 00002290 */ 0x69, 0x74, 0x68, 0x20, 0x79, 0x6f, 0x75, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x43, 0x6f, 0x6e, 0x76,
/* 000022a0 */ 0x65, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x61, 0x6e, 0x79, 0x20,
/* 000022b0 */ 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x63, 0x69, 0x72, 0x63, 0x75, 0x6d, 0x73, 0x74, 0x61, 0x6e,
/* 000022c0 */ 0x63, 0x65, 0x73, 0x20, 0x69, 0x73, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64,
/* 000022d0 */ 0x20, 0x73, 0x6f, 0x6c, 0x65, 0x6c, 0x79, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x0a, 0x74, 0x68,
/* 000022e0 */ 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x73, 0x74, 0x61,
/* 000022f0 */ 0x74, 0x65, 0x64, 0x20, 0x62, 0x65, 0x6c, 0x6f, 0x77, 0x2e, 0x20, 0x20, 0x53, 0x75, 0x62, 0x6c,
/* 00002300 */ 0x69, 0x63, 0x65, 0x6e, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20,
/* 00002310 */ 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x3b, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
/* 00002320 */ 0x20, 0x31, 0x30, 0x0a, 0x6d, 0x61, 0x6b, 0x65, 0x73, 0x20, 0x69, 0x74, 0x20, 0x75, 0x6e, 0x6e,
/* 00002330 */ 0x65, 0x63, 0x65, 0x73, 0x73, 0x61, 0x72, 0x79, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x33, 0x2e, 0x20,
/* 00002340 */ 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x55, 0x73, 0x65, 0x72, 0x73,
/* 00002350 */ 0x27, 0x20, 0x4c, 0x65, 0x67, 0x61, 0x6c, 0x20, 0x52, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x46,
/* 00002360 */ 0x72, 0x6f, 0x6d, 0x20, 0x41, 0x6e, 0x74, 0x69, 0x2d, 0x43, 0x69, 0x72, 0x63, 0x75, 0x6d, 0x76,
/* 00002370 */ 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x4c, 0x61, 0x77, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x4e,
/* 00002380 */ 0x6f, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x73,
/* 00002390 */ 0x68, 0x61, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x64, 0x65, 0x65, 0x6d, 0x65, 0x64, 0x20, 0x70,
/* 000023a0 */ 0x61, 0x72, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74,
/* 000023b0 */ 0x69, 0x76, 0x65, 0x20, 0x74, 0x65, 0x63, 0x68, 0x6e, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61,
/* 000023c0 */ 0x6c, 0x0a, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20,
/* 000023d0 */ 0x61, 0x6e, 0x79, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x6c,
/* 000023e0 */ 0x61, 0x77, 0x20, 0x66, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x62,
/* 000023f0 */ 0x6c, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20,
/* 00002400 */ 0x61, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x0a, 0x31, 0x31, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,
/* 00002410 */ 0x65, 0x20, 0x57, 0x49, 0x50, 0x4f, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74,
/* 00002420 */ 0x20, 0x74, 0x72, 0x65, 0x61, 0x74, 0x79, 0x20, 0x61, 0x64, 0x6f, 0x70, 0x74, 0x65, 0x64, 0x20,
/* 00002430 */ 0x6f, 0x6e, 0x20, 0x32, 0x30, 0x20, 0x44, 0x65, 0x63, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x31,
/* 00002440 */ 0x39, 0x39, 0x36, 0x2c, 0x20, 0x6f, 0x72, 0x0a, 0x73, 0x69, 0x6d, 0x69, 0x6c, 0x61, 0x72, 0x20,
/* 00002450 */ 0x6c, 0x61, 0x77, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x68, 0x69, 0x62, 0x69, 0x74, 0x69, 0x6e, 0x67,
/* 00002460 */ 0x20, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x20,
/* 00002470 */ 0x63, 0x69, 0x72, 0x63, 0x75, 0x6d, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66,
/* 00002480 */ 0x20, 0x73, 0x75, 0x63, 0x68, 0x0a, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x0a,
/* 00002490 */ 0x0a, 0x20, 0x20, 0x57, 0x68, 0x65, 0x6e, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63, 0x6f, 0x6e, 0x76,
/* 000024a0 */ 0x65, 0x79, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72,
/* 000024b0 */ 0x6b, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x77, 0x61, 0x69, 0x76, 0x65, 0x20, 0x61, 0x6e, 0x79,
/* 000024c0 */ 0x20, 0x6c, 0x65, 0x67, 0x61, 0x6c, 0x20, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20,
/* 000024d0 */ 0x66, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x0a, 0x63, 0x69, 0x72, 0x63, 0x75, 0x6d, 0x76, 0x65, 0x6e,
/* 000024e0 */ 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x65, 0x63, 0x68, 0x6e, 0x6f, 0x6c, 0x6f,
/* 000024f0 */ 0x67, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x73, 0x20, 0x74,
/* 00002500 */ 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x73, 0x75, 0x63,
/* 00002510 */ 0x68, 0x20, 0x63, 0x69, 0x72, 0x63, 0x75, 0x6d, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x0a,
/* 00002520 */ 0x69, 0x73, 0x20, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x65,
/* 00002530 */ 0x78, 0x65, 0x72, 0x63, 0x69, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73,
/* 00002540 */ 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65,
/* 00002550 */ 0x6e, 0x73, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x72, 0x65, 0x73, 0x70, 0x65, 0x63, 0x74,
/* 00002560 */ 0x20, 0x74, 0x6f, 0x0a, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20,
/* 00002570 */ 0x77, 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x64, 0x69,
/* 00002580 */ 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x6e,
/* 00002590 */ 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x20, 0x6f, 0x70,
/* 000025a0 */ 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x0a, 0x6d, 0x6f, 0x64, 0x69, 0x66,
/* 000025b0 */ 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77,
/* 000025c0 */ 0x6f, 0x72, 0x6b, 0x20, 0x61, 0x73, 0x20, 0x61, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x20, 0x6f,
/* 000025d0 */ 0x66, 0x20, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x69, 0x6e, 0x67, 0x2c, 0x20, 0x61, 0x67, 0x61,
/* 000025e0 */ 0x69, 0x6e, 0x73, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x27, 0x73, 0x0a,
/* 000025f0 */ 0x75, 0x73, 0x65, 0x72, 0x73, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x6f, 0x72, 0x20, 0x74,
/* 00002600 */ 0x68, 0x69, 0x72, 0x64, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x27, 0x20, 0x6c, 0x65,
/* 00002610 */ 0x67, 0x61, 0x6c, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x66, 0x6f,
/* 00002620 */ 0x72, 0x62, 0x69, 0x64, 0x20, 0x63, 0x69, 0x72, 0x63, 0x75, 0x6d, 0x76, 0x65, 0x6e, 0x74, 0x69,
/* 00002630 */ 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x0a, 0x74, 0x65, 0x63, 0x68, 0x6e, 0x6f, 0x6c, 0x6f, 0x67, 0x69,
/* 00002640 */ 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x65, 0x61, 0x73, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x0a, 0x0a, 0x20,
/* 00002650 */ 0x20, 0x34, 0x2e, 0x20, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x56, 0x65,
/* 00002660 */ 0x72, 0x62, 0x61, 0x74, 0x69, 0x6d, 0x20, 0x43, 0x6f, 0x70, 0x69, 0x65, 0x73, 0x2e, 0x0a, 0x0a,
/* 00002670 */ 0x20, 0x20, 0x59, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79,
/* 00002680 */ 0x20, 0x76, 0x65, 0x72, 0x62, 0x61, 0x74, 0x69, 0x6d, 0x20, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x73,
/* 00002690 */ 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x27,
/* 000026a0 */ 0x73, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x61, 0x73,
/* 000026b0 */ 0x20, 0x79, 0x6f, 0x75, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x20, 0x69, 0x74, 0x2c,
/* 000026c0 */ 0x20, 0x69, 0x6e, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x2c, 0x20,
/* 000026d0 */ 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x79, 0x6f,
/* 000026e0 */ 0x75, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x70, 0x69, 0x63, 0x75, 0x6f, 0x75, 0x73, 0x6c, 0x79, 0x20,
/* 000026f0 */ 0x61, 0x6e, 0x64, 0x0a, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x70, 0x72, 0x69, 0x61, 0x74, 0x65, 0x6c,
/* 00002700 */ 0x79, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x20, 0x6f, 0x6e, 0x20, 0x65, 0x61, 0x63,
/* 00002710 */ 0x68, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x70,
/* 00002720 */ 0x72, 0x69, 0x61, 0x74, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20,
/* 00002730 */ 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x3b, 0x0a, 0x6b, 0x65, 0x65, 0x70, 0x20, 0x69, 0x6e, 0x74,
/* 00002740 */ 0x61, 0x63, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x73, 0x20,
/* 00002750 */ 0x73, 0x74, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x69,
/* 00002760 */ 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x6e,
/* 00002770 */ 0x79, 0x0a, 0x6e, 0x6f, 0x6e, 0x2d, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x76, 0x65,
/* 00002780 */ 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x61, 0x64, 0x64, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20,
/* 00002790 */ 0x61, 0x63, 0x63, 0x6f, 0x72, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x73, 0x65, 0x63, 0x74,
/* 000027a0 */ 0x69, 0x6f, 0x6e, 0x20, 0x37, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x74,
/* 000027b0 */ 0x68, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x3b, 0x0a, 0x6b, 0x65, 0x65, 0x70, 0x20, 0x69, 0x6e,
/* 000027c0 */ 0x74, 0x61, 0x63, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x73,
/* 000027d0 */ 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x20,
/* 000027e0 */ 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x77, 0x61, 0x72, 0x72, 0x61, 0x6e, 0x74, 0x79, 0x3b,
/* 000027f0 */ 0x20, 0x61, 0x6e, 0x64, 0x20, 0x67, 0x69, 0x76, 0x65, 0x20, 0x61, 0x6c, 0x6c, 0x0a, 0x72, 0x65,
/* 00002800 */ 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20,
/* 00002810 */ 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20,
/* 00002820 */ 0x61, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50,
/* 00002830 */ 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x59, 0x6f, 0x75, 0x20, 0x6d,
/* 00002840 */ 0x61, 0x79, 0x20, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x70, 0x72,
/* 00002850 */ 0x69, 0x63, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x20, 0x70, 0x72, 0x69, 0x63, 0x65, 0x20,
/* 00002860 */ 0x66, 0x6f, 0x72, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x74, 0x68,
/* 00002870 */ 0x61, 0x74, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x2c, 0x0a, 0x61,
/* 00002880 */ 0x6e, 0x64, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x6f, 0x66, 0x66, 0x65, 0x72,
/* 00002890 */ 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x77, 0x61, 0x72, 0x72,
/* 000028a0 */ 0x61, 0x6e, 0x74, 0x79, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20,
/* 000028b0 */ 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x66, 0x65, 0x65, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x35, 0x2e,
/* 000028c0 */ 0x20, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x4d, 0x6f, 0x64, 0x69, 0x66,
/* 000028d0 */ 0x69, 0x65, 0x64, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69,
/* 000028e0 */ 0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x59, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20,
/* 000028f0 */ 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x61, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x62, 0x61,
/* 00002900 */ 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72,
/* 00002910 */ 0x61, 0x6d, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66,
/* 00002920 */ 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x74, 0x6f, 0x0a, 0x70, 0x72, 0x6f, 0x64,
/* 00002930 */ 0x75, 0x63, 0x65, 0x20, 0x69, 0x74, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20,
/* 00002940 */ 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x2c, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20,
/* 00002950 */ 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63,
/* 00002960 */ 0x6f, 0x64, 0x65, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x74, 0x65,
/* 00002970 */ 0x72, 0x6d, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x34,
/* 00002980 */ 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20,
/* 00002990 */ 0x79, 0x6f, 0x75, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x6d, 0x65, 0x65, 0x74, 0x20, 0x61, 0x6c,
/* 000029a0 */ 0x6c, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69,
/* 000029b0 */ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, 0x29, 0x20, 0x54,
/* 000029c0 */ 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x63, 0x61, 0x72,
/* 000029d0 */ 0x72, 0x79, 0x20, 0x70, 0x72, 0x6f, 0x6d, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x20, 0x6e, 0x6f, 0x74,
/* 000029e0 */ 0x69, 0x63, 0x65, 0x73, 0x20, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x61,
/* 000029f0 */ 0x74, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x0a, 0x20,
/* 00002a00 */ 0x20, 0x20, 0x20, 0x69, 0x74, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x67, 0x69, 0x76, 0x69, 0x6e,
/* 00002a10 */ 0x67, 0x20, 0x61, 0x20, 0x72, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x74, 0x20, 0x64, 0x61, 0x74,
/* 00002a20 */ 0x65, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x62, 0x29, 0x20, 0x54, 0x68, 0x65, 0x20, 0x77,
/* 00002a30 */ 0x6f, 0x72, 0x6b, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x63, 0x61, 0x72, 0x72, 0x79, 0x20, 0x70,
/* 00002a40 */ 0x72, 0x6f, 0x6d, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x73,
/* 00002a50 */ 0x20, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x74,
/* 00002a60 */ 0x20, 0x69, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x64,
/* 00002a70 */ 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65,
/* 00002a80 */ 0x6e, 0x73, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x64,
/* 00002a90 */ 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x64, 0x64, 0x65, 0x64, 0x20, 0x75, 0x6e, 0x64,
/* 00002aa0 */ 0x65, 0x72, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x37,
/* 00002ab0 */ 0x2e, 0x20, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d,
/* 00002ac0 */ 0x65, 0x6e, 0x74, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65,
/* 00002ad0 */ 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x20,
/* 00002ae0 */ 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x34, 0x20, 0x74, 0x6f, 0x0a, 0x20, 0x20, 0x20,
/* 00002af0 */ 0x20, 0x22, 0x6b, 0x65, 0x65, 0x70, 0x20, 0x69, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x20, 0x61, 0x6c,
/* 00002b00 */ 0x6c, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x73, 0x22, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20,
/* 00002b10 */ 0x20, 0x63, 0x29, 0x20, 0x59, 0x6f, 0x75, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x6c, 0x69, 0x63,
/* 00002b20 */ 0x65, 0x6e, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x72, 0x65, 0x20,
/* 00002b30 */ 0x77, 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x61, 0x73, 0x20, 0x61, 0x20, 0x77, 0x68, 0x6f, 0x6c, 0x65,
/* 00002b40 */ 0x2c, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x69, 0x73, 0x0a, 0x20, 0x20, 0x20,
/* 00002b50 */ 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x6e, 0x79, 0x6f,
/* 00002b60 */ 0x6e, 0x65, 0x20, 0x77, 0x68, 0x6f, 0x20, 0x63, 0x6f, 0x6d, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x74,
/* 00002b70 */ 0x6f, 0x20, 0x70, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20,
/* 00002b80 */ 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x69, 0x73, 0x0a, 0x20, 0x20,
/* 00002b90 */ 0x20, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x74,
/* 00002ba0 */ 0x68, 0x65, 0x72, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x2c, 0x20,
/* 00002bb0 */ 0x61, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x61,
/* 00002bc0 */ 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f,
/* 00002bd0 */ 0x6e, 0x20, 0x37, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,
/* 00002be0 */ 0x61, 0x6c, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x2c, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65,
/* 00002bf0 */ 0x20, 0x77, 0x68, 0x6f, 0x6c, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f,
/* 00002c00 */ 0x72, 0x6b, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x69, 0x74, 0x73, 0x20,
/* 00002c10 */ 0x70, 0x61, 0x72, 0x74, 0x73, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x67, 0x61, 0x72,
/* 00002c20 */ 0x64, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x68, 0x6f, 0x77, 0x20, 0x74, 0x68, 0x65,
/* 00002c30 */ 0x79, 0x20, 0x61, 0x72, 0x65, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x64, 0x2e, 0x20,
/* 00002c40 */ 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x67, 0x69,
/* 00002c50 */ 0x76, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69,
/* 00002c60 */ 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,
/* 00002c70 */ 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x6e, 0x79,
/* 00002c80 */ 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x77, 0x61, 0x79, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20,
/* 00002c90 */ 0x69, 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20,
/* 00002ca0 */ 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20,
/* 00002cb0 */ 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x66, 0x20, 0x79, 0x6f,
/* 00002cc0 */ 0x75, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x65, 0x6c,
/* 00002cd0 */ 0x79, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x69, 0x74, 0x2e, 0x0a, 0x0a,
/* 00002ce0 */ 0x20, 0x20, 0x20, 0x20, 0x64, 0x29, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f,
/* 00002cf0 */ 0x72, 0x6b, 0x20, 0x68, 0x61, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69,
/* 00002d00 */ 0x76, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63,
/* 00002d10 */ 0x65, 0x73, 0x2c, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x64, 0x69,
/* 00002d20 */ 0x73, 0x70, 0x6c, 0x61, 0x79, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x70,
/* 00002d30 */ 0x72, 0x69, 0x61, 0x74, 0x65, 0x20, 0x4c, 0x65, 0x67, 0x61, 0x6c, 0x20, 0x4e, 0x6f, 0x74, 0x69,
/* 00002d40 */ 0x63, 0x65, 0x73, 0x3b, 0x20, 0x68, 0x6f, 0x77, 0x65, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x69, 0x66,
/* 00002d50 */ 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x68, 0x61, 0x73,
/* 00002d60 */ 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x0a, 0x20, 0x20, 0x20,
/* 00002d70 */ 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74,
/* 00002d80 */ 0x20, 0x64, 0x6f, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x20,
/* 00002d90 */ 0x41, 0x70, 0x70, 0x72, 0x6f, 0x70, 0x72, 0x69, 0x61, 0x74, 0x65, 0x20, 0x4c, 0x65, 0x67, 0x61,
/* 00002da0 */ 0x6c, 0x20, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x73, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x0a,
/* 00002db0 */ 0x20, 0x20, 0x20, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x20, 0x6e, 0x6f,
/* 00002dc0 */ 0x74, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x20, 0x64, 0x6f, 0x20, 0x73,
/* 00002dd0 */ 0x6f, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74,
/* 00002de0 */ 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64,
/* 00002df0 */ 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72,
/* 00002e00 */ 0x20, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x6e,
/* 00002e10 */ 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x2c,
/* 00002e20 */ 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62,
/* 00002e30 */ 0x79, 0x20, 0x74, 0x68, 0x65, 0x69, 0x72, 0x20, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x65,
/* 00002e40 */ 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65,
/* 00002e50 */ 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x2c, 0x0a, 0x61,
/* 00002e60 */ 0x6e, 0x64, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74,
/* 00002e70 */ 0x20, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x69,
/* 00002e80 */ 0x74, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x61, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x66, 0x6f, 0x72,
/* 00002e90 */ 0x6d, 0x20, 0x61, 0x20, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72,
/* 00002ea0 */ 0x61, 0x6d, 0x2c, 0x0a, 0x69, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x6f, 0x6e, 0x20, 0x61, 0x20, 0x76,
/* 00002eb0 */ 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x61,
/* 00002ec0 */ 0x67, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69,
/* 00002ed0 */ 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x2c, 0x20, 0x69, 0x73, 0x20, 0x63, 0x61,
/* 00002ee0 */ 0x6c, 0x6c, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x0a, 0x22, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61,
/* 00002ef0 */ 0x74, 0x65, 0x22, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x69,
/* 00002f00 */ 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x74, 0x73, 0x20, 0x72,
/* 00002f10 */ 0x65, 0x73, 0x75, 0x6c, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67,
/* 00002f20 */ 0x68, 0x74, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x0a, 0x75, 0x73, 0x65, 0x64, 0x20,
/* 00002f30 */ 0x74, 0x6f, 0x20, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x63, 0x63,
/* 00002f40 */ 0x65, 0x73, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x65, 0x67, 0x61, 0x6c, 0x20, 0x72, 0x69, 0x67,
/* 00002f50 */ 0x68, 0x74, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x69,
/* 00002f60 */ 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x27, 0x73, 0x20, 0x75, 0x73, 0x65, 0x72, 0x73, 0x0a, 0x62,
/* 00002f70 */ 0x65, 0x79, 0x6f, 0x6e, 0x64, 0x20, 0x77, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69,
/* 00002f80 */ 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x20,
/* 00002f90 */ 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x2e, 0x20, 0x20, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69,
/* 00002fa0 */ 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20,
/* 00002fb0 */ 0x77, 0x6f, 0x72, 0x6b, 0x0a, 0x69, 0x6e, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x67, 0x67, 0x72, 0x65,
/* 00002fc0 */ 0x67, 0x61, 0x74, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x61,
/* 00002fd0 */ 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,
/* 00002fe0 */ 0x20, 0x74, 0x6f, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65,
/* 00002ff0 */ 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x73, 0x20, 0x6f, 0x66, 0x20,
/* 00003000 */ 0x74, 0x68, 0x65, 0x20, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x0a, 0x0a,
/* 00003010 */ 0x20, 0x20, 0x36, 0x2e, 0x20, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x4e,
/* 00003020 */ 0x6f, 0x6e, 0x2d, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x46, 0x6f, 0x72, 0x6d, 0x73, 0x2e,
/* 00003030 */ 0x0a, 0x0a, 0x20, 0x20, 0x59, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x76,
/* 00003040 */ 0x65, 0x79, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72,
/* 00003050 */ 0x6b, 0x20, 0x69, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65,
/* 00003060 */ 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20,
/* 00003070 */ 0x74, 0x65, 0x72, 0x6d, 0x73, 0x0a, 0x6f, 0x66, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
/* 00003080 */ 0x73, 0x20, 0x34, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x35, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69,
/* 00003090 */ 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x61, 0x6c, 0x73,
/* 000030a0 */ 0x6f, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x6d, 0x61, 0x63,
/* 000030b0 */ 0x68, 0x69, 0x6e, 0x65, 0x2d, 0x72, 0x65, 0x61, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x43, 0x6f,
/* 000030c0 */ 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72,
/* 000030d0 */ 0x63, 0x65, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x65, 0x72,
/* 000030e0 */ 0x6d, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e,
/* 000030f0 */ 0x73, 0x65, 0x2c, 0x0a, 0x69, 0x6e, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,
/* 00003100 */ 0x65, 0x73, 0x65, 0x20, 0x77, 0x61, 0x79, 0x73, 0x3a, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61,
/* 00003110 */ 0x29, 0x20, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x62, 0x6a,
/* 00003120 */ 0x65, 0x63, 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x6e, 0x2c, 0x20, 0x6f, 0x72, 0x20,
/* 00003130 */ 0x65, 0x6d, 0x62, 0x6f, 0x64, 0x69, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x2c, 0x20, 0x61, 0x20, 0x70,
/* 00003140 */ 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x0a,
/* 00003150 */ 0x20, 0x20, 0x20, 0x20, 0x28, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x61,
/* 00003160 */ 0x20, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69,
/* 00003170 */ 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x29, 0x2c, 0x20,
/* 00003180 */ 0x61, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x69, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74,
/* 00003190 */ 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
/* 000031a0 */ 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x66, 0x69, 0x78, 0x65,
/* 000031b0 */ 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x61, 0x20, 0x64, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x70,
/* 000031c0 */ 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x0a, 0x20,
/* 000031d0 */ 0x20, 0x20, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x61, 0x72, 0x69, 0x6c, 0x79, 0x20, 0x75,
/* 000031e0 */ 0x73, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65,
/* 000031f0 */ 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x0a, 0x0a, 0x20,
/* 00003200 */ 0x20, 0x20, 0x20, 0x62, 0x29, 0x20, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x74, 0x68, 0x65,
/* 00003210 */ 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x6e, 0x2c,
/* 00003220 */ 0x20, 0x6f, 0x72, 0x20, 0x65, 0x6d, 0x62, 0x6f, 0x64, 0x69, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x2c,
/* 00003230 */ 0x20, 0x61, 0x20, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x70, 0x72, 0x6f, 0x64,
/* 00003240 */ 0x75, 0x63, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x28, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69,
/* 00003250 */ 0x6e, 0x67, 0x20, 0x61, 0x20, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x64, 0x69,
/* 00003260 */ 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75,
/* 00003270 */ 0x6d, 0x29, 0x2c, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x69, 0x65, 0x64, 0x20,
/* 00003280 */ 0x62, 0x79, 0x20, 0x61, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e,
/* 00003290 */ 0x20, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x2c, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x66, 0x6f,
/* 000032a0 */ 0x72, 0x20, 0x61, 0x74, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x20, 0x74, 0x68, 0x72, 0x65, 0x65,
/* 000032b0 */ 0x20, 0x79, 0x65, 0x61, 0x72, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64,
/* 000032c0 */ 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x6e, 0x67,
/* 000032d0 */ 0x20, 0x61, 0x73, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x20, 0x73, 0x70,
/* 000032e0 */ 0x61, 0x72, 0x65, 0x20, 0x70, 0x61, 0x72, 0x74, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x75, 0x73,
/* 000032f0 */ 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x66, 0x6f,
/* 00003300 */ 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x0a, 0x20,
/* 00003310 */ 0x20, 0x20, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2c, 0x20, 0x74, 0x6f, 0x20, 0x67, 0x69, 0x76,
/* 00003320 */ 0x65, 0x20, 0x61, 0x6e, 0x79, 0x6f, 0x6e, 0x65, 0x20, 0x77, 0x68, 0x6f, 0x20, 0x70, 0x6f, 0x73,
/* 00003330 */ 0x73, 0x65, 0x73, 0x73, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63,
/* 00003340 */ 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x28, 0x31,
/* 00003350 */ 0x29, 0x20, 0x61, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20,
/* 00003360 */ 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e,
/* 00003370 */ 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6c, 0x6c,
/* 00003380 */ 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x69, 0x6e,
/* 00003390 */ 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
/* 000033a0 */ 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x73, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64,
/* 000033b0 */ 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,
/* 000033c0 */ 0x2c, 0x20, 0x6f, 0x6e, 0x20, 0x61, 0x20, 0x64, 0x75, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x70,
/* 000033d0 */ 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x64, 0x69,
/* 000033e0 */ 0x75, 0x6d, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x61, 0x72, 0x69, 0x6c, 0x79, 0x20, 0x75,
/* 000033f0 */ 0x73, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65,
/* 00003400 */ 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2c, 0x20, 0x66, 0x6f,
/* 00003410 */ 0x72, 0x20, 0x61, 0x20, 0x70, 0x72, 0x69, 0x63, 0x65, 0x20, 0x6e, 0x6f, 0x0a, 0x20, 0x20, 0x20,
/* 00003420 */ 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20,
/* 00003430 */ 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x63, 0x6f, 0x73, 0x74, 0x20,
/* 00003440 */ 0x6f, 0x66, 0x20, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x70, 0x65,
/* 00003450 */ 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x69, 0x73, 0x0a, 0x20, 0x20,
/* 00003460 */ 0x20, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x73,
/* 00003470 */ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x28, 0x32, 0x29, 0x20, 0x61, 0x63,
/* 00003480 */ 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x74, 0x68, 0x65,
/* 00003490 */ 0x0a, 0x20, 0x20, 0x20, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69,
/* 000034a0 */ 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61,
/* 000034b0 */ 0x20, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20,
/* 000034c0 */ 0x61, 0x74, 0x20, 0x6e, 0x6f, 0x20, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x2e, 0x0a, 0x0a, 0x20,
/* 000034d0 */ 0x20, 0x20, 0x20, 0x63, 0x29, 0x20, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x69, 0x6e, 0x64,
/* 000034e0 */ 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x20, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x73, 0x20, 0x6f,
/* 000034f0 */ 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6f, 0x64,
/* 00003500 */ 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66,
/* 00003510 */ 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e,
/* 00003520 */ 0x20, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64,
/* 00003530 */ 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64,
/* 00003540 */ 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x69,
/* 00003550 */ 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76,
/* 00003560 */ 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x6c,
/* 00003570 */ 0x79, 0x20, 0x6f, 0x63, 0x63, 0x61, 0x73, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61,
/* 00003580 */ 0x6e, 0x64, 0x20, 0x6e, 0x6f, 0x6e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x72, 0x63, 0x69, 0x61, 0x6c,
/* 00003590 */ 0x6c, 0x79, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x6e, 0x6c, 0x79,
/* 000035a0 */ 0x20, 0x69, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64,
/* 000035b0 */ 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65,
/* 000035c0 */ 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x61, 0x6e, 0x20, 0x6f, 0x66,
/* 000035d0 */ 0x66, 0x65, 0x72, 0x2c, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x72, 0x64, 0x0a, 0x20,
/* 000035e0 */ 0x20, 0x20, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x73, 0x75, 0x62, 0x73, 0x65, 0x63, 0x74, 0x69,
/* 000035f0 */ 0x6f, 0x6e, 0x20, 0x36, 0x62, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x64, 0x29, 0x20, 0x43,
/* 00003600 */ 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
/* 00003610 */ 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x62, 0x79, 0x20, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x69, 0x6e,
/* 00003620 */ 0x67, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x20,
/* 00003630 */ 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x70,
/* 00003640 */ 0x6c, 0x61, 0x63, 0x65, 0x20, 0x28, 0x67, 0x72, 0x61, 0x74, 0x69, 0x73, 0x20, 0x6f, 0x72, 0x20,
/* 00003650 */ 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x29, 0x2c, 0x20, 0x61,
/* 00003660 */ 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x20, 0x65, 0x71, 0x75, 0x69, 0x76, 0x61, 0x6c,
/* 00003670 */ 0x65, 0x6e, 0x74, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68,
/* 00003680 */ 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64,
/* 00003690 */ 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68,
/* 000036a0 */ 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x77, 0x61, 0x79, 0x20, 0x74, 0x68, 0x72, 0x6f, 0x75,
/* 000036b0 */ 0x67, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x70, 0x6c, 0x61, 0x63,
/* 000036c0 */ 0x65, 0x20, 0x61, 0x74, 0x20, 0x6e, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x66, 0x75, 0x72, 0x74,
/* 000036d0 */ 0x68, 0x65, 0x72, 0x20, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x2e, 0x20, 0x20, 0x59, 0x6f, 0x75,
/* 000036e0 */ 0x20, 0x6e, 0x65, 0x65, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72,
/* 000036f0 */ 0x65, 0x20, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20,
/* 00003700 */ 0x63, 0x6f, 0x70, 0x79, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x43, 0x6f, 0x72,
/* 00003710 */ 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63,
/* 00003720 */ 0x65, 0x20, 0x61, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65,
/* 00003730 */ 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x20, 0x20, 0x49,
/* 00003740 */ 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x0a, 0x20,
/* 00003750 */ 0x20, 0x20, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65,
/* 00003760 */ 0x63, 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x6e, 0x65, 0x74,
/* 00003770 */ 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x74, 0x68, 0x65,
/* 00003780 */ 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53,
/* 00003790 */ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65,
/* 000037a0 */ 0x20, 0x6f, 0x6e, 0x20, 0x61, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x74, 0x20,
/* 000037b0 */ 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x28, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64,
/* 000037c0 */ 0x20, 0x62, 0x79, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x74, 0x68, 0x69,
/* 000037d0 */ 0x72, 0x64, 0x20, 0x70, 0x61, 0x72, 0x74, 0x79, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x74, 0x68,
/* 000037e0 */ 0x61, 0x74, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x20, 0x65, 0x71, 0x75, 0x69,
/* 000037f0 */ 0x76, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x66,
/* 00003800 */ 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69,
/* 00003810 */ 0x64, 0x65, 0x64, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x61, 0x69, 0x6e,
/* 00003820 */ 0x0a, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63,
/* 00003830 */ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6e, 0x65, 0x78, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68,
/* 00003840 */ 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x73, 0x61,
/* 00003850 */ 0x79, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x66, 0x69,
/* 00003860 */ 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65,
/* 00003870 */ 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e,
/* 00003880 */ 0x20, 0x20, 0x52, 0x65, 0x67, 0x61, 0x72, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x6f, 0x66, 0x20,
/* 00003890 */ 0x77, 0x68, 0x61, 0x74, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x68, 0x6f, 0x73, 0x74,
/* 000038a0 */ 0x73, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73,
/* 000038b0 */ 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x20,
/* 000038c0 */ 0x79, 0x6f, 0x75, 0x20, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x6f, 0x62, 0x6c, 0x69, 0x67,
/* 000038d0 */ 0x61, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x6e, 0x73, 0x75, 0x72, 0x65, 0x20, 0x74,
/* 000038e0 */ 0x68, 0x61, 0x74, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, 0x76,
/* 000038f0 */ 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x73, 0x20, 0x6c,
/* 00003900 */ 0x6f, 0x6e, 0x67, 0x20, 0x61, 0x73, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x20, 0x74, 0x6f,
/* 00003910 */ 0x20, 0x73, 0x61, 0x74, 0x69, 0x73, 0x66, 0x79, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20, 0x72,
/* 00003920 */ 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20,
/* 00003930 */ 0x20, 0x20, 0x65, 0x29, 0x20, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20,
/* 00003940 */ 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x75, 0x73, 0x69, 0x6e,
/* 00003950 */ 0x67, 0x20, 0x70, 0x65, 0x65, 0x72, 0x2d, 0x74, 0x6f, 0x2d, 0x70, 0x65, 0x65, 0x72, 0x20, 0x74,
/* 00003960 */ 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x70, 0x72, 0x6f,
/* 00003970 */ 0x76, 0x69, 0x64, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x69, 0x6e,
/* 00003980 */ 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x65, 0x65, 0x72, 0x73,
/* 00003990 */ 0x20, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63,
/* 000039a0 */ 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65,
/* 000039b0 */ 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x53, 0x6f, 0x75,
/* 000039c0 */ 0x72, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20,
/* 000039d0 */ 0x61, 0x72, 0x65, 0x20, 0x62, 0x65, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x65,
/* 000039e0 */ 0x64, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c,
/* 000039f0 */ 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x61, 0x74, 0x20, 0x6e, 0x6f, 0x0a, 0x20, 0x20,
/* 00003a00 */ 0x20, 0x20, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x73,
/* 00003a10 */ 0x75, 0x62, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x36, 0x64, 0x2e, 0x0a, 0x0a, 0x20,
/* 00003a20 */ 0x20, 0x41, 0x20, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x70, 0x6f, 0x72,
/* 00003a30 */ 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65,
/* 00003a40 */ 0x63, 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x77, 0x68, 0x6f, 0x73, 0x65, 0x20, 0x73,
/* 00003a50 */ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x73, 0x20, 0x65, 0x78,
/* 00003a60 */ 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20,
/* 00003a70 */ 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f,
/* 00003a80 */ 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x73, 0x20, 0x61, 0x20, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d,
/* 00003a90 */ 0x20, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2c, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x20, 0x6e,
/* 00003aa0 */ 0x6f, 0x74, 0x20, 0x62, 0x65, 0x0a, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x20, 0x69,
/* 00003ab0 */ 0x6e, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20,
/* 00003ac0 */ 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b,
/* 00003ad0 */ 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41, 0x20, 0x22, 0x55, 0x73, 0x65, 0x72, 0x20, 0x50, 0x72, 0x6f,
/* 00003ae0 */ 0x64, 0x75, 0x63, 0x74, 0x22, 0x20, 0x69, 0x73, 0x20, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20,
/* 00003af0 */ 0x28, 0x31, 0x29, 0x20, 0x61, 0x20, 0x22, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x20,
/* 00003b00 */ 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x22, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20,
/* 00003b10 */ 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x79, 0x0a, 0x74, 0x61, 0x6e, 0x67, 0x69, 0x62,
/* 00003b20 */ 0x6c, 0x65, 0x20, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x70, 0x72, 0x6f, 0x70,
/* 00003b30 */ 0x65, 0x72, 0x74, 0x79, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f,
/* 00003b40 */ 0x72, 0x6d, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20,
/* 00003b50 */ 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x61, 0x6c, 0x2c, 0x20, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79,
/* 00003b60 */ 0x2c, 0x0a, 0x6f, 0x72, 0x20, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x20, 0x70,
/* 00003b70 */ 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x73, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x28, 0x32, 0x29, 0x20,
/* 00003b80 */ 0x61, 0x6e, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x65,
/* 00003b90 */ 0x64, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x6f, 0x6c, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x6e,
/* 00003ba0 */ 0x63, 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x69, 0x6e, 0x74, 0x6f,
/* 00003bb0 */ 0x20, 0x61, 0x20, 0x64, 0x77, 0x65, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x2e, 0x20, 0x20, 0x49, 0x6e,
/* 00003bc0 */ 0x20, 0x64, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x68, 0x65,
/* 00003bd0 */ 0x74, 0x68, 0x65, 0x72, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x20, 0x69,
/* 00003be0 */ 0x73, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x20, 0x70, 0x72, 0x6f,
/* 00003bf0 */ 0x64, 0x75, 0x63, 0x74, 0x2c, 0x0a, 0x64, 0x6f, 0x75, 0x62, 0x74, 0x66, 0x75, 0x6c, 0x20, 0x63,
/* 00003c00 */ 0x61, 0x73, 0x65, 0x73, 0x20, 0x73, 0x68, 0x61, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65,
/* 00003c10 */ 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x20,
/* 00003c20 */ 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x20, 0x20, 0x46, 0x6f,
/* 00003c30 */ 0x72, 0x20, 0x61, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x0a, 0x70,
/* 00003c40 */ 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20,
/* 00003c50 */ 0x62, 0x79, 0x20, 0x61, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x20,
/* 00003c60 */ 0x75, 0x73, 0x65, 0x72, 0x2c, 0x20, 0x22, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x6c, 0x79, 0x20,
/* 00003c70 */ 0x75, 0x73, 0x65, 0x64, 0x22, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20,
/* 00003c80 */ 0x61, 0x0a, 0x74, 0x79, 0x70, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x6d,
/* 00003c90 */ 0x6d, 0x6f, 0x6e, 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20,
/* 00003ca0 */ 0x63, 0x6c, 0x61, 0x73, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
/* 00003cb0 */ 0x2c, 0x20, 0x72, 0x65, 0x67, 0x61, 0x72, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x6f, 0x66, 0x20,
/* 00003cc0 */ 0x74, 0x68, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x0a, 0x6f, 0x66, 0x20, 0x74, 0x68,
/* 00003cd0 */ 0x65, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x75, 0x73, 0x65,
/* 00003ce0 */ 0x72, 0x20, 0x6f, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x61, 0x79, 0x20,
/* 00003cf0 */ 0x69, 0x6e, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72,
/* 00003d00 */ 0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x75, 0x73, 0x65, 0x72, 0x0a, 0x61, 0x63, 0x74,
/* 00003d10 */ 0x75, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x75, 0x73, 0x65, 0x73, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x65,
/* 00003d20 */ 0x78, 0x70, 0x65, 0x63, 0x74, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x69, 0x73, 0x20, 0x65, 0x78, 0x70,
/* 00003d30 */ 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x75, 0x73, 0x65, 0x2c, 0x20, 0x74, 0x68,
/* 00003d40 */ 0x65, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x2e, 0x20, 0x20, 0x41, 0x20, 0x70, 0x72,
/* 00003d50 */ 0x6f, 0x64, 0x75, 0x63, 0x74, 0x0a, 0x69, 0x73, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x75,
/* 00003d60 */ 0x6d, 0x65, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x20, 0x72, 0x65, 0x67, 0x61,
/* 00003d70 */ 0x72, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x77, 0x68, 0x65, 0x74, 0x68, 0x65,
/* 00003d80 */ 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x20, 0x68, 0x61,
/* 00003d90 */ 0x73, 0x20, 0x73, 0x75, 0x62, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x0a, 0x63, 0x6f,
/* 00003da0 */ 0x6d, 0x6d, 0x65, 0x72, 0x63, 0x69, 0x61, 0x6c, 0x2c, 0x20, 0x69, 0x6e, 0x64, 0x75, 0x73, 0x74,
/* 00003db0 */ 0x72, 0x69, 0x61, 0x6c, 0x20, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x6e, 0x2d, 0x63, 0x6f, 0x6e, 0x73,
/* 00003dc0 */ 0x75, 0x6d, 0x65, 0x72, 0x20, 0x75, 0x73, 0x65, 0x73, 0x2c, 0x20, 0x75, 0x6e, 0x6c, 0x65, 0x73,
/* 00003dd0 */ 0x73, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x75, 0x73, 0x65, 0x73, 0x20, 0x72, 0x65, 0x70, 0x72,
/* 00003de0 */ 0x65, 0x73, 0x65, 0x6e, 0x74, 0x0a, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x73,
/* 00003df0 */ 0x69, 0x67, 0x6e, 0x69, 0x66, 0x69, 0x63, 0x61, 0x6e, 0x74, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x20,
/* 00003e00 */ 0x6f, 0x66, 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72,
/* 00003e10 */ 0x6f, 0x64, 0x75, 0x63, 0x74, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x22, 0x49, 0x6e, 0x73, 0x74, 0x61,
/* 00003e20 */ 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
/* 00003e30 */ 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x55, 0x73, 0x65, 0x72, 0x20,
/* 00003e40 */ 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x20, 0x61, 0x6e,
/* 00003e50 */ 0x79, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x2c, 0x0a, 0x70, 0x72, 0x6f, 0x63, 0x65,
/* 00003e60 */ 0x64, 0x75, 0x72, 0x65, 0x73, 0x2c, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61,
/* 00003e70 */ 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6b, 0x65, 0x79, 0x73, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x6f, 0x74,
/* 00003e80 */ 0x68, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20,
/* 00003e90 */ 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x73, 0x74,
/* 00003ea0 */ 0x61, 0x6c, 0x6c, 0x0a, 0x61, 0x6e, 0x64, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x20,
/* 00003eb0 */ 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
/* 00003ec0 */ 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77,
/* 00003ed0 */ 0x6f, 0x72, 0x6b, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x55, 0x73, 0x65, 0x72,
/* 00003ee0 */ 0x20, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x0a, 0x61, 0x20,
/* 00003ef0 */ 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
/* 00003f00 */ 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x73, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f,
/* 00003f10 */ 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x20, 0x20, 0x54,
/* 00003f20 */ 0x68, 0x65, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d,
/* 00003f30 */ 0x75, 0x73, 0x74, 0x0a, 0x73, 0x75, 0x66, 0x66, 0x69, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x65,
/* 00003f40 */ 0x6e, 0x73, 0x75, 0x72, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63,
/* 00003f50 */ 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x64, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f,
/* 00003f60 */ 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x6f, 0x64, 0x69,
/* 00003f70 */ 0x66, 0x69, 0x65, 0x64, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x0a, 0x63, 0x6f, 0x64, 0x65,
/* 00003f80 */ 0x20, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x6e, 0x6f, 0x20, 0x63, 0x61, 0x73, 0x65, 0x20, 0x70,
/* 00003f90 */ 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x20, 0x6f, 0x72, 0x20, 0x69, 0x6e, 0x74, 0x65,
/* 00003fa0 */ 0x72, 0x66, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x73, 0x6f, 0x6c, 0x65,
/* 00003fb0 */ 0x6c, 0x79, 0x20, 0x62, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x0a, 0x6d, 0x6f, 0x64, 0x69, 0x66,
/* 00003fc0 */ 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x61, 0x73, 0x20, 0x62, 0x65, 0x65, 0x6e,
/* 00003fd0 */ 0x20, 0x6d, 0x61, 0x64, 0x65, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x49, 0x66, 0x20, 0x79, 0x6f, 0x75,
/* 00003fe0 */ 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x61, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63,
/* 00003ff0 */ 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x75, 0x6e, 0x64, 0x65,
/* 00004000 */ 0x72, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69,
/* 00004010 */ 0x6e, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x2c, 0x20, 0x6f, 0x72, 0x0a, 0x73,
/* 00004020 */ 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x20,
/* 00004030 */ 0x75, 0x73, 0x65, 0x20, 0x69, 0x6e, 0x2c, 0x20, 0x61, 0x20, 0x55, 0x73, 0x65, 0x72, 0x20, 0x50,
/* 00004040 */ 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20,
/* 00004050 */ 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x63, 0x63, 0x75, 0x72, 0x73,
/* 00004060 */ 0x20, 0x61, 0x73, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x74, 0x72,
/* 00004070 */ 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x77, 0x68, 0x69,
/* 00004080 */ 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6f, 0x66, 0x20,
/* 00004090 */ 0x70, 0x6f, 0x73, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x75,
/* 000040a0 */ 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x20, 0x50,
/* 000040b0 */ 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x20, 0x69, 0x73, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66,
/* 000040c0 */ 0x65, 0x72, 0x72, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x63,
/* 000040d0 */ 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x70, 0x65, 0x72, 0x70, 0x65, 0x74,
/* 000040e0 */ 0x75, 0x69, 0x74, 0x79, 0x20, 0x6f, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x0a, 0x66, 0x69,
/* 000040f0 */ 0x78, 0x65, 0x64, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x20, 0x28, 0x72, 0x65, 0x67, 0x61, 0x72, 0x64,
/* 00004100 */ 0x6c, 0x65, 0x73, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x68, 0x6f, 0x77, 0x20, 0x74, 0x68, 0x65, 0x20,
/* 00004110 */ 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x63,
/* 00004120 */ 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x29, 0x2c, 0x20, 0x74,
/* 00004130 */ 0x68, 0x65, 0x0a, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67,
/* 00004140 */ 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x65, 0x64,
/* 00004150 */ 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x65, 0x63, 0x74,
/* 00004160 */ 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x63, 0x63, 0x6f,
/* 00004170 */ 0x6d, 0x70, 0x61, 0x6e, 0x69, 0x65, 0x64, 0x0a, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x49,
/* 00004180 */ 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x49, 0x6e, 0x66, 0x6f,
/* 00004190 */ 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x20, 0x42, 0x75, 0x74, 0x20, 0x74, 0x68,
/* 000041a0 */ 0x69, 0x73, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x64,
/* 000041b0 */ 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x0a, 0x69, 0x66,
/* 000041c0 */ 0x20, 0x6e, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6e, 0x6f, 0x72,
/* 000041d0 */ 0x20, 0x61, 0x6e, 0x79, 0x20, 0x74, 0x68, 0x69, 0x72, 0x64, 0x20, 0x70, 0x61, 0x72, 0x74, 0x79,
/* 000041e0 */ 0x20, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x69,
/* 000041f0 */ 0x6c, 0x69, 0x74, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x0a,
/* 00004200 */ 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20,
/* 00004210 */ 0x63, 0x6f, 0x64, 0x65, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x55, 0x73, 0x65, 0x72,
/* 00004220 */ 0x20, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x20, 0x28, 0x66, 0x6f, 0x72, 0x20, 0x65, 0x78,
/* 00004230 */ 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20,
/* 00004240 */ 0x68, 0x61, 0x73, 0x0a, 0x62, 0x65, 0x65, 0x6e, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c,
/* 00004250 */ 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x52, 0x4f, 0x4d, 0x29, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x54,
/* 00004260 */ 0x68, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x74,
/* 00004270 */ 0x6f, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x20, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c,
/* 00004280 */ 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69,
/* 00004290 */ 0x6f, 0x6e, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x69, 0x6e, 0x63, 0x6c,
/* 000042a0 */ 0x75, 0x64, 0x65, 0x20, 0x61, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e,
/* 000042b0 */ 0x74, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x20, 0x74, 0x6f,
/* 000042c0 */ 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74,
/* 000042d0 */ 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x77, 0x61, 0x72, 0x72, 0x61, 0x6e,
/* 000042e0 */ 0x74, 0x79, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x0a, 0x66,
/* 000042f0 */ 0x6f, 0x72, 0x20, 0x61, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x68,
/* 00004300 */ 0x61, 0x73, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64,
/* 00004310 */ 0x20, 0x6f, 0x72, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x20, 0x62, 0x79,
/* 00004320 */ 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x2c, 0x20,
/* 00004330 */ 0x6f, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x0a, 0x74, 0x68, 0x65, 0x20, 0x55, 0x73, 0x65, 0x72, 0x20,
/* 00004340 */ 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68,
/* 00004350 */ 0x20, 0x69, 0x74, 0x20, 0x68, 0x61, 0x73, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x20, 0x6d, 0x6f, 0x64,
/* 00004360 */ 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x6f, 0x72, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c,
/* 00004370 */ 0x65, 0x64, 0x2e, 0x20, 0x20, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x61,
/* 00004380 */ 0x0a, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20,
/* 00004390 */ 0x64, 0x65, 0x6e, 0x69, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20,
/* 000043a0 */ 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x74, 0x73,
/* 000043b0 */ 0x65, 0x6c, 0x66, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61,
/* 000043c0 */ 0x6e, 0x64, 0x0a, 0x61, 0x64, 0x76, 0x65, 0x72, 0x73, 0x65, 0x6c, 0x79, 0x20, 0x61, 0x66, 0x66,
/* 000043d0 */ 0x65, 0x63, 0x74, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
/* 000043e0 */ 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72,
/* 000043f0 */ 0x6b, 0x20, 0x6f, 0x72, 0x20, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x20, 0x74, 0x68,
/* 00004400 */ 0x65, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x0a, 0x70, 0x72, 0x6f, 0x74,
/* 00004410 */ 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e,
/* 00004420 */ 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x20, 0x74,
/* 00004430 */ 0x68, 0x65, 0x20, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x43,
/* 00004440 */ 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75,
/* 00004450 */ 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x65, 0x64, 0x2c, 0x20, 0x61, 0x6e,
/* 00004460 */ 0x64, 0x20, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x49,
/* 00004470 */ 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69,
/* 00004480 */ 0x64, 0x65, 0x64, 0x2c, 0x0a, 0x69, 0x6e, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x72, 0x64, 0x20, 0x77,
/* 00004490 */ 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
/* 000044a0 */ 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x66, 0x6f,
/* 000044b0 */ 0x72, 0x6d, 0x61, 0x74, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x73, 0x20, 0x70, 0x75, 0x62,
/* 000044c0 */ 0x6c, 0x69, 0x63, 0x6c, 0x79, 0x0a, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x64,
/* 000044d0 */ 0x20, 0x28, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x6e, 0x20, 0x69, 0x6d,
/* 000044e0 */ 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x76, 0x61,
/* 000044f0 */ 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x75,
/* 00004500 */ 0x62, 0x6c, 0x69, 0x63, 0x20, 0x69, 0x6e, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63,
/* 00004510 */ 0x6f, 0x64, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x29, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6d,
/* 00004520 */ 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x20, 0x73,
/* 00004530 */ 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x20, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x20,
/* 00004540 */ 0x6f, 0x72, 0x20, 0x6b, 0x65, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x0a, 0x75, 0x6e, 0x70, 0x61, 0x63,
/* 00004550 */ 0x6b, 0x69, 0x6e, 0x67, 0x2c, 0x20, 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x72,
/* 00004560 */ 0x20, 0x63, 0x6f, 0x70, 0x79, 0x69, 0x6e, 0x67, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x37, 0x2e, 0x20,
/* 00004570 */ 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x54, 0x65, 0x72, 0x6d, 0x73,
/* 00004580 */ 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x22, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c,
/* 00004590 */ 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x20, 0x61, 0x72,
/* 000045a0 */ 0x65, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x73, 0x75, 0x70,
/* 000045b0 */ 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x65, 0x72, 0x6d,
/* 000045c0 */ 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x0a, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73,
/* 000045d0 */ 0x65, 0x20, 0x62, 0x79, 0x20, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x78, 0x63, 0x65,
/* 000045e0 */ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x6f, 0x6e, 0x65, 0x20,
/* 000045f0 */ 0x6f, 0x72, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x73, 0x20, 0x63,
/* 00004600 */ 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x41, 0x64, 0x64, 0x69, 0x74,
/* 00004610 */ 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e,
/* 00004620 */ 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x61, 0x72, 0x65, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69,
/* 00004630 */ 0x63, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6e, 0x74,
/* 00004640 */ 0x69, 0x72, 0x65, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x73, 0x68, 0x61, 0x6c,
/* 00004650 */ 0x6c, 0x0a, 0x62, 0x65, 0x20, 0x74, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x61, 0x73, 0x20,
/* 00004660 */ 0x74, 0x68, 0x6f, 0x75, 0x67, 0x68, 0x20, 0x74, 0x68, 0x65, 0x79, 0x20, 0x77, 0x65, 0x72, 0x65,
/* 00004670 */ 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x69,
/* 00004680 */ 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68,
/* 00004690 */ 0x65, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x74, 0x0a, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68,
/* 000046a0 */ 0x65, 0x79, 0x20, 0x61, 0x72, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x75, 0x6e, 0x64,
/* 000046b0 */ 0x65, 0x72, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x6c, 0x61,
/* 000046c0 */ 0x77, 0x2e, 0x20, 0x20, 0x49, 0x66, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61,
/* 000046d0 */ 0x6c, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x61, 0x70,
/* 000046e0 */ 0x70, 0x6c, 0x79, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x61, 0x72, 0x74,
/* 000046f0 */ 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x2c,
/* 00004700 */ 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x70, 0x61, 0x72, 0x74, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62,
/* 00004710 */ 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x65, 0x6c,
/* 00004720 */ 0x79, 0x0a, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x6f, 0x73, 0x65, 0x20, 0x70, 0x65,
/* 00004730 */ 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x74,
/* 00004740 */ 0x68, 0x65, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x72, 0x65, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61,
/* 00004750 */ 0x6d, 0x20, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e,
/* 00004760 */ 0x65, 0x64, 0x20, 0x62, 0x79, 0x0a, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e,
/* 00004770 */ 0x73, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x72, 0x65, 0x67, 0x61, 0x72,
/* 00004780 */ 0x64, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f,
/* 00004790 */ 0x6e, 0x61, 0x6c, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
/* 000047a0 */ 0x0a, 0x0a, 0x20, 0x20, 0x57, 0x68, 0x65, 0x6e, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63, 0x6f, 0x6e,
/* 000047b0 */ 0x76, 0x65, 0x79, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20,
/* 000047c0 */ 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x79, 0x6f,
/* 000047d0 */ 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x61, 0x74, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x6f, 0x70,
/* 000047e0 */ 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x20, 0x61, 0x6e, 0x79, 0x20,
/* 000047f0 */ 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69,
/* 00004800 */ 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x61, 0x74,
/* 00004810 */ 0x20, 0x63, 0x6f, 0x70, 0x79, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61,
/* 00004820 */ 0x6e, 0x79, 0x20, 0x70, 0x61, 0x72, 0x74, 0x20, 0x6f, 0x66, 0x0a, 0x69, 0x74, 0x2e, 0x20, 0x20,
/* 00004830 */ 0x28, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x70, 0x65, 0x72, 0x6d,
/* 00004840 */ 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x77,
/* 00004850 */ 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72,
/* 00004860 */ 0x65, 0x20, 0x74, 0x68, 0x65, 0x69, 0x72, 0x20, 0x6f, 0x77, 0x6e, 0x0a, 0x72, 0x65, 0x6d, 0x6f,
/* 00004870 */ 0x76, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x20, 0x63, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x63,
/* 00004880 */ 0x61, 0x73, 0x65, 0x73, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x6f,
/* 00004890 */ 0x64, 0x69, 0x66, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x29, 0x20,
/* 000048a0 */ 0x20, 0x59, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x0a, 0x61,
/* 000048b0 */ 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73,
/* 000048c0 */ 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x6e, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61,
/* 000048d0 */ 0x6c, 0x2c, 0x20, 0x61, 0x64, 0x64, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x79, 0x6f, 0x75, 0x20,
/* 000048e0 */ 0x74, 0x6f, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72,
/* 000048f0 */ 0x6b, 0x2c, 0x0a, 0x66, 0x6f, 0x72, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x79, 0x6f, 0x75,
/* 00004900 */ 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x67, 0x69, 0x76,
/* 00004910 */ 0x65, 0x20, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x70, 0x72, 0x69, 0x61, 0x74, 0x65, 0x20, 0x63, 0x6f,
/* 00004920 */ 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69,
/* 00004930 */ 0x6f, 0x6e, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x4e, 0x6f, 0x74, 0x77, 0x69, 0x74, 0x68, 0x73, 0x74,
/* 00004940 */ 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72,
/* 00004950 */ 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,
/* 00004960 */ 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x66, 0x6f, 0x72, 0x20,
/* 00004970 */ 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x20, 0x79, 0x6f, 0x75, 0x0a, 0x61, 0x64, 0x64,
/* 00004980 */ 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f,
/* 00004990 */ 0x72, 0x6b, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x28, 0x69, 0x66, 0x20,
/* 000049a0 */ 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68,
/* 000049b0 */ 0x65, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x68, 0x6f, 0x6c, 0x64,
/* 000049c0 */ 0x65, 0x72, 0x73, 0x20, 0x6f, 0x66, 0x0a, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6d, 0x61, 0x74, 0x65,
/* 000049d0 */ 0x72, 0x69, 0x61, 0x6c, 0x29, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74,
/* 000049e0 */ 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,
/* 000049f0 */ 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20,
/* 00004a00 */ 0x74, 0x65, 0x72, 0x6d, 0x73, 0x3a, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, 0x29, 0x20, 0x44,
/* 00004a10 */ 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x61, 0x72, 0x72, 0x61,
/* 00004a20 */ 0x6e, 0x74, 0x79, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x20,
/* 00004a30 */ 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72,
/* 00004a40 */ 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20,
/* 00004a50 */ 0x20, 0x20, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x65, 0x63, 0x74,
/* 00004a60 */ 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x31, 0x35, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x31, 0x36, 0x20, 0x6f,
/* 00004a70 */ 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x3b, 0x20,
/* 00004a80 */ 0x6f, 0x72, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x62, 0x29, 0x20, 0x52, 0x65, 0x71, 0x75, 0x69,
/* 00004a90 */ 0x72, 0x69, 0x6e, 0x67, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f,
/* 00004aa0 */ 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x72,
/* 00004ab0 */ 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x6c, 0x65, 0x67, 0x61, 0x6c, 0x20,
/* 00004ac0 */ 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x73, 0x20, 0x6f, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61,
/* 00004ad0 */ 0x75, 0x74, 0x68, 0x6f, 0x72, 0x20, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f,
/* 00004ae0 */ 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72,
/* 00004af0 */ 0x69, 0x61, 0x6c, 0x20, 0x6f, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x70,
/* 00004b00 */ 0x70, 0x72, 0x6f, 0x70, 0x72, 0x69, 0x61, 0x74, 0x65, 0x20, 0x4c, 0x65, 0x67, 0x61, 0x6c, 0x0a,
/* 00004b10 */ 0x20, 0x20, 0x20, 0x20, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x73, 0x20, 0x64, 0x69, 0x73, 0x70,
/* 00004b20 */ 0x6c, 0x61, 0x79, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x20, 0x63,
/* 00004b30 */ 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x74, 0x3b, 0x20, 0x6f, 0x72,
/* 00004b40 */ 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x63, 0x29, 0x20, 0x50, 0x72, 0x6f, 0x68, 0x69, 0x62, 0x69,
/* 00004b50 */ 0x74, 0x69, 0x6e, 0x67, 0x20, 0x6d, 0x69, 0x73, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e,
/* 00004b60 */ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72,
/* 00004b70 */ 0x69, 0x67, 0x69, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6d, 0x61, 0x74,
/* 00004b80 */ 0x65, 0x72, 0x69, 0x61, 0x6c, 0x2c, 0x20, 0x6f, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65,
/* 00004b90 */ 0x71, 0x75, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6d, 0x6f, 0x64,
/* 00004ba0 */ 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f,
/* 00004bb0 */ 0x66, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x20,
/* 00004bc0 */ 0x62, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x0a, 0x20, 0x20, 0x20,
/* 00004bd0 */ 0x20, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x77, 0x61, 0x79, 0x73,
/* 00004be0 */ 0x20, 0x61, 0x73, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x66, 0x72,
/* 00004bf0 */ 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x20,
/* 00004c00 */ 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3b, 0x20, 0x6f, 0x72, 0x0a, 0x0a, 0x20, 0x20, 0x20,
/* 00004c10 */ 0x20, 0x64, 0x29, 0x20, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65,
/* 00004c20 */ 0x20, 0x75, 0x73, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x69,
/* 00004c30 */ 0x74, 0x79, 0x20, 0x70, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x6e,
/* 00004c40 */ 0x61, 0x6d, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72,
/* 00004c50 */ 0x73, 0x20, 0x6f, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x73,
/* 00004c60 */ 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c,
/* 00004c70 */ 0x3b, 0x20, 0x6f, 0x72, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x65, 0x29, 0x20, 0x44, 0x65, 0x63,
/* 00004c80 */ 0x6c, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x20,
/* 00004c90 */ 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x72, 0x61,
/* 00004ca0 */ 0x64, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x20, 0x6c, 0x61, 0x77, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x75,
/* 00004cb0 */ 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x74,
/* 00004cc0 */ 0x72, 0x61, 0x64, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x2c, 0x20, 0x74, 0x72, 0x61, 0x64,
/* 00004cd0 */ 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x73, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69,
/* 00004ce0 */ 0x63, 0x65, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x73, 0x3b, 0x20, 0x6f, 0x72, 0x0a, 0x0a, 0x20, 0x20,
/* 00004cf0 */ 0x20, 0x20, 0x66, 0x29, 0x20, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x69,
/* 00004d00 */ 0x6e, 0x64, 0x65, 0x6d, 0x6e, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f,
/* 00004d10 */ 0x66, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20,
/* 00004d20 */ 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x61, 0x74, 0x0a,
/* 00004d30 */ 0x20, 0x20, 0x20, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x20, 0x62, 0x79, 0x20,
/* 00004d40 */ 0x61, 0x6e, 0x79, 0x6f, 0x6e, 0x65, 0x20, 0x77, 0x68, 0x6f, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65,
/* 00004d50 */ 0x79, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x20,
/* 00004d60 */ 0x28, 0x6f, 0x72, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x76, 0x65, 0x72,
/* 00004d70 */ 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x74, 0x29,
/* 00004d80 */ 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x75, 0x61,
/* 00004d90 */ 0x6c, 0x20, 0x61, 0x73, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66,
/* 00004da0 */ 0x20, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68,
/* 00004db0 */ 0x65, 0x20, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x2c, 0x20, 0x66, 0x6f, 0x72,
/* 00004dc0 */ 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69,
/* 00004dd0 */ 0x74, 0x79, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20, 0x63, 0x6f,
/* 00004de0 */ 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x20, 0x61, 0x73, 0x73, 0x75, 0x6d, 0x70,
/* 00004df0 */ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6c, 0x79, 0x20, 0x69,
/* 00004e00 */ 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x20, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x74, 0x68, 0x6f,
/* 00004e10 */ 0x73, 0x65, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x20, 0x61, 0x6e, 0x64,
/* 00004e20 */ 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41, 0x6c, 0x6c,
/* 00004e30 */ 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6e, 0x6f, 0x6e, 0x2d, 0x70, 0x65, 0x72, 0x6d, 0x69,
/* 00004e40 */ 0x73, 0x73, 0x69, 0x76, 0x65, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c,
/* 00004e50 */ 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x69,
/* 00004e60 */ 0x64, 0x65, 0x72, 0x65, 0x64, 0x20, 0x22, 0x66, 0x75, 0x72, 0x74, 0x68, 0x65, 0x72, 0x0a, 0x72,
/* 00004e70 */ 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x20, 0x77, 0x69, 0x74,
/* 00004e80 */ 0x68, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x69, 0x6e, 0x67, 0x20,
/* 00004e90 */ 0x6f, 0x66, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x31, 0x30, 0x2e, 0x20, 0x20,
/* 00004ea0 */ 0x49, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x61,
/* 00004eb0 */ 0x73, 0x20, 0x79, 0x6f, 0x75, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x69,
/* 00004ec0 */ 0x74, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x70, 0x61, 0x72, 0x74, 0x20, 0x6f,
/* 00004ed0 */ 0x66, 0x20, 0x69, 0x74, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x61,
/* 00004ee0 */ 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20,
/* 00004ef0 */ 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x0a, 0x67, 0x6f, 0x76, 0x65, 0x72,
/* 00004f00 */ 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65,
/* 00004f10 */ 0x6e, 0x73, 0x65, 0x20, 0x61, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61,
/* 00004f20 */ 0x20, 0x74, 0x65, 0x72, 0x6d, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20,
/* 00004f30 */ 0x66, 0x75, 0x72, 0x74, 0x68, 0x65, 0x72, 0x0a, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74,
/* 00004f40 */ 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x72, 0x65, 0x6d,
/* 00004f50 */ 0x6f, 0x76, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x2e, 0x20, 0x20,
/* 00004f60 */ 0x49, 0x66, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x63,
/* 00004f70 */ 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x0a, 0x61,
/* 00004f80 */ 0x20, 0x66, 0x75, 0x72, 0x74, 0x68, 0x65, 0x72, 0x20, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63,
/* 00004f90 */ 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x62, 0x75, 0x74, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x73,
/* 00004fa0 */ 0x20, 0x72, 0x65, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x72, 0x20,
/* 00004fb0 */ 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20,
/* 00004fc0 */ 0x74, 0x68, 0x69, 0x73, 0x0a, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x79, 0x6f,
/* 00004fd0 */ 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x61, 0x64, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x63,
/* 00004fe0 */ 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x6d, 0x61, 0x74, 0x65,
/* 00004ff0 */ 0x72, 0x69, 0x61, 0x6c, 0x20, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79,
/* 00005000 */ 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x0a, 0x6f, 0x66, 0x20, 0x74, 0x68,
/* 00005010 */ 0x61, 0x74, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d,
/* 00005020 */ 0x65, 0x6e, 0x74, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68,
/* 00005030 */ 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x75, 0x72, 0x74, 0x68, 0x65, 0x72, 0x20, 0x72,
/* 00005040 */ 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x0a,
/* 00005050 */ 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x75, 0x72, 0x76, 0x69, 0x76, 0x65, 0x20, 0x73, 0x75, 0x63, 0x68,
/* 00005060 */ 0x20, 0x72, 0x65, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x72, 0x20,
/* 00005070 */ 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x69, 0x6e, 0x67, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x49, 0x66,
/* 00005080 */ 0x20, 0x79, 0x6f, 0x75, 0x20, 0x61, 0x64, 0x64, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x74,
/* 00005090 */ 0x6f, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b,
/* 000050a0 */ 0x20, 0x69, 0x6e, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x72, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20,
/* 000050b0 */ 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x79, 0x6f,
/* 000050c0 */ 0x75, 0x0a, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2c, 0x20, 0x69, 0x6e,
/* 000050d0 */ 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x74, 0x20, 0x73, 0x6f,
/* 000050e0 */ 0x75, 0x72, 0x63, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2c, 0x20, 0x61, 0x20, 0x73, 0x74,
/* 000050f0 */ 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x61,
/* 00005100 */ 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20,
/* 00005110 */ 0x74, 0x68, 0x61, 0x74, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68,
/* 00005120 */ 0x6f, 0x73, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x20,
/* 00005130 */ 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x20, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6e,
/* 00005140 */ 0x67, 0x0a, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6e, 0x64, 0x20,
/* 00005150 */ 0x74, 0x68, 0x65, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74,
/* 00005160 */ 0x65, 0x72, 0x6d, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f,
/* 00005170 */ 0x6e, 0x61, 0x6c, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x2c, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69,
/* 00005180 */ 0x73, 0x73, 0x69, 0x76, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x6e, 0x2d, 0x70, 0x65, 0x72,
/* 00005190 */ 0x6d, 0x69, 0x73, 0x73, 0x69, 0x76, 0x65, 0x2c, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20,
/* 000051a0 */ 0x73, 0x74, 0x61, 0x74, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x66, 0x6f,
/* 000051b0 */ 0x72, 0x6d, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x65,
/* 000051c0 */ 0x6c, 0x79, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e,
/* 000051d0 */ 0x73, 0x65, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x64, 0x20, 0x61, 0x73,
/* 000051e0 */ 0x20, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x0a, 0x74, 0x68, 0x65,
/* 000051f0 */ 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65,
/* 00005200 */ 0x6e, 0x74, 0x73, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x20, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72,
/* 00005210 */ 0x20, 0x77, 0x61, 0x79, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x38, 0x2e, 0x20, 0x54, 0x65, 0x72, 0x6d,
/* 00005220 */ 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x59, 0x6f, 0x75, 0x20,
/* 00005230 */ 0x6d, 0x61, 0x79, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74,
/* 00005240 */ 0x65, 0x20, 0x6f, 0x72, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x20, 0x61, 0x20, 0x63, 0x6f,
/* 00005250 */ 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x65, 0x78, 0x63, 0x65, 0x70,
/* 00005260 */ 0x74, 0x20, 0x61, 0x73, 0x20, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x6c, 0x79, 0x0a, 0x70,
/* 00005270 */ 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68,
/* 00005280 */ 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x20, 0x20, 0x41, 0x6e, 0x79,
/* 00005290 */ 0x20, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x77, 0x69,
/* 000052a0 */ 0x73, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x65, 0x20,
/* 000052b0 */ 0x6f, 0x72, 0x0a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20,
/* 000052c0 */ 0x76, 0x6f, 0x69, 0x64, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x61,
/* 000052d0 */ 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x74, 0x65, 0x72,
/* 000052e0 */ 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x72, 0x69, 0x67, 0x68,
/* 000052f0 */ 0x74, 0x73, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x0a, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69,
/* 00005300 */ 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x28, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67,
/* 00005310 */ 0x20, 0x61, 0x6e, 0x79, 0x20, 0x70, 0x61, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x6c, 0x69, 0x63, 0x65,
/* 00005320 */ 0x6e, 0x73, 0x65, 0x73, 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x20, 0x75, 0x6e, 0x64,
/* 00005330 */ 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x68, 0x69, 0x72, 0x64, 0x0a, 0x70, 0x61, 0x72,
/* 00005340 */ 0x61, 0x67, 0x72, 0x61, 0x70, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f,
/* 00005350 */ 0x6e, 0x20, 0x31, 0x31, 0x29, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x48, 0x6f, 0x77, 0x65, 0x76, 0x65,
/* 00005360 */ 0x72, 0x2c, 0x20, 0x69, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63, 0x65, 0x61, 0x73, 0x65, 0x20,
/* 00005370 */ 0x61, 0x6c, 0x6c, 0x20, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66,
/* 00005380 */ 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x74,
/* 00005390 */ 0x68, 0x65, 0x6e, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x0a, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,
/* 000053a0 */ 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, 0x6c,
/* 000053b0 */ 0x61, 0x72, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x68, 0x6f, 0x6c,
/* 000053c0 */ 0x64, 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x72, 0x65, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x74, 0x65,
/* 000053d0 */ 0x64, 0x20, 0x28, 0x61, 0x29, 0x0a, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x61,
/* 000053e0 */ 0x6c, 0x6c, 0x79, 0x2c, 0x20, 0x75, 0x6e, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20,
/* 000053f0 */ 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69,
/* 00005400 */ 0x67, 0x68, 0x74, 0x20, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x20, 0x65, 0x78, 0x70, 0x6c, 0x69,
/* 00005410 */ 0x63, 0x69, 0x74, 0x6c, 0x79, 0x20, 0x61, 0x6e, 0x64, 0x0a, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x6c,
/* 00005420 */ 0x79, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x20, 0x79, 0x6f, 0x75,
/* 00005430 */ 0x72, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x28,
/* 00005440 */ 0x62, 0x29, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x2c, 0x20,
/* 00005450 */ 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74,
/* 00005460 */ 0x0a, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x20, 0x66, 0x61, 0x69, 0x6c, 0x73, 0x20, 0x74, 0x6f,
/* 00005470 */ 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6f, 0x66, 0x20, 0x74,
/* 00005480 */ 0x68, 0x65, 0x20, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x62, 0x79, 0x20,
/* 00005490 */ 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x20,
/* 000054a0 */ 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x0a, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x36,
/* 000054b0 */ 0x30, 0x20, 0x64, 0x61, 0x79, 0x73, 0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65,
/* 000054c0 */ 0x20, 0x63, 0x65, 0x73, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x4d,
/* 000054d0 */ 0x6f, 0x72, 0x65, 0x6f, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x6c, 0x69,
/* 000054e0 */ 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x20, 0x70, 0x61, 0x72,
/* 000054f0 */ 0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68,
/* 00005500 */ 0x74, 0x20, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x20, 0x69, 0x73, 0x0a, 0x72, 0x65, 0x69, 0x6e,
/* 00005510 */ 0x73, 0x74, 0x61, 0x74, 0x65, 0x64, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74,
/* 00005520 */ 0x6c, 0x79, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69,
/* 00005530 */ 0x67, 0x68, 0x74, 0x20, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x66,
/* 00005540 */ 0x69, 0x65, 0x73, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x76,
/* 00005550 */ 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x62, 0x79, 0x20, 0x73, 0x6f, 0x6d, 0x65,
/* 00005560 */ 0x20, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x6d, 0x65, 0x61, 0x6e,
/* 00005570 */ 0x73, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66,
/* 00005580 */ 0x69, 0x72, 0x73, 0x74, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x68, 0x61,
/* 00005590 */ 0x76, 0x65, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x69,
/* 000055a0 */ 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20,
/* 000055b0 */ 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20,
/* 000055c0 */ 0x28, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x29, 0x20, 0x66,
/* 000055d0 */ 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x61, 0x74, 0x0a, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67,
/* 000055e0 */ 0x68, 0x74, 0x20, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x79,
/* 000055f0 */ 0x6f, 0x75, 0x20, 0x63, 0x75, 0x72, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x76, 0x69, 0x6f, 0x6c,
/* 00005600 */ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x33,
/* 00005610 */ 0x30, 0x20, 0x64, 0x61, 0x79, 0x73, 0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x0a, 0x79, 0x6f, 0x75,
/* 00005620 */ 0x72, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65,
/* 00005630 */ 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x65, 0x72, 0x6d,
/* 00005640 */ 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20,
/* 00005650 */ 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x69,
/* 00005660 */ 0x73, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e,
/* 00005670 */ 0x6f, 0x74, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65,
/* 00005680 */ 0x0a, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x61, 0x72,
/* 00005690 */ 0x74, 0x69, 0x65, 0x73, 0x20, 0x77, 0x68, 0x6f, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x72, 0x65,
/* 000056a0 */ 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x73, 0x20, 0x6f, 0x72,
/* 000056b0 */ 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x79, 0x6f, 0x75,
/* 000056c0 */ 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x0a, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65,
/* 000056d0 */ 0x6e, 0x73, 0x65, 0x2e, 0x20, 0x20, 0x49, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x72, 0x69,
/* 000056e0 */ 0x67, 0x68, 0x74, 0x73, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x20, 0x74,
/* 000056f0 */ 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6e, 0x6f,
/* 00005700 */ 0x74, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x0a, 0x72, 0x65,
/* 00005710 */ 0x69, 0x6e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x64, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x64, 0x6f,
/* 00005720 */ 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x79, 0x20, 0x74, 0x6f, 0x20,
/* 00005730 */ 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x6c, 0x69, 0x63, 0x65,
/* 00005740 */ 0x6e, 0x73, 0x65, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d,
/* 00005750 */ 0x65, 0x0a, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72,
/* 00005760 */ 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x31, 0x30, 0x2e, 0x0a, 0x0a, 0x20, 0x20,
/* 00005770 */ 0x39, 0x2e, 0x20, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x4e, 0x6f,
/* 00005780 */ 0x74, 0x20, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x48,
/* 00005790 */ 0x61, 0x76, 0x69, 0x6e, 0x67, 0x20, 0x43, 0x6f, 0x70, 0x69, 0x65, 0x73, 0x2e, 0x0a, 0x0a, 0x20,
/* 000057a0 */ 0x20, 0x59, 0x6f, 0x75, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x71,
/* 000057b0 */ 0x75, 0x69, 0x72, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x20,
/* 000057c0 */ 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x69, 0x6e, 0x20,
/* 000057d0 */ 0x6f, 0x72, 0x64, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65,
/* 000057e0 */ 0x20, 0x6f, 0x72, 0x0a, 0x72, 0x75, 0x6e, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f,
/* 000057f0 */ 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x2e, 0x20, 0x20,
/* 00005800 */ 0x41, 0x6e, 0x63, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x79, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67,
/* 00005810 */ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72,
/* 00005820 */ 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x0a, 0x6f, 0x63, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e,
/* 00005830 */ 0x67, 0x20, 0x73, 0x6f, 0x6c, 0x65, 0x6c, 0x79, 0x20, 0x61, 0x73, 0x20, 0x61, 0x20, 0x63, 0x6f,
/* 00005840 */ 0x6e, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x75, 0x73, 0x69,
/* 00005850 */ 0x6e, 0x67, 0x20, 0x70, 0x65, 0x65, 0x72, 0x2d, 0x74, 0x6f, 0x2d, 0x70, 0x65, 0x65, 0x72, 0x20,
/* 00005860 */ 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x0a, 0x74, 0x6f, 0x20,
/* 00005870 */ 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6c,
/* 00005880 */ 0x69, 0x6b, 0x65, 0x77, 0x69, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74,
/* 00005890 */ 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x20, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61,
/* 000058a0 */ 0x6e, 0x63, 0x65, 0x2e, 0x20, 0x20, 0x48, 0x6f, 0x77, 0x65, 0x76, 0x65, 0x72, 0x2c, 0x0a, 0x6e,
/* 000058b0 */ 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61,
/* 000058c0 */ 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x67,
/* 000058d0 */ 0x72, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73,
/* 000058e0 */ 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74,
/* 000058f0 */ 0x65, 0x20, 0x6f, 0x72, 0x0a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x20, 0x61, 0x6e, 0x79, 0x20,
/* 00005900 */ 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x20, 0x20, 0x54,
/* 00005910 */ 0x68, 0x65, 0x73, 0x65, 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x66,
/* 00005920 */ 0x72, 0x69, 0x6e, 0x67, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20,
/* 00005930 */ 0x69, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x64, 0x6f, 0x0a, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x63,
/* 00005940 */ 0x63, 0x65, 0x70, 0x74, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73,
/* 00005950 */ 0x65, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x2c, 0x20, 0x62,
/* 00005960 */ 0x79, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x72, 0x20, 0x70,
/* 00005970 */ 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x0a, 0x63, 0x6f, 0x76,
/* 00005980 */ 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x69,
/* 00005990 */ 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x61, 0x63, 0x63,
/* 000059a0 */ 0x65, 0x70, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20,
/* 000059b0 */ 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x64, 0x6f, 0x20, 0x73, 0x6f,
/* 000059c0 */ 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x31, 0x30, 0x2e, 0x20, 0x41, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74,
/* 000059d0 */ 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20,
/* 000059e0 */ 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x20, 0x52, 0x65, 0x63, 0x69, 0x70,
/* 000059f0 */ 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x45, 0x61, 0x63, 0x68, 0x20, 0x74,
/* 00005a00 */ 0x69, 0x6d, 0x65, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x61,
/* 00005a10 */ 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x74,
/* 00005a20 */ 0x68, 0x65, 0x20, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x75, 0x74,
/* 00005a30 */ 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x69,
/* 00005a40 */ 0x76, 0x65, 0x73, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x66, 0x72,
/* 00005a50 */ 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x20,
/* 00005a60 */ 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x2c, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x75,
/* 00005a70 */ 0x6e, 0x2c, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x20, 0x61, 0x6e, 0x64, 0x0a, 0x70, 0x72,
/* 00005a80 */ 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x77, 0x6f, 0x72,
/* 00005a90 */ 0x6b, 0x2c, 0x20, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68,
/* 00005aa0 */ 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x20, 0x20, 0x59, 0x6f, 0x75,
/* 00005ab0 */ 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
/* 00005ac0 */ 0x69, 0x62, 0x6c, 0x65, 0x0a, 0x66, 0x6f, 0x72, 0x20, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x69,
/* 00005ad0 */ 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x62, 0x79,
/* 00005ae0 */ 0x20, 0x74, 0x68, 0x69, 0x72, 0x64, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x20, 0x77,
/* 00005af0 */ 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,
/* 00005b00 */ 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41, 0x6e, 0x20, 0x22, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x20,
/* 00005b10 */ 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x69, 0x73, 0x20,
/* 00005b20 */ 0x61, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x72,
/* 00005b30 */ 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72,
/* 00005b40 */ 0x6f, 0x6c, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x0a, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
/* 00005b50 */ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x75, 0x62, 0x73, 0x74, 0x61,
/* 00005b60 */ 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x61, 0x73, 0x73, 0x65,
/* 00005b70 */ 0x74, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x6f, 0x6e, 0x65, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x75,
/* 00005b80 */ 0x62, 0x64, 0x69, 0x76, 0x69, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x6e, 0x0a, 0x6f, 0x72, 0x67,
/* 00005b90 */ 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x6d, 0x65,
/* 00005ba0 */ 0x72, 0x67, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
/* 00005bb0 */ 0x6f, 0x6e, 0x73, 0x2e, 0x20, 0x20, 0x49, 0x66, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61,
/* 00005bc0 */ 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65,
/* 00005bd0 */ 0x64, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x20, 0x66,
/* 00005be0 */ 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x20, 0x74, 0x72,
/* 00005bf0 */ 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20,
/* 00005c00 */ 0x70, 0x61, 0x72, 0x74, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x61, 0x74, 0x0a, 0x74, 0x72,
/* 00005c10 */ 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x68, 0x6f, 0x20, 0x72, 0x65,
/* 00005c20 */ 0x63, 0x65, 0x69, 0x76, 0x65, 0x73, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66,
/* 00005c30 */ 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x72,
/* 00005c40 */ 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x73, 0x20, 0x77, 0x68, 0x61, 0x74, 0x65, 0x76, 0x65, 0x72,
/* 00005c50 */ 0x0a, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65,
/* 00005c60 */ 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, 0x74, 0x79, 0x27,
/* 00005c70 */ 0x73, 0x20, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x20, 0x69, 0x6e,
/* 00005c80 */ 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x20, 0x68, 0x61, 0x64, 0x20, 0x6f, 0x72,
/* 00005c90 */ 0x20, 0x63, 0x6f, 0x75, 0x6c, 0x64, 0x0a, 0x67, 0x69, 0x76, 0x65, 0x20, 0x75, 0x6e, 0x64, 0x65,
/* 00005ca0 */ 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x20, 0x70,
/* 00005cb0 */ 0x61, 0x72, 0x61, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2c, 0x20, 0x70, 0x6c, 0x75, 0x73, 0x20, 0x61,
/* 00005cc0 */ 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x6f, 0x73, 0x73, 0x65, 0x73,
/* 00005cd0 */ 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x43, 0x6f, 0x72, 0x72,
/* 00005ce0 */ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
/* 00005cf0 */ 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x66, 0x72, 0x6f,
/* 00005d00 */ 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x65, 0x73, 0x73, 0x6f,
/* 00005d10 */ 0x72, 0x20, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x73, 0x74, 0x2c, 0x20, 0x69,
/* 00005d20 */ 0x66, 0x0a, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x65, 0x73, 0x73, 0x6f,
/* 00005d30 */ 0x72, 0x20, 0x68, 0x61, 0x73, 0x20, 0x69, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x61, 0x6e, 0x20,
/* 00005d40 */ 0x67, 0x65, 0x74, 0x20, 0x69, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x72, 0x65, 0x61, 0x73,
/* 00005d50 */ 0x6f, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x65, 0x66, 0x66, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x0a,
/* 00005d60 */ 0x0a, 0x20, 0x20, 0x59, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x69,
/* 00005d70 */ 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x66, 0x75, 0x72, 0x74, 0x68, 0x65,
/* 00005d80 */ 0x72, 0x20, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f,
/* 00005d90 */ 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x78, 0x65, 0x72, 0x63, 0x69, 0x73, 0x65, 0x20, 0x6f,
/* 00005da0 */ 0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x67, 0x72, 0x61,
/* 00005db0 */ 0x6e, 0x74, 0x65, 0x64, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x66, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64,
/* 00005dc0 */ 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65,
/* 00005dd0 */ 0x6e, 0x73, 0x65, 0x2e, 0x20, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c,
/* 00005de0 */ 0x65, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x0a, 0x6e, 0x6f, 0x74, 0x20, 0x69,
/* 00005df0 */ 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20,
/* 00005e00 */ 0x66, 0x65, 0x65, 0x2c, 0x20, 0x72, 0x6f, 0x79, 0x61, 0x6c, 0x74, 0x79, 0x2c, 0x20, 0x6f, 0x72,
/* 00005e10 */ 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x20, 0x66, 0x6f,
/* 00005e20 */ 0x72, 0x20, 0x65, 0x78, 0x65, 0x72, 0x63, 0x69, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x0a, 0x72, 0x69,
/* 00005e30 */ 0x67, 0x68, 0x74, 0x73, 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x20, 0x75, 0x6e, 0x64,
/* 00005e40 */ 0x65, 0x72, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c,
/* 00005e50 */ 0x20, 0x61, 0x6e, 0x64, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x6e, 0x6f, 0x74,
/* 00005e60 */ 0x20, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x20, 0x6c, 0x69, 0x74, 0x69, 0x67, 0x61,
/* 00005e70 */ 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x28, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x20,
/* 00005e80 */ 0x61, 0x20, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x2d, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x20, 0x6f, 0x72,
/* 00005e90 */ 0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x20, 0x69, 0x6e,
/* 00005ea0 */ 0x20, 0x61, 0x20, 0x6c, 0x61, 0x77, 0x73, 0x75, 0x69, 0x74, 0x29, 0x20, 0x61, 0x6c, 0x6c, 0x65,
/* 00005eb0 */ 0x67, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x61, 0x74, 0x0a, 0x61, 0x6e, 0x79, 0x20, 0x70, 0x61,
/* 00005ec0 */ 0x74, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x20, 0x69, 0x73, 0x20, 0x69, 0x6e,
/* 00005ed0 */ 0x66, 0x72, 0x69, 0x6e, 0x67, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x6d, 0x61, 0x6b, 0x69, 0x6e,
/* 00005ee0 */ 0x67, 0x2c, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x2c, 0x20, 0x73, 0x65, 0x6c, 0x6c, 0x69, 0x6e,
/* 00005ef0 */ 0x67, 0x2c, 0x20, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x6f, 0x72, 0x0a,
/* 00005f00 */ 0x73, 0x61, 0x6c, 0x65, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x69,
/* 00005f10 */ 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x6f,
/* 00005f20 */ 0x72, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66,
/* 00005f30 */ 0x20, 0x69, 0x74, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x31, 0x31, 0x2e, 0x20, 0x50, 0x61, 0x74, 0x65,
/* 00005f40 */ 0x6e, 0x74, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41, 0x20, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x72,
/* 00005f50 */ 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x22, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x70,
/* 00005f60 */ 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x20, 0x77, 0x68,
/* 00005f70 */ 0x6f, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x73, 0x20, 0x75, 0x73, 0x65,
/* 00005f80 */ 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x69, 0x73, 0x0a, 0x4c, 0x69, 0x63, 0x65,
/* 00005f90 */ 0x6e, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72,
/* 00005fa0 */ 0x61, 0x6d, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x6f, 0x6e, 0x20,
/* 00005fb0 */ 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61,
/* 00005fc0 */ 0x6d, 0x20, 0x69, 0x73, 0x20, 0x62, 0x61, 0x73, 0x65, 0x64, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65,
/* 00005fd0 */ 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x74, 0x68, 0x75, 0x73, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e,
/* 00005fe0 */ 0x73, 0x65, 0x64, 0x20, 0x69, 0x73, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x20, 0x74, 0x68,
/* 00005ff0 */ 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x27, 0x73, 0x20,
/* 00006000 */ 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x20, 0x76, 0x65, 0x72,
/* 00006010 */ 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41, 0x20, 0x63, 0x6f, 0x6e, 0x74,
/* 00006020 */ 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x27, 0x73, 0x20, 0x22, 0x65, 0x73, 0x73, 0x65, 0x6e,
/* 00006030 */ 0x74, 0x69, 0x61, 0x6c, 0x20, 0x70, 0x61, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x69,
/* 00006040 */ 0x6d, 0x73, 0x22, 0x20, 0x61, 0x72, 0x65, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x70, 0x61, 0x74, 0x65,
/* 00006050 */ 0x6e, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x64, 0x20,
/* 00006060 */ 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x64, 0x20, 0x62, 0x79,
/* 00006070 */ 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72,
/* 00006080 */ 0x2c, 0x20, 0x77, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64,
/* 00006090 */ 0x79, 0x20, 0x61, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x20, 0x6f, 0x72, 0x0a, 0x68, 0x65,
/* 000060a0 */ 0x72, 0x65, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20, 0x61, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64,
/* 000060b0 */ 0x2c, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20,
/* 000060c0 */ 0x69, 0x6e, 0x66, 0x72, 0x69, 0x6e, 0x67, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x73, 0x6f, 0x6d,
/* 000060d0 */ 0x65, 0x20, 0x6d, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x2c, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74,
/* 000060e0 */ 0x74, 0x65, 0x64, 0x0a, 0x62, 0x79, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65,
/* 000060f0 */ 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x6f, 0x66, 0x20, 0x6d, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2c, 0x20,
/* 00006100 */ 0x75, 0x73, 0x69, 0x6e, 0x67, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x65, 0x6c, 0x6c, 0x69, 0x6e,
/* 00006110 */ 0x67, 0x20, 0x69, 0x74, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f,
/* 00006120 */ 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2c, 0x0a, 0x62, 0x75, 0x74, 0x20, 0x64,
/* 00006130 */ 0x6f, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x63, 0x6c,
/* 00006140 */ 0x61, 0x69, 0x6d, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x20,
/* 00006150 */ 0x62, 0x65, 0x20, 0x69, 0x6e, 0x66, 0x72, 0x69, 0x6e, 0x67, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x6c,
/* 00006160 */ 0x79, 0x20, 0x61, 0x73, 0x20, 0x61, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e,
/* 00006170 */ 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x66, 0x75, 0x72, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6d, 0x6f,
/* 00006180 */ 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,
/* 00006190 */ 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x20, 0x76, 0x65,
/* 000061a0 */ 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x20, 0x46, 0x6f, 0x72, 0x0a, 0x70, 0x75, 0x72, 0x70,
/* 000061b0 */ 0x6f, 0x73, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x64, 0x65, 0x66,
/* 000061c0 */ 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
/* 000061d0 */ 0x6c, 0x22, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20,
/* 000061e0 */ 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x0a, 0x70,
/* 000061f0 */ 0x61, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x73, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,
/* 00006200 */ 0x73, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x6d, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x20, 0x63, 0x6f,
/* 00006210 */ 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68,
/* 00006220 */ 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x6f,
/* 00006230 */ 0x66, 0x0a, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x0a,
/* 00006240 */ 0x0a, 0x20, 0x20, 0x45, 0x61, 0x63, 0x68, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75,
/* 00006250 */ 0x74, 0x6f, 0x72, 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x61,
/* 00006260 */ 0x20, 0x6e, 0x6f, 0x6e, 0x2d, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x2c, 0x20,
/* 00006270 */ 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x77, 0x69, 0x64, 0x65, 0x2c, 0x20, 0x72, 0x6f, 0x79, 0x61, 0x6c,
/* 00006280 */ 0x74, 0x79, 0x2d, 0x66, 0x72, 0x65, 0x65, 0x0a, 0x70, 0x61, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x6c,
/* 00006290 */ 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65,
/* 000062a0 */ 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x27, 0x73, 0x20, 0x65,
/* 000062b0 */ 0x73, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x20, 0x70, 0x61, 0x74, 0x65, 0x6e, 0x74, 0x20,
/* 000062c0 */ 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x2c, 0x20, 0x74, 0x6f, 0x0a, 0x6d, 0x61, 0x6b, 0x65, 0x2c,
/* 000062d0 */ 0x20, 0x75, 0x73, 0x65, 0x2c, 0x20, 0x73, 0x65, 0x6c, 0x6c, 0x2c, 0x20, 0x6f, 0x66, 0x66, 0x65,
/* 000062e0 */ 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x73, 0x61, 0x6c, 0x65, 0x2c, 0x20, 0x69, 0x6d, 0x70, 0x6f,
/* 000062f0 */ 0x72, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x77, 0x69, 0x73, 0x65,
/* 00006300 */ 0x20, 0x72, 0x75, 0x6e, 0x2c, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x20, 0x61, 0x6e, 0x64,
/* 00006310 */ 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63,
/* 00006320 */ 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x73, 0x20, 0x63,
/* 00006330 */ 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69,
/* 00006340 */ 0x6f, 0x6e, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x49, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f,
/* 00006350 */ 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x72, 0x65, 0x65, 0x20, 0x70, 0x61,
/* 00006360 */ 0x72, 0x61, 0x67, 0x72, 0x61, 0x70, 0x68, 0x73, 0x2c, 0x20, 0x61, 0x20, 0x22, 0x70, 0x61, 0x74,
/* 00006370 */ 0x65, 0x6e, 0x74, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x69, 0x73, 0x20,
/* 00006380 */ 0x61, 0x6e, 0x79, 0x20, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x0a, 0x61, 0x67, 0x72, 0x65,
/* 00006390 */ 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d,
/* 000063a0 */ 0x65, 0x6e, 0x74, 0x2c, 0x20, 0x68, 0x6f, 0x77, 0x65, 0x76, 0x65, 0x72, 0x20, 0x64, 0x65, 0x6e,
/* 000063b0 */ 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x2c, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x74, 0x6f,
/* 000063c0 */ 0x20, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x20, 0x61, 0x20, 0x70, 0x61, 0x74, 0x65, 0x6e,
/* 000063d0 */ 0x74, 0x0a, 0x28, 0x73, 0x75, 0x63, 0x68, 0x20, 0x61, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78,
/* 000063e0 */ 0x70, 0x72, 0x65, 0x73, 0x73, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e,
/* 000063f0 */ 0x20, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x20, 0x61, 0x20, 0x70,
/* 00006400 */ 0x61, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x6e, 0x61, 0x6e,
/* 00006410 */ 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x74, 0x6f, 0x0a, 0x73, 0x75, 0x65, 0x20, 0x66, 0x6f, 0x72,
/* 00006420 */ 0x20, 0x70, 0x61, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x66, 0x72, 0x69, 0x6e, 0x67, 0x65,
/* 00006430 */ 0x6d, 0x65, 0x6e, 0x74, 0x29, 0x2e, 0x20, 0x20, 0x54, 0x6f, 0x20, 0x22, 0x67, 0x72, 0x61, 0x6e,
/* 00006440 */ 0x74, 0x22, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x61, 0x20, 0x70, 0x61, 0x74, 0x65, 0x6e, 0x74,
/* 00006450 */ 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x0a, 0x70, 0x61,
/* 00006460 */ 0x72, 0x74, 0x79, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x6b,
/* 00006470 */ 0x65, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x67, 0x72, 0x65, 0x65, 0x6d,
/* 00006480 */ 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e,
/* 00006490 */ 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65,
/* 000064a0 */ 0x20, 0x61, 0x0a, 0x70, 0x61, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x67, 0x61, 0x69, 0x6e, 0x73,
/* 000064b0 */ 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, 0x74, 0x79, 0x2e, 0x0a, 0x0a, 0x20, 0x20,
/* 000064c0 */ 0x49, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x61, 0x20,
/* 000064d0 */ 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x6b, 0x6e,
/* 000064e0 */ 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x6c, 0x79, 0x20, 0x72, 0x65, 0x6c, 0x79, 0x69, 0x6e, 0x67, 0x20,
/* 000064f0 */ 0x6f, 0x6e, 0x20, 0x61, 0x20, 0x70, 0x61, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x6c, 0x69, 0x63, 0x65,
/* 00006500 */ 0x6e, 0x73, 0x65, 0x2c, 0x0a, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x72,
/* 00006510 */ 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63,
/* 00006520 */ 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x69, 0x73,
/* 00006530 */ 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x66,
/* 00006540 */ 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x79, 0x6f, 0x6e, 0x65, 0x0a, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x70,
/* 00006550 */ 0x79, 0x2c, 0x20, 0x66, 0x72, 0x65, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x68, 0x61, 0x72, 0x67,
/* 00006560 */ 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20,
/* 00006570 */ 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69,
/* 00006580 */ 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x20, 0x61,
/* 00006590 */ 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x6c, 0x79, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61,
/* 000065a0 */ 0x62, 0x6c, 0x65, 0x20, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x73, 0x65, 0x72, 0x76,
/* 000065b0 */ 0x65, 0x72, 0x20, 0x6f, 0x72, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x72, 0x65, 0x61, 0x64,
/* 000065c0 */ 0x69, 0x6c, 0x79, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x20, 0x6d,
/* 000065d0 */ 0x65, 0x61, 0x6e, 0x73, 0x2c, 0x0a, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d,
/* 000065e0 */ 0x75, 0x73, 0x74, 0x20, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x28, 0x31, 0x29, 0x20, 0x63,
/* 000065f0 */ 0x61, 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70,
/* 00006600 */ 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x74, 0x6f,
/* 00006610 */ 0x20, 0x62, 0x65, 0x20, 0x73, 0x6f, 0x0a, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65,
/* 00006620 */ 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x28, 0x32, 0x29, 0x20, 0x61, 0x72, 0x72, 0x61, 0x6e, 0x67, 0x65,
/* 00006630 */ 0x20, 0x74, 0x6f, 0x20, 0x64, 0x65, 0x70, 0x72, 0x69, 0x76, 0x65, 0x20, 0x79, 0x6f, 0x75, 0x72,
/* 00006640 */ 0x73, 0x65, 0x6c, 0x66, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x65, 0x6e, 0x65,
/* 00006650 */ 0x66, 0x69, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x70, 0x61, 0x74, 0x65, 0x6e,
/* 00006660 */ 0x74, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68,
/* 00006670 */ 0x69, 0x73, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x77, 0x6f,
/* 00006680 */ 0x72, 0x6b, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x28, 0x33, 0x29, 0x20, 0x61, 0x72, 0x72, 0x61, 0x6e,
/* 00006690 */ 0x67, 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x6d, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x0a,
/* 000066a0 */ 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20,
/* 000066b0 */ 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73,
/* 000066c0 */ 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,
/* 000066d0 */ 0x2c, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20,
/* 000066e0 */ 0x70, 0x61, 0x74, 0x65, 0x6e, 0x74, 0x0a, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x74,
/* 000066f0 */ 0x6f, 0x20, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x20, 0x72, 0x65, 0x63,
/* 00006700 */ 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x20, 0x20, 0x22, 0x4b, 0x6e, 0x6f, 0x77, 0x69,
/* 00006710 */ 0x6e, 0x67, 0x6c, 0x79, 0x20, 0x72, 0x65, 0x6c, 0x79, 0x69, 0x6e, 0x67, 0x22, 0x20, 0x6d, 0x65,
/* 00006720 */ 0x61, 0x6e, 0x73, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x68, 0x61, 0x76, 0x65, 0x0a, 0x61, 0x63, 0x74,
/* 00006730 */ 0x75, 0x61, 0x6c, 0x20, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x20, 0x74, 0x68,
/* 00006740 */ 0x61, 0x74, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20,
/* 00006750 */ 0x70, 0x61, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20,
/* 00006760 */ 0x79, 0x6f, 0x75, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x74,
/* 00006770 */ 0x68, 0x65, 0x0a, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20,
/* 00006780 */ 0x69, 0x6e, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x2c, 0x20, 0x6f, 0x72,
/* 00006790 */ 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x27,
/* 000067a0 */ 0x73, 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x76,
/* 000067b0 */ 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x0a, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x63,
/* 000067c0 */ 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x2c, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x69, 0x6e,
/* 000067d0 */ 0x66, 0x72, 0x69, 0x6e, 0x67, 0x65, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x6d, 0x6f,
/* 000067e0 */ 0x72, 0x65, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x20,
/* 000067f0 */ 0x70, 0x61, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x0a,
/* 00006800 */ 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x79, 0x6f, 0x75,
/* 00006810 */ 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20,
/* 00006820 */ 0x62, 0x65, 0x6c, 0x69, 0x65, 0x76, 0x65, 0x20, 0x61, 0x72, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x69,
/* 00006830 */ 0x64, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x49, 0x66, 0x2c, 0x20, 0x70, 0x75, 0x72, 0x73, 0x75, 0x61,
/* 00006840 */ 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x6f, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x63, 0x6f, 0x6e, 0x6e,
/* 00006850 */ 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x73, 0x69,
/* 00006860 */ 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
/* 00006870 */ 0x20, 0x6f, 0x72, 0x0a, 0x61, 0x72, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2c,
/* 00006880 */ 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x2c, 0x20, 0x6f, 0x72, 0x20,
/* 00006890 */ 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x65, 0x20, 0x62, 0x79, 0x20, 0x70, 0x72, 0x6f,
/* 000068a0 */ 0x63, 0x75, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x61, 0x6e, 0x63,
/* 000068b0 */ 0x65, 0x20, 0x6f, 0x66, 0x2c, 0x20, 0x61, 0x0a, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20,
/* 000068c0 */ 0x77, 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x20,
/* 000068d0 */ 0x61, 0x20, 0x70, 0x61, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,
/* 000068e0 */ 0x20, 0x74, 0x6f, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20,
/* 000068f0 */ 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x69, 0x6e,
/* 00006900 */ 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f,
/* 00006910 */ 0x72, 0x6b, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x69, 0x6e, 0x67, 0x20, 0x74,
/* 00006920 */ 0x68, 0x65, 0x6d, 0x20, 0x74, 0x6f, 0x20, 0x75, 0x73, 0x65, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x70,
/* 00006930 */ 0x61, 0x67, 0x61, 0x74, 0x65, 0x2c, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x0a, 0x6f, 0x72,
/* 00006940 */ 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x61, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66,
/* 00006950 */ 0x69, 0x63, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63,
/* 00006960 */ 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x74, 0x68, 0x65,
/* 00006970 */ 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x6c, 0x69, 0x63,
/* 00006980 */ 0x65, 0x6e, 0x73, 0x65, 0x0a, 0x79, 0x6f, 0x75, 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x20, 0x69,
/* 00006990 */ 0x73, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20,
/* 000069a0 */ 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x6c, 0x6c, 0x20,
/* 000069b0 */ 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68,
/* 000069c0 */ 0x65, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x61,
/* 000069d0 */ 0x6e, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x20, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f,
/* 000069e0 */ 0x6e, 0x20, 0x69, 0x74, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x41, 0x20, 0x70, 0x61, 0x74, 0x65, 0x6e,
/* 000069f0 */ 0x74, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x69, 0x73, 0x20, 0x22, 0x64, 0x69,
/* 00006a00 */ 0x73, 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x20, 0x69, 0x66,
/* 00006a10 */ 0x20, 0x69, 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x69, 0x6e, 0x63,
/* 00006a20 */ 0x6c, 0x75, 0x64, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x0a, 0x74, 0x68, 0x65, 0x20,
/* 00006a30 */ 0x73, 0x63, 0x6f, 0x70, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x73, 0x20, 0x63, 0x6f, 0x76,
/* 00006a40 */ 0x65, 0x72, 0x61, 0x67, 0x65, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x68, 0x69, 0x62, 0x69, 0x74, 0x73,
/* 00006a50 */ 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x78, 0x65, 0x72, 0x63, 0x69, 0x73, 0x65, 0x20, 0x6f, 0x66,
/* 00006a60 */ 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x69, 0x73, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f,
/* 00006a70 */ 0x6e, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x6f, 0x6e, 0x2d, 0x65,
/* 00006a80 */ 0x78, 0x65, 0x72, 0x63, 0x69, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6f,
/* 00006a90 */ 0x72, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x69,
/* 00006aa0 */ 0x67, 0x68, 0x74, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x73, 0x70,
/* 00006ab0 */ 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74,
/* 00006ac0 */ 0x65, 0x64, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69,
/* 00006ad0 */ 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x20, 0x20, 0x59, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20,
/* 00006ae0 */ 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x76,
/* 00006af0 */ 0x65, 0x72, 0x65, 0x64, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x69, 0x66, 0x20, 0x79, 0x6f, 0x75,
/* 00006b00 */ 0x20, 0x61, 0x72, 0x65, 0x20, 0x61, 0x20, 0x70, 0x61, 0x72, 0x74, 0x79, 0x20, 0x74, 0x6f, 0x20,
/* 00006b10 */ 0x61, 0x6e, 0x20, 0x61, 0x72, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x77,
/* 00006b20 */ 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x74, 0x68, 0x69, 0x72, 0x64, 0x20, 0x70, 0x61, 0x72, 0x74,
/* 00006b30 */ 0x79, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x73, 0x0a, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65,
/* 00006b40 */ 0x20, 0x62, 0x75, 0x73, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x64, 0x69, 0x73,
/* 00006b50 */ 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61,
/* 00006b60 */ 0x72, 0x65, 0x2c, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20,
/* 00006b70 */ 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74,
/* 00006b80 */ 0x0a, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x68, 0x69, 0x72, 0x64, 0x20, 0x70, 0x61,
/* 00006b90 */ 0x72, 0x74, 0x79, 0x20, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65,
/* 00006ba0 */ 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20,
/* 00006bb0 */ 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x76,
/* 00006bc0 */ 0x65, 0x79, 0x69, 0x6e, 0x67, 0x0a, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x2c, 0x20,
/* 00006bd0 */ 0x61, 0x6e, 0x64, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20,
/* 00006be0 */ 0x74, 0x68, 0x65, 0x20, 0x74, 0x68, 0x69, 0x72, 0x64, 0x20, 0x70, 0x61, 0x72, 0x74, 0x79, 0x20,
/* 00006bf0 */ 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6f,
/* 00006c00 */ 0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x65, 0x73, 0x20, 0x77, 0x68,
/* 00006c10 */ 0x6f, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x20,
/* 00006c20 */ 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b,
/* 00006c30 */ 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x79, 0x6f, 0x75, 0x2c, 0x20, 0x61, 0x20, 0x64, 0x69, 0x73,
/* 00006c40 */ 0x63, 0x72, 0x69, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x79, 0x0a, 0x70, 0x61, 0x74, 0x65,
/* 00006c50 */ 0x6e, 0x74, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x28, 0x61, 0x29, 0x20, 0x69,
/* 00006c60 */ 0x6e, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x69, 0x74,
/* 00006c70 */ 0x68, 0x20, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20,
/* 00006c80 */ 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x0a, 0x63, 0x6f, 0x6e,
/* 00006c90 */ 0x76, 0x65, 0x79, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x28, 0x6f, 0x72,
/* 00006ca0 */ 0x20, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x73, 0x20, 0x6d, 0x61, 0x64, 0x65, 0x20, 0x66, 0x72, 0x6f,
/* 00006cb0 */ 0x6d, 0x20, 0x74, 0x68, 0x6f, 0x73, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x69, 0x65, 0x73, 0x29, 0x2c,
/* 00006cc0 */ 0x20, 0x6f, 0x72, 0x20, 0x28, 0x62, 0x29, 0x20, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x69, 0x6c,
/* 00006cd0 */ 0x79, 0x0a, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x63, 0x6f, 0x6e,
/* 00006ce0 */ 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x73, 0x70, 0x65,
/* 00006cf0 */ 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x20, 0x6f,
/* 00006d00 */ 0x72, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x74,
/* 00006d10 */ 0x68, 0x61, 0x74, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20,
/* 00006d20 */ 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x75, 0x6e,
/* 00006d30 */ 0x6c, 0x65, 0x73, 0x73, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x65, 0x64,
/* 00006d40 */ 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x61, 0x72, 0x72, 0x61, 0x6e,
/* 00006d50 */ 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2c, 0x0a, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20,
/* 00006d60 */ 0x70, 0x61, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x77,
/* 00006d70 */ 0x61, 0x73, 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x2c, 0x20, 0x70, 0x72, 0x69, 0x6f,
/* 00006d80 */ 0x72, 0x20, 0x74, 0x6f, 0x20, 0x32, 0x38, 0x20, 0x4d, 0x61, 0x72, 0x63, 0x68, 0x20, 0x32, 0x30,
/* 00006d90 */ 0x30, 0x37, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x4e, 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x69,
/* 00006da0 */ 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x73,
/* 00006db0 */ 0x68, 0x61, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x65,
/* 00006dc0 */ 0x64, 0x20, 0x61, 0x73, 0x20, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f,
/* 00006dd0 */ 0x72, 0x20, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x0a, 0x61, 0x6e, 0x79, 0x20, 0x69,
/* 00006de0 */ 0x6d, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x6f,
/* 00006df0 */ 0x72, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x64, 0x65, 0x66, 0x65, 0x6e, 0x73, 0x65, 0x73,
/* 00006e00 */ 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x66, 0x72, 0x69, 0x6e, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74,
/* 00006e10 */ 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6d, 0x61, 0x79, 0x0a, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x77,
/* 00006e20 */ 0x69, 0x73, 0x65, 0x20, 0x62, 0x65, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65,
/* 00006e30 */ 0x20, 0x74, 0x6f, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x61, 0x70,
/* 00006e40 */ 0x70, 0x6c, 0x69, 0x63, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x70, 0x61, 0x74, 0x65, 0x6e, 0x74, 0x20,
/* 00006e50 */ 0x6c, 0x61, 0x77, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x31, 0x32, 0x2e, 0x20, 0x4e, 0x6f, 0x20, 0x53,
/* 00006e60 */ 0x75, 0x72, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x4f, 0x74, 0x68, 0x65,
/* 00006e70 */ 0x72, 0x73, 0x27, 0x20, 0x46, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x2e, 0x0a, 0x0a, 0x20, 0x20,
/* 00006e80 */ 0x49, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x72,
/* 00006e90 */ 0x65, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x79, 0x6f, 0x75,
/* 00006ea0 */ 0x20, 0x28, 0x77, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x62, 0x79, 0x20, 0x63, 0x6f, 0x75,
/* 00006eb0 */ 0x72, 0x74, 0x20, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2c, 0x20, 0x61, 0x67, 0x72, 0x65, 0x65, 0x6d,
/* 00006ec0 */ 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x72, 0x0a, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x77, 0x69, 0x73, 0x65,
/* 00006ed0 */ 0x29, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x64, 0x69, 0x63,
/* 00006ee0 */ 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73,
/* 00006ef0 */ 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,
/* 00006f00 */ 0x2c, 0x20, 0x74, 0x68, 0x65, 0x79, 0x20, 0x64, 0x6f, 0x20, 0x6e, 0x6f, 0x74, 0x0a, 0x65, 0x78,
/* 00006f10 */ 0x63, 0x75, 0x73, 0x65, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68,
/* 00006f20 */ 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20,
/* 00006f30 */ 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x20, 0x20, 0x49,
/* 00006f40 */ 0x66, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x6f, 0x6e,
/* 00006f50 */ 0x76, 0x65, 0x79, 0x20, 0x61, 0x0a, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f,
/* 00006f60 */ 0x72, 0x6b, 0x20, 0x73, 0x6f, 0x20, 0x61, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x61, 0x74, 0x69,
/* 00006f70 */ 0x73, 0x66, 0x79, 0x20, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x74, 0x61, 0x6e, 0x65, 0x6f, 0x75, 0x73,
/* 00006f80 */ 0x6c, 0x79, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x6f, 0x62, 0x6c, 0x69, 0x67, 0x61, 0x74, 0x69,
/* 00006f90 */ 0x6f, 0x6e, 0x73, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x69, 0x73, 0x0a, 0x4c,
/* 00006fa0 */ 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6f,
/* 00006fb0 */ 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x65, 0x6e, 0x74, 0x20, 0x6f,
/* 00006fc0 */ 0x62, 0x6c, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e,
/* 00006fd0 */ 0x20, 0x61, 0x73, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63,
/* 00006fe0 */ 0x65, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x0a, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x6f,
/* 00006ff0 */ 0x6e, 0x76, 0x65, 0x79, 0x20, 0x69, 0x74, 0x20, 0x61, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x2e, 0x20,
/* 00007000 */ 0x20, 0x46, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2c, 0x20, 0x69, 0x66,
/* 00007010 */ 0x20, 0x79, 0x6f, 0x75, 0x20, 0x61, 0x67, 0x72, 0x65, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x65,
/* 00007020 */ 0x72, 0x6d, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6f, 0x62, 0x6c, 0x69, 0x67, 0x61, 0x74,
/* 00007030 */ 0x65, 0x20, 0x79, 0x6f, 0x75, 0x0a, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
/* 00007040 */ 0x20, 0x61, 0x20, 0x72, 0x6f, 0x79, 0x61, 0x6c, 0x74, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x66,
/* 00007050 */ 0x75, 0x72, 0x74, 0x68, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x69, 0x6e, 0x67,
/* 00007060 */ 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x6f, 0x73, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x77,
/* 00007070 */ 0x68, 0x6f, 0x6d, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x0a, 0x74,
/* 00007080 */ 0x68, 0x65, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20,
/* 00007090 */ 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x77, 0x61, 0x79, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63, 0x6f, 0x75,
/* 000070a0 */ 0x6c, 0x64, 0x20, 0x73, 0x61, 0x74, 0x69, 0x73, 0x66, 0x79, 0x20, 0x62, 0x6f, 0x74, 0x68, 0x20,
/* 000070b0 */ 0x74, 0x68, 0x6f, 0x73, 0x65, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20,
/* 000070c0 */ 0x74, 0x68, 0x69, 0x73, 0x0a, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x77, 0x6f, 0x75,
/* 000070d0 */ 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x66, 0x72, 0x61, 0x69, 0x6e,
/* 000070e0 */ 0x20, 0x65, 0x6e, 0x74, 0x69, 0x72, 0x65, 0x6c, 0x79, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x63,
/* 000070f0 */ 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x72, 0x6f,
/* 00007100 */ 0x67, 0x72, 0x61, 0x6d, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x31, 0x33, 0x2e, 0x20, 0x55, 0x73, 0x65,
/* 00007110 */ 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x41, 0x66,
/* 00007120 */ 0x66, 0x65, 0x72, 0x6f, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62,
/* 00007130 */ 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x0a, 0x0a, 0x20, 0x20,
/* 00007140 */ 0x4e, 0x6f, 0x74, 0x77, 0x69, 0x74, 0x68, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20,
/* 00007150 */ 0x61, 0x6e, 0x79, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73,
/* 00007160 */ 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65,
/* 00007170 */ 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x68, 0x61, 0x76, 0x65, 0x0a, 0x70, 0x65,
/* 00007180 */ 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x6c, 0x69, 0x6e, 0x6b,
/* 00007190 */ 0x20, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x20, 0x61, 0x6e, 0x79, 0x20,
/* 000071a0 */ 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x77, 0x69, 0x74,
/* 000071b0 */ 0x68, 0x20, 0x61, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,
/* 000071c0 */ 0x64, 0x0a, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20,
/* 000071d0 */ 0x33, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x41, 0x66, 0x66,
/* 000071e0 */ 0x65, 0x72, 0x6f, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c,
/* 000071f0 */ 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20,
/* 00007200 */ 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x0a, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65,
/* 00007210 */ 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x63,
/* 00007220 */ 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74,
/* 00007230 */ 0x69, 0x6e, 0x67, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x74,
/* 00007240 */ 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x0a, 0x4c, 0x69, 0x63,
/* 00007250 */ 0x65, 0x6e, 0x73, 0x65, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e,
/* 00007260 */ 0x75, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x74,
/* 00007270 */ 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73,
/* 00007280 */ 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72,
/* 00007290 */ 0x6b, 0x2c, 0x0a, 0x62, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69,
/* 000072a0 */ 0x61, 0x6c, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x20,
/* 000072b0 */ 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x41, 0x66, 0x66, 0x65, 0x72,
/* 000072c0 */ 0x6f, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63,
/* 000072d0 */ 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x0a, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f,
/* 000072e0 */ 0x6e, 0x20, 0x31, 0x33, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x63, 0x65, 0x72, 0x6e, 0x69, 0x6e, 0x67,
/* 000072f0 */ 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x72,
/* 00007300 */ 0x6f, 0x75, 0x67, 0x68, 0x20, 0x61, 0x20, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x77,
/* 00007310 */ 0x69, 0x6c, 0x6c, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65,
/* 00007320 */ 0x0a, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x73, 0x20,
/* 00007330 */ 0x73, 0x75, 0x63, 0x68, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x31, 0x34, 0x2e, 0x20, 0x52, 0x65, 0x76,
/* 00007340 */ 0x69, 0x73, 0x65, 0x64, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66,
/* 00007350 */ 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x0a, 0x0a,
/* 00007360 */ 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x46, 0x72, 0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74, 0x77,
/* 00007370 */ 0x61, 0x72, 0x65, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d,
/* 00007380 */ 0x61, 0x79, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x20, 0x72, 0x65, 0x76, 0x69, 0x73,
/* 00007390 */ 0x65, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x76, 0x65,
/* 000073a0 */ 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x0a, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e,
/* 000073b0 */ 0x55, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63,
/* 000073c0 */ 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x69,
/* 000073d0 */ 0x6d, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x20, 0x20, 0x53, 0x75, 0x63,
/* 000073e0 */ 0x68, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x77,
/* 000073f0 */ 0x69, 0x6c, 0x6c, 0x0a, 0x62, 0x65, 0x20, 0x73, 0x69, 0x6d, 0x69, 0x6c, 0x61, 0x72, 0x20, 0x69,
/* 00007400 */ 0x6e, 0x20, 0x73, 0x70, 0x69, 0x72, 0x69, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20,
/* 00007410 */ 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2c,
/* 00007420 */ 0x20, 0x62, 0x75, 0x74, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x20,
/* 00007430 */ 0x69, 0x6e, 0x20, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x20, 0x74, 0x6f, 0x0a, 0x61, 0x64, 0x64,
/* 00007440 */ 0x72, 0x65, 0x73, 0x73, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x70, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d,
/* 00007450 */ 0x73, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x63, 0x65, 0x72, 0x6e, 0x73, 0x2e, 0x0a, 0x0a,
/* 00007460 */ 0x20, 0x20, 0x45, 0x61, 0x63, 0x68, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x69,
/* 00007470 */ 0x73, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x61, 0x20, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e,
/* 00007480 */ 0x67, 0x75, 0x69, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
/* 00007490 */ 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x20, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x65,
/* 000074a0 */ 0x0a, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69,
/* 000074b0 */ 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x61, 0x20, 0x63, 0x65, 0x72, 0x74, 0x61, 0x69,
/* 000074c0 */ 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x65, 0x64, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69,
/* 000074d0 */ 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x65,
/* 000074e0 */ 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x0a, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63,
/* 000074f0 */ 0x65, 0x6e, 0x73, 0x65, 0x20, 0x22, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6c, 0x61, 0x74,
/* 00007500 */ 0x65, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x61, 0x70, 0x70, 0x6c,
/* 00007510 */ 0x69, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x74, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x68,
/* 00007520 */ 0x61, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f,
/* 00007530 */ 0x66, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20,
/* 00007540 */ 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74,
/* 00007550 */ 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74,
/* 00007560 */ 0x68, 0x61, 0x74, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x65, 0x64, 0x0a, 0x76, 0x65, 0x72,
/* 00007570 */ 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6c,
/* 00007580 */ 0x61, 0x74, 0x65, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x70, 0x75, 0x62,
/* 00007590 */ 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x46, 0x72,
/* 000075a0 */ 0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x0a, 0x46, 0x6f, 0x75, 0x6e,
/* 000075b0 */ 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20,
/* 000075c0 */ 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74,
/* 000075d0 */ 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x79, 0x20, 0x61, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69,
/* 000075e0 */ 0x6f, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65,
/* 000075f0 */ 0x0a, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62,
/* 00007600 */ 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x79, 0x6f, 0x75,
/* 00007610 */ 0x20, 0x6d, 0x61, 0x79, 0x20, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x20, 0x61, 0x6e, 0x79, 0x20,
/* 00007620 */ 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x65, 0x76, 0x65, 0x72, 0x20, 0x70, 0x75, 0x62,
/* 00007630 */ 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x0a, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x46, 0x72,
/* 00007640 */ 0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x46, 0x6f, 0x75, 0x6e,
/* 00007650 */ 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68,
/* 00007660 */ 0x65, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66,
/* 00007670 */ 0x69, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79,
/* 00007680 */ 0x20, 0x63, 0x61, 0x6e, 0x20, 0x64, 0x65, 0x63, 0x69, 0x64, 0x65, 0x20, 0x77, 0x68, 0x69, 0x63,
/* 00007690 */ 0x68, 0x20, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
/* 000076a0 */ 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x65, 0x6e,
/* 000076b0 */ 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65,
/* 000076c0 */ 0x6e, 0x73, 0x65, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x2c,
/* 000076d0 */ 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x27, 0x73, 0x0a, 0x70, 0x75,
/* 000076e0 */ 0x62, 0x6c, 0x69, 0x63, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6f,
/* 000076f0 */ 0x66, 0x20, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20,
/* 00007700 */ 0x61, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x61, 0x6e,
/* 00007710 */ 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x73,
/* 00007720 */ 0x20, 0x79, 0x6f, 0x75, 0x0a, 0x74, 0x6f, 0x20, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x20, 0x74,
/* 00007730 */ 0x68, 0x61, 0x74, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20,
/* 00007740 */ 0x74, 0x68, 0x65, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x2e, 0x0a, 0x0a, 0x20, 0x20,
/* 00007750 */ 0x4c, 0x61, 0x74, 0x65, 0x72, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x76, 0x65,
/* 00007760 */ 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x67, 0x69, 0x76, 0x65, 0x20,
/* 00007770 */ 0x79, 0x6f, 0x75, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x6f,
/* 00007780 */ 0x72, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x74, 0x0a, 0x70, 0x65, 0x72, 0x6d,
/* 00007790 */ 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x20, 0x20, 0x48, 0x6f, 0x77, 0x65, 0x76, 0x65,
/* 000077a0 */ 0x72, 0x2c, 0x20, 0x6e, 0x6f, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c,
/* 000077b0 */ 0x20, 0x6f, 0x62, 0x6c, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x72, 0x65,
/* 000077c0 */ 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x79, 0x0a,
/* 000077d0 */ 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69,
/* 000077e0 */ 0x67, 0x68, 0x74, 0x20, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x20, 0x61, 0x73, 0x20, 0x61, 0x20,
/* 000077f0 */ 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x63,
/* 00007800 */ 0x68, 0x6f, 0x6f, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f,
/* 00007810 */ 0x77, 0x20, 0x61, 0x0a, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
/* 00007820 */ 0x6e, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x31, 0x35, 0x2e, 0x20, 0x44, 0x69, 0x73, 0x63, 0x6c, 0x61,
/* 00007830 */ 0x69, 0x6d, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x57, 0x61, 0x72, 0x72, 0x61, 0x6e, 0x74, 0x79,
/* 00007840 */ 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x48, 0x45, 0x52, 0x45, 0x20, 0x49, 0x53, 0x20, 0x4e, 0x4f,
/* 00007850 */ 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x59, 0x20, 0x46, 0x4f, 0x52, 0x20, 0x54, 0x48,
/* 00007860 */ 0x45, 0x20, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x2c, 0x20, 0x54, 0x4f, 0x20, 0x54, 0x48,
/* 00007870 */ 0x45, 0x20, 0x45, 0x58, 0x54, 0x45, 0x4e, 0x54, 0x20, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x54, 0x54,
/* 00007880 */ 0x45, 0x44, 0x20, 0x42, 0x59, 0x0a, 0x41, 0x50, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x42, 0x4c, 0x45,
/* 00007890 */ 0x20, 0x4c, 0x41, 0x57, 0x2e, 0x20, 0x20, 0x45, 0x58, 0x43, 0x45, 0x50, 0x54, 0x20, 0x57, 0x48,
/* 000078a0 */ 0x45, 0x4e, 0x20, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x57, 0x49, 0x53, 0x45, 0x20, 0x53, 0x54, 0x41,
/* 000078b0 */ 0x54, 0x45, 0x44, 0x20, 0x49, 0x4e, 0x20, 0x57, 0x52, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x20, 0x54,
/* 000078c0 */ 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x0a, 0x48, 0x4f, 0x4c,
/* 000078d0 */ 0x44, 0x45, 0x52, 0x53, 0x20, 0x41, 0x4e, 0x44, 0x2f, 0x4f, 0x52, 0x20, 0x4f, 0x54, 0x48, 0x45,
/* 000078e0 */ 0x52, 0x20, 0x50, 0x41, 0x52, 0x54, 0x49, 0x45, 0x53, 0x20, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44,
/* 000078f0 */ 0x45, 0x20, 0x54, 0x48, 0x45, 0x20, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x20, 0x22, 0x41,
/* 00007900 */ 0x53, 0x20, 0x49, 0x53, 0x22, 0x20, 0x57, 0x49, 0x54, 0x48, 0x4f, 0x55, 0x54, 0x20, 0x57, 0x41,
/* 00007910 */ 0x52, 0x52, 0x41, 0x4e, 0x54, 0x59, 0x0a, 0x4f, 0x46, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x4b, 0x49,
/* 00007920 */ 0x4e, 0x44, 0x2c, 0x20, 0x45, 0x49, 0x54, 0x48, 0x45, 0x52, 0x20, 0x45, 0x58, 0x50, 0x52, 0x45,
/* 00007930 */ 0x53, 0x53, 0x45, 0x44, 0x20, 0x4f, 0x52, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x2c,
/* 00007940 */ 0x20, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20,
/* 00007950 */ 0x4e, 0x4f, 0x54, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x0a,
/* 00007960 */ 0x54, 0x48, 0x45, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52,
/* 00007970 */ 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x4d, 0x45, 0x52, 0x43, 0x48, 0x41,
/* 00007980 */ 0x4e, 0x54, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x46, 0x49,
/* 00007990 */ 0x54, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x46, 0x4f, 0x52, 0x20, 0x41, 0x20, 0x50, 0x41, 0x52, 0x54,
/* 000079a0 */ 0x49, 0x43, 0x55, 0x4c, 0x41, 0x52, 0x0a, 0x50, 0x55, 0x52, 0x50, 0x4f, 0x53, 0x45, 0x2e, 0x20,
/* 000079b0 */ 0x20, 0x54, 0x48, 0x45, 0x20, 0x45, 0x4e, 0x54, 0x49, 0x52, 0x45, 0x20, 0x52, 0x49, 0x53, 0x4b,
/* 000079c0 */ 0x20, 0x41, 0x53, 0x20, 0x54, 0x4f, 0x20, 0x54, 0x48, 0x45, 0x20, 0x51, 0x55, 0x41, 0x4c, 0x49,
/* 000079d0 */ 0x54, 0x59, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x50, 0x45, 0x52, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x4e,
/* 000079e0 */ 0x43, 0x45, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41,
/* 000079f0 */ 0x4d, 0x0a, 0x49, 0x53, 0x20, 0x57, 0x49, 0x54, 0x48, 0x20, 0x59, 0x4f, 0x55, 0x2e, 0x20, 0x20,
/* 00007a00 */ 0x53, 0x48, 0x4f, 0x55, 0x4c, 0x44, 0x20, 0x54, 0x48, 0x45, 0x20, 0x50, 0x52, 0x4f, 0x47, 0x52,
/* 00007a10 */ 0x41, 0x4d, 0x20, 0x50, 0x52, 0x4f, 0x56, 0x45, 0x20, 0x44, 0x45, 0x46, 0x45, 0x43, 0x54, 0x49,
/* 00007a20 */ 0x56, 0x45, 0x2c, 0x20, 0x59, 0x4f, 0x55, 0x20, 0x41, 0x53, 0x53, 0x55, 0x4d, 0x45, 0x20, 0x54,
/* 00007a30 */ 0x48, 0x45, 0x20, 0x43, 0x4f, 0x53, 0x54, 0x20, 0x4f, 0x46, 0x0a, 0x41, 0x4c, 0x4c, 0x20, 0x4e,
/* 00007a40 */ 0x45, 0x43, 0x45, 0x53, 0x53, 0x41, 0x52, 0x59, 0x20, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x49,
/* 00007a50 */ 0x4e, 0x47, 0x2c, 0x20, 0x52, 0x45, 0x50, 0x41, 0x49, 0x52, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f,
/* 00007a60 */ 0x52, 0x52, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x31, 0x36, 0x2e,
/* 00007a70 */ 0x20, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x4c,
/* 00007a80 */ 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x49, 0x4e, 0x20,
/* 00007a90 */ 0x4e, 0x4f, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x20, 0x55, 0x4e, 0x4c, 0x45, 0x53, 0x53, 0x20,
/* 00007aa0 */ 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x20, 0x42, 0x59, 0x20, 0x41, 0x50, 0x50, 0x4c,
/* 00007ab0 */ 0x49, 0x43, 0x41, 0x42, 0x4c, 0x45, 0x20, 0x4c, 0x41, 0x57, 0x20, 0x4f, 0x52, 0x20, 0x41, 0x47,
/* 00007ac0 */ 0x52, 0x45, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x20, 0x49, 0x4e, 0x20, 0x57, 0x52, 0x49, 0x54, 0x49,
/* 00007ad0 */ 0x4e, 0x47, 0x0a, 0x57, 0x49, 0x4c, 0x4c, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x43, 0x4f, 0x50, 0x59,
/* 00007ae0 */ 0x52, 0x49, 0x47, 0x48, 0x54, 0x20, 0x48, 0x4f, 0x4c, 0x44, 0x45, 0x52, 0x2c, 0x20, 0x4f, 0x52,
/* 00007af0 */ 0x20, 0x41, 0x4e, 0x59, 0x20, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x20, 0x50, 0x41, 0x52, 0x54, 0x59,
/* 00007b00 */ 0x20, 0x57, 0x48, 0x4f, 0x20, 0x4d, 0x4f, 0x44, 0x49, 0x46, 0x49, 0x45, 0x53, 0x20, 0x41, 0x4e,
/* 00007b10 */ 0x44, 0x2f, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x59, 0x53, 0x0a, 0x54, 0x48, 0x45,
/* 00007b20 */ 0x20, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x20, 0x41, 0x53, 0x20, 0x50, 0x45, 0x52, 0x4d,
/* 00007b30 */ 0x49, 0x54, 0x54, 0x45, 0x44, 0x20, 0x41, 0x42, 0x4f, 0x56, 0x45, 0x2c, 0x20, 0x42, 0x45, 0x20,
/* 00007b40 */ 0x4c, 0x49, 0x41, 0x42, 0x4c, 0x45, 0x20, 0x54, 0x4f, 0x20, 0x59, 0x4f, 0x55, 0x20, 0x46, 0x4f,
/* 00007b50 */ 0x52, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x53, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x4c, 0x55,
/* 00007b60 */ 0x44, 0x49, 0x4e, 0x47, 0x20, 0x41, 0x4e, 0x59, 0x0a, 0x47, 0x45, 0x4e, 0x45, 0x52, 0x41, 0x4c,
/* 00007b70 */ 0x2c, 0x20, 0x53, 0x50, 0x45, 0x43, 0x49, 0x41, 0x4c, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x49, 0x44,
/* 00007b80 */ 0x45, 0x4e, 0x54, 0x41, 0x4c, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x53, 0x45, 0x51, 0x55,
/* 00007b90 */ 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x53, 0x20, 0x41,
/* 00007ba0 */ 0x52, 0x49, 0x53, 0x49, 0x4e, 0x47, 0x20, 0x4f, 0x55, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48,
/* 00007bb0 */ 0x45, 0x0a, 0x55, 0x53, 0x45, 0x20, 0x4f, 0x52, 0x20, 0x49, 0x4e, 0x41, 0x42, 0x49, 0x4c, 0x49,
/* 00007bc0 */ 0x54, 0x59, 0x20, 0x54, 0x4f, 0x20, 0x55, 0x53, 0x45, 0x20, 0x54, 0x48, 0x45, 0x20, 0x50, 0x52,
/* 00007bd0 */ 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47,
/* 00007be0 */ 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44,
/* 00007bf0 */ 0x20, 0x54, 0x4f, 0x20, 0x4c, 0x4f, 0x53, 0x53, 0x20, 0x4f, 0x46, 0x0a, 0x44, 0x41, 0x54, 0x41,
/* 00007c00 */ 0x20, 0x4f, 0x52, 0x20, 0x44, 0x41, 0x54, 0x41, 0x20, 0x42, 0x45, 0x49, 0x4e, 0x47, 0x20, 0x52,
/* 00007c10 */ 0x45, 0x4e, 0x44, 0x45, 0x52, 0x45, 0x44, 0x20, 0x49, 0x4e, 0x41, 0x43, 0x43, 0x55, 0x52, 0x41,
/* 00007c20 */ 0x54, 0x45, 0x20, 0x4f, 0x52, 0x20, 0x4c, 0x4f, 0x53, 0x53, 0x45, 0x53, 0x20, 0x53, 0x55, 0x53,
/* 00007c30 */ 0x54, 0x41, 0x49, 0x4e, 0x45, 0x44, 0x20, 0x42, 0x59, 0x20, 0x59, 0x4f, 0x55, 0x20, 0x4f, 0x52,
/* 00007c40 */ 0x20, 0x54, 0x48, 0x49, 0x52, 0x44, 0x0a, 0x50, 0x41, 0x52, 0x54, 0x49, 0x45, 0x53, 0x20, 0x4f,
/* 00007c50 */ 0x52, 0x20, 0x41, 0x20, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x20, 0x4f, 0x46, 0x20, 0x54,
/* 00007c60 */ 0x48, 0x45, 0x20, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x20, 0x54, 0x4f, 0x20, 0x4f, 0x50,
/* 00007c70 */ 0x45, 0x52, 0x41, 0x54, 0x45, 0x20, 0x57, 0x49, 0x54, 0x48, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x4f,
/* 00007c80 */ 0x54, 0x48, 0x45, 0x52, 0x20, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x53, 0x29, 0x2c, 0x0a,
/* 00007c90 */ 0x45, 0x56, 0x45, 0x4e, 0x20, 0x49, 0x46, 0x20, 0x53, 0x55, 0x43, 0x48, 0x20, 0x48, 0x4f, 0x4c,
/* 00007ca0 */ 0x44, 0x45, 0x52, 0x20, 0x4f, 0x52, 0x20, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x20, 0x50, 0x41, 0x52,
/* 00007cb0 */ 0x54, 0x59, 0x20, 0x48, 0x41, 0x53, 0x20, 0x42, 0x45, 0x45, 0x4e, 0x20, 0x41, 0x44, 0x56, 0x49,
/* 00007cc0 */ 0x53, 0x45, 0x44, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x50, 0x4f, 0x53, 0x53, 0x49,
/* 00007cd0 */ 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x4f, 0x46, 0x0a, 0x53, 0x55, 0x43, 0x48, 0x20, 0x44,
/* 00007ce0 */ 0x41, 0x4d, 0x41, 0x47, 0x45, 0x53, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x31, 0x37, 0x2e, 0x20, 0x49,
/* 00007cf0 */ 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66,
/* 00007d00 */ 0x20, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x31, 0x35, 0x20, 0x61, 0x6e, 0x64,
/* 00007d10 */ 0x20, 0x31, 0x36, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64,
/* 00007d20 */ 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x77, 0x61, 0x72,
/* 00007d30 */ 0x72, 0x61, 0x6e, 0x74, 0x79, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x61,
/* 00007d40 */ 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74,
/* 00007d50 */ 0x79, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x0a, 0x61, 0x62, 0x6f, 0x76, 0x65,
/* 00007d60 */ 0x20, 0x63, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e,
/* 00007d70 */ 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x20, 0x6c, 0x65, 0x67, 0x61, 0x6c, 0x20, 0x65, 0x66, 0x66,
/* 00007d80 */ 0x65, 0x63, 0x74, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f,
/* 00007d90 */ 0x20, 0x74, 0x68, 0x65, 0x69, 0x72, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x2c, 0x0a, 0x72, 0x65,
/* 00007da0 */ 0x76, 0x69, 0x65, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x75, 0x72, 0x74, 0x73, 0x20, 0x73,
/* 00007db0 */ 0x68, 0x61, 0x6c, 0x6c, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c,
/* 00007dc0 */ 0x20, 0x6c, 0x61, 0x77, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x63,
/* 00007dd0 */ 0x6c, 0x6f, 0x73, 0x65, 0x6c, 0x79, 0x20, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61,
/* 00007de0 */ 0x74, 0x65, 0x73, 0x0a, 0x61, 0x6e, 0x20, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x20,
/* 00007df0 */ 0x77, 0x61, 0x69, 0x76, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x63, 0x69,
/* 00007e00 */ 0x76, 0x69, 0x6c, 0x20, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x69, 0x6e,
/* 00007e10 */ 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68,
/* 00007e20 */ 0x20, 0x74, 0x68, 0x65, 0x0a, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x2c, 0x20, 0x75, 0x6e,
/* 00007e30 */ 0x6c, 0x65, 0x73, 0x73, 0x20, 0x61, 0x20, 0x77, 0x61, 0x72, 0x72, 0x61, 0x6e, 0x74, 0x79, 0x20,
/* 00007e40 */ 0x6f, 0x72, 0x20, 0x61, 0x73, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66,
/* 00007e50 */ 0x20, 0x6c, 0x69, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x6d,
/* 00007e60 */ 0x70, 0x61, 0x6e, 0x69, 0x65, 0x73, 0x20, 0x61, 0x0a, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66,
/* 00007e70 */ 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x69, 0x6e, 0x20,
/* 00007e80 */ 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x66, 0x65, 0x65,
/* 00007e90 */ 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
/* 00007ea0 */ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x45, 0x4e, 0x44, 0x20, 0x4f, 0x46, 0x20, 0x54,
/* 00007eb0 */ 0x45, 0x52, 0x4d, 0x53, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49,
/* 00007ec0 */ 0x4f, 0x4e, 0x53, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
/* 00007ed0 */ 0x20, 0x48, 0x6f, 0x77, 0x20, 0x74, 0x6f, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x20, 0x54, 0x68,
/* 00007ee0 */ 0x65, 0x73, 0x65, 0x20, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x59, 0x6f, 0x75,
/* 00007ef0 */ 0x72, 0x20, 0x4e, 0x65, 0x77, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x73, 0x0a, 0x0a,
/* 00007f00 */ 0x20, 0x20, 0x49, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70,
/* 00007f10 */ 0x20, 0x61, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x2c, 0x20,
/* 00007f20 */ 0x61, 0x6e, 0x64, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20, 0x69, 0x74, 0x20,
/* 00007f30 */ 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x65,
/* 00007f40 */ 0x61, 0x74, 0x65, 0x73, 0x74, 0x0a, 0x70, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x20, 0x75,
/* 00007f50 */ 0x73, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63,
/* 00007f60 */ 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x65, 0x73, 0x74, 0x20, 0x77, 0x61, 0x79, 0x20, 0x74,
/* 00007f70 */ 0x6f, 0x20, 0x61, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69,
/* 00007f80 */ 0x73, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x69, 0x74, 0x0a, 0x66, 0x72, 0x65,
/* 00007f90 */ 0x65, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68,
/* 00007fa0 */ 0x20, 0x65, 0x76, 0x65, 0x72, 0x79, 0x6f, 0x6e, 0x65, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x72, 0x65,
/* 00007fb0 */ 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63,
/* 00007fc0 */ 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x73,
/* 00007fd0 */ 0x65, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x6f, 0x20, 0x64,
/* 00007fe0 */ 0x6f, 0x20, 0x73, 0x6f, 0x2c, 0x20, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65,
/* 00007ff0 */ 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63,
/* 00008000 */ 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61,
/* 00008010 */ 0x6d, 0x2e, 0x20, 0x20, 0x49, 0x74, 0x20, 0x69, 0x73, 0x20, 0x73, 0x61, 0x66, 0x65, 0x73, 0x74,
/* 00008020 */ 0x0a, 0x74, 0x6f, 0x20, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x20,
/* 00008030 */ 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x6f, 0x66, 0x20,
/* 00008040 */ 0x65, 0x61, 0x63, 0x68, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65,
/* 00008050 */ 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x6f, 0x73, 0x74, 0x20, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69,
/* 00008060 */ 0x76, 0x65, 0x6c, 0x79, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65,
/* 00008070 */ 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x77, 0x61, 0x72, 0x72,
/* 00008080 */ 0x61, 0x6e, 0x74, 0x79, 0x3b, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x66,
/* 00008090 */ 0x69, 0x6c, 0x65, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20,
/* 000080a0 */ 0x61, 0x74, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x0a, 0x74, 0x68, 0x65, 0x20, 0x22, 0x63, 0x6f,
/* 000080b0 */ 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x22, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x61, 0x6e,
/* 000080c0 */ 0x64, 0x20, 0x61, 0x20, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x77,
/* 000080d0 */ 0x68, 0x65, 0x72, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x75, 0x6c, 0x6c, 0x20, 0x6e, 0x6f,
/* 000080e0 */ 0x74, 0x69, 0x63, 0x65, 0x20, 0x69, 0x73, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x2e, 0x0a, 0x0a,
/* 000080f0 */ 0x20, 0x20, 0x20, 0x20, 0x7b, 0x6f, 0x6e, 0x65, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x74, 0x6f,
/* 00008100 */ 0x20, 0x67, 0x69, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61,
/* 00008110 */ 0x6d, 0x27, 0x73, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x20, 0x62,
/* 00008120 */ 0x72, 0x69, 0x65, 0x66, 0x20, 0x69, 0x64, 0x65, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x77, 0x68, 0x61,
/* 00008130 */ 0x74, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x2e, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20,
/* 00008140 */ 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x28, 0x43, 0x29, 0x20, 0x7b, 0x79,
/* 00008150 */ 0x65, 0x61, 0x72, 0x7d, 0x20, 0x20, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61,
/* 00008160 */ 0x75, 0x74, 0x68, 0x6f, 0x72, 0x7d, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x68, 0x69, 0x73,
/* 00008170 */ 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x69, 0x73, 0x20, 0x66, 0x72, 0x65, 0x65,
/* 00008180 */ 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x3a, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63,
/* 00008190 */ 0x61, 0x6e, 0x20, 0x72, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20,
/* 000081a0 */ 0x69, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x79,
/* 000081b0 */ 0x0a, 0x20, 0x20, 0x20, 0x20, 0x69, 0x74, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68,
/* 000081c0 */ 0x65, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47,
/* 000081d0 */ 0x4e, 0x55, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69,
/* 000081e0 */ 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x61, 0x73, 0x20, 0x70, 0x75, 0x62,
/* 000081f0 */ 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x20, 0x62, 0x79, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x74, 0x68,
/* 00008200 */ 0x65, 0x20, 0x46, 0x72, 0x65, 0x65, 0x20, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20,
/* 00008210 */ 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x65, 0x69, 0x74, 0x68,
/* 00008220 */ 0x65, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x33, 0x20, 0x6f, 0x66, 0x20,
/* 00008230 */ 0x74, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x6f, 0x72, 0x0a,
/* 00008240 */ 0x20, 0x20, 0x20, 0x20, 0x28, 0x61, 0x74, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x6f, 0x70, 0x74,
/* 00008250 */ 0x69, 0x6f, 0x6e, 0x29, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6c, 0x61, 0x74, 0x65, 0x72, 0x20, 0x76,
/* 00008260 */ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x68, 0x69,
/* 00008270 */ 0x73, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x69, 0x73, 0x20, 0x64, 0x69, 0x73,
/* 00008280 */ 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20,
/* 00008290 */ 0x68, 0x6f, 0x70, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x74, 0x20, 0x77, 0x69, 0x6c,
/* 000082a0 */ 0x6c, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x66, 0x75, 0x6c, 0x2c, 0x0a, 0x20, 0x20, 0x20,
/* 000082b0 */ 0x20, 0x62, 0x75, 0x74, 0x20, 0x57, 0x49, 0x54, 0x48, 0x4f, 0x55, 0x54, 0x20, 0x41, 0x4e, 0x59,
/* 000082c0 */ 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x59, 0x3b, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f,
/* 000082d0 */ 0x75, 0x74, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6d, 0x70, 0x6c,
/* 000082e0 */ 0x69, 0x65, 0x64, 0x20, 0x77, 0x61, 0x72, 0x72, 0x61, 0x6e, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x0a,
/* 000082f0 */ 0x20, 0x20, 0x20, 0x20, 0x4d, 0x45, 0x52, 0x43, 0x48, 0x41, 0x4e, 0x54, 0x41, 0x42, 0x49, 0x4c,
/* 00008300 */ 0x49, 0x54, 0x59, 0x20, 0x6f, 0x72, 0x20, 0x46, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x46,
/* 00008310 */ 0x4f, 0x52, 0x20, 0x41, 0x20, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x55, 0x4c, 0x41, 0x52, 0x20,
/* 00008320 */ 0x50, 0x55, 0x52, 0x50, 0x4f, 0x53, 0x45, 0x2e, 0x20, 0x20, 0x53, 0x65, 0x65, 0x20, 0x74, 0x68,
/* 00008330 */ 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61,
/* 00008340 */ 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,
/* 00008350 */ 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c,
/* 00008360 */ 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x59, 0x6f, 0x75, 0x20, 0x73, 0x68, 0x6f, 0x75,
/* 00008370 */ 0x6c, 0x64, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64,
/* 00008380 */ 0x20, 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47,
/* 00008390 */ 0x4e, 0x55, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69,
/* 000083a0 */ 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x61, 0x6c,
/* 000083b0 */ 0x6f, 0x6e, 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x70, 0x72,
/* 000083c0 */ 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x2e, 0x20, 0x20, 0x49, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x2c, 0x20,
/* 000083d0 */ 0x73, 0x65, 0x65, 0x20, 0x3c, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e,
/* 000083e0 */ 0x67, 0x6e, 0x75, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73,
/* 000083f0 */ 0x2f, 0x3e, 0x2e, 0x0a, 0x0a, 0x41, 0x6c, 0x73, 0x6f, 0x20, 0x61, 0x64, 0x64, 0x20, 0x69, 0x6e,
/* 00008400 */ 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x6e, 0x20, 0x68, 0x6f, 0x77,
/* 00008410 */ 0x20, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x20, 0x79, 0x6f, 0x75, 0x20,
/* 00008420 */ 0x62, 0x79, 0x20, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x20, 0x61, 0x6e,
/* 00008430 */ 0x64, 0x20, 0x70, 0x61, 0x70, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x69, 0x6c, 0x2e, 0x0a, 0x0a, 0x20,
/* 00008440 */ 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20,
/* 00008450 */ 0x64, 0x6f, 0x65, 0x73, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x6e,
/* 00008460 */ 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20,
/* 00008470 */ 0x69, 0x74, 0x20, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x61, 0x20, 0x73, 0x68, 0x6f, 0x72,
/* 00008480 */ 0x74, 0x0a, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x20, 0x6c, 0x69, 0x6b, 0x65, 0x20, 0x74, 0x68,
/* 00008490 */ 0x69, 0x73, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x69, 0x74, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74,
/* 000084a0 */ 0x73, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74,
/* 000084b0 */ 0x69, 0x76, 0x65, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x3a, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7b,
/* 000084c0 */ 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x20, 0x20, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69,
/* 000084d0 */ 0x67, 0x68, 0x74, 0x20, 0x28, 0x43, 0x29, 0x20, 0x7b, 0x79, 0x65, 0x61, 0x72, 0x7d, 0x20, 0x20,
/* 000084e0 */ 0x7b, 0x66, 0x75, 0x6c, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54,
/* 000084f0 */ 0x68, 0x69, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x63, 0x6f, 0x6d, 0x65,
/* 00008500 */ 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x41, 0x42, 0x53, 0x4f, 0x4c, 0x55, 0x54, 0x45, 0x4c,
/* 00008510 */ 0x59, 0x20, 0x4e, 0x4f, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x59, 0x3b, 0x20, 0x66,
/* 00008520 */ 0x6f, 0x72, 0x20, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20,
/* 00008530 */ 0x60, 0x73, 0x68, 0x6f, 0x77, 0x20, 0x77, 0x27, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x68,
/* 00008540 */ 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x66, 0x72, 0x65, 0x65, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77,
/* 00008550 */ 0x61, 0x72, 0x65, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x61, 0x72, 0x65,
/* 00008560 */ 0x20, 0x77, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x64, 0x69,
/* 00008570 */ 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x69, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20,
/* 00008580 */ 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x63, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x63, 0x6f,
/* 00008590 */ 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x60,
/* 000085a0 */ 0x73, 0x68, 0x6f, 0x77, 0x20, 0x63, 0x27, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x64, 0x65, 0x74, 0x61,
/* 000085b0 */ 0x69, 0x6c, 0x73, 0x2e, 0x0a, 0x0a, 0x54, 0x68, 0x65, 0x20, 0x68, 0x79, 0x70, 0x6f, 0x74, 0x68,
/* 000085c0 */ 0x65, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x20,
/* 000085d0 */ 0x60, 0x73, 0x68, 0x6f, 0x77, 0x20, 0x77, 0x27, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x60, 0x73, 0x68,
/* 000085e0 */ 0x6f, 0x77, 0x20, 0x63, 0x27, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x73, 0x68, 0x6f,
/* 000085f0 */ 0x77, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x70, 0x72, 0x69, 0x61, 0x74,
/* 00008600 */ 0x65, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47,
/* 00008610 */ 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69,
/* 00008620 */ 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x20, 0x20, 0x4f, 0x66, 0x20, 0x63, 0x6f, 0x75, 0x72, 0x73,
/* 00008630 */ 0x65, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x27,
/* 00008640 */ 0x73, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x0a, 0x6d, 0x69, 0x67, 0x68, 0x74,
/* 00008650 */ 0x20, 0x62, 0x65, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x74, 0x3b, 0x20, 0x66,
/* 00008660 */ 0x6f, 0x72, 0x20, 0x61, 0x20, 0x47, 0x55, 0x49, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61,
/* 00008670 */ 0x63, 0x65, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x75, 0x73,
/* 00008680 */ 0x65, 0x20, 0x61, 0x6e, 0x20, 0x22, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x62, 0x6f, 0x78, 0x22,
/* 00008690 */ 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x59, 0x6f, 0x75, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20,
/* 000086a0 */ 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x67, 0x65, 0x74, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x65, 0x6d,
/* 000086b0 */ 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x72, 0x20, 0x28, 0x69, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x77,
/* 000086c0 */ 0x6f, 0x72, 0x6b, 0x20, 0x61, 0x73, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d,
/* 000086d0 */ 0x6d, 0x65, 0x72, 0x29, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x63, 0x68, 0x6f, 0x6f, 0x6c, 0x2c, 0x0a,
/* 000086e0 */ 0x69, 0x66, 0x20, 0x61, 0x6e, 0x79, 0x2c, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x20,
/* 000086f0 */ 0x61, 0x20, 0x22, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x64, 0x69, 0x73,
/* 00008700 */ 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x22, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65,
/* 00008710 */ 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x2c, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x65, 0x63,
/* 00008720 */ 0x65, 0x73, 0x73, 0x61, 0x72, 0x79, 0x2e, 0x0a, 0x46, 0x6f, 0x72, 0x20, 0x6d, 0x6f, 0x72, 0x65,
/* 00008730 */ 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x6e, 0x20,
/* 00008740 */ 0x74, 0x68, 0x69, 0x73, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x68, 0x6f, 0x77, 0x20, 0x74, 0x6f,
/* 00008750 */ 0x20, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f,
/* 00008760 */ 0x77, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x50, 0x4c, 0x2c, 0x20, 0x73,
/* 00008770 */ 0x65, 0x65, 0x0a, 0x3c, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67,
/* 00008780 */ 0x6e, 0x75, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x2f,
/* 00008790 */ 0x3e, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x47, 0x65,
/* 000087a0 */ 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63,
/* 000087b0 */ 0x65, 0x6e, 0x73, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x70, 0x65,
/* 000087c0 */ 0x72, 0x6d, 0x69, 0x74, 0x20, 0x69, 0x6e, 0x63, 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x69,
/* 000087d0 */ 0x6e, 0x67, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x0a,
/* 000087e0 */ 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x72, 0x69, 0x65, 0x74, 0x61, 0x72, 0x79,
/* 000087f0 */ 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x20, 0x20, 0x49, 0x66, 0x20, 0x79,
/* 00008800 */ 0x6f, 0x75, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x69, 0x73, 0x20, 0x61,
/* 00008810 */ 0x20, 0x73, 0x75, 0x62, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x65, 0x20, 0x6c, 0x69, 0x62, 0x72,
/* 00008820 */ 0x61, 0x72, 0x79, 0x2c, 0x20, 0x79, 0x6f, 0x75, 0x0a, 0x6d, 0x61, 0x79, 0x20, 0x63, 0x6f, 0x6e,
/* 00008830 */ 0x73, 0x69, 0x64, 0x65, 0x72, 0x20, 0x69, 0x74, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x75, 0x73,
/* 00008840 */ 0x65, 0x66, 0x75, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x20, 0x6c,
/* 00008850 */ 0x69, 0x6e, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x70, 0x72, 0x6f, 0x70, 0x72, 0x69, 0x65, 0x74, 0x61,
/* 00008860 */ 0x72, 0x79, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20,
/* 00008870 */ 0x77, 0x69, 0x74, 0x68, 0x0a, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79,
/* 00008880 */ 0x2e, 0x20, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x77, 0x68,
/* 00008890 */ 0x61, 0x74, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x64,
/* 000088a0 */ 0x6f, 0x2c, 0x20, 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x4e, 0x55, 0x20, 0x4c,
/* 000088b0 */ 0x65, 0x73, 0x73, 0x65, 0x72, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x6c, 0x0a, 0x50, 0x75,
/* 000088c0 */ 0x62, 0x6c, 0x69, 0x63, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x69, 0x6e, 0x73,
/* 000088d0 */ 0x74, 0x65, 0x61, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x4c, 0x69, 0x63,
/* 000088e0 */ 0x65, 0x6e, 0x73, 0x65, 0x2e, 0x20, 0x20, 0x42, 0x75, 0x74, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74,
/* 000088f0 */ 0x2c, 0x20, 0x70, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x20, 0x72, 0x65, 0x61, 0x64, 0x0a, 0x3c, 0x68,
/* 00008900 */ 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6e, 0x75, 0x2e, 0x6f, 0x72,
/* 00008910 */ 0x67, 0x2f, 0x70, 0x68, 0x69, 0x6c, 0x6f, 0x73, 0x6f, 0x70, 0x68, 0x79, 0x2f, 0x77, 0x68, 0x79,
/* 00008920 */ 0x2d, 0x6e, 0x6f, 0x74, 0x2d, 0x6c, 0x67, 0x70, 0x6c, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x2e,
/* 00008930 */ 0x0a,
/* 00008931 */
};
| 256,897 | 239,011 |
/* -*- C++ -*- */
/*************************************************************************
* Copyright(c) 1995~2005 Masaharu Goto (root-cint@cern.ch)
*
* For the licensing terms see the file COPYING
*
************************************************************************/
#include <stdio.h>
class A {
int a;
public:
A() { a=123; }
#ifdef DEST
~A() { printf("~A() %d\n",a); }
#endif
int get() {return a;}
};
class B {
A **ppa;
public:
B() {
#ifndef DEST
ppa = NULL;
#endif
}
void test() {
ppa = new A*[3];
for(int i=0;i<3;i++) {
ppa[i] = new A[i+1];
}
}
void disp() {
for(int i=0;i<3;i++) {
for(int j=0;j<i+1;j++)
printf("%d\n",ppa[i][j].get());
}
}
~B() {
for(int i=0;i<3;i++) {
delete[] ppa[i];
}
delete[] ppa;
}
};
int main() {
B b;
b.test();
b.disp();
return 0;
}
| 877 | 391 |
#include "raytracing/bxdf/GlossySpecular.h"
#include "raytracing/utilities/ShadeRec.h"
#include "raytracing/sampler/MultiJittered.h"
namespace rt
{
GlossySpecular::GlossySpecular()
: m_cs(1, 1, 1)
{
}
// ----------------------------------------------------------------------------------- f
// no sampling here: just use the Phong formula
// this is used for direct illumination only
// explained on page 284
RGBColor GlossySpecular::f(const ShadeRec& sr, const Vector3D& wo, const Vector3D& wi) const
{
RGBColor L;
float ndotwi = static_cast<float>(sr.normal * wi);
Vector3D r(-wi + 2.0f * sr.normal * ndotwi); // mirror reflection direction
float rdotwo = static_cast<float>(r * wo);
if (rdotwo > 0.0)
L = m_ks * m_cs * pow(rdotwo, m_exp);
return (L);
}
RGBColor GlossySpecular::rho(const ShadeRec& sr, const Vector3D& wo) const
{
return BLACK;
}
RGBColor GlossySpecular::sample_f(const ShadeRec& sr, const Vector3D& wo, Vector3D& wi, float& pdf) const
{
float ndotwo = static_cast<float>(sr.normal * wo);
Vector3D r = -wo + 2.0f * sr.normal * ndotwo; // direction of mirror reflection
Vector3D w = r;
Vector3D u = Vector3D(0.00424, 1, 0.00764) ^ w;
u.Normalize();
Vector3D v = u ^ w;
Point3D sp = m_sampler->SampleHemisphere();
wi = sp.x * u + sp.y * v + sp.z * w; // reflected ray direction
if (sr.normal * wi < 0.0) // reflected ray is below tangent plane
wi = -sp.x * u - sp.y * v + sp.z * w;
float phong_lobe = pow((float)(r * wi), (float)m_exp);
pdf = static_cast<float>(phong_lobe * (sr.normal * wi));
return (m_ks * m_cs * phong_lobe);
}
void GlossySpecular::SetKs(float ks)
{
m_ks = ks;
}
void GlossySpecular::SetExp(float e)
{
m_exp = e;
}
void GlossySpecular::SetCs(const RGBColor& c)
{
m_cs = c;
}
void GlossySpecular::SetSamples(int num_samples, float exp)
{
m_sampler = std::make_shared<MultiJittered>(num_samples);
m_sampler->MapSamplesToHemisphere(exp);
}
void GlossySpecular::SetSampler(const std::shared_ptr<Sampler>& sampler, float exp)
{
m_sampler = sampler;
m_sampler->MapSamplesToHemisphere(exp);
}
} | 2,095 | 887 |
#include "ScilabSampler.h"
void ScilabSampler::init(double t, ...) {
BaseSimulator::init(t);
//The 'parameters' variable contains the parameters transferred from the editor.
va_list parameters;
va_start(parameters, t);
printLog(LOG_LEVEL_FULL_LOGGING, "[%f] %s: Init: \n", t, this->getName());
char *fvar;
fvar = va_arg(parameters, char*);
samplePeriod = readDefaultParameterValue<double>(fvar);
printLog(LOG_LEVEL_FULL_LOGGING, "[%f] %s: samplePeriod: %f \n", t, this->getName(), samplePeriod);
sigma = samplePeriod;
// reset
resetCounters();
this->logger->initSignals({"max", "avg", "min", "count", "sentBytes", "discards"});
return;
}
void ScilabSampler::resetCounters(){
eventCounter = 0;
weightedSumCounter = 0;
maxCounter = lastQueueSize;
minCounter = lastQueueSize;
discardsCounter = 0;
sentBytesCounter = 0;
}
void ScilabSampler::dint(double t) {
sigma = samplePeriod;
if(samplePeriod < 0){ // use samplePeriod=-1 to log everything
sigma = INF;
}
}
void ScilabSampler::dext(Event x, double t) {
printLog(LOG_LEVEL_FULL_LOGGING, "[%f] %s_ext: Packet arrived to port %u \n", t, this->getName(), x.port);
auto value = (std::static_pointer_cast<double> (x.valuePtr)).get();
double newQueueSize = value[0];
double discard = value[1];
printLog(LOG_LEVEL_FULL_LOGGING, "[%f] %s_ext: value[0]=%f value[1]=%f \n", t, this->getName(), newQueueSize, discard);
discardsCounter += discard;
eventCounter++;
// record sent packets
if(newQueueSize < lastQueueSize){ // a packet was dequeued
sentBytesCounter += lastQueueSize - newQueueSize;
}
if(lastT != -1 && lastT != t){ // If more than one value arrive in the same T, only sample the last one for that T
printLog(LOG_LEVEL_FULL_LOGGING, "[%f] %s_ext: Enter counters calculation \n", t, this->getName());
weightedSumCounter += lastQueueSize * (t - lastT);
maxCounter = std::max(maxCounter, lastQueueSize);
minCounter = std::min(minCounter, lastQueueSize);
}
lastT = t;
lastQueueSize = newQueueSize;
sigma = sigma - e; // continue as before
if(samplePeriod < 0){ // use samplePeriod=-1 to log everything
sigma = 0;
}
printLog(LOG_LEVEL_FULL_LOGGING, "[%f] %s_ext: Counters: events=%i; discards=%i; sentBytes=%i; weightedSum=%f; max=%i; min=%i; \n", t, this->getName(), eventCounter, discardsCounter, sentBytesCounter, weightedSumCounter, maxCounter, minCounter);
printLog(LOG_LEVEL_FULL_LOGGING, "[%f] %s_ext: lastT=%f, lastQueueSize=%i \n", t, this->getName(), lastT, lastQueueSize);
return;
}
Event ScilabSampler::lambda(double t) {
printLog(LOG_LEVEL_FULL_LOGGING, "[%f] %s_ext: Sampling now ... \n",t, this->getName());
// record sample for last value
if(lastT != -1 && lastT != t){
weightedSumCounter += lastQueueSize * (t - lastT);
maxCounter = std::max(maxCounter, lastQueueSize);
minCounter = std::min(minCounter, lastQueueSize);
}
double avg = samplePeriod>0? weightedSumCounter / samplePeriod : weightedSumCounter;
printLog(LOG_LEVEL_FULL_LOGGING, "[%f] %s_ext: Counters: events=%i; discards=%i; sentBytes=%i; sum=%f; max=%i; min=%i; avg=%f \n", t, this->getName(), eventCounter, discardsCounter, sentBytesCounter, weightedSumCounter, maxCounter, minCounter,avg);
// log to scilab
logger->logSignal(t,maxCounter,"max");
logger->logSignal(t,minCounter,"min");
logger->logSignal(t,avg,"avg");
logger->logSignal(t,eventCounter,"count");
logger->logSignal(t,discardsCounter,"discards");
logger->logSignal(t,sentBytesCounter,"sentBytes");
// reset
resetCounters();
lastT = t;
return Event(); // no output, just log to scilab
}
| 3,596 | 1,346 |
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// PLEASE READ BEFORE CHANGING THIS FILE!
//
// This file implements the support code for the out of bounds signal handler.
// Nothing in here actually runs in the signal handler, but the code here
// manipulates data structures used by the signal handler so we still need to be
// careful. In order to minimize this risk, here are some rules to follow.
//
// 1. Avoid introducing new external dependencies. The files in src/trap-handler
// should be as self-contained as possible to make it easy to audit the code.
//
// 2. Any changes must be reviewed by someone from the crash reporting
// or security team. Se OWNERS for suggested reviewers.
//
// For more information, see https://goo.gl/yMeyUY.
//
// For the code that runs in the signal handler itself, see handler-inside.cc.
#include <signal.h>
#include "src/trap-handler/handler-inside-posix.h"
#include "src/trap-handler/trap-handler-internal.h"
namespace v8 {
namespace internal {
namespace trap_handler {
#if V8_TRAP_HANDLER_SUPPORTED
namespace {
struct sigaction g_old_handler;
// When using the default signal handler, we save the old one to restore in case
// V8 chooses not to handle the signal.
bool g_is_default_signal_handler_registered;
} // namespace
bool RegisterDefaultTrapHandler() {
CHECK(!g_is_default_signal_handler_registered);
struct sigaction action;
action.sa_sigaction = HandleSignal;
action.sa_flags = SA_SIGINFO;
sigemptyset(&action.sa_mask);
// {sigaction} installs a new custom segfault handler. On success, it returns
// 0. If we get a nonzero value, we report an error to the caller by returning
// false.
if (sigaction(SIGSEGV, &action, &g_old_handler) != 0) {
return false;
}
// Sanitizers often prevent us from installing our own signal handler. Attempt
// to detect this and if so, refuse to enable trap handling.
//
// TODO(chromium:830894): Remove this once all bots support custom signal
// handlers.
#if defined(ADDRESS_SANITIZER) || defined(MEMORY_SANITIZER) || \
defined(THREAD_SANITIZER) || defined(LEAK_SANITIZER) || \
defined(UNDEFINED_SANITIZER)
struct sigaction installed_handler;
CHECK_EQ(sigaction(SIGSEGV, NULL, &installed_handler), 0);
// If the installed handler does not point to HandleSignal, then
// allow_user_segv_handler is 0.
if (installed_handler.sa_sigaction != HandleSignal) {
printf(
"WARNING: sanitizers are preventing signal handler installation. "
"Trap handlers are disabled.\n");
return false;
}
#endif
g_is_default_signal_handler_registered = true;
return true;
}
void RemoveTrapHandler() {
if (g_is_default_signal_handler_registered) {
if (sigaction(SIGSEGV, &g_old_handler, nullptr) == 0) {
g_is_default_signal_handler_registered = false;
}
}
}
#endif // V8_TRAP_HANDLER_SUPPORTED
} // namespace trap_handler
} // namespace internal
} // namespace v8
| 3,062 | 977 |
/*
* Copyright (C) 2011-2014 Daniel Scharrer
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the author(s) be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*/
/*!
* \file
*
* Central point to load all the different headers in the correct order.
*/
#ifndef INNOEXTRACT_SETUP_INFO_HPP
#define INNOEXTRACT_SETUP_INFO_HPP
#include <vector>
#include <iosfwd>
#include "setup/header.hpp"
#include "setup/version.hpp"
#include "util/flags.hpp"
namespace setup {
struct component_entry;
struct data_entry;
struct delete_entry;
struct directory_entry;
struct file_entry;
struct icon_entry;
struct ini_entry;
struct language_entry;
struct message_entry;
struct permission_entry;
struct registry_entry;
struct run_entry;
struct task_entry;
struct type_entry;
/*!
* Class used to hold and load the various \ref setup headers.
*/
struct info {
info();
~info();
FLAGS(entry_types,
Components,
DataEntries,
DeleteEntries,
UninstallDeleteEntries,
Directories,
Files,
Icons,
IniEntries,
Languages,
Messages,
Permissions,
RegistryEntries,
RunEntries,
UninstallRunEntries,
Tasks,
Types,
WizardImages,
DecompressorDll,
DecryptDll,
NoSkip
);
setup::version version;
setup::header header;
std::vector<component_entry> components; //! \c Components
std::vector<data_entry> data_entries; //! \c DataEntries
std::vector<delete_entry> delete_entries; //! \c DeleteEntries
std::vector<delete_entry> uninstall_delete_entries; //! \c UninstallDeleteEntries
std::vector<directory_entry> directories; //! \c Directories
std::vector<file_entry> files; //! \c Files
std::vector<icon_entry> icons; //! \c Icons
std::vector<ini_entry> ini_entries; //! \c IniEntries
std::vector<language_entry> languages; //! \c Languages
std::vector<message_entry> messages; //! \c Messages
std::vector<permission_entry> permissions; //! \c Permissions
std::vector<registry_entry> registry_entries; //! \c RegistryEntries
std::vector<run_entry> run_entries; //! \c RunEntries
std::vector<run_entry> uninstall_run_entries; //! \c UninstallRunEntries
std::vector<task_entry> tasks; //! \c Tasks
std::vector<type_entry> types; //! \c Types
//! Images displayed in the installer UI.
//! Loading enabled by \c WizardImages
std::string wizard_image;
std::string wizard_image_small;
//! Contents of the helper DLL used to decompress setup data in some versions.
//! Loading enabled by \c DecompressorDll
std::string decompressor_dll;
//! Contents of the helper DLL used to decrypt setup data.
//! Loading enabled by \c DecryptDll
std::string decrypt_dll;
/*!
* Load setup headers.
*
* \param is The input stream to load the setup headers from.
* It must already be positioned at start of \ref setup::version
* identifier whose position is given by
* \ref loader::offsets::header_offset.
* \param entries What kinds of entries to load.
*/
void load(std::istream & is, entry_types entries);
/*!
* Load setup headers for a specific version.
*
* \param is The input stream to load the setup headers from.
* It must already be positioned at start of the compressed headers.
* The compressed headers start directly after the \ref setup::version
* identifier whose position is given by
* \ref loader::offsets::header_offset.
* \param entries What kinds of entries to load.
* \param version The setup data version of the headers.
*
* This function does not set the \ref version member.
*/
void load(std::istream & is, entry_types entries, const setup::version & version);
};
} // namespace setup
FLAGS_OVERLOADS(setup::info::entry_types)
#endif // INNOEXTRACT_SETUP_INFO_HPP
| 4,809 | 1,459 |
#include "gdsfclock.h"
#include "qmath.h"
#include "databasesettings.h"
#include <QVariant>
GDSFClock::GDSFClock(QObject *parent) :
QObject(parent), m_lastClock(0)
{
m_lastClock = DatabaseSettings().value("cache_clean_clock", QString::number(0.0)).toDouble();
}
double GDSFClock::getGDSFPriority(int accessCount, long size)
{
return lastClock() + accessCount * (100 / qLn(size + 1.1));
}
double GDSFClock::lastClock()
{
int clock = 0;
m_lastClockMutex.lock();
clock = m_lastClock;
m_lastClockMutex.unlock();
return clock;
}
void GDSFClock::setLastClock(double clock)
{
m_lastClockMutex.lock();
if (clock < m_lastClock) {
m_lastClockMutex.unlock();
return;
}
m_lastClock = clock;
m_lastClockMutex.unlock();
DatabaseSettings().setValue("cache_clean_clock", QString::number(clock));
}
| 861 | 340 |
/*The tree node has data, left child and right child
struct node
{
int data;
node* left;
node* right;
};
*/
int height(node * root)
{
if(root == NULL) return 0;
return max(height(root->left), height(root->right)) + 1;
}
| 242 | 88 |
/**
* Appcelerator Titanium - licensed under the Apache Public License 2
* see LICENSE in the root folder for details on the license.
* Copyright (c) 2009 Appcelerator, Inc. All Rights Reserved.
*/
#include "../ui_module.h"
namespace ti {
void menu_callback(gpointer data);
GtkMenuItemImpl::GtkMenuItemImpl()
: parent(NULL)
{
}
void GtkMenuItemImpl::SetParent(GtkMenuItemImpl* parent)
{
this->parent = parent;
}
GtkMenuItemImpl* GtkMenuItemImpl::GetParent()
{
return this->parent;
}
SharedValue GtkMenuItemImpl::AddSeparator()
{
GtkMenuItemImpl* item = new GtkMenuItemImpl();
item->MakeSeparator();
return this->AppendItem(item);
}
SharedValue GtkMenuItemImpl::AddItem(SharedValue label,
SharedValue callback,
SharedValue icon_url)
{
GtkMenuItemImpl* item = new GtkMenuItemImpl();
item->MakeItem(label, callback, icon_url);
return this->AppendItem(item);
}
SharedValue GtkMenuItemImpl::AddSubMenu(SharedValue label,
SharedValue icon_url)
{
GtkMenuItemImpl* item = new GtkMenuItemImpl();
item->MakeSubMenu(label, icon_url);
return this->AppendItem(item);
}
SharedValue GtkMenuItemImpl::AppendItem(GtkMenuItemImpl* item)
{
item->SetParent(this);
this->children.push_back(item);
/* Realize the new item and add it to all existing instances */
std::vector<MenuPieces*>::iterator i = this->instances.begin();
while (i != this->instances.end())
{
MenuPieces *pieces = item->Realize(false);
gtk_menu_shell_append(GTK_MENU_SHELL((*i)->menu), pieces->item);
gtk_widget_show(pieces->item);
i++;
}
return MenuItem::AddToListModel(item);
}
GtkWidget* GtkMenuItemImpl::GetMenu()
{
if (this->parent == NULL) // top-level
{
MenuPieces* pieces = this->Realize(false);
return pieces->menu;
}
else
{
// For now we do not support using a submenu as a menu,
// as that makes determining parent-child relationships
// really hard, so just return NULL and check above.
return NULL;
}
}
GtkWidget* GtkMenuItemImpl::GetMenuBar()
{
if (this->parent == NULL) // top level
{
MenuPieces* pieces = this->Realize(true);
return pieces->menu;
}
else
{
// For now we do not support using a submenu as a menu,
// as that makes determining parent-child relationships
// really hard, so just return NULL and check above.
return NULL;
}
}
void GtkMenuItemImpl::AddChildrenTo(GtkWidget* menu)
{
std::vector<GtkMenuItemImpl*>::iterator c;
for (c = this->children.begin(); c != this->children.end(); c++)
{
MenuPieces* pieces = new MenuPieces();
(*c)->MakeMenuPieces(*pieces);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), pieces->item);
gtk_widget_show(pieces->item);
if (this->IsSubMenu() || this->parent == NULL)
{
(*c)->AddChildrenTo(pieces->menu);
}
delete pieces;
}
}
void GtkMenuItemImpl::ClearRealization(GtkWidget *parent_menu)
{
std::vector<MenuPieces*>::iterator i;
std::vector<GtkMenuItemImpl*>::iterator c;
// Find the instance which is contained in parent_menu or,
// if we are the root, find the instance which uses this
// menu to contain it's children.
for (i = this->instances.begin(); i != this->instances.end(); i++)
{
if ((*i)->parent_menu == parent_menu
|| (this->parent == NULL && (*i)->menu == parent_menu))
break;
}
// Could not find an instance which uses the menu.
if (i == this->instances.end()) return;
// Erase all children which use
// the sub-menu as their parent.
for (c = this->children.begin(); c != this->children.end(); c++)
{
(*c)->ClearRealization((*i)->menu);
}
this->instances.erase(i); // Erase the instance
}
GtkMenuItemImpl::MenuPieces* GtkMenuItemImpl::Realize(bool is_menu_bar)
{
MenuPieces* pieces = new MenuPieces();
if (this->parent == NULL) // top-level
{
if (is_menu_bar)
pieces->menu = gtk_menu_bar_new();
else
pieces->menu = gtk_menu_new();
}
else
{
this->MakeMenuPieces(*pieces);
}
/* Realize this widget's children */
if (this->IsSubMenu() || this->parent == NULL)
{
std::vector<GtkMenuItemImpl*>::iterator i = this->children.begin();
while (i != this->children.end())
{
MenuPieces* child_pieces = (*i)->Realize(false);
child_pieces->parent_menu = pieces->menu;
gtk_menu_shell_append(
GTK_MENU_SHELL(pieces->menu),
child_pieces->item);
gtk_widget_show(child_pieces->item);
i++;
}
}
this->instances.push_back(pieces);
return pieces;
}
void GtkMenuItemImpl::MakeMenuPieces(MenuPieces& pieces)
{
const char* label = this->GetLabel();
const char* icon_url = this->GetIconURL();
SharedString icon_path = UIModule::GetResourcePath(icon_url);
SharedValue callback_val = this->RawGet("callback");
if (this->IsSeparator())
{
pieces.item = gtk_separator_menu_item_new();
}
else if (icon_path.isNull())
{
pieces.item = gtk_menu_item_new_with_label(label);
}
else
{
pieces.item = gtk_image_menu_item_new_with_label(label);
GtkWidget* image = gtk_image_new_from_file(icon_path->c_str());
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(pieces.item), image);
}
if (callback_val->IsMethod())
{
// The callback is stored as a property of this MenuItem
// so we do not need to worry about the pointer being freed
// out from under us. At some point, in threaded code we will
// have to protect it with a mutex though, in the case that
// the callback is fired after it has been reassigned.
BoundMethod* cb = callback_val->ToMethod().get();
g_signal_connect_swapped(
G_OBJECT (pieces.item), "activate",
G_CALLBACK(menu_callback),
(gpointer) cb);
}
if (this->IsSubMenu())
{
pieces.menu = gtk_menu_new();
gtk_menu_item_set_submenu(GTK_MENU_ITEM(pieces.item), pieces.menu);
}
}
/* Crazy mutations below */
void GtkMenuItemImpl::Enable()
{
std::vector<MenuPieces*>::iterator i = this->instances.begin();
while (i != this->instances.end())
{
GtkWidget *w = (*i)->item;
if (w != NULL)
gtk_widget_set_sensitive(w, TRUE);
i++;
}
}
void GtkMenuItemImpl::Disable()
{
std::vector<MenuPieces*>::iterator i = this->instances.begin();
while (i != this->instances.end())
{
GtkWidget *w = (*i)->item;
if (w != NULL)
gtk_widget_set_sensitive(w, FALSE);
i++;
}
}
void GtkMenuItemImpl::SetLabel(std::string label)
{
std::vector<MenuPieces*>::iterator i = this->instances.begin();
while (i != this->instances.end())
{
GtkWidget *w = (*i)->item;
if (w != NULL)
{
GtkWidget *menu_label = gtk_bin_get_child(GTK_BIN(w));
gtk_label_set_text(GTK_LABEL(menu_label), label.c_str());
}
i++;
}
}
void GtkMenuItemImpl::SetIcon(std::string icon_url)
{
std::vector<MenuPieces*>::iterator i = this->instances.begin();
SharedString icon_path = UIModule::GetResourcePath(icon_url.c_str());
while (i != this->instances.end())
{
GtkWidget *w = (*i)->item;
if (w != NULL && G_TYPE_FROM_INSTANCE(w) == GTK_TYPE_IMAGE_MENU_ITEM)
{
GtkWidget* image = gtk_image_new_from_file(icon_path->c_str());
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(w), image);
}
i++;
}
}
/* Le callback */
void menu_callback(gpointer data)
{
BoundMethod* cb = (BoundMethod*) data;
// TODO: Handle exceptions in some way
try
{
ValueList args;
cb->Call(args);
}
catch(...)
{
std::cerr << "Menu callback failed" << std::endl;
}
}
}
| 7,579 | 3,060 |