blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 2
247
| content_id
stringlengths 40
40
| detected_licenses
listlengths 0
57
| license_type
stringclasses 2
values | repo_name
stringlengths 4
111
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
58
| visit_date
timestamp[ns]date 2015-07-25 18:16:41
2023-09-06 10:45:08
| revision_date
timestamp[ns]date 1970-01-14 14:03:36
2023-09-06 06:22:19
| committer_date
timestamp[ns]date 1970-01-14 14:03:36
2023-09-06 06:22:19
| github_id
int64 3.89k
689M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 25
values | gha_event_created_at
timestamp[ns]date 2012-06-07 00:51:45
2023-09-14 21:58:52
⌀ | gha_created_at
timestamp[ns]date 2008-03-27 23:40:48
2023-08-24 19:49:39
⌀ | gha_language
stringclasses 159
values | src_encoding
stringclasses 34
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 7
10.5M
| extension
stringclasses 111
values | filename
stringlengths 1
195
| text
stringlengths 7
10.5M
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
105becfafeaf8e4629f540bdb2d889074c29f133
|
aaf120c02ad25df14047a687de724a1be6cf3607
|
/misc.cpp
|
32158098e93e52e61b28aa286e0bae85cf0bda37
|
[] |
no_license
|
ssaatchi/gene-prediction
|
354ca7c1832d9710818fc578e2845a2918bf4804
|
918495ff81039f88e226174883633d4e1a3f9dc2
|
refs/heads/master
| 2021-01-21T14:38:50.320977
| 2017-07-26T17:18:31
| 2017-07-26T17:18:31
| 95,313,180
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,118
|
cpp
|
misc.cpp
|
/**
* Miscellaneous Functions Definitions
* Supvisor: Dr. Alex Zelikovsky
* <PRE>
* misc.cc
*
* Revisions: 1.0 April 13, 2004
* misc
*
* </PRE>
* Author: Jingwu He (PH.D candidate)
* Address: Computer Science Department, Georgia State University
* @author <A HREF="mailto:jingwu_he@yahoo.com">Jingwu He</A>
* @version 1.0, April 13, 2004
*
*/
#include <iostream>
#include <string>
#include "matrix.h"
using namespace std;
//display error message, exit program if necessary
void ErrorMsg(string str, bool mustexit)
{
cout << "Error: " << str << '\n';
if(mustexit) {
cout << "Exiting program\n";
exit(1);
}
else {
char ch = 'Q';
do {
cout << "Continue program execution? (Y/N): ";
cin >> ch;
ch = toupper(ch);
} while((ch != 'Y') && (ch != 'N'));
if(ch == 'N') exit(1);
if(ch == 'Y') return; //yes, superfluous, but makes it more undertandable
}
}
//get safe int input
int getint(istream& istr)
{
int temp = 0;
string str;
while(!(istr >> temp)) {
istr.clear();
istr >> str;
}
return temp;
}
|
e45821c07ea46b083a56c0674ebe7f7afbefff34
|
ab5a0e49c5d413be6449d7e1846b31c684288030
|
/Prog05_is_inside_here/Prog05/Version3/main.cpp
|
14873e785cae5349b4f8845290c24b7ccf909562
|
[] |
no_license
|
adamjeanlaurent/CSC412_Coursework
|
e43c9861af3e8fcec1a538598f6d343f3c8b8c78
|
30ca8576f497392846301cd82feb80d9ca200544
|
refs/heads/main
| 2023-01-14T15:14:09.365183
| 2020-11-24T20:30:35
| 2020-11-24T20:30:35
| 304,455,296
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,805
|
cpp
|
main.cpp
|
#include <iostream>
#include <string>
#include <cstdio>
#include <vector>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/wait.h>
#include "dispatcher.h"
#include "job.h"
#include "pipe.h"
int main(int argc, char** argv)
{
// parse input arguments
if(argc != 6)
{
// invalid arguments
std::cout << "usage: " << argv[0] << "./v1 <pathToImages> <pathToOutput> <pathToExecs> <nameOfPipe1> <nameOfPipe2>" << std::endl;
return 0;
}
std::string bashReadPipe(argv[4]);
std::string bashWritePipe(argv[5]);
// setup pipes
PipeManager pipes(
bashReadPipe,
bashWritePipe,
"tmp/write_fliph",
"tmp/write_flipv",
"tmp/write_gray",
"tmp/write_crop",
"tmp/write_rotate");
std::string jobFilePath = "";
char doneMessage[10] = "quit";
char continueMessage[10] = "continue";
bool endFound = false;
// launch resident dispatchers
std::vector<pid_t> residentDispatchersProcessIds = LaunchResidentDispatchers(&pipes, std::string(argv[3]));
while(!endFound)
{
// read from bash pipe
jobFilePath = pipes.r_bash.Read();
// process job file
endFound = ProcessJobFileWithPipes(jobFilePath.c_str(), argv[1], argv[2], argv[3], &pipes);
char* result;
if(endFound)
{
result = doneMessage;
}
else
{
result = continueMessage;
}
// write result to bash
pipes.w_bash.Write(std::string(result));
}
// wait for resident dispatcher processes to end
int status = 0;
for(pid_t pid : residentDispatchersProcessIds)
{
waitpid(pid, &status, 0);
}
return 0;
}
|
5f140f21c994d1cc662793e10019bc86aedcacde
|
70986bced7a24bf5a904b40ecabd44ec5139ea04
|
/ConceptsAndQuestions/graphs/tug_of_war.cpp
|
a2a311ac96d4844aa7d8bb3a33750be04383b30f
|
[] |
no_license
|
shrey/templates_cpp
|
f79cd09a729d9bc7a8dc620f4824c152b4f833ac
|
a6b6b8186f7e763c5029230a36fed8506f6d8cf9
|
refs/heads/master
| 2023-07-12T07:38:44.909862
| 2021-08-25T06:11:00
| 2021-08-25T06:11:00
| 283,482,614
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,696
|
cpp
|
tug_of_war.cpp
|
//Shrey Dubey
//Contact Me at wshrey09@gmail.com
#include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<unordered_map>
#include<vector>
#include<set>
#include<list>
#include<iomanip>
#include<queue>
#include<stack>
#include <math.h>
#define prDouble(x) cout<<fixed<<setprecision(10)<<x //to print decimal numbers
#define pb push_back
#define F first
#define S second
#define umap unordered_map
#define mp make_pair
#define fo(n) for(int i = 0; i<n; i++)
#define fnd(stl, data) find(stl.begin(), stl.end(), data)
using namespace std;
typedef long long ll;
int modulo = 1e9 + 7;
int min_diff = INT_MAX;
vector<int> a;
vector<int> b;
void recur(int arr[], int i, int n, vector<int> &a1, vector<int> &a2, int s1, int s2){
if(i == n){
if(abs((int)(a1.size()-a2.size()))<=1){
if(abs(s1-s2)<min_diff){
min_diff = abs(s1-s2);
a = a1;
b = a2;
}
}
return;
}
if(n%2 == 0){
if(a1.size()>n/2 || a2.size()>n/2){
return;
}
}
else{
if(a1.size()>(n+1)/2 || a2.size()>(n+1)/2){
return;
}
}
a1.pb(arr[i]);
recur(arr,i+1,n,a1,a2,s1+arr[i],s2);
a1.pop_back();
a2.pb(arr[i]);
recur(arr,i+1,n,a1,a2,s1,s2+arr[i]);
a2.pop_back();
}
int main(){
int arr[] = {23, 45, -34, 12, 0, 98, -99, 4, 189, -1, 4};
int n = sizeof(arr)/sizeof(int);
vector<int> a1,a2;
recur(arr,0,n,a1,a2,0,0);
fo(a.size()){
cout<<a[i]<<" ";
}
cout<<endl;
fo(b.size()){
cout<<b[i]<<" ";
}cout<<endl;
cout<<min_diff<<endl;
}
|
bae4eeb9fccc7f9f9b2d3e1d7da0bfe862924787
|
f656f41016dd258866ce86e8161c82511873c42a
|
/tree/SuffixTree.cpp
|
7fef14cd8f119fd38fe773416f506113e0f1a672
|
[] |
no_license
|
jerrylining/data_structure
|
7a93ded257a52f9cb42bb5b75517f604543dfb59
|
57ffae6283fa658dc4124aaccbc8c84b3deb3a1e
|
refs/heads/master
| 2020-11-29T20:44:41.404489
| 2018-01-24T02:34:43
| 2018-01-24T02:34:43
| 96,654,205
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 48
|
cpp
|
SuffixTree.cpp
|
#include "../stdafx.h"
#include "SuffixTree.h"
|
891b6119ef591d4755ae852391a56cc3f4dce6fb
|
cf413a0e9bf3d1d54a9dca23d17b3c63b0a0291c
|
/Solve/9461.h
|
27d9c1f15624fd1b042349b958cf86121c0ebb37
|
[] |
no_license
|
ruru14/noj.am
|
4d7dabf642f205bf901e595aaed1168469ef1b9f
|
b89b4f7372c357fbb8e567dafd8ba306fd01a200
|
refs/heads/master
| 2021-11-27T16:48:39.438279
| 2021-09-16T06:45:21
| 2021-09-16T06:45:21
| 130,633,719
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 117
|
h
|
9461.h
|
#ifndef nojam9461
#define nojam9461
#include "../AlgorithmStudy.h"
namespace nojam9461 {
void solution();
}
#endif
|
a9a51f34c81facd6cce48a5f31c7e1d1c638cb99
|
ea12fed4c32e9c7992956419eb3e2bace91f063a
|
/zombie/code/zombie/ntrigger/src/ntrigger/ntriggerserver_main.cc
|
ee41905bfab9ca801ce9049df463443ea3653519
|
[] |
no_license
|
ugozapad/TheZombieEngine
|
832492930df28c28cd349673f79f3609b1fe7190
|
8e8c3e6225c2ed93e07287356def9fbdeacf3d6a
|
refs/heads/master
| 2020-04-30T11:35:36.258363
| 2011-02-24T14:18:43
| 2011-02-24T14:18:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 33,098
|
cc
|
ntriggerserver_main.cc
|
//-----------------------------------------------------------------------------
// ntriggerserver_main.cc
// (C) 2005 Conjurer Services, S.A.
//-----------------------------------------------------------------------------
#include "precompiled/pchntrigger.h"
#include "ntrigger/ntriggerserver.h"
#include "ntrigger/nctrigger.h"
#include "ntrigger/ncareaevent.h"
#include "ntrigger/nscriptoperation.h"
#include "ntrigger/nctriggeroutput.h"
#include "ntrigger/ncareatrigger.h"
#include "ntrigger/ncagenttrigger.h"
#include "ncsound/ncsound.h"
// @todo Remove when moving motion related time intervals out from the trigger server
#include "ncaimovengine/ncaimovengine.h"
#ifndef NGAME
#include "nspatial/ncspatialcamera.h"
#endif
//------------------------------------------------------------------------------
nNebulaScriptClass(nTriggerServer, "nroot");
//------------------------------------------------------------------------------
const int nTriggerServer::ErrorsLog = NLOG1;
const int nTriggerServer::GeneralLog = NLOG2;
namespace
{
const char * logNames[] = {
"Errors",
"General",
0
};
}
NCREATELOGLEVELGROUP( trigger, "Trigger System", true, 1, logNames, nTriggerServer::ErrorsLog );
//------------------------------------------------------------------------------
nTriggerServer* nTriggerServer::instance = 0;
//-----------------------------------------------------------------------------
/**
Default constructor
*/
nTriggerServer::nTriggerServer()
: nextEventId( nGameEvent::INVALID_ID + 1 ),
currentTime(0),
updateTimeInterval(4),
cellsUpdateTimeInterval(16),
avoidanceCellsUpdateInterval(5),
gameEvents( 64, 64 )
#ifdef __NEBULA_STATS__
, profUpdate("profAITSUpdate", true)
, profGatherAreaEvents("profAITSGatherAreaEvents", true)
, profHandleAreaEvents("profAITSHandleAreaEvents", true)
#endif
#ifndef NGAME
, updatingSoundSources( false )
#endif
{
if ( !nTriggerServer::instance )
{
// Initialize instance pointer
nTriggerServer::instance = this;
}
}
//-----------------------------------------------------------------------------
/**
Destructor
*/
nTriggerServer::~nTriggerServer()
{
this->Reset();
nTriggerServer::instance = 0;
}
//-----------------------------------------------------------------------------
/**
Do any required set up dependend of current level to begin updating the triggers.
*/
void nTriggerServer::Start()
{
this->SpreadTriggersOverTime();
this->SpreadPerceivableCellsOverTime();
this->SpreadMotionCellsOverTime();
}
//-----------------------------------------------------------------------------
/**
Do any required clean up depended of current level to stop updating the triggers
*/
void nTriggerServer::Stop()
{
this->ClearTempData();
}
//-----------------------------------------------------------------------------
/**
Spread out the triggers updating homogenously among several frames
*/
void nTriggerServer::SpreadTriggersOverTime()
{
for ( int i(0); i < this->areaTriggers.Size(); ++i )
{
nEntityObject* trigger = nEntityObjectServer::Instance()->GetEntityObject( this->areaTriggers[i] );
trigger->GetComponentSafe<ncTrigger>()->SetNextUpdateTime( i % this->updateTimeInterval );
}
}
//-----------------------------------------------------------------------------
/**
Spread out the gathering of perceivable cells among several frames
*/
void nTriggerServer::SpreadPerceivableCellsOverTime()
{
for ( int i(0); i < this->areaTriggers.Size(); ++i )
{
nEntityObject* entity = nEntityObjectServer::Instance()->GetEntityObject( this->areaTriggers[i] );
ncTrigger* trigger = entity->GetComponentSafe<ncTrigger>();
/// Get the initial perceivable cells
nArray<nEntityObject*> emitters;
this->GetNearEmitters( trigger, true, emitters );
// Set the next time the list of perceivable cells will be updated
trigger->SetPerceivableCellsUpdateTime( i % this->cellsUpdateTimeInterval );
}
}
//-----------------------------------------------------------------------------
/**
Spread out the gathering of near cells for steering behaviors among several frames
*/
void nTriggerServer::SpreadMotionCellsOverTime()
{
for ( int i(0); i < this->areaTriggers.Size(); ++i )
{
nEntityObject* entity = nEntityObjectServer::Instance()->GetEntityObject( this->areaTriggers[i] );
ncAIMovEngine* motion = entity->GetComponent<ncAIMovEngine>();
if ( motion )
{
/// Get the initial near cells
nArray<nEntityObject*> entities;
motion->GetNearDynamicObstacles( true, entities );
// Set the next time the list of near cells will be updated
motion->SetAvoidanceCellsUpdateTime( i % this->avoidanceCellsUpdateInterval );
}
}
}
//-----------------------------------------------------------------------------
/**
Clear all temporal data, like pending events and execution orders
*/
void
nTriggerServer::ClearTempData()
{
// Pending output executions
for ( int i(0); i < this->pendingOutputExecutions.Size(); ++i )
{
this->pendingOutputExecutions[i].Destroy();
}
this->pendingOutputExecutions.Clear();
}
//-----------------------------------------------------------------------------
/**
Clear all triggers and events (triggers are not deleted, just removed)
*/
void
nTriggerServer::Reset()
{
this->ClearTempData();
// Instant broadcast events
for ( int i(0); i < this->instantBroadcastEvents.Size(); ++i )
{
this->DestroyEvent( this->instantBroadcastEvents[i] );
}
this->instantBroadcastEvents.Clear();
// Expirable area events
for ( int i(0); i < this->expirableAreaEvents.Size(); ++i )
{
this->DestroyEvent( this->expirableAreaEvents[i] );
}
this->expirableAreaEvents.Clear();
// Permanent area events
for ( int i(0); i < this->permanentAreaEvents.Size(); ++i )
{
this->DestroyEvent( this->permanentAreaEvents[i] );
}
this->permanentAreaEvents.Clear();
NLOG( trigger, (nTriggerServer::GeneralLog | 1, "All events erased by call to reset") );
// Triggers
this->broadcastTriggers.Clear();
this->areaTriggers.Clear();
NLOG( trigger, (nTriggerServer::GeneralLog | 1, "All triggers removed by call to reset") );
}
//-----------------------------------------------------------------------------
/**
Register a trigger
*/
void
nTriggerServer::RegisterTrigger( nEntityObject* entity )
{
nEntityObjectId entityId( entity->GetId() );
// Classify triggers as area or broadcast triggers
if ( entity->GetComponent<ncAreaTrigger>() || entity->GetComponent<ncAgentTrigger>() )
{
if ( this->areaTriggers.FindIndex( entityId ) == -1 )
{
this->areaTriggers.Append( entityId );
NLOG( trigger, (nTriggerServer::GeneralLog | 0,
"Registered area trigger %d", entityId) );
}
}
else
{
if ( this->broadcastTriggers.FindIndex( entityId ) == -1 )
{
this->broadcastTriggers.Append( entityId );
NLOG( trigger, (nTriggerServer::GeneralLog | 0,
"Registered broadcast trigger %d", entityId) );
}
}
}
//-----------------------------------------------------------------------------
/**
Remove a trigger (don't delete it)
*/
void
nTriggerServer::RemoveTrigger( nEntityObject* entity )
{
nEntityObjectId entityId( entity->GetId() );
// Remove the trigger from its trigger type group
int index = this->areaTriggers.FindIndex( entityId );
if ( index != -1 )
{
this->areaTriggers.Erase( index );
NLOG( trigger, (nTriggerServer::GeneralLog | 0,
"Unregistered area trigger %d", entityId) );
}
else
{
int index = this->broadcastTriggers.FindIndex( entityId );
if ( index != -1 )
{
this->broadcastTriggers.Erase( index );
NLOG( trigger, (nTriggerServer::GeneralLog | 0,
"Unregistered broadcast trigger %d", entityId) );
}
}
}
//-----------------------------------------------------------------------------
/**
Set the time between two consecutive updates of the same trigger
*/
void
nTriggerServer::SetUpdateInterval( nGameEvent::Time interval )
{
this->updateTimeInterval = interval;
this->SpreadTriggersOverTime();
}
//-----------------------------------------------------------------------------
/**
Set the time between two consecutive updates of a perceivable cells list
*/
void
nTriggerServer::SetPerceivableCellsUpdateInterval( nGameEvent::Time interval )
{
this->cellsUpdateTimeInterval = interval;
this->SpreadPerceivableCellsOverTime();
}
//------------------------------------------------------------------------------
/**
Get the time between two consecutive updates of a dynamic obstacles cells list
*/
void
nTriggerServer::SetAvoidanceCellsUpdateInterval( int interval )
{
this->avoidanceCellsUpdateInterval = interval;
this->SpreadMotionCellsOverTime();
}
//-----------------------------------------------------------------------------
/**
Create a new event with default parameters
*/
nGameEvent*
nTriggerServer::CreateEvent()
{
nGameEvent* event = n_new( nGameEvent );
event->SetId( this->nextEventId++ );
this->gameEvents.Add( event->GetId(), event );
return event;
}
//-----------------------------------------------------------------------------
/**
Create a new event with user parameters
*/
nGameEvent*
nTriggerServer::CreateEvent( const nGameEvent& eventDesc )
{
nGameEvent* event = n_new( nGameEvent )( eventDesc );
event->SetId( this->nextEventId++ );
this->gameEvents.Add( event->GetId(), event );
return event;
}
//-----------------------------------------------------------------------------
/**
Destroy an event, removing it from its emitter
*/
void
nTriggerServer::DestroyEvent( nGameEvent::Id eventId, bool removeFromEmitter )
{
nGameEvent* event( this->GetEvent(eventId) );
if ( event )
{
this->gameEvents.Rem( event->GetId() );
if ( removeFromEmitter )
{
if ( event->GetEmitterEntity() != nEntityObjectServer::IDINVALID )
{
nEntityObject* entity = nEntityObjectServer::Instance()->GetEntityObject( event->GetEmitterEntity() );
if ( entity )
{
entity->GetComponentSafe<ncAreaEvent>()->RemoveEvent( eventId );
}
}
}
n_delete( event );
}
}
//-----------------------------------------------------------------------------
/**
Emit a broadcast event (an event that reaches all triggers)
*/
nGameEvent::Id
nTriggerServer::PostBroadcastEvent( nGameEvent::Type type, nEntityObjectId sourceId )
{
nGameEvent* event = this->CreateEvent();
event->SetType( type );
event->SetSourceEntity( sourceId );
this->instantBroadcastEvents.Append( event->GetId() );
NLOG( trigger, (nTriggerServer::GeneralLog | 0,
"Registered broadcast event( id=%d, type=%s, source=%d )",
event->GetId(), event->GetPersistentType(), event->GetSourceEntity()) );
return event->GetId();
}
//-----------------------------------------------------------------------------
/**
Emit an area event (an event that reaches only to near triggers)
*/
nGameEvent::Id
nTriggerServer::PostAreaEvent( const nGameEvent& eventDesc )
{
nGameEvent* event = this->CreateEvent( eventDesc );
this->RegisterAreaEvent( event->GetId() );
return event->GetId();
}
//-----------------------------------------------------------------------------
/**
Add an area event (only locally, doesn't add it to the emitter)
*/
nGameEvent::Id
nTriggerServer::PostAreaEventUnsafe( const nGameEvent& eventDesc )
{
nGameEvent* event = this->CreateEvent( eventDesc );
this->RegisterAreaEvent( event->GetId(), false );
return event->GetId();
}
//-----------------------------------------------------------------------------
/**
Register an area event (version meant to be used from script side)
*/
nGameEvent::Id
nTriggerServer::PostAreaEvent( const char* eventType, nEntityObject* source, nEntityObject* emitter, nGameEvent::Time duration, int priority )
{
nGameEvent event;
event.SetType( eventType );
if ( source )
{
event.SetSourceEntity( source->GetId() );
}
if ( emitter )
{
event.SetEmitterEntity( emitter->GetId() );
}
event.SetDuration( duration );
event.SetPriority( priority );
return this->PostAreaEvent( event );
}
//-----------------------------------------------------------------------------
/**
Register an area event (an event that reaches only to near triggers)
*/
void
nTriggerServer::RegisterAreaEvent( nGameEvent::Id eventId, bool addToEmitter )
{
nGameEvent* event( this->GetEvent(eventId) );
n_assert( event );
// Add the event in its emitter entity
if ( addToEmitter )
{
nEntityObject* emitter = nEntityObjectServer::Instance()->GetEntityObject( event->GetEmitterEntity() );
if ( !emitter )
{
// If the emitter no longer exists, discard the event
return;
}
emitter->GetComponentSafe<ncAreaEvent>()->AddEvent( eventId );
}
// Add the event in the correct events group
if ( event->Expires() )
{
this->expirableAreaEvents.Append( eventId );
}
else
{
this->permanentAreaEvents.Append( eventId );
}
// Start the event's life
event->StartEvent( this->currentTime );
#ifndef NGAME
nString str;
event->ToString( str );
NLOG( trigger, (nTriggerServer::GeneralLog | 0,
"Registered area event( %s )", str.Get()) );
#endif
}
//-----------------------------------------------------------------------------
/**
Delete an event, removing it from its emitter
*/
void
nTriggerServer::DeleteEvent( nGameEvent::Id eventId )
{
this->RemoveEventFromEventsGroups( eventId );
this->DestroyEvent( eventId );
}
//-----------------------------------------------------------------------------
/**
Delete an event, not removing it from its emitter
*/
void
nTriggerServer::DeleteEventUnsafe( nGameEvent::Id eventId )
{
this->RemoveEventFromEventsGroups( eventId );
this->DestroyEvent( eventId, false );
}
//-----------------------------------------------------------------------------
/**
Remove and event from the events groups
*/
void
nTriggerServer::RemoveEventFromEventsGroups( nGameEvent::Id eventId )
{
if ( !this->DeleteInstantBroadcastEvent(eventId) )
{
if ( !this->DeleteExpirableAreaEvent(eventId) )
{
this->DeletePermanentAreaEvent(eventId);
}
}
}
//-----------------------------------------------------------------------------
/**
Destroy an event if found among the instant broadcast events
*/
bool
nTriggerServer::DeleteInstantBroadcastEvent( nGameEvent::Id eventId )
{
int index( this->instantBroadcastEvents.FindIndex(eventId) );
if ( index == -1 )
{
return false;
}
this->instantBroadcastEvents.Erase( index );
NLOG( trigger, (nTriggerServer::GeneralLog | 0, "Erased broadcast event %d", eventId) );
return true;
}
//-----------------------------------------------------------------------------
/**
Destroy an event if found among the expirable area events
*/
bool
nTriggerServer::DeleteExpirableAreaEvent( nGameEvent::Id eventId )
{
int index( this->expirableAreaEvents.FindIndex(eventId) );
if ( index == -1 )
{
return false;
}
this->expirableAreaEvents.Erase( index );
NLOG( trigger, (nTriggerServer::GeneralLog | 0, "Erased area event %d", eventId) );
return true;
}
//-----------------------------------------------------------------------------
/**
Destroy an event if found among the permanent area events
*/
bool
nTriggerServer::DeletePermanentAreaEvent( nGameEvent::Id eventId )
{
int index( this->permanentAreaEvents.FindIndex(eventId) );
if ( index == -1 )
{
return false;
}
this->permanentAreaEvents.Erase( index );
NLOG( trigger, (nTriggerServer::GeneralLog | 0, "Erased area event %d", eventId) );
return true;
}
//-----------------------------------------------------------------------------
/**
Main loop
*/
void
nTriggerServer::Update( const nGameEvent::Time& currentTime )
{
#ifdef __NEBULA_STATS__
this->profUpdate.StartAccum();
#endif
this->currentTime = currentTime;
this->ExecuteTriggerOutputs();
this->ExpireEvents();
this->ProcessBroadcastEvents();
this->ProcessAreaEvents();
#ifdef __NEBULA_STATS__
this->profUpdate.StopAccum();
#endif
}
//-----------------------------------------------------------------------------
/**
Delete expired events
*/
void
nTriggerServer::ExpireEvents()
{
// Delete expired area events
for ( int i( this->expirableAreaEvents.Size() - 1 ); i >= 0; --i )
{
nGameEvent* event = this->GetEvent( this->expirableAreaEvents[i] );
n_assert( event );
if ( event->Expires() )
{
if ( event->GetExpirationTime() < this->currentTime )
{
// Keep values for probable later emitter destroying
bool destroyEmitter( event->GetProperties() & nGameEvent::AUTODESTROY_EMITTER );
nEntityObjectId emitterId( event->GetEmitterEntity() );
// It's safe to erase the event since we are iterating backwards
// and the indexes for the next events are untouched
NLOG( trigger, (nTriggerServer::GeneralLog | 0,
"Erased area event %d by expiration", event->GetId()) );
this->DestroyEvent( event->GetId() );
this->expirableAreaEvents.Erase(i);
// Destroy the emitter too if it was an autodestruction event
// Destruction is done after event deleting to avoid trying to delete
// the event twice (one started by the emitter destructor)
if ( destroyEmitter )
{
nWorldInterface::Instance()->DeleteEntityById( emitterId );
}
}
}
}
}
//-----------------------------------------------------------------------------
/**
Allow triggers to handle the broadcast events
*/
void
nTriggerServer::ProcessBroadcastEvents()
{
// Send instant broadcast events to all triggers that may handle them, deleting the events afterwards
// @todo Test
// @todo Do it using the signal system or a similar way that avoids all this iterating
for ( int i(0); i < this->instantBroadcastEvents.Size(); ++i )
{
nGameEvent* event = this->GetEvent( this->instantBroadcastEvents[i] );
n_assert( event );
// Make non area triggers handle the event
for ( int i(0); i < this->broadcastTriggers.Size(); ++i )
{
nEntityObject* entity( nEntityObjectServer::Instance()->GetEntityObject( this->broadcastTriggers[i] ) );
if ( entity )
{
ncTrigger* trigger( entity->GetComponentSafe<ncTrigger>() );
if ( trigger->GetTriggerEnabled() )
{
if ( trigger->GetEventFlags().IsFlagEnabled( event->GetType() ) )
{
if ( trigger->HandleEvent( event ) )
{
NLOG( trigger, (nTriggerServer::GeneralLog | 0,
"Trigger %d has handled the event %d",
trigger->GetEntityObject()->GetId(), event->GetId()) );
}
}
}
}
}
// Make area triggers handle the event
/* for ( int i(0); i < this->areaTriggers.Size(); ++i )
{
ncTrigger* trigger = this->areaTriggers[i];
if ( trigger->GetTriggerEnabled() )
{
if ( trigger->GetEventFlags().IsFlagEnabled( event->eventType ) )
{
if ( trigger->HandleEvent( event ) )
{
NLOG( trigger, (0, "Trigger %d has handled the event %d", trigger->GetEntityObject()->GetId(), event->eventId) );
}
}
}
}*/
this->DestroyEvent( event->GetId() );
}
this->instantBroadcastEvents.Clear();
}
//-----------------------------------------------------------------------------
/**
Allow triggers to handle the area events
*/
void
nTriggerServer::ProcessAreaEvents()
{
// Iterate triggers to allow them to handle the area events
for ( int i(0); i < this->areaTriggers.Size(); ++i )
{
nEntityObject* entity( nEntityObjectServer::Instance()->GetEntityObject( this->areaTriggers[i] ) );
if ( !entity )
{
continue;
}
ncTrigger* trigger( entity->GetComponentSafe<ncTrigger>() ); ;
// Skip disabled triggers
if ( !trigger->GetTriggerEnabled() )
{
continue;
}
#ifndef NGAME
if ( !this->updatingSoundSources )
{
#endif
// Skip the trigger if it's not its turn
nGameEvent::Time updateTime = (trigger->GetNextUpdateTime() + 1) % this->updateTimeInterval;
trigger->SetNextUpdateTime( updateTime );
if ( updateTime != 0 )
{
continue;
}
#ifndef NGAME
}
else if ( !trigger->GetEntityObject()->GetComponent<ncSound>() )
{
continue;
}
#endif
#ifdef __NEBULA_STATS__
this->profGatherAreaEvents.StartAccum();
#endif
// Get near perceivable entities
nArray<nEntityObject*> entities;
nGameEvent::Time cellsUpdateTime = trigger->GetPerceivableCellsUpdateTime() + this->updateTimeInterval;
bool updateCells = cellsUpdateTime >= this->cellsUpdateTimeInterval;
if ( updateCells )
{
cellsUpdateTime -= this->cellsUpdateTimeInterval;
}
trigger->SetPerceivableCellsUpdateTime( cellsUpdateTime );
this->GetNearEmitters( trigger, updateCells, entities );
#ifndef NGAME
// Viewports' cameras are needed in the editor for testing simulated 'player' events,
// but they aren't in the spatial server, so check for nearness manually
if ( this->updatingSoundSources )
{
ncTransform* transform = trigger->GetComponentSafe<ncTransform>();
sphere cullingSphere( transform->GetPosition(), trigger->GetCullingRadius() );
const nArray<ncSpatialCamera*>& cameras( nSpatialServer::Instance()->GetCamerasArray() );
for ( int c(0); c < cameras.Size(); ++c )
{
nEntityObject* camera( cameras[c]->GetEntityObject() );
if ( camera->IsA("necamera") )
{
if ( cullingSphere.contains( camera->GetComponentSafe<ncTransform>()->GetPosition() ) )
{
entities.Append( camera );
}
}
}
}
#endif
// Get event from entities and sort them by priority
// @todo Make it more efficient
const int NUM_PRIORITIES = 10;
nArray<nGameEvent*> sortedEvents[NUM_PRIORITIES];
for ( int i(0); i < entities.Size(); ++i )
{
ncAreaEvent* areaEvents = entities[i]->GetComponent<ncAreaEvent>();
if ( areaEvents )
{
for ( ncAreaEvent::Iterator eventsIt( areaEvents->GetEventsIterator() ); !eventsIt.IsEnd(); eventsIt.Next() )
{
nGameEvent* event = this->GetEvent( eventsIt.Get() );
n_assert( event->GetPriority() >= 0 && event->GetPriority() < NUM_PRIORITIES );
sortedEvents[ event->GetPriority() ].Append( event );
}
}
}
#ifdef __NEBULA_STATS__
this->profGatherAreaEvents.StopAccum();
this->profHandleAreaEvents.StartAccum();
#endif
// Go iterating all the events until the trigger handles one
// Events with greater priority are checked first
for ( int i(0); i < NUM_PRIORITIES; ++i )
{
nArray<nGameEvent*> events = sortedEvents[i];
for ( int j(0); j < events.Size(); ++j )
{
nGameEvent* event = events[j];
// Cull by event type
if ( trigger->GetEventFlags().IsFlagEnabled( event->GetType() ) )
{
if ( trigger->HandleEvent( event ) )
{
// A trigger can only answer to one area event at most, each cycle
NLOG( trigger, (nTriggerServer::GeneralLog | 0,
"Trigger %d has handled the event %d",
trigger->GetEntityObject()->GetId(), event->GetId()) );
break;
}
}
}
}
#ifdef __NEBULA_STATS__
this->profHandleAreaEvents.StopAccum();
#endif
}
}
//-----------------------------------------------------------------------------
/**
Get those event emitters within the trigger's culling radius
*/
void
nTriggerServer::GetNearEmitters( ncTrigger* trigger, bool updateCells, nArray<nEntityObject*>& emitters )
{
// Build proximity sphere
ncTransform* transform = trigger->GetComponentSafe<ncTransform>();
sphere cullingSphere( transform->GetPosition(), trigger->GetCullingRadius() );
// Get near event emitters
nArray<int> categories;
categories.Append( nSpatialTypes::CAT_AGENTS );
categories.Append( nSpatialTypes::CAT_AREA_EVENTS );
categories.Append( nSpatialTypes::CAT_VEHICLES );
nArray<ncSpatialCell*>& cells = trigger->GetPerceivableCells();
if ( updateCells )
{
// Get spatial cells too to speed up future queries
cells.Clear();
nSpatialServer::Instance()->GetEntitiesCellsCategories(
cullingSphere, categories, nSpatialTypes::SPF_OUTDOORS |
nSpatialTypes::SPF_CONTAINING | nSpatialTypes::SPF_USE_POSITION,
emitters, cells );
nSpatialServer::Instance()->GetEntitiesCellsCategories(
cullingSphere, categories, nSpatialTypes::SPF_ALL_INDOORS |
nSpatialTypes::SPF_CONTAINING | nSpatialTypes::SPF_USE_POSITION,
emitters, cells );
}
else if ( !cells.Empty() )
{
// Search only in spatial cells found on previous queries
nSpatialServer::Instance()->GetEntitiesUsingCellsCategories(
cullingSphere, categories, nSpatialTypes::SPF_OUTDOORS |
nSpatialTypes::SPF_CONTAINING | nSpatialTypes::SPF_USE_POSITION,
emitters, cells );
nSpatialServer::Instance()->GetEntitiesUsingCellsCategories(
cullingSphere, categories, nSpatialTypes::SPF_ALL_INDOORS |
nSpatialTypes::SPF_CONTAINING | nSpatialTypes::SPF_USE_POSITION,
emitters, cells );
}
}
//-----------------------------------------------------------------------------
/**
Create a dummy area event entity and make it emit an event
*/
nEntityObject*
nTriggerServer::PlaceAreaEvent( const vector3& position, const nGameEvent& eventDesc )
{
// Create a simple area event entity
nEntityObject* eventEntity = nWorldInterface::Instance()->NewLocalEntity( "neareaevent", position, false, NULL );
n_assert( eventEntity );
if( eventEntity )
{
// Start emitting the event
nGameEvent event( eventDesc );
event.SetEmitterEntity( eventEntity->GetId() );
this->PostAreaEvent( event );
}
return eventEntity;
}
//-----------------------------------------------------------------------------
/**
Create a dummy area event entity and make it emit an event
Version meant to be used from script side
*/
nEntityObject*
nTriggerServer::PlaceAreaEvent( const vector3& position, const char* eventType, nEntityObject* source, nGameEvent::Time duration, int priority )
{
nGameEvent event;
event.SetType( eventType );
if ( source )
{
event.SetSourceEntity( source->GetId() );
}
event.SetDuration( duration );
event.SetPriority( priority );
return this->PlaceAreaEvent( position, event );
}
//-----------------------------------------------------------------------------
/**
Queue an order to execute a trigger output after some delay time
*/
void
nTriggerServer::QueueOutputExecution( nEntityObject* trigger, nGameEvent::Type triggerEvent, nGameEvent* eventSource, const nTime& executionDelay )
{
n_assert( trigger );
OutputExecutionDesc desc;
desc.triggerId = trigger->GetId();
desc.triggerEvent = triggerEvent;
desc.sourceEventCopy = n_new( nGameEvent )( *eventSource );
desc.executionTime = nTimeServer::Instance()->GetFrameTime() + executionDelay;
this->pendingOutputExecutions.Append( desc );
}
//-----------------------------------------------------------------------------
/**
Execute those pending trigger outputs whose execution time has been reached
*/
void
nTriggerServer::ExecuteTriggerOutputs()
{
while ( !this->pendingOutputExecutions.Empty() )
{
OutputExecutionDesc& desc( this->pendingOutputExecutions.Front() );
if ( desc.executionTime > nTimeServer::Instance()->GetFrameTime() )
{
// Still haven't reached the output execution time
break;
}
// Execute output
nEntityObject* trigger = nEntityObjectServer::Instance()->GetEntityObject( desc.triggerId );
if ( trigger )
{
trigger->GetComponentSafe<ncTriggerOutput>()->Execute( desc.triggerEvent, desc.sourceEventCopy, true );
}
// Remove execution order
desc.Destroy();
this->pendingOutputExecutions.Erase(0);
}
}
#ifndef NGAME
//-----------------------------------------------------------------------------
/**
Update only sound sources
*/
void
nTriggerServer::UpdateSoundSources()
{
this->updatingSoundSources = true;
this->ProcessAreaEvents();
this->updatingSoundSources = false;
}
//-----------------------------------------------------------------------------
/**
Get the type of an event by index
*/
int
nTriggerServer::GetEventType( nGameEvent::Id eventId ) const
{
const nGameEvent* event = this->GetEvent( eventId );
if ( !event )
{
return nGameEvent::INVALID_TYPE;
}
return event->GetType();
}
//-----------------------------------------------------------------------------
/**
Get the source entity id of an event
*/
nEntityObjectId
nTriggerServer::GetEventSource( nGameEvent::Id eventId ) const
{
const nGameEvent* event = this->GetEvent( eventId );
if ( !event )
{
return nEntityObjectServer::IDINVALID;
}
return event->GetSourceEntity();
}
//-----------------------------------------------------------------------------
/**
Get the duration of an event by index
*/
nGameEvent::Time
nTriggerServer::GetEventDuration( nGameEvent::Id eventId ) const
{
const nGameEvent* event = this->GetEvent( eventId );
if ( !event )
{
return 0;
}
return event->GetDuration();
}
//-----------------------------------------------------------------------------
/**
Get the priority of an event by index
*/
int
nTriggerServer::GetEventPriority( nGameEvent::Id eventId ) const
{
const nGameEvent* event = this->GetEvent( eventId );
if ( !event )
{
return 0;
}
return event->GetPriority();
}
#endif
|
04692721e66d0f9714194c9b7ccc6a3d69f39809
|
d192a6df01f81d576a32bdc5d00fc0c22a08686e
|
/src/qt/qrcodedialog.h
|
4b54cc5e07437cbf0ea5cc3326177313f5c802f4
|
[
"MIT"
] |
permissive
|
soom-4th-blockchain/soom-core
|
e477892419337c20727bae1724e580d7e74fc53f
|
7018e66445b9c156efb2c46dc4ea360cc61b1c0e
|
refs/heads/master
| 2020-03-25T04:37:24.648970
| 2019-01-10T05:17:12
| 2019-01-10T05:17:12
| 143,404,975
| 0
| 3
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 731
|
h
|
qrcodedialog.h
|
#ifndef QRCODEDIALOG_H
#define QRCODEDIALOG_H
#include "walletmodel.h"
#include <QDialog>
#include <QImage>
namespace Ui {
class QRCodeDialog;
}
class OptionsModel;
class QRCodeDialog : public QDialog
{
Q_OBJECT
public:
explicit QRCodeDialog(const QString &addr, const QString &label, bool enableReq, QWidget *parent = 0);
~QRCodeDialog();
void setModel(OptionsModel *model);
void setInfo(const SendCoinsRecipient &info);
private Q_SLOTS:
void on_btnSaveAs_clicked();
void on_btnCopyAddress_clicked();
private:
Ui::QRCodeDialog *ui;
OptionsModel *model;
SendCoinsRecipient info;
QString address;
QImage myImage;
void generatesQRCodes();
};
#endif // QRCODEDIALOG_H
|
362694a67e4787cb6f3b9ba2c1ca34be48b9bac9
|
519ccfe2cf75d16b9ee6231f8a13f63a3ce91d62
|
/src/fonts/stb_font_arial_38_latin_ext.inl
|
4b5b3bb78f377480f0fc93b03c6c45ad8690a047
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
stetre/moonfonts
|
9dd6fd126524ead9105216e93b22a9b73de82dc2
|
5c8010c02ea62edcf42902e09478b0cd14af56ea
|
refs/heads/master
| 2022-02-07T20:47:37.150667
| 2022-02-06T12:29:27
| 2022-02-06T12:29:27
| 96,556,816
| 5
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 170,860
|
inl
|
stb_font_arial_38_latin_ext.inl
|
// Font generated by stb_font_inl_generator.c (4/1 bpp)
//
// Following instructions show how to use the only included font, whatever it is, in
// a generic way so you can replace it with any other font by changing the include.
// To use multiple fonts, replace STB_SOMEFONT_* below with STB_FONT_arial_38_latin_ext_*,
// and separately install each font. Note that the CREATE function call has a
// totally different name; it's just 'stb_font_arial_38_latin_ext'.
//
/* // Example usage:
static stb_fontchar fontdata[STB_SOMEFONT_NUM_CHARS];
static void init(void)
{
// optionally replace both STB_SOMEFONT_BITMAP_HEIGHT with STB_SOMEFONT_BITMAP_HEIGHT_POW2
static unsigned char fontpixels[STB_SOMEFONT_BITMAP_HEIGHT][STB_SOMEFONT_BITMAP_WIDTH];
STB_SOMEFONT_CREATE(fontdata, fontpixels, STB_SOMEFONT_BITMAP_HEIGHT);
... create texture ...
// for best results rendering 1:1 pixels texels, use nearest-neighbor sampling
// if allowed to scale up, use bilerp
}
// This function positions characters on integer coordinates, and assumes 1:1 texels to pixels
// Appropriate if nearest-neighbor sampling is used
static void draw_string_integer(int x, int y, char *str) // draw with top-left point x,y
{
... use texture ...
... turn on alpha blending and gamma-correct alpha blending ...
glBegin(GL_QUADS);
while (*str) {
int char_codepoint = *str++;
stb_fontchar *cd = &fontdata[char_codepoint - STB_SOMEFONT_FIRST_CHAR];
glTexCoord2f(cd->s0, cd->t0); glVertex2i(x + cd->x0, y + cd->y0);
glTexCoord2f(cd->s1, cd->t0); glVertex2i(x + cd->x1, y + cd->y0);
glTexCoord2f(cd->s1, cd->t1); glVertex2i(x + cd->x1, y + cd->y1);
glTexCoord2f(cd->s0, cd->t1); glVertex2i(x + cd->x0, y + cd->y1);
// if bilerping, in D3D9 you'll need a half-pixel offset here for 1:1 to behave correct
x += cd->advance_int;
}
glEnd();
}
// This function positions characters on float coordinates, and doesn't require 1:1 texels to pixels
// Appropriate if bilinear filtering is used
static void draw_string_float(float x, float y, char *str) // draw with top-left point x,y
{
... use texture ...
... turn on alpha blending and gamma-correct alpha blending ...
glBegin(GL_QUADS);
while (*str) {
int char_codepoint = *str++;
stb_fontchar *cd = &fontdata[char_codepoint - STB_SOMEFONT_FIRST_CHAR];
glTexCoord2f(cd->s0f, cd->t0f); glVertex2f(x + cd->x0f, y + cd->y0f);
glTexCoord2f(cd->s1f, cd->t0f); glVertex2f(x + cd->x1f, y + cd->y0f);
glTexCoord2f(cd->s1f, cd->t1f); glVertex2f(x + cd->x1f, y + cd->y1f);
glTexCoord2f(cd->s0f, cd->t1f); glVertex2f(x + cd->x0f, y + cd->y1f);
// if bilerping, in D3D9 you'll need a half-pixel offset here for 1:1 to behave correct
x += cd->advance;
}
glEnd();
}
*/
#ifndef STB_FONTCHAR__TYPEDEF
#define STB_FONTCHAR__TYPEDEF
typedef struct
{
// coordinates if using integer positioning
float s0,t0,s1,t1;
signed short x0,y0,x1,y1;
int advance_int;
// coordinates if using floating positioning
float s0f,t0f,s1f,t1f;
float x0f,y0f,x1f,y1f;
float advance;
} stb_fontchar;
#endif
#define STB_FONT_arial_38_latin_ext_BITMAP_WIDTH 512
#define STB_FONT_arial_38_latin_ext_BITMAP_HEIGHT 358
#define STB_FONT_arial_38_latin_ext_BITMAP_HEIGHT_POW2 512
#define STB_FONT_arial_38_latin_ext_FIRST_CHAR 32
#define STB_FONT_arial_38_latin_ext_NUM_CHARS 560
#define STB_FONT_arial_38_latin_ext_LINE_SPACING 25
static unsigned int stb__arial_38_latin_ext_pixels[]={
0x20000000,0x88009998,0xaaaaaaaa,0xaaaaaaaa,0x6d3b62aa,0x3ffa004e,
0x32e2000e,0x2aa9803e,0x03555000,0xaaaaaa88,0xaaaaaaaa,0x3a600aaa,
0x9800e205,0x000acddb,0x54006aaa,0x005d90aa,0xdcaa8800,0x8001acce,
0x88002aa8,0x2aa002aa,0x1555002a,0x54c05554,0x222aa80a,0xa9801cce,
0xca80000a,0x35101acd,0x2a602a60,0x332e001a,0x003ccccc,0x40009997,
0x554c2aa9,0x31cc8001,0x26000079,0x2a200ccc,0x000aaaaa,0x000007a2,
0x2600dffd,0xffffffff,0xffffffff,0x2bfd0fff,0xff3005fe,0x7fcc003f,
0x7fcc04ff,0x7d4003ff,0x3e601fff,0xffffffff,0xffffffff,0x540bfa01,
0xffd8805f,0x803fffff,0x800ffffc,0x1ff31ffd,0xffd50000,0xffffffff,
0x3ea0017d,0xffa8006f,0x5fff3006,0xd83ffe00,0x1ffd82ff,0xff30ffe8,
0xffd807ff,0x7fec0001,0xff306fff,0xd80ff881,0x3fa003ff,0x05ffffff,
0x005fff30,0x447ffe20,0xa8001fff,0x001ff9ff,0x01ffe880,0x7fffffd4,
0x05ff3001,0x7ffcc000,0xffff3000,0xffffffff,0x1fffffff,0x02ff57fa,
0x4002ffd8,0x203ffffe,0x2ffdffe8,0xfddff300,0x3ffe601f,0xffffffff,
0x01ffffff,0x3fe60df7,0xffffe805,0x203ffffe,0x06ffdffa,0x3f21ffd8,
0x3fee0004,0xecdeffff,0x03fffffe,0x8006ffa8,0xfb006ffa,0x7ffc009f,
0x360bff60,0x0ffe81ff,0x01ffffd1,0x0000ffec,0x9ffffff7,0x5456ff40,
0x7ffb06fe,0x55555400,0x2a001aaa,0x260006ff,0x05ffb6ff,0x17ffdc00,
0x0dfd8000,0xfffffa80,0x05f7001f,0x2ffd8000,0x33332200,0xcfffdccc,
0x24cccccc,0x00bfd5fe,0x98009ff3,0xfd801eff,0x00ffe8bf,0x7ccfff44,
0x9fff306f,0x99999999,0x10199999,0x3fe603ff,0x0f7fe405,0x101fff91,
0xbff51fff,0x221ffd80,0xfd8002ff,0x5400beff,0x200dfffd,0xa8006ffa,
0xff9806ff,0x07ffc005,0xffb05ffb,0x881ffd03,0x3f603ffc,0x3fa0001f,
0x201988cf,0xfffffff9,0x007ffb00,0x026204c4,0x005ff700,0x7ff7fdc0,
0x51310004,0x00013135,0x26255131,0x3a666200,0x7fb001ff,0x3e600003,
0x4400003f,0x3fa007ff,0x9500bfd5,0x5ff70009,0x54dff700,0x3f600eff,
0x217ff24f,0x00006ff9,0xff302fec,0x01ffe80b,0xffd07fff,0x101ffec5,
0x00df9033,0x00f7ff44,0x07fff440,0x8006ffa8,0xfd806ffa,0x0000000e,
0x22033100,0x000005ff,0x0007ffc4,0x201676d4,0x3a003ffd,0x002fdc2f,
0x200037ec,0x0005fffd,0x0bf70bfa,0xfb85fd00,0x07ff6005,0x001fffc0,
0x0005d980,0x007ff880,0x02ff57fa,0x3fee0000,0x40999801,0x26600999,
0xf9819981,0x2600006f,0x3fe602ff,0x703ffc05,0x19988bff,0x8000ccc4,
0xe8802ff8,0xb80004ff,0xdff505ff,0x0dff5000,0x00001330,0xe8000000,
0x4000006f,0x00005ffa,0x007ffb00,0x17ee17f4,0x88000000,0x20000aaa,
0x02fdc2fe,0x3ee17f40,0x07ff6005,0x001fffc0,0x07777cc0,0xfff10000,
0xfeaff400,0x20001005,0x00000ffc,0x7cc00000,0x3600006f,0xffb9307f,
0xffd0799d,0x00066203,0x37f40000,0x001ffe40,0x509ff900,0xf5000dff,
0x000000df,0x40000000,0x000006fe,0x0001ffdc,0x83ffd800,0x02622aa8,
0x0aaa2131,0x2aa85551,0x8002aa88,0x55512aa8,0x426204c4,0x55512aa8,
0x426204c4,0xffb02aa8,0x07332003,0x4c932000,0x3fe20000,0x757fa007,
0x6ff5405f,0x07fe4001,0x9801e64c,0xfb5102cc,0x9966459d,0x100006ff,
0x3fea09ff,0xb85fffff,0x40001eff,0x97000ccb,0x03ff7019,0x93027fcc,
0x665437dd,0xf503ff60,0xff5000df,0x400f326d,0x79932cc9,0x5cb32600,
0x0ccb80cc,0x65c0ffd0,0x3332000c,0x02ccdffe,0x2cefda88,0x3ffd8b32,
0x8006ffa8,0x7fd46ffa,0x2a1ffe25,0xfa8006ff,0x00dff56f,0x3eadff50,
0xffa8006f,0x003ffb06,0x8ba00000,0x2200006a,0x3fa007ff,0x7c40bfd5,
0x64005c8a,0x1fff00ff,0x903ffb00,0x9fffffff,0x3fe69ff1,0xff900006,
0x3ff72605,0xffb03cce,0x7ec0005f,0x3ffb001f,0x740bff30,0xfffd506f,
0x3ffa3fff,0xf50ffe20,0xff5000df,0x4007ffcd,0x3ffe1ffd,0xb1ffd800,
0x1ffd03ff,0xfd81ffa0,0xfff3001f,0x09ffffff,0xffffffc8,0x364ff8cf,
0x6ffa83ff,0x46ffa800,0x3fe25ffa,0x006ffa87,0xff56ffa8,0xdff5000d,
0x2001bfea,0xffb06ffa,0xefdc9803,0x800b322c,0x0000f65c,0x2007ff88,
0x40bfd5fe,0x90007c5b,0x3ff201ff,0x437fc403,0xdcbdfffb,0xf34ffeff,
0x3a0000df,0x5ff9807f,0xdffff880,0x1ffd8000,0x203ffb00,0x3ff707fe,
0xb9dfff50,0x0dff5fff,0x6ffa8dfb,0x26ffa800,0x7c403ffc,0x01ffe46f,
0xffd9bfe2,0xb00ffe81,0x0ffec0ff,0xffccc980,0x2e01cccf,0xfdcbdfff,
0x3f64ffef,0x06ffa83f,0x546ffa80,0x1ffe25ff,0x2001bfea,0xdff56ffa,
0x2dff5000,0xa8006ffa,0x3ffb06ff,0x7ffffe40,0x04ff8cff,0x03fffe20,
0x7ff88000,0x7f57fa00,0x0f89aa05,0x403ff600,0x7d406ff9,0x17ffcc3f,
0x9a7fffd4,0xf00006ff,0xbff300bf,0xfffffa80,0x7ec003ff,0x3ffb001f,
0x3a03ff20,0x3fff985f,0x2ffffe44,0xff507fd4,0xdff5000d,0x2a037fcc,
0x37fcc3ff,0xfd8ffea0,0x00ffe81f,0x7fec0ffb,0x6ff98001,0x05fff300,
0x6c9ffff5,0x6ffa83ff,0x06ffa800,0x0dff5000,0x2adff500,0xfa8006ff,
0x00dff56f,0x360dff50,0xfffb01ff,0xfdffb97b,0xfff8009f,0x2200000f,
0x3fa007ff,0xdf80bfd5,0x7ec004eb,0x00fff407,0xfff81ffb,0x53ffea02,
0xfffffff9,0xffffffff,0x013fe22f,0xfc817fe6,0xdffff54f,0x07ff6001,
0xb80ffec0,0x17fc41ff,0xfd01fff4,0x3ff107ff,0x40037fd4,0x7ff46ffa,
0x203ff601,0x3f601ffe,0x207ff60f,0xff900ffe,0x007ff601,0x4013fea0,
0x3ea02fff,0x0fff64ff,0x2001bfea,0x00006ffa,0x5000dff5,0x1bfeadff,
0x55bfea00,0xfa8006ff,0x03ffb06f,0xf503fff5,0x54009fff,0x0003ffff,
0x801ffe20,0x80bfd5fe,0x44002db8,0x7fdc05ff,0x98dff104,0xffe806ff,
0xffffff34,0xffffffff,0x27fcc5ff,0xf02ffcc0,0xfffd889f,0x1ffd803f,
0x203ffb00,0x3fdc3ffa,0x2a037fdc,0x5ff01fff,0x40037fd4,0x7fdc6ffa,
0x20dff104,0xff104ffb,0xe81ffd8d,0x5ff700ff,0x0007ff60,0x2600ffee,
0xffe806ff,0x2a0fff64,0xfa8006ff,0xf500006f,0xff5000df,0x001bfead,
0x7fd5bfea,0x6ffa8006,0xfd03ffb0,0x7ffd405f,0x3fbf6004,0x2200006f,
0x3fa007ff,0x00003555,0x2017fe40,0xff707ff8,0x803ffa85,0xfff34ffb,
0xdddddddd,0x5c3ddddd,0xff9803ff,0x203ff505,0x403ffffa,0xfb001ffd,
0x13fe603f,0x5ffb0bfb,0x80fff980,0x3fea2ff8,0x6ffa8006,0xfb83ffc4,
0x0fff102f,0xffb0bfee,0x201ffd03,0xffb06ff8,0x5ffb0003,0x007ff500,
0x7fec9ff7,0x006ffa83,0x9976ffa8,0x51cca801,0xf5000dff,0x01bfeadf,
0x7d5bfea0,0xffa8006f,0xa83ffb06,0xffe806ff,0x99ff1004,0x200005ff,
0x3a007ff8,0xdb73005f,0x54059dff,0xfb006ffd,0x81ffd05f,0xfa802ffc,
0x00dff34f,0x005ff900,0x3f20bff3,0x3ff6201f,0x07ff602f,0x880ffec0,
0x427f45ff,0xff9806ff,0x543ff306,0xfa8006ff,0x82ffd86f,0x3f600ffe,
0x40ffe82f,0xffe81ffd,0x2fbfe600,0x0007ff60,0x32003ffa,0xffa802ff,
0x2a0fff64,0xfa8006ff,0x801ffd6f,0xdff53ffb,0x2dff5000,0xa8006ffa,
0x0dff56ff,0x20dff500,0x7fdc1ffd,0x04ffb803,0xff35ff70,0x3e20000b,
0x17fa007f,0x3fffff20,0xf80dffff,0x3ea004ff,0x42ffcc4f,0xf9801ffd,
0x00dff34f,0x003ffd00,0x3ea0bff3,0x6ffd804f,0x4007ff60,0x3fe01ffd,
0x3e61ffc7,0x4ffa804f,0xff98ff70,0x5ffb8007,0x7cc4ffa8,0x27fd405f,
0x3f617fe6,0x00ffe81f,0xfb17ffcc,0xfff0003f,0x007ff600,0xffd93fe6,
0x006ffa83,0xffd6ffa8,0x53ffb801,0xf5000dff,0x01bfeadf,0x7d5bfea0,
0xffa8006f,0xd83ffb06,0xffa802ff,0x74ffd004,0x880000ff,0x3fa007ff,
0x77fff405,0x5fffecbc,0x4000fff8,0x17fe47ff,0x4c00fff4,0x0dff34ff,
0x01ffd000,0x220bff30,0x7c402fff,0x3ffb00ff,0x807ff600,0x217fc7ff,
0xfb803ffb,0x88dfb03f,0xfc8007ff,0xc8fff04f,0x7ff802ff,0x7ec17fe4,
0x00ffe81f,0x3f62ffd8,0x7fcc001f,0x03ffd006,0x7ec9ff30,0x06ffa83f,
0xfd6ffa80,0x3ffb801f,0x5000dff5,0x1bfeadff,0x55bfea00,0xfa8006ff,
0x83ffb06f,0xf9801ffe,0x5ff9804f,0x0000fff2,0xe801ffe2,0x3bfea05f,
0x83fff700,0x2001fffd,0x1ffe2ffc,0x54017fec,0x0dff34ff,0x05ffd000,
0x5c0bff30,0x3200cfff,0x3ffb01ff,0x407ff600,0x3fe27ff8,0x400ffec2,
0x9ff01ffd,0x8001fff0,0xff903ffc,0xc803ffc5,0x41ffe2ff,0xffe81ffd,
0x3bffa600,0x0007ff61,0x36009ff5,0xffa802ff,0x2a0fff64,0xfa8006ff,
0x801ffd6f,0xdff53ffb,0x2dff5000,0xa8006ffa,0x0dff56ff,0x20dff500,
0x7ff41ffd,0x04ff9801,0x3e62ffd8,0xf880007f,0x17fa007f,0x7c02ffe8,
0xffe882ff,0x2bff3001,0xff904ff9,0x29ff7007,0x80006ff9,0xf9803ffd,
0x7ffe405f,0x40dfb02f,0xfb001ffd,0x1bfea03f,0x2ffc87ff,0xd83ffcc0,
0x1fff80ff,0x817ff400,0x9ff35ff9,0x4d7fe600,0x3ffb04ff,0x7401ffd0,
0x1ffd81ff,0x01ffdc00,0xb803ffc8,0x0fff64ff,0x2001bfea,0x1ffd6ffa,
0xf53ffb80,0xff5000df,0x001bfead,0x7fd5bfea,0x6ffa8006,0xfd83ffb0,
0x4ffa802f,0x207ffc40,0x40002ffe,0x3a007ff8,0x65cbfd5f,0x03ffc805,
0x74009ff3,0x203ff97f,0xfe806ffa,0x00dff34f,0x009ff900,0xf700dff1,
0x7cc1bfff,0x07ff603f,0xb80ffec0,0x227fc5ff,0x7ec03ffa,0x03ffc85f,
0x4c009ffb,0x3fa01fff,0x4003ff97,0x03ff97fe,0x3fa07ff6,0x09ff300f,
0xb0007ff6,0x3ea003ff,0x4ffe806f,0x3ea0fff6,0xffa8006f,0xb801ffd6,
0x0dff53ff,0x2adff500,0xfa8006ff,0x00dff56f,0x360dff50,0x1ffdc1ff,
0x2027fdc0,0xffb84ffb,0x7fc40005,0x757fa007,0xff90005f,0x003ff407,
0x0dfd5ff7,0x2602ffe8,0xdff34fff,0xbff70000,0x00dff100,0x2bffffa2,
0x3600effa,0xffb001ff,0xd13ff203,0x06ff98bf,0xf513ffee,0x7ffd40df,
0x0fffb003,0x6feaffb8,0x757fdc00,0x07ff606f,0x7e403ffa,0x03ffb00f,
0x000ffe80,0xf980bffa,0x0fff64ff,0x2001bfea,0x1ffd6ffa,0xf53ffb80,
0xff5000df,0x001bfead,0x7fd5bfea,0x6ffa8006,0xfa83ffb0,0x4ffe806f,
0x440fff40,0x20000fff,0x3a007ff8,0x300bfd5f,0x7ffffb75,0x1003fec0,
0x807ffdff,0xfa82fffa,0xdff34fff,0xfff30000,0x33bffe00,0xffffb803,
0xffd803ff,0x03ffb001,0xff90bff6,0x40cffe81,0x714ffffc,0xfe803fff,
0xfb100aff,0xff8807ff,0x44003ffe,0x203ffeff,0xffe81ffd,0x6c0ffb00,
0x7fc001ff,0x7ffd4007,0x4ffffa82,0x3e60fff6,0xffb8007f,0xb801ffd5,
0x0fff33ff,0x26bff700,0xfb8007ff,0x00fff35f,0x360bff70,0x2ffe81ff,
0x813ffe60,0x3f606ff9,0x3e20004f,0x57fa007f,0xfed985fe,0xffffffff,
0x003ff203,0x00ffffd8,0xccefffd8,0x34fffffe,0xdddddfff,0xdddddddd,
0x007ffcbd,0x03ffffec,0x0efffd88,0x001ffd80,0x3fe03ffb,0x21ffcc0f,
0xeccffff8,0xfefffdef,0xfa801eff,0xdcceffff,0x005ffffe,0x001ffffb,
0x01ffffb0,0x7f40ffec,0x40ffb00f,0x26001ffd,0xfd8005ff,0xffecceff,
0x3ff64fff,0x007ff983,0xffd5ffc8,0x33ffb801,0xf9000fff,0x01ffe6bf,
0x7cd7ff20,0xffc8007f,0x503ffb05,0xff505fff,0x7fe409ff,0x01ffea03,
0x007ff880,0x22ff57fa,0xfffffffd,0x203ffcbd,0x2a000ffc,0x2e005fff,
0xcfffffff,0xfff34ffa,0xffffffff,0x4dffffff,0xf9001ffc,0x5c001fff,
0x6c00efff,0xffb001ff,0x20bff103,0xfff986fe,0xffa8dfff,0x000dffff,
0x3fffffa6,0x04ffffff,0x017ffea0,0x02fffd40,0x3fa07ff6,0x40ffd00f,
0x2a001ffd,0xf70004ff,0x59ffffff,0x1ffec9ff,0x4003ffc4,0x1ffd4ffc,
0xf13ffc80,0xff9000ff,0x001ffe29,0x7fc53ff2,0x4ffc8007,0x3603ffb0,
0xfdccefff,0x3e04ffff,0x7ffc00ff,0xfff10002,0xfeaff400,0x2f7fff65,
0x01ffdc09,0xf8003ff9,0x5cc002ff,0xff51cefd,0x3ffffe67,0xffffffff,
0x3ea6ffff,0x00c4003f,0x04fff980,0xd800ffec,0x3ffa81ff,0x7307ff50,
0xfec85bfd,0x0aaa82ce,0xffffb710,0x0003bfff,0x40005fff,0x7ec02fff,
0x00ffe81f,0x7fec0ffd,0x0ffee001,0xefdb9800,0x6c7ff51c,0x3fff03ff,
0xd3ffe800,0xffd801ff,0x0007ffe3,0x7ffc7ffd,0x1fff4001,0xe8003fff,
0x3ffb03ff,0x7ffffdc0,0x04ffbcff,0xfffffff5,0xbfffffff,0xe8000000,
0x3eabfd5f,0x7fec01ff,0x007ff203,0x0000dfd0,0x0007ff70,0xffd003fe,
0x00880000,0xfb01bfe6,0x3ff6003f,0x200ffe81,0x00002ffc,0x4009ff70,
0x0000aff9,0x200037f4,0xe80006fe,0x0ffd00ff,0x360007f4,0x000001ff,
0x0fd8ffee,0x8013ff60,0xffb1fff9,0x23ffe803,0x26004ffd,0x3ff61fff,
0x3ffe6004,0x8013ff61,0xfb01fff9,0xfdb9803f,0x07ff71ce,0x3ffffff6,
0xffffffff,0x0000001f,0xbaff57fa,0xffe804ff,0x007ff203,0x8803ffa8,
0xffc8009a,0x06f88002,0xb803ff98,0x5ffa84ff,0xd007ff40,0x3fa001ff,
0x017fcc0f,0x00017ff4,0x0017fee0,0x50000df1,0x540007ff,0xe80003ff,
0x0dfd00ff,0x7f4003fc,0x26a2000f,0x22ffc800,0x7ffdc07f,0x4fffb003,
0x3e603ffd,0x3ffee3ff,0x8fffb003,0xb003fffb,0xfffb8fff,0x0fffb003,
0x0000ffec,0x3e20ffee,0xccccccff,0x4ffecccc,0x0fffa800,0x3fabfd00,
0x9807ffb5,0x3ee04fff,0x3ff6001f,0x06ff8800,0x0007ffcc,0xfd802fcc,
0x84ffb806,0xf101fff9,0x0ffe80ff,0xd81ffd00,0xfff1006f,0xd880001b,
0x4c000eff,0xfd80006f,0x3f60000f,0xff80000f,0x441bfe07,0x7fc4006f,
0x37fc4006,0x443ffe60,0x7ff4406f,0xffb100af,0x07ffdc5f,0x11ffffc4,
0x2015fffd,0x442fffd8,0x100afffe,0xe885fffb,0xb100afff,0x7ec05fff,
0x004d441f,0x7dc0ffe4,0x3fee005f,0xfffa8007,0x3abfd000,0x40fff95f,
0x204ffff9,0xf7004ffa,0x7ffc00bf,0x0bffd103,0x003fea00,0xf700bfe2,
0x17ffa09f,0xf102ffe4,0x3fe200ff,0x000ffcc7,0x039fffd3,0xdfffc980,
0x0ff98000,0x17fee000,0x05ffb800,0x07ff8800,0x3e609ff3,0x3fee001f,
0x3fff8004,0x4cbffd10,0x7fd401ff,0xedccefff,0x7c45ffff,0xfca9beff,
0x7d43ffef,0xdcceffff,0x505ffffe,0x99dfffff,0x0bffffdb,0x3bffffea,
0xffffedcc,0x20ffec05,0x7c406ff8,0x2ffe80ff,0x0bffe200,0x01fff500,
0xaff57fa0,0x88adfff9,0x4fffffba,0x0e6fffc0,0x1ffffdd1,0x77ffdc00,
0x5fffdbac,0x37fe2000,0xdf904b9a,0x7cc0fe00,0xffcbdfff,0xffcc81ff,
0x7fde405f,0x002fec5f,0xdffffea8,0xccbaaabc,0x002effff,0x5cd77fc0,
0x3ffba205,0x3a2000ff,0x000ffffe,0x9fff9910,0x17ffedc4,0xb735dfd0,
0x7ffee6e4,0xfffb8002,0xfffdbace,0xb9aefe85,0xfffff985,0x4fffffff,
0xffffff70,0x07ff39ff,0xfffffff3,0x809fffff,0xfffffff9,0x404fffff,
0xfffffff9,0x984fffff,0x81fffeee,0x3fa03fff,0x07ff984f,0x006ffc80,
0xd003f544,0xfc97fabf,0xffffffff,0x5c06ff8c,0x7fc4ffff,0xc8002fff,
0xffffffff,0xfd80005f,0xf106ffff,0x01fa803f,0x3fffffea,0xff981fff,
0x3e601fff,0x3e21ffff,0x7dc0000f,0xffffffff,0x03ffffff,0xffff9000,
0xffff80df,0xfff8002f,0x2a0002ff,0x261fffff,0x5c06ffff,0x3e7fffff,
0x006fffff,0x3fffff20,0xf705ffff,0x220fffff,0xffffffeb,0x7f4c01cf,
0xff33efff,0x3ffae207,0x01cfffff,0xffffd710,0x20039fff,0xfffffeb8,
0xff501cff,0xf503ffff,0xfb759dff,0x3ff20bff,0xfff98004,0x006e8001,
0x22ff57fa,0xdfffffea,0x5007ff61,0xffe89fff,0x3260002d,0x01bdfffe,
0xdfd71000,0x02fd4019,0xd9100bf3,0x2019bfff,0x401efffa,0x641efffa,
0x3100004f,0xffffdb95,0x000159df,0x5efed440,0x16fff400,0x2dffe800,
0x7ffdc000,0x67ffcc1d,0xbdfda800,0x7dfffd10,0xec980001,0x401bdfff,
0x801bdfda,0x0019aa98,0x80001530,0x0019aa98,0x0cd54c40,0x2aa62000,
0xeee98019,0xff901eee,0xbfffffff,0x000fffc0,0x4004ffe8,0x262003fb,
0x26201310,0x4400001a,0x20000000,0x00000000,0x07100cc0,0x01000200,
0x00c40100,0x00880000,0x00000000,0x00000000,0x01300200,0x00040000,
0x00001000,0x00000000,0x00000000,0x00000000,0xdb300000,0x4037bfff,
0x20006ffa,0x26007ffb,0x0000004f,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00800000,0x0013ff60,
0x003fff88,0x0000000a,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x99300000,0x53000039,0xc9800155,0x01665c4c,0x000ccc98,
0xa8355500,0x440001aa,0x00031009,0x2aa05554,0x0600000a,0x05553000,
0x980d4400,0x2200000a,0x100002aa,0x2aa61555,0x55554c0a,0x00a2002a,
0x2aaa6200,0x0aaaaaaa,0x0c402620,0x2aa98000,0x372ea000,0x80000abc,
0x5511aaa8,0x0d54c015,0x0aaaa200,0x000aaaa0,0x9b995100,0x35530035,
0x02aa6000,0x0aaa9800,0x002fff40,0x004ffe80,0x3e67ffb0,0x3ea000ef,
0xf300006f,0x3bfe61ff,0x37d40000,0x80007fc4,0x3ff26ffb,0x3e200004,
0xfff10006,0x7fc40007,0x000ffc40,0x09fffd00,0x4dffb000,0xffd85ffe,
0xfb006fff,0xe98003fd,0xffffffff,0x202fffff,0x07f986fa,0xffff9800,
0x3ff26003,0xffffffff,0x3ff20002,0x80dffb0e,0x22005ffb,0x9802fffe,
0x80002fff,0xffffffda,0x3ee02eff,0xffb0005f,0x7ff40003,0x077fcc05,
0x37fd4000,0x3fff1000,0x10001ffd,0x200009fd,0x3ffd5ffb,0x33fe0000,
0x000dfb30,0xff9bffd8,0x7d400006,0xbff70004,0x5dfd0000,0x000dfb51,
0x7ff7fe40,0x3fe20002,0x01dff30f,0x0dfffffb,0x016e1d50,0xffffffd8,
0xffffffff,0x33fe202f,0x005fea89,0x7efffc40,0xfffb801f,0xffffffff,
0xf8000dff,0x1fff11ff,0x005ffb80,0x003fffd1,0x00037fd4,0x3ffffff6,
0x05ffffff,0x2000bff7,0x50001ffd,0xffb00dff,0x3fa00003,0x7cc0000f,
0x4002ffff,0x13155098,0xeffd8000,0x200002ff,0xfffffffa,0x7f440001,
0x0000ffef,0x8000fe40,0x80000eff,0xfffffff8,0xff500001,0x0007ffab,
0xffb17fdc,0x26fff603,0x224c8009,0xfffc800f,0xcccdffff,0x401ccfff,
0xfffffffb,0x7fec0000,0x200fff8a,0x9bcffffc,0xfffdb988,0x3fea000e,
0x200bff23,0xe8805ffb,0xc8001fff,0xe88002ff,0x261aefff,0xb84fffea,
0xfb0005ff,0x3fa0003f,0x17fcc00f,0x2ffa8000,0xfff70000,0x85fd0007,
0x440005fb,0x0004fffe,0xbefeb980,0xff300000,0x000003ff,0x3ee000ff,
0x4c00001f,0x00002dec,0x7cc3ffe6,0xff8000ef,0xd80ffe64,0x354001ff,
0xfff300d5,0xe87fffff,0x75c4007f,0xc80002df,0x1bfea5ff,0x0077ffdc,
0x0027ffdc,0x27fc4bfd,0x405ffb80,0x001fffe8,0x2001bf60,0xc802fffd,
0x7fdc3fff,0x3ffb0005,0x05ff5000,0x22000000,0x00000009,0x2e17f400,
0xa880005f,0x8000002a,0x31000000,0x30000013,0x262000bf,0x00000000,
0x0d54c000,0x20006aaa,0x200cc419,0xe8001ffd,0xfc802fdf,0x3fffffff,
0x00003ff4,0x09998000,0x3e204ccc,0x7cc004ff,0x833000ff,0x3ee00198,
0x3ffa205f,0x1980001f,0x0fffdc00,0xb8fff900,0xfb0005ff,0x1310003f,
0x2a155440,0xca88002a,0xf101acdc,0xa8555105,0x22aa882a,0x884c4098,
0x731002aa,0x000579b9,0x5e6e5d40,0xa880000a,0x001acdcc,0x440bee00,
0xa88002aa,0x9731002a,0x0000579b,0x55e6e5d4,0x02aa8800,0xfb2aa880,
0x0555103f,0x2aa202e6,0xffffffb2,0x87fe87ff,0x88002aa8,0xaa8002aa,
0x37fec00a,0x03ffd800,0x3372e620,0xbff7002b,0x07fffa20,0x00055510,
0xfff85551,0x7ffc4003,0x0017fee2,0x8000ffec,0xffa80aaa,0x801ffe25,
0xffffffda,0x3fa22fff,0x225ffa86,0x6ffa87ff,0x06ffa800,0x7fffff44,
0x000bffff,0xfffffc98,0x002fffff,0xfffffda8,0x4002efff,0x1ffffdb9,
0x000dff50,0xe880dff5,0xffffffff,0xc98000bf,0xffffffff,0x3fea02ff,
0x6ffa8006,0xff503ffb,0xdff5000d,0x3ffffffe,0x43ff43ff,0xa8006ffa,
0xfe8006ff,0x3ffe202f,0x7df30001,0xffffd100,0x017fffff,0x7442ffdc,
0xfa800eff,0xffa8006f,0x003ffea6,0xfb873b20,0xffb0005f,0x21e66403,
0xffa82ffe,0x401ffe25,0xfffffffc,0xeaefffff,0x5ffa80ef,0x3ea1ffe2,
0xffa8006f,0x3fffee06,0xffffffff,0x3fee001f,0xffffffff,0xb000dfff,
0xffffffff,0x100bffff,0xfffffffd,0x0dff505f,0x40dff500,0xfffffffb,
0x01ffffff,0x3ffffee0,0xffffffff,0x06ffa80d,0xfb6ffa80,0x0dff503f,
0x3adff500,0xffffffff,0x7d43ff43,0xffa8006f,0x2ffe8006,0x001ffee0,
0x3fee0010,0xffffffff,0xff701fff,0x0effe88b,0x00dff500,0x7ecdff50,
0x5c00005f,0xfb0005ff,0x3bff603f,0x5417ff40,0x1ffe25ff,0x7dfffd10,
0x3ff6a615,0xf500ffff,0x43ffc4bf,0xa8006ffa,0xffd886ff,0xd950abff,
0x9005ffff,0x1379ffff,0xdfffb731,0x7fff4401,0x3faa61ae,0x3fe204ff,
0xfffdbdff,0x037fd43f,0x4437fd40,0x0abffffd,0x5ffffd95,0x9ffff900,
0xfb731137,0xffa81dff,0x6ffa8006,0xff503ffb,0xdff5000d,0x3ffffff2,
0x43ff43ff,0xa8006ffa,0xfe8006ff,0x17ff602f,0xfb100000,0x2a157fff,
0x82ffffec,0x3fa25ffb,0x3ea000ef,0xffa8006f,0x000fffe6,0x00bff700,
0x3607ff60,0xffe80eff,0xfb000002,0xfd5009ff,0x000007ff,0x5000dff5,
0xfff90dff,0xfff98019,0x3ffee01f,0xfffb800e,0x0bfff604,0x40ffff20,
0x6fec6ffd,0x37fd47ff,0x437fd400,0x400cfffc,0x201ffff9,0x800efffb,
0x7d44fffb,0xffa8006f,0xf503ffb6,0xff5000df,0x3ffffead,0x3ff43fff,
0x40037fd4,0xe8006ffa,0x3ffe02ff,0x64000004,0x4c00cfff,0x7dc1ffff,
0x1fffd15f,0x06ffa800,0xf16ffa80,0x800005ff,0xb0005ffb,0xeffd83ff,
0x005ffd00,0x5fff7000,0x37ffe400,0x7fd40000,0x6ffa8006,0x0017ffcc,
0x220dfff3,0x4c004fff,0xffb80fff,0x3ff2001f,0x40fff987,0x545ffd7f,
0xfa8006ff,0x17ffcc6f,0x0dfff300,0x0013ffe2,0x7d41fff3,0xffa8006f,
0xf503ffb6,0xff5000df,0x7ffffecd,0x43ff43ff,0xa8006ffa,0xfe8006ff,
0x0bffe02f,0xff980000,0x3fe6002f,0x46ffdc6f,0x005ffffe,0x40037fd4,
0xfff16ffa,0xfb800003,0xffb0005f,0x0077fec3,0x00005ffd,0x4009fff0,
0x02fffffb,0x37fd4000,0x237fd400,0xa8005ffd,0xffd83fff,0x7ffb0006,
0x8007fff0,0x7dc2fff8,0xeaa7cc3f,0x01bfea3d,0xfb1bfea0,0xff5000bf,
0x0dffb07f,0xa8fff600,0xfa8006ff,0x503ffb6f,0xf5000dff,0x7fff44df,
0x3ff43fff,0x40037fd4,0xe8006ffa,0xfff102ff,0x55555003,0xd8155555,
0xfa8005ff,0x3bfee3ff,0x2fffeffe,0x01bfea00,0x7cdbfea0,0xb800007f,
0xfb0005ff,0x03bff63f,0x65c5ffd0,0x0e65400c,0x2001fff5,0x6ffcbffa,
0x2a00665c,0x0dff51cc,0x54dff500,0x90000fff,0xfff88dff,0x7df30001,
0x000fffa8,0x7ec1cec8,0x2017e41f,0xa8006ffa,0x3ffea6ff,0xdff90000,
0x001fff88,0x7d47df30,0xffa8006f,0xf503ffb6,0xff5000df,0xfffff70d,
0xfa87fe87,0xffa8006f,0x2ffe8006,0x003fff10,0xffffffff,0x7ffd45ff,
0xdff90000,0x6fffffdc,0x000fffd8,0x5000dff5,0x3ffe2dff,0x7dc00000,
0xffb0005f,0x001dffb3,0x7ff45ffd,0xb1ffdc00,0x3e6009ff,0x43fff34f,
0x7dc00ffe,0x00dff53f,0x7e4dff50,0x3e60004f,0x1ffee1ff,0x3f601000,
0xe800005f,0x007f40ff,0x2001bfea,0x3ff26ffa,0x3fe60004,0x01ffee1f,
0xdff50100,0x2dff5000,0xffa81ffd,0x6ffa8006,0xd0ffee20,0x0dff50ff,
0x00dff500,0x7c05ffd0,0xfff801ff,0x2fffffff,0x80013ff2,0xff71fff9,
0x7ffc4bff,0x0dff5006,0x7cdff500,0x400002ff,0xb0005ffb,0x0dfffdff,
0xfe8bffa0,0x1ffdc00f,0xf1005fff,0x22ffe8bf,0x7dc00ffe,0x00dff53f,
0x7ecdff50,0x7fc0003f,0x017ff63f,0x1fffc000,0x3ffc0000,0x3ea01be2,
0xffa8006f,0x000fff66,0x7ec7fff0,0xa800005f,0xfa8006ff,0x503ffb6f,
0xf5000dff,0x3ff980df,0x7fd43ff4,0x6ffa8006,0x02ffe800,0x2a00bffa,
0xfeaaaaaa,0x00fff62f,0x2e7fff00,0xffa85fff,0x6ffa804f,0x26ffa800,
0x00003ffd,0x8002ffdc,0xfffffffd,0x22ffe803,0x7dc00ffe,0x03fff13f,
0xfd86fe88,0x003ffa3f,0x3fea7ff7,0x6ffa8006,0x0000bffe,0x7ffcbffd,
0xf8800004,0x400002ff,0x1fdc6ff8,0x0037fd40,0xfff37fd4,0xffe80005,
0x0013ffe5,0x01bfea00,0x7edbfea0,0x06ffa81f,0x406ffa80,0x3ff43ff9,
0x40037fd4,0xe8006ffa,0x3ff602ff,0x7ff40004,0x000bffe2,0x3eebffd0,
0x3fff206f,0x037fd402,0xf937fd40,0x0540009f,0x40017fee,0xffadfffd,
0x17ff401f,0xfb801ffd,0x01fff33f,0x64077f44,0x03ffa4ff,0x3ea7ff70,
0xffa8006f,0x003fff16,0x3e5ffc80,0x800002ff,0x0001fff8,0x363ffc40,
0x6ffa801f,0x16ffa800,0x80003fff,0x3ffe5ffc,0xfa800002,0xffa8006f,
0xf503ffb6,0xff5000df,0x43ff980d,0x6ffa87fe,0x06ffa800,0x202ffe80,
0x40007ffa,0xfff12ffe,0xffc80003,0xe80bff75,0x3ea00fff,0xffa8006f,
0x001bfea6,0xfb877fd4,0xffb0005f,0x2037fe4b,0x3ffa2ffe,0xa9ffdc00,
0x7fec07ff,0x74dff700,0x7fdc00ff,0x000dff53,0x3fe6dff5,0xffb80007,
0x003fff16,0x55555555,0x1ffe6155,0x7ffc0000,0x86aa1fe0,0xa8006ffa,
0x0fff36ff,0x2dff7000,0xa801fff8,0xaaaaaaaa,0x00dff50a,0x3f6dff50,
0x06ffa81f,0x406ffa80,0x3ff43ff9,0x40037fd4,0xe8006ffa,0x3fe202ff,
0x3fa0003f,0x00fff32f,0x2edff700,0x7fcc05ff,0x1bfea05f,0x89bfea00,
0xd8000fff,0x17fee5ff,0x10ffec00,0x7f407fff,0x003ffa2f,0x3fea7ff7,
0x807ff207,0x3ffa5ffb,0xa9ffdc00,0xfa8006ff,0x00fff36f,0x22dff700,
0xff801fff,0xffffffff,0x001fff12,0x25ffd000,0x3ffcc4fa,0x5000dff5,
0x1ffe6dff,0x5bfee000,0xf801fff8,0xffffffff,0x00dff52f,0x3f6dff50,
0x06ffa81f,0x406ffa80,0x3ff43ff9,0x40037fd4,0xe8006ffa,0x7fe402ff,
0xffd0001f,0x001ffe65,0x7ddbfee0,0xfffb805f,0x00dff503,0xfe8dff50,
0x7fcc005f,0x017fee2f,0x2a0ffec0,0xffd01fff,0x2007ff45,0xfff33ffb,
0xb00bff20,0x07ff4bff,0x7d4ffee0,0xffa8006f,0x001fff36,0x3e5ffc80,
0xfff801ff,0x2fffffff,0x0000bffe,0x7e5bfea0,0xf527fec2,0xff5000df,
0x003ffe6d,0x7cbff900,0xfff801ff,0x2fffffff,0x5000dff5,0x07ff6dff,
0x2001bfea,0x7cc06ffa,0x543ff43f,0xfa8006ff,0xffe8006f,0x1effe802,
0x3fff2200,0x001fff32,0xf75ffc80,0x3ff600bf,0x06ffa81f,0x4c6ffa80,
0xf1004fff,0x5ffb8dff,0x03ffb000,0x3fa0dffb,0x003ffa2f,0x3fe27ff7,
0x017fdc0f,0xffd27ff4,0x33ffb801,0xf7000fff,0x07ffe2bf,0x49ffb000,
0xaa802ffe,0xffeaaaaa,0x000fff62,0x2fffe200,0x3ffe60fe,0x001ffe61,
0x7fc57fee,0x7ec0001f,0x00bffa4f,0x2aaaaaaa,0xfff32ffe,0x2bff7000,
0xff981ffd,0x5ffb8007,0x3a1ffcc0,0x07ff987f,0x005ffb80,0x9802ffe8,
0x00acffff,0x3fffff71,0x0007ffe2,0x3ee9ffb0,0xfff1005f,0x07ff981d,
0xc85ffb80,0x2a01dfff,0x7dc1fffe,0xffb0005f,0x07fff103,0x7ff45ffd,
0xf1ffdc00,0x1ffd45ff,0x3a2fff80,0x7fdc00ff,0x000fff33,0x7ff4bff9,
0x7ff40003,0x0013ff63,0x7e45ffd0,0x02a0004f,0x9b7fffc4,0x7cc3fffd,
0xffc8007f,0x000fffa5,0x7ec7ffd0,0x7f40004f,0x00fff32f,0x3f6bff90,
0x07ff981f,0x405ffc80,0x3ff43ff9,0x4003ffcc,0xe8005ffc,0xfd3002ff,
0xb99dffff,0x1bffffff,0x0003ffe8,0xffb9fff4,0x3ffea005,0x003ffcc5,
0xfd82ffe4,0xcabdffff,0xb82ffffe,0xeeeeefff,0xb4eeeeee,0x3fee03ff,
0xd17ff41f,0xffc801ff,0x7cd7ff23,0xfff5004f,0x2007ff41,0xfff13ffc,
0x49ff9000,0x20005ffc,0x3ea0fff9,0x7f40007f,0x01bfea2f,0x4077fd40,
0xffffffe8,0x7ff885ff,0x24ffc800,0x20005ffc,0x3ea0fff9,0x7f40007f,
0x00fff12f,0x3f69ff90,0x07ff881f,0x404ffc80,0x3ff43ff9,0x4003ffc4,
0x00c44ffc,0x8800bffa,0xfffffffd,0x01efffff,0x4000bff9,0xff70fff9,
0xfffd800b,0x001ffe23,0xfc813ff2,0xffffffff,0xff702eff,0xffffffff,
0x3f6bffff,0x1bff601f,0x7ff45ffd,0x11ffec00,0x0bff5fff,0x3a2fff40,
0x7fec00ff,0x0007ffe3,0x7fcc7ffd,0xffd0002f,0x03fff88b,0x88bffa00,
0xd8000fff,0x3fe205ff,0x202effff,0x74001fff,0x3ffe63ff,0xbffd0002,
0x003fff88,0xff8bffa0,0x7ff4001f,0x3e03ffb3,0x7f4001ff,0x1ffcc03f,
0x7ffc1ffa,0x1fff4001,0xfff80fff,0xfeb88001,0x2cefffff,0x017ffcc0,
0x2e5ffe80,0x744005ff,0x3ffe1fff,0x1fff4001,0x3ffff220,0x5c03ffff,
0xffffffff,0xb5ffffff,0x7fc403ff,0xd8bffa3f,0x7ff401ff,0x37fffe43,
0x83fff700,0x7f401ffd,0x013ff63f,0x6c1fff98,0xfa8006ff,0xfffc82ff,
0x5ffd0001,0x4005ffe8,0x2202fff9,0x800aa9ff,0x26004ffd,0x7fec1fff,
0xfffa8006,0x01fffc82,0x6c5ffd00,0x3e6004ff,0x03ffb1ff,0x98013ff6,
0x7cc01fff,0xd83ff43f,0x3e6004ff,0x03ffa1ff,0x000fffc4,0x00bfe620,
0x001bff60,0x000bffea,0xfd800131,0x3fe6004f,0x3fe6001f,0x3100001a,
0x02620001,0xfd8bffa0,0x3ffe603f,0x07fffc43,0x84fffa80,0x3e603ffd,
0x3ffee3ff,0x0fffb003,0x001bfff1,0xe817ffea,0x22001eff,0x7cc2fffc,
0xff1004ff,0x04fa80df,0x03fffb80,0xf10fffb0,0x2a001bff,0x3fa05fff,
0x322001ef,0x3fee2fff,0xfffb003f,0xfb80ffec,0xffb003ff,0x87ff300f,
0xfff707fe,0x1fff6007,0x3e605ffb,0xf300007f,0xff10005f,0x3ea001bf,
0xfe8005ff,0xff7001ef,0x3ff6007f,0x17fd4007,0xdffd0000,0xfffc8003,
0xb8bffa02,0xff880fff,0xfffe83ff,0x3ff6201e,0x1fff706f,0x47ffff10,
0x00afffe8,0x205fffb1,0x402ffffa,0x200ffffc,0x0acffff9,0xfffff710,
0x3bfff903,0x0ffff540,0x2000bf60,0x00afffe8,0x205fffb1,0x402ffffa,
0x200ffffc,0x0acffff9,0xfffff710,0x57fff443,0x5fffb100,0xe880ffec,
0xb100afff,0xf3005fff,0x107fe87f,0x2015fffd,0x5c2fffd8,0x7f441eff,
0x9300005f,0xa8003fff,0x6402ffff,0x8000ffff,0x1007ffdb,0x2015fffd,
0x002fffd8,0x0077fed4,0x3ffedc00,0x3ffb2a00,0x445ffd00,0xca9befff,
0x6c3ffeff,0xceffffff,0xffffdcab,0xdfff100e,0xfdff9537,0xffffa87f,
0xffedccef,0x7fd405ff,0xdcabdeff,0x800effff,0xefffffe9,0xfffffdcc,
0x3ff600df,0xecabdfff,0xf802ffff,0x3fea0007,0xedccefff,0x5405ffff,
0xabdeffff,0x0effffdc,0xffffe980,0xfffdccef,0xfa80dfff,0xdcceffff,
0x6c5ffffe,0x3fea01ff,0xedccefff,0x3005ffff,0x07fe87ff,0x3bffffea,
0xffffedcc,0x7dffff05,0x003ffffb,0x04ff8800,0xeffffa80,0xfffdcabd,
0x540000ef,0xff5003ff,0xdb99dfff,0x000bffff,0x0001ffcc,0x0007ff50,
0x3fa09ff3,0x7fffdc2f,0xff9cffff,0x3a67ff23,0xffffffff,0xfb804fff,
0xcfffffff,0xff983ff9,0xffffffff,0xfd3004ff,0xffffffff,0xd8800bff,
0xffffffff,0x001effff,0xfffffff9,0x005dffff,0x98000bf3,0xffffffff,
0x3004ffff,0xfffffffd,0x800bffff,0xffffffd8,0x1effffff,0x7ffffcc0,
0x4fffffff,0x5eeeffd8,0xffffff98,0x04ffffff,0xfd0ffe60,0xffff980f,
0xffffffff,0x3fffea04,0x001fffff,0xff951300,0x3fa60007,0xffffffff,
0x110005ff,0x003ffb51,0x7fffffcc,0x04ffffff,0x7ed44440,0x2220002f,
0x001ffd98,0x05ffb311,0x3a60bffa,0xf33effff,0x50bfea7f,0xfffffffd,
0x7f4c0019,0xff33efff,0x3ffae207,0x01cfffff,0xffffda80,0x0001cfff,
0x3ffffae2,0x8002ceff,0xffffffc8,0x3f2003ff,0xeb880003,0xcfffffff,
0xffda8001,0x01cfffff,0x3ffae200,0x02ceffff,0x3fffae20,0xb01cffff,
0x20dfffff,0xfffffeb8,0x4c001cff,0x03ff43ff,0x7ffff5c4,0x8801cfff,
0x1dfffffe,0xfff30000,0x50000dff,0xfffffffb,0x7dc00039,0x8005ffff,
0xfffffeb8,0xa8001cff,0x005fffff,0x7ffffdc0,0xffff3005,0x17ff40df,
0x5c002a60,0x04d4c403,0x0054c000,0x26aa6200,0x2a600001,0x8000009a,
0x0001aa98,0x00d54c40,0x0000c980,0x0cd54c40,0x35530000,0x31000001,
0x20000355,0x8019aa98,0x05eeeeec,0x019aa988,0x90bba600,0xa98800bd,
0x3100019a,0x30000015,0x0019dffd,0x09aa9800,0xffd70000,0x3100007d,
0x80003355,0x00beffea,0x77ff5400,0x3ffaa003,0x000000ce,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x80000000,0x80001aaa,0x0000ccc9,0x000aaaa0,
0x5510aaa2,0x33300005,0x73100001,0x400157b9,0x4c000aaa,0x551002aa,
0x55555555,0x00001335,0x0001554c,0x00015554,0x00aaa600,0x00055510,
0x20005551,0x00002aa9,0x0001554c,0x00001553,0x000aaa60,0x1006aaa2,
0x2aa98555,0x01555400,0x00355500,0xaaa88000,0x2a600001,0x00d54c2a,
0x99813310,0x3fee0000,0x540000ff,0x00001fff,0x0005fff3,0xffe93ff6,
0xfff80002,0x3fa20004,0xffffffff,0x00ffe802,0x0bfffe60,0x3ffffea0,
0xffffffff,0x440004ef,0x80003fff,0x0003fff9,0x7ffff300,0x1fffd400,
0x017fea00,0x0027ffc0,0x03fffe00,0x00ffec00,0x7ffcc000,0x7fec003f,
0x7ff400ff,0x003ffd13,0x002fff98,0x001fffa8,0x77fe4000,0x3e200000,
0x1fff31ff,0x327fdc00,0x26000dff,0x006ffeff,0x00fffd40,0x04ffd800,
0x27ffa200,0x00004ffb,0x20009fff,0xfffffff9,0x403fffff,0xd1000ffe,
0x803ffdff,0xfffffffa,0xffffffff,0x3f20005f,0x2a00005f,0x800006ff,
0x2ffdffe8,0x1ffff500,0x02ffd400,0x002ffdc0,0x3fffea00,0x3ffb0003,
0xff880000,0x7001ffdf,0x80dffbff,0xffc8fff8,0xdff70003,0x05ffd000,
0xff880000,0x9800001f,0x1ffe8eff,0x327fdc00,0xf1000dff,0x0bff53ff,
0x0fffd400,0x2ffcc000,0x77fcc000,0x200005ff,0xa8004fff,0x899befff,
0x05fffea9,0x6c003ffa,0x0eff8bff,0x2abffea0,0xcaaaaaaa,0x000efffe,
0x00077fc4,0x00bff200,0x17ffb000,0xf5001fff,0x5400bfff,0xff8005ff,
0x6c00000f,0x0006ffef,0x00003ffb,0xff8bffd8,0x77fcc00f,0x4c04ffb8,
0x004ffeff,0x0017fe40,0x00009ff5,0x005ff900,0x77fdc000,0xfb8003ff,
0x01bfe64f,0xfd8fff60,0x3310003f,0x3f200003,0xf500000e,0x00001dff,
0x40016664,0xfb804ffd,0x1ffd01ff,0x5cdff700,0x3fea05ff,0x7ffdc006,
0x0ffdc002,0x6fd80000,0x3fee0000,0x003bfea5,0x07fffff5,0x0017fea0,
0x00003ff7,0xffccff88,0x1ffd8002,0x3fee0000,0x881bfea5,0x3ffa2ffe,
0x37ffdc03,0x06fd8000,0x0001bfa0,0x013fe200,0x3ff60000,0x3310004f,
0x80009981,0x0ccc4199,0x00000000,0x80000133,0x00000999,0x3fe20000,
0x0fff2006,0x4c007ff4,0x00ccc099,0xb000dff5,0x988009ff,0x4c000000,
0x26600001,0x004ccc09,0x3fffffea,0x05ffa800,0x00004c40,0x7cd7fdc0,
0xffd8005f,0x26600001,0x804ccc09,0x4cc41998,0x00999801,0x00331000,
0x000004cc,0x0000cc40,0x00333000,0x2000aaa2,0xa8802aa8,0x001acdcc,
0x2cefda88,0x54400b32,0x001acdcc,0x2f72e620,0x5440000a,0x001acdcc,
0x4c009ff5,0x1ffd06ff,0x372e6200,0x7fd400ab,0x6ffa8006,0x372e6200,
0x440000ab,0x02bcdcb9,0xb9731000,0x3ea00579,0x805ffedf,0x31005ffa,
0x00579b97,0xfe9ffa00,0x7fec000f,0x55510001,0x05551000,0x2a202aaa,
0xaaaaaaaa,0x800099aa,0xaaa80aaa,0xaaaaaaaa,0x01aaaaaa,0xaaaaa880,
0xaaaaaaaa,0x81aaaaaa,0xaaaaaaaa,0xaaaaaaaa,0x00dff51a,0x540dff50,
0xfffffffd,0xff9002ef,0xf19fffff,0xffda809f,0x2effffff,0x3fffa200,
0x02ffffff,0x7fffed40,0x402effff,0x6c006ffa,0x01ffd04c,0xfffffe88,
0xf502ffff,0xff3000df,0xffe8801f,0x2fffffff,0x7fff4400,0x0bffffff,
0xfffe8800,0x0bffffff,0x3e73fea0,0x7fd403ff,0x7fff4405,0x0bffffff,
0x4bff3000,0x6c003ffc,0x9dfb71ff,0x037fd405,0xe837fd40,0xfffa82ff,
0xffffffff,0x2004efff,0xffe82ffe,0xffffffff,0x03ffffff,0xfffffc80,
0xffffffff,0x85ffffff,0xfffffffe,0xffffffff,0x00dff53f,0x360dff50,
0xffffffff,0x5c05ffff,0xfdcbdfff,0x3604ffef,0xffffffff,0x9805ffff,
0xffffffff,0xb003ffff,0xffffffff,0x440bffff,0x00002fff,0xf9803ffa,
0xffffffff,0xffa83fff,0x7ffb8006,0x7ffffcc0,0x3fffffff,0xfffff700,
0xffffffff,0x7ffdc003,0xffffffff,0x9ff501ff,0xa803fff2,0x3fee05ff,
0xffffffff,0xd8001fff,0x1ffe62ff,0xfb5ffb00,0x05ffffff,0x5000dff5,
0x3ffa0dff,0xfffffa82,0xffffffff,0xfd005fff,0xffffd05f,0xffffffff,
0x8007ffff,0xfffffff8,0xffffffff,0xe85fffff,0xffffffff,0xffffffff,
0x000dff53,0xfe88dff5,0x2a61aeff,0xf304fffe,0xfff505ff,0xfffd109f,
0x7f54c35d,0x3fea04ff,0xa9899bef,0x2205fffe,0x21aefffe,0x04fffea9,
0x0033fffa,0x403ffa00,0x99befffa,0x5fffea98,0x20037fd4,0x2a05ffe8,
0x899befff,0x05fffea9,0x2fffff62,0xfffd950a,0xffd8805f,0xd950abff,
0xf505ffff,0x02fff49f,0xfb10bff5,0x2a157fff,0x02ffffec,0xd03ffe20,
0x7ec005ff,0xdbacffff,0x7fd40fff,0x6ffa8006,0xf505ffd0,0x555555ff,
0xfffd9555,0x2ffe801d,0xccccccb8,0xfecccccc,0x7e4003ff,0xdffeccef,
0xcccccccc,0xccb82ccc,0xcccccccc,0x53fffecc,0xf5000dff,0x2fffd8df,
0x83fffc80,0x3ea02fff,0xfffd84ff,0x3fffc802,0x7009ffb0,0x3f603fff,
0xffc802ff,0xfffd303f,0x000159df,0x3f601ffd,0xfffb804f,0x801bfea1,
0x201fffe9,0xfb804ffd,0xfff901ff,0xfff98019,0x3fff201f,0x7ffcc00c,
0x327fd41f,0x3ea07fff,0xcfffc85f,0x7fffcc00,0x09ff7001,0x6c00bff7,
0xfb81efff,0x1bfea0ef,0x41bfea00,0xffa82ffe,0x7ffdc006,0x017ff402,
0x2fffcc00,0x8bffe200,0x00003ffd,0x5fff9800,0x2001bfea,0x3fee6ffa,
0x3ff2001f,0x4037fcc7,0x7fdc4ffe,0x3ff2001f,0x006ff887,0x3ee0fff2,
0x3f2001ff,0x3ffa207f,0x1cefffff,0x101ffd00,0x7e400dff,0x33ffea3f,
0xedcccccc,0x203fffff,0x32006ff8,0xfff983ff,0x3ffe6002,0x05fff306,
0x237ffcc0,0x7fe44ffa,0x45ffa80f,0x2002fff9,0xd006fff9,0xfff103ff,
0x3fff6001,0xa93ff201,0xfa8006ff,0x05ffd06f,0xb000dff5,0xffe809ff,
0x7f440002,0x7e4000ef,0x01ffec6f,0x3a200000,0x3fea0eff,0x6ffa8006,
0x1000fffe,0x7fd45fff,0x44ffb803,0x44003fff,0x7fd42fff,0x1bfe6004,
0x1000fffe,0xeb805fff,0xffffffff,0x07ff401e,0x30027fd4,0x7ffd4dff,
0xffffffff,0x402fffff,0x26004ffa,0x5ffd86ff,0x3fffa800,0x8005ffd8,
0x3ea3fffa,0x86ffe84f,0x7fec5ffa,0xfffa8005,0x037fcc03,0x36009ffb,
0x7fc405ff,0x001bfea6,0x7f41bfea,0x06ffa82f,0x406ffa80,0x40002ffe,
0x4000fffe,0x7ec2fff8,0x0000003f,0x2a07fff4,0xfa8006ff,0x01fff56f,
0x6439d900,0xffa802ff,0x003ffea4,0xf5073b20,0x4cd800df,0x0007ffd4,
0x8800e764,0xffffffdb,0x03ffa03f,0xb001bfea,0x7fffd499,0xffffffff,
0xfa800ace,0x266c006f,0x0003ffea,0x3ea37fe4,0xf90000ff,0x427fd4df,
0x7d43fff9,0x03ffea5f,0x037fe400,0xfa80fff2,0x3ffb007f,0x7d4ffd00,
0xffa8006f,0x505ffd06,0xf3000dff,0x7ff401ff,0x3ff60002,0xffb8002f,
0x003ffd86,0x3ff60000,0x06ffa82f,0xfb6ffa80,0xd80000bf,0xff9801ff,
0x0017ff64,0x0bffe200,0x17ff6000,0x98000000,0x04ffffeb,0xff101ffd,
0xfa80005f,0xa99999ef,0x2002effd,0x0002fff8,0x0004ffc8,0xfc87ffe6,
0x3e60004f,0x09ff51ff,0xfa83fff2,0x013ff25f,0x01fff980,0xff003ffe,
0x1ffb005f,0x2a3ffb00,0xfa8006ff,0x05ffd06f,0x7000dff5,0xffe80fff,
0xfff70002,0xfff10007,0x007ffb05,0x3fee0000,0x0dff503f,0x3edff500,
0x400003ff,0xf9801ffe,0x00fffe4f,0x7fff4000,0x3fe0000c,0x0000003f,
0x1fffd500,0x3a01ffd0,0x0000cfff,0xfc80dff5,0x3fa003ff,0x20000cff,
0x40003ffd,0x3ff63fff,0x7ffc0003,0x7409ff53,0x97fea6ff,0x40003ffd,
0xff503fff,0xffffffff,0xb00bffff,0x3ff200ff,0x000dff52,0x3fa0dff5,
0x06ffa82f,0x02fff440,0x2000bffa,0x0005fff9,0x3f60dff7,0x8000003f,
0x2a05fff9,0xfa8006ff,0x02fff8ef,0x17fec000,0xf8a7fd40,0x000002ff,
0x9dffffd3,0x3fe20015,0x0000002f,0x0fffa200,0x74c03ffa,0x0aceffff,
0x00dff500,0x2005fff9,0xceffffe9,0x3ffe000a,0x7ff40002,0x000bffe5,
0x3eabffd0,0x3ffe604f,0x7fcbff53,0x7f40002f,0xffffb05f,0xffffffff,
0xfd803fff,0x27ff7007,0xa8006ffa,0x5ffd06ff,0x400dff50,0x401fffe9,
0x44002ffe,0x20006fff,0xffb03fff,0x88000007,0x7d406fff,0xffa8006f,
0x001fff8e,0x01ffe400,0xff8a7fdc,0x2000001f,0xffffffe8,0x3e201cef,
0x400001ff,0xb8005ff9,0x0ffe85ff,0x3ffffa20,0x201cefff,0xfd006ffa,
0x3a2003ff,0xefffffff,0x3ffe201c,0x7fe40001,0x003fff15,0xf55ffc80,
0xfffc809f,0xff15ffa8,0xfc80003f,0xcfff885f,0xcccccccc,0x6c04ffec,
0xffc800ff,0x000dff51,0x3fa0dff5,0xcfffa82f,0xedcccccc,0x803fffff,
0x74002ffe,0x70000fff,0x7fec0fff,0xffffffff,0xe8006fff,0x7d400fff,
0xffa8006f,0x0007ff9e,0x806ffa80,0xfff34ffe,0x2e000000,0xfffffffe,
0x7ff981ef,0xff880000,0x7fcc000f,0x800ffe85,0xffffffeb,0xffa81eff,
0xdfff1006,0x7ff5c001,0x1effffff,0x0007ff98,0xff36ffb8,0xff70000f,
0x2013fead,0x5ffaeffe,0x0000fff3,0xff70dff7,0x3ffdc00b,0x2007ff60,
0xdff50ffd,0x0dff5000,0x3ea0bffa,0xffffffff,0x2fffffff,0x005ffd00,
0x000fffec,0x6c07ffd0,0xffffffff,0x006fffff,0x400fffec,0xa8006ffa,
0x0fff8eff,0xffe80000,0x53ffe602,0x0000fff8,0x3f6e2000,0x43ffffff,
0x0000fff8,0x002ffd80,0x7f41ffe4,0x36e2000f,0x3fffffff,0x70037fd4,
0x10009fff,0xffffffb7,0x07ff987f,0x36ffb800,0x70000fff,0x13feadff,
0x3fbffe60,0x00fff35f,0xd0dff700,0x7c4005ff,0x3ff602ff,0x537fc402,
0xf5000dff,0x0bffa0df,0x3fffffea,0xceffffff,0x3ffa000a,0x7fff7002,
0x3ffd4000,0x3bbbff60,0xeeeeeeee,0x3ffee004,0x0dff5003,0x3edff500,
0x800002ff,0xfa82fffa,0x3ffe4fff,0x00000002,0x3ffffae6,0x0017ffc4,
0x17ffdc00,0x80ffe880,0x20000ffe,0x4ffffeb9,0xb001bfea,0x80003fff,
0x4ffffeb9,0x0003ffe6,0x3e6bff90,0x640000ff,0x09ff55ff,0x3fffff20,
0x001fff35,0x4c5ffc80,0xfc8007ff,0x1bff606f,0x7d49ff70,0xffa8006f,
0x505ffd06,0x33333dff,0x005dffb5,0x3005ffd0,0x8000bfff,0x7ec03ffe,
0x9800003f,0x26005fff,0xfb8007ff,0x007ffb5f,0x3fff6000,0xffffecce,
0x00fff64f,0x54000000,0x3f60fffe,0x8800003f,0x200cffff,0xfd06fffa,
0x2a00001f,0xff50fffe,0xfff8800d,0x3aa00006,0xfff10fff,0xffd80003,
0x003fff14,0xf54ffd80,0x7ff4009f,0x3fff15ff,0x4ffd8000,0x40027fe4,
0xfb01fff9,0x3fe609ff,0x01ffe60f,0x7417fee0,0x6ffa82ff,0x01fffe40,
0x100bffa0,0x8000dfff,0xeeeefffa,0x3fffeeee,0x7fc40000,0x7fcc006f,
0x5ffc8007,0x40009ff9,0x3ffee00a,0xffacffff,0x0013ff24,0x200000a8,
0x3f23ffe8,0x02a0004f,0x77ffff44,0xffffdcbd,0x01ffd00e,0x7ff44000,
0x000dff53,0x0007fff7,0xd1fff440,0xe80007ff,0x0fffa3ff,0x27ffd000,
0x26004ffa,0x3fa5ffff,0x7f40003f,0x00fffc3f,0xb04ffe80,0x315bffff,
0xf983fff7,0xffc8007f,0x505ffd05,0xff900dff,0x7ff4005f,0x07fff402,
0x3fffa000,0xffffffff,0x00003fff,0x0007fff4,0x2001ffe2,0xdff54ffc,
0x3bfea000,0x9dfb7300,0xfa8ffea3,0xff50006f,0x017fe61d,0xfa97fee0,
0xff50006f,0x3fff601d,0xffffffff,0x207ff405,0xb8005ff9,0x0dff55ff,
0x83fffa00,0xb8005ff9,0x17ff25ff,0x0fff9800,0x80017ff2,0xff50fff9,
0xfffc8009,0x0017ff25,0x2a0fff98,0x2e0006ff,0x9ffb07ff,0xffffffff,
0x00fff105,0x3a09ff90,0x6ffa82ff,0x03fffd00,0xc80bffa0,0x40001fff,
0xfffffffa,0xffffffff,0x3f200003,0xff0001ff,0xffe8003f,0x001fff13,
0x000bffb0,0xff11ffdc,0xffb0001f,0x007ffc4b,0xf897fe60,0xfd8000ff,
0x7fedc05f,0x03deffff,0x7c40ffe8,0x7cc000ff,0x00dff55f,0x897ffe60,
0x4c000fff,0x3ffe65ff,0xbffd0002,0x002fff98,0x7d4bffd0,0xffe8004f,
0x00bffe65,0x362fff40,0x220004ff,0xffd83fff,0xcefffe99,0x007ffe01,
0x3a07ffd0,0x6ffa82ff,0x1dfff100,0x205ffd00,0x0003fffb,0xb004ffe8,
0x200007ff,0x0003fffb,0x98013ff6,0x3ffa1fff,0x7ffcc005,0x20026a22,
0x7ff42ffc,0x7ffcc005,0x0017fec2,0xffd0fff2,0xfff9800b,0x3ff51002,
0x20198001,0x64002ffd,0x262003ff,0x5ffb0000,0x43ffc800,0xa8006ffd,
0xffd82fff,0xfffa8006,0x004c4002,0x001bff60,0x000bffea,0xb03fc400,
0x00d443ff,0x2004ffd8,0xfd01fff9,0x0dff505f,0x027ffdc0,0x7cc17ff4,
0x980004ff,0xfb000fff,0xf300007f,0xb80009ff,0xfb003fff,0x4fff98ff,
0x8dfff100,0x7cc06ff8,0x7ffcc0ff,0xdfff1004,0x005fff70,0xf303ffa2,
0x3e2009ff,0x7dc006ff,0x3e6000bf,0x7fdc0cff,0xffd1002f,0x7ffd4001,
0x7ffdc004,0x1ffd1002,0x00dfff88,0x20bfff50,0x000dfff8,0x000bfff5,
0x2009fff5,0x000dfff8,0x000bfff5,0xb02fcc00,0x5c0003ff,0xfb003fff,
0x17ff40ff,0x20037fd4,0x7401fffd,0x7ffc42ff,0xffb00005,0x1ffec009,
0x3ffe2000,0xfe880005,0xfb100aff,0xfff905ff,0x7ff5403b,0x03fff81f,
0x320bffd1,0x2a01dfff,0xf881fffe,0x2a00cfff,0xff906fff,0x7f5403bf,
0x64c001ff,0x91000ffe,0xff887ffd,0x3ea00cff,0x64c006ff,0x22002ffe,
0x200cffff,0xf506fffa,0xfc805fff,0x3ea00fff,0x7e402fff,0x98000fff,
0x5002ffec,0xc805ffff,0x0000ffff,0xd813ea00,0x220001ff,0x100afffe,
0x7405fffb,0x6ffa82ff,0x37ffc400,0xfd0bffa0,0x300001df,0x6c001fff,
0x740003ff,0x00000eff,0x9dfffff5,0xbffffdb9,0x7ffffec0,0xfffecabd,
0xdfff702f,0xbfffb759,0xfffffd80,0xfffecabd,0x3ffa202f,0xfdcbdeff,
0x3600efff,0xabdfffff,0x02ffffec,0x00ffe600,0x3a21ffa0,0xcbdeffff,
0x00effffd,0x001bfa00,0xbdffffd1,0xdffffb97,0x7fffd401,0xffdcabde,
0xfa800eff,0xcabdefff,0x00effffd,0x006fe800,0x37bfffea,0xffffdcab,
0x4000000e,0x3ff607fb,0x7fd40001,0xedccefff,0x7405ffff,0x6ffa82ff,
0x3fffb800,0xfa8bffa0,0xeeeeeeff,0xeeeeeeee,0x017ff65e,0xddddffb0,
0xdddddddd,0x3bffea1d,0xeeeeeeee,0x85eeeeee,0xfffffff9,0x804fffff,
0xfffffffc,0x402effff,0xfffffffc,0xff9005ff,0xffffffff,0x3f6005df,
0xffffffff,0xff9005ff,0xffffffff,0x988005df,0x800ffeba,0x05ffb988,
0x3ffffff6,0x005fffff,0x4ffb9898,0xffffb000,0xbfffffff,0x3fffa600,
0xffffffff,0x7ff4c005,0xffffffff,0x2260005f,0x4004ffb9,0xffffffe9,
0x005fffff,0xdff10000,0x3ff6bb77,0xff980001,0xffffffff,0xffe804ff,
0x006ffa82,0x201fffd0,0x3fea2ffe,0xffffffff,0xffffffff,0x003fff37,
0xffffffd8,0xffffffff,0xfffff50f,0xffffffff,0x20ffffff,0xfffffeb8,
0x22001cff,0xfffffffc,0x3b26003f,0x001bdfff,0x7ffffe44,0xb8003fff,
0xeffffffd,0x7e44003d,0x3fffffff,0xffff7000,0x3ffe009f,0x6dc01fff,
0xdeffffff,0xffff0003,0x5c0001ff,0xeffffffd,0xfda8003d,0x1cffffff,
0x3ff6a000,0x01cfffff,0x7ffffc00,0xfb50000f,0x39ffffff,0xd8000000,
0xfb5fffff,0x2200003f,0xffffffeb,0xffd001cf,0x00dff505,0x417ffe60,
0x3fea2ffe,0xffffffff,0xffffffff,0x000bffb7,0xfffffffb,0xffffffff,
0x3ffffea1,0xffffffff,0x807fffff,0x0019aa98,0x01aa9880,0x00001000,
0x000d54c4,0x09aa9880,0x55310000,0xdb500003,0x7f40039b,0x22001def,
0x00009aa9,0x0e77ff44,0xaa988000,0x26000009,0x000009aa,0x0009aa98,
0x9dffd100,0x2a600003,0x0000009a,0x16f6d400,0x00001dd9,0x03355310,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x55530000,0x4c000001,0x200002aa,
0x4000aaa9,0x2aa21aaa,0x8555100a,0x51002aa8,0x88000155,0x00031009,
0x002aaa60,0x5506aa60,0x26200035,0x0004cc09,0x00355500,0x35551000,
0x15551000,0x00015544,0x0000aaaa,0xf8873ae2,0x00ccc407,0x2000aaaa,
0x035302a8,0x0aaaa000,0x55544000,0xaaa80001,0x000aaa20,0x05d40000,
0x55300f26,0xffffc801,0x005fffff,0x002fff40,0x9fff1000,0x7ff40000,
0xeffa8005,0xe809ff90,0x0bffa3ff,0x077ffec0,0x30bf7000,0x360000ff,
0xf10005ff,0x3bfe63ff,0xbff50000,0x00037fcc,0x01ffffb8,0x7ffec000,
0xffc8000f,0x000fff65,0x005fff50,0x7ffffc40,0x2205fedf,0x3e604fff,
0xff0002ff,0x0005fd03,0x005fff30,0x037fec00,0xb2ffdc00,0xfb3009ff,
0x8037cc5b,0xabeffff9,0x7fec03fd,0x7fffe401,0x005fffff,0x003bfea0,
0x5ffb8000,0x3fea0000,0x3ff20006,0x8805ff9c,0x4ffb8fff,0xffbff700,
0x7fc4000b,0x00bfb30b,0x01fff300,0x477fd400,0x20001ffe,0x3fe65ffa,
0xff980006,0x0000ffee,0xdffbff70,0x2bffa000,0x00004ffa,0x4000dff7,
0xfffcaefb,0x3fee02ff,0x027fec06,0x515df900,0x00001ff9,0x00009ffb,
0x002ffe88,0xfabffd80,0xfff9805f,0x03ffdfff,0xfffbdfb0,0xfd801fff,
0x5554c01f,0x01aaaaaa,0x003ffa00,0x1dff0000,0x7ff40000,0x7fec0000,
0xf5000eff,0x200bffdf,0xffb8eff9,0x3fee0004,0x000fffff,0x001ffd80,
0xffeffc80,0x7fd40002,0x001bfe65,0xf33ffd10,0xf30000df,0x09ff71ff,
0xfffff100,0xfc80000d,0x5d90001f,0x7c00cc98,0x3fe200ff,0x7f440006,
0x002fffff,0x005ff980,0x0dff1000,0xdfff1000,0xbf9001df,0x1ffffd93,
0x5443fe00,0xfd801dfd,0x0000001f,0x0017fd40,0x07fee000,0x2ffa8000,
0xfff88000,0x7fe4001f,0xff8800ef,0x00bffa1f,0xbdfec980,0xff980000,
0x3fa00003,0x880004ff,0x004cc099,0xc93ff600,0x220005ff,0x3ffa2ffe,
0xfffa8003,0xe800000f,0x0000005f,0xc803ff70,0x300000ff,0x00015bd9,
0x0003bf60,0x02ff9800,0xffff9800,0x983db001,0x00cc002c,0x4c400000,
0x002bcdcb,0x00004c40,0x0004c400,0x00026200,0x00099880,0x20015550,
0x4cc40998,0x00100000,0x00198800,0x00ccc400,0xb9731000,0x30000579,
0x00333033,0x220ccc40,0x31000199,0x20000013,0xaa880198,0x2aa88002,
0x13100355,0x00000000,0x00026600,0x00262000,0x004cc400,0x22000000,
0x02bcdcb9,0x7ff44000,0xbfffffff,0x2aaaa200,0x9aaaaaaa,0x55550009,
0x55544000,0x55555510,0x55555555,0x2aa21555,0x2aa88002,0x22015550,
0xaaaaaaaa,0xaaaaaaaa,0x554c000a,0x15544002,0x89554400,0xaaaaaaaa,
0xaaaaaaaa,0xfe8802aa,0xffffffff,0xa980000b,0x5554002a,0x2aa20002,
0x5555510a,0x00335555,0x55555544,0xaaaaaaaa,0xdff50aaa,0x4dff5000,
0x554c0aaa,0x55510001,0x55555555,0x01555555,0x002aa980,0x05553000,
0xaaaaa880,0xaaaaaaaa,0x2a00aaaa,0x744000aa,0xffffffff,0x5c0000bf,
0xffffffff,0x501fffff,0xffffffff,0x9dffffff,0x04fffa80,0x4cdffd00,
0xffffffff,0xffffffff,0x07fff51f,0xd05ffa80,0x3fe605ff,0xffffffff,
0x1fffffff,0x07fffc00,0x07fff500,0xf35ffa80,0xffffffff,0xffffffff,
0x7fdc01ff,0xffffffff,0x40001fff,0x2000ffff,0x0004fffa,0x7fd4dffd,
0xffffffff,0x7cc02eff,0xffffffff,0xffffffff,0x000dff51,0x7ff4dff5,
0x002ffdc0,0xffffff98,0xffffffff,0x7c001fff,0x00000fff,0x000ffff8,
0x3fffffe6,0xffffffff,0x3fa01fff,0x3fee002f,0xffffffff,0x99701fff,
0xffffd881,0xffd950ab,0xfff505ff,0xffffffff,0x80bfffff,0x4001fffc,
0x3e60fffb,0xffffffff,0xffffffff,0x01ffff51,0xe82ffd40,0xfff302ff,
0xffffffff,0x03ffffff,0x1ffffd40,0x1ffff500,0x9affd400,0xffffffff,
0xffffffff,0xfd880fff,0x950abfff,0x005ffffd,0x0ffffea0,0x03fff900,
0x20fffb80,0xfffffffa,0xffffffff,0xfffff303,0xffffffff,0x3ea3ffff,
0xffa8006f,0xf703ffa6,0x3e6000bf,0xffffffff,0xffffffff,0x3ffea001,
0x5400003f,0x2003ffff,0xfffffff9,0xffffffff,0x3ffa01ff,0xfffd8802,
0xfd950abf,0xffb05fff,0x0cfffc83,0x0ffffcc0,0x2aabffea,0xecaaaaaa,
0xf100efff,0x7cc00dff,0x7ffcc3ff,0xcccccccc,0x50cccccc,0x400bffff,
0xffd05ffa,0x33ffe605,0xcccccccc,0x000ccccc,0x01bffbf6,0x05ffffa8,
0x6457fea0,0xfdcccccc,0xccccccff,0x9fff904c,0xffff9801,0xfefd8001,
0x7fc4006f,0x3fe6006f,0x67ffd43f,0xeccccccc,0xf983ffff,0xccccccff,
0xcccccccc,0x000dff50,0x7ff4dff5,0x002ffdc0,0xcccfff98,0xcccccccc,
0x36000ccc,0x0006ffef,0x37ff7ec0,0x99fff300,0x99999999,0x74019999,
0xffc802ff,0x7fcc00cf,0x0ffec1ff,0x4005fff3,0x7d46fff9,0x7fdc006f,
0x3ffea02f,0x0bffd003,0x0000dff3,0x07fffff5,0x7417fea0,0xdff302ff,
0xf1000000,0x005ff99f,0x0fffffea,0x802ffd40,0x98007ff8,0x26002fff,
0x44006fff,0x02ffccff,0x01fffd40,0xfa85ffe8,0xffd3006f,0x06ff981f,
0x06ffa800,0x3a6ffa80,0x2ffdc0ff,0x06ff9800,0xff880000,0x0002ffcc,
0xff99ff10,0x1bfe6005,0x7ff40000,0x17ffcc02,0x8dfff300,0x3ff61ffd,
0xfffa8005,0x001bfea3,0xfb013ff6,0xffb801ff,0x06ff980f,0xffffa800,
0xffa800ff,0x205ffd05,0x00006ff9,0xf9affb80,0xfff5005f,0xf5001fff,
0x3fe200bf,0x5ffd8007,0x3fffa800,0x26bfee00,0xfd8005ff,0x7fdc00ff,
0x06ffa80f,0x262fff40,0xa80006ff,0xfa8006ff,0x703ffa6f,0x26000bff,
0x000006ff,0xff9affb8,0xff700005,0x200bff35,0x00006ff9,0xd805ffd0,
0xfa8005ff,0x47ff63ff,0x0000fffa,0x7fd4dff9,0x6ffa8006,0x037ffc40,
0x2605fff1,0xa80006ff,0x05ffedff,0xfd05ffa8,0x1bfe605f,0x3fa00000,
0x2003ffa7,0x5ffedffa,0x005ffa80,0xa800fff1,0x90000fff,0x7f400dff,
0x0003ffa7,0x440dfff1,0xff502fff,0xfff8800d,0x001bfe63,0x001bfea0,
0xffe9bfea,0x002ffdc0,0x0006ff98,0x3a7fe800,0xe80000ff,0x003ffa7f,
0x0001bfe6,0x5017ff40,0x20001fff,0x3ff66ffc,0x0009ff91,0xfa8fffcc,
0xff98006f,0x7ffd400f,0x40bffd03,0x80006ff9,0xfff9cffa,0x82ffd403,
0xff302ffe,0x9800000d,0x0fff25ff,0x3e73fea0,0x7fd403ff,0x0fff1005,
0x004ffc80,0x007ffe60,0xffc97fe6,0xfffa8003,0x40bffd03,0xc8006ffa,
0x1bfe66ff,0x1bfea000,0xe9bfea00,0x2ffdc0ff,0x06ff9800,0x7fcc0000,
0x000fff25,0x7e4bff30,0x6ff9803f,0xffd00000,0x027fe405,0x23fff300,
0x7ffb1ffd,0x3fff8000,0x7000dff5,0x3f600fff,0x7ffdc0ff,0x01bfe600,
0x653fea00,0x3ea00fff,0x05ffd05f,0x0001bfe6,0x4c5ffb00,0xffa807ff,
0x401fff94,0xf1005ffa,0xffd800ff,0x7ffc0003,0x22ffd803,0xb0007ff9,
0xffb81fff,0x1bfea00f,0x99ffe200,0xa80006ff,0xfa8006ff,0x703ffa6f,
0x26000bff,0x000006ff,0xff317fec,0xffd8000f,0x201ffe62,0x00006ff9,
0x6c05ffd0,0x7c0003ff,0x23ffb3ff,0x40002fff,0xdff55ffe,0x5ffe8800,
0x4bfff100,0x4c02fff8,0xa80006ff,0x17ffa4ff,0xfd05ffa8,0x1bfe605f,
0xff880000,0x017ff40f,0xffe93fea,0x017fea05,0x2003ffc4,0x40002fff,
0x7c405ffe,0x17ff40ff,0x2fffc400,0xa805fff1,0xfd0006ff,0x01bfe63f,
0x01bfea00,0xfe9bfea0,0x02ffdc0f,0x006ff980,0x3ffe2000,0x0017ff40,
0x740fff88,0x7fcc02ff,0xfd000006,0x17ffc05f,0x57ffa000,0xfff89ffd,
0x7fe40001,0x400dff55,0x001fffe9,0x7ecbffea,0x6ff9804f,0x4ffa8000,
0x540fffe6,0x5ffd05ff,0x001bfe60,0x84ffb800,0x7d405ffb,0x0fffe64f,
0x8802ffd4,0x3e2007ff,0x640001ff,0x7fdc05ff,0x005ffb84,0x365fff50,
0xffa804ff,0x5ffb0006,0x0001bfe6,0x2001bfea,0x3ffa6ffa,0x002ffdc0,
0x0006ff98,0x213fee00,0x70005ffb,0xbff709ff,0x006ff980,0x05ffd000,
0x0007ffe2,0x3f6bff90,0x007ff99f,0xf56ffb80,0x999999ff,0xfffffdb9,
0xdffb0007,0x2600dff5,0xffffffff,0xffffffff,0xf913fea2,0xbff501ff,
0x4c0bffa0,0xffffffff,0xffffffff,0x81ffe802,0x2a00fff8,0x7ffe44ff,
0x005ffa80,0x4c00fff1,0xb80007ff,0x7ff406ff,0x00fff881,0xf5dffb00,
0x3fea00df,0x7ff90006,0x3fffffe6,0xffffffff,0x1bfea2ff,0xe9bfea00,
0x2ffdc0ff,0xffff9800,0xffffffff,0xe802ffff,0xfff881ff,0x1ffe8000,
0x200fff88,0xfffffff9,0xffffffff,0x17ff402f,0x0007ff98,0xffb6ffb8,
0x000fff33,0x3eadff70,0xffffffff,0x2fffffff,0xffff1000,0x3e6003ff,
0xffffffff,0x2fffffff,0x3fa13fea,0x05ffa86f,0x3e605ffd,0xffffffff,
0x2fffffff,0xb037fcc0,0x7fd409ff,0xa86ffe84,0xff1005ff,0x3ffcc00f,
0x37fdc000,0x6c0dff30,0xf10004ff,0x003fffff,0x4001bfea,0xfff35ffc,
0xffffffff,0x545fffff,0xfa8006ff,0x703ffa6f,0x26000bff,0xffffffff,
0xffffffff,0x037fcc02,0x98009ffb,0x3ff606ff,0x3fffe604,0xffffffff,
0x7402ffff,0xfff302ff,0xdff70000,0x3fe67ff6,0x7e40000f,0xfffff55f,
0xdfffffff,0xa8000159,0x2004ffff,0xeeeefff9,0xeeeeeeee,0x213fea1e,
0x7d43fff9,0x05ffd05f,0x3bbbffe6,0xeeeeeeee,0x7fe401ee,0x81ffea03,
0xff984ffa,0x02ffd43f,0x2007ff88,0x0000fff9,0xf902ffe4,0x3ffd407f,
0xffff5000,0x37fd4009,0x34ffd800,0xdddddfff,0xdddddddd,0x0037fd43,
0xffd37fd4,0x005ffb81,0xdddfff30,0xdddddddd,0xffc803dd,0x01ffea03,
0x5407ff90,0x3fe607ff,0xeeeeeeef,0x01eeeeee,0xf9817ff4,0x640000ff,
0x13ffb5ff,0x80003fff,0xdff54ffd,0xfb533333,0x400005df,0x4c006ffd,
0xa80006ff,0xfff904ff,0xe82ffd41,0xdff302ff,0x3fe00000,0x17ffc00f,
0xf904ffa8,0x2ffd41ff,0x007ff880,0x0007ffe2,0x7c09ffb0,0x7ffc00ff,
0x3ff60002,0x37fd4006,0x33ffe800,0x30000dff,0xf7000fff,0x207ff4bf,
0x30005ffb,0x00000dff,0xff003ffe,0x7ffc005f,0x817ffc00,0x00006ff9,
0x2205ffd0,0x40001fff,0x3ffb4ffd,0x0000fffa,0x3fea7ffd,0x1fffe406,
0x5ffb8000,0x037fcc00,0x027fd400,0x7fd4dffd,0x205ffd05,0x00006ff9,
0xffffffa8,0xffffffff,0x409ff505,0x3fea6ffe,0x0fff1005,0x003ffe80,
0xa81fff40,0xffffffff,0x05ffffff,0x017fee00,0x000dff50,0x7fccbffe,
0xff980006,0x5ffc8007,0xff703ffa,0x3fe6000b,0xfa800006,0xffffffff,
0x005fffff,0xfffffff5,0xbfffffff,0x001bfe60,0x017ff400,0x80007ffd,
0x3ffb3ffe,0x80017ff2,0xff50fff9,0x5fff900d,0xbff70000,0x06ff9800,
0x04ffa800,0x7d4fffe6,0x05ffd05f,0x0001bfe6,0x3fffff60,0xffffffff,
0x4ffa81ff,0x54fffe60,0xff1005ff,0x5ffc800f,0x3ffe6000,0xfffffb00,
0xffffffff,0x2e0003ff,0x7d4005ff,0xff88006f,0x00dff31f,0x00fff100,
0x7f49ff90,0x02ffdc0f,0x006ff980,0xffffd800,0xffffffff,0xfd801fff,
0xffffffff,0x81ffffff,0x00006ff9,0x6405ffd0,0x260005ff,0x3ffb0fff,
0x000bffe6,0xff52fff4,0x3fffa00d,0x7fdc0001,0x37fcc005,0x27fd4000,
0x2a3fff20,0x5ffd05ff,0x001bfe60,0x99fff100,0x99999999,0xff509ffd,
0x8fffc809,0xf1005ffa,0xff9800ff,0xffd0002f,0x33ffe20b,0xcccccccc,
0x0004ffec,0xa800bff7,0xfa8006ff,0x0dff30ff,0x07ffe000,0x747ffd00,
0x2ffdc0ff,0x06ff9800,0x7ffc4000,0xcccccccc,0x404ffecc,0xccccfff8,
0xfecccccc,0x06ff984f,0x5ffd0000,0x017ffcc0,0x365ffe80,0x1bff61ff,
0x8bffea00,0xf1006ffa,0x40001dff,0x4c005ffb,0xa80006ff,0xffe804ff,
0xfd05ffae,0x1bfe605f,0xbff70000,0x43ffdc00,0xfe804ffa,0x005ffaef,
0xb000fff1,0xf5000dff,0x3fee05ff,0x1ffee005,0x02ffdc00,0x001bfea0,
0xff997ffa,0xffb00006,0x7ffcc009,0xf703ffa1,0x3e6000bf,0x5c00006f,
0x3ee005ff,0x2ffdc07f,0x30fff700,0x00000dff,0xfb00bffa,0xff5000df,
0x10ffec5f,0x2001bfff,0x7d45fffa,0x3fee006f,0x3ee0004f,0x7fcc005f,
0xffa80006,0xefff9804,0x5ffd05ff,0x001bfe60,0x005ffd00,0x2a17ffc4,
0xff9804ff,0x1005ffef,0xf1000fff,0x2a001bff,0x3fa05fff,0x3fe2002f,
0xffb8002f,0x37fd4005,0x87ffee00,0x00006ff9,0x2007fff7,0x7ff47ffd,
0x002ffdc0,0x0006ff98,0x0017ff40,0x7405fff1,0x3e2002ff,0x37fcc2ff,
0xffe80000,0x6fffc402,0xbfff5000,0x7fffd400,0x7fffe402,0x0037fd40,
0x0007fff6,0x2002ffdc,0x80006ff9,0xf9004ffa,0x3a0bffff,0xdff302ff,
0x7fcc0000,0x6ffc8007,0xc8027fd4,0x005fffff,0x2000fff1,0x402ffffa,
0x300ffffc,0xf9000fff,0xff7000df,0x6ffa800b,0x17ffe600,0x0000dff3,
0x02bfffa2,0x217ffec4,0x7fdc0ffe,0xdff30005,0x7fcc0000,0x6ffc8007,
0x000fff30,0xff98dff9,0xfd000006,0xfff5005f,0xfffc805f,0x40d5540f,
0xbdeffffa,0xeffffdca,0x006ffa80,0x0037ffc4,0x4005ffb8,0x80006ff9,
0x3a004ffa,0xfd05ffff,0x1bfe605f,0x4ffc8000,0x1fff9800,0xe8013fea,
0x1005ffff,0x54000fff,0xabdeffff,0x0effffdc,0x0013ff20,0x0007ffe6,
0xa800bff7,0x6ccc06ff,0x7cc0ffff,0x2a00006f,0xccefffff,0x85ffffed,
0x7fdc0ffe,0xdff30005,0x7fe40000,0xfff98004,0x004ffc81,0x261fff98,
0x000006ff,0x2a005ffd,0xabdeffff,0x0effffdc,0xd303ffe8,0xffffffff,
0x7d40bfff,0xffb8006f,0xffb8003f,0x7ffcc005,0xeeeeeeee,0x55eeeeee,
0x7cc009ff,0xffd05fff,0x3bffe605,0xeeeeeeee,0x7c5eeeee,0xfd0001ff,
0x027fd49f,0x0bffff30,0x001ffe20,0xfffffd30,0x0bffffff,0x0003fff0,
0x70013ffa,0xfa800bff,0xfeeeeeff,0x0fffffff,0xeeefff98,0xeeeeeeee,
0xff985eee,0xffffffff,0x1ffd04ff,0xeeefffb8,0xeeeeeeee,0xdddfff34,
0xdddddddd,0xfff8bddd,0x9ffd0001,0x0003fff0,0xff993ffa,0xeeeeeeef,
0x5eeeeeee,0x800bffa0,0xffffffe9,0x205fffff,0x6d403ffe,0xcfffffff,
0x037fd401,0x00fffe80,0x002ffdc0,0x3fffffe6,0xffffffff,0x9ff56fff,
0x5fffc800,0x2605ffd0,0xffffffff,0xffffffff,0x01bfea6f,0x2a7ffb80,
0x7e4004ff,0xff1005ff,0x36a0000f,0xcfffffff,0x06ffa801,0x01ffee00,
0x800bff70,0xfffffffa,0xcfffffff,0xfffff300,0xffffffff,0x220dffff,
0xffffffeb,0x3ffa01cf,0x7ffffdc0,0xffffffff,0xfffff35f,0xffffffff,
0x7d4dffff,0x3ee0006f,0x037fd47f,0x4cfff700,0xffffffff,0xffffffff,
0x0bffa06f,0x3fff6a00,0x401cffff,0x26003ffe,0x2a0009aa,0xf30006ff,
0xfb800bff,0x7fcc005f,0xffffffff,0x6fffffff,0xd0009ff5,0x3ffa0bff,
0xfffff302,0xffffffff,0x7ecdffff,0x3e20004f,0x09ff53ff,0x00bffd00,
0x0001ffe2,0x0026aa60,0x0009ffb0,0x001fffc4,0xa800bff7,0xffffffff,
0x400bceef,0xfffffff9,0xffffffff,0xa98806ff,0xffd0019a,0xfffffb81,
0xffffffff,0xfffff35f,0xffffffff,0x7ecdffff,0x3e20004f,0x13ff63ff,
0x3fff8800,0xfffffff3,0xffffffff,0x7ff40dff,0x554c0002,0x00000009,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x54000000,0x055540aa,0x55510000,
0xa8000001,0x000001aa,0x00015551,0x0000d554,0x6640032a,0x2a07b62c,
0x3bbaa03e,0x04eeeeee,0x05999100,0x204cc400,0x3fa00099,0xffffffff,
0x1e65c003,0x41ba8000,0x220003c9,0x02662099,0x90573000,0x88333019,
0x06660099,0x00001331,0x55100055,0x55555555,0x99999900,0x80039999,
0xeeeeeee8,0x98001eee,0x01bcddcb,0x10000000,0x01ed8000,0xff92ffe4,
0xfb800009,0x000001ff,0x007fffee,0x3fff6000,0xffc8000e,0x320000ff,
0x9fff001f,0x3fe22fe4,0x3fffee02,0x006fffff,0x009fff10,0xf32ffd40,
0x7ff400df,0x3fffffff,0x037fec00,0x3fffa600,0x003fdace,0xfb8bff60,
0x3f60004f,0x6fbadfff,0x7ec1fff0,0x83ffe02f,0x20002ffd,0x000eeef9,
0x3fffffee,0xff806fff,0xffffffff,0x7ffc4002,0x1fffffff,0x3fffaa00,
0x03efffff,0x37264ca8,0xd5001bef,0xf30003bf,0x5ffb001f,0x0000dff3,
0x003fff70,0x3bfe6000,0x00000ffe,0x17ff7fee,0xffbff500,0x7ed4001d,
0x200cefff,0x3fe24fff,0x406ffedf,0xeeeeeeea,0xf10004ee,0x540009ff,
0x1bfe65ff,0xaaaaaa80,0x4001aaaa,0x40006ffd,0xffffdefc,0x360000ff,
0x13fee2ff,0x76ffcc00,0xf03fffff,0x17fec1ff,0x7ec1fff0,0x9320002f,
0x3fee004c,0x6fffffff,0xeeeeee80,0x4001eeee,0xccccccc8,0xd8800ccc,
0xffffffff,0x200effff,0xffff77fd,0xf880bfff,0xc8005c8a,0xfff1006f,
0x00001ffd,0x003fff70,0x3ffd1000,0x0000dff3,0x7fddbfe6,0x1fff1004,
0xd100bff5,0xffffffff,0x13ffe05f,0x17dfff93,0x80000000,0x0004fff8,
0xff997fea,0x00000006,0x0006ffd8,0xfda88ffc,0x7ec0002d,0x013fee2f,
0xf931fe40,0x3ffe017d,0xf80bff60,0x0bff60ff,0x1aa2e800,0x00000000,
0x00000000,0xbefffe88,0xfffda889,0x9ffb01ff,0xffd9bfff,0x3e2dc09f,
0x01ff4000,0x03ffff30,0x2aa20000,0xd800000a,0x17ff24ff,0x3fff1000,
0x74017ff4,0x0fff62ff,0xfbdfffb0,0x303ffff9,0x80cc0133,0x88002aa8,
0x266002aa,0x26200009,0x0004cc09,0x2aa85551,0x00998800,0x0000cc00,
0x88266200,0x31000099,0x06660001,0x4cc01331,0x0004cc41,0x001ecb90,
0x00015550,0x2001554c,0xaaaaaaa8,0xaaaaaaaa,0xfffe80aa,0xffffa803,
0xbefffd80,0x807ffdc0,0x8003e26a,0x4c001ff8,0x800001aa,0x0abcdcba,
0x0ccc0000,0x20000ccc,0x4cc40998,0x20ccc400,0x3ee01998,0xb13f72ef,
0x15550fff,0x2a02aaa0,0xfa8006ff,0x5555546f,0xaaaaaaaa,0x5551aaaa,
0x55440005,0x12ffd40a,0x55510fff,0x55555555,0x01555555,0x002aa980,
0x05553000,0x002aa880,0xaa82aa88,0xaaaa880a,0xaaaaaaaa,0x000aaaaa,
0x003fffe2,0x002ffe80,0x003fffe0,0xffffff98,0xffffffff,0x7fe41fff,
0x3fea001f,0x1fffd85f,0xf807ffa0,0x54004ebd,0xaa98007f,0xf9300002,
0xffffffff,0x0d54c05f,0x00555500,0xaa98d54c,0x2aa88000,0x22aa8800,
0x47ee2ffe,0x7f41fff8,0x05ffd02f,0x5000dff5,0xfffe8dff,0xffffffff,
0xf53fffff,0x3a0009ff,0x5ffa86ff,0x3e61ffe2,0xffffffff,0xffffffff,
0x7fffc001,0xff800000,0x3ea000ff,0x7d4003ff,0x82ffe85f,0xfffffff9,
0xffffffff,0x7fc001ff,0x3a0000ff,0xf50002ff,0x4c007fff,0xffffffff,
0xffffffff,0x13ffe21f,0x0bfff200,0xfb80bffb,0x0b6e202f,0x0017f600,
0x0003fffe,0xffffff70,0xbfffffff,0x00dff501,0x800ffffc,0x3ffb3ffd,
0x0fff3000,0x7cdff500,0xd87ee0ff,0x17ff43ff,0xfa82ffe8,0xffa8006f,
0x7fffff46,0xffffffff,0x3ff23fff,0x7fdc001f,0x25ffa80f,0xff987ff8,
0xffffffff,0x1fffffff,0x3fffea00,0x7d400003,0x2a003fff,0x2000ffff,
0xffe85ffa,0xfffff982,0xffffffff,0x2001ffff,0x003ffffa,0x000bffa0,
0x037ff7ec,0x999fff30,0x99999999,0x7fdc1999,0xffb0000f,0x403ffd8b,
0x00003ffb,0x5000bfe0,0x0007ffff,0x5e7fffe4,0xffdb9889,0x7ffc40ef,
0xffffa800,0x23fff004,0x98001ffd,0xfa8007ff,0xb8dff36f,0x7f40621f,
0x05ffd02f,0x5000dff5,0xcccb8dff,0xcccccccc,0x223fffec,0x26006fff,
0x00003fff,0x6667ffcc,0xcccccccc,0x36000ccc,0x0006ffef,0x37ff7ec0,
0xbffff500,0x42ffd400,0xff982ffe,0xcccccccf,0x0ccccccc,0x3ffbf600,
0x3ffa0006,0xcff88002,0xf3002ffc,0x3a0000df,0x2a0003ff,0x3ff60fff,
0xba7fd402,0x665400cc,0x001ff301,0x06ffefd8,0x1dfff700,0x09fff700,
0xf9005ffd,0xf300dfff,0x00ffecff,0x003ffcc0,0xff8b7fd4,0x4007ee0f,
0xffd02ffe,0x00dff505,0x000dff50,0xa85fff98,0xfd003fff,0x300000bf,
0x00000dff,0xff99ff10,0x3e200005,0x002ffccf,0x07fffff5,0x3a17fea0,
0x6ff982ff,0xf8800000,0x002ffccf,0x0005ffd0,0xbff35ff7,0x01bfe600,
0x07ffe200,0x2fff9800,0xf5007ff6,0x003ffa9f,0x3ee07ff7,0x67fc4006,
0x44002ffc,0x4c004fff,0x7fe40fff,0xfdefe804,0x27fdc00f,0x30003ffb,
0xf5000fff,0x717ff4df,0x3ffa003f,0x505ffd02,0xf5000dff,0x744000df,
0xffb00eff,0xfffb801f,0xf9800000,0x8000006f,0x5ff9affb,0x5ff70000,
0x2a00bff3,0x00ffffff,0xfe85ffa8,0x06ff982f,0xffb80000,0x0005ff9a,
0xd0005ffd,0x007ff4ff,0x00037fcc,0x0007ffcc,0xfd8fffe0,0xa7fd401f,
0x7dc00ffe,0x009fb03f,0xff9affb8,0x37fec005,0x43ffd800,0x7c406ff9,
0x402ffbcf,0x3ff62ffd,0x7ff98001,0x26ffa800,0x3f73fffc,0x40bffa00,
0xffa82ffe,0x6ffa8006,0x3fffa000,0x1bffe200,0x702fff88,0xcca80199,
0x000dff31,0x74ffd000,0xe80000ff,0x003ffa7f,0x3ffb7fea,0x85ffa805,
0xff982ffe,0xe8000006,0x003ffa7f,0x000bffa0,0x7fe4bff3,0x06ff9803,
0x07ffa800,0x24ffe800,0x7d401ffd,0x801ffd4f,0xff883ffb,0xd3ff4002,
0x3e2001ff,0xf30001ff,0x80fff07d,0x5ff8affb,0xfb07ffc0,0xff30003f,
0xdff5000f,0xfdefffd8,0x05ffd001,0x3ea0bffa,0xffa8006f,0xfffb0006,
0x7fff5005,0xe817ffa0,0x7fdc00ff,0x000dff33,0x25ff9800,0x40003ffc,
0x3ff25ff9,0x9cffa803,0x7d403fff,0x82ffe85f,0x00006ff9,0xf92ffcc0,
0xffd0007f,0x2ffd8005,0x2601ffe6,0xb80006ff,0xc80006ff,0x07ff65ff,
0x3fa9ff50,0x1ffdc00f,0x26003fd4,0x0fff25ff,0x003ffdc0,0x1ffd8020,
0x7fe9ff60,0xfb1bfe20,0x3bfb263f,0x07ff982c,0xd86ffa80,0x2dffffff,
0xe817ff40,0x6ffa82ff,0x06ffa800,0x03fffb80,0x703fff60,0x7f401fff,
0x9ffdc00f,0x00006ff9,0xf317fec0,0xfd8000ff,0x01ffe62f,0x7fe53fea,
0x17fea00f,0x3e60bffa,0x4000006f,0x3fe62ffd,0x2ffe8007,0x03ffe200,
0xf9805ffd,0xfb80006f,0xfd80006f,0x007ff64f,0x3ffa9ff5,0x41ffdc00,
0x7ec005fc,0x01ffe62f,0x0002ffec,0x407ff700,0x07ff25ff,0x3f627fdc,
0xfffffc9f,0x3ffcc4ff,0x837fd400,0xffffffda,0x05ffd01e,0x3ea0bffa,
0xffa8006f,0x7ffcc006,0x7ffc4005,0x00bffe25,0xfb801ffd,0x00dff33f,
0x7ffc4000,0x0017ff40,0x740fff88,0x7fd402ff,0xa817ffa4,0x2ffe85ff,
0x0006ff98,0x03ffe200,0xe8005ffd,0x3ee002ff,0x05ffb84f,0x00037fcc,
0x0003ffd4,0xffb1fff4,0xd4ffa803,0xffb801ff,0x2003fe83,0x7f40fff8,
0x4fff802f,0x3e600000,0x47ff305f,0xffb03ffa,0xffeffd83,0x4ffffdcf,
0x2001ffe6,0x6c406ffa,0x83ffffff,0xffd02ffe,0x00dff505,0x400dff50,
0x0006fff8,0x3f65fff5,0x0ffe804f,0xf99ffdc0,0x2000006f,0xffb84ffb,
0x9ff70005,0xa80bff70,0x3ffe64ff,0xd0bff503,0xdff305ff,0x7dc00000,
0x05ffb84f,0x0017ff40,0xff103ffd,0x7ffcc01f,0xffffffff,0x262fffff,
0x40000fff,0x3ff61fff,0xea7fd401,0x7fdc00ff,0x000ffc43,0xff709ff7,
0x05fff00b,0x7ff80000,0x7c43ff90,0xb0ffd06f,0xc883ffff,0xfff30fff,
0x55555555,0xdff95555,0xfd53f700,0x2ffe83ff,0xf505ffd0,0xff5000df,
0x7fff400d,0x3ff60000,0xd006ffae,0xffb801ff,0xffffff33,0xffffffff,
0xffd005ff,0x01fff103,0x103ffd00,0x7d401fff,0x07ffe44f,0x7f42ffd4,
0xffff982f,0xffffffff,0xe802ffff,0xfff881ff,0x0bffa000,0xb037fcc0,
0x7fcc09ff,0xffffffff,0x22ffffff,0x0001fff8,0xfd83ffe2,0xa7fd401f,
0x7dc00ffe,0x0037dc3f,0x3e207ffa,0x3fe200ff,0xaaaa801f,0x80aaaaaa,
0x6fe81ffd,0x7c40ffe8,0x1fffd85f,0x7cc7ffa0,0xffffffff,0xffffffff,
0x21fb806f,0x7ff46ffd,0x505ffd02,0xf5000dff,0x3ff600df,0x7c40001f,
0x001fffff,0xfb801ffd,0xfffff33f,0xffffffff,0xf9805fff,0x13ff606f,
0x40dff300,0x3ea04ffd,0x86ffe84f,0xffe85ffa,0xfffff982,0xffffffff,
0x7cc02fff,0x13ff606f,0x002ffe80,0x7d407ff9,0x3ffe607f,0xeeeeeeee,
0x6c1eeeee,0x2a0004ff,0x0ffec7ff,0x7f53fea0,0x1ffdc00f,0xf98013f6,
0x13ff606f,0x801fff88,0xffffffff,0x3ffb82ff,0x7dc27fc4,0x41ffd42f,
0x7dc04ffd,0xfffff32f,0xffffffff,0x00dfffff,0x3ffcc3f7,0x7f40bffa,
0x06ffa82f,0x806ffa80,0x0003fffb,0x09ffff50,0x2007ff40,0xfff33ffb,
0xdddddddd,0x803ddddd,0x3ea03ffc,0x7fe4007f,0x81ffea03,0xff984ffa,
0x42ffd43f,0xff982ffe,0xeeeeeeef,0x01eeeeee,0xf501ffe4,0x7ff400ff,
0x01fff002,0xf302fff8,0x2a0000df,0x0e201fff,0xfb13ffe2,0x4ffa803f,
0xfc801ffd,0x0017fc3f,0x7d407ff9,0x0fffc07f,0x7fffffc0,0xf982ffff,
0x417fd44f,0x7fe44ff9,0x403ffd81,0xfff33ffa,0x99999999,0xdffb9999,
0x20fdc098,0x3ffa1fff,0x305ffd02,0xf7000fff,0xfff980bf,0x7ec00005,
0x7ff4006f,0x99ffdc00,0x000006ff,0xff801fff,0x3ffe002f,0x817ffc00,
0xff904ffa,0x42ffd41f,0xff982ffe,0xff000006,0x2fff801f,0x005ffd00,
0xfffffff5,0xbfffffff,0x001bfe60,0x205ffe80,0x3ff63ffa,0x3ea0000e,
0x801ffd4f,0x3fe63ffd,0x03ffe000,0x7405fff0,0xaaa802ff,0x2ffeaaaa,
0xffc8dff0,0xfe8dff00,0x805ffb07,0xfff34ffa,0x2dff5000,0x0fdc3ffc,
0xffe87ffa,0x305ffd02,0xf9000fff,0x7ffc40bf,0xfb800006,0x7ff4005f,
0x99ffdc00,0x800006ff,0xfffffffa,0x5fffffff,0xfffff500,0xffffffff,
0x13fea0bf,0x3ea6ffe8,0x82ffe85f,0x00006ff9,0xffffffa8,0xffffffff,
0x05ffd005,0xffffffb0,0xffffffff,0x0dff303f,0x7ffcc000,0x9ffff904,
0x80005fff,0x3ffb4ffa,0x323ffe80,0x3fea006f,0xffffffff,0x3605ffff,
0x740004ff,0x1ff902ff,0xffb037fc,0x6c13fe21,0x7fd401ff,0x000fff34,
0x3feadff5,0xff10fdc6,0x817ff41f,0xff882ffe,0x4ffc8007,0x003fffa0,
0x17fee000,0x801ffd00,0xdff33ffc,0xffb00000,0xffffffff,0x003fffff,
0xfffffffb,0xffffffff,0x409ff503,0xff53fff9,0x305ffd0b,0x00000dff,
0xfffffffb,0xffffffff,0x05ffd003,0xcccfff88,0xeccccccc,0x6ff984ff,
0x7fe40000,0xffc881ef,0x80004fff,0x7ffb3ffa,0xd1fffcc0,0x7fec007f,
0xffffffff,0x501fffff,0xe8000fff,0x5ff502ff,0xfb80ffe6,0x205ff52f,
0x7d401ffd,0x00fff34f,0x3e2dff50,0xb87ee1ff,0x17ff46ff,0xff02ffe8,
0xffe8003f,0x03fff903,0x3fee0000,0x07ff4005,0x7ccfff60,0x4400006f,
0xcccccfff,0xffeccccc,0x67ffc404,0xcccccccc,0xfa84ffec,0x7ffe404f,
0xfe85ffa8,0x06ff982f,0x7ffc4000,0xcccccccc,0x804ffecc,0x7dc02ffe,
0x3fee005f,0x006ff987,0xffffc800,0xffecabce,0x80003fff,0xfff72ffc,
0x7ffff101,0x44007fe2,0xcccccfff,0xffeccccc,0x07fff104,0x817ff400,
0x3ff74ff8,0xfc9ffc40,0x03ffb00f,0xff34ffa8,0xdff5000f,0x3f72fff4,
0xfd0fffa6,0x0bffa05f,0x30027fec,0xff703fff,0x4000007f,0x6c005ffb,
0x7ff401ff,0x000dff33,0x005ffb80,0xf701ffee,0x7fdc00bf,0x804ffa87,
0x5ffaeffe,0xf982ffe8,0x5c00006f,0x3ee005ff,0x2ffe807f,0x0017ff40,
0xf985fff1,0x5000006f,0xffffffff,0xdfffffff,0xfeba8003,0xdfff10ff,
0xfdff9537,0x801fea7f,0x2e005ffb,0x3ff207ff,0xffd0001f,0xfdb7f405,
0xfd5fe807,0x00ffec0d,0x7fcd3fea,0x6ffa8007,0x32bbffe6,0x86fffcaf,
0xffd02ffe,0x0fffee05,0x4c3ffec0,0x00004fff,0x002ffdc0,0xf980fff6,
0x0dff33ff,0x2ffe8000,0x0bffe200,0x2002ffe8,0x7d42fff8,0xfff9804f,
0xffe85ffe,0x006ff982,0x017ff400,0x805fff10,0x3e602ffe,0xffc8007f,
0x0037fcc6,0x3ffaa000,0x88beffff,0x2005fffd,0x5c5ffffe,0xffffffff,
0xbfb3ff9c,0x017ff400,0x405fff10,0x2001effe,0x202fffc8,0x05ff8ffc,
0x4ff8ffc8,0x5007ff60,0x1ffe69ff,0x31bfea00,0xffffffff,0xffd01dff,
0x40bffa05,0x00afffe8,0x885fffb1,0x00005fff,0x005ffb80,0x4407ffdc,
0xff33ffff,0x7cc0000d,0xffc8007f,0x00fff306,0xfa8dff90,0xfff9004f,
0x5ffd0bff,0x000dff30,0x003ffcc0,0x3a037fe4,0x3ff202ff,0xfff98004,
0x001bfe61,0x554c4000,0x0dfd5009,0x827fffc0,0x3effffe9,0x06aa7ff3,
0x003ffcc0,0xf3037fe4,0x20159fff,0x1fffffb8,0x3feffea0,0xfbffa802,
0x07ff601f,0x3e69ff50,0xffa8007f,0xffffd986,0x3fa03fff,0x05ffd02f,
0x77ffffd4,0xffffedcc,0x00effe85,0xffb80000,0x7ffc4005,0xeffca9be,
0x0dff33ff,0x27fe4000,0x0fffcc00,0x40027fe4,0x3ea1fff9,0x3ffa004f,
0x2ffe85ff,0x0006ff98,0x0013ff20,0xe807ffe6,0x3ffe02ff,0x9ffd0001,
0x7777ffcc,0xeeeeeeee,0x00005eee,0x040015c0,0x00015300,0x009ff900,
0x403fff30,0xefffffe9,0xfffffdcc,0x7fc400df,0xf8800ffe,0x7ec07fef,
0xa7fd401f,0xa8007ff9,0x7ecc06ff,0x2ffe801b,0x9805ffd0,0xffffffff,
0xfa84ffff,0xeeeeeeff,0xeeeeeeee,0x3fee005e,0xfffb8005,0xf9cfffff,
0xddfff33f,0xdddddddd,0xff8bdddd,0xffd0001f,0x003fff09,0xfa93ffa0,
0x3fe6004f,0x2ffe85ff,0xeeefff98,0xeeeeeeee,0x7ffc5eee,0x9ffd0001,
0xa817ff40,0x2e0006ff,0x3ffe67ff,0xffffffff,0x06ffffff,0x00000000,
0x00000000,0x8000fffc,0x6c404ffe,0xffffffff,0x001effff,0x801bfffa,
0x6c05fffe,0x7fd401ff,0x000fff34,0xf700dff5,0x0bffa003,0x44017ff4,
0xffffffeb,0xfff501cf,0xffffffff,0xffffffff,0x02ffdc00,0xffffe980,
0x267ff33e,0xffffffff,0xffffffff,0x01bfea6f,0x547ffb80,0x2e0006ff,
0x13fea7ff,0x0bfff900,0xff305ffd,0xffffffff,0xdfffffff,0x00037fd4,
0x7f40fff7,0x09ffb02f,0x9fffc400,0xfffffff9,0xffffffff,0x000006ff,
0x00000000,0x3fea0000,0x3fee0006,0xffd71007,0x059dffff,0x09fff900,
0x01fffdc0,0xf5007ff6,0x01ffe69f,0x201bfea0,0xffd001fb,0x00bffa05,
0x03355310,0xffffff50,0xffffffff,0x400fffff,0x80005ffb,0xff9800a9,
0xffffffff,0x6fffffff,0x80013ff6,0x3f63fff8,0x3e20004f,0x09ff53ff,
0xd0bffd00,0xfff305ff,0xffffffff,0x4dffffff,0x20004ffd,0x0003fff8,
0x00000000,0x00000000,0x00000000,0x7fec0000,0x3fe20004,0x54c4003f,
0xf980001a,0x3e6001ff,0x7fec01ff,0x9a7fd401,0xfa8007ff,0x00ca806f,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x35550000,0x00000000,
0x01000000,0x000aaa20,0xaa98aaa2,0x44155501,0x2a6002aa,0xba80000a,
0x000accdc,0x23553000,0x731002aa,0x700579b9,0x35530399,0x2200aaa8,
0x0d54c2aa,0x4c000000,0x540000aa,0x2aaa01aa,0x15550000,0x00aaaa00,
0xd503dd30,0x0000000b,0x002aa600,0x006a2055,0x00d4c0aa,0x8006aa20,
0x15542aa8,0xcb800000,0x0003cefe,0x0007ffea,0x566e6544,0x4405f101,
0x322cefda,0x6ff5402c,0x037fd401,0xf737fd40,0x97fee09f,0xea803ffd,
0x00dfffff,0x7ffff540,0x001cffff,0x45ffdc00,0x7f4407ff,0xffffffff,
0x20bffa03,0xff70fff9,0x27ffd00b,0x6c00fff8,0xffffffff,0x3ee02fff,
0x004effff,0x00ffffc8,0x20005ffd,0xf9801fff,0x7d4002ff,0x406fd80f,
0xceffedb9,0xf7000002,0x81ff807f,0x1ff802fe,0xf9002fe8,0x007fffff,
0x7fc4dff3,0x65499707,0x2602cefe,0xfffffffe,0xffe8000e,0xffda8002,
0x2fffffff,0x7e41bfa2,0x8cffffff,0x2be204ff,0x7fd405c8,0x6ffa8006,
0xfd813fee,0x804ffabf,0xfffffffb,0xfe8800ef,0xffffffff,0x00003fff,
0x3fe2ffee,0x3fffee07,0xffffffff,0x02ffe81f,0xdff1bff7,0x1fff1001,
0xff005ffb,0xffffffff,0xffd105ff,0x1dffffff,0x3f7fea00,0x2ffe80ef,
0x03fff000,0x0009ffb0,0x13fa0df9,0xffffffc8,0x0000dfff,0xfb555551,
0x3f2055bf,0x0ffc98ae,0x98aefc80,0x74400ffc,0xffffffff,0x9bfe600e,
0xffb07ff8,0x3ffffff2,0xefffa85f,0x1fffecbc,0x013fea00,0x3fffff20,
0xefffffff,0xfb80efea,0xffdcbdff,0x16e04ffe,0x37fd401f,0x737fd400,
0x7f4409ff,0xfa806fff,0xfda89bff,0x3fa200ef,0xa989beff,0x004fffeb,
0xd17ff700,0xfffb10ff,0x3b2a157d,0x7641ffff,0x3fff601f,0x3ea000ff,
0x8803ffff,0xeeeeefff,0xfd82eeee,0xfeb89cff,0x7fc400ef,0xe85ffa8f,
0xff0002ff,0x6ff8803f,0x109fd000,0x3ffa05ff,0xffecbcef,0xff30005f,
0xffffffff,0x3fffa20d,0xd1002fff,0x05ffffff,0x8bdfff88,0x205fffd9,
0x3fe26ff9,0xff9ffb07,0x9ffffbbf,0xc81fffc4,0x3fa006ff,0x7ff44006,
0xb530abef,0x01ffffff,0xf505fff3,0x35409fff,0x7fd401f1,0x6ffa8006,
0xf3013e62,0xff001fff,0x13ff605f,0x802fffd8,0x0003fffc,0x1763ffb8,
0x2013fff2,0x541ffff9,0x3ffa200f,0xffc8002f,0x9ff5005f,0x3ffee000,
0x807ffd00,0x3ff62ffe,0x0017ff43,0x6401fff8,0xff0000ff,0x503ff307,
0x3ee01dff,0xe98001ff,0xeffeeeee,0x6f64c05e,0xec98000a,0xffc800ad,
0x03fff105,0xfffb0000,0xfffc817d,0xc809ff90,0x133003ff,0x4fffd800,
0x3fffea80,0x5405fff0,0x6fc04fff,0x7fd404eb,0x6ffa8006,0x4c401fcc,
0x5ffb8009,0xf883ffc0,0x3ea003ff,0x5c0001ff,0xf313e3ff,0x7cc005ff,
0x403646ff,0x20000998,0x3ee00199,0xffd0002f,0x02ffdc09,0x99883331,
0x0017ff41,0x4401fff8,0xff300009,0x3a0ff703,0x7ffc02ff,0x3ee00002,
0x0000003f,0xfff88000,0x013ff200,0x3fff6000,0x22bffa01,0xffa807ff,
0x81980007,0x2002fffb,0xf986fffc,0x4ffe806f,0x4016dc40,0xa8006ffa,
0x00fd46ff,0x17ff4000,0x320bff20,0xfd8006ff,0x7dc0005f,0xfd83fb3f,
0xffa8005f,0x0007f53f,0xd8000000,0xf88000ff,0x7ffc00ff,0x7f400000,
0xfff0002f,0xa8000003,0x05fd80ff,0xff900b97,0x7dc00007,0x0000003f,
0x2ffc8000,0x001ef4c0,0x027fec00,0x3feafff2,0x01fff005,0x37bfb6e2,
0xff83ff12,0x3fee004f,0x7fd42fff,0x04ffb803,0x37fd4000,0x337fd400,
0x76dcc09f,0x3e02ceff,0x7fd400ff,0x003fdb85,0x200fff98,0x71cefda8,
0xf50767ff,0x2e0003ff,0x804fbeff,0x02defeb9,0x33bfb2e0,0x007fe803,
0x7fc00cc0,0xefeb9807,0x05ffd02d,0x807ffe00,0x02defeb9,0xffd99995,
0xdff99999,0x32000399,0x2a2003ff,0xff71cefd,0xfedb9807,0x2e002cef,
0x403cefec,0x200006ff,0xceffedb9,0x807ffb02,0xeffbbffb,0xcccccccc,
0xfa81ffec,0xffffffff,0x7ffd45fe,0x97ff5000,0x2ffc8dff,0x304ffa80,
0x59dffdb7,0x001bfea0,0x3f2bbfea,0x3ffff204,0x40dfffff,0xf8806ff9,
0xd000007f,0x3ff207ff,0xfbbfffff,0x17ff203f,0xffff9800,0x7fffdc02,
0x200effff,0xffffffe9,0xbff100ef,0xf3000000,0x7ffdc0bf,0x40efffff,
0xf0002ffe,0xfff703ff,0x81dfffff,0xfffffffc,0xffffffff,0xba9803ff,
0x003ffffd,0xfffffff9,0x6407ff77,0xffffffff,0x3fa600df,0x0effffff,
0x0004ff88,0xffffff90,0xfd81bfff,0x67fd402f,0xfffffffc,0xffffffff,
0x677ffe42,0x86ffffeb,0xf3004ffd,0x87ffe69f,0xf9801ffd,0xffffc84f,
0x40dfffff,0xa8006ffa,0x202cefff,0xcbcefffe,0x7d45fffe,0x1fff005f,
0xffb00000,0x7bfff50b,0x7ffdffd9,0x001fff40,0x900fffe0,0xfb79dfff,
0xff501dff,0xffd979df,0x39ff303f,0x039dffdb,0x2fff8800,0x79dfff90,
0x741dfffb,0xff0002ff,0xefffc83f,0x0efffdbc,0x3ffbbbae,0xffeeeeee,
0xed982eee,0xffffffff,0xfffa803f,0xfeffecbd,0xdfffd03f,0xbfffd979,
0x33bffea0,0x41fffecb,0x32a23ff9,0xffe802bd,0xffecbcef,0x00ffec5f,
0x3ff73fea,0xffffffff,0x263fffff,0xfd983fff,0x17ffc0ff,0x3a2ffc40,
0x07ffa2ff,0xfd13fe60,0xfd979dff,0x6ffa8bff,0x06ffa800,0x700effa8,
0x7fdc3fff,0x01fff005,0xdff70000,0xb82fff98,0x3e03ffff,0x740002ff,
0x3fe604ff,0x4ffe883f,0xc81fffc4,0xeffb86ff,0xffffffff,0x3ae62003,
0xff303fff,0x9ffd107f,0x80017ff4,0x3fe61fff,0x4ffe883f,0x2e07fe60,
0x7ffec07f,0xfcbdffff,0x7ffcc03f,0x3ffffb81,0x700effa8,0xff883fff,
0x8dff903f,0xfff92ffa,0x2a01dfff,0xff700eff,0x00ffec3f,0x3ff33fea,
0x7ff40003,0xbffff103,0x200fffc4,0xffd86fe8,0x200bff63,0x3fea4ffa,
0x3fff700e,0x40037fd4,0xfe806ffa,0x17ffc02f,0x3a009ff7,0xffff51ff,
0xffffffff,0xffffffff,0x02ffe8ff,0x440fffee,0x40001fff,0x3f605ffc,
0x1ffea04f,0xfc809ff9,0x7fffe43f,0xffffdcdf,0xffff5004,0x27fec03f,
0x7f4fff50,0xfff0002f,0x5027fec3,0x3fdc0fff,0x3f605fd8,0x5c09bdff,
0x7ff403ff,0x0fffee02,0xff00bffa,0x04ffc85f,0xff71ffe4,0xffdfffb5,
0xffd03fff,0x22fff805,0x7d401ffd,0x004ffbcf,0xe81ffe60,0xf30fffcf,
0x7f4401ff,0x24ffc80e,0xfb803ffc,0x00bffa4f,0x7fd45fff,0x6ffa8006,
0xc805cb80,0x0ffee3ff,0xfa8fff40,0xffffffff,0xffffffff,0x3e27ffff,
0x3fff806f,0x001fff30,0x206ffb80,0x76c00fff,0x00fff10d,0xffe8fff5,
0xfffd881f,0xffffb801,0x1fff03ef,0xfd0ded80,0x3fe0005f,0x003ffe1f,
0x3f201bdb,0x2a09ff06,0x7ec01fff,0x1bfe203f,0x2e0fffe0,0x3ffc805c,
0x2a01ffe2,0x3bff27ff,0x7ff542ff,0xc805cb86,0x07ff63ff,0xff39ff50,
0x42b2e00d,0xdf904ffb,0x7fd47ff6,0x807fec07,0x3fea6ffb,0x24ffe806,
0xffc805cb,0x001bfea3,0x0001bfea,0x7dc7ff90,0x3ffd003f,0x3bbbffe6,
0xeeeeeeee,0x7ffeeeee,0x3200ffea,0xfff503ff,0xdff70000,0x0017fe20,
0xf802ffd4,0x077720ff,0x300dffb0,0xbfff9533,0x0005ff88,0x20005ffd,
0xbff11fff,0x13fa0000,0x7dc0bfe2,0x3ffe804f,0x200ffea0,0x40003ffc,
0x3fea3ffc,0x21fff005,0x100ffffc,0x40007ffd,0x3ff63ffc,0xfa7fd401,
0x7fdc02ff,0x505ff90f,0x4ffee1ff,0x3f207ffa,0x17fee01f,0x7cc05ffd,
0xf90004ff,0x037fd47f,0x0037fd40,0xfffb7530,0x027fdc7f,0xff11ffe8,
0x7d40001f,0x00ffee6f,0x7cc0ffee,0x640000ff,0x9ff505ff,0x3bfee000,
0xcccccccc,0x0001ffec,0x0001fff1,0x7d47fff3,0xffd0004f,0x3ffe0005,
0x0009ff51,0x3ea0ffe0,0x07ffb00f,0x204fff98,0xfb802ffb,0x2ea6003f,
0x2e3ffffd,0xccccceff,0x1ffecccc,0xa805fff9,0x753007ff,0x6c7ffffb,
0x7fd401ff,0x203fff54,0x3f64fff8,0x70ffcc1f,0x1ffe69ff,0x36017fe4,
0x7ffd45ff,0x4ffffa82,0xffdba980,0x1ffe63ff,0x017fee00,0xffffed98,
0x2a3fffff,0xfff004ff,0x000fffc1,0x7e4bff90,0x3ffa802f,0x005fff10,
0x704ffd80,0x320007ff,0xffffffff,0x2fffffff,0x0bffa000,0x73ffdc00,
0x3a0007ff,0xff0002ff,0x00ffee3f,0x7fd4cc40,0xffc9999a,0xff909999,
0x7fffcc0f,0x00bff604,0xd980ffea,0xfffffffe,0x3fff23ff,0xffffffff,
0xff72ffff,0x03ffe00f,0x3ffffb66,0x363fffff,0x7fd401ff,0x273fffa4,
0x0efffca8,0xfe887ffa,0xf8a7fdc3,0x17fdc0ff,0x6c27ff40,0xfeccefff,
0xd984ffff,0xfffffffe,0x1ffe63ff,0x017ff200,0x7fffffec,0x23ffcbdf,
0xff005ff9,0x01fff41f,0x6c9ffb00,0xff9801ff,0x00fffa03,0x207ffd00,
0xb0003ffc,0xffffffff,0x7fffffff,0x1ffec000,0x21fff000,0xd0003ffc,
0x3e0005ff,0x07ff91ff,0x3ffff200,0xffffffff,0xf33fffff,0x75115bff,
0x409fffff,0xf9801ffd,0xffffb03f,0xff97bfff,0x7ffffec7,0xffffffff,
0x0dff53ff,0xfb07ffa0,0x7bffffff,0x7fec7ff9,0x127fd401,0xfffffffb,
0xffd81fff,0x3f217f63,0xa8bffe3f,0xfff003ff,0x3fffee05,0x4ffacfff,
0x7fffffec,0x23ffcbdf,0x4000fff8,0xfd804ffc,0x5c09bdff,0x17fe23ff,
0xfb1ffe20,0x7fc0009f,0x00bff23f,0xfc80ffea,0x3e60005f,0x7ff700ff,
0x0fff2000,0xfb000000,0x7f40007f,0x007ff72f,0x220bffa0,0xb8fffc00,
0xf90003ff,0xffffffff,0xffffffff,0x7ffffe47,0xff8cffff,0x00bff206,
0x3f60ffea,0x5c09bdff,0x0fff23ff,0x06ff9800,0x7ec3ffb0,0x5c09bdff,
0x07ff63ff,0xd509ff50,0x07ffffff,0x77dd7fee,0x321ffd80,0x09ff35ff,
0x803ffea0,0x51cefdb9,0x7ffec7ff,0x7fdc09bd,0x000fffc3,0xf500fffa,
0xffd803ff,0x5403ffc3,0x7ffcc5ff,0xfffb8001,0x200ffea0,0x3e603ffb,
0xfd0002ff,0x27fd40bf,0xfb84d440,0x2e60004f,0x3ffd002c,0x7400f726,
0x09ff51ff,0x3fa13510,0x81bfe22f,0xff50fff8,0x21351009,0xaadffaa9,
0xaacffbaa,0x7ff541aa,0x3f61dfff,0x07ff501f,0xfa87ff70,0x7fec01ff,
0x0013fee3,0xd007ff98,0x0fffd4ff,0xfd8fff60,0x27fd401f,0x5003bea0,
0x03ff3dff,0xff883ffa,0x2005ffaf,0x40005ffe,0xfff53ffb,0x43ffd803,
0x26004ffd,0x7dc01fff,0x3ffe804f,0x32017fec,0x5ffd83ff,0x1fffc400,
0x36017fe2,0x7fec03ff,0xfffa8006,0x01bfe602,0x7fccffee,0x21597006,
0xf8806ffa,0x0dff50ff,0x7ccfff10,0x3ffb806f,0x7ff85ffd,0x4c3ffe20,
0xffb806ff,0x5417fc43,0x262000ff,0x403fb01a,0xfd805ff8,0x027fdc3f,
0xff31fff4,0x82b2e00d,0xff801ffe,0x2013fee6,0x19803ffe,0x013ea000,
0x0fffffe2,0x7e437fdc,0x2e006fff,0x4d441fff,0x72ffc800,0xffd009ff,
0x03fffb87,0xb00fffb0,0xff9807ff,0x02ffcc4f,0x3e603ffe,0xfb1003ff,
0x3fff01ff,0x01fffcc0,0x0037ffe2,0x402fffd4,0x7f402ffe,0x00bffe1f,
0x3e21fff7,0x7fe401ff,0x200fffc5,0x7ff46ffc,0xe8fff402,0x17ff42ff,
0x7f46ffa8,0x0fff402f,0x3f207fe6,0x7f800007,0x201fff80,0x7ec3fff9,
0x7ffcc03f,0x2017ffc4,0x3ea0fffb,0x27fdc05f,0xf9807ffb,0x7fcc04ff,
0x3fb8004f,0x0bfff900,0x2207ffe6,0x5000ffff,0xff109fff,0x0fff980d,
0xf9807ffb,0xfffe84ff,0xfffb100a,0x0fff9005,0x427fffcc,0xffb02ffe,
0x6fffec09,0x3fffa600,0x01dff503,0x007fffb1,0x805ffff5,0x800ffffc,
0xf700effa,0x1fffa8df,0xd89fff10,0xff500eff,0x0effc81f,0xa83fff50,
0xff700eff,0x3217ff4d,0x7fc41eff,0x077fd44f,0xfb86ffb8,0x000bfb07,
0x400ff880,0xd880effb,0x7fe43fff,0x3fffe607,0x80fffd44,0xfe84fff8,
0x3fff304f,0xf303ffe4,0xc8809fff,0x64003ffe,0xfff1006f,0xff9315bf,
0x7fff409f,0x3ff6201e,0x0fffe06f,0xf92fff44,0x7ffcc0ff,0xffffa84f,
0xffedccef,0xff3005ff,0xf75115bf,0xf509ffff,0xfb5139ff,0xffc801ff,
0xecaacdff,0x6403ffff,0xea88bfff,0x5003ffff,0x57bdffff,0x1dffffb9,
0x5fffec00,0x0fffeb89,0x89cfffe8,0x40efffca,0x8adfffe8,0x883fffc9,
0x989cfffe,0xfb04fffc,0xfd7137ff,0x17ff41ff,0x2fbfffe2,0xd80efffd,
0xeb89bfff,0x6fc80fff,0x00007ff0,0xc8087ff0,0xea88bfff,0x7cc3ffff,
0xba88adff,0xe84fffff,0xca89cfff,0xfa80efff,0xfb98adff,0x7ffcc2ff,
0xffba88ad,0x3a004fff,0x7fcc007f,0xfa83ca9d,0xffffffff,0x3ff605ff,
0xabceffff,0x0effffdc,0x33bffee0,0x45fffdba,0x88adfff9,0x4fffffba,
0xffffff50,0x09ffffff,0xfffffc80,0xff8cffff,0xfffff506,0x2003ffff,
0xfffffffb,0x001effff,0xfffffffb,0x4007ff5d,0xffffffe9,0x005fffff,
0xfffffd88,0xb102ffff,0xffffffff,0x3fa601ff,0xffffffff,0x3fffa602,
0x04ffffff,0x3fffff62,0x7f42ffff,0xffffb82f,0x100fffff,0xfffffffb,
0x13fa05ff,0x0000bfe2,0x3b3bff20,0xfffffb07,0x07ff5dff,0xfffffff9,
0x0dff19ff,0xffffffb1,0x5401ffff,0xffffffff,0xffff903f,0xf19fffff,
0x5cc440df,0xfe8005ff,0x7c44ffff,0xffffeaaf,0x3ff201ef,0xfffffe99,
0x04ffffff,0xffffff90,0x3f20bfff,0xffffffff,0x2206ff8c,0xffffffeb,
0xd50001cf,0x43bfffff,0xfd301ffd,0x0019ffff,0xffffec98,0x4000cdff,
0x8dffffdb,0xa8003ff9,0xfffffffd,0x7540001c,0x00dfffff,0xfffffea8,
0xfff7003f,0x2003bfff,0xeffffffb,0xfffd5001,0xffd01bff,0x3fffa605,
0xea801dff,0x00dfffff,0xff505ff1,0xf3000001,0x5c0dffff,0xa8dffffd,
0xffd503ff,0x7ec3bfff,0xfffd501f,0x22007fff,0x2dfffffd,0x7ffff540,
0x07ff61df,0x0ffffffc,0x77f5c400,0x22274c0b,0xffa801a9,0x7ffff542,
0x4000cfff,0xbdfffec9,0x7fff5401,0x3ff61dff,0x9aa98801,0x26200001,
0x5300001a,0x22000013,0x2000009a,0x2000001a,0x00009aa9,0x00035300,
0x80004d4c,0x20000a98,0x40001aa8,0x200001a9,0x20000a98,0xaa8801a9,
0x0002a980,0x00de5400,0x44000350,0x300001a9,0x44000135,0xa988001a,
0x3ffa0001,0x000001de,0x77000008,0x009a9880,0x40002000,0x00001a98,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0xa8000000,0x0002bddc,
0x01aaa880,0x542aa880,0x5553002a,0x55544000,0x02aaa800,0x026aa200,
0x00154400,0x2aa15544,0x00000002,0x00005553,0x20035551,0x7000aaa9,
0xcca80199,0x05553001,0x83553002,0x00000aaa,0x5506aa60,0x03cc9815,
0x51059930,0x002aa855,0x0001554c,0x800d5544,0x0000aaa9,0x2a200000,
0x001acdcc,0x79b97500,0x88000015,0x200001aa,0xfffffffb,0x3200002e,
0xa8000eff,0x1ffe25ff,0x13fffe20,0x037fec00,0x002fffa8,0x7fffffd4,
0xfff7001e,0x30017bff,0x07ff8dff,0x5439fb50,0xfff1005f,0xfb8000bf,
0xfd1000ff,0x3ffa009f,0x01ffdc00,0x2e5ffd88,0x7ffc405f,0x300dff51,
0x079dffd9,0xf51fff88,0x03ffe0df,0x2607ff60,0x1ffe26ff,0x5ffff880,
0x7ffdc000,0x9fff1000,0x7f5cc000,0x6d4002de,0xffffffff,0xfc88002e,
0xffffffff,0x4388001c,0x27975ffa,0x200bdfd8,0xfeeffffc,0x80002fff,
0x0001fff8,0x7fc4bff5,0xfdffe807,0x7fcc002f,0x3fee000f,0x3fff6005,
0x03ffffff,0x3fffffa2,0x4c01ffff,0x03ffc6ff,0x7fffffd4,0xfb002ffd,
0x0007ffbf,0x20017ffc,0xe800fff9,0x7fdc00ff,0x77fe4003,0xfa804fff,
0x00fff8ef,0x7fffffec,0x3ea00eff,0x00fff8ef,0xf8807ff9,0x4dff306f,
0x36007ff8,0x003ffdff,0x0007ffe0,0x8001fff3,0xfffffffb,0xffd800ef,
0xffffffff,0x3ee005ff,0xebacefff,0x2004ffff,0xaffd45fb,0xffffd6fd,
0x33ffea09,0x07fff661,0x07ff7000,0x12ffd400,0xffc80fff,0x4003ffd4,
0xd8002ffd,0xffb801ff,0xffeb8adf,0x7fffd01f,0x3fff9313,0x3e37fcc0,
0x9cfd807f,0x00fffffc,0xffd4ffc8,0x7ff70003,0x13fea000,0x7003ffa0,
0xe88007ff,0x2000cfff,0x01fffffc,0x5e77ffe4,0x200ffffd,0x01fffffc,
0xf501bfe6,0x9bfe607f,0xf9007ff8,0x007ffa9f,0x000ffee0,0x90027fd4,
0xfb79dfff,0x3a201dff,0x261aefff,0x404fffea,0x00adffd8,0x01dff951,
0x74c5ff98,0xffbdfb5f,0x3fe03fff,0x17ffa04f,0x04ff8800,0x54000000,
0x3ffe66ff,0x03ff8800,0x1017fa00,0x3f205fff,0x1fffb86f,0x000bff50,
0x981db000,0xfff5002c,0x003ffe61,0x8000bfd0,0x7f400ffc,0x1ffdc00f,
0xffffc980,0xffd8005f,0x7ffc403f,0x03ffe880,0x401ffff4,0x3f601ffe,
0x4000000f,0xff30effa,0x5fe8001f,0x07fe4000,0x41fffcc0,0xfb04ffe8,
0xff9005ff,0x17fec07f,0x01bfa600,0x4fe0bff3,0xa8aefffd,0x01fff303,
0x0003ffd4,0x00000066,0x10266200,0x33100133,0x01988000,0xf3037fd4,
0x3fff81ff,0x0017fec0,0x80000000,0x4cc40998,0x000cc000,0x74009980,
0x7fdc00ff,0x3eff9803,0x88005ff9,0xffa80199,0x01bfea04,0x2e003331,
0xdff104ff,0x31000000,0x00998813,0x80000cc0,0xffd80099,0x21ffea04,
0x2001fffb,0xff707ffc,0xfd100c01,0x42ffcc0b,0x3fffb2f9,0x017fea00,
0x000033ba,0x00000000,0x00000000,0x7ff90000,0x262ffe80,0xff9806ff,
0x00000004,0x00000000,0x80000000,0x7dc00ffe,0xb05b003f,0x000001ff,
0x2602ffd4,0xf1000000,0x0bfee0ff,0x00000000,0x00000000,0x003ffe00,
0xfff81bdb,0x7ffc4003,0x5c17fcc2,0x40bdfffd,0xff302ff8,0xfb0ee88b,
0x7fdc00bf,0xb9500005,0x98359dfd,0x01deffdc,0xca801997,0x8019971c,
0x19971cca,0x971cca80,0x1cca8019,0xfd017fee,0x02ffd43f,0x71037fc4,
0x0079dfdb,0x677f6dc4,0x3b6e2003,0x22003cef,0x03cefedb,0x3bfb6e20,
0x03ffa03c,0x4007ff70,0xff9acca9,0xfedb8804,0x3fe203ce,0x930001df,
0x0079dffd,0xffd05ffb,0xdfd97001,0xecb80079,0x5c003cef,0x003cefec,
0x1e77f65c,0x000bff10,0x0007ffd4,0x3f20e764,0xeceffc84,0x46fb86ff,
0xcceffdc9,0x3ff60d8b,0x1bfee003,0xfffb1000,0x27ffffff,0xfffffffb,
0x00ffe84f,0xffe9ffdc,0xe9ffdc00,0x7fdc00ff,0xb801ffd3,0x3ffe23ff,
0xb8fff300,0xfff003ff,0xfffff701,0xb803dfff,0xffffffff,0x7ffdc01e,
0x01efffff,0x7fffffdc,0x7dc01eff,0xefffffff,0x400ffe81,0xe8803ffb,
0xffffffff,0x3ffee01f,0x01efffff,0x7bfffff9,0xffffb001,0x401dffff,
0x7fcc4ffa,0x7fff4c05,0x400effff,0xffffffe9,0x7f4c00ef,0x0effffff,
0x7ffff4c0,0xfa80efff,0x3f60004f,0x4400005f,0x0f7e40ff,0x3fe13fa2,
0x3ffffea1,0x5ffb05ff,0x03ffcc00,0xbfffd100,0xdfffd979,0xfb77bfff,
0x0ffe85ff,0xfe9ffdc0,0x9ffdc00f,0x7dc00ffe,0x801ffd3f,0x7ff43ffb,
0x27fec40c,0x7c013fee,0x7ffdc1ff,0xfffecbce,0x9dfff702,0x05fffd97,
0x2f3bffee,0x702fffec,0xd979dfff,0x3ee05fff,0xfecbceff,0x07ff42ff,
0x500ffee0,0xffbdffff,0x3ee0dfff,0xfecbceff,0xfff902ff,0x207dffff,
0xdbcefffc,0x3e00ffff,0x017fe47f,0x979dfff5,0x2a03fffd,0xecbcefff,
0xff501fff,0xffd979df,0x3ffea03f,0xfffecbce,0x001ffdc1,0x0007fff0,
0x7cc5fb80,0x81df101f,0x3f7264fc,0xfb03ccef,0xfff8003f,0xbff70001,
0x77fffe40,0x20ffe880,0x7dc00ffe,0x801ffd3f,0x1ffd3ffb,0xfd3ffb80,
0x3ffb801f,0x5efffec4,0xf984fffd,0xfff8805f,0x40fffe61,0x7cc0fffd,
0xfffb03ff,0x03fff981,0xf981fffb,0xfffb03ff,0x03fff981,0x7f41fffb,
0x1ffe400f,0x30bfff10,0xf985fffd,0xfffb03ff,0x3fff2601,0x220effff,
0xfe880fff,0x8bff203f,0x3fe207ff,0x0dff903f,0x3207fff1,0xfff886ff,
0x10dff903,0x3f207fff,0x01ffe46f,0x02fff880,0x217e4000,0xf30005fb,
0x00bff30d,0x51003ffb,0x555bffd5,0x0fff0055,0x00ffff88,0xffe9bfe2,
0xe9ffdc00,0x7fdc00ff,0xb801ffd3,0x01ffd3ff,0xf703ffb8,0x05ffffff,
0x9003ffe2,0x7ff45fff,0x227fec03,0x7ec03ffe,0x01fff44f,0xffd13ff6,
0x44ffd807,0x7ec03ffe,0x007ff64f,0x7e407ffb,0x3ffe204f,0x201fff43,
0xb9804ffd,0x2a7ffffd,0x3fea04ff,0x4d7fe606,0x3ff204ff,0x21ffe404,
0x7e404ffc,0x027fe43f,0xff90fff2,0x23ffc809,0x10003ffb,0x00003fff,
0x1fe41fd8,0x987f8800,0xffd805ff,0xffff9801,0x06ffffff,0x7c01ee44,
0xffc803ff,0xb801ffd1,0x01ffd3ff,0xffd3ffb8,0xd3ffb801,0xffb801ff,
0xfffffc83,0xfb02efff,0x7ffcc0bf,0x00dff32f,0x3e61fff1,0xfff8806f,
0x100dff30,0x3fe61fff,0x0fff8806,0xf100dff3,0x0bff61ff,0x2207ffd0,
0x7d400fff,0x01bfe65f,0x0003ffe2,0x3ea5fff7,0x4004c05f,0x03ff97fe,
0x2a01ffe2,0x1ffe27ff,0xf89ffea0,0x7ffa807f,0x2a01ffe2,0x13fea7ff,
0x7cc26a20,0xe800007f,0x0017f40f,0xbff30ff0,0x003ffb00,0xfffffff3,
0x0000dfff,0xa801ffe8,0x01ffd2ff,0xffd3ffb8,0xd3ffb801,0xffb801ff,
0xb801ffd3,0x3ffa23ff,0xffc989bf,0xefff884f,0x3fbfee21,0x007ff72f,
0x7fdc7ff6,0x23ffb003,0xfb003ffb,0x00ffee3f,0xffb8ffec,0x23ffb003,
0x3e603ffb,0x9ff503ff,0xfb9ffe00,0x3ffb003f,0xfb0032ea,0x37ffe29f,
0x7fdc0001,0x3ea06fea,0x1fff005f,0x7c017fea,0x0bff50ff,0x7d43ffe0,
0x1fff005f,0x2e01bfe6,0x1fff13ff,0x2fe80000,0x880017f4,0x05ff987f,
0x8001ffd8,0x00001fff,0x3fffb2a6,0xcccccccf,0xfd4ffdcc,0x3ffb801f,
0xfb801ffd,0x801ffd3f,0x1ffd3ffb,0x323ffb80,0xff300eff,0xffff705f,
0xf95fffff,0x00bff23f,0xffc97fe4,0x25ff9002,0xf9002ffc,0x00bff25f,
0xffc97fe4,0x25ff9002,0xf880fffa,0xff703fff,0x43ff6007,0xf9002ffc,
0x013ff65f,0x7fe47ff9,0x000bdfff,0x1fff7fc4,0x999dff70,0xfd999999,
0x33bfee3f,0xcccccccc,0xdff71ffe,0x99999999,0x3ee3ffd9,0xccccccef,
0x21ffeccc,0x7f402ffe,0x00bffe1f,0xd89fb000,0xfa80403f,0x805ff986,
0xe8001ffd,0x260002ff,0xffffffec,0xffffffff,0x5fffffff,0xfb801ffd,
0x801ffd3f,0x1ffd3ffb,0xfd3ffb80,0x3ffb801f,0xa801fff1,0xffd304ff,
0x3f65ffff,0x003ffb1f,0x7fed3fee,0x29ff7001,0xf7001ffd,0x007ff69f,
0xffda7fdc,0x29ff7001,0xa9cefff8,0x03ffeffd,0x32005ff9,0x03ffb2ff,
0x7d53fee0,0xfff100ff,0xfffffc81,0x36003eff,0x3200ffff,0xffffffff,
0x2fffffff,0xfffffff9,0xffffffff,0x3fffff25,0xffffffff,0xffff92ff,
0xffffffff,0x7fd45fff,0x8dff700e,0x00003ffd,0x17ee37e4,0x5fd85fd0,
0xd805ff98,0xfe8001ff,0xff90000f,0xd59dffff,0xffffffff,0x2dffffff,
0x7dc00ffe,0x801ffd3f,0x1ffd3ffb,0xfd3ffb80,0x3ffb801f,0x3e00bff5,
0x5edd407f,0xfe87ff41,0x9ff7001f,0x5c007ffa,0x03ffd4ff,0x7f53fee0,
0x9ff7001f,0x5c007ffa,0x3ffe64ff,0xf9cfffff,0x03ffb03f,0x7f4fff20,
0x9ff7001f,0x456ffff4,0x306ffeca,0xfffffff9,0xfff5001d,0xffffd80b,
0xffffffff,0xfffb3fff,0xffffffff,0x3f67ffff,0xffffffff,0xb3ffffff,
0xffffffff,0x7fffffff,0x89bfffd8,0x640fffeb,0x2a0004ff,0xf107fcc0,
0x07fee05f,0xbff307ff,0x003ffb00,0x0007ff88,0x037dfffb,0x20001ffd,
0x7e400ffe,0x801ffd3f,0x1ffd3ffc,0xfd3ffc80,0x3ffc801f,0x36007ff9,
0x3e0001ff,0x00bff67f,0xffd9ffe4,0x27ff9002,0xf9002ffd,0x00bff67f,
0xffd9ffe4,0x87ff9002,0x3effffd9,0x3f207ff3,0x5ffb002f,0x6400bff6,
0x3ffe23ff,0x5fffffff,0xfffb7300,0x3ffe00ff,0x01ffe402,0x007ff900,
0x001ffe40,0x0007ff90,0xfffffb10,0xf505ffff,0x3ea000df,0x70bfa0ef,
0x3f2a37ff,0x407fcc4f,0xfd805ff9,0x7fd4001f,0xfff98004,0x00fff401,
0x400ffe80,0x1ffd3ffd,0xfd3ffd80,0x3ffd801f,0xfd801ffd,0x009ff73f,
0x4000bff6,0x3fee5ff9,0x27ffb003,0xfb003ffb,0x00ffee7f,0xffb9ffec,
0x27ffb003,0xfb003ffb,0x2054c07f,0x3fee05f9,0x23ffd003,0xfb003ffb,
0xfffb887f,0x0003efff,0x200bffee,0xffb806fe,0x3fee0004,0x3fee0004,
0x3fee0004,0x3aa00004,0x00dfffff,0x0001fff1,0x6fb8bffb,0xffffffb8,
0x304fd84f,0xffb00bff,0x0ffc8003,0x04ffc800,0xb802fff8,0x03ffb1cd,
0xffb3ffe8,0xb3ffe803,0xffe803ff,0xe803ffb3,0x0dff53ff,0xed83ffa0,
0x23ffc805,0xff005ffa,0x017fea3f,0xffa8fffc,0x23fff005,0xff005ffa,
0x017fea3f,0x4000fffc,0x3fea03fb,0x0fff8805,0x3e00bff5,0x3fea01ff,
0x0065d401,0xf5013ff6,0xdff3007f,0x4c2b2e00,0x597006ff,0x401bfe61,
0xdff30acb,0x002b2e00,0x3a003bf9,0x7cc005ff,0x84fe82ff,0x81cefdc8,
0xff300ffb,0x004c400b,0x0002ffa8,0xfc807ffd,0x7fc405ff,0x407ffb2f,
0xffb3fff9,0x9fffcc07,0x3e603ffd,0x07ffb3ff,0xf89fffcc,0x7fcc00ff,
0x1017ff47,0x7fc41fff,0x37fdc01f,0xb803fff1,0x3ffe26ff,0x137fdc01,
0xfb803fff,0x07ffe26f,0x000dff70,0xff880bf2,0x2ffe401f,0xb803fff1,
0x7fe406ff,0x13ff601c,0xd807ff90,0xfff000ff,0x0fffb805,0xf700bffe,
0x17ffc1ff,0xf83ffee0,0x7fdc02ff,0x5f7fc00f,0x4fff9800,0x0dfff100,
0x40013fe6,0x3e602ffb,0x3ffa005f,0x37fea01e,0x8601aaba,0x3ee06ffc,
0x3605ffff,0x3ffee6ff,0x3ffff880,0xf101fff7,0x3fee7fff,0xffff880f,
0x101fff73,0x7e47ffff,0xffd100ef,0x106ffb87,0xff707ffd,0x3ffe601d,
0x8077fdc2,0x7dc2fff9,0xfff300ef,0x00effb85,0xfb85fff3,0xfff300ef,
0x17f60005,0x201dff90,0x7dc0fffa,0xfff300ef,0xffda8805,0x01fff500,
0xb803ffe2,0x3ea005ff,0xfff101ff,0x01fffa89,0xfa89fff1,0xfff101ff,
0x01fffa89,0x3009fff1,0x3200bff7,0x2a01dfff,0x2a01fffe,0xb1000eff,
0xff8809ff,0x3ff6e006,0xfffff506,0x79bfffff,0x3fe63ff9,0xffb712df,
0x37dffd5b,0x43fffd71,0xa9befff8,0x13ffeffc,0x9537dfff,0x227ffdff,
0xca9befff,0xf13ffeff,0xf9537dff,0xfe87ffdf,0xfb989bef,0xffe885ff,
0xffeb98be,0x2ffffa05,0x3fffc989,0x137fffd0,0x207fff93,0x989bfffe,
0xfd03fffc,0xf93137ff,0x3ffa07ff,0xffc989bf,0x3ea0003f,0x222ca9cf,
0x931bfffd,0x3fa07fff,0xfc989bff,0x3ea003ff,0x3fffa03f,0xffeca8ad,
0x7fff7446,0x7ff4000f,0xffca89cf,0xfffe80ef,0xfffca89c,0xcfffe80e,
0xefffca89,0x9cfffe80,0x0efffca8,0x003ff600,0x6fffffec,0xffffecab,
0xefff9802,0x3fae60ac,0xfff002ff,0x3ea0079d,0xffff882f,0xffffffff,
0x3f24ffff,0xffffffff,0x3ffffa23,0xb82fffff,0xffffffff,0x3ee3ff9c,
0xcfffffff,0x3fee3ff9,0x9cffffff,0x3ffee3ff,0xf9cfffff,0x7fff4c3f,
0x0dffffff,0xffffff30,0xd880bfff,0xffffffff,0x3ff6203f,0x3fffffff,
0x3ffff620,0x203fffff,0xffffffd8,0x36203fff,0xffffffff,0xff80003f,
0xfd83ffff,0xffffffff,0x3fff6203,0x03ffffff,0x7ffedd44,0x3fffe200,
0x05ffffff,0x005fffff,0xfffffb10,0x201fffff,0xffffffd8,0xb100ffff,
0xffffffff,0x3f6201ff,0xffffffff,0x6e55400f,0x7e4004ff,0xffffffff,
0x22002eff,0xfefffffd,0x000dffff,0x41fffff6,0x1ffea888,0x44139fb0,
0xefffffdb,0x7ffffd43,0xffd901de,0x4c019fff,0x33effffe,0xffe987ff,
0x7ff33eff,0xeffffe98,0xe987ff33,0xf33effff,0x3ffee07f,0x8802efff,
0x2efffffd,0x3fffae00,0xd7002cef,0x059dffff,0x3ffffae0,0xfd7002ce,
0x0059dfff,0x3bffffae,0x7100002c,0x2e0159df,0x1dfffffe,0xffffd700,
0xff70059d,0x71007fff,0x7dffffff,0x016fff40,0x3fffaa00,0xd5003fff,
0x07ffffff,0x3ffffaa0,0xfd5003ff,0x007fffff,0x03fffffa,0x3fff2200,
0x003fffff,0x3fffae20,0x0001cfff,0x701ffffb,0x40bfffff,0x15530009,
0x000a9880,0x20006a62,0x530000a9,0x02a60001,0x00054c00,0x00135310,
0x00135310,0x0000a980,0x2000054c,0x4c0000a9,0x54c0000a,0x00000000,
0x0000d4c0,0x930002a6,0x30001799,0x00000353,0x01353000,0x004d4c00,
0x00135300,0x0004d4c0,0x000b332e,0x00d54c40,0x01998000,0x700c4000,
0x0007ddfd,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x55530000,
0x55510000,0x0d554003,0x79b73000,0x00000003,0x442aa600,0xdca982aa,
0x555402cc,0x2a880000,0x22001530,0x55530aaa,0xdcba8001,0x00000abc,
0x55e6e5d4,0x65cc0000,0x555440ac,0xaaaaaaaa,0xdcb880aa,0x13ae000b,
0x26155440,0x555401aa,0x10155511,0x106a6055,0x51000555,0xcb988055,
0x20000abd,0x2000aaa8,0x20001aaa,0x2bcdcb98,0x0005db00,0x22000791,
0x2aaa02ee,0x39fb5002,0xf8802fdc,0x40004fff,0x2000fffc,0x4000fffc,
0xfffffffb,0x36e2000d,0x39911cef,0x4ffee000,0x3fee7ff9,0x3fffffff,
0x0003ffb0,0xf881ff10,0xdffb001f,0x8802fff4,0xfffffffc,0x20001cff,
0xffffffc9,0x2002ffff,0xffffffd8,0xffff51ef,0xffffffff,0xfffe885f,
0xff8802ff,0x5ffd1001,0xb803ffe6,0xdff90fff,0x3e03fe20,0x037fd41f,
0x8837fd40,0xfffffffe,0xfd8002ff,0x3ff2006f,0x744000ff,0xffffffff,
0x17f200bf,0x00dff300,0xf8817fa0,0xffa803ff,0x2ffdffff,0xffbffd00,
0x3fe20007,0xffd8001f,0x3ffee004,0x05ffffef,0xffffff90,0x007ff37f,
0x7ccffee0,0xfffffb7f,0x09ffffff,0x00003ffb,0x36a2bbf6,0xfff1006f,
0x003bfea1,0x33bfffee,0x4ffffeba,0xffffb800,0xffffffff,0x7f4400df,
0xffffffff,0xfffffa9f,0xffffffff,0x7de7ff42,0x2fe401ff,0x23ffe600,
0x7f401ffe,0x03fff12f,0x6d4577ec,0x06ffa86f,0x986ffa80,0xffffffff,
0x2003ffff,0x5000fff8,0x01dffbff,0x3ffffee0,0xffffffff,0x400ff501,
0x8006fffb,0x3f200ffb,0x39fb005f,0x01dffff9,0x3fa9ff90,0xffb8001f,
0xffd10003,0x7dff7001,0x017ffd41,0x2ef3ffea,0x03ffdffd,0x267ff700,
0xbeffdfff,0xffff7311,0x001ffd87,0xfffff100,0x3f2003ff,0x007ff62f,
0x015bffb1,0x03bff2a2,0x67fffe40,0xfdb9889b,0xfd300eff,0x7e4c59ff,
0xcceffcff,0xcccccccc,0xfd07fea1,0x00ffc40b,0x7ffffd40,0x727fd403,
0xff8807ff,0xa81fffff,0xfa8006ff,0x77ffd46f,0xfea9899b,0xff9005ff,
0x3ffe2005,0x4405ffa8,0x0abffffd,0x5ffffd95,0x8805ff10,0x006feffe,
0xf1017fcc,0x3ba001df,0xa8016540,0xfff30eff,0x05ff8001,0x01ffc400,
0xfb817ffc,0x3ffe604f,0x3ffffa81,0x27ff7000,0x03fffff9,0xb07fffcc,
0x800003ff,0x4002deca,0x0ffe64ff,0x000bff60,0xf700dfd3,0xf7001dff,
0x3ff609ff,0x3ffea01f,0xfb0004ff,0x201ff70d,0x320005fd,0xfd804fff,
0x5002ffc6,0x7d405bd9,0xffa8006f,0x4027fec6,0x4401fffb,0x3fa004ff,
0x80fff63f,0x400cfffc,0xe81ffff9,0x467cc04f,0x7f4006fb,0x007fdc04,
0x4c400000,0x004cc409,0x40000660,0x7fcc0098,0x817fe206,0x3ee02ffe,
0xf70003ff,0x3fffe67f,0x9fff1004,0x0000ffec,0x06600000,0xff700331,
0x3fa20001,0x13ffe205,0x81fff300,0xa803fff9,0x0004ffff,0x3ff50bfd,
0x0003ff30,0x33001998,0x00001981,0x001bfea0,0xff89bfea,0x0fff2006,
0x44003310,0x0ccc4199,0x002fff98,0x2e1bffe6,0xf704406f,0x077e400d,
0x00002620,0x00000000,0x00000000,0xfa817fea,0x0dff103f,0x0007fff0,
0x7fccffee,0x7fe4005f,0x0007ff67,0x00000000,0x362ff980,0x0bcdeeee,
0xfb02ff88,0x3f6000df,0x02ffe43f,0x009fffd0,0x3e613fe0,0x005fd82f,
0x00000000,0x3fea0000,0x6ffa8006,0x98013fea,0x000006ff,0x5ffd8000,
0x3fffa800,0x70007fcc,0x3fea00df,0x4c000001,0x2ceffedb,0xffdb7300,
0x2e60059d,0x02ceffed,0xdffdb730,0x13fea059,0xf500ffe8,0x7ff9009f,
0x33bf6a20,0x3e67ff71,0x7cc002ff,0x23ffb1ff,0x00bdffdb,0x9dfdb710,
0x76dc4007,0x7e403cef,0x7fffff44,0x6fb82fff,0x001fff88,0x7c47df30,
0x3ea001ff,0xfd0004ff,0x983ff309,0x32e001ff,0x8e65400c,0x65400ccb,
0x8019971c,0xdff51cca,0x4dff5000,0x6c006ffa,0xffd9304c,0xd930079d,
0x54079dff,0x90000fff,0x05ff0dff,0x44037dc0,0x995003ff,0x7ffe4001,
0x0dffffff,0x3fffff20,0x200dffff,0xfffffffc,0x3f200dff,0xffffffff,
0x81ffdc0d,0x3ee04ffa,0x3ffb803f,0xffffffc8,0xf33ffbbf,0xfd0003ff,
0x367ff67f,0x1fffffff,0x7ffffdc0,0x5c01efff,0xffffffff,0x40ff881e,
0x3f6621fe,0x5c1ff80f,0x040007ff,0x4003ffd4,0xb0004fff,0x81ff50bf,
0x7f4005fd,0x9ffdc00f,0x7dc00ffe,0x801ffd3f,0xdff53ffb,0x4dff5000,
0x0002fff8,0xffffffb0,0x3f601dff,0xefffffff,0x004ffc80,0xb07ffe60,
0x37dc00bf,0xb0037ec0,0x3fa003ff,0xfecbceff,0xfffd05ff,0xfffd979d,
0x3bfffa0b,0x5fffecbc,0x79dfffd0,0xb8bfffd9,0x1ffd03ff,0x4017fec0,
0x7fd43ffa,0xeffecbdf,0x1fff33ff,0x29ffb000,0xbdfffffd,0x703fffec,
0xd979dfff,0x3ee05fff,0xfecbceff,0x42fdc2ff,0x05ff01fe,0x5ffd89f9,
0xffb80000,0x4ffe8005,0x81ff9000,0x07fcc6fd,0x003ffa00,0x3ffa7ff7,
0xe9ffdc00,0x7fdc00ff,0x000dff53,0xffe8dff5,0x320000cf,0xfdbcefff,
0x7fe40fff,0xfffdbcef,0x01ffec0f,0x50fffe00,0x37dc00ff,0x8003fee0,
0xfa801ffd,0xfff700ef,0x00effa83,0xfa83fff7,0xfff700ef,0x00effa83,
0x7dc3fff7,0x04ffa83f,0x4c017fec,0x3ffe63ff,0x3ffffb81,0x2000fff3,
0xfffb4ffc,0x1fff903f,0xb03fff98,0xff981fff,0x1fffb03f,0x0ff417e4,
0x7cc0ffc4,0x0027ffc6,0x027fe400,0x0027ff40,0xc89eff88,0x027f42ff,
0x2007ff40,0x1ffd3ffb,0xfd3ffb80,0x3ffb801f,0x5000dff5,0xffe98dff,
0x000aceff,0xd101fff1,0x7ffc47ff,0x43ffe880,0x40002fff,0x7fc45ffe,
0x40df7001,0x6c002ff9,0xffe801ff,0x217ffc02,0x7fc02ffe,0x017ff42f,
0xffd0bffe,0x22fff805,0xffd83ffb,0x017fe402,0xffd1ffd4,0x9fffdc05,
0x90007ff9,0x3fff6bff,0xd0fff601,0xffd807ff,0x201fff44,0x07f64ffd,
0xdf9307fa,0xfff1fe20,0xfb000005,0xffb0009f,0xffffffff,0xfff709ff,
0xffa8bfff,0x0ffe8000,0xfe9ffdc0,0x9ffdc00f,0x7dc00ffe,0x00dff53f,
0xd10dff50,0xdfffffff,0x27fd4039,0x7d4dff50,0x9bfea04f,0x0001fff8,
0x7f42ffe4,0x40df7003,0xfd8005fe,0x05cb801f,0x65c3ffc8,0x43ffc805,
0xffc805cb,0x6402e5c3,0x0ffee3ff,0xf700fff6,0x7ff7007f,0x3e01bfe2,
0x0fff33ff,0x6d7fee00,0x7fcc05ff,0x201bfe67,0xff30fff8,0x1fff100d,
0x3bfa03fa,0x01efffee,0x1fff89fe,0xaaaaaa80,0xffd0aaaa,0xfff90007,
0xffffffff,0x3ff6609f,0x004fe83e,0xb801ffd0,0x01ffd3ff,0xffd3ffb8,
0x53ffb801,0xf5000dff,0x7ff5c0df,0x1effffff,0x4c05ffa8,0x202ffd40,
0x03ffcc09,0x437fdc00,0xbd5006fc,0x0003bf20,0x00007ff6,0x0007ff90,
0x0001ffe4,0x40007ff9,0x3fee3ffc,0x02fffa83,0x3601bfe6,0x07ff53ff,
0x3e67ff90,0xff70007f,0x2007ff6b,0x7ff70ffe,0x5c7ff600,0xffb003ff,
0x3fa0bfa3,0x401fffff,0x3ffe27f8,0xfffff801,0xfb2fffff,0xff90007f,
0xdddddddf,0x540007dd,0x776d40ff,0x00ffe80c,0xffe9ffdc,0xe9ffdc00,
0x7fdc00ff,0x000dff53,0x7100dff5,0xfffffffb,0x1dfff887,0x37ffe200,
0x1ffe6001,0x1bfee000,0x00003fe6,0xca883ff5,0x7fec3eee,0x2ea60001,
0x003ffffd,0xffffb753,0x36ea6007,0x3003ffff,0x7ffffb75,0xfd81ffdc,
0xffd00dff,0x9fffc405,0xfb802ffb,0x00fff33f,0x7ed3ff20,0x1ffd800f,
0x32005ff9,0x05ff92ff,0x7ecbff20,0xfb31fe84,0x7c6fa80b,0xfff801ff,
0x2fffffff,0xb0009ff9,0x000009ff,0xffb89fd0,0x7f42ffff,0x9ffdc00f,
0x7dc00ffe,0x801ffd3f,0xdff53ffb,0x0dff5000,0xfffd7300,0xffffc89f,
0x7e400bdf,0x00bdffff,0x0003ffe6,0x3e0bff90,0x3e20002f,0xffffe84f,
0x07ff65ff,0xfffed980,0x03ffffff,0xfffffdb3,0x2607ffff,0xffffffed,
0xdb303fff,0xffffffff,0x01ffdc7f,0x503dfffb,0xfb101dff,0x0bff67ff,
0x7ccffea0,0xff90007f,0x6401ff67,0x03ffb3ff,0x7ed3fee0,0x9ff7001f,
0x07fa1bf2,0x2fec09fb,0x2a00bffa,0xfeaaaaaa,0x00bff72f,0x0009ffd0,
0x20ffa800,0xfeaaeff9,0x003ffa0f,0x3ffa7ff7,0xe9ffdc00,0x7fdc00ff,
0x000fff33,0x8000bff7,0x640fffea,0xefffffff,0x3ffff203,0xf883efff,
0x6c0001ff,0x09fb04ff,0x5c37ec00,0xffc98aff,0x2003ffb1,0xfffffffd,
0xd83ffcbd,0xdfffffff,0xfd83ffcb,0xbdffffff,0xffd83ffc,0xcbdfffff,
0x0ffee3ff,0x05ffff70,0x5137fffb,0x367ffffd,0xff9801ff,0x000fff33,
0x3fecbff6,0xfd3ffc80,0x3fee003f,0x2003ffd4,0x1ff34ffb,0x7fc41fe8,
0xfd87ff02,0x7f40004f,0x00dff72f,0x0009fff0,0x6c4fe800,0x3a4ff86f,
0x7fdc00ff,0xb801ffd3,0x01ffd3ff,0xff33ffb8,0xbff9000f,0xffd10000,
0xffff9307,0x2601dfff,0xfffffffc,0x01fff40e,0x40fffa00,0xf70007fb,
0x887db01f,0x03ffb4ff,0x37bfffb0,0x6c3ffb81,0x409bdfff,0x7fec3ffb,
0x7dc09bdf,0x6fffec3f,0x1ffdc09b,0xd3007ff7,0x3ff60dff,0xfcefffff,
0x005ff93f,0x3fe67ff5,0x5fff0007,0x36003ff6,0x05ffb1ff,0x7ecfff20,
0x7ff9002f,0x07fa17f4,0xff303fee,0x007ffa81,0xf997ff40,0x7fc4007f,
0x2000004f,0x1ffc0ffa,0x1ffd37e4,0xfd3ffc80,0x3ffc801f,0xfc801ffd,
0x00fff13f,0x3e69ff90,0xffb8005f,0x7fedcc05,0xdb9807ff,0x7e47ffff,
0x3e60005f,0x3ff300ff,0x03ff8800,0xfd8ffcc0,0x7ffd401f,0x51ffec01,
0xfd803fff,0x07ffea3f,0x7d47ffb0,0x7fec01ff,0x400ffee3,0xd701ffe8,
0xf71bffff,0x00ffea7f,0x7fccffee,0xfff98007,0xd001ffb0,0x0ffee1ff,
0xfb9ffec0,0x7ffb003f,0x07fa37dc,0x13f627f4,0x000fffe2,0x3fa2ffe8,
0x3ff2003f,0x2000004f,0x17fc44fe,0x1ffd3fdc,0xfd3ffd80,0x3ffd801f,
0xfd801ffd,0x007ffe3f,0x3e27ffd0,0x7cc000ff,0x7fdc005f,0x7fdc002f,
0x0bffe62f,0x02fff400,0xfd000ffa,0x7fd8800b,0xf7007ff6,0x7ffd009f,
0x74027fdc,0x13fee3ff,0xfb8fffa0,0x3ffe804f,0xb800ffee,0x0d4404ff,
0x7fc4ffee,0x33ffd805,0xfb000fff,0x017fecbf,0xffa9ffe2,0x23fff005,
0xff005ffa,0x364fe83f,0x21dd501e,0xff900ffb,0x3fa0003f,0x01bfee2f,
0x027fffc4,0x0ffb8000,0x7dc17fcc,0x803ffb0f,0x3ffb3ffe,0xfb3ffe80,
0x3ffe803f,0x98013ff6,0x3ff61fff,0x9ffe4002,0x7ec00cba,0x8019754f,
0x7fec4ffd,0xfffa8006,0x002fe402,0x4c001ff9,0x3ff61ffe,0x01ffec01,
0xfd93ffe6,0x7ffcc03f,0x300fff64,0x7fec9fff,0x27ffcc03,0x02b87ff7,
0x20009ff7,0x3ffe3ffb,0x4fffe601,0x4c007ff9,0x3ff62fff,0x127fe406,
0xfb803fff,0x07ffe26f,0xf30dff70,0x3ee0009f,0x77ff402f,0x3ff22001,
0x0fffe22f,0x13ffff20,0x1ffc0000,0x7dc17fc4,0x980fff67,0x7ffb3fff,
0xd9fffcc0,0x3fe603ff,0x0fffee3f,0x2e3ffec0,0xd1002fff,0x13ff61ff,
0x3f67ff90,0x1ffe404f,0x0037ffe2,0x402fffd4,0xff3007fa,0x77fd4005,
0x200ffec1,0x3e607ffc,0x3ff24fff,0x3fffe607,0x981fff24,0x3f24ffff,
0x3ffe607f,0x44ffee4f,0xfff81fff,0x7ff70002,0x44077fdc,0xff33fffd,
0x3fa6040f,0x27ffec6f,0x5c0fffa8,0xff300eff,0x0effb85f,0x205fff30,
0x1000effa,0xf3009ffb,0x20159fff,0x1fffffb8,0x9027ffe4,0x009ffdff,
0x01ff7000,0x9bf20ffe,0xf880fffb,0xfff73fff,0x7ffff101,0x2203ffee,
0x3a23ffff,0xb100afff,0xff885fff,0x3ea00cff,0x3ffea6ff,0x21fff100,
0xf100fffa,0xfff501ff,0xfffc805f,0x2ff8800f,0x0027f440,0xfb01bff7,
0xfff9803f,0xffba88ad,0x3fe64fff,0xfba88adf,0x3e64ffff,0xba88adff,
0x264fffff,0xa88adfff,0x24fffffb,0x3fee3ffb,0x6ffea8ae,0x0ffee000,
0x5117fff9,0x267ffffd,0x9df307ff,0xd85ffffb,0x98adffff,0xfd03fffb,
0xf93137ff,0x3ffa07ff,0xffc989bf,0x7ffcc03f,0x3ae60ace,0x26002fff,
0xcefffffe,0xffffffdc,0xdfff900d,0x9ffd7337,0xddddfff5,0x0bdddddd,
0x6c07ff10,0x127fc46f,0x9537dfff,0x227ffdff,0xca9befff,0xf13ffeff,
0xf9537dff,0xfa87ffdf,0xdcceffff,0x105ffffe,0x7bdffffd,0x1dffffb9,
0x8adfffe8,0x746ffeca,0xca8adfff,0x3ea06ffe,0xcabdefff,0x00effffd,
0xfb013fa0,0x27fdc00d,0x9003ffb0,0xffffffff,0xc8dff19f,0xffffffff,
0x646ff8cf,0xffffffff,0x646ff8cf,0xffffffff,0x2e6ff8cf,0x7ffe43ff,
0x001fffff,0x360ffee0,0xefffffff,0xfff33ffa,0x3fffffa0,0x9ffd82ff,
0xffffffff,0x3fff6203,0x03ffffff,0x3fffff62,0x1003ffff,0xfdfffffb,
0x001bffff,0xfffffb10,0xdfffffff,0xffff7003,0x2abfffff,0xffffffff,
0x807fffff,0x7fcc07fb,0x40fffbae,0xfffffffb,0x2e3ff9cf,0xffffffff,
0x3ee3ff9c,0xcfffffff,0xff983ff9,0xffffffff,0xffd804ff,0xffffffff,
0xffff105f,0x0bffffff,0xfffffff1,0xd300bfff,0xffffffff,0x7000bfff,
0x0ffd40df,0xaadffc80,0x3ffb2aaa,0x3fffaa00,0x3ff61dff,0x7ffff541,
0x07ff61df,0xbfffffd5,0x2a0ffec3,0x1dfffffe,0x7fdc7ff6,0xffffdb83,
0x7dc0000d,0xfffb703f,0x27ff51bf,0xfb707ff9,0x3603bfff,0xffffd37f,
0x3fae003d,0x002cefff,0x9dffffd7,0xfd710005,0x039fffff,0xffd71000,
0x059dffff,0xfffeca80,0x3ffea3df,0xffffffff,0x7fc407ff,0xffffb803,
0xffd301ff,0x3fe67dff,0x7ffff4c3,0x987ff33e,0x33effffe,0x3ae207ff,
0xcfffffff,0x3ff6e001,0x03deffff,0x7ffffdc4,0x3ee203ef,0x03efffff,
0x7fffed40,0x0001cfff,0xff101ff3,0x3ffe2007,0xb5ffffff,0x988003ff,
0x2620001a,0x2620001a,0x2620001a,0x8800001a,0x5000009a,0x035005dd,
0x00350000,0x0000cc40,0x300002a6,0x98000015,0x40000019,0x0001aa98,
0x00006a20,0x00bd5000,0x0066f64c,0x30000a98,0x2a600015,0x54c40000,
0x4400019a,0x00009aa9,0x30003533,0x20000353,0x00009aa9,0xbfb01550,
0x66664c00,0x003ccccc,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x01599510,0x0013b200,0x01e44000,0x4009d900,0x0000ccc8,0x000b372a,
0x00555400,0x06aa6000,0x00ccc800,0xaa880000,0x3033000a,0x25551155,
0x0001aaa8,0x2aaa6000,0x3372a200,0x26155443,0x0aaa81aa,0xaaa8aaa2,
0x01664c00,0x20551e64,0x555501a8,0x220aaa80,0x664002aa,0x2000002c,
0x88002aa8,0x440002aa,0xaaaaaaaa,0xaaaaaaaa,0x2aa21aaa,0xa8800002,
0xaaaaaaaa,0x2aaa0019,0x3fffff60,0x7fd4000f,0x36e4cb81,0xf3002cee,
0x3ea000df,0x3fe6001f,0xfe98000f,0x001effff,0x417ff400,0xf30adfc9,
0x013ff20f,0x001fff80,0x6ffd8000,0xd82fc880,0x26ff89ff,0x7100fffc,
0x0ff417bf,0x205ffe80,0x85fffffa,0xfff13ffe,0x74bff901,0x03ffa2ff,
0xf009ff50,0x6c17f4df,0x2fff983f,0xfb2ffdc0,0xfff8007f,0xbdfc8804,
0xff303fe0,0xdff5000f,0xfffc8000,0xffffffff,0xffffffff,0x001bfea5,
0x3fffea00,0xffffffff,0x87ff402e,0xffb9bffb,0x0ffe2004,0xfffdbfec,
0x2e02ffff,0x88006fff,0x7cc003ff,0x7cc000ff,0xffffefff,0x3fa00000,
0x7fffc42f,0x904fedff,0x7c0009ff,0x000001ff,0x4007ffcc,0xffd82ffc,
0x7ec6ff89,0xffffd03f,0x200dfbdf,0xf100fff9,0x109fffff,0x5ffb1fff,
0x7dd7fec0,0x007ff44f,0x3e013fea,0x22fbf26f,0xfd80ffc9,0x7ffb004f,
0xf0009ff5,0xfff009ff,0x0dfdbfff,0x5000fff3,0x44000dff,0xffffffff,
0xffffffff,0x3ea5ffff,0xa800006f,0xffffffff,0x3fffffff,0x3b21ffd0,
0xd003fe42,0x6ffec0bf,0xffdbacff,0x77ff440f,0x5fe8006f,0x0eee8800,
0x85fff400,0x0005ffd8,0xf70bffa0,0xffffd73b,0x013ff203,0x001fed80,
0x0ffec000,0xd82ffc80,0x46fe89ff,0xff987fe8,0x3ffffdaa,0x403ffb00,
0x010aeffa,0x0fffffe6,0xbfffff10,0xa801ffd0,0x6ff804ff,0x7ffffff4,
0x005ff883,0x1bffffa2,0x027ffc00,0x3fae7bea,0xff982fff,0x6ffa8007,
0x3bff2000,0xccdffecc,0xcccccccc,0x01bfea2c,0x3ffea000,0xdccccccc,
0xe83ffffe,0x2ff400ff,0x200ffb80,0xb81efffd,0x33e60eff,0x5c006fb8,
0x000000ff,0x4c3ffcc0,0x200007ff,0x0f642ffe,0xfc802ee6,0x3dc0004f,
0x3e200000,0x3ff2003f,0x3a1ffd82,0x543ff985,0x005dc43e,0x6403ff98,
0x3ee003ff,0xff3005ff,0x1ffd01df,0x804ffa80,0xdec986ff,0x01ff900b,
0x0ffff980,0x01333000,0x5dc43eb8,0x7fff7540,0xeeeeeeee,0xfffeeeee,
0x7fc4006e,0x00fff62f,0x006ffa80,0x06ffa800,0x81fffd50,0xffb00ffe,
0x5ff3001b,0x01fffd80,0x20893ff2,0x3e6006fb,0x0000002f,0xfd04ffa8,
0x3a00001f,0x400002ff,0x00884ffc,0x00000db0,0x64001988,0x1ffd82ff,
0x004c40fe,0x03310000,0x8005ffb0,0x4c400199,0x01ffd009,0xf804ffa8,
0x4cc0006f,0x13310000,0x00000000,0x7ffffdc0,0xffffffff,0xffffffff,
0x7fe4007f,0x001ffec6,0x555dff50,0x01335555,0x0037fd40,0xffd17ff6,
0x07fff301,0xb009fd10,0xff880bff,0x801bee06,0x640004fe,0x7fcc004c,
0x006ff886,0x00bffa00,0x89ff9000,0x3fa800e9,0x00000000,0x66fff65c,
0xb13ffb1c,0x0000003f,0x3ff60000,0x00000001,0x5003ffa0,0xdff009ff,
0x00000000,0xfecb8000,0x400003ce,0xeefffeea,0xeeeeeeee,0x6efffeee,
0x0bffe200,0x40007ffb,0xfffffffa,0x2dffffff,0x006ffa80,0xfd1fffcc,
0xfb53101f,0x037e401f,0xe801ffd8,0x01bee07f,0x400037e4,0xff8007ff,
0x01ffdc3f,0x25ffd000,0x65400ccb,0x527fe41c,0x47f001ff,0x3fb2a3cb,
0x999502ce,0x99999999,0x7ffec799,0xffb2ffff,0x66540363,0x76549970,
0x4cb82cef,0x0b3bfb2a,0x65c07ff6,0x33bfb2a4,0x00ccb802,0xfa801ffd,
0x06ff804f,0x79701995,0xa82f7f62,0xcccccccc,0x303ccccc,0xfffffffd,
0x1995001d,0x007ff980,0x8006ffa8,0xffd86ffb,0x3fea0003,0xffffffff,
0x00efffff,0x2001bfea,0x3ffa6ffc,0x81ffc400,0xfb001ffa,0x3ffb001f,
0x2a01bee0,0x440001ff,0xfb8005ff,0x1fff71ff,0x7ff40000,0xb801ffd2,
0xa7fe43ff,0x81005ffb,0xffff96fd,0xff90bfff,0xffffffff,0x765cbfff,
0xfb1ccdff,0x3ffb003f,0x7ffe5ff6,0x7ec5ffff,0xffffff97,0x01ffd8bf,
0x3fff2ffb,0x6c05ffff,0x1ffd01ff,0x804ffa80,0x3ffb06ff,0x3ffadfb0,
0x3fff24ff,0xffffffff,0xfffa85ff,0xfffecbce,0x00ffec01,0x2001ffe6,
0x44006ffa,0xffd82fff,0x3fea0003,0xaaaaaaae,0x05ffffcc,0x2001bfea,
0x3ffa7ff8,0x7c40cc88,0x03ff884f,0x6401ff60,0x0df702ff,0x0003ff88,
0x0004ffa8,0xdffdfffd,0xfe800001,0x801ffd2f,0x7fe43ffb,0x0004ffcc,
0x3fff3ff6,0x44ffffdd,0xeeeeeeeb,0x83fffdee,0xffd82ffc,0xb1ffd801,
0xbbfff9ff,0x7ec9ffff,0xfddfffcf,0x3ff64fff,0xff9ffb01,0x9ffffbbf,
0xe80ffec0,0x7fd400ff,0x837fc404,0xefd81ffd,0x21fffffd,0xeeeeeeeb,
0x43fffdee,0xf903fff8,0x1ffd80df,0x003ffcc0,0x20037fd4,0xffb06ffb,
0x7fd40007,0xfffb1006,0x01bfea07,0xfe8fffc0,0x221bfd0f,0x5fd80ffd,
0x803fec00,0xdf703ffb,0x0005fd80,0x002ffe88,0xbfffff10,0x3fa00000,
0x801ffd2f,0x7fe43ffb,0x40002fff,0x40befffd,0x8000fffc,0xff905ffd,
0x003ffb05,0x3ff63ffb,0x7fe40bef,0x7dfffb0f,0xb0fffc81,0x3ff603ff,
0x7fe40bef,0x03ffb00f,0xf5003ffa,0x6ff880bf,0xfb03ffb0,0x07515dff,
0x217ff600,0x7e404ffc,0x07ff603f,0x555fff30,0x55555555,0x800dff95,
0xffb03fff,0x7fd40007,0x2ffec006,0x0006ffa8,0x3ffa5ffd,0xffdfff30,
0x01ff709f,0x800ffd80,0xdf701ffc,0x0007fdc0,0x017ffa20,0x6ffffb80,
0x3fa00000,0x801ffd2f,0x7fe43ffb,0xd80001ff,0x3fa00fff,0x7fec002f,
0x20bff206,0xfd801ffd,0x03fffb1f,0xffd97ff4,0x4bffa01f,0xffb01ffd,
0x17ff403f,0xfd01ffd8,0x47ffe21f,0x7c405ffa,0x03ffb06f,0x0003fffb,
0xf10dffb0,0xfff500ff,0x200ffec0,0xfffffff9,0xffffffff,0x2e006fff,
0x3ff607ff,0xffffffff,0x7fd46fff,0x3ffdc006,0x27bfee66,0x20099999,
0x1ffd3ffd,0x1f7fff54,0x40017fcc,0xfd801ffd,0x20bd500f,0x40002ff9,
0x000effe8,0xfffffe98,0xd000003f,0x03ffa5ff,0xfc87ff70,0xb00000ef,
0xffc809ff,0x3ffee003,0x20bff200,0xfd801ffd,0x809ffb1f,0x9ffb3ffc,
0xfb3ffc80,0x13ff603f,0x3607ff90,0x1ffd01ff,0x7d47ffe2,0x37fd407f,
0xfd81ffd8,0xfb80005f,0x5ffa80ff,0x201fff00,0x7cc01ffd,0xffffffff,
0xffffffff,0x3ffa006f,0x3ffff603,0xffffffff,0x037fd46f,0xf83ffe60,
0xffffffff,0x3f204fff,0x201ffd5f,0x202ff400,0x3ff60ff9,0x037fc402,
0x980bfd00,0xffe880ff,0xffa8000e,0x1fffd9ef,0x3a000054,0x01ffd2ff,
0x3ea3ffb8,0x200004ff,0x7dc03ffd,0xfff5003f,0x3fffb203,0x3ffb1eee,
0x363ffb00,0x7fdc03ff,0xb807ffb3,0x03ffb3ff,0xf700fff6,0x07ff607f,
0xff887ff4,0x05fff51f,0xfd837fec,0x03ffd81f,0x0fffd400,0xccceffb8,
0xfecccccc,0x03ffb01f,0xcccfff98,0xcccccccc,0x5006ffdc,0xffd80fff,
0xeeeeeeee,0x7fd44eee,0x3ffcc006,0x3ffffffe,0x204fffff,0x1ffd5ffd,
0x01df9000,0xfb07ffc4,0x4ffb80df,0x01df9000,0x7407ffc4,0x98000eff,
0x3fa24fff,0x1fff10ff,0x4bffa000,0x7dc00ffe,0x9ffff73f,0x7fec0000,
0x01ffd402,0xb017ffcc,0x3fffffff,0x36007ff6,0x05ffb1ff,0xffb4ffa8,
0xb4ffa805,0x3ff603ff,0x827fd402,0xffd01ffd,0x542aaa21,0xfc80ffff,
0x3ffb06ff,0x0005ffb0,0x9017ffcc,0xffffffff,0x5fffffff,0x3007ff60,
0xf5000fff,0x3ffa00df,0x01ffec03,0x00dff500,0xf506ffb8,0x3fa000df,
0x001ffd4f,0x2201ffa8,0x3f60fffe,0xfff304ff,0x3ff50001,0x07fff440,
0x0003fff2,0x7cc2fff4,0x0bff76ff,0xe97ff400,0x7fdc00ff,0x09ffdff3,
0x0ffec000,0x3013fea0,0xaa807fff,0xb0aacffd,0xffb003ff,0x5007ff63,
0x07ff69ff,0x3f69ff50,0x03ffb01f,0xfb04ffa8,0x03ffa03f,0xbfffff50,
0xdffffd75,0x3607ff60,0xf30001ff,0xffd807ff,0xffffffff,0xb03fffff,
0xff9803ff,0x6ffa8007,0xeefffa80,0xffeeeeee,0x3ea0003f,0x3fe2006f,
0x0dff504f,0x74fffe00,0x3e2000ff,0x7fff404f,0x3ffff60f,0xfffb98ad,
0x4ff88001,0x07fffec0,0x40007ffa,0xf501fff9,0x05ffd9ff,0xe97ff400,
0x7fdc00ff,0x09ff95f3,0x0ffec000,0x8813fea0,0x32004ffe,0x1ffd82ff,
0xfb1ffd80,0x4ffa803f,0xfa803ffb,0x203ffb4f,0x7d401ffd,0x03ffb04f,
0xf5003ffa,0xfffffdbf,0x360dfb9f,0x1ffd81ff,0x4ffe8800,0x003ffc80,
0x007ff600,0x5000fff3,0xffd00dff,0xffffffff,0x0007ffff,0xb8037fd4,
0xf500ffff,0xff1000df,0x003ffa5f,0x7ec06fd8,0x3f60ffaf,0xffffffcf,
0xfb0002ff,0xfaffc80d,0x01bfe20f,0x1bfea044,0xdfffff70,0x3fa00c40,
0x801ffd2f,0x3f233ffc,0x3600004f,0x7fd401ff,0x017ffa04,0xfb05ff90,
0x3ffb003f,0xf5007ff6,0x007ff69f,0x3ff69ff5,0x803ffb01,0xffb04ffa,
0x003ffa03,0xffd19ff5,0x41bf69ff,0xffd81ffd,0x5ffe8001,0x009ff700,
0x00ffec00,0x2001ffe6,0x7d406ffa,0xffffffff,0x03ffffff,0x3bffea00,
0xffeeeeee,0x2a03ffff,0xfa8006ff,0x01ffd0ff,0xb803fee0,0x20ff99ff,
0xffe99ffd,0x70001cef,0x7fdc01ff,0x3ea0ff99,0x3fff005f,0x3601bfee,
0xff03ffff,0xd1fff80f,0xffd801ff,0x0027fe43,0x803ffb00,0xffb04ffa,
0xffc8001d,0x801ffd82,0x3ffb1ffd,0xfb4ffa80,0x4ffa803f,0x3f603ffb,
0x27fd401f,0xfd01ffd8,0x4ffa801f,0xfb0006a2,0x03ffb03f,0x00effd80,
0x200dff30,0xffb00acb,0x07ff9803,0x406ffa80,0xfb004ffe,0x7d40007f,
0xffffffff,0x02efffff,0x40037fd4,0x3ffa5ffe,0x03ff9800,0x7fccbfea,
0xa887ff60,0x7fc40001,0x4cbfea03,0x1ffe20ff,0xfa9ffe60,0x7f4401ff,
0x1ffd01ff,0x6c7ffe20,0x7ff401ff,0x0027fe43,0x803ffb00,0xffc84ffa,
0xffb8000f,0x801ffd83,0x3ffb1ffd,0xfb4ffa80,0x4ffa803f,0x3f603ffb,
0x27fd401f,0xfd01ffd8,0x4ffa801f,0x1ffd8000,0x2001ffd8,0x4000fffc,
0x7dc02fff,0x3ffb00ff,0x007ff980,0x2606ffa8,0xfb000fff,0x7d40007f,
0xffffffff,0x5003cdef,0xfb800dff,0x03ffa2ff,0xf9817fa0,0xd83fe63f,
0x800001ff,0x3fe605fe,0xff03fe63,0x4ffd807f,0x7013ffe2,0xb03fffff,
0x3fe605ff,0x980fff67,0x7fe43fff,0x3f600004,0x27fd401f,0x0007ffee,
0x7ec27fdc,0x1ffd801f,0xfa803ffb,0x803ffb4f,0x3ffb4ffa,0x5007ff60,
0x3ff609ff,0x801ffd01,0x80004ffa,0xffd81ffd,0x3fff7001,0x3fff5000,
0x813ffe20,0x7cc01ffd,0xffa8007f,0x013ff606,0x0003ffd8,0x0001bfea,
0x801bfea0,0x7f45fff9,0x07fe400f,0xddddff90,0x3ff6bdff,0x7e400001,
0x3bff200f,0x25effeee,0xc882fffb,0x7fe41fff,0xffff701f,0xffb83fff,
0x2fff441e,0xf101fff7,0xffc87fff,0x3f600004,0x27fd401f,0x0005fff5,
0x8e6fffd4,0xfd801ffd,0x803ffb1f,0x3ffb4ffa,0xfb4ffa80,0x07ff603f,
0x3609ff50,0x1ffd01ff,0x004ffa80,0xd81ffd80,0xffa801ff,0x3fa0002f,
0xfca89cff,0x3f600eff,0x3ffcc01f,0x837fd400,0x2000fff9,0x20003ffd,
0x00006ffa,0x4c06ffa8,0x41ffffd9,0x3e600ffe,0x7ffe402f,0xb6ffffff,
0x400003ff,0x7e402ff9,0xffffffff,0x5efffec6,0x83ffffdb,0xaacffff8,
0xfbcfffec,0x7ffc1fff,0xffffdbef,0x2fbffe21,0xffeffca9,0x777ffe43,
0xeeeeeeee,0x07ff604e,0x3e69ff50,0xccccadff,0x40cccccc,0xb4ffffe8,
0xffb003ff,0x5007ff63,0x07ff69ff,0x3f69ff50,0x03ffb01f,0xfb04ffa8,
0x03ffa03f,0x0009ff50,0xfb03ffb0,0xfff9803f,0xccccccad,0x6c40cccc,
0xffffffff,0x7fec00ff,0x03ffcc01,0xd837fd40,0x7ec005ff,0xeeeeeeef,
0x50eeeeee,0x00000dff,0xddddfff5,0xfffffffd,0x01ffd03f,0x80013fa2,
0x3ff60ff9,0xfd100001,0x7fcc0009,0xffffc880,0x203fffff,0xffffffd8,
0x3fea2fff,0x7fffd44f,0xb81fffff,0xffffffff,0x7e43ff9c,0xffffffff,
0x205fffff,0x7d401ffd,0xfffff54f,0xffffffff,0xffb303ff,0x007ff6bf,
0x7fec7ff6,0xda7fd401,0x7fd401ff,0x3603ffb4,0x7fd401ff,0x203ffb04,
0x7d400ffe,0xfd80004f,0x01ffd81f,0x7fffffd4,0xffffffff,0xfffd501f,
0x36007fff,0x7fcc01ff,0x6ffa8007,0x001fff98,0x7fffffec,0xffffffff,
0x00dff50f,0xffff5000,0xffffffff,0x3fa019ff,0x00dfb00f,0x360ff980,
0xb00001ff,0xf98000df,0x3fb6600f,0x7000ceff,0x3bdffffd,0x3a20bf30,
0x01dfffff,0x3bffffa6,0xfc87ff33,0xffffffff,0x205fffff,0x7d401ffd,
0xfffff54f,0xffffffff,0x209803ff,0xfd801ffd,0x803ffb1f,0x3ffb4ffa,
0xfb4ffa80,0x07ff603f,0x3609ff50,0x1ffd01ff,0x003ee980,0xd81ffd80,
0x7fd401ff,0xffffffff,0x801fffff,0x6c0009a9,0x7fcc01ff,0x6ffa8007,
0x8005ffd8,0xfffffffd,0xffffffff,0x000dff50,0xfffff500,0x7ddfffff,
0x80ffe801,0x40001ffa,0x3bb20cc8,0xffa80000,0x66440001,0x00002000,
0x13001531,0x000a9880,0x00000a98,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x5440aaa8,0xaaaaaaaa,0xaaaaaaaa,0x406aa62a,0x5300aaa8,0x55000015,
0x05554035,0x4c6aaa00,0x2a0001aa,0x055541aa,0x02aaa200,0x20733200,
0xaaaaaaa8,0x800019aa,0x2a01ccc8,0x42aa60aa,0x88002aa8,0x555512aa,
0x35555555,0x2aa60013,0x0aaaa001,0x2a1aa980,0x035551aa,0x00aaa800,
0x5302a980,0x71000015,0x2aaaaa20,0x099aaaaa,0x53000000,0x54c00035,
0xaa8000aa,0x0351001a,0x00135310,0x359b9750,0x99055540,0x03ff6039,
0xfffffff3,0xffffffff,0x3ee1ffff,0x3fff105f,0x0007ff60,0x03ffff70,
0x98017ff2,0xbff72fff,0x7ffcc000,0x800bff70,0x005fffe8,0xfa82fff8,
0xffffffff,0x0002efff,0x7407fff3,0x4fff21ff,0x4003fffa,0xfff55ffa,
0xffffffff,0xa809dfff,0x3fe006ff,0xffb001ff,0xfba7ffc7,0x3e20007f,
0x7c4000ff,0x03ffb07f,0x505fa800,0xffffffff,0x05bfffff,0x3fffffea,
0xffffffff,0x00bff72f,0x02fffc40,0x007ffea0,0xfb813fa2,0x03ffffff,
0xfffffe98,0xffe80dff,0x6c0bffe2,0x7ffcc0ff,0xffffffff,0xffffffff,
0x220bff70,0x74c41fff,0x99999aff,0xeeff9800,0xfff880ff,0x4bffb001,
0x40005ffb,0xeff8dffb,0x6ffec000,0x7fc004ff,0xffffa82f,0xffffffff,
0x4c003fff,0x3fa03fff,0x54fff21f,0x2000ffff,0xfff55ffa,0xffffffff,
0x40bfffff,0xa800fff8,0xf004ffff,0xa7ffc3ff,0x0001fff8,0xb000bff7,
0x3ff60fff,0x3fe60001,0xfffff505,0xffffffff,0xfff50dff,0xffffffff,
0x3ee5ffff,0x7d40005f,0xff1002ff,0x3ffa007f,0xffffe884,0x00efffff,
0xdbfffff5,0xfe85ffff,0x40bffe2f,0x66440ffd,0xffdccccc,0xcccccccf,
0x4417fee4,0x7ff41fff,0xffffffff,0x4fff4402,0xff706ff9,0x3fff300d,
0x0002ffdc,0x07ffffec,0x6d7fee00,0x3ba002ff,0xcfffa82e,0xedcccccc,
0x2003ffff,0x3a03fff9,0x4fff21ff,0x005ffffa,0x7fd57fea,0xaaaaaaaf,
0xefffecaa,0x005ffd00,0x00dffff9,0xfff8fff3,0x0013ff64,0x2000fff4,
0xfb07fffb,0x7cc0003f,0x9fff505f,0xb9999999,0xe98bffff,0xeeeeeeee,
0x71fffeee,0xb0000bff,0xfd001fff,0x3ff200bf,0xafffe84f,0x0bfff731,
0x415dfff1,0x3a0fffe9,0x0bbb62ff,0x20007fec,0x2e007ff8,0x07e405ff,
0x3ffffffa,0x6c02ffff,0x17ff24ff,0x3a017ff4,0x2ffdc4ff,0x7ff44000,
0x7fcc002f,0x03fff10f,0x1bfea000,0x07fff540,0x00133300,0x3fffea00,
0xbff5003f,0x7001bfea,0x3f205fff,0xdefe804f,0x7fdc00ff,0xf527ffc4,
0xff3000ff,0xfff8800d,0x03ffb07f,0x82ffcc00,0xb1006ffa,0x40007fff,
0x3fee2ffe,0xff880005,0x77fe405f,0x7fff4400,0x077fdc4f,0x6c2fff98,
0x7ff406ff,0x000bffa5,0x88001ffb,0x3ee007ff,0xb036c05f,0x260003ff,
0x30199819,0x3ea01fff,0x2ffdc0ff,0x09988000,0x40998800,0x00000998,
0xd800dff5,0x000005ff,0x7fffd400,0xffa800ff,0x000dff55,0x3e609ffb,
0x67fc406f,0x7ec02ffb,0x227ffc2f,0x64002fff,0x7f4003ff,0xffb07ffe,
0x7fcc0003,0x00dff505,0x0005ffe8,0xffb89ff9,0xff300005,0x3ffea07f,
0x7fffdc01,0x0fff44ff,0xff17ff60,0x6ff9803f,0xb000bffa,0xf88001ff,
0x3fee007f,0xd817e605,0x000001ff,0x207ffb00,0xffb83ffe,0x00000005,
0x91000000,0x01bfea05,0x807fff30,0x02defeb9,0xedffa800,0xffa805ff,
0x000dff55,0x7fc0dff5,0x457fdc07,0x7ffc05ff,0x3227ffc0,0x7fc005ff,
0x3ff2000f,0xffb07ff9,0xfb930003,0x7d4799df,0x7fdc006f,0x6ff98007,
0x0005ffb8,0x107fff20,0x74407fff,0x4ffbdfff,0x2601bfe2,0x1bfe67ff,
0xfe87ffc0,0x7fec002f,0x3ffc4000,0x20bff700,0x3f601ef8,0x7bfd931f,
0x01995001,0x503ffe20,0x3fee0dff,0x9e5c0005,0x970bdfd8,0x1e64c019,
0xfa8332a0,0x00dff505,0x2e0dff90,0xffffffff,0x0332a00e,0x3fe73fea,
0xaffd403f,0x98006ffa,0xffb00fff,0xfd3fec03,0x437fc40f,0x7fcc3fff,
0xbff5000f,0xfa7fcc00,0x23ffb07f,0x82cefec9,0xfffffffa,0x001bfea5,
0x8001fff3,0xffb81ffe,0x7f400005,0x02fff46f,0x7d4fffe6,0x013b664f,
0x57513ffc,0xfe9ffe00,0x7fec002f,0x3fe20010,0x17fee007,0x7fec00c8,
0xffffffc9,0x0ffec06f,0xe8bff900,0xbff702ff,0xd6fd8000,0x3f29ffff,
0x3ffee03f,0xf51ffe00,0x01bfea0b,0x321ffe20,0xfdbcefff,0xffb00eff,
0x329ff503,0x3ea00fff,0x00dff55f,0x5c0fff70,0x97fe03ff,0xff701ffc,
0xd07ffd09,0x3f6005ff,0xdfd1002f,0xffd83ffc,0xffffffc9,0x7fee4c4f,
0x3fea3cce,0x7ffcc006,0x13ff2000,0x0002ffdc,0x653ffe60,0x7cc00eff,
0x013fea0c,0x006ff980,0xfe97fe60,0x7fec002f,0xff1002d9,0x2ffdc00f,
0x3bff6000,0xffecceff,0x07ff604f,0x71fff880,0x7fdc0dff,0x77ec0005,
0x31fffffd,0x7ff40bff,0x89ff302f,0xdff506fb,0x87ffe000,0xe883fff9,
0x3ffb04ff,0x7f49ff50,0x57fea05f,0x44006ffa,0x3e605ffe,0x47ff305f,
0xffb03ffa,0x705ffd03,0xff100bff,0x0ffe400f,0x3ff60fff,0xffdcfffe,
0x5ff984ff,0x800dff50,0x26006ffa,0xff700fff,0xf700000b,0x03fff7ff,
0x9ff50110,0x27fe4000,0x3ffe8800,0xb000bffa,0x2005ffff,0x2e007ff8,
0x6c0005ff,0xfb81efff,0x3ffb00ff,0xf5ffb800,0x7fdc03ff,0x7fec0005,
0x7c3a8aef,0xffff107f,0x70bfee09,0x1bfea0ff,0xb17ff400,0x7fd409ff,
0x503ffb07,0x7ffcc9ff,0x2abff503,0x3a6006ff,0x7fc01fff,0x443ff907,
0x0ffd06ff,0x3e20bff6,0x7fdc00ff,0x87ff5004,0xfffb07ff,0xfffc883f,
0xa82ffcc0,0x3e2006ff,0x3fa005ff,0x17fee03f,0x7fec0000,0x40003fff,
0x30004ffa,0x20003fff,0x3fa0effe,0x7fec002f,0xff1000df,0x2ffdc00f,
0x3fff6000,0x407ffa01,0xe8001ffd,0x404ffdff,0x3fe05ffb,0x3fffb03f,
0xa82ffc80,0xfd06feff,0x998ff90f,0x9999effb,0x3ff60099,0xb003ffe3,
0x3ffb01bd,0xfc89ff50,0x5ffa80ff,0x9999fff5,0xfffdb999,0xffb007ff,
0xfd0dfd03,0x05ff881f,0x3f203ffb,0x07ff403f,0x7c2ffc40,0x3fffb07f,
0x260fff40,0xdff505ff,0x3fffaa00,0x1fff3000,0x002ffdc0,0xffff8800,
0xffa80005,0xffe88004,0xfffb0004,0x002ffe83,0x95027ff4,0x9fffb999,
0xf7039999,0xfd8000bf,0x17fdc04f,0x6401ffd8,0xfffecccc,0x3ccccdff,
0xff817fee,0x0bffb03f,0xf909ff50,0xf881ff9d,0x7c7fc85f,0xffffffff,
0x3f204fff,0x00bff15f,0x503ffb00,0xdffd09ff,0x3eabff50,0xffffffff,
0x2fffffff,0x887ff700,0x2ffb84ff,0xfc81ffd4,0x0dff301f,0xd802ffcc,
0x07ff80ff,0xfb809ffb,0x82ffcc2f,0xeeeefffa,0xfffffeee,0x3ff2003f,
0x02ffdc04,0xfff90000,0xff500007,0xdffd0009,0xfffb1000,0x005ffd03,
0x9007ffe4,0xffffffff,0x707fffff,0xd8000bff,0x7fd403ff,0x803ffb04,
0xffffffff,0xffffffff,0xf817fee5,0x7ffb03ff,0x3a1bfe00,0x542ffacf,
0x0ffd82ff,0x3ffffffe,0x204fffff,0x9ff55ffd,0x3ffb0000,0xf309ff50,
0x5ffa87ff,0xfffffff5,0x59dfffff,0x27fcc001,0x3e60bfea,0x80ffe44f,
0x3fa00ffc,0x05ff901f,0x3e05ff70,0x07ffb07f,0x7cc3ffa8,0xffff505f,
0xffffffff,0x44005dff,0x7dc01fff,0x3000005f,0x003fffff,0x004ffa80,
0x007fffa2,0x407fff60,0xfb002ffe,0x65401fff,0xcfffdccc,0xfb81cccc,
0x7ec0005f,0x27fd402f,0x7c01ffd8,0xffffffff,0x5fffffff,0xaa817fee,
0x05ffb00a,0xf883ff60,0x6c4ff8af,0x1ffd80ff,0x0006ffa8,0x3fee9ffd,
0xffd80003,0x904ffa81,0x7fd41fff,0x333dff55,0x5dffb533,0x91bfe000,
0x1bfe01ff,0x7fdc0ffd,0x413fee00,0xff9807ff,0x6c1ffe05,0x7fd402ff,
0xa82ffcc4,0xffffffff,0x003defff,0xb806ffb8,0x800005ff,0x6ffffff8,
0x27fd4000,0x1fffe880,0x1fffa800,0xaa8bffa0,0x7ff7fc0a,0x3ffc4000,
0x00bff700,0x401ffd80,0xffb04ffa,0x37fc0003,0x005ffb80,0x800ffec0,
0x3fea2ffb,0x5ff8dfd0,0xf503ffd0,0x3fe000df,0x007ff93f,0x503ffb00,
0x7ff409ff,0x7d57fea6,0x7ffe406f,0x0ffc8003,0xffd81bfe,0x5409ff10,
0x37fc407f,0x74027fd4,0x1ffe00ff,0x2a00ffec,0x2ffcc4ff,0x999effa8,
0xd0000199,0xff7005ff,0xfb00000b,0x09fff3bf,0x027fd400,0x00f7ffcc,
0x402ffd80,0x3ffe2ffe,0x07fec6c2,0x01ffe200,0x0005ffb8,0x2a00ffec,
0x3ffb04ff,0x037fc000,0x0005ffb8,0x8800ffec,0xc9bf65ff,0x07ff30ff,
0x3ea0bffe,0xff88006f,0x007ff72f,0x503ffb00,0x7fcc09ff,0x2abff53f,
0xffc806ff,0x7fd4002f,0x5c07ff32,0x05ff52ff,0x7ec03fd4,0x00ffec1f,
0x3333bfee,0xcfffcccc,0x03ffb0cc,0x7cc4ffa8,0x0dff505f,0x7fcc0000,
0x0bff7007,0xfffb8000,0x005fff70,0x3013fea0,0x0001dfff,0x7f403ff4,
0x40bffe2f,0x44000ffd,0x3ee007ff,0x7ec0005f,0x27fd401f,0x6c01ffd8,
0xffeeeeee,0x4eeeeeef,0x00017fee,0x74003ffb,0xfa93fe7f,0x201ff92f,
0xffa82fff,0xfffa8006,0x1009ff50,0x3ffb0135,0xc809ff50,0x5ffa8fff,
0x3a00dff5,0x22001fff,0x03ff74ff,0xffc9ffc4,0x201be600,0x3fe24ffa,
0xffffc806,0xffffffff,0xffb1ffff,0x44ffa803,0xff505ff9,0x6400000d,
0xff7004ff,0x7cc0000b,0x7ffec2ff,0x4ffa8000,0x037ffea0,0x00dff000,
0x7ffc5ffd,0x001ffb02,0x2007ff88,0x40005ffb,0x7d401ffd,0x03ffb04f,
0xfffffff8,0xffffffff,0x017fee5f,0x003ffb00,0x7fccffdc,0x6feaffc2,
0x2a0fffe0,0xfe8006ff,0x01bfe65f,0x3f60ffee,0x04ffa81f,0xffaeffe8,
0x200dff55,0x000efff8,0x03fedbfa,0x06feaff4,0xff8037cc,0x200ffee7,
0xfffffffc,0xffffffff,0x803ffb1f,0x7fcc4ffa,0x00dff505,0x0fffc000,
0x005ffb80,0x0bffd100,0x000bfff1,0x3ea09ff5,0x880004ff,0xffe805ff,
0xfd817d42,0x7fc4000f,0x17fee007,0x03ffb000,0xfb04ffa8,0xcccc803f,
0xccfffccc,0x3ee3cccc,0x7ec0005f,0x3fe6001f,0x7ec0ffbb,0xf103ff9f,
0xdff507ff,0x2fffb800,0x3a017ff4,0x1ffd81ff,0x9804ffa8,0x55ffefff,
0x7dc00dff,0x3f2004ff,0xc805ff8f,0x004ff8ff,0xe97fe400,0x998800ff,
0x99999999,0x36199fff,0x7fd401ff,0xa837fc44,0x000006ff,0x5c00fff1,
0xb00005ff,0x3ea01dff,0x7d4003ff,0x3fffb84f,0xd0000000,0x00fc85ff,
0x88001ffb,0x3ee007ff,0x7ec0005f,0x27fd401f,0x0001ffd8,0x7dc01bfe,
0x7ec0005f,0x77f4001f,0xdffb86fd,0xfff100ff,0x00dff509,0x542fffcc,
0xff700eff,0x207ff60d,0xf9004ffa,0x3eabffff,0x7fec006f,0x7ff5001f,
0xff5005ff,0x00003ff7,0xff8cff88,0xff800004,0x803ffb07,0x7fc44ffa,
0x00dff506,0x1bfea000,0x005ffb80,0x01fffb80,0x000fffec,0xff889ff5,
0x0000003f,0xe88bffa0,0x003ff606,0x400fff10,0x40005ffb,0x7d401ffd,
0x03ffb04f,0x8037fc00,0x40005ffb,0x64001ffd,0xf984ffff,0x3e206fff,
0x6ffa84ff,0x7ffeccc0,0x7fffb01f,0x1fffd713,0x2a07ff60,0x3fa004ff,
0xdff55fff,0x6fff8800,0xffdff100,0xfdff1001,0x0355500f,0x3fefffa0,
0xff800001,0x803ffb07,0xfff84ffa,0x1bfea3ce,0x7fe40000,0x17fee005,
0x7fff3000,0x0dffd100,0x3627fd40,0x400004ff,0xfe802aa8,0xd807fa2f,
0x7c4000ff,0x3fee007f,0xeeeeeeef,0x7ec4eeee,0x27fd401f,0x0001ffd8,
0x7dc01bfe,0xeeeeeeff,0x6c4eeeee,0x7d4001ff,0xfff02fff,0x7ffc409f,
0xeefffa84,0xfffffeee,0x36201fff,0xffffffff,0x07ff602f,0x98013fea,
0xff55ffff,0xfff7000d,0x3fffa007,0x3fffa006,0x03fff805,0x0dffff50,
0x1ffe0000,0x2a00ffec,0xfffd84ff,0x01bfea7f,0x1ffec000,0xddfff700,
0xdddddddd,0x37ff449d,0x09fff300,0xfa93fea0,0xeeeeeeff,0x00eeeeee,
0x7403ffd4,0xb002e2ff,0xf88001ff,0x3fee007f,0xffffffff,0x7ec5ffff,
0x27fd401f,0x0001ffd8,0x7dc01bfe,0xffffffff,0x6c5fffff,0xff8001ff,
0xfffb00ff,0x27ffc403,0x7fffffd4,0xffffffff,0xffd5000c,0xd801bfff,
0x4ffa81ff,0xafffe400,0xd0006ffa,0xf9001fff,0x7dc009ff,0xfff803ff,
0x3fffe003,0xff000003,0x007ff60f,0x3f209ff5,0xdff50fff,0x3fa00000,
0x3fee002f,0xffffffff,0x3f65ffff,0x7e4000ff,0xffa802ff,0x3fffff64,
0xffffffff,0x7fd400ff,0x02ffe807,0x0007fec0,0xb801ffe2,0xffffffff,
0x45ffffff,0x7d401ffd,0x03ffb04f,0x8037fc00,0xfffffffb,0x5fffffff,
0x4000ffec,0x3ee06ffd,0x7774407f,0xfffffa83,0xbeefffff,0x06a60000,
0xa81ffd80,0xfe8004ff,0x00dff55f,0x017ffe60,0x8007ffe6,0xf801fff9,
0x3f2003ff,0x000000ff,0x3ff60fff,0x027fd401,0x0dff5062,0x3ffe0000,
0x3ffee000,0xffffffff,0xfff55fff,0x3ffa0005,0x27fd400f,0xfffffffd,
0xffffffff,0x07ffa801,0x0002ffe8,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x4c000000,0xaa8000aa,0x2a20002a,0x555540aa,0xaaaaaaaa,0x531aaaaa,
0xaa880035,0x6edcc02a,0x5555511c,0x55555555,0x00555555,0x80055530,
0x000aaaa9,0x26355530,0xaaaaaaaa,0x5551001a,0x25551000,0xaaaaaaa8,
0xaaaaaaaa,0x5555510a,0x55555555,0x2a215555,0xaaaaaaaa,0xdd700019,
0x9ddddddd,0x777775c0,0x2a04eeee,0xeeeeeeee,0x7776405e,0x03eeeeee,
0x00333260,0xddddddd3,0x26662bdd,0x99999999,0x00019999,0x35500198,
0x00000000,0x00000000,0x40000000,0xa8001ffd,0xd0004fff,0xfffd0dff,
0xffffffff,0x2e7fffff,0x3a2005ff,0x3f202fff,0xff33ffff,0xffffffff,
0xffffffff,0xfff8001f,0x3fee000f,0xfd0004ff,0x3ffeebff,0xffffffff,
0xfff301de,0x2dff5000,0xfffffff9,0xffffffff,0xfffff31f,0xffffffff,
0x3ea3ffff,0xffffffff,0x2002efff,0xfffffffc,0x3ff205ff,0x5fffffff,
0x3ffffee0,0x6c06ffff,0xffffffff,0x3fea004f,0x7ffd401f,0x97ffffff,
0x33333333,0x53333333,0x3fb6e203,0x03ff12de,0x3000bff0,0x59dffdb7,
0x3fb6e200,0x5cc003ce,0x300acefd,0x017bdfb7,0x677f65c0,0x00ffec03,
0x01fffc80,0x407ffdc0,0xfffffffe,0xffffffff,0x00bff73f,0x807fffa2,
0x1ffffffb,0xfffffff3,0xffffffff,0x4001ffff,0x003ffffa,0x01ffffee,
0x57fffe60,0xfffffffb,0x2fffffff,0x8007ff98,0xfff36ffa,0xffffffff,
0x263fffff,0xffffffff,0xffffffff,0xfffff51f,0xffffffff,0x995007ff,
0x79999999,0x66666540,0x2603cccc,0xcccccccc,0x6665c03c,0x02cccccc,
0x007ffea0,0x99999993,0x0000e999,0xffff5033,0xbfdfffff,0x0017fe00,
0xfffffff9,0x7dc01bff,0xefffffff,0x7fffd401,0x6c2fffff,0xffffffff,
0x7fff4c02,0xb00effff,0x220003ff,0x26006fff,0x99703fff,0x99999999,
0x27fffd99,0xe8805ffb,0x7f401fff,0xccc881df,0xfffdcccc,0x4ccccccc,
0x7ff7ec00,0x3ffee006,0x7dc002ff,0xdff75fff,0xb9999999,0xf987ffff,
0xffa8007f,0x999fff36,0x99999999,0x3ffe6199,0xcccccccc,0x50cccccc,
0x99999fff,0xffffd999,0x00000007,0x00000000,0xff500000,0x3800003f,
0x320cc000,0xfebcefff,0x3e006fff,0x3ffa005f,0xffecbcef,0xdfff705f,
0x5fffd979,0x37fffea0,0xb2fffecb,0xfb77bfff,0x3fea07ff,0xffecbcef,
0x01ffd81f,0x0fffea00,0x002fff40,0x4bfff300,0x74405ffb,0xff801fff,
0xff10001f,0x7c40000f,0x002ffccf,0x09ffdff7,0x5ffffe80,0xb100bff7,
0x7ff98fff,0x36ffa800,0x98000fff,0xa80006ff,0xfd3006ff,0x000001ff,
0x00000000,0x88000000,0x80000199,0x30cc0003,0xfb307fff,0x3fe001ff,
0x1dff5005,0x307ffee0,0x3f607fff,0x7ffc40ff,0xefffb80d,0xff980dff,
0x1fffc40f,0xfd86ffc8,0x7ec0001f,0x7fdc00ff,0xd100000f,0x7fdc1dff,
0x3fffa205,0x00fff001,0x003ffc40,0xf35ff700,0x3fee00bf,0x26007ffc,
0xf75ffdff,0x7ffc00bf,0x001ffe61,0x7fcdbfea,0x7fcc0007,0xffa80006,
0x2fff4006,0x3bfb6e20,0x0332e03c,0x26039950,0x2ceffedb,0x3bfb2e00,
0x0000003c,0x0380cca8,0xffd0cc00,0x3fffe207,0x00bff005,0xff00bffa,
0x03ffe85f,0x3f227fec,0x3fee00ef,0x3ea00fff,0x027fe45f,0xffb0fff2,
0xff880003,0x3ffe206f,0x3fa00002,0x2ffdc0ff,0x01fffe88,0x8001ffe0,
0x00007ff8,0x0ffe9ffa,0xfccffb80,0x5ff9002f,0x17feebff,0x264ffd80,
0xfa8007ff,0x00fff36f,0x006ff980,0x006ffa80,0xb81fffc4,0xffffffff,
0x00ffe81e,0x7e41ffdc,0xffffffff,0x3ffa600d,0x00efffff,0x99999995,
0x07999999,0x01c0ffec,0x7fcc6600,0x3ff3fa07,0x05ff800f,0xf900b970,
0x037fcc7f,0xfd07ffc4,0xffff003f,0x23ffb005,0xfa807ff8,0x00ffec7f,
0x7d407999,0xbffd03ff,0x7fec0000,0x85ffb82f,0x800effe8,0xccfffcca,
0x3fe2001c,0xff300007,0x401ffe4b,0x4ff9cffb,0xff59fd00,0x8017feeb,
0x3fe63ffc,0x6ffa8007,0x8000fff3,0x80006ff9,0xc8006ffa,0xfffb86ff,
0xfffecbce,0x2007ff42,0x7ff43ffb,0xffecbcef,0xdfff505f,0x3fffd979,
0xffffff90,0xbfffffff,0x1c0ffec0,0x7dc66000,0x36df904f,0xdddd91ff,
0xdddfffdd,0x20003ddd,0x3fee3ffc,0x23ffb003,0xf9006ff8,0xff7001ff,
0x4017fea5,0x3ff60fff,0x01dffb01,0x5c0fffd8,0x00000fff,0x2e07fff7,
0x7ff445ff,0xfff9000e,0x005fffff,0x0003ffc4,0x3e62ffd8,0x4ffb807f,
0xff300fff,0x3eebff53,0x3ffa005f,0x001ffe61,0x7fcdbfea,0x7fcc0007,
0xffa80006,0x7ff88006,0xd81fffcc,0x3ffa0fff,0x51ffdc00,0x3ee01dff,
0x7ffc41ff,0x70dff903,0xdddddddd,0x407fffbd,0x00381ffd,0x2ffc8cc0,
0xff70ffa8,0x3fffff67,0xffffffff,0xba9802ff,0x323ffffd,0xff9002ff,
0x4017fe65,0xaaaafffa,0xffcaaaaa,0x999dff73,0xfd999999,0x40ffec3f,
0x8800effd,0x3fe25fff,0xf300002f,0x7fdc0bff,0x03bffa25,0xfffcca80,
0x22001ccc,0x880007ff,0x7ff40fff,0xca7fdc02,0xbfe401ff,0xbff75ffa,
0x31ffea00,0xf5000fff,0x01ffe6df,0x00dff300,0x00dff500,0xfe87ffa0,
0x27fec03f,0xfb801ffd,0x00bffa3f,0xffc85fff,0x01ffe404,0x405ffd80,
0x00381ffd,0x1ffd8cc0,0xff70ffcc,0x3fffff69,0xffffffff,0xfed982ff,
0xffffffff,0x4007ff63,0x9ff74ffb,0x3fffe600,0xffffffff,0xfff94fff,
0xffffffff,0x7ec5ffff,0x077fec1f,0x25fff500,0x00004ffd,0xb80dfff1,
0xfffd15ff,0x3ffc0001,0x0fff1000,0x09ff7000,0xfb80bff7,0x809ff34f,
0x2bff54ff,0x9999dffb,0xeffda999,0x557ffcc0,0xaaaaaaaa,0xf36ffcaa,
0xf98000ff,0xfa80006f,0xffb0006f,0x201bfe65,0xffd0fff8,0x23ffb801,
0xffc805cb,0x201ffe23,0xd8007ffa,0xffd806ff,0x4c000381,0x7443ffd1,
0x027fdc3f,0xfb002ffc,0x7bffffff,0x7ff47ff9,0x29ff7001,0xf3003ffc,
0xffffffff,0x2bffffff,0xfffffffd,0xffffffff,0xfd87ff63,0xfd8000ef,
0x006ffaef,0x03fffa00,0xfd1bff70,0x4000bfff,0x220007ff,0xe80007ff,
0xfff881ff,0xf93fee00,0x47fe607f,0xfff75ffa,0xffffffff,0xff301dff,
0xffffffff,0xffffffff,0x3ffffe6d,0xffffffff,0x7fffcc3f,0xffffffff,
0x3ea2ffff,0xff90006f,0x400ffee7,0x1ffd1ffd,0x003ffb80,0x7d47ff90,
0x1fff005f,0x07ffdc00,0x1c0ffec0,0x7ec66000,0x3217f63f,0x5ff803ff,
0x7bfffb00,0x23ffb813,0xf9002ffd,0x013fee7f,0x00037fd4,0x80007ff9,
0xdffb1ffd,0x3fe20001,0x0001ffff,0x003fffb0,0xdffddff7,0x20005fff,
0x220007ff,0x4c0007ff,0x3ff606ff,0xc93fee04,0x4df901ff,0xfff75ffa,
0xffffffff,0xff301dff,0xffffffff,0xffffffff,0x3ffffe6d,0xffffffff,
0x7fffcc3f,0xffffffff,0x3ea2ffff,0xff90006f,0x400bff2b,0x1ffd2ffc,
0x803ffb80,0xffffdba9,0x333bfee3,0xeccccccc,0xff5001ff,0x3ff6003f,
0x4c000381,0x3eebff71,0x01ffd80e,0xfa805ff8,0x7fec01ff,0x400ffee3,
0xbff53ffd,0x01ffee00,0x004ffb80,0x7ecffec0,0x540000ef,0x0004ffff,
0x007fff70,0x37ffffee,0x000fffd8,0x20007ff8,0x40007ff8,0x3ea03ffc,
0x93fee07f,0x9ff04ff9,0xffbaffd4,0xeeeeeeef,0x4c3fffff,0xcccccfff,
0xdccccccc,0xffff36ff,0xffffffff,0xfff987ff,0xeeeeeeee,0x2a1eeeee,
0xfb0006ff,0x007ff69f,0xffea7fdc,0x41ffdc00,0xfffffed9,0x3f23ffff,
0xffffffff,0x02ffffff,0x002fff98,0x00e07ff6,0x3fea3300,0xfd01ff9e,
0x0bff001f,0xd009ff70,0x2ffd47ff,0xf11fff80,0x3ffa00ff,0x1bcb801f,
0x2e00dff3,0x3bff60ac,0x00006fff,0x0000dffb,0x8017ffe6,0x225ffffb,
0xf8006fff,0x3e20007f,0x7fc0007f,0x17ffc00f,0x7f44ffb8,0x2a1ff987,
0x0bff75ff,0x4bfff910,0xa8007ff9,0x0fff36ff,0x06ff9800,0x06ffa800,
0x3a7ffd00,0xff7001ff,0x7003ffa9,0xfffd87ff,0xfcbdffff,0x3ffff63f,
0xffffffff,0x7cc03fff,0x7ec003ff,0x4000381f,0xfffff119,0x01bfee07,
0x7ec02ffc,0x7ffcc03f,0x007ffe24,0xffe8dff7,0x7fffd403,0x0fffc406,
0xfb805fff,0x3fff60ff,0x0003ffff,0x0005ffb8,0x006fff88,0x542fffdc,
0x7c004fff,0x3e20007f,0x3ea0007f,0xffffffff,0x705fffff,0x1ffc89ff,
0x3fea37e4,0x400bff75,0xff30fffa,0xdff5000f,0x0001ffe6,0x0000dff3,
0x2000dff5,0x5ffb2fff,0x74fff200,0x7fe400ff,0x2f7fff63,0x91ffdc09,
0x800007ff,0x8004ffe8,0x00381ffd,0xfff90cc0,0x07ffe60b,0x6402ffc0,
0x3fe607ff,0x77fdc4ff,0x85fff300,0xf302fff9,0x409fffff,0x7fd46ffd,
0x9fff101f,0xfadfffd8,0x5c0001ff,0xe80005ff,0x5c000fff,0x3ff206ff,
0x1ffe002f,0x07ff8800,0x3ffff600,0xffffffff,0xffb81fff,0x3e27fcc4,
0xbaffd43f,0x7f4005ff,0x00fff32f,0x3e6dff50,0x7cc0007f,0xfa80006f,
0xff88006f,0x007ff71f,0x7ff4fff6,0xa9ffec00,0x7ec01fff,0x013fee3f,
0x0bffd000,0x207ff600,0x10cc0003,0x315bffff,0x4009fff9,0xff9803cc,
0xfba88adf,0xfe84ffff,0xfc989bff,0xfffb03ff,0xfff73159,0x15dfff5b,
0x03fffd73,0x5139fffd,0xd81dfff9,0x1bff25ff,0x0bff7000,0x1fffc800,
0x05ffb800,0x8007fff4,0x220007ff,0xf10007ff,0x999999ff,0x9ffd9999,
0xfd09ff70,0x2a07fd4f,0x0bff75ff,0xf35ffc80,0xff5000ff,0x001ffe6d,
0x000dff30,0x000dff50,0x3ea1fff5,0x3fff005f,0xfd007ff6,0x013fee7f,
0xff98fffa,0x01597006,0x0003bff6,0x01c0ffec,0xffa86600,0xffffffff,
0x4000005f,0xfffffffc,0x86ff8cff,0xffffffd8,0x7e403fff,0xffffffff,
0x3ffffe64,0x102fffff,0xfffffffb,0xffb01fff,0x01fffc43,0x00bff700,
0x01fffdc0,0x405ffb80,0xf005fff9,0x7c4000ff,0xff70007f,0x3ffdc00b,
0x7e427fdc,0xf50dfb2f,0x017feebf,0x3e6bff90,0xffa8007f,0x000fff36,
0x0006ff98,0x8006ffa8,0x3fe25ffe,0x37fdc01f,0x7cc07ffb,0x07ffb3ff,
0x7c4fff98,0x7fdc02ff,0x0fffc80f,0x07ff6000,0x2330000e,0xffeaaff8,
0xd901efff,0xdddddddd,0x83dddddd,0xdfffffea,0x5c07ff61,0x2ceffffe,
0xffffd300,0xfd9105bf,0x0019ffff,0xffffffd5,0x20ffec07,0x0001fffa,
0x2000bff7,0x0004fff9,0x2e017fee,0xff803fff,0x3fe20007,0x5ffd0007,
0x17ffc400,0x3e613fee,0xf507ff4f,0x017feebf,0x3e67ffd0,0xffa8007f,
0x000fff36,0x0006ff98,0x4006ffa8,0x7dc1fffb,0xfff300ef,0x407ffdc5,
0xf93ffff8,0x7ffcc0ff,0x0fffd44f,0xb84fff88,0x40001fff,0x00381ffd,
0x44e98cc0,0xfd801a98,0xffffffff,0x02ffffff,0x00003531,0x300002a6,
0x54c40035,0x26a60001,0x81ffd800,0x70006ffd,0xf1000bff,0xb8000bff,
0xffb005ff,0x07ff803f,0x01ffe200,0x001ffe60,0xff71bff2,0x3ebffa09,
0x75ffa80f,0x7d400bff,0x0fff31ff,0x26dff500,0x4c0007ff,0xa80006ff,
0x3e6006ff,0xfffd05ff,0xfff93137,0xbefff887,0xffeffca9,0x15bfff33,
0xfffff751,0x39fffd09,0x1dfff951,0x002fffa8,0x381ffd80,0x010cc000,
0xffffb000,0xffffffff,0x00005fff,0x00000000,0x00000000,0x881ffd80,
0xb8003fff,0xfe8005ff,0x5c0000ef,0xff1005ff,0x3ffc01df,0x0fff1000,
0x009ff900,0x5c3fff30,0xdff904ff,0x57fea0bf,0xb8805ffb,0x3fe66fff,
0x6ffa8007,0x8000fff3,0x80006ff9,0x4cc06ffa,0x100ffffd,0xfffffffb,
0x3fee07ff,0x9cffffff,0x3fff23ff,0x8cffffff,0xffd886ff,0xffffffff,
0x56fffcc0,0xcccccccc,0x3ffb00cc,0x99999990,0x99999999,0x000003b9,
0x2aa60000,0xaaaaaaaa,0xaaaaaaaa,0x1111110a,0x11111111,0x00111111,
0x00000000,0x2e03ffb0,0x5c001fff,0x7d4005ff,0xeeeeeeff,0xeeeeeeee,
0x00bff75e,0xf02fffd4,0x7c4000ff,0xfff8007f,0x9ffd0001,0xf9827fdc,
0xff503fff,0x3bbffeeb,0xffffeeee,0x3fe60fff,0x6ffa8007,0x8000fff3,
0xeeeefff9,0xeeeeeeee,0xdfff55ee,0xffffdddd,0x7001ffff,0x59dffffd,
0xffffe980,0xa87ff33e,0x1dfffffe,0x75407ff6,0x03ffffff,0xfffffff5,
0xffffffff,0x007ff603,0x00000000,0xff700000,0xffffffff,0xffffffff,
0x3fffee3f,0xffffffff,0x1fffffff,0x00000000,0x00ffec00,0xb800dffb,
0x7d4005ff,0xffffffff,0xffffffff,0x00bff77f,0xf03fffd8,0x7c4000ff,
0x7fd4007f,0x3fee0006,0xe813fee7,0xff500fff,0x3ffffeeb,0xffffffff,
0x3ffcc1df,0x9b7fd400,0x4c0007ff,0xffffffff,0xffffffff,0xfffff56f,
0xffffffff,0x5300019f,0x02a60001,0x006a6200,0x004d4c00,0x3fffffea,
0xffffffff,0x0000001f,0x00000000,0xdddda800,0xdddddddd,0x1ddddddd,
0xfffffff7,0xffffffff,0x0003ffff,0x80000000,0x3e201ffd,0x3ee003ff,
0x7fd4005f,0xffffffff,0xffffffff,0x800bff77,0xf81fffe8,0x3e20007f,
0x7fec007f,0x3fe20004,0x409ff73f,0x3ea05ffb,0xfffff75f,0x9bdfffff,
0x01ffe603,0x7cdbfea0,0x7cc0007f,0xffffffff,0xffffffff,0xffffff56,
0x179ddfff,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x99700000,0x01cca801,
0x400ccb80,0x79931cca,0x99500000,0x99999999,0xccc87999,0x52665402,
0x80000199,0x33200ccb,0x0073323c,0x0ccb8400,0x500f3260,0x80000199,
0x95002cc9,0x00000839,0x8554154c,0x00aa82a9,0x001eea80,0x002b32a2,
0x2003774c,0x00bcdcc8,0x006f72e2,0x1002f2e6,0x013ae079,0x3bffb260,
0x3ae6003c,0x71002def,0x2079dfdb,0xb9501fff,0x98359dfd,0x01deffdc,
0x7f654797,0x7edc40bd,0x24cb82de,0x82cefeca,0x7dc00ffe,0x3627973f,
0x1ffd0bdf,0xf73ffb80,0x1002dcbf,0xffffc85d,0xffffffff,0x0fffdc5f,
0x363fff88,0xffb801ff,0x80ffec02,0x3fe0effd,0x64c0003f,0x5c07ff97,
0x3fe00fff,0x00033e27,0xd007ff88,0x01f441ff,0xff100764,0x3e66fc87,
0x0037ec2f,0xd802ffec,0x00ffffff,0x2007ffa8,0xfffffffa,0xffffe981,
0xffff903f,0x3fe607ff,0x8009f906,0xfffffffd,0x3fee00ef,0x0effffff,
0x3ffffee0,0x7fc1efff,0x7ffec41f,0x73ffffff,0xffffffff,0x3f2dfb09,
0x30ffffff,0xbfffffff,0xfff97fd8,0xfe8bffff,0x9ffdc00f,0xffffd6fd,
0x7003ffa9,0x57fee7ff,0xfd735ffb,0x3ffd117b,0x7777775c,0x3fffdeee,
0xfb06ffd8,0x01ffd8bf,0x6c02ffb8,0xeffd81ff,0x001fffc0,0xf37ffda8,
0x7fff40bf,0x449ff302,0x0001dfff,0xf9805ffb,0x0fffa26f,0x3605ffc8,
0x217fd46f,0x3fe20ffc,0x3ffe6003,0x5ffdc00f,0xa804ffb9,0xff1007ff,
0x8dff735b,0xffcdfff8,0x567fd43f,0x7dc0ffeb,0x87f706ff,0x3bfff200,
0x0ffffdbc,0xbcefffc8,0xb80efffd,0xecbcefff,0x3ffe2fff,0x37fffa21,
0xefffecbc,0xfdbbdfff,0x6ffec2ff,0xffffceff,0xfddfff9d,0x3ff62fff,
0xffddfffc,0x03ffa4ff,0x3f67ff70,0x1fffffde,0xfb801ffd,0x22bfd53f,
0xfffffffe,0x05ffffff,0x20bffb00,0x7dc3fff8,0x0ffec0ef,0x2017fdc0,
0x7fec1ffd,0x02eed80e,0x3fffae20,0x441ffe6f,0xf704ffff,0x7fffc45f,
0x7d4003ef,0x17fe405f,0x320ffff2,0xff702fff,0x4437fc45,0x0ffe45ff,
0x4ffffc80,0x3f217640,0x04cc9807,0xff50df70,0xb107fe41,0x22ff41ff,
0xffd13ff9,0x233eadfd,0x03eb8bfa,0xd101fff1,0xfff987ff,0x44ffe883,
0xf903fff9,0x83f2a1ff,0x3f205ffb,0xe880efff,0x3fff60ff,0x7fffd40f,
0x37fec0cf,0x817dfffb,0xffd0fffc,0xb3ffb801,0x7515dfff,0x2e007ff4,
0xd127c3ff,0xffbfffff,0x2000bfff,0x7d406ffd,0x3fff30ff,0x7003ffb0,
0xffd805ff,0x003bff61,0x7ffe4c00,0x7fe42dff,0x6feffa82,0x3aa0ffd0,
0x00cfffff,0x7c01fff0,0xfffc80ff,0x40bfff23,0x7fec5ff8,0x447ff701,
0xff8806ff,0x8000ffdc,0x000005fe,0xf0ffd404,0x85ff507f,0x997fc408,
0xfb6fb8cf,0xfffdfdff,0x813fea0d,0x7fec6ffa,0xd1ffea04,0xffd807ff,
0x0fff1b25,0x00ffff88,0xffd9bfe2,0x7fffb01f,0xfd9ffe20,0x3ffa01ff,
0xb801ffd2,0x3fffb3ff,0x2007ff40,0x0fe23ffb,0x5c45dff9,0xb8002fff,
0xfc800fff,0x207ffd5f,0xfb801ffd,0x8ffec02f,0x0000effd,0xfffffea8,
0x09ff500c,0x81ff9df9,0x64c05ff8,0x02dfffff,0xfa817fe4,0x3fff204f,
0x202fffcb,0x3fea1ffe,0x507ff404,0xffb809ff,0x2003ff99,0x2a60dffd,
0xaaaaaaaa,0x80aaaaaa,0xffffedb9,0xf105ff11,0x1ff9007f,0x736fb822,
0x7bffffdb,0x017fea03,0x01fff013,0xff30ded8,0x1fff300f,0x03dc897a,
0xc803fff8,0x0bffb1ff,0x3e03ffdc,0x09ffb0ff,0xffd3ffc8,0xb3ffb801,
0xffe80bff,0x71ffdc00,0x00ffe83f,0xa8009ff5,0xd1001fff,0x40bffdff,
0xfb801ffd,0x4ffec02f,0x40005ffd,0xefffffc8,0xd0dff002,0xa85ff59f,
0xd71002ff,0x017dffff,0x3f60bff3,0x7ffe401f,0x3f202fff,0x03ffe24f,
0xfe8dff30,0xe9bfe02f,0xfff3006f,0xfffffd87,0xffffffff,0x3ffa22ff,
0x31ffefff,0x13fa03ff,0x5c07ff90,0x2fff986f,0x1dfff880,0x017fe200,
0x8027fdc0,0x00debffd,0x007ffa00,0x7fecbfea,0x01bfea03,0x3ff61ffd,
0xe9ffdc03,0x7fdc00ff,0xe807ffb3,0x7fdc00ff,0xff987f53,0x003ff404,
0x8005fff3,0x00fffff9,0xaaa87ff6,0xacffdaaa,0xffb2aaaa,0x000bfffd,
0x67ffffec,0x07fec001,0x9ff15ff1,0x8000ffd8,0x4fffffd9,0x7c40ffe8,
0xfff9006f,0x7ffcc05f,0x400fff60,0x3fe63ffd,0x22ffb80f,0x98802ffb,
0xffb0ffda,0xffffffff,0x745fffff,0xff30acff,0x7c0ffe23,0x7ffd103f,
0x7cc6fb80,0xc802ffaf,0x0bdfffff,0x0013fea0,0xc8017fe4,0x4c005fff,
0xcffffeca,0xcccccccc,0x5ffb4ffd,0x202ffcc0,0x5ffb0ffe,0xfd4ffa80,
0x3ffb801f,0xfe805ffb,0x77fdc00f,0x1ffb83fe,0x400ffdc0,0x0003fff9,
0xd805fff9,0xffff11ff,0xffffffff,0x3ff6ffff,0x003fffff,0x0befff88,
0x45ff7000,0x8dfd0ffa,0x440005ff,0xfb87ffeb,0x01ffd43f,0x03ffffc8,
0xff89bfee,0xdff7001f,0x7417ffc4,0x02ffc47f,0x54cffe20,0xaaaaaaaa,
0x10aaaaaa,0x3ff507ff,0x7fc42ffc,0x01fff982,0x3fe26fb8,0x9003ff94,
0xdfffffff,0x007ff707,0x4007ff60,0xc9805ffb,0xfffffffe,0xffffffff,
0xb5ffffff,0x7fcc03ff,0xd87ff405,0x7fd401ff,0xb801ffd4,0x03ffb3ff,
0x5c00ffe8,0xf700aeff,0x1ffc803f,0x027ff440,0x0bfffb00,0xff11ffd8,
0xffffffff,0x36ffffff,0xfffadfff,0x7ffc4000,0xf10000be,0xf937ecbf,
0x00ffe61f,0xffff9100,0xfd8dff10,0xfffc800f,0x3fa03fff,0x01bfea2f,
0xfc83ffe2,0x84ff984f,0x66441ffc,0x0027fc40,0x221ffc00,0x3ff21fff,
0x303ff621,0x2e001dff,0xe83fa66f,0xff93002f,0x41dfffff,0xd0003ffc,
0x3ee003ff,0x7ffe404f,0xfeacefff,0xffffffff,0xfb6fffff,0x2ffcc03f,
0x7ec3ffa0,0xa7fd401f,0x7e400ffe,0x803ffb3f,0x7e400ffe,0x2ffc403f,
0x3a01ffe0,0x2e0005ff,0x203fffff,0x2aaa1ffd,0xacffdaaa,0xffb2aaaa,
0x0037fecb,0x67ffffe4,0x27fe8001,0x4bfea4ff,0x50000ffc,0x09fffffb,
0x7fc47ff6,0xafffc805,0xf303fffc,0x02ffd8df,0xff11ffe4,0x03ffb01d,
0xbfd0bff3,0x003ff621,0x3200ddd3,0xfffdbdff,0x3bffe22f,0x7d43fffc,
0x099999ef,0x4188df70,0xb7300009,0x7dcfffff,0xffb0003f,0x0fff2005,
0x1befffd8,0x0000ffe8,0x7cc03ffb,0x87ff405f,0x7d401ffd,0x801ffd4f,
0x3ffb3ffd,0x400ffe80,0xfe803ffd,0x09ff500f,0x000effd8,0xff5fff10,
0x07ff603f,0xb00bfee0,0x7ffc43ff,0xfeb88003,0x2002efff,0x2ff99ffb,
0x06feaffc,0x7fff5c40,0x7fd402ef,0xc805ff73,0x3ff22fff,0x47ff703f,
0x3e206ff8,0x40ffec5f,0x3fa05ff8,0x77ffcc0f,0xfa804fff,0xffd1007f,
0x89fb3dff,0x3fffffe9,0x7fffffc4,0xdf705fff,0xb8000000,0x9ff52fff,
0x2e135100,0xffb003ff,0x07ffe605,0x0003ffd0,0xf9807ff6,0x87ff405f,
0x7d401ffd,0x803ffb4f,0x3ffb3ffe,0x401ffd80,0xfc803ffe,0xff930bff,
0x7ffe405f,0x3ffa0000,0x360dff73,0xffb801ff,0x20ffec02,0x0000fffa,
0x3fffff6a,0x5ffcc00c,0x7fec0ffb,0x93003ff9,0x03bfffff,0xffeb7fc0,
0x0bfff200,0x6c0ffff2,0x0ffea0ff,0xff307fec,0x80bff209,0xfea83ffa,
0xf5003eff,0xbb8800ff,0x6540aa61,0xeeea81bc,0x04eeeeee,0x20000bd5,
0x7ec00cba,0x00dff34f,0x3fea7ff7,0x0fff8805,0xf009ff90,0x9b7005ff,
0x9807ff63,0x7ff405ff,0xa803ffb0,0x07ffb4ff,0xfd9fffcc,0x1ffec01f,
0x807fff30,0xeffffff9,0x80efffff,0x0001fffb,0xffd1bff2,0x003ffb09,
0xfd805ff7,0x06ffd81f,0xfffc9800,0x3fa02dff,0xffb86fde,0x75400ffd,
0x00cfffff,0xffaffc80,0x0bffa204,0xf105ffc8,0x40ffc89f,0x37f42ffa,
0x99009990,0x98000807,0x000006ee,0x00000000,0x3ff60000,0xd1ffe404,
0xffe805ff,0x803fff11,0x3fa06ffb,0x7ffe403f,0x97ffc405,0x3e601ffd,
0x87ff405f,0x7d401ffd,0x01fff74f,0x367ffff1,0x7fdc01ff,0xffff880f,
0x3bffe603,0xefffffff,0x3fea0eff,0x3e60002f,0x7ffcc1ff,0x400ffec1,
0x7ec02ffb,0x3fff881f,0x1000d554,0x0dffffd7,0x213ffff2,0x206ffff9,
0x2efffff8,0x7ffcc000,0x174401ff,0x3ea02e40,0xd17fa21f,0x01ffa8bf,
0x00000000,0x2aa98000,0x55545551,0x2602aaa1,0x0dddc41a,0x531bbb88,
0x15555555,0x3feab332,0x1fff100f,0xb8077fd4,0x77fdc6ff,0x05fff300,
0xf7037fe4,0x6c0bffff,0x07ff66ff,0x7405ff98,0x03ffb0ff,0xff14ffa8,
0xff9537df,0x3ff67ffd,0x77ffc401,0xfeffca9b,0x57fea03f,0xd12ceda8,
0x3ffe63ff,0xccccccad,0x3a20cccc,0xdff903ff,0x400ffec1,0x7ec02ffb,
0x1fff701f,0x8001fffc,0xf507ffda,0x3fe05fff,0x3fe204ff,0x200001df,
0x0006fffe,0x89d90000,0x1bd50ee9,0x4cc03ed8,0x99999999,0x26199999,
0x99999999,0x41999999,0xfb82cdb8,0x7cfff76f,0x0bffe3ff,0x3ff60bfa,
0x21fff706,0xfffffffe,0x3a7ffd1f,0xca8adfff,0xffd86ffe,0xffeb89bf,
0xbfffe80f,0x5fffb989,0x96fffcc0,0xeadffdb8,0xeb89beff,0x3ff61fff,
0x017fe601,0x3ff61ffd,0x727fd401,0xffffffff,0x3f67ff39,0xfffa801f,
0xf9cfffff,0x002dc03f,0x7ffd43d1,0xffffffff,0x3f21ffff,0x27ff406f,
0xf7003ffb,0x1ffd805f,0xff9bffa0,0x6440003f,0x03fffe07,0x100fffec,
0x0000019f,0x0007fff7,0x00000000,0xffff1000,0xffffffff,0x3fe2ffff,
0xffffffff,0x2a7fffff,0x5c5fffff,0x4fff76ff,0x3ffe3fff,0x405ffc42,
0x7fc42ffe,0x3ffffa1f,0xffd1ffff,0x3ffffe27,0x105fffff,0xfffffffb,
0x3f6205ff,0xffffffff,0xffff9004,0x447fffff,0xfffffffe,0x0ffec2ff,
0xe80bff30,0x03ffb0ff,0x74c4ffa8,0xf33effff,0x007ff67f,0x77ffff4c,
0x0007ff33,0xffff5000,0xffffffff,0x3fea3fff,0x7ffcc01f,0x0003ffb2,
0x201ffd80,0xfff3fff9,0x80200007,0x3ee06ffd,0x0000007f,0x007ffc40,
0x00000000,0x7fc40000,0xffffffff,0xf17fffff,0xffffffff,0x2fffffff,
0xfda8cff8,0x7ddbfee4,0xf8fffe7f,0x7f64c2ff,0x237fc42f,0x66643ffb,
0x90cccccc,0x7fdc45bb,0x803effff,0xdfffffea,0xfffeb800,0x54002cef,
0x1defffff,0xfffffd90,0x03ffb019,0x3a02ffcc,0x03ffb0ff,0x2604ffa8,
0x1ffd800a,0x000a9800,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x99999900,0x99999999,0x66666499,
0xcccccccc,0x887f97ff,0x2dff70ff,0x3ffa7ffa,0xfd017d43,0x745ff30b,
0x8000005f,0x20001a99,0x260001a9,0x9880000a,0x2a62000a,0x00000001,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x1fd7fe80,0x3fea3f90,
0x7ecdff35,0x1307e42f,0x2209ff73,0x00006609,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x7f400000,
0x3fb03fb7,0x7fc53fe6,0xe883ff24,0x3ffffe26,0x0000000f,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0xfd000000,0xff113eef,0x8ffe2ff8,0x10ff47fa,0x1019dffd,0x10037975,
0x7750eee3,0x00000001,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0xfe800000,0x3f2fbfa7,0xfb0ff42f,0x02e37cc5,
0x7fffd400,0xe980beff,0x7ec1fff2,0x0000001f,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x44000000,0xeeeeeeee,0x5eeeeeee,
0x13ff4000,0x107ffffb,0x00981883,0xffff7000,0x7bffffff,0x3fe5ffd7,
0x007ff60f,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0xffff1000,0xffffffff,0x8000ffff,0x0aa987fe,0x00000000,
0x7ee6ffdc,0xffffffff,0x41ffd2ff,0x00001ffd,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x7fffffc4,0xffffffff,
0x7f40007f,0x00000007,0x4075c000,0xfffffeb9,0x0000003f,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00300000,0x002b332a,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
};
static signed short stb__arial_38_latin_ext_x[560]={ 0,2,1,0,1,1,1,1,2,2,1,1,2,1,
3,0,1,3,0,1,0,1,1,1,1,1,3,2,1,1,1,1,1,-1,2,1,2,2,2,1,2,3,0,2,
2,2,2,1,2,1,2,1,0,2,0,0,0,0,0,2,0,0,0,-1,1,1,2,1,1,1,0,1,2,2,
-2,2,2,2,2,1,2,1,2,1,0,2,0,0,0,0,0,0,3,0,1,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,3,1,0,1,-1,
3,1,1,0,0,2,1,1,0,-1,2,1,0,0,3,2,0,3,1,1,0,2,1,1,0,2,-1,-1,-1,-1,
-1,-1,0,1,2,2,2,2,0,2,-1,0,-1,2,1,1,1,1,1,2,1,2,2,2,2,0,2,2,1,1,
1,1,1,1,1,1,1,1,1,1,0,3,-1,0,1,2,1,1,1,1,1,1,2,2,2,2,2,0,2,0,
-1,1,-1,1,-1,1,1,1,1,1,1,1,1,1,2,1,-1,1,2,1,2,1,2,1,2,1,2,1,1,1,
1,1,1,1,1,1,2,2,0,0,-2,-1,-1,-1,-1,-1,2,1,2,3,3,2,0,-2,2,2,2,2,1,2,
-1,2,2,2,2,0,0,2,2,2,2,2,2,1,2,2,1,1,1,1,1,1,2,1,2,2,2,2,2,0,
1,1,1,1,1,1,1,1,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,
0,0,0,0,0,0,0,2,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,4,4,0,4,4,4,
4,4,4,4,4,4,4,4,4,4,1,1,4,4,4,4,4,4,4,4,4,4,4,4,4,2,2,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,-1,1,-1,-2,1,
1,2,2,2,2,2,2,2,2,2,2,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,-1,1,0,1,1,2,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4, };
static signed short stb__arial_38_latin_ext_y[560]={ 30,5,5,5,3,5,5,5,5,5,5,9,26,19,
26,5,5,5,5,5,5,5,5,5,5,5,12,12,9,12,9,5,5,5,5,5,5,5,5,5,5,5,5,5,
5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,34,5,11,5,11,5,11,5,11,5,5,
5,5,5,11,11,11,11,11,11,11,6,12,12,12,12,12,12,5,5,5,15,8,8,8,8,8,8,8,8,8,
8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,30,12,5,5,9,5,
5,5,5,5,5,13,12,19,5,1,5,9,5,5,5,12,5,16,29,5,5,13,5,5,5,12,-1,-1,-1,0,
0,0,5,5,-1,-1,-1,0,-1,-1,-1,0,5,0,-1,-1,-1,0,0,10,4,-1,-1,-1,0,-1,5,5,5,5,
5,5,5,4,11,11,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,11,11,5,5,5,5,5,5,5,
1,7,-1,5,5,11,-1,5,-1,5,-1,6,-1,5,-1,5,5,5,1,7,-1,5,0,6,5,11,-1,5,-1,5,
-1,5,0,6,5,3,-1,-1,5,5,-1,5,1,7,0,5,5,5,0,12,5,5,-1,5,5,5,12,-1,-1,5,
5,5,5,5,5,5,5,-1,5,5,11,-1,5,5,5,11,0,7,-1,5,-1,5,5,11,-1,5,5,11,-1,5,
-1,5,-1,5,5,11,-1,5,5,6,-1,5,5,6,0,5,1,7,-1,5,-1,4,-1,5,5,12,-1,5,-1,5,
0,-1,5,0,6,-1,5,5,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,5,8,8,5,8,8,8,
8,8,8,8,8,8,8,8,8,8,5,11,8,8,8,8,8,8,8,8,8,8,8,8,8,5,12,8,8,8,
8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,-1,5,-1,5,-1,
5,-1,5,-1,1,-1,-1,-1,-1,-1,-1,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
8,8,8,8,8,8,8,8,8,8,-5,-2,-1,5,-1,5,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
8,8,8,8,8,8, };
static unsigned short stb__arial_38_latin_ext_w[560]={ 0,5,10,19,17,28,21,4,9,9,12,17,5,10,
4,10,17,10,18,17,18,17,17,17,17,17,4,5,17,17,17,17,33,24,19,23,21,19,18,24,20,4,15,21,
16,24,20,24,20,25,23,20,21,20,23,32,23,23,20,7,10,8,16,21,7,17,16,16,16,17,11,16,15,4,
8,15,4,25,15,17,16,16,10,15,10,15,17,25,17,17,17,11,3,11,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,0,5,17,18,17,20,
3,17,10,26,12,15,17,10,26,21,10,17,11,11,7,15,19,4,8,7,12,15,27,27,28,17,24,24,24,24,
24,24,33,23,19,19,19,19,8,7,11,10,24,20,24,24,24,24,24,16,25,20,20,20,20,23,20,18,17,17,
17,17,17,17,28,16,17,17,17,17,7,7,12,10,17,15,17,17,17,17,17,17,17,15,15,15,15,17,16,17,
24,17,24,17,27,21,23,16,23,16,23,16,23,16,21,20,24,18,19,17,19,17,19,17,19,17,19,17,24,16,
24,16,24,16,24,16,20,15,25,17,13,12,11,11,11,11,8,8,5,4,21,12,19,12,21,15,15,16,7,16,
9,16,8,16,10,18,8,20,15,20,15,20,15,20,21,15,24,17,24,17,24,17,31,30,23,10,23,10,23,12,
20,15,20,15,20,15,20,15,21,10,21,13,21,9,20,15,20,15,20,15,20,15,20,15,20,19,32,25,23,17,
23,20,17,20,17,20,17,8,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,24,18,18,19,18,18,18,
18,18,18,18,18,18,18,18,18,18,28,21,18,18,18,18,18,18,18,18,18,18,18,18,18,26,20,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,24,17,12,12,24,
17,20,15,20,15,20,15,20,15,20,15,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,24,17,33,28,25,17,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18, };
static unsigned short stb__arial_38_latin_ext_h[560]={ 0,25,10,26,31,26,26,10,33,33,11,18,9,4,
4,26,26,25,25,26,25,26,26,25,26,26,18,23,18,12,18,25,33,25,25,26,25,25,25,26,25,25,26,25,
25,25,25,26,25,27,25,26,25,26,25,25,25,25,25,32,26,32,14,3,6,20,26,20,26,20,25,27,25,25,
33,25,25,19,19,20,26,26,19,20,25,19,18,18,18,26,18,33,33,33,6,22,22,22,22,22,22,22,22,22,
22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,0,25,32,26,18,25,
33,33,4,26,13,16,11,4,26,3,10,21,13,14,6,25,32,4,8,13,13,16,26,26,26,26,31,31,31,30,
30,30,25,32,31,31,31,30,31,31,31,30,25,30,32,32,32,31,31,16,27,32,32,32,31,31,25,26,26,26,
26,26,26,27,20,26,26,26,26,26,25,25,25,25,26,25,26,26,26,26,26,14,21,26,26,26,26,33,32,33,
29,24,31,26,32,26,32,26,32,26,32,25,32,26,31,26,25,26,29,24,31,26,30,25,33,27,31,26,32,33,
32,33,31,32,32,35,31,31,25,25,31,25,29,23,30,25,33,33,30,18,26,33,32,33,32,32,18,31,31,32,
32,25,25,25,25,25,25,31,25,32,26,31,25,25,26,27,31,24,32,26,32,26,26,20,31,25,32,26,31,25,
32,26,32,26,32,26,32,26,35,33,31,26,25,25,31,26,30,24,32,26,32,27,32,26,33,26,31,25,31,33,
30,31,25,30,24,31,25,25,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,26,22,22,33,22,22,22,
22,22,22,22,22,22,22,22,22,22,26,20,22,22,22,22,22,22,22,22,22,22,22,22,22,26,19,22,22,22,
22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,31,26,31,25,32,
26,32,26,32,30,32,32,32,32,32,32,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
22,22,22,22,22,22,22,22,22,22,35,33,31,26,32,27,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
22,22,22,22,22,22, };
static unsigned short stb__arial_38_latin_ext_s[560]={ 509,294,454,363,121,285,93,449,158,219,495,
234,465,496,507,501,143,450,461,289,324,271,460,391,113,131,268,503,273,402,317,
480,229,118,168,434,248,228,209,228,188,498,115,62,409,143,216,436,370,443,237,
383,96,362,300,261,426,17,41,264,461,500,402,425,480,425,148,17,109,492,84,
63,343,507,210,1,507,85,111,443,30,92,143,1,359,127,335,291,211,327,193,
91,65,333,480,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,
370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,509,157,154,
1,175,80,69,179,499,458,449,370,420,496,201,447,438,407,475,419,488,313,293,
507,471,487,462,386,47,472,1,75,423,398,241,259,284,361,427,447,312,74,128,
341,406,504,370,330,163,309,208,279,233,482,216,353,37,426,172,349,491,50,461,
73,55,37,19,1,478,80,56,417,399,381,363,345,224,500,67,205,259,232,221,
203,185,167,149,431,389,97,81,65,49,284,332,302,398,304,148,424,304,383,42,
346,1,307,87,188,130,236,290,186,482,405,423,322,378,442,239,370,138,1,448,
253,218,121,105,374,26,25,354,1,100,84,401,49,468,388,386,358,145,329,391,
345,139,229,324,320,334,197,404,488,252,361,353,471,132,32,215,101,302,147,1,
173,248,258,496,94,273,166,126,469,1,270,193,165,379,183,253,461,26,341,163,
499,382,118,187,404,142,420,111,295,66,311,43,168,194,485,10,205,332,131,157,
288,313,346,272,485,243,330,263,239,51,131,266,103,199,415,187,178,340,470,352,
264,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,161,370,370,354,
370,370,370,370,370,370,370,370,370,370,370,370,370,207,34,370,370,370,370,370,
370,370,370,370,370,370,370,370,98,154,370,370,370,370,370,370,370,370,370,370,
370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,1,125,
115,289,80,277,437,314,400,223,479,1,458,43,59,421,370,370,370,370,370,370,
370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,
370,370,370,18,73,436,20,17,19,370,370,370,370,370,370,370,370,370,370,370,
370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,
370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,
370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,
370,370,370,370,370,370,370,370,370, };
static unsigned short stb__arial_38_latin_ext_t[560]={ 1,276,342,167,135,222,249,342,1,1,328,
328,342,342,129,135,167,276,276,167,276,167,167,276,195,195,328,276,328,343,328,
276,1,302,302,195,302,302,302,222,302,276,249,302,276,302,276,222,276,135,276,
222,302,222,276,276,276,302,302,37,222,1,328,323,342,302,222,328,222,302,302,
167,276,103,1,302,249,328,328,302,249,222,328,328,276,328,328,328,328,195,328,
1,1,1,349,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,
302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,1,276,37,
195,328,276,1,1,349,195,328,328,343,342,222,323,343,302,328,328,342,249,37,
342,342,328,328,328,249,222,249,249,103,103,103,135,135,135,249,37,103,103,103,
135,70,37,70,135,276,135,70,70,70,103,103,328,167,37,37,70,70,103,249,
222,222,222,222,222,167,167,328,195,195,195,195,195,249,222,276,276,195,249,195,
195,195,195,195,328,302,195,195,195,195,1,70,1,135,302,103,167,70,167,70,
167,70,167,70,276,37,167,103,167,249,167,135,302,103,167,135,249,1,167,103,
167,37,1,37,1,135,70,37,1,135,135,249,276,103,249,135,302,135,249,1,
1,135,328,167,1,37,1,37,37,328,103,103,37,70,276,249,276,249,249,276,
103,249,70,167,103,249,249,222,135,103,302,37,222,37,222,222,302,103,249,70,
195,70,276,70,222,70,222,70,195,70,195,1,1,103,195,276,249,103,249,135,
302,37,222,37,135,37,222,1,195,135,276,103,1,135,70,249,135,302,70,249,
249,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,167,302,302,1,
302,302,302,302,302,302,302,302,302,302,302,302,302,167,328,302,302,302,302,302,
302,302,302,302,302,302,302,302,167,328,302,302,302,302,302,302,302,302,302,302,
302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,135,167,
103,249,37,195,1,222,1,135,1,37,1,37,37,1,302,302,302,302,302,302,
302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,
302,302,302,1,1,70,195,37,167,302,302,302,302,302,302,302,302,302,302,302,
302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,
302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,
302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,
302,302,302,302,302,302,302,302,302, };
static unsigned short stb__arial_38_latin_ext_a[560]={ 151,151,193,303,303,484,363,104,
181,181,212,318,151,181,151,151,303,303,303,303,303,303,303,303,
303,303,151,151,318,318,318,303,552,363,363,393,393,363,332,423,
393,151,272,363,303,453,393,423,363,423,393,363,332,393,363,514,
363,363,332,151,151,151,255,303,181,303,303,272,303,303,151,303,
303,121,121,272,121,453,303,303,303,303,181,272,151,303,272,393,
272,272,272,182,141,182,318,408,408,408,408,408,408,408,408,408,
408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
408,408,408,408,408,408,408,408,151,181,303,303,303,303,141,303,
181,401,201,303,318,181,401,301,218,299,181,181,181,314,292,151,
181,181,199,303,454,454,454,332,363,363,363,363,363,363,544,393,
363,363,363,363,151,151,151,151,393,393,423,423,423,423,423,318,
423,393,393,393,393,363,363,332,303,303,303,303,303,303,484,272,
303,303,303,303,151,151,151,151,303,303,303,303,303,303,303,299,
332,303,303,303,303,272,303,272,363,303,363,303,363,303,393,272,
393,272,393,272,393,272,393,335,393,303,363,303,363,303,363,303,
363,303,363,303,423,303,423,303,423,303,423,303,393,303,393,303,
151,151,151,151,151,151,151,121,151,151,400,242,272,121,363,272,
272,303,121,303,121,303,159,303,182,303,121,393,303,393,303,393,
303,329,394,303,423,303,423,303,423,303,544,514,393,181,393,181,
393,181,363,272,363,272,363,272,363,272,332,151,332,204,332,151,
393,303,393,303,393,303,393,303,393,303,393,303,514,393,363,272,
363,332,272,332,272,332,272,121,408,408,408,408,408,408,408,408,
408,408,408,408,408,408,408,409,408,408,303,408,408,408,408,408,
408,408,408,408,408,408,408,408,467,357,408,408,408,408,408,408,
408,408,408,408,408,408,408,465,364,408,408,408,408,408,408,408,
408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
408,408,408,408,408,363,303,151,121,423,303,393,303,393,303,393,
303,393,303,393,303,408,408,408,408,408,408,408,408,408,408,408,
408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
408,408,363,303,544,484,423,332,408,408,408,408,408,408,408,408,
408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,
408,408,408,408,408,408,408,408, };
// Call this function with
// font: NULL or array length
// data: NULL or specified size
// height: STB_FONT_arial_38_latin_ext_BITMAP_HEIGHT or STB_FONT_arial_38_latin_ext_BITMAP_HEIGHT_POW2
// return value: spacing between lines
static void stb_font_arial_38_latin_ext(stb_fontchar font[STB_FONT_arial_38_latin_ext_NUM_CHARS],
unsigned char data[STB_FONT_arial_38_latin_ext_BITMAP_HEIGHT][STB_FONT_arial_38_latin_ext_BITMAP_WIDTH],
int height)
{
int i,j;
if (data != 0) {
unsigned int *bits = stb__arial_38_latin_ext_pixels;
unsigned int bitpack = *bits++, numbits = 32;
for (i=0; i < STB_FONT_arial_38_latin_ext_BITMAP_WIDTH*height; ++i)
data[0][i] = 0; // zero entire bitmap
for (j=1; j < STB_FONT_arial_38_latin_ext_BITMAP_HEIGHT-1; ++j) {
for (i=1; i < STB_FONT_arial_38_latin_ext_BITMAP_WIDTH-1; ++i) {
unsigned int value;
if (numbits==0) bitpack = *bits++, numbits=32;
value = bitpack & 1;
bitpack >>= 1, --numbits;
if (value) {
if (numbits < 3) bitpack = *bits++, numbits = 32;
data[j][i] = (bitpack & 7) * 0x20 + 0x1f;
bitpack >>= 3, numbits -= 3;
} else {
data[j][i] = 0;
}
}
}
}
// build font description
if (font != 0) {
float recip_width = 1.0f / STB_FONT_arial_38_latin_ext_BITMAP_WIDTH;
float recip_height = 1.0f / height;
for (i=0; i < STB_FONT_arial_38_latin_ext_NUM_CHARS; ++i) {
// pad characters so they bilerp from empty space around each character
font[i].s0 = (stb__arial_38_latin_ext_s[i]) * recip_width;
font[i].t0 = (stb__arial_38_latin_ext_t[i]) * recip_height;
font[i].s1 = (stb__arial_38_latin_ext_s[i] + stb__arial_38_latin_ext_w[i]) * recip_width;
font[i].t1 = (stb__arial_38_latin_ext_t[i] + stb__arial_38_latin_ext_h[i]) * recip_height;
font[i].x0 = stb__arial_38_latin_ext_x[i];
font[i].y0 = stb__arial_38_latin_ext_y[i];
font[i].x1 = stb__arial_38_latin_ext_x[i] + stb__arial_38_latin_ext_w[i];
font[i].y1 = stb__arial_38_latin_ext_y[i] + stb__arial_38_latin_ext_h[i];
font[i].advance_int = (stb__arial_38_latin_ext_a[i]+8)>>4;
font[i].s0f = (stb__arial_38_latin_ext_s[i] - 0.5f) * recip_width;
font[i].t0f = (stb__arial_38_latin_ext_t[i] - 0.5f) * recip_height;
font[i].s1f = (stb__arial_38_latin_ext_s[i] + stb__arial_38_latin_ext_w[i] + 0.5f) * recip_width;
font[i].t1f = (stb__arial_38_latin_ext_t[i] + stb__arial_38_latin_ext_h[i] + 0.5f) * recip_height;
font[i].x0f = stb__arial_38_latin_ext_x[i] - 0.5f;
font[i].y0f = stb__arial_38_latin_ext_y[i] - 0.5f;
font[i].x1f = stb__arial_38_latin_ext_x[i] + stb__arial_38_latin_ext_w[i] + 0.5f;
font[i].y1f = stb__arial_38_latin_ext_y[i] + stb__arial_38_latin_ext_h[i] + 0.5f;
font[i].advance = stb__arial_38_latin_ext_a[i]/16.0f;
}
}
}
#ifndef STB_SOMEFONT_CREATE
#define STB_SOMEFONT_CREATE stb_font_arial_38_latin_ext
#define STB_SOMEFONT_BITMAP_WIDTH STB_FONT_arial_38_latin_ext_BITMAP_WIDTH
#define STB_SOMEFONT_BITMAP_HEIGHT STB_FONT_arial_38_latin_ext_BITMAP_HEIGHT
#define STB_SOMEFONT_BITMAP_HEIGHT_POW2 STB_FONT_arial_38_latin_ext_BITMAP_HEIGHT_POW2
#define STB_SOMEFONT_FIRST_CHAR STB_FONT_arial_38_latin_ext_FIRST_CHAR
#define STB_SOMEFONT_NUM_CHARS STB_FONT_arial_38_latin_ext_NUM_CHARS
#define STB_SOMEFONT_LINE_SPACING STB_FONT_arial_38_latin_ext_LINE_SPACING
#endif
|
124c321dbad919e13970b1a453944d5c85ca49c4
|
532294febe8d79b85b71994e6cbae28921a7fb5b
|
/Arrays/4_MergeWithoutExtraSpace.cpp
|
12a3d5808004b070d8cee45028f813bec5014e85
|
[] |
no_license
|
se-prashant/Data-Structures-And-Algorithms
|
6da326b04a2dcdadcb7a17f7c7dc4c03ef61e33a
|
15c488cb699a911a9c7b437dc80f5ec170ec70e8
|
refs/heads/main
| 2023-02-22T16:39:27.996522
| 2021-01-25T08:47:48
| 2021-01-25T08:47:48
| 327,389,250
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 721
|
cpp
|
4_MergeWithoutExtraSpace.cpp
|
int nextGap(int gap)
{
if (gap <= 1)
return 0;
return (gap / 2) + (gap % 2);
}
void merge(int a1[], int a2[], int n, int m)
{
// code here
int i=0,j=0;
int tot_sz = n+m;
for (int gap = nextGap(tot_sz); gap > 0; gap = nextGap(gap)){
i = 0, j = gap;
// cout<<gap<<" $# ";
while(j<tot_sz){
// cout<<i<<" "<<j<<endl;
if(i<n && j<n){
if(a1[i]>a1[j]) swap(a1[i],a1[j]);
}else if(i<n && j<(tot_sz)){
if(a1[i]>a2[j-n]) swap(a1[i],a2[j-n]);
}else if(i<tot_sz && j<tot_sz){
if(a2[i-n]>a2[j-n]) swap(a2[i-n],a2[j-n]);
}
i++;j++;
}
}
}
|
7ceb8c9bf5de2fd9e1bbfa70b763da12ab4e663f
|
9143962494f56b95589ae8a8d3889bba5a30981d
|
/src/dials/array_family/boost_python/flex_ext.cc
|
8366f087c71a3ba6dd0daf3d4ecb351abbead469
|
[
"BSD-3-Clause"
] |
permissive
|
dials/dials
|
565c329b8584ba22f1c89490b14b117e9256e8bf
|
88bf7f7c5ac44defc046ebf0719cde748092cfff
|
refs/heads/main
| 2023-08-17T10:25:59.078610
| 2023-08-17T08:12:53
| 2023-08-17T08:12:53
| 39,507,997
| 71
| 50
|
BSD-3-Clause
| 2023-09-06T09:30:25
| 2015-07-22T13:36:00
|
Python
|
UTF-8
|
C++
| false
| false
| 1,872
|
cc
|
flex_ext.cc
|
/*
* flex_ext.cc
*
* Copyright (C) 2013 Diamond Light Source
*
* Author: James Parkhurst
*
* This code is distributed under the BSD license, a copy of which is
* included in the root directory of this package.
*/
#include <boost/python.hpp>
#include <boost/python/def.hpp>
#include <string>
#include <scitbx/boost_python/container_conversions.h>
#include <scitbx/array_family/boost_python/c_grid_flex_conversions.h>
#include <dials/array_family/scitbx_shared_and_versa.h>
#include <dials/model/data/ray.h>
#include <dials/config.h>
namespace dials { namespace af { namespace boost_python {
using namespace boost::python;
using namespace scitbx::boost_python::container_conversions;
void export_flex_int6();
void export_flex_shoebox();
void export_flex_centroid();
void export_flex_intensity();
void export_flex_observation();
void export_flex_reflection_table();
void export_flex_unit_cell();
void export_flex_shoebox_extractor();
void export_flex_binner();
template <typename FloatType>
std::string get_real_type();
template <>
std::string get_real_type<float>() {
return "float";
}
template <>
std::string get_real_type<double>() {
return "double";
}
BOOST_PYTHON_MODULE(dials_array_family_flex_ext) {
export_flex_int6();
export_flex_shoebox();
export_flex_centroid();
export_flex_intensity();
export_flex_observation();
export_flex_reflection_table();
export_flex_unit_cell();
export_flex_shoebox_extractor();
export_flex_binner();
def("get_real_type", &get_real_type<ProfileFloatType>);
scitbx::af::boost_python::c_grid_flex_conversions<bool, af::c_grid<4> >();
scitbx::af::boost_python::c_grid_flex_conversions<double, af::c_grid<4> >();
tuple_mapping_fixed_capacity<af::small<model::Ray, 2> >();
}
}}} // namespace dials::af::boost_python
|
ccb7c54d70ecb7b981e0905604e60df4bde1fc11
|
27fdddea150d37f310c259cd55f9bd8688cf64d2
|
/bmengine/cMemory.cpp
|
a38aeac9180bd6488bbe18402b19c8b0a5cc0ec0
|
[] |
no_license
|
thebadmonkeydev/BMG.Engine
|
3f1be9ed582d5b1ab6c45469a0589a10e1f495ea
|
d2b14d2798ef6ec4a977d04d9974151235b1a13f
|
refs/heads/master
| 2021-01-22T14:38:52.961949
| 2014-02-14T20:44:15
| 2014-02-14T20:44:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 999
|
cpp
|
cMemory.cpp
|
#include "cMemory.h"
namespace bmcore
{
cMemory::cMemory(void)
{
}
cMemory::cMemory(void* ptr, tMemSize size, tuInt32 align)
{
m_alignment = align;
m_structAlign = sizeof(tMemSize);
m_paddedHeadSize = BMAlign(sizeof(cBlockHeader),sizeof(tMemSize));
m_pAllocatedBlock = ptr;
m_allocatedSize = size;
reinitialize();
}
void cMemory::reinitialize()
{
// Create a default block spanning the entire pool
m_pFirstBlock = (cBlockHeader*)m_pAllocatedBlock;
createBlock(TRUE, m_pFirstBlock, m_allocatedSize);
}
void cMemory::createBlock(tBool bFree, cBlockHeader* pHeader, tMemSize total_size)
{
pHeader->m_dataOffset = pHeader->calcDataOffset(m_alignment);
}
cMemory::~cMemory(void)
{
}
tuInt32 cBlockHeader::calcDataOffset(tuInt32 iAlignment)
{
// Compute aligned header size
tuInt32 headerSize = BMAlign(this, iAlignment);
// compute aligned footer size
// return total
return headerSize + 2;
}
}
|
49e85e17a4de9f2bb94897614a8552a0e66ead03
|
2ef6a773dd5288e6526b70e484fb0ec0104529f4
|
/poj.org/3409/4202214_AC_329MS_3408K.cc
|
7a3530948adb3809c2257d718e6316abfa426a86
|
[] |
no_license
|
thebeet/online_judge_solution
|
f09426be6b28f157b1e5fd796c2eef99fb9978d8
|
7e8c25ff2e1f42cc9835e9cc7e25869a9dbbc0a1
|
refs/heads/master
| 2023-08-31T15:19:26.619898
| 2023-08-28T10:51:24
| 2023-08-28T10:51:24
| 60,448,261
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,401
|
cc
|
4202214_AC_329MS_3408K.cc
|
/*
* PKU3409::Broken_line.cpp
*
* Created on: Oct 10, 2008 4:30:09 PM
* Author: TheBeet
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <map>
using namespace std;
const int MAXN = 5010;
// make pre-star graph
struct path
{
int f, t;
}paths[100010];
int s[MAXN];
int p[MAXN];
bool operator < (const path &p1, const path &p2)
{
return (p1.f < p2.f);
}
map<string, int> pid;
int frpid(0);
int gpid(const string &p1)
{
int ret = pid[p1];
if (ret == 0)
{
pid[p1] = ++frpid;
ret = frpid;
}
return ret;
}
bool gone[10010];
int go(int pp)
{
if (gone[pp])
{
return 0;
}
else
{
int i;
int s(1);
gone[pp] = true;
for (i = p[pp]; i < p[pp + 1]; ++i)
{
s += go(paths[i].t);
}
return s;
}
}
char inp[1024];
int inputpoint(void)
{
scanf("%s", inp);
char *inpp = inp;
while (*inpp == '0') ++inpp;
string str(inpp);
str += ',';
scanf("%s", inp);
inpp = inp;
while (*inpp == '0') ++inpp;
str += inpp;
return gpid(str);
}
int main()
{
int i, k;
while (scanf("%d", &k) != EOF)
{
memset(paths, 0, sizeof(paths));
memset(s, 0, sizeof(s));
memset(p, 0, sizeof(p));
frpid = 0;
for (i = 1; i <= k; ++i)
{
int pid1 = inputpoint();
int pid2 = inputpoint();
paths[i].f = pid1;
paths[i].t = pid2;
paths[i + k].f = pid2;
paths[i + k].t = pid1;
++s[pid1];
++s[pid2];
}
sort(paths + 1, paths + 1 + k + k);
p[1] = 1;
for (i = 1; i <= k; ++i)
{
if ((s[i] & 1) == 1)
{
break;
}
p[i + 1] = p[i] + s[i];
}
if (i <= k)
{
cout << 0 << endl;
}
else
{
memset(gone, false, sizeof(gone));
if (go(1) == k)
{
cout << 1 << endl;
}
else
{
cout << 0 << endl;
}
}
}
return 0;
}
|
248f0f7ea72aeae02e18d8308eab84c1c4fe812c
|
46433eef4cb129b7bf803842f57be71e72cc946f
|
/lightoj/1016 - Brush (II).cpp
|
4ae695f096006e24244f5276ddc375e05cab8438
|
[] |
no_license
|
asifjoardar/solving-oj-problems
|
7300f2bb6ce651c79b9a90649b38b8baf5fc517d
|
992c6472ffefea024a6879e1007d8118b7d221ca
|
refs/heads/master
| 2022-05-15T15:55:53.822581
| 2022-05-07T18:26:18
| 2022-05-07T18:26:18
| 136,577,556
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,653
|
cpp
|
1016 - Brush (II).cpp
|
/********** BiSmIlLaHiR rAhMaNiR rAhIm ***********\
*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*
*$* *$*
*$* |||||||| |||||||| |||||||| |||||||| *$*
*$* || || || || || *$*
*$* |||||||| |||||||| || |||||| *$*
*$* || || || || || *$*
*$* || || |||||||| |||||||| || *$*
*$* *$*
*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*$*
\*************** DIIT(17th batch) ****************/
#include<bits/stdc++.h>
#define ll long long int
#define ul unsigned long long int
#define pf printf
#define sf scanf
#define fs first
#define ss second
#define endl "\n"
#define pb push_back
#define makep make_pair
#define MOD 1000000007
#define PI acos(-1.0)
#define PII pair<ll , ll>
#define ki_ase(x,y) cout<<x<<" "<<y<<endl;
#define SIZE 200000000
#define fio() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
using namespace std;
ll fx[]={1,0,-1,0,-1,-1,1,1};
ll fy[]={0,1,0,-1,-1,1,-1,1};
int main()
{
//fio();
#ifndef ONLINE_JUDGE
freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
#endif
ll t,j;
cin>>t;
for(j=1;j<=t;j++){
ll n,w,cnt=1,chk,i,x,y;
cin>>n>>w;
vector<ll>v;
for(i=0;i<n;i++){
cin>>x>>y;
v.pb(y);
}
sort(v.begin(),v.end());
chk=v[0]+w;
for(i=1;i<n;i++){
if(chk<v[i]){
chk=v[i]+w;
cnt++;
}
}
pf("Case %lld: %lld\n",j,cnt);
}
return 0;
}
|
c21f3fcc0b229f9a4362b6b59e99a6859aafef79
|
05448e438b84e48f5ce30f332ce9d7b79e4bcc3a
|
/gobang_V3.0/draw.cpp
|
468a950036a219eb5b2788c99f6775a17149fef5
|
[] |
no_license
|
Elxe/GoBang
|
63433c6d272d2d61170e04a147ef8216a7353eb4
|
766174fec124759d69914b48da85267d513353cf
|
refs/heads/master
| 2021-09-01T17:17:55.005223
| 2017-12-28T02:56:15
| 2017-12-28T02:56:15
| 114,649,730
| 6
| 0
| null | 2017-12-18T14:33:55
| 2017-12-18T14:20:30
|
C++
|
GB18030
|
C++
| false
| false
| 524
|
cpp
|
draw.cpp
|
#include "stdafx.h"
#include "draw.h"
void Draw(int BoardPosition[][BOARDSIZE], int Flag, Position PreviousCursor, Position Cursor)
{
BoardPosition[Cursor.X][Cursor.Y] = Flag;
if (Flag == 1)
{
refresh("○", PreviousCursor.Y * 4 + 2, PreviousCursor.X * 2 + 1); //覆盖之前的缓冲棋型
refresh("◆", Cursor.Y * 4 + 2, Cursor.X * 2 + 1);
}
else
{
refresh("●", PreviousCursor.Y * 4 + 2, PreviousCursor.X * 2 + 1); //覆盖之前的缓冲棋型
refresh("◇", Cursor.Y * 4 + 2, Cursor.X * 2 + 1);
}
}
|
ca3c448c1eaae285940d58fc7c75177e5d157ac0
|
8c3d47390cc970f3573a16cc31fc02b4840651ca
|
/AC-codes/10220.cpp
|
be329664ead9c3cce1b3d36e661949a10ddd8d01
|
[] |
no_license
|
andyyhchen/cp-codes
|
4f7fce120e0c2cb72936865e173df3b0993d465e
|
c745a7e9fd01c85b8334265ada69dd3654a1d67e
|
refs/heads/master
| 2022-11-17T07:17:42.233281
| 2020-07-19T08:24:42
| 2020-07-19T08:24:42
| 280,822,781
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,169
|
cpp
|
10220.cpp
|
#include <iostream>
using namespace std;
struct bign{
int digit[800];
int len;
};
void bign_ini(bign &a)
{
memset(a.digit,0,sizeof(a.digit));
a.len = 1;
}
bign operator*(const bign a, const bign b)
{
int lena = a.len, lenb = b.len;
bign tmp; bign_ini(tmp);
for(int i = 0; i < lena; i++)
{
for(int j = 0; j < lenb; j++)
{
tmp.digit[i+j] += a.digit[i] * b.digit[j];
tmp.digit[i+j+1] += tmp.digit[i+j]/10000;
tmp.digit[i+j] %= 10000;
}
}
int t_len = lena+lenb+10;
while(tmp.digit[t_len]==0) t_len--;
tmp.len = t_len+1;
return tmp;
}
bign int2bign(int n)
{
bign tmp; bign_ini(tmp);
int index = 0;
while(n)
{
tmp.digit[index++]=n%10000;
n/=10000;
}
tmp.len = index;
return tmp;
}
int count(bign a)
{
int len = a.len, ans = 0;
for(int i = 0; i < len; i++)
{
for(int j = 0; j < 4; j++)
{
ans+=a.digit[i]%10;
a.digit[i]/=10;
}
}
return ans;
}
bign table[1001];
int main()
{
table[0].digit[0] = 1;
table[0].len = 1;
for(int i = 1; i < 1001; i++)
table[i] = table[i-1]*int2bign(i);
int n;
while(cin>>n)
cout<<count(table[n])<<"\n";
return 0;
}
|
81253c9972d0aa49da1a2a9827d9992b51c95b16
|
7a7b025581ce0c4d37575b5cbe4a7af0d502696a
|
/service.cpp
|
abafc312bed78bb8697c741312d2d96a70b64d49
|
[
"MIT"
] |
permissive
|
ITachiLab/simple-windows-service
|
f6c9ca2ea9fa7c896a8bb9544397345903263fbb
|
71607d719a76b0c2341f334ffb12f8231da92840
|
refs/heads/master
| 2020-03-27T03:18:34.125333
| 2018-08-23T13:24:51
| 2018-08-23T13:24:51
| 145,852,591
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,629
|
cpp
|
service.cpp
|
#include <Windows.h>
#include <tchar.h>
#include <strsafe.h>
#pragma comment(lib, "advapi32.lib")
#define SVCNAME TEXT("FooService")
SERVICE_STATUS svcStatus;
SERVICE_STATUS_HANDLE svcStatusHandle;
HANDLE ghSvcStopEvent = NULL;
void svcInstall();
void svcRemove();
void reportSvcStatus(DWORD, DWORD, DWORD);
void svcInit(DWORD, LPTSTR *);
void WINAPI svcCtrlHandler(DWORD);
void WINAPI svcMain(DWORD, LPTSTR *);
int wmain(int argc, wchar_t *argv[]) {
if (argc == 1) {
SERVICE_TABLE_ENTRY dispatchTable[] = {
{SVCNAME, (LPSERVICE_MAIN_FUNCTION) svcMain},
{nullptr, nullptr}
};
StartServiceCtrlDispatcher(dispatchTable);
} else if (_wcsicmp(L"install", argv[1]) == 0) {
svcInstall();
} else if (_wcsicmp(L"remove", argv[1]) == 0) {
svcRemove();
}
return 0;
}
void svcInstall() {
TCHAR path[MAX_PATH];
if (!GetModuleFileName(nullptr, path, MAX_PATH)) {
printf("Cannot install service (%lu)\n", GetLastError());
return;
}
SC_HANDLE schSCManager = OpenSCManager(nullptr, nullptr, SC_MANAGER_ALL_ACCESS);
if (schSCManager == nullptr) {
printf("OpenSCManager failed (%lu)\n", GetLastError());
return;
}
SC_HANDLE schService = CreateService(
schSCManager, // SCM handle
SVCNAME, // service name
SVCNAME, // service display name
SERVICE_ALL_ACCESS, // access type
SERVICE_WIN32_OWN_PROCESS, // service type
SERVICE_DEMAND_START, // start type
SERVICE_ERROR_NORMAL, // error control type
path, // path to service's binary
nullptr, // no load ordering group
nullptr, // no tag identifier
nullptr, // no dependencies
nullptr, // LocalSystem account
nullptr); // no password
if (schService == nullptr) {
printf("CreateService failed (%lu)\n", GetLastError());
CloseServiceHandle(schSCManager);
return;
} else {
printf("Service installed successfully\n");
}
CloseServiceHandle(schService);
CloseServiceHandle(schSCManager);
}
void svcRemove() {
SC_HANDLE schSCManager = OpenSCManager(nullptr, nullptr, SC_MANAGER_ALL_ACCESS);
if (schSCManager != nullptr) {
SC_HANDLE hService = OpenService(schSCManager, SVCNAME, SERVICE_ALL_ACCESS);
if (hService != nullptr) {
if (DeleteService(hService) == 0) {
printf("Could not delete service: (%lu)\n", GetLastError());
} else {
printf("Service has been deleted\n");
}
}
}
}
void WINAPI svcMain(DWORD dwArgc, LPTSTR *lpszArgv) {
svcStatusHandle = RegisterServiceCtrlHandler(SVCNAME, svcCtrlHandler);
if (svcStatusHandle) {
svcStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
svcStatus.dwServiceSpecificExitCode = 0;
reportSvcStatus(SERVICE_START_PENDING, NO_ERROR, 3000);
svcInit(dwArgc, lpszArgv);
}
}
void svcInit(DWORD dwArgc, LPTSTR *lpszArgv) {
ghSvcStopEvent = CreateEvent(nullptr, TRUE, FALSE, nullptr);
if (ghSvcStopEvent == NULL) {
reportSvcStatus(SERVICE_STOPPED, NO_ERROR, 0);
return;
}
reportSvcStatus(SERVICE_RUNNING, NO_ERROR, 0);
while (true) {
WaitForSingleObject(ghSvcStopEvent, INFINITE);
reportSvcStatus(SERVICE_STOPPED, NO_ERROR, 0);
return;
}
}
void reportSvcStatus(DWORD dwCurrentState, DWORD dwWin32ExitCode, DWORD dwWaitHint) {
static DWORD dwCheckPoint = 1;
svcStatus.dwCurrentState = dwCurrentState;
svcStatus.dwWin32ExitCode = dwWin32ExitCode;
svcStatus.dwWaitHint = dwWaitHint;
if (dwCurrentState == SERVICE_START_PENDING) {
svcStatus.dwControlsAccepted = 0;
} else {
svcStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP;
}
if ((dwCurrentState == SERVICE_RUNNING) || (dwCurrentState == SERVICE_STOPPED)) {
svcStatus.dwCheckPoint = 0;
} else {
svcStatus.dwCheckPoint = dwCheckPoint++;
}
SetServiceStatus(svcStatusHandle, &svcStatus);
}
void WINAPI svcCtrlHandler(DWORD dwCtrl) {
switch (dwCtrl) {
case SERVICE_CONTROL_STOP:
reportSvcStatus(SERVICE_STOP_PENDING, NO_ERROR, 0);
SetEvent(ghSvcStopEvent);
default:
break;
}
}
|
b237d7767ff767f32d01733c790e116862b9f04a
|
8a1512191c8f213fa1055cd1b12a28c834d17466
|
/game/cd.cpp
|
0ea406950883c0ca191075e24484c82b51e00f15
|
[] |
no_license
|
jstasiak/polanie-src
|
882721a6896ba67731e84e488a0252de3ca7e92a
|
dc679cbd1add67ba7f3da59ba24ba9d6c560ed1b
|
refs/heads/master
| 2023-05-31T22:18:28.362896
| 2020-02-18T16:26:25
| 2020-02-18T16:26:25
| 169,010,720
| 10
| 5
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 17,160
|
cpp
|
cd.cpp
|
/*
Plik : CD.CPP
Autor: Artur Bidziński
Data : 18 maja 1996r.
*/
// #define POMOC
#undef POMOC
#ifdef POMOC
#include <conio.h>
#include <iostream.h>
#endif
#include "define.h"
#include "dpmi.h"
#include <i86.h>
#include <string.h>
#ifdef POMOC
extern void gotoxy(int, int);
#endif
struct J4 {
unsigned int edi;
unsigned int esi;
unsigned int ebp;
unsigned int zarezerwowane;
unsigned int ebx;
unsigned int edx;
unsigned int ecx;
unsigned int eax;
unsigned short flags;
unsigned short es;
unsigned short ds;
unsigned short fs;
unsigned short gs;
unsigned short ip;
unsigned short cs;
unsigned short sp;
unsigned short ss;
};
struct volumeinfo {
unsigned char mode;
unsigned char input0;
unsigned char volume0;
unsigned char input1;
unsigned char volume1;
unsigned char input2;
unsigned char volume2;
unsigned char input3;
unsigned char volume3;
};
struct {
unsigned short drive;
unsigned short version;
unsigned short error;
unsigned char first_track;
unsigned char last_track;
unsigned int total_time;
struct {
unsigned int start;
unsigned char control;
} track[99 + 1 + 1];
int command;
int busy;
int play_from;
} cd;
struct // structura sprawdzona (co do dlugosci)
{
unsigned char length;
unsigned char subunit;
unsigned char command;
unsigned short status;
unsigned char reserved[8];
unsigned char media_dsc;
unsigned int buffer;
unsigned short buffer_size;
unsigned short sector;
unsigned int reserved2;
} ioctli_request = {
sizeof(ioctli_request), 0, 3, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, 0, 0, 0};
struct // structura sprawdzona (co do dlugosci)
{
unsigned char length;
unsigned char subunit;
unsigned char command;
unsigned short status;
unsigned char reserved[8];
unsigned char media_dsc;
unsigned int buffer;
unsigned short buffer_size;
unsigned short sector;
unsigned int reserved2;
} ioctli_request_vol = {
sizeof(ioctli_request), 0, 3, 0, {0, 0, 0, 0, 0, 0, 0, 0}, 0, 0, 0, 0};
struct {
unsigned char command;
unsigned int status;
} device_status = {6, 0};
const unsigned short ERROR = 0x8000;
const unsigned short BUSY = 0x0200;
const unsigned short DONE = 0x0100;
REGS re;
SREGS se;
J4 t;
// volumeinfo my_vol, volume_for_cd;
volumeinfo my_new_volume;
int track = 0;
int memisalloc = 0;
unsigned short Selector = 0;
unsigned short Segment = 0;
unsigned int LineAddress = 0;
unsigned int LineAddressTwo = 0;
int NrOfTracks = 0;
int FirstTrack = 0;
int LastTrack = 0;
unsigned int BufferSizeForCD = 512;
int BigActiveCDAudio = 1;
int ActiveCDAudio = 1;
/*24.X.int MinPlay(void)
{
return FirstTrack;
}
int MaxPlay(void)
{
return LastTrack;
}*/
void BigOffCDAudio(void) { BigActiveCDAudio = 0; }
void BigOnCDAudio(void) { BigActiveCDAudio = 1; }
void OffCDAudio(void) { ActiveCDAudio = 0; }
void OnCDAudio(void) { ActiveCDAudio = 1; }
void SetMaxTrack(int maxtrack) { LastTrack = maxtrack; }
// int GetNrOfTracks(void)
//{
// return NrOfTracks;
//}
unsigned int red2hsg(unsigned int red) {
return ((red >> 16) & 0xFF) * 60 * 75 + ((red >> 8) & 0xFF) * 75 +
(red & 0xFF) - 150;
}
void AllocCDBuffer(void) {
int result;
if (memisalloc)
return;
result = alloc_DOS_memory((unsigned short)((BufferSizeForCD + 15) >> 4),
Segment, Selector);
if (result)
return;
memisalloc = 1;
LineAddress = (unsigned int)Segment << 4;
LineAddressTwo = LineAddress + 256; // Pracujemy na tym samym buforze pamieci
}
void FreeCDBuffer(void) {
if (memisalloc) {
free_DOS_memory(Selector);
memisalloc = 0;
}
}
int CallMSCDEX(void *requestHeader, int size) {
memcpy((void *)LineAddress, requestHeader, size);
t.eax = 0x1510;
t.ecx = (unsigned int)cd.drive;
t.ebx = 0;
t.edi = 0; // AB
t.esi = 0; // AB
t.es = Segment;
re.x.eax = 0x0300;
re.x.ebx = 0x002F;
re.x.ecx = 0x0000;
re.x.edi = FP_OFF(&t);
se.es = FP_SEG(&t);
int386x(0x31, &re, &re, &se);
if (re.x.cflag)
return ERROR_INT_2FH;
memcpy(requestHeader, (void *)LineAddress, size);
return 0;
}
int CheckError(unsigned short status) {
cd.busy = status & BUSY ? 1 : 0;
if (status & ERROR) {
cd.error = (status & 0xF);
return -1;
}
return 0;
}
int MakeIOCtliCall(void *buffer, int size) {
// unsigned short selector=0;
// unsigned short segment;
// unsigned int lineaddress = LineAddress;
// alloc_DOS_memory( (unsigned short)((size+15)>>4) , segment, selector);
// lineaddress=((int)segment)<<4;
memcpy((void *)LineAddressTwo, buffer, size);
ioctli_request.buffer = LineAddressTwo << 12;
ioctli_request.buffer_size = (unsigned short)size;
CallMSCDEX((void *)&ioctli_request, sizeof(ioctli_request));
memcpy(buffer, (void *)LineAddressTwo, size);
// free_DOS_memory(selector);
return 0;
}
int InitCD(void) {
// if(!BigActiveCDAudio) return 0;
AllocCDBuffer();
if (!memisalloc)
return NO_MEMORY_FOR_CD;
// cout <<"> Getting drive letter"<<endl;
t.eax = 0x1500;
t.ecx = 0xFFFF;
re.x.eax = 0x0300;
re.x.ebx = 0x002F;
re.x.ecx = 0x0000;
re.x.edi = FP_OFF(&t);
se.es = FP_SEG(&t);
int386x(0x31, &re, &re, &se);
if (re.x.cflag)
return ERROR_INT_2FH;
cd.drive = (unsigned short)t.ecx;
// cout <<"> Drive letter is "<<char(65+cd.drive)<<endl;
// cout<<"> Getting driver version"<<endl;
t.eax = 0x150C;
re.x.eax = 0x0300;
re.x.ebx = 0x002F;
re.x.ecx = 0x0000;
re.x.edi = FP_OFF(&t);
se.es = FP_SEG(&t);
int386x(0x31, &re, &re, &se);
if (re.x.cflag)
return ERROR_INT_2FH;
cd.version = (unsigned short)t.ebx;
// cout<<"> Driver version is
// "<<(cd.version>>8)<<"."<<(cd.version&255)<<endl;
if (cd.version == 65535)
return (-1);
MakeIOCtliCall(&device_status, sizeof(device_status));
if (CheckError(ioctli_request.status))
return -2;
if ((device_status.status & (1 << 4)) == 0)
return -2;
if ((device_status.status & (1 << 9)) == 0)
return -2;
return 0;
}
unsigned int smallVolume = 5;
unsigned char Volume = 255;
/*void cd_set_volume(volumeinfo *vol)
{
vol->mode = 3;
ioctli_request.length = sizeof(ioctli_request);
ioctli_request.subunit = 0;
ioctli_request.command = 12;
ioctli_request.media_dsc = 0;
MakeIOCtliCall((void*)vol, sizeof(volumeinfo));
cd.error = ioctli_request.status;
} */
void cd_set_volume(volumeinfo *vol) {
// unsigned short selector=0;
// unsigned short segment;
// unsigned int lineaddress;
int Size = sizeof(volumeinfo);
vol->mode = 3;
ioctli_request_vol.length = sizeof(ioctli_request_vol);
ioctli_request_vol.subunit = 0;
ioctli_request_vol.command = 12;
ioctli_request_vol.media_dsc = 0;
// alloc_DOS_memory( (unsigned short)((Size+15)>>4) , segment, selector);
// lineaddress=((int)segment)<<4;
memcpy((void *)LineAddressTwo, (void *)vol, Size);
ioctli_request_vol.buffer = LineAddressTwo << 12;
ioctli_request_vol.buffer_size = (unsigned short)Size;
CallMSCDEX((void *)&ioctli_request_vol, sizeof(ioctli_request_vol));
memcpy((void *)vol, (void *)LineAddressTwo, Size);
// free_DOS_memory(selector);
// cd.error = ioctli_request.status;
}
/*void upvolume(void)
{
#ifdef POMOC
gotoxy(20,1);
cout << "UPvolume() ";
#endif
if(Volume>200) return;
if(Volume<200)
{
Volume+=50;
}else
{
Volume = 255;
}
#ifdef POMOC
gotoxy(20,2);
cout << "UPvolume() my_new_volume.volume0>0)" << (int)Volume <<" - powinien
glos sie poglosnic "; #endif my_new_volume.volume3=Volume;
my_new_volume.volume2=Volume;
my_new_volume.volume1=Volume;
my_new_volume.volume0=Volume;
my_new_volume.input0 = 0;
my_new_volume.input1 = 1;
my_new_volume.input2 = 2;
my_new_volume.input3 = 3;
memcpy((void*)&volume_for_cd,(void*)&my_new_volume,sizeof(volumeinfo));
cd_set_volume(&volume_for_cd);
}*/
/*void downvolume(void)
{
#ifdef POMOC
gotoxy(20,1);
cout << "downvolume() ";
#endif
if(!Volume) return;
if(Volume>200)
{
Volume = 200;
}else
{
Volume -= 50;
}
#ifdef POMOC
gotoxy(20,2);
cout << "downvolume() my_new_volume.volume0>0) " << (int)Volume <<" -
powinien glos sie sciszyc"; #endif my_new_volume.volume3=Volume;
my_new_volume.volume2=Volume;
my_new_volume.volume1=Volume;
my_new_volume.volume0=Volume;
my_new_volume.input0 = 0;
my_new_volume.input1 = 1;
my_new_volume.input2 = 2;
my_new_volume.input3 = 3;
memcpy((void*)&volume_for_cd,(void*)&my_new_volume,sizeof(volumeinfo));
cd_set_volume(&volume_for_cd);
}*/
void ReadNrOfTracks(void) {
if ((!BigActiveCDAudio) || (!ActiveCDAudio))
return;
struct {
unsigned char command;
unsigned char first;
unsigned char last;
unsigned int lead_out;
} ibuffer = {10, 0, 0, 0};
MakeIOCtliCall(&device_status, sizeof(device_status));
CheckError(ioctli_request.status);
for (int i = 0; i < 200000; i++) {
MakeIOCtliCall(&ibuffer, sizeof(ibuffer));
if ((ioctli_request.status & ERROR) == 0)
break;
if ((ioctli_request.status & 0xFF) != 0xF)
break;
}
CheckError(ioctli_request.status);
cd.first_track = ibuffer.first;
cd.last_track = ibuffer.last;
cd.total_time = ibuffer.lead_out;
struct {
unsigned char command;
unsigned char track;
unsigned int start;
unsigned char control;
} tbuffer = {11, 0, 0, 0};
for (i = cd.first_track; i <= cd.last_track; i++) {
tbuffer.track = (unsigned char)i;
MakeIOCtliCall(&tbuffer, sizeof(tbuffer));
CheckError(ioctli_request.status);
cd.track[i].start = tbuffer.start;
cd.track[i].control = tbuffer.control & 0xF0;
}
cd.track[cd.last_track + 1].start = cd.total_time;
i = cd.first_track;
int min = ((cd.total_time >> 16) & 0xFF) - ((cd.track[i].start >> 16) & 0xFF);
int sec = ((cd.total_time >> 8) & 0xFF) - ((cd.track[i].start >> 8) & 0xFF);
int frm = (cd.total_time & 0xFF) - (cd.track[i].start & 0xFF);
if (sec < 0) {
min -= 1;
sec = 60 + sec;
}
if (frm < 0) {
sec -= 1;
frm = 75 + frm;
}
FirstTrack = (int)cd.first_track;
LastTrack = (int)cd.last_track;
NrOfTracks = LastTrack - FirstTrack + 1;
// cout<<"> Tracks: "<<cd.last_track-cd.first_track+1;
// cout<<", total time: "<<min<<":"<<sec<<":"<<frm<<endl;
}
struct {
unsigned char length;
unsigned char subunit;
unsigned char command;
unsigned short status;
unsigned char reserved[8];
unsigned char adr_mode;
unsigned int start;
unsigned int sectors;
} play_request = {sizeof(play_request), 0, 132, 0,
{0, 0, 0, 0, 0, 0, 0, 0}, 1, 0, 0};
struct {
unsigned char length;
unsigned char subunit;
unsigned char command;
unsigned short status;
unsigned char reserved[8];
} stop_request = {sizeof(stop_request), 0, 133, 0, {0, 0, 0, 0, 0, 0, 0, 0}};
int StopPlaying(void) {
if ((!BigActiveCDAudio) || (!ActiveCDAudio))
return 0;
CallMSCDEX(&stop_request, sizeof(stop_request));
return CheckError(stop_request.status);
}
void setVolume(int newVolume) // ustawia od 0 do 5 //!
{
if ((!BigActiveCDAudio) || (!ActiveCDAudio))
return;
if ((newVolume < 0) || (newVolume > 5))
return;
switch (newVolume) {
case 0:
Volume = 0;
break;
case 1:
Volume = 50;
break;
case 2:
Volume = 75;
break;
case 3:
Volume = 113;
break;
case 4:
Volume = 170;
break;
case 5:
Volume = 255;
break;
}
smallVolume = newVolume;
my_new_volume.volume3 = Volume;
my_new_volume.volume2 = Volume;
my_new_volume.volume1 = Volume;
my_new_volume.volume0 = Volume;
my_new_volume.input0 = 0;
my_new_volume.input1 = 1;
my_new_volume.input2 = 2;
my_new_volume.input3 = 3;
// 24.X.memcpy((void*)&volume_for_cd,(void*)&my_new_volume,sizeof(volumeinfo));
// 24.X.cd_set_volume(&volume_for_cd);
cd_set_volume(&my_new_volume);
}
int PlayTrack(int numbertrack) {
if ((!BigActiveCDAudio) || (!ActiveCDAudio))
return 0;
MakeIOCtliCall(&device_status, sizeof(device_status));
CheckError(ioctli_request.status);
if (cd.busy)
StopPlaying();
if (numbertrack > LastTrack) {
numbertrack = LastTrack;
}
for (int i = numbertrack; i <= LastTrack; i++) {
if ((cd.track[i].control & 0x40) == 0)
break;
}
if (i > LastTrack) {
// cout<<" Seek beyond last track"<<endl;
return -1;
}
play_request.start = cd.track[i].start;
play_request.sectors = red2hsg(cd.total_time) - red2hsg(cd.track[i].start);
CallMSCDEX((void *)&play_request, sizeof(play_request));
CheckError(play_request.status);
// cout<<"! Playing started from track "<<i<<endl;
track = numbertrack;
setVolume(smallVolume);
return 0;
}
int GetCurrentTrack(void) {
if ((!BigActiveCDAudio) || (!ActiveCDAudio))
return 0;
if (!cd.busy)
return 0;
struct {
unsigned char command;
unsigned char control;
unsigned char track;
unsigned char index;
unsigned char min1;
unsigned char sec1;
unsigned char frm1;
unsigned char zero;
unsigned char min2;
unsigned char sec2;
unsigned char frm2;
} qbuffer = {12};
MakeIOCtliCall(&qbuffer, sizeof(qbuffer));
if (CheckError(ioctli_request.status))
return -1;
return ((qbuffer.track & 0xF0) >> 4) * 10 + qbuffer.track & 0x0F;
}
int PlayNext(void) {
if ((!BigActiveCDAudio) || (!ActiveCDAudio))
return 0;
int result = track;
#ifdef POMOC
cout << "\n PlayNext() ";
cout << "\n result " << result << " cd.first_track" << (int)cd.first_track
<< " cd.last_track " << (int)cd.last_track << endl;
#endif
if (result < LastTrack)
result++;
else
result = 5; // FirstTrack;
#ifdef POMOC
cout << "\n PlayTrack(" << dec << result << ')' << endl;
#endif
PlayTrack(result);
return 0;
}
int PlayPrevious(void) {
int result = track;
if ((!BigActiveCDAudio) || (!ActiveCDAudio))
return 0;
#ifdef POMOC
cout << "\n PlayPrevious() ";
cout << "\n result " << result << " cd.first_track" << (int)cd.first_track
<< " cd.last_track " << (int)cd.last_track << endl;
#endif
if (result > 5)
result--;
else
result = LastTrack;
#ifdef POMOC
cout << "\n PlayTrack(" << dec << result << ')' << endl;
#endif
PlayTrack(result);
return 0;
}
int getVolume(void) // zwraca od zero do 5 //!
{
return (int)smallVolume;
}
// TA FUNKCJE NALEZY POPRAWIC
void CheckCD(
void) // sprawdza czy jest grany odpowiedni track i ewentualnie nawraca
{
if ((!BigActiveCDAudio) || (!ActiveCDAudio))
return;
int result = GetCurrentTrack();
if (result && (result != track)) {
PlayTrack(track);
}
}
int PlayNext(void);
int PlayPrevious(void);
int PlayTrack(int);
void DeInitCD() {
if (BigActiveCDAudio) {
StopPlaying();
FreeCDBuffer();
}
}
//*********************************************************************************
//*********************************************************************************
/* ORG KF
struct
{
byte length;
byte subunit;
byte command;
word status;
byte reserved[8];
byte adr_mode;
dword start;
dword sectors;
}
play_request={sizeof (play_request),0,132,0,{0,0,0,0,0,0,0,0},1,0,0};
struct
{
byte length;
byte subunit;
byte command;
word status;
byte reserved[8];
}
stop_request={sizeof (stop_request),0,133,0,{0,0,0,0,0,0,0,0}};
int CDAStopPlaying(void)
{
CallMSCDEX((void*)&stop_request);
clogfile<<"ů Playing stopped"<<endl;
return CheckError(stop_request.status);
}
int CDAMediaChanged(void)
{
MakeIOCtliCall (&media_changed_status,sizeof (media_changed_status));
return (media_changed_status.status==0xFF);
}
int CDACurrentTrack(void)
{
if (!mscdex.busy) return 0;
struct
{
byte command;
byte control;
byte track;
byte index;
byte min1;
byte sec1;
byte frm1;
byte zero;
byte min2;
byte sec2;
byte frm2;
}
qbuffer={12};
MakeIOCtliCall(&qbuffer,sizeof (qbuffer));
if (CheckError(ioctli_request.status)) return -1;
return bcd2bin(qbuffer.track);
}
int CDAPlayTrack(int track)
{
MakeIOCtliCall (&device_status,sizeof (device_status));
CheckError (ioctli_request.status);
if (mscdex.busy) CDAStopPlaying();
if (track>mscdex.last_track) {
clogfile<<" Seek beyond last track"<<endl;
return -1;
}
for (int i=track;i<=mscdex.last_track;i++)
{
if ((mscdex.track[i].control&0x40)==0) break;
}
if (i>mscdex.last_track) {
clogfile<<" Seek beyond last track"<<endl;
return -1;
}
play_request.start=mscdex.track[i].start;
play_request.sectors=red2hsg (mscdex.total_time-mscdex.track[i].start);
CallMSCDEx(&play_request);
CheckError(play_request.status);
clogfile<<"ů Playing started from track "<<i<<endl;
return 0;
}
void CDADone(void)
{
if (CDAStopOnExit) CDAStopPlaying();
_dos_freemem(CDABufferSelector);
}
*/
|
67775a9e4759f1b6cb0716c36ec121533ebeb511
|
681def7edcad4620aae6e78de61057a7f3c801a9
|
/native/source/strtokf.cpp
|
84e404e7a10109d7fca7b6c88a2223484a504db1
|
[
"BSD-3-Clause",
"BSD-2-Clause"
] |
permissive
|
aleksas/phonology_engine
|
fc5b66b6b8b6d1714ecb9bf7ee65516abf28f042
|
2baec9a28c0c506075a7c5bd26c86502144d5d95
|
refs/heads/master
| 2020-03-29T11:24:13.168978
| 2020-02-09T11:02:26
| 2020-02-09T11:02:26
| 149,850,649
| 16
| 1
|
NOASSERTION
| 2020-02-09T10:56:59
| 2018-09-22T06:07:51
|
Objective-C
|
UTF-8
|
C++
| false
| false
| 1,427
|
cpp
|
strtokf.cpp
|
#include "StdAfx.h"
extern "C" {
/*
* Standard C string function: tokenize a string splitting based on a
* list of separator characters. Reentrant version.
*
* The "context" argument should point to a "char *" that is preserved
* between calls to strtok_r that wish to operate on same string.
*/
char* strtokf(char *string, const char *seps, char **context)
{
char *head; /* start of word */
char *tail; /* end of word */
/* If we're starting up, initialize context */
if (string) {
*context = string;
}
/* Get potential start of this next word */
head = *context;
if (head == NULL) {
return NULL;
}
/* Skip any leading separators */
while (*head && strchr(seps, *head)) {
head++;
}
/* Did we hit the end? */
if (*head == 0) {
/* Nothing left */
*context = NULL;
return NULL;
}
/* skip over word */
tail = head;
while (*tail && !strchr(seps, *tail)) {
tail++;
}
/* Save head for next time in context */
if (*tail == 0) {
*context = NULL;
}
else {
*tail = 0;
tail++;
*context = tail;
}
/* Return current word */
return head;
}
}
|
4a4dc0e87bbe134bcbb545b477cc609151470789
|
84a9cf5fd65066cd6c32b4fc885925985231ecde
|
/Plugins2/ElementalEngine/GameUtilities/FadeUtility.cpp
|
f56ec5a24909b6440feef488024882bb821e3ad7
|
[] |
no_license
|
acemon33/ElementalEngine2
|
f3239a608e8eb3f0ffb53a74a33fa5e2a38e4891
|
e30d691ed95e3811c68e748c703734688a801891
|
refs/heads/master
| 2020-09-22T06:17:42.037960
| 2013-02-11T21:08:07
| 2013-02-11T21:08:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,546
|
cpp
|
FadeUtility.cpp
|
///============================================================================
/// \note Elemental Engine
/// Copyright (c) 2005-2008 Signature Devices, Inc.
///
/// This code is redistributable under the terms of the EE License.
///
/// This code is distributed without warranty or implied warranty of
/// merchantability or fitness for a particular purpose. See the
/// EE License for more details.
///
/// You should have received a copy of the EE License along with this
/// code; If not, write to Signature Devices, Inc.,
/// 3200 Bridge Parkway Suite 102, Redwood City, CA 94086 USA.
///============================================================================
#include "StdAfx.h"
#include "FadeUtility.h"
#include "FadeUtilityDefine.h"
REGISTER_COMPONENT_SINGLETON(CFadeUtility);
REGISTER_MESSAGE_HANDLER(ProcessFade, OnProcessFade, CFadeUtility );
REGISTER_MESSAGE_HANDLER(GlobalUpdateTick, OnGlobalUpdateTick, CFadeUtility);
TOLUA_API int tolua_FadeUtility_open (lua_State* tolua_S);
CFadeUtility::CFadeUtility()
{
m_ToolBox = EngineGetToolBox();
m_Timer = m_ToolBox->GetTimer();
lua_State * LuaState;
// hook into LUA
LuaState = NULL;
static DWORD msgHash_GetMasterScriptState = CHashString(_T( "GetMasterScriptState" )).GetUniqueID();
if(m_ToolBox->SendMessage(msgHash_GetMasterScriptState, sizeof(lua_State *), &LuaState) == MSG_HANDLED)
{
// register our additional structures/handlers with LUA master
tolua_FadeUtility_open(LuaState);
}
else
{
StdString error;
error = _T("Error missing Master Script State Data\n");
// log error
EngineGetToolBox()->SetErrorValue(WARN_INVALID_OPERATION);
EngineGetToolBox()->Log(LOGWARNING, error);
}
}
IComponent * CFadeUtility::Create(int nArgs, va_list argptr)
{
return SINGLETONINSTANCE(CFadeUtility);
}
void CFadeUtility::Serialize(IArchive &ar)
{
}
IHashString * CFadeUtility::GetComponentType()
{
static CHashString compName(_T("CFadeUtility"));
return &compName;
}
bool CFadeUtility::IsKindOf(IHashString *compType)
{
return (compType->GetUniqueID() == GetComponentType()->GetUniqueID());
}
DWORD CFadeUtility::OnGlobalUpdateTick( DWORD size, void * params )
{
VERIFY_MESSAGE_SIZE(size, sizeof(GLOBALTICKPARAMS));
list<FADEDATA>::iterator objIter;
static CHashString hsGameTime(GAMEDELTATIMER);
float fTimeDelta = m_Timer->GetTimeDelta( &hsGameTime );
for ( objIter = m_FadeList.begin(); objIter != m_FadeList.end(); )
{
DWORD result = 0;
Vec4 v4Fade(1.0f, 1.0f, 1.0f, (*objIter).GetFadeAmount(fTimeDelta));
CHashString hszPixelConstant(_T("pixelconstant"));
CHashString hszColorMultiplier(_T("ColorMultiplier"));
MATERIALOVERRIDEPARAMS mop;
mop.hsType = &hszPixelConstant;
mop.hsName = &hszColorMultiplier;
mop.vecValue = &v4Fade;
static DWORD msgHash_SetMaterialOverride = CHashString(_T("SetMaterialOverride")).GetUniqueID();
result = m_ToolBox->SendMessage( msgHash_SetMaterialOverride, sizeof(mop), &mop, &(*objIter).hszObjectName, NULL );
if (!(*objIter).bStillAlive() || (result == MSG_NOT_HANDLED) )
{
if ((*objIter).bClearOverride)
{
CLEARMATOVERRIDEPARAMS cmop;
static DWORD msgHash_ClearMaterialOverride = CHashString(_T("SetMaterialOverride")).GetUniqueID();
m_ToolBox->SendMessage( msgHash_ClearMaterialOverride, sizeof(cmop), &cmop, &(*objIter).hszObjectName, NULL );
}
if ((*objIter).bCallback)
{
TRIGGEREVENTPARAMS tep;
tep.EventName = &(*objIter).hszCallbackEvent;
tep.EventParamsArchive = NULL;
static DWORD msgHash_TriggerEvent = CHashString(_T("TriggerEvent")).GetUniqueID();
static CHashString hszCQHStateObject = _T("CQHStateObject");
m_ToolBox->SendMessage( msgHash_TriggerEvent, sizeof(tep), &tep, &(*objIter).hszObjectName, &hszCQHStateObject );
}
objIter = m_FadeList.erase(objIter);
}
else
++objIter;
}
return MSG_HANDLED_PROCEED;
}
DWORD CFadeUtility::OnProcessFade( DWORD size, void * params )
{
VERIFY_MESSAGE_SIZE(size, sizeof(FADEUTILITYPARAMS));
FADEUTILITYPARAMS *fup = (FADEUTILITYPARAMS*)params;
if (!fup->ObjectName)
{
m_ToolBox->Log( LOGERROR, _T("Failed to generate correct number of vertices for height node top/bottom faces.") );
}
FADEDATA FadeData(fup->ObjectName, fup->CallbackEvent, fup->StartFadeAmount, fup->EndFadeAmount, fup->FadeTime, fup->bClearOverride);
m_FadeList.push_front(FadeData);
static CHashString hszRenderState(_T("renderstate"));
static CHashString hszAlphaBlend(_T("alphablend"));
static CHashString hszCullMode(_T("cullmode"));
static CHashString hszDepthWrite(_T("depthwrite"));
static CHashString hszTrue(_T("true"));
static CHashString hszFalse(_T("false"));
static CHashString hszCullRegular(_T("cullregular"));
static DWORD msgHash_SetMaterialOverride = CHashString(_T("SetMaterialOverride")).GetUniqueID();
MATERIALOVERRIDEPARAMS mop;
mop.hsType = &hszRenderState;
mop.hsName = &hszAlphaBlend;
mop.hsValue = &hszTrue;
m_ToolBox->SendMessage( msgHash_SetMaterialOverride, sizeof(mop), &mop, fup->ObjectName, NULL );
mop.hsName = &hszCullMode;
mop.hsValue = &hszCullRegular;
m_ToolBox->SendMessage( msgHash_SetMaterialOverride, sizeof(mop), &mop, fup->ObjectName, NULL );
mop.hsName = &hszDepthWrite;
mop.hsValue = &hszFalse;
m_ToolBox->SendMessage( msgHash_SetMaterialOverride, sizeof(mop), &mop, fup->ObjectName, NULL );
return MSG_HANDLED_STOP;
}
|
380faac686966a132559263d75c23b632b43efd9
|
a6b92dfce322311434dc35c29f3722e861fe3b1f
|
/388b_sereja_and_suffixes.cpp
|
03a34dd39beae6812418bb07ef0098b1625df4c1
|
[] |
no_license
|
asv018/codeforces-solutions
|
6f944d0c483096f9cfb4edfe4905db9cf68632e4
|
cf52712a52f4eebe9d2be7f5ec56f6e7e265c718
|
refs/heads/main
| 2023-07-03T02:07:34.166802
| 2021-08-03T18:24:43
| 2021-08-03T18:24:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 872
|
cpp
|
388b_sereja_and_suffixes.cpp
|
//@aryanpathania
#include <bits/stdc++.h>
#define MOD 1'000'000'007
//#define MOD = 998'244'353
#define int int64_t
typedef long long ll;
typedef long double ld;
using namespace std;
void solve(){
int n, m;
std::cin >> n >> m;
int a[n];
for (int i = 0; i < n; i++) {
std::cin >> a[i];
}
std::set<int> s;
int ans[n];
for (int i = n - 1; i >= 0; i--) {
s.insert(a[i]);
ans[i] = s.size();
}
for (int i = 0; i < m; i++)
{
int x;
std::cin >> x;
std::cout << ans[x-1] << '\n';
}
}
int32_t main(){
std::ios::sync_with_stdio(false);
std::cin.tie(NULL);
solve();
return 0;
}
//DONE
// Aryan Pathania
// National Institute of Technology, Hamirpur
// Codeforces - https://codeforces.com/profile/aryanpathania
// LinkedIn https://www.linkedin.com/in/aryanpathania03/
|
b8102e3ede8e0adcbb899f4e0e8fb05673dc4714
|
0dab354e734f3490086dbc83195e825400e26f31
|
/EPI/chapter16.hh
|
2257927ce69c765de9b708d9ba5e350979b2df93
|
[] |
no_license
|
eymenkurdoglu/sisyphus
|
2bcfbce2baffa971ac7fb643a8809de4d71a8e14
|
d0ad4462dc8e1bc2660db0e7cf0a5f14eb16d860
|
refs/heads/master
| 2021-01-13T04:37:32.130119
| 2017-09-15T05:16:58
| 2017-09-15T05:16:58
| 79,468,992
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 349
|
hh
|
chapter16.hh
|
#include <vector>
#include <string>
#include <iostream>
using namespace std;
namespace ch16 {
bool is_palindromic( const string& );
void decompose( const string&, int, vector<string>*, vector< vector<string> >* );
vector< vector<string> > list_all_palindromic_decomp( const string& );
vector< vector<int> > power_set( const vector<int>& );
}
|
6b5291d9aa5a5a3df30eb85bf10fe567bca544d2
|
db7581f4f68ae11d12da64a455ee73e8d211ee4f
|
/Finished/13.roman-to-integer.cpp
|
2033bb5581310d1fb87d57a1b07663dba17c7011
|
[] |
no_license
|
Golfrey/leetcode
|
61720d00de07fcf97cf377d55908b7569fbb9fe5
|
32ed3e33cad91b00724fa9c2138686954d819b9c
|
refs/heads/main
| 2023-07-30T17:31:22.111568
| 2021-09-26T01:14:39
| 2021-09-26T01:14:39
| 410,416,656
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 812
|
cpp
|
13.roman-to-integer.cpp
|
/*
* @lc app=leetcode id=13 lang=cpp
*
* [13] Roman to Integer
*/
// @lc code=start
class Solution {
public:
int romanToInt(string s) {
int ret = 0;
unordered_map<char, int> umap{{'I', 1}, {'V', 5}, {'X', 10},
{'L', 50}, {'C', 100}, {'D', 500},
{'M', 1000}};
for (int i = 0; i < s.size(); i++) {
ret += umap[s[i]];
if(i >= 1) {
if(s[i-1]=='I' && (s[i]=='V' || s[i] =='X'))
ret -= 2;
else if(s[i-1]=='X' && (s[i]=='L' || s[i] =='C'))
ret -= 20;
else if(s[i-1]=='C' && (s[i]=='D' || s[i] =='M'))
ret -= 200;
}
}
return ret;
}
};
// @lc code=end
|
af3baf7a9fe21bddef1a6150a8e8de502150a1c4
|
d7891562a5c601a827d5980af0b7a2e957d4f8b1
|
/task2/InvertColorsImage.h
|
864020aa3e42421558ab36f9b288d8ffceb7c65b
|
[] |
no_license
|
alex3287/SE_laba_1
|
eaa8c7bba9277a0ead31bf5ba163d9052de25bd1
|
19e98d6f076cfa6e8de02962b3545defe2952b6e
|
refs/heads/main
| 2023-03-28T11:35:47.039571
| 2021-04-02T17:03:02
| 2021-04-02T17:03:02
| 341,607,690
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 315
|
h
|
InvertColorsImage.h
|
//
// Created by Александр Мангазеев on 02.04.2021.
//
#ifndef SE_LABA_1_INVERTCOLORSIMAGE_H
#define SE_LABA_1_INVERTCOLORSIMAGE_H
#include "Image.h"
class InvertColorsImage {
public:
static Image InvertColors(Image image, std::string newColor);
};
#endif //SE_LABA_1_INVERTCOLORSIMAGE_H
|
f8ec5440b15cc9bcb2a3a08e8af975d054f0beec
|
458457c11a4e7a2ef406e7f41e803e52f2cceb22
|
/organism.cpp
|
ec2858e238a0441ab13f3078cd946ceb89ddf5e3
|
[] |
no_license
|
justinchoys/2d_predator_prey_simulation
|
441d94649920ce85447df993fe17eda99850859c
|
9fe849076991fcf54a1ffb8bf9d485b232436509
|
refs/heads/master
| 2020-03-25T01:15:01.827513
| 2018-08-02T01:48:35
| 2018-08-02T01:48:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,376
|
cpp
|
organism.cpp
|
#include "organism.h"
#include <iostream>
using namespace std;
//constructor
Organism::Organism(int x, int y, int turns, bool moved, string s): x(x), y(y), turnsCount(turns), moved(moved), type(s) {};
//virtual functions, throw warning if we try to call them
void Organism::move(Organism*** grid, int& antcount, int& doodlecount) {
cout << "Error: called virtual function Organism.move(grid)" << endl;
exit(1);
}
void Organism::breed(Organism*** grid, int& antcount, int& doodlecount) {
cout << "Error: called virtual function Organism.breed(grid)" << endl;
exit(1);
}
void Organism::print() {
cout << "Error: called virtual function Organism.print()" << endl;
exit(1);
}
int Organism::search(Organism*** grid, int x, int y) {
//Given organism position, return direction in which nullptr exists. If no neighboring nullptr, return -1.
//this is going to be used for breed functions that look for nullptr around organism
//1 is moving up x-axis, 2 is moving up y-axis, 3 is moving down x-axis, 4 is moving down y-axis
if (x + 1 < BOARD_SIZE && grid[x + 1][y] == nullptr) {
return 1;
} else if (y + 1 < BOARD_SIZE && grid[x][y + 1] == nullptr) {
return 2;
} else if (x - 1 > -1 && grid[x - 1][y] == nullptr) {
return 3;
} else if (y - 1 > -1 && grid[x][y - 1] == nullptr) {
return 4;
} else {
return -1;
}
}
void Organism::erase() {
delete this;
}
|
65b557afc824eeaa360447cbfe58d35983831a6a
|
3705ca67bc3797696534410620ecd06feee5d4e5
|
/src/io/github/technicalnotes/programming/problems/29-01-2020/generatespiralmatrix.cpp
|
2471159980402a6bdb6c9df1ef90a449b7e9de6b
|
[
"MIT"
] |
permissive
|
chiragbhatia94/programming-cpp
|
15c9a7250ecb4c897ea8e612e7d7de83bb4a5272
|
efd6aa901deacf416a3ab599e6599845a8111eac
|
refs/heads/master
| 2023-04-30T07:20:40.365130
| 2020-08-22T22:13:05
| 2020-08-22T22:13:05
| 370,069,428
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,775
|
cpp
|
generatespiralmatrix.cpp
|
#include "bits/stdc++.h"
using namespace std;
void generateMatrix(int);
void fill(vector<vector<int>> &, int, bool, int, bool);
int main()
{
generateMatrix(4);
}
static int cell = 1;
void generateMatrix(int A)
{
int rowSeq[A];
int colSeq[A];
vector<vector<int>> spiralMatrix;
spiralMatrix.resize(A, std::vector<int>(A, 0));
// Generating row seq
bool start = true;
for (int i = 0, j = 0; i < A; i++)
{
if (start)
{
rowSeq[i] = j;
}
else
{
rowSeq[i] = A - 1 - j;
j++;
}
start = !start;
}
// Generating col seq
start = false;
for (int i = 0, j = 0; i < A; i++)
{
if (start)
{
colSeq[i] = j;
j++;
}
else
{
colSeq[i] = A - 1 - j;
}
start = !start;
}
for (size_t i = 0; i < A; i++)
{
spiralMatrix[0][i] = cell++;
}
bool straight = true;
for (size_t i = 3; i > 0; i--)
{
fill(spiralMatrix, rowSeq[A - i], true, i, straight);
straight = !straight;
fill(spiralMatrix, rowSeq[A - i], false, i, straight);
}
for (int i = 0; i < A; i++)
{
for (int j = 0; j < A; j++)
{
cout << spiralMatrix[i][j] << " ";
}
cout << endl;
}
}
void fill(vector<vector<int>> &spiralMatrix, int currentRowCol, bool fixCol, int count, bool sequence)
{
if (sequence)
{
for (size_t i = spiralMatrix.size() - count; i <= count; i++)
{
if (fixCol)
spiralMatrix[i][currentRowCol] = cell++;
else
spiralMatrix[currentRowCol][i] = cell++;
}
}
else
{
for (size_t i = spiralMatrix.size() - count; i <= count; i++)
{
if (fixCol)
spiralMatrix[count - i][currentRowCol] = cell++;
else
spiralMatrix[currentRowCol][count - i] = cell++;
}
}
}
|
ae20835a1c113eb02e16af265126bbc4d813852b
|
1ef834470ad661103d29f7d3266d2b38e117ba20
|
/Chroma/src/Chroma/Scene/Scene.cpp
|
516476a3303e46b3dbbf2de5a30f52b594accb94
|
[] |
no_license
|
ttalexander2/chroma-public
|
638382cf6907296985252d81a1a4613e743b9cff
|
f37e86c30636a80ae25c753b3bdb7d05ac016e15
|
refs/heads/master
| 2023-05-12T12:01:24.601478
| 2021-06-05T17:53:16
| 2021-06-05T17:53:16
| 372,094,587
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,348
|
cpp
|
Scene.cpp
|
#include "chromapch.h"
#include "Scene.h"
#include "EntityRef.h"
#include <Chroma/Components/Transform.h>
#include <Chroma/Components/Tag.h>
#include <Chroma/Components/AudioSource.h>
#include <Chroma/Components/SpriteRenderer.h>
#include <Chroma/Components/BoxCollider2D.h>
#include <Chroma/Components/CircleCollider2D.h>
#include <Chroma/Systems/AudioSystem.h>
#include <Chroma/Systems/SpriteRendererSystem.h>
#include <yaml-cpp/node/node.h>
#include <yaml-cpp/node/parse.h>
#include <yaml-cpp/yaml.h>
#include <Chroma/Scene/System.h>
namespace Chroma
{
Scene::Scene()
{
RegisterComponent<Tag>();
RegisterComponent<Transform>();
RegisterComponent<AudioSource>();
RegisterComponent<SpriteRenderer>();
RegisterComponent<BoxCollider2D>();
RegisterComponent<CircleCollider2D>();
RegisterSystem<AudioSystem>();
RegisterSystem<SpriteRendererSystem>();
}
EntityRef Scene::NewEntity()
{
if (!m_FreeEntities.empty())
{
EntityIndex newIndex = m_FreeEntities.back();
m_FreeEntities.pop_back();
EntityID newID = CreateEntityId(newIndex, GetEntityVersion(m_Entities[newIndex]));
m_Entities[newIndex] = newID;
EntityRef entity = { newID, *this };
return { m_Entities[newIndex], *this };
}
m_Entities.push_back(CreateEntityId(EntityIndex(m_Entities.size()), 0));
EntityRef e = { m_Entities.back(), *this };
std::string name = "Entity_" + std::to_string(GetEntityIndex(e.m_EntityID));
e.AddComponent<Tag>()->EntityName = name;
e.AddComponent<Transform>();
return { m_Entities.back(), *this };
}
EntityRef Scene::NewEntityFromID(EntityID id)
{
m_Entities.push_back(CreateEntityId(EntityIndex(id), 0));
EntityRef e = { m_Entities.back(), *this };
return { m_Entities.back(), *this };
}
void Scene::DestroyEntity(EntityRef entity)
{
EntityID id = entity.m_EntityID;
EntityID newID = CreateEntityId(EntityIndex(-1), GetEntityVersion(id) + 1);
m_Entities[GetEntityIndex(id)] = newID;
m_FreeEntities.push_back(GetEntityIndex(id));
for (AbstractComponentPool* pool : m_ComponentPools)
{
pool->RemoveAll(id);
}
}
std::string Scene::Serialize()
{
YAML::Emitter out;
out << YAML::BeginMap;
out << YAML::Key << "Scene" << YAML::Value << this->Name;
out << YAML::Key << "Entities" << YAML::Value << YAML::BeginSeq;
for (EntityRef e : this->View<Tag>())
{
out << YAML::BeginMap;
out << YAML::Key << "Entity" << YAML::Value << e.m_EntityID;
out << YAML::Key << "Components" << YAML::Value << YAML::BeginMap;
for (ComponentRef c : e.GetAllComponents())
{
c->BeginSerialize(out);
c->Serialize(out);
c->EndSerialize(out);
}
out << YAML::EndMap;
out << YAML::EndMap;
}
out << YAML::EndSeq;
out << YAML::EndMap;
std::string result = out.c_str();
return result;
}
bool Scene::Deserialize(Scene &out, const std::string& yaml)
{
auto data = YAML::Load(yaml);
if (!data["Scene"])
return false;
std::string sceneName = data["Scene"].as<std::string>();
CHROMA_CORE_TRACE("Deserializing Scene '{}'", sceneName);
out.Name = sceneName;
auto entities = data["Entities"];
if (entities)
{
for (auto entity : entities)
{
EntityID id = entity["Entity"].as<EntityID>();
EntityRef newEntity = out.NewEntityFromID(id);
CHROMA_CORE_TRACE("Deserialized Entity with ID = {0}", id);
auto components = entity["Components"];
if (components)
{
for (auto component : components)
{
std::string key = component.first.as<std::string>();
ComponentRef<Component> newComponent = out.m_ComponentFactory[key](out, newEntity);
newComponent->Deserialize(component.second);
}
}
}
}
return true;
}
std::vector<ComponentRef<Component>> Scene::GetAllComponents(EntityRef entity)
{
return Scene::GetAllComponents(entity.GetID());
}
std::vector<ComponentRef<Component>> Scene::GetAllComponents(EntityID id)
{
if (this == nullptr)
return std::vector<ComponentRef<Component>>();
std::vector<ComponentRef<Component>> result;
for (AbstractComponentPool* pool : m_ComponentPools)
{
if (pool == nullptr)
continue;
for (Component* c : pool->GetAbstractComponents(id))
{
result.push_back(ComponentRef<Component>(c, id, this));
}
}
return result;
}
EntityRef Scene::ConvertIDToEntity(EntityID e, Scene& scene)
{
return EntityRef(e, scene);
}
EntityRef Scene::GetEntity(EntityID e)
{
return Scene::ConvertIDToEntity(e, *this);
}
void Scene::EarlyInit()
{
for (System *s : m_Systems)
{
s->EarlyInit();
}
}
void Scene::Init()
{
for (System* s : m_Systems)
{
s->Init();
}
}
void Scene::LateInit()
{
for (System* s : m_Systems)
{
s->LateInit();
}
}
void Scene::EarlyUpdate(Time delta)
{
for (System* s : m_Systems)
{
s->EarlyUpdate(delta);
}
}
void Scene::Update(Time delta)
{
for (System* s : m_Systems)
{
s->Update(delta);
}
}
void Scene::LateUpdate(Time delta)
{
for (System* s : m_Systems)
{
s->LateUpdate(delta);
}
}
void Scene::EarlyDraw(Time delta)
{
for (System* s : m_Systems)
{
s->EarlyDraw(delta);
}
}
void Scene::Draw(Time delta)
{
for (System* s : m_Systems)
{
s->Draw(delta);
}
}
void Scene::LateDraw(Time delta)
{
for (System* s : m_Systems)
{
s->LateDraw(delta);
}
}
}
|
df1da8bb226e6f7695caec10e6050704240a1870
|
0bc180425ebfe56c1da2e82c095c1160ac9fcb07
|
/Pochoir/Stencil_Collection/openLatticeBoltzmann-0.5r1/src/core/boundaryPostProcessors3D.hh
|
4156f223a882da47d7b2f6632341d489ff061b85
|
[] |
no_license
|
superTangcc/toc-collaborate
|
0cf28298f2c1ea1dd0d4e7cbc5cd63bea95c5f17
|
e173b5991b3e69ab53fa69f30b2cd137f15d4d86
|
refs/heads/master
| 2021-01-19T14:56:58.532700
| 2012-10-02T10:47:18
| 2012-10-02T10:47:18
| 5,797,101
| 1
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 16,847
|
hh
|
boundaryPostProcessors3D.hh
|
/* This file is part of the OpenLB library
*
* Copyright (C) 2006, 2007 Jonas Latt
* Address: Rue General Dufour 24, 1211 Geneva 4, Switzerland
* E-mail: jonas.latt@gmail.com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef BOUNDARY_POST_PROCESSORS_3D_HH
#define BOUNDARY_POST_PROCESSORS_3D_HH
#include "boundaryPostProcessors3D.h"
#include "finiteDifference3D.h"
#include "blockLattice3D.h"
#include "firstOrderLbHelpers.h"
#include "util.h"
namespace olb {
//////// PlaneFdBoundaryProcessor3D ///////////////////////////////////
template<typename T, template<typename U> class Lattice, int direction, int orientation>
PlaneFdBoundaryProcessor3D<T,Lattice,direction,orientation>::
PlaneFdBoundaryProcessor3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_)
: x0(x0_), x1(x1_), y0(y0_), y1(y1_), z0(z0_), z1(z1_)
{
OLB_PRECONDITION(x0==x1 || y0==y1 || z0==z1);
}
template<typename T, template<typename U> class Lattice, int direction, int orientation>
void PlaneFdBoundaryProcessor3D<T,Lattice,direction,orientation>::
processSubDomain(BlockLattice3D<T,Lattice>& blockLattice,
int x0_, int x1_, int y0_, int y1_, int z0_, int z1_)
{
using namespace olb::util::tensorIndices3D;
int newX0, newX1, newY0, newY1, newZ0, newZ1;
if ( util::intersect (
x0, x1, y0, y1, z0, z1,
x0_, x1_, y0_, y1_, z0_, z1_,
newX0, newX1, newY0, newY1, newZ0, newZ1 ) )
{
int iX;
#ifdef PARALLEL_MODE_OMP
#pragma omp parallel for
#endif
for (iX=newX0; iX<=newX1; ++iX) {
T dx_u[Lattice<T>::d], dy_u[Lattice<T>::d], dz_u[Lattice<T>::d];
for (int iY=newY0; iY<=newY1; ++iY) {
for (int iZ=newZ0; iZ<=newZ1; ++iZ) {
Cell<T,Lattice>& cell = blockLattice.get(iX,iY,iZ);
Dynamics<T,Lattice>* dynamics = cell.getDynamics();
T rho, u[Lattice<T>:: d];
cell.computeRhoU(rho,u);
interpolateGradients<0> ( blockLattice, dx_u, iX, iY, iZ );
interpolateGradients<1> ( blockLattice, dy_u, iX, iY, iZ );
interpolateGradients<2> ( blockLattice, dz_u, iX, iY, iZ );
T dx_ux = dx_u[0];
T dy_ux = dy_u[0];
T dz_ux = dz_u[0];
T dx_uy = dx_u[1];
T dy_uy = dy_u[1];
T dz_uy = dz_u[1];
T dx_uz = dx_u[2];
T dy_uz = dy_u[2];
T dz_uz = dz_u[2];
T omega = cell.getDynamics()->getOmega();
T sToPi = - rho / Lattice<T>::invCs2 / omega;
T pi[util::TensorVal<Lattice<T> >::n];
pi[xx] = (T)2 * dx_ux * sToPi;
pi[yy] = (T)2 * dy_uy * sToPi;
pi[zz] = (T)2 * dz_uz * sToPi;
pi[xy] = (dx_uy + dy_ux) * sToPi;
pi[xz] = (dx_uz + dz_ux) * sToPi;
pi[yz] = (dy_uz + dz_uy) * sToPi;
// Computation of the particle distribution functions
// according to the regularized formula
T uSqr = util::normSqr<T,Lattice<T>::d>(u);
for (int iPop = 0; iPop < Lattice<T>::q; ++iPop)
cell[iPop] = dynamics -> computeEquilibrium(iPop,rho,u,uSqr) +
firstOrderLbHelpers<T,Lattice>::fromPiToFneq(iPop, pi);
}
}
}
}
}
template<typename T, template<typename U> class Lattice, int direction, int orientation>
void PlaneFdBoundaryProcessor3D<T,Lattice,direction,orientation>::
process(BlockLattice3D<T,Lattice>& blockLattice)
{
processSubDomain(blockLattice, x0, x1, y0, y1, z0, z1);
}
template<typename T, template<typename U> class Lattice, int direction, int orientation>
template<int deriveDirection>
void PlaneFdBoundaryProcessor3D<T,Lattice,direction,orientation>::
interpolateGradients(BlockLattice3D<T,Lattice> const& blockLattice, T velDeriv[Lattice<T>::d],
int iX, int iY, int iZ) const
{
fd::DirectedGradients3D<T, Lattice, direction, orientation, deriveDirection, direction==deriveDirection>::
interpolateVector(velDeriv, blockLattice, iX, iY, iZ);
}
//////// PlaneFdBoundaryProcessorGenerator3D ///////////////////////////////
template<typename T, template<typename U> class Lattice, int direction, int orientation>
PlaneFdBoundaryProcessorGenerator3D<T,Lattice,direction,orientation>::
PlaneFdBoundaryProcessorGenerator3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_)
: PostProcessorGenerator3D<T,Lattice>(x0_, x1_, y0_, y1_, z0_, z1_)
{ }
template<typename T, template<typename U> class Lattice, int direction, int orientation>
PostProcessor3D<T,Lattice>* PlaneFdBoundaryProcessorGenerator3D<T,Lattice,direction,orientation>::
generate() const
{
return new PlaneFdBoundaryProcessor3D<T,Lattice, direction,orientation>
( this->x0, this->x1, this->y0, this->y1, this->z0, this->z1 );
}
template<typename T, template<typename U> class Lattice, int direction, int orientation>
PostProcessorGenerator3D<T,Lattice>*
PlaneFdBoundaryProcessorGenerator3D<T,Lattice,direction,orientation>::clone() const
{
return new PlaneFdBoundaryProcessorGenerator3D<T,Lattice,direction,orientation>
(this->x0, this->x1, this->y0, this->y1, this->z0, this->z1);
}
//////// OuterVelocityEdgeProcessor3D ///////////////////////////////////
template<typename T, template<typename U> class Lattice, int plane, int normal1, int normal2>
OuterVelocityEdgeProcessor3D<T,Lattice, plane,normal1,normal2>::
OuterVelocityEdgeProcessor3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_)
: x0(x0_), x1(x1_), y0(y0_), y1(y1_), z0(z0_), z1(z1_)
{
OLB_PRECONDITION (
(plane==2 && x0==x1 && y0==y1) ||
(plane==1 && x0==x1 && z0==z1) ||
(plane==0 && y0==y1 && z0==z1) );
}
template<typename T, template<typename U> class Lattice, int plane, int normal1, int normal2>
void OuterVelocityEdgeProcessor3D<T,Lattice, plane,normal1,normal2>::
processSubDomain(BlockLattice3D<T,Lattice>& blockLattice,
int x0_, int x1_, int y0_, int y1_, int z0_, int z1_)
{
using namespace olb::util::tensorIndices3D;
int newX0, newX1, newY0, newY1, newZ0, newZ1;
if ( util::intersect ( x0, x1, y0, y1, z0, z1,
x0_, x1_, y0_, y1_, z0_, z1_,
newX0, newX1, newY0, newY1, newZ0, newZ1 ) )
{
int iX;
#ifdef PARALLEL_MODE_OMP
#pragma omp parallel for
#endif
for (iX=newX0; iX<=newX1; ++iX) {
for (int iY=newY0; iY<=newY1; ++iY) {
for (int iZ=newZ0; iZ<=newZ1; ++iZ) {
Cell<T,Lattice>& cell = blockLattice.get(iX,iY,iZ);
Dynamics<T,Lattice>* dynamics = cell.getDynamics();
T rho10 = getNeighborRho(iX,iY,iZ,1,0, blockLattice);
T rho01 = getNeighborRho(iX,iY,iZ,0,1, blockLattice);
T rho20 = getNeighborRho(iX,iY,iZ,2,0, blockLattice);
T rho02 = getNeighborRho(iX,iY,iZ,0,2, blockLattice);
T rho = (T)2/(T)3*(rho01+rho10)-(T)1/(T)6*(rho02+rho20);
T dA_uB_[3][3];
interpolateGradients<plane,0> ( blockLattice, dA_uB_[0], iX, iY, iZ );
interpolateGradients<direction1,normal1> ( blockLattice, dA_uB_[1], iX, iY, iZ );
interpolateGradients<direction2,normal2> ( blockLattice, dA_uB_[2], iX, iY, iZ );
T dA_uB[3][3];
for (int iBeta=0; iBeta<3; ++iBeta) {
dA_uB[plane][iBeta] = dA_uB_[0][iBeta];
dA_uB[direction1][iBeta] = dA_uB_[1][iBeta];
dA_uB[direction2][iBeta] = dA_uB_[2][iBeta];
}
T omega = dynamics -> getOmega();
T sToPi = - rho / Lattice<T>::invCs2 / omega;
T pi[util::TensorVal<Lattice<T> >::n];
pi[xx] = (T)2 * dA_uB[0][0] * sToPi;
pi[yy] = (T)2 * dA_uB[1][1] * sToPi;
pi[zz] = (T)2 * dA_uB[2][2] * sToPi;
pi[xy] = (dA_uB[0][1]+dA_uB[1][0]) * sToPi;
pi[xz] = (dA_uB[0][2]+dA_uB[2][0]) * sToPi;
pi[yz] = (dA_uB[1][2]+dA_uB[2][1]) * sToPi;
// Computation of the particle distribution functions
// according to the regularized formula
T u[Lattice<T>::d];
cell.computeU(u);
T uSqr = util::normSqr<T,Lattice<T>::d>(u);
for (int iPop = 0; iPop < Lattice<T>::q; ++iPop) {
cell[iPop] = dynamics -> computeEquilibrium(iPop,rho,u,uSqr) +
firstOrderLbHelpers<T,Lattice>::fromPiToFneq(iPop, pi);
}
}
}
}
}
}
template<typename T, template<typename U> class Lattice, int plane, int normal1, int normal2>
void OuterVelocityEdgeProcessor3D<T,Lattice, plane,normal1,normal2>::
process(BlockLattice3D<T,Lattice>& blockLattice)
{
processSubDomain(blockLattice, x0, x1, y0, y1, z0, z1);
}
template<typename T, template<typename U> class Lattice, int plane, int normal1, int normal2>
T OuterVelocityEdgeProcessor3D<T,Lattice, plane,normal1,normal2>::
getNeighborRho(int x, int y, int z, int step1, int step2, BlockLattice3D<T,Lattice> const& blockLattice)
{
int coords[3] = {x, y, z};
coords[direction1] += -normal1*step1;
coords[direction2] += -normal2*step2;
return blockLattice.get(coords[0], coords[1], coords[2]).computeRho();
}
template<typename T, template<typename U> class Lattice, int plane, int normal1, int normal2>
template<int deriveDirection, int orientation>
void OuterVelocityEdgeProcessor3D<T,Lattice, plane,normal1,normal2>::
interpolateGradients(BlockLattice3D<T,Lattice> const& blockLattice,
T velDeriv[Lattice<T>::d],
int iX, int iY, int iZ) const
{
fd::DirectedGradients3D<T,Lattice,deriveDirection,orientation,deriveDirection,deriveDirection!=plane>::
interpolateVector(velDeriv, blockLattice, iX, iY, iZ);
}
//////// OuterVelocityEdgeProcessorGenerator3D ///////////////////////////////
template<typename T, template<typename U> class Lattice, int plane, int normal1, int normal2>
OuterVelocityEdgeProcessorGenerator3D<T,Lattice, plane,normal1,normal2>::
OuterVelocityEdgeProcessorGenerator3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_)
: PostProcessorGenerator3D<T,Lattice>(x0_, x1_, y0_, y1_, z0_, z1_)
{ }
template<typename T, template<typename U> class Lattice, int plane, int normal1, int normal2>
PostProcessor3D<T,Lattice>*
OuterVelocityEdgeProcessorGenerator3D<T,Lattice, plane,normal1,normal2>::
generate() const
{
return new OuterVelocityEdgeProcessor3D < T,Lattice, plane,normal1,normal2 >
( this->x0, this->x1, this->y0, this->y1, this->z0, this->z1);
}
template<typename T, template<typename U> class Lattice, int plane, int normal1, int normal2>
PostProcessorGenerator3D<T,Lattice>*
OuterVelocityEdgeProcessorGenerator3D<T,Lattice, plane,normal1,normal2>::clone() const
{
return new OuterVelocityEdgeProcessorGenerator3D<T,Lattice, plane,normal1,normal2 >
(this->x0, this->x1, this->y0, this->y1, this->z0, this->z1);
}
/////////// OuterVelocityCornerProcessor3D /////////////////////////////////////
template<typename T, template<typename U> class Lattice, int xNormal, int yNormal, int zNormal>
OuterVelocityCornerProcessor3D<T, Lattice, xNormal, yNormal, zNormal>::
OuterVelocityCornerProcessor3D ( int x_, int y_, int z_ )
: x(x_), y(y_), z(z_)
{ }
template<typename T, template<typename U> class Lattice, int xNormal, int yNormal, int zNormal>
void OuterVelocityCornerProcessor3D<T, Lattice, xNormal, yNormal, zNormal>::
process(BlockLattice3D<T,Lattice>& blockLattice)
{
using namespace olb::util::tensorIndices3D;
Cell<T,Lattice>& cell = blockLattice.get(x,y,z);
Dynamics<T,Lattice>* dynamics = cell.getDynamics();
T rho100 = blockLattice.get(x - 1*xNormal, y - 0*yNormal, z - 0*zNormal).computeRho();
T rho010 = blockLattice.get(x - 0*xNormal, y - 1*yNormal, z - 0*zNormal).computeRho();
T rho001 = blockLattice.get(x - 0*xNormal, y - 0*yNormal, z - 1*zNormal).computeRho();
T rho200 = blockLattice.get(x - 2*xNormal, y - 0*yNormal, z - 0*zNormal).computeRho();
T rho020 = blockLattice.get(x - 0*xNormal, y - 2*yNormal, z - 0*zNormal).computeRho();
T rho002 = blockLattice.get(x - 0*xNormal, y - 0*yNormal, z - 2*zNormal).computeRho();
T rho = (T)4/(T)9 * (rho001 + rho010 + rho100) - (T)1/(T)9 * (rho002 + rho020 + rho200);
T dx_u[Lattice<T>::d], dy_u[Lattice<T>::d], dz_u[Lattice<T>::d];
fd::DirectedGradients3D<T, Lattice, 0, xNormal, 0, true>::interpolateVector(dx_u, blockLattice, x,y,z);
fd::DirectedGradients3D<T, Lattice, 1, yNormal, 0, true>::interpolateVector(dy_u, blockLattice, x,y,z);
fd::DirectedGradients3D<T, Lattice, 2, zNormal, 0, true>::interpolateVector(dz_u, blockLattice, x,y,z);
T dx_ux = dx_u[0];
T dy_ux = dy_u[0];
T dz_ux = dz_u[0];
T dx_uy = dx_u[1];
T dy_uy = dy_u[1];
T dz_uy = dz_u[1];
T dx_uz = dx_u[2];
T dy_uz = dy_u[2];
T dz_uz = dz_u[2];
T omega = dynamics -> getOmega();
T sToPi = - rho / Lattice<T>::invCs2 / omega;
T pi[util::TensorVal<Lattice<T> >::n];
pi[xx] = (T)2 * dx_ux * sToPi;
pi[yy] = (T)2 * dy_uy * sToPi;
pi[zz] = (T)2 * dz_uz * sToPi;
pi[xy] = (dx_uy + dy_ux) * sToPi;
pi[xz] = (dx_uz + dz_ux) * sToPi;
pi[yz] = (dy_uz + dz_uy) * sToPi;
// Computation of the particle distribution functions
// according to the regularized formula
T u[Lattice<T>::d];
cell.computeU(u);
T uSqr = util::normSqr<T,Lattice<T>::d>(u);
for (int iPop = 0; iPop < Lattice<T>::q; ++iPop) {
cell[iPop] = dynamics -> computeEquilibrium(iPop,rho,u,uSqr) +
firstOrderLbHelpers<T,Lattice>::fromPiToFneq(iPop, pi);
}
}
template<typename T, template<typename U> class Lattice, int xNormal, int yNormal, int zNormal>
void OuterVelocityCornerProcessor3D<T, Lattice, xNormal, yNormal, zNormal>::
processSubDomain(BlockLattice3D<T,Lattice>& blockLattice,
int x0_, int x1_, int y0_, int y1_, int z0_, int z1_)
{
if (util::contained(x, y, z, x0_, x1_, y0_, y1_, z0_, z1_)) {
process(blockLattice);
}
}
//////// OuterVelocityCornerProcessorGenerator3D ///////////////////////////////
template<typename T, template<typename U> class Lattice, int xNormal, int yNormal, int zNormal>
OuterVelocityCornerProcessorGenerator3D<T,Lattice, xNormal,yNormal,zNormal>::
OuterVelocityCornerProcessorGenerator3D(int x_, int y_, int z_)
: PostProcessorGenerator3D<T,Lattice>(x_,x_, y_,y_, z_,z_)
{ }
template<typename T, template<typename U> class Lattice, int xNormal, int yNormal, int zNormal>
PostProcessor3D<T,Lattice>*
OuterVelocityCornerProcessorGenerator3D<T,Lattice, xNormal,yNormal,zNormal>::
generate() const
{
return new OuterVelocityCornerProcessor3D<T,Lattice, xNormal,yNormal,zNormal>
( this->x0, this->y0, this->z0 );
}
template<typename T, template<typename U> class Lattice, int xNormal, int yNormal, int zNormal>
PostProcessorGenerator3D<T,Lattice>*
OuterVelocityCornerProcessorGenerator3D<T,Lattice, xNormal,yNormal,zNormal>::clone() const
{
return new OuterVelocityCornerProcessorGenerator3D<T,Lattice, xNormal, yNormal, zNormal>
(this->x0, this->y0, this->z0);
}
} // namespace olb
#endif
|
2a7b969e6b6ae0195175e65c15f53e99f2068fc2
|
fc2e556fc1291b4a4708e95d6422f90a7b48b9f1
|
/include/mango/image/surface.hpp
|
6e2289738d307e3e4d51a3cfbe5cf6f878137dcd
|
[
"Zlib"
] |
permissive
|
t0rakka/mango
|
6c5c69dd2c8d678daa5df6e9131d755f17e5ac2e
|
0dcda42ac0d94d4e1ed7dee56a4a8e83856065d5
|
refs/heads/main
| 2023-09-02T09:20:54.687739
| 2023-08-31T15:22:35
| 2023-08-31T15:22:42
| 73,749,708
| 359
| 50
|
NOASSERTION
| 2021-01-21T02:16:00
| 2016-11-14T21:44:58
|
C++
|
UTF-8
|
C++
| false
| false
| 2,840
|
hpp
|
surface.hpp
|
/*
MANGO Multimedia Development Platform
Copyright (C) 2012-2023 Twilight Finland 3D Oy Ltd. All rights reserved.
*/
#pragma once
#include <cstddef>
#include <string>
#include <mango/core/configure.hpp>
#include <mango/core/memory.hpp>
#include <mango/filesystem/file.hpp>
#include <mango/image/format.hpp>
#include <mango/image/decoder.hpp>
#include <mango/image/encoder.hpp>
namespace mango::image
{
class Surface
{
public:
Format format;
u8* image;
size_t stride;
int width;
int height;
Surface();
Surface(const Surface& surface);
Surface(int width, int height, const Format& format, size_t stride, const void* image);
Surface(const Surface& source, int x, int y, int width, int height);
~Surface();
Surface& operator = (const Surface& surface);
u8* address(int x = 0, int y = 0) const
{
u8* scan = image + y * stride;
return scan + size_t(x) * format.bytes();
}
template <typename SampleType>
SampleType* address(int x = 0, int y = 0) const
{
u8* ptr = address(x, y);
return reinterpret_cast<SampleType*>(ptr);
}
ImageEncodeStatus save(Stream& stream, const std::string& extension, const ImageEncodeOptions& options = ImageEncodeOptions()) const;
ImageEncodeStatus save(const std::string& filename, const ImageEncodeOptions& options = ImageEncodeOptions()) const;
void clear(float red, float green, float blue, float alpha) const;
void clear(Color color) const;
void blit(int x, int y, const Surface& source) const;
void xflip() const;
void yflip() const;
};
class Bitmap : private NonCopyable, public Surface
{
public:
Bitmap(int width, int height, const Format& format, size_t stride = 0);
Bitmap(const Surface& source, const Format& format);
Bitmap(ConstMemory memory, const std::string& extension, const ImageDecodeOptions& options = ImageDecodeOptions());
Bitmap(ConstMemory memory, const std::string& extension, const Format& format, const ImageDecodeOptions& options = ImageDecodeOptions());
Bitmap(const filesystem::File& file, const ImageDecodeOptions& options = ImageDecodeOptions());
Bitmap(const filesystem::File& file, const Format& format, const ImageDecodeOptions& options = ImageDecodeOptions());
Bitmap(const std::string& filename, const ImageDecodeOptions& options = ImageDecodeOptions());
Bitmap(const std::string& filename, const Format& format, const ImageDecodeOptions& options = ImageDecodeOptions());
Bitmap(Bitmap&& bitmap);
~Bitmap();
Bitmap& operator = (Bitmap&& bitmap);
};
} // namespace mango::image
|
beb59a7732f9aa687ab4f3d71cd0b11ce42ea18e
|
305bd78cbc717a35cffedaa6578b5799ca06c021
|
/백준/C++/14466_소가 길을 건너간 이유 6.cpp
|
ff82948ce140c68a178823377e8f0f9588c570bc
|
[] |
no_license
|
haileykim1/Algorithm-Problem
|
f25cb0df6c3b5badb5d659311ac645c49fe6ca47
|
3bc40e16cb43b58963a33f471a4289dcebe04d67
|
refs/heads/master
| 2022-05-12T00:50:11.457502
| 2022-04-30T11:17:28
| 2022-04-30T11:17:28
| 188,186,252
| 3
| 0
| null | null | null | null |
UHC
|
C++
| false
| false
| 1,105
|
cpp
|
14466_소가 길을 건너간 이유 6.cpp
|
#include<iostream>
#include<vector>
#include<memory.h>
#include<set>
using namespace std;
int mx[4] = { 0, 0, -1, 1 };
int my[4] = { -1, 1, 0, 0 };
set <pair <int, int>> connect[101][101];
int N, K, R;
bool visit[101][101] = { false, };
void dfs(int x, int y) {
//지금칸으로 부터 갈 수 있는 곳
if (x < 1 || x > N || y < 1 || y > N)
return;
visit[x][y] = true;
for (int i = 0; i < 4; ++i) {
int nx = x + mx[i];
int ny = y + my[i];
if (!connect[x][y].count({ nx, ny }) && !visit[nx][ny])
dfs(nx, ny);
}
}
int main() {
cin.tie(NULL);
ios::sync_with_stdio(false);
cin >> N >> K >> R;
for (int i = 0; i < R; ++i) {
int a, b, c, d;
cin >> a >> b >> c >> d;
connect[a][b].insert({ c, d });
connect[c][d].insert({ a, b });
}
vector<pair<int, int>> cow(K);
for (int i = 0; i < K; ++i)
cin >> cow[i].first >> cow[i].second;
int ans = 0;
for (int i = 0; i < K; ++i) {
memset(visit, false, sizeof(visit));
dfs(cow[i].first, cow[i].second);
for (int j = i + 1; j < K; ++j) {
if (!visit[cow[j].first][cow[j].second])
++ans;
}
}
cout << ans << '\n';
}
|
3a1f1fbcaaf10f0859533761612c0ca3d31d3489
|
c9b02ab1612c8b436c1de94069b139137657899b
|
/sgonline_srv/app/logic/LogicGate.cpp
|
0fcf8b8a975c3b8c6a9dfdf62f00a03101334a96
|
[] |
no_license
|
colinblack/game_server
|
a7ee95ec4e1def0220ab71f5f4501c9a26ab61ab
|
a7724f93e0be5c43e323972da30e738e5fbef54f
|
refs/heads/master
| 2020-03-21T19:25:02.879552
| 2020-03-01T08:57:07
| 2020-03-01T08:57:07
| 138,948,382
| 1
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,793
|
cpp
|
LogicGate.cpp
|
#include "LogicGate.h"
#include <fstream>
map<int, GateRank> CLogicGate::gateRankMap;
int CLogicGate::GetGate(unsigned uid, Json::Value &data)
{
CDataGate bdDB;
vector<DataGate> datas;
int ret = bdDB.GetGate(uid, datas);
if (ret != 0 && ret != R_ERR_NO_DATA)
{
error_log("[GetGate fail][uid=%u,ret=%d]",uid,ret);
DB_ERROR_RETURN_MSG("db_get_gate_fail");
}
if (ret == R_ERR_NO_DATA)
{
data.resize(0);
return 0;
}
Json::Reader reader;
data.resize(datas.size());
for (unsigned i = 0; i < datas.size(); i++)
{
if (!reader.parse(datas[i].data, data[i]))
{
error_log("[parse fail][uid=%u,i=%u]",uid,i);
DB_ERROR_RETURN_MSG("db_gate_data_error");
}
}
return 0;
}
int CLogicGate::UpdateGate(unsigned uid, const Json::Value &data)
{
if (!data.isArray())
{
error_log("[gate type error][uid=%u,type=%d]",uid,data.type());
DATA_ERROR_RETURN_MSG("data_gate_error");
}
int ret = 0;
Json::FastWriter writer;
Json::Reader reader;
CDataGate gateDB;
vector<unsigned> ids;
ret = gateDB.GetGateIds(uid, ids);
if (ret != 0 && ret != R_ERR_NO_DATA)
{
error_log("[GetGate fail][uid=%u,ret=%d]",uid,ret);
DB_ERROR_RETURN_MSG("get_gate_fail");
}
for (unsigned i = 0; i < data.size(); i++)
{
unsigned id = 0;
int w = 0;
if (!Json::GetUInt(data[i], "id", id) || !Json::GetInt(data[i], "w", w))
{
error_log("[gate data error][uid=%u,index=%u]",uid,i);
DATA_ERROR_RETURN_MSG("data_gate_error");
}
if (w == 0)
{
unsigned j = 0;
for (; j < ids.size(); j++)
{
if (id == ids[j]) break;
}
if (j < ids.size()) continue;
}
ret = gateDB.ReplaceGate(uid, id, writer.write(data[i]));
if (ret != 0)
{
error_log("[ReplaceGate fail][uid=%u,id=%u,ret=%d]",uid,id,ret);
DB_ERROR_RETURN_MSG("db_set_gate_fail");
}
}
return 0;
}
int CLogicGate::GetGateRank(unsigned uid, int gateId, Json::Value &json)
{
const vector<GateRankData>& gate = GetGateRankVec(gateId);
unsigned self = 0;
for (unsigned i = 0; i < gate.size(); i++)
{
if (gate[i].uid == uid)
{
self = i + 1;
break;
}
}
Json::Value rank;
unsigned size = gate.size() >= 11? 11 : gate.size();
rank.resize(size);
for (unsigned i = 0; i < size; i++)
{
rank[i]["uid"] = gate[i].uid;
rank[i]["best_score"] = gate[i].score;
rank[i]["name"] = gate[i].name;
rank[i]["rank"] = (i + 1);
}
json["rank"] = rank;
json["self"] = self;
return 0;
}
int CLogicGate::Load(unsigned uid, unsigned start, unsigned end, Json::Value &json)
{
if (start > end)
{
json["gate"].resize(0);
return 0;
}
if (end == 0)
end = (unsigned)-1;
CDataGate db;
vector<DataGate> datas;
int ret = db.GetGate(uid, start, end, datas);
if (ret != 0 && ret != R_ERR_NO_DATA)
{
error_log("[GetGate fail][uid=%u,ret=%d,start=%u,end=%u]",uid,ret,start,end);
DB_ERROR_RETURN_MSG("db_get_gate_fail");
}
if (ret == R_ERR_NO_DATA)
{
json["gate"].resize(0);
return 0;
}
Json::Reader reader;
json["gate"].resize(datas.size());
for (unsigned i = 0; i < datas.size(); i++)
{
if (!reader.parse(datas[i].data, json["gate"][i]))
{
error_log("[parse fail][uid=%u,i=%u,start=%u,end=%u]",uid,i,start,end);
DB_ERROR_RETURN_MSG("db_gate_data_error");
}
}
return 0;
}
const vector<GateRankData>& CLogicGate::GetGateRankVec(int gateId)
{
static vector<GateRankData> nullRank;
string gatePath = Config::GetValue(CONFIG_GATE_RAND_DIR);
if (gatePath.empty())
{
error_log("[gate rank dir error][]");
return nullRank;
}
if (gatePath[gatePath.length() - 1] != '/')
gatePath.append("/");
gatePath.append("top_").append(CTrans::ITOS(gateId)).append(".txt");
ifstream fin(gatePath.c_str());
if (!fin)
{
error_log("[read rank fail][path=%s]",gatePath.c_str());
return nullRank;
}
map<int, GateRank>::iterator it = gateRankMap.find(gateId);
bool needRead = false;
if (it == gateRankMap.end())
{
GateRank gateRankTmp;
gateRankTmp.lastReadTime = 0;
gateRankMap[gateId] = gateRankTmp;
needRead = true;
}
else
{
if (Time::GetGlobalTime() - (it->second).lastReadTime > 600)
needRead = true;
}
it = gateRankMap.find(gateId);
if (it == gateRankMap.end())
{
return nullRank;
}
if (needRead)
{
int count = 0;
(it->second).gateRankVec.clear();
string lineBuf;
while (getline(fin, lineBuf))
{
if (count >= 1000)
break;
if (lineBuf.empty())
continue;
vector<string> items;
CBasic::StringSplit(lineBuf, "\t", items);
if (items.size() < 3)
continue;
GateRankData rankData;
rankData.uid = CTrans::STOI(items[0]);
rankData.score = CTrans::STOI(items[2]);
rankData.name = items[1];
(it->second).gateRankVec.push_back(rankData);
count++;
lineBuf.clear();
}
(it->second).lastReadTime = Time::GetGlobalTime();
}
fin.close();
return (it->second).gateRankVec;
}
|
49cbe7926c5b4e20246540efd5e30d2fb501176e
|
7a882776ca41ff9978d9c2a1d24cdbbe846a6a6d
|
/YQYQY/ContainerClass/mainEntrance.cpp
|
22e6e242cf2b040fce7079ff10b0ee7f8bb389cd
|
[] |
no_license
|
yvetteyuanqin/2018summerintern_layout_optimization
|
30a26bb591dd5021f8470dd4809adf9b29e7b849
|
33e5d18f194252157a7102966ed26184e083f8b8
|
refs/heads/master
| 2020-03-27T17:17:14.290397
| 2018-08-31T04:24:29
| 2018-08-31T04:24:29
| 146,841,552
| 0
| 0
| null | null | null | null |
GB18030
|
C++
| false
| false
| 3,796
|
cpp
|
mainEntrance.cpp
|
#include <iostream>
#include <stdlib.h>
#include "ContainerClass.h"
#include "mainEntrancedll.h"
//#include "stdafx.h"
//input:inputarr 4 param: x,y,t,n
float* mainEntrance(float inputarr[][5], float fieldinfo[], char fieldname[],int itemnum){
Container::Object *initObject = NULL,*p = NULL;
/*float width = 0.0;
float length = 0.0;
float t = 0.0;
int i=0,n=0,flag=0,num=0;
*/
initObject = new Container::Object;
for(int i=0; i<itemnum; i++){
//head node
if(i==0) {
initObject->id = inputarr[i][0];
//exchange width and length if length<width
if(inputarr[i][2] < inputarr[i][1])
{
initObject->length = inputarr[i][1];
initObject->width = inputarr[i][2];
}
else
{
initObject->length = inputarr[i][2];
initObject->width = inputarr[i][1];
}
initObject->t = inputarr[i][3];
initObject->n =inputarr[i][4];
initObject->next=NULL;
continue;
}else{
p = new Container::Object;
p->id = inputarr[i][0];
if(inputarr[i][2] < inputarr[i][1])
{
p->length = inputarr[i][1];
p->width = inputarr[i][2];
}
else
{
p->length = inputarr[i][2];
p->width = inputarr[i][1];
}
//INSERT NEW NODE
p->t = inputarr[i][3];
p->n =inputarr[i][4];
p->next=initObject;
initObject = p;
}
}
#ifdef DEBUG
Container::Object *curr = initObject;
cout<<"To be loaded param:"<<endl;
while(curr!=NULL){
cout<<curr->width<<","<<curr->length<<endl;
curr = curr->next;
}
#endif
//SORT THE OBJECT BY ASCENDING ORDER
Container::objectSort(initObject);
#ifdef DEBUG
Container::Object *curr1 = initObject;
cout<<"After sorted:"<<endl;
while(curr1!=NULL){
cout<<curr1->width<<","<<curr1->length<<endl;
curr1 = curr1->next;
}
#endif
//instantiate one Container for loading one field
Container *A = new Container(fieldinfo[0],fieldinfo[1],fieldname);
int objcount =0 ;//loaded object number
//releasing mem AFTER LOADING
int flag = 1;
while(initObject&&flag>0){
if(A->Loading(initObject)){
objcount++;
}else{flag--;}
}
//2d ptr for return
float **ret = new float*[itemnum];//2d array to be returned
for(int i =0;i<itemnum;i++){
ret[i] = new float[8];//for return width,length,peried,x,y,orientation
}
A->occupyPercentage(ret);
cout<<endl;
for(int i=0;i<objcount;i++)
{
for(int j =0;j<8;j++) cout<<ret[i][j]<<"\t";
cout<<endl;
}
//while deconstructing the container, the layout info would be fetched by objects in queue
if(A) delete A;
//showing reminant objects
p = initObject;
int i=objcount;
if(p)
{
p->f=false;
cout<<"没有场地可以装下的物品:"<<endl;
while(p)
{
ret[i][2]= p->length;
ret[i][3]= p->width;
ret[i][4]= 0;//orientation of object
ret[i][5]= 0;
ret[i][6]= 0;
ret[i][7]= 0;//which period could start to put
ret[i][1]= p->f;
ret[i][0]= p->id;//loaded or not
cout<<"物品 (id:"<<p->id<<",长"<<p->length<<",宽"<<p->width<<",加工周期:"<<p->t<<')'<<endl;
//cout<<"if loaded?: "<<p->f<<endl;
initObject = p;
p = p->next;
delete initObject;
}
}
for(int i=0;i<itemnum;i++)
{
for(int j =0;j<8;j++) cout<<ret[i][j]<<"\t";
cout<<endl;
}
cout<<endl<<endl<<"Done in function"<<endl<<endl;
float* retptr = new float[itemnum*8];
//objcount counts loaded obj
for(i=0;i<itemnum;i++)
for(int j=0;j<8;j++)
retptr[i*8+j]=ret[i][j];
return retptr ;//????
}
int main(){
float in1[4][5]={{1,3,6,3,1},{2,1,4,2,1},{3,1,2,1,1},{4,2,2,2,1}};
float in2[2] ={5,4};//field info
/*float* field = new float[2];
float** inarr = new float* [sizeof(in1)];
for(int i=0;i<sizeof(in1[0]);i++){}*/
getchar();
return 1;
// mainEntrance(in1,in2,"qwerty");//return value not drawn
}
|
af35144269963a54d0dc0b4a842fa7106ef7ab45
|
11a36467170e1e9f21d34deb6f0fadf185136266
|
/src/kdtree3d.h
|
fd80d7c0c150b820548bc8583010fdc84732b540
|
[] |
no_license
|
girivallepu/SFND_Lidar_Obstacle_Detection
|
6d7b9727ff309c9d7a3e85c88e819a7de4b4b959
|
d3661a98a591116bacf339203eb4eec10310bcd6
|
refs/heads/master
| 2022-07-24T07:03:30.431631
| 2020-05-19T03:45:01
| 2020-05-19T03:45:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,369
|
h
|
kdtree3d.h
|
/* \author Giridhar V */
// Structure to represent node of kd tree for 3D
#ifndef PLAYBACK_KDTREE3D_H
#define PLAYBACK_KDTREE3D_H
#include <pcl/impl/point_types.hpp>
#include <vector>
struct Node
{
pcl::PointXYZI point;
int id;
Node* left;
Node* right;
Node(pcl::PointXYZI arr, int setId)
: point(arr), id(setId), left(NULL), right(NULL)
{}
};
struct KdTree
{
Node* root;
KdTree()
: root(NULL)
{}
void insertHelper(Node** node, uint depth, pcl::PointXYZI point, int id)
{
// when its NULL will insert
if (*node == NULL)
*node = new Node(point, id);
else
{
uint cd = depth % 3;
if (cd == 0)
{
if (point.x < ((*node)->point.x))
insertHelper(&((*node)->left), depth+1, point, id);
else
insertHelper(&((*node)->right), depth+1, point, id);
}
else if (cd == 1)
{
if (point.y < ((*node)->point.y))
insertHelper(&((*node)->left), depth+1, point, id);
else
insertHelper(&((*node)->right), depth+1, point, id);
}
else
{
if (point.z < ((*node)->point.z))
insertHelper(&((*node)->left), depth+1, point, id);
else
insertHelper(&((*node)->right), depth+1, point, id);
}
}
}
void insert(pcl::PointXYZI point, int id)
{
// the function should create a new node and place correctly with in the root
insertHelper(&root, 0, point, id);
}
void searchHelper(pcl::PointXYZI target, Node* node, int depth, float distanceTol, std::vector<int>& ids)
{
if(node!=NULL)
{
if( (node->point.x>=(target.x-distanceTol)&&node->point.x<=(target.x+distanceTol)) && (node->point.y>=(target.y-distanceTol)&&node->point.y<=(target.y+distanceTol)) && (node->point.z>=(target.z-distanceTol)&&node->point.z<=(target.z+distanceTol)))
{
float distance = sqrt((node->point.x-target.x)*(node->point.x-target.x)+(node->point.y-target.y)*(node->point.y-target.y)+(node->point.z-target.z)*(node->point.z-target.z));
if(distance <= distanceTol)
ids.push_back(node->id);
}
if (depth%3 == 0)
{
if((target.x-distanceTol)<node->point.x)
searchHelper(target, node->left, depth+1, distanceTol, ids);
if((target.x+distanceTol)>node->point.x)
searchHelper(target, node->right, depth+1, distanceTol, ids);
} else if (depth%3 == 1)
{
if((target.y-distanceTol)<node->point.y)
searchHelper(target, node->left, depth+1, distanceTol, ids);
if((target.y+distanceTol)>node->point.y)
searchHelper(target, node->right, depth+1, distanceTol, ids);
} else
{
if((target.z-distanceTol)<node->point.z)
searchHelper(target, node->left, depth+1, distanceTol, ids);
if((target.z+distanceTol)>node->point.z)
searchHelper(target, node->right, depth+1, distanceTol, ids);
}
}
}
// return a list of point ids in the tree that are within distance of target
std::vector<int> search(pcl::PointXYZI target, float distanceTol)
{
std::vector<int> ids;
searchHelper(target, root, 0, distanceTol, ids);
return ids;
}
};
#endif //PLAYBACK_KDTREE3D_H
|
b18681f3259a019f7a8ec6bdb5130c2283021e71
|
ce663984886400a68f3fec64c35726abd8cc902e
|
/TestCase/headers/game_hub.h
|
19b790674fd011ebca7bfc64adbccdfe87935e96
|
[] |
no_license
|
Jamal-Ra-Davis/RPG-Game
|
286da82f398364ec8f604b9ae2b75100da078d68
|
d72331451594ab28c11930916e528ecc41a43432
|
refs/heads/master
| 2021-01-17T17:01:53.388855
| 2015-12-10T07:48:59
| 2015-12-10T07:48:59
| 15,348,266
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 672
|
h
|
game_hub.h
|
#pragma once
#include <stdio.h>
#include <stdlib.h>
class party;
class areas;
class shop;
class inn;
class home;
class questHall;
class game_hub
{
party *Team;
areas **Dungeons;
areas *rand_dungeon;
int num_areas;
int active_areas;
shop **Shops;
int num_shops;
int active_shops;
inn *Inn;
home *Home;
questHall *Hall;
public:
game_hub();
~game_hub();
void startGame();
void newGame();
void loadGame();
void saveGame();
void gameLoop();//May change return type to int for more info
void hubMenu();
void areaMenu();
void shopMenu();
void printAreas();
void printShops();
void incrementAreas();
void incrementShops();
};
|
92bc6bb2b917d445bcab3e7057609eda20056f31
|
6758655c4a42cda705d0cf2e463ba606a9329988
|
/switch_calculator.cpp
|
59ff5a276e4095b756afc4276c1ba2d61894e81e
|
[] |
no_license
|
TristinL/C-plus-plus
|
6e9e6267253b635e608d3e84e681c0b4237380bc
|
cb0846675ed90b2d1d8176520e9c0d792658d7a4
|
refs/heads/master
| 2020-04-01T18:00:55.322995
| 2019-02-04T19:42:20
| 2019-02-04T19:42:20
| 153,465,855
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 843
|
cpp
|
switch_calculator.cpp
|
// Lets make a switch statement
#include<iostream>
using namespace std;
void calculate(int a, int b, char c);
int main(){
int a, b; //define
char c; //variables
cout<<"Enter two whole numbers:"<<endl; //obtain data from user
cin>>a>>b;
cout<<"What kind of math operation would you like done? +, -, *, /, or %"<<endl; //Obtain operator from user
cin>>c;
calculate(a, b, c); //run calculate function
}
void calculate(int a, int b, char c){ //calculate function
switch(c){ //switch statement
case '+':
cout<<a+b<<endl;
break;
case '-':
cout<<a-b<<endl;
break;
case '*':
cout<<a*b<<endl;
break;
case '/':
cout<<(a/b)<<endl;
break;
case '%':
cout<<(a%b)<<endl;
break;
default:
cout<<"Unkown operation entered"<<endl;
break;
}
}
|
0f3f17bb4ca61f23a5a6ceba3d2a64beff747351
|
3cd215a539df9fbd23b2e1c30506731bab6d0e98
|
/GameObject.cpp
|
3c3a3ed0a38de283f02086921cf41c5a8df167b1
|
[
"Zlib"
] |
permissive
|
HyruleExplorer/FORGE
|
de7848acde69f87a6a77ae72304a9e082cc81a04
|
95b29e9f810d901efa7e904e2ceed9936cef2a11
|
refs/heads/master
| 2020-05-27T20:12:24.789008
| 2015-05-10T00:50:23
| 2015-05-10T00:50:23
| 35,351,297
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,802
|
cpp
|
GameObject.cpp
|
#include "SFML/Graphics.hpp"
#include "GameObject.hpp"
#include "Game.hpp"
#include <iostream>
//Costruttore standard di un oggetto di gioco
GameObject::GameObject()
{
mTexture.loadFromFile( "visiblegameobject.png" );
mSprite.setTexture( mTexture );
mSprite.setPosition( Game::SCREEN_WIDTH /2, Game::SCREEN_HEIGHT/2 );
}
GameObject::~GameObject(){}
//Disegna l'oggetto di gioco a schermo
void GameObject::draw( sf::RenderWindow& mWindow )
{
mWindow.draw( mSprite );
}
//Ritorna la Sprite dell'Oggetti di Gioco
const sf::Sprite& GameObject::getSprite()
{
return mSprite;
}
//Ritorna la posizione dell'Oggetto di Gioco
const sf::Vector2f GameObject::getPosition()
{
return mSprite.getPosition();
}
//Imposta la posizione dell'Oggetto di Gioco ad x,y
void GameObject::setPosition( float x, float y )
{
mSprite.setPosition( x, y );
}
void GameObject::setColor( const sf::Color& mColor )
{
mSprite.setColor( mColor );
}
bool GameObject::collidedWith( const sf::Sprite& sprite )
{
if ( mSprite.getGlobalBounds().intersects( sprite.getGlobalBounds() ) )
return true;
else
return false;
}
void GameObject::IAcollision( GameObject& mGameObject_2, int mSafeZone )
{
if( collidedWith( mGameObject_2.getSprite() ) )
{
std::cout<<"COLLISION DETECTED\n";
stopMovement();
mGameObject_2.stopMovement();
if( mSprite.getPosition().y <= mGameObject_2.getPosition().y )
{
mSprite.setPosition( mSprite.getPosition().x, mGameObject_2.getPosition().y - mSafeZone );
}
else if( mSprite.getPosition().y > mGameObject_2.getPosition().y )
{
mSprite.setPosition( mSprite.getPosition().x, mGameObject_2.getPosition().y + mSafeZone );
}
if( mSprite.getPosition().x <= mGameObject_2.getPosition().x )
{
mSprite.setPosition( mGameObject_2.getPosition().x - mSafeZone, mSprite.getPosition().y );
}
else if( mSprite.getPosition().x > mGameObject_2.getPosition().x )
{
mSprite.setPosition( mGameObject_2.getPosition().x + mSafeZone, mSprite.getPosition().y );
}
}
}
void GameObject::IAstalker( GameObject& mGameObject_2, int distance )
{
if( abs( (int)mSprite.getPosition().x - (int)mGameObject_2.getPosition().x ) < distance
&& abs( (int)mSprite.getPosition().y - (int)mGameObject_2.getPosition().y ) < distance )
{
moveTowards( mGameObject_2.getSprite() );
std::cout<<"STALKER ENGAGED!\n";
}
}
void GameObject::update(){}
void GameObject::stopMovement(){}
void GameObject::getInput(){}
void GameObject::moveTowards( const sf::Sprite& sprite ){}
|
6629d39cbdfb35f36292aba7478ed41c1873d8b9
|
88ae8695987ada722184307301e221e1ba3cc2fa
|
/chrome/browser/ash/file_manager/speedometer_unittest.cc
|
83db4c9b3efe62ad7e775c48b87ab2cbf0dc91ae
|
[
"BSD-3-Clause"
] |
permissive
|
iridium-browser/iridium-browser
|
71d9c5ff76e014e6900b825f67389ab0ccd01329
|
5ee297f53dc7f8e70183031cff62f37b0f19d25f
|
refs/heads/master
| 2023-08-03T16:44:16.844552
| 2023-07-20T15:17:00
| 2023-07-23T16:09:30
| 220,016,632
| 341
| 40
|
BSD-3-Clause
| 2021-08-13T13:54:45
| 2019-11-06T14:32:31
| null |
UTF-8
|
C++
| false
| false
| 4,611
|
cc
|
speedometer_unittest.cc
|
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ash/file_manager/speedometer.h"
#include <cmath>
#include <limits>
#include "base/test/scoped_mock_clock_override.h"
#include "base/time/time.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace file_manager {
namespace io_task {
namespace {
TEST(SpeedometerTest, RemainingTime) {
base::ScopedMockClockOverride mock_clock;
Speedometer meter;
// Testing without setting the total bytes:
EXPECT_EQ(0u, meter.GetSampleCount());
EXPECT_EQ(0, meter.GetRemainingSeconds());
meter.SetTotalBytes(2000);
EXPECT_EQ(0u, meter.GetSampleCount());
EXPECT_EQ(0, meter.GetRemainingSeconds());
// 1st sample.
// 1st sample, but not enough to calculate the remaining time.
mock_clock.Advance(base::Milliseconds(11000));
meter.Update(100);
EXPECT_EQ(1u, meter.GetSampleCount());
EXPECT_EQ(0, meter.GetRemainingSeconds());
// Sample received less than 1 second after the previous one should be
// ignored.
mock_clock.Advance(base::Milliseconds(999));
meter.Update(300);
EXPECT_EQ(1u, meter.GetSampleCount());
EXPECT_EQ(0, meter.GetRemainingSeconds());
// 2nd sample, the remaining time can be computed.
mock_clock.Advance(base::Milliseconds(1));
meter.Update(300);
EXPECT_EQ(2u, meter.GetSampleCount());
EXPECT_EQ(9, round(meter.GetRemainingSeconds()));
// 3rd sample. +1 second and still only processed 300 bytes.
mock_clock.Advance(base::Milliseconds(1000));
meter.Update(300);
EXPECT_EQ(3u, meter.GetSampleCount());
EXPECT_EQ(17, round(meter.GetRemainingSeconds()));
// 4th sample, +2 seconds and still only 300 bytes.
mock_clock.Advance(base::Milliseconds(2000));
meter.Update(300);
EXPECT_EQ(4u, meter.GetSampleCount());
EXPECT_EQ(42, round(meter.GetRemainingSeconds()));
// 5th sample, +1 second and now bumped from 300 to 600 bytes.
mock_clock.Advance(base::Milliseconds(1000));
meter.Update(600);
EXPECT_EQ(5u, meter.GetSampleCount());
EXPECT_EQ(20, round(meter.GetRemainingSeconds()));
// Elapsed time should impact the remaining time.
mock_clock.Advance(base::Milliseconds(12000));
EXPECT_EQ(8, round(meter.GetRemainingSeconds()));
// GetRemainingSeconds() can return negative value.
mock_clock.Advance(base::Milliseconds(12000));
EXPECT_EQ(-4, round(meter.GetRemainingSeconds()));
}
TEST(SpeedometerTest, Samples) {
base::ScopedMockClockOverride mock_clock;
constexpr size_t kMaxSamples = 20;
Speedometer meter;
meter.SetTotalBytes(20000);
// Slow speed of 100 bytes per second.
int total_transferred = 0;
for (size_t i = 0; i < kMaxSamples; i++) {
EXPECT_EQ(i, meter.GetSampleCount());
mock_clock.Advance(base::Milliseconds(1000));
total_transferred = i * 100;
meter.Update(total_transferred);
}
EXPECT_EQ(kMaxSamples, meter.GetSampleCount());
EXPECT_EQ(181, round(meter.GetRemainingSeconds()));
// +200 to make it compatible with the values in the unittest in the JS
// version.
const int initial_transferred_bytes = total_transferred + 200;
// Faster speed of 300 bytes per second.
for (size_t i = 0; i < kMaxSamples; i++) {
// Check buffer not expanded more than the specified length.
EXPECT_EQ(kMaxSamples, meter.GetSampleCount());
mock_clock.Advance(base::Milliseconds(1000));
total_transferred = initial_transferred_bytes + (i * 300);
meter.Update(total_transferred);
// Current speed should be seen as accelerating, thus the remaining time
// decreasing.
EXPECT_GT(181, meter.GetRemainingSeconds());
}
EXPECT_EQ(kMaxSamples, meter.GetSampleCount());
EXPECT_EQ(41, round(meter.GetRemainingSeconds()));
// Stalling.
for (size_t i = 0; i < kMaxSamples; i++) {
// Check buffer not expanded more than the specified length.
EXPECT_EQ(kMaxSamples, meter.GetSampleCount());
mock_clock.Advance(base::Milliseconds(1000));
meter.Update(total_transferred);
}
// The remaining time should increase from the previous value.
EXPECT_LT(41, round(meter.GetRemainingSeconds()));
// When all samples have the same value the remaining time goes to inifity,
// because the Linear Interpolation expects an inclination/slope, but with all
// values the same, it becomes a horizontal line, meaning that the bytes will
// never grow towards the total bytes.
EXPECT_EQ(std::numeric_limits<double>::infinity(),
meter.GetRemainingSeconds());
}
} // namespace
} // namespace io_task
} // namespace file_manager
|
b58af3d25597d761e4a761cde656862147ab9b22
|
caf70632c7b221430a5f8d3db80e651433857305
|
/SaliencyPainterlyRendering/formatstring.h
|
93ff35e00988ac8fe21aa66362529e6a66ed6f9d
|
[] |
no_license
|
lee3213/dev_dec
|
ab2efb129797b1c454d37afc3db63af7f3267888
|
1230634f0215fd156e96de06ca4832a7416778f4
|
refs/heads/master
| 2020-04-09T17:20:39.245326
| 2018-12-05T11:26:33
| 2018-12-05T11:26:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 152
|
h
|
formatstring.h
|
#pragma once
#include <string>
#include <stdarg.h>
std::string format(const char *fmt, ...);
std::string format_arg_list(const char *fmt, va_list args);
|
6eafb7b951a1079671bc23de192210546ee5c4df
|
e2cc28e162f14551f189390c0896b0334b29eaba
|
/the_concepts_and_practice_of_math_fin/Project11/ProjectB_13/test_log_normality/products.h
|
1924b36112757b106173fadfa9774c5533b85f76
|
[
"MIT"
] |
permissive
|
calvin456/intro_derivative_pricing
|
3f3cf4f217e93377a7ade9b9a81cd8a8734177a7
|
0841fbc0344bee00044d67977faccfd2098b5887
|
refs/heads/master
| 2021-01-10T12:59:32.474807
| 2016-12-27T08:53:12
| 2016-12-27T08:53:12
| 46,112,607
| 8
| 5
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,126
|
h
|
products.h
|
//products.h
#ifndef PRODUCTS_H
#define PRODUCTS_H
#include <vector>
using namespace std;
struct CashFlow{
double time;
double amount;
};
//abstract base class
class BGMProducts{
public:
BGMProducts(const std::vector<double>& times_, double Strike_);
virtual ~BGMProducts(){}
void setStrike(double Strike_);
virtual std::vector<double> GetUnderlyingTimes() const = 0;
virtual std::vector<double> GetEvolutionTimes() const = 0;
virtual void reset() = 0;
virtual bool DoNextStep(const std::vector<double>& fwd_rtes, std::vector<CashFlow>& cf) = 0;
protected:
std::vector<double> times;
double Strike;
unsigned long M;
};
class Swaption :public BGMProducts{
//European swaption
public:
Swaption(const std::vector<double>& times_, double Strike_);
virtual ~Swaption(){}
virtual std::vector<double> GetUnderlyingTimes() const;
virtual std::vector<double> GetEvolutionTimes() const;
virtual void reset(){}
virtual bool DoNextStep(const std::vector<double>& fwd_rtes, std::vector<CashFlow>& cf);
private:
};
class TriggerSwap :public BGMProducts{
//A swap-based trigger swap which at each stage knocks-out
//if the swap-rate for the remaining times is above a ref rate,
//and otherwise is a swap at strike
//up-and-out. In the book, p.325 up-and-in instead
public:
TriggerSwap(const std::vector<double>& times_, double Strike_, double ref_rate_);
virtual ~TriggerSwap(){}
void set_i(unsigned long a);
virtual std::vector<double> GetUnderlyingTimes() const;
virtual std::vector<double> GetEvolutionTimes() const;
virtual void reset();
virtual bool DoNextStep(const std::vector<double>& fwd_rtes, std::vector<CashFlow>& cf);
private:
double ref_rate;
unsigned long _i_;
};
class Caplet : public BGMProducts{
//call option on fwd libor rate - 1st rate
public:
Caplet(const std::vector<double>& times_, double Strike_);
virtual ~Caplet(){}
std::vector<double> GetUnderlyingTimes() const;
std::vector<double> GetEvolutionTimes() const;
virtual void reset(){}
virtual bool DoNextStep(const std::vector<double>& fwd_rtes, std::vector<CashFlow>& cf);
private:
};
#endif
|
a31dc72e348b8c239194a26b5d01aa37936f7b77
|
16b4d1402286d8553442f9f033ef1e4460881c52
|
/2 курс/3 семестр/ООП 7/7.cpp
|
0f04a38dbf078b8711e39c12efdc7d33db7a65c0
|
[] |
no_license
|
IlyaDzh/SevSU
|
4725df428e5ff4506e317904e93fbaf559ec2580
|
305afe1809278d4f8a57fd90fd9b2535dd7447c1
|
refs/heads/master
| 2021-08-10T05:48:00.342476
| 2021-06-24T13:02:11
| 2021-06-24T13:02:11
| 193,796,303
| 0
| 2
| null | null | null | null |
WINDOWS-1251
|
C++
| false
| false
| 1,384
|
cpp
|
7.cpp
|
#include <iostream>
#include <fstream>
#include <iomanip>
using namespace std;
class vector
{
public:
int size, v;
float *vec;
vector(int _size)
{
vec = new float [size=_size];
}
~vector()
{
delete [] vec;
}
void vvod_vec()
{
for(int i=0; i<size; i++)
{
cout <<"Введите значения вектора ["<<i+1<<"]: ";
try
{
if(!(cin >> vec[i])) throw 1;
}
catch(int)
{
cin.clear();
while(cin.get()!='\n') continue;
cout<<" Введите число: "; cin>>vec[i];
}
}
}
void vivod()
{
for(int i=0; i<size; i++)
{
cout <<"Значения вектора ["<<i+1<<"]: "<<vec[i]<<endl;
}
}
};
int main()
{
setlocale(0, "rus");
double a, b;
ofstream fout("1.txt");
cout<<"1 задание:"<<endl;
cout<<"Введите a: "; cin>>a;
cout<<"Введите b: "; cin>>b;
double x = (-b)/a;
if (a==0)
{
if (b==0) fout<<"X - любое число";
else fout<<setfill('%')<<setw(12)<<"Решений нет";
}
else
{
fout.fill ('%'); fout.width (12);
fout<<"x="<<setprecision(4)<<x<<endl;
}
cout<<"Результат в файле!"<<endl;
fout.close();
cout<<"\n2 задание:"<<endl;
vector ob(4);
ob.vvod_vec();
ob.vivod();
return 0;
}
|
686ca6d958729bd9000d039c8c9c441697b0fd3d
|
45d03d5ed27ac010c041a567da147ccc3591d13d
|
/string matching/all.cpp
|
a920313f4dfab6170631d0cf591c8f5454516b36
|
[] |
no_license
|
achallion/cpptopics
|
30198e89343ceafb564c7100cef52c1c6988a311
|
4199e56f95f9263b5b6f810900b44e1437d5f372
|
refs/heads/master
| 2023-07-07T04:20:17.989745
| 2023-06-28T07:01:02
| 2023-06-28T07:01:02
| 218,488,647
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,181
|
cpp
|
all.cpp
|
#include <bits/stdc++.h>
using namespace std;
int countnaivematch(string &str, string &pat)
{
int count = 0;
for (int i = 0; i < str.size(); i++)
{
if (str[i] == pat[0])
{
int k = i;
for (int j = 0; j < pat.size(); j++)
{
if (str[k] != pat[j])
{
break;
}
if (j == pat.size() - 1)
{
count++;
}
k++;
}
}
}
return count;
}
int countrabinmatch(string &str, string &pat)
{
int count = 0;
if (str.size() < pat.size())
{
return 0;
}
int path = 0, strh = 0;
bitset<1> cond;
cond.set();
for (int i = 0; i < pat.size(); i++)
{
path += pat[i];
strh += str[i];
if (str[i] != pat[i])
{
cond[0] = 0;
}
}
if (cond[0] == 1)
{
count++;
}
int j = pat.size() - 1;
for (int i = 1; i < str.size() - pat.size() + 1; i++)
{
j++;
strh -= str[i - 1];
strh += str[j];
if (path == strh)
{
cond[0] = true;
for (int k = 0; k < pat.size(); k++)
{
if (pat[k] != str[i + k])
{
cond[0] = false;
}
}
if (cond[0] == true)
{
count++;
}
}
}
return count;
}
int kmp(string &str, string &pat)
{
// make reset table
int pl = pat.size();
int sl = str.size();
vector<int> res(pl);
res[0] = -1;
int j = -1;
// kkkkkk
for (int i = 1; i < pl; i++)
{
j++;
res[i] = j;
while (j >= 0 && pat[i] != pat[j])
{
j = res[j];
}
}
// do kmp
for (int i = 0; i < sl; i++)
{
}
}
int main()
{
string str, pat;
cin >> str;
cin >> pat;
cout << "\n"
<< countnaivematch(str, pat);
cout << "\n"
<< countrabinmatch(str, pat);
cout << "\n"
<< kmp(str, pat);
return 0;
}
|
3f77acd779e508d63f527d9fa2ba54d6b9809506
|
699d5b3ce9d9f625b244b4c1d6c05772403e3d80
|
/HW1/HW1_1/HW1_1.cpp
|
651ad1c383a045f40396c7e3a50796a714923ab3
|
[] |
no_license
|
david11014/OOPHW
|
6968745e649640943beace3780dce680fe6c1e3b
|
65579c613d9f041a2796b93bf090e6f910f7f86a
|
refs/heads/master
| 2021-09-05T01:48:20.850620
| 2018-01-23T15:13:12
| 2018-01-23T15:13:12
| 105,860,359
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,277
|
cpp
|
HW1_1.cpp
|
/*******************************************************
NCKU Department of Mechanical engineering OOP Homework 1
Write by david1104
github: https://github.com/david11014
********************************************************/
#include <iostream>
#include <fstream>
#include "K_DTree.h"
//#define DEBUG
#define TR_SIZE 100
#define TES_SIZE 20
using namespace std;
Point2D Find(Point2D P, Point2D *trainP, int n)
{
double D = DBL_MAX;
int I;
for (int i = 0; i < n; i++)
{
if (P.Distant(trainP[i]) < D)
{
D = P.Distant(trainP[i]);
I = i;
}
}
return trainP[I];
}
int main()
{
Point2D trainP[TR_SIZE], testP[TES_SIZE];
/*Read train file and test file*/
ifstream trainFile,testFile;
ofstream outFile;
outFile.open("test-result-1.txt");
trainFile.open("train-data.txt");
testFile.open("test-data.txt");
if (trainFile.is_open())
{
cout << "Open train data" << endl;
for (int i = 0; i < TR_SIZE; i++)
{
trainFile >> trainP[i].x;
trainFile >> trainP[i].y;
trainFile >> trainP[i].l;
//cout << trainP[i].x << " " << trainP[i].y << " " << trainP[i].l << endl;
}
cout << "Done load train data" << endl;
}
if (testFile.is_open())
{
cout << "Open test data" << endl;
for (int i = 0; i < TES_SIZE; i++)
{
testFile >> testP[i].x;
testFile >> testP[i].y;
testFile >> testP[i].l;
//cout << testP[i].x << " " << testP[i].y << " " << testP[i].l << endl;
}
cout << "Done load test data" << endl;
}
//init K-D tree
KDTree trainTree(trainP,TR_SIZE);
cout << "train done" << endl;
cout << "find label" << endl;
for (int i = 0; i < TES_SIZE; i++)
{
Point2D TP = Find(testP[i], trainP, TR_SIZE);
Point2D P = trainTree.FindNear(testP[i]);
#ifdef DEBUG
cout << P << " "<< P.l + testP[i].l << endl;
outFile << P << "\t" << P.l + testP[i].l << endl;
#else
cout << P << endl;
outFile << P << endl;
#endif
}
//Point2D t(101.59737233216403, 35.7351346943152, -1);
//Point2D P = trainTree.FindNear(t);
//Point2D TP = Find(t, trainP, TR_SIZE);
//cout << t << endl;
//cout << P << " " << P.Distant(t) << endl;
//cout << TP << " " << TP.Distant(t) << endl;
//cout << "all done." << endl;
//outFile.close();
//trainFile.close();
//testFile.close();
getchar();
return 0;
}
|
523d277b4a68eb5364c074b0859a4243b6c1afc0
|
18a2d0c6279543e4936245787e96b078bc99f678
|
/src/Event.cpp
|
914ab1fd85db06eadcbe9183c6b01af49a7d5fc0
|
[] |
no_license
|
diegobaronm/Agenda
|
b708727f6490001a0a0d90f88e0b98ae83c7597e
|
587b5632987143a14b62477d9901e6819b1177e2
|
refs/heads/master
| 2023-05-07T06:15:47.161024
| 2021-05-29T12:08:02
| 2021-05-29T12:08:02
| 361,944,110
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,960
|
cpp
|
Event.cpp
|
#include"DataBase.hpp"
#include"Event.hpp"
#include<sqlite3.h>
void Event::Add_Task(MainTask* task){
task->Set_eID(Event_ID);
Tasks.emplace_back(task);
}
void Event::Remove_Task(int id){
auto it=Tasks.begin();
for(auto it=Tasks.begin();it!=Tasks.end();it++){
if((*it)->Get_ID()==id){break; }
}
Tasks.erase(it);
}
std::ostream & operator<<(std::ostream &os, const Event &event){
os<<"-----------------> Event"<<" [ID:"<<event.Event_ID<<"] <----------------------" <<std::endl<<std::endl<<"Date: "<<event.Date<<std::endl<<"Comment: "<<event.Comment<<std::endl<<std::endl;
if (event.Tasks.empty()){os<<"No tasks!"<<std::endl;}
else {
std::cout<<"Tasks:"<<std::endl;
for(size_t i=0; i<event.Tasks.size();i++){
event.Tasks.at(i)->print();
}
}
return os;
}
std::istream & operator>>(std::istream &is, Event& event){
std::cin.ignore();
std::cout<<"Enter date: ";
std::string date;
std::getline(is,date);
event.Set_Date(date);
std::cout<<"Enter comment: ";
std::string description;
std::getline(is,description);
event.Set_Comment(description);
return is;
}
std::string Event::Generate_SQL_Query(){
std::string query{"INSERT INTO Events VALUES("};
query = query+std::to_string(Event_ID)+","+"'"+Date+"'"+","+"'"+Comment+"');";
return query;
}
std::vector<Event> Fill(std::vector<Event> &E,std::string database){
sqlite3 *db;
std::string query = "SELECT * FROM Events";
if (sqlite3_open(const_cast<char*>(database.c_str()), &db)!=SQLITE_OK) {
std::cerr << "Could not open database.\n";
}
std::vector<std::vector<std::string>> records = select_stmt(const_cast<char*>(query.c_str()),db);
sqlite3_close(db);
std::vector<Event> objects;
for (auto& record : records) {
objects.push_back(Event(record.at(1),record.at(2),std::stoi(record.at(0))));
}
return objects;
}
|
a6aa5550f22f1d3b2e5a7d2dc890e957d9542904
|
4447dacbb9fbdff5bccd9438a19a7376883185d0
|
/Yamanote/DataBase.h
|
22101e5aff572d69565c3ae242092d04174fa2ee
|
[] |
no_license
|
sep-inc/campus_202009_matsui
|
73bf99131ab48219d01b6bb2d519ecb45352d059
|
1683d55c7eea8cdfe342911ca432d96267be8625
|
refs/heads/master
| 2023-01-14T06:27:37.986458
| 2020-11-18T06:12:33
| 2020-11-18T06:12:33
| 292,440,615
| 0
| 0
| null | null | null | null |
SHIFT_JIS
|
C++
| false
| false
| 1,766
|
h
|
DataBase.h
|
#ifndef DATABASE_H_
#define DATABASE_H_
#define STATION_NUM 29 //駅の数
#define START_STATION 0 //最初の駅
#define CENTER_LANE_TIME 12 //中央線のかかる時間
#define CENTER_START_STATION 1 //中央線乗り換え駅(時計回りで見ているため神田が最初)
#define CENTER_END_STATION 14 //中央線乗り換え駅(時計回りで見ているため新宿が最後)
/* 駅の情報 */
struct StationInfo
{
char station[64]; //駅名
__int8 Spin; //左右駅の移動時間
};
class DataBase
{
public:
/* 初期化 */
DataBase() :m_start_station(0), m_end_station(0)
{}
~DataBase() {}
void StepChange(); //ステップ処理
void Input(); //入力処理
void Caluculation(); //計算処理
void SearchName(); //駅名検索
__int8 RightRoteValue(__int8 start_, __int8 end_); //時計回り計算処理
__int8 LeftRoteValue(__int8 start_, __int8 end_); //反時計回り計算処理
__int8 CenterLaneRoteValue(__int8 station_); //中央線ありの計算処理
__int8 Comparison(); //最短時間比較(戻り値:最短時間)
void SetTotalValue(); //値わたし関数
private:
char input_start_station[64]; //駅名入力用
char input_end_station[64]; //駅名入力用
__int8 m_start_station; //駅名番号保存用
__int8 m_end_station; //駅名番号保存用
struct RoteValue
{
__int8 m_right_total_value; //右回り合計値
__int8 m_left_total_value; //左回り合計値
__int8 m_total_first_yamanote; //end〜中央線までの早い時間を保存
__int8 m_total_first_value; //end〜中央線までの早い時間を保存
}m_rotevalue;
};
#endif
|
d8607025328319b9954c78fc1a616d6c19ab7ef3
|
21c8ef855af2879dcac8dad6614b204bb2a4d3f8
|
/0/U
|
5db259818e7c38527d6077dcd761b14a2b54aef0
|
[] |
no_license
|
kotyak4/test-plane-oscilation
|
5be66d7c5ea364b65a95dc12565356f9436d52a5
|
90af82998d803254caf4a3c0330b2f896b94ed62
|
refs/heads/master
| 2021-07-13T13:18:35.244957
| 2017-10-17T19:55:49
| 2017-10-17T19:55:49
| 107,317,111
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,580
|
U
|
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.0.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
TOP
{
type freestream;
freestreamValue uniform (0 0 0);
}
BOT
{
type freestream;
freestreamValue uniform (0 0 0);
}
PLANE
{
type testFixedValue;
refValue uniform (0 0 1);
value uniform (0 0 1);
offset (0 0 0);
amplitude 2.5E-3;
frequency 0.08;
}
LEFT
{
type freestream;
freestreamValue uniform (0 0 0);
}
RIGHT
{
type freestream;
freestreamValue uniform (0 0 0);
}
SYMM
{
type empty;
}
}
// ************************************************************************* //
|
|
f44ca85f076526b90a0b21e1e37e86f6a54fd6f2
|
a5cf5390222727417aeaa7a2a3927cfaf9022ea6
|
/internal/packed_gamma_file3.hpp
|
093af3f1fa0a68cfb61e6f5ac4403e785177c434
|
[] |
no_license
|
nicolaprezza/Re-Pair
|
7ca97024aceb732dce92d605a403f7c2a42bb053
|
ffb411d8ce9c1232980ec67bee7e678c0b88fd5c
|
refs/heads/master
| 2021-01-12T00:30:35.564187
| 2017-04-06T16:20:16
| 2017-04-06T16:20:16
| 78,733,925
| 13
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 16,260
|
hpp
|
packed_gamma_file3.hpp
|
/*
* packed_gamma_file3.hpp
*
* Created on: Feb 15, 2017
* Author: nico
*
* read/write integers in packed form in/from a file
*
*/
#ifndef INTERNAL_PACKED_GAMMA_FILE3_HPP_
#define INTERNAL_PACKED_GAMMA_FILE3_HPP_
#include <cassert>
#include <vector>
#include <fstream>
using namespace std;
#endif /* INTERNAL_PACKED_GAMMA_FILE3_HPP_ */
template<typename itype = uint32_t, uint64_t block_size = 6>
class packed_gamma_file3{
public:
/*
* constructor
*
* input: file name and flag indicating whether file is used in write mode (true) or read mode (false)
*
*/
packed_gamma_file3(string filename, bool write = true){
this->write = write;
if(write){
out = ofstream(filename, std::ios::binary);
}else{
in = ifstream(filename, std::ios::binary);
//read file into the bitvector bits
fill_bits();
fill_buffer();
}
lower_bound_bitsize = 0;
actual_bitsize = 0;
}
/*
* append integer x in packed form to the file
*/
void push_back(uint64_t x){
assert(write);
buffer.push_back(x);
if(buffer.size()%block_size == 0){
uint8_t max_bitsize = 0;
for(uint64_t i=buffer.size()-block_size;i<buffer.size();++i){
max_bitsize = std::max(max_bitsize,wd(buffer[i]));
}
blocks_bitsizes.push_back(max_bitsize);
}
lower_bound_bitsize += wd(x);
}
/*
* read next integer from file.
* After EOF is reached, returns always 0
*/
uint64_t read(){
assert(not write);
if(eof()) return 0;
return buffer[idx_in_buf++];
}
/*
* return true if there are no more characters to be read from the file
*/
bool eof(){
assert(not write);
return idx_in_buf >= buffer.size();
}
/*
* close file: must be called when there are no more integers to be written.
* this function compresses the content of buffer and saves it to file
*/
void close(){
assert(write);
//in this case we did not compute last bitsize
if(buffer.size()%block_size != 0){
uint8_t max_bitsize = 0;
for(uint64_t i=(buffer.size()/block_size)*block_size;i<buffer.size();++i){
max_bitsize = std::max(max_bitsize,wd(buffer[i]));
}
blocks_bitsizes.push_back(max_bitsize);
}
flush_to_file();
out.close();
}
uint64_t written_bytes(){
return actual_bitsize/8;
}
uint64_t lower_bound_bytes(){
return lower_bound_bitsize/8;
}
/*
* return % of overhead of the number of bits saved to file w.r.t.
* the cumulated bitlengths of the stored integers
*/
double overhead(){
return 100*double(actual_bitsize-lower_bound_bitsize)/lower_bound_bitsize;
}
/*
* input: alphabet encoding A (ascii -> integers in {0,...,|A|-1}), grammar G (pairs) and compressed text T
*
* compress G and T and store them to file
*
* compression techniques:
*
* - the maximums of G's pairs form M increasing sequences; we compress them with gamma encoding
* - |G| bits to remember who was the max in each pair
* - M starting values for the M increasing sequences
* - gap-encoded bitvector to store the beginnings of the M increasing sequences
* - the minimums are stored without compression
*
* - TOTAL SIZE: A log A + G log G + G + 2M log (G/M) + G log M bits
*
*/
void compress_and_store(vector<itype> & A, vector<pair<itype,itype> > & G, vector<itype> & T){
//store A
push_back(A.size());
for(auto a : A) push_back(a);
//store G
vector<itype> deltas; //deltas between the pair's maximums
vector<itype> starting_values; //starting values of each increasing sequence
vector<itype> deltas_starting_points; //starting values of each increasing sequence
vector<itype> deltas_minimums; //maximums - minimums
vector<bool> max_first; //the max is the first in the pair. If false, the min is the first in the pair
uint64_t last_max = 0;
uint64_t last_incr_seq = 0; //index of last pair that started an increasing sequence
uint64_t i = 0;//pair number
for(auto ab: G){
max_first.push_back(ab.first >= ab.second);
uint64_t max = std::max(ab.first,ab.second);
uint64_t delta_min = max - std::min(ab.first,ab.second);
deltas_minimums.push_back(delta_min);
if(max>=last_max){
deltas.push_back(max-last_max);
}else{
//i-th pair starts a new increasing seq
starting_values.push_back(max);
deltas_starting_points.push_back(i-last_incr_seq);
last_incr_seq = i;
}
last_max = max;
i++;
}
push_back(deltas.size()); for(auto x:deltas) push_back(x);
push_back(starting_values.size());for(auto x:starting_values) push_back(x);
push_back(deltas_starting_points.size());for(auto x:deltas_starting_points) push_back(x);
push_back(deltas_minimums.size());for(auto x:deltas_minimums) push_back(x);
push_back(max_first.size());for(auto x:max_first) push_back(x);
//store T
push_back(T.size());
for(auto a : T) push_back(a);
close();
auto wr = written_bytes()*8;
/*
* statistics
*/
uint64_t g = G.size();
uint64_t t = T.size();
uint64_t s = A.size();
uint64_t log_s = (64 - __builtin_clzll(uint64_t(A.size())));
uint64_t log_g = (64 - __builtin_clzll(uint64_t(g)));
uint64_t log_gs = (64 - __builtin_clzll(uint64_t(g+A.size())));
double min_bits_rule = (double(log_g)+0.557);
auto bits_per_rule = double(wr - log_gs*t)/g;
double inf_min = g*min_bits_rule + t*log_gs + s*log_s;
cout << "Compressed file size : " << wr/8 << " Bytes" << endl;
cout << "Grammar size : g = " << g << " rules" << endl;
cout << "Number of characters in the final text : t = " << t << endl;
cout << "log_2 g = " << log_g << endl;
cout << starting_values.size() << " increasing sequences" << endl << endl;
cout << "information-theoretic minimum number of bits per alphabet character (log(sigma)) = " << log_s << endl;
cout << "information-theoretic minimum number of bits per rule (log g + 0.557) = " << min_bits_rule << endl;
cout << "information-theoretic minimum number of bits per final text character (log(g+sigma)) = " << log_gs << endl;
cout << "information-theoretic minimum number of bits to store the compressed file (grammar+text+alphabet) = " << inf_min << endl;
cout << "compression rate of grammar+text+alphabet (100*actual bitsize/information-theoretic minimum) = " << 100*double(wr)/double(inf_min) << " %" << endl;
cout << "Overhead w.r.t. bitsize of stored integers (prefix encoding): " << overhead() << "%" << endl;
}
/*
* inverse of function compress_and_store_2(...)
*
* input arrays are overwritten with content of file
*
*/
void read_and_decompress(vector<itype> & A, vector<pair<itype,itype> > & G, vector<itype> & T){
//empty arrays
A = {};
G = {};
T = {};
//read A
assert(not eof());
auto A_size = read();
//fill A
for(int i=0;i<A_size;++i) A.push_back(read());
//store G
vector<itype> deltas; //deltas between the pair's maximums
vector<itype> starting_values; //starting values of each increasing sequence
vector<itype> deltas_starting_points; //starting values of each increasing sequence
vector<itype> deltas_minimums; //maximums - minimums
vector<bool> max_first; //the max is the first in the pair. If false, the min is the first in the pair
uint64_t last_max = 0;
uint64_t last_incr_seq = 0; //index of last pair that started an increasing sequence
uint64_t i = 0;//pair number
uint64_t size;
size = read(); for(uint64_t i=0;i<size;++i) deltas.push_back(read());
size = read(); for(uint64_t i=0;i<size;++i) starting_values.push_back(read());
size = read(); for(uint64_t i=0;i<size;++i) deltas_starting_points.push_back(read());
size = read(); for(uint64_t i=0;i<size;++i) deltas_minimums.push_back(read());
size = read(); for(uint64_t i=0;i<size;++i) max_first.push_back(read());
size = read(); for(uint64_t i=0;i<size;++i) T.push_back(read());
//now retrieve G from the above vectors
uint64_t idx_in_deltas=0;
uint64_t idx_in_starting_values=0;
uint64_t idx_in_deltas_starting_points=0;
uint64_t last_delta_starting_point = 0;
for(uint64_t i = 0;i<max_first.size();++i){
uint64_t max;
uint64_t min;
if(idx_in_deltas_starting_points < deltas_starting_points.size() && i == last_delta_starting_point + deltas_starting_points[idx_in_deltas_starting_points]){
//starts a new increasing seq
last_delta_starting_point = i;
max = starting_values[idx_in_starting_values++];
idx_in_deltas_starting_points++;
}else{
max = last_max + deltas[idx_in_deltas++];
}
last_max = max;
min = max - deltas_minimums[i];
if(max_first[i])
G.push_back({max,min});
else
G.push_back({min,max});
}
}
private:
void flush_to_file(){
//first, write number of integers in the file
flush_gamma_integer(buffer.size());
auto bitsizes = blocks_bitsizes;//store copy
assert(blocks_bitsizes.size()==(buffer.size()/block_size) + (buffer.size()%block_size != 0));
//delta-encode bitsizes
delta_encode(blocks_bitsizes);
//run-length encode the deltas
auto R = run_length_encode(blocks_bitsizes);
//most of the runs have length 1, so run-length encode lengths of runs
auto R2 = run_length_encode(R.first);
//store R's size to file (number of runs)
flush_gamma_integer(R.second.size());
//store R run heads to file
for(auto x:R.second) flush_gamma_integer(x);
//store R2's size to file (number of runs)
flush_gamma_integer(R2.second.size());
//store R2 run lengths to file
for(auto x:R2.first) flush_gamma_integer(x);
//store R2 run heads to file
for(auto x:R2.second) flush_gamma_integer(x);
//flush all integers using bitsize of their block
for(uint64_t i=0;i<buffer.size();++i) flush_binary_integer(buffer[i],bitsizes[i/block_size]);
flush_bits();
}
/*
* replace content of V with the deltas of its consecutive elements,
* encode each delta with function f (so that final values are
* all > 0)
*/
void delta_encode(vector<itype> & V){
int x = 0;//last integer
for(uint64_t i=0;i<V.size();++i){
int temp = V[i];
V[i] = f(int(V[i])-x);
x = temp;
}
}
/*
* inverse of delta_encode
*/
void delta_decode(vector<itype> & V){
assert(V.size()>0);
assert(f_1(V[0]) > 0);//first delta cannot be negative
V[0] = f_1(V[0]);
for(uint64_t i=1;i<V.size();++i){
//result cannot be <= 0
assert(int(V[i-1]) + f_1(V[i])>0);
V[i] = int(V[i-1]) + f_1(V[i]);
}
}
/*
* input: vector of integers
* output: two vectors storing lengths of runs and run heads
*/
pair<vector<itype>, vector<itype> > run_length_encode(vector<itype> & V){
pair<vector<itype>, vector<itype> > R;
itype l = 1;
itype n = 0;
for(itype i=0;i<V.size();++i){
if(i == V.size()-1 || V[i] != V[i+1]){
R.first.push_back(l);
R.second.push_back(V[i]);
n+=l;
l = 1;
}else{
++l;
}
}
assert(n == V.size());
return R;
}
vector<itype> run_length_decode(vector<itype> & L, vector<itype> & H){
assert(L.size() == H.size());
vector<itype> V;
for(uint64_t i = 0;i<L.size();++i){
for(uint64_t j=0;j<L[i];++j){
V.push_back(H[i]);
}
}
return V;
}
/*
* read from bits next gamma code and advance idx_in_bits accordingly
*/
uint64_t read_next_gamma(){
//if next bits are not a full gamma code, read more bits from file
assert(is_next_code_complete());
auto len = next_gamma_length();
//prefix of zeros
auto prefix = (len - 1)/2;
idx_in_bits += prefix;
return read_next_int(prefix+1);
}
/*
* read from bits next w-bits integer and advance idx_in_bits accordingly
*/
uint64_t read_next_int(uint64_t w){
assert(idx_in_bits + w <= bits.size());
uint64_t x = 0;
for(int i = 0;i<w;++i){
x |= ( uint64_t(bits[idx_in_bits++]) << ((w-i)-1) );
}
return x;
}
/*
* read all bytes from file and store their bits in bitvector bits
*/
void fill_bits(){
//first of all, delete from bits all bits that have already been read
assert(idx_in_bits==0);
while(not in.eof()){
uint8_t x;
in.read((char*)&x,1);
//push back bits of x in vector bits
for(int j=0;j<8;++j) bits.push_back( (x>>(7-j)) & uint8_t(1) );
}
}
/*
* decode the content of bits and store the integers to buffer
*/
void fill_buffer(){
assert(buffer.size()==0);
//number of integers stored in the file
uint64_t n = read_next_gamma();
//number of stored bit-sizes
uint64_t n_blocks = (n/block_size) + (n%block_size!=0);
//number of R's runs
uint64_t R_size = read_next_gamma();
vector<itype> R_heads;
for(itype r = 0;r<R_size;++r) R_heads.push_back(read_next_gamma());
//number of R2's runs
itype R2_size = read_next_gamma();
vector<itype> R2_lengths;
for(itype r = 0;r<R2_size;++r) R2_lengths.push_back(read_next_gamma());
vector<itype> R2_heads;
for(itype r = 0;r<R2_size;++r) R2_heads.push_back(read_next_gamma());
vector<itype> R_lengths = run_length_decode(R2_lengths,R2_heads);
vector<itype> V = run_length_decode(R_lengths,R_heads);
assert(V.size() == n_blocks);
delta_decode(V);
//now read n integers
for(itype i=0;i<n;++i){
buffer.push_back(read_next_int(V[i/block_size]));
}
}
/*
* return length of the next gamma code
*/
uint64_t next_gamma_length(){
uint64_t i = idx_in_bits;
//count how many 0 are prefixing bits[idx_in_bits, ...]
while(i<bits.size() && bits[i]==0) i++;
auto zeros = i - idx_in_bits;
return 2*zeros + 1;
}
/*
* is the code prefixing bits[idx_in_bits, ...] a complete gamma code?
*/
bool is_next_code_complete(){
return (bits.size() - idx_in_bits) >= next_gamma_length();
}
/*
* flush to bitvector bits the bit-representation of gamma(x)
*/
void flush_gamma_integer(uint64_t x){
for(auto b:gamma(x)) bits.push_back(b);
}
/*
* flush to bitvector bits the bit-representation of gamma(x)
*/
void flush_binary_integer(uint64_t x, uint64_t w = 0){
for(auto b:binary(x,w)) bits.push_back(b);
}
//flush bits to file. A padding of 0s is added so that the size is a multiple of 8
void flush_bits(){
//add padding
while(bits.size()%8!=0) bits.push_back(0);
int n = bits.size();
int i = 0;
uint8_t x = 0;
for(auto b : bits){
x |= (uint8_t(b) << (7-i));
if(i==7){ //we just pushed last bit of a Byte
out.write((char*)&x,1);
x = 0;
actual_bitsize += 8;
}
i = (i+1)%8;
}
}
/*
* bit-width of x
*/
uint8_t wd(uint64_t x){
auto w = 64 - __builtin_clzll(uint64_t(x));
return x == 0 ? 1 : w;
}
/*
* return gamma encoding of x
*/
vector<bool> gamma(uint64_t x){
assert(x>0);
auto w = wd(x);
vector<bool> code;
//append w-1 zeros
for(int i=0;i<w-1;++i) code.push_back(false);
//append binary code of x using w bits
for(bool b : binary(x,w)) code.push_back(b);
return code;
}
/*
* return w-bits binary code of x. If w is not specified, the bitsize of x is used.
*/
vector<bool> binary(uint64_t x, uint64_t w = 0){
assert(w==0 || w>= wd(x));
w = w == 0 ? wd(x) : w;
vector<bool> code;
for(int i=0;i<w;++i) code.push_back( (x>>((w-i)-1)) & uint64_t(1) );
return code;
}
/*
* maps small signed integers to small nonzero unsigned integers:
*
* 0 -> 1
* -1 -> 2
* 1 -> 3
* -2 -> 4
* 2 -> 5
* -3 -> 6
* 3 -> 7
*
* ...
*
*/
uint16_t f(int x){
return x>=0 ? 2*x+1 : (-x)*2;
}
/*
* inverse of function f
*/
int f_1(uint16_t x){
return x%2 == 1 ? (x-1)/2 : -int(x)/2;
}
bool write;
/*
* counters storing number of bits used for the 3 grammar components
* these counters are filled after calling close()
*/
uint64_t bits_for_grammar = 0;
uint64_t bits_for_text = 0;
uint64_t bits_for_alphabet = 0;
vector<bool> bits;//bits to be flushed to file
uint64_t idx_in_bits = 0;//index in vector bits
vector<itype> buffer;
uint64_t idx_in_buf = 0;//current index in buffer while reading
vector<itype> blocks_bitsizes;//store bitsize of largest integer in each block
bool end_of_file = false;
ifstream in;
ofstream out;
/*
* stores accumulated bitlength of all integers stored in the file
*/
uint64_t lower_bound_bitsize = 0;
/*
* stores accumulated bitlength of all integers stored in the file
*/
uint64_t actual_bitsize = 0;
};
|
412e930aa1a670e268c379c63df52798b9e9843c
|
b3c47795e8b6d95ae5521dcbbb920ab71851a92f
|
/Exemplars/杂项/时间计算.cc
|
6b2aadbae703630b77c6290fee373dff8228be47
|
[
"LicenseRef-scancode-warranty-disclaimer"
] |
no_license
|
Wizmann/ACM-ICPC
|
6afecd0fd09918c53a2a84c4d22c244de0065710
|
7c30454c49485a794dcc4d1c09daf2f755f9ecc1
|
refs/heads/master
| 2023-07-15T02:46:21.372860
| 2023-07-09T15:30:27
| 2023-07-09T15:30:27
| 3,009,276
| 51
| 23
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 678
|
cc
|
时间计算.cc
|
namespace DATE
{
int days[12]={31,28,31,30,31,30,31,31,30,31,30,31};
struct date
{
int year,month,day,hour;
date(){}
date(int iyear,int imonth,int iday,int ihour)
{
year=iyear;month=imonth,day=iday;hour=ihour;
}
};
const date START_TIME=date(2000,1,1,0);
inline bool leap(int year)
{
return (year%4==0 && year%100!=0) || year%400==0;
}
int date2int(const date &a)
{
int ret=a.year*365+(a.year-1)/4-(a.year-1)/100+(a.year-1)/400;
days[1]+=leap(a.year);
for(int i=0;i<a.month-1;i++) ret+=days[i];
days[1]=28;
return ret+a.day;
}
int date2hour(const date& a)
{
int days=date2int(a)-date2int(START_TIME);
return days*24+a.hour;
}
}
|
735ba7985e47b850d560e18e1f99b2ea2cb111b5
|
a4fd6e39ffca2ce20cb92d7195c2956519b2bcbf
|
/CppReview/passArray.cpp
|
78336ad8854430838ddb7708902def7b93e64641
|
[] |
no_license
|
shivapbhusal/AI
|
e02f5699f0400abef3fa337f54b746d2a4dee267
|
02ecf14bfb8deb9319e7dccebad0063527f9c1a6
|
refs/heads/master
| 2021-03-24T14:07:40.276106
| 2018-04-19T01:01:55
| 2018-04-19T01:01:55
| 122,130,550
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 305
|
cpp
|
passArray.cpp
|
// A program to demonstrate pass by value and pass by reference
//
#include<iostream>
using namespace std;
void multiply(int a[], int &b)
{
for (int i=0;i<=5;i++)
{
a[i]=a[i]*b;
}
}
int main(){
int a[5]={1,2,3,4,5};
multiply(a,a[1]);
for (int i=0;i<5;i++)
{
cout<<a[i]<<"\n";
}
}
|
e76b8b21236060c634d3305451d141ac77ded5f3
|
91939b8fb60cb1f26b6fbfec7689ba5cb7f0dd09
|
/ObserverV2/src/ClockTimer.cpp
|
ba8b13af5c0abbcf64f03c3c33994f3f6fe9db9d
|
[
"MIT"
] |
permissive
|
JuanPoli/EDI-III
|
226d4961bcb02414aa18643b4e2d337dec7fb091
|
55afb509aa74d81b366c276de54802d55648b238
|
refs/heads/master
| 2020-06-05T00:15:16.488972
| 2020-05-08T13:22:06
| 2020-05-08T13:22:06
| 192,246,937
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,776
|
cpp
|
ClockTimer.cpp
|
#include "../src/Notifier.cpp"
class ClockTimer: public IClockTimer
{
public:
ClockTimer(ISubscriber* subscriber):refCount(0),notifier(new Notifier(subscriber)) {
acquire();
m_hours = 0;
m_minutes = 0;
m_seconds = 0;
std::cout << "ClockTimer::ClockTimer" << std::endl;
this->subscriber = subscriber;
}
virtual ~ClockTimer(){
std::cout << "ClockTimer::~ClockTimer" << std::endl;
notifier->release();
}
int getHour( void ) {
return this->m_hours;
}
int getMinute( void ) {
return this->m_minutes;
}
int getSecond( void ) {
return this->m_seconds;
}
ISubscriber* getSubscriber() {
return this->subscriber;
}
void tick () {
m_seconds++;
if(m_seconds == 60) {
m_seconds = 0;
m_minutes++;
if(m_minutes == 60) {
m_seconds = 0;
m_minutes = 0;
m_hours++;
if(m_hours == 24) {
m_seconds = 0;
m_minutes = 0;
m_hours = 0;
}
}
}
notifier->notify();
}
//IMemoryManagement interface implementation
void acquire(){
refCount++;
}
void release(){
if(--refCount == 0)
delete this;
}
private:
int refCount;
int m_hours;
int m_minutes;
int m_seconds;
ISubscriber* subscriber;
INotifier* notifier;
};
|
371f03dec5d33e59fce3f07db976a66f1ad1f797
|
9344828009fb89c94302a0c56e8e99ca09161854
|
/week1/week_test/linkTest/std_io.cpp
|
55dfebd34d7f3bdf1f895a202f64442b8fb89e70
|
[] |
no_license
|
rrpuqy/winter_code_camp
|
7afbc11e45cfe9a249450f9e5b56d93a9b88c9fe
|
4d38f60160eab44f54e7c256433ae5856480be48
|
refs/heads/main
| 2023-03-19T19:13:01.793472
| 2021-03-03T09:29:39
| 2021-03-03T09:29:39
| 342,440,411
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,957
|
cpp
|
std_io.cpp
|
#include <iostream>
#include <vector>
using namespace std;
// 代码实现开始
const int N = 1005;
struct Node
{
int pre, next;
Node(int a, int b)
{
pre = a;
next = b;
}
};
vector<Node> my_list;
// 初始化函数,在操作开始前会调用一次
void init(int n)
{
my_list.assign(n + 1, Node(0, 0));
// for (int i = 0; i < n; i++)
// {
// my_list.push_back(Node(0, 0));
// }
}
// x 是编号,范围为 1 到 n
// 若成功操作,返回 true,否则返回 false
bool split_succ(int x)
{
if (my_list[x].next)
{
int t = my_list[x].next;
my_list[t].pre = 0;
my_list[x].next = 0;
return true;
}
return false;
}
// x 是编号,范围为 1 到 n
// 若成功操作,返回 true,否则返回 false
bool split_prev(int x)
{
if (my_list[x].pre)
{
int t = my_list[x].pre;
my_list[x].pre = 0;
my_list[t].next = 0;
return true;
}
return false;
}
// x, y 是编号,范围为 1 到 n
// 若成功操作,返回 true,否则返回 false
bool link(int x, int y)
{
if(!my_list[x].next && !my_list[y].pre){
my_list[x].next = y;
my_list[y].pre = x;
return true;
}
return false;
}
// x 是编号,范围为 1 到 n
// 返回遍历得到的序列
std::vector<int> visit_succ(int x)
{
std::vector<int> ans;
ans.push_back(x);
int af = my_list[x].next;
while (af && af!=x){
ans.push_back(af);
af = my_list[af].next;
}
return ans;
}
// x 是编号,范围为 1 到 n
// 返回遍历得到的序列
std::vector<int> visit_prev(int x)
{
std::vector<int> ans;
ans.push_back(x);
int bf = my_list[x].pre;
while (bf && bf != x)
{
ans.push_back(bf);
bf = my_list[bf].pre;
}
return ans;
}
// 代码实现结束
int main()
{
std::ios::sync_with_stdio(false);
int n, m, x, y;
std::string op;
std::cin >> n >> m;
init(n);
for (int i = 0; i < m; ++i)
{
std::cin >> op >> x;
if (op == "split_succ")
{
std::cout << (split_succ(x) ? "yes" : "no") << '\n';
}
else if (op == "split_prev")
{
std::cout << (split_prev(x) ? "yes" : "no") << '\n';
}
else if (op == "link")
{
std::cin >> y;
std::cout << (link(x, y) ? "yes" : "no") << '\n';
}
else if (op == "visit_succ")
{
std::vector<int> ans = visit_succ(x);
for (int i = 0; i < ans.size(); i++)
{
std::cout << ans[i] << " \n"[i + 1 == ans.size()];
}
}
else
{
std::vector<int> ans = visit_prev(x);
for (int i = 0; i < ans.size(); i++)
{
std::cout << ans[i] << " \n"[i + 1 == ans.size()];
}
}
}
return 0;
}
|
a750656a2722d0ecb0796c058a6d4680e415d6c8
|
826c2762805e39ac1c080091e7f4f642fb41e19a
|
/ouniverse_2021_whitebox_ue4_source_BAK/2021-4-3.1/App/Game/Private/AppController.cpp
|
efa666bdafb77b461be1b3c0aa52bacd75a359c7
|
[] |
no_license
|
legendofceo/ouniverse_ue_cpp_source_deprecated_pre2022
|
fe625f69210c9c038202b8305495bdf373657ea8
|
729f12569f805ce74e602f8b13bab0ac318358a5
|
refs/heads/main
| 2023-08-12T19:14:39.216646
| 2021-10-17T16:19:29
| 2021-10-17T16:19:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,664
|
cpp
|
AppController.cpp
|
// Fill out your copyright notice in the Description page of Project Settings.
#include "AppController.h"
#include "Engine/StreamableManager.h"
#include "Engine/AssetManager.h"
#include "AppMode.h"
#include "Cam.h"
#include "Input.h"
#include "Keynet.h"
#include "InterfaceInput.h"
#include "Kismet/GameplayStatics.h"
#include "MenuMain.h"
#include "Framework/Commands/InputChord.h"
#include "WorldPro.h"
#include "LoadScreenUi.h"
#include "SoftServe.h"
AAppController::AAppController()
{
bReplicates = true;
bAutoManageActiveCameraTarget = false;
UserName = "Default";
UserSymbol = 0;
//WorldRemote = CreateDefaultSubobject(TEXT("WorldRemote"));
}
AAppController* AAppController::GetAppController(const UObject* WorldContextObject)
{
return Cast<AAppController>(UGameplayStatics::GetPlayerController(WorldContextObject->GetWorld(), 0));
}
void AAppController::BeginPlay()
{
Super::BeginPlay();
PlayerCameraManager->AttachToActor(this, FAttachmentTransformRules::KeepRelativeTransform);
AppControllerIndex = GetInputIndex();
SoftServe = NewObject<USoftServe>(this, USoftServe::StaticClass());
SoftServe->Add(WorldProClass);
SoftServe->Add(LoadScreenUiClass);
if (SoftServe->HasNull())
{
GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Red, "ServeServe has Null in AppController");
return;
}
SoftServe->OnComplete.AddDynamic(this, &AAppController::BeginPlay_SS);
SoftServe->Stream();
}
void AAppController::BeginPlay_SS(USoftServe* SS)
{
WorldPro = NewObject<UWorldPro>(this, WorldProClass.Get(), TEXT("WorldPro"));
WorldPro->RegisterComponent();
if (IsLocalPlayerController())
{
LoadScreenUi = CreateWidget<ULoadScreenUi>(this, LoadScreenUiClass.Get());
}
AAppMode* AppMode = Cast<AAppMode>(GetWorld()->GetAuthGameMode());
if (IsValid(AppMode))
{
AppMode->ReceivePlayer(this);
}
SoftServe = NULL;
}
void AAppController::SetupInputComponent()
{
Super::SetupInputComponent();
BTs.Init(NULL, EInputBT::EInputBT_MAX);
BTs.Add(UInputButton::Create(this, &EKeys::I, EInputBT::EInputBT_I));
BTs[EInputBT::EInputBT_Gamepad_LeftTrigger] = UInputButton::Create(this, &EKeys::Gamepad_LeftTrigger, EInputBT::EInputBT_Gamepad_LeftTrigger);
BTs[EInputBT::EInputBT_Gamepad_RightTrigger] = UInputButton::Create(this, &EKeys::Gamepad_RightTrigger, EInputBT::EInputBT_Gamepad_RightTrigger);
BTs[EInputBT::EInputBT_Gamepad_FaceButton_Bottom] = UInputButton::Create(this, &EKeys::Gamepad_FaceButton_Bottom, EInputBT::EInputBT_Gamepad_FaceButton_Bottom);
BTs[EInputBT::EInputBT_Gamepad_FaceButton_Right] = UInputButton::Create(this, &EKeys::Gamepad_FaceButton_Right, EInputBT::EInputBT_Gamepad_FaceButton_Right);
//GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Orange, EKeys::Gamepad_FaceButton_Bottom.ToString());
TEnumAsByte<UInputButton> Byte = TEnumAsByte<UInputButton>(0);
DefaultKeynet(EKeynets::EKeynets_Menu);
DefaultKeynet(EKeynets::EKeynets_World);
}
void AAppController::DefaultKeynet(TEnumAsByte<EKeynets> Keynet)
{
switch (Keynet) {
case EKeynets::EKeynets_Menu:
KeynetMenu = UKeynet::Create();
KeynetMenu->AddKeymap(FKeymap(EKeynetMenu::EKeynetMenu_Accept, BTs[EInputBT::EInputBT_Gamepad_FaceButton_Bottom]));
KeynetMenu->AddKeymap(FKeymap(EKeynetMenu::EKeynetMenu_Cancel, BTs[EInputBT::EInputBT_Gamepad_FaceButton_Right]));
KeynetMenu->AddKeymap(FKeymap(EKeynetMenu::EKeynetMenu_TabLeft, BTs[EInputBT::EInputBT_Gamepad_LeftTrigger]));
KeynetMenu->AddKeymap(FKeymap(EKeynetMenu::EKeynetMenu_TabRight, BTs[EInputBT::EInputBT_Gamepad_RightTrigger]));
KeynetMenu->Rebuild();
break;
case EKeynets::EKeynets_World:
KeynetWorld = UKeynet::Create();
KeynetWorld->AddKeymap(FKeymap(EKeynetWorld::EKeynetWorld_Inventory, BTs[EInputBT::EInputBT_I]));
KeynetWorld->Rebuild();
break;
}
}
void AAppController::SetRemoteMode(TEnumAsByte<ERemoteModes> InRemoteMode)
{
switch (InRemoteMode) {
case ERemoteModes::ERemoteModesNone:
//ActiveRemote = NULL;
break;
case ERemoteModes::ERemoteModesWorld:
//ActiveRemote = WorldRemote;
//WorldRemote->Start();
break;
}
}
void AAppController::SendInputButtonEvent(UInputButton* InputButton)
{
UInputButtonEvent* NewInputButtonEvent = NewObject<UInputButtonEvent>();
NewInputButtonEvent->Fill(InputButton);
GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::Green, "KeyHappened");
//if (IsValid(ActivePro))
//{
// GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::Green, "KeySent");
// WorldPro->BT(NewInputButtonEvent);
//}
}
void AAppController::ConvertToKeynetBP(TEnumAsByte<EKeynets> Keynet, uint8 InputCode, uint8& ConvertedInputCode, ESuccessExecs& Execs)
{
Execs = ESuccessExecs::Fail;
ConvertedInputCode = 0;
UKeynet* QueryKeynet = NULL;
switch (Keynet) {
case EKeynets::EKeynets_Menu:
QueryKeynet = KeynetMenu;
break;
case EKeynets::EKeynets_World:
QueryKeynet = KeynetWorld;
break;
}
if(QueryKeynet!=NULL&& QueryKeynet->TryBind(ConvertedInputCode, InputCode))
{
Execs = ESuccessExecs::Success;
}
}
TEnumAsByte<EKeynetWorld> AAppController::KeynetConvertWorld(uint8 Byte)
{
return EKeynetWorld::EKeynetWorld_Inventory;
}
bool AAppController::OpenMainMenu(FMenuMainInitializer Initializer)
{
MenuMain = AMenuMainRootWin::OpenMenu(Initializer,MenuMainClass,this);
return true;
}
bool AAppController::OpenConsole()
{
return true;
}
bool AAppController::PrintScreen()
{
return true;
}
void AAppController::StartLoadScreen_Implementation()
{
if (LoadScreenUi)
{
LoadScreenUi->AddToViewport(9999);
}
}
/** WithValidation
bool AAppController::StartLoadScreen_Validate()
{
return true;
}
*/
void AAppController::EndLoadScreen()
{
}
|
ae94a994c0ebc20131863cfc1dce65f52ac13c47
|
c3c1e37700fc3ebe041a9a366812fb70c122e25a
|
/src/graphlab/util/synchronized_circular_queue.hpp
|
b71877e3bd4dd7a74e73df70f04b4abcb85bfc04
|
[] |
permissive
|
Lcrypto/graphlab
|
87847459067ac8d138ca94ef6a6b09f9334984ec
|
4e525282d1c093bb8ad38e8941b87c86d6ad7ded
|
refs/heads/master
| 2020-09-16T13:29:38.584264
| 2019-11-24T17:42:26
| 2019-11-24T17:42:26
| 223,784,330
| 0
| 0
|
BSD-3-Clause
| 2019-11-24T17:40:16
| 2019-11-24T17:40:15
| null |
UTF-8
|
C++
| false
| false
| 2,283
|
hpp
|
synchronized_circular_queue.hpp
|
#ifndef GRAPHLAB_SYNCHRONIZED_CIRCULAR_QUEUE_HPP
#define GRAPHLAB_SYNCHRONIZED_CIRCULAR_QUEUE_HPP
#include <queue>
#include <cassert>
#include <cstring>
#include <graphlab/parallel/pthread_tools.hpp>
namespace graphlab {
/**
Implementation of a self-resizing circular queue
*/
template <typename T>
class synchronized_circular_queue {
public:
synchronized_circular_queue(size_t sizehint = 128) {
queue = (T*)malloc(sizeof(T) * sizehint);
head = 0;
tail = 0;
length = 0;
queuesize = sizehint;
}
~synchronized_circular_queue() {
free(queue);
}
void push(const T &item) {
queuelock.lock();
if (length == queuesize) {
unsync_doublesize();
}
queue[tail] = item;
++tail;
tail = (tail < queuesize)?tail:0;
++length;
queuelock.unlock();
}
bool safepop(T * ret) {
queuelock.lock();
if (length == 0) {
queuelock.unlock();
return false;
}
(*ret) = queue[head];
++head;
head = (head < queuesize)?head:0;
--length;
queuelock.unlock();
return true;
}
T pop() {
queuelock.lock();
assert(length > 0);
T t = queue[head];
++head;
head = (head < queuesize)?head:0;
--length;
queuelock.unlock();
return t;
}
size_t size() const{
return length;
}
private:
T* queue;
spinlock queuelock;
size_t head; /// points to the first element in the queue
size_t tail; /// points to one past the last element in the queue
size_t length; /// number of elements in the queue
size_t queuesize; /// the size of the queue array
void unsync_doublesize() {
queue = (T*)realloc(queue, sizeof(T) * (queuesize*2));
//queue.resize(queue.size() * 2);
// now I need to move elements around
// if head < tail, that means that the array
// is in the right position. I do not need to do anything
// otherwise.I need to move (0...tail-1) to (size:size+tail)
if (head >= tail && length > 0) {
memcpy(queue+queuesize, queue, sizeof(T) * tail);
tail = queuesize + tail;
}
queuesize *= 2;
}
};
}
#endif
|
52ff125541b2e71405685c22a7fc5387e7b5c926
|
bff5e31c511224ba8691dc768e00cabd6043bdf2
|
/include/benchmark.hpp
|
832b277d91cf3e99596baa37e2a834729f7b5497
|
[
"MIT"
] |
permissive
|
twesterhout/plasmon-cpp
|
a8ed9605eee45f9ccbf2d609e9e6fd7d2e4f7552
|
a0e343ee718d9b30602b322ade6077e42e08d8e5
|
refs/heads/master
| 2021-01-18T03:19:00.048376
| 2018-01-23T13:50:43
| 2018-01-23T13:50:43
| 85,831,338
| 3
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 5,216
|
hpp
|
benchmark.hpp
|
#ifndef TCM_BENCHMARK_HPP
#define TCM_BENCHMARK_HPP
#include <iomanip>
#include <chrono>
#include <unordered_map>
#include <thread>
#include <mutex>
#include <boost/range/adaptors.hpp>
#include <boost/range/algorithm.hpp>
#include <detail/config.hpp>
///////////////////////////////////////////////////////////////////////////////
/// \file benchmark.hpp
/// \brief Defines utilities related to benchmarking.
///
/// \detail To get an idea how long a certain part of a simulation took, we
/// measure the execution time of some functions. This can be turned on/off
/// by defining/undefining the #CONFIG_DO_MEASURE flag in detail/config.hpp
/// file. Obtained measurements are saved in a global static table
/// `tcm::timing::_global_impl_stats`. Please, __do not use__ this directly.
/// There is also an global static #std::mutex
/// `tcm::timing::_global_impl_stats_mutex` protecting `_global_impl_stats`.
/// Please, __do not__ temper with it either.
///
/// There are two functions that should be used to manipulate this table.
/// * #update() is used to record benchmarks;
/// * #report() is used to report the results.
///
/// We also implement a #Timer class. It starts the timer at construction and
/// stops it and saves the results at destruction. To simplify creation of
/// #Timer objects a #TCM_MEASURE macro is provided.
///
/// __Example usage__:
/// \include src/timing_example.cpp
/// __Possible output__:
/// \code{.unparsed}
/// [-------------------------------------------------------]
/// [ obscure_namespace::foobarfoo() | 7.5e-08 ]
/// [ foo() | 0.00513702 ]
/// [-------------------------------------------------------]
/// \endcode
///////////////////////////////////////////////////////////////////////////////
namespace tcm {
namespace timing {
static std::unordered_map< std::string
, std::chrono::duration<double> > _global_impl_stats;
static std::mutex _global_impl_stats_mutex;
///////////////////////////////////////////////////////////////////////////////
/// \brief Updates the global stats table in a thread-safe way.
/// \param func_name Name of the function how it will appear in the table.
/// \param delta_t Extra seconds spent in \p func_name since the last call
/// to #update(). \p delta_t is added to the old time. If this
/// is the first call to #update() old time is taken to be 0.
///
/// This function has the following behavior:
/// \snippet include/benchmark.hpp Updating global table
///////////////////////////////////////////////////////////////////////////////
auto update( std::string func_name
, std::chrono::duration<double> const delta_t ) -> void
{
//! [Updating global table]
std::lock_guard<std::mutex> lock{ _global_impl_stats_mutex };
auto i = _global_impl_stats.emplace(std::move(func_name), 0.0).first;
i->second += delta_t;
//! [Updating global table]
}
///////////////////////////////////////////////////////////////////////////////
/// \brief Pretty-prints the global stats table to \p out.
/// \param out Output stream where to write to.
/// \warning #std::setw is used in the implementation which places some
/// constraints on _Stream.
///////////////////////////////////////////////////////////////////////////////
template <class _Stream>
auto report(_Stream& out) -> void
{
std::lock_guard<std::mutex> lock{ _global_impl_stats_mutex };
auto const get_length = [](auto const& s) noexcept { return s.size(); };
auto const max_name_width = *boost::max_element( _global_impl_stats
| boost::adaptors::map_keys
| boost::adaptors::transformed(std::cref(get_length)) );
auto constexpr max_time_width = 20;
auto const hline = std::string(max_name_width + max_time_width + 5, '-');
out << "[" << hline << "]\n";
for (const auto& _element : _global_impl_stats) {
out << "[ " << std::setw(max_name_width) << _element.first
<< " | "
<< std::setw(max_time_width) << _element.second.count()
<< " ]\n";
}
out << "[" << hline << "]\n";
}
struct Timer {
Timer(std::string name)
: _name{ std::move(name) }
, _start{ std::chrono::high_resolution_clock::now() }
, _stop{}
{}
Timer(Timer const&) = delete;
Timer& operator= (Timer const&) = delete;
~Timer()
{
_stop = std::chrono::high_resolution_clock::now();
update(std::move(_name), _stop - _start);
}
private:
using time_point = std::chrono::high_resolution_clock::time_point;
std::string _name;
time_point _start;
time_point _stop;
};
///////////////////////////////////////////////////////////////////////////////
/// \brief Simplifies the creation of #Timer objects.
/// If #CONFIG_DO_MEASURE is defined, creates a #Timer object, otherwise does
/// nothing. This allows to turn benchmarking on/off without changing source
/// files.
///////////////////////////////////////////////////////////////////////////////
#ifdef CONFIG_DO_MEASURE
# define TCM_MEASURE(function_name) \
tcm::timing::Timer _timer_temp_object_{function_name}
#else
# define TCM_MEASURE(function_name) \
do {} while(false)
#endif
} // namespace timing
} // namespace tcm
#endif // TCM_BENCHMARK_HPP
|
6cbf98d282a0491bba204965b08bdf777fd95ca0
|
122da59fcbf44b14ad7d77841eaa9e8b5faa0102
|
/helloword.cpp
|
cc1663241b80e9c4a95094c0cd9c099af03cfdc9
|
[] |
no_license
|
CkingEric/loginsever
|
ecb72c8f66c96d4a95923f4337be0118285c3f1f
|
e73d40e9515a59c06886c58b726ef72eb3e9b97c
|
refs/heads/master
| 2023-04-18T19:02:18.765701
| 2021-04-12T10:08:32
| 2021-04-12T10:08:32
| 356,092,382
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,233
|
cpp
|
helloword.cpp
|
#include "helloword.h"
HelloWord::HelloWord(QObject *parent) : HttpRequestHandler(parent)
{
}
void HelloWord::service(HttpRequest &request, HttpResponse &response)
{
QString hello="\
<html>\
<head>\
</head>\
<body>\
这是网页的内容\
<h1>helloworld</h1>\
<h2>personalweb</h2>\
<h3>test</h3>\
<h4>h4</h4>\
<h5>%1</h5>\
\
<p>ppppppppppp</p>\
\
<div>\
<p>ppppppppppp</p>\
</div>\
\
<ul>\
<li>hahaha</li>\
<li>hahaha</li>\
<li>hahaha</li>\
</ul>\
\
<ol>\
<li>ahahah</li>\
<li>ahahah</li>\
<li>ahahah</li>\
</ol>\
\
</body>\
</html>";;
if(request.getMethod()=="GET"){
response.write(hello.arg(utill::randomcode()).toLatin1(),true);
}
}
|
3fdedbdd9d4e6f31e6c9d944cfea00d1ce35acc8
|
0160490319cac0dfbe37834d0468aed63f2cd0c0
|
/include/SgfcGoRuleset.h
|
21f25043380cd5f150e6ee5eac7459f89643175c
|
[
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"BSL-1.0"
] |
permissive
|
herzbube/libsgfcplusplus
|
a6c9c11b05a13ca1f422b15e220efb84aeefb875
|
cd93b76c9044952a0067240cbebac7c535e0275a
|
refs/heads/develop
| 2021-07-14T20:04:24.516039
| 2021-02-23T19:16:12
| 2021-02-23T19:16:12
| 238,560,277
| 8
| 1
|
Apache-2.0
| 2021-02-13T16:53:57
| 2020-02-05T22:21:31
|
C++
|
UTF-8
|
C++
| false
| false
| 3,563
|
h
|
SgfcGoRuleset.h
|
// -----------------------------------------------------------------------------
// Copyright 2020 Patrick Näf (herzbube@herzbube.ch)
//
// 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.
// -----------------------------------------------------------------------------
#pragma once
// Project includes
#include "SgfcGoRulesetType.h"
#include "SgfcTypedefs.h"
// Project includes (generated)
#include "SgfcPlusPlusExport.h"
namespace LibSgfcPlusPlus
{
/// @brief The SgfcGoRuleset struct is a simple type that can hold the
/// decomposed values of an SgfcPropertyType::RU property value.
///
/// @ingroup public-api
/// @ingroup property-value
/// @ingroup game
/// @ingroup go
struct SGFCPLUSPLUS_EXPORT SgfcGoRuleset
{
public:
/// @brief The ruleset type. The default is SgfcGoRulesetType::AGA.
SgfcGoRulesetType GoRulesetType = SgfcGoRulesetType::AGA;
/// @brief True if the SgfcGoRuleset object holds a valid Go ruleset.
/// False if the SgfcGoRuleset object holds an invalid Go ruleset.
/// The default is false.
///
/// This is mainly used to indicate whether
/// SgfcGoRuleset::FromPropertyValue() was successful in decomposing
/// the SgfcPropertyType::RU property value. A library client that manually
/// creates an SgfcGoRuleset object can simply set this to true to assert
/// a valid Go ruleset.
bool IsValid = false;
/// @brief Decomposes the content of @a propertyValue into a distinct
/// ruleset type value.
///
/// See the SGF standard specification for the recommended structure of an
/// SgfcPropertyType::RU property value.
///
/// @return SgfcGoRuleset An object with the decomposed ruleset type value.
/// The object's SgfcGoRuleset::IsValid member is true if decomposition was
/// successful, otherwise it is false.
static SgfcGoRuleset FromPropertyValue(const SgfcSimpleText& propertyValue);
/// @brief Composes a property value for SgfcPropertyType::RU from the
/// ruleset type value in @a goRuleset.
///
/// See the SGF standard specification for the recommended structure of an
/// SgfcPropertyType::RU property value.
///
/// @return SgfcSimpleText A property value for SgfcPropertyType::RU that
/// conforms to the SGF standard's mandatory formatting, or
/// SgfcConstants::NoneValueString if the SgfcGoRuleset::IsValid member of
/// @a goRuleset is false.
static SgfcSimpleText ToPropertyValue(SgfcGoRuleset goRuleset);
/// @brief Returns true if the properties @e GoRulesetType and @e IsValid
/// are the same for the current SgfcGoRuleset object and for @a other.
/// Returns false if any of these properties are different.
bool operator==(const SgfcGoRuleset& other) const;
/// @brief Returns true if any of the properties @e GoRulesetType or
/// @e IsValid are different for the current SgfcGoRuleset object and for
/// @a other. Returns false if all properties are the same.
bool operator!=(const SgfcGoRuleset& other) const;
};
}
|
1843766aa41165745280daa23d2147cba13d9821
|
8acaf1aa24404b86d77cf60761b111404b09cc8e
|
/move-semantics/unique_ptr.cpp
|
f6111fa2826cc87a7a3c0abfbe8996f16123b822
|
[] |
no_license
|
infotraining/cpp-modern-2020-10-14
|
53312b2fdce2cc4cf55891b439944fe2a9ef074c
|
6e15376fe78c0ecf091aa15b9273d97b8bedeee3
|
refs/heads/main
| 2023-01-01T21:53:34.757983
| 2020-10-16T14:36:16
| 2020-10-16T14:36:16
| 303,329,899
| 0
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,081
|
cpp
|
unique_ptr.cpp
|
#include "catch.hpp"
#include "gadget.hpp"
#include <iostream>
template <typename T>
class UniquePtr
{
T* ptr_;
public:
explicit UniquePtr(T* ptr)
: ptr_ {ptr}
{
}
UniquePtr(const UniquePtr&) = delete;
UniquePtr& operator=(const UniquePtr&) = delete;
// move constructor
UniquePtr(UniquePtr&& other) noexcept
: ptr_ {other.ptr_}
{
other.ptr_ = nullptr;
}
// move assignment operator
UniquePtr& operator=(UniquePtr&& other) noexcept
{
if (this != &other)
{
delete ptr_;
ptr_ = other.ptr_;
other.ptr_ = nullptr;
}
return *this;
}
~UniquePtr() noexcept
{
delete ptr_;
}
explicit operator bool() const
{
return ptr_ != nullptr;
}
T* operator->() const
{
return ptr_;
}
T& operator*() const
{
return *ptr_;
}
T* get() const
{
return ptr_;
}
};
TEST_CASE("unique pointer")
{
SECTION("move constructor")
{
UniquePtr<Gadget> ptr_g1 {new Gadget(1, "ipad")};
UniquePtr<Gadget> ptr_g2 = std::move(ptr_g1); // explicit move on lvalue
ptr_g2->use();
}
std::cout << "\n\n";
SECTION("move assignment")
{
UniquePtr<Gadget> ptr_g1 {new Gadget(1, "ipad")};
ptr_g1 = UniquePtr<Gadget> {new Gadget(42, "smartphone")}; // implicit move of rvalue
ptr_g1->use();
}
} // ptr_g1 will destroy ipad
////////////////////////////////////////////////////////////
// perfect forwarding
template <typename T, typename... Args>
UniquePtr<T> make_unique_ptr(Args&&... args)
{
puts(__PRETTY_FUNCTION__);
return UniquePtr<T>(new T(std::forward<Args>(args)...));
}
TEST_CASE("perfect forwarding")
{
std::string name = "smartwatch";
UniquePtr<Gadget> ptr_sw = make_unique_ptr<Gadget>(name);
UniquePtr<Gadget> ptr_g = make_unique_ptr<Gadget>(1, "tablet");
ptr_g->use();
UniquePtr<Gadget> ptr_g2 = make_unique_ptr<Gadget>();
ptr_g2->use();
}
|
8b7f5b1fa52460bcd005360a32dc6468db7789fa
|
b7188c7554df0d141562251b63d5261a7664d569
|
/fcportugalsplanner-code/AllSetPlay/setplay/setplay.cc
|
22b4d38e0cf26029c51b267b42fd57baedf70648
|
[] |
no_license
|
pedrofranki/fut2d-cross
|
07e7c3512506e173daab74a05b848ecd08bc1076
|
64cebf283125298f9e0c2e1762eba06874cd36bc
|
refs/heads/master
| 2022-12-17T15:46:42.890903
| 2020-09-25T23:53:59
| 2020-09-25T23:53:59
| 298,424,167
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 73,577
|
cc
|
setplay.cc
|
#include <setplay/setplay.h>
#include <setplay/util.h>
#include <setplay/setplayexception.h>
#include <setplay/clang/clangutil.h>
#include <cassert>
#include <algorithm>
#include <boost/spirit/include/classic_core.hpp>
#include <boost/spirit/include/classic_assign_actor.hpp>
#include <boost/algorithm/string.hpp>
#include "simpleParsers.h"
using namespace boost;
using namespace boost::algorithm;
using namespace BOOST_SPIRIT_CLASSIC_NS;
using namespace fcportugal::setplay;
//--------------------------------------------------------------------------
// SETPLAY CONSTRUCTOR
//--------------------------------------------------------------------------
Setplay::Setplay(const string name_,const int setplayNumber_,
const bool commAllowed_, const bool singleChannelComm_,
const float messageRepeatTime_)
:name(name_),parameters(NULL),steps(NULL),abortCond(NULL),
setplayNumber(setplayNumber_),instantiated(false),invertible(false),
currentStep(NULL),
currentActions(NULL),nextStep(NULL),setplayBegin(-1.0),
stepBegin(-1.0),done(false),wasLastLeadPlayer(false),successful(false),
commAllowed(commAllowed_),singleChannelComm(singleChannelComm_),
messageRepeatTime(messageRepeatTime_)
{assert(messageRepeatTime_>=0);}
//--------------------------------------------------------------------------
// INSPECTORS
//--------------------------------------------------------------------------
// To consult existent parameters
SetplayParameter* Setplay::getSetplayParameterWithName(const string& name) const{
for(unsigned int i = 0; i!= parameters->size();i++)
if(parameters->at(i)->name()==name)
return parameters->at(i);
return NULL;
}
const PlayerReference* Setplay::roleWithName(const string& name) const{
for(unsigned int i = 0; i!= players.size();i++)
if(players.at(i)->isRole()
&& ((PlayerRole*)players.at(i))->roleName()==name)
return players.at(i);
throw SetplayException("Participant not found in players:"+name);
return NULL;
}
PlayerID* Setplay::existentPlayer(const PlayerID* p) const{
for(unsigned int i = 0; i!= players.size(); i++)
if(!players.at(i)->isRole())
if(((PlayerID*)players.at(i))->team == p->team
&& ((PlayerID*)players.at(i))->number == p->number)
return (PlayerID*)players.at(i);
return NULL;
}
Step* Setplay::getStep(const unsigned int& stepID) const{
for(unsigned int i = 0; i!= steps->size(); i++)
if(steps->at(i)->id==stepID)
return steps->at(i);
// If we got here, then the step was not found
throw SetplayException("SP: (get) Step number not found in Setplay:"+stepID);
assert (false);
return NULL;
}
unsigned int Setplay::initialFreeParticipantsAmount() const{
if(getStep(0)->participants==NULL) return 0;
int amount=0;
for(vector<Participation*>::const_iterator
i=getStep(0)->participants->begin();
i!=getStep(0)->participants->end();i++)
if((*i)->participant()->isRole())
amount++;
return amount;
}
vector<const Participation*>* Setplay::initialParticipants() const{
vector<const Participation*>* res= new vector<const Participation*>();
for(unsigned int i=0; i!= getStep(0)->participants->size(); i++)
res->push_back(getStep(0)->participants->at(i));
return res;
}
//---------------------------------------------------------------------------
// OUTPUT METHODS
//---------------------------------------------------------------------------
void Setplay::write(ostream &os) const{
os<< "(setplay :name "<< name<<" :id "<<setplayNumber;
os<< " :invertible ";
if(invertible)
os<< "true";
else
os<< "false";
// Write parameters
if(instantiated){
os << " :parameters (list ";
for(unsigned int i = 0; i!= parameters->size();i++){
parameters->at(i)->print(os);
os << " ";
}
os << ")";//(list of parameters
}
// Write players
os << " :players (list ";
for(unsigned int i = 0; i!= players.size();i++){
players.at(i)->print(os);
os << " ";
}
os << ") ";//(list of players
// Write abortCond
if(abortCond){
os<<" :abortCond ";
abortCond->print(os);
os<<" ";
}
// Write steps
os<< ":steps (seq ";
for(unsigned int i = 0; i!= steps->size();i++){
steps->at(i)->print(os);
os << " ";
}
os << ")"//(list of steps
<< ")" ;//(setplay
}
void Setplay::write2(ostream &os, unsigned int indent) const{
os<< "(setplay :name "<< name<<" :id "<<setplayNumber;
os<< " :invertible";
if(invertible)
os<< " true";
else
os<< " false";
os << "\n";
for(unsigned int i= 0; i < indent; i++)
os << "\t";
// Write parameters
if(instantiated){
os << " :parameters (list ";
for(unsigned int i = 0; i!= parameters->size();i++){
parameters->at(i)->print(os);
os << " ";
}
os << ")";//(list of parameters
os << "\n";
for(unsigned int i= 0; i < indent; i++)
os << "\t";
}
// Write players
os << " :players" << "\n";
indent++;
for(unsigned int i= 0; i < indent; i++)
os << "\t";
os << "(list";
indent++;
for(unsigned int i = 0; i!= players.size();i++){
os << "\n";
for(unsigned int t= 0; t < indent; t++)
os << "\t";
players.at(i)->print(os);
}
indent--;
os << "\n";
for(unsigned int i= 0; i < indent; i++)
os << "\t";
os << ") " << "\n";
indent--;
// Write abortCond
for(unsigned int i= 0; i < indent; i++)
os << "\t";
if(abortCond)
{
os<<" :abortCond ";
abortCond->print(os);
os << "\n";
for(unsigned int i= 0; i < indent; i++)
os << "\t";
}
// Write steps
os << " :steps" << "\n";
indent++;
for(unsigned int i= 0; i < indent; i++)
os << "\t";
os << "(seq";
indent++;
for(unsigned int i = 0; i!= steps->size();i++){
os << "\n";
for(unsigned int t= 0; t < indent; t++)
os << "\t";
steps->at(i)->print2(os, indent);
}
indent--;
os << "\n";
for(unsigned int i= 0; i < indent; i++)
os << "\t";
os << ")"; //(list of steps
indent-=2;
os << "\n";
for(unsigned int i= 0; i < indent; i++)
os << "\t";
os << ")" ;//(setplay
os << "\n" << std::flush;
}
//-------------------------------------------------------------------------
// PARSE
//-------------------------------------------------------------------------
Setplay* Setplay::parse(const string in, string& out,
const bool useComm,
const bool limitedComm,
const float messageRepeatTime){
// Must trim argument 'in', in order to ignore trailing spaces and new lines.
string toBeProcessed(in);
trim_left(toBeProcessed);
if(toBeProcessed.empty()){
out=toBeProcessed;
return NULL;
}
string name;
unsigned int id;
rule<> sp_p = *space_p >> "(setplay" >> *space_p >> ":name" >>
*space_p >>identifier_p[assign_a(name)] >>
*space_p >>":id">> *space_p >>uint_p[assign_a(id)];
parse_info<> result = BOOST_SPIRIT_CLASSIC_NS::parse(toBeProcessed.c_str(),sp_p,
nothing_p);
if(result.hit){
bool invertible=false;
string rest=toBeProcessed.substr(result.length);
rule<> inv_p = *space_p >>":invertible";
result = BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),inv_p,nothing_p);
if(result.hit){
rest=rest.substr(result.length);
inv_p = *space_p >>"true";
result = BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),inv_p,nothing_p);
if(result.hit){
rest=rest.substr(result.length);
invertible=true;
}
else{
inv_p = *space_p >>"false";
result = BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),inv_p,nothing_p);
if(result.hit)
rest=rest.substr(result.length);
else{ //unexpected value
throw SetplayException("Illegal value in invertible!");
return NULL;
}
}
}
//Must ignore :version
rule<> ver_p = *space_p >> ":version" >>
*space_p >> *~(ch_p(' '));
result = BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),
ver_p,
nothing_p);
if(result.hit) rest=rest.substr(result.length);
//Must ignore :comment
rule<> com_p = *space_p >> ":comment" >>
*space_p >> "(" >> *~(ch_p(')')) >>
*space_p >> ")";
result = BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),
com_p,
nothing_p);
if(result.hit) rest=rest.substr(result.length);
// Check if there are parameters, not mandatory
rule<> param_p = *space_p >> ":parameters"
>> *space_p >> "(list";
result = BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),param_p,
nothing_p);
vector<SetplayParameter*>* params
= new vector<SetplayParameter*>;
if(result.hit){
rest=rest.substr(result.length);
//Parse parameters
SetplayParameter* param=
SetplayParameter::parse(rest,rest,*(new vector<SetplayParameter*>()),
*(new vector<PlayerReference*>()));
while(param){
params->push_back(param);
//Parse a new param
param= SetplayParameter::parse(rest, rest,*(new vector<SetplayParameter*>()),
*(new vector<PlayerReference*>()));
}
//Parse final ')'
result = BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),
*space_p >> ')',
nothing_p);
if(!result.hit){
throw SetplayException("error parsing parameters!");
return NULL;
}
rest=rest.substr(result.length);
}
// CAREFUL!
// since parameters were in no particular order, there were some
// problems when parsing their names: if we had sth like par and
// par1, par would always be accepted. Therefore, we must sort the
// vector in descending order
// HOWEVER: the original order must be maintained for instantiation.
// Therefore, in the end of the parse process, the original order
// must be reset
vector<SetplayParameter*>* params_copy
=new vector<SetplayParameter*>(params->size());
copy(params->begin(),params->end(),params_copy->begin());
sort(params_copy->begin(),params_copy->end(),nameBefore);
reverse(params_copy->begin(),params_copy->end());
//Parse participants, mandatory
rule<> pl_p = *space_p >> ":players" ;
result = BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),pl_p,
nothing_p);
if(result.hit){
rest=rest.substr(result.length);
// To store the players
vector<PlayerReference*> players
= PlayerReference::parsePlayerList(rest,rest,*(new vector<SetplayParameter*>()),
*(new vector<PlayerReference*>()));
if(players.size()>0){
// Parse abortCond, optional
Cond* abort=NULL;
rule<> abort_p = *space_p >> ":abortCond" ;
result = BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),
abort_p,nothing_p);
if(result.hit){
rest=rest.substr(result.length);
abort=Cond::parse(rest,rest,*params_copy,players);
if(!abort){
throw SetplayException("Failed parsing abort condition");
out=in;
return NULL;
}
}
//Parse steps, mandatory
rule<> step_p = *space_p >> ":steps"
>> *space_p >> "(seq";
result = BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),step_p,
nothing_p);
if(result.hit){
rest=rest.substr(result.length);
Step* st=Step::parse(rest,rest,*params_copy,players);
if(st){
// To store the steps
vector<Step*>* steps = new vector<Step*>;
while(st){
steps->push_back(st);
//Parse a new step
st=Step::parse(rest,rest,*params_copy,players);
}
// Check the final "))"
rule<> final_p = *space_p >> ')' >> *space_p >> ')';
result = BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),final_p,
nothing_p);
if(result.hit){
out=rest.substr(result.length);
Setplay* res =
new Setplay(name,id,useComm,limitedComm,
messageRepeatTime);
res->invertible=invertible;
res->parameters=params;
// create a const copy of players
res->players=PlayerReference::toVectorConstPlayerReference(players);
res->steps=steps;
res->abortCond=abort;
return res;
}
}
}
}
}
}
else{
throw SetplayException( "Invalid Setplay header:->"+in+"<-");
}
}
//-------------------------------------------------------------------------
// DEEP COPY & INVERSION
//-------------------------------------------------------------------------
Setplay* Setplay::deepCopy() const{
vector<PlayerReference*>* players_copy
= new vector<PlayerReference*>;
for(unsigned int i = 0; i!= players.size(); i++)
players_copy->push_back((PlayerReference*)players.at(i)->deepCopy());
vector<SetplayParameter*>* parameters_copy
= new vector<SetplayParameter*>;
for(unsigned int i = 0; i!= parameters->size(); i++)
parameters_copy->push_back(parameters->at(i)->deepCopy());
Cond* abort_copy = (abortCond? abortCond->deepCopy(*parameters_copy,
*players_copy):NULL);
vector<Step*>* steps_copy = new vector<Step*>;
for(unsigned int i = 0; i!= steps->size(); i++)
steps_copy->push_back(steps->at(i)->deepCopy(*parameters_copy,
*players_copy));
Setplay* setPlay_copy = new Setplay(name,setplayNumber,commAllowed,
singleChannelComm,
messageRepeatTime);
setPlay_copy->steps=steps_copy;
setPlay_copy->parameters=parameters_copy;
setPlay_copy->players=PlayerReference::toVectorConstPlayerReference(*players_copy);
setPlay_copy->abortCond=abort_copy;
return setPlay_copy;
}
Setplay* Setplay::inversion() const{
assert(invertible);
vector<PlayerReference*>* players_copy
= new vector<PlayerReference*>;
// No spatial references here...
for(unsigned int i = 0; i!= players.size(); i++)
players_copy->push_back((PlayerReference*)players.at(i)->deepCopy());
vector<SetplayParameter*>* parameters_copy
= new vector<SetplayParameter*>;
// Parameters are only instantiated afterwards, therefore no inversion needed
for(unsigned int i = 0; i!= parameters->size(); i++)
parameters_copy->push_back(parameters->at(i)->deepCopy());
Cond* abort_copy = (abortCond? abortCond->inversion(*parameters_copy,
*players_copy):NULL);
vector<Step*>* steps_copy = new vector<Step*>;
for(unsigned int i = 0; i!= steps->size(); i++)
steps_copy->push_back(steps->at(i)->inversion(*parameters_copy,
*players_copy));
// The setplay number will be it's complement, which is an intuitive way
// of refering to the new Setplay
// Cannot be 0!
assert(setplayNumber!=0);
string newName("INV_");
Setplay* setPlay_copy = new Setplay(newName.append(name),-setplayNumber,
commAllowed,singleChannelComm,
messageRepeatTime);
setPlay_copy->steps=steps_copy;
setPlay_copy->parameters=parameters_copy;
setPlay_copy->players=PlayerReference::toVectorConstPlayerReference(*players_copy);
setPlay_copy->abortCond=abort_copy;
return setPlay_copy;
}
//---------------------------------------------------------------------------
// MODIFIERS
//---------------------------------------------------------------------------
bool Setplay::instantiate(const InitMessage& message){
//Must scan all parameters...
return instantiate(message.arguments);
}
bool Setplay::instantiate(vector<const string*> *paramsReceived){
try
{
if(paramsReceived==NULL
|| paramsReceived->size()<(parameters==NULL?0:parameters->size())){
throw SetplayException("SP: bad amount of parameters in instantiation! Got "
+paramsReceived->size());
return false;
}
parse_info<> result;
bool failed=false;
//Must deal with all parameters...
for(unsigned int i=0; i<parameters->size();i++)
if(parameters->at(i)->type()=='d'){ //Decimal
double d;
result = BOOST_SPIRIT_CLASSIC_NS::parse(paramsReceived->at(i)->c_str(),
real_p[assign_a(d)],
nothing_p);
if(result.hit)
((Decimal*)parameters->at(i))->set(d);
else
failed=true;
}
else if(parameters->at(i)->type()=='i'){ //Integer
int j;
result = BOOST_SPIRIT_CLASSIC_NS::parse(paramsReceived->at(i)->c_str(),
int_p[assign_a(j)],
nothing_p);
if(result.hit)
((Integer*)parameters->at(i))->set(j);
else
failed=true;
}
else if(parameters->at(i)->type()=='p'){ //Point
string rest;
PointSimple* p
=(PointSimple*)PointSimple::parse(*paramsReceived->at(i),rest,
*(new vector<SetplayParameter*>()),
*(new vector<PlayerReference*>()));
if(p)
((PointVar*)parameters->at(i))->set(p);
else
failed=true;
}
else if(parameters->at(i)->type()=='g'){ //Region
string rest;
Region* r=Region::parse(*paramsReceived->at(i),rest,*(new vector<SetplayParameter*>()),
*(new vector<PlayerReference*>()));
if(r)
((RegVar*)parameters->at(i))->set(r);
else
failed=true;
}
//Deal with players..
unsigned int dealt_params=parameters->size();
for(unsigned int i=parameters->size();
i<parameters->size()+players.size()
&& dealt_params<paramsReceived->size();i++){
if(players.at(i-parameters->size())->isRole()){
string rest;
PlayerID* p=(PlayerID*)PlayerID::parse(*paramsReceived->at(dealt_params++),
rest,*(new vector<SetplayParameter*>()),*(new vector< PlayerReference*>()));
if(p)
((PlayerRole*)players.at(i-parameters->size()))->set(p);
else{
failed=true;
break;
}
}
}
if(dealt_params<paramsReceived->size()){
std::ostringstream o;
o << "SP: bad or wrong number of parameters in instantiate: " << paramsReceived->size()
<< " expected: "<< (parameters->size()+players.size());
cerr<<"SP: Arguments dealt:"<<dealt_params<<" failed:"<<failed<<endl;
cerr<<"SP: Args:";
for(int i=0; i<paramsReceived->size(); i++)
cerr<<*(paramsReceived->at(i))<<", ";
cerr<<endl;
throw SetplayException( o.str());
failed=true;
}
//test vector size
if(failed){
//uninstantiate all parameters and players
for(unsigned int i=0; i<parameters->size();i++)
if(parameters!=NULL)
if(parameters->at(i)!=NULL)
parameters->at(i)->uninstantiate();
for(unsigned int i=0; i<players.size();i++)
if(players.at(i)!=NULL)
if(players.at(i)->isRole())
((PlayerRole*)players.at(i))->uninstantiate();
return false;
}
else{
instantiated=true;
return true;
}
} catch(SetplayException())
{
return false;
}
}
void Setplay::substituteNamedRegions(const Context& world){
if(abortCond!=NULL)
abortCond->substituteNamedRegions(world);
for(unsigned int i = 0; i!= steps->size(); i++)
steps->at(i)->substituteNamedRegions(world);
}
//--------------------------------------------------------------------------
// RUNTIME METHODS
//--------------------------------------------------------------------------
void Setplay::start(const Context& world){
if(!instantiated){
throw SetplayException( "Trying to start a uninstantiated setplay");
return;
}
// substitute named regions
//!!! CAREFUL !!!
//this is being done by setplay manager...
setCurrentStep(0,world);
nextStep=NULL;
setplayBegin=world.time();
stepBegin=world.time();
//Selection of actions will be done in execute method.
currentActions=NULL;
}
vector<unsigned int>*
Setplay::participatingPlayersDistanceFromMe(const Context& world) const{
// TODO
// still to be implemented... Or deleted?
assert(false);
return NULL;
}
vector<unsigned int>*
Setplay::participatingPlayersDistanceFromPositions(const Context& world) const{
// Will output player numbers starting with 1, up to max 11...
//Jersey number of players participating
vector<unsigned int>* participatingPlayers =new vector<unsigned int>;
vector<const Participation*>* participations=initialParticipants();
//Go through all players and choose closest player
for(unsigned int i = 0; i!=players.size();i++){
// If participation is the leadplayer, or is a playerId with this player's
// number, then it will be taken by this player
if(players.at(i)->isRole()
&& ((PlayerRole*)players.at(i))->equals(steps->at(0)->leadPlayer))
participatingPlayers->push_back(world.me().number);
else if(! players.at(i)->isRole()){
//Not a role, should not be included in instantiation...
}
else{
float distance=2000;//initial distance very high
int chosenPlayer=0;
PointSimple* pos=NULL;
for(unsigned int j=1; j!= world.numPlayersPerTeam(); j++){
// Will check all players, except the goalie, which can only be part
// of a setplay when starting it
// Must first check if player has already been chosen, or if it's me,
// in which case it cannot be chosen
pos=NULL;
bool alreadyChosen=false;
for(unsigned int k=0; k!= participatingPlayers->size();k++)
if(j+1==participatingPlayers->at(k) || j+1==world.me().number){
alreadyChosen=true;
break;
}
if(!alreadyChosen){ //check if distance is smaller than current
//Must first get corresponding location in participation vector
for(unsigned int k=0; k!= participations->size();k++)
if(players.at(i)->equals(participations->at(k)->participant()))
if(participations->at(k)->location()!=NULL)
pos=new PointSimple(*participations->at(k)->location()
->getCentralPoint(world)
->asPointSimple(world));
// if location is not defined, this player will be chosen,
// since there is no other criterion...
if(pos==NULL){
chosenPlayer=j;
break;
}else
if(world.playerPos(PlayerID("our",j+1))!= NULL
&& pos->distance(world.playerPos(PlayerID("our",j+1)))<distance){
distance=pos->distance(world.playerPos(PlayerID("our",j+1)));
chosenPlayer=j;
}
}
}
participatingPlayers->push_back(chosenPlayer+1);
}
}
return participatingPlayers;
}
vector<unsigned int>* Setplay::
participatingPlayersDistanceFromPosAsArg(const Context& world,
const vector<PointSimple>&
teammatePos ) const{
// Verify that array size is correct:
assert(teammatePos.size() == world.numPlayersPerTeam());
//Jersey number of players participating
vector<unsigned int>* participatingPlayers =new vector<unsigned int>;
vector<const Participation*>* participations=initialParticipants();
//Go through all players and choose closest player
for(unsigned int i = 0; i!=players.size();i++){
// If participation is the leadplayer, or is a playerId with this player's
// number, then it will be taken by this player
if(players.at(i)->isRole()
&& ((PlayerRole*)players.at(i))->equals(steps->at(0)->leadPlayer))
participatingPlayers->push_back(world.me().number);
else if(! players.at(i)->isRole()){
//Not a role, should not be included in instantiation...
}
else{
float distance=2000;//initial distance very high
int chosenPlayer=0;
PointSimple* pos=NULL;
for(unsigned int j=1; j!= world.numPlayersPerTeam(); j++){
// Will check all players, except the goalie, which can only be part
// of a setplay when starting it
// Must first check if player has already been chosen, or if it's me,
// in which case it cannot be chosen
pos=NULL;
bool alreadyChosen=false;
for(unsigned int k=0; k!= participatingPlayers->size();k++)
if(j+1==participatingPlayers->at(k) || j+1==world.me().number){
alreadyChosen=true;
break;
}
if(!alreadyChosen){ //check if distance is smaller than current
//Must first get corresponding location in participation vector
for(unsigned int k=0; k!= participations->size();k++)
if(players.at(i)->equals(participations->at(k)->participant()))
if(participations->at(k)->location()!=NULL)
pos=new PointSimple(*participations->at(k)->location()
->getCentralPoint(world)
->asPointSimple(world));
// if location is not defined, this player will be chosen,
// since there is no other criterion...
if(pos==NULL){
chosenPlayer=j;
break;
}else
if(pos->distance(&teammatePos[j])<distance){
distance=pos->distance(&teammatePos[j]);
chosenPlayer=j;
}
}
}
participatingPlayers->push_back(chosenPlayer+1);
}
}
return participatingPlayers;
}
// Using permutations from the C++ Standard Template Library <algorithm>
vector<unsigned int>*
Setplay::
participatingPlayersGlobalDistanceFromPosAsArg(const Context& world,
const vector<PointSimple>&
teammatePos ) const{
// Verify that array size is correct:
assert(teammatePos.size() == world.numPlayersPerTeam());
//Jersey number of players participating
vector<const Participation*> participations=*initialParticipants();
// will store the participations that can be assigned according to a
// positioning: not constrained by either
// a PlayerID, or a lead player, but with a determined
// positioning
vector<const Participation*> freePositionedParticipations;
// will store the participations that can be freely assigned: neither
// restricted by a PlayerID, nor the lead player, nor having a determined
// positioning
vector<const Participation*> freeParticipations;
// will store the number of the players allocated to fixed participations,
// e.g lead player
vector<unsigned int>* fixedParticipationsInstantiation
=new vector<unsigned int>;
// will store the number of the players allocated to free participations,
// ie. player roles with no positioning
vector<unsigned int>* freeParticipationsInstantiation
=new vector<unsigned int>;
// will store the number of the players allocated to free participations,
// ie. player roles with a determined positioning
vector<unsigned int>* freePositionedParticipationsInstantiation
=NULL;
// will cycle through the participations vector and move to
// freeParticipations all the free participations
for(vector<const Participation*>::iterator i=participations.begin();
i!=participations.end();)// done inside
// If participation is the leadplayer, then it will be taken
// by this player
if((*i)->participant()->isRole()
&&((PlayerRole*)(*i)->participant())->equals(steps->at(0)->leadPlayer)){
fixedParticipationsInstantiation->push_back(world.me().number);
i++;
}
else if(!(*i)->participant()->isRole()){
fixedParticipationsInstantiation
->push_back(((PlayerID*)(*i)->participant())->number);
i++;
}
else if((*i)->location()==NULL){
//it's a free participation, will move to adequate vector
freeParticipations.push_back(*i);
i=participations.erase(i);
}
else{ //it's a participation with position, will move to adequate vector
freePositionedParticipations.push_back(*i);
i=participations.erase(i);
}
vector<unsigned int>* universe=new vector<unsigned int>;
// Populate universe of free players
// Goalie is excluded! Only participates when lead player!
for(unsigned int j=2; j!= world.numPlayersPerTeam()+1; j++)
// Will check all players, except the goalie, which can only be part
// of a setplay when starting it
// Must first check if player has already been chosen, or if it's me,
// in which case it cannot be chosen.
// Will simply check if player is in fixedParticipationsInstantiation
if(!containedInVector(j,*fixedParticipationsInstantiation)){
universe->push_back(j);
}
// setup of vector with results...
vector<PlayerNumAndDistance>* vecFreePositionedParticipationsInstantiation
=new vector<PlayerNumAndDistance>;
vector<unsigned int>* ints= new vector<unsigned int>;
PlayerNumAndDistance p(ints,0);
vecFreePositionedParticipationsInstantiation->push_back(p);
unsigned int numPlayers=universe->size();
unsigned int dim=freePositionedParticipations.size();
for(unsigned int l=0;l!=dim;l++){
vector<PlayerNumAndDistance>* vStep=new vector<PlayerNumAndDistance>;
for(unsigned int j=0;j!=numPlayers;j++){
vector<unsigned int>* ints2= new vector<unsigned int>;
ints2->push_back(universe->at(j));
// Put calculated distance
PlayerNumAndDistance
p2(ints2,
PointSimple(*freePositionedParticipations.at(l)->location()
->getCentralPoint(world)
->asPointSimple(world)).distance(&teammatePos[universe->at(j)-1]));
vector<PlayerNumAndDistance>* vTemp
=appendToVector(*vecFreePositionedParticipationsInstantiation,p2);
// Append
vStep->reserve( vStep->size() + vTemp->size());
vStep->insert( vStep->end(), vTemp->begin(), vTemp->end());
}
delete vecFreePositionedParticipationsInstantiation;
vecFreePositionedParticipationsInstantiation=vStep;
}
// Look for the smallest distance...
// Initial sum of distances very high
float minimalGlobalDistance=1000000;
for(unsigned int r=0;r!=vecFreePositionedParticipationsInstantiation->size();
r++){
if(vecFreePositionedParticipationsInstantiation->at(r).totalDist
<minimalGlobalDistance){
minimalGlobalDistance
=vecFreePositionedParticipationsInstantiation->at(r).totalDist;
freePositionedParticipationsInstantiation
=new vector<unsigned int>(*vecFreePositionedParticipationsInstantiation
->at(r).playerNums);
}
}
// Deal with the freeParticipations
if(freeParticipations.size()>0){
vector<unsigned int>* newUniverse=new vector<unsigned int>(*universe);
for(vector<unsigned int>::iterator it=newUniverse->begin();
it!=newUniverse->end();)//done inside
if(containedInVector(*it,*freePositionedParticipationsInstantiation))
it=newUniverse->erase(it);
else
it++;
// there must be available players for participations...
assert(freeParticipations.size()<=universe->size());
// Simply choose the available players at the top
// Could be chosen by distance to ball...
for(unsigned int i=0; i!=freeParticipations.size();i++)
freeParticipationsInstantiation->push_back(universe->at(i));
}
// Deal with response, must put players into order
// Concatenate the different participation and instantiation vectors...
// fixed with FreePositioned
participations.reserve(participations.size()
+freePositionedParticipations.size());
participations.insert(participations.end(),
freePositionedParticipations.begin(),
freePositionedParticipations.end());
// All participations appended to fixedParticipationsInstantiation
fixedParticipationsInstantiation
->reserve(fixedParticipationsInstantiation->size()
+freePositionedParticipationsInstantiation->size());
fixedParticipationsInstantiation
->insert(fixedParticipationsInstantiation->end(),
freePositionedParticipationsInstantiation->begin(),
freePositionedParticipationsInstantiation->end());
// fixed with Free
participations.reserve(participations.size()
+freeParticipations.size());
participations.insert(participations.end(),
freeParticipations.begin(),
freeParticipations.end());
// All participations appended to fixedParticipationsInstantiation
fixedParticipationsInstantiation
->reserve(fixedParticipationsInstantiation->size()
+freeParticipationsInstantiation->size());
fixedParticipationsInstantiation
->insert(fixedParticipationsInstantiation->end(),
freeParticipationsInstantiation->begin(),
freeParticipationsInstantiation->end());
// Check the order of resulting vector... players may be in different order
// as participants
vector<unsigned int>* res=new vector<unsigned int>;
// Will cycle players
for(unsigned int pl=0; pl!=players.size(); pl++)
// will look for this player in participants
if(players.at(pl)->isRole())
for(unsigned int pa=0; pa!=participations.size(); pa++)
if(players.at(pl)->equals(participations.at(pa)->participant()))
res->push_back(fixedParticipationsInstantiation->at(pa));
return res;
}
// Original atempt. Some bug, did not work.
// It was also very memory consuming...
// vector<unsigned int>*
// Setplay::
// participatingPlayersGlobalDistanceFromPosAsArg(const Context& world,
// const vector<PointSimple>&
// teammatePos ) const{
// // Verify that array size is correct:
// assert(teammatePos.size() == world.numPlayersPerTeam());
// //Jersey number of players participating
// vector<const Participation*>* participations=initialParticipants();
// // To store the running selection
// vector<PlayerNumAndDistance>* runningParticipations
// =new vector<PlayerNumAndDistance>;
// runningParticipations->push_back(PlayerNumAndDistance());
// // Variables to store the final selection
// // Initial sum of distances very high
// float minimalGlobalDistance=1000000;
// vector<unsigned int>* chosenParticipatingPlayers=NULL;
// //Go through all participations and choose closest player
// for(unsigned int i = 0; i!=participations->size();i++){
// // If participation is the leadplayer, then it will be taken by this player
// if(participations->at(i)->participant()->isRole()
// &&((PlayerRole*)participations->at(i)->participant())
// ->equals(steps->at(0)->leadPlayer)){
// PlayerNumAndDistance* p=new PlayerNumAndDistance();
// p->playerNums->push_back(me->number);
// p->totalDist=0;
// //APPEND
// vector<PlayerNumAndDistance>* temp
// =appendToVector(*runningParticipations,*p);
// delete runningParticipations;
// runningParticipations=temp;
// }
// else // If participation is a playerId, the corresponding player
// //will be used
// if(!participations->at(i)->participant()->isRole()){
// PlayerNumAndDistance* p=new PlayerNumAndDistance();
// p->playerNums->
// push_back(((PlayerID*)participations->at(i)->participant())->number);
// p->totalDist=0;
// //APPEND
// vector<PlayerNumAndDistance>* temp
// =appendToVector(*runningParticipations,*p);
// delete runningParticipations;
// runningParticipations=temp;
// }
// else{
// vector<PlayerNumAndDistance>* newRunningParticipations
// =new vector<PlayerNumAndDistance>;
// for(unsigned int j=1; j!= world.numPlayersPerTeam(); j++){
// // Will check all players, except the goalie, which can only be part
// // of a setplay when starting it
// // Must first check if player has already been chosen, or if it's me,
// // in which case it cannot be chosen. Must check in all possible
// // running participations
// if(j+1!=me->number){
// for(unsigned int r=0;r!=runningParticipations->size();r++){
// bool alreadyChosen=false;
// for(unsigned int k=0;
// k!= runningParticipations->at(r).playerNums->size();
// k++)
// if(j+1==runningParticipations->at(r).playerNums->at(k)){
// alreadyChosen=true;
// break;}
// if(!alreadyChosen){
// PlayerNumAndDistance* p1=new PlayerNumAndDistance();
// p1->playerNums->push_back(j+1);
// p1->totalDist
// =(participations->at(i)->location()==NULL?
// 0:PointSimple(*participations->at(i)->location()
// ->getCentralPoint(world)
// ->asPointSimple(world)).distance(&teammatePos[j]));
// //APPEND
// vector<PlayerNumAndDistance>* temp
// =appendToVector(*runningParticipations,*p1);
// for(unsigned int t=0;t!=temp->size();t++)
// newRunningParticipations->push_back(temp->at(t));
// }
// }
// }
// }
// // Substitute running participants
// cerr<<"runningParticipations:"<<runningParticipations->size()<<" "<<newRunningParticipations->size()<<endl;
// delete runningParticipations;
// runningParticipations=newRunningParticipations;
// }
// }
// // Look for best set of players
// for(unsigned int r=0;r!=runningParticipations->size();r++){
// if(runningParticipations->at(r).totalDist<minimalGlobalDistance){
// minimalGlobalDistance
// =runningParticipations->at(r).totalDist;
// if(chosenParticipatingPlayers!=NULL)
// delete chosenParticipatingPlayers;
// chosenParticipatingPlayers
// =new vector<unsigned int>(*runningParticipations->at(r).playerNums);
// }
// }
// // This is no longer needed...
// delete runningParticipations;
// // Check the order of resulting vector... players may be in different order
// // as participants
// vector<unsigned int>* res=new vector<unsigned int>;
// // Will cycle players
// // for(unsigned int pl=0; pl!=players->size(); pl++)
// // // will look for this player in participants
// // for(unsigned int pa=0; pa!=participations->size(); pa++)
// // if(players->at(pl)->equals(participations->at(pa)->participant()))
// // res->push_back(chosenParticipatingPlayers->at(pa));
// return res;
//}
void Setplay::setCurrentStep(const unsigned int& stepID,const Context& world){
for(unsigned int i = 0; i!= steps->size(); i++)
if(steps->at(i)->id==stepID){
currentStep=steps->at(i);
currentStep->setActionsAsNotDone();
stepBegin=world.time();
return;
}
// If we got here, then the step was not found
throw SetplayException("SP: (set) Step number not found in Setplay:"+stepID);
}
void Setplay::markAsSuccess(){
successful=true;
}
vector<vector<const Action*>*>*
Setplay::possibleActions(const Context& world) const{
// will output all the Do actions in the valid transitions.
// Some of the members of the returned vector may be empty, when the
// corresponding directive has no Do directives.
// When a transition is not currently valid, the inner vector will be
// set to NULL. This way, the outer vector has exacly the same number of
// members as the possible transitions. This is made for consistency with
// the chosenAction method, which receives the number of the chosen action
vector<vector<const Action*>*>* out = new vector<vector<const Action*>*>;
//There are two different situations: if I am the lead player and the
// nextStep is still not defined , I will send all the possible
// actions in the possible transitions.
// If the nextStep is already defined, then only the actions in this
// transition will be returned
if(currentStep->leadPlayer->value()->number==world.me().number
&& nextStep==NULL){
if(currentStep->transitions!=NULL && currentStep->transitions->size()>0)
for(unsigned int i=0;i!=currentStep->transitions->size();i++)
if(currentStep->transitions->at(i)->getCond()==NULL
||currentStep->transitions->at(i)->getCond()
->eval(world))// transition is currently valid
out->push_back(currentStep->transitions->at(i)
->getDoActionsForPlayer(world.me()));
else // transition is not valid
out->push_back(NULL);
}
else if(nextStep!=NULL)// Will simply send the presently chosen nextStep
// as result... Always a vector with a single element
for(unsigned int i=0;i!=currentStep->transitions->size();i++)
if(currentStep->transitions->at(i)->isNextStep()
&& ((NextStep*)currentStep->transitions->at(i))->nextStepNumber
==(int)nextStep->id)
out->push_back(currentStep->transitions->at(i)
->getDoActionsForPlayer(world.me()));
// Must check if waitTime has elapsed: only then can actions be executed
// If not, all actions must be set an not active
if(world.time()<(stepBegin+currentStep->waitTime)){
for(unsigned int i=0; i!= out->size(); i++)
for(unsigned int j=0; (out->at(i)!= NULL && j!=out->at(i)->size()); j++)
out->at(i)->at(j)->active=false;
}
else{
// Apparently the active attribute was not being set as true, will force
// it here...
for(unsigned int i=0; i!= out->size(); i++)
for(unsigned int j=0; (out->at(i)!= NULL && j!=out->at(i)->size()); j++)
out->at(i)->at(j)->active=true;
}
return out;
}
vector<const Transition*>*
Setplay::possibleTransitions(const Context& world) const{
// will output all the valid transitions.
// When a transition is not currently valid, the inner vector will be
// set to NULL. This way, the outer vector has exacly the same number of
// members as the possible transitions. This is made for consistency with
// the chosenTransition method, which receives the number of the chosen action
vector<const Transition*>* out = new vector<const Transition*>;
// There are two different situations: if I am the lead player and the
// nextStep is still not defined , I will send all the possible
// transitions.
// If the transition is already defined, then only this transition will
// be returned
if(currentStep->leadPlayer->value()->number==world.me().number
&& nextStep==NULL){
if(currentStep->transitions!=NULL && currentStep->transitions->size()>0)
for(unsigned int i=0;i!=currentStep->transitions->size();i++)
if(currentStep->transitions->at(i)->getCond()==NULL
||currentStep->transitions->at(i)->getCond()
->eval(world))// transition is currently valid
out->push_back(currentStep->transitions->at(i));
else // transition is not valid
out->push_back(NULL);
}
else if(nextStep!=NULL) // Will simply send the presently chosen nextStep
// as result... Always a vector with a single element
for(unsigned int i=0;i!=currentStep->transitions->size();i++)
if(currentStep->transitions->at(i)->isNextStep()
&& ((NextStep*)currentStep->transitions->at(i))->nextStepNumber
==(int)nextStep->id)
out->push_back(currentStep->transitions->at(i));
return out;
}
void Setplay::chosenAction(const unsigned int& chosenActionNumber,
const Context& world){
// Consistency checks
if(currentStep->transitions==NULL
|| chosenActionNumber>=currentStep->transitions->size()){
throw SetplayException("SP: Invalid transition number: outside of range");
return;
}
// Sera' remendo?
// Se o nextStep ja' estiver escolhido, nao devia ser chamado...
// if(nextStep!=NULL){
// cerr<<"SP: chosenAction is being called, but next step was already"
// <<" chosen..."<<endl;
// }
if(nextStep!=NULL && chosenActionNumber==0)
return;
if(currentStep->transitions->at(chosenActionNumber)->getCond()!=NULL
&&!currentStep->transitions->at(chosenActionNumber)->getCond()
->eval(world)){
throw SetplayException(" Invalid transition: not currently verified");
return;
}
else{
//if(chosenActionNumber>0)
//cout<<"SP: foi-me comunicada uma transicao:"<<chosenActionNumber<<" de:"
// <<currentStep->transitions->size()<<endl;
//get the transition
Transition* chosenTransition
=currentStep->transitions->at(chosenActionNumber);
//check if setplay is ended by a finish or abort
if(!chosenTransition->isNextStep()){
done=true;
// register success
if(chosenTransition->isFinish())
successful=true;
}
else{// There is a next step
if(nextStep==NULL
||((NextStep*)chosenTransition)->nextStepNumber!= (int)nextStep->id){
nextStep=getStep(((NextStep*)chosenTransition)
->nextStepNumber);
currentActions=NULL;
}
}
}
}
void Setplay::chosenTransition(const unsigned int& chosenTransitionNumber,
const Context& world){
// Consistency checks
if(currentStep->transitions==NULL
|| chosenTransitionNumber>=currentStep->transitions->size()){
throw SetplayException(" Invalid transition number: outside of range");
return;
}
// If nextStep is already chosen, this should not be called...
if(nextStep!=NULL){
// CAUTION
cerr<<"SP: chosenTransition is being called, but next step was already"
<<" chosen..."<<endl;
}
if(currentStep->transitions->at(chosenTransitionNumber)->getCond()!=NULL
&&!currentStep->transitions->at(chosenTransitionNumber)->getCond()->eval(world)){
throw SetplayException("Invalid transition: not currently verified");
return;
}
else{
//if(chosenActionNumber>0)
//cout<<"SP: foi-me comunicada uma transicao:"<<chosenActionNumber<<" de:"
// <<currentStep->transitions->size()<<endl;
//get the transition
Transition* chosenTransition
=currentStep->transitions->at(chosenTransitionNumber);
//check if setplay is ended by a finish or abort
if(!chosenTransition->isNextStep()){
cerr<<"SP: Out' ("<<world.me().number<<") of Setplay! End transition..."<<endl;
done=true;
// register success
if(chosenTransition->isFinish())
successful=true; }
else{// There is a next step
if(nextStep==NULL
||((NextStep*)chosenTransition)->nextStepNumber!= (int)nextStep->id){
nextStep=getStep(((NextStep*)chosenTransition)
->nextStepNumber);
currentActions=NULL;
}
}
}
}
void Setplay::updateInternalState(const Context& world){
// If there is no currentStep, sth went wrong.
if(currentStep==NULL){
throw SetplayException("SP: CurrentStep is NULL in setplay execution!");
done=true;
return;
}
//Update wasLastLeadPlayer
if(wasLastLeadPlayer && world.time()-stepBegin > messageRepeatTime){
//cout<<"SP: passei ("<<me->number<<") wasLastLeadPlayer para false em"
//<<currentTime<<endl;
wasLastLeadPlayer=false;
}
//Check if abortCond is satisfied
//LMOTA 2011: will be done only by the lead player, to avoid
// different behaviours in different players. Only the lead player will
// decide this, all other players must wait for corresponding message
if(currentStep->leadPlayer->value()->number==world.me().number
&& abortCond!=NULL && abortCond->eval(world)){
done=true;
successful=false;
return;
}
//Check if step abort time has been reached
// Will be done by all players, since it is similar to all
if(currentStep->abortTime!=0 &&
(world.time()>(stepBegin+currentStep->abortTime))){
done=true;
return;
}
// Step change
// Will be done only by the leadPlayer if there is communication
// If there is no Communication, everyone does it
// Vector only with my reference, in order to see if am Ball Owner
//const PlayerID* arrayMe[]={new const PlayerID("our",me->number)};
vector<const PlayerReference*> vectMe ;
vectMe.push_back(new const PlayerID("our",world.me().number));
if(!commAllowed || currentStep->leadPlayer->value()->number==world.me().number
// will also check if I am ball owner
|| CondBallOwner(vectMe).eval(world)){
if(nextStep!=NULL)
//Verify if a new step has been reached
if(waitTimeHasElapsed(world)
&& (nextStep->condition==NULL
||nextStep->condition->eval(world))
&& (nextStep->leadPlayer->value()->number==world.me().number
||currentStep->leadPlayer->value()->number==world.me().number)){
// Change is only done if I am the current, or the next, leadPlayer...
// This is used for situations when the coach is a fixed agent, like
// the coach in the middle-size league, and other players should not
// be changing steps on their own...
bool wasLeadPlayer=currentStep->leadPlayer->value()->number==world.me().number;
//change the settings...
setCurrentStep(nextStep->id,world);
nextStep=NULL;
stepBegin=world.time();
// Check if this new step can be trivially finished through a
// finish/abort with satisfied conditions..
for(unsigned int i=0; i!=currentStep->transitions->size();i++)
if(!currentStep->transitions->at(i)->isNextStep() &&
(currentStep->transitions->at(i)->getCond()==NULL||
currentStep->transitions->at(i)->getCond()->eval(world))){
done=true;
if(currentStep->transitions->at(i)->isFinish()){
successful=true;
}
else{
successful=false;
}
}
if(wasLeadPlayer
&& currentStep->leadPlayer->value()->number!=world.me().number)
wasLastLeadPlayer=true;
else
wasLastLeadPlayer=false;
}
}
//Check if a nextStep exists...
if(nextStep!=NULL){
//Check if actions are yet to set
if(currentActions==NULL
||currentActions->size()==0){
//check if there are transitions...
if(currentStep->transitions==NULL
||currentStep->transitions->size()==0){
// no transitions... will exit
done=true;
return;
}
else{
for(unsigned int i=0;
i!=currentStep->transitions->size();i++)
if(currentStep->transitions->at(i)->isNextStep()
&&((NextStep*)currentStep->transitions->at(i))
->nextStepNumber
==(int)nextStep->id){
currentActions=
((NextStep*)currentStep->transitions->at(i))
->getDoActionsForPlayer(world.me());
}
// Check if currentActions are enabled, and set corresponding attribute
if(currentActions!=NULL)
if(!waitTimeHasElapsed(world))
for(unsigned int i=0;i!=currentActions->size();i++)
currentActions->at(i)->active=false;
else
for(unsigned int i=0;i!=currentActions->size();i++)
currentActions->at(i)->active=true;
}
}
}
}
// Was never really used, must be properly tested
void Setplay::executeSetplay(const Context& world,
Action::Executor& exec){
updateInternalState(world);
//Check if there are actions to execute
vector<vector<const fcportugal::setplay::Action* > *> * spActions=
possibleActions(world);
// Will only choose action if this has not been done before
// and if I am the lead player
if(spActions && (int)spActions->size()>0 && !isNextStepAlreadyChosen()
&& amLeadPlayer(world)){
// action chosen is the first which is not NULL
int chosenActionNum=-1;
for(unsigned int a=0; spActions!=NULL && a!=spActions->size(); a++)
if(spActions->at(a)!=NULL){
chosenActionNum=a;
break;
}
if(chosenActionNum!=-1
&& spActions->at(chosenActionNum)
&& spActions->at(chosenActionNum)->size()>0)
chosenAction(chosenActionNum,world);
}
currentAction(world)->getExecuted(exec);
}
// Check if the setplay is over
bool Setplay::isDone() const{
if(!instantiated)
throw SetplayException("Trying to see if a non instantiated plan is done!");
return done;
}
bool Setplay::isNextStepAlreadyChosen() const{
return nextStep!=NULL;
}
const PlayerID* Setplay::nextStepLeadPlayer() const{
if(!isNextStepAlreadyChosen())
return NULL;
return nextStep->leadPlayer->value();
}
int Setplay::currentStepNumber() const{
if(currentStep==NULL){
throw SetplayException("CurrentStep should not be null!");
assert(false); //Bust
return 0;
}
else
return currentStep->id;
}
int Setplay::nextStepNumber() const{
if(nextStep==NULL)
return -1;
return nextStep->id;
}
bool Setplay::isPossible(const Context& world) const{
assert(instantiated);
return steps->at(0)->condition->eval(world);
}
double Setplay::currentStepInitTime() const{
assert(instantiated);
assert(currentStep);
return stepBegin;
}
const Point* Setplay::myCurrentPositioning(const Context& world)const{
assert(instantiated);
assert(currentStep);
return currentStep->currentPositioning(&(world.me()),world);
}
const Point* Setplay::currentPositioning(unsigned int num,
const Context& world)const{
assert(instantiated);
assert(currentStep);
return currentStep->currentPositioning(new PlayerID("our",num),world);
}
const Action* Setplay::currentAction(const Context& world) const{
assert(currentStep);
if(currentActions!= NULL && currentActions->size()>0)
for(unsigned int i=0; i!=currentActions->size();i++){
const Action* a=
currentActions->at(i)->necessaryAction(world.me(),world);
if(a!=NULL){
if(!waitTimeHasElapsed(world))
a->active=false;
else
a->active=true;
return a;
}
}
return NULL;
}
bool Setplay::playerParticipates(const PlayerID* id) const{
assert(instantiated);
// At Setplay beginning, current Step will not be set. In this case, will
// look at the player list
if(currentStep==NULL){
for(unsigned int i =0; i!=players.size();i++){
if(players.at(i)->value()->team=="our"
&&players.at(i)->value()->number==id->number)
return true;
}
return false;
}
else{
assert(currentStep->participants);
for(unsigned int i =0; i!=currentStep->participants->size();i++){
if(currentStep->participants->at(i)->participant()->value()->team=="our"
&¤tStep->participants->at(i)->participant()->value()->number
==id->number)
return true;
}
return false;
}
}
bool Setplay::amLeadPlayer(const Context& world) const{
assert(instantiated);
return currentStep!=NULL && currentStep->leadPlayer->value()->team=="our"
&& currentStep->leadPlayer->value()->number==world.me().number;
}
const PlayerID* Setplay::leadPlayer() const{
assert(instantiated && currentStep!=NULL);
return currentStep->leadPlayer->value();
}
bool Setplay::waitTimeHasElapsed(const Context& world) const{
assert(instantiated && currentStep);
return world.time()-stepBegin>=currentStep->waitTime;
}
// COMMUNICATION
bool Setplay::willCommunicate(const Context& world) const{
//Use ifs to write debug messages...
if(currentStep==NULL || !commAllowed || !playerParticipates(&(world.me())))
// FA 22/06/2010 - Added playerParticipates(me) to avoid non participating
// players to interfere setplays
return false;
//Repeat step message
if(currentStep->id!=0 && wasLastLeadPlayer && world.time()!=0
&& (world.time()-stepBegin)<messageRepeatTime){
return true;
}
if(world.time()==0||amLeadPlayer(world)){
return true;
}
if(!singleChannelComm){
return true;
}
return false;
}
SetplayMessage* Setplay::messageToSend(const Context& world) const{
//If message is done, send according message
if(done)
return new StepMessage(world.time(),-1,successful?1:-1);
if((currentStep->id==0 && nextStep==NULL)// Init Message...
|| (world.time()-setplayBegin)<messageRepeatTime){
// To assure repetition of message...
vector<const string*>* args=new vector<const string*>;
//insert parameters in instantiation vector
for(unsigned int i=0; i!= parameters->size();i++)
args->push_back(new string(parameters->at(i)->instantiationText(world,
true)));
//insert players in instantiation vector
for(unsigned int i=0; i!= players.size();i++)
if(players.at(i)->isRole())
args->push_back(new string(players.at(i)->instantiationText(world,
true)));
return new InitMessage(stepBegin,setplayNumber,args);
}
else
return new StepMessage(stepBegin,currentStep->id,
(nextStep!=NULL?(int)nextStep->id:-1));
}
void Setplay::processReceivedMessage(const StepMessage& m,
const Context& world){
// LMOTA : inactivated this! the lead player was not moving
// to next step when it received a message from the next lead player
// and was later aborting, due to abortTime...
// When I am the lead player, I will ignore all messages.
//if(currentStep->leadPlayer->value()->number==me->number)
//return;
// Check if message is announcing the ending of Setplay: currentStep==-1
if(m.currentStepNumber==-1){
done=true;
// Check if it was successful
if(m.nextStepNumber==1)
successful=true;
return;
}
// Check if message contains already known information and can therefore
// be discarded
if((int)currentStep->id==m.currentStepNumber &&
((nextStep==NULL && m.nextStepNumber==-1)
||(nextStep!=NULL && (int)nextStep->id==m.nextStepNumber))){
//cerr<<"SP:"<<me->number<<" discarding known info"<<endl;
return;
}
// CAUTION think about this
// Is it relevant if Message is from leadPlayer or not?
// As far as I can see, even if the message comes from another player, the
// decision must have come from the lead player. Therefore, the agent will
// abide to it, if it is equal to the current nextStep, or the
// current nexrStep is null
if((int)currentStep->id!=m.currentStepNumber){
if(nextStep == NULL ||
(int)nextStep->id==m.currentStepNumber){//Change in current step
setCurrentStep(m.currentStepNumber,world);
nextStep=NULL;
if(currentActions!=NULL)
delete currentActions;
currentActions=NULL;
}
else{// Stray message
return;
}
}
if(m.nextStepNumber!=-1
&& (nextStep==NULL || (int)nextStep->id!=m.nextStepNumber)){
nextStep=getStep(m.nextStepNumber);
if(currentActions!=NULL)
delete currentActions;
currentActions=NULL;
}
}
//--------------------------------------------------------------------------
// STEP CLASS
//--------------------------------------------------------------------------
Step::Step(int const id_, double const waitTime_, double const abortTime_)
:id(id_),waitTime(waitTime_),abortTime(abortTime_),transitions(NULL),
leadPlayer(NULL),condition(NULL),participants(NULL){
}
void Step::print(ostream &os) const{
os<<"(step :id " << id
<<" :waitTime " << waitTime
<<" :abortTime " << abortTime
<<" :participants (list ";
for(unsigned int i=0; i!= participants->size();i++){
participants->at(i)->print(os);
os<<" ";
}
os<<") ";// fim participants
//condition
if(condition!=NULL){
os<<":condition ";
condition->print(os);
}
//leadPlayer
if(leadPlayer!=NULL){
os<<" :leadPlayer ";
leadPlayer->print(os);
}
//transitions
if(transitions!=NULL){
os<<" :transitions (list ";
for(unsigned int i=0; i!= transitions->size();i++){
transitions->at(i)->print(os);
os<<" ";
}
os<<"))";
}
}
void Step::print2(ostream &os, unsigned int& indent) const
{
os<<"(step :id " << id
<<" :waitTime " << waitTime
<<" :abortTime " << abortTime;
os << "\n";
indent++;
for(unsigned int i= 0; i < indent; i++)
os << "\t";
os <<" :participants" << "\n";
indent++;
for(unsigned int i= 0; i < indent; i++)
os << "\t";
os << "(list";
indent++;
for(unsigned int i=0; i!= participants->size();i++){
os << "\n";
for(unsigned int t= 0; t < indent; t++)
os << "\t";
participants->at(i)->print(os);
}
os << "\n";
indent--;
for(unsigned int i= 0; i < indent; i++)
os << "\t";
os << ")" << "\n"; // end participants
indent--;
for(unsigned int i= 0; i < indent; i++)
os << "\t";
//condition
if(condition!=NULL)
{
os<<" :condition ";
condition->print(os);
os << "\n";
for(unsigned int i= 0; i < indent; i++)
os << "\t";
}
//leadPlayer
if(leadPlayer!=NULL){
os<<" :leadPlayer ";
leadPlayer->print(os);
os << "\n";
for(unsigned int i= 0; i < indent; i++)
os << "\t";
}
//transitions
if(transitions!=NULL){
os<< " :transitions" << "\n";
indent++;
for(unsigned int i= 0; i < indent; i++)
os << "\t";
os << "(list ";
indent++;
for(unsigned int i=0; i!= transitions->size();i++){
os << "\n";
for(unsigned int t= 0; t < indent; t++)
os << "\t";
transitions->at(i)->print2(os, indent);
}
indent--;
os << "\n";
for(unsigned int i= 0; i < indent; i++)
os << "\t";
os<< ")" << "\n";
indent-=2;
for(unsigned int i= 0; i < indent; i++)
os << "\t";
os << ")";
}
}
const Point* Step::currentPositioning(const PlayerReference* pid,
const Context& world)const{
for(unsigned int i = 0; participants && i!=participants->size();i++){
if(participants->at(i)->participant()->equals(pid)
&& participants->at(i)->location()!=NULL)
return participants->at(i)->location()->getCentralPoint(world);
}
return NULL;
}
void Step::setActionsAsNotDone() const{
for(unsigned int i=0; i!= transitions->size(); i++)
transitions->at(i)->setActionsAsNotDone();
}
Step* Step::parse(const string in, string& out,
const vector<SetplayParameter*>& parameters,
const vector<PlayerReference*>& players){
unsigned short id;
rule<> step_p
= *space_p >> str_p("(step") >> *space_p >> ":id" >> *space_p
>> uint_p[assign_a(id)];
parse_info<> result = BOOST_SPIRIT_CLASSIC_NS::parse(in.c_str(),step_p,
nothing_p);
if(result.hit){
string rest=in.substr(result.length);
//time attributes
int waitTime=0, abortTime=0;
rule<> time_p
= *space_p >> str_p(":waitTime") >> *space_p
>> uint_p[assign_a(waitTime)];
result = BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),time_p,
nothing_p);
if(result.hit)
rest=rest.substr(result.length);
time_p
= *space_p >> str_p(":abortTime") >> *space_p
>> uint_p[assign_a(abortTime)] >> *space_p;
result = BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),time_p,
nothing_p);
if(result.hit)
rest=rest.substr(result.length);
//Check for participants' labels
result = BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),
*space_p>>":participants"
>>*space_p>>"(list",
nothing_p);
if(result.hit){
//Must parse Participations. Amount is not pre-defined
//Will parse the first one, is mandatory
Participation* pl=
Participation::parse(rest.substr(result.length),
rest,parameters,players);
if(pl){
// To store the players
vector<Participation*>* participants = new vector<Participation*>;
while(pl){
participants->push_back(pl);
//Parse a new player
pl= Participation::parse(rest,rest,parameters,players);
}
//Check ')'
result = BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),
*space_p >> ')',
nothing_p);
if(result.hit){
rest=rest.substr(result.length);
Cond* cond=NULL;
//Check :cond, not mandatory
rule<> cond_p = *space_p >> ":condition";
result =BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),cond_p,
nothing_p);
if(result.hit){
rest=rest.substr(result.length);
cond=Cond::parse(rest,rest,parameters,players);
if(!cond){
cerr<<"\n Missing cond in Step:"<<id <<endl;
out=in;
return NULL;
}
}
//parse leadPlayer, mandatory
rule<> lp_p = *space_p >> ":leadPlayer" >> *space_p ;
result =BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),lp_p,
nothing_p);
if(result.hit){
rest=rest.substr(result.length);
PlayerReference* lp
= (PlayerReference*)PlayerReference::parse(rest,rest,
parameters,players);
if(lp){
//check ":trasitions"
result = BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),
*space_p >> ":transitions" >>
*space_p >> "(list",
nothing_p);
if(result.hit){
vector<Transition*>* transitions = new vector<Transition*>;
//Must parse transition
Transition* tran=Transition::parse(rest.substr(result.length),
rest,parameters,
players);
while(tran){
transitions->push_back(tran);
tran= Transition::parse(rest,rest,parameters,players);
}
//Check for the final '))'
result = BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),
*space_p>>')'
>>*space_p>>')',
nothing_p);
if(result.hit){
out=rest.substr(result.length);
Step* res = new Step(id, waitTime,abortTime);
res->transitions=transitions;
res->condition=cond;
res->leadPlayer=lp;
res->participants=participants;
return res;
}
}
}
}
}
}
}
}
out=in;
return NULL;
}
Step* Step::deepCopy(const vector<SetplayParameter*>& params,
const vector<PlayerReference*>& players) const{
Step* step_copy= new Step(id, waitTime, abortTime);
step_copy->transitions = new vector<Transition*>;
for(unsigned int i = 0; i!= transitions->size(); i++)
step_copy->transitions
->push_back(transitions->at(i)->deepCopy(params,players));
step_copy->participants = new vector<Participation*>;
for(unsigned int i = 0; i!= participants->size(); i++)
step_copy->participants
->push_back(participants->at(i)
->deepCopy(params,players));
if(condition!=NULL)
step_copy->condition = condition->deepCopy(params,players);
else
step_copy->condition=NULL;
if(leadPlayer!=NULL)
step_copy->leadPlayer=(PlayerReference*)leadPlayer->deepCopy(params,players);
else
step_copy->leadPlayer=NULL;
return step_copy;
}
Step* Step::inversion(const vector<SetplayParameter*>& params,
const vector<PlayerReference*>& players) const{
Step* step_copy= new Step(id, waitTime, abortTime);
step_copy->transitions = new vector<Transition*>;
for(unsigned int i = 0; i!= transitions->size(); i++)
step_copy->transitions
->push_back(transitions->at(i)->inversion(params,players));
step_copy->participants = new vector<Participation*>;
for(unsigned int i = 0; i!= participants->size(); i++)
step_copy->participants
->push_back(participants->at(i)
->inversion(params,players));
if(condition!=NULL)
step_copy->condition = condition->inversion(params,players);
else
step_copy->condition=NULL;
if(leadPlayer!=NULL)
step_copy->leadPlayer=(PlayerReference*)leadPlayer->deepCopy(params,
players);
else
step_copy->leadPlayer=NULL;
return step_copy;
}
void Step::substituteNamedRegions(const Context& world){
if(condition!=NULL)condition->substituteNamedRegions(world);
for(unsigned int i = 0; i!= participants->size(); i++)
participants->at(i)->substituteNamedRegions(world);
for(unsigned int i = 0; i!= transitions->size(); i++)
transitions->at(i)->substituteNamedRegions(world);
}
//---------------------------------------------------------------------------
// TRANSITION METHODS
//---------------------------------------------------------------------------
Transition* Transition::parse(const string in, string& out,
const vector<SetplayParameter*>& parameters,
const vector<PlayerReference*>& players){
unsigned short isAbort=0, isFinish=0, isNextStep=0;
unsigned short nextStepID=0;//Only for nextStep
rule<> tran_p
= *space_p >> str_p("(abort");
parse_info<> result = BOOST_SPIRIT_CLASSIC_NS::parse(in.c_str(),tran_p,
nothing_p);
string rest;
if(result.hit){
isAbort=1;
rest=in.substr(result.length);
}
tran_p
= *space_p >> str_p("(finish");
result = BOOST_SPIRIT_CLASSIC_NS::parse(in.c_str(),tran_p,
nothing_p);
if(result.hit){
isFinish=1;
rest=in.substr(result.length);
}
tran_p
= *space_p >> str_p("(nextStep");
result = BOOST_SPIRIT_CLASSIC_NS::parse(in.c_str(),tran_p,
nothing_p);
if(result.hit){
isNextStep=1;
rest=in.substr(result.length);
//Parse next step number
tran_p
= *space_p >> ":id" >> *space_p >> uint_p[assign_a(nextStepID)];
result = BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),tran_p,
nothing_p);
if(result.hit)
rest=rest.substr(result.length);
else{
out=in;
return NULL;
}
}
if(isNextStep+isFinish+isAbort!=1){// only one can have been parsed
out=in;
return NULL;
}
Cond* cond=NULL;
//Check :cond, not mandatory
rule<> cond_p = *space_p >> ":condition";
result =BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),cond_p,
nothing_p);
if(result.hit){
rest=rest.substr(result.length);
cond=Cond::parse(rest,rest,parameters,players);
if(!cond){
cerr<< "Missing cond in Transition parse\n";
out=in;
return NULL;
}
}
// To store the directives
vector<Directive*>* dirs = new vector<Directive*>;
//Check for directives' labels
result = BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),
*space_p>>":directives"
>>*space_p>>"(list",
nothing_p);
if(result.hit){
//Must parse directives. Amount is not pre-defined
Directive* dir=
Directive::parse(rest.substr(result.length),rest,parameters,players);
while(dir){
dirs->push_back(dir);
//Parse a new Directive
dir= Directive::parse(rest, rest,parameters,players);
}
//Check ')'
result = BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),
*space_p >> ')',
nothing_p);
if(!result.hit){
cerr<<"\nMissing directive list termination or invalid directives. Got:"
<<rest<<endl;
out=in;
return NULL;
}
else
rest=rest.substr(result.length);
}
//Check final ')'
result = BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),
*space_p >> ')',
nothing_p);
if(result.hit){
out=rest.substr(result.length);
if(isAbort)
return new Abort(cond, dirs);
if(isFinish)
return new Finish(cond, dirs);
if(isNextStep)
return new NextStep(nextStepID,cond, dirs);
}
out=in;
return NULL;
}
vector<const Action*>* Transition::getDoActionsForPlayer(const PlayerID& p){
vector<const Action*>* allActions= new vector<const Action*>;
for(unsigned int i=0; i!=directives->size();i++)
if(directives->at(i)->isDo()){
for(unsigned int j=0; j!=directives->at(i)->getPlayers().size();j++)
if(directives->at(i)->getPlayers().at(j)->value()->equals(&p))
allActions->insert(allActions->end(),
directives->at(i)->getActions()->begin(),
directives->at(i)->getActions()->end());
}
return allActions;
}
void Transition::setActionsAsNotDone() const{
for(unsigned int i=0; i!= directives->size(); i++)
directives->at(i)->setActionsAsNotDone();
}
void Transition::substituteNamedRegions(const Context& world){
if(cond!=NULL)
cond->substituteNamedRegions(world);
if(directives!=NULL)
for(unsigned int i = 0; i!= directives->size();i++)
directives->at(i)->substituteNamedRegions(world);
}
void Transition::writeAux(ostream &os) const{
if(cond!=NULL){
os<<" :condition ";
cond->print(os);
}
os<<" :directives (list";
if(directives!=NULL)
for(unsigned int i = 0; i!= directives->size();i++)
directives->at(i)->print(os);
os<<")";
};
void Transition::writeAux2(ostream &os, unsigned int &indent) const{
if(cond!=NULL){
os << "\n";
for(unsigned int i= 0; i < indent; i++)
os << "\t";
os<<" :condition ";
cond->print(os);
}
os << "\n";
for(unsigned int i= 0; i < indent; i++)
os << "\t";
os << " :directives" << "\n";
indent++;
for(unsigned int i= 0; i < indent; i++)
os << "\t";
os << "(list" << "\n";
indent++;
if(directives!=NULL)
for(unsigned int i = 0; i!= directives->size();i++)
directives->at(i)->print2(os, indent);
indent--;
os << "\n";
for(unsigned int i= 0; i < indent; i++)
os << "\t";
os<<")";
indent--;
};
Transition* Abort::deepCopy(const vector<SetplayParameter*>& params,
const vector<PlayerReference*>& players) const{
Abort* res = new Abort();
if(getCond()!=NULL)
res->setCond(getCond()->deepCopy(params,players));
if(getDirectives()!=NULL){
vector<Directive*>* dir_new=new vector<Directive*>;
for(unsigned int i = 0; i!= directives->size();i++)
dir_new->push_back(directives->at(i)->deepCopy(params,players));
res->setDirectives(dir_new);
}
return res;
};
Transition* Abort::inversion(const vector<SetplayParameter*>& params,
const vector<PlayerReference*>& players) const{
Abort* res = new Abort();
if(getCond()!=NULL)
res->setCond(getCond()->inversion(params,players));
if(getDirectives()!=NULL){
vector<Directive*>* dir_new=new vector<Directive*>;
for(unsigned int i = 0; i!= directives->size();i++)
dir_new->push_back(directives->at(i)->inversion(params,players));
res->setDirectives(dir_new);
}
return res;
};
Transition* Finish::deepCopy(const vector<SetplayParameter*>& params,
const vector<PlayerReference*>& players) const{
Finish* res = new Finish();
if(getCond()!=NULL)
res->setCond(getCond()->deepCopy(params,players));
if(getDirectives()!=NULL){
vector<Directive*>* dir_new=new vector<Directive*>;
for(unsigned int i = 0; i!= directives->size();i++)
dir_new->push_back(directives->at(i)->deepCopy(params,players));
res->setDirectives(dir_new);
}
return res;
};
Transition* Finish::inversion(const vector<SetplayParameter*>& params,
const vector<PlayerReference*>& players) const{
Finish* res = new Finish();
if(getCond()!=NULL)
res->setCond(getCond()->inversion(params,players));
if(getDirectives()!=NULL){
vector<Directive*>* dir_new=new vector<Directive*>;
for(unsigned int i = 0; i!= directives->size();i++)
dir_new->push_back(directives->at(i)->inversion(params,players));
res->setDirectives(dir_new);
}
return res;
};
NextStep::~NextStep(){
}
void NextStep::print(ostream &os) const{
os<<"(nextStep :id "<<nextStepNumber;
writeAux(os) ;
os<<")";
}
void NextStep::print2(ostream &os, unsigned int &indent) const{
os<<"(nextStep :id "<<nextStepNumber;
indent++;
writeAux2(os,indent) ;
indent--;
os << "\n";
for(unsigned int i= 0; i < indent; i++)
os << "\t";
os<<")";
}
Transition* NextStep::deepCopy(const vector<SetplayParameter*>& params,
const vector<PlayerReference*>& players) const{
vector<Directive*>* dir_new=NULL;
if(getDirectives()!=NULL){
dir_new=new vector<Directive*>;
for(unsigned int i = 0; i!= directives->size();i++)
dir_new->push_back(directives->at(i)->deepCopy(params,players));
}
return new NextStep(nextStepNumber,
(getCond() == NULL?NULL:
getCond()->deepCopy(params,players)),
dir_new);
}
Transition* NextStep::inversion(const vector<SetplayParameter*>& params,
const vector<PlayerReference*>& players) const{
vector<Directive*>* dir_new=NULL;
if(getDirectives()!=NULL){
dir_new=new vector<Directive*>;
for(unsigned int i = 0; i!= directives->size();i++)
dir_new->push_back(directives->at(i)->inversion(params,players));
}
return new NextStep(nextStepNumber,
(getCond() == NULL?NULL:
getCond()->inversion(params,players)),
dir_new);
}
Participation* Participation::parse(const string in, string& out,
const vector<SetplayParameter*>& parameters,
const vector<PlayerReference*>& players){
rule<> part_p
= *space_p >> str_p("(at");
parse_info<> result = BOOST_SPIRIT_CLASSIC_NS::parse(in.c_str(),part_p,
nothing_p);
string rest;
if(result.hit){
// must parse player and location
PlayerReference* pl
=(PlayerReference*)PlayerReference::parse(in.substr(result.length),
rest,parameters,players);
Region* loc=Region::parse(rest,rest,parameters,players);
if(pl && loc){
//check final ')'
result = BOOST_SPIRIT_CLASSIC_NS::parse(rest.c_str(),*space_p >> ')',
nothing_p);
if(result.hit){
out=rest.substr(result.length);
return new Participation(pl,loc);
}
}
}
else{
//Check for player without location
PlayerReference* pl
=(PlayerReference*)PlayerReference::parse(in,rest,parameters,players);
if(pl){
out=rest;
return new Participation(pl);
}
}
out=in;
return NULL;
}
void Participation::print(ostream &os) const{
if(location_)
os << "(at ";
participant_->print(os);
if(location_){
os<<" ";
location_->print(os);
os<<")";
}
}
Participation* Participation::deepCopy(const vector<SetplayParameter*>& params,
const vector<PlayerReference*>& players) const{
return new Participation((PlayerReference*)participant_->deepCopy(params,players),
(location_?location_->deepCopy(params,players)
:NULL));
}
Participation* Participation::inversion(const vector<SetplayParameter*>& params,
const vector<PlayerReference*>& players)
const{
return new Participation((PlayerReference*)participant_->deepCopy(params,players),
(location_?location_->inversion(params,players)
:NULL));
}
void Participation::substituteNamedRegions(const Context& world){
if(location_)
location_->substituteNamedRegions(world);
}
|
d82385957317fe1d686cddf31b18eeafb848ef6a
|
959a58003f8d17c57922a9297208b19d3f3677f0
|
/catkin_ws/devel/.private/vision_msgs/include/vision_msgs/FindWaving.h
|
ace7b02532b3e23b36f53cf59fe7d55ff1c29b9b
|
[] |
no_license
|
KevinArturoVP/ManipulacionKuka
|
c98af98d0cece5ec2c6c8887bcdab110589d43c4
|
d81ee77f53d1f9326337c12a8515c99fc69e35be
|
refs/heads/master
| 2023-01-11T08:56:53.358563
| 2020-11-06T19:47:45
| 2020-11-06T19:47:45
| 310,689,293
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,698
|
h
|
FindWaving.h
|
// Generated by gencpp from file vision_msgs/FindWaving.msg
// DO NOT EDIT!
#ifndef VISION_MSGS_MESSAGE_FINDWAVING_H
#define VISION_MSGS_MESSAGE_FINDWAVING_H
#include <ros/service_traits.h>
#include <vision_msgs/FindWavingRequest.h>
#include <vision_msgs/FindWavingResponse.h>
namespace vision_msgs
{
struct FindWaving
{
typedef FindWavingRequest Request;
typedef FindWavingResponse Response;
Request request;
Response response;
typedef Request RequestType;
typedef Response ResponseType;
}; // struct FindWaving
} // namespace vision_msgs
namespace ros
{
namespace service_traits
{
template<>
struct MD5Sum< ::vision_msgs::FindWaving > {
static const char* value()
{
return "a5efa18c4fad16dbe94cb16a4d7151ec";
}
static const char* value(const ::vision_msgs::FindWaving&) { return value(); }
};
template<>
struct DataType< ::vision_msgs::FindWaving > {
static const char* value()
{
return "vision_msgs/FindWaving";
}
static const char* value(const ::vision_msgs::FindWaving&) { return value(); }
};
// service_traits::MD5Sum< ::vision_msgs::FindWavingRequest> should match
// service_traits::MD5Sum< ::vision_msgs::FindWaving >
template<>
struct MD5Sum< ::vision_msgs::FindWavingRequest>
{
static const char* value()
{
return MD5Sum< ::vision_msgs::FindWaving >::value();
}
static const char* value(const ::vision_msgs::FindWavingRequest&)
{
return value();
}
};
// service_traits::DataType< ::vision_msgs::FindWavingRequest> should match
// service_traits::DataType< ::vision_msgs::FindWaving >
template<>
struct DataType< ::vision_msgs::FindWavingRequest>
{
static const char* value()
{
return DataType< ::vision_msgs::FindWaving >::value();
}
static const char* value(const ::vision_msgs::FindWavingRequest&)
{
return value();
}
};
// service_traits::MD5Sum< ::vision_msgs::FindWavingResponse> should match
// service_traits::MD5Sum< ::vision_msgs::FindWaving >
template<>
struct MD5Sum< ::vision_msgs::FindWavingResponse>
{
static const char* value()
{
return MD5Sum< ::vision_msgs::FindWaving >::value();
}
static const char* value(const ::vision_msgs::FindWavingResponse&)
{
return value();
}
};
// service_traits::DataType< ::vision_msgs::FindWavingResponse> should match
// service_traits::DataType< ::vision_msgs::FindWaving >
template<>
struct DataType< ::vision_msgs::FindWavingResponse>
{
static const char* value()
{
return DataType< ::vision_msgs::FindWaving >::value();
}
static const char* value(const ::vision_msgs::FindWavingResponse&)
{
return value();
}
};
} // namespace service_traits
} // namespace ros
#endif // VISION_MSGS_MESSAGE_FINDWAVING_H
|
2344bb620eb06cf11c837e5ced41b2026f9f3a1c
|
15a6c97c8cf07d5fa33a660cd3a188e711be80e8
|
/TrafficProject/Map.h
|
5e41e14d417fbaec5145652cb8661f0b94bb1c16
|
[] |
no_license
|
andrewburr/TrafficProject
|
e92b5f788adede40ba6a389eb8062ca8ad142d12
|
30a549e85dc2dce590f87d47c74c8099455b6c4d
|
refs/heads/master
| 2021-01-17T22:40:01.861731
| 2017-04-22T15:42:42
| 2017-04-22T15:42:42
| 84,875,596
| 0
| 1
| null | 2017-04-22T15:43:54
| 2017-03-13T21:18:20
|
C++
|
UTF-8
|
C++
| false
| false
| 385
|
h
|
Map.h
|
//EE273 Project - Group 24
//Cameron Fleming and Andrew Burr
#ifndef MAP_H
#define MAP_H
#include "Box.h"
class Map
{
protected:
Box grid[20][20]; // creates a 20 by 20
public:
//~~Getter Function
Box* getBox(int, int); // returns pointer to box at given coordinates
//~~Constructor Function
Map(){};
//~~Destructor Function
~Map(){};
};
#endif
|
8f9d1d5ab3b16794a70d2de8f02eacbd096de31e
|
f7c92c4f8539e1f4782ee4c4213191849ee97329
|
/1025/1025_pat_ranking.cpp
|
9b62c8c39feb03cc2d6fc66ed18f2e31fc1b4365
|
[] |
no_license
|
insaneyilin/PAT
|
0370b74f6ce69d5fee83c9dd96ba70cdfefa3492
|
d9e2d72dd7ccf8cf41c186fbdd3a516d37b09b8e
|
refs/heads/master
| 2021-01-01T15:25:03.357232
| 2015-11-25T14:54:16
| 2015-11-25T14:54:16
| 39,135,619
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,273
|
cpp
|
1025_pat_ranking.cpp
|
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stdio.h>
using namespace std;
struct Record
{
Record(string reg_num, int s_, int loc_num) :
registration_number(reg_num), score(s_), location_number(loc_num)
{
local_rank = -1;
final_rank = -1;
}
string registration_number;
int score;
int location_number;
int local_rank;
int final_rank;
};
int main(int argc, char * const argv[])
{
int n;
cin >> n;
vector<Record> records;
// 自定义排序规则:按分数降序,分数相同按注册号非降序
auto cmp = [](const Record &a, const Record &b) {
if (a.score == b.score)
return a.registration_number <= b.registration_number;
else
return a.score > b.score;
};
// loc_num 为区域编号,loc_start 为每个区域第一个记录的位置
for (int loc_num = 1, loc_start = 0; loc_num <= n; ++loc_num)
{
int k;
cin >> k;
for (int i = 0; i < k; ++i)
{
string reg_num;
int score;
cin >> reg_num >> score;
records.push_back(Record(reg_num, score, loc_num));
}
// 局部排序
sort(records.begin() + loc_start, records.end(), cmp);
// 计算局部排名
int rank = 0;
for (auto itr = records.begin() + loc_start; itr != records.end(); ++itr)
{
if (itr == records.begin() + loc_start || (itr - 1)->score > itr->score)
{
rank = itr - records.begin() - loc_start + 1;
}
itr->local_rank = rank;
}
loc_start += k;
}
// 全局排序
sort(records.begin(), records.end(), cmp);
cout << records.size() << endl;
// 计算全局排名
int rank = 0;
for (auto itr = records.begin(); itr != records.end(); ++itr)
{
if (itr == records.begin() || (itr - 1)->score > itr->score)
{
rank = itr - records.begin() + 1;
}
itr->final_rank = rank;
cout << itr->registration_number << " " << itr->final_rank << " "
<< itr->location_number << " " << itr->local_rank << endl;
}
return 0;
}
|
77e5cccf24dda43bba9bad4094ba060fb4bd4ec5
|
f4ce8e93a454dd2542510a5fa91f4eb725c4d26b
|
/AKwB_Project_ZADIII/AKwB_Project_ZADIII/AKwB_Project_ZADIII.cpp
|
19c911fd92e3913c4b58f7a18ef40b1f7f40065e
|
[] |
no_license
|
Kaczy6point9/Projects_AKwB
|
1db8bd913cf6c9dace60756ac199970fa6e95afb
|
07e6d9d33cb0aaa850f8297fc56e6486bc92ca23
|
refs/heads/master
| 2021-01-12T16:51:08.660624
| 2017-02-01T21:39:41
| 2017-02-01T21:39:41
| 71,449,397
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 13,662
|
cpp
|
AKwB_Project_ZADIII.cpp
|
// AKwB_Project_ZADIII.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <algorithm>
#include <string>
#include <vector>
using namespace std;
void prase_qual(fstream& file)
{
fstream parsed;
string line;
int line_num = 1;
parsed.open("parsed.qual", ios::out);
while(file)
{
getline(file, line);
if(line_num % 2 == 0)
{
parsed << line << endl;
}
line_num++;
}
parsed.close();
}
class Sequence
{
protected:
int len;
int index;
string nucleotides;
vector <int> qual;
public:
void add_sequence(string seq)
{
this->nucleotides.append(seq);
this->len = nucleotides.size();
}
void set_index(int size)
{
this->index = size;
}
void qual_add(int qual)
{
this->qual.push_back(qual);
}
void resize_qual()
{
this->qual.resize(this->len);
}
int get_len()
{
return this->len;
}
int get_index()
{
return this->index;
}
string get_seq()
{
return this->nucleotides;
}
int get_one_qual(int index)
{
return this->qual[index];
}
void print()
{
cout << this->index << " " << this->len << endl << this->nucleotides << endl;
for (int i = 0; i < len; i++)
{
cout << this->qual[i] << " ";
}
cout << endl;
}
};
class Instance
{
protected:
vector<Sequence*> sequences;
public:
void add_seq(fstream& file)
{
string line;
while (file)
{
getline(file, line);
if (line.size())
{
if (line[0] == '>')
{
Sequence *v = new Sequence();
v->set_index(sequences.size());
getline(file, line);
v->add_sequence(line);
sequences.push_back(v);
}
}
}
}
void add_qual(fstream& file)
{
int seq_num = 0;
int seq_len;
int qual;
while (file)
{
seq_len = sequences[seq_num]->get_len();
for (int i = 0; i < seq_len; i++)
{
file >> qual;
sequences[seq_num]->qual_add(qual);
}
seq_num++;
if (seq_num >= sequences.size())
break;
}
}
int get_size()
{
return sequences.size();
}
void show_vector()
{
for (int i = 0; i < sequences.size(); i++)
{
sequences[i]->print();
}
cout << endl;
}
int get_len_seq(int id_seq)
{
return sequences[id_seq]->get_len();
}
int get_index_seq(int id_seq)
{
return sequences[id_seq]->get_index();
}
string get_seq_seq(int id_seq)
{
return sequences[id_seq]->get_seq();
}
int get_qual_seq(int id_seq, int index)
{
return sequences[id_seq]->get_one_qual(index);
}
};
class Vertex
{
protected:
string label; //podicąg - nasza etykieta w grafie
int position;
int seq_index;
int degree;
vector<int> label_qual; //jakosc podciagu
public:
void add_info(int index, string label, int degree, int position)
{
this->seq_index = index;
this->label = label;
this->degree = degree;
this->position = position;
}
void qual_add(int qual)
{
this->label_qual.push_back(qual);
}
string get_label()
{
return this->label;
}
int get_seq_index()
{
return this->seq_index;
}
int get_position()
{
return this->position;
}
int get_degree()
{
return this->degree;
}
int get_qual_nucl(int index)
{
return this->label_qual[index];
}
void change_degree(int degree)
{
this->degree = degree;
}
void print()
{
cout << this->seq_index << " " << this->position << " " << this -> degree << endl << this->label << endl;
for (int i = 0; i < label_qual.size(); i++)
{
cout << this->label_qual[i] << " ";
}
cout << endl;
}
};
class Graph
{
protected:
vector <Vertex*> vertices;
vector <int> max_found_clique;
vector <vector <int> > clique_series;
public:
Graph(Instance* new_instance, int window)
{
int seq_num; //ilosc sekwencji
seq_num = new_instance->get_size();
for(int sequence = 0; sequence < seq_num; sequence++)
{
for(int i = 0; i < new_instance->get_len_seq(sequence) - window + 1; i++)
{
Vertex *new_vertex = new Vertex();
new_vertex->add_info(new_instance->get_index_seq(sequence), new_instance->get_seq_seq(sequence).substr(i, window), 0, i);
for (int j = 0; j < window; j++)
{
new_vertex->qual_add(new_instance->get_qual_seq(sequence, i + j));
}
vertices.push_back(new_vertex);
}
}
}
int get_verticies_size()
{
return this->vertices.size();
}
void show_vector()
{
for (int i = 0; i < vertices.size(); i++)
{
vertices[i]->print();
}
cout << endl;
}
void connect_verticies(int deletion_parametr, int window, int **matrix)
{
string nucleotide1, nucleotide2;
int deletion_counter = 0;
int marker;
int max_deletion_inside = window/2 - 1;
int graph_size = this->vertices.size();
for(int i = 0; i < graph_size; i++)
{
for(int j = 0; j < graph_size; j++)
{
deletion_counter = 0;
marker=0;
if(this->vertices[i]->get_seq_index() == this->vertices[j]->get_seq_index())
continue;
if(this->vertices[i]->get_label() == this->vertices[j]->get_label())
{
matrix[i][j] = 1;
matrix[j][i] = 1;
continue;
}
string tmp_lable = vertices[i]->get_label();
int counter = 0; //indeks nukleotydu
for(int k = 0; counter < tmp_lable.size(); k++)
{
deletion_counter = k - counter;
if(deletion_counter > max_deletion_inside)
{
marker = 1;
break;
}
nucleotide1 = tmp_lable.substr(counter, 1);
nucleotide2 = vertices[j]->get_label().substr(counter, 1);
if(nucleotide1 != nucleotide2)
{
if(vertices[i]->get_qual_nucl(k) < deletion_parametr)
{
tmp_lable.erase(counter, 1);
}
else
{
marker = 1;
break;
}
}
else
counter++;
}
if(marker == 0)
{
matrix[i][j] = 1;
matrix[j][i] = 1;
}
}
}
}
void change_degree(int **matrix)
{
int degree = 0;
for(int i = 0; i < this->vertices.size(); i++)
{
for(int j = 0; j < this->vertices.size(); j++)
{
degree = degree + matrix[i][j];
}
vertices[i]->change_degree(degree);
degree=0;
}
}
vector <int> look_for_neighbors(int vertex_index, int **matrix)
{
vector <int> neighbors;
for(int i = 0; i < this->vertices.size(); i++)
{
if(matrix[vertex_index][i] == 1)
neighbors.push_back(i);
}
return neighbors;
}
vector <int> best_neighbors(int vertex_index, int degree, int **matrix)
{
vector <int> best_neighbors;
for(int i = 0; i < this->vertices.size(); i++)
{
if(matrix[vertex_index][i] == 1 && vertices[i]->get_degree() >= degree)
best_neighbors.push_back(i);
}
return best_neighbors;
}
vector <int> find_common_neighbors(vector <int> selectec_neighbours, vector <int> best_degree_vertex_neighbours)
{
vector <int> common_neighbors;
set_intersection(selectec_neighbours.begin(), selectec_neighbours.end(), best_degree_vertex_neighbours.begin(), best_degree_vertex_neighbours.end(), back_inserter(common_neighbors));
return common_neighbors;
}
int find_best_degree_vertex(int **matrix, vector<int> neighbors)
{
int max_degree_vertex = 0;
for (int i = 0; i < neighbors.size(); i++)
{
int tmp_index = neighbors[i];
if(vertices[tmp_index]->get_degree() > max_degree_vertex)
max_degree_vertex = tmp_index;
}
return max_degree_vertex;
}
vector <int> &clique(vector <int> &candidates, vector<int> neighbors, int size, int degree, int **matrix)
{
if(neighbors.empty())
{
if(size > degree)
{
return candidates;
}
}
int max_degree_vertex = find_best_degree_vertex(matrix, neighbors);
candidates.push_back(max_degree_vertex);
for (int i = 0; i < neighbors.size(); i++)
{
if (neighbors[i] == max_degree_vertex)
neighbors.erase(neighbors.begin() + i);
}
vector <int> neighbors_of_max_degree_vertex = best_neighbors(max_degree_vertex, degree, matrix);
vector <int> common_neighbors = find_common_neighbors(neighbors, neighbors_of_max_degree_vertex);
clique(candidates, common_neighbors, size + 1, degree, matrix);
return candidates;
}
void max_clique(int **matrix, int degree)
{
vector <int> candidates;
for (int i = 0; i < this->vertices.size(); i++)
{
candidates.push_back(i);
if(vertices[i]->get_degree() >= degree)
{
vector<int> selected_neighbours;
vector<int> neighbors = look_for_neighbors(i, matrix);
for (int j = 0; j < neighbors.size(); j++)
{
int tmp_index = neighbors[j];
if(vertices[i]->get_degree() >= degree)
selected_neighbours.push_back(tmp_index);
}
vector<int> clique_now = clique(candidates, selected_neighbours, 1, degree, matrix);
if (clique_now.size() > this->max_found_clique.size())
this->max_found_clique = clique_now;
}
candidates.clear();
}
}
int max_clique_size()
{
return max_found_clique.size();
}
void create_clique_series()
{
this->clique_series.push_back(max_found_clique);
}
void look_left(int **matrix)
{
for (int i = 0; i < this->clique_series[0].size(); i++)
{
if(this->clique_series[0][i] == 0) //czy jest co porzeszać w lewo
return;
if (this->vertices[this->clique_series[0][i]]->get_seq_index() != this->vertices[this->clique_series[0][i] - 1]->get_seq_index()) //jeżeli sekwencja indeks niżej nie jest taka sama
return;
for (int j = i + 1; j < this->clique_series[0].size(); j++)
{
if (matrix[this->clique_series[0][i] - 1][this->clique_series[0][j] - 1] != 1)//jeżeli wierzchołki o indeksie niżej nie są połączone
return;
}
}
vector <int> tmp_series;
for (int i = 0; i < this->clique_series[0].size(); i++)
{
tmp_series.push_back(this->clique_series[0][i] - 1);
}
this->clique_series.insert(this->clique_series.begin(), tmp_series);
look_left(matrix);
return;
}
void look_right(int **matrix)
{
for (int i = 0; i < this->clique_series[this->clique_series.size() - 1].size(); i++) // do czasu kiedy moze isc w prawo idz w prawo
{
if (clique_series[this->clique_series.size() - 1][i] == this->vertices.size() - 1) //jezeli przekracza rozmiar
return;
if(this->vertices[this->clique_series[this->clique_series.size() - 1][i]]->get_seq_index() != this->vertices[this->clique_series[this->clique_series.size() - 1][i]+1]->get_seq_index())
return;
for (int j = i + 1; j < this->clique_series[this->clique_series.size() - 1].size(); j++)
{
if (matrix[this->clique_series[this->clique_series.size() - 1][i] + 1][this->clique_series[this->clique_series.size() - 1][j] + 1] != 1) //jeżeli wierzchołki nie są połączone
return;
}
}
vector <int> tmp_series;
for (int i = 0; i < this->clique_series[this->clique_series.size() - 1].size(); i++)
{
tmp_series.push_back(this->clique_series[this->clique_series.size() - 1][i] + 1);
}
this->clique_series.push_back(tmp_series);
look_right(matrix);
return;
}
void print_found_labels(Instance *new_instance, int window)
{
int seq_num = 0;
int begining = 0;
int ending = 0;
int len = 0;
for(int i = 0; i < this->clique_series[0].size(); i++)
{
seq_num = vertices[clique_series[0][i]]->get_seq_index();
cout << "In sequence number: " << seq_num << ": ";
begining = vertices[clique_series[0][i]]->get_position();
ending = vertices[clique_series[0][i]]->get_position() + window - 1;
cout << "Starting at position: " << begining << " ending at position: " << ending << ": ";
len = ending - begining + 1;
cout << (new_instance->get_seq_seq(seq_num).substr(begining, len)) << endl;
}
}
};
int _tmain(int argc, _TCHAR* argv[])
{
Instance new_instance;
fstream fasta;
fstream qual;
int window;
int deletion_parametr;
int **matrix;
cout << "Podaj wielkosc okna jaka ma byc sprawdzana: ";
cin >> window;
cout << endl;
cout << "Podaj parametr delecji: ";
cin >> deletion_parametr;
cout << endl;
fasta.open("instance1.fasta", ios::in);
if(fasta)
{
new_instance.add_seq(fasta);
fasta.close();
}
else
{
cout << "Can't open the fasta file" << endl;
}
qual.open("instance1.qual", ios::in);
if(qual)
{
prase_qual(qual);
qual.close();
}
else
{
cout << "Can't open the qual file" << endl;
}
qual.open("parsed.qual", ios::in);
if(qual)
{
new_instance.add_qual(qual);
qual.close();
}
else
{
cout << "Can't open the qual file" << endl;
}
Graph *new_graph = new Graph(&new_instance, window);
matrix = new int *[new_graph->get_verticies_size()];
for (int i = 0; i < new_graph->get_verticies_size(); i++)
{
matrix[i] = new int[new_graph->get_verticies_size()];
for (int j = 0; j < new_graph->get_verticies_size(); j++)
matrix[i][j] = 0;
}
new_graph->connect_verticies(deletion_parametr, window, matrix);
new_graph->change_degree(matrix);
new_graph->max_clique(matrix, 3);
new_graph->create_clique_series();
new_graph->look_left(matrix);
new_graph->look_right(matrix);
new_graph->print_found_labels(&new_instance, window);
//new_graph->show_vector();
//new_instance.show_vector();
system("PAUSE");
return 0;
}
|
2c20b647f132f849438ce90cb5981c13ac3debf8
|
eda03521b87da8bdbef6339b5b252472a5be8d23
|
/Userland/Applications/Browser/ElementSizePreviewWidget.cpp
|
d02fb497ef61bf733a4d34007080b00fa450f947
|
[
"BSD-2-Clause"
] |
permissive
|
SerenityOS/serenity
|
6ba3ffb242ed76c9f335bd2c3b9a928329cd7d98
|
ef9b6c25fafcf4ef0b44a562ee07f6412aeb8561
|
refs/heads/master
| 2023-09-01T13:04:30.262106
| 2023-09-01T08:06:28
| 2023-09-01T10:45:38
| 160,083,795
| 27,256
| 3,929
|
BSD-2-Clause
| 2023-09-14T21:00:04
| 2018-12-02T19:28:41
|
C++
|
UTF-8
|
C++
| false
| false
| 5,205
|
cpp
|
ElementSizePreviewWidget.cpp
|
/*
* Copyright (c) 2022, Michiel Vrins
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "ElementSizePreviewWidget.h"
#include <LibGUI/Painter.h>
namespace Browser {
void ElementSizePreviewWidget::paint_event(GUI::PaintEvent& event)
{
GUI::Frame::paint_event(event);
GUI::Painter painter(*this);
painter.fill_rect(frame_inner_rect(), Color::White);
int outer_margin = 10;
int text_width_padding = 4;
int text_height_padding = 4;
int content_width_padding = 8;
int content_height_padding = 8;
auto content_size_text = DeprecatedString::formatted("{}x{}", m_node_content_width, m_node_content_height);
int inner_content_width = max(100, font().width(content_size_text) + 2 * content_width_padding);
int inner_content_height = max(15, font().pixel_size_rounded_up() + 2 * content_height_padding);
auto format_size_text = [&](Web::CSSPixels size) {
return DeprecatedString::formatted("{:.4f}", size);
};
auto compute_text_string_width = [&](Web::CSSPixels size) {
return font().width(format_size_text(size)) + 2 * text_width_padding;
};
int margin_left_width = max(25, compute_text_string_width(m_node_box_sizing.margin.left));
int margin_right_width = max(25, compute_text_string_width(m_node_box_sizing.margin.right));
int border_left_width = max(25, compute_text_string_width(m_node_box_sizing.border.left));
int border_right_width = max(25, compute_text_string_width(m_node_box_sizing.border.right));
int padding_left_width = max(25, compute_text_string_width(m_node_box_sizing.padding.left));
int padding_right_width = max(25, compute_text_string_width(m_node_box_sizing.padding.right));
// outer rect
auto margin_rect = to_widget_rect({ outer_margin,
outer_margin,
inner_content_width + border_left_width + border_right_width + margin_left_width + margin_right_width + padding_left_width + padding_right_width,
inner_content_height * 7 });
Gfx::IntSize content_size { margin_rect.width() + 2 * outer_margin, margin_rect.height() + 2 * outer_margin };
set_content_size(content_size);
auto border_rect = margin_rect;
border_rect.take_from_left(margin_left_width);
border_rect.take_from_right(margin_right_width);
border_rect.shrink({ 0, inner_content_height * 2 });
auto padding_rect = border_rect;
padding_rect.take_from_left(border_left_width);
padding_rect.take_from_right(border_right_width);
padding_rect.shrink({ 0, inner_content_height * 2 });
auto content_rect = padding_rect;
content_rect.take_from_left(padding_left_width);
content_rect.take_from_right(padding_right_width);
content_rect.shrink({ 0, inner_content_height * 2 });
auto draw_borders = [&](Gfx::IntRect rect, Color color) {
painter.fill_rect(rect.take_from_top(1), color);
painter.fill_rect(rect.take_from_right(1), color);
painter.fill_rect(rect.take_from_bottom(1), color);
painter.fill_rect(rect.take_from_left(1), color);
};
auto draw_size_texts = [&](Gfx::IntRect rect, Color color, Web::Layout::PixelBox box) {
painter.draw_text(rect, format_size_text(box.top), font(), Gfx::TextAlignment::TopCenter, color);
painter.draw_text(rect, format_size_text(box.right), font(), Gfx::TextAlignment::CenterRight, color);
painter.draw_text(rect, format_size_text(box.bottom), font(), Gfx::TextAlignment::BottomCenter, color);
painter.draw_text(rect, format_size_text(box.left), font(), Gfx::TextAlignment::CenterLeft, color);
};
// paint margin box
painter.fill_rect(margin_rect, Color(249, 204, 157));
draw_borders(margin_rect, Color::Black);
margin_rect.shrink(1, 1, 1, 1);
margin_rect.shrink(text_height_padding, text_width_padding, text_height_padding, text_width_padding);
painter.draw_text(margin_rect, "margin"sv, font(), Gfx::TextAlignment::TopLeft, Color::Black);
draw_size_texts(margin_rect, Color::Black, m_node_box_sizing.margin);
// paint border box
painter.fill_rect(border_rect, Color(253, 221, 155));
draw_borders(border_rect, Color::Black);
border_rect.shrink(1, 1, 1, 1);
border_rect.shrink(text_height_padding, text_width_padding, text_height_padding, text_width_padding);
painter.draw_text(border_rect, "border"sv, font(), Gfx::TextAlignment::TopLeft, Color::Black);
draw_size_texts(border_rect, Color::Black, m_node_box_sizing.border);
// paint padding box
painter.fill_rect(padding_rect, Color(195, 208, 139));
draw_borders(padding_rect, Color::Black);
padding_rect.shrink(1, 1, 1, 1);
padding_rect.shrink(text_height_padding, text_width_padding, text_height_padding, text_width_padding);
painter.draw_text(padding_rect, "padding"sv, font(), Gfx::TextAlignment::TopLeft, Color::Black);
draw_size_texts(padding_rect, Color::Black, m_node_box_sizing.padding);
// paint content box
painter.fill_rect(content_rect, Color(140, 182, 192));
draw_borders(content_rect, Color::Black);
content_rect.shrink(1, 1, 1, 1);
painter.draw_text(content_rect, content_size_text, font(), Gfx::TextAlignment::Center, Color::Black);
}
}
|
8e2aa0eb4a7e6ed40db2323d888ecb8dcad29a11
|
8d7e3aa92278f1e89b55a371dddfbf542fc40daa
|
/include/iLogic2comm_interface.h
|
84b3daeced32443e1d67c5253e59863b8c6f6041
|
[] |
no_license
|
young-forever/AQ_002_CONSOLE_RL_20200703
|
241962726db6d6362133f583d16d7a58861c4018
|
e7d2a8804473c9366b4ac81d04f7884a412bd99e
|
refs/heads/master
| 2022-11-15T09:54:44.823650
| 2020-07-06T08:37:34
| 2020-07-06T08:37:34
| 277,486,121
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 738
|
h
|
iLogic2comm_interface.h
|
//
// Created by zyq on 2020/6/10.
//
#ifndef AQ_002_CONSOLE_ILOGIC2COMM_INTERFACE_H
#define AQ_002_CONSOLE_ILOGIC2COMM_INTERFACE_H
#include <vector>
class ilogic2comm_interface
{
public:
virtual void ResetOk()=0;
virtual void RecieveBack()=0;
virtual void RecShakeHandOk()=0;
virtual void RecWorkStateBack(unsigned char workstate)=0;
virtual void RecMotmodBack(unsigned char motmod)=0;
virtual void RecSensorData(std::vector<float> sdata)=0;
virtual void RecCableL(float L)=0;
virtual void RecExppos(float pos)=0;
virtual void RecExpvel(float vel)=0;
virtual void RecExpcur(float cur)=0;
virtual void RecErrorBack(unsigned char error)=0;
};
#endif //AQ_002_CONSOLE_ILOGIC2COMM_INTERFACE_H
|
ac95695a5933663006b56aab55ae1cedfed3a3f0
|
bfb370732e48ab73b48d50dcefc1491b14e113d8
|
/lib/add_const_msg_impl.h
|
0f23714e415f1f7b0b6fdecf69240914ee1542a6
|
[] |
no_license
|
javatai/gr-messageutils
|
6d11dd1fba5beb712015982a0962d30b6b296b9e
|
fc500180b8bfa3a72254308409d042d08595de54
|
refs/heads/master
| 2021-06-17T02:45:36.310373
| 2017-04-29T16:44:03
| 2017-04-29T16:44:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,473
|
h
|
add_const_msg_impl.h
|
/* -*- c++ -*- */
/*
* Copyright 2014 Adam Gannon.
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifndef INCLUDED_MESSAGEUTILS_ADD_CONST_MSG_IMPL_H
#define INCLUDED_MESSAGEUTILS_ADD_CONST_MSG_IMPL_H
#include <messageutils/add_const_msg.h>
namespace gr {
namespace messageutils {
class add_const_msg_impl : public add_const_msg
{
private:
size_t d_itemsize;
bool d_debug;
int d_val;
public:
add_const_msg_impl(size_t itemsize, bool debug);
~add_const_msg_impl();
void handle_msg(pmt::pmt_t msg);
int work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);
};
} // namespace messageutils
} // namespace gr
#endif /* INCLUDED_MESSAGEUTILS_ADD_CONST_MSG_IMPL_H */
|
afe3528103151989ee2831d77aea78ba1e3ae707
|
2870164d24093d726b256245d491a86d06c82c03
|
/Petya and Strings.cpp
|
e49b6b88094a0103b7fb7e435e35e121e3bbb49f
|
[
"MIT"
] |
permissive
|
AshfakYeafi/Compatitive-Programing
|
79bea363c2e2dea2e9eff474076b588d49046cdb
|
6e4b35c55cdd426d83bc435d51b92570c6db7b16
|
refs/heads/main
| 2023-06-09T09:05:53.611770
| 2021-07-06T03:56:09
| 2021-07-06T03:56:09
| 376,046,990
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 676
|
cpp
|
Petya and Strings.cpp
|
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long i;
string f,s;
while(cin>>f>>s)
{
long sum1=0,sum2=0;
for(i=0; i<f.size(); i++)
{
if(f[i]>='A'&&f[i]<='Z')
f[i]=f[i]-'A'+97;
if(s[i]>='A'&&s[i]<='Z')
s[i]=s[i]-'A'+97;
}
for(i=0; i<s.size(); i++)
{
if(f[i]>s[i])
{
cout<<"1\n";
return 0;}
if(s[i]>f[i])
{
cout<<"-1\n";
return 0;
}
}
cout<<"0\n";
}
return 0;
}
|
0b42da28c0bd9aa88a06401d001b313a8abc35fc
|
81e31a571f9263b317a60ab7e2fa6a62199aefa1
|
/icm-1.1/tests/msg/mtopic/EventI.h
|
9ecb3500079209c0606ecabb7b29326f18d7ec4b
|
[] |
no_license
|
qhjindev/icm
|
66910f1db5b9cf549b31817e3e2adeada4babd17
|
9e2a659dcf8c4cdadb71e129eedb667efc817517
|
refs/heads/master
| 2020-05-17T05:37:21.762348
| 2015-01-08T02:16:08
| 2015-01-08T02:16:08
| 28,762,156
| 3
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 313
|
h
|
EventI.h
|
#ifndef NETWORK_I_H
#define NETWORK_I_H
#include "Event.h"
class NetworkI : public demo::Network {
public:
virtual void reportEvent(const ::demo::NetEvent&);
};
class AlarmI : public demo::Alarm {
public:
AlarmI() {}
virtual void reportAlarm(const ::demo::AlarmEvent&);
};
#endif //NETWORK_I_H
|
0770d877e1d61e21e86dfe6fa83a37d0aaf320f8
|
bcae7bbfd50cccbdb4c3d873371d97e1d3fdd14b
|
/midterm-1/mid-term-1/Console.cpp
|
7bd6ca751b342e22dc7f4a93ed25f655c82eabf8
|
[] |
no_license
|
adrian-popa/object-oriented-programming
|
ecca2a7e5c9b6bd020c5e3f0fa920e7e86e246dd
|
8fa0b6b9c35e1b1b7f8fea669d8d59e36a0cc26c
|
refs/heads/master
| 2022-01-10T07:32:21.186120
| 2019-05-23T13:45:50
| 2019-05-23T13:45:50
| 173,363,015
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,037
|
cpp
|
Console.cpp
|
#include "Console.h"
using namespace std;
void Console::runConsole() {
this->uiPlaceDrone();
bool keepAlive = true;
while (keepAlive) {
string inputString;
cout << "\nDRONE:~$ ";
getline(cin, inputString);
int position = inputString.find(" ");
const string command = inputString.substr(0, position);
inputString.erase(0, position + 1);
try {
if (command.compare("move") == 0) {
this->uiMoveDrone(inputString);
}
else if (command.compare("tiles") == 0) {
this->uiShowTiles();
}
else if (command.compare("exit") == 0) {
keepAlive = false;
}
else {
cout << "Invalid input!\n";
}
}
catch (exception& exception) {
cout << exception.what() << "\n";
}
}
}
void Console::uiPlaceDrone() {
string inputString;
cout << "DRONE:~$ Place the cleaning drone at position (x y): ";
getline(cin, inputString);
int position = inputString.find(" ");
const int droneXStartPosition = stoi(inputString.substr(0, position));
inputString.erase(0, position + 1);
position = inputString.find(" ");
const int droneYStartPosition = stoi(inputString.substr(0, position));
inputString.erase(0, position + 1);
this->droneController.placeDrone(droneXStartPosition, droneYStartPosition);
cout << "The drone was placed at position " << droneXStartPosition << " " << droneYStartPosition << "\n";
}
void Console::uiMoveDrone(string arguments) {
int position = arguments.find(" ");
// add validation if "direction" is missing
const string direction = arguments.substr(0, position);
this->droneController.moveDrone(direction);
cout << "The drone was moved in the " << direction << " direction.\n";
}
void Console::uiShowTiles() {
cout << "Cleaned tiles:\n";
vector<Tile> tiles = this->droneController.getCleanedTiles();
for (auto it = tiles.begin(); it != tiles.end(); it++) {
Tile tile = (Tile)*it;
cout << tile.getXPosition() << " " << tile.getYPosition() << "\n";
}
cout << "Percentage of cleaned tiles: " << this->droneController.getCleanedPercentage() << "%\n";
}
|
fcf3e35372a4d9aa47f6a05d78c35f3d1bb3aafa
|
3c79dd2d66fec62a07e79fc34ce3a87dd4894b63
|
/main.cpp
|
e5fd034e90e3565207dbb2d1c382cd7807291f1a
|
[] |
no_license
|
DaniM/handles
|
65b822108810a7fa79095cdaeddc4a0bfa72fe13
|
dd552ccf635d9a64308c95109a5aeaf3df5386f4
|
refs/heads/master
| 2020-04-29T08:32:33.922646
| 2019-03-16T15:43:21
| 2019-03-16T15:43:21
| 175,989,719
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,340
|
cpp
|
main.cpp
|
#include "handle.h"
#include <iostream>
#include <cassert>
using namespace DaniM::MemoryManagement;
using namespace std;
struct Foo
{
public:
Foo() : foo(0) {}
Foo(int f) : foo(f) {}
int foo;
};
struct HF
{
public:
int f;
HANDLE h;
};
typedef System<Foo,HANDLE> FooSystem;
int main()
{
FooSystem system;
vector<HF> created;
vector<size_t> reuse;
cout << "Creating and deleting test\n";
for( size_t i = 0; i != 10; ++i )
{
Foo f( i );
Foo* pf = 0;
HANDLE hnd = system.Create( f );
assert( hnd != 0 && "Error when creating the handle\n" );
pf = system.Acquire( hnd );
HF hf;
assert( pf && system.Acquire( hnd, f ) && "Error when acquiring the created handle\n" );
system.Set( hnd, Foo( i ) );
hf.f = i;
hf.h = hnd;
created.push_back( hf );
}
// delete the created ones
while( created.size() > 5 )
{
size_t at = created.size() >> 1;
HANDLE h = created[at].h;
system.Free( h );
created.erase( created.begin() + at );
reuse.push_back( h.idx );
for( vector<HF>::iterator it = created.begin(); it != created.end(); ++it )
{
Foo f;
Foo* pf = system.Acquire( it->h );
assert( pf && system.Acquire( (*it).h, f ) && "Error when acquiring the handle\n" );
assert( pf->foo == f.foo && f.foo == (*it).f && "Corrupted data error\n" );
}
}
cout << "Reuse test\n";
for( vector<size_t>::reverse_iterator it = reuse.rbegin(); it != reuse.rend(); ++it )
{
HANDLE hnd = system.Create();
assert( hnd != 0 && "Error when creating the reused handle\n" );
assert( hnd.idx == (*it) && "Error when reusing the handle\n" );
Foo f;
Foo* pf = system.Acquire( hnd );
HF hf;
assert( pf && system.Acquire( hnd, f ) && "Error when acquiring the reused handle\n" );
system.Set( hnd, Foo( *it ) );
hf.f = *it;
hf.h = hnd;
created.push_back( hf );
for( vector<HF>::iterator it = created.begin(); it != created.end(); ++it )
{
Foo f;
Foo* pf = system.Acquire( it->h );
assert( pf && system.Acquire( (*it).h, f ) && "Error when acquiring the handle\n" );
assert( pf->foo == f.foo && f.foo == (*it).f && "Corrupted data error\n" );
}
}
cout << "IDs overflow test\n";
HANDLE hnd = system.Create();
while( hnd.id != 1 )
{
assert( hnd != 0 && "Error when creating the handle\n" );
system.Free( hnd );
hnd = system.Create();
}
return 0;
}
|
1853ae8fc8f567cbe16e7ecc0a3516305c49ef2c
|
efb43442be45b60eca4f8c2d09bca74fdc152caf
|
/src/DbOrcaTask.cc
|
481b281f0da7e5f4407c68ec4e40cd9d476f5297
|
[] |
no_license
|
stuartw/gross
|
105fa4468b215467de5812217a03512f3f4975e7
|
dfdf3790a3814654b155cf9ee1fef3b9ddf1c595
|
refs/heads/master
| 2020-06-01T18:25:11.963820
| 2012-03-18T19:01:10
| 2012-03-18T19:01:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,545
|
cc
|
DbOrcaTask.cc
|
#include "DbOrcaTask.hh"
#include "TaskFactory.hh"
#include "Job.hh"
#include "CladLookup.hh"
#include "LocalDb.hh"
#include "PhysCat.hh"
int DbOrcaTask::split() {
if(!Id()) {
cerr<<"DbOrcaTask::split() Error: Task has no ID"<<endl;
return EXIT_FAILURE; //Task must be on database first
}
//get owner and dataset
const string sOwner = userSpec()->read("Owner");
const string sDataset = userSpec()->read("Dataset");
const string sDataChain = userSpec()->read("DataChain"); //may be empty
if(sOwner.empty()||sDataset.empty()) {
cerr <<"DbOrcaTask::split() Error: Dataset Owner and/or Dataset name not defined in JDL in DB(Owner=?/Dataset=?)"<<endl;
return EXIT_FAILURE;
}
//Initialise catalogue - this will create temporary local cat
physCat(new PhysCat(sOwner, sDataset, sDataChain)); //deleted in ~DbOrcaTask
ostringstream os;
os<< "TaskID="<<Id();
vector<string> resDataSel, resJobId;
if(LocalDb::instance()->tableRead("Analy_Job", "DataSelect", os.str(), resDataSel)) return EXIT_FAILURE;
//Get from Database DataSelect and JobId for particular Task to create new job with
for(vector<string>::const_iterator i = resDataSel.begin(); i!=resDataSel.end(); i++) {
os.str("");
os<< "TaskID="<<Id()<<"&&DataSelect="<<"\""<<(*i)<<"\"";
resJobId.clear();
if(LocalDb::instance()->tableRead("Analy_Job", "JobID", os.str(), resJobId)) return EXIT_FAILURE;
if(resJobId.size()>1) {
cerr<<"DbOrcaTask::split() Error : found more than one job matching dataselection"<<endl;
return EXIT_FAILURE;
}
//parse DataSelection and load individual runs
for(vector<string>::const_iterator j = resJobId.begin(); j!=resJobId.end(); j++) {
vector<int> runs;
for (int x=0, y=(*i).size(); x < (*i).size();) {
if ((y = (*i).find(",", x)) != string::npos) {
} else {
x = (*i).size();
}
int diff = y - x;
runs.push_back(atoi( (*i).substr(x, diff).c_str() ));
x = y + 1;
}
if(Log::level()>0) cout <<"DbOrcaTask::split() Creating job with id " << (*j) << " for data selection (runs) " << (*i)<<endl;
Job* pJ = (TaskFactory::instance())->makeJob(atoi((*j).c_str()), runs, this);
if(!pJ) return EXIT_FAILURE; //check pointer exists
if(!*pJ) return EXIT_FAILURE; //check object constructed ok
jobs_.push_back(pJ); //deleted in ~Task
}
}
if(jobs_.empty()) {
cerr<<"DbOrcaTask::split() Error: No jobs created for task "<< Id() << endl;
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
|
341dd8592f1ea4e19bf9f9e32a5c996521c9b041
|
e97672d82caaca7de4f1bde83d077c3c61eff9d5
|
/2018/Week-6/eduardo/dolls.cpp
|
61854a50a51387856c8c1c0ed22c437e990822e3
|
[] |
no_license
|
lucioeduardo/competitive-codes
|
3345c48ff6ee7e5c9dd32fff8cf2db1d0904f5e2
|
cbb8be67f0dd4c92124378cfbc07a34ab6b58c42
|
refs/heads/master
| 2021-11-22T21:12:25.346487
| 2021-10-19T11:48:51
| 2021-10-19T11:48:51
| 141,634,356
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 929
|
cpp
|
dolls.cpp
|
#include <cstdio>
#include <algorithm>
#include <vector>
#include <functional>
#define MAXN 20200
using namespace std;
typedef pair<int,int> pii;
vector<pii> dolls;
vector<int> stacks;
bool compare(pii a, pii b){
if(a.first == b.first)
return a.second < b.second;
return a.first > b.first;
}
int main(){
int t;
scanf("%d", &t);
for(int i=0; i<t; i++){
int m;
scanf("%d",&m);
dolls.clear();
for(int j=0; j<m; j++){
int w,h;
scanf("%d %d",&w,&h);
dolls.push_back(pii(w,h));
}
sort(dolls.begin(), dolls.end(), compare);
stacks.clear();
for(size_t j=0; j<dolls.size(); j++){
//printf("%d %d\n", dolls[j].first, dolls[j].second);
int v = dolls[j].second;
vector<int>::iterator it = upper_bound(stacks.begin(), stacks.end(), v);
if(it == stacks.end())
stacks.push_back(v);
else
*it=v;
}
printf("%d\n",(int) stacks.size());
}
return 0;
}
|
95344306b9d5a132ede87c70dc404ead5f130120
|
bb06a32beab10da5deb8be91b5031cdfdf48e610
|
/src/main.cpp
|
955cd95238fea9fc33d42898b96f7bc1a96da287
|
[
"MIT"
] |
permissive
|
Mininoob/CWLevelSystem
|
78a4a8da1bf3ae1b2f9baeae9d88a1ad57338a46
|
ee5e06bcc0d1c4417d0a7eb2cf52897fa908e903
|
refs/heads/master
| 2022-04-13T20:45:46.603091
| 2020-04-15T18:11:51
| 2020-04-15T18:11:51
| 255,851,793
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,026
|
cpp
|
main.cpp
|
#include "CWSDK/cwsdk.h"
#include "main.h"
#include <wchar.h>
#include <stdio.h>
#include <string.h>
#include <fstream>
#include <sstream>
#include <vector>
#include <map>
class Mod : GenericMod {
void SetLevel(int lvl)
{
//Change character's level in the txt file as well as inside the game
}
void SetExp(int exp)
{
//Change character's level in the txt file as well as inside the game
}
virtual int OnChat(std::wstring* message) override {
// This will be called when the player sends a chat message
wchar_t* msg = (wchar_t*)message->c_str();
cube::Game* game = cube::GetGame();
cube::Host* host = &game->host;
cube::World* world = &host->world;
int lvl;
int exp;
//Scale exp to lvls
//probably exponential formula
//Commands for testing =
/*
/setlvl [int] - Sets user's lvl
/setexp [int] - Sets user's exp
*/
if (swscanf_s(msg, L"/setlvl %d",&lvl) == 1)
{
SetLevel(lvl);
}
}
virtual void OnGameTick(cube::Game* game) override {
// This will be called every frame
//Check if player exp level has changed and save it to file
//Also display xp bar as well as check if an enemy has been killed and awards exp to players who have attacked the enemy
//Enemies also have levels that will also scale to the player
//Disable certain skills and enable them when character reaches a certain level
//or make new skills that can be obtained when they lvl
//Also add sound effect when lvl up and add exp orb effects
}
virtual void Initialize() override {
// This will be called after your mod is loaded. CWSDK internals are initialized at this point, so it's safe to use CWBase() and CWOffset().
//Create a expStat.txt file to store exp levels or load the stats to character
}
};
EXPORT Mod* MakeMod() {
return new Mod();
}
|
0cbc86641d533d68392582c077088f7ef15cd673
|
3dbcde548ddef642e993dc2061d0750e64f613df
|
/错误探测.cpp
|
a116e011c21886270aaa2cf58ccb45b706163e66
|
[] |
no_license
|
juruo123/some-programs
|
df89d57684e43d2567f09dd442e7bf5262b8d000
|
4ba7549c20c323a5cd5501a41059d99039f19cb1
|
refs/heads/master
| 2020-04-14T20:58:40.845815
| 2019-01-04T14:07:33
| 2019-01-04T14:07:33
| 164,113,118
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 532
|
cpp
|
错误探测.cpp
|
#include<bits/stdc++.h>
using namespace std;
int a[101][101],b,c,fb,fc,n,m;
int main(){
cin>>n;
for(int i=1;i<=n;i++)
for(int j=1;j<=n;j++)
{
cin>>a[i][j];
a[0][j]=(a[0][j]+a[i][j])%2;
a[i][0]=(a[i][0]+a[i][j])%2;
}
for(int i=1;i<=n;i++){
if(a[i][0]>0)
{
fb=i;
b++;
}
}
for(int i=1;i<=n;i++){
if(a[0][i]>0)
{
fc=i;
c++;
}
}
if(b==0&&c==0)
{
cout<<"OK";
return 0;
}
if(b==1&&c==1)
{
cout<<fb<<' '<<fc;
return 0;
}
cout<<"Corrup";
}
|
95c33cf575b43e8d3239759fe5b91eb3c6b464fc
|
a809cd70ef136d7e2fcf70a207880f186d019207
|
/modules/io/src/save_mesh_obj.cpp
|
8ca2d7161d3e7c7d2cac5d9fa55d7dd964e89855
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-proprietary-license",
"MPL-2.0",
"BSD-3-Clause",
"MIT",
"BSL-1.0",
"LicenseRef-scancode-public-domain"
] |
permissive
|
adobe/lagrange
|
ea9d4c700ed70003ee9c9ecef55fecd6b9d77ba7
|
2f78a647ecb867619c73489a5e3ea752f26353ef
|
refs/heads/main
| 2023-08-10T05:18:14.852199
| 2023-06-28T18:29:31
| 2023-06-28T18:29:31
| 319,374,542
| 229
| 23
|
Apache-2.0
| 2023-08-30T23:21:30
| 2020-12-07T16:14:06
|
C++
|
UTF-8
|
C++
| false
| false
| 6,877
|
cpp
|
save_mesh_obj.cpp
|
/*
* Copyright 2022 Adobe. All rights reserved.
* This file is licensed to you 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 REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
#include <lagrange/io/save_mesh_obj.h>
#include <lagrange/Attribute.h>
#include <lagrange/Logger.h>
#include <lagrange/SurfaceMeshTypes.h>
#include <lagrange/foreach_attribute.h>
#include <lagrange/utils/assert.h>
// clang-format off
#include <lagrange/utils/warnoff.h>
#include <spdlog/fmt/ostr.h>
#include <lagrange/utils/warnon.h>
// clang-format on
namespace lagrange {
namespace io {
template <typename Scalar, typename Index>
void save_mesh_obj(
std::ostream& output_stream,
const SurfaceMesh<Scalar, Index>& mesh,
const SaveOptions& options)
{
la_runtime_assert(output_stream, "Invalid output stream");
const Index dim = mesh.get_dimension();
la_runtime_assert(dim == 2 || dim == 3, "Mesh dimension should be 2 or 3");
// Write header
// TODO: Write mtl/material_id?
const Index num_vertices = mesh.get_num_vertices();
const Index num_facets = mesh.get_num_facets();
fmt::print(
output_stream,
R"(####
#
# OBJ File Generated by Lagrange
#
####
#
# Vertices: {}
# Faces: {}
#
####
)",
num_vertices,
num_facets);
// TODO: Could we refactor all 3 write_xxx into a single function?
// TODO: How to pass material names and save this information with the mesh?
// Write positions
for (Index v = 0; v < num_vertices; ++v) {
auto p = mesh.get_position(v);
fmt::print(output_stream, "v {} {} {}\n", p[0], p[1], dim == 2 ? Scalar(0) : p[2]);
}
// Write normals and texcoords
std::string found_uv_name;
std::string found_nrm_name;
const Attribute<Index>* uv_indices = nullptr;
const Attribute<Index>* nrm_indices = nullptr;
seq_foreach_named_attribute_read(mesh, [&](std::string_view name, auto&& attr) {
using AttributeType = std::decay_t<decltype(attr)>;
// TODO: change this for the attribute visitor that takes id and simplify this block.
if (options.output_attributes == SaveOptions::OutputAttributes::SelectedOnly) {
AttributeId id = mesh.get_attribute_id(name);
if (std::find(
options.selected_attributes.begin(),
options.selected_attributes.end(),
id) == options.selected_attributes.end()) {
return;
}
}
if (attr.get_usage() == AttributeUsage::UV) {
if (!found_uv_name.empty()) {
logger().warn(
"Found multiple UV attributes. Only '{}' was written to disk",
found_uv_name);
return;
} else {
found_uv_name = name;
}
const Attribute<typename AttributeType::ValueType>* values = nullptr;
if constexpr (AttributeType::IsIndexed) {
values = &attr.values();
uv_indices = &attr.indices();
} else {
values = &attr;
uv_indices = &mesh.get_corner_to_vertex();
}
la_runtime_assert(attr.get_num_channels() == 2);
for (Index vt = 0; vt < values->get_num_elements(); ++vt) {
auto p = values->get_row(vt);
fmt::print(output_stream, "vt {} {}\n", p[0], p[1]);
}
}
if (attr.get_usage() == AttributeUsage::Normal) {
if (!found_nrm_name.empty()) {
logger().warn(
"Found multiple Normal attributes. Only '{}' was written to disk",
found_nrm_name);
return;
} else {
found_nrm_name = name;
}
const Attribute<typename AttributeType::ValueType>* values = nullptr;
if constexpr (AttributeType::IsIndexed) {
values = &attr.values();
nrm_indices = &attr.indices();
} else {
values = &attr;
nrm_indices = &mesh.get_corner_to_vertex();
}
la_runtime_assert(attr.get_num_channels() == 3);
for (Index vn = 0; vn < values->get_num_elements(); ++vn) {
auto p = values->get_row(vn);
fmt::print(output_stream, "vn {} {} {}\n", p[0], p[1], p[2]);
}
}
});
// Write facets
for (Index f = 0; f < num_facets; ++f) {
const Index first_corner = mesh.get_facet_corner_begin(f);
const auto vtx_indices = mesh.get_facet_vertices(f);
la_runtime_assert(
vtx_indices.size() >= 3,
fmt::format("Mesh facet {} should have >= 3 vertices", f));
output_stream << "f";
for (Index lv = 0; lv < vtx_indices.size(); ++lv) {
// vertex_index/texture_index/normal_index
Index v = vtx_indices[lv] + 1;
Index vt = (uv_indices ? uv_indices->get(first_corner + lv) : 0) + 1;
Index vn = (nrm_indices ? nrm_indices->get(first_corner + lv) : 0) + 1;
if (!uv_indices && !nrm_indices) {
fmt::print(output_stream, " {}", v);
} else if (uv_indices && !nrm_indices) {
fmt::print(output_stream, " {}/{}", v, vt);
} else if (uv_indices && nrm_indices) {
fmt::print(output_stream, " {}/{}/{}", v, vt, vn);
} else if (!uv_indices && nrm_indices) {
fmt::print(output_stream, " {}//{}", v, vn);
}
}
output_stream << "\n";
}
// TODO: Write edges
}
template <typename Scalar, typename Index>
void save_mesh_obj(
const fs::path& filename,
const SurfaceMesh<Scalar, Index>& mesh,
const SaveOptions& options)
{
fs::ofstream output_stream(filename);
save_mesh_obj(output_stream, mesh, options);
}
#define LA_X_save_mesh(_, Scalar, Index) \
template void save_mesh_obj( \
std::ostream& output_stream, \
const SurfaceMesh<Scalar, Index>& mesh, \
const SaveOptions& options); \
template void save_mesh_obj( \
const fs::path& filename, \
const SurfaceMesh<Scalar, Index>& mesh, \
const SaveOptions& options);
LA_SURFACE_MESH_X(save_mesh, 0)
} // namespace io
} // namespace lagrange
|
68baa2efcf2c6262003be3587ebd8eb22e164848
|
fdfed59d04e38a76a1aed2ba935ffd2106718c8d
|
/sqlstlPriv.h
|
21b655537e273f58c71b1c6c0cdc0f659e4d0071
|
[] |
no_license
|
Shakthi/sqlstl
|
d1d622140cdd91f0fad0e5059ae9d36abc95fa26
|
561874f37c6ffa96ebe8b739ee51a923f0a33ff7
|
refs/heads/master
| 2016-09-03T06:43:09.158908
| 2013-03-09T17:57:37
| 2013-03-09T17:58:08
| 3,326,551
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 312
|
h
|
sqlstlPriv.h
|
/*
* sqlstlPriv.h
* sqlstl
*
* Created by Shakthi Prasad G S on 09/01/12.
* Copyright 2012 Shakthi. All rights reserved.
*
*/
/* The classes below are not exported */
#pragma GCC visibility push(hidden)
class sqlstlPriv
{
public:
void HelloWorldPriv(const char *);
};
#pragma GCC visibility pop
|
398e46292561b12ee2031afce3060e70e956ff94
|
57e17d18ce3eb966b6032e7945452dd541a296d1
|
/source/entity/hostageentity.h
|
df0bb46b7fa471dd912dece467a04a0c38c5cd91
|
[] |
no_license
|
ggj/reapers
|
1e026c4062e7392ef3878684061578ab08a73785
|
0bd3a1f155e0f065f7df91b11d15f736d406d14c
|
refs/heads/master
| 2020-05-17T03:30:56.029968
| 2014-03-30T02:18:42
| 2014-03-30T02:18:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 377
|
h
|
hostageentity.h
|
#ifndef _HOSTAGE_H
#define _HOSTAGE_H
#include "spriteentity.h"
#include "../util/collisionsensor.h"
class HostageEntity: public SpriteEntity
{
public:
HostageEntity();
virtual ~HostageEntity();
virtual void Load(MetadataObject &metadata, SceneNode *sprites);
virtual void OnCollision(const CollisionEvent &event);
private:
CollisionSensor clSensor;
};
#endif
|
37e9648abb3c399638bddcb7115aaa7d8b368665
|
112021b2aab61cd24847b72aeb856e887c028d25
|
/Assignments/Solutions/Nadia Mukarram/Assignment 4/Q3.cpp
|
40c4611a92f78285896581deebc3cccb8b7d26a0
|
[] |
no_license
|
amanraj-iit/DSA_Uplift_Project
|
0ad8b82da3ebfe7ebd6ab245e3c9fa0179bfbef1
|
11cf887fdbad4b98b0dfe317f625eedd15460c57
|
refs/heads/master
| 2023-07-28T06:37:36.313839
| 2021-09-15T11:29:34
| 2021-09-15T11:29:34
| 406,765,764
| 10
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 460
|
cpp
|
Q3.cpp
|
#include <iostream>
#include <bits/stdc++.h>
#include <string>
using namespace std;
int main()
{
string s1;
cout << "String 1:";
cin >> s1;
string s2;
cout << "\nString 2:";
cin >> s2;
int count[256] = {0};
for (int i = 0; i < s2.size(); i++)
{
count[s2[i]]++;
}
for (int i = 0; i < s1.size(); i++)
{
if (count[s1[i]] <= 0)
{
cout << s1[i];
}
}
return 0;
}
|
b9f7ce834e14e55d56216a0220930085405712cd
|
c6b83a8baba8d639fe74d703b2407be5d2cc1e35
|
/examples/3_2_vector_user.cpp
|
dc648e0d3ad743b63784a8929570eedc37ea4907
|
[] |
no_license
|
dmejdani/cpp-tour
|
01658606b2c4d646c99c5982a77b942cfc1ab555
|
a0afb62eeb2a485977898a6b7af1101412672983
|
refs/heads/main
| 2023-02-22T06:20:56.013706
| 2021-01-23T14:03:49
| 2021-01-23T14:03:49
| 309,141,730
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 474
|
cpp
|
3_2_vector_user.cpp
|
// user
// build with something like
// g++ -o builds/3_2_vector examples/3_2_vector_user.cpp examples/3_2_vector.cpp
#include "3_2_vector.h"
#include <cmath>
#include <iostream>
double sqrt_sum(Vector& v)
{
double sum = 0;
for (int i = 0; i != v.size(); ++i)
sum += std::sqrt(v[i]);
return sum;
}
int main()
{
Vector v(3);
v[0] = 1;
v[1] = 4;
v[2] = 9;
double r = sqrt_sum(v);
std::cout << r << "\n";
return 0;
}
|
19513fdf4f28ad9d54577fabf933e53dc193a1d9
|
06ef12f360b56e0c73160bb33e63afe76a7f428d
|
/C++/Maret 2021/functionReturn.cpp
|
bff9812b4625537c7c6348e1f2ea5feaf7178e02
|
[] |
no_license
|
Blackxin/project-random
|
7f9e654ee9ac41f9beec2454fabde7a7e57f9dc4
|
4877b701988c8aa62b22d18515946c77488262ff
|
refs/heads/main
| 2023-07-16T21:26:37.954922
| 2021-08-20T22:41:30
| 2021-08-20T22:41:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 709
|
cpp
|
functionReturn.cpp
|
#include <iostream>
#include <math.h>
using namespace std;
int tambah(int a, int b) {
return a + b;
}
int kurang(int x, int y) {
return x - y;
}
int kali(int p, int q) {
return p * q;
}
int bagi(int c, int d) {
return c / d;
}
int mod(int e, int f) {
return e % f;
}
int pangkat(int g, int h) {
return pow(g, h);
}
int main() {
printf("Hasil penjumlahan dari 2 + 2 = %i", tambah(2, 2));
printf("Hasil pengurangan dari 3 - 4 = %i", kurang(3, 4));
printf("Hasil perkalian dari 6 * 2 = %i", kali(6, 2));
printf("Hasil pembagian dari 8 / 4 = %i", bagi(8, 4));
printf("Hasil modulus dari 7 % 3 = %d", mod(7, 3));
printf("Hasil pangkat dari 5 ** 4 = %i", pangkat(5, 4));
}
|
ae372119bec8e9de8d4f09cab64aa2d3a66b80ec
|
7ae1bef204ae51f3819d376aa82c43a4bca52416
|
/src/image_trans/src/img_send.cpp
|
0b6ff45a68c1f232782ec43aef8ebc436f6a3d75
|
[] |
no_license
|
zuwuwang/Travel_Assistance_Robot
|
e3ddfafdd803e890906a23c0ce1e8b483d247dd3
|
b9cc9a9284ac2deb18abcd3624caf1210479fa44
|
refs/heads/master
| 2020-03-19T06:27:27.462399
| 2018-06-04T12:30:41
| 2018-06-04T12:30:41
| 136,019,564
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 4,490
|
cpp
|
img_send.cpp
|
/***
* sub img,socket transfer
* **********/
//Includes all the headers necessary to use the most common public pieces of the ROS system.
#include <ros/ros.h>
//Use image_transport for publishing and subscribing to images in ROS
#include <image_transport/image_transport.h>
//Use cv_bridge to convert between ROS and OpenCV Image formats
#include <cv_bridge/cv_bridge.h>
#include <sensor_msgs/image_encodings.h>
//Include headers for OpenCV Image processing
#include <opencv2/imgproc/imgproc.hpp>
//Include headers for OpenCV GUI handling
#include <opencv2/highgui/highgui.hpp>
#include<string>
#include <sstream>
#include <std_msgs/UInt8.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
using namespace cv;
using namespace std;
//Store all constants for image encodings in the enc namespace to be used later.
namespace enc = sensor_msgs::image_encodings;
void image_socket(Mat inImg);
Mat image1;
static int imgWidth, imgHeight;
static int image_num = 1;
#define PORT 30000
#define BUFFER_SIZE 20000
const char * servInetAddr = "192.168.1.103"; //service addr
static int sockfd;
//static ros::Publisher capture;
//This function is called everytime a new image_info message is published
void camInfoCallback(const sensor_msgs::CameraInfo & camInfoMsg)
{
//Store the image width for calculation of angle
imgWidth = camInfoMsg.width;
imgHeight = camInfoMsg.height;
}
//This function is called everytime a new image is published
void imageCallback(const sensor_msgs::ImageConstPtr& original_image)
{
//Convert from the ROS image message to a CvImage suitable for working with OpenCV for processing
cv_bridge::CvImagePtr cv_ptr;
try
{
//Always copy, returning a mutable CvImage
//OpenCV expects color images to use BGR channel order.
cv_ptr = cv_bridge::toCvCopy(original_image, enc::BGR8);
}
catch (cv_bridge::Exception& e)
{
//if there is an error during conversion, display it
ROS_ERROR("tutorialROSOpenCV::main.cpp::cv_bridge exception: %s", e.what());
return;
}
image_socket(cv_ptr->image);
}
void image_socket(Mat inImg)
{
imshow("image_socket", inImg);//显示图片
if( inImg.empty() )
{
ROS_INFO("Camera image empty");
return;//break;
}
stringstream sss;
string strs;
char c = (char)waitKey(1);
if( c == 27 )
ROS_INFO("Exit boss");//break;
switch(c)
{
case 'p':
resize(inImg,image1,Size(imgWidth/6,imgHeight/6),0,0,CV_INTER_LINEAR);
image1=image1(Rect(image1.cols/2-32,image1.rows/2-32, 64, 64));
strs="/home/hsn/catkin_ws/src/rosopencv/";
sss.clear();
sss<<strs;
sss<<image_num;
sss<<".jpg";
sss>>strs;
imwrite(strs,image1);//保存图片
cout<<image_num<<endl;
int n;
n = write(sockfd,image1.data,image1.total()*image1.channels());
if (n < 0)
perror("ERROR writing to socket");
image_num++;
break;
default:
break;
}
}
/**
* This is ROS node to track the destination image
*/
int main(int argc, char **argv)
{
ros::init(argc, argv, "image_socket");
ROS_INFO("-----test------");
struct sockaddr_in serv_addr;
/*创建socket*/
if ((sockfd = socket(AF_INET,SOCK_STREAM,0)) == -1)
{
perror("Socket failed!\n");
exit(1);
}
printf("Socket id = %d\n",sockfd);
/*设置sockaddr_in 结构体中相关参数*/
serv_addr.sin_family = AF_INET;
serv_addr.sin_port = htons(PORT);
inet_pton(AF_INET, servInetAddr, &serv_addr.sin_addr);
bzero(&(serv_addr.sin_zero), 8);
/*调用connect 函数主动发起对服务器端的连接*/
if(connect(sockfd,(struct sockaddr *)&serv_addr, sizeof(serv_addr))== -1)
{
perror("Connect failed!\n");
exit(1);
}
printf("welcome\n");
ros::NodeHandle nh;
image_transport::ImageTransport it(nh);
image_transport::Subscriber sub = it.subscribe("camera/image_raw", 1, imageCallback);
ros::Subscriber camInfo = nh.subscribe("camera/camera_info", 1, camInfoCallback);
ros::Rate loop_rate(10);
while (ros::ok())
{
ros::spinOnce();
loop_rate.sleep();
}
close(sockfd);
//ROS_INFO is the replacement for printf/cout.
ROS_INFO("No error.");
return 0;
}
|
4ccf7f073399f924279f110a59425c369b86f069
|
d031284f160507a502d1c975ac076f946fe9a52d
|
/utils/ListPackage/NodeLinkedListt/NodeLinkedListt.h
|
92f15128f1bca69c3adfc5c9f15359dfabddbfc5
|
[] |
no_license
|
hovanvydut/PBL2-Library-Management-Qt-CPP
|
4338823c00bd5ccbd387e565ae6daae3fbab9f88
|
91a68757bcaf3f2e41eb5561dd6c1cdd381d0235
|
refs/heads/main
| 2023-02-08T10:41:47.510744
| 2020-12-24T06:04:10
| 2020-12-24T06:04:10
| 316,531,763
| 1
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,567
|
h
|
NodeLinkedListt.h
|
#ifndef NODELINKEDLISTT_H
#define NODELINKEDLISTT_H
#ifndef IOSTREAM
#define IOSTREAM
#include <iostream>
#endif
template <class E>
class NodeLinkedListt
{
private:
E data;
NodeLinkedListt *previous;
NodeLinkedListt *next;
public:
NodeLinkedListt(const E);
~NodeLinkedListt();
bool hasNext();
bool hasPrevious();
NodeLinkedListt *getNext();
NodeLinkedListt *getPrevious();
bool setNextNode(NodeLinkedListt *);
bool setPreviousNode(NodeLinkedListt *);
const E getData();
const E setData(const E);
template<typename T>
struct is_pointer { static const bool value = false; };
template<typename T>
struct is_pointer<T*> { static const bool value = true; };
// template <class T> friend std::ostream &operator<<(std::ostream &, const NodeLinkedListt<T> &);
// template <class T> friend std::ostream &operator<<(std::ostream &, const NodeLinkedListt<T> *);
};
template <class E>
NodeLinkedListt<E>::NodeLinkedListt(const E data)
{
this->previous = nullptr;
this->next = nullptr;
this->data = data;
}
template <class E>
NodeLinkedListt<E>::~NodeLinkedListt()
{
if (is_pointer<E>::value)
{
// delete this->data;
}
}
template <class E>
bool NodeLinkedListt<E>::hasNext()
{
return this->next != nullptr;
}
template <class E>
bool NodeLinkedListt<E>::hasPrevious()
{
return this->previous != nullptr;
}
template <class E>
NodeLinkedListt<E> *NodeLinkedListt<E>::getNext()
{
return this->next;
}
template <class E>
NodeLinkedListt<E> *NodeLinkedListt<E>::getPrevious()
{
return this->previous;
}
template <class E>
bool NodeLinkedListt<E>::setNextNode(NodeLinkedListt *newNode)
{
this->next = newNode;
return true;
}
template <class E>
bool NodeLinkedListt<E>::setPreviousNode(NodeLinkedListt *newNode)
{
NodeLinkedListt *tmp = this->previous;
this->previous = newNode;
if (tmp != nullptr)
delete tmp;
return true;
}
template <class E>
const E NodeLinkedListt<E>::getData()
{
return this->data;
}
template <class E>
const E NodeLinkedListt<E>::setData(const E data)
{
E &before = this->data;
this->data = data;
return before;
}
//template <class T>
//std::ostream &operator<<(std::ostream &o, const NodeLinkedListt<T> &nodeLinkedList)
//{
// o << nodeLinkedList.data;
// return o;
//}
//template <class T>
//std::ostream &operator<<(std::ostream &o, const NodeLinkedListt<T> *nodeLinkedList)
//{
// o << nodeLinkedList->data;
// return o;
//}
#endif // NODELINKEDLISTT_H
|
a42bcd0256665e6337b49a26c1c0b570cf5d0189
|
4db4209a737c4b15311f9cd04dcc0647fec1eda9
|
/Source/mgVectorPoint.h
|
46f0e84f8239d320fe437b6659978f3fbaace555
|
[] |
no_license
|
Neyav/mgGameEngine
|
7cdbbf55cfba4ea41e6d5e59faa8f8fe015b6751
|
d3138a1a07ca5f5eaa742eccb60fbca9288d3a46
|
refs/heads/master
| 2022-06-18T03:30:49.730589
| 2022-05-18T23:08:09
| 2022-05-18T23:08:09
| 32,133,116
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,347
|
h
|
mgVectorPoint.h
|
#ifndef MGVECTORPOINTH
#define MGVECTORPOINTH
// Version string to faciliate quick identification of differences between uses of the included sources.
static char __mgVersion[] = "mgGameEngine 2-Branch";
// Helper Math functions. Too few for their own file.
#define mgPI 3.14159265359
#define mgSmallestValue(X, Y) (((X) < (Y)) ? (X) : (Y))
#define mgLargestValue(X, Y) (((X) < (Y)) ? (Y) : (X))
// floor function call is slow. Implement faster version.
inline int mgFloor(double value)
{
return (int) value - (value<0);
}
// =------------------------------------=
// = mgPoint C++ class =
// =------------------------------------=
//
// mgPoint is a container for a 2D position reference on the gameworld.
//
// Hilariously I originally named this file VectorPoint because the two are so similar in the sense that they are both Y and X values, and most
// applications use them interchangably. It originally just had the structure for a point, and a class for the vector because the vector class uses more
// memory than a point needs and that was bothering me. Now the mgPoint class has so many overloads it is really a proper and true class all on its own and
// the file name, that was previously just a nod to the mgPoint struct being in here, has true meaning.
class mgPoint
{
public:
double Y;
double X;
mgPoint();
// Manipulative Overloads
mgPoint operator+(const mgPoint& other); // addition
mgPoint operator-(const mgPoint& other); // subtraction
// Comparison Overloads
bool operator>(const mgPoint& other);
bool operator<(const mgPoint& other);
bool operator==(const mgPoint& other);
bool operator!=(const mgPoint& other);
};
double DistanceBetweenPoints(mgPoint Start, mgPoint End);
// =------------------------------------=
// = mgVector C++ class =
// =------------------------------------=
//
// A Vector represents a direction. This class has a bunch of functions that facilitate ease of use to that purpose.
class mgVector
{
public:
double Y;
double X;
double Magnitude; // Magnitude represents the length of the vector
bool AutoNormalize; // Set to true when setting a vector is intended to normalize it to 1.
// If false, the Magnitude will instead be overwritten.
// Operator overloading
double operator*(const mgVector& other); // Returns the dot product
mgVector operator*(const double& scalar); // multiplies it by a scalar
mgVector operator/(const double& scalar); // divides it by a scalar
mgVector operator+(const mgVector& other); // addition
mgVector operator-(const mgVector& other); // subtraction
void ReverseDirection(void);
// Class functions
void NormalizeVector(double MagnitudeOverride);
void NormalizeVector(void);
void CalculateMagnitude(void);
void VectorFromCoord(mgPoint StartCoord, mgPoint EndCoord);
void VectorFromCoord(double Y1, double X1, double Y2, double X2);
void VectorFromPoints(mgPoint Start, mgPoint End);
void VectorFromRadians(double Radians);
void VectorFromDegrees(double Degrees);
mgPoint VectorStepCoords(double VectorStep);
mgVector ReturnUnitVector(void); // Returns a vector pointing in the same direction but with a magnitude of 1.
double ProjectAgainst(mgVector ProjectionAxis); // Returns a double representing this vectors projection along ProjectionAxis
mgVector();
};
#endif
|
12839acdfeac90d681ebcbd4f351e8f3e8cca980
|
d1913394590c65d5f3858d124d49ba39bbf6a3a2
|
/vc-magic/src/Marker.cpp
|
d358df7d0799f99009694f69d42f597b5a9b621e
|
[] |
no_license
|
Serabass/vc-magic
|
e690abddc462b1e18e6a2eba8763926504853be8
|
227d20e56d1bab60ae1b35e0e8a48aadfbe0b6ee
|
refs/heads/master
| 2020-04-15T15:22:16.786270
| 2017-12-08T05:22:07
| 2017-12-08T05:22:07
| 52,162,160
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,974
|
cpp
|
Marker.cpp
|
#include "Marker.h"
//--------------------------------------------------------------------------------
// ScriptMarker class functions.
//
ViceMarker::ViceMarker()
{
m_dwMarker = 0;
}
ViceMarker::ViceMarker(ViceVector3Df position, int color, int flag)
{
$(&create_marker, position.x, position.y, position.z, color, flag, &m_dwMarker);
}
ViceMarker::ViceMarker(DWORD dwMarker)
{
m_dwMarker = dwMarker;
}
ViceMarker::~ViceMarker()
{
if (m_bCreated)
{
$(&disable_marker, &m_dwMarker);
}
}
// Works
void ViceMarker::TieToActor(ViceActor* actor, int iSize, int iType)
{
$(&tie_marker_to_actor, actor->GetActor(), iSize, iType, &m_dwMarker);
}
void ViceMarker::TieToVehicle(DWORD* pdwVehicle, int iSize, int iType)
{
$(&tie_marker_to_car, pdwVehicle, iSize, iType, &m_dwMarker);
}
void ViceMarker::SphereAndIcon(float x, float y, float z, int iIcon)
{
$(&create_icon_marker_sphere, x, y, z, iIcon, &m_dwMarker);
}
void ViceMarker::ShowOnRadar(int iSize)
{
if (m_bCreated)
{
$(&show_on_radar, &m_dwMarker, iSize);
}
}
void ViceMarker::SetColor(int iColour)
{
if (m_bCreated)
{
$(&set_marker_color, &m_dwMarker, iColour);
}
}
void ViceMarker::SetBrightness(int iBrightness)
{
if (m_bCreated)
{
$(&set_marker_brightness, &m_dwMarker, iBrightness);
}
}
ViceMarker* ViceMarker::CreateAboveCar(DWORD* dwCar) {
DWORD m_dwMarker;
$(&create_marker_above_car, &m_dwMarker, dwCar);
return new ViceMarker(m_dwMarker);
}
ViceMarker* ViceMarker::CreateAboveActor(ViceActor* actor) {
DWORD m_dwMarker;
$(&create_marker_above_actor, actor->GetActor(), &m_dwMarker);
return new ViceMarker(m_dwMarker);
}
ViceMarker* ViceMarker::CreateAboveObject(DWORD* dwActor) {
DWORD m_dwMarker;
$(&create_marker_above_object, &m_dwMarker, dwActor);
return new ViceMarker(m_dwMarker);
}
ViceMarker* ViceMarker::CreateAbovePickup(DWORD* dwPickup) {
DWORD m_dwMarker;
$(&create_marker_above_pickup, &m_dwMarker, dwPickup);
return new ViceMarker(m_dwMarker);
}
|
ba8d0eda0d2e3413b230766b5eb0bea88e8bb131
|
6a67e23345f03d461be96884769b4a299698ae31
|
/src/resource/resource_id.h
|
bfd6edeab3b07ada1f6378ecf4f5d30ba3583856
|
[
"MIT"
] |
permissive
|
doc22940/crown
|
b1a157444c6e4ef6130fac0e8ed86f6dfa5f38db
|
f310ca75ea0833e6146d86a456f51296c6054f49
|
refs/heads/master
| 2021-02-07T20:21:59.458423
| 2020-02-28T19:02:57
| 2020-02-28T19:02:57
| 244,072,764
| 0
| 0
|
MIT
| 2021-01-28T10:19:36
| 2020-03-01T02:18:53
| null |
UTF-8
|
C++
| false
| false
| 1,029
|
h
|
resource_id.h
|
/*
* Copyright (c) 2012-2020 Daniele Bartolini and individual contributors.
* License: https://github.com/dbartolini/crown/blob/master/LICENSE
*/
#pragma once
#include "core/strings/string_id.h"
#include <inttypes.h> // PRIx64
#define RESOURCE_ID_FMT "#ID(%.16" PRIx64 ")"
#define RESOURCE_ID_FMT_STR "#ID(%s)"
#define RESOURCE_ID_BUF_LEN 17
namespace crown
{
typedef StringId64 ResourceId;
/// Returns the resource id from @a type and @a name.
inline ResourceId resource_id(StringId64 type, StringId64 name)
{
ResourceId id { type._id ^ name._id };
return id;
}
/// Returns the resource id from @a type and @a name.
inline ResourceId resource_id(const char* type, u32 type_len, const char* name, u32 name_len)
{
return resource_id(StringId64(type, type_len), StringId64(name, name_len));
}
/// Returns the resource id from @a path.
ResourceId resource_id(const char* path);
/// Returns the destination @a path of the resource @a id.
void destination_path(DynamicString& path, ResourceId id);
} // namespace crown
|
a9699bed8ef29b3c19eef12ec9837c861a31d6b6
|
9e02c55e31a1539268ccdbd4f8dc0698d8eca794
|
/AVL tree - dictionary/main.cpp
|
4950217f52c3a2645cc766e59640e628cf58379e
|
[] |
no_license
|
uchmielewska/EADS
|
4dfb28c4fbe0436daf984911850ace4d13c24d58
|
c82f90db16a0b6b713d85108e49a4f72e4d1c497
|
refs/heads/main
| 2023-04-09T14:31:49.521618
| 2021-04-12T21:52:58
| 2021-04-12T21:52:58
| 357,346,745
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,177
|
cpp
|
main.cpp
|
#include <iostream>
#include "dictionary.h"
using namespace std;
int main()
{
//CONSTRUCTORS TEST
{
Dictionary<int, int> test;
if(!test.is_empty())
cerr << "default constructor error is_empty() == false\n";
if(test.height())
cerr << "default constructor error height() != 0\n";
test.add(1, 1);
Dictionary<int, int> test2(test);
if(test2.is_empty())
cerr << "copy constructor error is_empty() == true\n";
if(test2.height())
cerr << "copy constructor error height() != 1\n";
}
//no error message means that everything works properly :)
//ADD METHOD TEST
{
Dictionary<int, int> test;
test.add(1, 1);
if(test.is_empty())
cerr << "add method error is_empty() == true\n";
if(test.height() != 0)
cerr << "add method error height() != 0\n";
}
//FIND METHOD TEST
{
Dictionary<int, int> test;
test.add(1, 1);
if(!test.find(1))
cerr << "find method error find(1) == false\n";
if(!test.find(2)) //expected to obtain a message
cerr << "Expected note, not an error: find(2) == false, no such node with key ==2\n";
}
//"operator=" TEST
{
cout<<"\nTesting operator= (tree should have nodes from 0 to 9):"<<endl<<endl;
Dictionary<int, int> test;
for(int i = 0; i < 10; i++)
test.add(i, i);
Dictionary<int, int> test2;
test2 = test;
test2.print(cout);
}
//"Get_minimal_node" AND "Get_maximal_node" AND "get_info" METHODS TEST
{
Dictionary<int, int> test;
for(int i = 0; i < 10; i++)
test.add(i, i);
if(test.Get_maximal_node() != 9)
cerr << "Get_maximal_node error returned != 9\n";
if(test.Get_minimal_node() != 0)
cerr << "Get_minimal_node error returned != 0\n";
if(test.get_info(4) != 4)
cerr << "get_info error\n";
}
//REMOVE METHOD TEST
{
cout<<"\nTesting remove method (there should be no node 3):"<<endl<<endl;
Dictionary<int, int> test;
test.add(1, 1);
test.add(5, 1);
test.add(8, 1);
test.add(11, 1);
test.add(2, 1);
test.add(34, 1);
test.add(0, 1);
test.add(56, 1);
test.add(10, 1);
test.add(23, 1);
test.add(3, 1);
test.remove(3);
test.print(cout);
try{
test.remove(3);
}
catch(Dictionary<int, int>::DictionaryException& ex){
cout << ex.what() << '\n';
}
}
//ITERATOR TEST
{
cout<<"\nTesting iterators:"<<endl<<endl;
Dictionary<int, int> test;
for(int i = 0; i < 10; i++)
test.add(i, i);
test.print(cout);
Dictionary<int, int>::Iterator it=test.ibegin();
it.go_right();
it.go_left();
it.go_right();
cout<<"Going: right left right, with iterator, and printing key and info: "<<it.show_key()<<"\t"<<it.show_info()<<endl;
}
//chmielewska
return 0;
}
|
03259ce9d149ba80a53946419545154d1c46e79e
|
48ebb9aa139b70ed9d8411168c9bd073741393f5
|
/Classes/Native/AssemblyU2DCSharp_TheSecondaryMenuControl_U3CgetOn4197163907.h
|
5ce9841179319d3ed15e193e8d879d2cfa7b47b3
|
[] |
no_license
|
JasonRy/0.9.1
|
36cae42b24faa025659252293d8c7f8bfa8ee529
|
b72ec7b76d3e26eb055574712a5150b1123beaa5
|
refs/heads/master
| 2021-07-22T12:25:04.214322
| 2017-11-02T07:42:18
| 2017-11-02T07:42:18
| 109,232,088
| 1
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 2,834
|
h
|
AssemblyU2DCSharp_TheSecondaryMenuControl_U3CgetOn4197163907.h
|
#pragma once
#include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <stdint.h>
#include "mscorlib_System_Object2689449295.h"
// System.Collections.Generic.List`1<ConsoleApplication.LocalProcessing/DeviceProperties>
struct List_1_t1561597113;
// System.Object
struct Il2CppObject;
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// TheSecondaryMenuControl/<getOneDeviceInfo>c__Iterator2
struct U3CgetOneDeviceInfoU3Ec__Iterator2_t4197163907 : public Il2CppObject
{
public:
// System.Collections.Generic.List`1<ConsoleApplication.LocalProcessing/DeviceProperties> TheSecondaryMenuControl/<getOneDeviceInfo>c__Iterator2::LDS
List_1_t1561597113 * ___LDS_0;
// System.Object TheSecondaryMenuControl/<getOneDeviceInfo>c__Iterator2::$current
Il2CppObject * ___U24current_1;
// System.Boolean TheSecondaryMenuControl/<getOneDeviceInfo>c__Iterator2::$disposing
bool ___U24disposing_2;
// System.Int32 TheSecondaryMenuControl/<getOneDeviceInfo>c__Iterator2::$PC
int32_t ___U24PC_3;
public:
inline static int32_t get_offset_of_LDS_0() { return static_cast<int32_t>(offsetof(U3CgetOneDeviceInfoU3Ec__Iterator2_t4197163907, ___LDS_0)); }
inline List_1_t1561597113 * get_LDS_0() const { return ___LDS_0; }
inline List_1_t1561597113 ** get_address_of_LDS_0() { return &___LDS_0; }
inline void set_LDS_0(List_1_t1561597113 * value)
{
___LDS_0 = value;
Il2CppCodeGenWriteBarrier(&___LDS_0, value);
}
inline static int32_t get_offset_of_U24current_1() { return static_cast<int32_t>(offsetof(U3CgetOneDeviceInfoU3Ec__Iterator2_t4197163907, ___U24current_1)); }
inline Il2CppObject * get_U24current_1() const { return ___U24current_1; }
inline Il2CppObject ** get_address_of_U24current_1() { return &___U24current_1; }
inline void set_U24current_1(Il2CppObject * value)
{
___U24current_1 = value;
Il2CppCodeGenWriteBarrier(&___U24current_1, value);
}
inline static int32_t get_offset_of_U24disposing_2() { return static_cast<int32_t>(offsetof(U3CgetOneDeviceInfoU3Ec__Iterator2_t4197163907, ___U24disposing_2)); }
inline bool get_U24disposing_2() const { return ___U24disposing_2; }
inline bool* get_address_of_U24disposing_2() { return &___U24disposing_2; }
inline void set_U24disposing_2(bool value)
{
___U24disposing_2 = value;
}
inline static int32_t get_offset_of_U24PC_3() { return static_cast<int32_t>(offsetof(U3CgetOneDeviceInfoU3Ec__Iterator2_t4197163907, ___U24PC_3)); }
inline int32_t get_U24PC_3() const { return ___U24PC_3; }
inline int32_t* get_address_of_U24PC_3() { return &___U24PC_3; }
inline void set_U24PC_3(int32_t value)
{
___U24PC_3 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
|
aecb64c3174e1f471374c3fe87d83501d311e99b
|
9cbf3eec191141dfe8ccd863d7c2a4988bc92dbb
|
/algorithm/solution_2.4.25.cpp
|
775038194e365bdf1609ca7ed58cb81b6c474b5b
|
[] |
no_license
|
MOON-CLJ/learning_cpp
|
e2f5574f66c0880f5e72fa232b83d84ecfdc8b42
|
c7594156ccbf72d528b3bf5c5ab8a0b16df86795
|
refs/heads/master
| 2021-01-19T06:15:57.431024
| 2015-03-22T10:11:38
| 2015-03-22T10:11:38
| 11,716,435
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,144
|
cpp
|
solution_2.4.25.cpp
|
#include <iostream>
#include <cmath>
#include "MinPQ.h"
struct X {
long val;
int i;
int j;
X() {}
X(int i, int j): i(i), j(j) {
val = (long) std::pow(i, 3) + (long) std::pow(j, 3);
}
inline bool operator>(const X& other) {
return other.val < val;
}
};
int main() {
int i;
const int N = 100;
MinPQ<X> pq(N);
for (i = 0; i <= N; i++)
pq.insert(X(i, 0));
long last_val = 0;
int last_i = 0;
int last_j = 0;
while (!pq.isEmpty()) {
X tmp = pq.delMin();
if (tmp.val != last_val) {
last_val = tmp.val;
last_i = tmp.i;
last_j = tmp.j;
} else {
if (!(last_i == tmp.j && last_j == tmp.i)) {
std::cout << "-<-<-< >->->-" << std::endl;
std::cout << last_val << " " << last_i << " " << last_j << std::endl;
std::cout << tmp.val << " " << tmp.i << " " << tmp.j << std::endl;
}
last_i = tmp.i;
last_j = tmp.j;
}
if (tmp.j < N)
pq.insert(X(tmp.i, tmp.j + 1));
}
return 0;
}
|
d10e544ce4e014093ff75c7d13bd3cd04a1255d6
|
8791af6a688144906240096aacbc4750773a3de2
|
/jni/JJerasure.cpp
|
d253d664c27d2e120b798f590298de8504431d47
|
[] |
no_license
|
buptUnixGuys/jerasure-jni
|
9849bac51bf4c9431505235188f913afb262de2a
|
538145d69cef49b124d1c0032d872185b0bb4444
|
refs/heads/master
| 2021-01-20T12:38:14.635228
| 2014-12-16T05:50:42
| 2014-12-16T05:50:42
| 28,066,293
| 1
| 2
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 13,978
|
cpp
|
JJerasure.cpp
|
#include <stdlib.h>
#include "JJerasure.h"
#include "jerasure.h"
#include "javautility.h"
#include "reed_sol.h"
#define talloc(type, num) (type *) malloc(sizeof(type)*(num))
/*
* Class: cn_ctyun_ec_jni_Jerasure
* Method: jerasure_matrix_to_bitmatrix
* Signature: (III[I)[I
*/
JNIEXPORT jintArray JNICALL Java_cn_ctyun_ec_jni_Jerasure_jerasure_1matrix_1to_1bitmatrix
(JNIEnv *env, jclass clazz, jint k, jint m, jint w, jintArray jmatrix)
{
bool outOfMemory = false;
jintArray result = NULL;
jint* matrix = env->GetIntArrayElements(jmatrix, NULL);
if(matrix != NULL) {
int* resultMatrix = jerasure_matrix_to_bitmatrix(k, m, w, (int*)matrix);
if(resultMatrix != NULL) {
result = env->NewIntArray(k*m*w*w);
if(result != NULL) {
env->SetIntArrayRegion(result, 0, k*m*w*w, (jint*)resultMatrix);
} else {
outOfMemory = true;
}
} else {
outOfMemory = true;
}
free(resultMatrix);
} else {
outOfMemory = true;
}
if(outOfMemory) {
throwOutOfMemoryError(env, "Could not allocate memory.");
}
env->ReleaseIntArrayElements(jmatrix, matrix, NULL);
return result;
}
/*
* Class: cn_ctyun_ec_jni_Jerasure
* Method: jerasure_do_parity
* Signature: (I[Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;I)V
*/
JNIEXPORT void JNICALL Java_cn_ctyun_ec_jni_Jerasure_jerasure_1do_1parity
(JNIEnv *env, jclass clazz, jint k, jobjectArray jdata_ptrs, jobject jparity_ptr, jint size)
{
char **data = convertFromBufferArray(env, jdata_ptrs);
char *coding = (char*)env->GetDirectBufferAddress(jparity_ptr);
jerasure_do_parity(k, data, coding, size);
delete[] data;
}
/*
* Class: cn_ctyun_ec_jni_Jerasure
* Method: jerasure_matrix_encode
* Signature: (III[I[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;I)V
*/
JNIEXPORT void JNICALL Java_cn_ctyun_ec_jni_Jerasure_jerasure_1matrix_1encode
(JNIEnv *env, jclass clazz, jint k, jint m, jint w, jintArray jmatrix, jobjectArray jdata_ptrs, jobjectArray jcoding_ptrs, jint size)
{
jint* matrix = env->GetIntArrayElements(jmatrix, NULL);
if(matrix == NULL){
throwOutOfMemoryError(env, "");
}
char **data = convertFromBufferArray(env, jdata_ptrs);
char **coding = convertFromBufferArray(env, jcoding_ptrs);
jerasure_matrix_encode(k, m ,w, (int*)matrix, data, coding, size);
env->ReleaseIntArrayElements(jmatrix, matrix, NULL);
delete[] data;
delete[] coding;
}
/*
* Class: cn_ctyun_ec_jni_Jerasure
* Method: jerasure_bitmatrix_encode
* Signature: (III[I[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;II)V
*/
JNIEXPORT void JNICALL Java_cn_ctyun_ec_jni_Jerasure_jerasure_1bitmatrix_1encode
(JNIEnv *env, jclass clazz, jint k, jint m, jint w, jintArray jbitmatrix, jobjectArray jdata_ptrs, jobjectArray jcoding_ptrs, jint size, jint packetsize)
{
jint* bitmatrix = env->GetIntArrayElements(jbitmatrix, NULL);
if(bitmatrix == NULL){
throwOutOfMemoryError(env, "");
}
char **data = convertFromBufferArray(env, jdata_ptrs);
char **coding = convertFromBufferArray(env, jcoding_ptrs);
jerasure_bitmatrix_encode(k,m,w, (int*)bitmatrix, data, coding, size, packetsize);
env->ReleaseIntArrayElements(jbitmatrix, bitmatrix, NULL);
delete[] data;
delete[] coding;
}
/*
* Class: cn_ctyun_ec_jni_Jerasure
* Method: jerasure_matrix_decode
* Signature: (III[IZ[I[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;I)Z
*/
JNIEXPORT jboolean JNICALL Java_cn_ctyun_ec_jni_Jerasure_jerasure_1matrix_1decode
(JNIEnv *env, jclass clazz, jint k, jint m, jint w, jintArray jmatrix, jboolean row_k_ones, jintArray jerasures, jobjectArray jdata_ptrs, jobjectArray jcoding_ptrs, jint size)
{
int result = -1;
jint *erasures = NULL, *matrix = NULL;
erasures = env->GetIntArrayElements(jerasures, NULL);
matrix = env->GetIntArrayElements(jmatrix, NULL);
char **data = convertFromBufferArray(env, jdata_ptrs);
char **coding = convertFromBufferArray(env, jcoding_ptrs);
if(erasures != NULL && matrix != NULL){
result = jerasure_matrix_decode(k, m, w, (int*)matrix, (row_k_ones == JNI_TRUE ? 1 : 0), (int*)erasures, data, coding, size);
} else {
throwOutOfMemoryError(env, "");
}
env->ReleaseIntArrayElements(jmatrix, matrix, NULL);
env->ReleaseIntArrayElements(jerasures, erasures, NULL);
delete[] data;
delete[] coding;
if(result == 0)
return JNI_TRUE;
return JNI_FALSE;
}
/*
* Class: cn_ctyun_ec_jni_Jerasure
* Method: jerasure_bitmatrix_decode
* Signature: (III[IZ[I[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;II)Z
*/
JNIEXPORT jboolean JNICALL Java_cn_ctyun_ec_jni_Jerasure_jerasure_1bitmatrix_1decode
(JNIEnv *env, jclass clazz, jint k, jint m, jint w, jintArray jbitmatrix, jboolean row_k_ones, jintArray jerasures, jobjectArray jdata_ptrs, jobjectArray jcoding_ptrs, jint size, jint packetsize)
{
int result = -1;
jint *bitmatrix = NULL, *erasures = NULL;
bitmatrix = env->GetIntArrayElements(jbitmatrix, NULL);
erasures = env->GetIntArrayElements(jerasures, NULL);
char **data = convertFromBufferArray(env, jdata_ptrs);
char **coding = convertFromBufferArray(env, jcoding_ptrs);
if(bitmatrix != NULL && erasures != NULL) {
result = jerasure_bitmatrix_decode(k,m,w, (int*)bitmatrix, (row_k_ones == JNI_TRUE ? 1 : 0), (int*)erasures, data, coding, size, packetsize);
} else {
throwOutOfMemoryError(env, "");
}
env->ReleaseIntArrayElements(jbitmatrix, bitmatrix, NULL);
env->ReleaseIntArrayElements(jerasures, erasures, NULL);
delete[] data;
delete[] coding;
if(result == 0)
return JNI_TRUE;
return JNI_FALSE;
}
/*
* Class: cn_ctyun_ec_jni_Jerasure
* Method: jerasure_make_decoding_matrix
* Signature: (III[I[Z[I[I)Z
*/
JNIEXPORT jboolean JNICALL Java_cn_ctyun_ec_jni_Jerasure_jerasure_1make_1decoding_1matrix
(JNIEnv *env, jclass clazz, jint k, jint m, jint w, jintArray jmatrix, jbooleanArray jerased, jintArray jdecoding_matrix, jintArray jdm_ids)
{
int result = -1;
int *erased = talloc(int, k+m);
jboolean* erasedj = env->GetBooleanArrayElements(jerased, NULL);
jint* matrix = env->GetIntArrayElements(jmatrix, NULL);
jint* decoding_matrix = env->GetIntArrayElements(jdecoding_matrix, NULL);
jint* dm_ids = env->GetIntArrayElements(jdm_ids, NULL);
if(matrix != NULL && erased != NULL && erasedj != NULL && matrix != NULL && decoding_matrix != NULL && dm_ids != NULL) {
for(int i = 0; i < (k+m); ++i) {
if(erasedj[i] == JNI_TRUE) {
erased[i] = 1;
} else {
erased[i] = 0;
}
}
result = jerasure_make_decoding_matrix(k, m, w, (int*)matrix, erased, (int*)decoding_matrix, (int*)dm_ids);
} else {
throwOutOfMemoryError(env, "");
}
env->ReleaseBooleanArrayElements(jerased, erasedj, NULL);
env->ReleaseIntArrayElements(jmatrix, matrix, NULL);
env->ReleaseIntArrayElements(jdecoding_matrix, decoding_matrix, NULL);
env->ReleaseIntArrayElements(jdm_ids, dm_ids, NULL);
free(erased);
if(result == 0)
return JNI_TRUE;
return JNI_FALSE;
}
/*
* Class: cn_ctyun_ec_jni_Jerasure
* Method: jerasure_make_decoding_bitmatrix
* Signature: (III[I[Z[I[I)Z
*/
JNIEXPORT jboolean JNICALL Java_cn_ctyun_ec_jni_Jerasure_jerasure_1make_1decoding_1bitmatrix
(JNIEnv *env, jclass clazz, jint k, jint m, jint w, jintArray jmatrix, jbooleanArray jerased, jintArray jdecoding_matrix, jintArray jdm_ids)
{
int result = -1;
int* erased = talloc(int, k+m);
jboolean* erasedj = env->GetBooleanArrayElements(jerased, NULL);
jint* dm_ids = env->GetIntArrayElements(jdm_ids, NULL);
jint* decoding_matrix = env->GetIntArrayElements(jdecoding_matrix, NULL);
jint* matrix = env->GetIntArrayElements(jmatrix, NULL);
if(erasedj != NULL && erased != NULL && dm_ids != NULL && decoding_matrix != NULL && matrix != NULL) {
for(int i = 0; i < k+m; ++i) {
if(erasedj[i] == JNI_TRUE) {
erased[i] = 1;
} else {
erased[i] = 0;
}
}
result = jerasure_make_decoding_bitmatrix(k, m, w, (int*)matrix, erased, (int*)decoding_matrix, (int*)dm_ids);
} else {
throwOutOfMemoryError(env, "");
}
free(erased);
env->ReleaseBooleanArrayElements(jerased, erasedj, NULL);
env->ReleaseIntArrayElements(jdm_ids, dm_ids, NULL);
env->ReleaseIntArrayElements(jdecoding_matrix, decoding_matrix, NULL);
env->ReleaseIntArrayElements(jmatrix, matrix, NULL);
if(result == 0)
return JNI_TRUE;
return JNI_FALSE;
}
/*
* Class: cn_ctyun_ec_jni_Jerasure
* Method: jerasure_erasures_to_erased
* Signature: (II[I)[Z
*/
JNIEXPORT jbooleanArray JNICALL Java_cn_ctyun_ec_jni_Jerasure_jerasure_1erasures_1to_1erased
(JNIEnv *env, jclass clazz, jint k, jint m, jintArray jerasures)
{
bool outOfMemory = false;
jbooleanArray result;
jint* erasures = env->GetIntArrayElements(jerasures, NULL);
if(erasures != NULL) {
int *erased = jerasure_erasures_to_erased(k,m,(int*)erasures);
if(erased != NULL)
{
result = env->NewBooleanArray(k+m);
if(result != NULL) {
jboolean* resultValues = env->GetBooleanArrayElements(result, NULL);
for(int i = 0; i < k+m; ++i) {
resultValues[i] = (erased[i] == 1 ? JNI_TRUE : JNI_FALSE);
}
env->ReleaseBooleanArrayElements(result, resultValues, NULL);
} else {
outOfMemory = true;
}
} else {
outOfMemory = true;
}
free(erased);
} else {
outOfMemory = true;
}
if(outOfMemory) {
throwOutOfMemoryError(env, "");
}
env->ReleaseIntArrayElements(jerasures, erasures, NULL);
return result;
}
/*
* Class: cn_ctyun_ec_jni_Jerasure
* Method: jerasure_matrix_dotprod
* Signature: (II[I[II[[B[[BI)V
*/
JNIEXPORT void JNICALL Java_cn_ctyun_ec_jni_Jerasure_jerasure_1matrix_1dotprod
(JNIEnv *env, jclass clazz, jint, jint, jintArray, jintArray, jint, jobjectArray, jobjectArray, jint);
/*
* Class: cn_ctyun_ec_jni_Jerasure
* Method: jerasure_bitmatrix_dotprod
* Signature: (II[I[II[[B[[BII)V
*/
JNIEXPORT void JNICALL Java_cn_ctyun_ec_jni_Jerasure_jerasure_1bitmatrix_1dotprod
(JNIEnv *env, jclass clazz, jint, jint, jintArray, jintArray, jint, jobjectArray, jobjectArray, jint, jint);
/*
* Class: cn_ctyun_ec_jni_Jerasure
* Method: jerasure_invert_matrix
* Signature: ([I[III)I
*/
JNIEXPORT jint JNICALL Java_cn_ctyun_ec_jni_Jerasure_jerasure_1invert_1matrix
(JNIEnv *env, jclass clazz, jintArray, jintArray, jint, jint);
/*
* Class: cn_ctyun_ec_jni_Jerasure
* Method: jerasure_invert_bitmatrix
* Signature: ([I[II)I
*/
JNIEXPORT jint JNICALL Java_cn_ctyun_ec_jni_Jerasure_jerasure_1invert_1bitmatrix
(JNIEnv *env, jclass clazz, jintArray, jintArray, jint);
/*
* Class: cn_ctyun_ec_jni_Jerasure
* Method: jerasure_invertible_matrix
* Signature: ([III)I
*/
JNIEXPORT jint JNICALL Java_cn_ctyun_ec_jni_Jerasure_jerasure_1invertible_1matrix
(JNIEnv *env, jclass clazz, jintArray, jint, jint);
/*
* Class: cn_ctyun_ec_jni_Jerasure
* Method: jerasure_invertible_bitmatrix
* Signature: ([II)I
*/
JNIEXPORT jint JNICALL Java_cn_ctyun_ec_jni_Jerasure_jerasure_1invertible_1bitmatrix
(JNIEnv *env, jclass clazz, jintArray, jint);
/*
* Class: cn_ctyun_ec_jni_Jerasure
* Method: jerasure_print_matrix
* Signature: ([IIII)V
*/
JNIEXPORT void JNICALL Java_cn_ctyun_ec_jni_Jerasure_jerasure_1print_1matrix
(JNIEnv *env, jclass clazz, jintArray, jint, jint, jint);
/*
* Class: cn_ctyun_ec_jni_Jerasure
* Method: jerasure_print_bitmatrix
* Signature: ([IIII)V
*/
JNIEXPORT void JNICALL Java_cn_ctyun_ec_jni_Jerasure_jerasure_1print_1bitmatrix
(JNIEnv *env, jclass clazz, jintArray, jint, jint, jint);
/*
* Class: cn_ctyun_ec_jni_Jerasure
* Method: jerasure_matrix_multiply
* Signature: ([I[IIIIII)[I
*/
JNIEXPORT jintArray JNICALL Java_cn_ctyun_ec_jni_Jerasure_jerasure_1matrix_1multiply
(JNIEnv *env, jclass clazz, jintArray, jintArray, jint, jint, jint, jint, jint);
/*
* Class: cn_ctyun_ec_jni_Jerasure
* Method: jerasure_get_stats
* Signature: ([D)V
*/
JNIEXPORT void JNICALL Java_cn_ctyun_ec_jni_Jerasure_jerasure_1get_1stats
(JNIEnv *env, jclass clazz, jdoubleArray);
/*
* Class: cn_ctyun_ec_jni_Jerasure
* Method: my_jerasure_matrix_encode
* Signature: (IIIJ[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;I)V
*/
JNIEXPORT void JNICALL Java_cn_ctyun_ec_jni_Jerasure_my_1jerasure_1matrix_1encode
(JNIEnv *env, jclass clazz, jint k, jint m, jint w, jlong jmatrixId, jobjectArray jdata_ptrs, jobjectArray jcoding_ptrs, jint size)
{
int* matrix = (int*) jmatrixId;
char **data = convertFromBufferArray(env, jdata_ptrs);
char **coding = convertFromBufferArray(env, jcoding_ptrs);
jerasure_matrix_encode(k, m ,w, (int*)matrix, data, coding, size);
delete[] data;
delete[] coding;
}
/*
* Class: cn_ctyun_ec_jni_Jerasure
* Method: my_jerasure_matrix_decode
* Signature: (IIIJZ[I[Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;I)Z
*/
JNIEXPORT jboolean JNICALL Java_cn_ctyun_ec_jni_Jerasure_my_1jerasure_1matrix_1decode
(JNIEnv *env, jclass clazz, jint k, jint m, jint w, jlong jmatrixId, jboolean row_k_ones, jintArray jerasures, jobjectArray jdata_ptrs, jobjectArray jcoding_ptrs, jint size)
{
int result = -1;
jint *erasures = NULL;
erasures = env->GetIntArrayElements(jerasures, NULL);
int *matrix = (int*) jmatrixId;
char **data = convertFromBufferArray(env, jdata_ptrs);
char **coding = convertFromBufferArray(env, jcoding_ptrs);
if(erasures != NULL && matrix != NULL){
result = jerasure_matrix_decode(k, m, w, (int*)matrix, (row_k_ones == JNI_TRUE ? 1 : 0), (int*)erasures, data, coding, size);
} else {
throwOutOfMemoryError(env, "");
}
env->ReleaseIntArrayElements(jerasures, erasures, NULL);
delete[] data;
delete[] coding;
if(result == 0)
return JNI_TRUE;
return JNI_FALSE;
}
|
49b9718167543b1d60b7c0a4d24341b09f321601
|
571c80c75f798a4722fb46d2a05458c27402a6ca
|
/vchat/paInit.h
|
b674bfe1bfe387d7281e5b9ed1b8931495a697b3
|
[
"BSD-2-Clause"
] |
permissive
|
theDarkForce/Vocal
|
825dd31beed1e9081bbb4571ceb814df63ffbce4
|
2aa43150d642295b20d3206f030866962fdbd4f2
|
refs/heads/master
| 2021-01-10T02:32:03.242513
| 2015-10-16T01:35:27
| 2015-10-16T01:35:27
| 44,355,314
| 2
| 3
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 115
|
h
|
paInit.h
|
#include <portaudio.h>
class paInit{
public:
paInit(){
Pa_Initialize();
}
~paInit(){
Pa_Terminate();
}
};
|
198d32886e5b86506d8e737223b3fab2bfb4908d
|
4cf28a2d5549af2543c7972994d91039bf3c2e68
|
/playerbot/strategy/priest/PriestNonCombatStrategy.cpp
|
e2c1a2046fa865edc3451fbe86867c9751b3548d
|
[] |
no_license
|
ike3/mangosbot-bots
|
3f951e7ce60a3077152d815e3097e3a95902ca38
|
d0632d39c1495361cd5693cf55e81ccc03ec3364
|
refs/heads/master
| 2023-09-01T03:51:16.854715
| 2023-08-26T16:39:03
| 2023-08-26T16:39:03
| 144,438,132
| 47
| 62
| null | 2021-06-30T17:35:21
| 2018-08-12T04:39:27
|
C++
|
UTF-8
|
C++
| false
| false
| 2,053
|
cpp
|
PriestNonCombatStrategy.cpp
|
#include "botpch.h"
#include "../../playerbot.h"
#include "PriestMultipliers.h"
#include "PriestNonCombatStrategy.h"
#include "PriestNonCombatStrategyActionNodeFactory.h"
using namespace ai;
PriestNonCombatStrategy::PriestNonCombatStrategy(PlayerbotAI* ai) : NonCombatStrategy(ai)
{
actionNodeFactories.Add(new PriestNonCombatStrategyActionNodeFactory());
}
void PriestNonCombatStrategy::InitTriggers(std::list<TriggerNode*> &triggers)
{
NonCombatStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode(
"power word: fortitude",
NextAction::array(0, new NextAction("power word: fortitude", 12.0f), NULL)));
triggers.push_back(new TriggerNode(
"divine spirit",
NextAction::array(0, new NextAction("divine spirit", 14.0f), NULL)));
triggers.push_back(new TriggerNode(
"inner fire",
NextAction::array(0, new NextAction("inner fire", 10.0f), NULL)));
triggers.push_back(new TriggerNode(
"party member dead",
NextAction::array(0, new NextAction("resurrection", 30.0f), NULL)));
}
void PriestBuffStrategy::InitTriggers(std::list<TriggerNode*> &triggers)
{
NonCombatStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode(
"power word: fortitude on party",
NextAction::array(0, new NextAction("power word: fortitude on party", 11.0f), NULL)));
triggers.push_back(new TriggerNode(
"divine spirit on party",
NextAction::array(0, new NextAction("divine spirit on party", 13.0f), NULL)));
}
void PriestShadowResistanceStrategy::InitTriggers(std::list<TriggerNode*> &triggers)
{
NonCombatStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode(
"shadow protection",
NextAction::array(0, new NextAction("shadow protection", 12.0f), NULL)));
triggers.push_back(new TriggerNode(
"shadow protection on party",
NextAction::array(0, new NextAction("shadow protection on party", 11.0f), NULL)));
}
|
50dc3c715793232df36c0baa26597f50b8130cc6
|
287b14395f1509784f5c76ca898c0319447be111
|
/branchingLogic/nestedIF-formatedNumbersToOutput-v1.cpp
|
f0bfb655927c467f9c96acbe9c7103bfc8b8a699
|
[
"MIT"
] |
permissive
|
dovanduy/cppTopics
|
48045085e7afff79e22373aa04dc688056cda118
|
94461d25832b53e6c40c374fb2ff1695b3dfe3c7
|
refs/heads/master
| 2020-05-26T19:22:24.706301
| 2017-06-28T19:38:57
| 2017-06-28T19:38:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,159
|
cpp
|
nestedIF-formatedNumbersToOutput-v1.cpp
|
/* You're given an array of integers.
Can you find what fraction of the elements are
positive numbers, negative numbers and zeroes?
Print the value of the fractions
in decimal form with 3 decimal places.
Input Format:
The first line contains N: the size of the array.
The next line contains N space-separated integers.
Output Format:
Output the three values each on a different line.
The first value shows the fraction
of the count of positive numbers to the total numbers,
the second shows the fraction of negative numbers,
and the third represents the fraction of zeroes.
Correct the fraction to 3 decimal places.
Sample Input:
6
-4 3 -9 0 4 1
Sample Output:
0.500
0.333
0.167
*/
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
long long int countP=0, countN=0, countZ=0, n, num, t;
cin >>n ;
for (t=n ; t>0; t--)
{
cin >>num;
if (num>0) countP++;
else if (num<0) countN++;
else countZ++ ;
} ;
printf("%.3f\n", countP*1./n);
printf("%.3f\n", countN*1./n);
printf("%.3f\n", countZ*1./n);
return 0;
}
// https://www.hackerrank.com/challenges/plus-minus
|
3fd18b6621b5404c98be4393bf10d084e8c88b5d
|
1d59148845e5bfac9bcd76f519f5880ad573421f
|
/euler5.cpp
|
ac26fe2d2b211d1d5114677769d7bb39d2920b0c
|
[] |
no_license
|
mkindt/csci333-lab1
|
292d8d6ef58b6809c05a365217d76fad3acdadfe
|
093793c483c38e335c0edb20716af6591bdc10bb
|
refs/heads/master
| 2020-05-17T03:53:25.876963
| 2012-09-08T00:32:51
| 2012-09-08T00:32:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 512
|
cpp
|
euler5.cpp
|
#include <iostream>
int main() {
//Euler problem 5
// 19*20 means divisible by 2,4,5,10
// start high: 18,17,16,15,14,13,12,11
// what's a better way to determine used divisors....
int test = 19*20;
int smallest = 0;
int count = 0;
for (int i = 1; i <= test*i; ++i) {
count = 0;
for (int j = 18; j >= 11; --j) {
if ((test*i)%j == 0)
count++;
}
if (count == 8) {
smallest = test*i;
break;
}
}
std::cout << "Smallest number divisible is " << smallest << std::endl;
return 0;
}
|
e12b59158759c62dad6e1c5c68d87b7d0a6f244c
|
29e3bc61de14643419fa91ad2ca81a4bd2d9a9bd
|
/algorithms/max_subarray/max_subarray.cpp
|
e4a223b1fcce965929b10c58dc72ba5bb80f411f
|
[] |
no_license
|
Luxiush/Notes
|
f2f60744e3b81d1ccb1e2b0267c13d6f38c45c2a
|
7b7dc5ba25e8b53d6c233c3288239cf0e907993d
|
refs/heads/master
| 2021-06-05T06:21:45.049419
| 2021-01-13T23:54:16
| 2021-01-13T23:54:16
| 95,122,659
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 3,279
|
cpp
|
max_subarray.cpp
|
/*
最大子数组
问题背景:股票的低价买进,高价卖出,实现收益最大化
问题描述:给定一段时间内股票的价格变化,求一段日期,使得从第一天到最后一天的股票价格净变化值最大。
思路:从每日价格变化的角度考察输入,而非每日价格的角度
---第i天的价格变化定义为第i天和第i-1天的价格差。
分治法求解:
寻找数组A[low..high]的最大子数组A[i..j],
将A[low..high]划分为两个子数组A[low..mid]和A[mid+1..high]
A[i..j]所处的位置有三种情况:
* low<=i<=j<=mid
* mid<i<=j<=high
* low<=i<=mid<j<=high
*/
#include<memory.h>
#include<iostream>
#include<fstream>
#include<iomanip>
using namespace std;
#define NINF (-2100000000)
//求跨越中点的最大子数组的边界及子数组的和
void maxCrossSubarray(int* arr, int low, int mid, int high, int& cross_low, int& cross_high, int& cross_sum){
int left_sum = NINF;
int sum = 0;
for(int i=mid; i>=low; i--){
sum += arr[i];
if(sum>left_sum){
left_sum = sum;
cross_low = i;
}
}
int right_sum = NINF;
sum = 0;
for(int j=mid+1; j<=high; j++){
sum += arr[j];
if(sum>right_sum){
right_sum = sum;
cross_high = j;
}
}
cross_sum = left_sum + right_sum;
}
void maxSubarray(int* arr, int low, int high, int& sub_low, int& sub_high, int& sub_sum){
if(low==high){
sub_low = low; sub_high = high; sub_sum = arr[low];
return ;
}
int mid = (low+high)/2;
int left_low, left_high, left_sum;
maxSubarray(arr, low, mid, left_low, left_high, left_sum);
int right_low, right_high, right_sum;
maxSubarray(arr, mid+1,high, right_low, right_high, right_sum);
int cross_low, cross_high, cross_sum;
maxCrossSubarray(arr, low, mid, high, cross_low, cross_high, cross_sum);
if(left_sum>=right_sum && left_sum>=cross_sum){
sub_low = left_low; sub_high = left_high; sub_sum = left_sum;
}
else if(right_sum>=left_sum && right_sum>=cross_sum){
sub_low = right_low; sub_high = right_high; sub_sum = right_sum;
}
else{
sub_low = cross_low; sub_high = cross_high; sub_sum = cross_sum;
}
return ;
}
int main(int argc, char* argvs[]){
const int MAX_LENGTH = 100001;
if(argc != 3){
cout << "Need 2 arguements: input file and output file." << endl;
return -1;
}
int length = 0;
int arr[MAX_LENGTH];//每日的股票价格数组
int dif[MAX_LENGTH];//价格差值数组
memset(arr, 0, MAX_LENGTH*sizeof(int));
memset(dif, 0, MAX_LENGTH*sizeof(int));
fstream fin(argvs[1], ios::in);
fin>>length;
for(int i=0; i<length; i++){
fin>>arr[i];
}
fin.close();
for(int i=1; i<length; i++){
dif[i] = arr[i]-arr[i-1];
}
int sub_low = 0;
int sub_high = 0;
int sub_sum = 0;
maxSubarray(dif,1,length-1, sub_low,sub_high,sub_sum);
fstream fout(argvs[2], ios::out);
fout<<"sub_low: "<<sub_low<<endl;
fout<<"sub_high: "<<sub_high<<endl;
fout<<"sub_sum: "<<sub_sum<< endl;
fout<<"sub_arr: "<< endl;
for(int i=sub_low; i<=sub_high; i++){
fout<<setw(5)<<dif[i];
if((i-sub_low)%20==19) fout<< endl;
}
fout<< endl;
fout.close();
cout<< "Done."<< endl;
return 0;
}
|
308887e86c21cc774437353aec83bb30ce5e8657
|
89c6e274dd4daf0aa771fe25dab136a0254506f8
|
/src/backend/planner/nested_loop_index_join_node.h
|
2581dff2da004db57cdbe99f8a974ad4f0ae7c74
|
[
"Apache-2.0"
] |
permissive
|
dvanaken/peloton-bwtree
|
761db53008eb7f091154d47ea6d3a0af8ae44f65
|
52785fb88239f1789b8b5502d645fbd64ebdfaac
|
refs/heads/master
| 2021-01-11T19:43:15.837317
| 2016-03-10T04:31:20
| 2016-03-10T04:31:20
| 49,620,925
| 6
| 1
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,524
|
h
|
nested_loop_index_join_node.h
|
//===----------------------------------------------------------------------===//
//
// PelotonDB
//
// nested_loop_index_join_node.h
//
// Identification: src/backend/planner/nested_loop_index_join_node.h
//
// Copyright (c) 2015, Carnegie Mellon University Database Group
//
//===----------------------------------------------------------------------===//
#pragma once
#include <memory>
#include <string>
#include <vector>
#include "abstract_join_node.h"
#include "backend/common/types.h"
#include "backend/expression/abstract_expression.h"
namespace peloton {
namespace planner {
class NestedLoopIndexJoinNode : public AbstractJoinPlanNode {
public:
NestedLoopIndexJoinNode(const NestedLoopIndexJoinNode &) = delete;
NestedLoopIndexJoinNode &operator=(const NestedLoopIndexJoinNode &) = delete;
NestedLoopIndexJoinNode(NestedLoopIndexJoinNode &&) = delete;
NestedLoopIndexJoinNode &operator=(NestedLoopIndexJoinNode &&) = delete;
NestedLoopIndexJoinNode(const expression::AbstractExpression *predicate,
const ProjectInfo *proj_info)
: AbstractJoinPlanNode(JOIN_TYPE_INVALID, predicate,
proj_info) { // FIXME
// Nothing to see here...
}
inline PlanNodeType GetPlanNodeType() const {
return PLAN_NODE_TYPE_NESTLOOPINDEX;
}
inline std::string GetInfo() const { return "NestedLoopIndexJoin"; }
private:
// There is nothing special that we need here
};
} // namespace planner
} // namespace peloton
|
7e8e06765a572b2ad1ccf6caa5cdcaf94f9099bb
|
7e27f6926378247885e56703e7d80e92a691b1ea
|
/any-sketch/src/test/cc/any_sketch/crypto/sketch_encrypter_test.cc
|
671a6709186a04268f2ace8b4c429cd79ee249c6
|
[
"Apache-2.0"
] |
permissive
|
pasin30055/experimental
|
b0f8c292349b5508555618e66ec52363a416337f
|
da31d3b50476cd613bc8cf51630bdbed1e1d02d4
|
refs/heads/main
| 2023-03-03T18:20:45.176965
| 2021-02-13T00:07:42
| 2021-02-13T00:07:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 17,896
|
cc
|
sketch_encrypter_test.cc
|
// Copyright 2020 The Cross-Media Measurement Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/main/cc/any_sketch/crypto/sketch_encrypter.h"
#include <openssl/obj_mac.h>
#include "absl/types/span.h"
// TODO(wangyaopw): use "external/*" path for blinders headers
#include "absl/strings/escaping.h"
#include "absl/strings/string_view.h"
#include "crypto/commutative_elgamal.h"
#include "gmock/gmock.h"
#include "google/protobuf/util/message_differencer.h"
#include "gtest/gtest.h"
#include "src/test/cc/testutil/matchers.h"
#include "src/test/cc/testutil/random.h"
#include "src/test/cc/testutil/status_macros.h"
namespace wfa::any_sketch::crypto {
namespace {
using ::private_join_and_compute::CommutativeElGamal;
using ::private_join_and_compute::Context;
using ::private_join_and_compute::ECGroup;
using ::private_join_and_compute::ECPoint;
using ::testing::Not;
using ::testing::SizeIs;
using ::wfa::measurement::api::v1alpha::Sketch;
using ::wfa::measurement::api::v1alpha::SketchConfig;
constexpr int kTestCurveId = NID_X9_62_prime256v1;
constexpr int kMaxCounterValue = 100;
constexpr char kElGamalPublicKeyG[] =
"036b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296";
constexpr char kElGamalPublicKeyY1[] =
"02d1432ca007a6c6d739fce2d21feb56d9a2c35cf968265f9093c4b691e11386b3";
constexpr char kElGamalPublicKeyY2[] =
"039ef370ff4d216225401781d88a03f5a670a5040e6333492cb4e0cd991abbd5a3";
constexpr char kElGamalPublicKeyY3[] =
"02d0f25ab445fc9c29e7e2509adc93308430f432522ffa93c2ae737ceb480b66d7";
constexpr char kCombinedElGamalPublicKeyY[] =
"02505d7b3ac4c3c387c74132ab677a3421e883b90d4c83dc766e400fe67acc1f04";
// TODO: use protocol buffer matchers when they are available
// Returns true if the decryption of expected is the same with that of arg.
MATCHER_P2(HasSameDecryption, original_cipher, expected, "") {
absl::StatusOr<std::string> decrypted_actual =
original_cipher->Decrypt(std::make_pair(arg.u, arg.e));
if (!decrypted_actual.ok()) {
*result_listener << "cannot decrypt ciphertext: " << arg.u << arg.e << ": "
<< decrypted_actual.status();
return false;
}
absl::StatusOr<std::string> decrypted_expected =
original_cipher->Decrypt(std::make_pair(expected.u, expected.e));
if (!decrypted_expected.ok()) {
*result_listener << "cannot decrypt ciphertext: " << expected.u
<< expected.e << ": " << decrypted_expected.status();
return false;
}
return ExplainMatchResult(testing::Eq(decrypted_expected.value()),
decrypted_actual.value(), result_listener);
}
// Returns true if the arg is an encryption of the provided plaintext.
MATCHER_P2(IsEncryptionOf, original_cipher, plaintext, "") {
absl::StatusOr<std::string> decrypted =
original_cipher->Decrypt(std::make_pair(arg.u, arg.e));
if (!decrypted.ok()) {
*result_listener << "cannot decrypt ciphertext: " << arg.u << arg.e << ": "
<< decrypted.status();
return false;
}
Context context;
std::string plaintext_ec = ECGroup::Create(kTestCurveId, &context)
.value()
.GetPointByHashingToCurveSha256(plaintext)
.value()
.ToBytesCompressed()
.value();
return ExplainMatchResult(testing::Eq(decrypted.value()), plaintext_ec,
result_listener);
}
// Returns true if two proto messages are equal when ignoring the order of
// repeated fields.
MATCHER_P(EqualsProto, expected, "") {
::google::protobuf::util::MessageDifferencer differencer;
differencer.set_repeated_field_comparison(
::google::protobuf::util::MessageDifferencer::AS_SET);
return differencer.Compare(arg, expected);
}
// Helper function to create a SketchConfig.
SketchConfig CreateSketchConfig(const int unique_cnt, const int sum_cnt) {
SketchConfig sketch_config;
for (int i = 0; i < unique_cnt; ++i) {
sketch_config.add_values()->set_aggregator(SketchConfig::ValueSpec::UNIQUE);
}
for (int i = 0; i < sum_cnt; ++i) {
sketch_config.add_values()->set_aggregator(SketchConfig::ValueSpec::SUM);
}
return sketch_config;
}
// Helper function to add random registers to a sketch according to its
// sketchConfig.
void AddRandomRegisters(const int register_cnt, Sketch& sketch) {
for (int i = 0; i < register_cnt; ++i) {
Sketch::Register* last_register = sketch.add_registers();
last_register->set_index(RandomInt64());
for (int value_i = 0; value_i < sketch.config().values_size(); ++value_i) {
// The Aggregate type doesn't matter here.
// Mod(kMaxCounterValue * 2) so we have some but not too many values
// exceed the max.
last_register->add_values(RandomInt64(kMaxCounterValue * 2) + 1);
}
}
}
// Partition the char vector 33 by 33, and convert the results to strings
std::vector<std::string> GetCipherStrings(absl::string_view bytes) {
EXPECT_EQ(bytes.size() % 66, 0);
std::vector<std::string> result;
int word_cnt = bytes.size() / 33;
result.reserve(word_cnt);
for (int i = 0; i < word_cnt; ++i) {
result.emplace_back(bytes.substr(i * 33, 33));
}
return result;
}
// Add two ElGamal ciphertexts on the specified ECGroup.
absl::StatusOr<CiphertextString> AddCiphertext(const CiphertextString& a,
const CiphertextString& b,
const ECGroup& ec_group) {
CiphertextString result;
ASSIGN_OR_RETURN(ECPoint a_u, ec_group.CreateECPoint(a.u));
ASSIGN_OR_RETURN(ECPoint b_u, ec_group.CreateECPoint(b.u));
ASSIGN_OR_RETURN(ECPoint sum_u, a_u.Add(b_u));
ASSIGN_OR_RETURN(result.u, sum_u.ToBytesCompressed());
ASSIGN_OR_RETURN(ECPoint a_e, ec_group.CreateECPoint(a.e));
ASSIGN_OR_RETURN(ECPoint b_e, ec_group.CreateECPoint(b.e));
ASSIGN_OR_RETURN(ECPoint sum_e, a_e.Add(b_e));
ASSIGN_OR_RETURN(result.e, sum_e.ToBytesCompressed());
return std::move(result);
}
class SketchEncrypterTest : public ::testing::Test {
protected:
SketchEncrypterTest() {}
void SetUp() {
ASSERT_OK_AND_ASSIGN(
original_cipher_,
CommutativeElGamal::CreateWithNewKeyPair(kTestCurveId));
ASSERT_OK_AND_ASSIGN(auto public_key_pair,
original_cipher_->GetPublicKeyBytes());
CiphertextString public_key = {
.u = public_key_pair.first,
.e = public_key_pair.second,
};
ASSERT_OK_AND_ASSIGN(
sketch_encrypter_,
CreateWithPublicKey(kTestCurveId, kMaxCounterValue, public_key));
}
absl::StatusOr<std::string> EncryptWithConflictingKeys(const Sketch& sketch) {
return sketch_encrypter_->Encrypt(sketch,
EncryptSketchRequest::CONFLICTING_KEYS);
}
absl::StatusOr<std::string> EncryptWithFlaggedKey(const Sketch& sketch) {
return sketch_encrypter_->Encrypt(sketch,
EncryptSketchRequest::FLAGGED_KEY);
}
// The ElGamal Cipher whose public key is used to create the SketchEncrypter.
std::unique_ptr<CommutativeElGamal> original_cipher_;
// The SketchEncrypter used in this test.
std::unique_ptr<SketchEncrypter> sketch_encrypter_;
};
TEST_F(SketchEncrypterTest, ByteSizeShouldBeCorrect) {
const int unique_cnt = 2;
const int sum_cnt = 3;
const int register_size = 1000;
Sketch plain_sketch;
*plain_sketch.mutable_config() = CreateSketchConfig(unique_cnt, sum_cnt);
AddRandomRegisters(register_size, plain_sketch);
ASSERT_EQ(plain_sketch.registers_size(), 1000);
ASSERT_OK_AND_ASSIGN(std::string result,
EncryptWithConflictingKeys(plain_sketch));
// Using SizeIs ends up printing all of "result", which is huge.
EXPECT_EQ(result.size(), register_size * (1 + unique_cnt + sum_cnt) * 66);
}
TEST_F(SketchEncrypterTest, EncryptionShouldBeNonDeterministic) {
Sketch plain_sketch;
*plain_sketch.mutable_config() =
CreateSketchConfig(/* unique_cnt = */ 0, /* sum_cnt = */ 0);
plain_sketch.add_registers()->set_index(1);
plain_sketch.add_registers()->set_index(1);
ASSERT_OK_AND_ASSIGN(std::string result,
EncryptWithConflictingKeys(plain_sketch));
std::vector<std::string> cipher_words = GetCipherStrings(result);
ASSERT_THAT(cipher_words, SizeIs(4)); // 2 regs * 1 vals * 2 words
CiphertextString cipher_index_1_a = {cipher_words[0], cipher_words[1]};
CiphertextString cipher_index_1_b = {cipher_words[2], cipher_words[3]};
// Multiple encryption of the same index value should be different.
EXPECT_NE(cipher_index_1_a.u, cipher_index_1_b.u);
EXPECT_NE(cipher_index_1_a.e, cipher_index_1_b.e);
EXPECT_THAT(cipher_index_1_a,
HasSameDecryption(original_cipher_.get(), cipher_index_1_b));
}
TEST_F(SketchEncrypterTest, EncryptionOfCountValueShouldBeAdditiveHomomorphic) {
Context ctx;
ASSERT_OK_AND_ASSIGN(ECGroup ec_group, ECGroup::Create(kTestCurveId, &ctx));
Sketch plain_sketch;
*plain_sketch.mutable_config() = CreateSketchConfig(
/* unique_cnt = */ 0, /* sum_cnt = */ 1);
plain_sketch.add_registers()->add_values(1);
plain_sketch.add_registers()->add_values(2);
plain_sketch.add_registers()->add_values(3);
plain_sketch.add_registers()->add_values(4);
plain_sketch.add_registers()->add_values(5);
ASSERT_OK_AND_ASSIGN(std::string result,
EncryptWithConflictingKeys(plain_sketch));
std::vector<std::string> cipher_words = GetCipherStrings(result);
ASSERT_THAT(cipher_words, SizeIs(20)); // 5 regs * 2 vals * 2 words
CiphertextString cipher_1 = {cipher_words[2], cipher_words[3]};
CiphertextString cipher_2 = {cipher_words[6], cipher_words[7]};
CiphertextString cipher_3 = {cipher_words[10], cipher_words[11]};
CiphertextString cipher_4 = {cipher_words[14], cipher_words[15]};
CiphertextString cipher_5 = {cipher_words[18], cipher_words[19]};
ASSERT_OK_AND_ASSIGN(CiphertextString cipher_1_add_4,
AddCiphertext(cipher_1, cipher_4, ec_group));
ASSERT_OK_AND_ASSIGN(CiphertextString cipher_2_add_3,
AddCiphertext(cipher_2, cipher_3, ec_group));
EXPECT_THAT(cipher_5,
HasSameDecryption(original_cipher_.get(), cipher_1_add_4));
EXPECT_THAT(cipher_5,
HasSameDecryption(original_cipher_.get(), cipher_2_add_3));
}
TEST_F(SketchEncrypterTest, MaximumCountValueShouldWork) {
Context ctx;
ASSERT_OK_AND_ASSIGN(ECGroup ec_group, ECGroup::Create(kTestCurveId, &ctx));
Sketch plain_sketch;
*plain_sketch.mutable_config() =
CreateSketchConfig(/* unique_cnt = */ 0, /* sum_cnt = */ 1);
plain_sketch.add_registers()->add_values(kMaxCounterValue + 10);
plain_sketch.add_registers()->add_values(kMaxCounterValue + 1);
ASSERT_OK_AND_ASSIGN(std::string result,
EncryptWithConflictingKeys(plain_sketch));
std::vector<std::string> cipher_words = GetCipherStrings(result);
ASSERT_THAT(cipher_words, SizeIs(8)); // 2 regs * 2 vals * 2 words
CiphertextString count_a = {cipher_words[2], cipher_words[3]};
CiphertextString count_b = {cipher_words[6], cipher_words[7]};
// Encryption of kMaxCounterValue +10 and kMaxCounterValue+1 should be the
// same.
EXPECT_THAT(count_a, HasSameDecryption(original_cipher_.get(), count_b));
}
TEST_F(SketchEncrypterTest, ZeroCountValueShouldThrow) {
Sketch plain_sketch;
*plain_sketch.mutable_config() =
CreateSketchConfig(/* unique_cnt = */ 0, /* sum_cnt = */ 1);
plain_sketch.add_registers()->add_values(0);
absl::StatusOr<std::string> result = EncryptWithConflictingKeys(plain_sketch);
ASSERT_FALSE(result.status().ok());
EXPECT_NE(result.status().message().find("should be positive"),
std::string::npos);
}
TEST_F(SketchEncrypterTest, TestDestroyedRegistersUsingConflictingKeys) {
Context ctx;
ASSERT_OK_AND_ASSIGN(ECGroup ec_group, ECGroup::Create(kTestCurveId, &ctx));
Sketch plain_sketch;
*plain_sketch.mutable_config() =
CreateSketchConfig(/* unique_cnt = */ 1, /* sum_cnt = */ 1);
auto sketch_register = plain_sketch.add_registers();
sketch_register->set_index(123);
sketch_register->add_values(-1); // UNIQUE value -1 means destroyed
sketch_register->add_values(10); // SUM value
ASSERT_OK_AND_ASSIGN(std::string result,
EncryptWithConflictingKeys(plain_sketch));
std::vector<std::string> cipher_words = GetCipherStrings(result);
ASSERT_THAT(cipher_words, SizeIs(12)); // 2 regs * 3 vals * 2 words
CiphertextString index_a = {cipher_words[0], cipher_words[1]};
CiphertextString index_b = {cipher_words[6], cipher_words[7]};
CiphertextString key_a = {cipher_words[2], cipher_words[3]};
CiphertextString key_b = {cipher_words[8], cipher_words[9]};
// Index should be the same.
EXPECT_THAT(index_a, HasSameDecryption(original_cipher_.get(), index_b));
// Keys should be different.
EXPECT_THAT(key_a, Not(HasSameDecryption(original_cipher_.get(), key_b)));
}
TEST_F(SketchEncrypterTest, TestDestroyedRegistersUsingFlaggedKey) {
Context ctx;
ASSERT_OK_AND_ASSIGN(ECGroup ec_group, ECGroup::Create(kTestCurveId, &ctx));
Sketch plain_sketch;
*plain_sketch.mutable_config() =
CreateSketchConfig(/* unique_cnt = */ 1, /* sum_cnt = */ 1);
auto sketch_register = plain_sketch.add_registers();
sketch_register->set_index(123);
sketch_register->add_values(-1); // UNIQUE value -1 means destroyed
sketch_register->add_values(10); // SUM value
ASSERT_OK_AND_ASSIGN(std::string result, EncryptWithFlaggedKey(plain_sketch));
std::vector<std::string> cipher_words = GetCipherStrings(result);
ASSERT_THAT(cipher_words, SizeIs(6)); // 1 regs * 3 vals * 2 words
CiphertextString index = {cipher_words[0], cipher_words[1]};
CiphertextString key = {cipher_words[2], cipher_words[3]};
CiphertextString value = {cipher_words[4], cipher_words[5]};
EXPECT_THAT(index, IsEncryptionOf(original_cipher_.get(), "123"));
EXPECT_THAT(key,
IsEncryptionOf(original_cipher_.get(), "destroyed_register_key"));
EXPECT_THAT(value,
IsEncryptionOf(original_cipher_.get(), "destroyed_register_key"));
}
TEST_F(SketchEncrypterTest, CombineElGamalPublicKeysNormalCases) {
ElGamalPublicKeys key1;
key1.set_el_gamal_g(absl::HexStringToBytes(kElGamalPublicKeyG));
key1.set_el_gamal_y(absl::HexStringToBytes(kElGamalPublicKeyY1));
ElGamalPublicKeys key2;
key2.set_el_gamal_g(absl::HexStringToBytes(kElGamalPublicKeyG));
key2.set_el_gamal_y(absl::HexStringToBytes(kElGamalPublicKeyY2));
ElGamalPublicKeys key3;
key3.set_el_gamal_g(absl::HexStringToBytes(kElGamalPublicKeyG));
key3.set_el_gamal_y(absl::HexStringToBytes(kElGamalPublicKeyY3));
std::vector<ElGamalPublicKeys> keys{key1, key2, key3};
ElGamalPublicKeys combinedKey;
combinedKey.set_el_gamal_g(absl::HexStringToBytes(kElGamalPublicKeyG));
combinedKey.set_el_gamal_y(
absl::HexStringToBytes(kCombinedElGamalPublicKeyY));
ASSERT_OK_AND_ASSIGN(ElGamalPublicKeys result,
CombineElGamalPublicKeys(kTestCurveId, keys));
EXPECT_THAT(result, EqualsProto(combinedKey));
}
TEST_F(SketchEncrypterTest, CombineElGamalPublicKeysEmptyInputShouldThrow) {
std::vector<ElGamalPublicKeys> keys;
auto result = CombineElGamalPublicKeys(kTestCurveId, keys);
ASSERT_FALSE(result.ok());
EXPECT_THAT(result.status(),
StatusIs(absl::StatusCode::kInvalidArgument, "empty"));
}
TEST_F(SketchEncrypterTest, CombineElGamalPublicKeysInvalidInputShouldThrow) {
ElGamalPublicKeys key1;
key1.set_el_gamal_g("foo");
key1.set_el_gamal_y("bar");
ElGamalPublicKeys key2;
key2.set_el_gamal_g("foo2");
key2.set_el_gamal_y("bar2");
std::vector<ElGamalPublicKeys> keys{key1, key2};
auto result = CombineElGamalPublicKeys(kTestCurveId, keys);
ASSERT_FALSE(result.ok());
EXPECT_THAT(result.status(),
StatusIs(absl::StatusCode::kInvalidArgument, "Invalid ECPoint"));
}
TEST_F(SketchEncrypterTest, NoisesShouldHaveTheSameIndex) {
Context ctx;
ASSERT_OK_AND_ASSIGN(ECGroup ec_group, ECGroup::Create(kTestCurveId, &ctx));
std::string encrypted_sketch;
int values_per_register = 5;
int ciphertexts_per_register = (values_per_register + 1) * 2;
EncryptSketchRequest::PublisherNoiseParameter noise_parameter;
noise_parameter.set_epsilon(1);
noise_parameter.set_delta(0.1);
noise_parameter.set_publisher_count(3);
ASSERT_TRUE(sketch_encrypter_
->AppendNoiseRegisters(noise_parameter, values_per_register,
encrypted_sketch)
.ok());
std::vector<std::string> cipher_words = GetCipherStrings(encrypted_sketch);
ASSERT_EQ(cipher_words.size() % ciphertexts_per_register, 0);
int noise_register_count = cipher_words.size() / ciphertexts_per_register;
ASSERT_GT(noise_register_count, 0);
for (int i = 0; i <= cipher_words.size() - ciphertexts_per_register;
i += ciphertexts_per_register) {
CiphertextString index = {cipher_words[i], cipher_words[i + 1]};
EXPECT_THAT(index, IsEncryptionOf(original_cipher_.get(),
"publisher_noise_register_id"));
}
}
} // namespace
} // namespace wfa::any_sketch::crypto
|
55f04ad9e97730597713e8a9408a22330fee3907
|
11b65cb853719f08e2ded356c9f8c57bba772120
|
/msdccmbd/VecMsdc/VecMsdcVJob.cpp
|
c65b665c4f68bddf9f959c82f358c43718a3ecb7
|
[
"BSD-2-Clause"
] |
permissive
|
mpsitech/MultiSpectralDetectorControl
|
66f6a1d0426625db69f9ce511f354052ef1977fa
|
93687854f2363a42e80ca846d5ebc6cdb938443f
|
refs/heads/master
| 2020-03-26T16:30:30.919216
| 2019-03-27T19:22:25
| 2019-03-27T19:22:25
| 145,106,504
| 2
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 9,836
|
cpp
|
VecMsdcVJob.cpp
|
/**
* \file VecMsdcVJob.cpp
* vector VecMsdcVJob (implementation)
* \author Alexander Wirthmueller
* \date created: 18 Dec 2018
* \date modified: 18 Dec 2018
*/
#include "VecMsdcVJob.h"
/******************************************************************************
namespace VecMsdcVJob
******************************************************************************/
uint VecMsdcVJob::getIx(
const string& sref
) {
string s = StrMod::lc(sref);
if (s == "crdmsdcdat") return CRDMSDCDAT;
if (s == "crdmsdcfil") return CRDMSDCFIL;
if (s == "crdmsdcliv") return CRDMSDCLIV;
if (s == "crdmsdcnav") return CRDMSDCNAV;
if (s == "crdmsdcprd") return CRDMSDCPRD;
if (s == "crdmsdcprs") return CRDMSDCPRS;
if (s == "crdmsdcscf") return CRDMSDCSCF;
if (s == "crdmsdcusg") return CRDMSDCUSG;
if (s == "crdmsdcusr") return CRDMSDCUSR;
if (s == "dlgmsdcfildownload") return DLGMSDCFILDOWNLOAD;
if (s == "dlgmsdcnavloaini") return DLGMSDCNAVLOAINI;
if (s == "iexmsdcini") return IEXMSDCINI;
if (s == "jobmsdcacqadxl") return JOBMSDCACQADXL;
if (s == "jobmsdcacqlwir") return JOBMSDCACQLWIR;
if (s == "jobmsdcacqvisl") return JOBMSDCACQVISL;
if (s == "jobmsdcacqvisr") return JOBMSDCACQVISR;
if (s == "jobmsdcactalign") return JOBMSDCACTALIGN;
if (s == "jobmsdcactled") return JOBMSDCACTLED;
if (s == "jobmsdcactservo") return JOBMSDCACTSERVO;
if (s == "jobmsdcprcspotfind") return JOBMSDCPRCSPOTFIND;
if (s == "jobmsdcprcstereo") return JOBMSDCPRCSTEREO;
if (s == "jobmsdcprctrack") return JOBMSDCPRCTRACK;
if (s == "jobmsdcsrcmsdd") return JOBMSDCSRCMSDD;
if (s == "jobmsdcsrctrigger") return JOBMSDCSRCTRIGGER;
if (s == "m2msessmsdc") return M2MSESSMSDC;
if (s == "pnlmsdcdatapar") return PNLMSDCDATAPAR;
if (s == "pnlmsdcdatdetail") return PNLMSDCDATDETAIL;
if (s == "pnlmsdcdatheadbar") return PNLMSDCDATHEADBAR;
if (s == "pnlmsdcdatlist") return PNLMSDCDATLIST;
if (s == "pnlmsdcdatrec") return PNLMSDCDATREC;
if (s == "pnlmsdcdatref1nfile") return PNLMSDCDATREF1NFILE;
if (s == "pnlmsdcfildetail") return PNLMSDCFILDETAIL;
if (s == "pnlmsdcfilheadbar") return PNLMSDCFILHEADBAR;
if (s == "pnlmsdcfillist") return PNLMSDCFILLIST;
if (s == "pnlmsdcfilrec") return PNLMSDCFILREC;
if (s == "pnlmsdclivalign") return PNLMSDCLIVALIGN;
if (s == "pnlmsdclivheadbar") return PNLMSDCLIVHEADBAR;
if (s == "pnlmsdclivscill") return PNLMSDCLIVSCILL;
if (s == "pnlmsdclivtrack") return PNLMSDCLIVTRACK;
if (s == "pnlmsdclivvideo") return PNLMSDCLIVVIDEO;
if (s == "pnlmsdcnavadmin") return PNLMSDCNAVADMIN;
if (s == "pnlmsdcnavheadbar") return PNLMSDCNAVHEADBAR;
if (s == "pnlmsdcnavopr") return PNLMSDCNAVOPR;
if (s == "pnlmsdcnavpre") return PNLMSDCNAVPRE;
if (s == "pnlmsdcprd1ndata") return PNLMSDCPRD1NDATA;
if (s == "pnlmsdcprddetail") return PNLMSDCPRDDETAIL;
if (s == "pnlmsdcprdheadbar") return PNLMSDCPRDHEADBAR;
if (s == "pnlmsdcprdlist") return PNLMSDCPRDLIST;
if (s == "pnlmsdcprdrec") return PNLMSDCPRDREC;
if (s == "pnlmsdcprsdetail") return PNLMSDCPRSDETAIL;
if (s == "pnlmsdcprsheadbar") return PNLMSDCPRSHEADBAR;
if (s == "pnlmsdcprslist") return PNLMSDCPRSLIST;
if (s == "pnlmsdcprsrec") return PNLMSDCPRSREC;
if (s == "pnlmsdcscfacquis") return PNLMSDCSCFACQUIS;
if (s == "pnlmsdcscfactu") return PNLMSDCSCFACTU;
if (s == "pnlmsdcscfheadbar") return PNLMSDCSCFHEADBAR;
if (s == "pnlmsdcscfprcctl") return PNLMSDCSCFPRCCTL;
if (s == "pnlmsdcscfsource") return PNLMSDCSCFSOURCE;
if (s == "pnlmsdcusgaaccess") return PNLMSDCUSGAACCESS;
if (s == "pnlmsdcusgdetail") return PNLMSDCUSGDETAIL;
if (s == "pnlmsdcusgheadbar") return PNLMSDCUSGHEADBAR;
if (s == "pnlmsdcusglist") return PNLMSDCUSGLIST;
if (s == "pnlmsdcusgmnuser") return PNLMSDCUSGMNUSER;
if (s == "pnlmsdcusgrec") return PNLMSDCUSGREC;
if (s == "pnlmsdcusr1nsession") return PNLMSDCUSR1NSESSION;
if (s == "pnlmsdcusraaccess") return PNLMSDCUSRAACCESS;
if (s == "pnlmsdcusrdetail") return PNLMSDCUSRDETAIL;
if (s == "pnlmsdcusrheadbar") return PNLMSDCUSRHEADBAR;
if (s == "pnlmsdcusrlist") return PNLMSDCUSRLIST;
if (s == "pnlmsdcusrmnusergroup") return PNLMSDCUSRMNUSERGROUP;
if (s == "pnlmsdcusrrec") return PNLMSDCUSRREC;
if (s == "qrymsdcdatapar") return QRYMSDCDATAPAR;
if (s == "qrymsdcdatlist") return QRYMSDCDATLIST;
if (s == "qrymsdcdatref1nfile") return QRYMSDCDATREF1NFILE;
if (s == "qrymsdcfillist") return QRYMSDCFILLIST;
if (s == "qrymsdcprd1ndata") return QRYMSDCPRD1NDATA;
if (s == "qrymsdcprdlist") return QRYMSDCPRDLIST;
if (s == "qrymsdcprslist") return QRYMSDCPRSLIST;
if (s == "qrymsdcusgaaccess") return QRYMSDCUSGAACCESS;
if (s == "qrymsdcusglist") return QRYMSDCUSGLIST;
if (s == "qrymsdcusgmnuser") return QRYMSDCUSGMNUSER;
if (s == "qrymsdcusr1nsession") return QRYMSDCUSR1NSESSION;
if (s == "qrymsdcusraaccess") return QRYMSDCUSRAACCESS;
if (s == "qrymsdcusrlist") return QRYMSDCUSRLIST;
if (s == "qrymsdcusrmnusergroup") return QRYMSDCUSRMNUSERGROUP;
if (s == "rootmsdc") return ROOTMSDC;
if (s == "sessmsdc") return SESSMSDC;
return(0);
};
string VecMsdcVJob::getSref(
const uint ix
) {
if (ix == CRDMSDCDAT) return("CrdMsdcDat");
if (ix == CRDMSDCFIL) return("CrdMsdcFil");
if (ix == CRDMSDCLIV) return("CrdMsdcLiv");
if (ix == CRDMSDCNAV) return("CrdMsdcNav");
if (ix == CRDMSDCPRD) return("CrdMsdcPrd");
if (ix == CRDMSDCPRS) return("CrdMsdcPrs");
if (ix == CRDMSDCSCF) return("CrdMsdcScf");
if (ix == CRDMSDCUSG) return("CrdMsdcUsg");
if (ix == CRDMSDCUSR) return("CrdMsdcUsr");
if (ix == DLGMSDCFILDOWNLOAD) return("DlgMsdcFilDownload");
if (ix == DLGMSDCNAVLOAINI) return("DlgMsdcNavLoaini");
if (ix == IEXMSDCINI) return("IexMsdcIni");
if (ix == JOBMSDCACQADXL) return("JobMsdcAcqAdxl");
if (ix == JOBMSDCACQLWIR) return("JobMsdcAcqLwir");
if (ix == JOBMSDCACQVISL) return("JobMsdcAcqVisl");
if (ix == JOBMSDCACQVISR) return("JobMsdcAcqVisr");
if (ix == JOBMSDCACTALIGN) return("JobMsdcActAlign");
if (ix == JOBMSDCACTLED) return("JobMsdcActLed");
if (ix == JOBMSDCACTSERVO) return("JobMsdcActServo");
if (ix == JOBMSDCPRCSPOTFIND) return("JobMsdcPrcSpotfind");
if (ix == JOBMSDCPRCSTEREO) return("JobMsdcPrcStereo");
if (ix == JOBMSDCPRCTRACK) return("JobMsdcPrcTrack");
if (ix == JOBMSDCSRCMSDD) return("JobMsdcSrcMsdd");
if (ix == JOBMSDCSRCTRIGGER) return("JobMsdcSrcTrigger");
if (ix == M2MSESSMSDC) return("M2msessMsdc");
if (ix == PNLMSDCDATAPAR) return("PnlMsdcDatAPar");
if (ix == PNLMSDCDATDETAIL) return("PnlMsdcDatDetail");
if (ix == PNLMSDCDATHEADBAR) return("PnlMsdcDatHeadbar");
if (ix == PNLMSDCDATLIST) return("PnlMsdcDatList");
if (ix == PNLMSDCDATREC) return("PnlMsdcDatRec");
if (ix == PNLMSDCDATREF1NFILE) return("PnlMsdcDatRef1NFile");
if (ix == PNLMSDCFILDETAIL) return("PnlMsdcFilDetail");
if (ix == PNLMSDCFILHEADBAR) return("PnlMsdcFilHeadbar");
if (ix == PNLMSDCFILLIST) return("PnlMsdcFilList");
if (ix == PNLMSDCFILREC) return("PnlMsdcFilRec");
if (ix == PNLMSDCLIVALIGN) return("PnlMsdcLivAlign");
if (ix == PNLMSDCLIVHEADBAR) return("PnlMsdcLivHeadbar");
if (ix == PNLMSDCLIVSCILL) return("PnlMsdcLivScill");
if (ix == PNLMSDCLIVTRACK) return("PnlMsdcLivTrack");
if (ix == PNLMSDCLIVVIDEO) return("PnlMsdcLivVideo");
if (ix == PNLMSDCNAVADMIN) return("PnlMsdcNavAdmin");
if (ix == PNLMSDCNAVHEADBAR) return("PnlMsdcNavHeadbar");
if (ix == PNLMSDCNAVOPR) return("PnlMsdcNavOpr");
if (ix == PNLMSDCNAVPRE) return("PnlMsdcNavPre");
if (ix == PNLMSDCPRD1NDATA) return("PnlMsdcPrd1NData");
if (ix == PNLMSDCPRDDETAIL) return("PnlMsdcPrdDetail");
if (ix == PNLMSDCPRDHEADBAR) return("PnlMsdcPrdHeadbar");
if (ix == PNLMSDCPRDLIST) return("PnlMsdcPrdList");
if (ix == PNLMSDCPRDREC) return("PnlMsdcPrdRec");
if (ix == PNLMSDCPRSDETAIL) return("PnlMsdcPrsDetail");
if (ix == PNLMSDCPRSHEADBAR) return("PnlMsdcPrsHeadbar");
if (ix == PNLMSDCPRSLIST) return("PnlMsdcPrsList");
if (ix == PNLMSDCPRSREC) return("PnlMsdcPrsRec");
if (ix == PNLMSDCSCFACQUIS) return("PnlMsdcScfAcquis");
if (ix == PNLMSDCSCFACTU) return("PnlMsdcScfActu");
if (ix == PNLMSDCSCFHEADBAR) return("PnlMsdcScfHeadbar");
if (ix == PNLMSDCSCFPRCCTL) return("PnlMsdcScfPrcctl");
if (ix == PNLMSDCSCFSOURCE) return("PnlMsdcScfSource");
if (ix == PNLMSDCUSGAACCESS) return("PnlMsdcUsgAAccess");
if (ix == PNLMSDCUSGDETAIL) return("PnlMsdcUsgDetail");
if (ix == PNLMSDCUSGHEADBAR) return("PnlMsdcUsgHeadbar");
if (ix == PNLMSDCUSGLIST) return("PnlMsdcUsgList");
if (ix == PNLMSDCUSGMNUSER) return("PnlMsdcUsgMNUser");
if (ix == PNLMSDCUSGREC) return("PnlMsdcUsgRec");
if (ix == PNLMSDCUSR1NSESSION) return("PnlMsdcUsr1NSession");
if (ix == PNLMSDCUSRAACCESS) return("PnlMsdcUsrAAccess");
if (ix == PNLMSDCUSRDETAIL) return("PnlMsdcUsrDetail");
if (ix == PNLMSDCUSRHEADBAR) return("PnlMsdcUsrHeadbar");
if (ix == PNLMSDCUSRLIST) return("PnlMsdcUsrList");
if (ix == PNLMSDCUSRMNUSERGROUP) return("PnlMsdcUsrMNUsergroup");
if (ix == PNLMSDCUSRREC) return("PnlMsdcUsrRec");
if (ix == QRYMSDCDATAPAR) return("QryMsdcDatAPar");
if (ix == QRYMSDCDATLIST) return("QryMsdcDatList");
if (ix == QRYMSDCDATREF1NFILE) return("QryMsdcDatRef1NFile");
if (ix == QRYMSDCFILLIST) return("QryMsdcFilList");
if (ix == QRYMSDCPRD1NDATA) return("QryMsdcPrd1NData");
if (ix == QRYMSDCPRDLIST) return("QryMsdcPrdList");
if (ix == QRYMSDCPRSLIST) return("QryMsdcPrsList");
if (ix == QRYMSDCUSGAACCESS) return("QryMsdcUsgAAccess");
if (ix == QRYMSDCUSGLIST) return("QryMsdcUsgList");
if (ix == QRYMSDCUSGMNUSER) return("QryMsdcUsgMNUser");
if (ix == QRYMSDCUSR1NSESSION) return("QryMsdcUsr1NSession");
if (ix == QRYMSDCUSRAACCESS) return("QryMsdcUsrAAccess");
if (ix == QRYMSDCUSRLIST) return("QryMsdcUsrList");
if (ix == QRYMSDCUSRMNUSERGROUP) return("QryMsdcUsrMNUsergroup");
if (ix == ROOTMSDC) return("RootMsdc");
if (ix == SESSMSDC) return("SessMsdc");
return("");
};
|
42cec2f7ab0821ec7c484ab0954835914ecf03ed
|
84a88a31d83bf89c1f51d22a70b5eda0e7d37f9e
|
/lib/DebugHelper/LLDBHelper.cpp
|
15ce3f55c801ba4fce2d37b4a08a83dc854ff20a
|
[] |
no_license
|
tovain10071991/saib-with-triton
|
c136d0fd8f885fe2cc007fb70b194ebeb84d56d0
|
a02036c5d51752fdc3196c2027605a281b4d5d93
|
refs/heads/master
| 2020-09-24T07:50:51.271296
| 2016-08-22T10:46:06
| 2016-08-22T10:46:06
| 66,799,337
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 9,851
|
cpp
|
LLDBHelper.cpp
|
#include "ptraceHelper.h"
#include "DebugHelper.h"
#include "ELFHelper.h"
#include "common.h"
#include "lldb/API/SBDebugger.h"
#include "lldb/API/SBTarget.h"
#include "lldb/API/SBProcess.h"
#include "lldb/API/SBModule.h"
#include "lldb/API/SBModuleSpec.h"
#include "lldb/API/SBBreakpoint.h"
#include "lldb/API/SBThread.h"
#include "lldb/API/SBFrame.h"
#include "lldb/API/SBValueList.h"
#include "lldb/API/SBValue.h"
#include "lldb/API/SBStream.h"
#include "lldb/API/SBEvent.h"
#include "lldb/API/SBBroadcaster.h"
#include "lldb/API/SBListener.h"
#include "lldb/API/SBModuleSpec.h"
#include <link.h>
#include <err.h>
#include <unistd.h>
#include <locale>
#include <cctype>
#include <iostream>
#include <string>
#include <algorithm>
#include <map>
#include <stdio.h>
#include <string.h>
using namespace std;
using namespace lldb;
#define EXECUTABLE_BASE 0x400000
#define CONVERT(base) (base?base:EXECUTABLE_BASE)
static SBDebugger debugger;
static SBTarget target;
class LLDBInited {
public:
LLDBInited()
{
SBDebugger::Initialize();
debugger = SBDebugger::Create();
debugger.SetAsync(false);
}
};
static LLDBInited inited;
void create_debugger_by_lldb(string binary) {
target = debugger.CreateTarget(binary.c_str());
target.SetModuleLoadAddress(target.FindModule(target.GetExecutable()), 0);
}
// 装载模块,DebugHelper.cpp中的create_debugger中调用
void add_modules(map<addr_t, string> link_modules) {
for(auto modules_iter = link_modules.begin(); modules_iter != link_modules.end(); ++ modules_iter) {
if(!modules_iter->second.size())
continue;
SBFileSpec file_spec(get_absolute(modules_iter->second).c_str());
SBModuleSpec module_spec;
module_spec.SetFileSpec(file_spec);
if(target.FindModule(file_spec).IsValid())
continue;
SBModule module = target.AddModule(module_spec);
target.SetModuleLoadAddress(module, modules_iter->first);
}
}
static string get_absolute(SBFileSpec file_spec) {
return get_absolute(string(file_spec.GetFilename()));
}
// 从模块中的虚拟地址获取模块的装载基址
unsigned long get_base(unsigned long addr) {
SBAddress load_addr = target.ResolveLoadAddress(addr);
assert(load_addr.IsValid());
SBModule module = load_addr.GetModule();
assert(module.IsValid());
SBFileSpec file_spec = module.GetFileSpec();
string module_name = string(file_spec.GetDirectory())+"/"+file_spec.GetFilename();
unsigned long base = get_base(module_name);
return base;
}
// 从函数名获取函数的装载地址
unsigned long get_func_addr(string name) {
SBSymbolContextList symbolContextList = target.FindFunctions(name.c_str());
assert(symbolContextList.IsValid());
for(uint32_t i = 0; i < symbolContextList.GetSize(); ++i) {
SBSymbolContext symbolContext = symbolContextList.GetContextAtIndex(i);
SBFunction function = symbolContext.GetFunction();
SBSymbol func_sym = symbolContext.GetSymbol();
if(function.IsValid()) {
cerr << "judge func: " << (function.GetName()==NULL?"noname":function.GetName()) << " / " << (function.GetMangledName()==NULL?"noname":function.GetMangledName()) << endl;
if(!name.compare(function.GetName()) || !name.compare(function.GetMangledName()))
{
SBAddress addr = function.GetStartAddress();
assert(addr.IsValid());
return addr.GetLoadAddress(target);
}
}
else if(func_sym.IsValid()) {
cerr << "judge sym: " << (func_sym.GetName()==NULL?"noname":func_sym.GetName()) << " / " << (func_sym.GetMangledName()==NULL?"noname":func_sym.GetMangledName()) << endl;
SBStream description;
func_sym.GetDescription(description);
cout << description.GetData() << endl;
if(!name.compare(func_sym.GetName()) || !name.compare(func_sym.GetMangledName()))
{
SBAddress addr = func_sym.GetStartAddress();
assert(addr.IsValid());
if(!string(".text").compare(addr.GetSection().GetName()))
return addr.GetLoadAddress(target);
}
}
}
warnx("can't find func: %s", name.c_str());
return 0;
}
// 从装载地址获取所属模块和文件中偏移
std::pair<std::string, uint64_t> get_file_offset(uint64_t addr) {
SBAddress load_addr = target.ResolveLoadAddress(addr);
assert(load_addr.IsValid());
string file_from_addr(load_addr.GetModule().GetFileSpec().GetDirectory());
file_from_addr = file_from_addr + "/" + load_addr.GetModule().GetFileSpec().GetFilename();
uint64_t file_offset = load_addr.GetSection().GetFileOffset() + load_addr.GetOffset();
return {file_from_addr, file_offset};
}
std::pair<std::string, uint64_t> get_file_offset(string func_name) {
uint64_t func_addr = get_func_addr(func_name);
return get_file_offset(func_addr);
}
// 获取函数名的mangled名
string get_mangled_name(string name) {
SBSymbolContextList symbolContextList = target.FindFunctions(name.c_str());
assert(symbolContextList.IsValid());
for(uint32_t i = 0; i < symbolContextList.GetSize(); ++i)
{
SBSymbolContext symbolContext = symbolContextList.GetContextAtIndex(i);
SBFunction function = symbolContext.GetFunction();
SBSymbol func_sym = symbolContext.GetSymbol();
if(function.IsValid())
{
cerr << "judge func: " << (function.GetName()==NULL?"noname":function.GetName()) << " / " << (function.GetMangledName()==NULL?"noname":function.GetMangledName()) << endl;
if(!name.compare(function.GetName()) || !name.compare(function.GetMangledName()))
return function.GetMangledName();
}
else if(func_sym.IsValid())
{
cerr << "judge sym: " << (func_sym.GetName()==NULL?"noname":func_sym.GetName()) << " / " << (func_sym.GetMangledName()==NULL?"noname":func_sym.GetMangledName()) << endl;
if(!name.compare(func_sym.GetName()) || !name.compare(func_sym.GetMangledName()))
{
SBAddress addr = func_sym.GetStartAddress();
assert(addr.IsValid());
if(!string(".text").compare(addr.GetSection().GetName()))
return func_sym.GetMangledName()?func_sym.GetMangledName():func_sym.GetName();
}
}
}
errx(-1, "can't find func: %s", name.c_str());
}
SBSection get_section(string obj_name, string sec_name)
{
SBFileSpec obj_file(obj_name.c_str(), false);
SBFileSpec obj_file_with_resolved(obj_name.c_str(), true);
// SBFileSpec exec_file = target.GetExecutable();
// if(!string(exec_file.GetDirectory()).compare(obj_file.GetDirectory()) && !string(exec_file.GetFilename()).compare(obj_file.GetFilename()))
// return 0;
SBModule obj_mdl = target.FindModule(obj_file);
if(!obj_mdl.IsValid())
{
obj_mdl = target.FindModule(obj_file_with_resolved);
assert(obj_mdl.IsValid());
}
SBSection section = obj_mdl.FindSection(sec_name.c_str());
assert(section.IsValid());
return section;
}
unsigned long get_section_load_addr(string obj_name, string sec_name)
{
SBSection section = get_section(obj_name, sec_name);
return section.GetLoadAddress(target);
}
/*
unsigned long get_load_addr(unsigned long addr, string obj_name, string sec_name) {
SBSection section = get_section(obj_name, sec_name);
unsigned long sec_load_base = section.GetLoadAddress(target);
unsigned long sec_unload_base = section.GetFileAddress();
return sec_load_base - sec_unload_base + addr;
}
*/
/*
SBSymbol get_func_sym_in_plt(uint64_t addr) {
for(unsigned i = 0, num = target.GetNumModules(); i < num; ++i)
{
SBModule module = target.GetModuleAtIndex(i);
SBFileSpec file_spec = module.GetFileSpec();
if(get_absolute(file_spec).compare(get_absolute(main_obj->getFileName().str())))
continue;
SBSection section = module.FindSection(".plt");
assert(section.IsValid());
addr_t plt_addr = section.GetFileAddress();
addr_t plt_size = section.GetByteSize();
assert(addr>=plt_addr && addr<plt_addr+plt_size);
SBAddress func_addr = module.ResolveFileAddress(addr);
SBSymbol func_sym = func_addr.GetSymbol();
assert(func_sym.GetStartAddress().GetOffset() == func_addr.GetOffset());
cerr << "found plt func: " << func_sym.GetName() << endl;
return func_sym;
}
errx(-1, "can't find in get_func_name_in_plt");
}
*/
SBSymbol get_func_sym(unsigned long addr) {
SBAddress load_addr = target.ResolveLoadAddress(addr);
assert(load_addr.IsValid());
SBStream description;
load_addr.GetDescription(description);
cout << description.GetData() << endl;
assert(!string(".plt").compare(load_addr.GetSection().GetName()) || !string(".text").compare(load_addr.GetSection().GetName()));
SBSymbol func_sym = load_addr.GetSymbol();
assert(func_sym.IsValid());
return func_sym;
}
/*
string get_func_name_in_plt(uint64_t addr) {
SBSymbol func_sym = get_func_sym_in_plt(addr);
return func_sym.GetName();
}
*/
string get_func_name(unsigned long addr) {
SBSymbol func_sym = get_func_sym(addr);
string func_name(func_sym.GetName());
if(!func_name.compare("???"))
return string();
else
return func_name;
}
unsigned long get_func_end_load_addr(string func_name) {
SBSymbol func_sym = get_func_sym(get_func_addr(func_name));
return func_sym.GetEndAddress().GetLoadAddress(target);
}
std::pair<std::string, uint64_t> get_func_end_file_offset(string func_name) {
uint64_t end_addr = get_func_end_load_addr(func_name);
return get_file_offset(end_addr);
}
/*
unsigned long get_sym_unload_endaddr(unsigned long unload_addr, string obj_name, string sec_name) {
SBSymbol func_sym = get_func_sym(get_load_addr(unload_addr, obj_name, sec_name));
return get_unload_addr(func_sym.GetEndAddress().GetLoadAddress(target));
}
*/
bool is_addr_in_plt(uint64_t addr) {
SBAddress load_addr(addr, target);
SBSection section = load_addr.GetSection();
assert(section.IsValid());
if(!string(section.GetName()).compare(".plt"))
return true;
else
return false;
}
|
64e5cdf4bc1025b89e0b92172fb988ebfd9401d8
|
d3bb7f5a67104ef50f292ca46a2b54841cf47c36
|
/Stack/NodoLigado.cpp
|
a47cac10e2485fe900a9ae456b564385cb9573b5
|
[] |
no_license
|
CarlosCastroTrejo/StackClass
|
ff20aa9ceccf7dd98f1143b13713261af9702482
|
d8073f2c9527708e3d9c8e6f9e6482272a144170
|
refs/heads/master
| 2020-04-02T16:25:26.166343
| 2018-10-25T04:50:32
| 2018-10-25T04:50:32
| 154,611,679
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 556
|
cpp
|
NodoLigado.cpp
|
#include "NodoLigado.h"
NodoLigado::NodoLigado()
{
this->dato = 0;
this->sig = NULL;
}
NodoLigado::NodoLigado(int dato)
{
this->dato = dato;
this->sig = NULL;
}
void NodoLigado::setSig(NodoLigado* s)
{
this->sig = s;
}
NodoLigado* NodoLigado::getSig()
{
return this->sig;
}
int NodoLigado::getDato()
{
return this->dato;
}
NodoLigado::~NodoLigado()
{
}
ostream& operator<<(ostream &o, NodoLigado *nodo)
{
if (nodo == NULL)
{
o<< NULL;
}
else
{
o << nodo->dato;
}
return o;
}
|
57b9cd4188630f1878a44b3581d748a209105769
|
77db7f6d5cee7dbead860ef01fb943262e2b9580
|
/ProjectFlightSchool/ProjectFlightSchool/MapSection.cpp
|
2c73a259aafa6b48d704dc49947596fb884ed3ba
|
[] |
no_license
|
SvinSimpe/Project-Flight-School
|
e4f5e06c95f7024cd6fb9f5fd5b01ecfaf7cfb59
|
00a64d06be2bba985ba195aabf8f4fa4bf109e1f
|
refs/heads/development
| 2020-12-24T15:13:54.535124
| 2015-03-20T09:36:38
| 2015-03-20T09:36:38
| 26,538,774
| 0
| 3
| null | 2015-03-24T12:33:59
| 2014-11-12T14:06:46
|
C++
|
UTF-8
|
C++
| false
| false
| 2,611
|
cpp
|
MapSection.cpp
|
#include "MapSection.h"
#include "Map.h"
HRESULT MapSection::Render( float deltaTime )
{
for ( int i = 0; i < (int)mInstances.size(); i++ )
{
mInstances[i]->Render( deltaTime );
}
return S_OK;
}
HRESULT MapSection::Initialize( Map* map, MapSection* parent, MapNodeInstance** mapNodes, int childID )
{
////if null, its the first section
//mParent = parent;
//if( mParent == nullptr )
//{
// mBoundingBox.position = XMFLOAT3( -( (float)map->GetMapHalfWidth() * NODE_DIM ), 0, -( (float)map->GetMapHalfHeight() * NODE_DIM ) );
// mBoundingBox.width = (float)map->GetMapWidth() * NODE_DIM;
// mBoundingBox.height = (float)map->GetMapHeight() * NODE_DIM;
//}
//else
//{
// int offSetX = childID / 2;
// int offSetY = childID % 2;
// mBoundingBox.position = XMFLOAT3( ( mParent->mBoundingBox.position.x + ( offSetX * (mParent->mBoundingBox.width * 0.5f ) ) ),
// ( 0 ),
// ( ( mParent->mBoundingBox.position.z + ( offSetY * ( mParent->mBoundingBox.height * 0.5f ) ) ) ) );
// mBoundingBox.width = (mParent->mBoundingBox.width * 0.5f );
// mBoundingBox.height = (mParent->mBoundingBox.height * 0.5f );
//}
//int count = 0;
//for( int i = 0; i < (int)map->GetNrOfNodes(); i++ )
//{
// if( mBoundingBox.Intersect( &mapNodes[i]->GetBoundingBox() ) )
// {
// count++;
// }
//}
//if ( 10 < count )
//{
// for(int i = 0; i < 4; i++)
// {
// mChildren[i] = new MapSection();
// mChildren[i]->Initialize( map, this, mapNodes, i );
// sections++;
// }
//}
return S_OK;
}
bool MapSection::AddNodeToSection( MapNodeInstance* node )
{
bool result = false;
//if( mBoundingBox.Intersect( &node->GetBoundingBox() ) )
//{
// for (int i = 0; i < 4; i++)
// {
// if (mChildren[i] != nullptr)
// {
// if ( mChildren[i]->AddNodeToSection( node ) )
// {
// return true;
// }
// }
// }
// mInstances.push_back( node );
// return true;
//}
return result;
}
bool MapSection::GetSectionContainingUnit( MapSection** container, int& sectionCount, BoundingRectangle* unit )
{
if( mBoundingBox.Intersect( unit ) )
{
for( int i = 0; i < 4; i++ )
{
if( mChildren[i] != nullptr )
{
if( mChildren[i]->GetSectionContainingUnit( container, sectionCount, unit ) )
{
return true;
}
}
}
container[sectionCount++] = this;
return true;
}
return false;
}
int MapSection::GetSections()
{
return sections;
}
void MapSection::Release()
{
for( int i = 0;i < 4; i++ )
{
if( mChildren[i]!= nullptr )
{
mChildren[i]->Release();
delete mChildren[i];
}
}
}
MapSection::MapSection()
{
}
MapSection::~MapSection()
{
}
|
9767a95037b77a6417e6cc1bfa4fde57bbc3386b
|
8b07e31d203b3d3102b29c73e0777713adcd64b6
|
/UVa/11966.cpp
|
f55b36de3ae76d4c9f36b561a0da756dff6ea8c1
|
[] |
no_license
|
rapel02/competitive-programming
|
70d193c17e0da447b76643d6d3818c3f5000df8f
|
27d39667ca4f3b4dde1cef6234cd847c23d82b5f
|
refs/heads/master
| 2020-06-04T16:18:39.018983
| 2019-06-15T16:34:06
| 2019-06-15T16:34:06
| 192,099,411
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,208
|
cpp
|
11966.cpp
|
#include<bits/stdc++.h>
#define EPS 1e-9
using namespace std;
struct Point{
double x,y;
}star[1500];
int p[1500],h[1500];
double sqr(double x)
{
return x*x;
}
double dist(int a,int b)
{
return sqrt(sqr(star[a].x - star[b].x) + sqr(star[a].y - star[b].y));
}
int par(int a)
{
if(p[a]==a) return a;
return p[a] = par(p[a]);
}
bool issame(int a,int b)
{
return (par(a)==par(b));
}
void joint(int a,int b)
{
if(issame(a,b)==false)
{
int x = par(a);
int y = par(b);
if(h[x] > h[y])
{
p[y] = x;
}
else
{
p[x] = y;
if(h[y]==h[x]) h[y]++;
}
}
}
int main()
{
int ntc;
int n;
double D;
//FILE *fp;
//fp = fopen("11966.txt","w");
scanf("%d",&ntc);
for(int tc=1;tc<=ntc;tc++)
{
scanf("%d %lf",&n,&D);
for(int a=0;a<n;a++) scanf("%lf %lf",&star[a].x,&star[a].y);
for(int a=0;a<n;a++) p[a] = a,h[a] = 1;
for(int a=0;a<n;a++)
{
for(int b=a+1;b<n;b++)
{
// printf("%d %d %lf %lf\n",a,b,dist(a,b),D);
if(dist(a,b)-D<EPS)
{
joint(a,b);
}
}
}
set<int> s;
//for(int a=0;a<n;a++) printf("%d\n",p[a]);
for(int a=0;a<n;a++) s.insert(par(p[a]));
printf("Case %d: %d\n",tc,s.size());
//fprintf(fp,"Case %d: %d\n",tc,s.size());
}
}
|
9988e42f804f0a27b18f346166f5a0b151f62dc2
|
41a7a34a192478ba3704dad2201f1c85e423af23
|
/TimeTravel/Source/TimeTravel/Player/TestPlayer.cpp
|
897033f010c84ab122324927dec50a549e79ab77
|
[] |
no_license
|
Flargy/TimeTravel
|
7c831c66586113423638ca60ee1bebdffc21433f
|
483d3603243a7425304c3b0cec341513b86a2241
|
refs/heads/main
| 2023-07-07T05:17:11.461331
| 2021-08-13T09:12:19
| 2021-08-13T09:12:19
| 357,121,430
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 931
|
cpp
|
TestPlayer.cpp
|
#include "TestPlayer.h"
#include "TimeTravel/TimeTravelGameModeBase.h"
#include "Kismet/GameplayStatics.h"
ATestPlayer::ATestPlayer()
{
PrimaryActorTick.bCanEverTick = true;
}
void ATestPlayer::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
PlayerInputComponent->BindAction(TEXT("ReverseTime"), EInputEvent::IE_Pressed, this, &ATestPlayer::BeginReverseTime);
PlayerInputComponent->BindAction(TEXT("ReverseTime"), EInputEvent::IE_Released, this, &ATestPlayer::EndReverseTime);
}
void ATestPlayer::BeginPlay()
{
Super::BeginPlay();
}
void ATestPlayer::BeginReverseTime()
{
auto GameMode = Cast<ATimeTravelGameModeBase>(UGameplayStatics::GetGameMode(this));
if(GameMode)
GameMode->TimeSystemInstance.BeginRewind();
}
void ATestPlayer::EndReverseTime()
{
auto GameMode = Cast<ATimeTravelGameModeBase>(UGameplayStatics::GetGameMode(this));
if (GameMode)
GameMode->TimeSystemInstance.EndRewind();
}
|
497b1ea675b2a7e0da5753057a055e2bd3a9fcbf
|
4cf93f7a186aa34f96825176c9bc5099f704e31c
|
/nrf recievers/recieving arduino/rec_2ang.ino
|
5016c7f9267c8908a13328b8b01e779308cfc139
|
[] |
no_license
|
aksaxena09/Virtual-telepresence-robot-arduino-code
|
cfbba02d01531ec33e828e77dc55e1038364842e
|
fb171ea58a772c63c4ffd0861906619f0138c54a
|
refs/heads/master
| 2022-07-17T14:03:01.991709
| 2020-05-14T20:40:05
| 2020-05-14T20:40:05
| 264,018,632
| 0
| 0
| null | null | null | null |
UTF-8
|
C++
| false
| false
| 1,936
|
ino
|
rec_2ang.ino
|
#include <Servo.h>
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include "printf.h"
#include <RF24_config.h>
int CE_PIN = 9, CSN_PIN = 10, servoang;
RF24 object(CE_PIN, CSN_PIN);
uint64_t address = 0x4321ABCDE1LL;
Servo servoA, servoB;
long timer = 0;
struct angs
{
int x, z, c;
} data;
void setup() {
Serial.begin(9600);
object.begin();
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
servoA.attach(6);//connect servo sig to ~3
servoB.attach(7);//connect servo sig to ~4
printf_begin();
object.setPALevel(RF24_PA_MAX);
object.setChannel(121);
object.setDataRate(RF24_250KBPS);
object.openReadingPipe(0, address);
object.startListening();
object.printDetails();
data.x = 90;
data.z = 90;
servoA.write(data.x);
servoB.write(data.z);
stopp();
}
void loop()
{
if (millis() - timer > 200)
{
if (object.available())
{
object.read(&data, sizeof(data));
}
servoA.write(data.x);
servoB.write(data.z);
if (data.c == 1)
straight();
else if (data.c == 2)
left();
else if (data.c == 3)
right();
else if (data.c == 4)
back();
else
stopp();
Serial.println(data.x);
Serial.println(data.z);
Serial.println(data.c);
Serial.println("=======\n");
timer = millis();
}
}
void back()
{
digitalWrite(2, HIGH);
digitalWrite(3, LOW);
digitalWrite(4, HIGH);
digitalWrite(5, LOW);
//delay(10000);
}
void right()
{
digitalWrite(2, LOW);
digitalWrite(3, HIGH);
digitalWrite(4, HIGH);
digitalWrite(5, LOW);
}
void left()
{
digitalWrite(2, HIGH);
digitalWrite(3, LOW);
digitalWrite(4, LOW);
digitalWrite(5, HIGH);
}
void straight()
{
digitalWrite(2, LOW);
digitalWrite(3, HIGH);
digitalWrite(4, LOW);
digitalWrite(5, HIGH);
}
void stopp()
{
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);
digitalWrite(4, HIGH);
digitalWrite(5, HIGH);
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.