blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 264 | content_id stringlengths 40 40 | detected_licenses listlengths 0 85 | license_type stringclasses 2 values | repo_name stringlengths 5 140 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 986 values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 3.89k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23 values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 145 values | src_encoding stringclasses 34 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 3 10.4M | extension stringclasses 122 values | content stringlengths 3 10.4M | authors listlengths 1 1 | author_id stringlengths 0 158 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
38040a19eb92188c14c652bae93a0119cac9c422 | 85c73ab23bf994a4868785fa024d1c614f137794 | /include/vob/aoe/core/data/_Database.h | c2b6f075445f285651d963884aadee7bf0bcc08f | [
"MIT"
] | permissive | voblivion/AnotherEngine | efe2366597a251225dd59e62bf250e3500cb97c0 | 6e0d5de26fce6619afd4ac854ae49e6e9a31587b | refs/heads/master | 2023-06-10T18:34:56.540138 | 2023-06-06T18:52:07 | 2023-06-06T18:52:07 | 182,630,295 | 5 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,214 | h | #pragma once
#include <cassert>
#include <memory>
#include <vob/aoe/core/data/ADatabase.h>
#include <vob/aoe/core/data/Cache.h>
#include <vob/aoe/core/data/Id.h>
namespace vob::aoe::data
{
template <typename DatabaseLoaderType>
class Database final
: public ADatabase
{
public:
// Aliases
using DatabaseLoader = DatabaseLoaderType;
// Constructors
explicit Database(
type::TypeRegistry& a_typeRegistry
, DatabaseLoader&& a_databaseLoader
)
: ADatabase{ a_typeRegistry }
, m_cache{ a_allocator }
, m_loader{ std::forward<DatabaseLoader>(a_databaseLoader) }
{}
DatabaseLoader& getLoader()
{
return m_loader;
}
protected:
// Methods
std::shared_ptr<type::ADynamicType> find(Id const a_dataId) final override
{
auto t_data = m_cache.find(a_dataId);
if (t_data == nullptr)
{
t_data = loadAndCache(a_dataId);
}
return t_data;
}
private:
// Attributes
mutable Cache m_cache;
DatabaseLoader m_loader;
// Methods
std::shared_ptr<type::ADynamicType> loadAndCache(Id const a_dataId)
{
auto const t_data = m_loader.load(a_dataId);
if (t_data != nullptr)
{
m_cache.set(a_dataId, t_data);
}
return t_data;
}
};
}
| [
"voblivion@hotmail.fr"
] | voblivion@hotmail.fr |
274188e0294a56089695f5180527fbdcaa471c13 | fb44c3e29478d04f30a6417001c4a3755a804dad | /src/headers/oclint/rule/NPathComplexityRule.h | cf7f2d62f616f4a34ceff9d24b2e46e649f11e38 | [
"BSD-3-Clause"
] | permissive | lqi/mo | 259003c8c0111694ebed9f58f989869778daf33b | 5fd621f308b380ed25747e76d16303acb9d314a2 | refs/heads/master | 2021-01-18T06:48:38.410283 | 2012-05-25T01:41:40 | 2012-05-25T01:41:40 | 2,451,123 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 525 | h | #ifndef OCLINT_RULE_NPATHCOMPLEXITYRULE_H
#define OCLINT_RULE_NPATHCOMPLEXITYRULE_H
#include "oclint/Rule.h"
namespace clang
{
class Decl;
}
class NPathComplexityRule : public Rule
{
private:
static RuleSet rules;
int maxAllowedNPath();
bool isMethodDefination(clang::Decl* decl);
bool isMethodNPathHigh(CXCursor& node);
int getNPathOfCursor(CXCursor& node);
public:
virtual void apply(
CXCursor& node, CXCursor& parentNode, ViolationSet& violationSet);
virtual const string name() const;
};
#endif
| [
"longyi@chaione.com"
] | longyi@chaione.com |
f147a94525814e783c037c11fed519011e45aff5 | dcf415dd868be5999942d874ad766bd5d0d0a074 | /SisecPlayer/cdialogdubbing.h | d6bdf196ce0ae8631bb9cd35d84afda0d45f3d13 | [] | no_license | github188/SPlayer | 8f2dc00e2b2b8a26c5953390ae8cb89067bfbc80 | d0439fe9130f0932eada82bb8b08b0b8b89b8411 | refs/heads/master | 2020-12-30T18:16:31.667255 | 2016-07-05T04:53:54 | 2016-07-05T04:53:54 | 62,694,150 | 0 | 2 | null | 2016-07-06T05:38:52 | 2016-07-06T05:38:51 | null | UTF-8 | C++ | false | false | 483 | h | #ifndef CDIALOGDUBBING_H
#define CDIALOGDUBBING_H
#include <QDialog>
#include "ui_cdialogdubbing.h"
class CDialogDubbing : public QDialog
{
Q_OBJECT
public:
CDialogDubbing(QWidget *parent = 0);
~CDialogDubbing();
public:
QString GetVideoFileName();
QString GetAudioFileName();
protected slots:
void OnBtnVideoFileOpenClick();
void OnBtnAudioFileOpenClick();
void OnBtnOKClick();
void OnBtnCancelClick();
private:
Ui::CDialogDubbing ui;
};
#endif // CDIALOGDUBBING_H
| [
"625879567@qq.com"
] | 625879567@qq.com |
d8ada338e79ffb24885f4317165beb8f27a8d448 | fdb094554e7d2df6e19edab969b3c9f5ee708c77 | /confused.cpp | 59a1ad98229d8692226bd5d202d4e564e8307385 | [] | no_license | zhxiaoq9/CodeExercise | d0523af589c769dfa20ef8e7f6788bed86387dbe | 5a26c6b15db00ce27ba3721c8c2adb5ce2355f85 | refs/heads/master | 2021-01-20T00:21:57.882766 | 2017-10-17T03:34:49 | 2017-10-17T03:34:49 | 89,120,143 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,687 | cpp | //目的:C/C++常见的一些易混淆的知识点
#include <iostream>
using namespace std;
//数组字符串与指针
//一个指针p无论指向数组还是堆上分配的内存,sizeof(p)永远是4
void pointerANDarray(){
char a[] = "12345";
char *p = a;
cout << "char a[] = \"12345\"" << endl;
cout << "char *p = a" << endl;
cout << "strlen(a) = " << strlen(a) << endl; //5
cout << "sizeof(a) = " << sizeof(a) << endl; //6
cout << "strlen(p) = " << strlen(p) << endl; //5
cout << "sizeof(p) = " << sizeof(p) << endl; //4
cout << endl;
double b[] = { 1, 3, 5, 7, 9 };
double *q = b;
double *q1 = q + 1;
cout << "double b[] = { 1, 3, 5, 7, 9 }" << endl;
cout << "double *q = b" << endl;
cout << "double *q1 = q + 1" << endl;
cout << "sizeof(b) = " << sizeof(b) << endl; //5*8=40
cout << "sizeof(q) = " << sizeof(q) << endl; //4
cout << "*q1 - *q = " << *q1 - *q << endl; //2,指针指向的元素相减
cout << "q1 - q = " << q1 - q << endl; //1,按照元素大小相减
cout << "(int)q1 - (int)q = " << (int)q1 - (int)q << endl; //8,将q和q1的地址相减
cout << endl;
void *m = malloc(10);
cout << "void *m = malloc(10)" << endl;
cout << sizeof(m) << endl; //4
delete m;
m = NULL;
}
int local_param_test;
void localParam(void){
//int b;
//cout << b << endl; //只声明b却没有初始化b的话编译报错:局部变量b未初始化
cout << local_param_test << endl;//这是全局变量,可以不初始化
}
int x = 0;
class base{
public:
base(){ x = 1; cout << "base constructor" << endl; }
virtual ~base(){ x = 2; cout << "base destructor" << endl; } //基类析构函数一般为虚函数
void f(){ x = 3; cout << "base function" << endl; }
virtual void g(){ x = 4; cout << "base virtual function" << endl; }
};
class drived : public base{
public:
//类外初始化,因为静态变量属于整个类(先于任何其它成员初始化),
//如果在类内初始化则每个对象都会有一个static成员.而在类外初始化时不会.
static int m1;
const static m2 = 2; //比较特殊,可以在类内初始化
//const成员只能在初始化列表中初始化,因为const变量一旦被初始化就不能被改变
//并且这种改变只是针对某一个对象而言的,而不是对类来说的,所以不能在这里初始化
//只能在初始化列表里面初始化不能在构造函数里面使用m3=3,因为这是赋值不是初始化.
//const int m3;
public:
drived(){ x = 10; cout << "drived constructor" << endl; }
~drived(){ x = 11; cout << "drived destructor" << endl; }; //基类已经使用virtual时,派生类可以不加virtual声明
void f(){ x = 12; cout << "drived function" << endl; }
virtual void g(){ x = 13; cout << "drived virtual function" << endl; }
static int getM1(){
//this.m3 = 2; //因为static成员函数没有this指针,所以不能访问非静态成员变量
m1++;
m1--;
return m1;
}
};
//类静态成员必须在类外进行初始化,因为静态成员属于整个类而不属于某个对象.
//但是这里不能指定关键字static,这是为了与普通静态成员区分
int drived::m1 = 1;
void classTest(){
cout << "---------start function class_test--------" << endl;
cout << "开始构造函数和析构函数测试" << endl;
drived *pd; //只是声明了指针,并没有构造
cout << x << endl; //x = 0;
cout << endl;
base *pb = new drived; //基类指针指向派生类,先调用基类的构造函数再调用派生类构造函数
cout << x << endl; //x=10
pb->f(); //调用基类普通函数f
cout << x << endl; //x=3
pb->g(); //调用派生类虚函数g
cout << x << endl; //x=13
cout << endl;
cout << "开始类静态成员测试" << endl;
drived dd; //构造派生类
cout << &(drived::m1) << endl; //静态类成员可以由类名直接访问,且依然遵循private,protected,public访问准则
cout << &(dd.m1) << endl; //也可以通过某个实体调用静态类成员,因为类中只有一个静态成员实体,所以这里的地址是与上面的相同
cout << drived::getM1() << endl;
cout << "delete base pointer point to drived class" << endl;
//先调用派生类的析构函数,再调用基类的析构函数。
//构造函数要声明为虚函数,否则如果在派生类中使用new分配了空间则析构时不会动态绑定
//也就是不会先调用派生类的析构函数,造成内存泄漏.
delete pb;
cout << endl;
cout << "---------exit function class_test--------" << endl;
}
int main(){
cout << "区分字符串与指针" << endl;
pointerANDarray();
cout << "局部变量的初始化"<< endl;
localParam();
cout << "类的使用" << endl;
classTest();
return 0;
}
| [
"noreply@github.com"
] | zhxiaoq9.noreply@github.com |
5c9e38c22959840c90c13867647f42f8348b01fd | c6f4fe2766815616b37beccf07db82c0da27e6c1 | /Clock.h | 1b05c3c9256c249e36a592f670ce52aa41b277cc | [] | no_license | fragoulis/gpm-sem1-spacegame | c600f300046c054f7ab3cbf7193ccaad1503ca09 | 85bdfb5b62e2964588f41d03a295b2431ff9689f | refs/heads/master | 2023-06-09T03:43:53.175249 | 2007-12-13T03:03:30 | 2007-12-13T03:03:30 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,072 | h | #pragma once
#include "Singleton.h"
#include "TimeSource.h"
#include "Timer.h"
#include <vector>
using std::vector;
// Number of frames saved to compute the average time delta
static const int FRAMES_SAVED = 5;
class Timer;
typedef vector<Timer*> TimerArray;
class Clock : public Singleton<Clock>
{
friend Singleton<Clock>;
private:
// The clock's time source
TimeSource *m_TimeSrc;
// The time the timer started
feed_t m_lStart;
// The curent feed
feed_t m_lNow;
// The current time is the time passed since the start
// of the application in seconds
double m_dCurrentTime;
// The previous time
double m_dPreviousTime;
// This array holds the times of the last N feeds, giving
// us the opportunity to calculate a more accurate delta time.
// The first item in the array is the last time step occured
// [the last time delta].
double m_vdFrameTimes[FRAMES_SAVED];
// The average time delta
double m_dDeltaTime;
// An array of child timers
TimerArray m_vTimers;
public:
/**
* Accessors
*/
feed_t getCurrentFeed() const { return m_lNow; }
double getCurrentTime() const { return m_dCurrentTime; }
float getDeltaTime() const { return (float)m_dDeltaTime; }
double getDeltaTimeDouble() const { return m_dDeltaTime; }
double getLastDeltaTime() const {
return m_vdFrameTimes[0];
}
/**
* This function updates the current time, the time detla
* and all associated timers
*/
void FrameStep();
/**
* Initiates the clock. We must pass a time source object
* to associate with the clock.
*/
void Start( TimeSource *p_TimeSrc );
/**
* Returns a pointer to a new timer.
*/
Timer* GetTimer();
private:
/**
* Constructor/Destructor
*/
Clock();
~Clock();
/**
* Calculates the average time delta
*/
void _updateDeltaTime();
}; // end of Clock class | [
"john.fragkoulis@201bd241-053d-0410-948a-418211174e54"
] | john.fragkoulis@201bd241-053d-0410-948a-418211174e54 |
9b4aae182b5cf57443a637f59be589d08a4d383e | 313e686e0f0aa3b2535bc94c68644ca2ea7b8e61 | /src/server/game/Instances/InstanceSaveMgr.cpp | 59554ded84e279ef4574c7acb9d4e6150ac1a3da | [] | no_license | mysql1/TournamentCore | cf03d44094257a5348bd6c509357d512fb03a338 | 571238d0ec49078fb13f1965ce7b91c24f2ea262 | refs/heads/master | 2020-12-03T00:29:21.203000 | 2015-05-12T07:30:42 | 2015-05-12T07:30:42 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 26,047 | cpp | /*
* Copyright (C) 2014-2015 TournamentCore
* Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.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, see <http://www.gnu.org/licenses/>.
*/
#include "Common.h"
#include "Player.h"
#include "GridNotifiers.h"
#include "Log.h"
#include "GridStates.h"
#include "Map.h"
#include "MapManager.h"
#include "MapInstanced.h"
#include "InstanceSaveMgr.h"
#include "Timer.h"
#include "Config.h"
#include "ObjectMgr.h"
#include "World.h"
#include "Group.h"
#include "InstanceScript.h"
uint16 InstanceSaveManager::ResetTimeDelay[] = {3600, 900, 300, 60};
InstanceSaveManager::~InstanceSaveManager()
{
}
void InstanceSaveManager::Unload()
{
lock_instLists = true;
for (InstanceSaveHashMap::iterator itr = m_instanceSaveById.begin(); itr != m_instanceSaveById.end(); ++itr)
{
InstanceSave* save = itr->second;
for (InstanceSave::PlayerListType::iterator itr2 = save->m_playerList.begin(), next = itr2; itr2 != save->m_playerList.end(); itr2 = next)
{
++next;
(*itr2)->UnbindInstance(save->GetMapId(), save->GetDifficulty(), true);
}
for (InstanceSave::GroupListType::iterator itr2 = save->m_groupList.begin(), next = itr2; itr2 != save->m_groupList.end(); itr2 = next)
{
++next;
(*itr2)->UnbindInstance(save->GetMapId(), save->GetDifficulty(), true);
}
delete save;
}
}
/*
- adding instance into manager
- called from InstanceMap::Add, _LoadBoundInstances, LoadGroups
*/
InstanceSave* InstanceSaveManager::AddInstanceSave(uint32 mapId, uint32 instanceId, Difficulty difficulty, time_t resetTime, bool canReset, bool load)
{
if (InstanceSave* old_save = GetInstanceSave(instanceId))
return old_save;
const MapEntry* entry = sMapStore.LookupEntry(mapId);
if (!entry)
{
TC_LOG_ERROR("misc", "InstanceSaveManager::AddInstanceSave: wrong mapid = %d, instanceid = %d!", mapId, instanceId);
return NULL;
}
if (instanceId == 0)
{
TC_LOG_ERROR("misc", "InstanceSaveManager::AddInstanceSave: mapid = %d, wrong instanceid = %d!", mapId, instanceId);
return NULL;
}
if (difficulty >= (entry->IsRaid() ? MAX_RAID_DIFFICULTY : MAX_DUNGEON_DIFFICULTY))
{
TC_LOG_ERROR("misc", "InstanceSaveManager::AddInstanceSave: mapid = %d, instanceid = %d, wrong dificalty %u!", mapId, instanceId, difficulty);
return NULL;
}
if (!resetTime)
{
// initialize reset time
// for normal instances if no creatures are killed the instance will reset in two hours
if (entry->map_type == MAP_RAID || difficulty > DUNGEON_DIFFICULTY_NORMAL)
resetTime = GetResetTimeFor(mapId, difficulty);
else
{
resetTime = time(NULL) + 2 * HOUR;
// normally this will be removed soon after in InstanceMap::Add, prevent error
ScheduleReset(true, resetTime, InstResetEvent(0, mapId, difficulty, instanceId));
}
}
TC_LOG_DEBUG("maps", "InstanceSaveManager::AddInstanceSave: mapid = %d, instanceid = %d", mapId, instanceId);
InstanceSave* save = new InstanceSave(mapId, instanceId, difficulty, resetTime, canReset);
if (!load)
save->SaveToDB();
m_instanceSaveById[instanceId] = save;
return save;
}
InstanceSave* InstanceSaveManager::GetInstanceSave(uint32 InstanceId)
{
InstanceSaveHashMap::iterator itr = m_instanceSaveById.find(InstanceId);
return itr != m_instanceSaveById.end() ? itr->second : NULL;
}
void InstanceSaveManager::DeleteInstanceFromDB(uint32 instanceid)
{
SQLTransaction trans = CharacterDatabase.BeginTransaction();
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INSTANCE_BY_INSTANCE);
stmt->setUInt32(0, instanceid);
trans->Append(stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_INSTANCE_BY_INSTANCE);
stmt->setUInt32(0, instanceid);
trans->Append(stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GROUP_INSTANCE_BY_INSTANCE);
stmt->setUInt32(0, instanceid);
trans->Append(stmt);
CharacterDatabase.CommitTransaction(trans);
// Respawn times should be deleted only when the map gets unloaded
}
void InstanceSaveManager::RemoveInstanceSave(uint32 InstanceId)
{
InstanceSaveHashMap::iterator itr = m_instanceSaveById.find(InstanceId);
if (itr != m_instanceSaveById.end())
{
// save the resettime for normal instances only when they get unloaded
if (time_t resettime = itr->second->GetResetTimeForDB())
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_INSTANCE_RESETTIME);
stmt->setUInt32(0, uint32(resettime));
stmt->setUInt32(1, InstanceId);
CharacterDatabase.Execute(stmt);
}
itr->second->SetToDelete(true);
m_instanceSaveById.erase(itr);
}
}
void InstanceSaveManager::UnloadInstanceSave(uint32 InstanceId)
{
if (InstanceSave* save = GetInstanceSave(InstanceId))
{
save->UnloadIfEmpty();
if (save->m_toDelete)
delete save;
}
}
InstanceSave::InstanceSave(uint16 MapId, uint32 InstanceId, Difficulty difficulty, time_t resetTime, bool canReset)
: m_resetTime(resetTime), m_instanceid(InstanceId), m_mapid(MapId),
m_difficulty(difficulty), m_canReset(canReset), m_toDelete(false) { }
InstanceSave::~InstanceSave()
{
// the players and groups must be unbound before deleting the save
ASSERT(m_playerList.empty() && m_groupList.empty());
}
/*
Called from AddInstanceSave
*/
void InstanceSave::SaveToDB()
{
// save instance data too
std::string data;
uint32 completedEncounters = 0;
Map* map = sMapMgr->FindMap(GetMapId(), m_instanceid);
if (map)
{
ASSERT(map->IsDungeon());
if (InstanceScript* instanceScript = ((InstanceMap*)map)->GetInstanceScript())
{
data = instanceScript->GetSaveData();
completedEncounters = instanceScript->GetCompletedEncounterMask();
}
}
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_INSTANCE_SAVE);
stmt->setUInt32(0, m_instanceid);
stmt->setUInt16(1, GetMapId());
stmt->setUInt32(2, uint32(GetResetTimeForDB()));
stmt->setUInt8(3, uint8(GetDifficulty()));
stmt->setUInt32(4, completedEncounters);
stmt->setString(5, data);
CharacterDatabase.Execute(stmt);
}
time_t InstanceSave::GetResetTimeForDB()
{
// only save the reset time for normal instances
const MapEntry* entry = sMapStore.LookupEntry(GetMapId());
if (!entry || entry->map_type == MAP_RAID || GetDifficulty() == DUNGEON_DIFFICULTY_HEROIC)
return 0;
else
return GetResetTime();
}
// to cache or not to cache, that is the question
InstanceTemplate const* InstanceSave::GetTemplate()
{
return sObjectMgr->GetInstanceTemplate(m_mapid);
}
MapEntry const* InstanceSave::GetMapEntry()
{
return sMapStore.LookupEntry(m_mapid);
}
void InstanceSave::DeleteFromDB()
{
InstanceSaveManager::DeleteInstanceFromDB(GetInstanceId());
}
/* true if the instance save is still valid */
bool InstanceSave::UnloadIfEmpty()
{
if (m_playerList.empty() && m_groupList.empty())
{
// don't remove the save if there are still players inside the map
if (Map* map = sMapMgr->FindMap(GetMapId(), GetInstanceId()))
if (map->HavePlayers())
return true;
if (!sInstanceSaveMgr->lock_instLists)
sInstanceSaveMgr->RemoveInstanceSave(GetInstanceId());
return false;
}
else
return true;
}
void InstanceSaveManager::LoadInstances()
{
uint32 oldMSTime = getMSTime();
// Delete expired instances (Instance related spawns are removed in the following cleanup queries)
CharacterDatabase.DirectExecute("DELETE i FROM instance i LEFT JOIN instance_reset ir ON mapid = map AND i.difficulty = ir.difficulty "
"WHERE (i.resettime > 0 AND i.resettime < UNIX_TIMESTAMP()) OR (ir.resettime IS NOT NULL AND ir.resettime < UNIX_TIMESTAMP())");
// Delete invalid character_instance and group_instance references
CharacterDatabase.DirectExecute("DELETE ci.* FROM character_instance AS ci LEFT JOIN characters AS c ON ci.guid = c.guid WHERE c.guid IS NULL");
CharacterDatabase.DirectExecute("DELETE gi.* FROM group_instance AS gi LEFT JOIN groups AS g ON gi.guid = g.guid WHERE g.guid IS NULL");
// Delete invalid instance references
CharacterDatabase.DirectExecute("DELETE i.* FROM instance AS i LEFT JOIN character_instance AS ci ON i.id = ci.instance LEFT JOIN group_instance AS gi ON i.id = gi.instance WHERE ci.guid IS NULL AND gi.guid IS NULL");
// Delete invalid references to instance
CharacterDatabase.DirectExecute("DELETE FROM creature_respawn WHERE instanceId > 0 AND instanceId NOT IN (SELECT id FROM instance)");
CharacterDatabase.DirectExecute("DELETE FROM gameobject_respawn WHERE instanceId > 0 AND instanceId NOT IN (SELECT id FROM instance)");
CharacterDatabase.DirectExecute("DELETE tmp.* FROM character_instance AS tmp LEFT JOIN instance ON tmp.instance = instance.id WHERE tmp.instance > 0 AND instance.id IS NULL");
CharacterDatabase.DirectExecute("DELETE tmp.* FROM group_instance AS tmp LEFT JOIN instance ON tmp.instance = instance.id WHERE tmp.instance > 0 AND instance.id IS NULL");
// Clean invalid references to instance
CharacterDatabase.DirectExecute("UPDATE corpse SET instanceId = 0 WHERE instanceId > 0 AND instanceId NOT IN (SELECT id FROM instance)");
CharacterDatabase.DirectExecute("UPDATE characters AS tmp LEFT JOIN instance ON tmp.instance_id = instance.id SET tmp.instance_id = 0 WHERE tmp.instance_id > 0 AND instance.id IS NULL");
// Initialize instance id storage (Needs to be done after the trash has been clean out)
sMapMgr->InitInstanceIds();
// Load reset times and clean expired instances
sInstanceSaveMgr->LoadResetTimes();
TC_LOG_INFO("server.loading", ">> Loaded instances in %u ms", GetMSTimeDiffToNow(oldMSTime));
}
void InstanceSaveManager::LoadResetTimes()
{
time_t now = time(NULL);
time_t today = (now / DAY) * DAY;
// NOTE: Use DirectPExecute for tables that will be queried later
// get the current reset times for normal instances (these may need to be updated)
// these are only kept in memory for InstanceSaves that are loaded later
// resettime = 0 in the DB for raid/heroic instances so those are skipped
typedef std::pair<uint32 /*PAIR32(map, difficulty)*/, time_t> ResetTimeMapDiffType;
typedef std::map<uint32, ResetTimeMapDiffType> InstResetTimeMapDiffType;
InstResetTimeMapDiffType instResetTime;
// index instance ids by map/difficulty pairs for fast reset warning send
typedef std::multimap<uint32 /*PAIR32(map, difficulty)*/, uint32 /*instanceid*/ > ResetTimeMapDiffInstances;
typedef std::pair<ResetTimeMapDiffInstances::const_iterator, ResetTimeMapDiffInstances::const_iterator> ResetTimeMapDiffInstancesBounds;
ResetTimeMapDiffInstances mapDiffResetInstances;
QueryResult result = CharacterDatabase.Query("SELECT id, map, difficulty, resettime FROM instance ORDER BY id ASC");
if (result)
{
do
{
Field* fields = result->Fetch();
uint32 instanceId = fields[0].GetUInt32();
// Instances are pulled in ascending order from db and nextInstanceId is initialized with 1,
// so if the instance id is used, increment until we find the first unused one for a potential new instance
if (sMapMgr->GetNextInstanceId() == instanceId)
sMapMgr->SetNextInstanceId(instanceId + 1);
// Mark instance id as being used
sMapMgr->RegisterInstanceId(instanceId);
if (time_t resettime = time_t(fields[3].GetUInt32()))
{
uint32 mapid = fields[1].GetUInt16();
uint32 difficulty = fields[2].GetUInt8();
instResetTime[instanceId] = ResetTimeMapDiffType(MAKE_PAIR32(mapid, difficulty), resettime);
mapDiffResetInstances.insert(ResetTimeMapDiffInstances::value_type(MAKE_PAIR32(mapid, difficulty), instanceId));
}
}
while (result->NextRow());
// update reset time for normal instances with the max creature respawn time + X hours
if (PreparedQueryResult result2 = CharacterDatabase.Query(CharacterDatabase.GetPreparedStatement(CHAR_SEL_MAX_CREATURE_RESPAWNS)))
{
do
{
Field* fields = result2->Fetch();
uint32 instance = fields[1].GetUInt32();
time_t resettime = time_t(fields[0].GetUInt32() + 2 * HOUR);
InstResetTimeMapDiffType::iterator itr = instResetTime.find(instance);
if (itr != instResetTime.end() && itr->second.second != resettime)
{
CharacterDatabase.DirectPExecute("UPDATE instance SET resettime = '" UI64FMTD "' WHERE id = '%u'", uint64(resettime), instance);
itr->second.second = resettime;
}
}
while (result->NextRow());
}
// schedule the reset times
for (InstResetTimeMapDiffType::iterator itr = instResetTime.begin(); itr != instResetTime.end(); ++itr)
if (itr->second.second > now)
ScheduleReset(true, itr->second.second, InstResetEvent(0, PAIR32_LOPART(itr->second.first), Difficulty(PAIR32_HIPART(itr->second.first)), itr->first));
}
// load the global respawn times for raid/heroic instances
uint32 diff = sWorld->getIntConfig(CONFIG_INSTANCE_RESET_TIME_HOUR) * HOUR;
result = CharacterDatabase.Query("SELECT mapid, difficulty, resettime FROM instance_reset");
if (result)
{
do
{
Field* fields = result->Fetch();
uint32 mapid = fields[0].GetUInt16();
Difficulty difficulty = Difficulty(fields[1].GetUInt8());
uint64 oldresettime = fields[2].GetUInt32();
MapDifficulty const* mapDiff = GetMapDifficultyData(mapid, difficulty);
if (!mapDiff)
{
TC_LOG_ERROR("misc", "InstanceSaveManager::LoadResetTimes: invalid mapid(%u)/difficulty(%u) pair in instance_reset!", mapid, difficulty);
CharacterDatabase.DirectPExecute("DELETE FROM instance_reset WHERE mapid = '%u' AND difficulty = '%u'", mapid, difficulty);
continue;
}
// update the reset time if the hour in the configs changes
uint64 newresettime = (oldresettime / DAY) * DAY + diff;
if (oldresettime != newresettime)
CharacterDatabase.DirectPExecute("UPDATE instance_reset SET resettime = '%u' WHERE mapid = '%u' AND difficulty = '%u'", uint32(newresettime), mapid, difficulty);
InitializeResetTimeFor(mapid, difficulty, newresettime);
} while (result->NextRow());
}
// calculate new global reset times for expired instances and those that have never been reset yet
// add the global reset times to the priority queue
for (MapDifficultyMap::const_iterator itr = sMapDifficultyMap.begin(); itr != sMapDifficultyMap.end(); ++itr)
{
uint32 map_diff_pair = itr->first;
uint32 mapid = PAIR32_LOPART(map_diff_pair);
Difficulty difficulty = Difficulty(PAIR32_HIPART(map_diff_pair));
MapDifficulty const* mapDiff = &itr->second;
if (!mapDiff->resetTime)
continue;
// the reset_delay must be at least one day
uint32 period = uint32(((mapDiff->resetTime * sWorld->getRate(RATE_INSTANCE_RESET_TIME))/DAY) * DAY);
if (period < DAY)
period = DAY;
time_t t = GetResetTimeFor(mapid, difficulty);
if (!t)
{
// initialize the reset time
t = today + period + diff;
CharacterDatabase.DirectPExecute("INSERT INTO instance_reset VALUES ('%u', '%u', '%u')", mapid, difficulty, (uint32)t);
}
if (t < now)
{
// assume that expired instances have already been cleaned
// calculate the next reset time
t = (t / DAY) * DAY;
t += ((today - t) / period + 1) * period + diff;
CharacterDatabase.DirectPExecute("UPDATE instance_reset SET resettime = '" UI64FMTD "' WHERE mapid = '%u' AND difficulty= '%u'", (uint64)t, mapid, difficulty);
}
InitializeResetTimeFor(mapid, difficulty, t);
// schedule the global reset/warning
uint8 type;
for (type = 1; type < 4; ++type)
if (t - ResetTimeDelay[type-1] > now)
break;
ScheduleReset(true, t - ResetTimeDelay[type-1], InstResetEvent(type, mapid, difficulty, 0));
ResetTimeMapDiffInstancesBounds range = mapDiffResetInstances.equal_range(map_diff_pair);
for (; range.first != range.second; ++range.first)
ScheduleReset(true, t - ResetTimeDelay[type-1], InstResetEvent(type, mapid, difficulty, range.first->second));
}
}
void InstanceSaveManager::ScheduleReset(bool add, time_t time, InstResetEvent event)
{
if (!add)
{
// find the event in the queue and remove it
ResetTimeQueue::iterator itr;
std::pair<ResetTimeQueue::iterator, ResetTimeQueue::iterator> range;
range = m_resetTimeQueue.equal_range(time);
for (itr = range.first; itr != range.second; ++itr)
{
if (itr->second == event)
{
m_resetTimeQueue.erase(itr);
return;
}
}
// in case the reset time changed (should happen very rarely), we search the whole queue
if (itr == range.second)
{
for (itr = m_resetTimeQueue.begin(); itr != m_resetTimeQueue.end(); ++itr)
{
if (itr->second == event)
{
m_resetTimeQueue.erase(itr);
return;
}
}
if (itr == m_resetTimeQueue.end())
TC_LOG_ERROR("misc", "InstanceSaveManager::ScheduleReset: cannot cancel the reset, the event(%d, %d, %d) was not found!", event.type, event.mapid, event.instanceId);
}
}
else
m_resetTimeQueue.insert(std::pair<time_t, InstResetEvent>(time, event));
}
void InstanceSaveManager::Update()
{
time_t now = time(NULL);
time_t t;
while (!m_resetTimeQueue.empty())
{
t = m_resetTimeQueue.begin()->first;
if (t >= now)
break;
InstResetEvent &event = m_resetTimeQueue.begin()->second;
if (event.type == 0)
{
// for individual normal instances, max creature respawn + X hours
_ResetInstance(event.mapid, event.instanceId);
m_resetTimeQueue.erase(m_resetTimeQueue.begin());
}
else
{
// global reset/warning for a certain map
time_t resetTime = GetResetTimeFor(event.mapid, event.difficulty);
_ResetOrWarnAll(event.mapid, event.difficulty, event.type != 4, resetTime);
if (event.type != 4)
{
// schedule the next warning/reset
++event.type;
ScheduleReset(true, resetTime - ResetTimeDelay[event.type-1], event);
}
m_resetTimeQueue.erase(m_resetTimeQueue.begin());
}
}
}
void InstanceSaveManager::_ResetSave(InstanceSaveHashMap::iterator &itr)
{
// unbind all players bound to the instance
// do not allow UnbindInstance to automatically unload the InstanceSaves
lock_instLists = true;
InstanceSave::PlayerListType &pList = itr->second->m_playerList;
while (!pList.empty())
{
Player* player = *(pList.begin());
player->UnbindInstance(itr->second->GetMapId(), itr->second->GetDifficulty(), true);
}
InstanceSave::GroupListType &gList = itr->second->m_groupList;
while (!gList.empty())
{
Group* group = *(gList.begin());
group->UnbindInstance(itr->second->GetMapId(), itr->second->GetDifficulty(), true);
}
delete itr->second;
m_instanceSaveById.erase(itr++);
lock_instLists = false;
}
void InstanceSaveManager::_ResetInstance(uint32 mapid, uint32 instanceId)
{
TC_LOG_DEBUG("maps", "InstanceSaveMgr::_ResetInstance %u, %u", mapid, instanceId);
Map const* map = sMapMgr->CreateBaseMap(mapid);
if (!map->Instanceable())
return;
InstanceSaveHashMap::iterator itr = m_instanceSaveById.find(instanceId);
if (itr != m_instanceSaveById.end())
_ResetSave(itr);
DeleteInstanceFromDB(instanceId); // even if save not loaded
Map* iMap = ((MapInstanced*)map)->FindInstanceMap(instanceId);
if (iMap && iMap->IsDungeon())
((InstanceMap*)iMap)->Reset(INSTANCE_RESET_RESPAWN_DELAY);
if (iMap)
iMap->DeleteRespawnTimes();
else
Map::DeleteRespawnTimesInDB(mapid, instanceId);
// Free up the instance id and allow it to be reused
sMapMgr->FreeInstanceId(instanceId);
}
void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, bool warn, time_t resetTime)
{
// global reset for all instances of the given map
MapEntry const* mapEntry = sMapStore.LookupEntry(mapid);
if (!mapEntry->Instanceable())
return;
time_t now = time(NULL);
if (!warn)
{
MapDifficulty const* mapDiff = GetMapDifficultyData(mapid, difficulty);
if (!mapDiff || !mapDiff->resetTime)
{
TC_LOG_ERROR("misc", "InstanceSaveManager::ResetOrWarnAll: not valid difficulty or no reset delay for map %d", mapid);
return;
}
// remove all binds to instances of the given map
for (InstanceSaveHashMap::iterator itr = m_instanceSaveById.begin(); itr != m_instanceSaveById.end();)
{
if (itr->second->GetMapId() == mapid && itr->second->GetDifficulty() == difficulty)
_ResetSave(itr);
else
++itr;
}
// delete them from the DB, even if not loaded
SQLTransaction trans = CharacterDatabase.BeginTransaction();
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_INSTANCE_BY_MAP_DIFF);
stmt->setUInt16(0, uint16(mapid));
stmt->setUInt8(1, uint8(difficulty));
trans->Append(stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GROUP_INSTANCE_BY_MAP_DIFF);
stmt->setUInt16(0, uint16(mapid));
stmt->setUInt8(1, uint8(difficulty));
trans->Append(stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_INSTANCE_BY_MAP_DIFF);
stmt->setUInt16(0, uint16(mapid));
stmt->setUInt8(1, uint8(difficulty));
trans->Append(stmt);
CharacterDatabase.CommitTransaction(trans);
// calculate the next reset time
uint32 diff = sWorld->getIntConfig(CONFIG_INSTANCE_RESET_TIME_HOUR) * HOUR;
uint32 period = uint32(((mapDiff->resetTime * sWorld->getRate(RATE_INSTANCE_RESET_TIME))/DAY) * DAY);
if (period < DAY)
period = DAY;
uint32 next_reset = uint32(((resetTime + MINUTE) / DAY * DAY) + period + diff);
SetResetTimeFor(mapid, difficulty, next_reset);
ScheduleReset(true, time_t(next_reset-3600), InstResetEvent(1, mapid, difficulty, 0));
// Update it in the DB
stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GLOBAL_INSTANCE_RESETTIME);
stmt->setUInt32(0, next_reset);
stmt->setUInt16(1, uint16(mapid));
stmt->setUInt8(2, uint8(difficulty));
CharacterDatabase.Execute(stmt);
}
// note: this isn't fast but it's meant to be executed very rarely
Map const* map = sMapMgr->CreateBaseMap(mapid); // _not_ include difficulty
MapInstanced::InstancedMaps &instMaps = ((MapInstanced*)map)->GetInstancedMaps();
MapInstanced::InstancedMaps::iterator mitr;
uint32 timeLeft;
for (mitr = instMaps.begin(); mitr != instMaps.end(); ++mitr)
{
Map* map2 = mitr->second;
if (!map2->IsDungeon())
continue;
if (warn)
{
if (now <= resetTime)
timeLeft = 0;
else
timeLeft = uint32(now - resetTime);
((InstanceMap*)map2)->SendResetWarnings(timeLeft);
}
else
((InstanceMap*)map2)->Reset(INSTANCE_RESET_GLOBAL);
}
/// @todo delete creature/gameobject respawn times even if the maps are not loaded
}
uint32 InstanceSaveManager::GetNumBoundPlayersTotal()
{
uint32 ret = 0;
for (InstanceSaveHashMap::iterator itr = m_instanceSaveById.begin(); itr != m_instanceSaveById.end(); ++itr)
ret += itr->second->GetPlayerCount();
return ret;
}
uint32 InstanceSaveManager::GetNumBoundGroupsTotal()
{
uint32 ret = 0;
for (InstanceSaveHashMap::iterator itr = m_instanceSaveById.begin(); itr != m_instanceSaveById.end(); ++itr)
ret += itr->second->GetGroupCount();
return ret;
}
| [
"TournamentCore@gmail.com"
] | TournamentCore@gmail.com |
25684c328b6bfd8c50cc739caa0328bbedc2b77c | 5fbf7874dfe3f7815fb0751401106f65fb46d6d0 | /test/pumpkinSpiceTest/pumpkinSpiceMeshTest.cpp | 58461bbd33cca47fb26e98af234649cddb040f73 | [
"MIT"
] | permissive | LaurieHarding-Russell/FormBuilder | 9a86f3f8d11135f0aa1f3176935cefcd35291d8e | a456d57c774b222ad10a7f41d8ae2f362f8d1844 | refs/heads/master | 2023-01-03T05:49:52.258167 | 2020-10-23T00:36:24 | 2020-10-23T00:36:24 | 215,917,753 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,127 | cpp | #include "gtest/gtest.h"
#include "lib/PumpkinSpice.h"
TEST(PumpkinSpice, InputComponentCanSelect) {
PumpkinSpice pumpkinSpiceCompiler = PumpkinSpice(100, 100);
PumpkinSpiceInput pumpkinSpiceInput;
pumpkinSpiceInput.basePumkinFileName = "test/pumpkinSpiceTest/pumpkinSpiceMeshTest.pumpkin";
pumpkinSpiceInput.baseSpiceFileName = "test/pumpkinSpiceTest/empty.spice";
pumpkinSpiceCompiler.compileComponents(pumpkinSpiceInput);
PumpkinSpiceComponentObject* pumpkinSpiceComponentObject = pumpkinSpiceCompiler.getPumpkinSpiceComponentObject();
// for(std::vector<Point> mesh: pumpkinSpiceComponentObject->basePumpkinSpiceObjects->meshes) {
// for (Point point : mesh) {
// std::cout << point << "\n";
// }
// }
EXPECT_EQ(pumpkinSpiceComponentObject->basePumpkinSpiceObjects->meshes.size(), 4);
EXPECT_EQ(pumpkinSpiceComponentObject->basePumpkinSpiceObjects->textures.size(), 4);
EXPECT_EQ(pumpkinSpiceComponentObject->basePumpkinSpiceObjects->textureMap.size(), 6);
}
GTEST_API_ int main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
} | [
"laurieHardingRussell@gmail.com"
] | laurieHardingRussell@gmail.com |
7371997cd23371e474591d1d8977155128d2cfbf | 11c9cc61ae0c48ed0b81a1e2b35f97b45421f263 | /library/src/main/jni/include/opencv2/core/saturate.hpp | 9f6ee7b356b97b2274b98051f06fda66737703db | [] | no_license | ben622/live | b9c76764c672c2c9b2959370f8011cd7a5ca2b27 | d6a3700d5fcbd1dc02597d2c690d3c39411cbcc2 | refs/heads/master | 2020-04-15T11:11:16.736138 | 2019-09-11T08:23:34 | 2019-09-11T08:23:34 | 164,618,715 | 10 | 4 | null | null | null | null | UTF-8 | C++ | false | false | 10,842 | hpp | /*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
// Copyright (C) 2014, Itseez Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#ifndef OPENCV_CORE_SATURATE_HPP
#define OPENCV_CORE_SATURATE_HPP
#include "/opencv2/core/cvdef.h"
#include "/opencv2/core/fast_math.hpp"
namespace cv
{
//! @addtogroup core_utils
//! @{
/////////////// saturate_cast (used in image & signal processing) ///////////////////
/** @brief Template function for accurate conversion from one primitive type to another.
The function saturate_cast resembles the standard C++ cast operations, such as static_cast\<T\>()
and others. It perform an efficient and accurate conversion from one primitive type to another
(see the introduction chapter). saturate in the name means that when the input value v is out of the
range of the target type, the result is not formed just by taking low bits of the input, but instead
the value is clipped. For example:
@code
uchar a = saturate_cast<uchar>(-100); // a = 0 (UCHAR_MIN)
short b = saturate_cast<short>(33333.33333); // b = 32767 (SHRT_MAX)
@endcode
Such clipping is done when the target type is unsigned char , signed char , unsigned short or
signed short . For 32-bit integers, no clipping is done.
When the parameter is a floating-point value and the target type is an integer (8-, 16- or 32-bit),
the floating-point value is first rounded to the nearest integer and then clipped if needed (when
the target type is 8- or 16-bit).
This operation is used in the simplest or most complex image processing functions in OpenCV.
@param v Function parameter.
@sa add, subtract, multiply, divide, Mat::convertTo
*/
template<typename _Tp> static inline _Tp saturate_cast(uchar v) { return _Tp(v); }
/** @overload */
template<typename _Tp> static inline _Tp saturate_cast(schar v) { return _Tp(v); }
/** @overload */
template<typename _Tp> static inline _Tp saturate_cast(ushort v) { return _Tp(v); }
/** @overload */
template<typename _Tp> static inline _Tp saturate_cast(short v) { return _Tp(v); }
/** @overload */
template<typename _Tp> static inline _Tp saturate_cast(unsigned v) { return _Tp(v); }
/** @overload */
template<typename _Tp> static inline _Tp saturate_cast(int v) { return _Tp(v); }
/** @overload */
template<typename _Tp> static inline _Tp saturate_cast(float v) { return _Tp(v); }
/** @overload */
template<typename _Tp> static inline _Tp saturate_cast(double v) { return _Tp(v); }
/** @overload */
template<typename _Tp> static inline _Tp saturate_cast(int64 v) { return _Tp(v); }
/** @overload */
template<typename _Tp> static inline _Tp saturate_cast(uint64 v) { return _Tp(v); }
template<> inline uchar saturate_cast<uchar>(schar v) { return (uchar)std::max((int)v, 0); }
template<> inline uchar saturate_cast<uchar>(ushort v) { return (uchar)std::min((unsigned)v, (unsigned)UCHAR_MAX); }
template<> inline uchar saturate_cast<uchar>(int v) { return (uchar)((unsigned)v <= UCHAR_MAX ? v : v > 0 ? UCHAR_MAX : 0); }
template<> inline uchar saturate_cast<uchar>(short v) { return saturate_cast<uchar>((int)v); }
template<> inline uchar saturate_cast<uchar>(unsigned v) { return (uchar)std::min(v, (unsigned)UCHAR_MAX); }
template<> inline uchar saturate_cast<uchar>(float v) { int iv = cvRound(v); return saturate_cast<uchar>(iv); }
template<> inline uchar saturate_cast<uchar>(double v) { int iv = cvRound(v); return saturate_cast<uchar>(iv); }
template<> inline uchar saturate_cast<uchar>(int64 v) { return (uchar)((uint64)v <= (uint64)UCHAR_MAX ? v : v > 0 ? UCHAR_MAX : 0); }
template<> inline uchar saturate_cast<uchar>(uint64 v) { return (uchar)std::min(v, (uint64)UCHAR_MAX); }
template<> inline schar saturate_cast<schar>(uchar v) { return (schar)std::min((int)v, SCHAR_MAX); }
template<> inline schar saturate_cast<schar>(ushort v) { return (schar)std::min((unsigned)v, (unsigned)SCHAR_MAX); }
template<> inline schar saturate_cast<schar>(int v) { return (schar)((unsigned)(v-SCHAR_MIN) <= (unsigned)UCHAR_MAX ? v : v > 0 ? SCHAR_MAX : SCHAR_MIN); }
template<> inline schar saturate_cast<schar>(short v) { return saturate_cast<schar>((int)v); }
template<> inline schar saturate_cast<schar>(unsigned v) { return (schar)std::min(v, (unsigned)SCHAR_MAX); }
template<> inline schar saturate_cast<schar>(float v) { int iv = cvRound(v); return saturate_cast<schar>(iv); }
template<> inline schar saturate_cast<schar>(double v) { int iv = cvRound(v); return saturate_cast<schar>(iv); }
template<> inline schar saturate_cast<schar>(int64 v) { return (schar)((uint64)((int64)v-SCHAR_MIN) <= (uint64)UCHAR_MAX ? v : v > 0 ? SCHAR_MAX : SCHAR_MIN); }
template<> inline schar saturate_cast<schar>(uint64 v) { return (schar)std::min(v, (uint64)SCHAR_MAX); }
template<> inline ushort saturate_cast<ushort>(schar v) { return (ushort)std::max((int)v, 0); }
template<> inline ushort saturate_cast<ushort>(short v) { return (ushort)std::max((int)v, 0); }
template<> inline ushort saturate_cast<ushort>(int v) { return (ushort)((unsigned)v <= (unsigned)USHRT_MAX ? v : v > 0 ? USHRT_MAX : 0); }
template<> inline ushort saturate_cast<ushort>(unsigned v) { return (ushort)std::min(v, (unsigned)USHRT_MAX); }
template<> inline ushort saturate_cast<ushort>(float v) { int iv = cvRound(v); return saturate_cast<ushort>(iv); }
template<> inline ushort saturate_cast<ushort>(double v) { int iv = cvRound(v); return saturate_cast<ushort>(iv); }
template<> inline ushort saturate_cast<ushort>(int64 v) { return (ushort)((uint64)v <= (uint64)USHRT_MAX ? v : v > 0 ? USHRT_MAX : 0); }
template<> inline ushort saturate_cast<ushort>(uint64 v) { return (ushort)std::min(v, (uint64)USHRT_MAX); }
template<> inline short saturate_cast<short>(ushort v) { return (short)std::min((int)v, SHRT_MAX); }
template<> inline short saturate_cast<short>(int v) { return (short)((unsigned)(v - SHRT_MIN) <= (unsigned)USHRT_MAX ? v : v > 0 ? SHRT_MAX : SHRT_MIN); }
template<> inline short saturate_cast<short>(unsigned v) { return (short)std::min(v, (unsigned)SHRT_MAX); }
template<> inline short saturate_cast<short>(float v) { int iv = cvRound(v); return saturate_cast<short>(iv); }
template<> inline short saturate_cast<short>(double v) { int iv = cvRound(v); return saturate_cast<short>(iv); }
template<> inline short saturate_cast<short>(int64 v) { return (short)((uint64)((int64)v - SHRT_MIN) <= (uint64)USHRT_MAX ? v : v > 0 ? SHRT_MAX : SHRT_MIN); }
template<> inline short saturate_cast<short>(uint64 v) { return (short)std::min(v, (uint64)SHRT_MAX); }
template<> inline int saturate_cast<int>(unsigned v) { return (int)std::min(v, (unsigned)INT_MAX); }
template<> inline int saturate_cast<int>(int64 v) { return (int)((uint64)(v - INT_MIN) <= (uint64)UINT_MAX ? v : v > 0 ? INT_MAX : INT_MIN); }
template<> inline int saturate_cast<int>(uint64 v) { return (int)std::min(v, (uint64)INT_MAX); }
template<> inline int saturate_cast<int>(float v) { return cvRound(v); }
template<> inline int saturate_cast<int>(double v) { return cvRound(v); }
template<> inline unsigned saturate_cast<unsigned>(schar v) { return (unsigned)std::max(v, (schar)0); }
template<> inline unsigned saturate_cast<unsigned>(short v) { return (unsigned)std::max(v, (short)0); }
template<> inline unsigned saturate_cast<unsigned>(int v) { return (unsigned)std::max(v, (int)0); }
template<> inline unsigned saturate_cast<unsigned>(int64 v) { return (unsigned)((uint64)v <= (uint64)UINT_MAX ? v : v > 0 ? UINT_MAX : 0); }
template<> inline unsigned saturate_cast<unsigned>(uint64 v) { return (unsigned)std::min(v, (uint64)UINT_MAX); }
// we intentionally do not clip negative numbers, to make -1 become 0xffffffff etc.
template<> inline unsigned saturate_cast<unsigned>(float v) { return static_cast<unsigned>(cvRound(v)); }
template<> inline unsigned saturate_cast<unsigned>(double v) { return static_cast<unsigned>(cvRound(v)); }
template<> inline uint64 saturate_cast<uint64>(schar v) { return (uint64)std::max(v, (schar)0); }
template<> inline uint64 saturate_cast<uint64>(short v) { return (uint64)std::max(v, (short)0); }
template<> inline uint64 saturate_cast<uint64>(int v) { return (uint64)std::max(v, (int)0); }
template<> inline uint64 saturate_cast<uint64>(int64 v) { return (uint64)std::max(v, (int64)0); }
template<> inline int64 saturate_cast<int64>(uint64 v) { return (int64)std::min(v, (uint64)LLONG_MAX); }
//! @}
} // cv
#endif // OPENCV_CORE_SATURATE_HPP
| [
"zhangchuan622@gmail.com"
] | zhangchuan622@gmail.com |
5c18665e3977bf6baa4b76a02b2846101ace4cd0 | 02795068680d1cd57fc21c00b873a618c920d943 | /src/Renderer.cpp | 62c19cb921da7c38e1ecd0034af7ea3d891bc1b5 | [] | no_license | ArnaudValensi/2d-game-engine-cpp-opengl | fbd4c1d2cba8ad53df386e7c95d5dbd2a1131f4f | 3057e3f776f86fa7663adf34b70a64ec70d0b8d3 | refs/heads/master | 2021-01-05T15:59:35.811631 | 2020-07-01T11:08:57 | 2020-07-01T11:47:32 | 241,068,377 | 5 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,630 | cpp | #include "Renderer.h"
#include "Config.h"
#include "Rect.h"
#include "Shader.h"
#include "debug.h"
#include <GL/gl3w.h>
#include <SDL.h>
#include <fmt/core.h>
#include <imgui.h>
#include <imgui_impl_opengl3.h>
#include <imgui_impl_sdl.h>
void Renderer::Init() {
// NOTE: There is two error with SDL:
// "MessageTracer: Falling back to default whitelist": don't know why.
// "CGContextSetFillColorWithColor: invalid context 0x0.":
// https://bugzilla.libsdl.org/show_bug.cgi?id=4470
// https://hg.libsdl.org/SDL/rev/065b94926987
// Should be fixed on a version later 2.0.10.
if (SDL_Init(SDL_INIT_VIDEO) != 0) {
PANIC("SDL_Init failed: %s\n", SDL_GetError());
}
SDL_version compiled;
SDL_version linked;
SDL_VERSION(&compiled);
SDL_GetVersion(&linked);
fmt::print("SDL2 linked version: {}.{}.{}, compiled version: {}.{}.{}\n", compiled.major,
compiled.minor, compiled.patch, linked.major, linked.minor, linked.patch);
// Decide GL+GLSL versions
#if __APPLE__
// GL 3.2 Core + GLSL 150
const char* glsl_version = "#version 150";
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS,
SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG); // Always required on Mac
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
#else
// GL 3.0 + GLSL 130
const char* glsl_version = "#version 130";
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, 0);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
#endif
// Create window with graphics context
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
m_ScreenScale = 1;
SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_OPENGL
| SDL_WINDOW_RESIZABLE
| SDL_WINDOW_ALLOW_HIGHDPI);
m_Window = SDL_CreateWindow("Game",
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
REFERENCE_SCREEN_WIDTH,
REFERENCE_SCREEN_HEIGHT,
window_flags);
if (!m_Window) {
PANIC("SDL_CreateWindow failed: %s\n", SDL_GetError());
}
// This seems to create the following message on debug:
// "MessageTracer: Falling back to default whitelist".
SDL_GLContext m_GlContext = SDL_GL_CreateContext(m_Window);
if (!m_GlContext) {
PANIC("SDL_GL_CreateContext failed: %s\n", SDL_GetError());
}
SDL_GL_MakeCurrent(m_Window, m_GlContext);
SDL_GL_SetSwapInterval(1); // Enable vsync
if (gl3wInit()) {
PANIC("Failed to initialize OpenGL loader!\n");
}
printf(
"OpenGL %s, GLSL %s\n",
glGetString(GL_VERSION),
glGetString(GL_SHADING_LANGUAGE_VERSION));
HandleScreenSizeChange();
GL(glEnable(GL_CULL_FACE));
GL(glFrontFace(GL_CW));
GL(glEnable(GL_DEPTH_TEST));
GL(glEnable(GL_BLEND));
GL(glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA));
// Setup Dear ImGui context
IMGUI_CHECKVERSION();
ImGui::CreateContext();
m_ImGuiIo = &ImGui::GetIO();
m_ImGuiIo->ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
//io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
m_ImGuiIo->ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking
m_ImGuiIo->ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows
//io.ConfigViewportsNoAutoMerge = true;
//io.ConfigViewportsNoTaskBarIcon = true;
// Setup Dear ImGui style
ImGui::StyleColorsDark();
//ImGui::StyleColorsClassic();
// When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones.
ImGuiStyle& style = ImGui::GetStyle();
if (m_ImGuiIo->ConfigFlags & ImGuiConfigFlags_ViewportsEnable) {
style.WindowRounding = 0.0f;
style.Colors[ImGuiCol_WindowBg].w = 1.0f;
}
// Setup Platform/Renderer bindings
ImGui_ImplSDL2_InitForOpenGL(m_Window, m_GlContext);
ImGui_ImplOpenGL3_Init(glsl_version);
}
void Renderer::Shutdown() {
// Cleanup
ImGui_ImplOpenGL3_Shutdown();
ImGui_ImplSDL2_Shutdown();
ImGui::DestroyContext();
SDL_GL_DeleteContext(m_GlContext);
SDL_DestroyRenderer(m_Renderer);
SDL_DestroyWindow(m_Window);
SDL_Quit();
}
void Renderer::BeforeRender() {
// Start the Dear ImGui frame
ImGui_ImplOpenGL3_NewFrame();
ImGui_ImplSDL2_NewFrame(m_Window);
ImGui::NewFrame();
GL(glClearColor(1.0f, 1.0f, 0.0f, 1.0f));
GL(glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT));
}
void Renderer::Render() {
// Rendering
ImGui::Render();
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
// Update and Render additional Platform Windows
// (Platform functions may change the current OpenGL context, so we save/restore it to make it easier to paste this code elsewhere.
// For this specific demo app we could also call SDL_GL_MakeCurrent(window, gl_context) directly)
if (m_ImGuiIo->ConfigFlags & ImGuiConfigFlags_ViewportsEnable) {
SDL_Window* backup_current_window = SDL_GL_GetCurrentWindow();
SDL_GLContext backup_current_context = SDL_GL_GetCurrentContext();
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindowsDefault();
SDL_GL_MakeCurrent(backup_current_window, backup_current_context);
}
SDL_GL_SwapWindow(m_Window);
}
void Renderer::HandleScreenSizeChange() {
SDL_GetWindowSize(m_Window, &m_ScreenSize.x, &m_ScreenSize.y);
int display_w, display_h;
SDL_GL_GetDrawableSize(m_Window, &display_w, &display_h);
m_HdpiFactor = display_w / m_ScreenSize.x;
GL(glViewport(0, 0, display_w, display_h));
fmt::print(
"screen size: ({},{}), frame buffer size: ({},{}) hdpi factor: {}\n",
m_ScreenSize.x, m_ScreenSize.y, display_w, display_h, m_HdpiFactor);
for (const auto& on_change_screen_size_callback : m_OnScreenChangeEvents) {
on_change_screen_size_callback();
}
}
void Renderer::Update(const Events& events) {
if (events.IsWindowResizedThisTick()) {
HandleScreenSizeChange();
}
}
glm::ivec2 Renderer::GetScreenSize() const {
return m_ScreenSize;
}
void Renderer::OnScreenSizeChange(const std::function<void()>& on_scree_change_event) {
m_OnScreenChangeEvents.emplace_back(on_scree_change_event);
}
| [
"arnaud.valensi@gmail.com"
] | arnaud.valensi@gmail.com |
544e08f11e18686f50b15f67606312f176a2fe09 | 53a43fcb2e3efa442691e220f213c2dad84149e8 | /FileSetDesc.cpp | 4dbd7c03b580ad3a2e1c27aa64bbbeadca6eb13b | [] | no_license | BAKFR/UDF-Reader | 8b0aae5bc62bf6374af6afb75803aa280aaa2cae | b9eeac08530913d4fc5fca40aaae3da9f1f04b74 | refs/heads/master | 2021-01-22T19:31:41.011739 | 2013-05-20T20:25:12 | 2013-05-20T20:25:12 | 9,924,449 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 2,217 | cpp |
#include "FileSetDesc.hpp"
#include <sstream>
FileSetDesc::FileSetDesc()
: Descriptor("File Set Descriptor", 480)
{
}
void FileSetDesc::setData(uint8_t *buffer) {
record_time.setData(buffer);
buffer += 12;
inter_lvl = ((uint16_t*)buffer)[0];
max_inter_lvl = ((uint16_t*)buffer)[1];
buffer += 4;
charset_list = ((uint32_t*)buffer)[0];
max_charset_list = ((uint32_t*)buffer)[1];
fileset_nbr = ((uint32_t*)buffer)[2];
max_fileset_nbr = ((uint32_t*)buffer)[3];
buffer += 16;
lv_id_charset.setData(buffer);
buffer += 64;
lv_id.setData(buffer, 128, &lv_id_charset);
buffer += 128;
fs_charset.setData(buffer);
buffer += 64;
fs_id.setData(buffer, 32, &fs_charset);
buffer += 32;
copyright_id.setData(buffer, 32, &fs_charset);
buffer += 32;
abstract_id.setData(buffer, 32, &fs_charset);
buffer += 32;
root_dir_ICB.setData(buffer);
buffer += 16;
domain_id.setData(buffer);
buffer += 32;
next_extent.setData(buffer);
sys_stream_dir_ICB.setData(buffer + 16);
}
std::string FileSetDesc::toString() const {
std::ostringstream oss;
oss << Descriptor::toString()
<< "Recording Date and Time: " << record_time.toString() << "\n"
<< "Interchange Level: " << inter_lvl << "\n"
<< "Max Interchange Level: " << max_inter_lvl << "\n"
<< "Charset List: " << charset_list << "\n"
<< "Max Charset List: " << max_charset_list << "\n"
<< "File Set Number: " << fileset_nbr << "\n"
<< "Max File Set Number: " << max_fileset_nbr << "\n"
<< "LV ID charset: " << lv_id_charset.toString() << "\n"
<< "LV ID: " << lv_id.toString() << "\n"
<< "FileSet charset: " << fs_charset.toString() << "\n"
<< "FileSet ID: " << fs_id.toString() << "\n"
<< "Copyright ID: " << copyright_id.toString()<< "\n"
<< "Abstract ID: " << abstract_id.toString() << "\n"
<< "Root Directory ICB: " << root_dir_ICB.toString()
<< "Domain ID: " << domain_id.toString()
<< "Next extent: " << next_extent.toString()
<< "System Stream Directory ICB: " << sys_stream_dir_ICB.toString();
return oss.str();
}
const long_ad &FileSetDesc::getRootDir() const {
return root_dir_ICB;
}
const charspec &FileSetDesc::getCharset() const {
return fs_charset;
}
| [
"kevin.bernard.allies@gmail.com"
] | kevin.bernard.allies@gmail.com |
4cb4b5431fb2f6dc2ee71bdf4ca7e72392f4cf2f | 772153486feb64ef9692de1c27d6da233478cf25 | /changeaccountingminiform.cpp | cd5183ecf1ab8c432d5fe5c26d25f2e530d1827f | [] | no_license | Lelius/FileLibrary | 6115fee5b4fe72062a52d1f10f6fcdb623bf11da | ceb09bb84b772eed4f7e2dc7d015995d8d3d1206 | refs/heads/master | 2020-12-22T04:59:32.217861 | 2020-01-28T20:31:04 | 2020-01-28T20:31:04 | 194,981,603 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,208 | cpp | #include "changeaccountingminiform.h"
#include "ui_changeaccountingminiform.h"
ChangeAccountingMiniForm::ChangeAccountingMiniForm(QWidget *parent) :
QWidget(parent),
ui(new Ui::ChangeAccountingMiniForm)
{
ui->setupUi(this);
ui->dateEditDateOfEntry->setDate(QDate::currentDate());
QIntValidator *intValidator = new QIntValidator(1, 1000000, this);
ui->lineEditNotificationNumber->setValidator(intValidator);
}
ChangeAccountingMiniForm::~ChangeAccountingMiniForm()
{
delete ui;
}
void ChangeAccountingMiniForm::on_pushButtonAdd_clicked()
{
ChangeAccountingCard arg;
arg.setChange(ui->lineEditChange->text());
arg.setNotificationNumber(ui->lineEditNotificationNumber->text().toInt());
arg.setDateOfEntry(ui->dateEditDateOfEntry->date());
emit signalChangeAccountingMiniFormAdd(arg);
}
void ChangeAccountingMiniForm::on_pushButtonBack_clicked()
{
emit signalChangeAccountingMiniFormClose();
}
void ChangeAccountingMiniForm::keyPressEvent(QKeyEvent *event)
{
if (event->key() == Qt::Key_Escape)
on_pushButtonBack_clicked();
else if (event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter)
on_pushButtonAdd_clicked();
}
| [
"Lelius@example.com"
] | Lelius@example.com |
680deae01e395abdba13f9c8ca33f36350c5bad2 | 2f10f807d3307b83293a521da600c02623cdda82 | /deps/boost/win/debug/include/boost/locale/date_time_facet.hpp | d534f7ecdaaaae66606fdf7796fd7c8a85ee0e45 | [] | no_license | xpierrohk/dpt-rp1-cpp | 2ca4e377628363c3e9d41f88c8cbccc0fc2f1a1e | 643d053983fce3e6b099e2d3c9ab8387d0ea5a75 | refs/heads/master | 2021-05-23T08:19:48.823198 | 2019-07-26T17:35:28 | 2019-07-26T17:35:28 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 130 | hpp | version https://git-lfs.github.com/spec/v1
oid sha256:9e2517b7eec33e8c5669ca7b9d9d148535b0473fce87243d8d415cea39d5abc4
size 11017
| [
"YLiLarry@gmail.com"
] | YLiLarry@gmail.com |
36cabec1487c63a2c48ad076ba4e5feac5c29d52 | 380e9b88b463d718c70bee7a8458ad8535fe1a54 | /游戏组件/定制游戏/新港式五张/机器人服务/GameLogic.cpp | cbf13950bf0ec13e684eb9efdeee622d7a59f13e | [] | no_license | WesternCivilization/S-FOX-S | 2804ca67ba64cea37ace48076cad76128a65f7c5 | 422e5182b190736d07631f92e96bb606e31cc8c7 | refs/heads/master | 2021-09-04T00:57:32.251715 | 2018-01-13T17:33:06 | 2018-01-13T17:33:06 | null | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 11,296 | cpp | #include "StdAfx.h"
#include "GameLogic.h"
//////////////////////////////////////////////////////////////////////////
//扑克数据
BYTE CGameLogic::m_cbCardListData[28]=
{
0x01,0x08,0x09,0x0A,0x0B,0x0C,0x0D, //方块 A - K
0x11,0x18,0x19,0x1A,0x1B,0x1C,0x1D, //梅花 A - K
0x21,0x28,0x29,0x2A,0x2B,0x2C,0x2D, //红桃 A - K
0x31,0x38,0x39,0x3A,0x3B,0x3C,0x3D, //黑桃 A - K
};
//////////////////////////////////////////////////////////////////////////
//构造函数
CGameLogic::CGameLogic()
{
}
//析构函数
CGameLogic::~CGameLogic()
{
}
//获取类型
BYTE CGameLogic::GetCardGenre(BYTE cbCardData[], BYTE cbCardCount)
{
BYTE cbCardTemp[MAX_COUNT];
ZeroMemory(cbCardTemp, sizeof(cbCardTemp));
CopyMemory(cbCardTemp,cbCardData, cbCardCount * sizeof(BYTE));
SortCardList(cbCardTemp,cbCardCount);
//简单牌形
switch (cbCardCount)
{
case 1: //单牌
{
return CT_SINGLE;
}
case 2: //对牌
{
return (GetCardLogicValue(cbCardData[0])==GetCardLogicValue(cbCardData[1]))?CT_ONE_DOUBLE:CT_SINGLE;
}
}
//五条类型
if (cbCardCount>=MAX_COUNT)
{
//变量定义
bool cbSameColor=true,bLineCard=true;
BYTE cbFirstColor=GetCardColor(cbCardTemp[0]);
BYTE cbFirstValue=GetCardLogicValue(cbCardTemp[0]);
//牌形分析
for (BYTE i=1;i<cbCardCount;i++)
{
//数据分析
if (GetCardColor(cbCardTemp[i])!=cbFirstColor) cbSameColor=false;
if (cbFirstValue!=(GetCardLogicValue(cbCardTemp[i])+i)) bLineCard=false;
//结束判断
if ((cbSameColor==false)&&(bLineCard==false)) break;
}
//顺子类型
if ((cbSameColor==false)&&(bLineCard==true)) return CT_SHUN_ZI;
//同花类型
if ((cbSameColor==true)&&(bLineCard==false)) return CT_TONG_HUA;
//同花顺类型
if ((cbSameColor==true)&&(bLineCard==true)) return CT_TONG_HUA_SHUN;
}
//扑克分析
tagAnalyseResult AnalyseResult;
AnalysebCardData(cbCardTemp,cbCardCount,AnalyseResult);
//四条类型
if (AnalyseResult.cbFourCount==1) return CT_TIE_ZHI;
//两对类型
if (AnalyseResult.cbDoubleCount==2) return CT_TWO_DOUBLE;
//对牌类型
if ((AnalyseResult.cbDoubleCount==1)&&(AnalyseResult.cbThreeCount==0)) return CT_ONE_DOUBLE;
//葫芦类型
if (AnalyseResult.cbThreeCount==1) return (AnalyseResult.cbDoubleCount==1)?CT_HU_LU:CT_THREE_TIAO;
return CT_SINGLE;
}
//排列扑克
VOID CGameLogic::SortCardList(BYTE cbCardData[], BYTE cbCardCount)
{
//转换数值
BYTE cbLogicValue[MAX_COUNT];
for (BYTE i=0;i<cbCardCount;i++) cbLogicValue[i]=GetCardLogicValue(cbCardData[i]);
//排序操作
bool bSorted=true;
BYTE cbTempData,bLast=cbCardCount-1;
do
{
bSorted=true;
for (BYTE i=0;i<bLast;i++)
{
if ((cbLogicValue[i]<cbLogicValue[i+1])||
((cbLogicValue[i]==cbLogicValue[i+1])&&(cbCardData[i]<cbCardData[i+1])))
{
//交换位置
cbTempData=cbCardData[i];
cbCardData[i]=cbCardData[i+1];
cbCardData[i+1]=cbTempData;
cbTempData=cbLogicValue[i];
cbLogicValue[i]=cbLogicValue[i+1];
cbLogicValue[i+1]=cbTempData;
bSorted=false;
}
}
bLast--;
} while(bSorted==false);
return;
}
//混乱扑克
VOID CGameLogic::RandCardList(BYTE cbCardBuffer[], BYTE cbBufferCount)
{
//混乱准备
BYTE cbCardData[CountArray(m_cbCardListData)];
CopyMemory(cbCardData,m_cbCardListData,sizeof(m_cbCardListData));
//混乱扑克
BYTE cbRandCount=0,cbPosition=0;
do
{
cbPosition=rand()%(CountArray(cbCardData)-cbRandCount);
cbCardBuffer[cbRandCount++]=cbCardData[cbPosition];
cbCardData[cbPosition]=cbCardData[CountArray(cbCardData)-cbRandCount];
} while (cbRandCount<cbBufferCount);
return;
}
//逻辑数值
BYTE CGameLogic::GetCardLogicValue(BYTE cbCardData)
{
//转换数值
BYTE cbCardValue=GetCardValue(cbCardData);
BYTE cbLogicValue=(cbCardValue<=2)?(cbCardValue+13):cbCardValue;
return cbLogicValue;
}
//对比扑克
bool CGameLogic::CompareCard(BYTE cbFirstCardData[], BYTE cbNextCardData[], BYTE cbCardCount)
{
//获取类型
BYTE cbNextGenre=GetCardGenre(cbNextCardData,cbCardCount);
BYTE cbFirstGenre=GetCardGenre(cbFirstCardData,cbCardCount);
//类型判断
if (cbFirstGenre!=cbNextGenre) return (cbFirstGenre>cbNextGenre);
//类型对比
switch(cbFirstGenre)
{
case CT_SINGLE: //单牌
{
SortCardList(cbNextCardData,cbCardCount);
SortCardList(cbFirstCardData,cbCardCount);
BYTE cbNextValue=GetCardLogicValue(cbNextCardData[0]);
BYTE cbFirstValue=GetCardLogicValue(cbFirstCardData[0]);
BYTE cbNextColor=GetCardColor(cbNextCardData[0]);
BYTE cbFirstColor=GetCardColor(cbFirstCardData[0]);
if (cbNextValue != cbFirstValue)
{
return cbFirstValue>cbNextValue;
}
return cbFirstColor > cbNextColor;
}
case CT_HU_LU: //葫芦
case CT_TIE_ZHI: //铁支
case CT_ONE_DOUBLE: //对子
case CT_TWO_DOUBLE: //两对
case CT_THREE_TIAO: //三条
{
//分析扑克
tagAnalyseResult AnalyseResultNext;
tagAnalyseResult AnalyseResultFirst;
AnalysebCardData(cbNextCardData,cbCardCount,AnalyseResultNext);
AnalysebCardData(cbFirstCardData,cbCardCount,AnalyseResultFirst);
//四条数值
if (AnalyseResultFirst.cbFourCount>0)
{
BYTE cbNextValue=AnalyseResultNext.cbFourLogicVolue[0];
BYTE cbFirstValue=AnalyseResultFirst.cbFourLogicVolue[0];
return cbFirstValue>cbNextValue;
}
//三条数值
if (AnalyseResultFirst.cbThreeCount>0)
{
BYTE cbNextValue=AnalyseResultNext.cbThreeLogicVolue[0];
BYTE cbFirstValue=AnalyseResultFirst.cbThreeLogicVolue[0];
return cbFirstValue>cbNextValue;
}
//两对
if (cbFirstGenre == CT_TWO_DOUBLE)
{
ASSERT(AnalyseResultFirst.cbDoubleCount == 2);
//先比较大对子和小对子的逻辑值
for (BYTE i=0; i<AnalyseResultFirst.cbDoubleCount; i++)
{
SortCardList(AnalyseResultNext.cbDoubleLogicVolue, AnalyseResultNext.cbDoubleCount);
SortCardList(AnalyseResultFirst.cbDoubleLogicVolue, AnalyseResultFirst.cbDoubleCount);
BYTE cbNextValue = AnalyseResultNext.cbDoubleLogicVolue[i];
BYTE cbFirstValue = AnalyseResultFirst.cbDoubleLogicVolue[i];
if (cbFirstValue != cbNextValue)
{
return cbFirstValue > cbNextValue;
}
}
//对子花色
if (AnalyseResultFirst.cbDoubleCount > 0)
{
SortCardList(AnalyseResultNext.cbDoubleCardData, AnalyseResultNext.cbDoubleCount);
SortCardList(AnalyseResultFirst.cbDoubleCardData, AnalyseResultFirst.cbDoubleCount);
BYTE cbNextColor = GetCardColor(AnalyseResultNext.cbDoubleCardData[0]);
BYTE cbFirstColor = GetCardColor(AnalyseResultFirst.cbDoubleCardData[0]);
return cbFirstColor>cbNextColor;
}
}
//一对
if (cbFirstGenre == CT_ONE_DOUBLE)
{
ASSERT(AnalyseResultFirst.cbDoubleCount == 1);
//先比较对子的逻辑值
for (BYTE i=0; i<AnalyseResultFirst.cbDoubleCount; i++)
{
SortCardList(AnalyseResultNext.cbDoubleLogicVolue, AnalyseResultNext.cbDoubleCount);
SortCardList(AnalyseResultFirst.cbDoubleLogicVolue, AnalyseResultFirst.cbDoubleCount);
BYTE cbNextValue = AnalyseResultNext.cbDoubleLogicVolue[i];
BYTE cbFirstValue = AnalyseResultFirst.cbDoubleLogicVolue[i];
if (cbFirstValue != cbNextValue)
{
return cbFirstValue > cbNextValue;
}
}
//对子花色
if (AnalyseResultFirst.cbDoubleCount > 0)
{
SortCardList(AnalyseResultNext.cbDoubleCardData, AnalyseResultNext.cbDoubleCount);
SortCardList(AnalyseResultFirst.cbDoubleCardData, AnalyseResultFirst.cbDoubleCount);
BYTE cbNextColor = GetCardColor(AnalyseResultNext.cbDoubleCardData[0]);
BYTE cbFirstColor = GetCardColor(AnalyseResultFirst.cbDoubleCardData[0]);
return cbFirstColor > cbNextColor;
}
}
break;
}
case CT_SHUN_ZI: //顺子
case CT_TONG_HUA: //同花
case CT_TONG_HUA_SHUN: //同花顺
{
//数值判断
BYTE cbNextValue=GetCardLogicValue(cbNextCardData[0]);
BYTE cbFirstValue=GetCardLogicValue(cbFirstCardData[0]);
if (cbFirstValue!=cbNextValue) return (cbFirstValue>cbNextValue);
//花色判断
BYTE cbNextColor=GetCardColor(cbNextCardData[0]);
BYTE cbFirstColor=GetCardColor(cbFirstCardData[0]);
return (cbFirstColor>cbNextColor);
}
}
//错误断言
ASSERT(FALSE);
return false;
}
//分析扑克
VOID CGameLogic::AnalysebCardData(const BYTE cbCardData[], BYTE cbCardCount, tagAnalyseResult & AnalyseResult)
{
//设置结果
ZeroMemory(&AnalyseResult,sizeof(AnalyseResult));
//扑克分析
for (BYTE i=0;i<cbCardCount;i++)
{
//变量定义
BYTE cbSameCount=1;
BYTE cbSameCardData[4]={cbCardData[i],0,0,0};
BYTE cbLogicValue=GetCardLogicValue(cbCardData[i]);
//获取同牌
for (int j=i+1;j<cbCardCount;j++)
{
//逻辑对比
if (GetCardLogicValue(cbCardData[j])!=cbLogicValue) break;
//设置扑克
cbSameCardData[cbSameCount++]=cbCardData[j];
}
//保存结果
switch (cbSameCount)
{
case 1: //单张
{
AnalyseResult.cbSignedLogicVolue[AnalyseResult.cbSignedCount]=cbLogicValue;
CopyMemory(&AnalyseResult.cbSignedCardData[(AnalyseResult.cbSignedCount++)*cbSameCount],cbSameCardData,cbSameCount);
break;
}
case 2: //两张
{
AnalyseResult.cbDoubleLogicVolue[AnalyseResult.cbDoubleCount]=cbLogicValue;
CopyMemory(&AnalyseResult.cbDoubleCardData[(AnalyseResult.cbDoubleCount++)*cbSameCount],cbSameCardData,cbSameCount);
break;
}
case 3: //三张
{
AnalyseResult.cbThreeLogicVolue[AnalyseResult.cbThreeCount]=cbLogicValue;
CopyMemory(&AnalyseResult.cbThreeCardData[(AnalyseResult.cbThreeCount++)*cbSameCount],cbSameCardData,cbSameCount);
break;
}
case 4: //四张
{
AnalyseResult.cbFourLogicVolue[AnalyseResult.cbFourCount]=cbLogicValue;
CopyMemory(&AnalyseResult.cbFourCardData[(AnalyseResult.cbFourCount++)*cbSameCount],cbSameCardData,cbSameCount);
break;
}
}
//设置递增
i+=cbSameCount-1;
}
return;
}
//随机区域
int CGameLogic::RandomArea( int nLen, ... )
{
ASSERT( nLen > 0 );
if ( nLen <= 0 )
return 0;
va_list argptr;
va_start(argptr, nLen);
CWHArray<int> Array;
for ( BYTE i = 0; i < nLen; ++i )
{
int nTemp = va_arg( argptr, int );
if( nTemp >= 0 && nTemp < 100000 )
{
Array.Add(nTemp);
}
else
{
ASSERT(FALSE);
break;
}
}
va_end(argptr);
int nIndex = 0;
int nACTotal = 0;
for (int i = 0; i < Array.GetCount(); i++)
nACTotal += Array[i];
ASSERT( nACTotal > 0 );
if ( nACTotal > 0 )
{
static int nSt = 0;
nSt++;
int nRandNum = (rand() + GetTickCount() + nSt ) % nACTotal;
for (int i = 0; i < Array.GetCount(); i++)
{
nRandNum -= Array[i];
if (nRandNum < 0)
{
nIndex = i;
break;
}
}
}
else
{
nIndex = rand()%nLen;
}
ASSERT( nIndex < nLen );
Array.RemoveAll();
return nIndex;
}
//////////////////////////////////////////////////////////////////////////
| [
"735908933@qq.com"
] | 735908933@qq.com |
88b17c75c14e1266f1977a99113187bf7765b378 | eec2dbab8e275f8195cb49676b7766c328e5d4b9 | /Labs/lab-09-iterator-pattern-funlab-master/div.hpp | 72956a6624b873e5399e2613119849c65048feb8 | [] | no_license | kevint1221/CS100 | 84c3625116feabaa3939c844b2fd7b59348c1dba | 1b2c1fed4426cbf699d446122a708cdd91172b84 | refs/heads/master | 2020-06-25T09:36:07.551450 | 2019-07-28T10:49:18 | 2019-07-28T10:49:18 | 199,273,803 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 756 | hpp | #ifndef DIV_H
#define DIV_H
#include "base.hpp"
#include <iostream>
#include <string>
#include "binaryIterator.hpp"
using namespace std;
class Div:public Base {
public:
Div(Base* x, Base* y) {
this->x = x;
this->y = y;
}
double evaluate();
string stringify();
Base* get_left(){ return x; }
Base* get_right(){ return y; }
Iterator* create_iterator(){
return new BinaryIterator(this);
}
private:
Base* x;
Base* y;
};
double Div::evaluate() {
if (y == 0) {
cout << "Cannot divide by zero" << endl;
return 0;
}
return x->evaluate() / y->evaluate();
}
string Div::stringify() {
return x->stringify() + " / " + y->stringify();
}
#endif
| [
"32470783+kevint1221@users.noreply.github.com"
] | 32470783+kevint1221@users.noreply.github.com |
caa57162d2ddb2694cb4ad60df9f33c2fc4fef72 | 5a285f70436073e5d6fc1d195bd1258dc8ae098b | /src/models/MapLineEntry.cpp | 19b5f34460648a5d40d910b2088b29c91a0e9de8 | [
"MIT"
] | permissive | JARVIS-AI/mario | 8054b58cedebffb137d126d9c438f386b018c97b | 12977d09e417ebe9b041d89564166808705f7cba | refs/heads/master | 2021-01-13T03:39:03.732928 | 2014-10-13T20:45:58 | 2014-10-13T20:45:58 | 77,270,508 | 0 | 0 | MIT | 2018-10-28T17:41:28 | 2016-12-24T06:54:25 | C++ | UTF-8 | C++ | false | false | 773 | cpp | #include "MapLineEntry.h"
#include <vector>
#include "../helpers/Logger.h"
const std::string VALUE_DELIMITER = ";";
MapLineEntry::MapLineEntry(std::string line)
{
m_values = extractValues(line);
m_type = m_values.at(0);
m_values.pop_front();
}
std::string MapLineEntry::getType()
{
return m_type;
}
std::deque<std::string> MapLineEntry::getValues()
{
return m_values;
}
std::deque<std::string> MapLineEntry::extractValues(std::string line)
{
std::deque<std::string> result;
size_t pos = 0;
while ((pos = line.find(VALUE_DELIMITER)) != std::string::npos)
{
result.push_back(line.substr(0, pos));
line.erase(0, pos + VALUE_DELIMITER.length());
}
if (line.length() > 0)
{
result.push_back(line);
}
return result;
} | [
"daniel.hultqvist@omegapoint.se"
] | daniel.hultqvist@omegapoint.se |
b262891e89b00150649594cba69a0ef1392633ba | 218ca225121b8e8efc46fc2ba92e8656a492a739 | /src/lib/fixed_matrix_utility.h | 3af1e992849730220969fe01f75d8e2fb8524307 | [] | no_license | korzen/rod | 603262df831cc856edc3c50eff05961ee464f753 | 0ca0d29d259eff86b26cf03e785a7a5acdfb77b7 | refs/heads/master | 2021-01-20T04:08:10.571684 | 2015-02-24T15:16:12 | 2015-02-24T15:16:12 | 33,238,375 | 0 | 1 | null | 2015-04-01T09:22:59 | 2015-04-01T09:22:59 | null | UTF-8 | C++ | false | false | 12,411 | h | #ifndef FIXED_MATRIX_UTILITY_H_
#define FIXED_MATRIX_UTILITY_H_
#include "macro_constant.h"
#include "utility_function.h"
#include "fixed_vector_utility.h"
namespace dj
{
template <class T, int row_num, int col_num, class T1, class T2>
inline void Transpose(const T1* matrix_in, T2* transpose_out)
{
if ((void*) matrix_in != (void*) transpose_out) {
T (*matrix)[col_num] = (T (*)[col_num]) matrix_in;
T (*transpose)[row_num] = (T (*)[row_num]) transpose_out;
for (int row = 0; row < row_num; ++row) {
for (int col = 0; col < col_num; ++col) {
transpose[row][col] = matrix[col][row];
}
}
}
}
template <class T, int row_num, int col_num, class T1>
inline void Transpose(const T1* matrix)
{
static_assert(row_num == col_num, "row num is not equal to col_num in Transpose()");
T (*real_matrix)[col_num] = (T (*)[col_num]) matrix;
for (int row = 0; row < row_num; ++row) {
for (int col = row + 1; col < col_num; ++col) {
T tmp = real_matrix[row][col];
real_matrix[row][col] = real_matrix[col][row];
real_matrix[col][row] = tmp;
}
}
}
template <class T, class T1>
inline void Transpose3x3(T1* matrix)
{
T (*real_matrix)[3] = (T (*)[3]) matrix;
Swap(real_matrix[0][1], real_matrix[1][0]);
Swap(real_matrix[0][2], real_matrix[2][0]);
Swap(real_matrix[1][2], real_matrix[2][1]);
}
template <class T>
inline T Determinant2(T* matrix)
{
return matrix[0] * matrix[3] - matrix[1] * matrix[2];
}
template <class T>
inline void InverseMatrix2(T* matrix, T* inverse_matrix)
{
T inv_det = T(1.0) / Determinant2<T>(matrix);
inverse_matrix[0] = matrix[3] * inv_det;
inverse_matrix[1] = matrix[1] * -inv_det;
inverse_matrix[2] = matrix[2] * -inv_det;
inverse_matrix[3] = matrix[0] * inv_det;
}
template <class T>
inline void MulVecMatrix3x3(const T* vec, const T (*matrix)[3], T* result)
{
result[0] = matrix[0][0] * vec[0] + matrix[1][0] * vec[1] + matrix[2][0] * vec[2];
result[1] = matrix[0][1] * vec[0] + matrix[1][1] * vec[1] + matrix[2][1] * vec[2];
result[2] = matrix[0][2] * vec[0] + matrix[1][2] * vec[1] + matrix[2][2] * vec[2];
}
template <class T>
inline void MulMatrix3x3Vec(const T (*matrix)[3], const T* vec, T* result)
{
result[0] = matrix[0][0] * vec[0] + matrix[0][1] * vec[1] + matrix[0][2] * vec[2];
result[1] = matrix[1][0] * vec[0] + matrix[1][1] * vec[1] + matrix[1][2] * vec[2];
result[2] = matrix[2][0] * vec[0] + matrix[2][1] * vec[1] + matrix[2][2] * vec[2];
}
// result = left^T * right
template <class T, class T1, class T2, class T3>
inline void MulMatrixLeftTransposed3x3(const T1* left, const T2* right, T3* result)
{
T (*a)[3] = (T (*)[3]) left;
T (*b)[3] = (T (*)[3]) right;
T (*real_result)[3] = (T (*)[3]) result;
for (int row = 0; row < 3; ++row) {
for (int col = 0; col < 3; ++col) {
real_result[row][col] = a[0][row] * b[0][col] + a[1][row] * b[1][col] + a[2][row] * b[2][col];
}
}
}
// result = left * right^T
template <class T, class T1, class T2, class T3>
inline void MulMatrixRightTransposed3x3(const T1* left, const T2* right, T3* result)
{
T (*a)[3] = (T (*)[3]) left;
T (*b)[3] = (T (*)[3]) right;
T (*real_result)[3] = (T (*)[3]) result;
for (int row = 0; row < 3; ++row) {
for (int col = 0; col < 3; ++col) {
real_result[row][col] = a[row][0] * b[col][0] + a[row][1] * b[col][1] + a[row][2] * b[col][2];
}
}
}
template <class T, class T1, class T2, class T3>
inline void MulMatrix3x3(const T1* left, const T2* right, T3* result)
{
T (*a)[3] = (T (*)[3]) left;
T (*b)[3] = (T (*)[3]) right;
T (*real_result)[3] = (T (*)[3]) result;
int row = 0, col = 0;
real_result[row][col] = a[row][0] * b[0][col] + a[row][1] * b[1][col] + a[row][2] * b[2][col];
row = 0, col = 1;
real_result[row][col] = a[row][0] * b[0][col] + a[row][1] * b[1][col] + a[row][2] * b[2][col];
row = 0, col = 2;
real_result[row][col] = a[row][0] * b[0][col] + a[row][1] * b[1][col] + a[row][2] * b[2][col];
row = 1, col = 0;
real_result[row][col] = a[row][0] * b[0][col] + a[row][1] * b[1][col] + a[row][2] * b[2][col];
row = 1, col = 1;
real_result[row][col] = a[row][0] * b[0][col] + a[row][1] * b[1][col] + a[row][2] * b[2][col];
row = 1, col = 2;
real_result[row][col] = a[row][0] * b[0][col] + a[row][1] * b[1][col] + a[row][2] * b[2][col];
row = 2, col = 0;
real_result[row][col] = a[row][0] * b[0][col] + a[row][1] * b[1][col] + a[row][2] * b[2][col];
row = 2, col = 1;
real_result[row][col] = a[row][0] * b[0][col] + a[row][1] * b[1][col] + a[row][2] * b[2][col];
row = 2, col = 2;
real_result[row][col] = a[row][0] * b[0][col] + a[row][1] * b[1][col] + a[row][2] * b[2][col];
}
template <class T, int row_num1, int col_num1, int col_num2, class T1, class T2, class T3>
inline void MulMatrix(T1* m1, T2* m2, T3* result)
{
T (*matrix1)[col_num1] = (T (*)[col_num1]) m1;
T (*matrix2)[col_num2] = (T (*)[col_num2]) m2;
T (*result_matrix)[col_num2] = (T (*)[col_num2]) result;
for (int row = 0; row < row_num1; ++row) {
for (int col = 0; col < col_num2; ++col) {
result_matrix[row][col] = 0;
for (int i = 0; i < col_num1; ++i) {
result_matrix[row][col] += matrix1[row][i] * matrix2[i][col];
}
}
}
}
template <class T, int row_num, class T1, class T2, class T3>
inline void MulSquareMatrix(T1* m1, T2* m2, T3* result)
{
MulMatrix<T, row_num, row_num, row_num>(m1, m2, result);
}
template <class T, int row_num, int col_num, class T1>
inline void MulMatrixVec(T1* m, const T* vec, T* result)
{
T (*matrix)[col_num] = (T (*)[col_num]) m;
for (int row = 0; row < row_num; ++row) {
result[row] = 0;
for (int col = 0; col < col_num; ++col) {
result[row] += matrix[row][col] * vec[col];
}
}
}
template <class T, int row_num, int col_num, class T1, class T2, class T3>
inline void AddMatrix(T1* m1, T2* m2, T3* result)
{
const int size = row_num * col_num;
T* array1 = (T*) m1;
T* array2 = (T*) m2;
T* result_array = (T*) result;
for (int i = 0; i < size; ++i) {
result_array[i] = m1[i] + m2[i];
}
}
template <class T, int row_num, int col_num, class T1, class T2, class T3>
inline void SubMatrix(T1* m1, T2* m2, T3* result)
{
const int size = row_num * col_num;
T* array1 = (T*) m1;
T* array2 = (T*) m2;
T* result_array = (T*) result;
for (int i = 0; i < size; ++i) {
result_array[i] = m1[i] - m2[i];
}
}
template <class T>
inline T OneNorm(const T* A)
{
T norm = T(0);
for (int i = 0; i < 3; i++) {
T columnAbsSum = Abs(A[i + 0]) + Abs(A[i + 3]) + Abs(A[i + 6]);
if (columnAbsSum > norm)
norm = columnAbsSum;
}
return norm;
}
template <class T>
inline T InfNorm(const T* A)
{
T norm = 0.0;
for (int i = 0; i < 3; i++) {
T rowSum = Abs(A[3 * i + 0]) + Abs(A[3 * i + 1]) + Abs(A[3 * i + 2]);
if (rowSum > norm)
norm = rowSum;
}
return norm;
}
template <class T>
inline T PolarDecompose(const T* M, T * Q, T * S, T tolerance)
{
T Mk[9];
T Ek[9];
T det, M_oneNorm, M_infNorm, E_oneNorm;
// Mk = M^T
for (int i = 0; i < 3; i++)
for (int j = 0; j < 3; j++)
Mk[3 * i + j] = M[3 * j + i];
M_oneNorm = OneNorm(Mk);
M_infNorm = InfNorm(Mk);
do {
T MadjTk[9];
// row 2 x row 3
Cross3(&(Mk[3]), &(Mk[6]), &(MadjTk[0]));
// row 3 x row 1
Cross3(&(Mk[6]), &(Mk[0]), &(MadjTk[3]));
// row 1 x row 2
Cross3(&(Mk[0]), &(Mk[3]), &(MadjTk[6]));
det = Mk[0] * MadjTk[0] + Mk[1] * MadjTk[1] + Mk[2] * MadjTk[2];
if (det > T(-1.0e-6) && det < T(1.0e-6)) {
return det;
}
T MadjT_one = OneNorm(MadjTk);
T MadjT_inf = InfNorm(MadjTk);
T gamma = sqrt(sqrt((MadjT_one * MadjT_inf) / (M_oneNorm * M_infNorm)) / Abs(det));
T g1 = gamma * T(0.5);
T g2 = T(0.5) / (gamma * det);
for (int i = 0; i < 9; i++) {
Ek[i] = Mk[i];
Mk[i] = g1 * Mk[i] + g2 * MadjTk[i];
Ek[i] -= Mk[i];
}
E_oneNorm = OneNorm(Ek);
M_oneNorm = OneNorm(Mk);
M_infNorm = InfNorm(Mk);
} while ( E_oneNorm > M_oneNorm * tolerance );
// Q = Mk^T
for (int i = 0; i < 3; i++)
for (int j = 0; j < 3; j++)
Q[3 * i + j] = Mk[3 * j + i];
for (int i = 0; i < 3; i++)
for (int j = 0; j < 3; j++) {
S[3 * i + j] = 0;
for (int k = 0; k < 3; k++)
S[3 * i + j] += Mk[3 * i + k] * M[3 * k + j];
}
// S must be symmetric; enforce the symmetry
for (int i = 0; i < 3; i++)
for (int j = i; j < 3; j++)
S[3 * i + j] = S[3 * j + i] = T(0.5) * (S[3 * i + j] + S[3 * j + i]);
return (det);
}
template <class T, int row, int col>
struct FixedMatOp {
static const int kSize = row * col;
template <class T1>
inline static void MulElement(const T* m1, const T1& mul, typename MulType<T, T1>::Type* result)
{
typedef typename MulType<T, T1>::Type ResultType;
const T (*x)[col] = (T (*)[col]) m1;
ResultType (*z)[col] = (ResultType (*)[col]) result;
for (int i = 0; i < row; ++i) {
for (int j = 0; j < col; ++j) {
z[i][j] = mul * x[i][j];
}
}
}
template <class T1, int col2>
inline static void Mul(const T* m1, const T1* m2, typename MulType<T, T1>::Type* result)
{
typedef typename MulType<T, T1>::Type ResultType;
const T (*x)[col] = (T (*)[col]) m1;
const T1 (*y)[col2] = (T1 (*)[col2]) m2;
ResultType (*z)[col2] = (ResultType (*)[col2]) result;
for (int i = 0; i < row; ++i) {
for (int j = 0; j < col2; ++j) {
z[i][j] = ResultType();
for (int k = 0; k < col; ++k) {
z[i][j] += x[i][k] * y[k][j];
}
}
}
}
template <class T1>
inline static void MulLeft(const T1* vec, const T* m, typename MulType<T, T1>::Type* result)
{
typedef typename MulType<T, T1>::Type ResultType;
const T (*x)[col] = (T (*)[col]) m;
for (int k = 0; k < col; ++k) {
result[k] = ResultType();
for (int i = 0; i < row; ++i) {
result[k] += vec[i] * x[i][k];
}
}
}
template <class T1>
inline static void Mul(const T* m1, const T1* vec, typename MulType<T, T1>::Type* result)
{
typedef typename MulType<T, T1>::Type ResultType;
const T (*x)[col] = (T (*)[col]) m1;
for (int i = 0; i < row; ++i) {
result[i] = ResultType();
for (int k = 0; k < col; ++k) {
result[i] += x[i][k] * vec[k];
}
}
}
inline static void Plus(const T* m1, const T* m2, const T* result)
{
for (int i = 0; i < kSize; ++i) {
result[i] = m1[i] + m2[i];
}
}
inline static void Minus(const T* m1, const T* m2, const T* result)
{
for (int i = 0; i < kSize; ++i) {
result[i] = m1[i] - m2[i];
}
}
inline static bool Equal(const T* x1, const T* x2)
{
for (int i = 0; i < kSize; ++i) {
if (x1[i] != x2[i]) return false;
}
return true;
}
inline static void Copy(const T* from, T* to)
{
for (int i = 0; i < kSize; ++i) {
to[i] = from[i];
}
}
inline static void Scale(T* src, T scale, T* dest)
{
for (int i = 0; i < kSize; ++i) {
dest[i] = scale * src[i];
}
}
inline static void Minus(const T* x, const T* y, T* result)
{
for (int i = 0; i < kSize; ++i) {
result[i] = x[i] - y[i];
}
}
inline static void Plus(const T* x, const T* y, T* result)
{
for (int i = 0; i < kSize; ++i) {
result[i] = x[i] + y[i];
}
}
inline static void Fill(T* x, const T value)
{
for (int i = 0; i < kSize; ++i) {
x[i] = value;
}
}
inline static T MinAbs(const T* x)
{
T min = std::numeric_limits<T>::max();
for (int i = 0; i < kSize; i++) {
T abs = dj::Abs(x[i]);
if (min > abs) {
min = abs;
}
}
return min;
}
inline static T MaxAbs(const T* x)
{
T max = T(EPSILON);
for (int i = 0; i < kSize; i++) {
T abs = dj::Abs(x[i]);
if (max < abs) {
max = abs;
}
}
return max;
}
inline static T Min(const T* x)
{
T min = std::numeric_limits<T>::max();
for (int i = 0; i < kSize; i++) {
if (min > x[i]) {
min = x[i];
}
}
return min;
}
inline static T Max(const T* x)
{
T max = std::numeric_limits<T>::min();
for (int i = 0; i < kSize; i++) {
if (max < x[i]) {
max = x[i];
}
}
return max;
}
};
} // namespace
#endif // FIXED_MATRIX_UTILITY_H_
| [
"djangowu@gmail.com"
] | djangowu@gmail.com |
8f84db2b2c5e48f3c014e6516d0a32c5777abf55 | 925dd4c1849f12c656800c7476c263cd6b1209f8 | /H6X.ino | b48208a8f844aa91cd5b93c9559a1adf08c1bd96 | [] | no_license | swipswaps/H6X | 0052af7b8e23210bfa1002fadd124dea8581eb5a | f45b2cf93262bda712bd6e931ee6c73209b3d41e | refs/heads/main | 2023-02-23T12:14:44.894826 | 2021-01-26T19:55:28 | 2021-01-26T19:55:28 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 16,748 | ino |
/*=============================================================================================================================================================//
HEX Station (Health Environment Device)
by Emanuel Bender
"
within me there are
forests without trees,
cities without people and
oceans without water.
what am i?
"
Credits:
TFT_eSPI Bodmer
CCS811 - 0x5A - Marshall Taylor, Nathan Seidle https://github.com/sparkfun/CCS811_Air_Quality_Breakout
VEML6075 - - Jonathan Dempsey https://github.com/WifWaf/VEML6075
MAX30102 - -
// Active:
// Beeper | Bootup counter Current Sensor
// CJMCU8128 | MAX30102
// Error Detection [Wifi, CCS811] - WiFi and Current pin not working at the same time or under 4.2v rn
//
=============================================================================================================================================================//
*/
#define Revision " v7"
#include <WiFi.h>
#include <Preferences.h>
#include <SPI.h>
#include <Wire.h>
#include <Credentials.h>
#include <ESP32Servo.h> // Beeps
#include <SparkFunCCS811.h> // CJMCU-8128 - CCS811 [from Banggood with all 3 sensors]
#include <SparkFunBME280.h> // BME280
#include <ClosedCube_HDC1080.h> // HDC1080
#include <TFT_eSPI.h>
TFT_eSPI tft = TFT_eSPI(); // Invoke custom library
// #include "hex.h" //tft.pushImage(0, 0, 240, 240, Hex_Blur_240x240); // put where image should be loaded
#include "MAX30105.h" // sparkfun MAX3010X library
#include "heartRate.h"
MAX30105 particleSensor;
#include "time.h"
const int VT_PIN = 35;
const int AT_PIN = 34;
const int beep = 13;
//#define LED 2
int i = 0;// ======= HR + SpO2 Settings =======
int Num = 30; // calculate SpO2 by this sampling interval
const byte RATE_SIZE = 5; // Increase this for more HR averaging. 4 is good.
byte rates[RATE_SIZE];
byte rateSpot = 0;
long lastBeat = 0;
float beatsPerMinute;
int beatAvg;
double ESpO2 = 90.0; //initial value of estimated SpO2
double FSpO2 = 0.7; //filter factor for estimated SpO2
double frate = 0.94; // 0.95 low pass filter for IR/red LED value to eliminate AC component
double avered = 0;
double aveir = 0;
double sumirrms = 0;
double sumredrms = 0;
const int tPIN1 = 4; // capacitive touch button/pin
int buttonState = 0; // current state of the button
int lastButtonState = 0;
int touchTH = 21; // touch button/pin threshold !!! wire 10k ohm Pull-Down resistor to GND
CCS811 myCCS811(CCS811_ADDR); // CCS811 Settings
ClosedCube_HDC1080 myHDC1080;
BME280 myBME280;
WiFiServer server(80);
Preferences preferences;
const char* ssid = mySSID; // WIFI
const char* password = myPassword;
unsigned long previousTime = 0; // timeout wifi
const long timeoutTime = 15000; // 20000
const char* ntpServer = "pool.ntp.org";
const long gmtOffset_sec = 3600;
const int daylightOffset_sec = 3600;
String header;
const int CO2TH = 1500; // Sensor Thresholds
const int VOCTH = 240;
char pressure_value[4];
int avgS = 15; // Voltage & Current Sensing Samples
int Calarm = 1; // Current Alarm Threshold
const int low = (2000, 250); // Beeper (freq, duration)
const int high = (4000, 350);
const int tick = (3000, 6);
void sensorXY() // ====== Voids ======
{
tft.setCursor(6, 24);
tft.setTextSize(2);
}
void errXY()
{
tft.setCursor(90, 24);
tft.setTextSize(2);
}
void printLocalTime()
{
struct tm timeinfo;
if (!getLocalTime(&timeinfo)) {
tft.setCursor(150, 0); // Print Time
tft.setTextColor(TFT_RED, TFT_BLACK);
tft.setTextSize(2);
tft.println("Time Err");
return;
}
tft.setCursor(144, 0); // Print Time
tft.setTextColor(TFT_MIDDLEGREY, TFT_BLACK);
tft.setTextSize(2);
tft.println(&timeinfo, "%H:%M:%S");
}
void staticGFX() {
tft.drawRoundRect(0, 19, 240, 24, 4, TFT_MIDDLEGREY); // GFX Static Elements Main Page
tft.drawRoundRect(0, 198, 240, 24, 4, TFT_MIDDLEGREY);
tft.drawLine(60, 220, 60, 198, TFT_MIDDLEGREY);
tft.drawLine(120, 220, 120, 198, TFT_MIDDLEGREY);
tft.drawLine(180, 220, 180, 198, TFT_MIDDLEGREY);
tft.fillRoundRect(0, 48, 75, 30, 3, TFT_DARKGREY); // Box #1
tft.drawRoundRect(0, 48, 75, 70, 3, TFT_MIDDLEGREY);
tft.drawRoundRect(1, 49, 73, 68, 3, TFT_BLACK);
tft.fillRoundRect(80, 48, 80, 30, 3, TFT_DARKGREY); // Box #2
tft.drawRoundRect(80, 48, 80, 70, 3, TFT_MIDDLEGREY);
tft.drawRoundRect(81, 49, 78, 68, 3, TFT_BLACK);
tft.fillRoundRect(165, 48, 75, 30, 3, TFT_DARKGREY); // Box #3
tft.drawRoundRect(165, 48, 75, 70, 3, TFT_MIDDLEGREY);
tft.drawRoundRect(166, 49, 73, 68, 3, TFT_BLACK);
// lower UI Boxes
tft.fillRoundRect(0, 161, 75, 30, 3, TFT_DARKGREY); // Box #1
tft.drawRoundRect(0, 123, 75, 70, 3, TFT_MIDDLEGREY);
tft.drawRoundRect(1, 124, 73, 68, 3, TFT_BLACK);
tft.fillRoundRect(80, 161, 80, 30, 3, TFT_DARKGREY); // Box #2
tft.drawRoundRect(80, 123, 80, 70, 3, TFT_MIDDLEGREY);
tft.drawRoundRect(81, 124, 78, 68, 3, TFT_BLACK);
tft.fillRoundRect(165, 161, 75, 30, 3, TFT_DARKGREY); // Box #3
tft.drawRoundRect(165, 123, 75, 70, 3, TFT_MIDDLEGREY);
tft.drawRoundRect(166, 124, 73, 68, 3, TFT_BLACK);
}
void setup()//=========================================== SETUP ===========================================
{
//Serial.begin(115200);
//delay(500);
//pinMode(LED, OUTPUT ); // Output Pin Define, Setup LED High
//pinMode(BLK, OUTPUT); // screen off
//digitalWrite(LED, HIGH);
//digitalWrite(BLK, HIGH);
tft.begin(); // TFT Initialize
tft.setSwapBytes(true);
tft.setRotation(0);
tft.fillScreen(TFT_BLACK);
{
tft.setTextColor(TFT_WHITE); // Connect WiFi
tft.setCursor(0, 25);
tft.setTextSize(2);
tft.println();
tft.printf("Connecting %s ", ssid);
tft.println();
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
tft.println(" .");
delay(200);
if ((millis() / 1000) > 5)
break;
}
if (WiFi.status() == WL_CONNECTED)
{
server.begin();
tft.setTextColor(TFT_GREEN);
tft.println("CONNECTED");
delay(5);
tft.setTextColor(TFT_WHITE);
Serial.println(WiFi.localIP());
tft.println(WiFi.localIP());
configTime(gmtOffset_sec, daylightOffset_sec, ntpServer);
printLocalTime();
delay(500);
} else {
tft.setTextColor(TFT_RED);
tft.println("WiFi Failed");
//tone(beep, low);
//delay(300);
}
WiFi.disconnect(true); // disconnect WiFi
WiFi.mode(WIFI_OFF);
myBME280.settings.commInterface = I2C_MODE; // Initialize CCS811
myBME280.settings.I2CAddress = 0x76;
myBME280.settings.runMode = 3;
myBME280.settings.tStandby = 0;
myBME280.settings.filter = 4; // 3
myBME280.settings.tempOverSample = 6; // 5
myBME280.settings.pressOverSample = 8;
myBME280.settings.humidOverSample = 8;
myBME280.begin();
myHDC1080.begin(0x40);
CCS811Core::status returnCode = myCCS811.begin();
if (!particleSensor.begin(Wire, I2C_SPEED_FAST)) // Initialize MAX20103
{
Serial.println("MAX30102 not found");
particleSensor.enableDIETEMPRDY(); //Enable the temp ready interrupt. This is required.
}
//Setup to sense a nice looking saw tooth on the plotter
byte ledBrightness = 205; //Options: 0=Off to 255=50mA
byte sampleAverage = 16; //Options: 1, 2, 4, 8, 16, 32
byte ledMode = 2; //Options: 1 = IR only, 2 = Red + IR on MH-ET LIVE MAX30102 board
int sampleRate = 400; //Options: 50, 100, 200, 400, 800, 1000, 1600, 3200
int pulseWidth = 118; //Options: 69, 118, 215, 411
int adcRange = 16384; //Options: 2048, 4096, 8192, 16384
particleSensor.setup(ledBrightness, sampleAverage, ledMode, sampleRate, pulseWidth, adcRange); //Configure sensor with these settings
particleSensor.shutDown();
//particleSensor.setPulseAmplitudeRed(0x00); // LED OFF Works!
//particleSensor.setPulseAmplitudeIR(0x00);
tft.fillScreen(TFT_BLACK);
preferences.begin("my-app", false); // Bootup Counter
//preferences.clear(); // Remove all preferences under the opened namespace
//preferences.remove("counter"); // Or remove the counter key only
unsigned int counter = preferences.getUInt("counter", 0);
counter++; // Increase counter by 1
tft.setTextColor(TFT_DARKGREY);
tft.setCursor(105, 225);
tft.setTextSize(2);
tft.printf("%u\n", counter);
preferences.putUInt("counter", counter);// Store the counter to the Preferences
preferences.end(); // Close the Preferences
staticGFX(); // Print Static GFX Elements
}
} // Setup Done.
void loop()//=========================================== VOID LOOP ===========================================
{
const int minElapsed = millis() / 1000 / 60; // time elapsed since boot in min
const int temp = myHDC1080.readTemperature() / 1.225;
const int tempBME = myBME280.readTempC() / 1.225;
const int RH = myHDC1080.readHumidity();
const int CO2 = myCCS811.getCO2();
const int TVOC = myCCS811.getTVOC();
const int alt = myBME280.readFloatAltitudeMeters();
String pressure = String(myBME280.readFloatPressure() * 0.000145038 / 714); // in ATM
pressure.toCharArray(pressure_value, 4);
if (WiFi.status() == WL_CONNECTED) {
printLocalTime(); // Print Time void
} else {
tft.setCursor(140, 0); // Print Time
tft.setTextColor(TFT_RED, TFT_BLACK);
tft.setTextSize(2);
tft.println("Wifi Err");
}
int at_temp = analogRead(AT_PIN);
int vt_temp = analogRead(VT_PIN);
unsigned int x = 0; // Calculate & Print POWER
float VcsValue = 0.0, VSamples = 0.0, AvgVcs = 0.0, voltage = 0.0;
for (int x = 0; x < avgS; x++) { //Get avgS samples
VSamples = VSamples + vt_temp; //Add samples together
delay (3); // let ADC settle before next sample 3ms
}
AvgVcs = VSamples / avgS; //Taking Average of Samples
voltage = AvgVcs / 4095 * 17.8;
unsigned int y = 0;
float AcsValue = 0.0, ASamples = 0.0, AvgAcs = 0.0, current = 0.0;
for (int y = 0; y < avgS; y++) { //Get avgS samples
ASamples = ASamples + at_temp; //Add samples together
delay (3); // let ADC settle before next sample 3ms
}
AvgAcs = ASamples / avgS; //Taking Average of Samples
current = AvgAcs / 4095 * 3;
tft.setTextSize(2);
tft.setTextColor(TFT_INDIA, TFT_BLACK);
tft.setCursor(8, 203);
tft.print(voltage, 1);
tft.setTextColor(TFT_MIDDLEGREY, TFT_BLACK);
tft.print("v");
if (current > Calarm) {
tft.setTextColor(TFT_RED, TFT_BLACK);
} else {
tft.setTextColor(TFT_GOLD, TFT_BLACK);
}
tft.setCursor(67, 203);
tft.print(current, 1);
tft.setTextColor(TFT_MIDDLEGREY, TFT_BLACK);
tft.print("a");
tft.setTextColor(TFT_LIGHTGREY, TFT_BLACK);
tft.setCursor(208, 203);
tft.print(touchRead(tPIN1));
//float maHspent = ((current * time) / voltage); // for reading in mAh
//tft.setTextColor(TFT_NAVY, TFT_BLACK);
//tft.print(maHspent);
//tft.println(" maH spent ");
//Serial.print(CO2 / 10); // divided by 10 to make easier to see // Serial Plotter Logging
//Serial.print(" ");
//Serial.print(TVOC);
//Serial.println("");
printCCS811(); //// CCS811 Function /w error detection////
readHRO2(); //// HeartRate SpO2 Function /w touch button detection ////
tft.setCursor(0, 225); // Time elapsed & Code Revision
tft.setTextColor(TFT_LIGHTGREY, TFT_BLACK);
tft.setTextSize(2);
tft.setTextColor(TFT_CYAN, TFT_BLACK);
tft.print(minElapsed);
tft.setTextColor(TFT_DARKCYAN, TFT_BLACK);
tft.print("min");
tft.setTextColor(TFT_CYAN, TFT_BLACK);
tft.setCursor(191, 225);
tft.print(Revision);
WiFiClient client = server.available(); //// WiFi Print to Local IP ////
if (client)
{
int ccs811 = myCCS811.checkForStatusError();
pressure.toCharArray(pressure_value, 4);
sensorXY();
tft.setTextColor(TFT_GREEN);
tft.print("Status HTTP");
String currentLine = ""; //Storing the incoming data in the string
while (client.connected() && minElapsed - previousTime <= timeoutTime) { // loop while the client's connected
if (client.available()) //if there is some client data available
{
char c = client.read(); // read a byte
if (c == '\n') // check for newline character,
{
if (currentLine.length() == 0) //if line is blank it means its the end of the client HTTP request
{
client.println("HTTP/1.1 200 OK");
client.println("Content-type:text/html");
client.println("<font style='font-family:electric toaster'>");
client.println();
client.println("<meta name='apple-mobile-web-app-capable' content='yes' />");
client.println("<meta name='apple-mobile-web-app-status-bar-style' content='white-translucent' />");
client.println("<HTML>"); // Header
client.println("<HEAD>");
client.println("<head><title>HEX 6</title></head>");
client.println("<BODY>"); //Body
client.println("<body><div style='text-align: middle'>");
client.println("<body><body bgcolor='#383838'>");
client.println("<br />");
client.println("<a href=\"/?button1on\"\"><button1 style='font-size:300%; background-color:#383838; color:green;border-radius:5px; position:absolute; top:20px; left:30px;'>Sensors</a>");
client.println("<br />");
client.println("<br />");
client.print("<p style=\"text-align: middle; font-size:300%; color: white\"> Altitude: ");
client.print(alt);
client.print("m ");
client.print("<br/> Pressure: ");
client.print(pressure);
client.print("ATM");
client.print("<br/> Temp: ");
client.print(tempBME);
client.print("C");
client.print("<br/> RH: ");
client.print(RH);
client.print("%");
client.print("<br/> CO2: ");
client.print(CO2);
client.print("ppm");
client.print("<br/> TVOC: ");
client.print(TVOC);
client.print("ppm");
client.print("<br/>");
client.print("<br/> Time: ");
client.print(minElapsed);
client.print("m <br/>");
client.print("<br/>");
if (ccs811 > 0) { // ccs811 Error check - if yes, set text TFT_RED
CCS811Core::status returnCode = myCCS811.begin();
client.println("<a href=\"/?button1off\"\"><button2 style='font-size:100%; background-color:#383838; color:red;border-radius:5px; position:absolute; top:20px; left:30px;'>Sensors</a>");
switch ( returnCode )
{
case CCS811Core::SENSOR_ID_ERROR:
client.print("<br/>CCS811 ID Error");
break;
case CCS811Core::SENSOR_I2C_ERROR:
client.print("<br/>CCS811 I2C Error");
break;
case CCS811Core::SENSOR_INTERNAL_ERROR:
client.print("<br/>CCS811 Internal Error");
break;
case CCS811Core::SENSOR_GENERIC_ERROR:
client.print("<br/>CCS811 Generic Error");
break;
}
}
client.print("<br/>");
client.println("</BODY>");
client.println("</HTML>");
break;
}
else
{ // if you got a newline, then clear currentLine:
currentLine = "";
}
}
else if (c != '\r')
{ // if you got anything else but a carriage return character,
currentLine += c; // add it to the end of the currentLine
}
}
}
}
delay(12);
}
/////////////// END MAIN ///////////////
| [
"noreply@github.com"
] | swipswaps.noreply@github.com |
8e449684558be020bbb8a349f97fbe6a7d71e945 | ee5114b288f12d95292a6cb3210761e9009e2d92 | /programs/Reminder_7/library/CreditStatic.cpp | 777254ab44b49fed74994c302ff6321cb49e148d | [] | no_license | greshem/develop_mfc | 48947b9b810676339e1bae0ff1ea1dc7b8798434 | c66b7bd8fe4ba69c8b938de2bed7e307277f0280 | refs/heads/master | 2020-05-21T11:14:40.720392 | 2017-10-08T11:00:47 | 2017-10-08T11:00:47 | 45,077,670 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 28,128 | cpp | // CreditStatic.cpp : implementation file
//
#include "../stdafx.h"
#include "CreditStatic.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#define DISPLAY_TIMER_ID 150 // timer id
/////////////////////////////////////////////////////////////////////////////
// CCreditStatic
CCreditStatic::CCreditStatic()
{
m_Colors[0] = RGB(0,0,0); // Black
m_Colors[1] = RGB(0,255,0); // Green
m_Colors[2] = RGB(0,255,0); // Yellow
m_Colors[3] = RGB(0, 255, 255); // Turquoise
m_Colors[4] = RGB(0, 0, 255); // Blue
m_TextHeights[0] = 21;
m_TextHeights[1] = 19;
m_TextHeights[2] = 17;
m_TextHeights[3] = 15;
m_nCurrentFontHeight = m_TextHeights[NORMAL_TEXT_HEIGHT];
m_Escapes[0] = '\t';
m_Escapes[1] = '\n';
m_Escapes[2] = '\r';
m_Escapes[3] = '^';
m_DisplaySpeed[0] = 70;
m_DisplaySpeed[1] = 40;
m_DisplaySpeed[2] = 10;
m_CurrentSpeed = 1;
m_ScrollAmount = -1;
m_bProcessingBitmap = FALSE;
m_ArrIndex = NULL;
m_nCounter = 1;
m_nClip = 0;
m_bFirstTime = TRUE;
m_bDrawText = FALSE;
m_bFirstTurn = TRUE;
m_Gradient = GRADIENT_NONE;
m_bTransparent = FALSE;
n_MaxWidth = 0;
TimerOn = 0;
}
CCreditStatic::~CCreditStatic()
{
}
BEGIN_MESSAGE_MAP(CCreditStatic, CStatic)
//{{AFX_MSG_MAP(CCreditStatic)
ON_WM_PAINT()
ON_WM_ERASEBKGND()
ON_WM_TIMER()
ON_WM_DESTROY()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CCreditStatic message handlers
BOOL CCreditStatic::StartScrolling()
{
if(m_ArrCredit.IsEmpty())
return FALSE;
if(m_BmpMain.m_hObject != NULL) {
m_BmpMain.DeleteObject();
m_BmpMain.m_hObject = NULL;
}
TimerOn = SetTimer(DISPLAY_TIMER_ID,m_DisplaySpeed[m_CurrentSpeed],NULL);
ASSERT(TimerOn != 0);
m_ArrIndex = m_ArrCredit.GetHeadPosition();
m_nCounter = 1;
m_nClip = 0;
m_bFirstTime = TRUE;
m_bDrawText = FALSE;
return TRUE;
}
void CCreditStatic::EndScrolling()
{
KillTimer(DISPLAY_TIMER_ID);
TimerOn = 0;
if(m_BmpMain.m_hObject != NULL) {
m_BmpMain.DeleteObject();
m_BmpMain.m_hObject = NULL;
}
}
void CCreditStatic::SetCredits(LPCTSTR credits,char delimiter)
{
char *str,*ptr1,*ptr2;
ASSERT(credits);
if((str = strdup(credits)) == NULL)
return;
m_ArrCredit.RemoveAll();
ptr1 = str;
while((ptr2 = strchr(ptr1,delimiter)) != NULL) {
*ptr2 = '\0';
m_ArrCredit.AddTail(ptr1);
ptr1 = ptr2+1;
}
m_ArrCredit.AddTail(ptr1);
free(str);
m_ArrIndex = m_ArrCredit.GetHeadPosition();
m_nCounter = 1;
m_nClip = 0;
m_bFirstTime = TRUE;
m_bDrawText = FALSE;
}
void CCreditStatic::SetCredits(UINT nID,char delimiter)
{
CString credits;
if(!credits.LoadString(nID))
return;
SetCredits((LPCTSTR)credits, delimiter);
}
void CCreditStatic::SetSpeed(UINT index, int speed)
{
ASSERT(index <= DISPLAY_FAST);
if(speed)
m_DisplaySpeed[index] = speed;
m_CurrentSpeed = index;
}
void CCreditStatic::SetColor(UINT index, COLORREF col)
{
ASSERT(index <= NORMAL_TEXT_COLOR);
m_Colors[index] = col;
}
void CCreditStatic::SetTextHeight(UINT index, int height)
{
ASSERT(index <= NORMAL_TEXT_HEIGHT);
m_TextHeights[index] = height;
}
void CCreditStatic::SetEscape(UINT index, char escape)
{
ASSERT(index <= DISPLAY_BITMAP);
m_Escapes[index] = escape;
}
void CCreditStatic::SetGradient(UINT value)
{
ASSERT(value <= GRADIENT_LEFT_LIGHT);
m_Gradient = value;
}
void CCreditStatic::SetTransparent(BOOL bTransparent)
{
m_bTransparent = bTransparent;
}
void CCreditStatic::OnPaint()
{
CPaintDC dc(this); // device context for painting
if(TimerOn) return;
CDC memDC;
memDC.CreateCompatibleDC(&dc);
CBitmap *pOldMemDCBitmap = NULL;
CRect m_ScrollRect;
GetClientRect(&m_ScrollRect);
if(m_BmpMain.m_hObject == NULL) {
CDC memDC2;
CBitmap bitmap;
memDC2.CreateCompatibleDC(&dc);
bitmap.CreateCompatibleBitmap( &dc, m_ScrollRect.Width(), m_ScrollRect.Height() );
CBitmap *pOldMemDC2Bitmap = (CBitmap*)memDC2.SelectObject(&bitmap);
DrawCredit(&memDC2, m_ScrollRect);
AddBackGround(&memDC2, m_ScrollRect, m_ScrollRect);
pOldMemDCBitmap = (CBitmap*)memDC.SelectObject(&m_BmpMain);
memDC.BitBlt( 0, 0, m_ScrollRect.Width(), m_ScrollRect.Height(),
&memDC2, 0, 0, SRCCOPY );
memDC2.SelectObject(pOldMemDC2Bitmap);
}
else
pOldMemDCBitmap = (CBitmap*)memDC.SelectObject(&m_BmpMain);
dc.BitBlt( 0, 0, m_ScrollRect.Width(), m_ScrollRect.Height(),
&memDC, 0, 0, SRCCOPY );
}
BOOL CCreditStatic::OnEraseBkgnd(CDC* pDC)
{
return TRUE;
// return CStatic::OnEraseBkgnd(pDC);
}
//************************************************************************
// OnTimer
//
// On each of the display timers, scroll the window 1 unit. Each 20
// units, fetch the next array element and load into work string. Call
// Invalidate and UpdateWindow to invoke the OnPaint which will paint
// the contents of the newly updated work string.
//************************************************************************
void CCreditStatic::OnTimer(UINT nIDEvent)
{
if (nIDEvent != DISPLAY_TIMER_ID)
{
CStatic::OnTimer(nIDEvent);
return;
}
BOOL bCheck = FALSE;
if (!m_bProcessingBitmap) {
if (m_nCounter++ % m_nCurrentFontHeight == 0) // every x timer events, show new line
{
m_nCounter=1;
m_szWork = m_ArrCredit.GetNext(m_ArrIndex);
if(m_bFirstTurn)
bCheck = TRUE;
if(m_ArrIndex == NULL) {
m_bFirstTurn = FALSE;
m_ArrIndex = m_ArrCredit.GetHeadPosition();
}
m_nClip = 0;
m_bDrawText=TRUE;
}
}
CClientDC dc(this);
CRect m_ScrollRect;
GetClientRect(&m_ScrollRect);
CRect m_ClientRect(m_ScrollRect);
m_ClientRect.left = (m_ClientRect.Width()-n_MaxWidth)/2;
m_ClientRect.right = m_ClientRect.left + n_MaxWidth;
MoveCredit(&dc, m_ScrollRect, m_ClientRect, bCheck);
AddBackGround(&dc, m_ScrollRect, m_ClientRect);
CStatic::OnTimer(nIDEvent);
}
void CCreditStatic::AddBackGround(CDC* pDC, CRect& m_ScrollRect, CRect& m_ClientRect)
{
CDC memDC;
memDC.CreateCompatibleDC( pDC );
if( m_bitmap.m_hObject == NULL )
{
CBitmap* pOldBitmap = memDC.SelectObject( &m_BmpMain );
pDC->BitBlt( 0, 0, m_ScrollRect.Width(), m_ScrollRect.Height(),
&memDC, 0, 0, SRCCOPY );
memDC.SelectObject(pOldBitmap);
return;
}
// Draw bitmap in the background if one has been set
// Now create a mask
CBitmap bitmap;
bitmap.CreateCompatibleBitmap( pDC, m_ClientRect.Width(), m_ClientRect.Height() );
CBitmap* pOldMemDCBitmap = memDC.SelectObject( &bitmap );
CDC tempDC;
tempDC.CreateCompatibleDC(pDC);
CBitmap* pOldTempDCBitmap = tempDC.SelectObject( &m_BmpMain );
memDC.BitBlt( 0, 0, m_ClientRect.Width(), m_ClientRect.Height(), &tempDC,
m_ClientRect.left, m_ClientRect.top, SRCCOPY );
CDC maskDC;
maskDC.CreateCompatibleDC(pDC);
CBitmap maskBitmap;
// Create monochrome bitmap for the mask
maskBitmap.CreateBitmap( m_ClientRect.Width(), m_ClientRect.Height(), 1, 1, NULL );
CBitmap* pOldMaskDCBitmap = maskDC.SelectObject( &maskBitmap );
memDC.SetBkColor(m_bTransparent? RGB(192,192,192): m_Colors[BACKGROUND_COLOR]);
// Create the mask from the memory DC
maskDC.BitBlt( 0, 0, m_ClientRect.Width(), m_ClientRect.Height(), &memDC, 0, 0, SRCCOPY );
tempDC.SelectObject(pOldTempDCBitmap);
pOldTempDCBitmap = tempDC.SelectObject( &m_bitmap );
CDC imageDC;
CBitmap bmpImage;
imageDC.CreateCompatibleDC( pDC );
bmpImage.CreateCompatibleBitmap( pDC, m_ScrollRect.Width(), m_ScrollRect.Height() );
CBitmap* pOldImageDCBitmap = imageDC.SelectObject( &bmpImage );
if( pDC->GetDeviceCaps(RASTERCAPS) & RC_PALETTE && m_pal.m_hObject != NULL )
{
pDC->SelectPalette( &m_pal, FALSE );
pDC->RealizePalette();
imageDC.SelectPalette( &m_pal, FALSE );
}
// Get x and y offset
// Draw bitmap in tiled manner to imageDC
//以下由王文利Modified--UNDO
imageDC.StretchBlt(0, 0, m_ScrollRect.right, m_ScrollRect.bottom,
&tempDC, 0, 0, m_cxBitmap, m_cyBitmap, SRCCOPY );
// for( int i = 0; i < m_ScrollRect.right; i += m_cxBitmap )
// for( int j = 0; j < m_ScrollRect.bottom; j += m_cyBitmap )
// imageDC.BitBlt( i, j, m_cxBitmap, m_cyBitmap, &tempDC, 0, 0, SRCCOPY );
// Set the background in memDC to black. Using SRCPAINT with black and any other
// color results in the other color, thus making black the transparent color
memDC.SetBkColor(RGB(0,0,0));
memDC.SetTextColor(RGB(255,255,255));
memDC.BitBlt(0, 0, m_ClientRect.Width(), m_ClientRect.Height(), &maskDC, 0, 0, SRCAND);
// Set the foreground to black. See comment above.
imageDC.SetBkColor(RGB(255,255,255));
imageDC.SetTextColor(RGB(0,0,0));
imageDC.BitBlt(m_ClientRect.left, m_ClientRect.top, m_ClientRect.Width(), m_ClientRect.Height(),
&maskDC, 0, 0, SRCAND);
// Combine the foreground with the background
imageDC.BitBlt(m_ClientRect.left, m_ClientRect.top, m_ClientRect.Width(), m_ClientRect.Height(),
&memDC, 0, 0,SRCPAINT);
// Draw the final image to the screen
pDC->BitBlt( 0, 0, m_ScrollRect.Width(), m_ScrollRect.Height(),
&imageDC, 0, 0, SRCCOPY );
imageDC.SelectObject(pOldImageDCBitmap);
maskDC.SelectObject(pOldMaskDCBitmap);
tempDC.SelectObject(pOldTempDCBitmap);
memDC.SelectObject(pOldMemDCBitmap);
}
void CCreditStatic::DrawBitmap(CDC* pDC, CDC* pDC2, CRect *rBitmap)
{
if(!m_bTransparent || m_bitmap.m_hObject != NULL) {
pDC->BitBlt( rBitmap->left, rBitmap->top, rBitmap->Width(), rBitmap->Height(),
pDC2, 0, 0, SRCCOPY );
return;
}
CDC memDC;
memDC.CreateCompatibleDC( pDC );
// Now create a mask
CBitmap bitmap;
bitmap.CreateCompatibleBitmap( pDC, rBitmap->Width(), rBitmap->Height() );
CBitmap* pOldMemDCBitmap = memDC.SelectObject( &bitmap );
memDC.BitBlt( 0, 0, rBitmap->Width(), rBitmap->Height(), pDC2, 0, 0, SRCCOPY );
CDC maskDC;
maskDC.CreateCompatibleDC(pDC);
// Create monochrome bitmap for the mask
CBitmap maskBitmap;
maskBitmap.CreateBitmap( rBitmap->Width(), rBitmap->Height(), 1, 1, NULL );
CBitmap* pOldMaskDCBitmap = maskDC.SelectObject( &maskBitmap );
memDC.SetBkColor(RGB(192,192,192));
// Create the mask from the memory DC
maskDC.BitBlt( 0, 0, rBitmap->Width(), rBitmap->Height(), &memDC, 0, 0, SRCCOPY );
CDC imageDC;
CBitmap bmpImage;
imageDC.CreateCompatibleDC( pDC );
bmpImage.CreateCompatibleBitmap( pDC, rBitmap->Width(), rBitmap->Height() );
CBitmap* pOldImageDCBitmap = imageDC.SelectObject( &bmpImage );
imageDC.BitBlt(0, 0, rBitmap->Width(), rBitmap->Height(), pDC, rBitmap->left, rBitmap->top, SRCCOPY);
// Set the background in memDC to black. Using SRCPAINT with black and any other
// color results in the other color, thus making black the transparent color
memDC.SetBkColor(RGB(0,0,0));
memDC.SetTextColor(RGB(255,255,255));
memDC.BitBlt(0, 0, rBitmap->Width(), rBitmap->Height(), &maskDC, 0, 0, SRCAND);
// Set the foreground to black. See comment above.
imageDC.SetBkColor(RGB(255,255,255));
imageDC.SetTextColor(RGB(0,0,0));
imageDC.BitBlt(0, 0, rBitmap->Width(), rBitmap->Height(), &maskDC, 0, 0, SRCAND);
// Combine the foreground with the background
imageDC.BitBlt(0, 0, rBitmap->Width(), rBitmap->Height(), &memDC, 0, 0,SRCPAINT);
// Draw the final image to the screen
pDC->BitBlt( rBitmap->left, rBitmap->top, rBitmap->Width(), rBitmap->Height(),
&imageDC, 0, 0, SRCCOPY );
imageDC.SelectObject(pOldImageDCBitmap);
maskDC.SelectObject(pOldMaskDCBitmap);
memDC.SelectObject(pOldMemDCBitmap);
}
void CCreditStatic::FillGradient(CDC *pDC, CRect *m_ScrollRect, CRect *m_FillRect, COLORREF color)
{
float fStep,fRStep,fGStep,fBStep; // How large is each band?
int iOnBand; // Loop index
WORD R = GetRValue(color);
WORD G = GetGValue(color);
WORD B = GetBValue(color);
// Determine how large each band should be in order to cover the
// client with 256 bands (one for every color intensity level)
if(m_Gradient % 2) {
fRStep = (float)R / 255.0f;
fGStep = (float)G / 255.0f;
fBStep = (float)B / 255.0f;
} else {
fRStep = (float)(255-R) / 255.0f;
fGStep = (float)(255-G) / 255.0f;
fBStep = (float)(255-B) / 255.0f;
}
COLORREF OldCol = pDC->GetBkColor();
// Start filling bands
fStep = (float)m_ScrollRect->Width() / 256.0f;
for(iOnBand = (256*m_FillRect->left)/m_ScrollRect->Width();
(int)(iOnBand*fStep) < m_FillRect->right && iOnBand < 256; iOnBand++) {
CRect r((int)(iOnBand * fStep), m_FillRect->top,
(int)((iOnBand+1) * fStep), m_FillRect->bottom+1);
COLORREF col;
switch(m_Gradient) {
case GRADIENT_RIGHT_DARK:
col = RGB((int)(R-iOnBand*fRStep),(int)(G-iOnBand*fGStep),(int)(B-iOnBand*fBStep));
break;
case GRADIENT_RIGHT_LIGHT:
col = RGB((int)(R+iOnBand*fRStep),(int)(G+iOnBand*fGStep),(int)(B+iOnBand*fBStep));
break;
case GRADIENT_LEFT_DARK:
col = RGB((int)(iOnBand*fRStep),(int)(iOnBand*fGStep),(int)(iOnBand*fBStep));
break;
case GRADIENT_LEFT_LIGHT:
col = RGB(255-(int)(iOnBand*fRStep),255-(int)(iOnBand*fGStep),255-(int)(iOnBand*fBStep));
break;
default:
return;
}
pDC->FillSolidRect(&r, col);
}
pDC->SetBkColor(OldCol);
}
#define SCROLLDC
void CCreditStatic::MoveCredit(CDC* pDC, CRect& m_ScrollRect, CRect& m_ClientRect, BOOL bCheck)
{
CDC memDC,memDC2;
memDC.CreateCompatibleDC(pDC);
memDC2.CreateCompatibleDC(pDC);
COLORREF BackColor = (m_bTransparent && m_bitmap.m_hObject != NULL)? RGB(192,192,192) : m_Colors[BACKGROUND_COLOR];
CBitmap *pOldMemDCBitmap = NULL;
CBitmap *pOldMemDC2Bitmap = NULL;
#ifdef SCROLLDC
CRect r1;
#endif
if(m_BmpMain.m_hObject == NULL) {
m_BmpMain.CreateCompatibleBitmap( pDC, m_ScrollRect.Width(), m_ScrollRect.Height() );
pOldMemDCBitmap = (CBitmap*)memDC.SelectObject(&m_BmpMain);
if(m_Gradient && m_bitmap.m_hObject == NULL)
FillGradient(&memDC, &m_ScrollRect, &m_ScrollRect,m_Colors[BACKGROUND_COLOR]);
else
memDC.FillSolidRect(&m_ScrollRect,BackColor);
} else
pOldMemDCBitmap = (CBitmap*)memDC.SelectObject(&m_BmpMain);
if(m_ClientRect.Width() > 0) {
#ifndef SCROLLDC
CBitmap bitmap;
bitmap.CreateCompatibleBitmap( pDC, m_ClientRect.Width(), m_ClientRect.Height() );
pOldMemDC2Bitmap = memDC2.SelectObject(&bitmap);
memDC2.BitBlt( 0, 0, m_ClientRect.Width(), m_ClientRect.Height()-abs(m_ScrollAmount),
&memDC, m_ClientRect.left, abs(m_ScrollAmount), SRCCOPY );
memDC.BitBlt( m_ClientRect.left, 0, m_ClientRect.Width(), m_ClientRect.Height(),
&memDC2, 0, 0, SRCCOPY );
memDC2.SelectObject(pOldMemDC2Bitmap);
pOldMemDC2Bitmap = NULL;
#else
CRgn RgnUpdate;
memDC.ScrollDC(0,m_ScrollAmount,(LPCRECT)m_ScrollRect,(LPCRECT)m_ClientRect,&RgnUpdate,
(LPRECT)r1);
}
else {
r1 = m_ScrollRect;
r1.top = r1.bottom-abs(m_ScrollAmount);
#endif
}
m_nClip = m_nClip + abs(m_ScrollAmount);
//*********************************************************************
// FONT SELECTION
CFont m_fntArial;
CFont* pOldFont = NULL;
BOOL bSuccess = FALSE;
BOOL bUnderline;
BOOL bItalic;
int rmcode = 0;
if (!m_szWork.IsEmpty()) {
char c = m_szWork[m_szWork.GetLength()-1];
if(c == m_Escapes[TOP_LEVEL_GROUP]) {
rmcode = 1;
bItalic = FALSE;
bUnderline = FALSE;
m_nCurrentFontHeight = m_TextHeights[TOP_LEVEL_GROUP_HEIGHT];
bSuccess = m_fntArial.CreateFont(MulDiv(10, -memDC.GetDeviceCaps (LOGPIXELSY),
72),0,0,0,FW_NORMAL,0,0,0,DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,
DEFAULT_PITCH | FF_SWISS, _T("宋体"));
memDC.SetTextColor(m_Colors[TOP_LEVEL_GROUP_COLOR]);
if (pOldFont != NULL) memDC.SelectObject(pOldFont);
pOldFont = memDC.SelectObject(&m_fntArial);
}
else if(c == m_Escapes[GROUP_TITLE]) {
rmcode = 1;
bItalic = FALSE;
bUnderline = FALSE;
m_nCurrentFontHeight = m_TextHeights[GROUP_TITLE_HEIGHT];
bSuccess = m_fntArial.CreateFont(MulDiv(10, -memDC.GetDeviceCaps (LOGPIXELSY),
72),0,0,0,FW_NORMAL,0,0,0,DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,
DEFAULT_PITCH | FF_SWISS, _T("宋体"));
memDC.SetTextColor(m_Colors[GROUP_TITLE_COLOR]);
if (pOldFont != NULL) memDC.SelectObject(pOldFont);
pOldFont = memDC.SelectObject(&m_fntArial);
}
else if(c == m_Escapes[TOP_LEVEL_TITLE]) {
rmcode = 1;
bItalic = FALSE;
// bUnderline = TRUE;
bUnderline = FALSE;
m_nCurrentFontHeight = m_TextHeights[TOP_LEVEL_TITLE_HEIGHT];
bSuccess = m_fntArial.CreateFont(MulDiv(10, -memDC.GetDeviceCaps (LOGPIXELSY),
72),0,0,0,FW_NORMAL,0,0,0,DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,
DEFAULT_PITCH | FF_SWISS, _T("宋体"));
memDC.SetTextColor(m_Colors[TOP_LEVEL_TITLE_COLOR]);
if (pOldFont != NULL) memDC.SelectObject(pOldFont);
pOldFont = memDC.SelectObject(&m_fntArial);
}
else if(c == m_Escapes[DISPLAY_BITMAP]) {
if (!m_bProcessingBitmap)
{
CString szBitmap = m_szWork.Left(m_szWork.GetLength()-1);
if(m_bmpWork.LoadBitmap((const char *)szBitmap)) {
BITMAP m_bmpInfo;
m_bmpWork.GetObject(sizeof(BITMAP), &m_bmpInfo);
m_size.cx = m_bmpInfo.bmWidth; // width of dest rect
m_size.cy = m_bmpInfo.bmHeight;
// upper left point of dest
m_pt.x = (m_ClientRect.right -
((m_ClientRect.Width())/2) - (m_size.cx/2));
m_pt.y = m_ClientRect.bottom;
m_bProcessingBitmap = TRUE;
if (pOldMemDC2Bitmap != NULL) memDC2.SelectObject(pOldMemDC2Bitmap);
pOldMemDC2Bitmap = memDC2.SelectObject(&m_bmpWork);
}
else
c = ' ';
}
else {
if (pOldMemDC2Bitmap != NULL) memDC2.SelectObject(pOldMemDC2Bitmap);
pOldMemDC2Bitmap = memDC2.SelectObject(&m_bmpWork);
}
}
else {
bItalic = FALSE;
bUnderline = FALSE;
m_nCurrentFontHeight = m_TextHeights[NORMAL_TEXT_HEIGHT];
bSuccess = m_fntArial.CreateFont(m_TextHeights[NORMAL_TEXT_HEIGHT], 0, 0, 0,
FW_THIN, bItalic, bUnderline, 0,
ANSI_CHARSET,
OUT_DEFAULT_PRECIS,
CLIP_DEFAULT_PRECIS,
PROOF_QUALITY,
VARIABLE_PITCH | 0x04 | FF_DONTCARE,
(LPSTR)"宋体");
memDC.SetTextColor(m_Colors[NORMAL_TEXT_COLOR]);
if (pOldFont != NULL) memDC.SelectObject(pOldFont);
pOldFont = memDC.SelectObject(&m_fntArial);
}
}
#ifndef SCROLLDC
CRect r1(m_ScrollRect);
r1.top = r1.bottom-abs(m_ScrollAmount);
#endif
if(m_Gradient && m_bitmap.m_hObject == NULL)
FillGradient(&memDC, &m_ScrollRect, &r1, m_Colors[BACKGROUND_COLOR]);
else
memDC.FillSolidRect(&r1,BackColor);
memDC.SetBkMode(TRANSPARENT);
if (!m_bProcessingBitmap)
{
if(bCheck) {
CSize size = memDC.GetTextExtent((LPCTSTR)m_szWork,m_szWork.GetLength()-rmcode);
if(size.cx > n_MaxWidth) {
n_MaxWidth = (size.cx > m_ScrollRect.Width())? m_ScrollRect.Width():size.cx;
m_ClientRect.left = (m_ScrollRect.Width()-n_MaxWidth)/2;
m_ClientRect.right = m_ClientRect.left + n_MaxWidth;
}
}
CRect r(m_ClientRect);
r.top = r.bottom-m_nClip;
int x = memDC.DrawText((const char *)m_szWork,m_szWork.GetLength()-rmcode,&r,DT_TOP|DT_CENTER|
DT_NOPREFIX | DT_SINGLELINE);
m_bDrawText=FALSE;
}
else
{
if(bCheck) {
CSize size = memDC.GetTextExtent((LPCTSTR)m_szWork,m_szWork.GetLength()-rmcode);
if(m_size.cx > n_MaxWidth) {
n_MaxWidth = (m_size.cx > m_ScrollRect.Width())? m_ScrollRect.Width():m_size.cx;
m_ClientRect.left = (m_ScrollRect.Width()-n_MaxWidth)/2;
m_ClientRect.right = m_ClientRect.left + n_MaxWidth;
}
}
CRect r( m_pt.x, m_pt.y-m_nClip, m_pt.x+ m_size.cx, m_pt.y);
DrawBitmap(&memDC, &memDC2, &r);
// memDC.BitBlt( m_pt.x, m_pt.y-m_nClip, m_size.cx, m_nClip,
// &memDC2, 0, 0, SRCCOPY );
if (m_nClip >= m_size.cy)
{
m_bmpWork.DeleteObject();
m_bProcessingBitmap = FALSE;
m_nClip=0;
m_szWork.Empty();
m_nCounter=1;
}
}
if (pOldMemDC2Bitmap != NULL) memDC2.SelectObject(pOldMemDC2Bitmap);
if (pOldFont != NULL) memDC.SelectObject(pOldFont);
memDC.SelectObject(pOldMemDCBitmap);
if(m_fntArial.GetSafeHandle()!=NULL)
m_fntArial.DeleteObject();
}
void CCreditStatic::DrawCredit(CDC* pDC, CRect& m_ScrollRect)
{
if(m_BmpMain.m_hObject != NULL) return;
CDC memDC,memDC2;
memDC.CreateCompatibleDC(pDC);
memDC2.CreateCompatibleDC(pDC);
COLORREF BackColor = (m_bTransparent && m_bitmap.m_hObject != NULL)? RGB(192,192,192) : m_Colors[BACKGROUND_COLOR];
CBitmap *pOldMemDCBitmap = NULL;
m_BmpMain.CreateCompatibleBitmap( pDC, m_ScrollRect.Width(), m_ScrollRect.Height() );
pOldMemDCBitmap = (CBitmap*)memDC.SelectObject(&m_BmpMain);
if(m_Gradient && m_bitmap.m_hObject == NULL)
FillGradient(&memDC, &m_ScrollRect, &m_ScrollRect, m_Colors[BACKGROUND_COLOR]);
else
memDC.FillSolidRect(&m_ScrollRect, BackColor);
POSITION pos = m_ArrCredit.GetHeadPosition();
int height = 0;
while(pos != NULL && height <= m_ScrollRect.Height()) {
CString m_szWork = m_ArrCredit.GetNext(pos);
CFont m_fntArial;
CFont *pOldFont = NULL;
CBitmap *pOldMemDC2Bitmap = NULL;
CDC memDC2;
memDC2.CreateCompatibleDC(pDC);
//*********************************************************************
// FONT SELECTION
BOOL bSuccess = FALSE;
BOOL bIsBitmap = FALSE;
BOOL bUnderline;
BOOL bItalic;
int rmcode = 0;
CBitmap bitmap;
if (!m_szWork.IsEmpty()) {
char c = m_szWork[m_szWork.GetLength()-1];
if(c == m_Escapes[TOP_LEVEL_GROUP]) {
rmcode = 1;
bItalic = FALSE;
bUnderline = FALSE;
m_nCurrentFontHeight = m_TextHeights[TOP_LEVEL_GROUP_HEIGHT];
bSuccess = m_fntArial.CreateFont(MulDiv(10, -memDC.GetDeviceCaps (LOGPIXELSY),
72),0,0,0,FW_NORMAL,0,0,0,DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,
DEFAULT_PITCH | FF_SWISS, _T("宋体"));
memDC.SetTextColor(m_Colors[TOP_LEVEL_GROUP_COLOR]);
pOldFont = memDC.SelectObject(&m_fntArial);
}
else if(c == m_Escapes[GROUP_TITLE]) {
rmcode = 1;
bItalic = FALSE;
bUnderline = FALSE;
m_nCurrentFontHeight = m_TextHeights[GROUP_TITLE_HEIGHT];
bSuccess = m_fntArial.CreateFont(MulDiv(10, -memDC.GetDeviceCaps (LOGPIXELSY),
72),0,0,0,FW_NORMAL,0,0,0,DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,
DEFAULT_PITCH | FF_SWISS, _T("宋体"));
memDC.SetTextColor(m_Colors[GROUP_TITLE_COLOR]);
pOldFont = memDC.SelectObject(&m_fntArial);
}
else if(c == m_Escapes[TOP_LEVEL_TITLE]) {
rmcode = 1;
bItalic = FALSE;
// bUnderline = TRUE;
bUnderline = FALSE;
m_nCurrentFontHeight = m_TextHeights[TOP_LEVEL_TITLE_HEIGHT];
bSuccess = m_fntArial.CreateFont(MulDiv(10, -memDC.GetDeviceCaps (LOGPIXELSY),
72),0,0,0,FW_NORMAL,0,0,0,DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,
DEFAULT_PITCH | FF_SWISS, _T("宋体"));
memDC.SetTextColor(m_Colors[TOP_LEVEL_TITLE_COLOR]);
pOldFont = memDC.SelectObject(&m_fntArial);
}
else if(c == m_Escapes[DISPLAY_BITMAP]) {
CString szBitmap = m_szWork.Left(m_szWork.GetLength()-1);
if(bitmap.LoadBitmap((const char *)szBitmap)) {
BITMAP m_bmpInfo;
bitmap.GetObject(sizeof(BITMAP), &m_bmpInfo);
m_size.cx = m_bmpInfo.bmWidth; // width of dest rect
m_size.cy = m_bmpInfo.bmHeight;
// upper left point of dest
m_pt.x = (m_ScrollRect.right -
((m_ScrollRect.Width())/2) - (m_size.cx/2));
m_pt.y = height;
pOldMemDC2Bitmap = memDC2.SelectObject(&bitmap);
bIsBitmap = TRUE;
}
else
c = ' ';
}
else {
bItalic = FALSE;
bUnderline = FALSE;
m_nCurrentFontHeight = m_TextHeights[NORMAL_TEXT_HEIGHT];
bSuccess = m_fntArial.CreateFont(MulDiv(10, -memDC.GetDeviceCaps (LOGPIXELSY),
72),0,0,0,FW_NORMAL,0,0,0,DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,
DEFAULT_PITCH | FF_SWISS, _T("宋体"));
memDC.SetTextColor(m_Colors[NORMAL_TEXT_COLOR]);
pOldFont = memDC.SelectObject(&m_fntArial);
}
}
memDC.SetBkMode(TRANSPARENT);
if (!bIsBitmap)
{
CRect r(m_ScrollRect);
r.top = height;
CSize size;
if(m_szWork.GetLength()-rmcode != 0)
{
int x = memDC.DrawText((const char *)m_szWork,m_szWork.GetLength()-rmcode,&r,DT_TOP|DT_CENTER|
DT_NOPREFIX | DT_SINGLELINE);
size = memDC.GetTextExtent((LPCTSTR)m_szWork,m_szWork.GetLength()-rmcode);
}
else
size = memDC.GetTextExtent((LPCTSTR)"W",1);
height += size.cy;
}
else
{
CRect r( m_pt.x, m_pt.y, m_pt.x + m_size.cx, m_pt.y + m_size.cy);
DrawBitmap(&memDC, &memDC2, &r);
// memDC.BitBlt( m_pt.x, m_pt.y, m_size.cx, m_size.cy, &memDC2, 0, 0, SRCCOPY );
height += m_size.cy;
}
if (pOldMemDC2Bitmap != NULL) memDC2.SelectObject(pOldMemDC2Bitmap);
if (pOldFont != NULL) memDC.SelectObject(pOldFont);
}
memDC.SelectObject(pOldMemDCBitmap);
}
void CCreditStatic::OnDestroy()
{
CStatic::OnDestroy();
m_ArrCredit.RemoveAll();
if(TimerOn)
ASSERT(KillTimer(DISPLAY_TIMER_ID));
}
BOOL CCreditStatic::SetBkImage(UINT nIDResource)
{
return SetBkImage( (LPCTSTR)nIDResource );
}
BOOL CCreditStatic::SetBkImage(LPCTSTR lpszResourceName)
{
// If this is not the first call then Delete GDI objects
if( m_bitmap.m_hObject != NULL )
m_bitmap.DeleteObject();
if( m_pal.m_hObject != NULL )
m_pal.DeleteObject();
HBITMAP hBmp = (HBITMAP)::LoadImage( AfxGetInstanceHandle(),
lpszResourceName, IMAGE_BITMAP, 0,0, LR_CREATEDIBSECTION );
if( hBmp == NULL )
return FALSE;
m_bitmap.Attach( hBmp );
BITMAP bm;
m_bitmap.GetBitmap( &bm );
m_cxBitmap = bm.bmWidth;
m_cyBitmap = bm.bmHeight;
// Create a logical palette for the bitmap
DIBSECTION ds;
BITMAPINFOHEADER &bmInfo = ds.dsBmih;
m_bitmap.GetObject( sizeof(ds), &ds );
int nColors = bmInfo.biClrUsed ? bmInfo.biClrUsed : 1 << bmInfo.biBitCount;
// Create a halftone palette if colors > 256.
CClientDC dc(NULL); // Desktop DC
if( nColors > 256 )
m_pal.CreateHalftonePalette( &dc );
else
{
// Create the palette
RGBQUAD *pRGB = new RGBQUAD[nColors];
CDC memDC;
memDC.CreateCompatibleDC(&dc);
CBitmap* pOldMemDCBitmap = memDC.SelectObject( &m_bitmap );
::GetDIBColorTable( memDC, 0, nColors, pRGB );
UINT nSize = sizeof(LOGPALETTE) + (sizeof(PALETTEENTRY) * nColors);
LOGPALETTE *pLP = (LOGPALETTE *) new BYTE[nSize];
pLP->palVersion = 0x300;
pLP->palNumEntries = nColors;
for( int i=0; i < nColors; i++)
{
pLP->palPalEntry[i].peRed = pRGB[i].rgbRed;
pLP->palPalEntry[i].peGreen = pRGB[i].rgbGreen;
pLP->palPalEntry[i].peBlue = pRGB[i].rgbBlue;
pLP->palPalEntry[i].peFlags = 0;
}
m_pal.CreatePalette( pLP );
memDC.SelectObject(pOldMemDCBitmap);
delete[] pLP;
delete[] pRGB;
}
// Invalidate();
return TRUE;
}
| [
"qianzhongjie@gmail.com"
] | qianzhongjie@gmail.com |
1decaa0d7480eff057518340bf6380cc0c7b4c3a | fbbe424559f64e9a94116a07eaaa555a01b0a7bb | /Sklearn_scipy_numpy/source/scipy/weave/blitz/blitz/array-impl.h | 223b86921f2d46cd20aadcaff81a02be6a16b0f1 | [
"MIT"
] | permissive | ryfeus/lambda-packs | 6544adb4dec19b8e71d75c24d8ed789b785b0369 | cabf6e4f1970dc14302f87414f170de19944bac2 | refs/heads/master | 2022-12-07T16:18:52.475504 | 2022-11-29T13:35:35 | 2022-11-29T13:35:35 | 71,386,735 | 1,283 | 263 | MIT | 2022-11-26T05:02:14 | 2016-10-19T18:22:39 | Python | UTF-8 | C++ | false | false | 95,304 | h | // -*- C++ -*-
/***************************************************************************
* blitz/array-impl.h Definition of the Array<P_numtype, N_rank> class
*
* $Id: array-impl.h 1414 2005-11-01 22:04:59Z cookedm $
*
* Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org>
*
* This code was relicensed under the modified BSD license for use in SciPy
* by Todd Veldhuizen (see LICENSE.txt in the weave directory).
*
*
* Suggestions: blitz-dev@oonumerics.org
* Bugs: blitz-bugs@oonumerics.org
*
* For more information, please see the Blitz++ Home Page:
* http://oonumerics.org/blitz/
*
***************************************************************************/
/*
* Wish list for array classes.
* - Arrays whose dimensions are unknown at compile time.
* - where()/elsewhere()/elsewhere() as in Dan Quinlan's implementation
* - block reduction operations
* - conversion to/from matrix & vector
* - apply(T func(T))
* - apply(T func(const T&))
* - apply<T func(T)>
*/
#ifndef BZ_ARRAY_H
#define BZ_ARRAY_H
#include <blitz/blitz.h>
#include <blitz/memblock.h>
#include <blitz/range.h>
#include <blitz/tinyvec.h>
#ifdef BZ_ARRAY_SPACE_FILLING_TRAVERSAL
#include <blitz/traversal.h>
#endif
#include <blitz/indexexpr.h>
#include <blitz/prettyprint.h>
#include <blitz/array/slice.h> // Subarrays and slicing
#include <blitz/array/map.h> // Tensor index notation
#include <blitz/array/multi.h> // Multicomponent arrays
#include <blitz/array/domain.h> // RectDomain class
#include <blitz/array/storage.h> // GeneralArrayStorage
BZ_NAMESPACE(blitz)
/*
* Forward declarations
*/
template<typename T_numtype, int N_rank>
class ArrayIterator;
template<typename T_numtype, int N_rank>
class ConstArrayIterator;
template<typename T_numtype, int N_rank>
class FastArrayIterator;
template<typename P_expr>
class _bz_ArrayExpr;
template<typename T_array, typename T_index>
class IndirectArray;
template <typename P_numtype,int N_rank>
void swap(Array<P_numtype,N_rank>&,Array<P_numtype,N_rank>&);
template <typename P_numtype, int N_rank>
void find(Array<TinyVector<int,N_rank>,1>&,const Array<P_numtype,N_rank>&);
/*
* Declaration of class Array
*/
// NEEDS_WORK: Array should inherit protected from MemoryBlockReference.
// To make this work, need to expose MemoryBlockReference::numReferences()
// and make Array<P,N2> a friend of Array<P,N> for slicing.
template<typename P_numtype, int N_rank>
class Array : public MemoryBlockReference<P_numtype>
#ifdef BZ_NEW_EXPRESSION_TEMPLATES
, public ETBase<Array<P_numtype,N_rank> >
#endif
{
private:
typedef MemoryBlockReference<P_numtype> T_base;
using T_base::data_;
using T_base::changeToNullBlock;
using T_base::numReferences;
public:
//////////////////////////////////////////////
// Public Types
//////////////////////////////////////////////
/*
* T_numtype is the numeric type stored in the array.
* T_index is a vector type which can be used to access elements
* of many-dimensional arrays.
* T_array is the array type itself -- Array<T_numtype, N_rank>
* T_iterator is a a fast iterator for the array, used for expression
* templates
* iterator is a STL-style iterator
* const_iterator is an STL-style const iterator
*/
typedef P_numtype T_numtype;
typedef TinyVector<int, N_rank> T_index;
typedef Array<T_numtype, N_rank> T_array;
typedef FastArrayIterator<T_numtype, N_rank> T_iterator;
typedef ArrayIterator<T_numtype,N_rank> iterator;
typedef ConstArrayIterator<T_numtype,N_rank> const_iterator;
static const int _bz_rank = N_rank;
//////////////////////////////////////////////
// Constructors //
//////////////////////////////////////////////
/*
* Construct an array from an array expression.
*/
template<typename T_expr>
explicit Array(_bz_ArrayExpr<T_expr> expr);
/*
* Any missing length arguments will have their value taken from the
* last argument. For example,
* Array<int,3> A(32,64);
* will create a 32x64x64 array. This is handled by setupStorage().
*/
Array(GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
length_ = 0;
stride_ = 0;
zeroOffset_ = 0;
}
explicit Array(int length0,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
length_[0] = length0;
setupStorage(0);
}
Array(int length0, int length1,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
BZPRECONDITION(N_rank >= 2);
TAU_TYPE_STRING(p1, "Array<T,N>::Array() [T="
+ CT(T_numtype) + ",N=" + CT(N_rank) + "]");
TAU_PROFILE(p1, "void (int,int)", TAU_BLITZ);
length_[0] = length0;
length_[1] = length1;
setupStorage(1);
}
Array(int length0, int length1, int length2,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
BZPRECONDITION(N_rank >= 3);
length_[0] = length0;
length_[1] = length1;
length_[2] = length2;
setupStorage(2);
}
Array(int length0, int length1, int length2, int length3,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
BZPRECONDITION(N_rank >= 4);
length_[0] = length0;
length_[1] = length1;
length_[2] = length2;
length_[3] = length3;
setupStorage(3);
}
Array(int length0, int length1, int length2, int length3, int length4,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
BZPRECONDITION(N_rank >= 5);
length_[0] = length0;
length_[1] = length1;
length_[2] = length2;
length_[3] = length3;
length_[4] = length4;
setupStorage(4);
}
Array(int length0, int length1, int length2, int length3, int length4,
int length5,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
BZPRECONDITION(N_rank >= 6);
length_[0] = length0;
length_[1] = length1;
length_[2] = length2;
length_[3] = length3;
length_[4] = length4;
length_[5] = length5;
setupStorage(5);
}
Array(int length0, int length1, int length2, int length3, int length4,
int length5, int length6,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
BZPRECONDITION(N_rank >= 7);
length_[0] = length0;
length_[1] = length1;
length_[2] = length2;
length_[3] = length3;
length_[4] = length4;
length_[5] = length5;
length_[6] = length6;
setupStorage(6);
}
Array(int length0, int length1, int length2, int length3, int length4,
int length5, int length6, int length7,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
BZPRECONDITION(N_rank >= 8);
length_[0] = length0;
length_[1] = length1;
length_[2] = length2;
length_[3] = length3;
length_[4] = length4;
length_[5] = length5;
length_[6] = length6;
length_[7] = length7;
setupStorage(7);
}
Array(int length0, int length1, int length2, int length3, int length4,
int length5, int length6, int length7, int length8,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
BZPRECONDITION(N_rank >= 9);
length_[0] = length0;
length_[1] = length1;
length_[2] = length2;
length_[3] = length3;
length_[4] = length4;
length_[5] = length5;
length_[6] = length6;
length_[7] = length7;
length_[8] = length8;
setupStorage(8);
}
Array(int length0, int length1, int length2, int length3, int length4,
int length5, int length6, int length7, int length8, int length9,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
BZPRECONDITION(N_rank >= 10);
length_[0] = length0;
length_[1] = length1;
length_[2] = length2;
length_[3] = length3;
length_[4] = length4;
length_[5] = length5;
length_[6] = length6;
length_[7] = length7;
length_[8] = length8;
length_[9] = length9;
setupStorage(9);
}
Array(int length0, int length1, int length2, int length3, int length4,
int length5, int length6, int length7, int length8, int length9,
int length10,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
BZPRECONDITION(N_rank >= 11);
length_[0] = length0;
length_[1] = length1;
length_[2] = length2;
length_[3] = length3;
length_[4] = length4;
length_[5] = length5;
length_[6] = length6;
length_[7] = length7;
length_[8] = length8;
length_[9] = length9;
length_[10] = length10;
setupStorage(10);
}
/*
* Construct an array from an existing block of memory. Ownership
* is not acquired (this is provided for backwards compatibility).
*/
Array(T_numtype* restrict dataFirst, TinyVector<int, N_rank> shape,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: MemoryBlockReference<T_numtype>(product(shape), dataFirst,
neverDeleteData),
storage_(storage)
{
BZPRECONDITION(dataFirst != 0);
length_ = shape;
computeStrides();
data_ += zeroOffset_;
}
/*
* Construct an array from an existing block of memory, with a
* given set of strides. Ownership is not acquired (i.e. the memory
* block will not be freed by Blitz++).
*/
Array(T_numtype* restrict dataFirst, TinyVector<int, N_rank> shape,
TinyVector<int, N_rank> stride,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: MemoryBlockReference<T_numtype>(product(shape), dataFirst,
neverDeleteData),
storage_(storage)
{
BZPRECONDITION(dataFirst != 0);
length_ = shape;
stride_ = stride;
calculateZeroOffset();
data_ += zeroOffset_;
}
/*
* Construct an array from an existing block of memory.
*/
Array(T_numtype* restrict dataFirst, TinyVector<int, N_rank> shape,
preexistingMemoryPolicy deletionPolicy,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: MemoryBlockReference<T_numtype>(product(shape), dataFirst,
deletionPolicy),
storage_(storage)
{
BZPRECONDITION(dataFirst != 0);
length_ = shape;
computeStrides();
data_ += zeroOffset_;
if (deletionPolicy == duplicateData)
reference(copy());
}
/*
* Construct an array from an existing block of memory, with a
* given set of strides.
*/
Array(T_numtype* restrict dataFirst, TinyVector<int, N_rank> shape,
TinyVector<int, N_rank> stride,
preexistingMemoryPolicy deletionPolicy,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: MemoryBlockReference<T_numtype>(product(shape), dataFirst,
deletionPolicy),
storage_(storage)
{
BZPRECONDITION(dataFirst != 0);
length_ = shape;
stride_ = stride;
calculateZeroOffset();
data_ += zeroOffset_;
if (deletionPolicy == duplicateData)
reference(copy());
}
/*
* This constructor takes an extent (length) vector and storage format.
*/
Array(const TinyVector<int, N_rank>& extent,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
length_ = extent;
setupStorage(N_rank - 1);
}
/*
* This construct takes a vector of bases (lbounds) and a vector of
* extents.
*/
Array(const TinyVector<int, N_rank>& lbounds,
const TinyVector<int, N_rank>& extent,
const GeneralArrayStorage<N_rank>& storage
= GeneralArrayStorage<N_rank>());
/*
* These constructors allow arbitrary bases (starting indices) to be set.
* e.g. Array<int,2> A(Range(10,20), Range(20,30))
* will create an 11x11 array whose indices are 10..20 and 20..30
*/
Array(Range r0,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
BZPRECONDITION(r0.isAscendingContiguous());
length_[0] = r0.length();
storage_.setBase(0, r0.first());
setupStorage(0);
}
Array(Range r0, Range r1,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
BZPRECONDITION(r0.isAscendingContiguous() &&
r1.isAscendingContiguous());
length_[0] = r0.length();
storage_.setBase(0, r0.first());
length_[1] = r1.length();
storage_.setBase(1, r1.first());
setupStorage(1);
}
Array(Range r0, Range r1, Range r2,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
BZPRECONDITION(r0.isAscendingContiguous() &&
r1.isAscendingContiguous() && r2.isAscendingContiguous());
length_[0] = r0.length();
storage_.setBase(0, r0.first());
length_[1] = r1.length();
storage_.setBase(1, r1.first());
length_[2] = r2.length();
storage_.setBase(2, r2.first());
setupStorage(2);
}
Array(Range r0, Range r1, Range r2, Range r3,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
BZPRECONDITION(r0.isAscendingContiguous() &&
r1.isAscendingContiguous() && r2.isAscendingContiguous()
&& r3.isAscendingContiguous());
length_[0] = r0.length();
storage_.setBase(0, r0.first());
length_[1] = r1.length();
storage_.setBase(1, r1.first());
length_[2] = r2.length();
storage_.setBase(2, r2.first());
length_[3] = r3.length();
storage_.setBase(3, r3.first());
setupStorage(3);
}
Array(Range r0, Range r1, Range r2, Range r3, Range r4,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
BZPRECONDITION(r0.isAscendingContiguous() &&
r1.isAscendingContiguous() && r2.isAscendingContiguous()
&& r3.isAscendingContiguous() && r4.isAscendingContiguous());
length_[0] = r0.length();
storage_.setBase(0, r0.first());
length_[1] = r1.length();
storage_.setBase(1, r1.first());
length_[2] = r2.length();
storage_.setBase(2, r2.first());
length_[3] = r3.length();
storage_.setBase(3, r3.first());
length_[4] = r4.length();
storage_.setBase(4, r4.first());
setupStorage(4);
}
Array(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
BZPRECONDITION(r0.isAscendingContiguous() &&
r1.isAscendingContiguous() && r2.isAscendingContiguous()
&& r3.isAscendingContiguous() && r4.isAscendingContiguous()
&& r5.isAscendingContiguous());
length_[0] = r0.length();
storage_.setBase(0, r0.first());
length_[1] = r1.length();
storage_.setBase(1, r1.first());
length_[2] = r2.length();
storage_.setBase(2, r2.first());
length_[3] = r3.length();
storage_.setBase(3, r3.first());
length_[4] = r4.length();
storage_.setBase(4, r4.first());
length_[5] = r5.length();
storage_.setBase(5, r5.first());
setupStorage(5);
}
Array(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5,
Range r6,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
BZPRECONDITION(r0.isAscendingContiguous() &&
r1.isAscendingContiguous() && r2.isAscendingContiguous()
&& r3.isAscendingContiguous() && r4.isAscendingContiguous()
&& r5.isAscendingContiguous() && r6.isAscendingContiguous());
length_[0] = r0.length();
storage_.setBase(0, r0.first());
length_[1] = r1.length();
storage_.setBase(1, r1.first());
length_[2] = r2.length();
storage_.setBase(2, r2.first());
length_[3] = r3.length();
storage_.setBase(3, r3.first());
length_[4] = r4.length();
storage_.setBase(4, r4.first());
length_[5] = r5.length();
storage_.setBase(5, r5.first());
length_[6] = r6.length();
storage_.setBase(6, r6.first());
setupStorage(6);
}
Array(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5,
Range r6, Range r7,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
BZPRECONDITION(r0.isAscendingContiguous() &&
r1.isAscendingContiguous() && r2.isAscendingContiguous()
&& r3.isAscendingContiguous() && r4.isAscendingContiguous()
&& r5.isAscendingContiguous() && r6.isAscendingContiguous()
&& r7.isAscendingContiguous());
length_[0] = r0.length();
storage_.setBase(0, r0.first());
length_[1] = r1.length();
storage_.setBase(1, r1.first());
length_[2] = r2.length();
storage_.setBase(2, r2.first());
length_[3] = r3.length();
storage_.setBase(3, r3.first());
length_[4] = r4.length();
storage_.setBase(4, r4.first());
length_[5] = r5.length();
storage_.setBase(5, r5.first());
length_[6] = r6.length();
storage_.setBase(6, r6.first());
length_[7] = r7.length();
storage_.setBase(7, r7.first());
setupStorage(7);
}
Array(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5,
Range r6, Range r7, Range r8,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
BZPRECONDITION(r0.isAscendingContiguous() &&
r1.isAscendingContiguous() && r2.isAscendingContiguous()
&& r3.isAscendingContiguous() && r4.isAscendingContiguous()
&& r5.isAscendingContiguous() && r6.isAscendingContiguous()
&& r7.isAscendingContiguous() && r8.isAscendingContiguous());
length_[0] = r0.length();
storage_.setBase(0, r0.first());
length_[1] = r1.length();
storage_.setBase(1, r1.first());
length_[2] = r2.length();
storage_.setBase(2, r2.first());
length_[3] = r3.length();
storage_.setBase(3, r3.first());
length_[4] = r4.length();
storage_.setBase(4, r4.first());
length_[5] = r5.length();
storage_.setBase(5, r5.first());
length_[6] = r6.length();
storage_.setBase(6, r6.first());
length_[7] = r7.length();
storage_.setBase(7, r7.first());
length_[8] = r8.length();
storage_.setBase(8, r8.first());
setupStorage(8);
}
Array(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5,
Range r6, Range r7, Range r8, Range r9,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
BZPRECONDITION(r0.isAscendingContiguous() &&
r1.isAscendingContiguous() && r2.isAscendingContiguous()
&& r3.isAscendingContiguous() && r4.isAscendingContiguous()
&& r5.isAscendingContiguous() && r6.isAscendingContiguous()
&& r7.isAscendingContiguous() && r8.isAscendingContiguous()
&& r9.isAscendingContiguous());
length_[0] = r0.length();
storage_.setBase(0, r0.first());
length_[1] = r1.length();
storage_.setBase(1, r1.first());
length_[2] = r2.length();
storage_.setBase(2, r2.first());
length_[3] = r3.length();
storage_.setBase(3, r3.first());
length_[4] = r4.length();
storage_.setBase(4, r4.first());
length_[5] = r5.length();
storage_.setBase(5, r5.first());
length_[6] = r6.length();
storage_.setBase(6, r6.first());
length_[7] = r7.length();
storage_.setBase(7, r7.first());
length_[8] = r8.length();
storage_.setBase(8, r8.first());
length_[9] = r9.length();
storage_.setBase(9, r9.first());
setupStorage(9);
}
Array(Range r0, Range r1, Range r2, Range r3, Range r4, Range r5,
Range r6, Range r7, Range r8, Range r9, Range r10,
GeneralArrayStorage<N_rank> storage = GeneralArrayStorage<N_rank>())
: storage_(storage)
{
BZPRECONDITION(r0.isAscendingContiguous() &&
r1.isAscendingContiguous() && r2.isAscendingContiguous()
&& r3.isAscendingContiguous() && r4.isAscendingContiguous()
&& r5.isAscendingContiguous() && r6.isAscendingContiguous()
&& r7.isAscendingContiguous() && r8.isAscendingContiguous()
&& r9.isAscendingContiguous() && r10.isAscendingContiguous());
length_[0] = r0.length();
storage_.setBase(0, r0.first());
length_[1] = r1.length();
storage_.setBase(1, r1.first());
length_[2] = r2.length();
storage_.setBase(2, r2.first());
length_[3] = r3.length();
storage_.setBase(3, r3.first());
length_[4] = r4.length();
storage_.setBase(4, r4.first());
length_[5] = r5.length();
storage_.setBase(5, r5.first());
length_[6] = r6.length();
storage_.setBase(6, r6.first());
length_[7] = r7.length();
storage_.setBase(7, r7.first());
length_[8] = r8.length();
storage_.setBase(8, r8.first());
length_[9] = r9.length();
storage_.setBase(9, r9.first());
length_[10] = r10.length();
storage_.setBase(10, r10.first());
setupStorage(10);
}
/*
* Create a reference of another array
*/
Array(const Array<T_numtype, N_rank>& array)
#ifdef BZ_NEW_EXPRESSION_TEMPLATES
: MemoryBlockReference<T_numtype>(),
ETBase< Array<T_numtype, N_rank> >(array)
#else
: MemoryBlockReference<T_numtype>()
#endif
{
// NEEDS_WORK: this const_cast is a tad ugly.
reference(const_cast<T_array&>(array));
}
/*
* These constructors are used for creating interlaced arrays (see
* <blitz/arrayshape.h>
*/
Array(const TinyVector<int,N_rank-1>& shape,
int lastExtent, const GeneralArrayStorage<N_rank>& storage);
//Array(const TinyVector<Range,N_rank-1>& shape,
// int lastExtent, const GeneralArrayStorage<N_rank>& storage);
/*
* These constructors make the array a view of a subportion of another
* array. If there fewer than N_rank Range arguments provided, no
* slicing is performed in the unspecified ranks.
* e.g. Array<int,3> A(20,20,20);
* Array<int,3> B(A, Range(5,15));
* is equivalent to:
* Array<int,3> B(A, Range(5,15), Range::all(), Range::all());
*/
Array(Array<T_numtype, N_rank>& array, Range r0)
{
constructSubarray(array, r0);
}
Array(Array<T_numtype, N_rank>& array, Range r0, Range r1)
{
constructSubarray(array, r0, r1);
}
Array(Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2)
{
constructSubarray(array, r0, r1, r2);
}
Array(Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2,
Range r3)
{
constructSubarray(array, r0, r1, r2, r3);
}
Array(Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2,
Range r3, Range r4)
{
constructSubarray(array, r0, r1, r2, r3, r4);
}
Array(Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2,
Range r3, Range r4, Range r5)
{
constructSubarray(array, r0, r1, r2, r3, r4, r5);
}
Array(Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2,
Range r3, Range r4, Range r5, Range r6)
{
constructSubarray(array, r0, r1, r2, r3, r4, r5, r6);
}
Array(Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2,
Range r3, Range r4, Range r5, Range r6, Range r7)
{
constructSubarray(array, r0, r1, r2, r3, r4, r5, r6, r7);
}
Array(Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2,
Range r3, Range r4, Range r5, Range r6, Range r7, Range r8)
{
constructSubarray(array, r0, r1, r2, r3, r4, r5, r6, r7, r8);
}
Array(Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2,
Range r3, Range r4, Range r5, Range r6, Range r7, Range r8, Range r9)
{
constructSubarray(array, r0, r1, r2, r3, r4, r5, r6, r7, r8, r9);
}
Array(Array<T_numtype, N_rank>& array, Range r0, Range r1, Range r2,
Range r3, Range r4, Range r5, Range r6, Range r7, Range r8, Range r9,
Range r10)
{
constructSubarray(array, r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10);
}
Array(Array<T_numtype, N_rank>& array,
const RectDomain<N_rank>& subdomain)
{
constructSubarray(array, subdomain);
}
/* Constructor added by Julian Cummings */
Array(Array<T_numtype, N_rank>& array,
const StridedDomain<N_rank>& subdomain)
{
constructSubarray(array, subdomain);
}
/*
* This constructor is invoked by the operator()'s which take
* a combination of integer and Range arguments. It's not intended
* for end-user use.
*/
template<int N_rank2, typename R0, typename R1, typename R2, typename R3, typename R4,
typename R5, typename R6, typename R7, typename R8, typename R9, typename R10>
Array(Array<T_numtype,N_rank2>& array, R0 r0, R1 r1, R2 r2,
R3 r3, R4 r4, R5 r5, R6 r6, R7 r7, R8 r8, R9 r9, R10 r10)
{
constructSlice(array, r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10);
}
//////////////////////////////////////////////
// Member functions
//////////////////////////////////////////////
const TinyVector<int, N_rank>& base() const
{ return storage_.base(); }
int base(int rank) const
{ return storage_.base(rank); }
iterator begin()
{ return iterator(*this); }
const_iterator begin() const
{ return const_iterator(*this); }
T_iterator beginFast() const
{ return T_iterator(*this); }
// Deprecated: now extractComponent(...)
template<typename P_numtype2>
Array<P_numtype2,N_rank> chopComponent(P_numtype2 a, int compNum,
int numComponents) const
{ return extractComponent(a, compNum, numComponents); }
int cols() const
{ return length_[1]; }
int columns() const
{ return length_[1]; }
T_array copy() const;
// data_ always refers to the point (0,0,...,0) which may
// not be in the array if the base is not zero in each rank.
// These data() routines return a pointer to the first
// element in the array (but note that it may not be
// stored first in memory if some ranks are stored descending).
int dataOffset() const
{
return dot(storage_.base(), stride_);
}
const T_numtype* restrict data() const
{ return data_ + dataOffset(); }
T_numtype* restrict data()
{ return data_ + dataOffset(); }
// These dataZero() routines refer to the point (0,0,...,0)
// which may not be in the array if the bases are nonzero.
const T_numtype* restrict dataZero() const
{ return data_; }
T_numtype* restrict dataZero()
{ return data_; }
// These dataFirst() routines refer to the element in the
// array which falls first in memory.
int dataFirstOffset() const
{
int pos = 0;
// Used to use tinyvector expressions:
// return data_ + dot(storage_.base()
// + (1 - storage_.ascendingFlag()) * (length_ - 1), stride_);
for (int i=0; i < N_rank; ++i)
pos += (storage_.base(i) + (1-storage_.isRankStoredAscending(i)) *
(length_(i)-1)) * stride_(i);
return pos;
}
const T_numtype* restrict dataFirst() const
{
return data_ + dataFirstOffset();
}
T_numtype* restrict dataFirst()
{
return data_ + dataFirstOffset();
}
int depth() const
{ return length_[2]; }
int dimensions() const
{ return N_rank; }
RectDomain<N_rank> domain() const
{
return RectDomain<N_rank>(lbound(), ubound());
}
void dumpStructureInformation(ostream& os = cout) const;
iterator end()
{
return iterator();
}
const_iterator end() const
{
return const_iterator();
}
int extent(int rank) const
{ return length_[rank]; }
const TinyVector<int,N_rank>& extent() const
{ return length_; }
template<typename P_numtype2>
Array<P_numtype2,N_rank> extractComponent(P_numtype2, int compNum,
int numComponents) const;
void free()
{
changeToNullBlock();
length_ = 0;
}
bool isMajorRank(int rank) const { return storage_.ordering(rank) == 0; }
bool isMinorRank(int rank) const { return storage_.ordering(rank) != 0; }
bool isRankStoredAscending(int rank) const {
return storage_.isRankStoredAscending(rank);
}
bool isStorageContiguous() const;
int lbound(int rank) const { return base(rank); }
TinyVector<int,N_rank> lbound() const { return base(); }
int length(int rank) const { return length_[rank]; }
const TinyVector<int, N_rank>& length() const { return length_; }
void makeUnique();
int numElements() const { return product(length_); }
// NEEDS_WORK -- Expose the numReferences() method
// MemoryBlockReference<T_numtype>::numReferences;
// The storage_.ordering_ array is a list of dimensions from
// the most minor (stride 1) to major dimension. Generally,
// ordering(0) will return the dimension which has the smallest
// stride, and ordering(N_rank-1) will return the dimension with
// the largest stride.
int ordering(int storageRankIndex) const
{ return storage_.ordering(storageRankIndex); }
const TinyVector<int, N_rank>& ordering() const
{ return storage_.ordering(); }
void transposeSelf(int r0, int r1, int r2=0,
int r3=0, int r4=0, int r5=0, int r6=0, int r7=0, int r8=0, int
r9=0, int r10=0);
T_array transpose(int r0, int r1, int r2=0,
int r3=0, int r4=0, int r5=0, int r6=0, int r7=0, int r8=0, int
r9=0, int r10=0);
int rank() const
{ return N_rank; }
void reference(const T_array&);
// Added by Derrick Bass
T_array reindex(const TinyVector<int,N_rank>&);
void reindexSelf(const
TinyVector<int,N_rank>&);
void resize(int extent);
void resize(int extent1, int extent2);
void resize(int extent1, int extent2,
int extent3);
void resize(int extent1, int extent2,
int extent3, int extent4);
void resize(int extent1, int extent2,
int extent3, int extent4, int extent5);
void resize(int extent1, int extent2,
int extent3, int extent4, int extent5,
int extent6);
void resize(int extent1, int extent2,
int extent3, int extent4, int extent5,
int extent6, int extent7);
void resize(int extent1, int extent2,
int extent3, int extent4, int extent5,
int extent6, int extent7, int extent8);
void resize(int extent1, int extent2,
int extent3, int extent4, int extent5,
int extent6, int extent7, int extent8,
int extent9);
void resize(int extent1, int extent2,
int extent3, int extent4, int extent5,
int extent6, int extent7, int extent8,
int extent9, int extent10);
void resize(int extent1, int extent2,
int extent3, int extent4, int extent5,
int extent6, int extent7, int extent8,
int extent9, int extent10,
int extent11);
void resize(Range r1);
void resize(Range r1, Range r2);
void resize(Range r1, Range r2, Range r3);
void resize(Range r1, Range r2, Range r3,
Range r4);
void resize(Range r1, Range r2, Range r3,
Range r4, Range r5);
void resize(Range r1, Range r2, Range r3,
Range r4, Range r5, Range r6);
void resize(Range r1, Range r2, Range r3,
Range r4, Range r5, Range r6,
Range r7);
void resize(Range r1, Range r2, Range r3,
Range r4, Range r5, Range r6,
Range r7, Range r8);
void resize(Range r1, Range r2, Range r3,
Range r4, Range r5, Range r6,
Range r7, Range r8, Range r9);
void resize(Range r1, Range r2, Range r3,
Range r4, Range r5, Range r6,
Range r7, Range r8, Range r9,
Range r10);
void resize(Range r1, Range r2, Range r3,
Range r4, Range r5, Range r6,
Range r7, Range r8, Range r9,
Range r10, Range r11);
void resize(const TinyVector<int,N_rank>&);
void resizeAndPreserve(const TinyVector<int,
N_rank>&);
void resizeAndPreserve(int extent);
void resizeAndPreserve(int extent1,
int extent2);
void resizeAndPreserve(int extent1,
int extent2, int extent3);
void resizeAndPreserve(int extent1,
int extent2, int extent3, int extent4);
void resizeAndPreserve(int extent1,
int extent2, int extent3, int extent4,
int extent5);
void resizeAndPreserve(int extent1,
int extent2, int extent3, int extent4,
int extent5, int extent6);
void resizeAndPreserve(int extent1,
int extent2, int extent3, int extent4,
int extent5, int extent6, int extent7);
void resizeAndPreserve(int extent1,
int extent2, int extent3, int extent4,
int extent5, int extent6, int extent7,
int extent8);
void resizeAndPreserve(int extent1,
int extent2, int extent3, int extent4,
int extent5, int extent6, int extent7,
int extent8, int extent9);
void resizeAndPreserve(int extent1,
int extent2, int extent3, int extent4,
int extent5, int extent6, int extent7,
int extent8, int extent9,
int extent10);
void resizeAndPreserve(int extent1,
int extent2, int extent3, int extent4,
int extent5, int extent6, int extent7,
int extent8, int extent9, int extent10,
int extent11);
// NEEDS_WORK -- resizeAndPreserve(Range,...)
// NEEDS_WORK -- resizeAndPreserve(const Domain<N_rank>&);
T_array reverse(int rank);
void reverseSelf(int rank);
int rows() const
{ return length_[0]; }
void setStorage(GeneralArrayStorage<N_rank>);
void slice(int rank, Range r);
const TinyVector<int, N_rank>& shape() const
{ return length_; }
int size() const
{ return numElements(); }
const TinyVector<int, N_rank>& stride() const
{ return stride_; }
int stride(int rank) const
{ return stride_[rank]; }
int ubound(int rank) const
{ return base(rank) + length_(rank) - 1; }
TinyVector<int, N_rank> ubound() const
{
TinyVector<int, N_rank> ub;
for (int i=0; i < N_rank; ++i)
ub(i) = base(i) + extent(i) - 1;
// WAS: ub = base() + extent() - 1;
return ub;
}
int zeroOffset() const
{ return zeroOffset_; }
//////////////////////////////////////////////
// Debugging routines
//////////////////////////////////////////////
bool isInRangeForDim(int i, int d) const {
return i >= base(d) && (i - base(d)) < length_[d];
}
bool isInRange(int i0) const {
return i0 >= base(0) && (i0 - base(0)) < length_[0];
}
bool isInRange(int i0, int i1) const {
return i0 >= base(0) && (i0 - base(0)) < length_[0]
&& i1 >= base(1) && (i1 - base(1)) < length_[1];
}
bool isInRange(int i0, int i1, int i2) const {
return i0 >= base(0) && (i0 - base(0)) < length_[0]
&& i1 >= base(1) && (i1 - base(1)) < length_[1]
&& i2 >= base(2) && (i2 - base(2)) < length_[2];
}
bool isInRange(int i0, int i1, int i2, int i3) const {
return i0 >= base(0) && (i0 - base(0)) < length_[0]
&& i1 >= base(1) && (i1 - base(1)) < length_[1]
&& i2 >= base(2) && (i2 - base(2)) < length_[2]
&& i3 >= base(3) && (i3 - base(3)) < length_[3];
}
bool isInRange(int i0, int i1, int i2, int i3, int i4) const {
return i0 >= base(0) && (i0 - base(0)) < length_[0]
&& i1 >= base(1) && (i1 - base(1)) < length_[1]
&& i2 >= base(2) && (i2 - base(2)) < length_[2]
&& i3 >= base(3) && (i3 - base(3)) < length_[3]
&& i4 >= base(4) && (i4 - base(4)) < length_[4];
}
bool isInRange(int i0, int i1, int i2, int i3, int i4, int i5) const {
return i0 >= base(0) && (i0 - base(0)) < length_[0]
&& i1 >= base(1) && (i1 - base(1)) < length_[1]
&& i2 >= base(2) && (i2 - base(2)) < length_[2]
&& i3 >= base(3) && (i3 - base(3)) < length_[3]
&& i4 >= base(4) && (i4 - base(4)) < length_[4]
&& i5 >= base(5) && (i5 - base(5)) < length_[5];
}
bool isInRange(int i0, int i1, int i2, int i3, int i4, int i5, int i6) const {
return i0 >= base(0) && (i0 - base(0)) < length_[0]
&& i1 >= base(1) && (i1 - base(1)) < length_[1]
&& i2 >= base(2) && (i2 - base(2)) < length_[2]
&& i3 >= base(3) && (i3 - base(3)) < length_[3]
&& i4 >= base(4) && (i4 - base(4)) < length_[4]
&& i5 >= base(5) && (i5 - base(5)) < length_[5]
&& i6 >= base(6) && (i6 - base(6)) < length_[6];
}
bool isInRange(int i0, int i1, int i2, int i3, int i4,
int i5, int i6, int i7) const {
return i0 >= base(0) && (i0 - base(0)) < length_[0]
&& i1 >= base(1) && (i1 - base(1)) < length_[1]
&& i2 >= base(2) && (i2 - base(2)) < length_[2]
&& i3 >= base(3) && (i3 - base(3)) < length_[3]
&& i4 >= base(4) && (i4 - base(4)) < length_[4]
&& i5 >= base(5) && (i5 - base(5)) < length_[5]
&& i6 >= base(6) && (i6 - base(6)) < length_[6]
&& i7 >= base(7) && (i7 - base(7)) < length_[7];
}
bool isInRange(int i0, int i1, int i2, int i3, int i4,
int i5, int i6, int i7, int i8) const {
return i0 >= base(0) && (i0 - base(0)) < length_[0]
&& i1 >= base(1) && (i1 - base(1)) < length_[1]
&& i2 >= base(2) && (i2 - base(2)) < length_[2]
&& i3 >= base(3) && (i3 - base(3)) < length_[3]
&& i4 >= base(4) && (i4 - base(4)) < length_[4]
&& i5 >= base(5) && (i5 - base(5)) < length_[5]
&& i6 >= base(6) && (i6 - base(6)) < length_[6]
&& i7 >= base(7) && (i7 - base(7)) < length_[7]
&& i8 >= base(8) && (i8 - base(8)) < length_[8];
}
bool isInRange(int i0, int i1, int i2, int i3, int i4,
int i5, int i6, int i7, int i8, int i9) const {
return i0 >= base(0) && (i0 - base(0)) < length_[0]
&& i1 >= base(1) && (i1 - base(1)) < length_[1]
&& i2 >= base(2) && (i2 - base(2)) < length_[2]
&& i3 >= base(3) && (i3 - base(3)) < length_[3]
&& i4 >= base(4) && (i4 - base(4)) < length_[4]
&& i5 >= base(5) && (i5 - base(5)) < length_[5]
&& i6 >= base(6) && (i6 - base(6)) < length_[6]
&& i7 >= base(7) && (i7 - base(7)) < length_[7]
&& i8 >= base(8) && (i8 - base(8)) < length_[8]
&& i9 >= base(9) && (i9 - base(9)) < length_[9];
}
bool isInRange(int i0, int i1, int i2, int i3, int i4,
int i5, int i6, int i7, int i8, int i9, int i10) const {
return i0 >= base(0) && (i0 - base(0)) < length_[0]
&& i1 >= base(1) && (i1 - base(1)) < length_[1]
&& i2 >= base(2) && (i2 - base(2)) < length_[2]
&& i3 >= base(3) && (i3 - base(3)) < length_[3]
&& i4 >= base(4) && (i4 - base(4)) < length_[4]
&& i5 >= base(5) && (i5 - base(5)) < length_[5]
&& i6 >= base(6) && (i6 - base(6)) < length_[6]
&& i7 >= base(7) && (i7 - base(7)) < length_[7]
&& i8 >= base(8) && (i8 - base(8)) < length_[8]
&& i9 >= base(9) && (i9 - base(9)) < length_[9]
&& i10 >= base(10) && (i10 - base(10)) < length_[10];
}
bool isInRange(const T_index& index) const {
for (int i=0; i < N_rank; ++i)
if (index[i] < base(i) || (index[i] - base(i)) >= length_[i])
return false;
return true;
}
bool assertInRange(const T_index& BZ_DEBUG_PARAM(index)) const {
BZPRECHECK(isInRange(index), "Array index out of range: " << index
<< endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl);
return true;
}
bool assertInRange(int BZ_DEBUG_PARAM(i0)) const {
BZPRECHECK(isInRange(i0), "Array index out of range: " << i0
<< endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl);
return true;
}
bool assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1)) const {
BZPRECHECK(isInRange(i0,i1), "Array index out of range: ("
<< i0 << ", " << i1 << ")"
<< endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl);
return true;
}
bool assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1),
int BZ_DEBUG_PARAM(i2)) const
{
BZPRECHECK(isInRange(i0,i1,i2), "Array index out of range: ("
<< i0 << ", " << i1 << ", " << i2 << ")"
<< endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl);
return true;
}
bool assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1),
int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3)) const
{
BZPRECHECK(isInRange(i0,i1,i2,i3), "Array index out of range: ("
<< i0 << ", " << i1 << ", " << i2 << ", " << i3 << ")"
<< endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl);
return true;
}
bool assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1),
int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3),
int BZ_DEBUG_PARAM(i4)) const
{
BZPRECHECK(isInRange(i0,i1,i2,i3,i4), "Array index out of range: ("
<< i0 << ", " << i1 << ", " << i2 << ", " << i3
<< ", " << i4 << ")"
<< endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl);
return true;
}
bool assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1),
int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3), int BZ_DEBUG_PARAM(i4),
int BZ_DEBUG_PARAM(i5)) const
{
BZPRECHECK(isInRange(i0,i1,i2,i3,i4,i5), "Array index out of range: ("
<< i0 << ", " << i1 << ", " << i2 << ", " << i3
<< ", " << i4 << ", " << i5 << ")"
<< endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl);
return true;
}
bool assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1),
int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3), int BZ_DEBUG_PARAM(i4),
int BZ_DEBUG_PARAM(i5), int BZ_DEBUG_PARAM(i6)) const
{
BZPRECHECK(isInRange(i0,i1,i2,i3,i4,i5,i6),
"Array index out of range: ("
<< i0 << ", " << i1 << ", " << i2 << ", " << i3
<< ", " << i4 << ", " << i5 << ", " << i6 << ")"
<< endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl);
return true;
}
bool assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1),
int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3), int BZ_DEBUG_PARAM(i4),
int BZ_DEBUG_PARAM(i5), int BZ_DEBUG_PARAM(i6),
int BZ_DEBUG_PARAM(i7)) const
{
BZPRECHECK(isInRange(i0,i1,i2,i3,i4,i5,i6,i7),
"Array index out of range: ("
<< i0 << ", " << i1 << ", " << i2 << ", " << i3
<< ", " << i4 << ", " << i5 << ", " << i6 << ", " << i7 << ")"
<< endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl);
return true;
}
bool assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1),
int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3), int BZ_DEBUG_PARAM(i4),
int BZ_DEBUG_PARAM(i5), int BZ_DEBUG_PARAM(i6), int BZ_DEBUG_PARAM(i7),
int BZ_DEBUG_PARAM(i8)) const
{
BZPRECHECK(isInRange(i0,i1,i2,i3,i4,i5,i6,i7,i8),
"Array index out of range: ("
<< i0 << ", " << i1 << ", " << i2 << ", " << i3
<< ", " << i4 << ", " << i5 << ", " << i6 << ", " << i7
<< ", " << i8 << ")"
<< endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl);
return true;
}
bool assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1),
int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3), int BZ_DEBUG_PARAM(i4),
int BZ_DEBUG_PARAM(i5), int BZ_DEBUG_PARAM(i6), int BZ_DEBUG_PARAM(i7),
int BZ_DEBUG_PARAM(i8), int BZ_DEBUG_PARAM(i9)) const
{
BZPRECHECK(isInRange(i0,i1,i2,i3,i4,i5,i6,i7,i8,i9),
"Array index out of range: ("
<< i0 << ", " << i1 << ", " << i2 << ", " << i3
<< ", " << i4 << ", " << i5 << ", " << i6 << ", " << i7
<< ", " << i8 << ", " << i9 << ")"
<< endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl);
return true;
}
bool assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1),
int BZ_DEBUG_PARAM(i2), int BZ_DEBUG_PARAM(i3), int BZ_DEBUG_PARAM(i4),
int BZ_DEBUG_PARAM(i5), int BZ_DEBUG_PARAM(i6), int BZ_DEBUG_PARAM(i7),
int BZ_DEBUG_PARAM(i8), int BZ_DEBUG_PARAM(i9),
int BZ_DEBUG_PARAM(i10)) const
{
BZPRECHECK(isInRange(i0,i1,i2,i3,i4,i5,i6,i7,i8,i9,i10),
"Array index out of range: ("
<< i0 << ", " << i1 << ", " << i2 << ", " << i3
<< ", " << i4 << ", " << i5 << ", " << i6 << ", " << i7
<< ", " << i8 << ", " << i9 << ", " << i10 << ")"
<< endl << "Lower bounds: " << storage_.base() << endl
<< "Length: " << length_ << endl);
return true;
}
//////////////////////////////////////////////
// Subscripting operators
//////////////////////////////////////////////
template<int N_rank2>
const T_numtype& restrict operator()(const TinyVector<int,N_rank2>& index) const
{
assertInRange(index);
return data_[dot(index, stride_)];
}
template<int N_rank2>
T_numtype& restrict operator()(const TinyVector<int,N_rank2>& index)
{
assertInRange(index);
return data_[dot(index, stride_)];
}
const T_numtype& restrict operator()(TinyVector<int,1> index) const
{
assertInRange(index[0]);
return data_[index[0] * stride_[0]];
}
T_numtype& operator()(TinyVector<int,1> index)
{
assertInRange(index[0]);
return data_[index[0] * stride_[0]];
}
const T_numtype& restrict operator()(TinyVector<int,2> index) const
{
assertInRange(index[0], index[1]);
return data_[index[0] * stride_[0] + index[1] * stride_[1]];
}
T_numtype& operator()(TinyVector<int,2> index)
{
assertInRange(index[0], index[1]);
return data_[index[0] * stride_[0] + index[1] * stride_[1]];
}
const T_numtype& restrict operator()(TinyVector<int,3> index) const
{
assertInRange(index[0], index[1], index[2]);
return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2]];
}
T_numtype& operator()(TinyVector<int,3> index)
{
assertInRange(index[0], index[1], index[2]);
return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2]];
}
const T_numtype& restrict operator()(const TinyVector<int,4>& index) const
{
assertInRange(index[0], index[1], index[2], index[3]);
return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3]];
}
T_numtype& operator()(const TinyVector<int,4>& index)
{
assertInRange(index[0], index[1], index[2], index[3]);
return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3]];
}
const T_numtype& restrict operator()(const TinyVector<int,5>& index) const
{
assertInRange(index[0], index[1], index[2], index[3],
index[4]);
return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4]];
}
T_numtype& operator()(const TinyVector<int,5>& index)
{
assertInRange(index[0], index[1], index[2], index[3],
index[4]);
return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4]];
}
const T_numtype& restrict operator()(const TinyVector<int,6>& index) const
{
assertInRange(index[0], index[1], index[2], index[3],
index[4], index[5]);
return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5]];
}
T_numtype& operator()(const TinyVector<int,6>& index)
{
assertInRange(index[0], index[1], index[2], index[3],
index[4], index[5]);
return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5]];
}
const T_numtype& restrict operator()(const TinyVector<int,7>& index) const
{
assertInRange(index[0], index[1], index[2], index[3],
index[4], index[5], index[6]);
return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5]
+ index[6] * stride_[6]];
}
T_numtype& operator()(const TinyVector<int,7>& index)
{
assertInRange(index[0], index[1], index[2], index[3],
index[4], index[5], index[6]);
return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5]
+ index[6] * stride_[6]];
}
const T_numtype& restrict operator()(const TinyVector<int,8>& index) const
{
assertInRange(index[0], index[1], index[2], index[3],
index[4], index[5], index[6], index[7]);
return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5]
+ index[6] * stride_[6] + index[7] * stride_[7]];
}
T_numtype& operator()(const TinyVector<int,8>& index)
{
assertInRange(index[0], index[1], index[2], index[3],
index[4], index[5], index[6], index[7]);
return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5]
+ index[6] * stride_[6] + index[7] * stride_[7]];
}
const T_numtype& restrict operator()(const TinyVector<int,9>& index) const
{
assertInRange(index[0], index[1], index[2], index[3],
index[4], index[5], index[6], index[7], index[8]);
return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5]
+ index[6] * stride_[6] + index[7] * stride_[7]
+ index[8] * stride_[8]];
}
T_numtype& operator()(const TinyVector<int,9>& index)
{
assertInRange(index[0], index[1], index[2], index[3],
index[4], index[5], index[6], index[7], index[8]);
return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5]
+ index[6] * stride_[6] + index[7] * stride_[7]
+ index[8] * stride_[8]];
}
const T_numtype& restrict operator()(const TinyVector<int,10>& index) const
{
assertInRange(index[0], index[1], index[2], index[3],
index[4], index[5], index[6], index[7], index[8], index[9]);
return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5]
+ index[6] * stride_[6] + index[7] * stride_[7]
+ index[8] * stride_[8] + index[9] * stride_[9]];
}
T_numtype& operator()(const TinyVector<int,10>& index)
{
assertInRange(index[0], index[1], index[2], index[3],
index[4], index[5], index[6], index[7], index[8], index[9]);
return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5]
+ index[6] * stride_[6] + index[7] * stride_[7]
+ index[8] * stride_[8] + index[9] * stride_[9]];
}
const T_numtype& restrict operator()(const TinyVector<int,11>& index) const
{
assertInRange(index[0], index[1], index[2], index[3],
index[4], index[5], index[6], index[7], index[8], index[9],
index[10]);
return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5]
+ index[6] * stride_[6] + index[7] * stride_[7]
+ index[8] * stride_[8] + index[9] * stride_[9]
+ index[10] * stride_[10]];
}
T_numtype& operator()(const TinyVector<int,11>& index)
{
assertInRange(index[0], index[1], index[2], index[3],
index[4], index[5], index[6], index[7], index[8], index[9],
index[10]);
return data_[index[0] * stride_[0] + index[1] * stride_[1]
+ index[2] * stride_[2] + index[3] * stride_[3]
+ index[4] * stride_[4] + index[5] * stride_[5]
+ index[6] * stride_[6] + index[7] * stride_[7]
+ index[8] * stride_[8] + index[9] * stride_[9]
+ index[10] * stride_[10]];
}
const T_numtype& restrict operator()(int i0) const
{
assertInRange(i0);
return data_[i0 * stride_[0]];
}
T_numtype& restrict operator()(int i0)
{
assertInRange(i0);
return data_[i0 * stride_[0]];
}
const T_numtype& restrict operator()(int i0, int i1) const
{
assertInRange(i0, i1);
return data_[i0 * stride_[0] + i1 * stride_[1]];
}
T_numtype& restrict operator()(int i0, int i1)
{
assertInRange(i0, i1);
return data_[i0 * stride_[0] + i1 * stride_[1]];
}
const T_numtype& restrict operator()(int i0, int i1, int i2) const
{
assertInRange(i0, i1, i2);
return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2]];
}
T_numtype& restrict operator()(int i0, int i1, int i2)
{
assertInRange(i0, i1, i2);
return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2]];
}
const T_numtype& restrict operator()(int i0, int i1, int i2, int i3) const
{
assertInRange(i0, i1, i2, i3);
return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3]];
}
T_numtype& restrict operator()(int i0, int i1, int i2, int i3)
{
assertInRange(i0, i1, i2, i3);
return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3]];
}
const T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4) const
{
assertInRange(i0, i1, i2, i3, i4);
return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]];
}
T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4)
{
assertInRange(i0, i1, i2, i3, i4);
return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]];
}
const T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5) const
{
assertInRange(i0, i1, i2, i3, i4, i5);
return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5]];
}
T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5)
{
assertInRange(i0, i1, i2, i3, i4, i5);
return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5]];
}
const T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5, int i6) const
{
assertInRange(i0, i1, i2, i3, i4, i5, i6);
return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5] + i6 * stride_[6]];
}
T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5, int i6)
{
assertInRange(i0, i1, i2, i3, i4, i5, i6);
return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5] + i6 * stride_[6]];
}
const T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5, int i6, int i7) const
{
assertInRange(i0, i1, i2, i3, i4, i5, i6, i7);
return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7]];
}
T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5, int i6, int i7)
{
assertInRange(i0, i1, i2, i3, i4, i5, i6, i7);
return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7]];
}
const T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5, int i6, int i7, int i8) const
{
assertInRange(i0, i1, i2, i3, i4, i5, i6, i7, i8);
return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7]
+ i8 * stride_[8]];
}
T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5, int i6, int i7, int i8)
{
assertInRange(i0, i1, i2, i3, i4, i5, i6, i7, i8);
return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7]
+ i8 * stride_[8]];
}
const T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5, int i6, int i7, int i8, int i9) const
{
assertInRange(i0, i1, i2, i3, i4, i5, i6, i7, i8, i9);
return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7]
+ i8 * stride_[8] + i9 * stride_[9]];
}
T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5, int i6, int i7, int i8, int i9)
{
assertInRange(i0, i1, i2, i3, i4, i5, i6, i7, i8, i9);
return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7]
+ i8 * stride_[8] + i9 * stride_[9]];
}
const T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5, int i6, int i7, int i8, int i9, int i10) const
{
assertInRange(i0, i1, i2, i3, i4, i5, i6, i7, i8,
i9, i10);
return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7]
+ i8 * stride_[8] + i9 * stride_[9] + i10 * stride_[10]];
}
T_numtype& restrict operator()(int i0, int i1, int i2, int i3,
int i4, int i5, int i6, int i7, int i8, int i9, int i10)
{
assertInRange(i0, i1, i2, i3, i4, i5, i6, i7, i8,
i9, i10);
return data_[i0 * stride_[0] + i1 * stride_[1]
+ i2 * stride_[2] + i3 * stride_[3] + i4 * stride_[4]
+ i5 * stride_[5] + i6 * stride_[6] + i7 * stride_[7]
+ i8 * stride_[8] + i9 * stride_[9] + i10 * stride_[10]];
}
/*
* Slicing to produce subarrays. If the number of Range arguments is
* fewer than N_rank, then missing arguments are treated like Range::all().
*/
T_array& noConst() const
{ return const_cast<T_array&>(*this); }
T_array operator()(const RectDomain<N_rank>& subdomain) const
{
return T_array(noConst(), subdomain);
}
/* Operator added by Julian Cummings */
T_array operator()(const StridedDomain<N_rank>& subdomain) const
{
return T_array(noConst(), subdomain);
}
T_array operator()(Range r0) const
{
return T_array(noConst(), r0);
}
T_array operator()(Range r0, Range r1) const
{
return T_array(noConst(), r0, r1);
}
T_array operator()(Range r0, Range r1, Range r2) const
{
return T_array(noConst(), r0, r1, r2);
}
T_array operator()(Range r0, Range r1, Range r2, Range r3) const
{
return T_array(noConst(), r0, r1, r2, r3);
}
T_array operator()(Range r0, Range r1, Range r2, Range r3, Range r4) const
{
return T_array(noConst(), r0, r1, r2, r3, r4);
}
T_array operator()(Range r0, Range r1, Range r2, Range r3, Range r4,
Range r5) const
{
return T_array(noConst(), r0, r1, r2, r3, r4, r5);
}
T_array operator()(Range r0, Range r1, Range r2, Range r3, Range r4,
Range r5, Range r6) const
{
return T_array(noConst(), r0, r1, r2, r3, r4, r5, r6);
}
T_array operator()(Range r0, Range r1, Range r2, Range r3, Range r4,
Range r5, Range r6, Range r7) const
{
return T_array(noConst(), r0, r1, r2, r3, r4, r5, r6, r7);
}
T_array operator()(Range r0, Range r1, Range r2, Range r3, Range r4,
Range r5, Range r6, Range r7, Range r8) const
{
return T_array(noConst(), r0, r1, r2, r3, r4, r5, r6, r7, r8);
}
T_array operator()(Range r0, Range r1, Range r2, Range r3, Range r4,
Range r5, Range r6, Range r7, Range r8, Range r9) const
{
return T_array(noConst(), r0, r1, r2, r3, r4, r5, r6, r7, r8, r9);
}
T_array operator()(Range r0, Range r1, Range r2, Range r3, Range r4,
Range r5, Range r6, Range r7, Range r8, Range r9, Range r10) const
{
return T_array(noConst(), r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10);
}
// Allow any mixture of Range, int and Vector<int> objects as
// operands for operator(): A(Range(3,7), 5, Range(2,4))
/*
* These versions of operator() allow any combination of int
* and Range operands to be used. Each int operand reduces
* the rank of the resulting array by one.
*
* e.g. Array<int,4> A(20,20,20,20);
* Array<int,2> B = A(Range(5,15), 3, 5, Range(8,9));
*
* SliceInfo is a helper class defined in <blitz/arrayslice.h>.
* It counts the number of Range vs. int arguments and does some
* other helpful things.
*
* Once partial specialization becomes widely implemented, these
* operators may be expanded to accept Vector<int> arguments
* and produce ArrayPick<T,N> objects.
*
* This operator() is not provided with a single argument because
* the appropriate cases exist above.
*/
#ifdef BZ_HAVE_PARTIAL_ORDERING
template<typename T1, typename T2>
typename SliceInfo<T_numtype,T1,T2>::T_slice
operator()(T1 r1, T2 r2) const
{
typedef typename SliceInfo<T_numtype,T1,T2>::T_slice slice;
return slice(noConst(), r1, r2, nilArraySection(), nilArraySection(), nilArraySection(),
nilArraySection(), nilArraySection(), nilArraySection(),
nilArraySection(), nilArraySection(), nilArraySection());
}
template<typename T1, typename T2, typename T3>
typename SliceInfo<T_numtype,T1,T2,T3>::T_slice
operator()(T1 r1, T2 r2, T3 r3) const
{
typedef typename SliceInfo<T_numtype,T1,T2,T3>::T_slice slice;
return slice(noConst(), r1, r2, r3, nilArraySection(), nilArraySection(), nilArraySection(),
nilArraySection(), nilArraySection(), nilArraySection(),
nilArraySection(), nilArraySection());
}
template<typename T1, typename T2, typename T3, typename T4>
typename SliceInfo<T_numtype,T1,T2,T3,T4>::T_slice
operator()(T1 r1, T2 r2, T3 r3, T4 r4) const
{
typedef typename SliceInfo<T_numtype,T1,T2,T3,T4>::T_slice slice;
return slice(noConst(), r1, r2, r3, r4, nilArraySection(), nilArraySection(),
nilArraySection(), nilArraySection(), nilArraySection(),
nilArraySection(), nilArraySection());
}
template<typename T1, typename T2, typename T3, typename T4, typename T5>
typename SliceInfo<T_numtype,T1,T2,T3,T4,T5>::T_slice
operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5) const
{
typedef typename SliceInfo<T_numtype,T1,T2,T3,T4,T5>::T_slice slice;
return slice(noConst(), r1, r2, r3, r4, r5, nilArraySection(),
nilArraySection(), nilArraySection(), nilArraySection(),
nilArraySection(), nilArraySection());
}
template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6>::T_slice
operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6) const
{
typedef typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6>::T_slice slice;
return slice(noConst(), r1, r2, r3, r4, r5, r6, nilArraySection(), nilArraySection(), nilArraySection(),
nilArraySection(), nilArraySection());
}
template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6,
typename T7>
typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7>::T_slice
operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7) const
{
typedef typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7>::T_slice slice;
return slice(noConst(), r1, r2, r3, r4, r5, r6, r7, nilArraySection(), nilArraySection(),
nilArraySection(), nilArraySection());
}
template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6,
typename T7, typename T8>
typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8>::T_slice
operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7, T8 r8) const
{
typedef typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8>::T_slice slice;
return slice(noConst(), r1, r2, r3, r4, r5, r6, r7, r8,
nilArraySection(), nilArraySection(), nilArraySection());
}
template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6,
typename T7, typename T8, typename T9>
typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9>::T_slice
operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7, T8 r8, T9 r9) const
{
typedef typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9>::T_slice slice;
return slice(noConst(), r1, r2, r3, r4, r5, r6, r7, r8, r9, nilArraySection(), nilArraySection());
}
template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6,
typename T7, typename T8, typename T9, typename T10>
typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>::T_slice
operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7, T8 r8, T9 r9, T10 r10) const
{
typedef typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>::T_slice slice;
return slice(noConst(), r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, nilArraySection());
}
template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6,
typename T7, typename T8, typename T9, typename T10, typename T11>
typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>::T_slice
operator()(T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7, T8 r8, T9 r9, T10 r10, T11 r11) const
{
typedef typename SliceInfo<T_numtype,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>::T_slice slice;
return slice(noConst(), r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11);
}
#endif // BZ_HAVE_PARTIAL_ORDERING
/*
* These versions of operator() are provided to support tensor-style
* array notation, e.g.
*
* Array<float, 2> A, B;
* firstIndex i;
* secondIndex j;
* thirdIndex k;
* Array<float, 3> C = A(i,j) * B(j,k);
*/
template<int N0>
_bz_ArrayExpr<ArrayIndexMapping<T_numtype, N_rank, N0> >
operator()(IndexPlaceholder<N0>) const
{
return _bz_ArrayExpr<ArrayIndexMapping<T_numtype, N_rank, N0> >
(noConst());
}
template<int N0, int N1>
_bz_ArrayExpr<ArrayIndexMapping<T_numtype, N_rank, N0, N1> >
operator()(IndexPlaceholder<N0>, IndexPlaceholder<N1>) const
{
return _bz_ArrayExpr<ArrayIndexMapping<T_numtype, N_rank, N0,
N1> >(noConst());
}
template<int N0, int N1, int N2>
_bz_ArrayExpr<ArrayIndexMapping<T_numtype, N_rank, N0, N1, N2> >
operator()(IndexPlaceholder<N0>, IndexPlaceholder<N1>,
IndexPlaceholder<N2>) const
{
return _bz_ArrayExpr<ArrayIndexMapping<T_numtype, N_rank, N0,
N1, N2> >(noConst());
}
template<int N0, int N1, int N2, int N3>
_bz_ArrayExpr<ArrayIndexMapping<T_numtype, N_rank, N0, N1, N2, N3> >
operator()(IndexPlaceholder<N0>, IndexPlaceholder<N1>,
IndexPlaceholder<N2>, IndexPlaceholder<N3>) const
{
return _bz_ArrayExpr<ArrayIndexMapping<T_numtype, N_rank, N0,
N1, N2, N3> >(noConst());
}
template<int N0, int N1, int N2, int N3, int N4>
_bz_ArrayExpr<ArrayIndexMapping<T_numtype, N_rank, N0, N1, N2, N3, N4> >
operator()(IndexPlaceholder<N0>, IndexPlaceholder<N1>,
IndexPlaceholder<N2>, IndexPlaceholder<N3>,
IndexPlaceholder<N4>) const
{
return _bz_ArrayExpr<ArrayIndexMapping<T_numtype, N_rank, N0,
N1, N2, N3, N4> >(noConst());
}
template<int N0, int N1, int N2, int N3, int N4, int N5>
_bz_ArrayExpr<ArrayIndexMapping<T_numtype, N_rank, N0, N1, N2, N3,
N4, N5> >
operator()(IndexPlaceholder<N0>, IndexPlaceholder<N1>,
IndexPlaceholder<N2>, IndexPlaceholder<N3>, IndexPlaceholder<N4>,
IndexPlaceholder<N5>) const
{
return _bz_ArrayExpr<ArrayIndexMapping<T_numtype, N_rank, N0,
N1, N2, N3, N4, N5> >(noConst());
}
template<int N0, int N1, int N2, int N3, int N4, int N5, int N6>
_bz_ArrayExpr<ArrayIndexMapping<T_numtype, N_rank, N0, N1, N2, N3,
N4, N5, N6> >
operator()(IndexPlaceholder<N0>, IndexPlaceholder<N1>,
IndexPlaceholder<N2>, IndexPlaceholder<N3>, IndexPlaceholder<N4>,
IndexPlaceholder<N5>, IndexPlaceholder<N6>) const
{
return _bz_ArrayExpr<ArrayIndexMapping<T_numtype, N_rank, N0,
N1, N2, N3, N4, N5, N6> >(noConst());
}
template<int N0, int N1, int N2, int N3, int N4, int N5, int N6,
int N7>
_bz_ArrayExpr<ArrayIndexMapping<T_numtype, N_rank, N0, N1, N2, N3,
N4, N5, N6, N7> >
operator()(IndexPlaceholder<N0>, IndexPlaceholder<N1>,
IndexPlaceholder<N2>, IndexPlaceholder<N3>, IndexPlaceholder<N4>,
IndexPlaceholder<N5>, IndexPlaceholder<N6>,
IndexPlaceholder<N7>) const
{
return _bz_ArrayExpr<ArrayIndexMapping<T_numtype, N_rank, N0,
N1, N2, N3, N4, N5, N6, N7> >(noConst());
}
template<int N0, int N1, int N2, int N3, int N4, int N5, int N6,
int N7, int N8>
_bz_ArrayExpr<ArrayIndexMapping<T_numtype, N_rank, N0, N1, N2, N3,
N4, N5, N6, N7, N8> >
operator()(IndexPlaceholder<N0>, IndexPlaceholder<N1>,
IndexPlaceholder<N2>, IndexPlaceholder<N3>, IndexPlaceholder<N4>,
IndexPlaceholder<N5>, IndexPlaceholder<N6>, IndexPlaceholder<N7>,
IndexPlaceholder<N8>) const
{
return _bz_ArrayExpr<ArrayIndexMapping<T_numtype, N_rank, N0,
N1, N2, N3, N4, N5, N6, N7, N8> >(noConst());
}
template<int N0, int N1, int N2, int N3, int N4, int N5, int N6,
int N7, int N8, int N9>
_bz_ArrayExpr<ArrayIndexMapping<T_numtype, N_rank, N0, N1, N2, N3,
N4, N5, N6, N7, N8, N9> >
operator()(IndexPlaceholder<N0>, IndexPlaceholder<N1>,
IndexPlaceholder<N2>, IndexPlaceholder<N3>, IndexPlaceholder<N4>,
IndexPlaceholder<N5>, IndexPlaceholder<N6>, IndexPlaceholder<N7>,
IndexPlaceholder<N8>, IndexPlaceholder<N9>) const
{
return _bz_ArrayExpr<ArrayIndexMapping<T_numtype, N_rank, N0,
N1, N2, N3, N4, N5, N6, N7, N8, N9> >(noConst());
}
template<int N0, int N1, int N2, int N3, int N4, int N5, int N6,
int N7, int N8, int N9, int N10>
_bz_ArrayExpr<ArrayIndexMapping<T_numtype, N_rank, N0, N1, N2, N3,
N4, N5, N6, N7, N8, N9, N10> >
operator()(IndexPlaceholder<N0>, IndexPlaceholder<N1>,
IndexPlaceholder<N2>, IndexPlaceholder<N3>, IndexPlaceholder<N4>,
IndexPlaceholder<N5>, IndexPlaceholder<N6>, IndexPlaceholder<N7>,
IndexPlaceholder<N8>, IndexPlaceholder<N9>,
IndexPlaceholder<N10>) const
{
return _bz_ArrayExpr<ArrayIndexMapping<T_numtype, N_rank, N0,
N1, N2, N3, N4, N5, N6, N7, N8, N9, N10> >(noConst());
}
//////////////////////////////////////////////
// Support for multicomponent arrays
//////////////////////////////////////////////
/*
* See <blitz/array/multi.h> for an explanation of the traits class
* multicomponent_traits.
*/
Array<typename multicomponent_traits<T_numtype>::T_element,N_rank>
operator[](const unsigned component) {
typedef typename multicomponent_traits<T_numtype>::T_element T_compType;
return extractComponent(T_compType(),component,
multicomponent_traits<T_numtype>::numComponents);
}
const Array<typename multicomponent_traits<T_numtype>::T_element,N_rank>
operator[](const unsigned component) const {
typedef typename multicomponent_traits<T_numtype>::T_element T_compType;
return extractComponent(T_compType(),component,
multicomponent_traits<T_numtype>::numComponents);
}
Array<typename multicomponent_traits<T_numtype>::T_element,N_rank>
operator[](const int component) {
return operator[](static_cast<unsigned>(component));
}
const Array<typename multicomponent_traits<T_numtype>::T_element,N_rank>
operator[](const int component) const {
return operator[](static_cast<unsigned>(component));
}
//////////////////////////////////////////////
// Indirection
//////////////////////////////////////////////
template<typename T_indexContainer>
IndirectArray<T_array, T_indexContainer>
operator[](const T_indexContainer& index)
{
return IndirectArray<T_array, T_indexContainer>(*this,
const_cast<T_indexContainer&>(index));
}
//////////////////////////////////////////////
// Assignment Operators
//////////////////////////////////////////////
// Scalar operand
// NEEDS_WORK : need a precondition check on
// isStorageContiguous when operator, is used.
ListInitializationSwitch<T_array,T_numtype*> operator=(T_numtype x)
{
return ListInitializationSwitch<T_array,T_numtype*>(*this, x);
}
T_array& initialize(T_numtype);
// Was:
// T_array& operator=(T_numtype);
#ifdef BZ_NEW_EXPRESSION_TEMPLATES
template<typename T_expr>
T_array& operator=(const ETBase<T_expr>&);
T_array& operator=(const Array<T_numtype,N_rank>&);
template<typename T> T_array& operator+=(const T&);
template<typename T> T_array& operator-=(const T&);
template<typename T> T_array& operator*=(const T&);
template<typename T> T_array& operator/=(const T&);
template<typename T> T_array& operator%=(const T&);
template<typename T> T_array& operator^=(const T&);
template<typename T> T_array& operator&=(const T&);
template<typename T> T_array& operator|=(const T&);
template<typename T> T_array& operator>>=(const T&);
template<typename T> T_array& operator<<=(const T&);
#else
T_array& operator+=(T_numtype);
T_array& operator-=(T_numtype);
T_array& operator*=(T_numtype);
T_array& operator/=(T_numtype);
T_array& operator%=(T_numtype);
T_array& operator^=(T_numtype);
T_array& operator&=(T_numtype);
T_array& operator|=(T_numtype);
T_array& operator>>=(T_numtype);
T_array& operator<<=(T_numtype);
// Array operands
T_array& operator=(const Array<T_numtype,N_rank>&);
template<typename P_numtype2>
T_array& operator=(const Array<P_numtype2,N_rank>&);
template<typename P_numtype2>
T_array& operator+=(const Array<P_numtype2,N_rank>&);
template<typename P_numtype2>
T_array& operator-=(const Array<P_numtype2,N_rank>&);
template<typename P_numtype2>
T_array& operator*=(const Array<P_numtype2,N_rank>&);
template<typename P_numtype2>
T_array& operator/=(const Array<P_numtype2,N_rank>&);
template<typename P_numtype2>
T_array& operator%=(const Array<P_numtype2,N_rank>&);
template<typename P_numtype2>
T_array& operator^=(const Array<P_numtype2,N_rank>&);
template<typename P_numtype2>
T_array& operator&=(const Array<P_numtype2,N_rank>&);
template<typename P_numtype2>
T_array& operator|=(const Array<P_numtype2,N_rank>&);
template<typename P_numtype2>
T_array& operator>>=(const Array<P_numtype2,N_rank>&);
template<typename P_numtype2>
T_array& operator<<=(const Array<P_numtype2,N_rank>&);
// Array expression operands
template<typename T_expr>
inline T_array& operator=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr);
template<typename T_expr>
inline T_array& operator+=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr);
template<typename T_expr>
inline T_array& operator-=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr);
template<typename T_expr>
inline T_array& operator*=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr);
template<typename T_expr>
inline T_array& operator/=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr);
template<typename T_expr>
inline T_array& operator%=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr);
template<typename T_expr>
inline T_array& operator^=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr);
template<typename T_expr>
inline T_array& operator&=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr);
template<typename T_expr>
inline T_array& operator|=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr);
template<typename T_expr>
inline T_array& operator>>=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr);
template<typename T_expr>
inline T_array& operator<<=(BZ_ETPARM(_bz_ArrayExpr<T_expr>) expr);
// NEEDS_WORK -- Index placeholder operand
// NEEDS_WORK -- Random operand
#endif
public:
// Undocumented implementation routines
template<typename T_expr, typename T_update>
inline T_array& evaluate(T_expr expr, T_update);
#ifdef BZ_HAVE_STD
#ifdef BZ_ARRAY_SPACE_FILLING_TRAVERSAL
template<typename T_expr, typename T_update>
inline T_array& evaluateWithFastTraversal(
const TraversalOrder<N_rank - 1>& order,
T_expr expr, T_update);
#endif // BZ_ARRAY_SPACE_FILLING_TRAVERSAL
#endif
#ifdef BZ_ARRAY_2D_STENCIL_TILING
template<typename T_expr, typename T_update>
inline T_array& evaluateWithTiled2DTraversal(
T_expr expr, T_update);
#endif
template<typename T_expr, typename T_update>
inline T_array& evaluateWithIndexTraversal1(
T_expr expr, T_update);
template<typename T_expr, typename T_update>
inline T_array& evaluateWithIndexTraversalN(
T_expr expr, T_update);
template<typename T_expr, typename T_update>
inline T_array& evaluateWithStackTraversal1(
T_expr expr, T_update);
template<typename T_expr, typename T_update>
inline T_array& evaluateWithStackTraversalN(
T_expr expr, T_update);
T_numtype* restrict getInitializationIterator() { return dataFirst(); }
bool canCollapse(int outerRank, int innerRank) const {
#ifdef BZ_DEBUG_TRAVERSE
BZ_DEBUG_MESSAGE("stride(" << innerRank << ")=" << stride(innerRank)
<< ", extent()=" << extent(innerRank) << ", stride(outerRank)="
<< stride(outerRank));
#endif
return (stride(innerRank) * extent(innerRank) == stride(outerRank));
}
protected:
//////////////////////////////////////////////
// Implementation routines
//////////////////////////////////////////////
_bz_inline2 void computeStrides();
_bz_inline2 void setupStorage(int rank);
void constructSubarray(Array<T_numtype, N_rank>& array,
const RectDomain<N_rank>&);
void constructSubarray(Array<T_numtype, N_rank>& array,
const StridedDomain<N_rank>&);
void constructSubarray(Array<T_numtype, N_rank>& array, Range r0);
void constructSubarray(Array<T_numtype, N_rank>& array, Range r0, Range r1);
void constructSubarray(Array<T_numtype, N_rank>& array, Range r0,
Range r1, Range r2);
void constructSubarray(Array<T_numtype, N_rank>& array, Range r0,
Range r1, Range r2, Range r3);
void constructSubarray(Array<T_numtype, N_rank>& array, Range r0,
Range r1, Range r2, Range r3, Range r4);
void constructSubarray(Array<T_numtype, N_rank>& array, Range r0,
Range r1, Range r2, Range r3, Range r4, Range r5);
void constructSubarray(Array<T_numtype, N_rank>& array, Range r0,
Range r1, Range r2, Range r3, Range r4, Range r5, Range r6);
void constructSubarray(Array<T_numtype, N_rank>& array, Range r0,
Range r1, Range r2, Range r3, Range r4, Range r5, Range r6,
Range r7);
void constructSubarray(Array<T_numtype, N_rank>& array, Range r0,
Range r1, Range r2, Range r3, Range r4, Range r5, Range r6,
Range r7, Range r8);
void constructSubarray(Array<T_numtype, N_rank>& array, Range r0,
Range r1, Range r2, Range r3, Range r4, Range r5, Range r6,
Range r7, Range r8, Range r9);
void constructSubarray(Array<T_numtype, N_rank>& array, Range r0,
Range r1, Range r2, Range r3, Range r4, Range r5, Range r6,
Range r7, Range r8, Range r9, Range r10);
void calculateZeroOffset();
template<int N_rank2, typename R0, typename R1, typename R2, typename R3, typename R4,
typename R5, typename R6, typename R7, typename R8, typename R9, typename R10>
void constructSlice(Array<T_numtype, N_rank2>& array, R0 r0, R1 r1, R2 r2,
R3 r3, R4 r4, R5 r5, R6 r6, R7 r7, R8 r8, R9 r9, R10 r10);
template<int N_rank2>
void slice(int& setRank, Range r, Array<T_numtype,N_rank2>& array,
TinyVector<int,N_rank2>& rankMap, int sourceRank);
template<int N_rank2>
void slice(int& setRank, int i, Array<T_numtype,N_rank2>& array,
TinyVector<int,N_rank2>& rankMap, int sourceRank);
template<int N_rank2>
void slice(int&, nilArraySection, Array<T_numtype,N_rank2>&,
TinyVector<int,N_rank2>&, int)
{ }
void doTranspose(int destRank, int sourceRank, T_array& array);
protected:
//////////////////////////////////////////////
// Data members
//////////////////////////////////////////////
// NB: adding new data members may require changes to ctors, reference()
/*
* For a description of the storage_ members, see the comments for class
* GeneralArrayStorage<N_rank> above.
*
* length_[] contains the extent of each rank. E.g. a 10x20x30 array
* would have length_ = { 10, 20, 30}.
* stride_[] contains the stride to move to the next element along each
* rank.
* zeroOffset_ is the distance from the first element in the array
* to the point (0,0,...,0). If base_ is zero and all ranks are
* stored ascending, then zeroOffset_ is zero. This value
* is needed because to speed up indexing, the data_ member
* (inherited from MemoryBlockReference) always refers to
* (0,0,...,0).
*/
GeneralArrayStorage<N_rank> storage_;
TinyVector<int, N_rank> length_;
TinyVector<int, N_rank> stride_;
int zeroOffset_;
};
/*
* Rank numbers start with zero, which may be confusing to users coming
* from Fortran. To make code more readable, the following constants
* may help. Example: instead of
*
* int firstRankExtent = A.extent(0);
*
* One can write:
*
* int firstRankExtent = A.extent(firstRank);
*/
const int firstRank = 0;
const int secondRank = 1;
const int thirdRank = 2;
const int fourthRank = 3;
const int fifthRank = 4;
const int sixthRank = 5;
const int seventhRank = 6;
const int eighthRank = 7;
const int ninthRank = 8;
const int tenthRank = 9;
const int eleventhRank = 10;
const int firstDim = 0;
const int secondDim = 1;
const int thirdDim = 2;
const int fourthDim = 3;
const int fifthDim = 4;
const int sixthDim = 5;
const int seventhDim = 6;
const int eighthDim = 7;
const int ninthDim = 8;
const int tenthDim = 9;
const int eleventhDim = 10;
/*
* Global Functions
*/
template<typename T_numtype>
ostream& operator<<(ostream&, const Array<T_numtype,1>&);
template<typename T_numtype>
ostream& operator<<(ostream&, const Array<T_numtype,2>&);
template<typename T_numtype, int N_rank>
ostream& operator<<(ostream&, const Array<T_numtype,N_rank>&);
template<typename T_numtype, int N_rank>
istream& operator>>(istream& is, Array<T_numtype,N_rank>& x);
template <typename P_numtype,int N_rank>
void swap(Array<P_numtype,N_rank>& a,Array<P_numtype,N_rank>& b) {
Array<P_numtype,N_rank> c(a);
a.reference(b);
b.reference(c);
}
template <typename P_expr>
void find(Array<TinyVector<int,P_expr::rank>,1>& indices,
const _bz_ArrayExpr<P_expr>& expr) {
find(indices,
static_cast< Array<typename P_expr::T_numtype,P_expr::rank> >(expr));
}
template <typename P_numtype, int N_rank>
void find(Array<TinyVector<int,N_rank>,1>& indices,
const Array<P_numtype,N_rank>& exprVals) {
indices.resize(exprVals.size());
typename Array<P_numtype,N_rank>::const_iterator it, end = exprVals.end();
int j=0;
for (it = exprVals.begin(); it != end; ++it)
if (*it)
indices(j++) = it.position();
if (j)
indices.resizeAndPreserve(j);
else
indices.free();
return;
}
BZ_NAMESPACE_END
/*
* Include implementations of the member functions and some additional
* global functions.
*/
#include <blitz/array/iter.h> // Array iterators
#include <blitz/array/fastiter.h> // Fast Array iterators (for et)
#include <blitz/array/expr.h> // Array expression objects
#include <blitz/array/methods.cc> // Member functions
#include <blitz/array/eval.cc> // Array expression evaluation
#include <blitz/array/ops.cc> // Assignment operators
#include <blitz/array/io.cc> // Output formatting
#include <blitz/array/et.h> // Expression templates
#include <blitz/array/reduce.h> // Array reduction expression templates
#include <blitz/array/interlace.cc> // Allocation of interlaced arrays
#include <blitz/array/resize.cc> // Array resize, resizeAndPreserve
#include <blitz/array/slicing.cc> // Slicing and subarrays
#include <blitz/array/cycle.cc> // Cycling arrays
#include <blitz/array/complex.cc> // Special support for complex arrays
#include <blitz/array/zip.h> // Zipping multicomponent types
#include <blitz/array/where.h> // where(X,Y,Z)
#include <blitz/array/indirect.h> // Indirection
#include <blitz/array/stencils.h> // Stencil objects
#endif // BZ_ARRAY_H
| [
"master@MacBook-Pro-admin.local"
] | master@MacBook-Pro-admin.local |
2239ea883f00e7855a706aab343ec77399cc0bf0 | 5cacaa743ba29c9faae3302fc62fa5f190bbf4b7 | /talleres_practicas/Ejercicios C++ 2012-2013/Proyecto PB 2011-2 (Enero, 2012)/proyecto_Vladimir part 2.cpp | 8ba661b40886ce996dfe9d268c876c78984bd5ea | [] | no_license | ht1204/repo_algoritmos | 2c684c0f17b77fdcfeb99f44ed78ec6e7ae05d4c | 7ce657fded7a660b29fa0afcdbc8576fbfa2cf45 | refs/heads/main | 2023-06-24T12:09:21.168292 | 2021-08-01T22:54:07 | 2021-08-01T22:54:07 | 353,220,712 | 0 | 0 | null | null | null | null | ISO-8859-10 | C++ | false | false | 85,087 | cpp | /*
Name: Proyecto gestion de pedido
Copyright:
Author: Luis Cervantes
Hector Triana
Date: 20/01/12 13:08
Description:
*/
/*
Declaracion de librerias
*/
# include <iostream>
# include <stdio.h>
# include <string.h>
# include <stdio.h>
# include <stdlib.h>
# include <conio.h>
using namespace std;
/*
Fin Declaracion de librerias
*/
/*Declaracion de constantes y variables*/
/*Fin Declaracion de constantes y variables*/
/*Declaracion de Estructuras y punteros para el manejo de archivo*/
struct fecha{//Este struct nos va a ayudar a guardar las fechas en variables enteras
int dia;
int mes;
int ano;
}f;
struct fechacomp{//Este struct nos va a ayudar junto con el anterior en el manejo de fecha
fecha fecm;//Permite acceder a las variables enteras de fecha
char hora['v'];//Nos va a permitir guardar la hora
}ftot;
struct empresa{//Aqui estan todos los atributos de empresa
long nit;//su numero nit
char nom['a'];//nombre de la empresa que nos vende un producto para vender
char dir['s'];//Direccion de la empresa
empresa *proemp;//Estos punteros
}*nodoemp,*pemp,nodoe;//nos ayudaran a desplazarnos en los espacios de memoria de la lista enlazada , actualizar y cargar el fichero
//declaracio del puntero de fichero
FILE *arcEmp;
struct producto{
long idem;//Esta es para identificar la identificacion de la empresa que nos vende un producto
long id;//identificacion del producto en bodega
char nom['w'];//nombre del producto
long codinv;//codigo invima para calidad ISO 9001
long codcom;//codigo de comercio que se halla vigente en la camara
fecha ven;//nos permite acceder a las variables de fecha para asignar una fecha de vencimiento
producto *propro;//Estos punteros
}*nodopro,*ppro,pro;//nos ayudaran a desplazarnos en los espacios de memoria de la lista enlazada,actualizar y cargar el fichero
//declaracio del puntero de fichero
FILE *arcPro;
struct trabajador{
long id;//identificacion del vendedor
char nom['s'];//nombre del vendedor
long long sal;//salario neto del vendedor
trabajador *protra;//Estos punteros
}*nodotra,*ptra,tra2;//nos ayudaran a desplazarnos en los espacios de memoria de la lista enlazada, actualizar y cargar el fichero
//declaracio del puntero de fichero
FILE *arcTra;
struct cliente{
long id;//numero de identificacion del cliente, esto es universal en personas y propietarios de empresa
char dir['w'];//direccion del cliente
char nom['w'];//nombre del cliente
long nit;//nit para registrarse comercialmente
cliente *procli;//Estos punteros
}*nodocli,*pcli,cli2;//nos ayudaran a desplazarnos en los espacios de memoria de la lista enlazada, actualizar y cargar el fichero
//declaracio del puntero de fichero
FILE *arcCli;
struct fechacomp2{//Este estruct nos ayudara a transferir fechas de entrega basandonos en manejo de fecha
int dia2;//dia de entrega
int mes2;//mes de entrega
int ano2;//aņo de entrega
char hora2['v'];//hora de entrega
}f1;
struct gestion{
long nitemp,nitempd;//nit de empresa que nos vende un producto y de la empresa a la cual vendemos
long idpro;//identificacion del producto
long int idtra;//identificacion del vendedor que hace la venta
int cant;//cantidad de unidades vendidas del producto
fechacomp eventoventa;//nos ayudara a guardar el momento exacto de realizacion de venta
//fecha y hora;
int plazo;//plazo estipulado, fue validado de 1 a 15 dias para garantizar responsabilidad
fechacomp2 entrega;//Nos ayudara a estimar el momento de entrega
gestion *proges;//Estos punteros
}*nodogestion,*pges,ges1;//nos ayudaran a desplazarnos en los espacios de memoria de la lista enlazada, actualizar y cargar el fichero
//declaracio del puntero de fichero
FILE *arcGes;
/*Fin Declaracion de Estructuras y punteros para el manejo de archivo*/
/*Declaracion de Funciones*/
void menu(); // se encarga de mostrar el primer mensage a los usuarios
void error(long double a,long double b,long double c); //Muestra un mensaje a las opciones incorrectas
void seleccionar(int opc); //DETERMINA EL MENU A EJECUTAR
/*************************Funciones de empresa*****************/
void registraremp(); //registrar empresa
bool validarcodemp(long cod); //se encarga de validar la existencia de codigos de empresa
void modificaremp(); //se encarga de modificar los datos de una empresa
void consultaremp(); //se encarga de mostar los datos de la empresa en caso de existir
void eliminaremp(); //se encarga de eliminar un elemento de la lista
void listaremp(); //se encarga de listar las empresas registradas
void loadempresa(); //se encarga de cargar las empresas que se encuentran en el archivo
void actualizaremp(); //se encarga de actualizar el archivo, frete a cualquier actualizacion en las listas
/*************************Funciones de producto*****************/
void productos(); //se encarga de mostrar las instrucciones, para el tratamiento de los productos
void registropro(); //se encarga del regsitro de productos
bool validarpro(long n,long pr); //se encarga de validar la existencia de un codigo de producto
void modificarpro(); //se encarga de modificar un registro
void actualizarpro(); //se encarga de actualizar los datos en el archivo de empresa
void consultarpro(long e,long pr); //se encarga de listar un producto
void eliminarpro(); //elimina producto de bloque de memoria
void loadproducto(); //carga los datos de productos al iniciar el programa
/*************************Funciones de trabajador*****************/
void menutrabajador(); //menu de opciones del trabajador
void registrartra(); //registra trabajadores
bool validarcodtra(long int iden); //se encarga de validar la existencia de codigos de identificacion de trabajadores
void modificartra(); //se encarga de modificar los datos de un trabajador
void consultartra(); //se encarga de mostrar los datos de un trabajador en caso de existir
void eliminartra(); //se encarga de eliminar un elemento de la lista
void listartra(); //se encarga de listar trabajadores registrados
void actualizartra(); //se encarga de actualizar las empresas que se encuentran en el archivo
void loadtrabajador(); //se encarga de cargar los datos de los trabajadores que se ecuentran en el archivo
/*************************Funciones de cliente*****************/
void menucli(); //menu de opciones del cliente
void registracli(); //registra clientes
void modificacli(); //se encarga de modificar los datos de un cliente
void consultacli(); //se encarga de mostrar los datos de un cliente en caso de existir
void eliminacli(); //se encarga de eliminar un elemento de la lista
void listacli(); //se encarga de listar clientes registrados
void loadcli(); //se encarga de cargar los datos de los clientes que se ecuentran en el archivo
void actualizarcli(); //se encarga de actualizar los clientes que se encuentran en el archivo
bool validarcodcli(long nitemp);//se encarga de validar la existencia de codigos de clientes
/*************************Funciones de gestion*****************/
void menuges(); //menu de opciones de la gestion de pedido
void loadges(); //se encarga de cargar los datos de los gestiones que se ecuentran en el archivo
void registrargest(); //registra gestiones
void consulistargest(); //se encarga de mostrar los datos de una gestion en caso de existir
void eliminargest(); //se encarga de eliminar una gestion de la lista
void actualizages(); //se encarga de actualizar las gestiones que se encuentran en el archivo
void consultarproges(long codem, long codid);
/*************************Funciones de manejo de fecha*****************/
void fechas(int *d,int *m,int *a,char *fecha);//permite tomar la fecha del sistema para una conversion final de caracteres a enteros
void cortar(char *h,char *f);//Permite mediante ciclos determinados separar la fecha y la hora de sistema
int menuchartoint(char j);//convierte caracter por caracter la fecha del sistema a entero obedeciendo el codigo ASCII
fechacomp fregis();
/*******Utilidades***********/
void mensage(char m['s']); //se encarga de generar un mensage
/***Fin Utilidades***********/
/*Fin Declaracion de Funciones*/
/*Funcion Principal*/
int main(){
int opc;
//se procede a inicializar las listas del proyecto
//empresa
pemp = new empresa;
pemp->proemp=NULL;
//producto
ppro= new producto;
ppro->propro=NULL;
//Trabajador
ptra= new trabajador;
ptra->protra=NULL;
//Cliente
pcli= new cliente;
pcli->procli=NULL;
//Gestion
pges = new gestion;
pges->proges=NULL;
/*******************Implementacion de manejo de Achivos*****************/
//empresa
arcEmp=fopen("empresa","r");
if(!arcEmp){
arcEmp=fopen("empresa","w");
}
fclose(arcEmp);
//producto
arcPro= fopen("producto","r");
if(!arcPro){
arcPro=fopen("producto","w");
}
fclose(arcPro);
//Trabajador
arcTra=fopen("trabajador","r");
if(!arcTra){
arcTra=fopen("trabajador","w");
}
fclose(arcTra);
//Cliente
arcCli=fopen("cliente","r");
if(!arcCli){
arcCli=fopen("cliente","w");
}
fclose(arcCli);
//Gestion
arcGes=fopen("gestion","r");
if(!arcGes){
arcGes=fopen("gestion","w");
}
fclose(arcGes);
/*********************Fin Implementacion de manejo de Achivos************************/
/*********************load de los distintos archivos de el programa*******************/
loadempresa();
loadproducto();
loadtrabajador();
loadcli();
loadges();
/*********************Fin load de los distintos archivos de el programa***************/
do{
system("title Proyecto gestion de pedido");
system("cls");
menu();
cout<<"\n\n\tDigite la opcion : ";cin>>opc;
error(1,5,opc);
seleccionar(opc);
}while(opc != 5);
}
/*Fin Funcion Principal*/
void menu(){
cout<<"\n\t\t\tMenu Principal";
cout<<"\n\n\t1. Empresa";
cout<<"\n\t2. Trabajadores";
cout<<"\n\t3. Clientes";
cout<<"\n\t4. Gestion de Pedidos";
cout<<"\n\t5. Salir";
}
/*Implementacion de funciones*/
//**FUNCION DE ERROR**//
void error(long double a,long double b,long double c){
if(c<a || c>b){
cout<<"\n\n\tLA OPCION DIGITADA ES INCORRECTA....!\n\t";
getch();
}
}
//**FUNCION SELECCIONAR**//
void seleccionar(int opc){
int opc1=0;
switch (opc){
case 1 :
do{
system("cls");
cout<<"\t\t\nMENU DE EMPRESA";
cout<<"\n\n\t1. Registrar";
cout<<"\n\t2. Modificar";
cout<<"\n\t3. Consultar";
cout<<"\n\t4. Eliminar";
cout<<"\n\t5. Listar";
cout<<"\n\t6. Producto";
cout<<"\n\t7.Salir";
cout<<"\n\n\t Digite la opcion : ";cin>>opc1;
error(1,7,opc1);
switch (opc1){
case 1:
registraremp();
break;
case 2:
if(pemp->proemp==NULL){//validamos en caso que no se halla registrado nada antes
printf("\n\tNo hay empresas registradas ");
getch();
break;
}else{
modificaremp();
}
break;
case 3:
if(pemp->proemp==NULL){//validamos en caso que no se halla registrado nada antes
printf("\n\tNo hay empresas registradas ");
getch();
break;
}
consultaremp();
break;
case 4:
if(pemp->proemp==NULL){//validamos en caso que no se halla registrado nada antes
printf("\n\tNo hay empresas registradas ");
getch();
break;
}else{
eliminaremp();
}
break;
case 5:
if(pemp->proemp==NULL){//validamos en caso que no se halla registrado nada antes
printf("\n\tNo hay empresas registradas ");
getch();
break;
}else{
listaremp();
}
break;
case 6:
productos();
break;
}
}while(opc1 != 7);
opc1=0;
break;
case 2 :
menutrabajador();
break;
case 3 :
menucli();
break;
case 4 :
menuges();
break;
case 5 :
system("cls");
for(int i=0;i<=11;i++){
if(i==0 || i==11){
for(int y=0;y<=59;y++){
cout<<"*";
}
cout<<"\n";
}else if(i==6){
cout<<"* EL MUNDO ES DE AQUELLOS QUE ESTAN DISPUESTOS A TOMARLO *";
cout<<"\n";
}else{
for(int z=0;z<=59;z++){
if(z==0 || z==59){
cout<<"*";
}else{
cout<<" ";
}
}
cout<<"\n";
}
}
getch();
break;
}
}
//void registraremp(): se encarga de registrar las empresas
void registraremp(){
empresa emp; //se crea esta instancia para evitar el problema con el almacenamiento en el archivo
long nit;
do{
system("cls");
cout<<"\n\t\t\tREGISTRAR EMPRESA";
cout<<"\n\n\tDigite el nit : ";cin>>nit;
if(validarcodemp(nit)==true){//validamos que el nit de la empresa se encuente en registro para evitar confusiones
cout<<"\n\n\t\tLA EMRESA SE ENCUENTRA REGISTRADA...!";
getch();
return;
}
}while(nit<1 || nit >1000);//lo validamos de 1 a mil para darle orden, se puede modificar si lo deseas, no afecta
nodoemp= new empresa;//asignando espacio en memoria para iniciar registro en lista
nodoemp->nit=nit;//asignando nit
fflush(stdin);//buffer para evitar inconvientes con caracteres
cout<<"\n\tDigite el nombre : ";gets(nodoemp->nom);//asignando nombre de empresa
cout<<"\n\tDigite la direccion : ";gets(nodoemp->dir);//asignando direccion de empresa
/****************llenado del archivo con los datos********************************/
nodoe.nit=nodoemp->nit;//aņadiendo
strcpy(nodoe.nom,nodoemp->nom);//datos
strcpy(nodoe.dir,nodoemp->dir);//al fichero que guarda datos de empresa
arcEmp=fopen("empresa","a+");//garantizando
fwrite(&nodoe,sizeof (struct empresa),1,arcEmp);//flujo de datos
fclose(arcEmp);//cerrando fichero
/********************************************************************************/
nodoemp->proemp=pemp->proemp;//asignando espacio en memoria dinamica
pemp->proemp=nodoemp;//para nueva implementacion de registro
}
//VALIDARCODEMP() : esta funcion se encarga de validar las existencia de empresas
bool validarcodemp(long cod){
empresa *aux;
aux=pemp->proemp;//asignando espacio de memoria siguiente
while(aux != NULL){//buscando en la lista para ver si el dato digitado ya se encuentra registrado
if(aux->nit == cod){//si esta anteriormente devuelve true y nos ayuda a validar y evitar confusiones posteriores
return true;
}
aux=aux->proemp;//sigue buscando en lista
}
return false;//si no se halla devuelve false y nos ayudara a registrar nuevo dato y saber si no estaba anteriormente
}
//modidicaremp() : se encarga de modificar los datos de una empresa en particular
void modificaremp(){
long nit;
int opc;
system("cls");
cout<<"\n\t\t\tMODIFICAR EMPRESA";
cout<<"\n\n\tDigite el nit : ";cin>>nit;
if(validarcodemp(nit)==false){//validando para saber si la empresa esta registrada en la lista
cout<<"\n\n\t\tLA EMRESA NO SE ENCUENTRA REGISTRADA...!";
getch();
return;
}
empresa *aux;
aux=pemp->proemp;//asignando memoria al espacio siguiente
while(aux != NULL){
if(aux->nit==nit){//si la lista el dato nit se encuentra entonces muestra la lista con los atributos que acompaņan
do{//ese dato
system("cls");
cout<<"\n\t\t\tMODIFICAR EMPRESA";//menu modificar empresa
cout<<"\n\n\t1. Nit : "<<aux->nit;
cout<<"\n\t2. Nombre : "<<aux->nom;
cout<<"\n\t3. Dirreccion : "<<aux->dir;
cout<<"\n\t4. Salir. ";
cout<<"\n\n\tDigite la opcion : ";cin>>opc;
error(1,4,opc);
switch(opc){
case 1 ://modificando nit
long nit;
do{
do{
cout<<"\n\n\tDigite el nit : ";cin>>nit;
if(validarcodemp(nit) == true){
cout<<"\n\n\tEl nit se encuentra registrado....!";
getch();
}
}while((aux->nit <0 || aux->nit>1000) );
}while(validarcodemp(nit)==true);//si en nit esta registrado, sigue pidiendo nuevo registro
aux->nit=nit;//asignando nuevo registro
break;
case 2:
fflush(stdin);
cout<<"\n\n\tDigite el nombre : ";gets(aux->nom);//cambiando nombre de empresa
break;
case 3:
fflush(stdin);
cout<<"\n\n\tDigite la direccion : ";gets(aux->dir);//cambiando direccion de empresa
break;
}
actualizaremp(); //se actualizan los datos en el archivo de empresa
}while(opc != 4);//cuando se presion 4, se rompe el meno
return;
}
aux=aux->proemp;//buscando registros en memoria hasta llegar a null
}
}
//consultaremp(); se encarga de mostrar los datos de una empre de existir
void consultaremp(){
long nit;
system("cls");
cout<<"\n\t\t\tCONSULTAR EMPRESA";
cout<<"\n\n\tDigite el nit : ";cin>>nit;
if(validarcodemp(nit)==false){//si no se halla la empresa, no consulta
cout<<"\n\n\n\t\t\a\a\aLA EMPRESA NO SE ENCUENTRA REGISTRADA...!\n\t";
getch();
return;
}
empresa *aux;
aux=pemp->proemp;//asignando memoria a espacio siguiente
while(aux != NULL){
if(aux->nit==nit){// si halla en nit en lista, lo muestra con sus atributos
system("cls");
cout<<"\n\t\t\tCONSULTAR EMPRESA";
cout<<"\n\n\tNit : "<<aux->nit;
cout<<"\n\tNombre : "<<aux->nom;
cout<<"\n\tDirreccion : "<<aux->dir<<"\n\t";
getch();
return;
}
aux=aux->proemp;
}
}
//eliminaremp(): se encarga de eliminar un elemento de la lista
void eliminaremp(){
long nit;
int res;
system("cls");
cout<<"\n\t\t\tELIMINAR EMPRESA";
cout<<"\n\n\tDigite el nit : ";cin>>nit;
if(validarcodemp(nit)==false){//si la empresa no se halla registrada no elimina
cout<<"\n\n\n\t\t\a\a\aLA EMPRESA NO SE ENCUENTRA REGISTRADA...!\n\t";
getch();
return;
}
empresa *aux,*a;//punteros auxiliares que permitiran el intercambio de espacios en memoria para borrar registro
aux=pemp->proemp;//asignando memoria a espacio siguiente
a=pemp;// Este puntero estara un espacio de memoria anterior a aux, asi podremos borrar
while(aux != NULL){
if(aux->nit==nit){//si halla el nit, muestra al usuario los atributos compaņeros, y ayuda al usuario a decidir
system("cls");
cout<<"\n\t\t\tELIMINAR EMPRESA";
cout<<"\n\n\tNit : "<<aux->nit;
cout<<"\n\tNombre : "<<aux->nom;
cout<<"\n\tDirreccion : "<<aux->dir<<"\n\t";
do{
cout<<"\n\n\tDesea eliminar la empresa (1. Si - 2. No) : ";cin>>res;//decidiendo si quiere borrar
error(1,2,res);
}while(res<1 || res>2);
if(res == 1){//borrando
a->proemp=aux->proemp;//intercambiando espacios de memoria en lista para borrar
delete aux;//dato borrado
actualizaremp(); //se actulizan los datos en el archivo
mensage("SUS DATOS SE BORRARON SATISFACTORIAMENTE");
}
return;
}
a=aux;//cambiando datos en lista por traspaso de memoria entre ficheros
aux=aux->proemp;//avanzando en lista para actualizacion
}
}
/*********************Seccion de productos************************/
//producto(): se encarga de mostrar las opciones para los productos
void productos(){
int opcpro;
do{
system("cls");
cout<<"\n\t\t\tMENU DE PRODUCTOS";
cout<<"\n\n\t1. Registrar";
cout<<"\n\t2. Modificar";
cout<<"\n\t3. consultar";
cout<<"\n\t4. Listar";
cout<<"\n\t5. Eliminar";
cout<<"\n\t6. Salir";
cout<<"\n\n\t Digite la opcion : ";cin>>opcpro;
error(1,6,opcpro);
switch (opcpro){
case 1:
registropro(); //se encarga del regsitro de productos
break;
case 2:
if(ppro->propro==NULL){//validamos en caso que no se halla registrado nada antes
printf("\n\tNo hay productos registrados ");
getch();
break;
}else{
modificarpro();
} //se encarga de modificar un registro
break;
case 3:
if(ppro->propro==NULL){//validamos en caso que no se halla registrado nada antes
printf("\n\tNo hay productos registrados ");
getch();
break;
}else{
long em,p;
cout<<"\n\t\tCONSULTAR PRODUCTO";
cout<<"\n\n\tDigite el nit de la empresa : ";cin>>em;
if(validarcodemp(em)== false){//valida para cerciorarse que la empresa exista
mensage("LA EMPRESA NO SE ENCUENTRA REGISTRADA");
break;
}
cout<<"\n\tDigite el codigo del producto : ";cin>>p;//se debe validar que el codigo existe en bodega
if(validarpro(em,p)==false){
mensage("EL CODIGO NO SE ENCUENTRA REGISTRADO");
break;
}
system("cls");
cout<<"\n\t\t\tCONSULTAR PRODUCTO";
consultarpro(em,p);
cout<<"\n\t";
getch();
}
break;
case 4:
if(ppro->propro==NULL){//validamos en caso que no se halla registrado nada antes
printf("\n\tNo hay productos registrados ");
getch();
break;
}else{
producto *aux;
aux=ppro->propro;
system("cls");
cout<<"\n\t\t\tLISTAR PRODUCTO";
while(aux != NULL){//lista todos los productos en bodega con su informacion necesaria
cout<<"\n\tnit de la empresa que vende el producto "<<aux->idem;
cout<<"\n\tIdentificacion del producto "<<aux->id;
cout<<"\n\tcodigo de comercializacion "<<aux->codcom;
cout<<"\n\tcodigo invima "<<aux->codinv;
cout<<"\n\tFecha de Vencimiento ";
cout<<"\n\tDia : "<<aux->ven.dia;
cout<<"\n\tMes : "<<aux->ven.mes;
cout<<"\n\tAņo : "<<aux->ven.ano;
cout<<"\n\n";
aux=aux->propro;
}
cout<<"\n\t";
getch();
}
break;
case 5:
if(ppro->propro==NULL){//validamos en caso que no se halla registrado nada antes
printf("\n\tNo hay productos registrados ");
getch();
}
eliminarpro();//elimina productos
break;
}
}while(opcpro != 6);
}
//void registropro() : se encarga del regsitro de productos
void registropro(){
long em,p;int y;
system("cls");
cout<<"\n\t\t\tREGISTRO DE PRODUCTO";
cout<<"\n\n\tDigite el nit de la empresa : ";cin>>em;
if(validarcodemp(em)== false){//validamos el nit para saber si la empresa esta registrada o no
mensage("LA EMPRESA NO SE ENCUENTRA REGISTRADA");
return;
}
cout<<"\n\tDigite el codigo del producto : ";cin>>p;//validamos el codigo del producto en bodega para evitar confusiones
if(validarpro(em,p)==true){
mensage("EL CODIGO SE ENCUENTRA REGISTRADO");
return;
}
nodopro= new producto;//asignando memoria dinamica para registrar en lista
nodopro->idem=em;//asignando
nodopro->id=p;//codigos
ftot=fregis();//tomando fecha del sistema para evitar vender productos vencidos
//Digitando datos para registro de producto
fflush(stdin);
cout<<"\n\tDigite el nombre del producto : ";gets(nodopro->nom);
cout<<"\n\tDigite el codigo invima : ";cin>>nodopro->codinv;
cout<<"\n\tDigite el codigo de comercio : ";cin>>nodopro->codcom;
cout<<"\n\tDigite la fecha de vencimiento: ";
do{//validando aņo de vencimiento para no vender productos expirados
cout<<"\n\t Aņo : ";cin>>nodopro->ven.ano;
}while(nodopro->ven.ano<ftot.fecm.ano);
if(nodopro->ven.ano==ftot.fecm.ano){
do{//validando mes de vencimiento respecto a aņo
cout<<"\n\t Mes : ";cin>>nodopro->ven.mes;
}while(nodopro->ven.mes<ftot.fecm.mes||nodopro->ven.mes>12);
}
if(nodopro->ven.ano>ftot.fecm.ano){
do{
cout<<"\n\t Mes : ";cin>>nodopro->ven.mes;
}while(nodopro->ven.mes<1||nodopro->ven.mes>12);
}
if(nodopro->ven.mes==1||nodopro->ven.mes==3||nodopro->ven.mes==5||nodopro->ven.mes==7||nodopro->ven.mes==8||nodopro->ven.mes==10||nodopro->ven.mes==12){
do{//validando dias respecto a mes de registro
cout<<"\n\t Dia : ";cin>>nodopro->ven.dia;
}while(nodopro->ven.dia<1||nodopro->ven.dia>31);
y=1;
}else{
do{
cout<<"\n\t Dia : ";cin>>nodopro->ven.dia;
}while(nodopro->ven.dia<1||nodopro->ven.dia>30);
y=2;
}
if((nodopro->ven.ano==ftot.fecm.ano)&&(nodopro->ven.mes==2)){
do{//validando dia de vencimiento respecto a febrero
cout<<"\n\t Dia : ";cin>>nodopro->ven.dia;
}while(nodopro->ven.dia<1||nodopro->ven.dia>29);
}
if((nodopro->ven.ano==ftot.fecm.ano)&&(nodopro->ven.mes==2)&&(ftot.fecm.mes==2)){
do{
cout<<"\n\t Dia : ";cin>>nodopro->ven.dia;
}while(nodopro->ven.dia<ftot.fecm.dia||nodopro->ven.dia>29);
}
if((nodopro->ven.ano%4==0)&&(nodopro->ven.mes==2)&&(ftot.fecm.mes==2)){
do{
cout<<"\n\t Dia : ";cin>>nodopro->ven.dia;
}while(nodopro->ven.dia<ftot.fecm.dia||nodopro->ven.dia>29);
}
//validando dia de vencimiento respecto a mismo aņo y mismo mes del sistema
if((nodopro->ven.ano==ftot.fecm.ano)&&(nodopro->ven.mes==ftot.fecm.mes)&&(y==1)){
do{
cout<<"\n\t Dia : ";cin>>nodopro->ven.dia;
}while(nodopro->ven.dia<ftot.fecm.dia||nodopro->ven.dia>31);
}
if((nodopro->ven.ano==ftot.fecm.ano)&&(nodopro->ven.mes==ftot.fecm.mes)&&(y==2)){
do{
cout<<"\n\t Dia : ";cin>>nodopro->ven.dia;
}while(nodopro->ven.dia<ftot.fecm.dia||nodopro->ven.dia>30);
}
/****************llenado del archivo con los datos********************************/
pro.idem=nodopro->idem;
pro.id=nodopro->id;
strcpy(pro.nom,nodopro->nom);
pro.codinv=nodopro->codinv;
pro.codcom=nodopro->codcom;
pro.ven.dia=nodopro->ven.dia;
pro.ven.mes=nodopro->ven.mes;
pro.ven.ano=nodopro->ven.ano;
arcPro=fopen("producto","a+");
fwrite(&pro,sizeof(struct producto),1,arcPro);
fclose(arcPro);
/********************************************************************************/
nodopro->propro=ppro->propro;
ppro->propro=nodopro;
}
//bool validarpro(long n,long p) : se encarga de validar la existencia de un codigo de producto
bool validarpro(long n,long pr){
producto *aux;
aux=ppro->propro;
while(aux != NULL){//buscando si el nit de la empresa y la identificacion del producto existe
if(aux->idem == n && aux->id==pr){
return true;
}
aux=aux->propro;
}
return false;
}
//void modificarpro():se encarga de modificar un registro
void modificarpro(){
long em,p;
int opcp;
system("cls");
cout<<"\n\t\t\tMODIFICADO DE PRODUCTO";
cout<<"\n\n\tDigite el nit de la empresa : ";cin>>em;
if(validarcodemp(em)== false){//validando para saber si la empresa existe en registro
mensage("LA EMPRESA NO SE ENCUENTRA REGISTRADA");
return;
}
cout<<"\n\tDigite el codigo del producto : ";cin>>p;//?se debe validar
if(validarpro(em,p)==false){//validando para saber si el producto existe en bodega
mensage("EL CODIGO NO SE ENCUENTRA REGISTRADO");
return;
}
producto *aux;
aux=ppro->propro;
while(aux != NULL){
if(aux->idem==em && aux->id ==p){//si se hallan, muestra todos los atributos
do{
system("cls");
cout<<"\n\t\t\tMODIFICADO DE PRODUCTO";
cout<<"\n\n\t1. Codigo de la empresa : "<<aux->idem;
cout<<"\n\t2. Codigo del producto : "<<aux->id;
cout<<"\n\t3. Nombre del producto : "<<aux->nom;
cout<<"\n\t4. Codigo invima : "<<aux->codinv;
cout<<"\n\t5. Codigo de comercializacion : "<<aux->codcom;
cout<<"\n\t6. Salir";
cout<<"\n\n\t Digite la opcion : ";cin>>opcp;
error(1,6,opcp);
switch (opcp){
case 1:
long nit;
do{
cout<<"\n\n\tDigite el nit : ";cin>>nit;//puede darse el caso de que la empesa se cambie
if(validarcodemp(nit)==true)// y el producto que esta contenga se encuentre duplicado
mensage("EL NIT SE ENCUENTRA REGISTRADO");
}while(validarcodemp(nit)==true);
aux->idem=nit;
break;
case 2:
long cod;
do{
cout<<"\n\n\tDigite el codigo del producto : ";cin>>cod;
if(validarpro(aux->idem,cod)==true){
mensage("EL CODIGO SE ENCUENTRA REGISTRADO");
}
}while(validarpro(aux->idem,cod)==true);
aux->id=cod;
break;
case 3:
fflush(stdin);//cambiando nombre
cout<<"\n\tDigite el nombre del producto : ";gets(aux->nom);
break;
case 4://cambiando codigo invima
cout<<"\n\tDigite el codigo invima : ";cin>>aux->codinv;
break;
case 5://cambiando codigo de comercio
cout<<"\n\tDigite el codigo de comercio : ";cin>>aux->codcom;
break;
}//se decidio mejor no cambiar fecha de vencimiento porque eso obedecen a estandares solo de la empresa, no de nosotros
actualizarpro();
}while(opcp != 6);//al presionar 6, rompe el meno
return;
}
aux=aux->propro;//buscando en lista
}
}
void consultarpro(long e,long pr){
producto *aux;
long codem,codid;
cout<<"\n\tConsultar producto ";
cout<<"\n\tIngrese codigo de empresa ";cin>>codem;
cout<<"\n\tIngrese codigo del producto ";cin>>codid;
if(validarpro(codem,codid)==false){//se hace la misma accion de eliminar, saber si la empresa y producto existen
cout<<"\n\tLa empresa y/o el codigo del producto no se encuentran registrados ";
getch();
return;
}
aux=ppro->propro;
while(aux != NULL){
if(aux->idem ==e && aux->id==pr){//se hallan en lista, los muestra
cout<<"\n\n\tCodigo de la empresa : "<<aux->idem;
cout<<"\n\tCodigo del producto : "<<aux->id;
cout<<"\n\tNombre del producto : "<<aux->nom;
cout<<"\n\tCodigo invima : "<<aux->codinv;
cout<<"\n\tCodigo de comercializacion : "<<aux->codcom;
cout<<"\n\tFecha de vencimiento : "<<aux->ven.dia<<" / "<<aux->ven.mes<<" / "<<aux->ven.ano;
return;
}
aux=aux->propro; //avanzando en lista
}
}
void eliminarpro(){
long em,p;
int res;
system("cls");
cout<<"\n\t\tELIMINAR PRODUCTO";
cout<<"\n\n\tDigite el nit de la empresa : ";cin>>em;
if(validarcodemp(em)== false){//si el codigo de la empresa no esta, no puede seguir
mensage("LA EMPRESA NO SE ENCUENTRA REGISTRADA");
return;
}
cout<<"\n\tDigite el codigo del producto : ";cin>>p;//si el codigo de la empresa no esta, no puede seguir
if(validarpro(em,p)==false){
mensage("EL CODIGO NO SE ENCUENTRA REGISTRADO");
return;
}
producto *aux,*a;
aux=ppro->propro;//asignando
a=ppro;//bloques de memoria para intercambiar y borrar
while(aux != NULL){
if(aux->idem == em && aux->id == p){//si se hallan, muestra los atributos a borrar
system("cls");
cout<<"\n\t\tELIMINAR PRODUCTO";
cout<<"\n\n\tCodigo de la empresa : "<<aux->idem;
cout<<"\n\tCodigo del producto : "<<aux->id;
cout<<"\n\tNombre del producto : "<<aux->nom;
cout<<"\n\tCodigo invima : "<<aux->codinv;
cout<<"\n\tCodigo de comercializacion : "<<aux->codcom;
cout<<"\n\tFecha de vencimiento : "<<aux->ven.dia<<" / "<<aux->ven.mes<<" / "<<aux->ven.ano;
do{
cout<<"\n\n\tDesea eliminar el producto de la empresa (1. Si - 2. No) : ";cin>>res;
error(1,2,res);
}while(res<1 || res>2);
if(res == 1){//borrando
a->propro=aux->propro;//cambiando espacios de memoria
delete aux; //registro borrado
actualizarpro(); //se actulizan los datos en el archivo
mensage("SUS DATOS SE BORRARON SATISFACTORIAMENTE");
}
return;
}
a=aux;//cambiando bloque de memoria
aux=aux->propro;//lista avanzando
}
}
/*****************Fin Seccion de productos************************/
//listaremp(): se encarga de listar todas las empresas registrdas
void listaremp(){
empresa *aux;
aux=pemp->proemp;
system("cls");
cout<<"\n\n\t\tLISTAR EMPRESAS\n\n";
while(aux != NULL){
cout<<"\n\n\tNit : "<<aux->nit;
cout<<"\n\tNombre : "<<aux->nom;
cout<<"\n\tDireccion : "<<aux->dir;
aux=aux->proemp;
}
cout<<"\n\t";
getch();
}
/*Fin de implementacion de funciones*/
/********************Funciones de cargado de imformacion**********************/
//Funcion de load de empresas desde el archivo
void loadempresa(){//carga los datos ya guardados para que la lista pueda preservarlos en nuevo encendido de maquina
if(arcEmp==NULL){
return;
}
empresa emp;
arcEmp=fopen("empresa","r");
fread(&emp,sizeof(struct empresa),1,arcEmp);
while(!feof(arcEmp)){
nodoemp = new empresa;
nodoemp->nit=emp.nit;
strcpy(nodoemp->nom,emp.nom);
strcpy(nodoemp->dir,emp.dir);
nodoemp->proemp=pemp->proemp;
pemp->proemp=nodoemp;
fread(&emp,sizeof(struct empresa),1,arcEmp);
}
fclose(arcEmp);
}
void loadproducto(){//carga los datos ya guardados para que la lista pueda preservarlos en nuevo encendido de maquina
if(arcPro==NULL){
return;
}
producto prod;
arcPro=fopen("producto","r");
fread(&prod,sizeof(struct producto),1,arcPro);
while(!feof(arcPro)){
nodopro= new producto;
nodopro->idem=prod.idem;
nodopro->id=prod.id;
strcpy(nodopro->nom,prod.nom);
nodopro->codinv=prod.codinv;
nodopro->codcom=prod.codcom;
nodopro->ven.dia=prod.ven.dia;
nodopro->ven.mes=prod.ven.mes;
nodopro->ven.ano=prod.ven.ano;
nodopro->propro=ppro->propro;
ppro->propro=nodopro;
fread(&prod,sizeof(struct producto),1,arcPro);
}
fclose(arcPro);
}
//actualizaremp() : se encarga de actualizar los datos en el archivo de empresa
void actualizaremp(){
empresa *aux,pro;
aux=pemp->proemp; //se inicializa el auxiliar para recorrer la lista
arcEmp=fopen("empresa","w+"); //se borran todos los archivos para cargarlos con la actualizacion
fclose(arcEmp);
arcEmp=fopen("empresa","a+"); //se inicializa para anexar las estructuras a el archivo
while(aux != NULL){
pro.nit=aux->nit;
strcpy(pro.nom,aux->nom);
strcpy(pro.dir,aux->dir);
fwrite(&pro,sizeof( struct empresa),1,arcEmp);
aux=aux->proemp;
}
fclose(arcEmp);//cambios preservados
}
//actualizarpro() : se encarga de actualizar los datos en el archivo de empresa
void actualizarpro(){
producto *aux;
aux=ppro->propro; //se inicializa el auxiliar para recorrer la lista
arcPro=fopen("producto","w+"); //se borran todos los archivos para cargarlos con la actualizacion
fclose(arcPro);
arcPro=fopen("producto","a+"); //se inicializa para anexar las estructuras a el archivo
while(aux != NULL){
pro.idem=nodopro->idem;
pro.id=aux->id;
strcpy(pro.nom,aux->nom);
pro.codinv=aux->codinv;
pro.codcom=aux->codcom;
pro.ven.dia=aux->ven.dia;
pro.ven.mes=aux->ven.mes;
pro.ven.ano=aux->ven.ano;
fwrite(&pro,sizeof(struct producto),1,arcPro);
aux=aux->propro;
}
fclose(arcPro);//cambios guardados
}
void menutrabajador(){
int op;
do{
system("cls");
cout<<"\n\tMenu de datos para trabajadores ";
cout<<"\n\n\t1.Registrar ";
cout<<"\n\t2.Modificar ";
cout<<"\n\t3.Consultar ";
cout<<"\n\t4.Eliminar ";
cout<<"\n\t5.Listar ";
cout<<"\n\t6.Salir";
cout<<"\n\n\tDigite la opcion ";
cin>>op;
switch(op){
case 1:
registrartra();
break;
case 2:
if(ptra->protra==NULL){//validamos en caso que no se halla registrado nada antes
printf("\n\tNo hay trabajadores registrados ");
}else{
modificartra();
}
break;
case 3:
if(ptra->protra==NULL){//validamos en caso que no se halla registrado nada antes
printf("\n\tNo hay trabajadores registrados ");
}else{
consultartra();
}
break;
case 4:
if(ptra->protra==NULL){//validamos en caso que no se halla registrado nada antes
printf("\n\tNo hay trabajadores registrados ");
}
eliminartra();
break;
case 5:
if(ptra->protra==NULL){//validamos en caso que no se halla registrado nada antes
printf("\n\tNo hay trabajadores registrados ");
}else{
listartra();
}
break;
}
}while(op!=6); //al presionar 6, rompe el menu
}
void registrartra(){
long long int iden;
do{
system("cls");
cout<<"\n\tRegistrando identificacion del trabajador : ";
cin>>iden;
if(validarcodtra(iden)==true){//si el trabajador se halla, no puede seguir
cout<<"\n\tEl trabajador correspondiente se encuentra registrado ";
getch();
return;
}
}while(iden<1000000||iden>25000000);//validamos en este intervalo porque el compilador no permitia mas
nodotra=new trabajador;
nodotra->id=iden;//asignando identificacion de trabajador en memoria
fflush(stdin);
cout<<"\n\tDigite el nombre : ";gets(nodotra->nom);
cout<<"\n\tDigite su salario : ";cin>>nodotra->sal;
tra2.id=nodotra->id;//aņadiendo registros al fichero
strcpy(tra2.nom,nodotra->nom);
tra2.sal=nodotra->sal;
arcTra=fopen("trabajador","a+");
fwrite(&tra2,sizeof (struct trabajador),1,arcTra);
fclose(arcTra);
nodotra->protra=ptra->protra;
ptra->protra=nodotra;
}
//validando codigo trabajador
bool validarcodtra(long int iden){
trabajador *aux;
aux=ptra->protra;
while(aux!=NULL){//hallando registros ya establecidos para evitar redundandia de informacion
if(aux->id==iden){
return true;
}
aux=aux->protra;
}
return false;
}
//modificando trabajador
void modificartra(){
long long int iden;
int op1;
system("cls");
cout<<"\n\tModificando datos del trabajador ";
cout<<"\n\tDigite el numero de identificacion : ";cin>>iden;
if(validarcodtra(iden)==false){//validando codigo de trabajador
cout<<"\n\tEl trabajador no se encuentra registrado ";
getch();
return;
}
trabajador *aux;
aux=ptra->protra;//asignando bloque de memoria
while(aux!=NULL){
if(aux->id==iden){//si halla el trabajador, muestra sus datos
do{
system("cls");
cout<<"\n\tMenu de datos del trabajador ";
cout<<"\n\t1. Identificacion : "<<aux->id;
cout<<"\n\t2.Nombre : "<<aux->nom;
cout<<"\n\t3.Salario : "<<aux->sal;
cout<<"\n\t4.Salir ";
cout<<"\n\n\tDigite la opcion para modificar ";cin>>op1;
switch(op1){
case 1:
do{
cout<<"\n\n\tDigite la identificacion : ";cin>>aux->id;
if(validarcodtra(aux->id) == true){
cout<<"\n\n\tEl trabajador se encuentra registrado....!";
}//nos cercioramos que el trabajador no se halle anteriormente en lista
}while(aux->id <1000000 || aux->id>25000000 && validarcodtra(aux->id)==true);
break;
case 2:
fflush(stdin);
cout<<"\n\n\tDigite el nombre : ";gets(aux->nom);
break;
case 3:
cout<<"\n\n\tDigite su salario : ";cin>>aux->sal;
break;
}
actualizartra();
}while(op1!=4);
return;
}
aux=aux->protra;
}
}
//consultar un trabajador en particular
void consultartra(){
long long int iden;
cout<<"\n\tConsultar trabajador ";
cout<<"\n\tDigite identificacion del trabajador ";cin>>iden;
if(validarcodtra(iden)==false){//si se halla, no consulta
cout<<"\n\tEl trabajador no se encuentra registrado ";
getch();
return;
}
trabajador *aux;
aux=ptra->protra;
while(aux!=NULL){
if(aux->id==iden){//si lo halla en lista, lo muestra
system("cls");
cout<<"\n\t Trabajador consultado ";
cout<<"\n\n\tIdentificacion : "<<aux->id;
cout<<"\n\tNombre : "<<aux->nom;
cout<<"\n\tSalario : "<<aux->sal;
return;
}
aux=aux->protra;
}
}
//eliminando registro de trabajador
void eliminartra(){
long long int iden;
int res;
cout<<"\n\t\t\tConsultar trabajador para eliminar ";
cout<<"\n\n\tDigite identificacion : ";cin>>iden;
if(validarcodtra(iden)==false){//si no lo halla, no elimina
cout<<"\n\n\n\t\t\a\a\aEl trabajador no se encuentra registrado\n\t";
getch();
return;
}
trabajador *aux,*a;
aux=ptra->protra;//asignando
a=ptra;//bloques de memoria
while(aux != NULL){
if(aux->id==iden){//si lo halla, muestra sus datos para decidir
system("cls");
cout<<"\n\t\t\tEliminar trabajador ";
cout<<"\n\n\tIdentificacion : "<<aux->id;
cout<<"\n\tNombre : "<<aux->nom;
cout<<"\n\tSalario : "<<aux->sal<<"\n\t";
do{
cout<<"\n\n\tDesea eliminar al trabajador (1. Si - 2. No) : ";cin>>res;
}while(res<1 || res>2);
if(res == 1){//borrando
a->protra=aux->protra;//cambiando espacios de memoria
delete aux; //dato borrado
actualizartra();
}
return;
}
a=aux;//cambiando espacio de memoria
aux=aux->protra;//lista avanzando
}
}
//actualizando
void actualizartra(){
trabajador *aux,pro;
aux=ptra->protra; //se inicializa el auxiliar para recorrer la lista
arcTra=fopen("trabajador","w+"); //se borran todos los archivos para cargarlos con la actualizacion
fclose(arcTra);
arcTra=fopen("trabajador","a+"); //se inicializa para anexar las estructuras a el archivo
while(aux != NULL){
pro.id=aux->id;
strcpy(pro.nom,aux->nom);
pro.sal=aux->sal;
fwrite(&pro,sizeof(struct trabajador),1,arcTra);
aux=aux->protra;
}
fclose(arcTra);//cambios guardados
}
//listando
void listartra(){
trabajador *aux;
aux=ptra->protra;
system("cls");
cout<<"\n\n\t\tListar trabajadores\n\n";
while(aux != NULL){//listando empleados
cout<<"\n\n\tidentificacion : "<<aux->id;
cout<<"\n\tNombre : "<<aux->nom;
cout<<"\n\tSalario : "<<aux->sal;
aux=aux->protra;
}
cout<<"\n\t";
getch();
}
//cargando trabajadores
void loadtrabajador(){
if(arcTra==NULL){
return;
}
trabajador tra;
arcTra=fopen("trabajador","r");
fread(&tra,sizeof(struct trabajador),1,arcTra);
while(!feof(arcTra)){//asigna datos para nuevo encendido de maquina
nodotra = new trabajador;
nodotra->id=tra.id;
strcpy(nodotra->nom,tra.nom);
nodotra->sal=tra.sal;
nodotra->protra=ptra->protra;
ptra->protra=nodotra;
fread(&tra,sizeof(struct trabajador),1,arcTra);
}
fclose(arcTra); //carga realizada
}
//menu de cliente
void menucli(){
int op;
do{
system("cls");
cout<<"\n\tMenu de cliente";
cout<<"\n\t1.Registrar ";
cout<<"\n\t2.Modificar ";
cout<<"\n\t3.Consultar ";
cout<<"\n\t4.Eliminar ";
cout<<"\n\t5.Listar ";
cout<<"\n\t6.Salir ";
cout<<"\n\n\tDigite la opcion ";cin>>op;
switch(op){
case 1:
registracli();
break;
case 2:
if(pcli->procli==NULL){//validamos en caso que no se halla registrado nada antes
printf("\n\tNo hay clientes registrados ");
getch();
}else{
modificacli();
}
break;
case 3:
if(pcli->procli==NULL){//validamos en caso que no se halla registrado nada antes
printf("\n\tNo hay clientes registrados ");
getch();
break;
}else{
consultacli();
}
break;
case 4:
if(pcli->procli==NULL){//validamos en caso que no se halla registrado nada antes
printf("\n\tNo hay clientes registrados ");
getch();
break;
}else{
eliminacli();
}
break;
case 5:
if(pcli->procli==NULL){//validamos en caso que no se halla registrado nada antes
printf("\n\tNo hay clientes registrados ");
getch();
break;
}else{
listacli();
}
break;
}
actualizarcli();
}while(op!=6);
getch();
}
void registracli(){
long nit;
do{
system("cls");
cout<<"\n\t\t\tRegistrar cliente";
cout<<"\n\n\tDigite el nit : ";cin>>nit;
if(validarcodcli(nit)==true){
cout<<"\n\n\t\tEl cliente no se halla registrado ";
getch();
return;
}
}while(nit<1 || nit >1000);//validando intervalos y existencia de nit
nodocli= new cliente;//asignando memoria dinamica
nodocli->nit=nit;//asignando nit en lista
cout<<"\n\tDigite identificacion del propietario ";cin>>nodocli->id;
fflush(stdin);
cout<<"\n\tDigite el nombre del cliente : ";gets(nodocli->nom);//ingresando nombre
fflush(stdin);
cout<<"\n\tDigite la direccion : ";gets(nodocli->dir);//ingresando direccion
/****************llenado del archivo con los datos********************************/
cli2.nit=nodocli->nit;
cli2.id=nodocli->id;
strcpy(cli2.nom,nodocli->nom);
strcpy(cli2.dir,nodocli->dir);
arcCli=fopen("cliente","a+");
fwrite(&nodocli,sizeof (struct cliente),1,arcCli);
fclose(arcCli);
/********************************************************************************/
nodocli->procli=pcli->procli;
pcli->procli=nodocli;
}
bool validarcodcli(long nitemp){
cliente *aux;
aux=pcli->procli;
while(aux != NULL){//buscando existencia de nit
if(aux->nit == nitemp){
return true;//si hallo
}
aux=aux->procli;
}
return false;//si no hallo
}
//modificando
void modificacli(){
long nit;
int opc;
system("cls");
cout<<"\n\t\t\tModificar cliente ";
cout<<"\n\n\tDigite el nit : ";cin>>nit;
if(validarcodcli(nit)==false){//si no halla no modifica
cout<<"\n\n\t\tEl cliente no se halla registrado ";
getch();
return;
}
cliente *aux;
aux=pcli->procli;//asignando bloque de memoria
while(aux != NULL){
if(aux->nit==nit){//si lo halla, muestra sus atributos
do{
system("cls");
cout<<"\n\t\t\tModificar cliente ";
cout<<"\n\n\t1. Nit : "<<aux->nit;
cout<<"\n\n\t2.Ident. prop. : "<<aux->id;
cout<<"\n\t3. Nombre : "<<aux->nom;
cout<<"\n\t4. Direccion : "<<aux->dir;
cout<<"\n\t5. Salir. ";
cout<<"\n\n\tDigite la opcion : ";cin>>opc;
switch(opc){
case 1 :
do{
cout<<"\n\n\tDigite el nit : ";cin>>aux->nit;
if(validarcodcli(aux->nit) == true){
cout<<"\n\n\tEl nit se encuentra registrado....!";
}
}while(aux->nit <0 || aux->nit>1000 && validarcodcli(aux->nit)==true);//validando intervalos y existencia
break;
case 2:
cout<<"\n\tDigite identificacion de propietario : ";cin>>aux->id;//cambia id
break;
case 3:
fflush(stdin);
cout<<"\n\n\tDigite el nombre : ";gets(aux->nom);//cambia nombre
break;
case 4:
fflush(stdin);
cout<<"\n\n\tDigite la direccion : ";gets(aux->dir);//cambia direccion
break;
}
actualizarcli();
}while(opc != 5);
return;
}
aux=aux->procli;
}
}
//consultando cliente
void consultacli(){
long nit;
cout<<"\n\t\t\tConsultar cliente";
cout<<"\n\n\tDigite el nit : ";cin>>nit;
if(validarcodcli(nit)==false){//si no esta, puedo no mostrara nada si no esta en lista
cout<<"\n\n\n\t\t\a\a\aEl cliente no esta registrado\n\t";
getch();
return;
}
cliente *aux;
aux=pcli->procli;//asignando bloque de memoria
while(aux != NULL){
if(aux->nit==nit){//si esta el nit en lista, mostrara lo referente a el
system("cls");
cout<<"\n\t\t\tCliente consultado ";
cout<<"\n\n\tNit : "<<aux->nit;
cout<<"\n\n\tIdent. propietario : "<<aux->id;
cout<<"\n\tNombre : "<<aux->nom;
cout<<"\n\tDireccion : "<<aux->dir<<"\n\t";
getch();
return;
}
aux=aux->procli;//lista avanzando
}
}
//eliminando cliente
void eliminacli(){
long nit;
int res;
cout<<"\n\t\t\tConsultar cliente para eliminar ";
cout<<"\n\n\tDigite el nit : ";cin>>nit;
if(validarcodcli(nit)==false){//si no esta, pues no eliminara nada
cout<<"\n\n\n\t\t\a\a\aEl cliente no se halla registrado \n\t";
getch();
return;
}
cliente *aux,*a;
aux=pcli->procli;//asignando
a=pcli;//bloques de memoria para intercambio
while(aux != NULL){
if(aux->nit==nit){//si esta en lista, mostrara todo lo referente
system("cls");
cout<<"\n\t\t\tELIMINAR EMPRESA";
cout<<"\n\n\tNit : "<<aux->nit;
cout<<"\n\n\tIdent. propietario : "<<aux->id;
cout<<"\n\tNombre : "<<aux->nom;
cout<<"\n\tDireccion : "<<aux->dir<<"\n\t";
do{
cout<<"\n\n\tDesea eliminar cliente (1. Si - 2. No) : ";cin>>res;
}while(res<1 || res>2);
if(res == 1){//borrando
a->procli=aux->procli;//cambiando espacios de memoria
delete aux; //dato borrado
actualizarcli();//actualizando
}
}
a=aux;//cambiando
aux=aux->procli;//avanzando lista y bloques de memoria
}
}
//lista clientes
void listacli(){
cliente *aux;
aux=pcli->procli;//asignando memoria
system("cls");
cout<<"\n\n\t\tListado de clientes \n\n";
while(aux != NULL){//listando clientes
cout<<"\n\n\tNit : "<<aux->nit;
cout<<"\n\tIdent. propietario "<<aux->id;
cout<<"\n\tNombre : "<<aux->nom;
cout<<"\n\tDireccion : "<<aux->dir;
aux=aux->procli;//lista avanzando
}
cout<<"\n\t";
getch();
}
//actualizando clientes
void actualizarcli(){
cliente *aux,pro;
aux=pcli->procli; //se inicializa el auxiliar para recorrer la lista
arcCli=fopen("cliente","w+"); //se borran todos los archivos para cargarlos con la actualizacion
fclose(arcCli);
arcCli=fopen("cliente","a+"); //se inicializa para anexar las estructuras a el archivo
while(aux != NULL){
pro.id=aux->id;
pro.nit=aux->nit;
strcpy(pro.nom,aux->nom);
strcpy(pro.dir,aux->dir);
fwrite(&pro,sizeof(struct cliente),1,arcCli);
aux=aux->procli;
}
fclose(arcCli);//cambios preservados
}
void loadcli(){
if(arcCli==NULL){
return;
}
cliente cli;
arcCli=fopen("cliente","r");//accediendo a fichero
fread(&cli,sizeof(struct cliente),1,arcCli);//garantizando flujo de lectura de fichero
while(!feof(arcCli)){//cargando datos para lista en nuevo arranque
nodocli = new cliente;
nodocli->nit=cli.nit;
nodocli->id=cli.id;
strcpy(nodocli->nom,cli.nom);
strcpy(nodocli->dir,cli.dir);
nodocli->procli=pcli->procli;
pcli->procli=nodocli;
fread(&cli,sizeof(struct cliente),1,arcCli);
}
fclose(arcCli);
}
//men de gestion
void menuges(){
int opg;
do{
system("cls");
cout<<"\n\tMenu de gestion de pedido ";
cout<<"\n\t1.Registrar ";
cout<<"\n\t2.Consultar Lista de ventas de empleado ";
cout<<"\n\t3.Eliminar ";
cout<<"\n\t4.Salir ";
cin>>opg;
error(1,4,opg);
switch(opg){
case 1:
registrargest();
break;
case 2:
if(pges->proges==NULL){//validamos en caso que no se halla registrado nada antes
printf("\n\tNo hay gestiones de pedido registradas ");
getch();
break;
}
consulistargest();
break;
case 3:
if(pges->proges==NULL){//validamos en caso que no se halla registrado nada antes
printf("\n\tNo hay gestiones de pedido registradas ");
getch();
break;
}
eliminargest();
break;
}
}while(opg!=4);
}
void registrargest(){
long int idtra1;
long nitg,nite;
long codid;
int e,dias,y;
int op=1;
system("cls");
cout<<"\n\tingrese identificacion del trabajador que hace la venta ";cin>>idtra1;//validamos si el codigo del trabajador existe
if(validarcodtra(idtra1)==false){
cout<<"\n\tEl codigo del empleado no se encuentra registrado ";
}else{
//si existe...
cout<<"\n\tIngrese nit del cliente ";cin>>nitg;//validamos si el nit del cliente existe
if(validarcodcli(nitg)==false){
cout<<"\n\tEl nit del cliente no existe ";
}else{//si existe...
nodogestion= new gestion;//asignando memoria para lista de gestion
nodogestion->idtra=idtra1;//asignando id. de prevendedor
nodogestion->nitemp=nitg;//asignando nit de cliente a vender producto
do{
cout<<"\n\tIngrese nit de la empresa distribuidora del producto ";cin>>nite;//digitemos nit de empresa que nos vende el producto
cout<<"\n\tIngrese codigo del producto a vender ";cin>>codid;//digitemos codigo de producto a vender
if(validarpro(nite,codid)==false){
cout<<"\n\tEl producto o la empresa no existen ";
}else{//si existe...
consultarproges(nite,codid);//mostramos todos los atributos del producto que vendemos para que el comprador se interese o decida
//si comprar o no
do{
cout<<"\n\tDesea hacer la venta ?, (1=si) (2=no), ";cin>>e;//decidiendo venta
}while(e<1||e>2);
if(e==1){//si decidio
do{
cout<<"\n\tDigite cantidad del producto a comprar para vender a cliente ";cin>>nodogestion->cant;
}while(nodogestion->cant<1);//asignando cantidad de unidades vendidas
nodogestion->nitempd=nite;//asignando en lista nit de empresa distribuidora que nos vende el producto para poder comercializarlo
nodogestion->idpro=codid;//asignando en lista codigo de producto en bodega
fechacomp capturaevento=fregis(); //capturando fecha de realizacion de venta desde el sistema
nodogestion->eventoventa.fecm.dia=capturaevento.fecm.dia;//capturando dia de venta
nodogestion->eventoventa.fecm.mes=capturaevento.fecm.mes;//capturando mes de venta
nodogestion->eventoventa.fecm.ano=capturaevento.fecm.ano;//capturando aņo de venta
strcpy(nodogestion->eventoventa.hora,capturaevento.hora);//capturando hora de venta
strcpy(nodogestion->entrega.hora2,nodogestion->eventoventa.hora);//guardando hora de venta para saber hora de entrega
if(capturaevento.fecm.mes==1||capturaevento.fecm.mes==3||capturaevento.fecm.mes==5||capturaevento.fecm.mes==7||capturaevento.fecm.mes==8||capturaevento.fecm.mes==10||capturaevento.fecm.mes==12){
y=1;//cerciorando auxiliar y para saber condicionarl respecto a numero de mes de venta
}else{
y=2;//cerciorando auxiliar y para saber condicionarl respecto a numero de mes de venta
}
do{
cout<<"\n\tDigite plazo en dias (15 dias limite )";cin>>dias;
}while(dias<1||dias>15);//digitando plazo de dias para entrega del producto
nodogestion->plazo=dias;//asignando plazo
//calculando fecha de entrega respecto a dias, meses y aņos
if(nodogestion->entrega.mes2=capturaevento.fecm.mes){
nodogestion->entrega.dia2=nodogestion->eventoventa.fecm.dia+dias;
nodogestion->entrega.ano2=nodogestion->eventoventa.fecm.ano;
}
if(y==2){
if(nodogestion->eventoventa.fecm.dia+dias>30){
nodogestion->entrega.dia2=nodogestion->eventoventa.fecm.dia+dias-30;
nodogestion->entrega.mes2=nodogestion->eventoventa.fecm.mes+1;
}
}else{
if(nodogestion->eventoventa.fecm.dia+dias>31){
nodogestion->entrega.dia2=nodogestion->eventoventa.fecm.dia+dias-31;
nodogestion->entrega.mes2=nodogestion->eventoventa.fecm.mes+1;
}
if((nodogestion->eventoventa.fecm.mes==12)&&(nodogestion->eventoventa.fecm.dia+dias>31)){
nodogestion->entrega.dia2=nodogestion->eventoventa.fecm.dia+dias-31;
nodogestion->entrega.mes2=1;
nodogestion->entrega.ano2=nodogestion->eventoventa.fecm.ano+1;
}
}
//mostrando fecha de venta y entrega
cout<<"\n\tFecha de venta ";
cout<<"\n\tDia "<<nodogestion->eventoventa.fecm.dia;
cout<<"\n\tMes "<<nodogestion->eventoventa.fecm.mes;
cout<<"\n\tAņo "<<nodogestion->eventoventa.fecm.ano;
cout<<"\n\tHora "<<nodogestion->eventoventa.hora;
cout<<"\n\n";
cout<<"\n\tFecha de entrega ";
cout<<"\n\tDia "<<nodogestion->entrega.dia2;
cout<<"\n\tMes "<<nodogestion->entrega.mes2;
cout<<"\n\tAņo "<<nodogestion->entrega.ano2;
cout<<"\n\tHora "<<nodogestion->entrega.hora2;
}
}
cout<<"\n\tPara realizar mas ventas presione 1 ";cin>>op;//decidiendo nueva venta
/*Llenando datos al fichero sobre realizacion de venta */
ges1.idtra=nodogestion->idtra;
ges1.nitemp=nodogestion->nitemp;
ges1.idpro=nodogestion->idpro;
ges1.nitempd=nodogestion->nitempd;
ges1.cant=nodogestion->cant;
ges1.plazo=nodogestion->plazo;
ges1.eventoventa.fecm.dia=nodogestion->eventoventa.fecm.dia;
ges1.eventoventa.fecm.mes=nodogestion->eventoventa.fecm.mes;
ges1.eventoventa.fecm.ano=nodogestion->eventoventa.fecm.ano;
strcpy(ges1.eventoventa.hora,nodogestion->eventoventa.hora);
ges1.entrega.dia2=nodogestion->entrega.dia2;
ges1.entrega.mes2=nodogestion->entrega.mes2;
ges1.entrega.ano2=nodogestion->entrega.ano2;
strcpy(ges1.entrega.hora2,nodogestion->entrega.hora2);
arcGes=fopen("gestion","a+");
fwrite(&ges1,sizeof(struct gestion),1,arcGes);
fclose(arcGes);
/*****************************************************************/
nodogestion->proges=pges->proges;//avanzando lista para reservar espacios de memoria
pges->proges=nodogestion;
}while(op==1);
}
}
getch();
}
//consultar gestion
void consulistargest(){
long int idtra;
system("cls");
gestion *aux;
cout<<"\n\tDigite codigo del prevendedor ";cin>>idtra;
if(validarcodtra(idtra)==true){//si el codigo del prevendedor existe, muestra la lista
aux=pges->proges;//asignando espacio de memoria
while(aux!=NULL){
if(aux->idtra==idtra){//condicional adicional que nos permite ver con mas certeza si el trabajador existe y que venta hizo
cout<<"\n\tidentificacion del producto "<<aux->idpro;
cout<<"\n\tcantidad de unidades vendidas del producto "<<aux->cant;
cout<<"\n\tFecha de realizacion de venta ";
cout<<"\n\tDia "<<aux->eventoventa.fecm.dia;
cout<<"\n\tMes "<<aux->eventoventa.fecm.mes;
cout<<"\n\tAņo "<<aux->eventoventa.fecm.ano;
cout<<"\n\tHora "<<aux->eventoventa.hora;
cout<<"\n";
cout<<"\n\tFecha de entrega de venta ";
cout<<"\n\tDia "<<aux->entrega.dia2;
cout<<"\n\tMes "<<aux->entrega.mes2;
cout<<"\n\tAņo "<<aux->entrega.ano2;
cout<<"\n\tHora "<<aux->entrega.hora2;
getch();
return;
}
aux=aux->proges;//lista avanzando
}
}else{
cout<<"\n\tEl vendedor no existe ";
}
getch();
}
//elimnar gestion
void eliminargest(){
int eli,codid;
system("cls");
cout<<"\n\tDigite identificacion de vendedor a eliminar ";cin>>codid;
if(validarcodtra(codid)==false){//cerciorandonos si el vendedor existe o no
cout<<"\n\tEl numero de identificacion del vendedor no existe";
}else{//si existe...
gestion *aux,*a;
aux=pges->proges;//asignando bloques de memoria
a=pges;
while(aux!=NULL){
if(aux->idtra==codid){//si se halla en lista, muestra lo relacionado con la venta
cout<<"\n\tidentificacion del producto "<<aux->idpro;
cout<<"\n\tcantidad de unidades vendidas del producto "<<aux->cant;
cout<<"\n\tFecha de realizacion de venta ";
cout<<"\n\tDia "<<aux->eventoventa.fecm.dia;
cout<<"\n\tMes "<<aux->eventoventa.fecm.mes;
cout<<"\n\tAņo "<<aux->eventoventa.fecm.ano;
cout<<"\n\tHora "<<aux->eventoventa.hora;
cout<<"\n";
cout<<"\n\tFecha de entrega de venta ";
cout<<"\n\tDia "<<aux->entrega.dia2;
cout<<"\n\tMes "<<aux->entrega.mes2;
cout<<"\n\tAņo "<<aux->entrega.ano2;
cout<<"\n\tHora "<<aux->entrega.hora2;
cout<<"\n\n";
do{
cout<<"\n\tDesea eliminar la venta (1=si) (2=no)";cin>>eli;
error(1,2,eli);
}while(eli<1||eli>2);
if(eli==1){//borrando
a->proges=aux->proges;//cambiando bloques de memoria
delete aux;//borrando dato
actualizages();//actualizando
}
return;
}
a=aux;//cambiando
aux=aux->proges;//y lista avanzando
}
}
}
//actualiza gestion
void actualizages(){
gestion *aux,pro;
aux=pges->proges;//asignando memoria
arcGes=fopen("gestion","w+");//reescribiendo fichero
fclose(arcGes);
arcGes=fopen("gestion","a+");
while(aux!=NULL){//cambiando lista miembro a miembro
pro.idtra=aux->idtra;
pro.nitemp=aux->nitemp;
pro.nitempd=aux->nitempd;
pro.idpro=aux->idpro;
pro.cant=aux->cant;
pro.plazo=aux->plazo;
pro.eventoventa.fecm.dia=aux->eventoventa.fecm.dia;
pro.eventoventa.fecm.mes=aux->eventoventa.fecm.mes;
pro.eventoventa.fecm.ano=aux->eventoventa.fecm.ano;
strcpy(pro.eventoventa.hora,aux->eventoventa.hora);
pro.entrega.dia2=aux->entrega.dia2;
pro.entrega.mes2=aux->entrega.mes2;
pro.entrega.ano2=aux->entrega.ano2;
strcpy(pro.entrega.hora2,aux->entrega.hora2);
fwrite(&pro,sizeof(struct gestion),1,arcGes);
aux=aux->proges;
}
fclose(arcGes);//cambios preservados
}
//cargando gestion
void loadges(){
if(arcGes==NULL){
return;
}
gestion ges;
arcGes=fopen("gestion","r");//accediendo a datos de fichero
fread(&ges,sizeof(struct gestion),1,arcGes);//flujo de datos
while(!feof(arcGes)){//asignando datos a lista en nuevo arranque
nodogestion= new gestion;
nodogestion->idtra=ges.idtra;
nodogestion->nitemp=ges.nitemp;
nodogestion->nitempd=ges.nitempd;
nodogestion->idpro=ges.idpro;
nodogestion->cant=ges.cant;
nodogestion->plazo=ges.plazo;
nodogestion->eventoventa.fecm.dia=ges.eventoventa.fecm.dia;
nodogestion->eventoventa.fecm.mes=ges.eventoventa.fecm.mes;
nodogestion->eventoventa.fecm.ano=ges.eventoventa.fecm.ano;
strcpy(nodogestion->eventoventa.hora,ges.eventoventa.hora);
nodogestion->entrega.dia2=ges.entrega.dia2;
nodogestion->entrega.mes2=ges.entrega.mes2;
nodogestion->entrega.ano2=ges.entrega.ano2;
strcpy(nodogestion->entrega.hora2,ges.entrega.hora2);
nodogestion->proges=pges->proges;
pges->proges=nodogestion;
fread(&ges,sizeof(struct gestion),1,arcGes);
}
fclose(arcGes);//carga realizada
}
//consulta producto de gestion: permite ver lo relacionado con producto a vender en momento de gestion de pedido
void consultarproges(long codem, long codid){
producto *aux;
if(validarpro(codem,codid)==false){
cout<<"\n\tLa empresa y/o el codigo del producto no se encuentran registrados ";
getch();
return;
}
aux=ppro->propro;//asignando memoria
while(aux != NULL){
if(aux->idem ==codem && aux->id==codid){//mostrando atributos, si esta en lista
cout<<"\n\n\tCodigo de la empresa : "<<aux->idem;
cout<<"\n\tCodigo del producto : "<<aux->id;
cout<<"\n\tNombre del producto : "<<aux->nom;
cout<<"\n\tCodigo invima : "<<aux->codinv;
cout<<"\n\tCodigo de comercializacion : "<<aux->codcom;
cout<<"\n\tFecha de vencimiento : "<<aux->ven.dia<<" / "<<aux->ven.mes<<" / "<<aux->ven.ano;
return;
}
aux=aux->propro; //avanzando
}
}
/********************Fin de de cargado de informacion**********************/
/*******Utilidades***********/
//void mensage:se encarga de generar un mensage
void mensage(char m['s']){
cout<<"\n\n\t"<<m<<"....!";
getch();
}
/***Fin Utilidades***********/
/*******funciones de manejo de fecha***********/
fechacomp fregis(){//averiguando fecha y hora del sistema
fechacomp aux;
time_t tiempo;
char cad[80],*p,nom['v'];//estas variables y el puntero char ayudaran a saber cual es la fecha del sistema
int num=80,*c;
p=&cad[0];//tomando espacio de memoria con operador unario
c=#//tomando espacio de memoria con operador unario
struct tm *tmPtr;//puntero con tipo de dato tm que permite acceder a fecha y hora del sistema
tiempo = time(NULL);//tomando fecha y hora
tmPtr = localtime(&tiempo);//capturando fecha y hora
strftime( cad, 80, "%H:%M:%S, %d de %m de %Y", tmPtr );//funcion que permite transferir la fecha y hora del puntero tmPtr a variable char cad[80]
cortar(nom,cad); //llamando a funcion separadora de fecha y hora
fechas(&aux.fecm.dia,&aux.fecm.mes,&aux.fecm.ano,cad);//funcion obteniee fecha de sistema
strcpy(aux.hora,nom);//obteniendo hora del sistema para determinar vencimiento de producto y gestion de pedido
return aux;
}
int menuchartoint(char j){//funcion que permite tomar cada numero en varible char y convertirlo en entero uno por uno para saber fecha y transferirla
switch(j){
case '0':
return 0;
break;
case '1':
return 1;
break;
case '2':
return 2;
break;
case '3':
return 3;
break;
case '4':
return 4;
break;
case '5':
return 5;
break;
case '6':
return 6;
break;
case '7':
return 7;
break;
case '8':
return 8;
break;
case '9':
return 9;
break;
}
}
void cortar(char *h,char *f){
int i=0,w=0,w2=0,e=0;
char aux[8],aux2[16];//variables auxliares para separar fecha y hora
while(f[i] != '\0'){//en estos ciclos
if(f[i]==','){//separaramos la hora teniendo en cuenta el signo de separacion del sistema que es una coma, aunque la vemos como ":"
while(f[w] != ','){
aux[w]=f[w];//separando datos de char uno a uno
w++;
}
strcpy(h,aux); //obteniendo hora
e=i+1;//variable auxiliar iteradora que ayuda a tener fecha
while(f[e] != '\0'){//en este ciclo obtenemos la fecha
aux2[w2]=f[e];//pasando numeros de fecha uno a uno
w2++;//iterados auxiliar de fecha avanzando
e++;}//fin de ciclo
strcpy(f,aux2);//obteniendo fecha
return;
}
i++;//avanzando ciclo hasta llegar a null para tener fecha y hora
}
}
void fechas(int *d,int *m,int *a,char *fecha){//funcion para tener fecha final
int d1,d2,m1,m2,a1,a2,a3,a4;
for(int v=0;v<17;v++){//al avanzar los 17 caracteres en los que se halla la fecha aun dispersa
if(v==1){//llamamos de acuerdo a su ubicacion en la variable cad[80], llamamos a la funcion que convierte
d1=menuchartoint(fecha[v]);//char a int y multiplicamos cada variable de acuerdo al orden cronologico de los datos
d1*=10;//aqui tenemos la decena del dia
}
if(v==2){
d2=menuchartoint(fecha[v]);//unidad de dia
}
if(v==7){
m1=menuchartoint(fecha[v]);
m1*=10;//decena de mes
}
if(v==8){
m2=menuchartoint(fecha[v]); //unidad de mes
}
if(v==13){
a1=menuchartoint(fecha[v]);
a1*=1000;//unidad de mil de aņo
}
if(v==14){
a2=menuchartoint(fecha[v]);
a2*=100; //centena de aņo
}
if(v==15){
a3=menuchartoint(fecha[v]);
a3*=10; //decena de aņo
}
if(v==16){
a4=menuchartoint(fecha[v]); //unidad de aņo
}
}//calculando despues de ciclo las fecha mediante la suma de unidades obtenidas en bucle para saber la fecha final
*d=d1+d2;
*m=m1+m2;
*a=a1+a2+a3+a4;//los datos de la suma se transfiere en punteros que pasan datos por parametro por referencia, por eso los parametros son punteros
}
| [
"ptb1204@hotmail.com"
] | ptb1204@hotmail.com |
d8e7fff115fa8cb30efc6bd1f9ab2de2813dfd53 | f024ab2d278bb553dc82890867f22a19228966bb | /Lab9/TreeTest.cpp | 1e32035b83b67e12b84f242d0dd237def4c42580 | [] | no_license | jkhounsombath/LabHelp | 162a35d29faedddfecbd8a1dd3afdbacd655c3fa | 8d2ad81d23a6d4b959a82fb87e5362aac0a15542 | refs/heads/master | 2022-04-10T01:19:27.420765 | 2020-03-26T16:20:48 | 2020-03-26T16:20:48 | 250,155,252 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,686 | cpp | #include "TreeTest.h"
void TreeTest::testAdds(BST<Pokemon, std::string> bst)
{
std::string americanName;
int pokeNumber;
std::string japaneseName;
std::cout<<"What do you want the Pokemon name(US) to be: \n";
std::cin>>americanName;
std::cout<<"What do you want the Pokemon number to be: \n";
std::cin>>pokeNumber;
std::cout<<"What do you want the Pokemon name(Japanese) to be: \n";
std::cin>>japaneseName;
try
{
Pokemon* newPokemon= new Pokemon(americanName, pokeNumber, japaneseName);
bst.add(*newPokemon);
delete newPokemon;
bst.visitInOrder(std::bind(&TreeTest::print, this, std::placeholders::_1));
std::cout<< std::endl;
}
catch (std::runtime_error rte)
{
std::cout<<"Duplicate pokemon name\n";
}
}
void TreeTest::testWriteToFile(BST<Pokemon, std::string> bst)
{
std::string outName;
std::cout<<"Enter an output file name: \n";
std::cin>>outName;
outFile.open(outName);
bst.visitInOrder(std::bind(&TreeTest::save, this, std::placeholders::_1));
outFile.close();
}
void TreeTest::testRemoves(BST<Pokemon, std::string> bst)
{
std::string name;
std::cout<<"Enter the American name of the pokemon you would like to remove from the tree: \n";
std::cin>>name;
bst.remove(name);
bst.visitInOrder(std::bind(&TreeTest::print, this, std::placeholders::_1));
}
void TreeTest::print(Pokemon poke)
{
std::cout<<std::endl<<"American Name: "<<poke.getAmericanName()<<std::endl;
std::cout<<"Pokedex Number: "<<poke.getNumber()<<std::endl;
std::cout<<"Japanese Name: "<<poke.getJapaneseName()<<std::endl<<std::endl;
}
void TreeTest::save(Pokemon poke)
{
outFile<<poke.getAmericanName()<<" "<<poke.getNumber()<<" "<<poke.getJapaneseName()<<"\n";
}
| [
"jkhounsombath@ku.edu"
] | jkhounsombath@ku.edu |
6ee11516f59dd809401815499a3d0da43b0be113 | 4f6fcdcf4c03fd3f1dcaa92cfc9c69b2ae3cb26b | /app/libs/mono_rs_wrapper/jni/rsMonoWrapper.h | a13e33372714018d64573c4a4c5d352ff1c99b9b | [] | no_license | EE202B/rsNDKTest | fd76294019c89a41c667c3696663aa7162cac941 | 6519b196250f6b0cc1c728eba7eca9e879af86c8 | refs/heads/master | 2020-04-06T04:26:06.462204 | 2017-02-26T08:11:42 | 2017-02-26T08:11:42 | 82,923,013 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 206 | h | #ifndef __RSMONOWRAPPER_H__
#define __RSMONOWRAPPER_H__
#include "RenderScript.h"
using namespace android::RSC;
void launch_mono(sp<Allocation> inputAlloc, sp<Allocation> outputAlloc, sp<RS> rs);
#endif | [
"wang4817@umn.edu"
] | wang4817@umn.edu |
149cacc626160979ec63958cc785b76befda0464 | 7828fd28d3699b11568bb0a9be5f63206234565f | /Overkill/ZerglingArmy.h | 146826730c8598e231ad5fd3026d57118db188b1 | [] | no_license | Oldtoby1/Overkill | a0ae5fb110ef66bd155da8b641e5e9456fbf1f2e | e34cf371b918a786cedf50789d3c80eb69c4ddf6 | refs/heads/master | 2021-01-12T19:52:22.724759 | 2015-12-06T13:33:16 | 2015-12-06T13:33:16 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 483 | h | #pragma once
#include "BattleArmy.h"
#include "InformationManager.h"
class ZerglingArmy : public BattleArmy
{
void zerglingFSM(UnitState& myUnit, BWAPI::Unit* target);
public:
ZerglingArmy() {}
void defend(BWAPI::Position targetPosition);
void attack(BWAPI::Position targetPosition);
int getAttackPriority(BWAPI::Unit * unit);
void harassAttack(BWAPI::Position targetPosition);
int harassAttackPriority(BWAPI::Unit * unit);
void attackScoutWorker(BWAPI::Unit* unit);
}; | [
"xsj.guagua@gmail.com"
] | xsj.guagua@gmail.com |
87e65ad0ecf118a7b2f11a8c73a57d59c3a8cd24 | 4b42fae3479a99b3a1f6e16922e92809a0945c82 | /components/data_reduction_proxy/core/common/data_reduction_proxy_params.cc | 1e3fd9a7a0e8d3c44ee92625ee284a88d0fa21a7 | [
"BSD-3-Clause"
] | permissive | Jtl12/browser-android-tabs | 5eed5fc4d6c978057c910b58c3ea0445bb619ee9 | f5406ad2a104d373062a86778d913e6b0a556e10 | refs/heads/master | 2023-04-02T05:20:33.277558 | 2018-07-20T12:56:19 | 2018-07-20T12:56:19 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 14,960 | cc | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
#include <map>
#include <string>
#include <vector>
#include "base/command_line.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/field_trial_params.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_features.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_server.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h"
#include "components/variations/variations_associated_data.h"
#include "net/base/proxy_server.h"
#include "net/http/http_status_code.h"
#include "url/url_constants.h"
#if defined(OS_ANDROID)
#include "base/sys_info.h"
#endif
namespace {
const char kEnabled[] = "Enabled";
const char kControl[] = "Control";
const char kDisabled[] = "Disabled";
const char kDefaultSecureProxyCheckUrl[] = "http://check.googlezip.net/connect";
const char kDefaultWarmupUrl[] = "http://check.googlezip.net/e2e_probe";
const char kQuicFieldTrial[] = "DataReductionProxyUseQuic";
const char kLoFiFieldTrial[] = "DataCompressionProxyLoFi";
const char kLoFiFlagFieldTrial[] = "DataCompressionProxyLoFiFlag";
// Default URL for retrieving the Data Reduction Proxy configuration.
const char kClientConfigURL[] =
"https://datasaver.googleapis.com/v1/clientConfigs";
// Default URL for sending pageload metrics.
const char kPingbackURL[] =
"https://datasaver.googleapis.com/v1/metrics:recordPageloadMetrics";
// The name of the server side experiment field trial.
const char kServerExperimentsFieldTrial[] =
"DataReductionProxyServerExperiments";
// LitePage black list version.
const char kLitePageBlackListVersion[] = "lite-page-blacklist-version";
const char kWarmupFetchCallbackEnabledParam[] = "warmup_fetch_callback_enabled";
const char kMissingViaBypassDisabledParam[] = "bypass_missing_via_disabled";
bool IsIncludedInFieldTrial(const std::string& name) {
return base::StartsWith(base::FieldTrialList::FindFullName(name), kEnabled,
base::CompareCase::SENSITIVE);
}
// Returns the variation value for |parameter_name|. If the value is
// unavailable, |default_value| is returned.
std::string GetStringValueForVariationParamWithDefaultValue(
const std::map<std::string, std::string>& variation_params,
const std::string& parameter_name,
const std::string& default_value) {
const auto it = variation_params.find(parameter_name);
if (it == variation_params.end())
return default_value;
return it->second;
}
bool CanShowAndroidLowMemoryDevicePromo() {
#if defined(OS_ANDROID)
return base::SysInfo::IsLowEndDevice() &&
base::FeatureList::IsEnabled(
data_reduction_proxy::features::
kDataReductionProxyLowMemoryDevicePromo);
#endif
return false;
}
} // namespace
namespace data_reduction_proxy {
namespace params {
bool IsIncludedInPromoFieldTrial() {
if (IsIncludedInFieldTrial("DataCompressionProxyPromoVisibility"))
return true;
return CanShowAndroidLowMemoryDevicePromo();
}
bool IsIncludedInFREPromoFieldTrial() {
if (IsIncludedInFieldTrial("DataReductionProxyFREPromo"))
return true;
return CanShowAndroidLowMemoryDevicePromo();
}
bool IsIncludedInHoldbackFieldTrial() {
return IsIncludedInFieldTrial("DataCompressionProxyHoldback");
}
std::string HoldbackFieldTrialGroup() {
return base::FieldTrialList::FindFullName("DataCompressionProxyHoldback");
}
const char* GetLoFiFieldTrialName() {
return kLoFiFieldTrial;
}
const char* GetLoFiFlagFieldTrialName() {
return kLoFiFlagFieldTrial;
}
const char* GetWarmupCallbackParamName() {
return kWarmupFetchCallbackEnabledParam;
}
const char* GetMissingViaBypassParamName() {
return kMissingViaBypassDisabledParam;
}
bool IsIncludedInServerExperimentsFieldTrial() {
return !base::CommandLine::ForCurrentProcess()->HasSwitch(
data_reduction_proxy::switches::
kDataReductionProxyServerExperimentsDisabled) &&
base::FieldTrialList::FindFullName(kServerExperimentsFieldTrial)
.find(kDisabled) != 0;
}
bool FetchWarmupProbeURLEnabled() {
return !base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableDataReductionProxyWarmupURLFetch);
}
GURL GetWarmupURL() {
std::map<std::string, std::string> params;
variations::GetVariationParams(GetQuicFieldTrialName(), ¶ms);
return GURL(GetStringValueForVariationParamWithDefaultValue(
params, "warmup_url", kDefaultWarmupUrl));
}
bool IsWhitelistedHttpResponseCodeForProbes(int http_response_code) {
// 200 and 404 are always whitelisted.
if (http_response_code == net::HTTP_OK ||
http_response_code == net::HTTP_NOT_FOUND) {
return true;
}
// Check if there is an additional whitelisted HTTP response code provided via
// the field trial params.
std::map<std::string, std::string> params;
variations::GetVariationParams(GetQuicFieldTrialName(), ¶ms);
const std::string value = GetStringValueForVariationParamWithDefaultValue(
params, "whitelisted_probe_http_response_code", "");
int response_code;
if (!base::StringToInt(value, &response_code))
return false;
return response_code == http_response_code;
}
bool ShouldBypassMissingViaHeader(bool connection_is_cellular) {
return GetFieldTrialParamByFeatureAsBool(
data_reduction_proxy::features::kMissingViaHeaderShortDuration,
connection_is_cellular ? "should_bypass_missing_via_cellular"
: "should_bypass_missing_via_wifi",
true);
}
std::pair<base::TimeDelta, base::TimeDelta>
GetMissingViaHeaderBypassDurationRange(bool connection_is_cellular) {
base::TimeDelta bypass_max =
base::TimeDelta::FromSeconds(GetFieldTrialParamByFeatureAsInt(
data_reduction_proxy::features::kMissingViaHeaderShortDuration,
connection_is_cellular ? "missing_via_max_bypass_cellular_in_seconds"
: "missing_via_max_bypass_wifi_in_seconds",
300));
base::TimeDelta bypass_min =
base::TimeDelta::FromSeconds(GetFieldTrialParamByFeatureAsInt(
data_reduction_proxy::features::kMissingViaHeaderShortDuration,
connection_is_cellular ? "missing_via_min_bypass_cellular_in_seconds"
: "missing_via_min_bypass_wifi_in_seconds",
60));
return {bypass_min, bypass_max};
}
bool IsForcePingbackEnabledViaFlags() {
return base::CommandLine::ForCurrentProcess()->HasSwitch(
data_reduction_proxy::switches::kEnableDataReductionProxyForcePingback);
}
bool WarnIfNoDataReductionProxy() {
return base::CommandLine::ForCurrentProcess()->HasSwitch(
data_reduction_proxy::switches::kEnableDataReductionProxyBypassWarning);
}
bool IsIncludedInQuicFieldTrial() {
if (base::StartsWith(base::FieldTrialList::FindFullName(kQuicFieldTrial),
kControl, base::CompareCase::SENSITIVE)) {
return false;
}
if (base::StartsWith(base::FieldTrialList::FindFullName(kQuicFieldTrial),
kDisabled, base::CompareCase::SENSITIVE)) {
return false;
}
// QUIC is enabled by default.
return true;
}
bool IsQuicEnabledForNonCoreProxies() {
DCHECK(IsIncludedInQuicFieldTrial());
std::map<std::string, std::string> params;
variations::GetVariationParams(GetQuicFieldTrialName(), ¶ms);
return GetStringValueForVariationParamWithDefaultValue(
params, "enable_quic_non_core_proxies", "true") != "false";
}
const char* GetQuicFieldTrialName() {
return kQuicFieldTrial;
}
bool IsBrotliAcceptEncodingEnabled() {
// Brotli encoding is enabled by default since the data reduction proxy server
// controls when to serve Brotli encoded content. It can be disabled in
// Chromium only if Chromium belongs to a field trial group whose name starts
// with "Disabled".
return !base::StartsWith(base::FieldTrialList::FindFullName(
"DataReductionProxyBrotliAcceptEncoding"),
kDisabled, base::CompareCase::SENSITIVE);
}
bool IsConfigClientEnabled() {
// Config client is enabled by default. It can be disabled only if Chromium
// belongs to a field trial group whose name starts with "Disabled".
return !base::StartsWith(
base::FieldTrialList::FindFullName("DataReductionProxyConfigService"),
kDisabled, base::CompareCase::SENSITIVE);
}
GURL GetConfigServiceURL() {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
std::string url;
if (command_line->HasSwitch(switches::kDataReductionProxyConfigURL)) {
url = command_line->GetSwitchValueASCII(
switches::kDataReductionProxyConfigURL);
}
if (url.empty())
return GURL(kClientConfigURL);
GURL result(url);
if (result.is_valid())
return result;
LOG(WARNING) << "The following client config URL specified at the "
<< "command-line or variation is invalid: " << url;
return GURL(kClientConfigURL);
}
GURL GetPingbackURL() {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
std::string url;
if (command_line->HasSwitch(switches::kDataReductionPingbackURL)) {
url =
command_line->GetSwitchValueASCII(switches::kDataReductionPingbackURL);
}
if (url.empty())
return GURL(kPingbackURL);
GURL result(url);
if (result.is_valid())
return result;
LOG(WARNING) << "The following page load metrics URL specified at the "
<< "command-line or variation is invalid: " << url;
return GURL(kPingbackURL);
}
bool ShouldForceEnableDataReductionProxy() {
return base::CommandLine::ForCurrentProcess()->HasSwitch(
data_reduction_proxy::switches::kEnableDataReductionProxy);
}
int LitePageVersion() {
return GetFieldTrialParameterAsInteger(
data_reduction_proxy::params::GetLoFiFieldTrialName(),
kLitePageBlackListVersion, 0, 0);
}
int GetFieldTrialParameterAsInteger(const std::string& group,
const std::string& param_name,
int default_value,
int min_value) {
DCHECK(default_value >= min_value);
std::string param_value =
variations::GetVariationParamValue(group, param_name);
int value;
if (param_value.empty() || !base::StringToInt(param_value, &value) ||
value < min_value) {
return default_value;
}
return value;
}
bool GetOverrideProxiesForHttpFromCommandLine(
std::vector<DataReductionProxyServer>* override_proxies_for_http) {
DCHECK(override_proxies_for_http);
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDataReductionProxyHttpProxies)) {
// It is illegal to use |kDataReductionProxy| or
// |kDataReductionProxyFallback| with |kDataReductionProxyHttpProxies|.
DCHECK(base::CommandLine::ForCurrentProcess()
->GetSwitchValueASCII(switches::kDataReductionProxy)
.empty());
DCHECK(base::CommandLine::ForCurrentProcess()
->GetSwitchValueASCII(switches::kDataReductionProxyFallback)
.empty());
override_proxies_for_http->clear();
std::string proxy_overrides =
base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kDataReductionProxyHttpProxies);
std::vector<std::string> proxy_override_values = base::SplitString(
proxy_overrides, ";", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
for (const std::string& proxy_override : proxy_override_values) {
// Overriding proxies have type UNSPECIFIED_TYPE.
override_proxies_for_http->push_back(DataReductionProxyServer(
net::ProxyServer::FromURI(proxy_override,
net::ProxyServer::SCHEME_HTTP),
ProxyServer::UNSPECIFIED_TYPE));
}
return true;
}
std::string origin =
base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kDataReductionProxy);
std::string fallback_origin =
base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kDataReductionProxyFallback);
if (origin.empty() && fallback_origin.empty())
return false;
override_proxies_for_http->clear();
// Overriding proxies have type UNSPECIFIED_TYPE.
if (!origin.empty()) {
override_proxies_for_http->push_back(DataReductionProxyServer(
net::ProxyServer::FromURI(origin, net::ProxyServer::SCHEME_HTTP),
ProxyServer::UNSPECIFIED_TYPE));
}
if (!fallback_origin.empty()) {
override_proxies_for_http->push_back(DataReductionProxyServer(
net::ProxyServer::FromURI(fallback_origin,
net::ProxyServer::SCHEME_HTTP),
ProxyServer::UNSPECIFIED_TYPE));
}
return true;
}
const char* GetServerExperimentsFieldTrialName() {
return kServerExperimentsFieldTrial;
}
GURL GetSecureProxyCheckURL() {
std::string secure_proxy_check_url =
base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kDataReductionProxySecureProxyCheckURL);
if (secure_proxy_check_url.empty())
secure_proxy_check_url = kDefaultSecureProxyCheckUrl;
return GURL(secure_proxy_check_url);
}
} // namespace params
DataReductionProxyTypeInfo::DataReductionProxyTypeInfo() : proxy_index(0) {}
DataReductionProxyTypeInfo::DataReductionProxyTypeInfo(
const DataReductionProxyTypeInfo& other) = default;
DataReductionProxyTypeInfo::~DataReductionProxyTypeInfo() {}
DataReductionProxyParams::DataReductionProxyParams() {
bool use_override_proxies_for_http =
params::GetOverrideProxiesForHttpFromCommandLine(&proxies_for_http_);
if (!use_override_proxies_for_http) {
DCHECK(proxies_for_http_.empty());
proxies_for_http_.push_back(DataReductionProxyServer(
net::ProxyServer::FromURI("https://proxy.googlezip.net:443",
net::ProxyServer::SCHEME_HTTP),
ProxyServer::CORE));
proxies_for_http_.push_back(DataReductionProxyServer(
net::ProxyServer::FromURI("compress.googlezip.net:80",
net::ProxyServer::SCHEME_HTTP),
ProxyServer::CORE));
}
}
DataReductionProxyParams::~DataReductionProxyParams() {}
void DataReductionProxyParams::SetProxiesForHttpForTesting(
const std::vector<DataReductionProxyServer>& proxies_for_http) {
proxies_for_http_ = proxies_for_http;
}
const std::vector<DataReductionProxyServer>&
DataReductionProxyParams::proxies_for_http() const {
return proxies_for_http_;
}
} // namespace data_reduction_proxy
| [
"artem@brave.com"
] | artem@brave.com |
219ccc6aa8f88f0a14ff0691c4b18acc7b609be8 | 98b1e51f55fe389379b0db00365402359309186a | /homework_6/problem_2/10x10/0.367/U | 2ee4bce870ecad061f20ad140f8a8b931f0b962f | [] | no_license | taddyb/597-009 | f14c0e75a03ae2fd741905c4c0bc92440d10adda | 5f67e7d3910e3ec115fb3f3dc89a21dcc9a1b927 | refs/heads/main | 2023-01-23T08:14:47.028429 | 2020-12-03T13:24:27 | 2020-12-03T13:24:27 | 311,713,551 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,147 | /*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 8
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0.367";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (2 2 0);
boundaryField
{
left
{
type fixedValue;
value uniform (2 2 0);
}
right
{
type zeroGradient;
}
up
{
type zeroGradient;
}
down
{
type fixedValue;
value uniform (2 2 0);
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //
| [
"tbindas@pop-os.localdomain"
] | tbindas@pop-os.localdomain | |
18011fbd10574332d589c7da2e529e8146bbc706 | 3ce69b9dd896e60e8833807b22e330d9bc342f6e | /codeforces/682B.cpp | 64bbf3c87468a46f9d63bd6931a6eb603b887514 | [] | no_license | ccanonguy/cc | 49bb15ecf8734766cccbac319b19a7116232c9b2 | 9b72f2fbf268e455f5ae0f21317f85028baa4208 | refs/heads/master | 2021-01-21T14:08:41.009887 | 2016-10-15T06:04:58 | 2016-10-15T06:04:58 | 57,870,565 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 588 | cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<ii> vii;
#define INF 1000000000
#define EPS 1e-9
#define fore(i, l, n) for (int i=int(l); i<n; i++)
#define forn(i, n) fore(i, 0, n)
#define pb push_back
#define mp make_pair
int main() {
int n;
cin >> n;
vi arr(n);
forn (i, n) cin >> arr[i];
sort(arr.begin(), arr.end());
int i = 0;
arr[i] = 1;
while (i<n) {
int j = i;
while (i+1<n && arr[i+1] == arr[i])
i++;
if (i+1 < n)
arr[i+1] = arr[i] + 1;
i++;
}
cout << arr[n-1] +1;
} | [
"singhgurbir10@gmail.com"
] | singhgurbir10@gmail.com |
413196212fbdac151ef8096a356be3a99345a5e8 | 75399026dac78ee4656dc2674f05b32c9a60a1e1 | /dsa15_134-master/hw1/biginteger_for_binary.h | a32b61c3335a147a795545ca076c544ec3d118c9 | [
"MIT"
] | permissive | silverneko/HWs | c3f406b44ac623bf8a73fe52b1532838882c6c0f | 84d19316e01c3bb7b2fcf1fa9ad3dff99c01b543 | refs/heads/master | 2018-09-10T06:39:01.890346 | 2018-06-05T12:01:30 | 2018-06-08T11:38:45 | 71,684,292 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 680 | h | #ifndef BIGINTEGER_FOR_BINARY
#define BIGINTEGER_FOR_BINARY
#include "biginteger.h"
/*
#include <string>
class BigInteger{
long long digit[300];
public:
BigInteger();
BigInteger(const int&);
BigInteger(const std::string&);
BigInteger(const BigInteger&);
~BigInteger();
bool operator<(const BigInteger&) const;
const BigInteger operator-(const BigInteger&) const;
const BigInteger operator*(const BigInteger&) const;
BigInteger& operator*=(int);
BigInteger& operator/=(int);
BigInteger& operator=(const BigInteger&);
bool isodd();
bool iseven();
bool iszero();
friend std::ostream& operator<<(std::ostream&, const BigInteger&);
};
*/
#endif
| [
"b03902082@ntu.edu.tw"
] | b03902082@ntu.edu.tw |
a9d7d87de5d146aa2add02d6fd0dcfc9f50225f0 | 715c86bb9b3689cdc86300cf4fa824a3864b1b3f | /src/Distributed/common/distributed_protocol.hpp | fb302fed6a99a659a8f6c69796044ee893563ad6 | [] | no_license | Ivanhan2018/zsbbserver | cb94a2353453bd41ce237aa27865b491be04d9fd | 02a3827099b93f93a2e1aeb6460f6eede57ed8ee | refs/heads/master | 2022-01-30T07:48:41.497675 | 2022-01-15T01:04:28 | 2022-01-15T01:04:28 | 168,654,088 | 4 | 9 | null | null | null | null | UTF-8 | C++ | false | false | 10,994 | hpp | #ifndef __DISTRIBUTED_PROTOCOL_HPP__
#define __DISTRIBUTED_PROTOCOL_HPP__
#ifndef NONASIO
#include "header.hpp"
#endif
#include "Global_Macro.h"
#include "Distributed_Header.h"
#pragma pack(push,1)
// protocol format : from_command_to
struct NODE_ADDRESS
{
int id;
int address;
u_short port;
};
// server to manager
struct SERVER_REGISTER_MANAGER : DISTRIBUTED_HEADER
{
int id;
u_short port;
inline void serialize(int id, u_short port);
};
// manager to server
struct MANAGER_REGISTER_RESP_SERVER : DISTRIBUTED_HEADER
{
int code;
int num;
u_short game_id;
u_short group_id;
u_long log_game_address;
u_short log_game_port;
inline void serialize(int code, int num, u_short game_id, u_short group_id, u_long log_game_address, u_short log_game_port);
inline NODE_ADDRESS & operator [](int index);
};
// agent to login
struct AGENT_REPORT_LOGIN : DISTRIBUTED_HEADER
{
int id;
char group_name[SIZE_64];
char address[SIZE_128];
short port;
inline void serialize(int id, const char * group_name, const char * address, short port);
};
// server1 to manager to server2
struct SERVER_NOTIFY_MANAGER_NOTIFY_SERVER : DISTRIBUTED_HEADER
{
inline void serialize(int from, int to, int length);
};
// manager to server1
struct SERVER_NOTIFY_RESP_SERVER : DISTRIBUTED_HEADER
{
int code;
inline void serialize(int code, int sid_from, int sid_to);
};
// server1 to server2
struct SERVER_HANDSHAKE_SERVER : DISTRIBUTED_HEADER
{
int id;
inline void serialize(int id);
};
// server2 to server1
struct SERVER_HANDSHAKE_RESP_SERVER : DISTRIBUTED_HEADER
{
int code;
inline void serialize(int code);
};
// agent to server
struct AGENT_CLIENT_LEAVE_SERVER : DISTRIBUTED_HEADER
{
inline void serialize(int agent, int sid, int pid);
};
// agent to client
struct AGENT_CLIENT_RESPONSE : DISTRIBUTED_HEADER
{
int code;
inline void serialize(int code, int agent, int sid, int pid);
};
// agent to server
struct AGENT_SERVER_RESPONSE : DISTRIBUTED_HEADER
{
int code;
inline void serialize(int code, int agent, int sid, int pid);
};
// client to login
struct CLIENT_REGISTER_LOGIN : DISTRIBUTED_HEADER
{
char accounts[SIZE_16];
char loginpass[SIZE_16];
char group_name[SIZE_32];
long version;
long computer_id_;
inline void serialize(const char * accounts, const char * loginpass, const char * group_name, long version, long computer_id);
};
// client to login
struct CLIENT_REGISTER_LOGOUT : DISTRIBUTED_HEADER
{
int playerid_;
long computer_id_;
inline void serialize(int playerid, int agentid, long computer_id);
};
// login to client
struct LOGIN_REGISTER_RESP_CLIENT : DISTRIBUTED_HEADER
{
int code;
int playerid;
int accounttype;
int agentid;
u_short port;
u_char encdeckey[MAX_KEY_SIZE];
char address[SIZE_128];
inline void serialize(int code);
inline void serialize(int code, int playerid, int accounttype, int agentid, const char * address, u_short port, u_char * encdeckey);
};
// server to client all
struct SERVER_BROADCAST_CLIENT : DISTRIBUTED_HEADER
{
inline void serialize(int from, int);
};
// log
struct LOG_REPORT_INFO : DISTRIBUTED_HEADER
{
char proc_name[128];
char datetime[25];
char msg[300];
inline void serialize(const char *, const char *, const char *);
};
// log
struct LOG_REPORT_PERFORMANCE : DISTRIBUTED_HEADER
{
char proc_name[128];
char datetime[25];
int bandwidth;
int broadcast;
int cpu;
int mem;
int vmem;
inline void serialize(const char *, int bandwidth, int broadcast, int cpu, int mem, int vmem, const char * datetime);
};
// log
struct LOG_REPORT_ONLINE : DISTRIBUTED_HEADER
{
char proc_name[128];
char datetime[25];
int online;
inline void serialize(const char *, const char * datetime, int online);
};
// log
struct LOG_REPORT_GROUP_ONLINE : DISTRIBUTED_HEADER
{
char group[128];
char datetime[25];
int online;
inline void serialize(const char * group, const char * datetime, int online);
};
// log_game
struct LOG_GAME_WRITER : DISTRIBUTED_HEADER
{
inline void serialize(int len);
inline char * buf();
inline int buf_len();
};
// log_game
struct LOG_GAME_READER : DISTRIBUTED_HEADER
{
int bdate;
int edate;
inline void serialize(int, int);
};
// log_game
struct LOG_GAME_READER_RSP : DISTRIBUTED_HEADER
{
char full_path[256];
inline void serialize(int result, int max_file_num, int file_len, const char * full_path);
inline int buf_len();
inline char * buffer();
};
//////////////////////////////////////////////////////////////////////////////////////////
#pragma pack(pop)
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
inline void SERVER_REGISTER_MANAGER::serialize(int id, u_short port)
{
DISTRIBUTED_HEADER::serialize(sizeof(*this), 0, 0, 0, CMD_SERVER_REGISTER_MANAGER);
this->id = id;
this->port = port;
}
inline void MANAGER_REGISTER_RESP_SERVER::serialize(int code, int num, u_short game_id, u_short group_id, u_long log_game_address, u_short log_game_port)
{
DISTRIBUTED_HEADER::serialize(sizeof(*this) + sizeof(NODE_ADDRESS) * num, 0, 0, 0, CMD_MANAGER_REGISTER_RESP_SERVER);
this->num = num;
this->code = code;
this->game_id = game_id;
this->group_id = group_id;
this->log_game_address = log_game_address;
this->log_game_port = log_game_port;
}
inline NODE_ADDRESS & MANAGER_REGISTER_RESP_SERVER::operator [](int index)
{
return ((NODE_ADDRESS *)((u_char *)this + sizeof(*this)))[index];
}
inline void AGENT_REPORT_LOGIN::serialize(int id, const char * group_name, const char * address, short port)
{
DISTRIBUTED_HEADER::serialize(sizeof(*this), 0, 0, 0, CMD_AGENT_REPORT_LOGIN);
this->id = id;
strcpy(this->group_name, group_name);
strcpy(this->address, address);
this->port = port;
}
inline void SERVER_NOTIFY_MANAGER_NOTIFY_SERVER::serialize(int from, int to, int length)
{
DISTRIBUTED_HEADER::serialize(sizeof(*this) + length, 0, from, to, CMD_SERVER_NOTIFY_MANAGER_NOTIFY_SERVER);
}
inline void SERVER_NOTIFY_RESP_SERVER::serialize(int code, int sid_from, int sid_to)
{
DISTRIBUTED_HEADER::serialize(sizeof(*this), 0, sid_from, sid_to, CMD_SERVER_NOTIFY_RESP_SERVER);
this->code = code;
}
inline void SERVER_HANDSHAKE_SERVER::serialize(int id)
{
DISTRIBUTED_HEADER::serialize(sizeof(*this), 0, 0, 0, CMD_SERVER_HANDSHAKE_SERVER);
this->id = id;
}
inline void SERVER_HANDSHAKE_RESP_SERVER::serialize(int code)
{
DISTRIBUTED_HEADER::serialize(sizeof(*this), 0, 0, 0, CMD_SERVER_HANDSHAKE_RESP_SERVER);
this->code = code;
}
inline void AGENT_CLIENT_LEAVE_SERVER::serialize(int agent, int sid, int pid)
{
DISTRIBUTED_HEADER::serialize(sizeof(*this), agent, sid, pid, CMD_AGENT_CLIENT_LEAVE_SERVER);
}
inline void AGENT_CLIENT_RESPONSE::serialize(int code, int agent, int sid, int pid)
{
DISTRIBUTED_HEADER::serialize(sizeof(*this), agent, sid, pid, CMD_AGENT_CLIENT_RESPONSE);
this->code = code;
}
inline void AGENT_SERVER_RESPONSE::serialize(int code, int agent, int sid, int pid)
{
DISTRIBUTED_HEADER::serialize(sizeof(*this), agent, sid, pid, CMD_AGENT_SERVER_RESPONSE);
this->code = code;
}
inline void CLIENT_REGISTER_LOGIN::serialize(const char * accounts, const char * loginpass, const char * group_name, long version, long computer_id)
{
DISTRIBUTED_HEADER::serialize(sizeof(*this), 0, 0, 0, CMD_CLIENT_REGISTER_LOGIN);
strcpy(this->accounts, accounts);
strcpy(this->loginpass, loginpass);
strcpy(this->group_name, group_name);
this->version = version;
this->computer_id_ = computer_id;
}
inline void CLIENT_REGISTER_LOGOUT::serialize(int playerid, int agentid, long computer_id)
{
DISTRIBUTED_HEADER::serialize(sizeof(*this), agentid, 0, 0, CMD_CLIENT_REGISTER_LOGOUT);
this->playerid_ = playerid;
this->computer_id_ = computer_id;
}
inline void LOGIN_REGISTER_RESP_CLIENT::serialize(int code)
{
DISTRIBUTED_HEADER::serialize(sizeof(*this), 0, 0, 0, CMD_LOGIN_REGISTER_RESP_CLIENT);
this->code = code;
this->playerid = 0;
this->accounttype = 0;
this->agentid = 0;
this->port = 0;
memset(this->encdeckey, 0, MAX_KEY_SIZE);
memset(this->address, 0, SIZE_128);
}
inline void LOGIN_REGISTER_RESP_CLIENT::serialize(int code, int playerid, int accounttype, int agentid, const char * address,
u_short port, u_char * encdeckey)
{
DISTRIBUTED_HEADER::serialize(sizeof(*this), 0, 0, 0, CMD_LOGIN_REGISTER_RESP_CLIENT);
this->code = code;
this->playerid = playerid;
this->accounttype = accounttype;
this->agentid = agentid;
strcpy(this->address, address);
this->port = port;
memcpy(this->encdeckey, encdeckey, MAX_KEY_SIZE);
}
inline void SERVER_BROADCAST_CLIENT::serialize(int from, int length)
{
DISTRIBUTED_HEADER::serialize(sizeof(*this) + length, 0, from, 0, CMD_SERVER_BROADCAST_CLIENT);
}
inline void LOG_REPORT_INFO::serialize(const char * proc_name, const char * datetime, const char * msg)
{
DISTRIBUTED_HEADER::serialize(sizeof(*this), 0, 0, 0, CMD_LOG_REPORT_INFO);
strcpy(this->proc_name, proc_name);
strcpy(this->datetime, datetime);
strcpy(this->msg, msg);
}
inline void LOG_REPORT_PERFORMANCE::serialize(const char * proc_name, int bandwidth, int broadcast, int cpu, int mem, int vmem, const char * datetime)
{
DISTRIBUTED_HEADER::serialize(sizeof(*this), 0, 0, 0, CMD_LOG_REPORT_PERFORMANCE);
this->bandwidth = bandwidth;
this->broadcast = broadcast;
this->cpu = cpu;
this->mem = mem;
this->vmem = vmem;
strcpy(this->proc_name, proc_name);
strcpy(this->datetime, datetime);
}
inline void LOG_REPORT_ONLINE::serialize(const char * proc_name, const char * datetime, int online)
{
DISTRIBUTED_HEADER::serialize(sizeof(*this), 0, 0, 0, CMD_LOG_REPORT_ONLINE);
this->online = online;
strcpy(this->proc_name, proc_name);
strcpy(this->datetime, datetime);
}
inline void LOG_REPORT_GROUP_ONLINE::serialize(const char * group, const char * datetime, int online)
{
DISTRIBUTED_HEADER::serialize(sizeof(*this), 0, 0, 0, CMD_LOG_REPORT_GROUP_ONLINE);
this->online = online;
strcpy(this->group, group);
strcpy(this->datetime, datetime);
}
inline void LOG_GAME_WRITER::serialize(int len)
{
DISTRIBUTED_HEADER::serialize(sizeof(*this) + len, 0, 0, 0, CMD_LOG_GAME_WRITER);
}
inline char * LOG_GAME_WRITER::buf()
{
return ((char *)this) + sizeof(*this);
}
inline int LOG_GAME_WRITER::buf_len()
{
return this->length - sizeof(*this);
}
inline void LOG_GAME_READER::serialize(int bdate, int edate)
{
DISTRIBUTED_HEADER::serialize(sizeof(*this), 0, 0, 0, CMD_LOG_GAME_READER);
this->bdate = bdate;
this->edate = edate;
}
inline void LOG_GAME_READER_RSP::serialize(int result, int max_file_num, int file_len, const char * full_path)
{
DISTRIBUTED_HEADER::serialize(sizeof(*this) + file_len, result, max_file_num, 0, CMD_LOG_GAME_READER_RSP);
strcpy(this->full_path, full_path);
}
inline int LOG_GAME_READER_RSP::buf_len()
{
return this->length - sizeof(*this);
}
inline char * LOG_GAME_READER_RSP::buffer()
{
return (char*)(((u_char *)this) + sizeof(*this));
}
#endif // __DISTRIBUTED_PROTOCOL_HPP__
| [
"hanxiaohua85@163.com"
] | hanxiaohua85@163.com |
977b63745f09459b7165cd8de46a719c79148b98 | 29a4c1e436bc90deaaf7711e468154597fc379b7 | /modules/gsl_specfun/include/nt2/toolbox/gsl_specfun/function/simd/sse/ssse3/gsl_sf_fermi_dirac_int.hpp | 880343fd376006b2df46c5dbd5762efdacbbf553 | [
"BSL-1.0"
] | permissive | brycelelbach/nt2 | 31bdde2338ebcaa24bb76f542bd0778a620f8e7c | 73d7e8dd390fa4c8d251c6451acdae65def70e0b | refs/heads/master | 2021-01-17T12:41:35.021457 | 2011-04-03T17:37:15 | 2011-04-03T17:37:15 | 1,263,345 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 782 | hpp | //////////////////////////////////////////////////////////////////////////////
/// Copyright 2003 and onward LASMEA UMR 6602 CNRS/U.B.P Clermont-Ferrand
/// Copyright 2009 and onward LRI UMR 8623 CNRS/Univ Paris Sud XI
///
/// Distributed under the Boost Software License, Version 1.0
/// See accompanying file LICENSE.txt or copy at
/// http://www.boost.org/LICENSE_1_0.txt
//////////////////////////////////////////////////////////////////////////////
#ifndef NT2_TOOLBOX_GSL_SPECFUN_FUNCTION_SIMD_SSE_SSSE3_GSL_SF_FERMI_DIRAC_INT_HPP_INCLUDED
#define NT2_TOOLBOX_GSL_SPECFUN_FUNCTION_SIMD_SSE_SSSE3_GSL_SF_FERMI_DIRAC_INT_HPP_INCLUDED
#include <nt2/toolbox/gsl_specfun/function/simd/sse/sse3/gsl_sf_fermi_dirac_int.hpp>
#endif
| [
"joel.falcou@lri.fr"
] | joel.falcou@lri.fr |
79725e43eff9f4c3d17f1c0278329bf642b40bc4 | 51764fcae5765634e2a994e2a677ab4639c78ba8 | /addressbookcontroller.h | d90fe947fac61e3dfa27daf299972c58648ca08b | [] | no_license | umair-uas/addressBookproject | 4744c873be4e7ff1bb2d604c741632f4f3c343bc | c312c43311b6a6e6764237ba32e9508d851d2164 | refs/heads/master | 2023-04-07T17:13:44.663982 | 2016-08-16T17:32:44 | 2016-08-16T17:32:44 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 484 | h | #ifndef ADDRESSBOOKCONTROLLER_H
#define ADDRESSBOOKCONTROLLER_H
#include "addressbook.h"
#include <QObject>
class AddressBookController : public QObject
{
Q_OBJECT
public:
explicit AddressBookController(AddressBook *addressBook,QObject *parent = 0);
AddressBookEntry *createEntry();
bool deleteEntry (AddressBookEntry * entry );
~AddressBookController();
signals:
public slots:
private:
AddressBook * m_addressBook;
};
#endif // ADDRESSBOOKCONTROLLER_H
| [
"umairahmedshah@hotmail.com"
] | umairahmedshah@hotmail.com |
8aaf549287c339fdf1e9472258853377c9f5e5e9 | 6f2b6e9d77fc4dd5e1dae8ba6e5a66eb7c7ae849 | /sstd_boost/sstd/boost/config/platform/amigaos.hpp | 5b1583529c2e465ed740f84957e82c0970720678 | [
"BSL-1.0"
] | permissive | KqSMea8/sstd_library | 9e4e622e1b01bed5de7322c2682539400d13dd58 | 0fcb815f50d538517e70a788914da7fbbe786ce1 | refs/heads/master | 2020-05-03T21:07:01.650034 | 2019-04-01T00:10:47 | 2019-04-01T00:10:47 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 442 | hpp | // (C) Copyright John Maddock 2002.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for most recent version.
#define BOOST_PLATFORM "AmigaOS"
#define BOOST_DISABLE_THREADS
#define BOOST_NO_CWCHAR
#define BOOST_NO_STD_WSTRING
#define BOOST_NO_INTRINSIC_WCHAR_T
| [
"zhaixueqiang@hotmail.com"
] | zhaixueqiang@hotmail.com |
cf10bc041d0f5ca715dcfca8ffbd6cbe98cd7192 | 29a4c1e436bc90deaaf7711e468154597fc379b7 | /modules/predicates/include/nt2/toolbox/predicates/function/is_inf.hpp | a85dcd6ff9ddb766ee55293d50b80e947567eec2 | [
"BSL-1.0"
] | permissive | brycelelbach/nt2 | 31bdde2338ebcaa24bb76f542bd0778a620f8e7c | 73d7e8dd390fa4c8d251c6451acdae65def70e0b | refs/heads/master | 2021-01-17T12:41:35.021457 | 2011-04-03T17:37:15 | 2011-04-03T17:37:15 | 1,263,345 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,018 | hpp | //////////////////////////////////////////////////////////////////////////////
/// Copyright 2003 and onward LASMEA UMR 6602 CNRS/U.B.P Clermont-Ferrand
/// Copyright 2009 and onward LRI UMR 8623 CNRS/Univ Paris Sud XI
///
/// Distributed under the Boost Software License, Version 1.0
/// See accompanying file LICENSE.txt or copy at
/// http://www.boost.org/LICENSE_1_0.txt
//////////////////////////////////////////////////////////////////////////////
#ifndef NT2_TOOLBOX_PREDICATES_FUNCTION_IS_INF_HPP_INCLUDED
#define NT2_TOOLBOX_PREDICATES_FUNCTION_IS_INF_HPP_INCLUDED
#include <nt2/include/simd.hpp>
#include <nt2/include/functor.hpp>
#include <nt2/toolbox/predicates/include.hpp>
namespace nt2 { namespace tag
{
struct is_inf_ {};
}
NT2_FUNCTION_IMPLEMENTATION(tag::is_inf_, is_inf, 1)
}
#include <nt2/toolbox/predicates/function/scalar/is_inf.hpp>
#include NT2_PREDICATES_INCLUDE(is_inf.hpp)
#endif
// modified by jt the 25/12/2010 | [
"jtlapreste@gmail.com"
] | jtlapreste@gmail.com |
1574522c9dda9ed4b5be8e82da2aa92b6f538974 | 0d1645e912fc1477eef73245a75af85635a31bd8 | /sdk/js/include/nsIDOM3EventTarget.h | aacc24b81416e3b14ab823532cc60b44d65d18c0 | [
"MIT"
] | permissive | qianxj/XExplorer | a2115106560f771bc3edc084b7e986332d0e41f4 | 00e326da03ffcaa21115a2345275452607c6bab5 | refs/heads/master | 2021-09-03T13:37:39.395524 | 2018-01-09T12:06:29 | 2018-01-09T12:06:29 | 114,638,878 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,310 | h | /*
* DO NOT EDIT. THIS FILE IS GENERATED FROM d:/firefox-5.0.1/mozilla-release/dom/interfaces/events/nsIDOM3EventTarget.idl
*/
#ifndef __gen_nsIDOM3EventTarget_h__
#define __gen_nsIDOM3EventTarget_h__
#ifndef __gen_domstubs_h__
#include "domstubs.h"
#endif
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
/* starting interface: nsIDOM3EventTarget */
#define NS_IDOM3EVENTTARGET_IID_STR "3e9c01a7-de97-4c3b-8294-b4bd9d7056d1"
#define NS_IDOM3EVENTTARGET_IID \
{0x3e9c01a7, 0xde97, 0x4c3b, \
{ 0x82, 0x94, 0xb4, 0xbd, 0x9d, 0x70, 0x56, 0xd1 }}
/**
* The nsIDOMEventTarget interface is the interface implemented by all
* event targets in the Document Object Model.
*
* For more information on this interface please see
* http://www.w3.org/TR/DOM-Level-3-Events/
*/
class NS_NO_VTABLE NS_SCRIPTABLE nsIDOM3EventTarget : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOM3EVENTTARGET_IID)
/* void addGroupedEventListener (in DOMString type, in nsIDOMEventListener listener, in boolean useCapture, in nsIDOMEventGroup evtGroup); */
NS_SCRIPTABLE NS_IMETHOD AddGroupedEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture, nsIDOMEventGroup *evtGroup) = 0;
/* void removeGroupedEventListener (in DOMString type, in nsIDOMEventListener listener, in boolean useCapture, in nsIDOMEventGroup evtGroup); */
NS_SCRIPTABLE NS_IMETHOD RemoveGroupedEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture, nsIDOMEventGroup *evtGroup) = 0;
/* boolean canTrigger (in DOMString type); */
NS_SCRIPTABLE NS_IMETHOD CanTrigger(const nsAString & type, PRBool *_retval NS_OUTPARAM) = 0;
/* boolean isRegisteredHere (in DOMString type); */
NS_SCRIPTABLE NS_IMETHOD IsRegisteredHere(const nsAString & type, PRBool *_retval NS_OUTPARAM) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOM3EventTarget, NS_IDOM3EVENTTARGET_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIDOM3EVENTTARGET \
NS_SCRIPTABLE NS_IMETHOD AddGroupedEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture, nsIDOMEventGroup *evtGroup); \
NS_SCRIPTABLE NS_IMETHOD RemoveGroupedEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture, nsIDOMEventGroup *evtGroup); \
NS_SCRIPTABLE NS_IMETHOD CanTrigger(const nsAString & type, PRBool *_retval NS_OUTPARAM); \
NS_SCRIPTABLE NS_IMETHOD IsRegisteredHere(const nsAString & type, PRBool *_retval NS_OUTPARAM);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIDOM3EVENTTARGET(_to) \
NS_SCRIPTABLE NS_IMETHOD AddGroupedEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture, nsIDOMEventGroup *evtGroup) { return _to AddGroupedEventListener(type, listener, useCapture, evtGroup); } \
NS_SCRIPTABLE NS_IMETHOD RemoveGroupedEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture, nsIDOMEventGroup *evtGroup) { return _to RemoveGroupedEventListener(type, listener, useCapture, evtGroup); } \
NS_SCRIPTABLE NS_IMETHOD CanTrigger(const nsAString & type, PRBool *_retval NS_OUTPARAM) { return _to CanTrigger(type, _retval); } \
NS_SCRIPTABLE NS_IMETHOD IsRegisteredHere(const nsAString & type, PRBool *_retval NS_OUTPARAM) { return _to IsRegisteredHere(type, _retval); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIDOM3EVENTTARGET(_to) \
NS_SCRIPTABLE NS_IMETHOD AddGroupedEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture, nsIDOMEventGroup *evtGroup) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddGroupedEventListener(type, listener, useCapture, evtGroup); } \
NS_SCRIPTABLE NS_IMETHOD RemoveGroupedEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture, nsIDOMEventGroup *evtGroup) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveGroupedEventListener(type, listener, useCapture, evtGroup); } \
NS_SCRIPTABLE NS_IMETHOD CanTrigger(const nsAString & type, PRBool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanTrigger(type, _retval); } \
NS_SCRIPTABLE NS_IMETHOD IsRegisteredHere(const nsAString & type, PRBool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsRegisteredHere(type, _retval); }
#if 0
/* Use the code below as a template for the implementation class for this interface. */
/* Header file */
class nsDOM3EventTarget : public nsIDOM3EventTarget
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIDOM3EVENTTARGET
nsDOM3EventTarget();
private:
~nsDOM3EventTarget();
protected:
/* additional members */
};
/* Implementation file */
NS_IMPL_ISUPPORTS1(nsDOM3EventTarget, nsIDOM3EventTarget)
nsDOM3EventTarget::nsDOM3EventTarget()
{
/* member initializers and constructor code */
}
nsDOM3EventTarget::~nsDOM3EventTarget()
{
/* destructor code */
}
/* void addGroupedEventListener (in DOMString type, in nsIDOMEventListener listener, in boolean useCapture, in nsIDOMEventGroup evtGroup); */
NS_IMETHODIMP nsDOM3EventTarget::AddGroupedEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture, nsIDOMEventGroup *evtGroup)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* void removeGroupedEventListener (in DOMString type, in nsIDOMEventListener listener, in boolean useCapture, in nsIDOMEventGroup evtGroup); */
NS_IMETHODIMP nsDOM3EventTarget::RemoveGroupedEventListener(const nsAString & type, nsIDOMEventListener *listener, PRBool useCapture, nsIDOMEventGroup *evtGroup)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* boolean canTrigger (in DOMString type); */
NS_IMETHODIMP nsDOM3EventTarget::CanTrigger(const nsAString & type, PRBool *_retval NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* boolean isRegisteredHere (in DOMString type); */
NS_IMETHODIMP nsDOM3EventTarget::IsRegisteredHere(const nsAString & type, PRBool *_retval NS_OUTPARAM)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/* End of implementation class template. */
#endif
#endif /* __gen_nsIDOM3EventTarget_h__ */
| [
"qianxj15@sina.com"
] | qianxj15@sina.com |
a4bdf529691b18e68bb239b8d2c6f25099b2060e | 4352b5c9e6719d762e6a80e7a7799630d819bca3 | /tutorials/oldd/old/movingMeshRhoPimpleFoam/rhoPimpleArbitraryFoam/1.51/rho | 3a66022d03f0c8e105d3bbcbe98a8be19bfa0060 | [] | no_license | dashqua/epicProject | d6214b57c545110d08ad053e68bc095f1d4dc725 | 54afca50a61c20c541ef43e3d96408ef72f0bcbc | refs/heads/master | 2022-02-28T17:20:20.291864 | 2019-10-28T13:33:16 | 2019-10-28T13:33:16 | 184,294,390 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 70,559 | /*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 6
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "1.51";
object rho;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -3 0 0 0 0 0];
internalField nonuniform List<scalar>
5835
(
1.82303e-05
1.18696e-05
2.90196e-05
1.20309e-05
1.19388e-05
1.18597e-05
1.18566e-05
1.19138e-05
1.18564e-05
1.19031e-05
1.1857e-05
1.1989e-05
1.18571e-05
1.18572e-05
1.27718e-05
1.18582e-05
3.67536e-05
3.59699e-05
1.18651e-05
1.18582e-05
4.06051e-05
1.18573e-05
3.87678e-05
1.23371e-05
1.18571e-05
1.18577e-05
1.28542e-05
1.18591e-05
1.18898e-05
1.18567e-05
1.18627e-05
1.18601e-05
1.18568e-05
1.18573e-05
1.18618e-05
1.18569e-05
1.18593e-05
1.18568e-05
1.18573e-05
1.18576e-05
1.18708e-05
1.18576e-05
1.18571e-05
1.18572e-05
1.18572e-05
1.1863e-05
1.18569e-05
1.18645e-05
1.18651e-05
1.1857e-05
1.18577e-05
1.18572e-05
1.18571e-05
1.1857e-05
1.1857e-05
1.18571e-05
1.1857e-05
1.18569e-05
1.1858e-05
1.18587e-05
1.18644e-05
1.18569e-05
1.18851e-05
1.18728e-05
1.18569e-05
1.18607e-05
1.1857e-05
1.18598e-05
1.18571e-05
1.18636e-05
1.18591e-05
1.18572e-05
1.18585e-05
1.18569e-05
1.18576e-05
1.18568e-05
1.18573e-05
1.18611e-05
1.18587e-05
1.18569e-05
1.18567e-05
1.18627e-05
1.18703e-05
3.00066e-05
1.7728e-05
1.18565e-05
1.19239e-05
1.18613e-05
1.19176e-05
1.20313e-05
1.18565e-05
1.19115e-05
1.18566e-05
1.18689e-05
1.18665e-05
1.18606e-05
1.1863e-05
1.18712e-05
1.23198e-05
1.1857e-05
1.18601e-05
1.18627e-05
1.18571e-05
1.18612e-05
1.2048e-05
1.18621e-05
1.1857e-05
1.2239e-05
1.18597e-05
1.18698e-05
1.18651e-05
1.18593e-05
1.22461e-05
1.18702e-05
1.18616e-05
1.18569e-05
1.18612e-05
1.18655e-05
1.18639e-05
1.19286e-05
1.19183e-05
1.18569e-05
1.1857e-05
1.18626e-05
1.18608e-05
1.18678e-05
1.18718e-05
1.18655e-05
1.18682e-05
1.18578e-05
1.18695e-05
1.18588e-05
1.18585e-05
1.18683e-05
1.18744e-05
1.18598e-05
5.19428e-05
1.18577e-05
5.39065e-05
1.18643e-05
1.1857e-05
1.18608e-05
4.87307e-05
5.07097e-05
5.64796e-05
5.56876e-05
2.45909e-05
2.98361e-05
1.1868e-05
1.18993e-05
3.09298e-05
1.18824e-05
1.18566e-05
1.18749e-05
1.54167e-05
1.66125e-05
1.22867e-05
1.18571e-05
1.18788e-05
1.46543e-05
1.1888e-05
1.18568e-05
1.18609e-05
1.18567e-05
1.25716e-05
1.18725e-05
1.19046e-05
1.21075e-05
1.18611e-05
1.18849e-05
1.18565e-05
1.18746e-05
1.18794e-05
1.18565e-05
1.18656e-05
1.18594e-05
1.18672e-05
1.23542e-05
1.18639e-05
1.1929e-05
1.18714e-05
1.18624e-05
1.18591e-05
1.18568e-05
1.18856e-05
1.18565e-05
1.18704e-05
1.18572e-05
1.18824e-05
1.18607e-05
1.18576e-05
1.18572e-05
1.18617e-05
1.18626e-05
1.18717e-05
1.18578e-05
1.18578e-05
1.18582e-05
1.18573e-05
1.18576e-05
4.59759e-05
4.34565e-05
1.18583e-05
1.18577e-05
1.1858e-05
1.18591e-05
1.18569e-05
1.19e-05
1.18608e-05
1.18591e-05
1.18579e-05
1.18623e-05
1.18682e-05
1.18638e-05
1.18575e-05
1.18572e-05
1.18622e-05
1.1857e-05
1.1857e-05
1.18633e-05
1.18662e-05
1.18568e-05
1.1857e-05
1.19271e-05
1.18702e-05
1.18563e-05
1.18565e-05
5.72324e-05
1.18568e-05
1.18668e-05
1.18597e-05
1.18686e-05
1.18635e-05
1.18707e-05
1.18567e-05
1.18789e-05
3.19904e-05
1.18568e-05
2.97493e-05
1.18855e-05
1.18577e-05
1.19003e-05
1.18601e-05
1.1861e-05
1.18634e-05
1.18562e-05
1.18665e-05
1.18566e-05
1.18565e-05
1.18656e-05
1.18603e-05
1.18759e-05
1.18623e-05
1.18562e-05
1.18736e-05
1.18901e-05
1.18619e-05
1.19492e-05
1.18565e-05
1.18777e-05
1.18604e-05
1.21443e-05
1.20782e-05
1.18591e-05
1.22164e-05
1.18568e-05
1.18569e-05
1.1858e-05
1.21833e-05
1.21057e-05
1.1858e-05
1.1858e-05
1.18615e-05
1.18659e-05
1.18674e-05
1.18563e-05
1.18605e-05
1.18571e-05
1.18734e-05
1.18568e-05
1.18579e-05
1.18572e-05
1.31045e-05
1.18634e-05
1.18569e-05
1.18569e-05
1.18569e-05
1.18574e-05
1.18692e-05
1.18589e-05
3.54421e-05
1.85955e-05
1.1875e-05
2.09369e-05
1.18569e-05
1.1857e-05
1.1898e-05
1.18583e-05
1.18615e-05
3.37825e-05
1.18608e-05
5.40814e-05
5.63403e-05
3.25526e-05
1.72964e-05
3.25434e-05
1.18586e-05
3.1997e-05
1.18567e-05
2.52796e-05
5.65602e-05
2.31629e-05
4.12285e-05
1.26106e-05
1.1861e-05
1.18598e-05
1.18609e-05
1.21607e-05
1.18567e-05
1.18829e-05
1.1879e-05
1.18563e-05
1.18601e-05
1.26354e-05
1.18578e-05
1.33624e-05
1.18573e-05
1.18567e-05
3.74338e-05
1.18867e-05
1.18566e-05
1.24905e-05
1.18569e-05
1.18712e-05
1.18585e-05
1.18594e-05
1.18597e-05
1.18578e-05
1.18567e-05
1.18578e-05
1.18593e-05
4.0417e-05
1.20974e-05
3.91287e-05
1.18655e-05
1.1857e-05
1.1858e-05
1.18565e-05
1.18572e-05
1.18601e-05
1.37509e-05
1.18563e-05
1.18564e-05
1.18912e-05
1.18563e-05
1.18916e-05
1.18846e-05
1.18644e-05
1.32619e-05
1.18564e-05
1.20544e-05
1.18727e-05
1.18646e-05
1.18734e-05
1.53991e-05
1.18679e-05
1.18597e-05
1.18564e-05
1.18884e-05
1.18616e-05
1.1872e-05
1.18651e-05
1.1895e-05
1.18565e-05
1.22994e-05
1.18613e-05
1.187e-05
1.18583e-05
1.18599e-05
1.18569e-05
1.18575e-05
1.18569e-05
1.18628e-05
1.1858e-05
1.18572e-05
1.18587e-05
1.18604e-05
1.18593e-05
1.18576e-05
1.18616e-05
1.18594e-05
1.18577e-05
1.18566e-05
1.18587e-05
1.18604e-05
1.18658e-05
1.18923e-05
1.18573e-05
1.18571e-05
1.18613e-05
1.18585e-05
1.18574e-05
1.18665e-05
1.18567e-05
1.18764e-05
1.19047e-05
1.18577e-05
1.18719e-05
1.21643e-05
1.18578e-05
1.18718e-05
1.18612e-05
1.18811e-05
1.19965e-05
1.18583e-05
1.18964e-05
1.25359e-05
1.18671e-05
1.18649e-05
1.18704e-05
1.18761e-05
1.18642e-05
1.1857e-05
1.18796e-05
1.18621e-05
1.18655e-05
1.18866e-05
1.18618e-05
1.18665e-05
1.18571e-05
1.18648e-05
1.18698e-05
1.19011e-05
1.19113e-05
1.18688e-05
1.18663e-05
1.18565e-05
1.1858e-05
1.1857e-05
1.18761e-05
1.18565e-05
1.18585e-05
1.18568e-05
1.18851e-05
1.18644e-05
1.18815e-05
1.18614e-05
1.18677e-05
1.18571e-05
1.18807e-05
1.18561e-05
1.18752e-05
1.18561e-05
1.1862e-05
1.18873e-05
1.18566e-05
1.18561e-05
1.18765e-05
1.18685e-05
1.18742e-05
1.18571e-05
1.18582e-05
1.18995e-05
1.18562e-05
1.18794e-05
1.18653e-05
1.1874e-05
1.18867e-05
1.1862e-05
1.18585e-05
1.186e-05
1.19084e-05
1.18567e-05
1.19248e-05
1.18656e-05
1.18693e-05
1.18568e-05
1.18692e-05
1.18567e-05
1.18569e-05
1.18974e-05
1.18931e-05
1.18566e-05
1.18569e-05
1.18563e-05
1.18706e-05
1.18786e-05
1.18601e-05
1.18659e-05
1.18566e-05
1.18577e-05
1.1857e-05
1.18562e-05
1.186e-05
1.1896e-05
1.18656e-05
1.18624e-05
1.1861e-05
1.18702e-05
1.18628e-05
1.27629e-05
1.18571e-05
1.18735e-05
1.18571e-05
1.18628e-05
1.18642e-05
1.18664e-05
1.18569e-05
1.19656e-05
1.18595e-05
1.18792e-05
1.18577e-05
1.18597e-05
1.22726e-05
1.18606e-05
1.18591e-05
5.34728e-05
1.18737e-05
1.18595e-05
5.03022e-05
5.00642e-05
5.00032e-05
1.18637e-05
1.18573e-05
1.18584e-05
1.1882e-05
3.05768e-05
2.18024e-05
1.18678e-05
1.18809e-05
1.19036e-05
3.07917e-05
4.54816e-05
1.18579e-05
5.57431e-05
1.18679e-05
1.18585e-05
1.18791e-05
3.23002e-05
1.18568e-05
1.44447e-05
1.1888e-05
4.61543e-05
1.18605e-05
1.41895e-05
1.22841e-05
1.18722e-05
1.18624e-05
1.18567e-05
1.1881e-05
1.19023e-05
1.23538e-05
1.18565e-05
1.20793e-05
1.18567e-05
1.18657e-05
1.18582e-05
1.18578e-05
1.18579e-05
1.18588e-05
1.18731e-05
1.18772e-05
5.48454e-05
1.18808e-05
1.1895e-05
1.18617e-05
1.18579e-05
1.1928e-05
1.18558e-05
1.18586e-05
1.18876e-05
1.18719e-05
1.1856e-05
1.18563e-05
1.18628e-05
1.18569e-05
3.99698e-05
1.18592e-05
1.18709e-05
1.18598e-05
1.18559e-05
1.18643e-05
1.18566e-05
1.1857e-05
1.18601e-05
1.18728e-05
1.18652e-05
1.18607e-05
1.18609e-05
1.1856e-05
1.18557e-05
1.18571e-05
1.18646e-05
1.18823e-05
1.18626e-05
1.18559e-05
1.18586e-05
1.18558e-05
1.18642e-05
1.18823e-05
1.18557e-05
1.18671e-05
1.18717e-05
1.18701e-05
1.59156e-05
1.18613e-05
1.18578e-05
1.18916e-05
1.18572e-05
1.18561e-05
1.18565e-05
1.21138e-05
1.26215e-05
1.20915e-05
1.18567e-05
1.21414e-05
1.18557e-05
1.18677e-05
1.18877e-05
4.08405e-05
1.18583e-05
1.22073e-05
1.18652e-05
1.186e-05
1.24038e-05
1.18608e-05
2.93575e-05
1.18588e-05
2.24594e-05
2.72698e-05
1.18653e-05
1.18553e-05
3.1704e-05
3.05884e-05
2.2644e-05
1.18587e-05
1.18581e-05
1.18583e-05
1.1863e-05
1.24198e-05
5.17438e-05
1.18573e-05
1.32411e-05
1.18565e-05
1.18601e-05
1.18607e-05
1.1859e-05
5.32482e-05
4.21111e-05
1.18591e-05
1.22476e-05
1.18569e-05
2.88183e-05
1.18573e-05
1.18792e-05
1.18819e-05
3.2547e-05
1.26115e-05
3.51936e-05
1.18581e-05
1.18563e-05
1.18715e-05
1.21723e-05
1.2185e-05
1.18613e-05
1.18631e-05
1.18616e-05
1.18553e-05
1.18988e-05
1.36875e-05
1.18913e-05
1.18558e-05
1.35564e-05
1.18557e-05
1.18778e-05
1.18571e-05
1.18632e-05
1.18582e-05
1.18602e-05
1.1858e-05
1.18575e-05
1.18577e-05
1.18575e-05
1.18569e-05
1.1864e-05
1.18563e-05
1.18753e-05
1.1857e-05
1.18584e-05
1.18611e-05
1.19931e-05
1.18817e-05
1.18987e-05
1.18588e-05
1.1859e-05
1.18565e-05
1.18567e-05
1.186e-05
1.18571e-05
1.18826e-05
1.18602e-05
1.18826e-05
1.18559e-05
1.18558e-05
1.22226e-05
1.22055e-05
1.19041e-05
1.18561e-05
1.18677e-05
1.18709e-05
1.18624e-05
1.18618e-05
1.18584e-05
1.18562e-05
1.18635e-05
1.18674e-05
1.18565e-05
1.18574e-05
1.18557e-05
1.18849e-05
1.19146e-05
1.19069e-05
1.18613e-05
1.18793e-05
1.18572e-05
1.1913e-05
1.18679e-05
1.18618e-05
1.18569e-05
1.18572e-05
1.18608e-05
1.18542e-05
1.1856e-05
1.1865e-05
1.18657e-05
1.1866e-05
1.18557e-05
1.18868e-05
1.18556e-05
1.18549e-05
1.1856e-05
1.19009e-05
1.18712e-05
1.18914e-05
1.18596e-05
1.18555e-05
1.18808e-05
1.18648e-05
1.18837e-05
1.18604e-05
1.18563e-05
1.19325e-05
1.18594e-05
1.18631e-05
1.18685e-05
1.18654e-05
1.18556e-05
1.18582e-05
1.18805e-05
1.18564e-05
1.18726e-05
1.18794e-05
1.19135e-05
1.18602e-05
1.18839e-05
1.18569e-05
1.18555e-05
1.18686e-05
1.18768e-05
1.18656e-05
1.1863e-05
1.18563e-05
1.18962e-05
1.18562e-05
1.18734e-05
1.18568e-05
1.18555e-05
1.18817e-05
1.18771e-05
1.18675e-05
1.18712e-05
1.18783e-05
1.18635e-05
1.18653e-05
1.18726e-05
1.18663e-05
1.18578e-05
1.1857e-05
1.1857e-05
1.18581e-05
1.19146e-05
1.18682e-05
1.18577e-05
1.18606e-05
1.18723e-05
1.19268e-05
1.19004e-05
1.18576e-05
1.18557e-05
1.18574e-05
1.18628e-05
1.18573e-05
1.18813e-05
1.18595e-05
1.18564e-05
1.18617e-05
1.18586e-05
1.18598e-05
1.18665e-05
1.18612e-05
1.1859e-05
1.18556e-05
1.186e-05
1.18584e-05
1.18581e-05
1.18574e-05
1.18577e-05
1.18859e-05
1.18557e-05
1.18626e-05
1.18587e-05
1.18547e-05
1.18556e-05
1.18638e-05
1.18687e-05
1.18849e-05
1.18896e-05
1.74975e-05
1.99953e-05
2.28926e-05
1.65248e-05
1.18683e-05
1.18577e-05
1.18566e-05
1.18572e-05
1.18578e-05
1.18635e-05
1.18604e-05
1.18582e-05
1.18603e-05
1.18584e-05
1.18581e-05
1.18622e-05
1.1863e-05
1.18594e-05
1.18587e-05
1.18583e-05
1.18574e-05
1.18568e-05
1.18603e-05
1.18565e-05
1.18716e-05
1.18652e-05
1.18684e-05
1.19406e-05
1.18778e-05
1.45269e-05
1.18723e-05
1.1904e-05
1.19619e-05
1.18732e-05
1.18559e-05
1.18564e-05
1.60084e-05
1.18561e-05
1.18566e-05
1.18585e-05
1.19004e-05
1.189e-05
1.18624e-05
1.18738e-05
1.19279e-05
1.19062e-05
1.18747e-05
1.18819e-05
1.18569e-05
1.1915e-05
1.18752e-05
1.18579e-05
1.18963e-05
1.18567e-05
1.18739e-05
1.60612e-05
1.21626e-05
1.19179e-05
1.18688e-05
1.18564e-05
1.19245e-05
1.21413e-05
1.18564e-05
2.05409e-05
1.18586e-05
3.59017e-05
1.18563e-05
1.19375e-05
1.18754e-05
1.1859e-05
1.18567e-05
1.18884e-05
1.18607e-05
1.18804e-05
1.1878e-05
1.5356e-05
1.58667e-05
1.1885e-05
1.18887e-05
1.20523e-05
1.18565e-05
1.52788e-05
1.18567e-05
1.19653e-05
1.19002e-05
1.1857e-05
6.71173e-05
7.13485e-05
1.18569e-05
1.18574e-05
1.18574e-05
6.31756e-05
7.12108e-05
7.4535e-05
1.18692e-05
5.84825e-05
1.18585e-05
1.18568e-05
1.18658e-05
7.22872e-05
5.60114e-05
1.18603e-05
7.05392e-05
5.23597e-05
1.18577e-05
1.18586e-05
1.1857e-05
7.30282e-05
1.18578e-05
1.18571e-05
7.26099e-05
1.18568e-05
5.85021e-05
1.18568e-05
1.18569e-05
1.1857e-05
6.27419e-05
5.33467e-05
6.15128e-05
1.18597e-05
1.18569e-05
1.18635e-05
5.15112e-05
7.0868e-05
7.08565e-05
5.86209e-05
5.46092e-05
1.18573e-05
1.18582e-05
6.80365e-05
1.18589e-05
1.18585e-05
5.31322e-05
5.48412e-05
6.35693e-05
1.18577e-05
6.04998e-05
1.18578e-05
1.24525e-05
1.18595e-05
1.18643e-05
1.18653e-05
1.18576e-05
1.18717e-05
1.1858e-05
1.19044e-05
1.19003e-05
1.19097e-05
1.54092e-05
1.60073e-05
1.18732e-05
1.18695e-05
1.21276e-05
1.1874e-05
1.19057e-05
5.06311e-05
1.18583e-05
1.18571e-05
4.64438e-05
1.18569e-05
1.19851e-05
1.18636e-05
1.1857e-05
1.18567e-05
1.18707e-05
1.1859e-05
1.18621e-05
1.18699e-05
1.18644e-05
1.18571e-05
1.18701e-05
1.18602e-05
1.18684e-05
1.18586e-05
1.18572e-05
1.18585e-05
1.18571e-05
1.18762e-05
1.1857e-05
1.18587e-05
1.18575e-05
1.18573e-05
1.18568e-05
1.18686e-05
1.18572e-05
1.18639e-05
1.18614e-05
1.18627e-05
1.18583e-05
1.19184e-05
1.18701e-05
1.18567e-05
1.18592e-05
1.18566e-05
1.42428e-05
3.09274e-05
1.18568e-05
1.1857e-05
1.23452e-05
3.21869e-05
1.18569e-05
1.48093e-05
1.25381e-05
1.1857e-05
1.1857e-05
1.18568e-05
1.18702e-05
1.18585e-05
1.18586e-05
1.18576e-05
1.18682e-05
1.18569e-05
1.18571e-05
1.18571e-05
1.18605e-05
1.18583e-05
1.18664e-05
1.18616e-05
1.18609e-05
1.18616e-05
1.18612e-05
1.18571e-05
1.18774e-05
1.18812e-05
1.18738e-05
1.21862e-05
1.82853e-05
1.18573e-05
1.18742e-05
1.18568e-05
1.18571e-05
1.18736e-05
1.18798e-05
1.18565e-05
1.18573e-05
1.18692e-05
1.1859e-05
1.18559e-05
1.18597e-05
1.18814e-05
1.18576e-05
1.18625e-05
1.18568e-05
1.18692e-05
1.1867e-05
1.18607e-05
1.18677e-05
1.18681e-05
1.18617e-05
1.18921e-05
1.18557e-05
1.18735e-05
1.18561e-05
1.18797e-05
1.18579e-05
1.18723e-05
1.18564e-05
1.18666e-05
1.18646e-05
1.18645e-05
1.18655e-05
1.18809e-05
1.18574e-05
1.18772e-05
1.1927e-05
1.18591e-05
1.18686e-05
1.18632e-05
1.18696e-05
1.18812e-05
1.18573e-05
1.18577e-05
1.186e-05
1.18711e-05
1.18637e-05
1.18676e-05
1.18809e-05
1.18673e-05
1.18856e-05
1.18766e-05
1.1857e-05
1.18571e-05
1.18723e-05
1.18806e-05
1.18563e-05
1.18608e-05
1.18805e-05
1.18831e-05
1.1857e-05
1.1884e-05
1.18572e-05
1.19018e-05
1.1869e-05
1.18666e-05
1.18571e-05
1.18593e-05
1.18566e-05
1.18819e-05
1.18572e-05
1.18573e-05
1.18573e-05
1.18562e-05
1.18731e-05
1.18565e-05
1.18566e-05
1.18713e-05
1.19038e-05
1.18571e-05
1.18671e-05
1.18574e-05
1.18816e-05
1.18676e-05
1.18557e-05
1.18611e-05
1.18645e-05
1.18642e-05
1.18703e-05
1.19354e-05
1.18598e-05
1.18845e-05
1.18705e-05
1.18567e-05
1.18723e-05
1.18564e-05
1.18643e-05
1.18568e-05
1.18813e-05
1.18635e-05
1.18727e-05
1.18987e-05
1.18549e-05
1.18564e-05
1.18572e-05
1.1858e-05
1.18567e-05
1.18581e-05
1.18563e-05
1.19014e-05
1.18642e-05
1.18568e-05
1.18717e-05
1.1864e-05
1.18568e-05
1.18739e-05
1.18809e-05
1.18628e-05
1.18575e-05
1.18802e-05
1.18612e-05
1.1865e-05
1.18672e-05
1.18617e-05
1.18741e-05
1.18734e-05
1.18721e-05
1.18558e-05
1.18665e-05
1.18739e-05
1.18601e-05
1.18564e-05
1.18807e-05
1.19297e-05
1.1871e-05
1.1858e-05
1.18617e-05
1.18758e-05
1.18841e-05
1.18627e-05
1.18683e-05
1.18734e-05
1.18634e-05
1.1858e-05
1.19875e-05
1.18565e-05
1.18782e-05
1.18571e-05
1.1857e-05
1.18726e-05
1.18667e-05
1.18577e-05
1.18723e-05
1.18626e-05
1.18569e-05
1.18604e-05
1.18566e-05
1.18616e-05
1.18696e-05
1.18815e-05
1.18872e-05
1.18561e-05
1.18581e-05
1.18699e-05
1.18584e-05
1.18567e-05
1.18743e-05
1.18563e-05
1.18662e-05
1.21257e-05
1.18648e-05
1.18664e-05
1.1863e-05
1.18666e-05
1.18659e-05
1.20044e-05
1.18568e-05
1.18945e-05
1.18706e-05
1.18707e-05
1.1877e-05
1.18677e-05
1.37722e-05
1.19229e-05
1.19737e-05
1.18568e-05
1.18568e-05
1.18571e-05
1.18639e-05
1.18574e-05
1.1863e-05
1.1887e-05
1.31245e-05
1.18751e-05
1.18573e-05
1.18654e-05
1.19365e-05
1.18658e-05
1.18609e-05
1.18591e-05
1.18945e-05
1.18663e-05
1.18613e-05
1.18621e-05
1.19017e-05
1.27432e-05
1.18641e-05
1.19034e-05
1.18585e-05
1.18624e-05
1.18822e-05
1.18581e-05
1.18574e-05
1.18573e-05
1.18563e-05
1.27773e-05
1.19097e-05
1.18588e-05
1.18613e-05
1.18585e-05
1.18641e-05
1.18598e-05
1.18604e-05
1.18625e-05
1.22987e-05
1.18786e-05
1.18934e-05
1.18782e-05
1.1861e-05
1.18578e-05
1.18718e-05
1.18584e-05
1.1951e-05
1.18835e-05
1.18566e-05
1.18572e-05
1.18833e-05
1.19281e-05
1.18673e-05
1.18567e-05
1.19318e-05
1.18565e-05
1.19356e-05
1.18702e-05
1.19099e-05
1.19008e-05
1.18566e-05
1.18562e-05
1.18593e-05
1.18632e-05
1.18667e-05
1.18587e-05
1.18751e-05
1.18565e-05
1.18569e-05
1.18576e-05
1.1892e-05
1.18576e-05
1.33834e-05
1.19204e-05
1.18599e-05
1.18558e-05
1.19369e-05
1.55738e-05
2.39448e-05
1.18576e-05
1.18569e-05
1.18569e-05
1.18581e-05
1.18584e-05
1.18566e-05
1.18629e-05
1.1857e-05
1.18654e-05
1.19339e-05
6.60383e-05
1.18623e-05
1.18562e-05
1.18638e-05
1.31373e-05
1.60061e-05
1.18578e-05
1.18576e-05
2.17634e-05
1.1886e-05
1.18565e-05
1.18574e-05
1.50121e-05
1.18621e-05
1.18591e-05
1.33399e-05
2.78402e-05
4.81571e-05
1.18567e-05
5.45541e-05
1.72524e-05
1.18638e-05
5.06135e-05
1.1859e-05
2.75642e-05
5.00718e-05
1.53429e-05
3.01465e-05
3.13618e-05
1.18584e-05
1.98605e-05
1.21283e-05
3.21016e-05
1.18614e-05
1.27295e-05
1.4105e-05
1.89813e-05
1.18596e-05
1.186e-05
1.18577e-05
1.18581e-05
1.18571e-05
4.5382e-05
3.70954e-05
1.1857e-05
1.18575e-05
1.18569e-05
1.32048e-05
1.69922e-05
1.18626e-05
1.1858e-05
1.84354e-05
1.1858e-05
1.18607e-05
3.67845e-05
1.18698e-05
1.18588e-05
1.18578e-05
1.60148e-05
1.91597e-05
1.18773e-05
1.1868e-05
1.54683e-05
1.1875e-05
1.44614e-05
1.18619e-05
1.30405e-05
1.18563e-05
1.18571e-05
1.20963e-05
1.21593e-05
1.18572e-05
1.18659e-05
1.37608e-05
1.1857e-05
1.18852e-05
1.1857e-05
1.1866e-05
1.18566e-05
1.1856e-05
1.18565e-05
1.18645e-05
1.18642e-05
1.18689e-05
1.9731e-05
1.18591e-05
1.18634e-05
1.18787e-05
1.50326e-05
1.186e-05
1.18568e-05
1.18594e-05
1.1877e-05
1.18568e-05
1.18595e-05
1.1914e-05
1.18601e-05
1.18597e-05
1.18676e-05
1.1859e-05
1.18663e-05
1.18628e-05
1.1875e-05
1.18565e-05
1.18653e-05
1.29491e-05
1.18593e-05
1.18491e-05
1.2383e-05
1.18573e-05
1.18569e-05
1.18597e-05
1.18706e-05
1.93528e-05
1.89903e-05
1.18593e-05
1.18653e-05
1.1856e-05
1.18573e-05
1.18582e-05
1.18597e-05
1.28407e-05
1.18824e-05
1.1873e-05
1.18623e-05
1.18571e-05
1.18584e-05
1.18597e-05
1.18731e-05
1.18702e-05
2.08648e-05
1.18597e-05
1.18634e-05
1.18572e-05
1.18817e-05
1.18568e-05
1.18588e-05
1.25433e-05
1.32979e-05
1.18823e-05
1.18603e-05
1.18575e-05
1.18751e-05
1.52071e-05
2.4998e-05
1.18849e-05
1.18589e-05
1.18589e-05
1.18614e-05
1.18682e-05
1.18825e-05
1.18665e-05
1.18695e-05
1.18634e-05
1.1866e-05
1.18569e-05
1.18782e-05
1.1848e-05
1.18598e-05
1.1865e-05
1.18568e-05
1.18591e-05
1.18573e-05
1.18578e-05
1.18634e-05
1.18597e-05
1.1857e-05
1.18589e-05
1.18637e-05
1.18597e-05
1.18575e-05
1.1857e-05
1.18569e-05
1.18604e-05
1.186e-05
1.18587e-05
1.18624e-05
1.186e-05
1.18592e-05
1.18586e-05
1.18569e-05
1.18608e-05
1.18578e-05
1.18571e-05
1.18628e-05
1.1863e-05
1.18574e-05
1.1857e-05
1.18569e-05
1.18588e-05
1.18608e-05
1.18581e-05
1.18571e-05
1.1858e-05
1.18578e-05
1.18584e-05
1.18595e-05
1.18574e-05
1.18574e-05
1.18574e-05
1.18574e-05
1.18635e-05
1.18583e-05
1.1858e-05
1.18631e-05
1.18594e-05
1.18581e-05
1.1858e-05
1.18572e-05
1.18597e-05
1.1857e-05
1.18651e-05
1.18642e-05
2.5494e-05
1.18592e-05
1.1857e-05
1.1931e-05
1.18631e-05
1.18661e-05
1.18656e-05
1.18638e-05
1.18667e-05
1.18627e-05
1.18572e-05
1.18635e-05
1.18585e-05
1.19895e-05
1.18881e-05
1.18577e-05
1.19483e-05
1.18657e-05
1.18698e-05
1.1857e-05
1.18681e-05
1.18709e-05
1.18638e-05
1.18696e-05
1.18683e-05
1.18571e-05
1.18831e-05
1.18572e-05
1.18569e-05
1.18669e-05
1.18813e-05
1.18605e-05
1.18732e-05
1.1858e-05
1.18592e-05
1.18576e-05
1.18758e-05
1.18661e-05
1.18563e-05
1.18572e-05
1.18676e-05
1.1875e-05
1.18655e-05
1.18594e-05
1.18687e-05
1.18564e-05
1.18552e-05
1.1859e-05
1.18572e-05
1.18771e-05
2.68777e-05
1.18715e-05
1.18592e-05
1.1887e-05
1.18815e-05
1.18562e-05
1.18693e-05
1.18615e-05
1.18649e-05
5.30193e-05
1.18586e-05
1.18571e-05
1.18713e-05
1.18553e-05
1.18945e-05
1.18775e-05
1.1871e-05
4.11458e-05
1.18821e-05
1.18576e-05
1.18669e-05
1.18599e-05
1.18803e-05
1.18651e-05
1.18554e-05
1.18772e-05
1.35089e-05
1.18858e-05
1.18689e-05
1.18569e-05
6.41988e-05
1.18579e-05
1.18582e-05
2.57166e-05
1.18566e-05
1.44658e-05
1.18592e-05
1.18572e-05
1.18672e-05
1.18635e-05
1.18587e-05
1.19566e-05
1.18652e-05
1.19083e-05
1.18797e-05
1.18662e-05
1.18628e-05
1.18595e-05
1.18785e-05
1.18659e-05
1.19052e-05
1.19506e-05
1.19055e-05
1.18574e-05
1.21489e-05
1.18576e-05
1.19005e-05
1.18861e-05
1.18617e-05
1.18564e-05
1.18615e-05
1.18623e-05
1.20782e-05
1.18688e-05
1.18665e-05
1.18573e-05
1.18603e-05
1.18551e-05
1.18582e-05
1.18586e-05
1.18571e-05
1.19687e-05
1.18571e-05
1.18719e-05
1.18654e-05
1.18586e-05
1.18572e-05
1.18703e-05
1.18597e-05
1.18617e-05
1.18571e-05
1.18651e-05
1.18569e-05
1.18867e-05
1.18621e-05
1.18633e-05
1.1861e-05
1.19987e-05
1.18681e-05
1.18603e-05
1.18611e-05
1.18602e-05
1.19008e-05
1.18762e-05
1.23664e-05
1.18572e-05
1.19956e-05
1.18735e-05
1.18809e-05
1.18577e-05
1.18601e-05
1.18573e-05
1.18618e-05
1.21945e-05
1.1868e-05
1.1857e-05
1.18581e-05
1.18579e-05
1.1863e-05
1.1861e-05
1.1857e-05
1.18612e-05
1.18583e-05
1.28643e-05
1.40912e-05
1.1857e-05
1.18578e-05
1.1863e-05
1.18571e-05
1.18593e-05
1.1857e-05
1.1859e-05
1.18586e-05
1.18589e-05
1.26052e-05
1.18581e-05
3.13812e-05
1.18623e-05
1.18578e-05
1.18575e-05
1.25203e-05
1.187e-05
1.37385e-05
1.18566e-05
1.18578e-05
1.18591e-05
1.18613e-05
4.45533e-05
1.18663e-05
1.18572e-05
1.18583e-05
1.32295e-05
1.18599e-05
1.18576e-05
1.18626e-05
1.18584e-05
1.18573e-05
1.18587e-05
1.18592e-05
1.18892e-05
1.1857e-05
1.18723e-05
1.18572e-05
1.18608e-05
6.5322e-05
1.18615e-05
5.0644e-05
1.18578e-05
1.18577e-05
1.18619e-05
1.18574e-05
1.18574e-05
1.18574e-05
1.18563e-05
1.18564e-05
1.18631e-05
1.18636e-05
1.18635e-05
1.18733e-05
1.18568e-05
1.18613e-05
1.18608e-05
1.18626e-05
1.18622e-05
1.18567e-05
1.18573e-05
1.18607e-05
1.18674e-05
1.18571e-05
1.18567e-05
1.18932e-05
1.18634e-05
1.18615e-05
1.18577e-05
1.27179e-05
1.18594e-05
6.77949e-05
1.18575e-05
3.23672e-05
1.18583e-05
1.18621e-05
1.18569e-05
1.70157e-05
1.1857e-05
5.28709e-05
1.18569e-05
4.10558e-05
1.18571e-05
2.67121e-05
4.09412e-05
2.31756e-05
1.45922e-05
1.19015e-05
1.18926e-05
4.87473e-05
1.18675e-05
1.18756e-05
6.24238e-05
1.18787e-05
1.18988e-05
4.49097e-05
1.18671e-05
3.7792e-05
3.86565e-05
1.18608e-05
1.18923e-05
1.1859e-05
4.16117e-05
1.18713e-05
2.33925e-05
1.18645e-05
6.89297e-05
1.18575e-05
3.91051e-05
1.18616e-05
1.20586e-05
1.18713e-05
1.1857e-05
1.18637e-05
1.18582e-05
1.18577e-05
1.18611e-05
1.19054e-05
1.19045e-05
1.18843e-05
1.19325e-05
1.18567e-05
1.18568e-05
1.18657e-05
2.38328e-05
1.37026e-05
1.1857e-05
1.1857e-05
6.36638e-05
6.89885e-05
1.18574e-05
1.18569e-05
7.04456e-05
8.09386e-05
1.18595e-05
1.1857e-05
6.64313e-05
7.39464e-05
1.18572e-05
6.64224e-05
8.06262e-05
1.18576e-05
1.1858e-05
1.18578e-05
8.40995e-05
7.98163e-05
1.18604e-05
8.44336e-05
1.1857e-05
8.26177e-05
1.18571e-05
1.18613e-05
6.41463e-05
7.06838e-05
6.91913e-05
1.1857e-05
1.18576e-05
7.06514e-05
6.98159e-05
1.1857e-05
6.60875e-05
1.18585e-05
6.60085e-05
1.18578e-05
1.1857e-05
6.56252e-05
6.43279e-05
1.18578e-05
1.18584e-05
7.00858e-05
1.1857e-05
1.18576e-05
7.15464e-05
6.95649e-05
1.1857e-05
1.18572e-05
7.2662e-05
7.1115e-05
1.1861e-05
1.18569e-05
8.85755e-05
8.51487e-05
1.1857e-05
7.46428e-05
7.62249e-05
1.1857e-05
1.18585e-05
8.58232e-05
1.1857e-05
8.30453e-05
8.60601e-05
1.18569e-05
1.18608e-05
8.86912e-05
1.18573e-05
8.20587e-05
1.1857e-05
8.15644e-05
7.98432e-05
1.1857e-05
1.1857e-05
7.83473e-05
1.43256e-05
1.18895e-05
1.18835e-05
1.41794e-05
1.18716e-05
1.18861e-05
1.18686e-05
1.18736e-05
1.19312e-05
1.18785e-05
1.18578e-05
2.58939e-05
1.60002e-05
1.18796e-05
1.18628e-05
1.18752e-05
1.18579e-05
7.30743e-05
1.18572e-05
1.18572e-05
6.96816e-05
1.18572e-05
7.46106e-05
8.29936e-05
1.18574e-05
6.64568e-05
1.18572e-05
6.3803e-05
1.1857e-05
7.31555e-05
1.18585e-05
1.18585e-05
1.18568e-05
8.17519e-05
8.40714e-05
6.9351e-05
7.45555e-05
1.18569e-05
1.18593e-05
1.18574e-05
1.18584e-05
7.26223e-05
1.18673e-05
1.18577e-05
1.18575e-05
1.18586e-05
1.18573e-05
1.18583e-05
7.19428e-05
6.26616e-05
6.83225e-05
7.42365e-05
6.16911e-05
7.81616e-05
1.18581e-05
1.18621e-05
7.42469e-05
1.18593e-05
6.76815e-05
8.54148e-05
6.91124e-05
1.18596e-05
1.18573e-05
7.5553e-05
1.18579e-05
7.41031e-05
1.18572e-05
7.49185e-05
7.19266e-05
1.18575e-05
1.18677e-05
1.18568e-05
1.18786e-05
1.18686e-05
1.18567e-05
1.18562e-05
1.18566e-05
2.03177e-05
1.29583e-05
1.18689e-05
1.1857e-05
1.18574e-05
1.18698e-05
1.18749e-05
1.18788e-05
1.18952e-05
1.18799e-05
1.22669e-05
2.0167e-05
5.28377e-05
1.18574e-05
1.18574e-05
1.18571e-05
5.70273e-05
1.18576e-05
5.77272e-05
6.12563e-05
1.18566e-05
1.18724e-05
1.18587e-05
1.18595e-05
1.1857e-05
1.18748e-05
1.1858e-05
1.18645e-05
1.1865e-05
1.18567e-05
1.18576e-05
1.18571e-05
1.186e-05
1.18574e-05
1.18655e-05
1.1857e-05
1.18572e-05
1.18589e-05
1.18569e-05
1.18583e-05
1.18571e-05
1.1857e-05
1.18567e-05
1.18705e-05
1.18571e-05
1.18647e-05
1.18664e-05
1.18611e-05
1.18586e-05
1.18697e-05
1.18648e-05
1.18608e-05
1.18573e-05
1.18567e-05
1.1857e-05
2.03928e-05
1.18656e-05
1.58177e-05
1.63946e-05
1.18567e-05
1.18569e-05
1.18674e-05
2.07958e-05
1.19613e-05
1.1857e-05
1.18569e-05
1.18646e-05
1.18573e-05
1.19283e-05
1.18567e-05
1.18609e-05
1.18569e-05
1.18598e-05
1.18574e-05
1.18655e-05
1.18569e-05
1.1857e-05
1.18582e-05
1.18575e-05
1.18569e-05
1.1862e-05
1.18584e-05
1.18605e-05
1.1872e-05
1.18599e-05
1.1876e-05
1.1859e-05
1.18568e-05
1.18617e-05
1.18576e-05
1.18575e-05
1.18599e-05
1.18574e-05
1.18697e-05
1.18704e-05
1.18569e-05
1.18568e-05
1.18663e-05
1.18568e-05
1.18704e-05
1.18616e-05
1.18583e-05
1.18628e-05
1.18564e-05
1.18566e-05
1.1866e-05
1.18688e-05
1.18573e-05
1.18634e-05
1.1869e-05
1.18688e-05
1.18625e-05
1.18568e-05
1.18608e-05
1.18807e-05
1.18682e-05
1.18685e-05
1.18764e-05
1.1865e-05
1.18659e-05
1.186e-05
1.18585e-05
1.18621e-05
1.186e-05
1.18676e-05
1.18681e-05
1.18598e-05
1.18646e-05
1.18689e-05
1.18685e-05
1.18717e-05
1.18727e-05
1.18728e-05
1.1877e-05
1.18607e-05
1.18663e-05
1.18854e-05
1.18846e-05
1.18565e-05
1.18571e-05
1.18847e-05
1.18658e-05
1.18747e-05
1.18575e-05
1.18937e-05
1.18668e-05
1.18636e-05
1.19304e-05
1.18703e-05
1.18578e-05
1.19094e-05
1.18572e-05
1.18597e-05
1.18653e-05
1.18567e-05
1.18626e-05
1.18716e-05
1.18817e-05
1.18594e-05
1.19017e-05
1.18578e-05
1.18915e-05
1.1857e-05
1.18759e-05
1.18744e-05
1.18648e-05
1.1863e-05
1.18565e-05
1.18594e-05
1.18665e-05
1.18798e-05
1.18823e-05
1.18616e-05
1.18602e-05
1.18804e-05
1.1857e-05
1.18901e-05
1.18669e-05
1.18567e-05
1.18805e-05
1.18731e-05
1.18725e-05
1.18571e-05
1.18569e-05
1.18574e-05
1.18571e-05
1.18574e-05
1.18694e-05
1.18657e-05
1.18673e-05
1.18593e-05
1.18574e-05
1.18569e-05
1.18566e-05
1.18582e-05
1.18569e-05
1.18599e-05
1.18575e-05
1.18682e-05
1.1862e-05
1.18788e-05
1.18751e-05
1.18575e-05
1.18568e-05
1.18687e-05
1.18687e-05
1.1916e-05
1.18667e-05
1.18605e-05
1.18781e-05
1.1857e-05
1.18735e-05
1.18615e-05
1.18566e-05
1.18869e-05
1.18741e-05
1.18588e-05
1.18648e-05
1.18589e-05
1.1857e-05
1.18603e-05
1.18915e-05
1.1873e-05
1.18662e-05
1.18742e-05
1.18624e-05
1.18631e-05
1.18743e-05
1.18727e-05
1.18644e-05
1.19195e-05
1.1858e-05
1.18674e-05
1.18574e-05
1.18568e-05
1.18571e-05
1.18672e-05
1.18673e-05
1.18741e-05
1.18871e-05
1.18761e-05
1.19166e-05
1.18719e-05
1.18639e-05
1.18569e-05
1.18563e-05
1.18647e-05
1.1871e-05
1.18665e-05
1.18672e-05
1.18568e-05
1.18564e-05
1.18654e-05
1.18573e-05
1.18734e-05
1.1875e-05
1.18662e-05
1.18621e-05
1.18573e-05
1.1863e-05
1.1856e-05
1.19185e-05
1.1857e-05
1.18739e-05
1.1867e-05
1.18562e-05
1.18723e-05
1.18672e-05
1.18608e-05
1.18575e-05
1.18806e-05
1.18657e-05
1.1871e-05
1.18707e-05
1.18878e-05
1.18639e-05
1.18671e-05
1.18654e-05
1.18587e-05
1.18997e-05
1.18567e-05
1.18676e-05
1.18584e-05
1.18563e-05
1.18702e-05
1.1858e-05
1.18567e-05
1.18562e-05
1.18609e-05
1.18691e-05
1.19432e-05
1.18612e-05
1.18607e-05
1.18837e-05
1.18764e-05
1.18613e-05
1.18572e-05
1.18792e-05
1.18574e-05
1.18702e-05
1.18675e-05
1.18628e-05
1.18743e-05
1.18565e-05
1.18788e-05
1.18697e-05
1.1867e-05
1.18675e-05
1.18621e-05
1.18756e-05
1.18565e-05
1.18571e-05
1.18645e-05
1.18617e-05
1.18797e-05
1.18608e-05
1.18759e-05
1.18638e-05
1.18651e-05
1.18627e-05
1.18635e-05
1.18731e-05
1.18736e-05
1.18616e-05
1.18582e-05
1.18586e-05
1.18645e-05
1.18577e-05
1.1874e-05
1.18571e-05
1.18645e-05
1.18576e-05
1.18815e-05
1.18663e-05
1.18678e-05
1.18578e-05
1.18696e-05
1.18675e-05
1.18569e-05
1.20322e-05
1.18567e-05
1.18616e-05
1.18663e-05
1.18568e-05
1.18702e-05
1.1983e-05
1.18575e-05
1.18753e-05
1.18675e-05
1.18693e-05
1.18811e-05
1.1868e-05
1.18627e-05
1.18617e-05
1.19732e-05
1.18569e-05
1.18618e-05
1.18623e-05
1.18669e-05
1.187e-05
1.18816e-05
1.18832e-05
1.18696e-05
1.18811e-05
1.18732e-05
1.18603e-05
1.18751e-05
1.18618e-05
1.1857e-05
1.18573e-05
1.19273e-05
1.18613e-05
1.19071e-05
1.18895e-05
1.39192e-05
1.18571e-05
1.18596e-05
1.18571e-05
1.18576e-05
1.18929e-05
1.35731e-05
1.18564e-05
1.19234e-05
1.18588e-05
1.18633e-05
1.18822e-05
1.34932e-05
1.18656e-05
1.18816e-05
1.18635e-05
1.18562e-05
1.32335e-05
1.18695e-05
1.18722e-05
1.18689e-05
1.18568e-05
1.18586e-05
1.18572e-05
1.18631e-05
1.19311e-05
1.18587e-05
1.18613e-05
1.1874e-05
1.1857e-05
1.18758e-05
1.1893e-05
1.18566e-05
1.18753e-05
1.18643e-05
1.18721e-05
1.18585e-05
1.18602e-05
1.18913e-05
1.18573e-05
1.18569e-05
1.18693e-05
1.18954e-05
1.18569e-05
1.18649e-05
1.18617e-05
1.18574e-05
1.19181e-05
1.18657e-05
1.18611e-05
1.18586e-05
1.1905e-05
1.18695e-05
1.18577e-05
1.18691e-05
1.18575e-05
1.18631e-05
1.18606e-05
1.18598e-05
1.1861e-05
1.19382e-05
1.18618e-05
1.22223e-05
1.18715e-05
1.1867e-05
1.18564e-05
1.18843e-05
1.18742e-05
1.18601e-05
1.18643e-05
1.18707e-05
1.18564e-05
1.18562e-05
1.18826e-05
1.18568e-05
1.18571e-05
1.18681e-05
1.19328e-05
1.18656e-05
1.1873e-05
1.18568e-05
1.18567e-05
1.18592e-05
1.18902e-05
1.18568e-05
1.18567e-05
1.1857e-05
1.1863e-05
1.18888e-05
1.1857e-05
1.18627e-05
1.18561e-05
1.19355e-05
1.18707e-05
1.18628e-05
1.18631e-05
1.1861e-05
1.18567e-05
1.18567e-05
1.18765e-05
1.18974e-05
1.18566e-05
1.19103e-05
1.18563e-05
1.18564e-05
1.21588e-05
1.1863e-05
1.18621e-05
1.18617e-05
1.18621e-05
1.18571e-05
1.18772e-05
1.1863e-05
1.18565e-05
1.1868e-05
1.18584e-05
1.18806e-05
1.18566e-05
1.19024e-05
1.18606e-05
1.18646e-05
1.18676e-05
1.18576e-05
1.18679e-05
1.18624e-05
1.18593e-05
1.1874e-05
1.18568e-05
1.18564e-05
1.18582e-05
1.18594e-05
1.1881e-05
1.18619e-05
1.18567e-05
1.8407e-05
1.18579e-05
1.18569e-05
1.18569e-05
1.18639e-05
1.70915e-05
1.45972e-05
1.4103e-05
1.18586e-05
1.18597e-05
1.69361e-05
1.86662e-05
1.18665e-05
1.18655e-05
1.18522e-05
1.18592e-05
1.47041e-05
1.58618e-05
1.18573e-05
1.18654e-05
1.1857e-05
1.1857e-05
1.18611e-05
1.28723e-05
1.18572e-05
1.18568e-05
1.18587e-05
1.18546e-05
3.34688e-05
1.18583e-05
1.18573e-05
1.26645e-05
1.18574e-05
1.18568e-05
3.97861e-05
3.09061e-05
4.60116e-05
1.18568e-05
1.71752e-05
4.09421e-05
1.18716e-05
1.20832e-05
4.06904e-05
3.429e-05
1.53293e-05
1.58128e-05
1.18708e-05
3.62434e-05
1.67012e-05
1.66243e-05
1.18572e-05
1.18582e-05
1.18732e-05
3.97816e-05
1.20085e-05
1.18653e-05
1.18576e-05
1.18735e-05
4.0835e-05
1.18675e-05
1.1862e-05
1.18626e-05
1.18572e-05
1.18604e-05
1.18575e-05
1.1861e-05
3.58922e-05
4.70986e-05
1.1876e-05
1.18569e-05
1.31602e-05
1.85667e-05
1.80179e-05
1.81132e-05
1.18642e-05
2.0574e-05
2.364e-05
1.18618e-05
1.1859e-05
1.18682e-05
1.75605e-05
1.18687e-05
1.18597e-05
1.18577e-05
1.18567e-05
2.24427e-05
1.1856e-05
1.20429e-05
1.18615e-05
1.18571e-05
1.18587e-05
1.18659e-05
1.18568e-05
1.18616e-05
1.19286e-05
1.18569e-05
1.25812e-05
1.18573e-05
1.46746e-05
1.55683e-05
1.18602e-05
1.18594e-05
1.1861e-05
1.18571e-05
1.18637e-05
1.49032e-05
1.186e-05
1.41169e-05
1.18574e-05
1.18722e-05
1.18589e-05
1.62834e-05
1.18582e-05
1.18676e-05
1.74287e-05
1.5037e-05
1.18606e-05
1.18583e-05
1.18572e-05
1.18805e-05
1.18628e-05
1.91656e-05
2.0722e-05
1.18698e-05
1.18655e-05
1.18568e-05
1.18626e-05
1.18666e-05
1.1857e-05
1.18678e-05
1.18669e-05
1.18575e-05
1.1857e-05
1.18575e-05
1.186e-05
1.18586e-05
1.18589e-05
1.18574e-05
1.1857e-05
1.18585e-05
1.18643e-05
1.18595e-05
1.18642e-05
1.1857e-05
1.18683e-05
1.18591e-05
1.18647e-05
1.18569e-05
1.18573e-05
1.18575e-05
1.18571e-05
1.18657e-05
1.18569e-05
1.18612e-05
1.18614e-05
1.1857e-05
1.18574e-05
1.18582e-05
1.18602e-05
1.18573e-05
1.18616e-05
1.18598e-05
1.18615e-05
1.18624e-05
1.18692e-05
1.18568e-05
1.18599e-05
1.18588e-05
1.18582e-05
1.18585e-05
1.1861e-05
1.18578e-05
1.18612e-05
1.18592e-05
1.18594e-05
1.18571e-05
1.1858e-05
1.1857e-05
1.18579e-05
1.18647e-05
1.18586e-05
1.18713e-05
1.18571e-05
1.18611e-05
1.18595e-05
1.18589e-05
1.18583e-05
1.18575e-05
1.18574e-05
1.18571e-05
1.18573e-05
1.18571e-05
1.18622e-05
1.18573e-05
1.18592e-05
1.18576e-05
1.18616e-05
1.18581e-05
1.18722e-05
1.18601e-05
1.18581e-05
1.18572e-05
1.18571e-05
1.18566e-05
1.18637e-05
1.18613e-05
1.18573e-05
1.18713e-05
1.18664e-05
1.18585e-05
1.18567e-05
1.18613e-05
1.25877e-05
1.18583e-05
1.26383e-05
1.1857e-05
1.18895e-05
1.18569e-05
1.18898e-05
1.18575e-05
1.18579e-05
1.21404e-05
1.18622e-05
1.18571e-05
1.21121e-05
1.18799e-05
1.18827e-05
1.18648e-05
1.18607e-05
1.1857e-05
1.18584e-05
1.186e-05
1.28283e-05
1.18571e-05
1.24212e-05
1.18985e-05
1.19009e-05
1.18651e-05
1.18597e-05
1.18606e-05
1.18638e-05
1.18585e-05
1.7346e-05
1.19668e-05
1.18649e-05
1.18637e-05
1.55486e-05
1.6717e-05
1.1862e-05
1.18588e-05
1.18595e-05
1.1858e-05
1.18597e-05
2.13847e-05
1.98825e-05
1.18651e-05
1.18563e-05
1.43364e-05
1.1879e-05
1.81388e-05
1.60629e-05
1.18594e-05
1.18586e-05
1.18783e-05
1.19774e-05
1.18626e-05
1.18876e-05
1.18656e-05
1.18569e-05
1.18567e-05
1.19826e-05
1.18569e-05
1.19056e-05
1.18688e-05
1.18585e-05
1.186e-05
1.38896e-05
1.18646e-05
1.18597e-05
1.18512e-05
1.18724e-05
1.186e-05
1.18572e-05
1.34628e-05
1.18649e-05
1.18581e-05
1.19328e-05
1.19478e-05
1.1863e-05
1.1857e-05
1.18586e-05
1.18661e-05
1.18742e-05
1.18666e-05
1.19074e-05
1.18627e-05
1.18641e-05
1.18716e-05
1.18593e-05
1.18574e-05
1.18579e-05
1.18614e-05
1.18571e-05
1.18612e-05
1.18572e-05
1.1859e-05
1.18609e-05
1.18571e-05
1.18633e-05
1.18586e-05
1.18618e-05
1.1857e-05
1.18638e-05
1.18619e-05
1.18655e-05
1.18623e-05
1.18621e-05
1.18657e-05
1.18768e-05
1.18685e-05
1.18641e-05
1.18577e-05
1.18581e-05
1.18586e-05
1.18579e-05
1.19037e-05
1.18664e-05
1.18622e-05
1.18643e-05
1.18966e-05
1.18667e-05
1.18605e-05
1.18649e-05
1.18976e-05
1.19304e-05
1.19565e-05
1.18634e-05
1.18631e-05
1.18565e-05
1.18681e-05
1.18775e-05
1.18727e-05
1.18595e-05
1.18653e-05
1.18571e-05
1.18591e-05
1.18608e-05
1.18583e-05
1.18643e-05
1.18737e-05
1.18603e-05
1.18587e-05
1.18602e-05
1.18571e-05
1.18792e-05
1.18577e-05
1.18648e-05
1.18569e-05
1.18742e-05
1.18757e-05
1.18612e-05
1.18619e-05
1.18571e-05
1.18588e-05
1.18597e-05
1.18736e-05
1.18628e-05
1.18601e-05
1.1857e-05
1.18795e-05
1.18575e-05
1.18659e-05
1.1857e-05
1.18625e-05
1.18571e-05
1.18591e-05
1.18572e-05
1.18674e-05
1.18616e-05
1.18778e-05
1.18632e-05
1.18563e-05
1.18804e-05
1.18564e-05
1.1878e-05
2.50576e-05
1.18788e-05
2.48293e-05
1.18667e-05
1.18665e-05
1.18567e-05
1.18628e-05
4.81818e-05
5.27998e-05
1.18586e-05
1.18633e-05
1.18627e-05
4.23297e-05
4.5426e-05
1.18754e-05
1.18854e-05
1.18563e-05
1.18699e-05
1.1856e-05
1.18761e-05
1.1892e-05
1.18963e-05
1.18721e-05
1.18618e-05
1.1859e-05
1.18735e-05
1.18585e-05
1.18795e-05
1.18628e-05
1.18587e-05
1.18583e-05
1.18811e-05
1.18724e-05
1.18703e-05
1.18623e-05
1.1879e-05
1.18645e-05
1.18629e-05
1.18846e-05
1.18583e-05
1.18937e-05
1.18561e-05
1.18856e-05
1.18573e-05
1.18792e-05
1.18818e-05
1.18573e-05
1.18574e-05
1.18583e-05
1.18571e-05
1.18797e-05
1.18912e-05
1.18753e-05
1.18568e-05
1.18635e-05
1.19376e-05
1.1869e-05
1.18699e-05
1.18624e-05
1.18627e-05
1.18738e-05
1.19124e-05
1.18726e-05
1.20134e-05
1.18717e-05
1.20031e-05
1.18745e-05
1.18621e-05
1.18624e-05
1.19954e-05
1.18566e-05
1.19391e-05
1.18737e-05
1.19145e-05
1.18905e-05
1.18573e-05
1.20325e-05
1.18759e-05
1.18804e-05
1.18611e-05
1.18771e-05
1.1887e-05
1.20153e-05
1.18675e-05
1.18608e-05
1.18569e-05
1.18701e-05
1.18604e-05
1.18659e-05
1.18569e-05
1.18627e-05
1.18592e-05
1.18588e-05
1.18572e-05
1.18568e-05
1.18611e-05
1.18575e-05
1.18582e-05
1.18579e-05
1.18585e-05
1.18593e-05
1.18569e-05
1.18574e-05
1.18607e-05
1.18572e-05
1.18604e-05
1.18571e-05
1.18569e-05
1.1858e-05
1.18627e-05
1.187e-05
1.1857e-05
1.18623e-05
1.18615e-05
1.18574e-05
1.18594e-05
1.18575e-05
1.1857e-05
1.18586e-05
1.18569e-05
1.18716e-05
1.1858e-05
1.1857e-05
1.18601e-05
1.18572e-05
1.18569e-05
1.18578e-05
1.18673e-05
1.18582e-05
1.18578e-05
1.18575e-05
1.18587e-05
1.18571e-05
1.1857e-05
1.1857e-05
1.18588e-05
1.1861e-05
1.18569e-05
1.18577e-05
1.1859e-05
1.18577e-05
1.18623e-05
1.19241e-05
1.18734e-05
1.18569e-05
1.18613e-05
1.18703e-05
1.18586e-05
1.24204e-05
1.1858e-05
1.22871e-05
1.18574e-05
1.92289e-05
1.18577e-05
1.18587e-05
2.46803e-05
2.15981e-05
1.18588e-05
1.20022e-05
1.1876e-05
1.18581e-05
1.18581e-05
1.18571e-05
1.18616e-05
1.18596e-05
1.18594e-05
1.18581e-05
1.18571e-05
1.18827e-05
1.19102e-05
1.18597e-05
1.186e-05
1.18583e-05
1.18618e-05
1.18578e-05
1.18586e-05
1.18592e-05
1.18605e-05
1.18592e-05
1.18591e-05
1.18575e-05
1.18581e-05
1.18599e-05
1.18708e-05
1.19395e-05
1.18573e-05
1.1858e-05
1.18582e-05
1.18648e-05
1.18578e-05
1.18581e-05
1.18587e-05
1.1858e-05
1.18571e-05
1.18609e-05
1.1861e-05
1.38585e-05
1.18624e-05
1.18662e-05
1.18576e-05
1.18577e-05
1.18588e-05
1.22406e-05
1.18643e-05
1.38921e-05
1.28221e-05
1.18715e-05
1.22383e-05
1.1864e-05
1.18578e-05
1.1857e-05
1.18584e-05
1.18571e-05
1.31908e-05
1.18643e-05
1.34215e-05
1.18578e-05
1.18586e-05
1.18645e-05
1.18601e-05
1.25925e-05
1.1857e-05
1.18571e-05
1.18794e-05
1.18663e-05
1.18651e-05
1.18624e-05
1.18647e-05
1.18576e-05
1.35574e-05
1.18587e-05
1.18653e-05
1.18572e-05
1.18622e-05
1.27473e-05
1.18591e-05
1.18591e-05
1.18593e-05
1.18619e-05
1.18613e-05
1.18646e-05
1.18579e-05
1.18587e-05
1.18597e-05
1.18616e-05
1.18565e-05
1.18575e-05
1.18604e-05
1.18566e-05
1.18568e-05
1.18577e-05
5.00046e-05
5.11827e-05
4.33054e-05
1.18572e-05
4.48912e-05
1.18568e-05
1.18572e-05
2.30024e-05
2.01137e-05
1.19e-05
1.18883e-05
1.66227e-05
1.18578e-05
1.55364e-05
1.61852e-05
1.18749e-05
1.18744e-05
5.09936e-05
4.55864e-05
3.89818e-05
1.18846e-05
1.18734e-05
3.89632e-05
3.95372e-05
1.18688e-05
4.40181e-05
1.18875e-05
3.27688e-05
1.18783e-05
1.18613e-05
2.97963e-05
1.18598e-05
2.80078e-05
1.18606e-05
2.48822e-05
1.18592e-05
1.18585e-05
1.1863e-05
1.1876e-05
1.18784e-05
1.19104e-05
1.18658e-05
1.18615e-05
1.18603e-05
2.33219e-05
1.40318e-05
1.18601e-05
1.18589e-05
1.1863e-05
1.18833e-05
1.18595e-05
1.18958e-05
1.18624e-05
1.24369e-05
2.20061e-05
1.18556e-05
1.18569e-05
1.18841e-05
1.18837e-05
1.18684e-05
1.18628e-05
1.18898e-05
2.13668e-05
1.33698e-05
1.18613e-05
1.18592e-05
1.19092e-05
1.1885e-05
1.18737e-05
1.18847e-05
1.18567e-05
1.18567e-05
1.18566e-05
1.18654e-05
2.30628e-05
1.25601e-05
1.19507e-05
1.18943e-05
1.18767e-05
1.1897e-05
1.18591e-05
1.18568e-05
1.18572e-05
1.18566e-05
1.25366e-05
2.43799e-05
1.18912e-05
1.18575e-05
1.18652e-05
1.18937e-05
1.18685e-05
1.18719e-05
1.18739e-05
1.1857e-05
1.18594e-05
1.18734e-05
1.18563e-05
1.18569e-05
1.18736e-05
1.18564e-05
1.186e-05
1.18566e-05
1.18797e-05
2.09863e-05
2.13136e-05
1.25473e-05
1.29364e-05
1.18594e-05
1.18656e-05
6.88725e-05
1.18578e-05
7.0479e-05
1.18579e-05
1.18615e-05
1.1857e-05
1.18568e-05
1.18621e-05
1.18657e-05
1.18863e-05
2.25893e-05
1.19155e-05
3.6649e-05
1.21717e-05
1.19709e-05
2.85986e-05
1.18719e-05
1.18789e-05
1.18973e-05
1.18717e-05
1.18703e-05
1.18578e-05
1.18565e-05
1.18645e-05
1.18589e-05
1.70811e-05
5.40846e-05
5.28411e-05
7.32253e-05
8.57855e-05
6.79212e-05
7.63413e-05
4.9919e-05
4.99046e-05
8.46557e-05
7.22054e-05
7.50517e-05
6.59491e-05
1.18671e-05
1.1874e-05
1.18568e-05
1.18567e-05
1.186e-05
1.18611e-05
1.18599e-05
1.1857e-05
1.18632e-05
1.18619e-05
1.1863e-05
1.18618e-05
1.18907e-05
1.1891e-05
1.18568e-05
1.18579e-05
2.40546e-05
1.18783e-05
1.18569e-05
1.18566e-05
1.18592e-05
1.18572e-05
1.18569e-05
1.18988e-05
1.18741e-05
1.18664e-05
1.18583e-05
1.18612e-05
1.18698e-05
1.18728e-05
1.18765e-05
1.18809e-05
1.18751e-05
1.18597e-05
1.18796e-05
1.18747e-05
1.18728e-05
1.18821e-05
1.18831e-05
1.18572e-05
1.18605e-05
1.18645e-05
1.18803e-05
1.18744e-05
1.18796e-05
1.18725e-05
1.18579e-05
1.18668e-05
1.18714e-05
1.18814e-05
1.18563e-05
1.18564e-05
1.18568e-05
1.18617e-05
1.18676e-05
1.18689e-05
1.18664e-05
1.18718e-05
1.24203e-05
1.28379e-05
1.23447e-05
1.18717e-05
1.18786e-05
1.18624e-05
1.18571e-05
1.18925e-05
1.19094e-05
1.18618e-05
1.18584e-05
1.18648e-05
1.18576e-05
1.18586e-05
1.18582e-05
1.18946e-05
1.19136e-05
1.1885e-05
1.1887e-05
1.1873e-05
1.18718e-05
1.18607e-05
1.1869e-05
1.18704e-05
1.18756e-05
1.18565e-05
1.18639e-05
1.18622e-05
1.18671e-05
1.18843e-05
1.18698e-05
1.18658e-05
1.18568e-05
1.18766e-05
1.18626e-05
1.18583e-05
1.18627e-05
1.18646e-05
1.18637e-05
1.1863e-05
1.18575e-05
1.18612e-05
1.18592e-05
1.18569e-05
1.18604e-05
1.18616e-05
1.18602e-05
1.18626e-05
1.18687e-05
1.1867e-05
1.18562e-05
1.18597e-05
1.1857e-05
1.18569e-05
1.18582e-05
1.186e-05
1.18577e-05
1.1861e-05
1.1858e-05
1.18589e-05
1.18673e-05
1.18594e-05
1.18633e-05
1.18569e-05
1.18608e-05
1.18571e-05
1.18801e-05
1.18732e-05
1.18588e-05
1.18568e-05
1.18566e-05
1.18566e-05
1.18568e-05
1.1858e-05
1.18568e-05
1.18574e-05
1.18568e-05
1.18572e-05
1.18567e-05
1.18568e-05
1.18673e-05
1.18689e-05
1.18562e-05
1.18562e-05
1.18729e-05
1.18808e-05
1.18598e-05
1.1857e-05
1.18601e-05
1.18574e-05
1.18598e-05
1.18569e-05
1.18878e-05
1.18895e-05
1.19128e-05
1.19284e-05
1.18775e-05
1.18627e-05
1.18586e-05
1.18593e-05
1.18577e-05
1.18579e-05
1.18582e-05
1.18569e-05
1.18569e-05
1.18579e-05
1.18607e-05
1.18604e-05
1.1863e-05
1.18617e-05
1.54395e-05
1.35552e-05
2.13612e-05
1.76987e-05
2.13837e-05
1.93686e-05
1.18577e-05
1.1857e-05
1.18589e-05
1.18574e-05
1.18572e-05
1.18582e-05
1.38296e-05
1.71602e-05
1.19886e-05
1.28891e-05
1.28729e-05
1.60663e-05
1.18583e-05
1.1859e-05
1.18573e-05
1.18579e-05
1.18577e-05
1.1857e-05
1.18611e-05
1.18582e-05
1.18567e-05
1.18573e-05
1.18568e-05
1.18571e-05
1.18572e-05
1.18638e-05
1.18569e-05
1.18616e-05
1.18592e-05
1.18569e-05
1.18627e-05
1.18632e-05
1.18646e-05
1.18677e-05
1.18652e-05
1.18601e-05
1.18591e-05
1.18595e-05
1.18619e-05
1.18583e-05
1.1863e-05
1.18586e-05
1.1857e-05
1.18683e-05
1.18721e-05
1.18727e-05
1.1874e-05
1.18709e-05
1.1869e-05
1.18578e-05
1.1863e-05
1.1864e-05
1.18669e-05
1.18604e-05
1.18624e-05
1.18612e-05
1.18585e-05
1.18594e-05
1.18601e-05
1.18571e-05
1.18714e-05
1.18729e-05
1.1865e-05
1.1862e-05
1.18936e-05
1.1895e-05
1.18577e-05
1.18585e-05
1.18571e-05
1.18594e-05
1.18596e-05
1.1865e-05
1.18703e-05
1.18675e-05
1.18723e-05
1.18668e-05
1.18672e-05
1.18589e-05
1.18653e-05
1.18713e-05
1.18746e-05
1.18807e-05
5.33402e-05
4.41697e-05
4.68637e-05
5.18752e-05
1.18856e-05
1.18799e-05
1.18796e-05
1.1882e-05
1.18643e-05
1.18569e-05
1.18685e-05
1.18647e-05
1.18672e-05
1.18733e-05
1.18649e-05
1.18785e-05
1.18645e-05
1.18742e-05
1.18607e-05
1.18607e-05
1.18616e-05
1.1863e-05
1.18629e-05
1.18576e-05
1.18579e-05
1.18612e-05
1.18723e-05
1.18688e-05
1.18739e-05
1.18642e-05
1.18589e-05
1.18571e-05
1.18629e-05
1.18598e-05
1.18583e-05
1.186e-05
1.18637e-05
1.18585e-05
1.18641e-05
1.18651e-05
1.18643e-05
1.18657e-05
1.18718e-05
1.18801e-05
1.18956e-05
1.18734e-05
1.18623e-05
1.18763e-05
1.18769e-05
1.18794e-05
1.18633e-05
1.1856e-05
1.18643e-05
1.18782e-05
1.18773e-05
1.18824e-05
1.1869e-05
1.18676e-05
1.18661e-05
1.18566e-05
1.18566e-05
1.18593e-05
1.1859e-05
1.18606e-05
1.18586e-05
1.18607e-05
1.18569e-05
1.18689e-05
1.18612e-05
1.18667e-05
1.18622e-05
1.18693e-05
1.18614e-05
1.18703e-05
1.18621e-05
1.18669e-05
1.18775e-05
1.18817e-05
1.18827e-05
1.18936e-05
1.18609e-05
1.18567e-05
1.18563e-05
1.18563e-05
1.18569e-05
1.18573e-05
1.75564e-05
1.39793e-05
1.50301e-05
1.186e-05
1.18566e-05
1.18574e-05
1.18564e-05
1.18602e-05
1.18575e-05
1.18684e-05
1.18606e-05
1.18576e-05
1.18589e-05
1.18621e-05
1.18575e-05
1.18703e-05
1.20203e-05
1.19244e-05
1.18838e-05
1.18699e-05
1.19387e-05
1.1899e-05
1.1995e-05
1.19088e-05
1.19e-05
1.1856e-05
1.18564e-05
1.18613e-05
1.18584e-05
1.18561e-05
1.23277e-05
1.30539e-05
1.21853e-05
1.24558e-05
1.20719e-05
1.18565e-05
1.18566e-05
1.18587e-05
1.18602e-05
1.18566e-05
1.18566e-05
1.18609e-05
1.18654e-05
1.18667e-05
1.18689e-05
1.18668e-05
1.18613e-05
1.18563e-05
1.18561e-05
1.18615e-05
1.18561e-05
1.18562e-05
1.18637e-05
1.18562e-05
1.18562e-05
1.18627e-05
1.18563e-05
1.18564e-05
1.18597e-05
1.18566e-05
1.18582e-05
1.1871e-05
1.18814e-05
1.18858e-05
1.18745e-05
1.1861e-05
1.18593e-05
1.18569e-05
1.19028e-05
1.1857e-05
1.19153e-05
1.18686e-05
1.18598e-05
1.18574e-05
1.1857e-05
1.1857e-05
1.1857e-05
1.18577e-05
1.18581e-05
1.19388e-05
1.19068e-05
1.20575e-05
1.19251e-05
1.18791e-05
1.18634e-05
1.19117e-05
1.18824e-05
1.18591e-05
1.18827e-05
1.18563e-05
1.18566e-05
1.18579e-05
1.1861e-05
1.18566e-05
1.1871e-05
1.18702e-05
1.18672e-05
1.18566e-05
1.1856e-05
1.18564e-05
1.18639e-05
1.26662e-05
1.21334e-05
1.31342e-05
1.22177e-05
1.3638e-05
1.21236e-05
1.27303e-05
1.20283e-05
1.18963e-05
1.18592e-05
1.1857e-05
1.18597e-05
1.1857e-05
1.18585e-05
1.1857e-05
1.1859e-05
1.18598e-05
1.18575e-05
1.18591e-05
1.18585e-05
1.18591e-05
1.18735e-05
1.18595e-05
1.18809e-05
1.18801e-05
1.18562e-05
1.18651e-05
1.23669e-05
1.31242e-05
1.221e-05
1.2477e-05
1.22278e-05
1.23256e-05
1.18812e-05
1.18675e-05
1.18651e-05
1.18914e-05
1.18876e-05
1.1882e-05
1.18596e-05
1.18595e-05
1.18598e-05
1.1858e-05
1.18592e-05
1.18589e-05
1.1857e-05
1.18578e-05
1.18585e-05
1.18582e-05
1.18577e-05
1.18581e-05
1.1857e-05
1.1857e-05
1.29605e-05
1.22025e-05
1.57793e-05
1.42001e-05
1.7638e-05
1.60934e-05
2.84873e-05
2.23929e-05
7.07958e-05
5.28449e-05
5.49674e-05
3.9265e-05
2.81319e-05
2.20434e-05
7.03012e-05
5.25e-05
5.45887e-05
3.90508e-05
2.91464e-05
1.47074e-05
2.77868e-05
2.37065e-05
5.17574e-05
2.43292e-05
1.18571e-05
1.18588e-05
1.18578e-05
1.18574e-05
1.18588e-05
1.18576e-05
1.33194e-05
1.2207e-05
1.20025e-05
1.18583e-05
1.26125e-05
1.19269e-05
1.18581e-05
1.18594e-05
1.18573e-05
1.18594e-05
1.18582e-05
1.18603e-05
1.18571e-05
1.18573e-05
1.18568e-05
1.18566e-05
1.18574e-05
1.18579e-05
1.1859e-05
1.18596e-05
1.18569e-05
1.18585e-05
1.18576e-05
1.18593e-05
1.18596e-05
1.18587e-05
1.18597e-05
1.18585e-05
1.18598e-05
4.05626e-05
2.84026e-05
2.7303e-05
2.45081e-05
3.46882e-05
2.62448e-05
4.11422e-05
5.26759e-05
4.00139e-05
4.7159e-05
1.18685e-05
1.18618e-05
1.18617e-05
1.18567e-05
1.18567e-05
1.18568e-05
2.20289e-05
3.21514e-05
1.94939e-05
2.37262e-05
2.06932e-05
2.3841e-05
1.18616e-05
1.18713e-05
1.18849e-05
1.18564e-05
1.18809e-05
1.18621e-05
4.86188e-05
4.69639e-05
7.89564e-05
6.92652e-05
8.14584e-05
7.34245e-05
1.20956e-05
1.28705e-05
1.18904e-05
1.21249e-05
1.18584e-05
1.18569e-05
1.1858e-05
1.18591e-05
1.18636e-05
1.18605e-05
1.18616e-05
4.27497e-05
3.91361e-05
8.21472e-05
6.67401e-05
6.88029e-05
5.95037e-05
2.65786e-05
5.28377e-05
3.55021e-05
6.50197e-05
2.5175e-05
5.17377e-05
1.25664e-05
1.4596e-05
1.18738e-05
1.24535e-05
1.19761e-05
1.21362e-05
1.18597e-05
1.18562e-05
1.18565e-05
1.18615e-05
1.18561e-05
1.18564e-05
1.18886e-05
1.18777e-05
1.18717e-05
1.187e-05
1.18809e-05
1.18932e-05
1.1892e-05
1.18923e-05
1.18569e-05
1.1858e-05
1.1859e-05
1.1859e-05
1.18585e-05
3.36186e-05
3.27824e-05
1.63953e-05
5.97204e-05
2.96834e-05
1.18566e-05
1.18903e-05
1.18596e-05
1.18559e-05
1.18573e-05
3.39656e-05
2.80534e-05
7.66964e-05
5.85611e-05
6.0689e-05
4.49506e-05
1.18597e-05
1.18598e-05
1.18592e-05
1.1857e-05
1.18582e-05
1.18571e-05
1.18587e-05
1.18583e-05
3.13324e-05
2.6007e-05
6.9868e-05
5.42601e-05
5.66743e-05
4.22664e-05
1.18704e-05
1.18566e-05
1.186e-05
1.18704e-05
1.18682e-05
1.18653e-05
1.18569e-05
1.18699e-05
1.18851e-05
1.18764e-05
1.189e-05
1.18659e-05
1.19315e-05
1.18755e-05
1.18564e-05
1.18571e-05
1.18571e-05
1.1903e-05
1.18981e-05
1.18627e-05
1.18677e-05
1.18598e-05
1.18568e-05
1.18636e-05
1.18567e-05
1.18584e-05
1.18564e-05
1.18562e-05
1.18559e-05
1.18569e-05
1.18582e-05
1.1868e-05
1.18642e-05
1.18604e-05
1.1857e-05
1.18571e-05
1.18563e-05
1.18713e-05
1.18648e-05
1.18726e-05
1.1861e-05
1.18561e-05
1.18562e-05
1.18619e-05
1.18562e-05
1.18638e-05
1.18583e-05
1.18565e-05
1.18562e-05
1.18569e-05
1.1857e-05
1.18833e-05
1.18856e-05
1.18911e-05
1.18816e-05
1.1888e-05
1.18645e-05
1.18814e-05
1.18723e-05
1.18777e-05
1.18729e-05
1.18677e-05
1.18618e-05
1.18565e-05
1.18564e-05
1.18563e-05
1.18573e-05
1.18576e-05
1.18626e-05
1.18731e-05
1.18693e-05
1.18661e-05
1.18732e-05
1.18688e-05
1.18902e-05
1.18777e-05
1.18691e-05
1.18839e-05
1.18578e-05
1.18607e-05
1.1861e-05
1.18593e-05
1.18576e-05
1.18586e-05
1.1866e-05
1.18586e-05
1.1859e-05
1.18584e-05
1.18644e-05
1.1857e-05
1.19439e-05
1.19158e-05
1.42954e-05
1.18668e-05
1.18607e-05
1.1881e-05
1.18819e-05
1.18954e-05
1.1856e-05
1.1858e-05
1.18576e-05
1.18569e-05
1.18564e-05
1.18564e-05
1.18565e-05
1.18677e-05
1.19019e-05
1.18605e-05
1.18697e-05
1.18567e-05
1.18615e-05
1.18561e-05
1.18565e-05
1.18778e-05
1.19047e-05
1.18726e-05
1.19049e-05
1.18632e-05
1.1857e-05
1.1857e-05
1.1857e-05
1.1857e-05
1.18579e-05
1.18576e-05
1.186e-05
1.1857e-05
1.1857e-05
1.18569e-05
1.18669e-05
1.18607e-05
1.18566e-05
1.18709e-05
1.18599e-05
1.18726e-05
1.18598e-05
1.18738e-05
1.18782e-05
1.18789e-05
1.18715e-05
1.18596e-05
1.18602e-05
1.18571e-05
1.18593e-05
1.18571e-05
1.1859e-05
1.1859e-05
1.18583e-05
1.18589e-05
1.18659e-05
1.1857e-05
1.18587e-05
1.18572e-05
1.1863e-05
1.1857e-05
1.18575e-05
1.1874e-05
1.18773e-05
1.18571e-05
1.18569e-05
1.18601e-05
1.18573e-05
1.18573e-05
1.1857e-05
1.1858e-05
1.1858e-05
1.18803e-05
1.19062e-05
1.18825e-05
1.18901e-05
1.18657e-05
1.18661e-05
1.18712e-05
1.1861e-05
1.18825e-05
1.18779e-05
1.19062e-05
1.19146e-05
1.18569e-05
1.18566e-05
1.18576e-05
1.18619e-05
1.18591e-05
1.18653e-05
1.18675e-05
1.18722e-05
1.18568e-05
1.18569e-05
1.18596e-05
1.18612e-05
1.52313e-05
1.69987e-05
1.18744e-05
1.18581e-05
1.18647e-05
1.18685e-05
1.18664e-05
1.18658e-05
1.18631e-05
1.19003e-05
1.18574e-05
1.18708e-05
1.18681e-05
1.18588e-05
1.18573e-05
1.18923e-05
1.18573e-05
1.18567e-05
1.18568e-05
1.18595e-05
1.18569e-05
1.18581e-05
1.18603e-05
1.18567e-05
1.18568e-05
1.18596e-05
1.18686e-05
1.19098e-05
1.19076e-05
1.18796e-05
1.18573e-05
1.18892e-05
1.18735e-05
1.18804e-05
1.18979e-05
1.18877e-05
1.18885e-05
1.18569e-05
1.18571e-05
1.18593e-05
1.1857e-05
1.1857e-05
1.18571e-05
1.18763e-05
1.18652e-05
1.18563e-05
1.18809e-05
1.18621e-05
1.18849e-05
1.18688e-05
1.18933e-05
1.19055e-05
1.18874e-05
1.18569e-05
1.18797e-05
1.187e-05
1.18662e-05
1.18597e-05
1.18615e-05
1.18569e-05
1.18805e-05
1.1866e-05
1.18722e-05
1.18746e-05
1.18653e-05
1.18664e-05
1.1872e-05
1.18788e-05
1.18842e-05
1.18697e-05
1.18825e-05
1.18986e-05
1.18673e-05
1.18557e-05
1.18642e-05
1.18572e-05
1.18611e-05
1.1884e-05
1.19025e-05
1.18865e-05
1.18734e-05
1.18605e-05
1.18637e-05
1.18624e-05
1.18636e-05
1.18646e-05
1.1867e-05
1.18696e-05
1.18575e-05
1.1857e-05
1.18778e-05
1.18569e-05
1.18572e-05
1.19058e-05
1.18647e-05
1.19454e-05
1.1879e-05
1.19262e-05
1.1916e-05
1.18607e-05
1.18603e-05
1.18565e-05
1.18658e-05
1.18618e-05
1.18569e-05
1.18565e-05
1.18557e-05
1.18571e-05
1.18664e-05
1.1862e-05
1.18595e-05
1.18574e-05
1.18616e-05
1.18622e-05
1.18797e-05
1.18577e-05
1.18877e-05
1.18615e-05
1.18661e-05
1.18665e-05
1.18628e-05
1.18608e-05
1.18608e-05
1.18626e-05
1.18717e-05
1.18744e-05
1.18593e-05
1.18562e-05
1.18569e-05
1.18569e-05
1.1863e-05
1.18733e-05
1.18773e-05
1.18654e-05
1.18709e-05
1.18763e-05
1.1858e-05
1.18812e-05
1.18563e-05
1.18743e-05
1.18583e-05
1.18622e-05
1.18624e-05
1.18774e-05
1.18569e-05
1.18697e-05
1.18789e-05
1.18761e-05
1.18625e-05
1.18569e-05
1.18959e-05
1.18573e-05
1.18732e-05
1.18875e-05
1.18744e-05
1.18569e-05
1.19e-05
1.18649e-05
1.18579e-05
1.1857e-05
1.18569e-05
1.18676e-05
1.18627e-05
1.18567e-05
1.18763e-05
1.18568e-05
1.18734e-05
1.18583e-05
1.18584e-05
1.18646e-05
1.18577e-05
1.18611e-05
1.18637e-05
1.18645e-05
1.18615e-05
1.1875e-05
1.18691e-05
1.18664e-05
1.18854e-05
1.18882e-05
1.1858e-05
1.18605e-05
1.18663e-05
1.18643e-05
1.18638e-05
1.1861e-05
1.18568e-05
1.18565e-05
1.18572e-05
1.18569e-05
1.18581e-05
1.18572e-05
1.18592e-05
1.18643e-05
1.18572e-05
1.1857e-05
1.18577e-05
1.18585e-05
1.18816e-05
1.18646e-05
1.18672e-05
1.18676e-05
1.18857e-05
1.18611e-05
1.18809e-05
1.19035e-05
1.18953e-05
1.18911e-05
1.18574e-05
1.18603e-05
1.18575e-05
1.18571e-05
1.18599e-05
1.18649e-05
1.18589e-05
1.18605e-05
1.18644e-05
1.18624e-05
1.18656e-05
1.18612e-05
1.18605e-05
1.18578e-05
1.18598e-05
1.18648e-05
1.1864e-05
1.18596e-05
1.18594e-05
1.18653e-05
1.18784e-05
1.18755e-05
1.18584e-05
1.18563e-05
1.1863e-05
1.18653e-05
1.18564e-05
1.18566e-05
1.18579e-05
1.18596e-05
1.18561e-05
1.18571e-05
1.18567e-05
1.18591e-05
1.18583e-05
1.18666e-05
1.18577e-05
1.18716e-05
1.18588e-05
1.18602e-05
1.18598e-05
1.18611e-05
1.18666e-05
1.1867e-05
1.1857e-05
1.18584e-05
1.18631e-05
1.18571e-05
1.18605e-05
1.18616e-05
1.1885e-05
1.18742e-05
1.18568e-05
1.1861e-05
1.1888e-05
1.18696e-05
1.18621e-05
1.18602e-05
1.18574e-05
1.18581e-05
1.18567e-05
1.18669e-05
1.18685e-05
1.18799e-05
1.18779e-05
1.18731e-05
1.18797e-05
1.18604e-05
1.18729e-05
1.18733e-05
1.19437e-05
1.19178e-05
1.18571e-05
1.18631e-05
1.18663e-05
1.1871e-05
1.18706e-05
1.18606e-05
1.18616e-05
1.18668e-05
1.18616e-05
1.18588e-05
1.18654e-05
1.18637e-05
1.18678e-05
1.18761e-05
1.18567e-05
1.18605e-05
1.18628e-05
1.18607e-05
1.18751e-05
1.18589e-05
1.18566e-05
1.18589e-05
1.18606e-05
1.18563e-05
1.18854e-05
1.19048e-05
1.18793e-05
1.18981e-05
1.18798e-05
1.18662e-05
1.18571e-05
1.18678e-05
1.18631e-05
1.18573e-05
1.18591e-05
1.18565e-05
1.18579e-05
1.18568e-05
1.18588e-05
1.18581e-05
1.18569e-05
1.1876e-05
1.18769e-05
1.18566e-05
1.18567e-05
1.18693e-05
1.18853e-05
1.18902e-05
1.18944e-05
1.1881e-05
1.18567e-05
1.18581e-05
1.18564e-05
1.18581e-05
1.18567e-05
1.18595e-05
1.18689e-05
1.18835e-05
1.1884e-05
1.18869e-05
1.18709e-05
1.1867e-05
1.18643e-05
1.18898e-05
1.18726e-05
1.18768e-05
1.1877e-05
1.18831e-05
1.18751e-05
1.18652e-05
1.18928e-05
1.18683e-05
1.18743e-05
1.18943e-05
1.18556e-05
1.18965e-05
1.18575e-05
1.18762e-05
1.18636e-05
1.1856e-05
1.18573e-05
1.18666e-05
1.18594e-05
1.18577e-05
1.18612e-05
1.18564e-05
1.1857e-05
1.18567e-05
1.18651e-05
1.18569e-05
1.18572e-05
1.18575e-05
1.18618e-05
1.18569e-05
1.18571e-05
1.18752e-05
1.18617e-05
1.18561e-05
1.18646e-05
1.18667e-05
1.18673e-05
1.18621e-05
1.18571e-05
1.18588e-05
1.18564e-05
1.1868e-05
1.18749e-05
1.18566e-05
1.18567e-05
1.18598e-05
1.1862e-05
1.1863e-05
1.18615e-05
1.18705e-05
1.18676e-05
1.18582e-05
1.18604e-05
1.18594e-05
1.1859e-05
1.186e-05
1.18577e-05
1.19411e-05
1.1888e-05
1.18899e-05
1.18681e-05
1.18585e-05
1.18573e-05
1.18605e-05
1.18597e-05
1.18574e-05
1.18611e-05
1.18757e-05
1.18894e-05
1.18608e-05
1.18646e-05
1.18839e-05
1.18928e-05
1.18967e-05
1.18795e-05
1.18773e-05
1.18763e-05
1.19108e-05
1.19342e-05
1.18956e-05
1.19044e-05
1.18766e-05
1.18571e-05
1.18747e-05
1.18693e-05
1.18943e-05
1.19021e-05
1.18607e-05
1.18662e-05
1.18653e-05
1.18695e-05
2.53573e-05
2.28446e-05
2.80997e-05
2.39949e-05
1.49756e-05
1.28524e-05
1.42072e-05
1.3252e-05
1.18569e-05
1.18566e-05
1.1864e-05
1.18582e-05
1.18567e-05
1.18619e-05
1.18732e-05
1.1906e-05
1.18566e-05
1.18881e-05
1.18568e-05
1.18677e-05
1.18567e-05
1.18566e-05
1.18595e-05
1.18569e-05
1.18568e-05
1.18568e-05
1.18762e-05
6.54452e-05
6.75626e-05
7.18305e-05
8.04507e-05
1.18591e-05
1.18576e-05
1.18589e-05
1.18598e-05
7.69378e-05
5.66993e-05
5.94673e-05
4.75376e-05
1.18575e-05
1.18575e-05
1.1857e-05
1.18573e-05
1.18585e-05
1.18562e-05
1.1859e-05
1.18579e-05
1.18562e-05
1.1857e-05
1.18571e-05
1.18567e-05
1.18567e-05
1.18576e-05
1.19491e-05
1.22958e-05
1.1884e-05
1.19595e-05
1.18652e-05
1.18592e-05
1.1864e-05
1.18609e-05
1.18567e-05
1.18566e-05
1.18569e-05
1.18569e-05
1.18568e-05
1.18572e-05
1.18571e-05
1.18572e-05
1.18571e-05
1.18572e-05
1.18569e-05
1.18569e-05
1.1857e-05
1.18569e-05
1.18572e-05
1.18604e-05
1.18941e-05
1.1894e-05
1.18577e-05
1.18798e-05
1.18576e-05
1.18573e-05
1.1857e-05
1.18569e-05
1.18575e-05
1.18572e-05
1.18569e-05
1.18569e-05
1.18578e-05
1.18572e-05
1.1857e-05
1.18571e-05
1.18576e-05
1.18569e-05
1.18571e-05
1.1857e-05
1.18568e-05
1.18573e-05
1.18574e-05
1.1857e-05
1.1857e-05
1.18997e-05
1.18565e-05
1.18569e-05
1.18572e-05
1.18573e-05
1.18641e-05
1.18702e-05
1.18776e-05
1.1871e-05
1.18603e-05
1.18766e-05
1.18729e-05
1.18563e-05
1.18559e-05
1.18581e-05
1.18568e-05
1.76827e-05
2.16444e-05
1.97455e-05
2.69684e-05
1.49867e-05
1.59143e-05
1.61311e-05
1.72774e-05
1.18569e-05
1.18571e-05
1.18569e-05
1.18596e-05
1.18573e-05
2.03132e-05
1.20515e-05
1.18576e-05
1.18593e-05
1.18575e-05
1.18578e-05
1.18925e-05
1.18853e-05
1.18856e-05
1.18783e-05
1.18757e-05
1.18805e-05
1.18723e-05
1.18562e-05
1.18556e-05
1.18719e-05
1.18657e-05
2.15732e-05
2.29936e-05
2.22827e-05
1.188e-05
1.1879e-05
1.18649e-05
1.18677e-05
1.18572e-05
1.18571e-05
1.1858e-05
1.18574e-05
2.97901e-05
3.52067e-05
3.388e-05
1.18939e-05
1.18703e-05
1.1857e-05
1.18566e-05
1.18934e-05
1.18571e-05
1.18569e-05
1.18572e-05
1.18571e-05
1.18568e-05
1.18567e-05
1.1861e-05
1.18759e-05
1.1864e-05
1.18562e-05
1.1879e-05
1.18772e-05
1.18639e-05
1.18559e-05
1.22176e-05
1.23521e-05
1.85361e-05
1.9453e-05
1.18781e-05
1.18879e-05
1.18808e-05
1.19074e-05
1.18578e-05
1.1857e-05
1.18568e-05
1.18574e-05
1.18568e-05
1.18568e-05
1.82143e-05
1.92081e-05
2.61438e-05
2.96775e-05
3.05915e-05
3.36178e-05
1.26448e-05
1.35639e-05
1.3352e-05
1.52093e-05
1.1857e-05
1.1857e-05
1.18583e-05
1.18576e-05
1.18588e-05
1.18585e-05
1.18602e-05
1.186e-05
1.18569e-05
1.18571e-05
1.18573e-05
1.18591e-05
1.18576e-05
1.1858e-05
1.18625e-05
1.18614e-05
1.1857e-05
1.1857e-05
1.18559e-05
1.18583e-05
1.18564e-05
1.18616e-05
1.18637e-05
1.18564e-05
1.18564e-05
1.18562e-05
1.18574e-05
1.18578e-05
2.18815e-05
1.96797e-05
1.65571e-05
1.57734e-05
1.22404e-05
1.32101e-05
1.18875e-05
1.21706e-05
1.20244e-05
1.20974e-05
1.1873e-05
1.18677e-05
1.18618e-05
1.18602e-05
1.18604e-05
1.18647e-05
1.18601e-05
1.1863e-05
1.18625e-05
1.1861e-05
1.18675e-05
1.18738e-05
1.18579e-05
1.18581e-05
1.186e-05
1.1869e-05
1.1884e-05
1.18832e-05
1.1864e-05
1.18698e-05
1.18895e-05
1.18952e-05
1.19493e-05
1.19398e-05
1.19572e-05
1.1946e-05
1.18748e-05
1.18728e-05
1.18613e-05
1.18573e-05
1.1877e-05
1.1875e-05
1.18699e-05
1.18656e-05
1.18629e-05
1.18626e-05
1.1857e-05
1.18601e-05
1.18591e-05
1.18575e-05
1.18628e-05
1.18729e-05
1.18569e-05
1.18734e-05
1.18864e-05
1.19005e-05
1.18613e-05
1.18622e-05
1.18563e-05
1.18568e-05
1.18774e-05
1.18871e-05
1.18588e-05
1.18572e-05
1.18667e-05
1.18594e-05
1.18767e-05
1.18845e-05
1.1897e-05
1.18662e-05
1.18564e-05
1.19057e-05
1.19214e-05
1.19683e-05
1.19552e-05
1.19213e-05
1.18931e-05
1.1892e-05
1.19433e-05
1.19611e-05
1.19206e-05
1.1948e-05
1.18864e-05
1.19071e-05
1.18848e-05
1.1857e-05
1.18703e-05
1.18837e-05
1.19017e-05
1.18725e-05
1.18624e-05
1.18573e-05
1.73015e-05
1.8473e-05
1.86134e-05
2.1568e-05
1.24042e-05
1.32426e-05
1.22933e-05
1.2397e-05
1.26691e-05
1.40978e-05
1.26185e-05
1.38507e-05
1.18899e-05
1.18569e-05
1.18982e-05
1.18757e-05
1.18755e-05
1.18572e-05
1.1904e-05
1.18716e-05
1.18612e-05
1.1857e-05
1.18576e-05
1.18574e-05
1.18593e-05
1.1859e-05
1.18617e-05
1.18724e-05
1.188e-05
1.18656e-05
1.187e-05
1.18602e-05
1.189e-05
1.18789e-05
1.19072e-05
1.18963e-05
1.18775e-05
1.19142e-05
1.18996e-05
1.18994e-05
1.18853e-05
1.18567e-05
1.18571e-05
1.18575e-05
1.18569e-05
1.1857e-05
1.18569e-05
1.18573e-05
1.18841e-05
1.18815e-05
1.18935e-05
1.18829e-05
1.19161e-05
1.19156e-05
1.18912e-05
1.18577e-05
1.20594e-05
1.19815e-05
1.21338e-05
1.204e-05
1.21616e-05
1.33269e-05
1.25359e-05
1.25159e-05
1.27311e-05
1.33044e-05
1.5896e-05
1.58631e-05
1.86713e-05
1.90669e-05
1.18575e-05
1.18569e-05
1.18571e-05
1.18577e-05
1.18572e-05
1.18571e-05
1.18568e-05
1.18723e-05
1.18709e-05
1.1857e-05
1.18552e-05
1.18621e-05
1.18566e-05
1.18571e-05
1.18572e-05
1.18591e-05
1.18654e-05
1.18575e-05
1.18572e-05
1.18599e-05
1.18573e-05
1.18707e-05
1.1857e-05
1.18618e-05
1.18575e-05
1.18607e-05
1.18582e-05
1.18724e-05
1.18626e-05
1.18566e-05
1.1857e-05
1.18569e-05
1.18695e-05
1.18644e-05
1.18682e-05
1.18572e-05
1.18602e-05
1.18678e-05
1.18764e-05
1.1866e-05
1.1857e-05
1.18773e-05
1.18642e-05
1.18661e-05
1.18668e-05
1.18703e-05
1.18608e-05
1.18695e-05
1.18634e-05
1.18686e-05
1.18894e-05
1.18768e-05
1.18918e-05
1.18788e-05
1.18886e-05
1.18925e-05
1.19084e-05
1.18561e-05
1.18559e-05
1.18558e-05
1.1856e-05
1.18587e-05
1.18608e-05
1.18617e-05
1.18612e-05
1.18567e-05
1.18569e-05
1.1857e-05
1.18569e-05
1.19055e-05
1.19058e-05
1.18725e-05
1.18625e-05
1.18573e-05
1.1857e-05
5.14643e-05
4.25146e-05
1.18619e-05
1.18585e-05
1.18595e-05
1.1859e-05
1.18591e-05
1.18613e-05
1.18601e-05
1.18582e-05
1.18574e-05
1.1857e-05
1.18586e-05
1.18581e-05
1.18584e-05
1.18583e-05
1.18575e-05
1.1857e-05
1.18573e-05
1.18571e-05
1.18571e-05
1.18572e-05
1.18653e-05
1.18571e-05
1.1861e-05
1.18575e-05
1.18573e-05
1.18575e-05
1.18616e-05
1.18598e-05
1.1863e-05
1.18632e-05
1.18587e-05
1.18598e-05
1.19618e-05
1.43341e-05
7.32248e-05
6.64957e-05
6.72645e-05
7.6695e-05
6.63454e-05
8.6191e-05
6.44603e-05
6.30386e-05
5.60095e-05
4.96643e-05
4.6519e-05
4.13751e-05
3.79073e-05
3.92127e-05
3.86729e-05
3.80421e-05
4.1668e-05
1.28718e-05
1.18711e-05
1.18608e-05
1.18618e-05
1.186e-05
1.1857e-05
1.18591e-05
1.18584e-05
1.1857e-05
1.18575e-05
1.18583e-05
1.18571e-05
1.18581e-05
1.18618e-05
1.18587e-05
1.18608e-05
1.18604e-05
1.26855e-05
1.18672e-05
1.18575e-05
1.18586e-05
1.18587e-05
1.18605e-05
1.18586e-05
1.1857e-05
1.18574e-05
1.18575e-05
1.1857e-05
1.1857e-05
1.18635e-05
1.18654e-05
1.18667e-05
1.18597e-05
1.18697e-05
1.23802e-05
1.18777e-05
1.18679e-05
1.18597e-05
1.18636e-05
1.18638e-05
1.18589e-05
1.18581e-05
1.18573e-05
1.18593e-05
1.18604e-05
1.18594e-05
1.18633e-05
1.1865e-05
1.18683e-05
1.18709e-05
1.18718e-05
1.21068e-05
1.18577e-05
1.18763e-05
1.18655e-05
1.18706e-05
1.186e-05
1.18594e-05
1.18587e-05
1.18576e-05
1.18593e-05
1.18637e-05
1.18581e-05
1.18608e-05
1.18574e-05
1.18607e-05
1.187e-05
1.18592e-05
1.21913e-05
1.18617e-05
1.1878e-05
1.187e-05
1.18619e-05
1.18672e-05
1.18575e-05
1.18586e-05
1.18575e-05
1.18579e-05
1.18569e-05
1.18569e-05
1.18586e-05
1.18589e-05
1.18624e-05
1.1857e-05
1.18581e-05
1.20078e-05
1.18582e-05
1.18655e-05
1.18728e-05
1.18569e-05
1.18612e-05
1.18602e-05
1.18584e-05
1.18571e-05
1.18595e-05
1.18584e-05
1.1857e-05
1.1867e-05
1.18755e-05
1.18628e-05
1.18658e-05
1.186e-05
1.21349e-05
1.18657e-05
1.18816e-05
1.18631e-05
1.18592e-05
1.18596e-05
1.18583e-05
1.18589e-05
1.18576e-05
1.1857e-05
1.18629e-05
1.18673e-05
1.18591e-05
1.18662e-05
1.18683e-05
1.18639e-05
1.1868e-05
1.26699e-05
1.1864e-05
1.18655e-05
1.18567e-05
1.1862e-05
1.18629e-05
1.18601e-05
1.18585e-05
1.18579e-05
1.18579e-05
1.18588e-05
1.18622e-05
1.18597e-05
1.18688e-05
1.18571e-05
1.18616e-05
1.18706e-05
1.28573e-05
1.18776e-05
1.18646e-05
1.18568e-05
1.1859e-05
1.18592e-05
1.18591e-05
1.18586e-05
1.18575e-05
1.18578e-05
1.18592e-05
1.18575e-05
1.18609e-05
1.18592e-05
1.18589e-05
1.18595e-05
1.18617e-05
1.40061e-05
1.19222e-05
1.18662e-05
1.18612e-05
1.18598e-05
1.18589e-05
1.186e-05
1.18586e-05
1.18575e-05
1.1857e-05
1.18602e-05
1.18617e-05
1.18621e-05
1.18662e-05
1.18591e-05
1.18583e-05
1.18575e-05
1.62948e-05
1.2085e-05
1.18701e-05
1.18609e-05
1.1857e-05
1.18635e-05
1.18599e-05
1.18595e-05
1.18579e-05
1.18619e-05
1.18572e-05
1.18594e-05
1.18621e-05
1.18629e-05
1.18647e-05
1.18608e-05
1.18574e-05
2.31818e-05
1.3034e-05
1.19341e-05
1.18677e-05
1.18624e-05
1.18613e-05
1.18638e-05
1.1863e-05
1.18582e-05
1.1857e-05
1.18613e-05
1.1871e-05
1.18711e-05
1.1864e-05
1.1861e-05
1.18606e-05
1.18622e-05
2.70073e-05
1.43144e-05
1.20847e-05
1.18708e-05
1.18738e-05
1.18616e-05
1.18596e-05
1.18604e-05
1.1858e-05
1.18601e-05
1.18699e-05
1.18851e-05
1.18622e-05
1.18673e-05
1.18667e-05
1.18594e-05
1.1857e-05
3.24727e-05
1.54276e-05
1.22878e-05
1.18915e-05
1.18721e-05
1.18816e-05
1.18717e-05
1.1865e-05
1.1857e-05
1.18637e-05
1.18763e-05
1.18834e-05
1.1861e-05
1.18604e-05
1.18684e-05
1.18591e-05
1.18612e-05
3.06869e-05
1.60914e-05
1.24346e-05
1.19148e-05
1.18591e-05
1.18704e-05
1.18721e-05
1.18571e-05
1.18587e-05
1.18627e-05
1.1857e-05
1.18645e-05
1.18667e-05
1.1863e-05
1.18631e-05
1.18588e-05
1.1857e-05
2.85572e-05
1.44176e-05
1.22513e-05
1.1885e-05
1.18613e-05
1.18586e-05
1.18596e-05
1.1874e-05
1.18583e-05
1.18653e-05
1.18646e-05
1.18731e-05
1.18568e-05
1.18667e-05
1.18637e-05
1.18612e-05
1.18588e-05
2.27639e-05
1.35151e-05
1.19954e-05
1.18736e-05
1.18586e-05
1.18663e-05
1.18603e-05
1.18604e-05
1.18606e-05
1.1857e-05
1.18642e-05
1.1875e-05
1.18588e-05
1.18635e-05
1.18569e-05
1.18621e-05
1.186e-05
2.05347e-05
1.26469e-05
1.18985e-05
1.18653e-05
1.18707e-05
1.18612e-05
1.18604e-05
1.18622e-05
1.18589e-05
1.18582e-05
1.18633e-05
1.18615e-05
1.18634e-05
1.18638e-05
1.18576e-05
1.18585e-05
1.18586e-05
1.18577e-05
4.04045e-05
1.27015e-05
1.18787e-05
1.1862e-05
1.18608e-05
1.18586e-05
1.18624e-05
1.18599e-05
1.18572e-05
1.1857e-05
1.18569e-05
1.18569e-05
1.18635e-05
1.18568e-05
1.18568e-05
1.18581e-05
1.18568e-05
1.18569e-05
1.18573e-05
1.18571e-05
1.18579e-05
1.18592e-05
1.1858e-05
1.18575e-05
1.18583e-05
1.18581e-05
1.18573e-05
1.18571e-05
1.1857e-05
1.1857e-05
1.18573e-05
1.18578e-05
1.18573e-05
1.18576e-05
1.18577e-05
1.18575e-05
1.18574e-05
1.18574e-05
3.73705e-05
1.1861e-05
1.18576e-05
1.18569e-05
1.18575e-05
1.18568e-05
1.18572e-05
1.18626e-05
1.18602e-05
1.1857e-05
1.18574e-05
1.18665e-05
1.18578e-05
1.18581e-05
1.18637e-05
1.18644e-05
1.18673e-05
1.23794e-05
8.92215e-05
8.66661e-05
9.55156e-05
9.57747e-05
9.56949e-05
9.51688e-05
9.57072e-05
9.59509e-05
9.53893e-05
9.38617e-05
9.18231e-05
8.9929e-05
8.81746e-05
8.75134e-05
8.67897e-05
8.64606e-05
8.69116e-05
8.81405e-05
8.85913e-05
4.52062e-05
1.18587e-05
1.18571e-05
4.86642e-05
1.29198e-05
1.18737e-05
1.18598e-05
1.18617e-05
1.18587e-05
1.18597e-05
1.18589e-05
1.18581e-05
1.1857e-05
1.1857e-05
1.18596e-05
1.18583e-05
1.1861e-05
1.18608e-05
1.18575e-05
1.18568e-05
1.18606e-05
1.18604e-05
1.18589e-05
1.18596e-05
1.18599e-05
1.18584e-05
1.18586e-05
1.18575e-05
1.18574e-05
1.18575e-05
1.1858e-05
1.1857e-05
1.18572e-05
1.18575e-05
1.18574e-05
1.1857e-05
1.1857e-05
1.1857e-05
1.18569e-05
1.18571e-05
1.18583e-05
1.18589e-05
1.18574e-05
1.18585e-05
1.18587e-05
1.18585e-05
1.18578e-05
1.1861e-05
1.18581e-05
1.18661e-05
1.18599e-05
1.18609e-05
1.18648e-05
1.19461e-05
1.39705e-05
6.75823e-05
6.46117e-05
6.77569e-05
7.17292e-05
7.11254e-05
7.22347e-05
7.04992e-05
6.40969e-05
5.61826e-05
4.65142e-05
5.11275e-05
3.73617e-05
3.65619e-05
4.31531e-05
3.68069e-05
3.89627e-05
4.80612e-05
1.18781e-05
1.1867e-05
1.18778e-05
1.18656e-05
1.1857e-05
1.18583e-05
1.1857e-05
1.1857e-05
1.18573e-05
1.18589e-05
1.18585e-05
1.18607e-05
1.18591e-05
1.18608e-05
1.18655e-05
1.18747e-05
1.25747e-05
1.18673e-05
1.18604e-05
1.18731e-05
1.18615e-05
1.18605e-05
1.18702e-05
1.18617e-05
1.1861e-05
1.1857e-05
1.1857e-05
1.18599e-05
1.1857e-05
1.18616e-05
1.18634e-05
1.18609e-05
1.18632e-05
1.25701e-05
1.18752e-05
1.1857e-05
1.18662e-05
1.18666e-05
1.18645e-05
1.18612e-05
1.18574e-05
1.18596e-05
1.18587e-05
1.18577e-05
1.18603e-05
1.18582e-05
1.18775e-05
1.18633e-05
1.18946e-05
1.1857e-05
1.20953e-05
1.18646e-05
1.18761e-05
1.18619e-05
1.18682e-05
1.18689e-05
1.18653e-05
1.18579e-05
1.18593e-05
1.18578e-05
1.18587e-05
1.18601e-05
1.18631e-05
1.18699e-05
1.18615e-05
1.18718e-05
1.18714e-05
1.2194e-05
1.1867e-05
1.18714e-05
1.18666e-05
1.18772e-05
1.18665e-05
1.18591e-05
1.18595e-05
1.1857e-05
1.18573e-05
1.18585e-05
1.18589e-05
1.18611e-05
1.18624e-05
1.18687e-05
1.18653e-05
1.18735e-05
1.21193e-05
1.18622e-05
1.1864e-05
1.18614e-05
1.1862e-05
1.18745e-05
1.18595e-05
1.18575e-05
1.1859e-05
1.18584e-05
1.1857e-05
1.18586e-05
1.18615e-05
1.18597e-05
1.18585e-05
1.18801e-05
1.18719e-05
1.21806e-05
1.1862e-05
1.18666e-05
1.18691e-05
1.18665e-05
1.18685e-05
1.18647e-05
1.186e-05
1.1858e-05
1.18572e-05
1.18599e-05
1.18569e-05
1.18569e-05
1.18569e-05
1.1871e-05
1.18693e-05
1.18632e-05
1.26411e-05
1.18599e-05
1.18613e-05
1.18624e-05
1.18601e-05
1.18609e-05
1.18632e-05
1.18591e-05
1.1857e-05
1.18575e-05
1.18582e-05
1.18578e-05
1.18571e-05
1.18638e-05
1.18632e-05
1.18655e-05
1.18734e-05
1.28183e-05
1.18575e-05
1.18589e-05
1.18598e-05
1.1857e-05
1.18584e-05
1.1857e-05
1.18604e-05
1.1857e-05
1.18573e-05
1.18591e-05
1.18595e-05
1.18668e-05
1.18605e-05
1.18572e-05
1.18587e-05
1.1932e-05
1.40371e-05
1.18583e-05
1.18575e-05
1.18588e-05
1.18624e-05
1.1861e-05
1.18593e-05
1.18598e-05
1.18625e-05
1.18572e-05
1.18604e-05
1.18612e-05
1.18627e-05
1.18646e-05
1.1865e-05
1.18891e-05
1.2136e-05
1.65679e-05
1.1861e-05
1.18572e-05
1.18631e-05
1.18724e-05
1.18736e-05
1.1861e-05
1.18679e-05
1.18592e-05
1.18579e-05
1.1863e-05
1.18679e-05
1.18647e-05
1.18661e-05
1.18735e-05
1.19455e-05
1.3113e-05
2.14064e-05
1.18601e-05
1.18612e-05
1.18647e-05
1.18694e-05
1.18709e-05
1.1913e-05
1.1857e-05
1.1857e-05
1.18572e-05
1.18723e-05
1.1869e-05
1.18769e-05
1.18715e-05
1.18713e-05
1.21139e-05
1.44292e-05
2.81423e-05
1.18594e-05
1.18593e-05
1.18601e-05
1.18692e-05
1.1865e-05
1.1857e-05
1.18615e-05
1.1857e-05
1.1859e-05
1.18619e-05
1.18735e-05
1.1883e-05
1.18682e-05
1.19116e-05
1.2248e-05
1.56535e-05
3.16469e-05
1.18589e-05
1.18608e-05
1.18649e-05
1.18765e-05
1.18627e-05
1.18802e-05
1.1857e-05
1.18571e-05
1.18607e-05
1.18726e-05
1.1871e-05
1.18618e-05
1.18747e-05
1.18884e-05
1.26137e-05
1.55281e-05
3.13559e-05
1.1859e-05
1.18606e-05
1.18626e-05
1.18683e-05
1.18677e-05
1.1857e-05
1.18611e-05
1.1857e-05
1.18576e-05
1.18569e-05
1.18627e-05
1.18652e-05
1.18658e-05
1.18858e-05
1.21892e-05
1.45978e-05
2.96865e-05
1.18582e-05
1.18642e-05
1.18662e-05
1.18705e-05
1.18674e-05
1.18692e-05
1.18636e-05
1.18634e-05
1.18578e-05
1.18598e-05
1.1857e-05
1.18606e-05
1.1857e-05
1.18698e-05
1.2027e-05
1.35793e-05
2.27683e-05
1.18589e-05
1.18627e-05
1.18646e-05
1.18602e-05
1.18568e-05
1.18679e-05
1.18688e-05
1.18613e-05
1.18584e-05
1.18625e-05
1.1857e-05
1.1862e-05
1.1868e-05
1.18639e-05
1.19052e-05
1.25492e-05
1.98056e-05
)
;
boundaryField
{
sides
{
type calculated;
value uniform 1.1857e-05;
}
top
{
type calculated;
value uniform 1.1857e-05;
}
outlet
{
type calculated;
value uniform 1.1857e-05;
}
bottom
{
type calculated;
value uniform 1.1857e-05;
}
inlet
{
type calculated;
value uniform 0.00011857;
}
}
// ************************************************************************* //
| [
"thomasdigiusto@me.com"
] | thomasdigiusto@me.com | |
856a436bb41ea9ab6f4e27217b8001db3f696415 | f97b1fe262bab9f88a4fe7bab7ceb37c6919a622 | /prelab6.cpp | 94e9cbcb73dc0f19170d50bf50dc3b54e20c2e6c | [] | no_license | daiseyj15/1428CS1 | 9e46d9975f8f60ef9ffa002d48b806b03dbdc0db | abea47e069ce228bba26a9edfc658923cfde40ef | refs/heads/master | 2020-11-28T14:52:42.564094 | 2019-12-24T14:35:46 | 2019-12-24T14:35:46 | 229,850,626 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 914 | cpp | // Finish the following program which adds up all integers from 0 to
// the user's given number inclusively using a While Loop. The total should be
// assigned to the variable 'total'.
#include <iostream>
using namespace std;
int main()
{
int number;
int total = 0;
int counter = 0; //initialize the variable
// user enters a number
cout << "Enter a positive integer to find the summation of ";
cout << "all numbers from 0 to the given number up to 100." << endl;
cin >> number;
// check for invalid user input
if (number < 1 || number > 100)
{
cout << "Invalid Input" << endl;
return -1; // terminate program
}
while(counter <= number)
{
total+=counter;
counter++;
}
// TODO - add your code here.
// hint: increment a counter variable inside the loop.
cout << "Your total is :" << total;
return 0;
}
| [
"noreply@github.com"
] | daiseyj15.noreply@github.com |
3365e1d0fe801fa82ffd9ca1480440569bbf6f5d | 551f7aa91cfa02d357ff413e99627a072668713a | /Google Kickstart/KS19Gb.cpp | 0dd73d303dedb35fbea70c2bf525ff171d56e3b2 | [
"MIT"
] | permissive | anubhawbhalotia/Competitive-Programming | 4ca865ca6f01a40d04e4d1f68b67964d86fd27f6 | 32d7003abf9af4999b3dfa78fe1df9022ebbf50b | refs/heads/master | 2021-07-18T23:26:16.922797 | 2021-06-10T08:33:13 | 2021-06-10T08:33:13 | 108,657,229 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 3,217 | cpp | #include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <functional>
#include <bits/stdc++.h>
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<vector<int>> vvi;
typedef vector<vector<long long>> vvl;
typedef pair<int,int> pii;
typedef pair<long long ,long long> pll;
typedef set<int> si;
typedef set<long long> sl;
typedef unordered_set <int> usi;
typedef unordered_set <long long> usl;
typedef multiset<int> msi;
typedef multiset<long long> msl;
template <typename T>
using indexed_set = tree<T, null_type, less<T>,
rb_tree_tag, tree_order_statistics_node_update>;
// order_of_key: The number of items in a set that are strictly smaller than k
// find_by_order: It returns an iterator to the ith largest element
//Anubhaw Bhalotia https://github.com/anubhawbhalotia
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define beg(x) x.begin()
#define en(x) x.end()
#define all(x) x.begin(), x.end()
#define f(i,s,n) for(int i=s;i<n;i++)
#define fe(i,s,n) for(int i=s;i<=n;i++)
#define fr(i,s,n) for(int i=s;i>n;i--)
#define fre(i,s,n) for(int i=s;i>=n;i--)
const int MOD = 998244353;
template <typename T,typename U, typename V,typename W>
auto operator+=(const pair<T,U> & l, pair<V,W> & r)
-> pair<decltype(l.first+r.first),decltype(l.second+r.second)>
{
return {l.first+r.first,l.second+r.second};
}
template <typename T,typename U, typename V,typename W>
auto operator+(const pair<T,U> & l, pair<V,W> & r)
-> pair<decltype(l.first+r.first),decltype(l.second+r.second)>
{
return {l.first+r.first,l.second+r.second};
}
template <typename T> T gcd(T a, T b) {return b == 0 ? a : gcd(b, a % b);}
string getBinary(ll n)
{
int counter = 0;
string temp = "";
while(n)
{
temp += ((n % (ll)2) + 48);
n /= (ll)2;
counter++;
}
while(counter++ < 54)
{
temp += '0';
}
return temp;
}
ll solution(int t)
{
int n;
ll m, a;
cin>>n>>m;
vector <string> b;
f(i, 0, n)
{
cin>>a;
b.pb(getBinary(a));
}
vl minVal(54);
ll val = 1;
vi count;
f(i, 0, 54)
{
int c = 0;
f(j, 0, n)
{
c += (b[j][i] - 48);
}
count.pb(c);
c = min(c, n - c);
minVal[i] = val * c;
val *= 2;
}
val /= 2; // val = 2^53
vl pref(54, 0);
f(i, 1, 54)
{
pref[i] += (pref[i - 1] + minVal[i - 1]);
}
ll k = 0;
fre(i, 53, 0)
{
ll temp1 = ((n - count[i]) * val); //flip
ll temp2 = (count[i] * val); //not flip
if(temp1 + pref[i] <= m)
{
k += val;
m -= temp1;
}
else if(temp2 + pref[i] <= m)
{
m -= temp2;
}
else
{
return -1;
}
val /= 2;
}
return k;
}
void testCase()
{
int t = 1;
cin>>t;
f(i, 0, t)
{
cout<<"Case #"<<i+1<<": "<<solution(i + 1)<<endl;
}
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
testCase();
}
| [
"bhalotia.anubhaw4@gmail.com"
] | bhalotia.anubhaw4@gmail.com |
a839080f0c2fb3a5308c9d347e9f0fb624f6390a | 179d722579767cbe2e05ba4539180b6294a79a90 | /order.h | b680086d02e18b1314f81c8eeacd512ddb136ceb | [] | no_license | d4niilm1ronov/andrey-kursach | 2b26dac250571261716d98c8b0d5d20e18f931f8 | 3802ab9b610cd33121f6224dadf47b0a93ab753f | refs/heads/master | 2023-01-20T17:20:06.438383 | 2020-11-27T11:28:57 | 2020-11-27T11:28:57 | 316,471,478 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 560 | h | #ifndef ORDER_H
#define ORDER_H
#include <QDialog>
#include<QtSql>
#include <QtDebug>
#include<QFileInfo>
#include "stocks.h"
namespace Ui {
class order;
}
class order : public QDialog
{
Q_OBJECT
public:
explicit order(QWidget *parent = nullptr);
~order();
private slots:
void on_pushButton_clicked();
void on_pushButton_oentry_clicked();
void on_pushButton_2_clicked();
void on_pushButton_dentry_clicked();
void on_pushButton_search_clicked();
private:
Ui::order *ui;
QSqlDatabase mydb1;
};
#endif // ORDER_H
| [
"41535107+d4niilm1ronov@users.noreply.github.com"
] | 41535107+d4niilm1ronov@users.noreply.github.com |
69c98980e9a7b4a108de1c6031fa641b20eae34e | 9d2bafb07baf657c447d09a6bc5a6e551ba1806d | /ros2_ws/build/rcl_interfaces/rosidl_typesupport_introspection_cpp/rcl_interfaces/srv/describe_parameters__type_support.cpp | 49c8df6ea71502fb820a0572188c4f5789dff960 | [] | no_license | weidafan/ros2_dds | f65c4352899a72e1ade662b4106e822d80a99403 | c0d9e6ff97cb7cc822fe25a62c0b1d56f7d12c59 | refs/heads/master | 2021-09-05T20:47:49.088161 | 2018-01-30T21:03:59 | 2018-01-30T21:03:59 | 119,592,597 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,140 | cpp | // generated from rosidl_typesupport_introspection_cpp/resource/srv__type_support.cpp.em
// generated code does not contain a copyright notice
#include <rosidl_generator_c/service_type_support.h>
#include <rosidl_typesupport_cpp/message_type_support.hpp>
#include <rosidl_typesupport_cpp/service_type_support.hpp>
#include "rosidl_typesupport_interface/macros.h"
#include "rosidl_typesupport_introspection_cpp/visibility_control.h"
#include "rcl_interfaces/srv/describe_parameters__struct.hpp"
#include "rosidl_typesupport_introspection_cpp/identifier.hpp"
#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp"
#include "rosidl_typesupport_introspection_cpp/service_introspection.hpp"
#include "rosidl_typesupport_introspection_cpp/service_type_support_decl.hpp"
#include "rcl_interfaces/srv/describe_parameters__request__struct.hpp"
#include "rcl_interfaces/srv/describe_parameters__response__struct.hpp"
namespace rcl_interfaces
{
namespace srv
{
namespace rosidl_typesupport_introspection_cpp
{
// this is intentionally not const to allow initialization later to prevent an initialization race
static ::rosidl_typesupport_introspection_cpp::ServiceMembers DescribeParameters_service_members = {
"rcl_interfaces", // package name
"DescribeParameters", // service name
// these two fields are initialized below on the first access
// see get_service_type_support_handle<rcl_interfaces::DescribeParameters>()
nullptr, // request message
nullptr // response message
};
static const rosidl_service_type_support_t DescribeParameters_service_type_support_handle = {
::rosidl_typesupport_introspection_cpp::typesupport_identifier,
&DescribeParameters_service_members,
get_service_typesupport_handle_function,
};
} // namespace rosidl_typesupport_introspection_cpp
} // namespace srv
} // namespace rcl_interfaces
namespace rosidl_typesupport_introspection_cpp
{
template<>
ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC
const rosidl_service_type_support_t *
get_service_type_support_handle<rcl_interfaces::srv::DescribeParameters>()
{
// get a handle to the value to be returned
auto service_type_support =
&::rcl_interfaces::srv::rosidl_typesupport_introspection_cpp::DescribeParameters_service_type_support_handle;
// get a non-const and properly typed version of the data void *
auto service_members = const_cast<::rosidl_typesupport_introspection_cpp::ServiceMembers *>(
static_cast<const ::rosidl_typesupport_introspection_cpp::ServiceMembers *>(
service_type_support->data));
// make sure that both the request_members_ and the response_members_ are initialized
// if they are not, initialize them
if (
service_members->request_members_ == nullptr ||
service_members->response_members_ == nullptr)
{
// initialize the request_members_ with the static function from the external library
service_members->request_members_ = static_cast<
const ::rosidl_typesupport_introspection_cpp::MessageMembers *
>(
::rosidl_typesupport_introspection_cpp::get_message_type_support_handle<
::rcl_interfaces::srv::DescribeParameters_Request
>()->data
);
// initialize the response_members_ with the static function from the external library
service_members->response_members_ = static_cast<
const ::rosidl_typesupport_introspection_cpp::MessageMembers *
>(
::rosidl_typesupport_introspection_cpp::get_message_type_support_handle<
::rcl_interfaces::srv::DescribeParameters_Response
>()->data
);
}
// finally return the properly initialized service_type_support handle
return service_type_support;
}
} // namespace rosidl_typesupport_introspection_cpp
#ifdef __cplusplus
extern "C"
{
#endif
ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC
const rosidl_service_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, rcl_interfaces, DescribeParameters)() {
return ::rosidl_typesupport_introspection_cpp::get_service_type_support_handle<rcl_interfaces::srv::DescribeParameters>();
}
#ifdef __cplusplus
}
#endif
| [
"austin.tisdale.15@cnu.edu"
] | austin.tisdale.15@cnu.edu |
45813c4692089ffa8cc4a46604f94122749040a8 | 96788ab0d17cd1280b70674c8d6a4f8b90438cea | /linux ELF build/linuxopenmusic.build/module.chardet.cp949prober.cpp | 81cf52c8065b4c976f6e7ec06a839bd31ed70aab | [
"Apache-2.0"
] | permissive | mesmerx/linuxopenmusic | 5d0ad9cc4d905565ba37225df947c64804bd718c | c45e23b9db99c8624de5699d800b6cc6de72c2b9 | refs/heads/master | 2021-01-10T07:33:13.751377 | 2017-11-01T02:29:50 | 2017-11-01T02:29:50 | 55,714,761 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 51,509 | cpp | // Generated code for Python source for module 'chardet.cp949prober'
// created by Nuitka version 0.5.20
// This code is in part copyright 2016 Kay Hayen.
//
// 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 "nuitka/prelude.hpp"
#include "__helpers.hpp"
// The _module_chardet$cp949prober is a Python object pointer of module type.
// Note: For full compatibility with CPython, every module variable access
// needs to go through it except for cases where the module cannot possibly
// have changed in the mean time.
PyObject *module_chardet$cp949prober;
PyDictObject *moduledict_chardet$cp949prober;
// The module constants used
extern PyObject *const_str_plain__mCodingSM;
extern PyObject *const_str_plain___module__;
extern PyObject *const_str_plain_metaclass;
extern PyObject *const_str_plain___package__;
extern PyObject *const_tuple_str_plain_MultiByteCharSetProber_tuple;
extern PyObject *const_str_plain_mbcssm;
extern PyObject *const_str_plain___qualname__;
extern PyObject *const_int_pos_1;
extern PyObject *const_dict_empty;
extern PyObject *const_str_plain___file__;
extern PyObject *const_tuple_str_plain_EUCKRDistributionAnalysis_tuple;
extern PyObject *const_str_plain___cached__;
extern PyObject *const_str_plain_CP949Prober;
extern PyObject *const_str_plain_get_charset_name;
extern PyObject *const_str_plain_mbcharsetprober;
extern PyObject *const_int_0;
extern PyObject *const_str_plain_MultiByteCharSetProber;
extern PyObject *const_str_digest_2ce6ea2b59384b13e6f505494b1c5d22;
extern PyObject *const_tuple_str_plain_self_tuple;
extern PyObject *const_str_plain___prepare__;
extern PyObject *const_str_plain___init__;
extern PyObject *const_str_plain__mDistributionAnalyzer;
static PyObject *const_str_digest_f25d8dc80a72869f450ccf628ebe8329;
extern PyObject *const_str_plain_CP949;
extern PyObject *const_str_plain_reset;
extern PyObject *const_str_plain_self;
extern PyObject *const_str_plain_CodingStateMachine;
static PyObject *const_str_digest_c6146fb5804520439dbd0cb5e9733b76;
extern PyObject *const_tuple_empty;
extern PyObject *const_str_digest_296e986b6b574dce12df8173c41a2bdd;
extern PyObject *const_str_plain_CP949SMModel;
extern PyObject *const_tuple_str_plain_CodingStateMachine_tuple;
extern PyObject *const_str_plain_cp949prober;
extern PyObject *const_str_plain_EUCKRDistributionAnalysis;
extern PyObject *const_str_plain_chardistribution;
extern PyObject *const_tuple_str_plain_CP949SMModel_tuple;
extern PyObject *const_str_plain_chardet;
extern PyObject *const_str_plain_type;
extern PyObject *const_str_plain___loader__;
extern PyObject *const_str_plain___doc__;
extern PyObject *const_str_plain_codingstatemachine;
extern PyObject *const_str_plain___class__;
static PyObject *module_filename_obj;
static bool constants_created = false;
static void createModuleConstants( void )
{
const_str_digest_f25d8dc80a72869f450ccf628ebe8329 = UNSTREAM_STRING( &constant_bin[ 116901 ], 55, 0 );
const_str_digest_c6146fb5804520439dbd0cb5e9733b76 = UNSTREAM_STRING( &constant_bin[ 116956 ], 19, 0 );
constants_created = true;
}
#ifndef __NUITKA_NO_ASSERT__
void checkModuleConstants_chardet$cp949prober( void )
{
// The module may not have been used at all.
if (constants_created == false) return;
}
#endif
// The module code objects.
static PyCodeObject *codeobj_65415632cb468247e07e00ab044c6b65;
static PyCodeObject *codeobj_f69f3c656be44e7c77430f880e7120ce;
static PyCodeObject *codeobj_6bf806c1e61866efb7802b41f2bfdd31;
static void createModuleCodeObjects(void)
{
module_filename_obj = const_str_digest_f25d8dc80a72869f450ccf628ebe8329;
codeobj_65415632cb468247e07e00ab044c6b65 = MAKE_CODEOBJ( module_filename_obj, const_str_plain___init__, 35, const_tuple_str_plain_self_tuple, 1, 0, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE );
codeobj_f69f3c656be44e7c77430f880e7120ce = MAKE_CODEOBJ( module_filename_obj, const_str_plain_cp949prober, 1, const_tuple_empty, 0, 0, CO_NOFREE );
codeobj_6bf806c1e61866efb7802b41f2bfdd31 = MAKE_CODEOBJ( module_filename_obj, const_str_plain_get_charset_name, 43, const_tuple_str_plain_self_tuple, 1, 0, CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE );
}
// The module function declarations.
NUITKA_LOCAL_MODULE PyObject *impl_class_1_CP949Prober_of_chardet$cp949prober( PyObject **python_pars, PyObject *&closure_chardet$cp949prober_class_creation_1__bases, PyObject *&closure_chardet$cp949prober_class_creation_1__class_decl_dict, PyObject *&closure_chardet$cp949prober_class_creation_1__metaclass, PyObject *&closure_chardet$cp949prober_class_creation_1__prepared );
static PyObject *MAKE_FUNCTION_function_1___init___of_class_1_CP949Prober_of_chardet$cp949prober( );
static PyObject *MAKE_FUNCTION_function_2_get_charset_name_of_class_1_CP949Prober_of_chardet$cp949prober( );
// The module function definitions.
NUITKA_LOCAL_MODULE PyObject *impl_class_1_CP949Prober_of_chardet$cp949prober( PyObject **python_pars, PyObject *&closure_chardet$cp949prober_class_creation_1__bases, PyObject *&closure_chardet$cp949prober_class_creation_1__class_decl_dict, PyObject *&closure_chardet$cp949prober_class_creation_1__metaclass, PyObject *&closure_chardet$cp949prober_class_creation_1__prepared )
{
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
assert(!had_error); // Do not enter inlined functions with error set.
#endif
// Local variable declarations.
// Locals dictionary setup.
PyObject *locals_dict = PyDict_New();
PyObject *var___class__ = NULL;
PyObject *var___module__ = NULL;
PyObject *var___qualname__ = NULL;
PyObject *var___init__ = NULL;
PyObject *var_get_charset_name = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *tmp_args_name_1;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_called_name_1;
PyObject *tmp_kw_name_1;
bool tmp_result;
PyObject *tmp_return_value;
PyObject *tmp_set_locals;
PyObject *tmp_tuple_element_1;
tmp_return_value = NULL;
// Actual function code.
tmp_set_locals = closure_chardet$cp949prober_class_creation_1__prepared;
Py_DECREF(locals_dict);
locals_dict = tmp_set_locals;
Py_INCREF(locals_dict);
tmp_assign_source_1 = const_str_digest_c6146fb5804520439dbd0cb5e9733b76;
assert( var___module__ == NULL );
Py_INCREF( tmp_assign_source_1 );
var___module__ = tmp_assign_source_1;
tmp_assign_source_2 = const_str_plain_CP949Prober;
assert( var___qualname__ == NULL );
Py_INCREF( tmp_assign_source_2 );
var___qualname__ = tmp_assign_source_2;
tmp_assign_source_3 = MAKE_FUNCTION_function_1___init___of_class_1_CP949Prober_of_chardet$cp949prober( );
assert( var___init__ == NULL );
var___init__ = tmp_assign_source_3;
tmp_assign_source_4 = MAKE_FUNCTION_function_2_get_charset_name_of_class_1_CP949Prober_of_chardet$cp949prober( );
assert( var_get_charset_name == NULL );
var_get_charset_name = tmp_assign_source_4;
// Tried code:
tmp_called_name_1 = closure_chardet$cp949prober_class_creation_1__metaclass;
tmp_args_name_1 = PyTuple_New( 3 );
tmp_tuple_element_1 = const_str_plain_CP949Prober;
Py_INCREF( tmp_tuple_element_1 );
PyTuple_SET_ITEM( tmp_args_name_1, 0, tmp_tuple_element_1 );
tmp_tuple_element_1 = closure_chardet$cp949prober_class_creation_1__bases;
Py_INCREF( tmp_tuple_element_1 );
PyTuple_SET_ITEM( tmp_args_name_1, 1, tmp_tuple_element_1 );
tmp_tuple_element_1 = locals_dict;
Py_INCREF( locals_dict );
tmp_result = MAPPING_SYNC_FROM_VARIABLE( tmp_tuple_element_1, const_str_plain___class__, var___class__ );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_args_name_1 );
goto try_except_handler_1;
}
tmp_result = MAPPING_SYNC_FROM_VARIABLE( tmp_tuple_element_1, const_str_plain___module__, var___module__ );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_args_name_1 );
goto try_except_handler_1;
}
tmp_result = MAPPING_SYNC_FROM_VARIABLE( tmp_tuple_element_1, const_str_plain___qualname__, var___qualname__ );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_args_name_1 );
goto try_except_handler_1;
}
tmp_result = MAPPING_SYNC_FROM_VARIABLE( tmp_tuple_element_1, const_str_plain___init__, var___init__ );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_args_name_1 );
goto try_except_handler_1;
}
tmp_result = MAPPING_SYNC_FROM_VARIABLE( tmp_tuple_element_1, const_str_plain_get_charset_name, var_get_charset_name );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_args_name_1 );
goto try_except_handler_1;
}
PyTuple_SET_ITEM( tmp_args_name_1, 2, tmp_tuple_element_1 );
tmp_kw_name_1 = closure_chardet$cp949prober_class_creation_1__class_decl_dict;
tmp_assign_source_5 = CALL_FUNCTION( tmp_called_name_1, tmp_args_name_1, tmp_kw_name_1 );
Py_DECREF( tmp_args_name_1 );
if ( tmp_assign_source_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
goto try_except_handler_1;
}
assert( var___class__ == NULL );
var___class__ = tmp_assign_source_5;
tmp_return_value = var___class__;
Py_INCREF( tmp_return_value );
goto try_return_handler_1;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( class_1_CP949Prober_of_chardet$cp949prober );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)var___class__ );
Py_DECREF( var___class__ );
var___class__ = NULL;
Py_XDECREF( var___module__ );
var___module__ = NULL;
Py_XDECREF( var___qualname__ );
var___qualname__ = NULL;
Py_XDECREF( var___init__ );
var___init__ = NULL;
Py_XDECREF( var_get_charset_name );
var_get_charset_name = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( var___module__ );
var___module__ = NULL;
Py_XDECREF( var___qualname__ );
var___qualname__ = NULL;
Py_XDECREF( var___init__ );
var___init__ = NULL;
Py_XDECREF( var_get_charset_name );
var_get_charset_name = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( class_1_CP949Prober_of_chardet$cp949prober );
return NULL;
function_exception_exit:
Py_DECREF( locals_dict );
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
Py_DECREF( locals_dict );
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_function_1___init___of_class_1_CP949Prober_of_chardet$cp949prober( Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_self = python_pars[ 0 ];
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *tmp_args_element_name_1;
PyObject *tmp_args_element_name_2;
PyObject *tmp_assattr_name_1;
PyObject *tmp_assattr_name_2;
PyObject *tmp_assattr_target_1;
PyObject *tmp_assattr_target_2;
PyObject *tmp_called_name_1;
PyObject *tmp_called_name_2;
PyObject *tmp_called_name_3;
PyObject *tmp_called_name_4;
PyObject *tmp_frame_locals;
bool tmp_result;
PyObject *tmp_return_value;
PyObject *tmp_source_name_1;
PyObject *tmp_source_name_2;
NUITKA_MAY_BE_UNUSED PyObject *tmp_unused;
static PyFrameObject *cache_frame_function = NULL;
PyFrameObject *frame_function;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
MAKE_OR_REUSE_FRAME( cache_frame_function, codeobj_65415632cb468247e07e00ab044c6b65, module_chardet$cp949prober );
frame_function = cache_frame_function;
// Push the new frame as the currently active one.
pushFrameStack( frame_function );
// Mark the frame object as in use, ref count 1 will be up for reuse.
Py_INCREF( frame_function );
assert( Py_REFCNT( frame_function ) == 2 ); // Frame stack
#if PYTHON_VERSION >= 340
frame_function->f_executing += 1;
#endif
// Framed code:
tmp_source_name_1 = GET_STRING_DICT_VALUE( moduledict_chardet$cp949prober, (Nuitka_StringObject *)const_str_plain_MultiByteCharSetProber );
if (unlikely( tmp_source_name_1 == NULL ))
{
tmp_source_name_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_MultiByteCharSetProber );
}
if ( tmp_source_name_1 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "MultiByteCharSetProber" );
exception_tb = NULL;
NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
CHAIN_EXCEPTION( exception_value );
exception_lineno = 36;
goto frame_exception_exit_1;
}
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain___init__ );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 36;
goto frame_exception_exit_1;
}
tmp_args_element_name_1 = par_self;
frame_function->f_lineno = 36;
{
PyObject *call_args[] = { tmp_args_element_name_1 };
tmp_unused = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_1, call_args );
}
Py_DECREF( tmp_called_name_1 );
if ( tmp_unused == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 36;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_unused );
tmp_called_name_2 = GET_STRING_DICT_VALUE( moduledict_chardet$cp949prober, (Nuitka_StringObject *)const_str_plain_CodingStateMachine );
if (unlikely( tmp_called_name_2 == NULL ))
{
tmp_called_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_CodingStateMachine );
}
if ( tmp_called_name_2 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "CodingStateMachine" );
exception_tb = NULL;
NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
CHAIN_EXCEPTION( exception_value );
exception_lineno = 37;
goto frame_exception_exit_1;
}
tmp_args_element_name_2 = GET_STRING_DICT_VALUE( moduledict_chardet$cp949prober, (Nuitka_StringObject *)const_str_plain_CP949SMModel );
if (unlikely( tmp_args_element_name_2 == NULL ))
{
tmp_args_element_name_2 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_CP949SMModel );
}
if ( tmp_args_element_name_2 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "CP949SMModel" );
exception_tb = NULL;
NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
CHAIN_EXCEPTION( exception_value );
exception_lineno = 37;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 37;
{
PyObject *call_args[] = { tmp_args_element_name_2 };
tmp_assattr_name_1 = CALL_FUNCTION_WITH_ARGS1( tmp_called_name_2, call_args );
}
if ( tmp_assattr_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 37;
goto frame_exception_exit_1;
}
tmp_assattr_target_1 = par_self;
if ( tmp_assattr_target_1 == NULL )
{
Py_DECREF( tmp_assattr_name_1 );
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyUnicode_FromFormat( "local variable '%s' referenced before assignment", "self" );
exception_tb = NULL;
NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
CHAIN_EXCEPTION( exception_value );
exception_lineno = 37;
goto frame_exception_exit_1;
}
tmp_result = SET_ATTRIBUTE( tmp_assattr_target_1, const_str_plain__mCodingSM, tmp_assattr_name_1 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_assattr_name_1 );
exception_lineno = 37;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_assattr_name_1 );
tmp_called_name_3 = GET_STRING_DICT_VALUE( moduledict_chardet$cp949prober, (Nuitka_StringObject *)const_str_plain_EUCKRDistributionAnalysis );
if (unlikely( tmp_called_name_3 == NULL ))
{
tmp_called_name_3 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_EUCKRDistributionAnalysis );
}
if ( tmp_called_name_3 == NULL )
{
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "EUCKRDistributionAnalysis" );
exception_tb = NULL;
NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
CHAIN_EXCEPTION( exception_value );
exception_lineno = 40;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 40;
tmp_assattr_name_2 = CALL_FUNCTION_NO_ARGS( tmp_called_name_3 );
if ( tmp_assattr_name_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 40;
goto frame_exception_exit_1;
}
tmp_assattr_target_2 = par_self;
if ( tmp_assattr_target_2 == NULL )
{
Py_DECREF( tmp_assattr_name_2 );
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyUnicode_FromFormat( "local variable '%s' referenced before assignment", "self" );
exception_tb = NULL;
NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
CHAIN_EXCEPTION( exception_value );
exception_lineno = 40;
goto frame_exception_exit_1;
}
tmp_result = SET_ATTRIBUTE( tmp_assattr_target_2, const_str_plain__mDistributionAnalyzer, tmp_assattr_name_2 );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_assattr_name_2 );
exception_lineno = 40;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_assattr_name_2 );
tmp_source_name_2 = par_self;
if ( tmp_source_name_2 == NULL )
{
exception_type = PyExc_UnboundLocalError;
Py_INCREF( exception_type );
exception_value = PyUnicode_FromFormat( "local variable '%s' referenced before assignment", "self" );
exception_tb = NULL;
NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
CHAIN_EXCEPTION( exception_value );
exception_lineno = 41;
goto frame_exception_exit_1;
}
tmp_called_name_4 = LOOKUP_ATTRIBUTE( tmp_source_name_2, const_str_plain_reset );
if ( tmp_called_name_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 41;
goto frame_exception_exit_1;
}
frame_function->f_lineno = 41;
tmp_unused = CALL_FUNCTION_NO_ARGS( tmp_called_name_4 );
Py_DECREF( tmp_called_name_4 );
if ( tmp_unused == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 41;
goto frame_exception_exit_1;
}
Py_DECREF( tmp_unused );
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
goto frame_no_exception_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_function );
#endif
{
bool needs_detach = false;
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_function, exception_lineno );
needs_detach = true;
}
else if ( exception_lineno != -1 )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_function, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
needs_detach = true;
}
if (needs_detach)
{
tmp_frame_locals = PyDict_New();
if ( par_self )
{
int res = PyDict_SetItem(
tmp_frame_locals,
const_str_plain_self,
par_self
);
assert( res == 0 );
}
detachFrame( exception_tb, tmp_frame_locals );
}
}
popFrameStack();
#if PYTHON_VERSION >= 340
frame_function->f_executing -= 1;
#endif
Py_DECREF( frame_function );
// Return the error.
goto try_except_handler_1;
frame_no_exception_1:;
tmp_return_value = Py_None;
Py_INCREF( tmp_return_value );
goto try_return_handler_1;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( function_1___init___of_class_1_CP949Prober_of_chardet$cp949prober );
return NULL;
// Return handler code:
try_return_handler_1:;
Py_XDECREF( par_self );
par_self = NULL;
goto function_return_exit;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( par_self );
par_self = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto function_exception_exit;
// End of try:
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( function_1___init___of_class_1_CP949Prober_of_chardet$cp949prober );
return NULL;
function_exception_exit:
assert( exception_type );
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *impl_function_2_get_charset_name_of_class_1_CP949Prober_of_chardet$cp949prober( Nuitka_FunctionObject const *self, PyObject **python_pars )
{
// Preserve error status for checks
#ifndef __NUITKA_NO_ASSERT__
NUITKA_MAY_BE_UNUSED bool had_error = ERROR_OCCURRED();
#endif
// Local variable declarations.
PyObject *par_self = python_pars[ 0 ];
PyObject *tmp_return_value;
tmp_return_value = NULL;
// Actual function code.
// Tried code:
tmp_return_value = const_str_plain_CP949;
Py_INCREF( tmp_return_value );
goto try_return_handler_1;
// tried codes exits in all cases
NUITKA_CANNOT_GET_HERE( function_2_get_charset_name_of_class_1_CP949Prober_of_chardet$cp949prober );
return NULL;
// Return handler code:
try_return_handler_1:;
CHECK_OBJECT( (PyObject *)par_self );
Py_DECREF( par_self );
par_self = NULL;
goto function_return_exit;
// End of try:
CHECK_OBJECT( (PyObject *)par_self );
Py_DECREF( par_self );
par_self = NULL;
// Return statement must have exited already.
NUITKA_CANNOT_GET_HERE( function_2_get_charset_name_of_class_1_CP949Prober_of_chardet$cp949prober );
return NULL;
function_return_exit:
CHECK_OBJECT( tmp_return_value );
assert( had_error || !ERROR_OCCURRED() );
return tmp_return_value;
}
static PyObject *MAKE_FUNCTION_function_1___init___of_class_1_CP949Prober_of_chardet$cp949prober( )
{
PyObject *result = Nuitka_Function_New(
impl_function_1___init___of_class_1_CP949Prober_of_chardet$cp949prober,
const_str_plain___init__,
#if PYTHON_VERSION >= 330
const_str_digest_2ce6ea2b59384b13e6f505494b1c5d22,
#endif
codeobj_65415632cb468247e07e00ab044c6b65,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_chardet$cp949prober,
Py_None
);
return result;
}
static PyObject *MAKE_FUNCTION_function_2_get_charset_name_of_class_1_CP949Prober_of_chardet$cp949prober( )
{
PyObject *result = Nuitka_Function_New(
impl_function_2_get_charset_name_of_class_1_CP949Prober_of_chardet$cp949prober,
const_str_plain_get_charset_name,
#if PYTHON_VERSION >= 330
const_str_digest_296e986b6b574dce12df8173c41a2bdd,
#endif
codeobj_6bf806c1e61866efb7802b41f2bfdd31,
NULL,
#if PYTHON_VERSION >= 300
NULL,
const_dict_empty,
#endif
module_chardet$cp949prober,
Py_None
);
return result;
}
#if PYTHON_VERSION >= 300
static struct PyModuleDef mdef_chardet$cp949prober =
{
PyModuleDef_HEAD_INIT,
"chardet.cp949prober", /* m_name */
NULL, /* m_doc */
-1, /* m_size */
NULL, /* m_methods */
NULL, /* m_reload */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
};
#endif
#if PYTHON_VERSION >= 300
extern PyObject *metapath_based_loader;
#endif
// The exported interface to CPython. On import of the module, this function
// gets called. It has to have an exact function name, in cases it's a shared
// library export. This is hidden behind the MOD_INIT_DECL.
MOD_INIT_DECL( chardet$cp949prober )
{
#if defined(_NUITKA_EXE) || PYTHON_VERSION >= 300
static bool _init_done = false;
// Modules might be imported repeatedly, which is to be ignored.
if ( _init_done )
{
return MOD_RETURN_VALUE( module_chardet$cp949prober );
}
else
{
_init_done = true;
}
#endif
#ifdef _NUITKA_MODULE
// In case of a stand alone extension module, need to call initialization
// the init here because that's the first and only time we are going to get
// called here.
// Initialize the constant values used.
_initBuiltinModule();
createGlobalConstants();
// Initialize the compiled types of Nuitka.
PyType_Ready( &Nuitka_Generator_Type );
PyType_Ready( &Nuitka_Function_Type );
PyType_Ready( &Nuitka_Method_Type );
PyType_Ready( &Nuitka_Frame_Type );
#if PYTHON_VERSION >= 350
PyType_Ready( &Nuitka_Coroutine_Type );
PyType_Ready( &Nuitka_CoroutineWrapper_Type );
#endif
#if PYTHON_VERSION < 300
_initSlotCompare();
#endif
#if PYTHON_VERSION >= 270
_initSlotIternext();
#endif
patchBuiltinModule();
patchTypeComparison();
// Enable meta path based loader if not already done.
setupMetaPathBasedLoader();
#if PYTHON_VERSION >= 300
patchInspectModule();
#endif
#endif
createModuleConstants();
createModuleCodeObjects();
// puts( "in initchardet$cp949prober" );
// Create the module object first. There are no methods initially, all are
// added dynamically in actual code only. Also no "__doc__" is initially
// set at this time, as it could not contain NUL characters this way, they
// are instead set in early module code. No "self" for modules, we have no
// use for it.
#if PYTHON_VERSION < 300
module_chardet$cp949prober = Py_InitModule4(
"chardet.cp949prober", // Module Name
NULL, // No methods initially, all are added
// dynamically in actual module code only.
NULL, // No __doc__ is initially set, as it could
// not contain NUL this way, added early in
// actual code.
NULL, // No self for modules, we don't use it.
PYTHON_API_VERSION
);
#else
module_chardet$cp949prober = PyModule_Create( &mdef_chardet$cp949prober );
#endif
moduledict_chardet$cp949prober = (PyDictObject *)((PyModuleObject *)module_chardet$cp949prober)->md_dict;
CHECK_OBJECT( module_chardet$cp949prober );
// Seems to work for Python2.7 out of the box, but for Python3, the module
// doesn't automatically enter "sys.modules", so do it manually.
#if PYTHON_VERSION >= 300
{
int r = PyObject_SetItem( PySys_GetObject( (char *)"modules" ), const_str_digest_c6146fb5804520439dbd0cb5e9733b76, module_chardet$cp949prober );
assert( r != -1 );
}
#endif
// For deep importing of a module we need to have "__builtins__", so we set
// it ourselves in the same way than CPython does. Note: This must be done
// before the frame object is allocated, or else it may fail.
PyObject *module_dict = PyModule_GetDict( module_chardet$cp949prober );
if ( PyDict_GetItem( module_dict, const_str_plain___builtins__ ) == NULL )
{
PyObject *value = (PyObject *)builtin_module;
// Check if main module, not a dict then.
#if !defined(_NUITKA_EXE) || !0
value = PyModule_GetDict( value );
#endif
#ifndef __NUITKA_NO_ASSERT__
int res =
#endif
PyDict_SetItem( module_dict, const_str_plain___builtins__, value );
assert( res == 0 );
}
#if PYTHON_VERSION >= 330
PyDict_SetItem( module_dict, const_str_plain___loader__, metapath_based_loader );
#endif
// Temp variables if any
PyObject *tmp_chardet$cp949prober_class_creation_1__bases = NULL;
PyObject *tmp_chardet$cp949prober_class_creation_1__class_decl_dict = NULL;
PyObject *tmp_chardet$cp949prober_class_creation_1__metaclass = NULL;
PyObject *tmp_chardet$cp949prober_class_creation_1__prepared = NULL;
PyObject *exception_type = NULL, *exception_value = NULL;
PyTracebackObject *exception_tb = NULL;
NUITKA_MAY_BE_UNUSED int exception_lineno = -1;
PyObject *exception_keeper_type_1;
PyObject *exception_keeper_value_1;
PyTracebackObject *exception_keeper_tb_1;
NUITKA_MAY_BE_UNUSED int exception_keeper_lineno_1;
PyObject *tmp_args_name_1;
PyObject *tmp_assign_source_1;
PyObject *tmp_assign_source_2;
PyObject *tmp_assign_source_3;
PyObject *tmp_assign_source_4;
PyObject *tmp_assign_source_5;
PyObject *tmp_assign_source_6;
PyObject *tmp_assign_source_7;
PyObject *tmp_assign_source_8;
PyObject *tmp_assign_source_9;
PyObject *tmp_assign_source_10;
PyObject *tmp_assign_source_11;
PyObject *tmp_assign_source_12;
PyObject *tmp_assign_source_13;
PyObject *tmp_bases_name_1;
PyObject *tmp_called_name_1;
int tmp_cmp_In_1;
int tmp_cmp_In_2;
PyObject *tmp_compare_left_1;
PyObject *tmp_compare_left_2;
PyObject *tmp_compare_right_1;
PyObject *tmp_compare_right_2;
int tmp_cond_truth_1;
PyObject *tmp_cond_value_1;
PyObject *tmp_dict_name_1;
PyObject *tmp_dictdel_dict;
PyObject *tmp_dictdel_key;
PyObject *tmp_hasattr_attr_1;
PyObject *tmp_hasattr_source_1;
PyObject *tmp_import_globals_1;
PyObject *tmp_import_globals_2;
PyObject *tmp_import_globals_3;
PyObject *tmp_import_globals_4;
PyObject *tmp_import_name_from_1;
PyObject *tmp_import_name_from_2;
PyObject *tmp_import_name_from_3;
PyObject *tmp_import_name_from_4;
PyObject *tmp_key_name_1;
PyObject *tmp_kw_name_1;
PyObject *tmp_metaclass_name_1;
int tmp_res;
bool tmp_result;
PyObject *tmp_source_name_1;
PyObject *tmp_subscribed_name_1;
PyObject *tmp_subscript_name_1;
PyObject *tmp_tuple_element_1;
PyObject *tmp_tuple_element_2;
PyObject *tmp_type_arg_1;
PyFrameObject *frame_module;
// Module code.
tmp_assign_source_1 = Py_None;
UPDATE_STRING_DICT0( moduledict_chardet$cp949prober, (Nuitka_StringObject *)const_str_plain___doc__, tmp_assign_source_1 );
tmp_assign_source_2 = const_str_digest_f25d8dc80a72869f450ccf628ebe8329;
UPDATE_STRING_DICT0( moduledict_chardet$cp949prober, (Nuitka_StringObject *)const_str_plain___file__, tmp_assign_source_2 );
tmp_assign_source_3 = Py_None;
UPDATE_STRING_DICT0( moduledict_chardet$cp949prober, (Nuitka_StringObject *)const_str_plain___cached__, tmp_assign_source_3 );
tmp_assign_source_4 = const_str_plain_chardet;
UPDATE_STRING_DICT0( moduledict_chardet$cp949prober, (Nuitka_StringObject *)const_str_plain___package__, tmp_assign_source_4 );
// Frame without reuse.
frame_module = MAKE_MODULE_FRAME( codeobj_f69f3c656be44e7c77430f880e7120ce, module_chardet$cp949prober );
// Push the new frame as the currently active one, and we should be exclusively
// owning it.
pushFrameStack( frame_module );
assert( Py_REFCNT( frame_module ) == 1 );
#if PYTHON_VERSION >= 340
frame_module->f_executing += 1;
#endif
// Framed code:
tmp_import_globals_1 = ((PyModuleObject *)module_chardet$cp949prober)->md_dict;
frame_module->f_lineno = 28;
tmp_import_name_from_1 = IMPORT_MODULE( const_str_plain_mbcharsetprober, tmp_import_globals_1, tmp_import_globals_1, const_tuple_str_plain_MultiByteCharSetProber_tuple, const_int_pos_1 );
if ( tmp_import_name_from_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 28;
goto frame_exception_exit_1;
}
tmp_assign_source_5 = IMPORT_NAME( tmp_import_name_from_1, const_str_plain_MultiByteCharSetProber );
Py_DECREF( tmp_import_name_from_1 );
if ( tmp_assign_source_5 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 28;
goto frame_exception_exit_1;
}
UPDATE_STRING_DICT1( moduledict_chardet$cp949prober, (Nuitka_StringObject *)const_str_plain_MultiByteCharSetProber, tmp_assign_source_5 );
tmp_import_globals_2 = ((PyModuleObject *)module_chardet$cp949prober)->md_dict;
frame_module->f_lineno = 29;
tmp_import_name_from_2 = IMPORT_MODULE( const_str_plain_codingstatemachine, tmp_import_globals_2, tmp_import_globals_2, const_tuple_str_plain_CodingStateMachine_tuple, const_int_pos_1 );
if ( tmp_import_name_from_2 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 29;
goto frame_exception_exit_1;
}
tmp_assign_source_6 = IMPORT_NAME( tmp_import_name_from_2, const_str_plain_CodingStateMachine );
Py_DECREF( tmp_import_name_from_2 );
if ( tmp_assign_source_6 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 29;
goto frame_exception_exit_1;
}
UPDATE_STRING_DICT1( moduledict_chardet$cp949prober, (Nuitka_StringObject *)const_str_plain_CodingStateMachine, tmp_assign_source_6 );
tmp_import_globals_3 = ((PyModuleObject *)module_chardet$cp949prober)->md_dict;
frame_module->f_lineno = 30;
tmp_import_name_from_3 = IMPORT_MODULE( const_str_plain_chardistribution, tmp_import_globals_3, tmp_import_globals_3, const_tuple_str_plain_EUCKRDistributionAnalysis_tuple, const_int_pos_1 );
if ( tmp_import_name_from_3 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 30;
goto frame_exception_exit_1;
}
tmp_assign_source_7 = IMPORT_NAME( tmp_import_name_from_3, const_str_plain_EUCKRDistributionAnalysis );
Py_DECREF( tmp_import_name_from_3 );
if ( tmp_assign_source_7 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 30;
goto frame_exception_exit_1;
}
UPDATE_STRING_DICT1( moduledict_chardet$cp949prober, (Nuitka_StringObject *)const_str_plain_EUCKRDistributionAnalysis, tmp_assign_source_7 );
tmp_import_globals_4 = ((PyModuleObject *)module_chardet$cp949prober)->md_dict;
frame_module->f_lineno = 31;
tmp_import_name_from_4 = IMPORT_MODULE( const_str_plain_mbcssm, tmp_import_globals_4, tmp_import_globals_4, const_tuple_str_plain_CP949SMModel_tuple, const_int_pos_1 );
if ( tmp_import_name_from_4 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 31;
goto frame_exception_exit_1;
}
tmp_assign_source_8 = IMPORT_NAME( tmp_import_name_from_4, const_str_plain_CP949SMModel );
Py_DECREF( tmp_import_name_from_4 );
if ( tmp_assign_source_8 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 31;
goto frame_exception_exit_1;
}
UPDATE_STRING_DICT1( moduledict_chardet$cp949prober, (Nuitka_StringObject *)const_str_plain_CP949SMModel, tmp_assign_source_8 );
// Tried code:
tmp_assign_source_9 = PyTuple_New( 1 );
tmp_tuple_element_1 = GET_STRING_DICT_VALUE( moduledict_chardet$cp949prober, (Nuitka_StringObject *)const_str_plain_MultiByteCharSetProber );
if (unlikely( tmp_tuple_element_1 == NULL ))
{
tmp_tuple_element_1 = GET_STRING_DICT_VALUE( dict_builtin, (Nuitka_StringObject *)const_str_plain_MultiByteCharSetProber );
}
if ( tmp_tuple_element_1 == NULL )
{
Py_DECREF( tmp_assign_source_9 );
exception_type = PyExc_NameError;
Py_INCREF( exception_type );
exception_value = PyUnicode_FromFormat( "name '%s' is not defined", "MultiByteCharSetProber" );
exception_tb = NULL;
NORMALIZE_EXCEPTION( &exception_type, &exception_value, &exception_tb );
CHAIN_EXCEPTION( exception_value );
exception_lineno = 34;
goto try_except_handler_1;
}
Py_INCREF( tmp_tuple_element_1 );
PyTuple_SET_ITEM( tmp_assign_source_9, 0, tmp_tuple_element_1 );
assert( tmp_chardet$cp949prober_class_creation_1__bases == NULL );
tmp_chardet$cp949prober_class_creation_1__bases = tmp_assign_source_9;
tmp_assign_source_10 = PyDict_New();
assert( tmp_chardet$cp949prober_class_creation_1__class_decl_dict == NULL );
tmp_chardet$cp949prober_class_creation_1__class_decl_dict = tmp_assign_source_10;
tmp_compare_left_1 = const_str_plain_metaclass;
tmp_compare_right_1 = tmp_chardet$cp949prober_class_creation_1__class_decl_dict;
tmp_cmp_In_1 = PySequence_Contains( tmp_compare_right_1, tmp_compare_left_1 );
assert( !(tmp_cmp_In_1 == -1) );
if ( tmp_cmp_In_1 == 1 )
{
goto condexpr_true_1;
}
else
{
goto condexpr_false_1;
}
condexpr_true_1:;
tmp_dict_name_1 = tmp_chardet$cp949prober_class_creation_1__class_decl_dict;
tmp_key_name_1 = const_str_plain_metaclass;
tmp_metaclass_name_1 = DICT_GET_ITEM( tmp_dict_name_1, tmp_key_name_1 );
if ( tmp_metaclass_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 34;
goto try_except_handler_1;
}
goto condexpr_end_1;
condexpr_false_1:;
tmp_cond_value_1 = tmp_chardet$cp949prober_class_creation_1__bases;
tmp_cond_truth_1 = CHECK_IF_TRUE( tmp_cond_value_1 );
if ( tmp_cond_truth_1 == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 34;
goto try_except_handler_1;
}
if ( tmp_cond_truth_1 == 1 )
{
goto condexpr_true_2;
}
else
{
goto condexpr_false_2;
}
condexpr_true_2:;
tmp_subscribed_name_1 = tmp_chardet$cp949prober_class_creation_1__bases;
tmp_subscript_name_1 = const_int_0;
tmp_type_arg_1 = LOOKUP_SUBSCRIPT( tmp_subscribed_name_1, tmp_subscript_name_1 );
if ( tmp_type_arg_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 34;
goto try_except_handler_1;
}
tmp_metaclass_name_1 = BUILTIN_TYPE1( tmp_type_arg_1 );
Py_DECREF( tmp_type_arg_1 );
if ( tmp_metaclass_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 34;
goto try_except_handler_1;
}
goto condexpr_end_2;
condexpr_false_2:;
tmp_metaclass_name_1 = LOOKUP_BUILTIN( const_str_plain_type );
assert( tmp_metaclass_name_1 != NULL );
Py_INCREF( tmp_metaclass_name_1 );
condexpr_end_2:;
condexpr_end_1:;
tmp_bases_name_1 = tmp_chardet$cp949prober_class_creation_1__bases;
tmp_assign_source_11 = SELECT_METACLASS( tmp_metaclass_name_1, tmp_bases_name_1 );
if ( tmp_assign_source_11 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
Py_DECREF( tmp_metaclass_name_1 );
exception_lineno = 34;
goto try_except_handler_1;
}
Py_DECREF( tmp_metaclass_name_1 );
assert( tmp_chardet$cp949prober_class_creation_1__metaclass == NULL );
tmp_chardet$cp949prober_class_creation_1__metaclass = tmp_assign_source_11;
tmp_compare_left_2 = const_str_plain_metaclass;
tmp_compare_right_2 = tmp_chardet$cp949prober_class_creation_1__class_decl_dict;
tmp_cmp_In_2 = PySequence_Contains( tmp_compare_right_2, tmp_compare_left_2 );
assert( !(tmp_cmp_In_2 == -1) );
if ( tmp_cmp_In_2 == 1 )
{
goto branch_yes_1;
}
else
{
goto branch_no_1;
}
branch_yes_1:;
tmp_dictdel_dict = tmp_chardet$cp949prober_class_creation_1__class_decl_dict;
tmp_dictdel_key = const_str_plain_metaclass;
tmp_result = DICT_REMOVE_ITEM( tmp_dictdel_dict, tmp_dictdel_key );
if ( tmp_result == false )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 34;
goto try_except_handler_1;
}
branch_no_1:;
tmp_hasattr_source_1 = tmp_chardet$cp949prober_class_creation_1__metaclass;
tmp_hasattr_attr_1 = const_str_plain___prepare__;
tmp_res = PyObject_HasAttr( tmp_hasattr_source_1, tmp_hasattr_attr_1 );
if ( tmp_res == -1 )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 34;
goto try_except_handler_1;
}
if ( tmp_res == 1 )
{
goto condexpr_true_3;
}
else
{
goto condexpr_false_3;
}
condexpr_true_3:;
tmp_source_name_1 = tmp_chardet$cp949prober_class_creation_1__metaclass;
tmp_called_name_1 = LOOKUP_ATTRIBUTE( tmp_source_name_1, const_str_plain___prepare__ );
if ( tmp_called_name_1 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 34;
goto try_except_handler_1;
}
tmp_args_name_1 = PyTuple_New( 2 );
tmp_tuple_element_2 = const_str_plain_CP949Prober;
Py_INCREF( tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_args_name_1, 0, tmp_tuple_element_2 );
tmp_tuple_element_2 = tmp_chardet$cp949prober_class_creation_1__bases;
Py_INCREF( tmp_tuple_element_2 );
PyTuple_SET_ITEM( tmp_args_name_1, 1, tmp_tuple_element_2 );
tmp_kw_name_1 = tmp_chardet$cp949prober_class_creation_1__class_decl_dict;
frame_module->f_lineno = 34;
tmp_assign_source_12 = CALL_FUNCTION( tmp_called_name_1, tmp_args_name_1, tmp_kw_name_1 );
Py_DECREF( tmp_called_name_1 );
Py_DECREF( tmp_args_name_1 );
if ( tmp_assign_source_12 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 34;
goto try_except_handler_1;
}
goto condexpr_end_3;
condexpr_false_3:;
tmp_assign_source_12 = PyDict_New();
condexpr_end_3:;
assert( tmp_chardet$cp949prober_class_creation_1__prepared == NULL );
tmp_chardet$cp949prober_class_creation_1__prepared = tmp_assign_source_12;
tmp_assign_source_13 = impl_class_1_CP949Prober_of_chardet$cp949prober( NULL, tmp_chardet$cp949prober_class_creation_1__bases, tmp_chardet$cp949prober_class_creation_1__class_decl_dict, tmp_chardet$cp949prober_class_creation_1__metaclass, tmp_chardet$cp949prober_class_creation_1__prepared );
if ( tmp_assign_source_13 == NULL )
{
assert( ERROR_OCCURRED() );
FETCH_ERROR_OCCURRED( &exception_type, &exception_value, &exception_tb );
exception_lineno = 34;
goto try_except_handler_1;
}
UPDATE_STRING_DICT1( moduledict_chardet$cp949prober, (Nuitka_StringObject *)const_str_plain_CP949Prober, tmp_assign_source_13 );
goto try_end_1;
// Exception handler code:
try_except_handler_1:;
exception_keeper_type_1 = exception_type;
exception_keeper_value_1 = exception_value;
exception_keeper_tb_1 = exception_tb;
exception_keeper_lineno_1 = exception_lineno;
exception_type = NULL;
exception_value = NULL;
exception_tb = NULL;
exception_lineno = -1;
Py_XDECREF( tmp_chardet$cp949prober_class_creation_1__bases );
tmp_chardet$cp949prober_class_creation_1__bases = NULL;
Py_XDECREF( tmp_chardet$cp949prober_class_creation_1__class_decl_dict );
tmp_chardet$cp949prober_class_creation_1__class_decl_dict = NULL;
Py_XDECREF( tmp_chardet$cp949prober_class_creation_1__metaclass );
tmp_chardet$cp949prober_class_creation_1__metaclass = NULL;
Py_XDECREF( tmp_chardet$cp949prober_class_creation_1__prepared );
tmp_chardet$cp949prober_class_creation_1__prepared = NULL;
// Re-raise.
exception_type = exception_keeper_type_1;
exception_value = exception_keeper_value_1;
exception_tb = exception_keeper_tb_1;
exception_lineno = exception_keeper_lineno_1;
goto frame_exception_exit_1;
// End of try:
try_end_1:;
// Restore frame exception if necessary.
#if 0
RESTORE_FRAME_EXCEPTION( frame_module );
#endif
popFrameStack();
assertFrameObject( frame_module );
Py_DECREF( frame_module );
goto frame_no_exception_1;
frame_exception_exit_1:;
#if 0
RESTORE_FRAME_EXCEPTION( frame_module );
#endif
if ( exception_tb == NULL )
{
exception_tb = MAKE_TRACEBACK( frame_module, exception_lineno );
}
else if ( exception_tb->tb_frame != frame_module )
{
PyTracebackObject *traceback_new = MAKE_TRACEBACK( frame_module, exception_lineno );
traceback_new->tb_next = exception_tb;
exception_tb = traceback_new;
}
// Put the previous frame back on top.
popFrameStack();
#if PYTHON_VERSION >= 340
frame_module->f_executing -= 1;
#endif
Py_DECREF( frame_module );
// Return the error.
goto module_exception_exit;
frame_no_exception_1:;
Py_XDECREF( tmp_chardet$cp949prober_class_creation_1__bases );
tmp_chardet$cp949prober_class_creation_1__bases = NULL;
Py_XDECREF( tmp_chardet$cp949prober_class_creation_1__class_decl_dict );
tmp_chardet$cp949prober_class_creation_1__class_decl_dict = NULL;
Py_XDECREF( tmp_chardet$cp949prober_class_creation_1__metaclass );
tmp_chardet$cp949prober_class_creation_1__metaclass = NULL;
Py_XDECREF( tmp_chardet$cp949prober_class_creation_1__prepared );
tmp_chardet$cp949prober_class_creation_1__prepared = NULL;
return MOD_RETURN_VALUE( module_chardet$cp949prober );
module_exception_exit:
RESTORE_ERROR_OCCURRED( exception_type, exception_value, exception_tb );
return MOD_RETURN_VALUE( NULL );
}
| [
"mesmer@fisica.if.uff.br"
] | mesmer@fisica.if.uff.br |
766099aec465585e040cd9cb60c0489cf232ee43 | fd0a3991387665fddba379d01fb07b514c598f30 | /src/MovieMode.cpp | 6100f48926ccb7b05a27bdfe13ba9a0ec64415e7 | [] | no_license | imclab/DL.RivAR | b698777b46283f004d4bc59132adf216b17c1743 | acd35eebda1cdac7be3c738e17fa9742b900d264 | refs/heads/master | 2020-12-11T04:01:03.699386 | 2013-10-20T15:39:21 | 2013-10-20T15:39:21 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,600 | cpp | #include "MovieMode.h"
MovieMode::MovieMode(int width, int height) : RivarMode(width, height) {
//------------------------------------------LOAD NAMES OF ALL VIDEOS--
dir.allowExt("mov");
dir.listDir("videos/");
dir.sort(); // in linux the file system doesn't return file lists ordered in alphabetical order
for(int i = 0; i < (int)dir.size(); i++){
string name = "videos/" + dir.getName(i);
videos.push_back(name);
cout << "adding video: " << name << endl;
}
curVideo = -1;
if (videos.size() > 0) {
curVideo = 0;
}
}
MovieMode::~MovieMode() {
}
//--------------------------------------------------------------
void MovieMode::enter() {
if (curVideo > -1) {
player.loadMovie(videos[curVideo]);
cout << "loading video: " << videos[curVideo] << endl;
}
}
//--------------------------------------------------------------
void MovieMode::draw() {
fbo.begin();
player.draw(0, 0, width, height);
fbo.end();
}
//--------------------------------------------------------------
void MovieMode::update() {
player.update();
if (player.isLoaded() && !player.isPlaying()) {
player.play();
cout << "playing video duration: " << player.getDuration() << endl;
}
}
//--------------------------------------------------------------
void MovieMode::exit() {
player.stop();
}
//--------------------------------------------------------------
void MovieMode::handleKey(int key) {
if(key == OF_KEY_UP) {
} else if(key == OF_KEY_DOWN) {
}
else if (key == ' ') {
curVideo = (curVideo+1)%videos.size();
player.loadMovie(videos[curVideo]);
}
} | [
"laurmccarthy@gmail.com"
] | laurmccarthy@gmail.com |
b3f46f2ab3ab4ce943198df01e33b24d6f4a16a8 | 4352b5c9e6719d762e6a80e7a7799630d819bca3 | /tutorials/eulerVortex.twitch/eulerVortex.cyclic.twitch.test.test/3.49/rho | e9448288d4e61d12716c3cc1cd7ff886d0cde1bd | [] | no_license | dashqua/epicProject | d6214b57c545110d08ad053e68bc095f1d4dc725 | 54afca50a61c20c541ef43e3d96408ef72f0bcbc | refs/heads/master | 2022-02-28T17:20:20.291864 | 2019-10-28T13:33:16 | 2019-10-28T13:33:16 | 184,294,390 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 160,707 | /*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 6
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "3.49";
object rho;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -3 0 0 0 0 0];
internalField nonuniform List<scalar>
22500
(
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39998
1.39998
1.39997
1.39997
1.39996
1.39996
1.39996
1.39996
1.39996
1.39996
1.39996
1.39997
1.39997
1.39998
1.39999
1.4
1.40001
1.40002
1.40003
1.40005
1.40006
1.40007
1.40008
1.40009
1.40009
1.4001
1.4001
1.4001
1.4001
1.4001
1.4001
1.4001
1.40009
1.40009
1.40008
1.40007
1.40007
1.40006
1.40005
1.40005
1.40004
1.40003
1.40003
1.40002
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39998
1.39998
1.39997
1.39997
1.39996
1.39996
1.39995
1.39995
1.39995
1.39995
1.39996
1.39996
1.39997
1.39998
1.39999
1.4
1.40002
1.40003
1.40005
1.40006
1.40008
1.40009
1.40011
1.40012
1.40013
1.40013
1.40014
1.40014
1.40014
1.40014
1.40014
1.40013
1.40013
1.40012
1.40011
1.4001
1.40009
1.40008
1.40007
1.40006
1.40006
1.40005
1.40004
1.40003
1.40003
1.40002
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39998
1.39998
1.39997
1.39997
1.39996
1.39996
1.39995
1.39995
1.39995
1.39995
1.39995
1.39996
1.39997
1.39998
1.4
1.40001
1.40003
1.40005
1.40007
1.40009
1.40011
1.40013
1.40015
1.40017
1.40018
1.40019
1.4002
1.4002
1.4002
1.4002
1.40019
1.40019
1.40018
1.40017
1.40016
1.40014
1.40013
1.40012
1.40011
1.40009
1.40008
1.40007
1.40006
1.40005
1.40004
1.40004
1.40003
1.40002
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39998
1.39997
1.39997
1.39996
1.39995
1.39995
1.39995
1.39995
1.39995
1.39995
1.39996
1.39997
1.39999
1.40001
1.40003
1.40006
1.40008
1.40011
1.40014
1.40017
1.40019
1.40022
1.40024
1.40026
1.40027
1.40028
1.40029
1.40029
1.40028
1.40028
1.40027
1.40026
1.40024
1.40022
1.40021
1.40019
1.40017
1.40015
1.40014
1.40012
1.4001
1.40009
1.40007
1.40006
1.40005
1.40004
1.40003
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39998
1.39997
1.39997
1.39996
1.39996
1.39995
1.39995
1.39995
1.39995
1.39996
1.39997
1.39998
1.4
1.40003
1.40006
1.40009
1.40013
1.40017
1.40021
1.40025
1.40028
1.40032
1.40035
1.40038
1.4004
1.40041
1.40042
1.40042
1.40042
1.40041
1.40039
1.40037
1.40035
1.40033
1.4003
1.40028
1.40025
1.40023
1.4002
1.40018
1.40015
1.40013
1.40011
1.40009
1.40008
1.40006
1.40005
1.40004
1.40003
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39998
1.39997
1.39996
1.39996
1.39995
1.39995
1.39995
1.39995
1.39996
1.39998
1.4
1.40002
1.40006
1.4001
1.40014
1.40019
1.40025
1.4003
1.40036
1.40041
1.40046
1.40051
1.40055
1.40058
1.4006
1.40062
1.40062
1.40062
1.40061
1.40059
1.40056
1.40053
1.40049
1.40046
1.40042
1.40038
1.40034
1.4003
1.40026
1.40023
1.4002
1.40017
1.40014
1.40012
1.4001
1.40008
1.40006
1.40005
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39997
1.39997
1.39996
1.39996
1.39995
1.39996
1.39996
1.39997
1.39999
1.40002
1.40005
1.4001
1.40015
1.40021
1.40028
1.40035
1.40043
1.40051
1.40059
1.40066
1.40073
1.40079
1.40084
1.40088
1.40091
1.40092
1.40092
1.40091
1.40088
1.40085
1.4008
1.40075
1.4007
1.40064
1.40058
1.40052
1.40046
1.4004
1.40035
1.4003
1.40026
1.40022
1.40018
1.40015
1.40012
1.4001
1.40008
1.40006
1.40005
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39997
1.39997
1.39996
1.39996
1.39996
1.39997
1.39999
1.40001
1.40004
1.40009
1.40015
1.40022
1.4003
1.40039
1.40049
1.4006
1.40071
1.40082
1.40093
1.40103
1.40112
1.4012
1.40127
1.40132
1.40134
1.40135
1.40134
1.40132
1.40127
1.40122
1.40115
1.40107
1.40098
1.40089
1.4008
1.40071
1.40063
1.40055
1.40047
1.4004
1.40034
1.40028
1.40023
1.40019
1.40016
1.40012
1.4001
1.40008
1.40006
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39998
1.39997
1.39997
1.39998
1.39999
1.4
1.40003
1.40008
1.40013
1.40021
1.40029
1.4004
1.40052
1.40066
1.4008
1.40096
1.40111
1.40127
1.40142
1.40156
1.40169
1.40179
1.40188
1.40194
1.40197
1.40197
1.40195
1.4019
1.40183
1.40174
1.40163
1.40151
1.40138
1.40125
1.40112
1.40099
1.40086
1.40075
1.40064
1.40054
1.40045
1.40037
1.40031
1.40025
1.4002
1.40016
1.40012
1.40009
1.40007
1.40005
1.40004
1.40003
1.40002
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.39999
1.39999
1.39998
1.39998
1.39998
1.39999
1.4
1.40002
1.40006
1.40011
1.40018
1.40027
1.40038
1.40052
1.40068
1.40085
1.40105
1.40126
1.40148
1.4017
1.40192
1.40212
1.40231
1.40248
1.40262
1.40273
1.4028
1.40284
1.40283
1.40279
1.40272
1.40261
1.40247
1.40231
1.40213
1.40195
1.40175
1.40156
1.40137
1.40119
1.40103
1.40087
1.40073
1.40061
1.4005
1.40041
1.40033
1.40026
1.4002
1.40016
1.40012
1.40009
1.40006
1.40005
1.40003
1.40002
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.39999
1.39999
1.39999
1.4
1.40002
1.40004
1.40009
1.40015
1.40023
1.40034
1.40048
1.40065
1.40085
1.40108
1.40134
1.40161
1.40191
1.40221
1.40252
1.40282
1.4031
1.40336
1.40358
1.40377
1.40391
1.404
1.40404
1.40402
1.40395
1.40384
1.40368
1.40348
1.40325
1.40299
1.40273
1.40245
1.40218
1.40191
1.40165
1.40142
1.4012
1.401
1.40083
1.40067
1.40054
1.40043
1.40034
1.40026
1.4002
1.40015
1.40011
1.40008
1.40006
1.40004
1.40002
1.40002
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40002
1.40004
1.40007
1.40012
1.40019
1.40029
1.40042
1.40059
1.40079
1.40104
1.40133
1.40166
1.40202
1.40241
1.40281
1.40323
1.40365
1.40405
1.40443
1.40478
1.40508
1.40532
1.4055
1.40561
1.40565
1.40562
1.40552
1.40535
1.40512
1.40484
1.40452
1.40417
1.40379
1.4034
1.40302
1.40264
1.40229
1.40195
1.40165
1.40137
1.40113
1.40091
1.40073
1.40058
1.40045
1.40035
1.40026
1.4002
1.40014
1.4001
1.40007
1.40005
1.40003
1.40002
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40003
1.40005
1.40009
1.40015
1.40023
1.40034
1.40049
1.40069
1.40094
1.40124
1.40159
1.402
1.40246
1.40296
1.40349
1.40405
1.40461
1.40517
1.40571
1.40622
1.40667
1.40706
1.40737
1.4076
1.40774
1.40778
1.40773
1.40759
1.40736
1.40705
1.40666
1.40622
1.40574
1.40522
1.40469
1.40416
1.40364
1.40315
1.40268
1.40226
1.40188
1.40154
1.40124
1.40099
1.40078
1.40061
1.40046
1.40035
1.40026
1.40019
1.40013
1.40009
1.40006
1.40004
1.40002
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40002
1.40002
1.40003
1.40003
1.40003
1.40003
1.40003
1.40003
1.40004
1.40005
1.40007
1.40011
1.40017
1.40026
1.40039
1.40056
1.40079
1.40108
1.40144
1.40186
1.40236
1.40293
1.40355
1.40423
1.40496
1.4057
1.40645
1.40719
1.40789
1.40855
1.40913
1.40963
1.41003
1.41033
1.4105
1.41055
1.41047
1.41028
1.40997
1.40955
1.40904
1.40845
1.40781
1.40712
1.4064
1.40568
1.40498
1.40431
1.40367
1.40309
1.40256
1.4021
1.4017
1.40135
1.40106
1.40082
1.40062
1.40047
1.40034
1.40024
1.40017
1.40011
1.40007
1.40004
1.40002
1.40001
1.4
1.4
1.39999
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40002
1.40002
1.40003
1.40003
1.40003
1.40003
1.40004
1.40004
1.40004
1.40005
1.40006
1.40009
1.40013
1.4002
1.40029
1.40043
1.40063
1.40088
1.40121
1.40162
1.40212
1.40272
1.4034
1.40417
1.40502
1.40593
1.40688
1.40786
1.40884
1.40979
1.4107
1.41153
1.41228
1.41291
1.41341
1.41377
1.41398
1.41404
1.41394
1.41369
1.41329
1.41275
1.41209
1.41133
1.41048
1.40958
1.40863
1.40768
1.40675
1.40584
1.40499
1.4042
1.40349
1.40286
1.40231
1.40183
1.40144
1.40111
1.40084
1.40063
1.40046
1.40033
1.40023
1.40015
1.4001
1.40006
1.40003
1.40001
1.4
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40002
1.40003
1.40003
1.40004
1.40004
1.40004
1.40005
1.40005
1.40006
1.40008
1.40011
1.40015
1.40022
1.40032
1.40047
1.40068
1.40096
1.40133
1.40179
1.40237
1.40306
1.40386
1.40479
1.40582
1.40694
1.40813
1.40937
1.41063
1.41187
1.41308
1.41422
1.41526
1.41618
1.41696
1.41757
1.41801
1.41827
1.41833
1.41821
1.41789
1.41739
1.41672
1.4159
1.41493
1.41386
1.4127
1.41149
1.41026
1.40903
1.40785
1.40672
1.40567
1.40472
1.40387
1.40312
1.40249
1.40195
1.4015
1.40114
1.40085
1.40062
1.40044
1.4003
1.4002
1.40013
1.40008
1.40004
1.40001
1.4
1.39999
1.39999
1.39998
1.39999
1.39999
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40003
1.40004
1.40004
1.40005
1.40005
1.40006
1.40007
1.40008
1.40009
1.40012
1.40017
1.40024
1.40034
1.4005
1.40072
1.40102
1.40142
1.40193
1.40258
1.40336
1.4043
1.40538
1.4066
1.40795
1.4094
1.41093
1.4125
1.41409
1.41564
1.41713
1.41852
1.41978
1.42089
1.42182
1.42255
1.42307
1.42337
1.42345
1.42329
1.42292
1.42232
1.42152
1.42052
1.41934
1.41802
1.41659
1.41507
1.41351
1.41195
1.41041
1.40895
1.40758
1.40632
1.4052
1.40421
1.40335
1.40263
1.40203
1.40154
1.40114
1.40083
1.40059
1.40041
1.40027
1.40017
1.4001
1.40005
1.40002
1.4
1.39999
1.39998
1.39998
1.39998
1.39998
1.39999
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40003
1.40004
1.40004
1.40005
1.40006
1.40006
1.40007
1.40009
1.40011
1.40013
1.40018
1.40025
1.40035
1.40051
1.40074
1.40105
1.40148
1.40204
1.40274
1.40362
1.40468
1.40592
1.40734
1.40892
1.41065
1.4125
1.41441
1.41636
1.4183
1.42018
1.42196
1.42361
1.42509
1.42637
1.42744
1.42828
1.42887
1.42921
1.4293
1.42913
1.4287
1.42802
1.4271
1.42594
1.42457
1.423
1.42128
1.41943
1.41751
1.41557
1.41364
1.41177
1.41001
1.40839
1.40692
1.40562
1.40449
1.40353
1.40273
1.40207
1.40155
1.40113
1.4008
1.40056
1.40037
1.40024
1.40014
1.40008
1.40003
1.4
1.39999
1.39998
1.39997
1.39998
1.39998
1.39998
1.39998
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40002
1.40003
1.40004
1.40004
1.40005
1.40006
1.40007
1.40008
1.4001
1.40012
1.40014
1.40019
1.40026
1.40036
1.40052
1.40075
1.40107
1.40151
1.4021
1.40286
1.40382
1.40499
1.40638
1.408
1.40982
1.41184
1.41401
1.41629
1.41864
1.42098
1.42328
1.42548
1.42754
1.42941
1.43107
1.43249
1.43367
1.43458
1.43522
1.43559
1.43569
1.43551
1.43506
1.43433
1.43332
1.43204
1.43051
1.42873
1.42675
1.42459
1.42231
1.41995
1.41759
1.41528
1.41306
1.411
1.40911
1.40743
1.40596
1.4047
1.40365
1.40278
1.40208
1.40152
1.40109
1.40076
1.40051
1.40033
1.4002
1.40011
1.40005
1.40001
1.39999
1.39998
1.39997
1.39997
1.39997
1.39998
1.39998
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40002
1.40003
1.40004
1.40004
1.40005
1.40006
1.40007
1.40009
1.4001
1.40012
1.40015
1.4002
1.40026
1.40036
1.40052
1.40074
1.40106
1.40151
1.40212
1.40292
1.40394
1.40521
1.40674
1.40854
1.41061
1.41291
1.41542
1.41808
1.42082
1.4236
1.42633
1.42896
1.43143
1.43369
1.43572
1.43748
1.43897
1.44018
1.44111
1.44176
1.44213
1.44224
1.44206
1.44162
1.44089
1.43987
1.43855
1.43694
1.43504
1.43287
1.43046
1.42785
1.42511
1.4223
1.41951
1.4168
1.41423
1.41186
1.40972
1.40784
1.40621
1.40484
1.4037
1.40278
1.40204
1.40147
1.40103
1.4007
1.40046
1.40028
1.40016
1.40008
1.40002
1.39999
1.39997
1.39997
1.39996
1.39997
1.39997
1.39997
1.39998
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40003
1.40004
1.40005
1.40006
1.40007
1.40009
1.40011
1.40013
1.40016
1.4002
1.40026
1.40036
1.4005
1.40072
1.40104
1.40149
1.4021
1.40292
1.40398
1.40533
1.40698
1.40895
1.41124
1.41382
1.41666
1.4197
1.42286
1.42606
1.42923
1.43228
1.43514
1.43777
1.44013
1.44218
1.44392
1.44536
1.4465
1.44736
1.44796
1.4483
1.4484
1.44825
1.44785
1.4472
1.44626
1.44503
1.44347
1.44158
1.43936
1.43682
1.43399
1.43094
1.42774
1.42448
1.42125
1.41814
1.41522
1.41256
1.41018
1.40811
1.40635
1.40488
1.40368
1.40272
1.40197
1.40139
1.40095
1.40063
1.40039
1.40023
1.40012
1.40005
1.4
1.39997
1.39996
1.39996
1.39996
1.39996
1.39997
1.39997
1.39998
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40003
1.40004
1.40005
1.40006
1.40008
1.40009
1.40011
1.40013
1.40016
1.4002
1.40026
1.40035
1.40049
1.40069
1.40099
1.40143
1.40203
1.40286
1.40395
1.40534
1.40709
1.4092
1.41169
1.41453
1.41769
1.42109
1.42466
1.42829
1.43189
1.43534
1.43858
1.44152
1.44414
1.4464
1.4483
1.44985
1.45108
1.45202
1.4527
1.45316
1.45342
1.45349
1.45338
1.45309
1.45259
1.45186
1.45085
1.44953
1.44785
1.44578
1.44331
1.44045
1.43724
1.43377
1.43011
1.4264
1.42275
1.41925
1.416
1.41307
1.41048
1.40825
1.40638
1.40483
1.40359
1.40261
1.40185
1.40128
1.40085
1.40054
1.40033
1.40018
1.40008
1.40002
1.39998
1.39996
1.39995
1.39995
1.39996
1.39996
1.39997
1.39998
1.39998
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40005
1.40006
1.40007
1.40009
1.40011
1.40013
1.40016
1.4002
1.40025
1.40034
1.40046
1.40065
1.40094
1.40135
1.40194
1.40275
1.40383
1.40525
1.40706
1.40928
1.41193
1.415
1.41846
1.42222
1.42618
1.43023
1.43423
1.43807
1.44163
1.44484
1.44763
1.44999
1.45192
1.45345
1.4546
1.45545
1.45603
1.45642
1.45665
1.45677
1.4568
1.45674
1.4566
1.45635
1.45594
1.45532
1.45443
1.45318
1.45152
1.44939
1.44677
1.44365
1.44011
1.43623
1.43215
1.428
1.42394
1.42008
1.41653
1.41335
1.41059
1.40823
1.40628
1.4047
1.40344
1.40246
1.40171
1.40115
1.40075
1.40046
1.40026
1.40012
1.40004
1.39999
1.39996
1.39995
1.39995
1.39995
1.39995
1.39996
1.39997
1.39998
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40003
1.40004
1.40006
1.40007
1.40009
1.40011
1.40013
1.40016
1.4002
1.40025
1.40032
1.40044
1.40061
1.40087
1.40125
1.40181
1.40259
1.40365
1.40506
1.40689
1.40918
1.41195
1.41522
1.41893
1.42302
1.42736
1.43181
1.4362
1.4404
1.44425
1.44766
1.45055
1.45291
1.45473
1.45607
1.45697
1.45753
1.45781
1.4579
1.45788
1.45781
1.45774
1.4577
1.4577
1.45774
1.4578
1.45781
1.45773
1.45745
1.45688
1.4559
1.45442
1.45235
1.44966
1.44636
1.44252
1.43827
1.43378
1.42923
1.42478
1.4206
1.41679
1.41341
1.41051
1.40807
1.40607
1.40447
1.40322
1.40226
1.40154
1.40101
1.40063
1.40037
1.40019
1.40008
1.4
1.39996
1.39995
1.39994
1.39994
1.39995
1.39996
1.39996
1.39997
1.39998
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40005
1.40006
1.40008
1.4001
1.40012
1.40015
1.40019
1.40024
1.40031
1.40041
1.40056
1.4008
1.40115
1.40166
1.40239
1.40341
1.40478
1.40659
1.4089
1.41175
1.41516
1.4191
1.42347
1.42816
1.43299
1.43776
1.44229
1.4464
1.44996
1.45288
1.45513
1.45673
1.45774
1.45823
1.45831
1.45808
1.45767
1.45716
1.45666
1.45623
1.45593
1.45579
1.45585
1.45609
1.45649
1.45699
1.45753
1.45801
1.45829
1.45824
1.45771
1.45655
1.45466
1.45198
1.44854
1.44443
1.43984
1.43496
1.43003
1.42525
1.42078
1.41676
1.41324
1.41024
1.40777
1.40576
1.40418
1.40296
1.40203
1.40135
1.40086
1.40052
1.40028
1.40013
1.40003
1.39998
1.39995
1.39993
1.39993
1.39994
1.39995
1.39996
1.39997
1.39997
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40005
1.40006
1.40007
1.40009
1.40012
1.40014
1.40018
1.40023
1.40029
1.40038
1.40052
1.40072
1.40103
1.4015
1.40217
1.40312
1.40443
1.40619
1.40847
1.41134
1.41483
1.41893
1.42355
1.42856
1.43374
1.43888
1.44373
1.44808
1.45175
1.45465
1.45673
1.45801
1.45857
1.45851
1.45796
1.45707
1.45597
1.45478
1.45363
1.45261
1.4518
1.45126
1.45102
1.45112
1.45155
1.45228
1.45328
1.45447
1.45576
1.457
1.45804
1.45868
1.45873
1.458
1.45636
1.45374
1.45018
1.44583
1.4409
1.43566
1.43039
1.42532
1.42063
1.41645
1.41284
1.40981
1.40733
1.40536
1.40382
1.40266
1.40179
1.40116
1.40071
1.4004
1.4002
1.40007
1.39999
1.39995
1.39993
1.39993
1.39993
1.39994
1.39995
1.39996
1.39997
1.39998
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40005
1.40007
1.40009
1.40011
1.40014
1.40017
1.40021
1.40027
1.40035
1.40047
1.40065
1.40092
1.40133
1.40194
1.40281
1.40403
1.4057
1.4079
1.41074
1.41425
1.41844
1.42325
1.42852
1.43404
1.43953
1.4447
1.44929
1.45307
1.45593
1.45779
1.4587
1.45874
1.45804
1.45677
1.4551
1.45318
1.45118
1.44924
1.44746
1.44595
1.44478
1.44401
1.44367
1.44379
1.44438
1.44541
1.44686
1.44866
1.45071
1.4529
1.45507
1.45699
1.45844
1.45916
1.45892
1.45754
1.45498
1.4513
1.4467
1.44144
1.43587
1.4303
1.42499
1.42014
1.41587
1.41223
1.40922
1.40679
1.40489
1.40343
1.40233
1.40153
1.40096
1.40056
1.4003
1.40013
1.40002
1.39996
1.39993
1.39992
1.39993
1.39993
1.39994
1.39995
1.39996
1.39997
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40005
1.40006
1.40008
1.4001
1.40012
1.40016
1.4002
1.40025
1.40032
1.40043
1.40058
1.40082
1.40117
1.4017
1.40248
1.40359
1.40514
1.40723
1.40996
1.41342
1.41764
1.42256
1.42805
1.43387
1.43971
1.44521
1.45005
1.45397
1.45679
1.45845
1.45897
1.45846
1.45708
1.45504
1.45252
1.44974
1.44685
1.44403
1.44141
1.43909
1.43716
1.43568
1.43471
1.43428
1.43442
1.43512
1.43639
1.4382
1.4405
1.44321
1.44625
1.44945
1.45262
1.45551
1.45781
1.45922
1.45945
1.45831
1.45577
1.45192
1.44704
1.44146
1.43558
1.42976
1.42428
1.41934
1.41505
1.41144
1.40851
1.40617
1.40437
1.403
1.402
1.40128
1.40077
1.40043
1.4002
1.40006
1.39998
1.39994
1.39992
1.39992
1.39993
1.39994
1.39995
1.39996
1.39997
1.39998
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40005
1.40007
1.40009
1.40011
1.40014
1.40018
1.40023
1.40029
1.40038
1.40051
1.40071
1.40102
1.40148
1.40216
1.40315
1.40455
1.40649
1.40907
1.4124
1.41656
1.42151
1.42715
1.43322
1.43939
1.44524
1.45038
1.45448
1.45732
1.45881
1.45897
1.45793
1.45589
1.45307
1.44971
1.44604
1.44225
1.43854
1.43504
1.43187
1.42912
1.42687
1.42517
1.42405
1.42355
1.42368
1.42446
1.42589
1.42795
1.43062
1.43384
1.43754
1.44161
1.44586
1.45007
1.45392
1.45706
1.45911
1.45974
1.45875
1.45613
1.45206
1.44685
1.44095
1.4348
1.42879
1.42321
1.41826
1.41402
1.41052
1.4077
1.4055
1.40382
1.40257
1.40167
1.40103
1.40059
1.4003
1.40012
1.40001
1.39995
1.39992
1.39992
1.39992
1.39993
1.39994
1.39995
1.39996
1.39997
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40003
1.40003
1.40004
1.40006
1.40008
1.4001
1.40013
1.40016
1.40021
1.40026
1.40034
1.40045
1.40062
1.40088
1.40126
1.40185
1.40271
1.40395
1.4057
1.40809
1.41124
1.41525
1.42014
1.42583
1.4321
1.43857
1.44479
1.45028
1.45463
1.45757
1.45897
1.45885
1.45735
1.45469
1.45114
1.44697
1.44244
1.43778
1.43319
1.42883
1.42482
1.42127
1.41823
1.41577
1.41392
1.4127
1.41215
1.41227
1.41308
1.41459
1.41681
1.4197
1.42326
1.42744
1.43214
1.43724
1.44254
1.44776
1.45254
1.45643
1.459
1.45989
1.45892
1.4561
1.4517
1.44615
1.43994
1.43356
1.42743
1.42184
1.41695
1.41283
1.40948
1.40683
1.40479
1.40326
1.40215
1.40135
1.4008
1.40043
1.4002
1.40005
1.39997
1.39993
1.39991
1.39991
1.39992
1.39993
1.39995
1.39996
1.39997
1.39998
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40005
1.40007
1.40009
1.40011
1.40014
1.40018
1.40023
1.4003
1.4004
1.40054
1.40075
1.40107
1.40156
1.4023
1.40337
1.40492
1.40707
1.40998
1.41376
1.41849
1.42414
1.43051
1.43724
1.44383
1.44973
1.45443
1.45759
1.45902
1.45873
1.45686
1.45368
1.44947
1.44455
1.43921
1.43372
1.4283
1.42312
1.41832
1.414
1.41022
1.40702
1.40446
1.40253
1.40126
1.40067
1.40077
1.40157
1.4031
1.40536
1.40837
1.41211
1.41656
1.42168
1.42737
1.43349
1.4398
1.44598
1.45157
1.45608
1.459
1.45997
1.45882
1.45567
1.45087
1.44493
1.43844
1.4319
1.42573
1.4202
1.41546
1.41153
1.40839
1.40594
1.40409
1.40272
1.40174
1.40106
1.4006
1.4003
1.40011
1.4
1.39994
1.39991
1.39991
1.39992
1.39993
1.39994
1.39995
1.39996
1.39997
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40006
1.40007
1.4001
1.40013
1.40016
1.40021
1.40027
1.40035
1.40046
1.40064
1.4009
1.4013
1.40192
1.40283
1.40417
1.40606
1.40868
1.41217
1.41665
1.42213
1.4285
1.43541
1.44235
1.4487
1.45386
1.45736
1.45897
1.45866
1.45657
1.45298
1.44821
1.44263
1.43656
1.43031
1.42411
1.41816
1.41262
1.40757
1.40309
1.39923
1.39599
1.3934
1.39146
1.39017
1.38955
1.38961
1.39037
1.39185
1.39408
1.39709
1.40088
1.40545
1.41078
1.41683
1.42349
1.4306
1.43787
1.4449
1.45117
1.4561
1.45915
1.45995
1.45843
1.4548
1.44953
1.44321
1.43648
1.42986
1.42374
1.41837
1.41384
1.41017
1.40727
1.40506
1.40341
1.40221
1.40137
1.4008
1.40042
1.40018
1.40004
1.39996
1.39992
1.39991
1.39991
1.39992
1.39993
1.39995
1.39996
1.39997
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40003
1.40003
1.40005
1.40006
1.40008
1.40011
1.40014
1.40018
1.40023
1.4003
1.4004
1.40054
1.40075
1.40108
1.40158
1.40234
1.40347
1.4051
1.4074
1.41054
1.41467
1.41988
1.42612
1.4331
1.44034
1.44716
1.45286
1.45687
1.45883
1.45868
1.45653
1.45268
1.44749
1.44134
1.43463
1.42767
1.42075
1.41409
1.40784
1.40212
1.397
1.39251
1.38867
1.38548
1.38293
1.38102
1.37973
1.37908
1.37908
1.37976
1.38115
1.38327
1.38618
1.38991
1.39447
1.39986
1.40608
1.41305
1.42067
1.42872
1.43687
1.44463
1.45138
1.45649
1.45939
1.45979
1.4577
1.45347
1.44768
1.44101
1.43411
1.42751
1.42154
1.41641
1.41217
1.40879
1.40617
1.40421
1.40277
1.40175
1.40105
1.40058
1.40027
1.40009
1.39998
1.39993
1.39991
1.39991
1.39992
1.39993
1.39994
1.39996
1.39997
1.39998
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40005
1.40007
1.40009
1.40012
1.40015
1.4002
1.40026
1.40034
1.40046
1.40063
1.40089
1.40129
1.40191
1.40284
1.40421
1.40618
1.40894
1.41267
1.41749
1.42345
1.43036
1.4378
1.44507
1.45138
1.45603
1.45855
1.45875
1.45675
1.45281
1.44734
1.44076
1.43349
1.4259
1.41831
1.41097
1.40406
1.3977
1.39198
1.38692
1.38254
1.37882
1.37574
1.37327
1.37141
1.37014
1.36946
1.36939
1.36995
1.37119
1.37315
1.37589
1.37945
1.38388
1.38921
1.39544
1.40254
1.41044
1.419
1.42795
1.43687
1.44518
1.45218
1.45717
1.45964
1.45938
1.45654
1.45163
1.44533
1.43837
1.43141
1.42492
1.41921
1.41439
1.4105
1.40744
1.40513
1.40342
1.40219
1.40134
1.40076
1.40039
1.40016
1.40002
1.39995
1.39992
1.39991
1.39991
1.39992
1.39994
1.39995
1.39996
1.39997
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40006
1.40007
1.4001
1.40013
1.40017
1.40022
1.40029
1.40038
1.40052
1.40073
1.40104
1.40154
1.40229
1.40341
1.40507
1.40743
1.4107
1.41506
1.4206
1.42728
1.43476
1.44239
1.44934
1.45476
1.45802
1.45881
1.45717
1.45335
1.44778
1.4409
1.43318
1.42504
1.41683
1.40885
1.4013
1.39433
1.38803
1.38244
1.37756
1.37336
1.36982
1.36689
1.36454
1.36275
1.3615
1.36079
1.36063
1.36106
1.36212
1.36387
1.36637
1.36968
1.37388
1.37902
1.38513
1.39221
1.40022
1.40906
1.41854
1.42831
1.43786
1.4465
1.45344
1.458
1.45973
1.45858
1.45487
1.44925
1.44249
1.43535
1.42845
1.42219
1.41681
1.41238
1.40887
1.40617
1.40416
1.40271
1.40168
1.40099
1.40053
1.40024
1.40007
1.39997
1.39992
1.39991
1.39991
1.39992
1.39993
1.39995
1.39996
1.39997
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40006
1.40008
1.40011
1.40014
1.40019
1.40024
1.40032
1.40043
1.40059
1.40084
1.40123
1.40182
1.40272
1.40408
1.40605
1.40885
1.41268
1.4177
1.42397
1.4313
1.43915
1.44668
1.45294
1.45711
1.45873
1.4577
1.45424
1.44876
1.44175
1.43371
1.4251
1.41634
1.40775
1.39958
1.39201
1.38514
1.37903
1.37367
1.36903
1.36508
1.36175
1.359
1.35679
1.35507
1.35385
1.35311
1.35287
1.35317
1.35403
1.35554
1.35775
1.36075
1.36463
1.36947
1.37534
1.38226
1.39022
1.39916
1.40895
1.41931
1.4298
1.43977
1.44844
1.455
1.45878
1.45949
1.45727
1.45263
1.44634
1.43923
1.43204
1.42532
1.4194
1.41444
1.41044
1.40734
1.405
1.40329
1.40208
1.40125
1.4007
1.40034
1.40013
1.4
1.39994
1.39991
1.39991
1.39992
1.39993
1.39994
1.39996
1.39997
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40003
1.40004
1.40005
1.40007
1.40009
1.40012
1.40015
1.4002
1.40026
1.40035
1.40048
1.40067
1.40097
1.40143
1.40214
1.40323
1.40484
1.40717
1.41044
1.41487
1.42058
1.42755
1.43539
1.44336
1.45046
1.45568
1.45834
1.45819
1.45535
1.4502
1.44325
1.43504
1.42608
1.41682
1.40766
1.39888
1.39071
1.38327
1.37663
1.3708
1.36574
1.36141
1.35772
1.35462
1.35205
1.34996
1.34832
1.34712
1.34636
1.34606
1.34624
1.34694
1.34821
1.35013
1.35279
1.35628
1.36074
1.36624
1.37286
1.38063
1.38951
1.39941
1.41013
1.42128
1.43232
1.44245
1.45081
1.4566
1.45927
1.45874
1.45534
1.44978
1.44292
1.43562
1.42853
1.42212
1.41664
1.41215
1.40862
1.40594
1.40396
1.40254
1.40155
1.40089
1.40046
1.4002
1.40004
1.39996
1.39992
1.39991
1.39992
1.39993
1.39994
1.39995
1.39997
1.39998
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40005
1.40007
1.40009
1.40013
1.40017
1.40022
1.40029
1.40039
1.40054
1.40077
1.40112
1.40166
1.40251
1.40379
1.40569
1.40841
1.4122
1.41726
1.42367
1.43125
1.43942
1.44723
1.45355
1.45746
1.45845
1.45651
1.45197
1.44532
1.43711
1.42793
1.41827
1.40858
1.39922
1.39043
1.38241
1.37522
1.3689
1.36341
1.35869
1.35466
1.35122
1.34832
1.34588
1.34388
1.34228
1.3411
1.34033
1.33999
1.34011
1.3407
1.34181
1.34349
1.34583
1.34894
1.35295
1.358
1.3642
1.37162
1.38029
1.39013
1.40099
1.41258
1.4244
1.43573
1.44568
1.45333
1.45797
1.45924
1.45729
1.45271
1.44634
1.43909
1.43176
1.42493
1.41896
1.41399
1.41002
1.40697
1.40469
1.40305
1.4019
1.40112
1.4006
1.40028
1.40009
1.39999
1.39993
1.39992
1.39992
1.39992
1.39994
1.39995
1.39996
1.39997
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40006
1.40008
1.4001
1.40013
1.40018
1.40024
1.40032
1.40043
1.4006
1.40087
1.40128
1.40193
1.40293
1.40443
1.40664
1.40979
1.41413
1.41983
1.42689
1.43497
1.44326
1.45061
1.45586
1.45825
1.45752
1.45388
1.44779
1.43982
1.43059
1.42065
1.4105
1.40057
1.39118
1.38253
1.37476
1.36792
1.36198
1.35685
1.35246
1.34868
1.34543
1.34262
1.34022
1.3382
1.33656
1.33534
1.33455
1.33422
1.33436
1.33497
1.33605
1.33764
1.33978
1.34258
1.34618
1.35074
1.35643
1.36338
1.37167
1.38128
1.3921
1.40391
1.41627
1.42853
1.43982
1.44916
1.45568
1.45881
1.45846
1.45506
1.44939
1.44239
1.43495
1.42779
1.42137
1.41593
1.41152
1.40808
1.4055
1.40361
1.40228
1.40137
1.40077
1.40038
1.40015
1.40002
1.39995
1.39992
1.39992
1.39992
1.39994
1.39995
1.39996
1.39997
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40006
1.40008
1.40011
1.40014
1.40019
1.40025
1.40034
1.40047
1.40067
1.40098
1.40147
1.40222
1.40339
1.40513
1.40768
1.41129
1.4162
1.42254
1.4302
1.43863
1.44677
1.45337
1.45733
1.45811
1.4557
1.45048
1.44302
1.43395
1.42388
1.41338
1.40293
1.39293
1.38364
1.37526
1.36785
1.36139
1.35584
1.35105
1.3469
1.34326
1.34002
1.33712
1.33454
1.3323
1.33047
1.3291
1.32827
1.32799
1.32828
1.3291
1.3304
1.33215
1.33433
1.33702
1.34033
1.34446
1.34963
1.35603
1.36381
1.37302
1.38363
1.39545
1.40812
1.42106
1.43344
1.44427
1.45254
1.4575
1.45885
1.45679
1.452
1.44543
1.43803
1.43064
1.42383
1.41794
1.4131
1.40928
1.40637
1.40423
1.40271
1.40166
1.40095
1.4005
1.40022
1.40006
1.39997
1.39993
1.39992
1.39992
1.39993
1.39995
1.39996
1.39997
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40005
1.40006
1.40008
1.40011
1.40015
1.4002
1.40027
1.40037
1.40052
1.40075
1.4011
1.40167
1.40254
1.40389
1.4059
1.40882
1.41291
1.4184
1.42536
1.43352
1.4421
1.44984
1.45544
1.45799
1.45715
1.45315
1.44651
1.43786
1.42787
1.41716
1.40628
1.3957
1.38576
1.37671
1.36867
1.36166
1.35561
1.3504
1.34584
1.34177
1.33803
1.33451
1.33118
1.32807
1.3253
1.32301
1.32134
1.3204
1.32025
1.32088
1.32218
1.32404
1.32633
1.32893
1.33185
1.33516
1.33905
1.34378
1.34963
1.35682
1.36551
1.37573
1.38737
1.40014
1.41353
1.42676
1.43884
1.4487
1.45542
1.45848
1.45788
1.45414
1.44816
1.44095
1.43344
1.42631
1.42001
1.41475
1.41054
1.4073
1.4049
1.40317
1.40197
1.40116
1.40063
1.4003
1.4001
1.4
1.39995
1.39993
1.39993
1.39993
1.39995
1.39996
1.39997
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40005
1.40006
1.40009
1.40012
1.40016
1.40021
1.40029
1.4004
1.40056
1.40083
1.40123
1.40189
1.4029
1.40444
1.40673
1.41004
1.41463
1.4207
1.42824
1.43677
1.44528
1.45239
1.45684
1.45789
1.45549
1.45004
1.44214
1.43249
1.42176
1.41057
1.39947
1.38888
1.37914
1.37041
1.36277
1.35617
1.35048
1.3455
1.34098
1.33669
1.33246
1.3282
1.32393
1.3198
1.31604
1.31293
1.31074
1.30963
1.30971
1.31091
1.31308
1.31597
1.31931
1.32287
1.32652
1.33025
1.33424
1.33875
1.34414
1.35074
1.35883
1.36852
1.37982
1.39249
1.40611
1.41996
1.43306
1.44432
1.45268
1.45742
1.45834
1.45577
1.45054
1.44366
1.43613
1.42877
1.42211
1.41644
1.41185
1.40828
1.40561
1.40367
1.40231
1.40138
1.40077
1.40039
1.40016
1.40003
1.39996
1.39993
1.39993
1.39993
1.39995
1.39996
1.39997
1.39998
1.39998
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40003
1.40003
1.40005
1.40007
1.40009
1.40012
1.40016
1.40022
1.4003
1.40043
1.40061
1.40091
1.40138
1.40212
1.40328
1.40503
1.40763
1.41133
1.41643
1.42307
1.4311
1.43987
1.44812
1.4544
1.45758
1.45715
1.45328
1.44651
1.43752
1.42703
1.41573
1.40422
1.39303
1.38256
1.3731
1.36475
1.35753
1.3513
1.34586
1.3409
1.33609
1.33115
1.32587
1.32021
1.31432
1.3085
1.30319
1.29884
1.29586
1.29454
1.29497
1.29707
1.30057
1.30508
1.31014
1.31533
1.32036
1.32509
1.32964
1.33427
1.33943
1.34554
1.35301
1.3621
1.3729
1.38531
1.39895
1.41319
1.4271
1.43955
1.44941
1.45577
1.45821
1.4569
1.45254
1.44611
1.43869
1.43116
1.4242
1.41816
1.4132
1.40931
1.40636
1.4042
1.40267
1.40163
1.40093
1.40049
1.40022
1.40007
1.39998
1.39995
1.39993
1.39994
1.39995
1.39996
1.39997
1.39998
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40003
1.40004
1.40005
1.40007
1.40009
1.40013
1.40017
1.40023
1.40032
1.40046
1.40066
1.401
1.40153
1.40237
1.40368
1.40566
1.40857
1.41269
1.41829
1.42546
1.43391
1.44275
1.45056
1.45587
1.45773
1.45587
1.45065
1.44271
1.43278
1.42162
1.40988
1.39818
1.38703
1.37677
1.36765
1.35972
1.35289
1.34694
1.34155
1.3363
1.33074
1.32451
1.31743
1.30954
1.30117
1.29288
1.28536
1.2793
1.27528
1.27369
1.27466
1.27804
1.28344
1.29026
1.29782
1.30545
1.31264
1.3191
1.32481
1.33005
1.33529
1.3411
1.34802
1.35648
1.3667
1.37868
1.39217
1.4066
1.4211
1.43454
1.44573
1.4536
1.45755
1.45755
1.45415
1.44829
1.44107
1.43347
1.42626
1.41989
1.41458
1.41036
1.40713
1.40475
1.40306
1.40189
1.40111
1.4006
1.40029
1.40011
1.40001
1.39996
1.39994
1.39994
1.39995
1.39996
1.39997
1.39998
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40003
1.40004
1.40005
1.40007
1.4001
1.40013
1.40017
1.40024
1.40034
1.40049
1.40072
1.40109
1.40169
1.40264
1.40411
1.40632
1.40955
1.41409
1.42019
1.42785
1.4366
1.44536
1.45257
1.45683
1.45737
1.45417
1.44773
1.43876
1.42805
1.41634
1.4043
1.39253
1.38149
1.37153
1.36279
1.35525
1.34874
1.34291
1.3373
1.33131
1.32438
1.31608
1.30627
1.29516
1.28336
1.27174
1.26131
1.25304
1.24772
1.24583
1.24754
1.25264
1.26057
1.2705
1.28143
1.29242
1.30267
1.31168
1.3193
1.32574
1.3315
1.33729
1.3438
1.35165
1.36123
1.37269
1.38587
1.4003
1.41519
1.42943
1.44176
1.45103
1.45643
1.45775
1.45537
1.45018
1.44325
1.43566
1.42826
1.42159
1.41596
1.41142
1.40793
1.40533
1.40346
1.40216
1.40129
1.40072
1.40036
1.40015
1.40003
1.39998
1.39995
1.39994
1.39995
1.39996
1.39997
1.39998
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40003
1.40004
1.40005
1.40007
1.4001
1.40013
1.40018
1.40025
1.40035
1.40051
1.40077
1.40119
1.40186
1.40292
1.40455
1.407
1.41056
1.41552
1.42209
1.43018
1.43914
1.44767
1.45417
1.45732
1.45659
1.45216
1.44462
1.43477
1.4234
1.41128
1.39905
1.38729
1.37645
1.36682
1.35847
1.35129
1.34498
1.33903
1.3328
1.32552
1.31646
1.30517
1.29158
1.27618
1.25991
1.24406
1.23003
1.21907
1.21217
1.20996
1.21262
1.21989
1.23104
1.24494
1.26023
1.27556
1.28983
1.3023
1.31263
1.32095
1.32778
1.33391
1.34024
1.34757
1.35651
1.36736
1.38011
1.39439
1.40949
1.42433
1.43764
1.44816
1.45493
1.45754
1.45623
1.45176
1.44522
1.43772
1.43018
1.42326
1.41732
1.41249
1.40873
1.40591
1.40388
1.40245
1.40148
1.40085
1.40044
1.4002
1.40007
1.39999
1.39996
1.39995
1.39995
1.39996
1.39997
1.39998
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40005
1.40007
1.4001
1.40013
1.40018
1.40025
1.40037
1.40054
1.40083
1.40129
1.40204
1.4032
1.40501
1.40771
1.41159
1.41696
1.42398
1.43242
1.44147
1.44967
1.45537
1.45743
1.45549
1.44992
1.44143
1.43082
1.41892
1.40649
1.39416
1.38249
1.3719
1.36262
1.35465
1.34774
1.34144
1.33508
1.32777
1.31853
1.3065
1.2912
1.27273
1.25192
1.23017
1.20923
1.19093
1.17682
1.1681
1.1655
1.16928
1.17916
1.19422
1.213
1.23367
1.25441
1.27371
1.29055
1.30442
1.31535
1.32384
1.33076
1.33719
1.34416
1.3525
1.3627
1.37493
1.38894
1.40408
1.41935
1.43346
1.44508
1.45312
1.45699
1.45675
1.45306
1.44696
1.43961
1.432
1.42487
1.41866
1.41355
1.40954
1.40651
1.4043
1.40274
1.40168
1.40098
1.40053
1.40026
1.4001
1.40001
1.39997
1.39996
1.39996
1.39996
1.39997
1.39998
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40005
1.40007
1.4001
1.40013
1.40018
1.40026
1.40038
1.40057
1.40088
1.40139
1.40221
1.4035
1.40547
1.40842
1.41262
1.41838
1.42581
1.43455
1.44358
1.45135
1.45623
1.45721
1.45415
1.44757
1.43823
1.42699
1.41466
1.40201
1.38966
1.37813
1.36782
1.3589
1.35125
1.3445
1.338
1.33085
1.32194
1.31004
1.29414
1.27379
1.24935
1.22207
1.19389
1.16713
1.14399
1.12635
1.11556
1.11247
1.11746
1.13026
1.14984
1.17437
1.20147
1.22872
1.25409
1.27622
1.29443
1.30868
1.31943
1.32764
1.33452
1.34133
1.34915
1.35872
1.37036
1.38398
1.39903
1.41457
1.42932
1.4419
1.4511
1.45615
1.45696
1.45408
1.44848
1.44133
1.4337
1.42641
1.41996
1.41459
1.41033
1.4071
1.40472
1.40304
1.40188
1.40111
1.40062
1.40031
1.40014
1.40004
1.39999
1.39997
1.39996
1.39996
1.39997
1.39998
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40005
1.40007
1.40009
1.40013
1.40019
1.40026
1.40039
1.4006
1.40094
1.40149
1.40239
1.40379
1.40594
1.40912
1.41364
1.41977
1.42756
1.43652
1.44547
1.45273
1.45678
1.45674
1.45266
1.44517
1.43511
1.42333
1.41067
1.39787
1.38555
1.37421
1.36419
1.3556
1.34821
1.34146
1.3345
1.32618
1.31513
1.29985
1.27922
1.25286
1.22145
1.18678
1.15143
1.11827
1.08991
1.06843
1.05533
1.05162
1.05779
1.07367
1.09817
1.12914
1.16363
1.19846
1.23094
1.25928
1.2826
1.3008
1.31439
1.32436
1.33206
1.33897
1.34641
1.35537
1.36639
1.37955
1.3944
1.41007
1.42531
1.4387
1.44893
1.45509
1.45692
1.45484
1.44977
1.44288
1.43527
1.42785
1.4212
1.41559
1.41111
1.40767
1.40514
1.40333
1.40208
1.40125
1.40071
1.40037
1.40017
1.40006
1.4
1.39998
1.39997
1.39997
1.39997
1.39998
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40005
1.40007
1.40009
1.40013
1.40018
1.40027
1.4004
1.40062
1.40099
1.40159
1.40256
1.40408
1.40639
1.40981
1.41463
1.4211
1.42921
1.43833
1.44712
1.45385
1.45707
1.45609
1.45108
1.44279
1.43212
1.4199
1.40697
1.39408
1.38185
1.37072
1.36097
1.35268
1.34546
1.33855
1.33085
1.32096
1.30723
1.28794
1.26183
1.22863
1.18946
1.14675
1.10376
1.06389
1.03009
1.00461
0.989067
0.984601
0.991847
1.01076
1.04028
1.07803
1.12055
1.16385
1.20441
1.23984
1.26899
1.29173
1.30864
1.3208
1.32969
1.33695
1.34417
1.3526
1.36301
1.37564
1.3902
1.40589
1.42149
1.43555
1.44669
1.45386
1.45666
1.45537
1.45085
1.44424
1.43671
1.4292
1.42236
1.41655
1.41185
1.40824
1.40555
1.40362
1.40229
1.40139
1.4008
1.40044
1.40021
1.40009
1.40002
1.39999
1.39997
1.39997
1.39998
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40005
1.40006
1.40009
1.40012
1.40018
1.40027
1.40041
1.40065
1.40104
1.40169
1.40273
1.40436
1.40683
1.41048
1.41558
1.42237
1.43075
1.43997
1.44854
1.45472
1.45717
1.45532
1.44948
1.4405
1.42931
1.41674
1.4036
1.39067
1.37855
1.36762
1.35814
1.35007
1.34293
1.33569
1.32698
1.31516
1.29831
1.27449
1.24232
1.20172
1.1543
1.10322
1.05244
1.00585
0.966637
0.937217
0.919294
0.914073
0.922296
0.944041
0.978322
1.02271
1.07337
1.12559
1.17492
1.21817
1.25379
1.28158
1.30221
1.31692
1.3273
1.33518
1.34236
1.35035
1.36018
1.37226
1.38646
1.40207
1.41791
1.43252
1.44445
1.45254
1.45624
1.45571
1.45173
1.44543
1.43799
1.43043
1.42344
1.41744
1.41256
1.40877
1.40594
1.40391
1.40248
1.40152
1.4009
1.4005
1.40025
1.40011
1.40004
1.4
1.39998
1.39998
1.39998
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40006
1.40009
1.40012
1.40018
1.40027
1.40041
1.40067
1.40109
1.40177
1.40289
1.40463
1.40725
1.4111
1.41648
1.42354
1.43214
1.44141
1.44975
1.45539
1.4571
1.45448
1.44792
1.43833
1.42671
1.41386
1.40056
1.38761
1.37562
1.36491
1.35565
1.34775
1.34057
1.33284
1.3229
1.30884
1.28854
1.25985
1.22132
1.17308
1.11731
1.05792
0.999558
0.946512
0.902237
0.869255
0.849291
0.843521
0.852687
0.876942
0.915423
0.965787
1.02406
1.085
1.14329
1.19478
1.23733
1.27054
1.29521
1.31273
1.32485
1.33357
1.34089
1.34856
1.35785
1.36939
1.38319
1.39864
1.41461
1.42967
1.44227
1.45117
1.4557
1.45589
1.45244
1.44645
1.43913
1.43154
1.42443
1.41827
1.41322
1.40927
1.40632
1.40417
1.40267
1.40166
1.40098
1.40056
1.4003
1.40014
1.40006
1.40001
1.39999
1.39998
1.39998
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40006
1.40008
1.40011
1.40017
1.40026
1.40041
1.40068
1.40113
1.40185
1.40303
1.40488
1.40764
1.41168
1.4173
1.42462
1.43339
1.44267
1.45077
1.45589
1.45693
1.45364
1.44644
1.43633
1.42435
1.41129
1.39788
1.38492
1.37306
1.36256
1.35347
1.34565
1.33835
1.33002
1.31868
1.30217
1.27822
1.24456
1.19968
1.14394
1.08013
1.0129
0.947484
0.888585
0.839907
0.804055
0.78265
0.776698
0.786834
0.813215
0.855114
0.910393
0.975182
1.04401
1.11081
1.17051
1.22012
1.25896
1.28782
1.3083
1.32234
1.33207
1.33969
1.34716
1.35597
1.36699
1.38036
1.3956
1.41164
1.42703
1.44019
1.44981
1.45507
1.45593
1.45298
1.4473
1.44012
1.43252
1.42532
1.41902
1.41382
1.40974
1.40666
1.40443
1.40285
1.40178
1.40107
1.40062
1.40034
1.40017
1.40007
1.40002
1.4
1.39999
1.39999
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40005
1.40007
1.40011
1.40016
1.40026
1.40042
1.40069
1.40116
1.40193
1.40316
1.4051
1.408
1.4122
1.41804
1.42557
1.43448
1.44375
1.45161
1.45625
1.45669
1.45282
1.4451
1.43454
1.42224
1.40904
1.39556
1.38259
1.37084
1.36053
1.35159
1.34377
1.33626
1.32726
1.31442
1.29538
1.26776
1.22925
1.17836
1.1157
1.04458
0.970312
0.898685
0.834808
0.78264
0.744793
0.722644
0.716899
0.728006
0.756093
0.800556
0.859523
0.929404
1.00477
1.07909
1.14641
1.20288
1.24726
1.28031
1.30378
1.3198
1.33066
1.3387
1.34607
1.3545
1.36503
1.37798
1.39297
1.40901
1.42464
1.43827
1.4485
1.45442
1.45587
1.45338
1.44801
1.44096
1.43337
1.4261
1.41969
1.41436
1.41016
1.40698
1.40466
1.40302
1.4019
1.40115
1.40068
1.40038
1.4002
1.40009
1.40004
1.40001
1.4
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40007
1.4001
1.40015
1.40025
1.40042
1.4007
1.40119
1.40199
1.40327
1.4053
1.40831
1.41266
1.41867
1.42641
1.43542
1.44463
1.45228
1.45652
1.45643
1.45205
1.44392
1.43298
1.42042
1.40711
1.39361
1.38061
1.36894
1.35881
1.34998
1.34209
1.33428
1.3246
1.31031
1.28876
1.2576
1.2146
1.15836
1.08971
1.01238
0.932205
0.855452
0.787641
0.732974
0.693973
0.671661
0.666384
0.678381
0.707741
0.753967
0.815445
0.888947
0.969278
1.04974
1.12369
1.18639
1.23598
1.27301
1.29935
1.31731
1.32933
1.33788
1.34526
1.35337
1.36346
1.37601
1.39074
1.40673
1.42253
1.43654
1.44728
1.45376
1.45573
1.45367
1.44857
1.44166
1.43409
1.42677
1.42026
1.41483
1.41052
1.40725
1.40486
1.40317
1.402
1.40123
1.40073
1.40042
1.40022
1.40011
1.40005
1.40002
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40006
1.40009
1.40014
1.40024
1.40041
1.4007
1.40121
1.40204
1.40336
1.40546
1.40858
1.41305
1.4192
1.4271
1.4362
1.44535
1.4528
1.45672
1.45619
1.45137
1.44291
1.43169
1.41889
1.4055
1.39201
1.37901
1.36734
1.35736
1.34864
1.34062
1.33246
1.32212
1.30652
1.28267
1.24823
1.20124
1.14053
1.06712
0.984981
0.900273
0.819625
0.748949
0.692656
0.653111
0.630959
0.626198
0.638891
0.669106
0.716438
0.779482
0.85533
0.939111
1.02418
1.10347
1.17148
1.22565
1.26627
1.29521
1.31497
1.32812
1.3372
1.34467
1.35255
1.36226
1.37443
1.38891
1.40481
1.42073
1.43503
1.44618
1.45314
1.45556
1.45385
1.449
1.44221
1.43468
1.42732
1.42074
1.41522
1.41083
1.40749
1.40504
1.4033
1.4021
1.4013
1.40078
1.40045
1.40025
1.40013
1.40007
1.40003
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40003
1.40003
1.40005
1.40008
1.40013
1.40023
1.4004
1.40069
1.40121
1.40207
1.40343
1.40557
1.40878
1.41336
1.41963
1.42764
1.43681
1.44591
1.45319
1.45686
1.45599
1.45081
1.44209
1.43068
1.41769
1.4042
1.39077
1.37778
1.36607
1.35616
1.34756
1.33941
1.33082
1.31988
1.30323
1.27746
1.24016
1.18978
1.12556
1.04872
0.963339
0.87561
0.792362
0.719813
0.662533
0.622751
0.600797
0.596395
0.609499
0.6402
0.688166
0.752109
0.829335
0.915277
1.00349
1.08672
1.15889
1.21682
1.26043
1.2916
1.31291
1.32706
1.33667
1.34426
1.35198
1.36138
1.37322
1.38745
1.40325
1.41924
1.43376
1.44525
1.45258
1.45536
1.45395
1.44931
1.44264
1.43514
1.42776
1.42112
1.41554
1.41109
1.40769
1.40519
1.40341
1.40218
1.40136
1.40082
1.40048
1.40028
1.40015
1.40008
1.40004
1.40002
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40003
1.40004
1.40007
1.40012
1.40021
1.40039
1.40069
1.40121
1.40209
1.40348
1.40565
1.40893
1.41359
1.41994
1.42802
1.43727
1.44633
1.45346
1.45695
1.45585
1.4504
1.44147
1.42995
1.41682
1.40323
1.38984
1.37692
1.36513
1.35518
1.34669
1.33847
1.32946
1.31794
1.30055
1.27342
1.23388
1.18074
1.11389
1.03491
0.947805
0.85858
0.77401
0.700469
0.642651
0.602724
0.580837
0.576544
0.589755
0.620628
0.668904
0.733313
0.811232
0.898307
0.988345
1.07412
1.14921
1.20993
1.25583
1.2887
1.31123
1.3262
1.33629
1.34402
1.35163
1.36079
1.37236
1.38637
1.40206
1.41808
1.43276
1.44448
1.4521
1.45516
1.45399
1.4495
1.44293
1.43546
1.42807
1.4214
1.41577
1.41128
1.40784
1.4053
1.4035
1.40225
1.40141
1.40086
1.40051
1.4003
1.40017
1.40009
1.40005
1.40002
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40003
1.40006
1.40011
1.4002
1.40037
1.40068
1.4012
1.40208
1.4035
1.4057
1.40901
1.41373
1.42013
1.42826
1.43755
1.4466
1.45362
1.457
1.45579
1.45015
1.44106
1.42949
1.41631
1.4026
1.38922
1.37641
1.36455
1.35445
1.34601
1.33783
1.32846
1.31639
1.29855
1.27074
1.22979
1.17465
1.10593
1.02577
0.938197
0.848823
0.764131
0.690437
0.632491
0.592497
0.570572
0.566193
0.579265
0.610044
0.658362
0.722918
0.801023
0.88841
0.979132
1.06613
1.14288
1.20532
1.25269
1.28668
1.31004
1.32561
1.33606
1.34393
1.35149
1.36046
1.37181
1.38564
1.40123
1.41725
1.43202
1.44391
1.45172
1.45498
1.45397
1.4496
1.44309
1.43565
1.42826
1.42158
1.41592
1.4114
1.40794
1.40538
1.40356
1.4023
1.40145
1.4009
1.40054
1.40032
1.40018
1.4001
1.40006
1.40003
1.40002
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40002
1.40005
1.40009
1.40018
1.40035
1.40065
1.40118
1.40206
1.40349
1.4057
1.40902
1.41377
1.4202
1.42834
1.43765
1.44672
1.45371
1.45702
1.45579
1.4501
1.44089
1.42928
1.41613
1.40236
1.38892
1.37621
1.36436
1.35402
1.34548
1.33743
1.32793
1.31537
1.29725
1.26943
1.22814
1.172
1.10214
1.02145
0.934174
0.84562
0.761817
0.688812
0.631279
0.591489
0.56961
0.565106
0.577883
0.608324
0.65639
0.720757
0.798589
0.885585
0.975988
1.063
1.14014
1.20319
1.25117
1.28566
1.30942
1.32531
1.336
1.34399
1.35153
1.36038
1.37157
1.38526
1.40077
1.41677
1.43158
1.44355
1.45146
1.45482
1.4539
1.4496
1.44313
1.43571
1.42833
1.42164
1.41599
1.41146
1.40799
1.40543
1.4036
1.40234
1.40148
1.40092
1.40056
1.40034
1.4002
1.40012
1.40007
1.40004
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40003
1.40008
1.40016
1.40032
1.40063
1.40115
1.40202
1.40345
1.40566
1.40897
1.41372
1.42015
1.42828
1.43758
1.44669
1.45371
1.45703
1.45586
1.45022
1.44098
1.42934
1.41626
1.4025
1.38896
1.37628
1.36451
1.35398
1.34517
1.3372
1.32784
1.31505
1.29674
1.26937
1.22885
1.17304
1.10303
1.02236
0.935766
0.848536
0.766335
0.694815
0.638414
0.599349
0.577824
0.573305
0.585721
0.615587
0.663028
0.726751
0.803774
0.889682
0.97884
1.06473
1.14109
1.20366
1.25136
1.28569
1.30941
1.32535
1.33614
1.34419
1.35174
1.36053
1.37163
1.38522
1.40066
1.41662
1.43142
1.4434
1.45133
1.4547
1.45379
1.4495
1.44305
1.43564
1.42828
1.42161
1.41597
1.41145
1.40799
1.40544
1.40362
1.40236
1.4015
1.40094
1.40058
1.40035
1.40021
1.40013
1.40008
1.40005
1.40003
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40002
1.40006
1.40014
1.4003
1.40059
1.40111
1.40197
1.40338
1.40558
1.40885
1.41356
1.41997
1.42807
1.43735
1.4465
1.45361
1.45703
1.45597
1.4505
1.44134
1.42969
1.41667
1.403
1.3894
1.37665
1.36495
1.35434
1.34517
1.33711
1.3281
1.31551
1.29722
1.2705
1.23157
1.17759
1.1089
1.02914
0.943622
0.857959
0.77778
0.708398
0.653865
0.616131
0.595329
0.590954
0.602982
0.632035
0.678408
0.740901
0.816444
0.900493
0.987483
1.07119
1.14563
1.20669
1.25325
1.28679
1.31002
1.32573
1.33647
1.34455
1.35212
1.36091
1.37198
1.38553
1.40091
1.41682
1.43155
1.44346
1.45131
1.45461
1.45364
1.44931
1.44284
1.43545
1.42811
1.42147
1.41586
1.41138
1.40795
1.40542
1.40361
1.40236
1.40151
1.40095
1.40059
1.40036
1.40022
1.40014
1.40008
1.40005
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.4
1.40001
1.40004
1.40012
1.40027
1.40055
1.40106
1.4019
1.40328
1.40545
1.40868
1.41332
1.41966
1.4277
1.43695
1.44614
1.45341
1.45703
1.45616
1.45091
1.44195
1.43036
1.41737
1.40381
1.39025
1.37737
1.36565
1.35506
1.34562
1.33726
1.32854
1.31662
1.29886
1.27295
1.23597
1.18496
1.11933
1.04204
0.958527
0.874907
0.797124
0.730379
0.678249
0.642225
0.622314
0.61812
0.629699
0.657706
0.702548
0.763148
0.836428
0.917762
1.00163
1.0821
1.15356
1.21212
1.25675
1.28889
1.31122
1.32646
1.33701
1.34508
1.35269
1.36153
1.37262
1.38617
1.40152
1.41736
1.43198
1.44374
1.45142
1.45455
1.45345
1.44903
1.44252
1.43512
1.42782
1.42122
1.41567
1.41124
1.40785
1.40536
1.40358
1.40234
1.40151
1.40096
1.4006
1.40037
1.40023
1.40014
1.40009
1.40006
1.40004
1.40003
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39998
1.4
1.40002
1.40009
1.40024
1.40051
1.401
1.40182
1.40316
1.40528
1.40845
1.413
1.41923
1.42719
1.43639
1.44563
1.45309
1.45699
1.45641
1.45145
1.44276
1.43134
1.41839
1.40491
1.39145
1.37851
1.36664
1.35604
1.34651
1.33783
1.32916
1.31808
1.3015
1.2769
1.24202
1.19452
1.13329
1.0603
0.980422
0.899963
0.825299
0.761683
0.712196
0.677852
0.658673
0.654528
0.665547
0.692295
0.735182
0.793234
0.863424
0.941116
1.02089
1.09711
1.16456
1.21972
1.26168
1.2919
1.31298
1.32752
1.33777
1.34578
1.35345
1.36239
1.37356
1.38716
1.4025
1.41824
1.4327
1.44422
1.45164
1.45452
1.4532
1.44864
1.44207
1.43467
1.4274
1.42088
1.4154
1.41104
1.40771
1.40527
1.40352
1.40231
1.4015
1.40096
1.40061
1.40038
1.40024
1.40015
1.4001
1.40006
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39998
1.39997
1.39998
1.40001
1.40007
1.4002
1.40046
1.40093
1.40172
1.40302
1.40507
1.40815
1.4126
1.41869
1.42652
1.43566
1.44496
1.45263
1.45688
1.45671
1.45211
1.44377
1.43262
1.41977
1.40631
1.39296
1.38005
1.36803
1.35729
1.34773
1.33891
1.33015
1.31974
1.30474
1.28217
1.24985
1.20604
1.14984
1.0825
1.00799
0.932297
0.861963
0.802135
0.755376
0.722432
0.703685
0.699428
0.709796
0.735112
0.775682
0.830602
0.896913
0.970025
1.0447
1.11567
1.1782
1.22914
1.2678
1.29566
1.31521
1.32888
1.33875
1.34667
1.35443
1.36351
1.37483
1.3885
1.40383
1.41946
1.43369
1.4449
1.45196
1.4545
1.4529
1.44816
1.44149
1.43409
1.42688
1.42044
1.41505
1.41078
1.40753
1.40514
1.40345
1.40227
1.40147
1.40095
1.4006
1.40038
1.40025
1.40016
1.4001
1.40007
1.40005
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39998
1.39997
1.39997
1.39997
1.39999
1.40005
1.40017
1.40041
1.40085
1.40161
1.40286
1.40483
1.4078
1.41211
1.41805
1.42571
1.43477
1.44412
1.45203
1.45669
1.45701
1.45288
1.44494
1.43413
1.42149
1.40807
1.39474
1.38193
1.36986
1.35891
1.34923
1.34041
1.33166
1.3217
1.3082
1.2882
1.25918
1.21949
1.16857
1.10746
1.03946
0.970008
0.905315
0.850006
0.806081
0.774401
0.756015
0.751664
0.761361
0.785098
0.823032
0.874305
0.936021
1.00368
1.0723
1.1371
1.1939
1.23997
1.27484
1.30001
1.31782
1.33052
1.33994
1.34779
1.35565
1.36492
1.37642
1.39021
1.40553
1.42101
1.43494
1.44575
1.45236
1.45447
1.45253
1.44756
1.44079
1.43339
1.42624
1.4199
1.41463
1.41046
1.40731
1.40499
1.40335
1.40221
1.40144
1.40093
1.4006
1.40039
1.40025
1.40016
1.40011
1.40007
1.40005
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39997
1.39997
1.39996
1.39996
1.39997
1.40002
1.40014
1.40036
1.40077
1.40149
1.40268
1.40456
1.40741
1.41156
1.4173
1.42477
1.4337
1.44309
1.45127
1.4564
1.4573
1.45373
1.44628
1.43587
1.42351
1.4102
1.39687
1.38409
1.37207
1.36099
1.35108
1.34221
1.33363
1.32412
1.31188
1.29443
1.26922
1.23434
1.18913
1.13458
1.07367
1.01136
0.953199
0.9029
0.862007
0.831805
0.814073
0.809824
0.818841
0.840816
0.875799
0.922951
0.979423
1.04085
1.10263
1.16053
1.21096
1.25168
1.28245
1.30474
1.32073
1.33239
1.34137
1.34914
1.35715
1.36665
1.37837
1.39229
1.4076
1.42288
1.43644
1.44675
1.45281
1.45441
1.45207
1.44684
1.43996
1.43256
1.42549
1.41928
1.41414
1.4101
1.40704
1.40481
1.40323
1.40214
1.4014
1.40091
1.40059
1.40038
1.40025
1.40017
1.40011
1.40008
1.40005
1.40004
1.40003
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39997
1.39996
1.39995
1.39995
1.39996
1.4
1.4001
1.40031
1.40069
1.40137
1.40249
1.40426
1.40698
1.41094
1.41647
1.42372
1.43247
1.44187
1.45033
1.45598
1.45751
1.45461
1.44775
1.43781
1.42579
1.41268
1.39938
1.38656
1.37457
1.36349
1.3534
1.34435
1.33589
1.32695
1.3159
1.30074
1.27927
1.24953
1.21055
1.16305
1.10976
1.05516
1.00389
0.958759
0.92115
0.892886
0.876248
0.872269
0.88048
0.900425
0.932138
0.974756
1.02544
1.08002
1.13438
1.1849
1.22862
1.26376
1.29029
1.30966
1.32382
1.33448
1.34303
1.35076
1.35895
1.36873
1.3807
1.39476
1.41003
1.42505
1.43815
1.44787
1.45329
1.4543
1.4515
1.44599
1.43899
1.43161
1.42464
1.41857
1.41358
1.40968
1.40675
1.40461
1.4031
1.40206
1.40135
1.40088
1.40058
1.40038
1.40025
1.40017
1.40011
1.40008
1.40005
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39997
1.39996
1.39995
1.39994
1.39994
1.39998
1.40007
1.40025
1.40061
1.40123
1.40228
1.40395
1.40651
1.41028
1.41555
1.42255
1.4311
1.44047
1.44918
1.45538
1.45764
1.45548
1.44931
1.43994
1.42833
1.41548
1.40227
1.38941
1.37737
1.36631
1.35619
1.34697
1.33848
1.33
1.32012
1.30712
1.28908
1.26423
1.23155
1.19149
1.14635
1.09981
1.0555
1.01561
0.981631
0.955818
0.940641
0.93697
0.944165
0.961791
0.989944
1.0277
1.07219
1.11953
1.16615
1.20912
1.24608
1.27567
1.29805
1.3146
1.32703
1.33677
1.34495
1.35268
1.3611
1.37118
1.38343
1.39763
1.41281
1.4275
1.44005
1.44906
1.45375
1.4541
1.45081
1.445
1.43789
1.43054
1.4237
1.41779
1.41297
1.40923
1.40642
1.40439
1.40295
1.40197
1.4013
1.40085
1.40056
1.40037
1.40025
1.40017
1.40012
1.40008
1.40006
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39998
1.39997
1.39995
1.39994
1.39993
1.39993
1.39996
1.40004
1.4002
1.40052
1.4011
1.40207
1.40363
1.40603
1.40957
1.41458
1.42127
1.42959
1.43887
1.44781
1.45457
1.45763
1.45631
1.45091
1.4422
1.4311
1.41856
1.4055
1.39265
1.38054
1.36942
1.3593
1.35006
1.34154
1.33331
1.3244
1.31334
1.29843
1.27806
1.25134
1.21864
1.18162
1.14301
1.10555
1.07105
1.04114
1.01828
1.00485
1.00148
1.00748
1.02261
1.04705
1.07973
1.11779
1.15775
1.19664
1.23221
1.26264
1.28696
1.30547
1.31943
1.33031
1.33925
1.34715
1.35494
1.36362
1.37405
1.38658
1.40088
1.41593
1.4302
1.4421
1.4503
1.45415
1.45379
1.44997
1.44386
1.43665
1.42935
1.42266
1.41694
1.41231
1.40874
1.40607
1.40415
1.4028
1.40187
1.40124
1.40082
1.40054
1.40036
1.40025
1.40017
1.40012
1.40008
1.40006
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39997
1.39996
1.39995
1.39993
1.39993
1.39992
1.39994
1.4
1.40015
1.40044
1.40096
1.40185
1.40329
1.40552
1.40884
1.41355
1.41991
1.42794
1.4371
1.44621
1.45352
1.45741
1.45704
1.4525
1.44453
1.43404
1.42193
1.40907
1.39626
1.38409
1.37288
1.36272
1.3535
1.34504
1.33701
1.32876
1.31923
1.30701
1.29069
1.26953
1.24364
1.21406
1.18272
1.15179
1.12281
1.09733
1.07782
1.06637
1.06329
1.06801
1.08065
1.1014
1.12897
1.16057
1.19324
1.22473
1.25337
1.27778
1.29732
1.31237
1.32409
1.33366
1.34195
1.34966
1.35758
1.36657
1.37735
1.39016
1.40453
1.41936
1.43311
1.44423
1.45151
1.45446
1.45332
1.44896
1.44256
1.43528
1.42806
1.42154
1.41603
1.41161
1.40822
1.40571
1.4039
1.40263
1.40176
1.40117
1.40078
1.40052
1.40035
1.40024
1.40017
1.40012
1.40008
1.40006
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39997
1.39996
1.39995
1.39993
1.39992
1.39991
1.39992
1.39998
1.4001
1.40036
1.40083
1.40164
1.40295
1.40501
1.40808
1.41249
1.41849
1.42617
1.43516
1.44438
1.4522
1.45695
1.45759
1.45404
1.44691
1.4371
1.42551
1.41297
1.40025
1.38803
1.37671
1.36646
1.35723
1.34887
1.34107
1.33333
1.32491
1.31481
1.30196
1.28567
1.26571
1.24257
1.21775
1.193
1.16942
1.14849
1.1325
1.12307
1.1202
1.1237
1.13402
1.15123
1.1738
1.19914
1.22493
1.24963
1.27205
1.29116
1.30656
1.31869
1.32856
1.33709
1.34491
1.35254
1.36064
1.36998
1.38112
1.39417
1.40855
1.42306
1.43617
1.44639
1.45265
1.45461
1.45267
1.44777
1.44109
1.43377
1.42667
1.42035
1.41507
1.41088
1.40768
1.40533
1.40364
1.40246
1.40165
1.4011
1.40074
1.4005
1.40034
1.40023
1.40016
1.40011
1.40008
1.40006
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39997
1.39996
1.39995
1.39993
1.39991
1.3999
1.39991
1.39995
1.40006
1.40028
1.4007
1.40143
1.40262
1.4045
1.40732
1.41141
1.41703
1.42432
1.43305
1.44231
1.45058
1.45618
1.45791
1.45545
1.44927
1.44024
1.42926
1.41713
1.40461
1.39238
1.38094
1.37055
1.36126
1.35294
1.34534
1.33805
1.33051
1.32206
1.31196
1.29953
1.28431
1.2666
1.24764
1.22855
1.21002
1.19345
1.18085
1.17322
1.17054
1.17305
1.18136
1.19523
1.21303
1.23255
1.25217
1.27093
1.28803
1.30269
1.31466
1.32445
1.33289
1.34066
1.34818
1.35583
1.36417
1.37387
1.38537
1.39862
1.41291
1.42699
1.43932
1.4485
1.45364
1.45456
1.4518
1.44637
1.43946
1.43213
1.42519
1.4191
1.41408
1.41013
1.40713
1.40494
1.40337
1.40228
1.40154
1.40103
1.4007
1.40047
1.40033
1.40023
1.40016
1.40011
1.40008
1.40006
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39998
1.39997
1.39996
1.39995
1.39993
1.39991
1.39989
1.3999
1.39992
1.40002
1.40021
1.40057
1.40123
1.4023
1.40399
1.40657
1.41032
1.41554
1.42241
1.4308
1.44001
1.44866
1.45507
1.45791
1.45664
1.45155
1.44341
1.43311
1.4215
1.40929
1.39714
1.3856
1.37505
1.36561
1.35726
1.34979
1.34284
1.33603
1.32889
1.32084
1.31123
1.29967
1.2865
1.27254
1.25823
1.24406
1.23146
1.22186
1.21578
1.21339
1.21529
1.22191
1.23266
1.24601
1.26036
1.27473
1.28859
1.30135
1.31243
1.32174
1.32976
1.33718
1.34445
1.35181
1.35957
1.3682
1.37828
1.3901
1.40348
1.41758
1.43108
1.44248
1.4505
1.45443
1.45426
1.45069
1.44476
1.43766
1.43038
1.42363
1.41781
1.41306
1.40936
1.40658
1.40455
1.40311
1.40211
1.40142
1.40096
1.40066
1.40045
1.40031
1.40022
1.40015
1.40011
1.40008
1.40006
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39997
1.39996
1.39995
1.39993
1.39991
1.39989
1.39988
1.39991
1.39998
1.40014
1.40046
1.40103
1.40199
1.40351
1.40584
1.40925
1.41405
1.42046
1.42845
1.4375
1.44643
1.45358
1.45753
1.45752
1.45364
1.44652
1.43702
1.426
1.41421
1.40226
1.39071
1.37999
1.37035
1.36187
1.3544
1.34767
1.34142
1.33526
1.32867
1.32114
1.31248
1.30296
1.29286
1.28224
1.27173
1.26253
1.25541
1.25066
1.24875
1.2503
1.25538
1.26323
1.27264
1.28267
1.29285
1.30289
1.3123
1.32065
1.32799
1.33478
1.34154
1.34853
1.35588
1.36381
1.37277
1.38321
1.39531
1.40872
1.42248
1.43525
1.44556
1.45229
1.45493
1.45366
1.4493
1.44294
1.43571
1.42853
1.42202
1.41649
1.41203
1.40859
1.40602
1.40416
1.40284
1.40193
1.40131
1.40089
1.40061
1.40042
1.4003
1.40021
1.40015
1.40011
1.40008
1.40006
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39997
1.39996
1.39995
1.39993
1.3999
1.39989
1.39988
1.39989
1.39995
1.40008
1.40036
1.40085
1.40169
1.40304
1.40512
1.40821
1.41258
1.41849
1.42603
1.43481
1.44388
1.45169
1.45672
1.45803
1.45546
1.44949
1.44093
1.43061
1.41931
1.40766
1.39622
1.3854
1.37556
1.36685
1.35923
1.35257
1.34666
1.34115
1.33558
1.32963
1.32323
1.31641
1.30904
1.30127
1.2938
1.28733
1.28211
1.27851
1.27715
1.27836
1.28192
1.28716
1.29335
1.30005
1.30711
1.31432
1.32128
1.32769
1.33368
1.3397
1.3461
1.353
1.36043
1.36859
1.37788
1.38866
1.40096
1.41427
1.42754
1.43939
1.44845
1.45379
1.45508
1.45272
1.44762
1.4409
1.43362
1.42659
1.42036
1.41515
1.411
1.40782
1.40547
1.40378
1.40259
1.40176
1.4012
1.40082
1.40057
1.4004
1.40028
1.4002
1.40014
1.4001
1.40008
1.40006
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39997
1.39997
1.39995
1.39993
1.3999
1.39989
1.39988
1.39987
1.39992
1.40003
1.40026
1.40069
1.40142
1.40261
1.40445
1.4072
1.41114
1.41656
1.42357
1.43199
1.44104
1.44938
1.45543
1.45806
1.45688
1.45221
1.44473
1.43524
1.42454
1.41329
1.40205
1.39125
1.38126
1.37229
1.36443
1.35766
1.35185
1.34666
1.34175
1.33695
1.33215
1.32712
1.32171
1.31622
1.31113
1.30658
1.30276
1.30014
1.29919
1.29992
1.30204
1.30519
1.30902
1.31339
1.31829
1.32354
1.3288
1.33391
1.3391
1.34472
1.351
1.35793
1.36551
1.37393
1.38355
1.39462
1.40701
1.42007
1.43265
1.44339
1.45105
1.45489
1.45482
1.45141
1.44565
1.43865
1.4314
1.4246
1.41868
1.41381
1.40998
1.40707
1.40494
1.40341
1.40234
1.4016
1.40109
1.40075
1.40052
1.40037
1.40026
1.40019
1.40014
1.4001
1.40007
1.40005
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39996
1.39995
1.39993
1.39991
1.39988
1.39987
1.39987
1.39989
1.39998
1.40017
1.40054
1.40116
1.4022
1.40382
1.40625
1.40977
1.41466
1.42112
1.42907
1.43797
1.44665
1.45361
1.45754
1.45783
1.45456
1.4483
1.4398
1.42983
1.41908
1.40813
1.39745
1.3874
1.37824
1.37012
1.36313
1.35717
1.35199
1.34743
1.34335
1.33949
1.33559
1.33162
1.32786
1.32435
1.32104
1.31825
1.31641
1.31565
1.31581
1.3168
1.3185
1.3208
1.3237
1.32722
1.3312
1.33537
1.33971
1.3445
1.35001
1.35633
1.36337
1.37115
1.37985
1.38977
1.40104
1.41338
1.426
1.43768
1.44712
1.45323
1.45551
1.45409
1.44971
1.4434
1.43623
1.42908
1.42256
1.417
1.41249
1.40898
1.40634
1.40442
1.40305
1.4021
1.40144
1.40099
1.40069
1.40048
1.40034
1.40024
1.40018
1.40013
1.40009
1.40007
1.40005
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39996
1.39995
1.39993
1.39991
1.39989
1.39986
1.39986
1.39987
1.39994
1.4001
1.4004
1.40094
1.40182
1.40323
1.40537
1.40848
1.41285
1.41871
1.42611
1.4347
1.44354
1.45124
1.45641
1.45819
1.45643
1.45153
1.44416
1.43507
1.42496
1.41442
1.40395
1.39394
1.38467
1.37634
1.36906
1.3628
1.35747
1.35298
1.34918
1.34574
1.3425
1.33952
1.33681
1.33419
1.33171
1.32972
1.32839
1.32759
1.32729
1.32757
1.32845
1.32989
1.33196
1.33468
1.33789
1.34145
1.34544
1.35013
1.35572
1.36218
1.36938
1.37736
1.38632
1.39648
1.40785
1.41997
1.43193
1.44249
1.45043
1.45488
1.45557
1.45286
1.44762
1.44088
1.43364
1.42669
1.42051
1.41533
1.4112
1.40802
1.40565
1.40393
1.40272
1.40187
1.40129
1.40089
1.40062
1.40044
1.40032
1.40023
1.40017
1.40012
1.40009
1.40007
1.40005
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39997
1.39995
1.39994
1.39991
1.39989
1.39987
1.39986
1.39986
1.39991
1.40004
1.40029
1.40073
1.40149
1.4027
1.40455
1.40727
1.41113
1.41639
1.42318
1.43131
1.44011
1.44835
1.45462
1.45787
1.45768
1.45427
1.44819
1.44014
1.43081
1.42082
1.41069
1.40081
1.39151
1.38303
1.37549
1.36893
1.36336
1.35872
1.35483
1.35146
1.34854
1.34606
1.34383
1.3417
1.3398
1.33833
1.3372
1.33632
1.3358
1.33579
1.3363
1.33733
1.33899
1.3413
1.34414
1.34745
1.35138
1.35619
1.36195
1.36858
1.37596
1.38414
1.39332
1.40364
1.41495
1.42664
1.4377
1.4469
1.45317
1.45588
1.455
1.45112
1.44514
1.43812
1.43094
1.42427
1.41848
1.41371
1.40995
1.4071
1.40499
1.40347
1.4024
1.40166
1.40115
1.4008
1.40056
1.4004
1.40029
1.40021
1.40016
1.40011
1.40008
1.40006
1.40005
1.40003
1.40003
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39997
1.39996
1.39994
1.39992
1.3999
1.39987
1.39985
1.39986
1.39989
1.39998
1.40019
1.40056
1.40119
1.40222
1.40381
1.40616
1.40954
1.4142
1.42032
1.42789
1.43644
1.44498
1.45216
1.45679
1.45821
1.45639
1.45175
1.4449
1.43652
1.42723
1.41755
1.40794
1.39871
1.39015
1.38243
1.37562
1.36976
1.36483
1.36067
1.35719
1.35432
1.35194
1.34983
1.34795
1.34639
1.34514
1.34405
1.34316
1.34267
1.34263
1.34303
1.34394
1.34548
1.34764
1.35036
1.35367
1.35775
1.36278
1.36876
1.37557
1.3831
1.39146
1.4008
1.41115
1.42221
1.43322
1.44311
1.45074
1.4552
1.45614
1.45378
1.44885
1.44232
1.43516
1.42816
1.42185
1.41649
1.41215
1.40877
1.40623
1.40437
1.40304
1.40211
1.40146
1.40102
1.40072
1.40051
1.40037
1.40027
1.40019
1.40014
1.40011
1.40008
1.40006
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39997
1.39996
1.39994
1.39992
1.3999
1.39988
1.39986
1.39985
1.39987
1.39994
1.4001
1.40041
1.40093
1.4018
1.40314
1.40516
1.40808
1.41215
1.4176
1.4245
1.43262
1.4412
1.44905
1.45491
1.4579
1.45775
1.45468
1.4492
1.44192
1.43349
1.42444
1.41521
1.4062
1.39768
1.38985
1.38283
1.37669
1.37144
1.36699
1.36329
1.36026
1.35773
1.35557
1.35377
1.35233
1.3511
1.35003
1.34925
1.34889
1.34892
1.34935
1.35031
1.3519
1.35411
1.35689
1.36035
1.36468
1.36998
1.37616
1.3831
1.39076
1.39924
1.40864
1.41887
1.42944
1.43951
1.44797
1.45381
1.45639
1.45559
1.45189
1.44611
1.43921
1.43208
1.42536
1.41947
1.41457
1.41066
1.40766
1.40543
1.4038
1.40264
1.40184
1.40128
1.4009
1.40064
1.40046
1.40033
1.40024
1.40018
1.40013
1.4001
1.40007
1.40005
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39997
1.39996
1.39995
1.39993
1.39991
1.39988
1.39986
1.39985
1.39986
1.39991
1.40003
1.40028
1.40071
1.40142
1.40256
1.40427
1.40676
1.41028
1.41505
1.42124
1.42876
1.43713
1.44535
1.45222
1.45668
1.45821
1.45681
1.45284
1.44686
1.43946
1.43119
1.42252
1.41386
1.4055
1.39766
1.39051
1.38418
1.37866
1.37391
1.36993
1.36663
1.36388
1.36158
1.35973
1.35822
1.35696
1.35595
1.35533
1.3551
1.35523
1.35577
1.35688
1.35863
1.36097
1.36393
1.36763
1.37225
1.37779
1.38412
1.39115
1.39887
1.40739
1.41673
1.42661
1.43643
1.44525
1.45203
1.45595
1.45662
1.45421
1.44936
1.44294
1.43587
1.42891
1.42258
1.41716
1.41274
1.40927
1.40663
1.40468
1.40328
1.40228
1.40159
1.40111
1.40079
1.40056
1.40041
1.4003
1.40022
1.40016
1.40012
1.40009
1.40007
1.40005
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39996
1.39995
1.39993
1.39991
1.39989
1.39986
1.39985
1.39985
1.39988
1.39998
1.40017
1.40052
1.40111
1.40204
1.40348
1.40559
1.40859
1.41272
1.41816
1.42497
1.43289
1.44119
1.44876
1.45451
1.45767
1.45799
1.45567
1.45114
1.44495
1.43763
1.42969
1.42153
1.41347
1.40576
1.39864
1.39219
1.38644
1.38143
1.37719
1.37363
1.37062
1.36814
1.36616
1.36454
1.36324
1.36232
1.36181
1.36168
1.36191
1.36263
1.36395
1.36589
1.36841
1.37159
1.37557
1.38044
1.38615
1.39257
1.39962
1.40735
1.41579
1.42487
1.43416
1.44292
1.4502
1.4551
1.45701
1.45585
1.45201
1.44624
1.43942
1.43239
1.42574
1.41988
1.41497
1.41103
1.40798
1.40569
1.40401
1.40281
1.40196
1.40137
1.40097
1.40069
1.4005
1.40036
1.40027
1.4002
1.40015
1.40011
1.40008
1.40006
1.40005
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39997
1.39995
1.39994
1.39992
1.3999
1.39987
1.39985
1.39985
1.39987
1.39993
1.40009
1.40036
1.40083
1.40161
1.40279
1.40456
1.4071
1.41061
1.41533
1.42137
1.42865
1.4367
1.44465
1.45141
1.45605
1.45808
1.45748
1.45455
1.44975
1.44358
1.43654
1.42904
1.42145
1.41405
1.40705
1.40057
1.39471
1.38956
1.38512
1.3813
1.37807
1.37542
1.37328
1.37155
1.37022
1.36935
1.36891
1.36885
1.36922
1.37014
1.37168
1.37379
1.3765
1.37991
1.38414
1.38919
1.39498
1.4014
1.4084
1.41603
1.42425
1.43283
1.44122
1.44861
1.45409
1.45696
1.4569
1.45407
1.44904
1.44264
1.43567
1.42885
1.42263
1.41729
1.41291
1.40945
1.4068
1.40483
1.4034
1.40238
1.40167
1.40117
1.40083
1.4006
1.40043
1.40032
1.40024
1.40018
1.40013
1.4001
1.40008
1.40006
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.39999
1.39998
1.39998
1.39996
1.39994
1.39993
1.3999
1.39988
1.39986
1.39984
1.39986
1.39991
1.40002
1.40023
1.40061
1.40124
1.40221
1.40367
1.40578
1.40875
1.41277
1.41802
1.42454
1.43209
1.44004
1.44745
1.45333
1.45699
1.45814
1.4569
1.45364
1.4488
1.44284
1.4362
1.42925
1.4223
1.41556
1.40921
1.40339
1.3982
1.3936
1.3896
1.38621
1.38343
1.38115
1.37933
1.37798
1.37713
1.37672
1.37673
1.37725
1.37837
1.38008
1.38235
1.38524
1.38885
1.39324
1.39838
1.40415
1.41047
1.41733
1.42472
1.43251
1.44032
1.44748
1.45319
1.45668
1.4575
1.45558
1.45133
1.44543
1.43868
1.4318
1.42534
1.41964
1.41486
1.41101
1.40801
1.40574
1.40407
1.40286
1.40201
1.40141
1.401
1.40072
1.40052
1.40038
1.40028
1.40021
1.40016
1.40012
1.40009
1.40007
1.40005
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39998
1.39998
1.39997
1.39995
1.39993
1.39991
1.39989
1.39987
1.39985
1.39986
1.39988
1.39997
1.40013
1.40043
1.40093
1.40171
1.40291
1.40466
1.40712
1.41051
1.415
1.42069
1.42754
1.43516
1.44282
1.44959
1.45465
1.4575
1.45801
1.45641
1.45306
1.44837
1.44277
1.43664
1.43029
1.42399
1.41794
1.4123
1.40714
1.40251
1.39845
1.39499
1.3921
1.3897
1.38783
1.38649
1.38564
1.38525
1.38535
1.38601
1.38727
1.38909
1.39149
1.39452
1.39827
1.40273
1.40784
1.41349
1.41962
1.42621
1.43317
1.44026
1.44696
1.45258
1.45637
1.45779
1.45663
1.45311
1.44776
1.44132
1.43451
1.42791
1.42195
1.41683
1.41262
1.40928
1.40672
1.4048
1.4034
1.40239
1.40168
1.40119
1.40085
1.40061
1.40045
1.40033
1.40025
1.40019
1.40014
1.40011
1.40008
1.40006
1.40005
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39997
1.39996
1.39994
1.39992
1.3999
1.39988
1.39986
1.39986
1.39987
1.39993
1.40005
1.40028
1.40068
1.40131
1.40227
1.4037
1.40573
1.40854
1.41231
1.41719
1.42322
1.43024
1.43776
1.445
1.45112
1.45548
1.45773
1.45786
1.45612
1.45286
1.44848
1.44335
1.4378
1.43211
1.42652
1.42118
1.41619
1.41166
1.40767
1.40421
1.40126
1.39883
1.39695
1.39561
1.39477
1.39441
1.39459
1.39537
1.39671
1.3986
1.40107
1.40419
1.40799
1.41242
1.41739
1.4228
1.42861
1.43475
1.44105
1.44713
1.4524
1.45619
1.45794
1.45732
1.45441
1.44961
1.44354
1.43689
1.43027
1.42413
1.41874
1.41423
1.41059
1.40774
1.40558
1.40397
1.40281
1.40198
1.4014
1.401
1.40072
1.40052
1.40038
1.40029
1.40022
1.40017
1.40013
1.4001
1.40007
1.40006
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39997
1.39996
1.39995
1.39993
1.39991
1.39989
1.39987
1.39986
1.39986
1.39991
1.4
1.40017
1.40048
1.40098
1.40174
1.40289
1.40454
1.40685
1.40998
1.41408
1.41927
1.42551
1.43254
1.43981
1.44658
1.45213
1.45594
1.45779
1.45775
1.45607
1.45308
1.44913
1.44456
1.43965
1.43466
1.42977
1.42512
1.42084
1.41699
1.41361
1.41071
1.40833
1.40648
1.40515
1.40433
1.40402
1.40429
1.40512
1.4065
1.40842
1.41092
1.41405
1.41779
1.42206
1.42675
1.4318
1.43714
1.44262
1.44795
1.45268
1.45623
1.45804
1.45775
1.45531
1.45098
1.4453
1.43889
1.43233
1.42611
1.42054
1.41578
1.41188
1.40877
1.40638
1.40458
1.40326
1.4023
1.40163
1.40115
1.40083
1.4006
1.40044
1.40033
1.40025
1.40019
1.40015
1.40011
1.40009
1.40007
1.40005
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39997
1.39996
1.39994
1.39992
1.3999
1.39988
1.39987
1.39987
1.39989
1.39996
1.40009
1.40032
1.40071
1.40132
1.40223
1.40355
1.40543
1.40798
1.41138
1.41575
1.42114
1.42745
1.43436
1.4413
1.44761
1.45267
1.4561
1.45775
1.45773
1.45626
1.45367
1.45025
1.44631
1.44209
1.43782
1.43366
1.42974
1.42615
1.42295
1.4202
1.41794
1.41617
1.41489
1.41411
1.41387
1.41418
1.41503
1.41641
1.41832
1.42079
1.42383
1.42738
1.43135
1.43565
1.44017
1.44482
1.44936
1.45342
1.45652
1.45816
1.45797
1.45583
1.4519
1.44659
1.44044
1.43403
1.42782
1.42215
1.41722
1.41311
1.40978
1.40718
1.4052
1.40372
1.40264
1.40187
1.40133
1.40095
1.40069
1.4005
1.40037
1.40028
1.40022
1.40017
1.40013
1.4001
1.40008
1.40006
1.40004
1.40003
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39997
1.39996
1.39995
1.39993
1.39991
1.39989
1.39988
1.39987
1.39988
1.39993
1.40002
1.4002
1.40049
1.40097
1.40169
1.40274
1.40424
1.40631
1.40909
1.4127
1.41724
1.42272
1.42898
1.43566
1.44224
1.44811
1.4528
1.456
1.45762
1.45776
1.45665
1.45455
1.45175
1.44848
1.44499
1.44147
1.43805
1.43484
1.43195
1.42944
1.42735
1.42571
1.42452
1.42382
1.42365
1.42399
1.42482
1.42615
1.428
1.43036
1.4332
1.43643
1.43996
1.44368
1.44749
1.45119
1.4545
1.45701
1.4583
1.45803
1.45602
1.45236
1.44738
1.44153
1.43531
1.42919
1.42351
1.41849
1.41423
1.41073
1.40795
1.40581
1.40419
1.40299
1.40212
1.40151
1.40108
1.40077
1.40056
1.40042
1.40031
1.40024
1.40018
1.40014
1.40011
1.40009
1.40007
1.40005
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39998
1.39998
1.39997
1.39995
1.39994
1.39992
1.3999
1.39989
1.39988
1.39988
1.39991
1.39998
1.40011
1.40033
1.4007
1.40126
1.40208
1.40327
1.40493
1.40716
1.4101
1.41385
1.41848
1.42394
1.43004
1.43643
1.44263
1.44813
1.45254
1.45563
1.45735
1.45779
1.45712
1.4556
1.45346
1.45092
1.44818
1.4454
1.44273
1.44025
1.43807
1.43623
1.43477
1.43373
1.43315
1.43303
1.43337
1.43415
1.43539
1.4371
1.43924
1.44174
1.4445
1.44743
1.4504
1.45325
1.45576
1.45759
1.4584
1.45788
1.45587
1.45239
1.44767
1.44211
1.43614
1.43018
1.42456
1.41953
1.41519
1.41158
1.40867
1.40639
1.40464
1.40334
1.40238
1.40169
1.40121
1.40087
1.40063
1.40046
1.40035
1.40026
1.4002
1.40016
1.40012
1.4001
1.40008
1.40006
1.40005
1.40003
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39997
1.39996
1.39995
1.39993
1.39992
1.3999
1.39989
1.39989
1.3999
1.39995
1.40005
1.40021
1.40049
1.40092
1.40156
1.40249
1.40379
1.40557
1.40793
1.41098
1.4148
1.41942
1.42475
1.43061
1.43666
1.44248
1.44766
1.45188
1.45496
1.45687
1.45767
1.45752
1.45662
1.45518
1.45337
1.45138
1.44936
1.44743
1.44568
1.44416
1.44296
1.44211
1.44164
1.44157
1.44189
1.4426
1.4437
1.44517
1.44695
1.44897
1.45111
1.45326
1.45528
1.45697
1.45809
1.45834
1.45748
1.45535
1.45195
1.44746
1.44217
1.43648
1.43074
1.42527
1.42029
1.41595
1.41228
1.40929
1.40691
1.40506
1.40366
1.40263
1.40187
1.40134
1.40096
1.40069
1.40051
1.40038
1.40029
1.40022
1.40017
1.40013
1.40011
1.40008
1.40006
1.40005
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39998
1.39997
1.39996
1.39994
1.39993
1.39991
1.3999
1.39989
1.39991
1.39993
1.4
1.40013
1.40033
1.40066
1.40115
1.40187
1.40288
1.40428
1.40615
1.40859
1.41169
1.41549
1.42001
1.42514
1.43069
1.43637
1.44182
1.44671
1.45079
1.45392
1.45605
1.45724
1.45763
1.45737
1.45662
1.45554
1.4543
1.45301
1.45177
1.45068
1.44979
1.44917
1.44883
1.4488
1.44907
1.44965
1.45054
1.45167
1.45298
1.45437
1.45574
1.45695
1.45786
1.45826
1.45794
1.45669
1.45439
1.45102
1.44671
1.4417
1.43631
1.43084
1.42558
1.42074
1.41647
1.41281
1.40978
1.40734
1.40543
1.40396
1.40285
1.40204
1.40146
1.40104
1.40075
1.40055
1.40041
1.40031
1.40024
1.40018
1.40015
1.40011
1.40009
1.40007
1.40006
1.40004
1.40003
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39998
1.39997
1.39996
1.39995
1.39994
1.39992
1.39991
1.3999
1.39991
1.39993
1.39997
1.40006
1.40022
1.40046
1.40083
1.40138
1.40217
1.40325
1.40471
1.40664
1.40911
1.41218
1.4159
1.42023
1.42509
1.43028
1.43556
1.44065
1.44527
1.44922
1.4524
1.45476
1.45633
1.45722
1.45755
1.45746
1.45706
1.45649
1.45586
1.45524
1.45473
1.45435
1.45416
1.45416
1.45437
1.45478
1.45535
1.45604
1.45677
1.45743
1.45793
1.45812
1.45787
1.45701
1.45539
1.45291
1.44956
1.44542
1.44069
1.43562
1.43047
1.42548
1.42085
1.41671
1.41313
1.41013
1.40768
1.40572
1.4042
1.40305
1.4022
1.40157
1.40112
1.40081
1.40059
1.40043
1.40033
1.40025
1.40019
1.40015
1.40012
1.4001
1.40008
1.40006
1.40005
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39998
1.39997
1.39996
1.39995
1.39993
1.39992
1.39992
1.39992
1.39992
1.39996
1.40002
1.40013
1.40031
1.40059
1.40101
1.4016
1.40244
1.40357
1.40507
1.40701
1.40945
1.41244
1.416
1.42009
1.42461
1.42941
1.43427
1.43898
1.44331
1.44713
1.45032
1.45285
1.45473
1.45605
1.45688
1.45734
1.45752
1.45751
1.45741
1.45728
1.45717
1.45712
1.45715
1.45727
1.45745
1.45767
1.45786
1.45795
1.45785
1.45746
1.45667
1.45537
1.45345
1.45083
1.44751
1.44357
1.43914
1.43443
1.42963
1.42497
1.42061
1.41667
1.41323
1.4103
1.40788
1.40593
1.4044
1.40321
1.40232
1.40167
1.4012
1.40086
1.40062
1.40046
1.40034
1.40026
1.4002
1.40016
1.40013
1.4001
1.40008
1.40007
1.40005
1.40004
1.40003
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39998
1.39997
1.39996
1.39996
1.39994
1.39993
1.39993
1.39992
1.39993
1.39995
1.39999
1.40007
1.4002
1.40041
1.40073
1.40117
1.40181
1.40267
1.40383
1.40533
1.40724
1.40961
1.41245
1.4158
1.41959
1.42374
1.4281
1.43253
1.43684
1.44086
1.44448
1.44761
1.45021
1.4523
1.4539
1.4551
1.45596
1.45655
1.45693
1.45718
1.45733
1.45742
1.45746
1.45746
1.4574
1.45725
1.45694
1.45642
1.45562
1.45446
1.45286
1.45076
1.4481
1.44488
1.44117
1.43707
1.43274
1.42835
1.42406
1.42002
1.41634
1.41309
1.41029
1.40794
1.40603
1.40451
1.40332
1.40242
1.40174
1.40125
1.4009
1.40065
1.40047
1.40035
1.40027
1.40021
1.40016
1.40013
1.4001
1.40008
1.40007
1.40005
1.40004
1.40004
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39998
1.39997
1.39996
1.39996
1.39994
1.39994
1.39993
1.39993
1.39995
1.39998
1.40003
1.40013
1.40028
1.40052
1.40085
1.40132
1.40198
1.40286
1.40401
1.40548
1.40732
1.40957
1.41223
1.41531
1.41876
1.4225
1.42642
1.43038
1.43427
1.43793
1.44128
1.44425
1.44681
1.44896
1.45069
1.45207
1.45313
1.45392
1.45448
1.45485
1.45505
1.4551
1.45499
1.45471
1.45422
1.4535
1.45249
1.45115
1.44942
1.44728
1.44469
1.44166
1.43825
1.43453
1.43062
1.42666
1.42279
1.41911
1.41573
1.41271
1.41009
1.40786
1.40603
1.40454
1.40337
1.40247
1.40179
1.40129
1.40092
1.40067
1.40048
1.40036
1.40027
1.40021
1.40016
1.40013
1.40011
1.40009
1.40007
1.40006
1.40005
1.40004
1.40003
1.40002
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39998
1.39998
1.39997
1.39996
1.39996
1.39995
1.39994
1.39994
1.39995
1.39997
1.40001
1.40008
1.40019
1.40036
1.40061
1.40096
1.40145
1.40211
1.40298
1.4041
1.40552
1.40725
1.40934
1.41178
1.41456
1.41764
1.42095
1.42441
1.4279
1.43132
1.43458
1.4376
1.44031
1.4427
1.44473
1.44642
1.44779
1.44885
1.44963
1.45016
1.45043
1.45047
1.45028
1.44983
1.44911
1.44809
1.44676
1.44509
1.44307
1.44067
1.43792
1.43487
1.43157
1.42812
1.42463
1.42119
1.4179
1.41486
1.41212
1.4097
1.40764
1.40591
1.40449
1.40336
1.40248
1.40181
1.4013
1.40094
1.40067
1.40049
1.40036
1.40027
1.4002
1.40016
1.40013
1.4001
1.40009
1.40007
1.40006
1.40005
1.40004
1.40003
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.4
1.39999
1.39998
1.39998
1.39997
1.39996
1.39996
1.39995
1.39995
1.39996
1.39997
1.4
1.40004
1.40013
1.40025
1.40043
1.40069
1.40106
1.40155
1.4022
1.40305
1.40411
1.40544
1.40704
1.40894
1.41113
1.41359
1.41629
1.41917
1.42214
1.42515
1.4281
1.43091
1.43353
1.4359
1.43799
1.43979
1.44128
1.44247
1.44336
1.44396
1.44428
1.44431
1.44405
1.44351
1.44267
1.44151
1.44005
1.43826
1.43617
1.43378
1.43114
1.4283
1.42533
1.42231
1.41932
1.41646
1.41378
1.41133
1.40916
1.40727
1.40568
1.40435
1.40329
1.40244
1.40179
1.4013
1.40093
1.40067
1.40048
1.40035
1.40026
1.4002
1.40015
1.40012
1.4001
1.40008
1.40007
1.40006
1.40005
1.40004
1.40003
1.40003
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.40001
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39998
1.39998
1.39997
1.39996
1.39996
1.39996
1.39996
1.39997
1.39999
1.40003
1.40008
1.40017
1.40031
1.4005
1.40076
1.40113
1.40161
1.40224
1.40304
1.40404
1.40525
1.4067
1.40839
1.41031
1.41245
1.41476
1.4172
1.41971
1.42224
1.4247
1.42705
1.42922
1.43119
1.43292
1.43438
1.43556
1.43646
1.43707
1.43739
1.43741
1.43713
1.43656
1.43569
1.43454
1.43309
1.43137
1.4294
1.4272
1.42483
1.42235
1.41981
1.41728
1.41483
1.41252
1.41039
1.40847
1.40679
1.40535
1.40414
1.40315
1.40236
1.40174
1.40126
1.40091
1.40065
1.40047
1.40034
1.40025
1.40019
1.40014
1.40011
1.40009
1.40008
1.40007
1.40006
1.40005
1.40004
1.40003
1.40003
1.40002
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39998
1.39998
1.39997
1.39997
1.39996
1.39997
1.39997
1.39999
1.40001
1.40005
1.40012
1.40022
1.40036
1.40055
1.40082
1.40117
1.40164
1.40223
1.40297
1.40388
1.40497
1.40625
1.40772
1.40937
1.41118
1.41312
1.41515
1.41721
1.41926
1.42125
1.42314
1.42486
1.4264
1.42773
1.42882
1.42965
1.43021
1.43049
1.43051
1.43025
1.4297
1.42889
1.42781
1.42649
1.42495
1.42321
1.42131
1.41929
1.41722
1.41513
1.41309
1.41115
1.40933
1.40768
1.40621
1.40493
1.40385
1.40295
1.40223
1.40165
1.40121
1.40087
1.40062
1.40044
1.40032
1.40023
1.40017
1.40013
1.4001
1.40009
1.40007
1.40006
1.40005
1.40004
1.40004
1.40003
1.40003
1.40002
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39998
1.39998
1.39998
1.39997
1.39997
1.39998
1.39999
1.40001
1.40004
1.40008
1.40015
1.40026
1.4004
1.40059
1.40085
1.40119
1.40163
1.40217
1.40284
1.40365
1.40461
1.40571
1.40696
1.40835
1.40985
1.41143
1.41307
1.41471
1.41633
1.41788
1.41932
1.42062
1.42175
1.42269
1.42341
1.42389
1.42414
1.42414
1.4239
1.42342
1.42271
1.42177
1.42063
1.41932
1.41786
1.41628
1.41464
1.41297
1.41131
1.40971
1.4082
1.40681
1.40556
1.40446
1.40351
1.40271
1.40206
1.40154
1.40113
1.40081
1.40058
1.40041
1.40029
1.40021
1.40015
1.40012
1.40009
1.40007
1.40006
1.40005
1.40005
1.40004
1.40004
1.40003
1.40003
1.40002
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39998
1.39998
1.39998
1.39998
1.39998
1.39999
1.4
1.40003
1.40006
1.40011
1.40019
1.40029
1.40043
1.40062
1.40086
1.40118
1.40158
1.40207
1.40266
1.40336
1.40418
1.40512
1.40615
1.40729
1.4085
1.40976
1.41104
1.41231
1.41354
1.41469
1.41574
1.41666
1.41743
1.41801
1.41841
1.41862
1.41861
1.4184
1.41799
1.41739
1.41662
1.41568
1.4146
1.41342
1.41217
1.41087
1.40956
1.40828
1.40705
1.40591
1.40487
1.40394
1.40313
1.40244
1.40186
1.4014
1.40103
1.40074
1.40053
1.40037
1.40026
1.40018
1.40013
1.4001
1.40008
1.40006
1.40005
1.40005
1.40004
1.40004
1.40003
1.40003
1.40003
1.40002
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39999
1.39998
1.39998
1.39999
1.39999
1.4
1.40002
1.40005
1.40009
1.40014
1.40021
1.40032
1.40045
1.40063
1.40086
1.40114
1.4015
1.40193
1.40244
1.40304
1.40373
1.40449
1.40533
1.40623
1.40718
1.40815
1.40912
1.41007
1.41096
1.41178
1.4125
1.4131
1.41356
1.41387
1.41403
1.41402
1.41384
1.41351
1.41302
1.41239
1.41164
1.41079
1.40987
1.40889
1.40789
1.4069
1.40593
1.40501
1.40416
1.4034
1.40272
1.40214
1.40164
1.40124
1.40092
1.40066
1.40047
1.40033
1.40023
1.40016
1.40011
1.40008
1.40006
1.40005
1.40004
1.40004
1.40003
1.40003
1.40003
1.40003
1.40002
1.40002
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.4
1.4
1.40002
1.40004
1.40006
1.40011
1.40016
1.40024
1.40034
1.40046
1.40063
1.40083
1.40109
1.4014
1.40177
1.4022
1.40269
1.40325
1.40386
1.40452
1.40522
1.40594
1.40666
1.40737
1.40804
1.40866
1.4092
1.40966
1.41001
1.41024
1.41036
1.41034
1.41019
1.40993
1.40954
1.40905
1.40847
1.40781
1.4071
1.40636
1.40561
1.40487
1.40415
1.40348
1.40286
1.40231
1.40183
1.40142
1.40107
1.40079
1.40057
1.4004
1.40028
1.40019
1.40013
1.40008
1.40006
1.40004
1.40003
1.40003
1.40003
1.40003
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.4
1.39999
1.39999
1.4
1.40001
1.40002
1.40003
1.40005
1.40008
1.40012
1.40018
1.40025
1.40034
1.40046
1.40061
1.40079
1.40101
1.40128
1.40158
1.40194
1.40234
1.40278
1.40325
1.40376
1.40428
1.4048
1.40532
1.40582
1.40627
1.40667
1.407
1.40726
1.40743
1.4075
1.40748
1.40736
1.40715
1.40685
1.40647
1.40603
1.40554
1.40501
1.40446
1.4039
1.40336
1.40284
1.40235
1.40191
1.40152
1.40118
1.4009
1.40067
1.40048
1.40034
1.40023
1.40015
1.40009
1.40006
1.40004
1.40002
1.40002
1.40001
1.40001
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.4
1.4
1.4
1.4
1.40001
1.40003
1.40004
1.40006
1.4001
1.40014
1.40019
1.40026
1.40034
1.40045
1.40058
1.40074
1.40092
1.40114
1.40139
1.40167
1.40198
1.40232
1.40268
1.40305
1.40343
1.4038
1.40415
1.40447
1.40476
1.405
1.40518
1.40529
1.40534
1.40531
1.40521
1.40505
1.40482
1.40454
1.40421
1.40384
1.40345
1.40305
1.40264
1.40225
1.40188
1.40154
1.40123
1.40096
1.40073
1.40054
1.40039
1.40027
1.40018
1.40011
1.40006
1.40003
1.40001
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40002
1.40004
1.40005
1.40007
1.40011
1.40015
1.4002
1.40026
1.40033
1.40043
1.40054
1.40067
1.40082
1.401
1.4012
1.40142
1.40165
1.4019
1.40216
1.40242
1.40269
1.40293
1.40315
1.40335
1.40351
1.40364
1.40371
1.40373
1.40371
1.40363
1.4035
1.40333
1.40311
1.40287
1.4026
1.40232
1.40203
1.40174
1.40147
1.40121
1.40097
1.40076
1.40058
1.40043
1.4003
1.4002
1.40013
1.40007
1.40003
1.40001
1.4
1.39999
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40002
1.40002
1.40003
1.40005
1.40007
1.40008
1.40012
1.40015
1.4002
1.40026
1.40032
1.4004
1.40049
1.4006
1.40072
1.40086
1.40101
1.40117
1.40135
1.40152
1.4017
1.40188
1.40205
1.4022
1.40233
1.40244
1.40252
1.40256
1.40257
1.40254
1.40248
1.40238
1.40225
1.40209
1.40191
1.40172
1.40151
1.40131
1.40111
1.40092
1.40074
1.40058
1.40044
1.40032
1.40022
1.40014
1.40008
1.40004
1.40001
1.39999
1.39998
1.39997
1.39997
1.39998
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40002
1.40003
1.40004
1.40005
1.40007
1.40009
1.40012
1.40016
1.4002
1.40025
1.4003
1.40037
1.40044
1.40053
1.40062
1.40072
1.40083
1.40095
1.40107
1.4012
1.40131
1.40142
1.40152
1.40161
1.40167
1.40172
1.40174
1.40174
1.40171
1.40166
1.40158
1.40148
1.40137
1.40124
1.4011
1.40096
1.40081
1.40068
1.40054
1.40042
1.40032
1.40023
1.40015
1.40009
1.40004
1.4
1.39998
1.39997
1.39996
1.39996
1.39996
1.39997
1.39997
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40002
1.40002
1.40003
1.40004
1.40006
1.40008
1.4001
1.40012
1.40015
1.40019
1.40023
1.40028
1.40033
1.40039
1.40045
1.40052
1.4006
1.40068
1.40075
1.40083
1.40091
1.40098
1.40104
1.4011
1.40114
1.40116
1.40117
1.40116
1.40113
1.40109
1.40103
1.40096
1.40087
1.40078
1.40068
1.40058
1.40048
1.40039
1.4003
1.40022
1.40015
1.40009
1.40005
1.40001
1.39998
1.39997
1.39996
1.39995
1.39995
1.39995
1.39996
1.39997
1.39997
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40003
1.40004
1.40005
1.40006
1.40008
1.4001
1.40012
1.40015
1.40018
1.40021
1.40025
1.40029
1.40034
1.40038
1.40043
1.40049
1.40054
1.40058
1.40063
1.40068
1.40072
1.40075
1.40077
1.40078
1.40078
1.40076
1.40074
1.4007
1.40066
1.4006
1.40054
1.40047
1.4004
1.40033
1.40026
1.4002
1.40014
1.40009
1.40005
1.40001
1.39998
1.39996
1.39995
1.39994
1.39994
1.39994
1.39995
1.39995
1.39996
1.39997
1.39998
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40004
1.40004
1.40005
1.40007
1.40008
1.4001
1.40011
1.40014
1.40017
1.40019
1.40022
1.40025
1.40029
1.40032
1.40035
1.40038
1.40042
1.40044
1.40047
1.40049
1.40051
1.40052
1.40052
1.40051
1.4005
1.40047
1.40044
1.40041
1.40036
1.40032
1.40027
1.40022
1.40017
1.40013
1.40008
1.40005
1.40001
1.39999
1.39997
1.39995
1.39994
1.39994
1.39994
1.39994
1.39994
1.39995
1.39996
1.39996
1.39997
1.39998
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40002
1.40004
1.40005
1.40005
1.40006
1.40008
1.4001
1.40011
1.40013
1.40015
1.40017
1.40019
1.40021
1.40024
1.40026
1.40028
1.4003
1.40032
1.40033
1.40034
1.40034
1.40034
1.40034
1.40033
1.40032
1.4003
1.40027
1.40024
1.40021
1.40018
1.40014
1.40011
1.40008
1.40005
1.40002
1.39999
1.39997
1.39996
1.39995
1.39994
1.39994
1.39994
1.39994
1.39994
1.39995
1.39996
1.39996
1.39997
1.39998
1.39998
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40002
1.40004
1.40005
1.40005
1.40006
1.40007
1.40009
1.4001
1.40011
1.40013
1.40014
1.40016
1.40018
1.40019
1.40021
1.40022
1.40022
1.40023
1.40024
1.40024
1.40023
1.40023
1.40022
1.4002
1.40018
1.40017
1.40014
1.40012
1.40009
1.40007
1.40004
1.40002
1.4
1.39998
1.39996
1.39995
1.39994
1.39994
1.39994
1.39994
1.39994
1.39994
1.39995
1.39995
1.39996
1.39997
1.39997
1.39998
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40003
1.40002
1.40003
1.40005
1.40005
1.40006
1.40007
1.40008
1.40009
1.4001
1.40011
1.40012
1.40013
1.40014
1.40015
1.40016
1.40016
1.40017
1.40017
1.40016
1.40016
1.40015
1.40014
1.40013
1.40011
1.4001
1.40008
1.40006
1.40004
1.40002
1.40001
1.39999
1.39997
1.39996
1.39995
1.39995
1.39994
1.39994
1.39994
1.39994
1.39995
1.39995
1.39996
1.39996
1.39997
1.39997
1.39998
1.39998
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40003
1.40003
1.40003
1.40004
1.40005
1.40006
1.40006
1.40007
1.40008
1.40009
1.4001
1.4001
1.40011
1.40011
1.40012
1.40012
1.40012
1.40012
1.40011
1.40011
1.4001
1.40009
1.40008
1.40007
1.40005
1.40004
1.40003
1.40001
1.4
1.39998
1.39997
1.39996
1.39996
1.39995
1.39995
1.39994
1.39994
1.39995
1.39995
1.39995
1.39996
1.39996
1.39997
1.39997
1.39998
1.39998
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40002
1.40002
1.40003
1.40003
1.40004
1.40005
1.40005
1.40006
1.40006
1.40007
1.40008
1.40008
1.40009
1.40009
1.40009
1.40009
1.40009
1.40009
1.40008
1.40008
1.40007
1.40006
1.40005
1.40004
1.40003
1.40002
1.40001
1.4
1.39999
1.39998
1.39997
1.39996
1.39996
1.39996
1.39995
1.39995
1.39995
1.39996
1.39996
1.39996
1.39997
1.39997
1.39998
1.39998
1.39998
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40002
1.40002
1.40003
1.40003
1.40004
1.40004
1.40004
1.40005
1.40006
1.40006
1.40006
1.40007
1.40007
1.40007
1.40007
1.40007
1.40006
1.40006
1.40005
1.40005
1.40004
1.40003
1.40002
1.40002
1.40001
1.4
1.39999
1.39998
1.39998
1.39997
1.39997
1.39996
1.39996
1.39996
1.39996
1.39996
1.39996
1.39997
1.39997
1.39997
1.39998
1.39998
1.39998
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40002
1.40003
1.40003
1.40003
1.40004
1.40004
1.40004
1.40005
1.40005
1.40005
1.40005
1.40005
1.40005
1.40005
1.40005
1.40005
1.40004
1.40003
1.40003
1.40002
1.40002
1.40001
1.4
1.39999
1.39999
1.39998
1.39998
1.39997
1.39997
1.39997
1.39997
1.39997
1.39997
1.39997
1.39997
1.39997
1.39998
1.39998
1.39998
1.39999
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40002
1.40002
1.40003
1.40003
1.40003
1.40003
1.40004
1.40004
1.40004
1.40004
1.40004
1.40004
1.40004
1.40004
1.40003
1.40003
1.40003
1.40002
1.40001
1.40001
1.40001
1.4
1.39999
1.39999
1.39999
1.39998
1.39998
1.39998
1.39997
1.39997
1.39997
1.39998
1.39998
1.39998
1.39998
1.39998
1.39999
1.39999
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40002
1.40002
1.40002
1.40003
1.40003
1.40003
1.40003
1.40003
1.40003
1.40003
1.40003
1.40003
1.40003
1.40003
1.40002
1.40002
1.40002
1.40001
1.40001
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39998
1.39998
1.39998
1.39998
1.39998
1.39998
1.39998
1.39998
1.39999
1.39999
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40003
1.40003
1.40003
1.40002
1.40002
1.40002
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.40001
1.40001
1.4
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.4
1.4
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.40001
1.40001
1.40001
1.40002
1.40002
1.40002
1.40002
1.40003
1.40003
1.40003
1.40003
1.40003
1.40003
1.40003
1.40002
1.40002
1.40002
1.40002
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39999
1.39999
1.39998
1.39998
1.39998
1.39998
1.39998
1.39998
1.39998
1.39998
1.39999
1.39999
1.39999
1.4
1.4
1.4
1.40001
1.40001
1.40002
1.40002
1.40003
1.40003
1.40003
1.40003
1.40003
1.40004
1.40004
1.40003
1.40003
1.40003
1.40003
1.40003
1.40003
1.40002
1.40002
1.40002
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39999
1.39998
1.39998
1.39998
1.39998
1.39998
1.39997
1.39997
1.39998
1.39998
1.39998
1.39998
1.39999
1.39999
1.4
1.4
1.40001
1.40001
1.40002
1.40003
1.40003
1.40003
1.40004
1.40004
1.40004
1.40005
1.40005
1.40005
1.40004
1.40004
1.40004
1.40004
1.40004
1.40003
1.40003
1.40003
1.40002
1.40002
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39998
1.39998
1.39998
1.39997
1.39997
1.39997
1.39997
1.39997
1.39997
1.39997
1.39997
1.39998
1.39998
1.39999
1.39999
1.4
1.40001
1.40001
1.40002
1.40003
1.40004
1.40004
1.40005
1.40005
1.40006
1.40006
1.40006
1.40006
1.40006
1.40006
1.40006
1.40005
1.40005
1.40005
1.40004
1.40004
1.40003
1.40003
1.40003
1.40002
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.4
1.4
1.40001
1.4
1.40001
1.40001
1.40001
1.40001
1.40001
1.4
1.40001
1.4
1.4
1.40001
1.40001
1.40001
1.4
1.40001
1.40001
1.40001
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.4
1.39999
1.39999
1.39999
1.39998
1.39998
1.39998
1.39997
1.39997
1.39997
1.39996
1.39996
1.39996
1.39996
1.39997
1.39997
1.39998
1.39998
1.39999
1.4
1.40001
1.40002
1.40003
1.40004
1.40004
1.40005
1.40006
1.40007
1.40007
1.40007
1.40008
1.40008
1.40008
1.40008
1.40007
1.40007
1.40007
1.40006
1.40006
1.40005
1.40005
1.40004
1.40004
1.40003
1.40003
1.40002
1.40002
1.40002
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
1.40001
)
;
boundaryField
{
emptyPatches_empt
{
type empty;
}
top_cyc
{
type cyclic;
}
bottom_cyc
{
type cyclic;
}
inlet_cyc
{
type cyclic;
}
outlet_cyc
{
type cyclic;
}
}
// ************************************************************************* //
| [
"tdg@debian"
] | tdg@debian | |
f8aa0d25ae8e255b8260045f60a49e1fd06add27 | 58c5614f48b226f2f12e95bf5a9a85055d0bcae7 | /src/TestBeamEventElement.h | d74bd3fbf3ef173fdfe8a8c3d48ad1f662b56578 | [] | no_license | StevenGreen1/CLICpix_TestBeamCode | e9911c7999bda94a6a9d01d5cc448b128253580e | 1f1f7e99b9da37ff38ae9525be9ea144e7aca346 | refs/heads/master | 2018-01-08T08:23:55.849640 | 2015-09-24T12:52:41 | 2015-09-24T12:52:41 | 43,066,113 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,905 | h | // $Id: TestBeamEventElement.h,v 1.7 2010-06-11 13:05:31 mjohn Exp $
#ifndef TESTBEAMEVENTELEMENT_H
#define TESTBEAMEVENTELEMENT_H 1
// Include files
#include<iostream>
#include<ctype.h>
#include <string>
#include <cstring>
#include "TObject.h"
#include "RowColumnEntry.h"
/** @class TestBeamEventElement TestBeamEventElement.h
*
*
* @author Malcolm John
* @date 2009-06-22
*/
class TestBeamEventElement : public TObject {
public:
TestBeamEventElement();
void timeStamp(double);
void sourceName(std::string);
void detectorId(std::string);
void data(RowColumnEntries);
double timeStamp();
std::string sourceName();
std::string detectorId();
RowColumnEntries* data();
virtual ~TestBeamEventElement( ){}
void clear();
ClassDef(TestBeamEventElement,1)
protected:
private:
double m_time;
char m_source[64];
char m_detector[64];
RowColumnEntries m_rowColumnEntries;
};
inline TestBeamEventElement::TestBeamEventElement()
{
std::strcpy(m_source,"NULL");
std::strcpy(m_detector,"NULL");
}
inline void TestBeamEventElement::timeStamp(double t){m_time=t;}
inline void TestBeamEventElement::sourceName(std::string s){ std::strcpy(m_source,s.c_str());}
inline void TestBeamEventElement::detectorId(std::string d){std::strcpy(m_detector,d.c_str());}
inline void TestBeamEventElement::data(RowColumnEntries r){m_rowColumnEntries=r;}
inline double TestBeamEventElement::timeStamp(){return m_time;}
inline std::string TestBeamEventElement::sourceName(){return std::string(m_source);}
inline std::string TestBeamEventElement::detectorId(){return std::string(m_detector);}
inline RowColumnEntries* TestBeamEventElement::data( ){return &m_rowColumnEntries;}
inline void TestBeamEventElement::clear(){
RowColumnEntries::iterator it=m_rowColumnEntries.begin();
for(;it!=m_rowColumnEntries.end();it++){
delete (*it);
}
}
#endif // TESTBEAMEVENTELEMENT_H
| [
"sg1sg2sg3@hotmail.co.uk"
] | sg1sg2sg3@hotmail.co.uk |
d03a9670b7ca9a8cd82a8ab76509fc14470ba52e | a95aa367c778034a8b8dc39f69e2cb11f6e15acc | /Codeforces/822-D.cpp | 12d656c4216d7febe0b87deca587bcc92ae51273 | [] | no_license | misaelmateus/problem-solving | 6d16ff88a82fb366b331870d0f956dbdfc09ee6c | 8ed9faf0b3828bfc689864abeea9d7599ee63b9e | refs/heads/master | 2020-07-01T12:21:16.914099 | 2018-11-05T10:33:08 | 2018-11-05T10:33:08 | 74,079,745 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 759 | cpp | // Author : Misael Mateus
// Submission date: 2017-07-04 17:00:40
#include<bits/stdc++.h>
#define L 1000000007LL
#define ll long long
#define MAXN 5000005
using namespace std;
ll dp[MAXN];
ll d[MAXN];
int main(){
for(int i = 2; i < MAXN; i++){
if(d[i] == 0){
for(int j = i; j < MAXN; j+= i)
if(d[j] == 0) d[j] = (ll)i;
}
}
ll t, l, r;
cin >> t >> l >> r;
for(int i = 2; i < MAXN; i++){
dp[i] = (1LL << 50);
int j = i;
while(j > 1){
int k = d[j];
dp[i] = min( dp[i], (ll)i*(k - 1) / 2LL + dp[i / k] );
j /= k;
}
dp[i] %= L;
}
ll ans = 0LL;
ll mult = 1LL;
for(int i = l; i <= r; i++, mult = (mult * t) % L){
ans = (ans + (mult * dp[i]) % L) % L;
}
cout << ans << "\n";
} | [
"misaelmateus12@gmail.com"
] | misaelmateus12@gmail.com |
c6bca56f1441a922319926f75750b21710077309 | 396ac3102001718c3b106aa65345ba260f9102d2 | /test/beej.us/server.c | 74cf9143a354e4c0d695ebe79b11df3f07cf364b | [
"MIT"
] | permissive | mnaamani/enet-emscripten | 9e6a214f50650b26042ae06df7220e2b14764c35 | 2e20bdc6c5b23324879f378d347fd8d96e40edd4 | refs/heads/master | 2021-01-10T19:53:54.204400 | 2013-10-28T20:19:57 | 2013-10-28T20:19:57 | 5,748,179 | 9 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 2,858 | c | /*
** server.c -- a stream socket server demo
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <sys/wait.h>
#include <signal.h>
#define PORT "3490" // the port users will be connecting to
#define BACKLOG 10 // how many pending connections queue will hold
void sigchld_handler(int s)
{
while(waitpid(-1, NULL, WNOHANG) > 0);
}
// get sockaddr, IPv4 or IPv6:
void *get_in_addr(struct sockaddr *sa)
{
if (sa->sa_family == AF_INET) {
return &(((struct sockaddr_in*)sa)->sin_addr);
}
return &(((struct sockaddr_in6*)sa)->sin6_addr);
}
int main(void)
{
int sockfd, new_fd; // listen on sock_fd, new connection on new_fd
struct addrinfo hints, *servinfo, *p;
struct sockaddr_storage their_addr; // connector's address information
socklen_t sin_size;
struct sigaction sa;
int yes=1;
char s[INET6_ADDRSTRLEN];
int rv;
memset(&hints, 0, sizeof hints);
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_PASSIVE; // use my IP
if ((rv = getaddrinfo(NULL, PORT, &hints, &servinfo)) != 0) {
fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(rv));
return 1;
}
// loop through all the results and bind to the first we can
for(p = servinfo; p != NULL; p = p->ai_next) {
if ((sockfd = socket(p->ai_family, p->ai_socktype,
p->ai_protocol)) == -1) {
perror("server: socket");
continue;
}
if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &yes,
sizeof(int)) == -1) {
perror("setsockopt");
exit(1);
}
if (bind(sockfd, p->ai_addr, p->ai_addrlen) == -1) {
close(sockfd);
perror("server: bind");
continue;
}
break;
}
if (p == NULL) {
fprintf(stderr, "server: failed to bind\n");
return 2;
}
freeaddrinfo(servinfo); // all done with this structure
if (listen(sockfd, BACKLOG) == -1) {
perror("listen");
exit(1);
}
sa.sa_handler = sigchld_handler; // reap all dead processes
sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_RESTART;
if (sigaction(SIGCHLD, &sa, NULL) == -1) {
perror("sigaction");
exit(1);
}
printf("server: waiting for connections...\n");
while(1) { // main accept() loop
sin_size = sizeof their_addr;
new_fd = accept(sockfd, (struct sockaddr *)&their_addr, &sin_size);
if (new_fd == -1) {
perror("accept");
continue;
}
inet_ntop(their_addr.ss_family,
get_in_addr((struct sockaddr *)&their_addr),
s, sizeof s);
printf("server: got connection from %s\n", s);
if (!fork()) { // this is the child process
close(sockfd); // child doesn't need the listener
if (send(new_fd, "Hello, world!", 13, 0) == -1)
perror("send");
close(new_fd);
exit(0);
}
close(new_fd); // parent doesn't need this
}
return 0;
}
| [
"mokhtar.naamani@gmail.com"
] | mokhtar.naamani@gmail.com |
3ebc73434aca662c2d5a3f59e591dc359a456ecf | a1091ad42e6a07b6fbb6fe876feb03547a8da1eb | /MITK-superbuild/ep/include/ITK-4.7/itkBoxUtilities.h | 485c2a56a3a64824a88b633515c0ce0b454196ed | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | Sotatek-TuyenLuu/DP2 | bc61866fe5d388dd11209f4d02744df073ec114f | a48dd0a41c788981009c5ddd034b0e21644c8077 | refs/heads/master | 2020-03-10T04:59:52.461184 | 2018-04-12T07:19:27 | 2018-04-12T07:19:27 | 129,206,578 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 23,741 | h | /*=========================================================================
*
* Copyright Insight Software Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef __itkBoxUtilities_h
#define __itkBoxUtilities_h
#include "itkProgressReporter.h"
#include "itkShapedNeighborhoodIterator.h"
#include "itkImageRegionIterator.h"
#include "itkConstantBoundaryCondition.h"
#include "itkImageRegionIteratorWithIndex.h"
#include "itkImageRegionIterator.h"
#include "itkOffset.h"
#include "itkNeighborhoodAlgorithm.h"
#include "itkShapedNeighborhoodIterator.h"
#include "itkZeroFluxNeumannBoundaryCondition.h"
/*
*
* This code was contributed in the Insight Journal paper:
* "Efficient implementation of kernel filtering"
* by Beare R., Lehmann G
* http://hdl.handle.net/1926/555
* http://www.insight-journal.org/browse/publication/160
*
*/
namespace itk
{
template< typename TIterator >
TIterator *
setConnectivityEarlyBox(TIterator *it, bool fullyConnected = false)
{
// activate the "previous" neighbours
typename TIterator::OffsetType offset;
it->ClearActiveList();
if ( !fullyConnected )
{
// only activate the neighbors that are face connected
// to the current pixel. do not include the center pixel
offset.Fill(0);
for ( unsigned int d = 0; d < TIterator::Dimension; ++d )
{
offset[d] = -1;
it->ActivateOffset(offset);
offset[d] = 0;
}
}
else
{
// activate all neighbors that are face+edge+vertex
// connected to the current pixel. do not include the center pixel
unsigned int centerIndex = it->GetCenterNeighborhoodIndex();
for ( unsigned int d = 0; d < centerIndex; d++ )
{
offset = it->GetOffset(d);
// check for positives in any dimension
bool keep = true;
for ( unsigned int i = 0; i < TIterator::Dimension; i++ )
{
if ( offset[i] > 0 )
{
keep = false;
break;
}
}
if ( keep )
{
it->ActivateOffset(offset);
}
}
offset.Fill(0);
it->DeactivateOffset(offset);
}
return it;
}
template< typename TInputImage, typename TOutputImage >
void
BoxAccumulateFunction(const TInputImage *inputImage,
const TOutputImage *outputImage,
typename TInputImage::RegionType inputRegion,
typename TOutputImage::RegionType outputRegion,
ProgressReporter & progress)
{
// typedefs
typedef TInputImage InputImageType;
typedef typename TInputImage::OffsetType OffsetType;
typedef TOutputImage OutputImageType;
typedef typename TOutputImage::PixelType OutputPixelType;
typedef ImageRegionConstIterator< TInputImage > InputIterator;
typedef ShapedNeighborhoodIterator< TOutputImage > NOutputIterator;
InputIterator inIt(inputImage, inputRegion);
typename TInputImage::SizeType kernelRadius;
kernelRadius.Fill(1);
NOutputIterator noutIt(kernelRadius, outputImage, outputRegion);
// this iterator is fully connected
setConnectivityEarlyBox(&noutIt, true);
ConstantBoundaryCondition< OutputImageType > oBC;
oBC.SetConstant(NumericTraits< OutputPixelType >::ZeroValue() );
noutIt.OverrideBoundaryCondition(&oBC);
// This uses several iterators. An alternative and probably better
// approach would be to copy the input to the output and convolve
// with the following weights (in 2D)
// -(dim - 1) 1
// 1 1
// The result of each convolution needs to get written back to the
// image being convolved so that the accumulation propagates
// This should be implementable with neighborhood operators.
std::vector< int > Weights;
typename NOutputIterator::ConstIterator sIt;
for ( typename NOutputIterator::IndexListType::const_iterator idxIt = noutIt.GetActiveIndexList().begin();
idxIt != noutIt.GetActiveIndexList().end();
idxIt++ )
{
OffsetType offset = noutIt.GetOffset(*idxIt);
int w = -1;
for ( unsigned int k = 0; k < InputImageType::ImageDimension; k++ )
{
if ( offset[k] != 0 )
{
w *= offset[k];
}
}
// std::cout << offset << " " << w << std::endl;
Weights.push_back(w);
}
for ( inIt.GoToBegin(), noutIt.GoToBegin(); !noutIt.IsAtEnd(); ++inIt, ++noutIt )
{
OutputPixelType Sum = 0;
int k;
for ( k = 0, sIt = noutIt.Begin(); !sIt.IsAtEnd(); ++sIt, ++k )
{
Sum += sIt.Get() * Weights[k];
}
noutIt.SetCenterPixel( Sum + inIt.Get() );
progress.CompletedPixel();
}
}
// a function to generate corners of arbitrary dimension box
template< typename ImType >
std::vector< typename ImType::OffsetType > CornerOffsets(const ImType *im)
{
typedef ShapedNeighborhoodIterator< ImType > NIterator;
typename ImType::SizeType unitradius;
unitradius.Fill(1);
NIterator N1( unitradius, im, im->GetRequestedRegion() );
unsigned int centerIndex = N1.GetCenterNeighborhoodIndex();
typename NIterator::OffsetType offset;
std::vector< typename ImType::OffsetType > result;
for ( unsigned int d = 0; d < centerIndex * 2 + 1; d++ )
{
offset = N1.GetOffset(d);
// check whether this is a corner - corners have no zeros
bool corner = true;
for ( unsigned int k = 0; k < ImType::ImageDimension; k++ )
{
if ( offset[k] == 0 )
{
corner = false;
break;
}
}
if ( corner )
{
result.push_back(offset);
}
}
return ( result );
}
template< typename TInputImage, typename TOutputImage >
void
BoxMeanCalculatorFunction(const TInputImage *accImage,
TOutputImage *outputImage,
typename TInputImage::RegionType inputRegion,
typename TOutputImage::RegionType outputRegion,
typename TInputImage::SizeType Radius,
ProgressReporter & progress)
{
// typedefs
typedef TInputImage InputImageType;
typedef typename TInputImage::RegionType RegionType;
typedef typename TInputImage::SizeType SizeType;
typedef typename TInputImage::IndexType IndexType;
typedef typename TInputImage::OffsetType OffsetType;
typedef TOutputImage OutputImageType;
typedef typename TOutputImage::PixelType OutputPixelType;
// use the face generator for speed
typedef NeighborhoodAlgorithm::ImageBoundaryFacesCalculator< InputImageType > FaceCalculatorType;
typedef typename FaceCalculatorType::FaceListType FaceListType;
typedef typename FaceCalculatorType::FaceListType::iterator FaceListTypeIt;
FaceCalculatorType faceCalculator;
FaceListType faceList;
FaceListTypeIt fit;
ZeroFluxNeumannBoundaryCondition< TInputImage > nbc;
// this process is actually slightly asymmetric because we need to
// subtract rectangles that are next to our kernel, not overlapping it
SizeType kernelSize;
SizeType internalRadius;
SizeType RegionLimit;
IndexType RegionStart = inputRegion.GetIndex();
for ( unsigned int i = 0; i < TInputImage::ImageDimension; i++ )
{
kernelSize[i] = Radius[i] * 2 + 1;
internalRadius[i] = Radius[i] + 1;
RegionLimit[i] = inputRegion.GetSize()[i] + RegionStart[i] - 1;
}
typedef typename NumericTraits< OutputPixelType >::RealType AccPixType;
// get a set of offsets to corners for a unit hypercube in this image
std::vector< OffsetType > UnitCorners = CornerOffsets< TInputImage >(accImage);
std::vector< OffsetType > RealCorners;
std::vector< AccPixType > Weights;
// now compute the weights
for ( unsigned int k = 0; k < UnitCorners.size(); k++ )
{
int prod = 1;
OffsetType ThisCorner;
for ( unsigned int i = 0; i < TInputImage::ImageDimension; i++ )
{
prod *= UnitCorners[k][i];
if ( UnitCorners[k][i] > 0 )
{
ThisCorner[i] = Radius[i];
}
else
{
ThisCorner[i] = -( Radius[i] + 1 );
}
}
Weights.push_back( (AccPixType)prod );
RealCorners.push_back(ThisCorner);
}
faceList = faceCalculator(accImage, outputRegion, internalRadius);
// start with the body region
for ( fit = faceList.begin(); fit != faceList.end(); ++fit )
{
if ( fit == faceList.begin() )
{
// this is the body region. This is meant to be an optimized
// version that doesn't use neighborhood regions
// compute the various offsets
AccPixType pixelscount = 1;
for ( unsigned int i = 0; i < TInputImage::ImageDimension; i++ )
{
pixelscount *= (AccPixType)( 2 * Radius[i] + 1 );
}
typedef ImageRegionIterator< OutputImageType > OutputIteratorType;
typedef ImageRegionConstIterator< InputImageType > InputIteratorType;
typedef std::vector< InputIteratorType > CornerItVecType;
CornerItVecType CornerItVec;
// set up the iterators for each corner
for ( unsigned int k = 0; k < RealCorners.size(); k++ )
{
typename InputImageType::RegionType tReg = ( *fit );
tReg.SetIndex(tReg.GetIndex() + RealCorners[k]);
InputIteratorType tempIt(accImage, tReg);
tempIt.GoToBegin();
CornerItVec.push_back(tempIt);
}
// set up the output iterator
OutputIteratorType oIt(outputImage, *fit);
// now do the work
for ( oIt.GoToBegin(); !oIt.IsAtEnd(); ++oIt )
{
AccPixType Sum = 0;
// check each corner
for ( unsigned int k = 0; k < CornerItVec.size(); k++ )
{
Sum += Weights[k] * CornerItVec[k].Get();
// increment each corner iterator
++( CornerItVec[k] );
}
oIt.Set( static_cast< OutputPixelType >( Sum / pixelscount ) );
progress.CompletedPixel();
}
}
else
{
// now we need to deal with the border regions
typedef ImageRegionIteratorWithIndex< OutputImageType > OutputIteratorType;
OutputIteratorType oIt(outputImage, *fit);
// now do the work
for ( oIt.GoToBegin(); !oIt.IsAtEnd(); ++oIt )
{
// figure out the number of pixels in the box by creating an
// equivalent region and cropping - this could probably be
// included in the loop below.
RegionType currentKernelRegion;
currentKernelRegion.SetSize(kernelSize);
// compute the region's index
IndexType kernelRegionIdx = oIt.GetIndex();
IndexType CentIndex = kernelRegionIdx;
for ( unsigned int i = 0; i < TInputImage::ImageDimension; i++ )
{
kernelRegionIdx[i] -= Radius[i];
}
currentKernelRegion.SetIndex(kernelRegionIdx);
currentKernelRegion.Crop(inputRegion);
OffsetValueType edgepixelscount = currentKernelRegion.GetNumberOfPixels();
AccPixType Sum = 0;
// rules are : for each corner,
// for each dimension
// if dimension offset is positive -> this is
// a leading edge. Crop if outside the input
// region
// if dimension offset is negative -> this is
// a trailing edge. Ignore if it is outside
// image region
for ( unsigned int k = 0; k < RealCorners.size(); k++ )
{
IndexType ThisCorner = CentIndex + RealCorners[k];
bool IncludeCorner = true;
for ( unsigned int j = 0; j < TInputImage::ImageDimension; j++ )
{
if ( UnitCorners[k][j] > 0 )
{
// leading edge - crop it
if ( ThisCorner[j] > static_cast< OffsetValueType >( RegionLimit[j] ) )
{
ThisCorner[j] = static_cast< OffsetValueType >( RegionLimit[j] );
}
}
else
{
// trailing edge - check bounds
if ( ThisCorner[j] < RegionStart[j] )
{
IncludeCorner = false;
break;
}
}
}
if ( IncludeCorner )
{
Sum += accImage->GetPixel(ThisCorner) * Weights[k];
}
}
oIt.Set( static_cast< OutputPixelType >( Sum / (AccPixType)edgepixelscount ) );
progress.CompletedPixel();
}
}
}
}
template< typename TInputImage, typename TOutputImage >
void
BoxSigmaCalculatorFunction(const TInputImage *accImage,
TOutputImage *outputImage,
typename TInputImage::RegionType inputRegion,
typename TOutputImage::RegionType outputRegion,
typename TInputImage::SizeType Radius,
ProgressReporter & progress)
{
// typedefs
typedef TInputImage InputImageType;
typedef typename TInputImage::RegionType RegionType;
typedef typename TInputImage::SizeType SizeType;
typedef typename TInputImage::IndexType IndexType;
typedef typename TInputImage::OffsetType OffsetType;
typedef TOutputImage OutputImageType;
typedef typename TOutputImage::PixelType OutputPixelType;
typedef typename TInputImage::PixelType InputPixelType;
// use the face generator for speed
typedef typename NeighborhoodAlgorithm::ImageBoundaryFacesCalculator< InputImageType > FaceCalculatorType;
typedef typename FaceCalculatorType::FaceListType FaceListType;
typedef typename FaceCalculatorType::FaceListType::iterator FaceListTypeIt;
FaceCalculatorType faceCalculator;
FaceListType faceList;
FaceListTypeIt fit;
ZeroFluxNeumannBoundaryCondition< TInputImage > nbc;
// this process is actually slightly asymmetric because we need to
// subtract rectangles that are next to our kernel, not overlapping it
SizeType kernelSize;
SizeType internalRadius;
SizeType RegionLimit;
IndexType RegionStart = inputRegion.GetIndex();
for ( unsigned int i = 0; i < TInputImage::ImageDimension; i++ )
{
kernelSize[i] = Radius[i] * 2 + 1;
internalRadius[i] = Radius[i] + 1;
RegionLimit[i] = inputRegion.GetSize()[i] + RegionStart[i] - 1;
}
typedef typename NumericTraits< OutputPixelType >::RealType AccPixType;
// get a set of offsets to corners for a unit hypercube in this image
std::vector< OffsetType > UnitCorners = CornerOffsets< TInputImage >(accImage);
std::vector< OffsetType > RealCorners;
std::vector< AccPixType > Weights;
// now compute the weights
for ( unsigned int k = 0; k < UnitCorners.size(); k++ )
{
int prod = 1;
OffsetType ThisCorner;
for ( unsigned int i = 0; i < TInputImage::ImageDimension; i++ )
{
prod *= UnitCorners[k][i];
if ( UnitCorners[k][i] > 0 )
{
ThisCorner[i] = Radius[i];
}
else
{
ThisCorner[i] = -( Radius[i] + 1 );
}
}
Weights.push_back( (AccPixType)prod );
RealCorners.push_back(ThisCorner);
}
faceList = faceCalculator(accImage, outputRegion, internalRadius);
// start with the body region
for ( fit = faceList.begin(); fit != faceList.end(); ++fit )
{
if ( fit == faceList.begin() )
{
// this is the body region. This is meant to be an optimized
// version that doesn't use neighborhood regions
// compute the various offsets
AccPixType pixelscount = 1;
for ( unsigned int i = 0; i < TInputImage::ImageDimension; i++ )
{
pixelscount *= (AccPixType)( 2 * Radius[i] + 1 );
}
typedef ImageRegionIterator< OutputImageType > OutputIteratorType;
typedef ImageRegionConstIterator< InputImageType > InputIteratorType;
typedef std::vector< InputIteratorType > CornerItVecType;
CornerItVecType CornerItVec;
// set up the iterators for each corner
for ( unsigned int k = 0; k < RealCorners.size(); k++ )
{
typename InputImageType::RegionType tReg = ( *fit );
tReg.SetIndex(tReg.GetIndex() + RealCorners[k]);
InputIteratorType tempIt(accImage, tReg);
tempIt.GoToBegin();
CornerItVec.push_back(tempIt);
}
// set up the output iterator
OutputIteratorType oIt(outputImage, *fit);
// now do the work
for ( oIt.GoToBegin(); !oIt.IsAtEnd(); ++oIt )
{
AccPixType Sum = 0;
AccPixType SquareSum = 0;
// check each corner
for ( unsigned int k = 0; k < CornerItVec.size(); k++ )
{
const InputPixelType & i = CornerItVec[k].Get();
Sum += Weights[k] * i[0];
SquareSum += Weights[k] * i[1];
// increment each corner iterator
++( CornerItVec[k] );
}
oIt.Set( static_cast< OutputPixelType >( std::sqrt( ( SquareSum - Sum * Sum / pixelscount ) / ( pixelscount - 1 ) ) ) );
progress.CompletedPixel();
}
}
else
{
// now we need to deal with the border regions
typedef ImageRegionIteratorWithIndex< OutputImageType > OutputIteratorType;
OutputIteratorType oIt(outputImage, *fit);
// now do the work
for ( oIt.GoToBegin(); !oIt.IsAtEnd(); ++oIt )
{
// figure out the number of pixels in the box by creating an
// equivalent region and cropping - this could probably be
// included in the loop below.
RegionType currentKernelRegion;
currentKernelRegion.SetSize(kernelSize);
// compute the region's index
IndexType kernelRegionIdx = oIt.GetIndex();
IndexType CentIndex = kernelRegionIdx;
for ( unsigned int i = 0; i < TInputImage::ImageDimension; i++ )
{
kernelRegionIdx[i] -= Radius[i];
}
currentKernelRegion.SetIndex(kernelRegionIdx);
currentKernelRegion.Crop(inputRegion);
SizeValueType edgepixelscount = currentKernelRegion.GetNumberOfPixels();
AccPixType Sum = 0;
AccPixType SquareSum = 0;
// rules are : for each corner,
// for each dimension
// if dimension offset is positive -> this is
// a leading edge. Crop if outside the input
// region
// if dimension offset is negative -> this is
// a trailing edge. Ignore if it is outside
// image region
for ( unsigned int k = 0; k < RealCorners.size(); k++ )
{
IndexType ThisCorner = CentIndex + RealCorners[k];
bool IncludeCorner = true;
for ( unsigned int j = 0; j < TInputImage::ImageDimension; j++ )
{
if ( UnitCorners[k][j] > 0 )
{
// leading edge - crop it
if ( ThisCorner[j] > static_cast< OffsetValueType >( RegionLimit[j] ) )
{
ThisCorner[j] = static_cast< OffsetValueType >( RegionLimit[j] );
}
}
else
{
// trailing edge - check bounds
if ( ThisCorner[j] < RegionStart[j] )
{
IncludeCorner = false;
break;
}
}
}
if ( IncludeCorner )
{
const InputPixelType & i = accImage->GetPixel(ThisCorner);
Sum += Weights[k] * i[0];
SquareSum += Weights[k] * i[1];
}
}
oIt.Set( static_cast< OutputPixelType >( std::sqrt( ( SquareSum - Sum * Sum
/ edgepixelscount ) / ( edgepixelscount - 1 ) ) ) );
progress.CompletedPixel();
}
}
}
}
template< typename TInputImage, typename TOutputImage >
void
BoxSquareAccumulateFunction(const TInputImage *inputImage,
TOutputImage *outputImage,
typename TInputImage::RegionType inputRegion,
typename TOutputImage::RegionType outputRegion,
ProgressReporter & progress)
{
// typedefs
typedef TInputImage InputImageType;
typedef typename TInputImage::OffsetType OffsetType;
typedef TOutputImage OutputImageType;
typedef typename TOutputImage::PixelType OutputPixelType;
typedef typename OutputPixelType::ValueType ValueType;
typedef typename TInputImage::PixelType InputPixelType;
typedef ImageRegionConstIterator< TInputImage > InputIterator;
typedef ShapedNeighborhoodIterator< TOutputImage > NOutputIterator;
InputIterator inIt(inputImage, inputRegion);
typename TInputImage::SizeType kernelRadius;
kernelRadius.Fill(1);
NOutputIterator noutIt(kernelRadius, outputImage, outputRegion);
// this iterator is fully connected
setConnectivityEarlyBox(&noutIt, true);
ConstantBoundaryCondition< OutputImageType > oBC;
oBC.SetConstant(NumericTraits< OutputPixelType >::ZeroValue() );
noutIt.OverrideBoundaryCondition(&oBC);
// This uses several iterators. An alternative and probably better
// approach would be to copy the input to the output and convolve
// with the following weights (in 2D)
// -(dim - 1) 1
// 1 1
// The result of each convolution needs to get written back to the
// image being convolved so that the accumulation propagates
// This should be implementable with neighborhood operators.
std::vector< int > Weights;
typename NOutputIterator::ConstIterator sIt;
for ( typename NOutputIterator::IndexListType::const_iterator idxIt = noutIt.GetActiveIndexList().begin();
idxIt != noutIt.GetActiveIndexList().end();
idxIt++ )
{
OffsetType offset = noutIt.GetOffset(*idxIt);
int w = -1;
for ( unsigned int k = 0; k < InputImageType::ImageDimension; k++ )
{
if ( offset[k] != 0 )
{
w *= offset[k];
}
}
Weights.push_back(w);
}
for ( inIt.GoToBegin(), noutIt.GoToBegin(); !noutIt.IsAtEnd(); ++inIt, ++noutIt )
{
ValueType Sum = 0;
ValueType SquareSum = 0;
int k;
for ( k = 0, sIt = noutIt.Begin(); !sIt.IsAtEnd(); ++sIt, ++k )
{
const OutputPixelType & v = sIt.Get();
Sum += v[0] * Weights[k];
SquareSum += v[1] * Weights[k];
}
OutputPixelType o;
const InputPixelType & i = inIt.Get();
o[0] = Sum + i;
o[1] = SquareSum + i * i;
noutIt.SetCenterPixel(o);
progress.CompletedPixel();
}
}
} //namespace itk
#endif
| [
"tuyen.luu@sotatek.com"
] | tuyen.luu@sotatek.com |
8088ed68ab15f645b9b9bcbb8ce952b0a211d165 | 9550e1f8addb59a3529cd6694d5bac1a779ffc7b | /src/masternode-budget.h | fb1ad6fcf4f21854c8567759af0b81a0e58a7df2 | [
"MIT"
] | permissive | CHIPO-Project/CHIPO | 306eb6fa01cf52bd6f584280d13d7f2f93ff42fe | 6ac87e34790ed7e03297e446ec60baba5bc807ad | refs/heads/master | 2020-09-02T17:21:30.316375 | 2020-07-15T01:36:04 | 2020-07-15T01:36:04 | 219,246,135 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 18,129 | h | // Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef MASTERNODE_BUDGET_H
#define MASTERNODE_BUDGET_H
#include "base58.h"
#include "init.h"
#include "key.h"
#include "main.h"
#include "masternode.h"
#include "net.h"
#include "sync.h"
#include "util.h"
#include <boost/lexical_cast.hpp>
using namespace std;
extern CCriticalSection cs_budget;
class CBudgetManager;
class CFinalizedBudgetBroadcast;
class CFinalizedBudget;
class CBudgetProposal;
class CBudgetProposalBroadcast;
class CTxBudgetPayment;
#define VOTE_ABSTAIN 0
#define VOTE_YES 1
#define VOTE_NO 2
static const CAmount PROPOSAL_FEE_TX = (50 * COIN);
static const CAmount BUDGET_FEE_TX = (50 * COIN);
static const int64_t BUDGET_VOTE_UPDATE_MIN = 60 * 60;
extern std::vector<CBudgetProposalBroadcast> vecImmatureBudgetProposals;
extern std::vector<CFinalizedBudgetBroadcast> vecImmatureFinalizedBudgets;
extern CBudgetManager budget;
void DumpBudgets();
// Define amount of blocks in budget payment cycle
int GetBudgetPaymentCycleBlocks();
//Check the collateral transaction for the budget proposal/finalized budget
bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, std::string& strError, int64_t& nTime, int& nConf);
//
// CBudgetVote - Allow a masternode node to vote and broadcast throughout the network
//
class CBudgetVote
{
public:
bool fValid; //if the vote is currently valid / counted
bool fSynced; //if we've sent this to our peers
CTxIn vin;
uint256 nProposalHash;
int nVote;
int64_t nTime;
std::vector<unsigned char> vchSig;
CBudgetVote();
CBudgetVote(CTxIn vin, uint256 nProposalHash, int nVoteIn);
bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
bool SignatureValid(bool fSignatureCheck);
void Relay();
std::string GetVoteString()
{
std::string ret = "ABSTAIN";
if (nVote == VOTE_YES) ret = "YES";
if (nVote == VOTE_NO) ret = "NO";
return ret;
}
uint256 GetHash()
{
CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
ss << vin;
ss << nProposalHash;
ss << nVote;
ss << nTime;
return ss.GetHash();
}
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
{
READWRITE(vin);
READWRITE(nProposalHash);
READWRITE(nVote);
READWRITE(nTime);
READWRITE(vchSig);
}
};
//
// CFinalizedBudgetVote - Allow a masternode node to vote and broadcast throughout the network
//
class CFinalizedBudgetVote
{
public:
bool fValid; //if the vote is currently valid / counted
bool fSynced; //if we've sent this to our peers
CTxIn vin;
uint256 nBudgetHash;
int64_t nTime;
std::vector<unsigned char> vchSig;
CFinalizedBudgetVote();
CFinalizedBudgetVote(CTxIn vinIn, uint256 nBudgetHashIn);
bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
bool SignatureValid(bool fSignatureCheck);
void Relay();
uint256 GetHash()
{
CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
ss << vin;
ss << nBudgetHash;
ss << nTime;
return ss.GetHash();
}
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
{
READWRITE(vin);
READWRITE(nBudgetHash);
READWRITE(nTime);
READWRITE(vchSig);
}
};
/** Save Budget Manager (budget.dat)
*/
class CBudgetDB
{
private:
boost::filesystem::path pathDB;
std::string strMagicMessage;
public:
enum ReadResult {
Ok,
FileError,
HashReadError,
IncorrectHash,
IncorrectMagicMessage,
IncorrectMagicNumber,
IncorrectFormat
};
CBudgetDB();
bool Write(const CBudgetManager& objToSave);
ReadResult Read(CBudgetManager& objToLoad, bool fDryRun = false);
};
//
// Budget Manager : Contains all proposals for the budget
//
class CBudgetManager
{
private:
//hold txes until they mature enough to use
// XX42 map<uint256, CTransaction> mapCollateral;
map<uint256, uint256> mapCollateralTxids;
public:
// critical section to protect the inner data structures
mutable CCriticalSection cs;
// keep track of the scanning errors I've seen
map<uint256, CBudgetProposal> mapProposals;
map<uint256, CFinalizedBudget> mapFinalizedBudgets;
std::map<uint256, CBudgetProposalBroadcast> mapSeenMasternodeBudgetProposals;
std::map<uint256, CBudgetVote> mapSeenMasternodeBudgetVotes;
std::map<uint256, CBudgetVote> mapOrphanMasternodeBudgetVotes;
std::map<uint256, CFinalizedBudgetBroadcast> mapSeenFinalizedBudgets;
std::map<uint256, CFinalizedBudgetVote> mapSeenFinalizedBudgetVotes;
std::map<uint256, CFinalizedBudgetVote> mapOrphanFinalizedBudgetVotes;
CBudgetManager()
{
mapProposals.clear();
mapFinalizedBudgets.clear();
}
void ClearSeen()
{
mapSeenMasternodeBudgetProposals.clear();
mapSeenMasternodeBudgetVotes.clear();
mapSeenFinalizedBudgets.clear();
mapSeenFinalizedBudgetVotes.clear();
}
int sizeFinalized() { return (int)mapFinalizedBudgets.size(); }
int sizeProposals() { return (int)mapProposals.size(); }
void ResetSync();
void MarkSynced();
void Sync(CNode* node, uint256 nProp, bool fPartial = false);
void Calculate();
void ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
void NewBlock();
CBudgetProposal* FindProposal(const std::string& strProposalName);
CBudgetProposal* FindProposal(uint256 nHash);
CFinalizedBudget* FindFinalizedBudget(uint256 nHash);
std::pair<std::string, std::string> GetVotes(std::string strProposalName);
CAmount GetTotalBudget(int nHeight);
std::vector<CBudgetProposal*> GetBudget();
std::vector<CBudgetProposal*> GetAllProposals();
std::vector<CFinalizedBudget*> GetFinalizedBudgets();
bool IsBudgetPaymentBlock(int nBlockHeight);
bool AddProposal(CBudgetProposal& budgetProposal);
bool AddFinalizedBudget(CFinalizedBudget& finalizedBudget);
void SubmitFinalBudget();
bool UpdateProposal(CBudgetVote& vote, CNode* pfrom, std::string& strError);
bool UpdateFinalizedBudget(CFinalizedBudgetVote& vote, CNode* pfrom, std::string& strError);
bool PropExists(uint256 nHash);
bool IsTransactionValid(const CTransaction& txNew, int nBlockHeight);
std::string GetRequiredPaymentsString(int nBlockHeight);
void FillBlockPayee(CMutableTransaction& txNew, CAmount nFees, bool fProofOfStake);
void CheckOrphanVotes();
void Clear()
{
LOCK(cs);
LogPrintf("Budget object cleared\n");
mapProposals.clear();
mapFinalizedBudgets.clear();
mapSeenMasternodeBudgetProposals.clear();
mapSeenMasternodeBudgetVotes.clear();
mapSeenFinalizedBudgets.clear();
mapSeenFinalizedBudgetVotes.clear();
mapOrphanMasternodeBudgetVotes.clear();
mapOrphanFinalizedBudgetVotes.clear();
}
void CheckAndRemove();
std::string ToString() const;
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
{
READWRITE(mapSeenMasternodeBudgetProposals);
READWRITE(mapSeenMasternodeBudgetVotes);
READWRITE(mapSeenFinalizedBudgets);
READWRITE(mapSeenFinalizedBudgetVotes);
READWRITE(mapOrphanMasternodeBudgetVotes);
READWRITE(mapOrphanFinalizedBudgetVotes);
READWRITE(mapProposals);
READWRITE(mapFinalizedBudgets);
}
};
class CTxBudgetPayment
{
public:
uint256 nProposalHash;
CScript payee;
CAmount nAmount;
CTxBudgetPayment()
{
payee = CScript();
nAmount = 0;
nProposalHash = 0;
}
ADD_SERIALIZE_METHODS;
//for saving to the serialized db
template <typename Stream, typename Operation>
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
{
READWRITE(payee);
READWRITE(nAmount);
READWRITE(nProposalHash);
}
};
//
// Finalized Budget : Contains the suggested proposals to pay on a given block
//
class CFinalizedBudget
{
private:
// critical section to protect the inner data structures
mutable CCriticalSection cs;
bool fAutoChecked; //If it matches what we see, we'll auto vote for it (masternode only)
public:
bool fValid;
std::string strBudgetName;
int nBlockStart;
std::vector<CTxBudgetPayment> vecBudgetPayments;
map<uint256, CFinalizedBudgetVote> mapVotes;
uint256 nFeeTXHash;
int64_t nTime;
CFinalizedBudget();
CFinalizedBudget(const CFinalizedBudget& other);
void CleanAndRemove(bool fSignatureCheck);
bool AddOrUpdateVote(CFinalizedBudgetVote& vote, std::string& strError);
double GetScore();
bool HasMinimumRequiredSupport();
bool IsValid(std::string& strError, bool fCheckCollateral = true);
std::string GetName() { return strBudgetName; }
std::string GetProposals();
int GetBlockStart() { return nBlockStart; }
int GetBlockEnd() { return nBlockStart + (int)(vecBudgetPayments.size() - 1); }
int GetVoteCount() { return (int)mapVotes.size(); }
bool IsTransactionValid(const CTransaction& txNew, int nBlockHeight);
bool GetBudgetPaymentByBlock(int64_t nBlockHeight, CTxBudgetPayment& payment)
{
LOCK(cs);
int i = nBlockHeight - GetBlockStart();
if (i < 0) return false;
if (i > (int)vecBudgetPayments.size() - 1) return false;
payment = vecBudgetPayments[i];
return true;
}
bool GetPayeeAndAmount(int64_t nBlockHeight, CScript& payee, CAmount& nAmount)
{
LOCK(cs);
int i = nBlockHeight - GetBlockStart();
if (i < 0) return false;
if (i > (int)vecBudgetPayments.size() - 1) return false;
payee = vecBudgetPayments[i].payee;
nAmount = vecBudgetPayments[i].nAmount;
return true;
}
//check to see if we should vote on this
void AutoCheck();
//total chipo paid out by this budget
CAmount GetTotalPayout();
//vote on this finalized budget as a masternode
void SubmitVote();
//checks the hashes to make sure we know about them
string GetStatus();
uint256 GetHash()
{
CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
ss << strBudgetName;
ss << nBlockStart;
ss << vecBudgetPayments;
uint256 h1 = ss.GetHash();
return h1;
}
ADD_SERIALIZE_METHODS;
//for saving to the serialized db
template <typename Stream, typename Operation>
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
{
READWRITE(LIMITED_STRING(strBudgetName, 20));
READWRITE(nFeeTXHash);
READWRITE(nTime);
READWRITE(nBlockStart);
READWRITE(vecBudgetPayments);
READWRITE(fAutoChecked);
READWRITE(mapVotes);
}
};
// FinalizedBudget are cast then sent to peers with this object, which leaves the votes out
class CFinalizedBudgetBroadcast : public CFinalizedBudget
{
private:
std::vector<unsigned char> vchSig;
public:
CFinalizedBudgetBroadcast();
CFinalizedBudgetBroadcast(const CFinalizedBudget& other);
CFinalizedBudgetBroadcast(std::string strBudgetNameIn, int nBlockStartIn, std::vector<CTxBudgetPayment> vecBudgetPaymentsIn, uint256 nFeeTXHashIn);
void swap(CFinalizedBudgetBroadcast& first, CFinalizedBudgetBroadcast& second) // nothrow
{
// enable ADL (not necessary in our case, but good practice)
using std::swap;
// by swapping the members of two classes,
// the two classes are effectively swapped
swap(first.strBudgetName, second.strBudgetName);
swap(first.nBlockStart, second.nBlockStart);
first.mapVotes.swap(second.mapVotes);
first.vecBudgetPayments.swap(second.vecBudgetPayments);
swap(first.nFeeTXHash, second.nFeeTXHash);
swap(first.nTime, second.nTime);
}
CFinalizedBudgetBroadcast& operator=(CFinalizedBudgetBroadcast from)
{
swap(*this, from);
return *this;
}
void Relay();
ADD_SERIALIZE_METHODS;
//for propagating messages
template <typename Stream, typename Operation>
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
{
//for syncing with other clients
READWRITE(LIMITED_STRING(strBudgetName, 20));
READWRITE(nBlockStart);
READWRITE(vecBudgetPayments);
READWRITE(nFeeTXHash);
}
};
//
// Budget Proposal : Contains the masternode votes for each budget
//
class CBudgetProposal
{
private:
// critical section to protect the inner data structures
mutable CCriticalSection cs;
CAmount nAlloted;
public:
bool fValid;
std::string strProposalName;
/*
json object with name, short-description, long-description, pdf-url and any other info
This allows the proposal website to stay 100% decentralized
*/
std::string strURL;
int nBlockStart;
int nBlockEnd;
CAmount nAmount;
CScript address;
int64_t nTime;
uint256 nFeeTXHash;
map<uint256, CBudgetVote> mapVotes;
//cache object
CBudgetProposal();
CBudgetProposal(const CBudgetProposal& other);
CBudgetProposal(std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn, uint256 nFeeTXHashIn);
void Calculate();
bool AddOrUpdateVote(CBudgetVote& vote, std::string& strError);
bool HasMinimumRequiredSupport();
std::pair<std::string, std::string> GetVotes();
bool IsValid(std::string& strError, bool fCheckCollateral = true);
bool IsEstablished()
{
// Proposals must be at least a day old to make it into a budget
if (Params().NetworkID() == CBaseChainParams::MAIN) return (nTime < GetTime() - (60 * 60 * 24));
// For testing purposes - 5 minutes
return (nTime < GetTime() - (60 * 5));
}
std::string GetName() { return strProposalName; }
std::string GetURL() { return strURL; }
int GetBlockStart() { return nBlockStart; }
int GetBlockEnd() { return nBlockEnd; }
CScript GetPayee() { return address; }
int GetTotalPaymentCount();
int GetRemainingPaymentCount();
int GetBlockStartCycle();
int GetBlockCurrentCycle();
int GetBlockEndCycle();
double GetRatio();
int GetYeas();
int GetNays();
int GetAbstains();
CAmount GetAmount() { return nAmount; }
void SetAllotted(CAmount nAllotedIn) { nAlloted = nAllotedIn; }
CAmount GetAllotted() { return nAlloted; }
void CleanAndRemove(bool fSignatureCheck);
uint256 GetHash()
{
CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
ss << strProposalName;
ss << strURL;
ss << nBlockStart;
ss << nBlockEnd;
ss << nAmount;
ss << address;
uint256 h1 = ss.GetHash();
return h1;
}
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
{
//for syncing with other clients
READWRITE(LIMITED_STRING(strProposalName, 20));
READWRITE(LIMITED_STRING(strURL, 64));
READWRITE(nTime);
READWRITE(nBlockStart);
READWRITE(nBlockEnd);
READWRITE(nAmount);
READWRITE(address);
READWRITE(nTime);
READWRITE(nFeeTXHash);
//for saving to the serialized db
READWRITE(mapVotes);
}
};
// Proposals are cast then sent to peers with this object, which leaves the votes out
class CBudgetProposalBroadcast : public CBudgetProposal
{
public:
CBudgetProposalBroadcast() : CBudgetProposal() {}
CBudgetProposalBroadcast(const CBudgetProposal& other) : CBudgetProposal(other) {}
CBudgetProposalBroadcast(const CBudgetProposalBroadcast& other) : CBudgetProposal(other) {}
CBudgetProposalBroadcast(std::string strProposalNameIn, std::string strURLIn, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nBlockStartIn, uint256 nFeeTXHashIn);
void swap(CBudgetProposalBroadcast& first, CBudgetProposalBroadcast& second) // nothrow
{
// enable ADL (not necessary in our case, but good practice)
using std::swap;
// by swapping the members of two classes,
// the two classes are effectively swapped
swap(first.strProposalName, second.strProposalName);
swap(first.nBlockStart, second.nBlockStart);
swap(first.strURL, second.strURL);
swap(first.nBlockEnd, second.nBlockEnd);
swap(first.nAmount, second.nAmount);
swap(first.address, second.address);
swap(first.nTime, second.nTime);
swap(first.nFeeTXHash, second.nFeeTXHash);
first.mapVotes.swap(second.mapVotes);
}
CBudgetProposalBroadcast& operator=(CBudgetProposalBroadcast from)
{
swap(*this, from);
return *this;
}
void Relay();
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
{
//for syncing with other clients
READWRITE(LIMITED_STRING(strProposalName, 20));
READWRITE(LIMITED_STRING(strURL, 64));
READWRITE(nTime);
READWRITE(nBlockStart);
READWRITE(nBlockEnd);
READWRITE(nAmount);
READWRITE(address);
READWRITE(nFeeTXHash);
}
};
#endif
| [
"dev@chipo.icu"
] | dev@chipo.icu |
283ddd491fe39084787ede4afb49b6ba812633aa | 2a6323b3ea6bb261d9f4f4f9a6781b4c178d9360 | /source/backend/engine/CarlaEngineData.cpp | c7c24eb374616bf41a6e16b0567cbf852a44af83 | [] | no_license | laanwj/Carla | 2a843e5058d93679c2abd57e51ee81878fbbab7b | 38b5a04f3ca7a1814155d5e171b2900ca73b0929 | refs/heads/master | 2021-01-18T00:36:45.434515 | 2014-10-13T20:19:43 | 2014-10-13T20:19:43 | 23,951,642 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 9,059 | cpp | /*
* Carla Plugin Host
* Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.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 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.
*
* For a full copy of the GNU General Public License see the doc/GPL.txt file.
*/
#include "CarlaEngine.hpp"
#include "CarlaMathUtils.hpp"
#include "CarlaMIDI.h"
CARLA_BACKEND_START_NAMESPACE
// -----------------------------------------------------------------------
// EngineControlEvent
void EngineControlEvent::convertToMidiData(const uint8_t channel, uint8_t& size, uint8_t data[3]) const noexcept
{
size = 0;
switch (type)
{
case kEngineControlEventTypeNull:
break;
case kEngineControlEventTypeParameter:
if (param >= MAX_MIDI_VALUE)
{
// out of bounds. do nothing
}
else if (MIDI_IS_CONTROL_BANK_SELECT(param))
{
size = 3;
data[0] = static_cast<uint8_t>(MIDI_STATUS_CONTROL_CHANGE | (channel & MIDI_CHANNEL_BIT));
data[1] = MIDI_CONTROL_BANK_SELECT;
data[2] = uint8_t(carla_fixValue<float>(0.0f, float(MAX_MIDI_VALUE-1), value));
}
else
{
size = 3;
data[0] = static_cast<uint8_t>(MIDI_STATUS_CONTROL_CHANGE | (channel & MIDI_CHANNEL_BIT));
data[1] = static_cast<uint8_t>(param);
data[2] = uint8_t(carla_fixValue<float>(0.0f, 1.0f, value) * float(MAX_MIDI_VALUE-1));
}
break;
case kEngineControlEventTypeMidiBank:
size = 3;
data[0] = static_cast<uint8_t>(MIDI_STATUS_CONTROL_CHANGE | (channel & MIDI_CHANNEL_BIT));
data[1] = MIDI_CONTROL_BANK_SELECT;
data[2] = uint8_t(carla_fixValue<uint16_t>(0, MAX_MIDI_VALUE-1, param));
break;
case kEngineControlEventTypeMidiProgram:
size = 2;
data[0] = static_cast<uint8_t>(MIDI_STATUS_PROGRAM_CHANGE | (channel & MIDI_CHANNEL_BIT));
data[1] = uint8_t(carla_fixValue<uint16_t>(0, MAX_MIDI_VALUE-1, param));
break;
case kEngineControlEventTypeAllSoundOff:
size = 2;
data[0] = static_cast<uint8_t>(MIDI_STATUS_CONTROL_CHANGE | (channel & MIDI_CHANNEL_BIT));
data[1] = MIDI_CONTROL_ALL_SOUND_OFF;
break;
case kEngineControlEventTypeAllNotesOff:
size = 2;
data[0] = static_cast<uint8_t>(MIDI_STATUS_CONTROL_CHANGE | (channel & MIDI_CHANNEL_BIT));
data[1] = MIDI_CONTROL_ALL_NOTES_OFF;
break;
}
}
// -----------------------------------------------------------------------
// EngineEvent
void EngineEvent::fillFromMidiData(const uint8_t size, const uint8_t* const data) noexcept
{
if (size == 0 || data == nullptr || data[0] < MIDI_STATUS_NOTE_OFF)
{
type = kEngineEventTypeNull;
channel = 0;
return;
}
// get channel
channel = uint8_t(MIDI_GET_CHANNEL_FROM_DATA(data));
// get status
const uint8_t midiStatus(uint8_t(MIDI_GET_STATUS_FROM_DATA(data)));
if (midiStatus == MIDI_STATUS_CONTROL_CHANGE)
{
CARLA_SAFE_ASSERT_RETURN(size >= 2,);
type = kEngineEventTypeControl;
const uint8_t midiControl(data[1]);
if (MIDI_IS_CONTROL_BANK_SELECT(midiControl))
{
CARLA_SAFE_ASSERT_RETURN(size >= 3,);
const uint8_t midiBank(data[2]);
ctrl.type = kEngineControlEventTypeMidiBank;
ctrl.param = midiBank;
ctrl.value = 0.0f;
}
else if (midiControl == MIDI_CONTROL_ALL_SOUND_OFF)
{
ctrl.type = kEngineControlEventTypeAllSoundOff;
ctrl.param = 0;
ctrl.value = 0.0f;
}
else if (midiControl == MIDI_CONTROL_ALL_NOTES_OFF)
{
ctrl.type = kEngineControlEventTypeAllNotesOff;
ctrl.param = 0;
ctrl.value = 0.0f;
}
else
{
CARLA_SAFE_ASSERT_RETURN(size >= 3,);
const uint8_t midiValue(carla_fixValue<uint8_t>(0, 127, data[2])); // ensures 0.0<->1.0 value range
ctrl.type = kEngineControlEventTypeParameter;
ctrl.param = midiControl;
ctrl.value = float(midiValue)/127.0f;
}
}
else if (midiStatus == MIDI_STATUS_PROGRAM_CHANGE)
{
CARLA_SAFE_ASSERT_RETURN(size >= 2,);
type = kEngineEventTypeControl;
const uint8_t midiProgram(data[1]);
ctrl.type = kEngineControlEventTypeMidiProgram;
ctrl.param = midiProgram;
ctrl.value = 0.0f;
}
else
{
type = kEngineEventTypeMidi;
midi.port = 0;
midi.size = size;
if (size > EngineMidiEvent::kDataSize)
{
midi.dataExt = data;
std::memset(midi.data, 0, sizeof(uint8_t)*EngineMidiEvent::kDataSize);
}
else
{
midi.data[0] = midiStatus;
uint8_t i=1;
for (; i < size; ++i)
midi.data[i] = data[i];
for (; i < EngineMidiEvent::kDataSize; ++i)
midi.data[i] = 0;
midi.dataExt = nullptr;
}
}
}
// -----------------------------------------------------------------------
// EngineOptions
EngineOptions::EngineOptions() noexcept
#ifdef CARLA_OS_LINUX
: processMode(ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS),
transportMode(ENGINE_TRANSPORT_MODE_JACK),
#else
: processMode(ENGINE_PROCESS_MODE_CONTINUOUS_RACK),
transportMode(ENGINE_TRANSPORT_MODE_INTERNAL),
#endif
forceStereo(false),
preferPluginBridges(false),
preferUiBridges(true),
uisAlwaysOnTop(true),
maxParameters(MAX_DEFAULT_PARAMETERS),
uiBridgesTimeout(4000),
audioNumPeriods(2),
audioBufferSize(512),
audioSampleRate(44100),
audioDevice(nullptr),
pathLADSPA(nullptr),
pathDSSI(nullptr),
pathLV2(nullptr),
pathVST(nullptr),
pathVST3(nullptr),
pathAU(nullptr),
pathGIG(nullptr),
pathSF2(nullptr),
pathSFZ(nullptr),
binaryDir(nullptr),
resourceDir(nullptr),
preventBadBehaviour(false),
frontendWinId(0) {}
EngineOptions::~EngineOptions() noexcept
{
if (audioDevice != nullptr)
{
delete[] audioDevice;
audioDevice = nullptr;
}
if (pathLADSPA != nullptr)
{
delete[] pathLADSPA;
pathLADSPA = nullptr;
}
if (pathDSSI != nullptr)
{
delete[] pathDSSI;
pathDSSI = nullptr;
}
if (pathLV2 != nullptr)
{
delete[] pathLV2;
pathLV2 = nullptr;
}
if (pathVST != nullptr)
{
delete[] pathVST;
pathVST = nullptr;
}
if (pathVST3 != nullptr)
{
delete[] pathVST3;
pathVST3 = nullptr;
}
if (pathAU != nullptr)
{
delete[] pathAU;
pathAU = nullptr;
}
if (pathGIG != nullptr)
{
delete[] pathGIG;
pathGIG = nullptr;
}
if (pathSF2 != nullptr)
{
delete[] pathSF2;
pathSF2 = nullptr;
}
if (pathSFZ != nullptr)
{
delete[] pathSFZ;
pathSFZ = nullptr;
}
if (binaryDir != nullptr)
{
delete[] binaryDir;
binaryDir = nullptr;
}
if (resourceDir != nullptr)
{
delete[] resourceDir;
resourceDir = nullptr;
}
}
// -----------------------------------------------------------------------
// EngineTimeInfoBBT
EngineTimeInfoBBT::EngineTimeInfoBBT() noexcept
: bar(0),
beat(0),
tick(0),
barStartTick(0.0),
beatsPerBar(0.0f),
beatType(0.0f),
ticksPerBeat(0.0),
beatsPerMinute(0.0) {}
// -----------------------------------------------------------------------
// EngineTimeInfo
EngineTimeInfo::EngineTimeInfo() noexcept
: playing(false),
frame(0),
usecs(0),
valid(0x0),
bbt() {}
void EngineTimeInfo::clear() noexcept
{
playing = false;
frame = 0;
usecs = 0;
valid = 0x0;
}
bool EngineTimeInfo::operator==(const EngineTimeInfo& timeInfo) const noexcept
{
if (timeInfo.playing != playing || timeInfo.frame != frame || timeInfo.valid != valid)
return false;
if ((valid & kValidBBT) == 0)
return true;
if (! carla_compareFloats(timeInfo.bbt.beatsPerMinute, bbt.beatsPerMinute))
return false;
return true;
}
bool EngineTimeInfo::operator!=(const EngineTimeInfo& timeInfo) const noexcept
{
return !operator==(timeInfo);
}
// -----------------------------------------------------------------------
CARLA_BACKEND_END_NAMESPACE
| [
"falktx@gmail.com"
] | falktx@gmail.com |
36f6a141b5cabba7e43347b482723215bbd9ffdd | 59418b5794f251391650d8593704190606fa2b41 | /plugin_api/em5/em5/event/main/em20years/Em20MainEventFactories.h | 031a07c574eb0c29c5d8d780df920683330ea0a0 | [] | no_license | JeveruBerry/emergency5_sdk | 8e5726f28123962541f7e9e4d70b2d8d5cc76cff | e5b23d905c356aab6f8b26432c72d18e5838ccf6 | refs/heads/master | 2023-08-25T12:25:19.117165 | 2018-12-18T16:55:16 | 2018-12-18T17:09:54 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,145 | h | // Copyright (C) 2012-2018 Promotion Software GmbH
//[-------------------------------------------------------]
//[ Header guard ]
//[-------------------------------------------------------]
#pragma once
//[-------------------------------------------------------]
//[ Includes ]
//[-------------------------------------------------------]
#include "em5/event/main/GenericMainEventFactory.h"
//[-------------------------------------------------------]
//[ Namespace ]
//[-------------------------------------------------------]
namespace em5
{
//[-------------------------------------------------------]
//[ Classes ]
//[-------------------------------------------------------]
class MainEvent301Factory : public GenericMainEventFactory
{
public:
inline MainEvent301Factory() : GenericMainEventFactory("em5::MainEvent301") {}
QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
};
class MainEvent302Factory : public GenericMainEventFactory
{
public:
inline MainEvent302Factory() : GenericMainEventFactory("em5::MainEvent302") {}
QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
};
class MainEvent303Factory : public GenericMainEventFactory
{
public:
inline MainEvent303Factory() : GenericMainEventFactory("em5::MainEvent303") {}
QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
};
class MainEvent304Factory : public GenericMainEventFactory
{
public:
inline MainEvent304Factory() : GenericMainEventFactory("em5::MainEvent304") {}
QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
};
class MainEvent305Factory : public GenericMainEventFactory
{
public:
inline MainEvent305Factory() : GenericMainEventFactory("em5::MainEvent305") {}
QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
};
class MainEvent306Factory : public GenericMainEventFactory
{
public:
inline MainEvent306Factory() : GenericMainEventFactory("em5::MainEvent306") {}
QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
};
class MainEvent307Factory : public GenericMainEventFactory
{
public:
inline MainEvent307Factory() : GenericMainEventFactory("em5::MainEvent307") {}
QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
};
class MainEvent308Factory : public GenericMainEventFactory
{
public:
inline MainEvent308Factory() : GenericMainEventFactory("em5::MainEvent308") {}
QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
};
class MainEvent309Factory : public GenericMainEventFactory
{
public:
inline MainEvent309Factory() : GenericMainEventFactory("em5::MainEvent309") {}
QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
};
class MainEvent310Factory : public GenericMainEventFactory
{
public:
inline MainEvent310Factory() : GenericMainEventFactory("em5::MainEvent310") {}
QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
};
//[-------------------------------------------------------]
//[ Namespace ]
//[-------------------------------------------------------]
} // em5
//[-------------------------------------------------------]
//[ CAMP reflection system ]
//[-------------------------------------------------------]
QSF_CAMP_TYPE_NONCOPYABLE(em5::MainEvent301Factory)
QSF_CAMP_TYPE_NONCOPYABLE(em5::MainEvent302Factory)
QSF_CAMP_TYPE_NONCOPYABLE(em5::MainEvent303Factory)
QSF_CAMP_TYPE_NONCOPYABLE(em5::MainEvent304Factory)
QSF_CAMP_TYPE_NONCOPYABLE(em5::MainEvent305Factory)
QSF_CAMP_TYPE_NONCOPYABLE(em5::MainEvent306Factory)
QSF_CAMP_TYPE_NONCOPYABLE(em5::MainEvent307Factory)
QSF_CAMP_TYPE_NONCOPYABLE(em5::MainEvent308Factory)
QSF_CAMP_TYPE_NONCOPYABLE(em5::MainEvent309Factory)
QSF_CAMP_TYPE_NONCOPYABLE(em5::MainEvent310Factory)
| [
"christian.ofenberg@promotion-software.de"
] | christian.ofenberg@promotion-software.de |
629600f174e893d8202d48415f8286cc40341e9f | a6e4150a024a024e6dab63e12a73e3757d503969 | /AeroCraftSimulator/RigidBodyRelaxRot3/from_pilotCamera/rigidBody.h | 6f0f5a67869e5ced2b420581a6dc9f5849a6e987 | [] | no_license | ProkopHapala/cpp_arch | 0a972c1f62b94ca7c3fabfda388622c6c5d368c2 | c4eef1a7bf9a1adff6de7d5f66e0451be3042d01 | refs/heads/master | 2020-06-03T19:16:19.723404 | 2015-08-03T07:46:14 | 2015-08-03T07:46:14 | 40,006,590 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,619 | h |
// according to
// An Introduction to Physically Based Modeling:
// Rigid Body Simulation I—Unconstrained Rigid
// Body Dynamics
// David Baraff
// https://www.cs.cmu.edu/~baraff/sigcourse/notesd1.pdf
class PointBody;
class RigidBody;
class SpringConstrain;
///////////////////////////
// CLASS : PointBody
///////////////////////////
class PointBody{
public:
// parameters
float mass;
// auxiliary parameters
float invMass;
// State variables
Vec3d pos;
Vec3d vel;
// auxiliary variables
Vec3d force;
/*
inline void move_PointBody( double dt ){
vel += force*dt;
pos += vel*dt;
//printf( "dt: %f force: ",dt ); printVec( force ); printf( " vel: " ); printVec( vel ); printf( " pos: " ); printVec( pos ); printf( "\n" );
};
*/
inline void move_PointBody( double dt ){
vel.add_mul( force, dt );
pos.add_mul( vel, dt );
};
inline void clean_temp( ){ force.set(0.0); }
virtual void evalForce() { force.set( 0,-9.81f,0 ); }
virtual void move(float dt){ move_PointBody(dt); }
virtual void render(){
drawPoint( pos );
}
};
///////////////////////////
// CLASS : RigidBody
///////////////////////////
class RigidBody : public PointBody {
public:
// parameters
Mat3d Ibody;
// auxiliary parameters
Mat3d invIbody;
// State variables
Quat4d qrot;
Vec3d L;
// auxiliary variables
Mat3d rotMat;
Mat3d invI;
Vec3d omega;
Vec3d torq;
int shape; // displayList
inline void clean_temp( ){ force.set(0.0); torq.set(0.0); }
inline void update_aux( ){
qrot.toMatrix ( rotMat );
//qrot.toMatrix_unitary ( rotMat );
Mat3d tmp; tmp.set_mmul_NT( invIbody, rotMat ); invI.set_mmul( rotMat, tmp );
//Mat3d tmp; tmp.set_mmul( invIbody, rotMat ); invI.set_mmul_TN( rotMat, tmp );
};
inline void move( double dt ){
// postion
vel.add_mul( force, dt );
pos.add_mul( vel, dt );
// rotation
L .add_mul ( torq, dt ); // we have to use angular momentum as state variable, omega is not conserved
invI.dot_to ( L, omega );
qrot.dRot_exact ( dt, omega );
//qrot.dRot_taylor2( dt, omega );
update_aux( );
};
inline void apply_force( const Vec3d& dforce, const Vec3d& gdpos ){
torq .add_cross( gdpos, dforce );
force .add( dforce );
};
inline void apply_anchor( double k, const Vec3d& lpos, const Vec3d& gpos0 ){
Vec3d sforce, gdpos;
rotMat.dot_to( lpos, gdpos );
sforce.set (( gdpos + pos - gpos0 )*(-k) );
apply_force ( sforce, gdpos );
drawLine( gpos0, gdpos + pos );
};
void from_mass_points( int n, double* amass, Vec3d* apos ){
mass = 0;
pos.set(0.0);
for(int i=0; i<n; i++){
pos .add_mul( apos[i], amass[i] );
mass += amass[i];
};
invMass = 1/mass;
pos.mul( invMass );
for(int i=0; i<n; i++){
double mi = amass[i];
Vec3d d; d.set( apos[i] - pos );
double xx = d.x*d.x; double yy = d.y*d.y; double zz = d.z*d.z;
double xy = d.x*d.y; double xz = d.x*d.z; double yz = d.y*d.z;
Ibody.xx += mi*( yy + zz );
Ibody.yy += mi*( xx + zz );
Ibody.zz += mi*( xx + yy );
Ibody.xy += mi*( -xy ); Ibody.yx += mi*( -xy );
Ibody.xz += mi*( -xz ); Ibody.zx += mi*( -xz );
Ibody.yz += mi*( -yz ); Ibody.zy += mi*( -yz );
};
Ibody.invert_to( invIbody );
};
void render(){
glPushMatrix();
float glmat[16];
toGLMat( pos, rotMat, glmat);
glMultMatrixf( glmat );
glCallList( shape );
glPopMatrix();
};
void init( ){
clean_temp( );
qrot.toMatrix ( rotMat );
Mat3d tmp; tmp.set_mmul_NT( invIbody, rotMat ); invI.set_mmul( rotMat, tmp );
};
void checkStateNormal(){
// check if rotation is normalized
double qr2 = qrot.norm2();
double dqr2 = qr2-1;
if( (dqr2*dqr2)>0.0001){ qrot *= ( 1/sqrt(qr2) ); }
}
};
////////////////////////////////
// CLASS : SpringConstrain
////////////////////////////////
class SpringConstrain{
public:
Vec3d p1,p2;
RigidBody *b1,*b2;
double k;
SpringConstrain( double k_, RigidBody* b1_, RigidBody* b2_, const Vec3d& p1_={0,0,0}, const Vec3d& p2_={0,0,0} ){
k=k_;
b1=b1_;
b2=b2_;
p1.set( p1_ );
p2.set( p2_ );
}
void apply(){
Vec3d gp1; b1->rotMat.dot_to( p1, gp1 );
Vec3d gp2; b2->rotMat.dot_to( p2, gp2 );
Vec3d gdp = ( (gp2+b2->pos)-(gp1+b1->pos) );
b1->apply_force ( gdp*( k), gp1 );
b2->apply_force ( gdp*(-k), gp2 );
}
void render(){
Vec3d gp1; b1->rotMat.dot_to( p1, gp1 ); gp1.add( b1->pos );
Vec3d gp2; b2->rotMat.dot_to( p2, gp2 ); gp2.add( b2->pos );
drawLine( gp1, gp2 );
}
};
| [
"no.email"
] | no.email |
c9d5906bb45151c9c80e71a70b7667ca887779b7 | fc056b2e63f559087240fed1a77461eb72b2bf8e | /src/server/gameserver/war/ZoneItemPosition.h | c6c35ec32e0f9f108702213484cdc99494e11020 | [] | no_license | opendarkeden/server | 0bd3c59b837b1bd6e8c52c32ed6199ceb9fbee38 | 3c2054f5d9e16196fc32db70b237141d4a9738d1 | refs/heads/master | 2023-02-18T20:21:30.398896 | 2023-02-15T16:42:07 | 2023-02-15T16:42:07 | 42,562,951 | 48 | 37 | null | 2023-02-15T16:42:10 | 2015-09-16T03:42:35 | C++ | UTF-8 | C++ | false | false | 1,074 | h | #ifndef __ZONE_ITEM_POSITION_H__
#define __ZONE_ITEM_POSITION_H__
#include "Types.h"
#include "GlobalItemPosition.h"
#include "ZoneUtil.h"
class ZoneItemPosition : public GlobalItemPosition
{
public:
ZoneItemPosition() : GlobalItemPosition( POS_TYPE_ZONE ){ }
~ZoneItemPosition(){ }
public:
virtual Item* popItem( bool bLock = true ) ;
virtual Zone* getZone() { return getZoneByZoneID( m_ZoneID ); }
Item* getItem( bool isDel ) ;
Item* getItem_LOCKED( bool isDel ) ;
ZoneID_t getZoneID() const { return m_ZoneID; }
void setZoneID( ZoneID_t zoneID ) { m_ZoneID = zoneID; }
ZoneCoord_t getZoneX() const { return m_ZoneX; }
void setZoneX( ZoneCoord_t zoneX ) { m_ZoneX = zoneX; }
ZoneCoord_t getZoneY() const { return m_ZoneY; }
void setZoneY( ZoneCoord_t zoneY ) { m_ZoneY = zoneY; }
public:
virtual string toString() const ;
protected:
Item* getItemFromZone( Zone* pZone ) ;
void deleteItemFromZone( Zone* pZone, Item* pItem ) ;
private:
ZoneID_t m_ZoneID;
ZoneCoord_t m_ZoneX;
ZoneCoord_t m_ZoneY;
};
#endif // __ZONE_ITEM_POSITION_H__
| [
"tiancaiamao@gmail.com"
] | tiancaiamao@gmail.com |
e40faef8b5ee627ded01d84d9640b6a093f7510d | 0e7dffdf6f690837f3bbede09d1df8d10c7e082b | /WinFramework/RectF.h | 85a38e991c54e365ca78466c26f383d2418ae256 | [] | no_license | KZAltair/WinFrameworkTutorial | da30bcf46a74bbb1b3ec4eef9e30b6c09d9659b8 | c1c8f225ae9ed1b26f25e0f46e1782bf09d5f46b | refs/heads/master | 2023-04-17T19:57:10.886430 | 2021-04-26T19:35:06 | 2021-04-26T19:35:06 | 328,198,529 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 450 | h | #pragma once
#include "Vec2.h"
class RectF
{
public:
RectF() = default;
RectF(float left_in, float right_in, float top_in, float bottom_in);
RectF(const Vec2& topLeft, const Vec2& bottomRight);
RectF(const Vec2& topLeft, float width, float height);
static RectF FromCenter(const Vec2& center, float halfWidth, float halfHeight);
bool IsOverlappingWith(const RectF& other) const;
public:
float left;
float top;
float right;
float bottom;
}; | [
"massyutin@gmail.com"
] | massyutin@gmail.com |
66d48b9396ad5c72c4e6dc5b6122b975b02911d3 | 22fa0284753fbbc817c618c24a52aa934e3175ff | /Study/1월 2주차/백준_1759_암호만들기.cpp | cbe8cb1cf33c5a4a2893f5d83a54313c1a3d3ffa | [] | no_license | Hae-Riri/Algorithm | c87bf48b4b0d0cb5dc9d6615f4520d28146f7093 | 417469cf35fc4a3a037a83af082065c326c951af | refs/heads/master | 2023-05-12T13:50:13.275665 | 2021-05-28T04:20:18 | 2021-05-28T04:20:18 | 263,672,155 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 755 | cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;
int main() {
vector<char> v;
vector<int>pick;
int l, c;
cin >> l >> c;
for (int i = 0; i < c; i++) {
char x;
cin >> x;
v.push_back(x);
pick.push_back(1);
}
sort(v.begin(), v.end());
for (int i = 0; i < l; i++) {
pick[i] = 0;
}
do {
string s = "";
for (int i = 0; i < c; i++) {
if (pick[i] == 0) {
s = s + v[i];
}
}
int cnt1 = 0;
int cnt2 = 0;
for (int i = 0; i < s.size(); i++) {
if (s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' || s[i] == 'u')
cnt1++;
else
cnt2++;
}
if (cnt1 < 1 || cnt2 < 2)
continue;
cout << s <<'\n';
} while (next_permutation(pick.begin(), pick.end()));
} | [
"ehl3288@naver.com"
] | ehl3288@naver.com |
2e0b79dbdd8a4bff4a9639fa09a07f1d3184a91c | b77b2d62697a502aca82ee833c1533761fbc3a4b | /core/baseObject.cc | 1dd9792cded99fe28013fea0b089c6f3487e6dd1 | [
"MIT"
] | permissive | jiahao-si/No.js | 7cde03b3bf718df65cabf8d7431b16c51104ed2f | 0a1a72ada412a46de8994691b9b490092e515157 | refs/heads/main | 2023-08-16T02:20:17.551161 | 2021-10-15T18:24:55 | 2021-10-15T18:24:55 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 611 | cc | #include "baseObject.h"
No::Base::BaseObject::BaseObject(Environment* env, Local<Object> object)
: _env(env), _object(env->GetIsolate(), object) {
object->SetAlignedPointerInInternalField(0, static_cast<void*>(this));
}
No::Base::BaseObject::~BaseObject() {
object()->SetAlignedPointerInInternalField(0, nullptr);
}
Environment* No::Base::BaseObject::env() const {
return _env;
}
Local<Object> No::Base::BaseObject::object() {
return PersistentToLocal::Strong(_object);
}
void * No::Base::BaseObject::unwrap(Local<Object> object) {
return object->GetAlignedPointerFromInternalField(0);
} | [
"2923878201@qq.com"
] | 2923878201@qq.com |
1d6d988581492b89962315133d4f2b3953c1c145 | 9c69278d170e6728e06615df135c4d13bd05aa94 | /Project/LogoMaker1/FileItem.h | 5cd326e5af3a8433dd3f1726385149445cc6e309 | [] | no_license | zliu12/VScode-SFML | afc356016829c419f87a797ce406562ac54dcf17 | ed3bcd21f702a8d1cd6f4b73c2cfb7e5597140b5 | refs/heads/master | 2023-06-11T18:36:34.878662 | 2021-07-05T21:39:13 | 2021-07-05T21:39:13 | 343,983,995 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,696 | h | //
// Created by QiChang Liu on 6/8/21.
//
#ifndef LOGOMAKER1_FILEITEM_H
#define LOGOMAKER1_FILEITEM_H
#include "GuiComponent.h"
#include "ProjectIcon.h"
#include "Font.h"
#include "MouseEvents.h"
#include <iostream>
class FileItem : public sf::Drawable, public sf::Transformable {
private:
sf::RectangleShape fileItemBox;
sf::Text fileItemText;
sf::Sprite fileItemIcon;
public:
// Default constructor
FileItem();
// Customize constructor
FileItem(std::string text, ProjectIcon::Icons icon);
// Set the fileItem in the center
void centerFileItem();
// Draw
virtual void draw(sf::RenderTarget& window, sf::RenderStates states) const;
// Handle event change
void addEventHandler(sf::RenderWindow& window, sf::Event event);
// Get the bounds of the item
sf::FloatRect getGlobalBounds() const;
// Get the bounds of the fileItemIcon
sf::FloatRect getIconGlobalBounds() const;
// Get the size of fileItemBox
sf::Vector2f getBoxSize() const;
// Get the position of the fileItemBox
sf::Vector2f getBoxPos() const;
// Get the position of the fileItemText
sf::Vector2f getTextPos() const;
// Get the outline thickness of the fileItemBox
float getThickness() const;
// Get the fileItemText
std::string getFileItemText() const;
// Set the position of the item
void setPosition(sf::Vector2f pos);
// Receive FOLDER or FILE and assign it to itemIcon
void setItemIcon(ProjectIcon::Icons icon);
// Set icons scale
void setIconScale(ProjectIcon::Icons icon);
// Set fileItemText
void setFileItemText(std::string text);
};
#endif //LOGOMAKER1_FILEITEM_H
| [
"qcl@QiChangdeAir.attlocal.net"
] | qcl@QiChangdeAir.attlocal.net |
b3f3e6c9f7cb770284927bd2c6b841035cc97d17 | 4098278d518957945518c8530b72d4f33d1e1345 | /Progetti visual studio PARTE B/EserciziLaboratorio2/Symbol Table/symbol_table.h | ea500f952de1920e9799a92825eded72ecfcaa72 | [] | no_license | FilippoBotti/FondamentiProgrammazione | f58283d85cf8d55040884d7ac8b808f841e2d2c1 | fd8bc0f8b44f789740b9ca58f1eaffc446e68d52 | refs/heads/master | 2020-08-15T15:46:28.152961 | 2019-10-17T07:30:52 | 2019-10-17T07:30:52 | 215,365,161 | 0 | 0 | null | null | null | null | ISO-8859-13 | C++ | false | false | 2,869 | h | #ifndef SYMBOLTABLE_H
#define SYMBOLTABLE_H
#include "symbol_table_item.h"
//classi per la realizzazione di una symbol table (dizionario) tramite array con e senza ordinamento delle chiavi
template <class Item, class Key>
class ST
{
private:
Item nullItem, *st;
int M;
public:
ST()
{
M = nullItem.key(); st = new Item[M];
}
~ST() { delete[] st; } // Destructor
// restituisce il numero totale di elementi nella symbol table
int count()
{
int N = 0;
for (int i = 0; i < M; i++)
if (!st[i].null()) N++;
return N;
}
// inserisce un nuovo elemento
void insert(Item x)
{
st[x.key()] = x;
}
// ricerca un elemento data una chiave in ingresso
Item search(Key v)
{
return st[v];
}
// elimina un elemento dalla symbol table
void remove(Item x)
{
st[x.key()] = nullItem;
}
// restituisce il k-mo elemento con chiave pił piccola
Item select(int k)
{
for (int i = 0; i < M; i++)
if (!st[i].null())
if (k-- == 0) return st[i];
return nullItem;
}
void show(ostream& os)
{
for (int i = 0; i < M; i++)
if (!st[i].null()) st[i].show(os);
}
Item max()
{
Item max;
max.set_element(0, 0);
for (int i = 0; i < M; i++) {
if (!st[i].null()){
if (st[i].key() > max.key()) {
max = st[i];
}
}
}
return max;
}
Item floor(Key floor_key)
{
Item max;
max.set_element(0, 0);
for (int i = 0; i < M; i++) {
if (!st[i].null()) {
if (st[i].key() > max.key() && st[i].key()<= floor_key) {
max = st[i];
}
}
}
return max;
}
};
template <class Item, class Key>
class ST_ordered
{
private:
Item nullItem, *st;
int N;
Item searchR(int l, int r, Key v)
{
if (l > r) return nullItem;
int m = (l + r) / 2;
if (v == st[m].key()) return st[m];
if (l == r) return nullItem;
if (v < st[m].key())
return searchR(l, m - 1, v);
else return searchR(m + 1, r, v);
}
public:
ST_ordered(int maxN)
{
st = new Item[maxN]; N = 0;
}
~ST_ordered() { delete[] st; } // Destructor
int count()
{
return N;
}
void insert(Item x)
{
int i = N++; Key v = x.key();
while (i > 0 && v < st[i - 1].key())
{
st[i] = st[i - 1]; i--;
}
st[i] = x;
}
Item search(Key v)
{
return searchR(0, N - 1, v);
}
Item search_slow(Key v)
{
for (int i = 0; i < N; i++)
{
if (!(st[i].key() < v)) break;
if (v == st[i].key()) return st[i];
}
return nullItem;
}
Item select(int k)
{
return st[k];
}
void show(ostream& os)
{
int i = 0;
while (i < N) st[i++].show(os);
}
void remove(Item x)
{
int i = 0;
Key v = x.key();
while ((i < N) && (v != st[i].key()))
{
i++;
}
while (i < N - 1)
{
st[i] = st[i + 1]; i++;
}
if (i != N) N--;
}
};
#endif | [
"filippo.botti.itis@gmail.com"
] | filippo.botti.itis@gmail.com |
68af5ec2e58bda9e2e644f8c0c2ab93da4615154 | 65b34abc44a4ed3506ea4d332b16ca9cb8f0a6a0 | /include/Environment.h | 7f6b1d80575ccfb1b47fc2790d95d3b155f99a06 | [] | no_license | jack111331/FluidDynamic | 3ebd0503050d053836c5c1903cc1f2317949e1ca | 4c0f251a5f531b9f912d5ab28cbc22367e77084b | refs/heads/master | 2022-11-18T22:23:06.151057 | 2020-07-17T16:44:35 | 2020-07-17T16:44:35 | 238,857,795 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 666 | h | //
// Created by Edge on 2020/6/11.
//
#ifndef COMPUTESHADERTEST_ENVIRONMENT_H
#define COMPUTESHADERTEST_ENVIRONMENT_H
#include <cstdint>
#include <string>
class Environment {
public:
Environment(const std::string &textureFilename);
void advect(float dt, int gridSize, uint32_t gridVAO, uint32_t velocityTexture);
uint32_t getCurrentTexture() const;
void bindAndActiveCurrentTexture(int slot);
void drawEnvironment();
private:
uint32_t m_rectFBO;
uint32_t m_rectVAO;
uint32_t m_rectDataVBO;
uint32_t m_rawTexture;
uint32_t m_texture[2];
bool m_currentContext = false;
};
#endif //COMPUTESHADERTEST_ENVIRONMENT_H
| [
"jack111331@gmail.com"
] | jack111331@gmail.com |
ea82f6e695610619f5361d6ed1b103e4c8abfff7 | 488d5ea186a29f408c6c61597e923ad5e4782318 | /compat/include/pcr.h | 2b234590561c8b4afbac7186b1039d20ec79a454 | [] | no_license | mkuchnik/PCR_Release | f4d143e94e0d97166ed0c80a6201bf39ff3d42d4 | aa76741f5dc6dcb6d7676c62e2fd53a78f43f142 | refs/heads/main | 2023-07-13T06:02:09.252729 | 2021-08-18T19:28:04 | 2021-08-20T00:57:28 | 390,152,877 | 5 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 545 | h | #ifndef PCR_H
#define PCR_H
#include <string>
#include <vector>
/**
* Inverse function of create_progressive_compressed_tf_record
* @param A list of data corresponding to [metadata, scan_0, scan_1,...] for
* potentially many images
* @param n_scans Only n_scans are required. This should match records
* @return The bytes of JPEG images and the labels as tuple (X, Y)
*/
std::pair< std::vector< std::string >, std::vector<int> > load_PCR(
std::string filename,
std::vector<int> record_offsets,
int n_scans
);
#endif // PCR_H | [
"michaelkuchnik@gmail.com"
] | michaelkuchnik@gmail.com |
6e1a5d70f387dd032fadc06a4ac1941343acc592 | c8438f31721efd2fed3ce0c5752ff033b1e71d72 | /c64/vice-2.4/src/resid-fp/wave.cc | 5ca7897a5c39eefef76c15ab0e0de6074d8d9af6 | [
"GPL-2.0-or-later",
"GPL-1.0-or-later",
"GPL-2.0-only",
"MIT"
] | permissive | century-arcade/src | 8c9151d9847dd0f6d6b92f662444c70064b6845d | b6abba2679f5eaa5a71871b916459aab7ae50d1c | refs/heads/master | 2022-06-21T09:50:06.176276 | 2022-06-15T23:00:41 | 2022-06-15T23:00:47 | 13,259,218 | 4 | 1 | MIT | 2022-06-16T14:24:17 | 2013-10-02T00:18:36 | C | UTF-8 | C++ | false | false | 10,307 | cc | // ---------------------------------------------------------------------------
// This file is part of reSID, a MOS6581 SID emulator engine.
// Copyright (C) 2004 Dag Lem <resid@nimrod.no>
//
// 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// ---------------------------------------------------------------------------
#include "wave.h"
#include "sid.h"
typedef struct {
float bias;
float pulsestrength;
float topbit;
float distance;
float stmix;
} waveformconfig_t;
const float sharpness = 512.f;
const waveformconfig_t wfconfig[2][5] = {
{
/* kevtris chip G (6581) */
{ 0.880815f, 0.f, 0.f, 0.3279614f, 0.5999545f }, // error 1795
{ 0.8924618f, 2.014781f, 1.003332f, 0.02992322f, 0.0f }, // error 11610
{ 0.8646501f, 1.712586f, 1.137704f, 0.02845423f, 0.f }, // error 21307
{ 0.9527834f, 1.794777f, 0.f, 0.09806272f, 0.7752482f }, // error 196
{ 0.5f, 0.0f, 1.0f, 0.0f, 0.0f, },
}, {
/* kevtris chip V (8580) */
{ 0.9781665f, 0.f, 0.9899469f, 8.087667f, 0.8226412f }, // error 5546
{ 0.9097769f, 2.039997f, 0.9584096f, 0.1765447f, 0.f }, // error 18763
{ 0.9231212f, 2.084788f, 0.9493895f, 0.1712518f, 0.f }, // error 17103
{ 0.9845552f, 1.415612f, 0.9703883f, 3.68829f, 0.8265008f }, // error 3319
{ 0.5f, 0.0f, 1.0f, 0.0f, 0.0f },
}
};
/* render output from bitstate */
static float make_sample(float *o) {
float out = 0;
for (int i = 0; i < 12; i ++) {
out += o[i] * dac[i];
}
return out;
}
/* generate tables for waveforms 1 .. 7 */
void WaveformGeneratorFP::rebuild_wftable() {
float o[12];
reg8 oldwf = waveform;
reg24 oldacc = accumulator;
reg12 oldpw = pw;
for (waveform = 1; waveform < 8; waveform ++) {
for (accumulator = 0; accumulator < (1<<24); accumulator += (1<<12)) {
/* generate pulse-low variants. Also,
* when waveform < 4, pw doesn't matter. */
pw = 0x1000; /* pulse always low */
calculate_waveform_sample(o);
wftable[waveform - 1][accumulator >> 12] = make_sample(o) + wave_zero;
/* Add pulse-high variants after pulse-low state variants */
if (waveform >= 4) {
pw = 0x000; /* pulse always high */
calculate_waveform_sample(o);
wftable[waveform + 3][accumulator >> 12] = make_sample(o) + wave_zero;
}
}
}
waveform = oldwf;
accumulator = oldacc;
pw = oldpw;
}
/* explode reg12 to a floating point bit array */
static void populate(reg12 v, float o[12])
{
int j = 1;
for (int i = 0; i < 12; i ++) {
o[i] = v & j ? 1.f : 0.f;
j <<= 1;
}
}
/* waveform values valid are 1 .. 7 */
void WaveformGeneratorFP::calculate_waveform_sample(float o[12])
{
int i;
/* P */
if (waveform == 4) {
populate((accumulator >> 12) >= pw ? 0xfff : 0x000, o);
return;
}
const waveformconfig_t config = wfconfig[
model == MOS6581FP ? 0 : 1
][
waveform == 3 ? 0 :
waveform == 5 ? 1 :
waveform == 6 ? 2 :
waveform == 7 ? 3 :
4
];
/* S with strong top bit for 6581 */
populate(accumulator >> 12, o);
/* convert to T */
if ((waveform & 3) == 1) {
bool top = (accumulator & 0x800000) != 0;
for (i = 11; i > 0; i --) {
if (top) {
o[i] = 1.0f - o[i-1];
} else {
o[i] = o[i-1];
}
}
o[0] = 0;
}
/* convert to ST */
if ((waveform & 3) == 3) {
/* bottom bit is grounded via T waveform selector */
o[0] *= config.stmix;
for (i = 1; i < 12; i ++) {
o[i] = o[i - 1] * (1.f - config.stmix) + o[i] * config.stmix;
}
}
o[11] *= config.topbit;
/* ST, P* waveform? */
if (waveform == 3 || waveform > 4) {
float distancetable[12 * 2 + 1];
for (i = 0; i <= 12; i ++) {
distancetable[12+i] = distancetable[12-i] = 1.f / (1.f + i * i * config.distance);
}
float pulse = (accumulator >> 12) >= pw ? 1.f : -1.f;
pulse *= config.pulsestrength;
float tmp[12];
for (i = 0; i < 12; i ++) {
float avg = 0;
float n = 0;
for (int j = 0; j < 12; j ++) {
float weight = distancetable[i - j + 12];
avg += o[j] * weight;
n += weight;
}
/* pulse control bit */
if (waveform > 4) {
float weight = distancetable[i - 12 + 12];
avg += pulse * weight;
n += weight;
}
tmp[i] = (o[i] + avg / n) * 0.5f;
}
for (i = 0; i < 12; i ++) {
o[i] = tmp[i];
}
}
/* use the environment around bias value to set/clear dac bit. The
* relationship is nonlinear because that seems to sound a bit better. */
for (i = 0; i < 12; i ++) {
o[i] = (o[i] - config.bias) * sharpness;
o[i] += 0.5f;
if (o[i] > 1.f) {
o[i] = 1.f;
}
if (o[i] < 0.f) {
o[i] = 0.;
}
}
}
void WaveformGeneratorFP::set_nonlinearity(float nl)
{
for (int i = 0; i < 12; i ++) {
dac[i] = SIDFP::kinked_dac((1 << i), nl, 12);
}
}
// ----------------------------------------------------------------------------
// Constructor.
// ----------------------------------------------------------------------------
WaveformGeneratorFP::WaveformGeneratorFP()
{
set_chip_model(MOS6581FP);
reset();
}
// ----------------------------------------------------------------------------
// Set chip model.
// ----------------------------------------------------------------------------
void WaveformGeneratorFP::set_chip_model(chip_model model)
{
this->model = model;
wave_zero = static_cast<float>(model == MOS6581FP ? -0x380 : -0x800);
}
// ----------------------------------------------------------------------------
// Register functions.
// ----------------------------------------------------------------------------
void WaveformGeneratorFP::writeFREQ_LO(reg8 freq_lo)
{
freq = (freq & 0xff00) | (freq_lo & 0xff);
}
void WaveformGeneratorFP::writeFREQ_HI(reg8 freq_hi)
{
freq = ((freq_hi << 8) & 0xff00) | (freq & 0xff);
}
void WaveformGeneratorFP::writePW_LO(reg8 pw_lo)
{
pw = (pw & 0xf00) | (pw_lo & 0x0ff);
update_pw();
}
void WaveformGeneratorFP::writePW_HI(reg8 pw_hi)
{
pw = ((pw_hi << 8) & 0xf00) | (pw & 0x0ff);
update_pw();
}
void WaveformGeneratorFP::writeCONTROL_REG(WaveformGeneratorFP& source, reg8 control)
{
/* when selecting the 0 waveform, the previous output is held for
* a time in the DAC MOSFET gates. We keep on holding forever, though... */
reg4 waveform_next = (control >> 4) & 0x0f;
if (waveform_next == 0 && waveform >= 1 && waveform <= 7) {
/* NB: "6581" version is the undelayed variant. We want that. */
previous = readOSC6581(source);
previous_dac = output(source);
}
waveform = waveform_next;
ring = (control & 0x04) != 0 && (waveform & 0x3) == 1 ? 0x800000 : 0;
sync = (control & 0x02) != 0;
bool test_next = (control & 0x08) != 0;
// Test bit rising? Invert bit 19 and write it to bit 1.
if (test_next && !test) {
accumulator = 0;
noise_overwrite_delay = 200000; /* 200 ms, probably too generous? */
} else {
// Test bit falling? clock noise once,
// otherwise just emulate noise's combined waveforms.
if (! test_next) {
clock_noise(test);
}
}
test = test_next;
update_pw();
}
reg8 WaveformGeneratorFP::readOSC6581(WaveformGeneratorFP& source) {
return readOSC(source.accumulator, accumulator);
}
reg8 WaveformGeneratorFP::readOSC8580(WaveformGeneratorFP& source) {
return readOSC(source.accumulator_prev, accumulator_prev);
}
reg8 WaveformGeneratorFP::readOSC(reg24 ring_accumulator, reg24 my_accumulator)
{
float o[12];
if (waveform == 0 || waveform > 7) {
return previous;
}
/* Include effects of the test bit & ring mod */
reg12 oldpw = pw;
if (test) {
pw = 0;
}
reg24 oldaccumulator = accumulator;
accumulator = my_accumulator ^ (ring_accumulator & ring);
calculate_waveform_sample(o);
pw = oldpw;
accumulator = oldaccumulator;
reg8 out = 0;
reg8 bit = 1;
for (int i = 4; i < 12; i ++) {
if (o[i] > 0.5f) {
out |= bit;
}
bit <<= 1;
}
return out;
}
void WaveformGeneratorFP::clock_noise(const bool clock)
{
if (clock) {
reg24 bit0 = (((shift_register >> 22) | (test ? 1 : 0)) ^ (shift_register >> 17)) & 0x1;
shift_register <<= 1;
shift_register |= bit0;
}
// clear output bits of shift register if noise and other waveforms
// are selected simultaneously
if (waveform > 8) {
shift_register &= 0x7fffff^(1<<20)^(1<<18)^(1<<14)^(1<<11)^(1<<9)^(1<<5)^(1<<2)^(1<<0);
}
if (waveform >= 8) {
previous = outputN___();
previous_dac = wave_zero;
for (int i = 0; i < 8; i ++) {
if (previous & (1 << i)) {
previous_dac += dac[i+4];
}
}
}
}
reg8 WaveformGeneratorFP::outputN___()
{
return
((shift_register & (1 << 20)) >> 13) |
((shift_register & (1 << 18)) >> 12) |
((shift_register & (1 << 14)) >> 9) |
((shift_register & (1 << 11)) >> 7) |
((shift_register & (1 << 9)) >> 6) |
((shift_register & (1 << 5)) >> 3) |
((shift_register & (1 << 2)) >> 1) |
((shift_register & (1 << 0)));
}
// ----------------------------------------------------------------------------
// SID reset.
// ----------------------------------------------------------------------------
void WaveformGeneratorFP::reset()
{
accumulator_prev = accumulator = 0;
previous = 0;
previous_dac = 0;
shift_register = 0x7fffff;
freq = 0;
pw = 0;
test = 0;
waveform = 0;
writeCONTROL_REG(*this, 0);
}
| [
"saul@pwanson.com"
] | saul@pwanson.com |
d7f26fd57a059293f48bea018240d5317aa814ed | e625ecb89f48bdc58dc7bb534eb4304d4217396b | /Sources/yocto_multicellweighscale.cpp | e4b948e857d364b2bd0a247b6e81b2a0d42d5d0d | [] | no_license | ANYbotics/yoctolib_cpp | c6e9d4ac2acda950e92e1e5f4cdd4106bbae8bcf | 4215df58964ed7c754c0095f928d380a02b8f935 | refs/heads/master | 2023-06-10T21:03:48.738633 | 2021-06-29T19:54:16 | 2021-06-29T19:54:16 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 28,923 | cpp | /*********************************************************************
*
* $Id: yocto_multicellweighscale.cpp 43580 2021-01-26 17:46:01Z mvuilleu $
*
* Implements yFindMultiCellWeighScale(), the high-level API for MultiCellWeighScale functions
*
* - - - - - - - - - License information: - - - - - - - - -
*
* Copyright (C) 2011 and beyond by Yoctopuce Sarl, Switzerland.
*
* Yoctopuce Sarl (hereafter Licensor) grants to you a perpetual
* non-exclusive license to use, modify, copy and integrate this
* file into your software for the sole purpose of interfacing
* with Yoctopuce products.
*
* You may reproduce and distribute copies of this file in
* source or object form, as long as the sole purpose of this
* code is to interface with Yoctopuce products. You must retain
* this notice in the distributed source file.
*
* You should refer to Yoctopuce General Terms and Conditions
* for additional information regarding your rights and
* obligations.
*
* THE SOFTWARE AND DOCUMENTATION ARE PROVIDED 'AS IS' WITHOUT
* WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
* WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO
* EVENT SHALL LICENSOR BE LIABLE FOR ANY INCIDENTAL, SPECIAL,
* INDIRECT OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA,
* COST OF PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY OR
* SERVICES, ANY CLAIMS BY THIRD PARTIES (INCLUDING BUT NOT
* LIMITED TO ANY DEFENSE THEREOF), ANY CLAIMS FOR INDEMNITY OR
* CONTRIBUTION, OR OTHER SIMILAR COSTS, WHETHER ASSERTED ON THE
* BASIS OF CONTRACT, TORT (INCLUDING NEGLIGENCE), BREACH OF
* WARRANTY, OR OTHERWISE.
*
*********************************************************************/
#define _CRT_SECURE_NO_DEPRECATE //do not use windows secure crt
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include "yocto_multicellweighscale.h"
#include "yapi/yjson.h"
#include "yapi/yapi.h"
#define __FILE_ID__ "multicellweighscale"
#ifdef YOCTOLIB_NAMESPACE
using namespace YOCTOLIB_NAMESPACE;
#endif
YMultiCellWeighScale::YMultiCellWeighScale(const string& func): YSensor(func)
//--- (YMultiCellWeighScale initialization)
,_cellCount(CELLCOUNT_INVALID)
,_externalSense(EXTERNALSENSE_INVALID)
,_excitation(EXCITATION_INVALID)
,_tempAvgAdaptRatio(TEMPAVGADAPTRATIO_INVALID)
,_tempChgAdaptRatio(TEMPCHGADAPTRATIO_INVALID)
,_compTempAvg(COMPTEMPAVG_INVALID)
,_compTempChg(COMPTEMPCHG_INVALID)
,_compensation(COMPENSATION_INVALID)
,_zeroTracking(ZEROTRACKING_INVALID)
,_command(COMMAND_INVALID)
,_valueCallbackMultiCellWeighScale(NULL)
,_timedReportCallbackMultiCellWeighScale(NULL)
//--- (end of YMultiCellWeighScale initialization)
{
_className="MultiCellWeighScale";
}
YMultiCellWeighScale::~YMultiCellWeighScale()
{
//--- (YMultiCellWeighScale cleanup)
//--- (end of YMultiCellWeighScale cleanup)
}
//--- (YMultiCellWeighScale implementation)
// static attributes
const double YMultiCellWeighScale::TEMPAVGADAPTRATIO_INVALID = YAPI_INVALID_DOUBLE;
const double YMultiCellWeighScale::TEMPCHGADAPTRATIO_INVALID = YAPI_INVALID_DOUBLE;
const double YMultiCellWeighScale::COMPTEMPAVG_INVALID = YAPI_INVALID_DOUBLE;
const double YMultiCellWeighScale::COMPTEMPCHG_INVALID = YAPI_INVALID_DOUBLE;
const double YMultiCellWeighScale::COMPENSATION_INVALID = YAPI_INVALID_DOUBLE;
const double YMultiCellWeighScale::ZEROTRACKING_INVALID = YAPI_INVALID_DOUBLE;
const string YMultiCellWeighScale::COMMAND_INVALID = YAPI_INVALID_STRING;
int YMultiCellWeighScale::_parseAttr(YJSONObject *json_val)
{
if(json_val->has("cellCount")) {
_cellCount = json_val->getInt("cellCount");
}
if(json_val->has("externalSense")) {
_externalSense = (Y_EXTERNALSENSE_enum)json_val->getInt("externalSense");
}
if(json_val->has("excitation")) {
_excitation = (Y_EXCITATION_enum)json_val->getInt("excitation");
}
if(json_val->has("tempAvgAdaptRatio")) {
_tempAvgAdaptRatio = floor(json_val->getDouble("tempAvgAdaptRatio") * 1000.0 / 65536.0 + 0.5) / 1000.0;
}
if(json_val->has("tempChgAdaptRatio")) {
_tempChgAdaptRatio = floor(json_val->getDouble("tempChgAdaptRatio") * 1000.0 / 65536.0 + 0.5) / 1000.0;
}
if(json_val->has("compTempAvg")) {
_compTempAvg = floor(json_val->getDouble("compTempAvg") * 1000.0 / 65536.0 + 0.5) / 1000.0;
}
if(json_val->has("compTempChg")) {
_compTempChg = floor(json_val->getDouble("compTempChg") * 1000.0 / 65536.0 + 0.5) / 1000.0;
}
if(json_val->has("compensation")) {
_compensation = floor(json_val->getDouble("compensation") * 1000.0 / 65536.0 + 0.5) / 1000.0;
}
if(json_val->has("zeroTracking")) {
_zeroTracking = floor(json_val->getDouble("zeroTracking") * 1000.0 / 65536.0 + 0.5) / 1000.0;
}
if(json_val->has("command")) {
_command = json_val->getString("command");
}
return YSensor::_parseAttr(json_val);
}
/**
* Changes the measuring unit for the weight.
* Remember to call the saveToFlash() method of the module if the
* modification must be kept.
*
* @param newval : a string corresponding to the measuring unit for the weight
*
* @return YAPI::SUCCESS if the call succeeds.
*
* On failure, throws an exception or returns a negative error code.
*/
int YMultiCellWeighScale::set_unit(const string& newval)
{
string rest_val;
int res;
yEnterCriticalSection(&_this_cs);
try {
rest_val = newval;
res = _setAttr("unit", rest_val);
} catch (std::exception &) {
yLeaveCriticalSection(&_this_cs);
throw;
}
yLeaveCriticalSection(&_this_cs);
return res;
}
/**
* Returns the number of load cells in use.
*
* @return an integer corresponding to the number of load cells in use
*
* On failure, throws an exception or returns YMultiCellWeighScale::CELLCOUNT_INVALID.
*/
int YMultiCellWeighScale::get_cellCount(void)
{
int res = 0;
yEnterCriticalSection(&_this_cs);
try {
if (_cacheExpiration <= YAPI::GetTickCount()) {
if (this->_load_unsafe(YAPI::_yapiContext.GetCacheValidity()) != YAPI_SUCCESS) {
{
yLeaveCriticalSection(&_this_cs);
return YMultiCellWeighScale::CELLCOUNT_INVALID;
}
}
}
res = _cellCount;
} catch (std::exception &) {
yLeaveCriticalSection(&_this_cs);
throw;
}
yLeaveCriticalSection(&_this_cs);
return res;
}
/**
* Changes the number of load cells in use. Remember to call the saveToFlash()
* method of the module if the modification must be kept.
*
* @param newval : an integer corresponding to the number of load cells in use
*
* @return YAPI::SUCCESS if the call succeeds.
*
* On failure, throws an exception or returns a negative error code.
*/
int YMultiCellWeighScale::set_cellCount(int newval)
{
string rest_val;
int res;
yEnterCriticalSection(&_this_cs);
try {
char buf[32]; sprintf(buf, "%d", newval); rest_val = string(buf);
res = _setAttr("cellCount", rest_val);
} catch (std::exception &) {
yLeaveCriticalSection(&_this_cs);
throw;
}
yLeaveCriticalSection(&_this_cs);
return res;
}
/**
* Returns true if entry 4 is used as external sense for 6-wires load cells.
*
* @return either YMultiCellWeighScale::EXTERNALSENSE_FALSE or YMultiCellWeighScale::EXTERNALSENSE_TRUE,
* according to true if entry 4 is used as external sense for 6-wires load cells
*
* On failure, throws an exception or returns YMultiCellWeighScale::EXTERNALSENSE_INVALID.
*/
Y_EXTERNALSENSE_enum YMultiCellWeighScale::get_externalSense(void)
{
Y_EXTERNALSENSE_enum res;
yEnterCriticalSection(&_this_cs);
try {
if (_cacheExpiration <= YAPI::GetTickCount()) {
if (this->_load_unsafe(YAPI::_yapiContext.GetCacheValidity()) != YAPI_SUCCESS) {
{
yLeaveCriticalSection(&_this_cs);
return YMultiCellWeighScale::EXTERNALSENSE_INVALID;
}
}
}
res = _externalSense;
} catch (std::exception &) {
yLeaveCriticalSection(&_this_cs);
throw;
}
yLeaveCriticalSection(&_this_cs);
return res;
}
/**
* Changes the configuration to tell if entry 4 is used as external sense for
* 6-wires load cells. Remember to call the saveToFlash() method of the
* module if the modification must be kept.
*
* @param newval : either YMultiCellWeighScale::EXTERNALSENSE_FALSE or
* YMultiCellWeighScale::EXTERNALSENSE_TRUE, according to the configuration to tell if entry 4 is used
* as external sense for
* 6-wires load cells
*
* @return YAPI::SUCCESS if the call succeeds.
*
* On failure, throws an exception or returns a negative error code.
*/
int YMultiCellWeighScale::set_externalSense(Y_EXTERNALSENSE_enum newval)
{
string rest_val;
int res;
yEnterCriticalSection(&_this_cs);
try {
rest_val = (newval>0 ? "1" : "0");
res = _setAttr("externalSense", rest_val);
} catch (std::exception &) {
yLeaveCriticalSection(&_this_cs);
throw;
}
yLeaveCriticalSection(&_this_cs);
return res;
}
/**
* Returns the current load cell bridge excitation method.
*
* @return a value among YMultiCellWeighScale::EXCITATION_OFF, YMultiCellWeighScale::EXCITATION_DC and
* YMultiCellWeighScale::EXCITATION_AC corresponding to the current load cell bridge excitation method
*
* On failure, throws an exception or returns YMultiCellWeighScale::EXCITATION_INVALID.
*/
Y_EXCITATION_enum YMultiCellWeighScale::get_excitation(void)
{
Y_EXCITATION_enum res;
yEnterCriticalSection(&_this_cs);
try {
if (_cacheExpiration <= YAPI::GetTickCount()) {
if (this->_load_unsafe(YAPI::_yapiContext.GetCacheValidity()) != YAPI_SUCCESS) {
{
yLeaveCriticalSection(&_this_cs);
return YMultiCellWeighScale::EXCITATION_INVALID;
}
}
}
res = _excitation;
} catch (std::exception &) {
yLeaveCriticalSection(&_this_cs);
throw;
}
yLeaveCriticalSection(&_this_cs);
return res;
}
/**
* Changes the current load cell bridge excitation method.
* Remember to call the saveToFlash() method of the module if the
* modification must be kept.
*
* @param newval : a value among YMultiCellWeighScale::EXCITATION_OFF,
* YMultiCellWeighScale::EXCITATION_DC and YMultiCellWeighScale::EXCITATION_AC corresponding to the
* current load cell bridge excitation method
*
* @return YAPI::SUCCESS if the call succeeds.
*
* On failure, throws an exception or returns a negative error code.
*/
int YMultiCellWeighScale::set_excitation(Y_EXCITATION_enum newval)
{
string rest_val;
int res;
yEnterCriticalSection(&_this_cs);
try {
char buf[32]; sprintf(buf, "%d", newval); rest_val = string(buf);
res = _setAttr("excitation", rest_val);
} catch (std::exception &) {
yLeaveCriticalSection(&_this_cs);
throw;
}
yLeaveCriticalSection(&_this_cs);
return res;
}
/**
* Changes the averaged temperature update rate, in per mille.
* The purpose of this adaptation ratio is to model the thermal inertia of the load cell.
* The averaged temperature is updated every 10 seconds, by applying this adaptation rate
* to the difference between the measures ambient temperature and the current compensation
* temperature. The standard rate is 0.2 per mille, and the maximal rate is 65 per mille.
* Remember to call the saveToFlash() method of the module if the
* modification must be kept.
*
* @param newval : a floating point number corresponding to the averaged temperature update rate, in per mille
*
* @return YAPI::SUCCESS if the call succeeds.
*
* On failure, throws an exception or returns a negative error code.
*/
int YMultiCellWeighScale::set_tempAvgAdaptRatio(double newval)
{
string rest_val;
int res;
yEnterCriticalSection(&_this_cs);
try {
char buf[32]; sprintf(buf, "%" FMTs64, (s64)floor(newval * 65536.0 + 0.5)); rest_val = string(buf);
res = _setAttr("tempAvgAdaptRatio", rest_val);
} catch (std::exception &) {
yLeaveCriticalSection(&_this_cs);
throw;
}
yLeaveCriticalSection(&_this_cs);
return res;
}
/**
* Returns the averaged temperature update rate, in per mille.
* The purpose of this adaptation ratio is to model the thermal inertia of the load cell.
* The averaged temperature is updated every 10 seconds, by applying this adaptation rate
* to the difference between the measures ambient temperature and the current compensation
* temperature. The standard rate is 0.2 per mille, and the maximal rate is 65 per mille.
*
* @return a floating point number corresponding to the averaged temperature update rate, in per mille
*
* On failure, throws an exception or returns YMultiCellWeighScale::TEMPAVGADAPTRATIO_INVALID.
*/
double YMultiCellWeighScale::get_tempAvgAdaptRatio(void)
{
double res = 0.0;
yEnterCriticalSection(&_this_cs);
try {
if (_cacheExpiration <= YAPI::GetTickCount()) {
if (this->_load_unsafe(YAPI::_yapiContext.GetCacheValidity()) != YAPI_SUCCESS) {
{
yLeaveCriticalSection(&_this_cs);
return YMultiCellWeighScale::TEMPAVGADAPTRATIO_INVALID;
}
}
}
res = _tempAvgAdaptRatio;
} catch (std::exception &) {
yLeaveCriticalSection(&_this_cs);
throw;
}
yLeaveCriticalSection(&_this_cs);
return res;
}
/**
* Changes the temperature change update rate, in per mille.
* The temperature change is updated every 10 seconds, by applying this adaptation rate
* to the difference between the measures ambient temperature and the current temperature used for
* change compensation. The standard rate is 0.6 per mille, and the maximal rate is 65 per mille.
* Remember to call the saveToFlash() method of the module if the
* modification must be kept.
*
* @param newval : a floating point number corresponding to the temperature change update rate, in per mille
*
* @return YAPI::SUCCESS if the call succeeds.
*
* On failure, throws an exception or returns a negative error code.
*/
int YMultiCellWeighScale::set_tempChgAdaptRatio(double newval)
{
string rest_val;
int res;
yEnterCriticalSection(&_this_cs);
try {
char buf[32]; sprintf(buf, "%" FMTs64, (s64)floor(newval * 65536.0 + 0.5)); rest_val = string(buf);
res = _setAttr("tempChgAdaptRatio", rest_val);
} catch (std::exception &) {
yLeaveCriticalSection(&_this_cs);
throw;
}
yLeaveCriticalSection(&_this_cs);
return res;
}
/**
* Returns the temperature change update rate, in per mille.
* The temperature change is updated every 10 seconds, by applying this adaptation rate
* to the difference between the measures ambient temperature and the current temperature used for
* change compensation. The standard rate is 0.6 per mille, and the maximal rate is 65 per mille.
*
* @return a floating point number corresponding to the temperature change update rate, in per mille
*
* On failure, throws an exception or returns YMultiCellWeighScale::TEMPCHGADAPTRATIO_INVALID.
*/
double YMultiCellWeighScale::get_tempChgAdaptRatio(void)
{
double res = 0.0;
yEnterCriticalSection(&_this_cs);
try {
if (_cacheExpiration <= YAPI::GetTickCount()) {
if (this->_load_unsafe(YAPI::_yapiContext.GetCacheValidity()) != YAPI_SUCCESS) {
{
yLeaveCriticalSection(&_this_cs);
return YMultiCellWeighScale::TEMPCHGADAPTRATIO_INVALID;
}
}
}
res = _tempChgAdaptRatio;
} catch (std::exception &) {
yLeaveCriticalSection(&_this_cs);
throw;
}
yLeaveCriticalSection(&_this_cs);
return res;
}
/**
* Returns the current averaged temperature, used for thermal compensation.
*
* @return a floating point number corresponding to the current averaged temperature, used for thermal compensation
*
* On failure, throws an exception or returns YMultiCellWeighScale::COMPTEMPAVG_INVALID.
*/
double YMultiCellWeighScale::get_compTempAvg(void)
{
double res = 0.0;
yEnterCriticalSection(&_this_cs);
try {
if (_cacheExpiration <= YAPI::GetTickCount()) {
if (this->_load_unsafe(YAPI::_yapiContext.GetCacheValidity()) != YAPI_SUCCESS) {
{
yLeaveCriticalSection(&_this_cs);
return YMultiCellWeighScale::COMPTEMPAVG_INVALID;
}
}
}
res = _compTempAvg;
} catch (std::exception &) {
yLeaveCriticalSection(&_this_cs);
throw;
}
yLeaveCriticalSection(&_this_cs);
return res;
}
/**
* Returns the current temperature variation, used for thermal compensation.
*
* @return a floating point number corresponding to the current temperature variation, used for
* thermal compensation
*
* On failure, throws an exception or returns YMultiCellWeighScale::COMPTEMPCHG_INVALID.
*/
double YMultiCellWeighScale::get_compTempChg(void)
{
double res = 0.0;
yEnterCriticalSection(&_this_cs);
try {
if (_cacheExpiration <= YAPI::GetTickCount()) {
if (this->_load_unsafe(YAPI::_yapiContext.GetCacheValidity()) != YAPI_SUCCESS) {
{
yLeaveCriticalSection(&_this_cs);
return YMultiCellWeighScale::COMPTEMPCHG_INVALID;
}
}
}
res = _compTempChg;
} catch (std::exception &) {
yLeaveCriticalSection(&_this_cs);
throw;
}
yLeaveCriticalSection(&_this_cs);
return res;
}
/**
* Returns the current current thermal compensation value.
*
* @return a floating point number corresponding to the current current thermal compensation value
*
* On failure, throws an exception or returns YMultiCellWeighScale::COMPENSATION_INVALID.
*/
double YMultiCellWeighScale::get_compensation(void)
{
double res = 0.0;
yEnterCriticalSection(&_this_cs);
try {
if (_cacheExpiration <= YAPI::GetTickCount()) {
if (this->_load_unsafe(YAPI::_yapiContext.GetCacheValidity()) != YAPI_SUCCESS) {
{
yLeaveCriticalSection(&_this_cs);
return YMultiCellWeighScale::COMPENSATION_INVALID;
}
}
}
res = _compensation;
} catch (std::exception &) {
yLeaveCriticalSection(&_this_cs);
throw;
}
yLeaveCriticalSection(&_this_cs);
return res;
}
/**
* Changes the zero tracking threshold value. When this threshold is larger than
* zero, any measure under the threshold will automatically be ignored and the
* zero compensation will be updated.
* Remember to call the saveToFlash() method of the module if the
* modification must be kept.
*
* @param newval : a floating point number corresponding to the zero tracking threshold value
*
* @return YAPI::SUCCESS if the call succeeds.
*
* On failure, throws an exception or returns a negative error code.
*/
int YMultiCellWeighScale::set_zeroTracking(double newval)
{
string rest_val;
int res;
yEnterCriticalSection(&_this_cs);
try {
char buf[32]; sprintf(buf, "%" FMTs64, (s64)floor(newval * 65536.0 + 0.5)); rest_val = string(buf);
res = _setAttr("zeroTracking", rest_val);
} catch (std::exception &) {
yLeaveCriticalSection(&_this_cs);
throw;
}
yLeaveCriticalSection(&_this_cs);
return res;
}
/**
* Returns the zero tracking threshold value. When this threshold is larger than
* zero, any measure under the threshold will automatically be ignored and the
* zero compensation will be updated.
*
* @return a floating point number corresponding to the zero tracking threshold value
*
* On failure, throws an exception or returns YMultiCellWeighScale::ZEROTRACKING_INVALID.
*/
double YMultiCellWeighScale::get_zeroTracking(void)
{
double res = 0.0;
yEnterCriticalSection(&_this_cs);
try {
if (_cacheExpiration <= YAPI::GetTickCount()) {
if (this->_load_unsafe(YAPI::_yapiContext.GetCacheValidity()) != YAPI_SUCCESS) {
{
yLeaveCriticalSection(&_this_cs);
return YMultiCellWeighScale::ZEROTRACKING_INVALID;
}
}
}
res = _zeroTracking;
} catch (std::exception &) {
yLeaveCriticalSection(&_this_cs);
throw;
}
yLeaveCriticalSection(&_this_cs);
return res;
}
string YMultiCellWeighScale::get_command(void)
{
string res;
yEnterCriticalSection(&_this_cs);
try {
if (_cacheExpiration <= YAPI::GetTickCount()) {
if (this->_load_unsafe(YAPI::_yapiContext.GetCacheValidity()) != YAPI_SUCCESS) {
{
yLeaveCriticalSection(&_this_cs);
return YMultiCellWeighScale::COMMAND_INVALID;
}
}
}
res = _command;
} catch (std::exception &) {
yLeaveCriticalSection(&_this_cs);
throw;
}
yLeaveCriticalSection(&_this_cs);
return res;
}
int YMultiCellWeighScale::set_command(const string& newval)
{
string rest_val;
int res;
yEnterCriticalSection(&_this_cs);
try {
rest_val = newval;
res = _setAttr("command", rest_val);
} catch (std::exception &) {
yLeaveCriticalSection(&_this_cs);
throw;
}
yLeaveCriticalSection(&_this_cs);
return res;
}
/**
* Retrieves a multi-cell weighing scale sensor for a given identifier.
* The identifier can be specified using several formats:
* <ul>
* <li>FunctionLogicalName</li>
* <li>ModuleSerialNumber.FunctionIdentifier</li>
* <li>ModuleSerialNumber.FunctionLogicalName</li>
* <li>ModuleLogicalName.FunctionIdentifier</li>
* <li>ModuleLogicalName.FunctionLogicalName</li>
* </ul>
*
* This function does not require that the multi-cell weighing scale sensor is online at the time
* it is invoked. The returned object is nevertheless valid.
* Use the method isOnline() to test if the multi-cell weighing scale sensor is
* indeed online at a given time. In case of ambiguity when looking for
* a multi-cell weighing scale sensor by logical name, no error is notified: the first instance
* found is returned. The search is performed first by hardware name,
* then by logical name.
*
* If a call to this object's is_online() method returns FALSE although
* you are certain that the matching device is plugged, make sure that you did
* call registerHub() at application initialization time.
*
* @param func : a string that uniquely characterizes the multi-cell weighing scale sensor, for instance
* YWMBRDG1.multiCellWeighScale.
*
* @return a YMultiCellWeighScale object allowing you to drive the multi-cell weighing scale sensor.
*/
YMultiCellWeighScale* YMultiCellWeighScale::FindMultiCellWeighScale(string func)
{
YMultiCellWeighScale* obj = NULL;
int taken = 0;
if (YAPI::_apiInitialized) {
yEnterCriticalSection(&YAPI::_global_cs);
taken = 1;
}try {
obj = (YMultiCellWeighScale*) YFunction::_FindFromCache("MultiCellWeighScale", func);
if (obj == NULL) {
obj = new YMultiCellWeighScale(func);
YFunction::_AddToCache("MultiCellWeighScale", func, obj);
}
} catch (std::exception &) {
if (taken) yLeaveCriticalSection(&YAPI::_global_cs);
throw;
}
if (taken) yLeaveCriticalSection(&YAPI::_global_cs);
return obj;
}
/**
* Registers the callback function that is invoked on every change of advertised value.
* The callback is invoked only during the execution of ySleep or yHandleEvents.
* This provides control over the time when the callback is triggered. For good responsiveness, remember to call
* one of these two functions periodically. To unregister a callback, pass a NULL pointer as argument.
*
* @param callback : the callback function to call, or a NULL pointer. The callback function should take two
* arguments: the function object of which the value has changed, and the character string describing
* the new advertised value.
* @noreturn
*/
int YMultiCellWeighScale::registerValueCallback(YMultiCellWeighScaleValueCallback callback)
{
string val;
if (callback != NULL) {
YFunction::_UpdateValueCallbackList(this, true);
} else {
YFunction::_UpdateValueCallbackList(this, false);
}
_valueCallbackMultiCellWeighScale = callback;
// Immediately invoke value callback with current value
if (callback != NULL && this->isOnline()) {
val = _advertisedValue;
if (!(val == "")) {
this->_invokeValueCallback(val);
}
}
return 0;
}
int YMultiCellWeighScale::_invokeValueCallback(string value)
{
if (_valueCallbackMultiCellWeighScale != NULL) {
_valueCallbackMultiCellWeighScale(this, value);
} else {
YSensor::_invokeValueCallback(value);
}
return 0;
}
/**
* Registers the callback function that is invoked on every periodic timed notification.
* The callback is invoked only during the execution of ySleep or yHandleEvents.
* This provides control over the time when the callback is triggered. For good responsiveness, remember to call
* one of these two functions periodically. To unregister a callback, pass a NULL pointer as argument.
*
* @param callback : the callback function to call, or a NULL pointer. The callback function should take two
* arguments: the function object of which the value has changed, and an YMeasure object describing
* the new advertised value.
* @noreturn
*/
int YMultiCellWeighScale::registerTimedReportCallback(YMultiCellWeighScaleTimedReportCallback callback)
{
YSensor* sensor = NULL;
sensor = this;
if (callback != NULL) {
YFunction::_UpdateTimedReportCallbackList(sensor, true);
} else {
YFunction::_UpdateTimedReportCallbackList(sensor, false);
}
_timedReportCallbackMultiCellWeighScale = callback;
return 0;
}
int YMultiCellWeighScale::_invokeTimedReportCallback(YMeasure value)
{
if (_timedReportCallbackMultiCellWeighScale != NULL) {
_timedReportCallbackMultiCellWeighScale(this, value);
} else {
YSensor::_invokeTimedReportCallback(value);
}
return 0;
}
/**
* Adapts the load cell signal bias (stored in the corresponding genericSensor)
* so that the current signal corresponds to a zero weight. Remember to call the
* saveToFlash() method of the module if the modification must be kept.
*
* @return YAPI::SUCCESS if the call succeeds.
*
* On failure, throws an exception or returns a negative error code.
*/
int YMultiCellWeighScale::tare(void)
{
return this->set_command("T");
}
/**
* Configures the load cells span parameters (stored in the corresponding genericSensors)
* so that the current signal corresponds to the specified reference weight.
*
* @param currWeight : reference weight presently on the load cell.
* @param maxWeight : maximum weight to be expected on the load cell.
*
* @return YAPI::SUCCESS if the call succeeds.
*
* On failure, throws an exception or returns a negative error code.
*/
int YMultiCellWeighScale::setupSpan(double currWeight,double maxWeight)
{
return this->set_command(YapiWrapper::ysprintf("S%d:%d", (int) floor(1000*currWeight+0.5),(int) floor(1000*maxWeight+0.5)));
}
YMultiCellWeighScale *YMultiCellWeighScale::nextMultiCellWeighScale(void)
{
string hwid;
if(YISERR(_nextFunction(hwid)) || hwid=="") {
return NULL;
}
return YMultiCellWeighScale::FindMultiCellWeighScale(hwid);
}
YMultiCellWeighScale *YMultiCellWeighScale::FirstMultiCellWeighScale(void)
{
vector<YFUN_DESCR> v_fundescr;
YDEV_DESCR ydevice;
string serial, funcId, funcName, funcVal, errmsg;
if(YISERR(YapiWrapper::getFunctionsByClass("MultiCellWeighScale", 0, v_fundescr, sizeof(YFUN_DESCR), errmsg)) ||
v_fundescr.size() == 0 ||
YISERR(YapiWrapper::getFunctionInfo(v_fundescr[0], ydevice, serial, funcId, funcName, funcVal, errmsg))) {
return NULL;
}
return YMultiCellWeighScale::FindMultiCellWeighScale(serial+"."+funcId);
}
//--- (end of YMultiCellWeighScale implementation)
//--- (YMultiCellWeighScale functions)
//--- (end of YMultiCellWeighScale functions)
| [
"dev@yoctopuce.com"
] | dev@yoctopuce.com |
94db21b0a7f47c5e48a6b3395a5792849cb15a59 | 862d2905cdcd0426ea47e833f6b5dd7f86c408ad | /aMazing/code/engine/math/amath.hpp | 3b8d7109003837d58e6eec2bf84d4e490ca48490 | [] | no_license | LYP951018/aMazing | cedada48e7517caa64da565190428c7f13d019eb | 8820667abe6c63968c587ba94c1f8dc9d10afbea | refs/heads/master | 2021-01-13T01:04:05.162610 | 2015-07-31T11:38:36 | 2015-07-31T11:38:36 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 66 | hpp | #pragma once
#include"autil.hpp"
#define aSQUARE(a) ((a) * (a))
| [
"anti2moron@gmail.com"
] | anti2moron@gmail.com |
437153cecb07428b86048b67a6d61509e0b85ba8 | 3c62aad061b54eb0da7981f3e978197582fb529d | /keyvi/3rdparty/tpie/apps/matrix/parse_args.h | d373ac4bff474d5f548fd9d1903a0915be7f42bd | [
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.0-or-later",
"GPL-3.0-or-later",
"GPL-3.0-only",
"LGPL-2.1-or-later",
"LicenseRef-scancode-other-copyleft",
"GPL-1.0-or-later",
"LGPL-3.0-only",
"LicenseRef-scancode-unknown-license-reference",
"GPL-2.0-only",
"Apache-2.0"
] | permissive | subu-cliqz/keyvi | 72dd920f03ed5b976287747bd41490a081b8657e | b8e57e6207244cc570e0d7d3970015aa1faf4254 | refs/heads/master | 2021-01-15T10:14:43.630925 | 2016-10-20T14:28:33 | 2016-10-20T14:28:33 | 71,902,050 | 0 | 2 | Apache-2.0 | 2020-02-07T10:09:50 | 2016-10-25T13:54:02 | C++ | UTF-8 | C++ | false | false | 2,130 | h | // -*- mode: c++; tab-width: 4; indent-tabs-mode: t; c-file-style: "stroustrup"; -*-
// vi:set ts=4 sts=4 sw=4 noet :
// Copyright 2008, The TPIE development team
//
// This file is part of TPIE.
//
// TPIE is free software: you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License as published by the
// Free Software Foundation, either version 3 of the License, or (at your
// option) any later version.
//
// TPIE is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
// License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with TPIE. If not, see <http://www.gnu.org/licenses/>
//
// File: parse_args.h
// Author: Darren Erik Vengroff <darrenv@eecs.umich.edu>
// Created: 10/7/94
//
// $Id: parse_args.h,v 1.5 2005-02-15 00:20:03 tavi Exp $
//
#ifndef _PARSE_ARGS_H
#define _PARSE_ARGS_H
#include "app_config.h"
#include <tpie/portability.h>
#include "getopts.h"
#include <cstring>
template <typename T>
T parse_number(char *s) {
T n;
T mult = 1;
size_t len = std::strlen(s);
if(isalpha(s[len-1])) {
switch(s[len-1]) {
case 'G':
case 'g':
mult = 1 << 30;
break;
case 'M':
case 'm':
mult = 1 << 20;
break;
case 'K':
case 'k':
mult = 1 << 10;
break;
default:
std::cerr << "Error parsing arguments: bad number format: " << s << "\n";
exit(-1);
break;
}
s[len-1] = '\0';
}
n = (T)(atof(s) * mult);
return n;
}
// Parse arguments for flags common to all test apps, as well as those
// specific to this particular app. aso points to a string of app
// specific options, and parse_app is a pointer to a function, tpyically
// just a big switch, to handle them.
void parse_args(int argc, char **argv, struct options *application_opts,
void (*parse_app_opts)(int idx, char *opt_arg),
bool stop_if_no_args = true);
#endif // _PARSE_ARGS_H
| [
"hendrik@cliqz.com"
] | hendrik@cliqz.com |
b9471726fc560d1ecc67b61e3eef30461420a959 | 2964abfa631023ca7a6d16e0d66790f479099102 | /libraries/MiniQCom/MiniQCom.cpp | 966a4c19f23a7ff40bed529b0a0e8a3bdcf84d04 | [] | no_license | Rosebotics/ArduinoLibraries_v1 | 8039108220c566a7856689e5a42bb1f335bba708 | a089228cb58396fd63f05658a076620c8fd25746 | refs/heads/master | 2021-01-23T06:58:30.740469 | 2015-06-26T02:44:23 | 2015-06-26T02:44:23 | 20,711,151 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 12,367 | cpp | #include "Arduino.h"
#include "MiniQCom.h"
#include "Wire.h"
MiniQCom::MiniQCom() {
_init(false, 255); // Address is not actually used in library for a slave.
}
MiniQCom::MiniQCom(boolean isMaster, byte miniQAddress) {
_init(isMaster, miniQAddress);
}
void MiniQCom::_init(boolean isMaster, byte miniQAddress) {
// Just making sure the default state for all variables is cleared out.
_isMaster = isMaster;
_miniQAddress = miniQAddress;
sensorMask = 0x00000000; // No active sensors (32 possible sensor reading available).
// Sensor variables.
leftMotorEncoder = 0;
rightMotorEncoder = 0;
farLeftIrLineSensor = 0;
midLeftIrLineSensor = 0;
centerIrLineSensor = 0;
midRightIrLineSensor = 0;
farRightIrLineSensor = 0;
photoDetectors = 0;
irModuleCountForLeftIr = 0;
irModuleCountForRightIr = 0;
irModuleByte = 0;
keyButtons = KEY_BUTTONS_NO_PRESS;
batterVoltageTenths = 0;
_drivePwmCallback = NULL;
_driveSpeedArcCallback = NULL;
_sensorMaskCallback = NULL;
_buzzerToneCallback = NULL;
_ledCallback = NULL;
_sendIrCallback = NULL;
_irModuleMode = NULL;
_lastByteWasStartByte = false;
_lastByteWasEscapeByte = false;
_bytesRemainingInMessage = -1;
_nextOpenByteInMessageBuffer = 0;
}
void MiniQCom::sendDrivePwm(boolean leftIsForward, boolean rightIsForward,
byte leftDutyCycle, byte rightDutyCycle) {
_txMessageBuffer[COMMAND_BYTE] = COMMAND_DRIVE_PWM;
_txMessageBuffer[DRIVE_PWM_DIRECTIONS] = ((byte) leftIsForward << 1)
| (byte) rightIsForward;
_txMessageBuffer[DRIVE_PWM_LEFT_DUTY_CYCLE] = leftDutyCycle;
_txMessageBuffer[DRIVE_PWM_RIGHT_DUTY_CYCLE] = rightDutyCycle;
_sendMessage (DRIVE_PWM_COMMAND_LENGTH);
}
void MiniQCom::sendDriveSpeedArc(int speedMmPerS, int arcMm) {
_txMessageBuffer[COMMAND_BYTE] = COMMAND_DRIVE_SPEED_ARC;
_txMessageBuffer[DRIVE_SPEED_ARC_SPEED_LSB] = (byte) speedMmPerS;
_txMessageBuffer[DRIVE_SPEED_ARC_SPEED_MSB] = (byte)(speedMmPerS >> 8);
_txMessageBuffer[DRIVE_SPEED_ARC_ARC_LSB] = (byte) arcMm;
_txMessageBuffer[DRIVE_SPEED_ARC_ARC_MSB] = (byte)(arcMm >> 8);
_sendMessage (DRIVE_SPEED_ARC_COMMAND_LENGTH);
}
void MiniQCom::sendSetSensorMask(unsigned long newSensorMask) {
_txMessageBuffer[COMMAND_BYTE] = COMMAND_SET_SENSOR_MASK;
_txMessageBuffer[SENSOR_MASK_BYTE0] = (byte) newSensorMask;
_txMessageBuffer[SENSOR_MASK_BYTE1] = (byte)(newSensorMask >> 8);
_txMessageBuffer[SENSOR_MASK_BYTE2] = (byte)(newSensorMask >> 16);
_txMessageBuffer[SENSOR_MASK_BYTE3] = (byte)(newSensorMask >> 24);
_sendMessage (SENSOR_MASK_COMMAND_LENGTH);
}
void MiniQCom::sendAddToSensorMask(unsigned long sensorMaskBitsToAdd) {
_txMessageBuffer[COMMAND_BYTE] = COMMAND_ADD_TO_SENSOR_MASK;
_txMessageBuffer[SENSOR_MASK_BYTE0] = (byte) sensorMaskBitsToAdd;
_txMessageBuffer[SENSOR_MASK_BYTE1] = (byte)(sensorMaskBitsToAdd >> 8);
_txMessageBuffer[SENSOR_MASK_BYTE2] = (byte)(sensorMaskBitsToAdd >> 16);
_txMessageBuffer[SENSOR_MASK_BYTE3] = (byte)(sensorMaskBitsToAdd >> 24);
_sendMessage (SENSOR_MASK_COMMAND_LENGTH);
}
void MiniQCom::sendRemoveFromSensorMask(unsigned long sensorMaskBitsToRemove) {
_txMessageBuffer[COMMAND_BYTE] = COMMAND_REMOVE_FROM_SENSOR_MASK;
_txMessageBuffer[SENSOR_MASK_BYTE0] = (byte) sensorMaskBitsToRemove;
_txMessageBuffer[SENSOR_MASK_BYTE1] = (byte)(sensorMaskBitsToRemove >> 8);
_txMessageBuffer[SENSOR_MASK_BYTE2] = (byte)(sensorMaskBitsToRemove >> 16);
_txMessageBuffer[SENSOR_MASK_BYTE3] = (byte)(sensorMaskBitsToRemove >> 24);
_sendMessage (SENSOR_MASK_COMMAND_LENGTH);
}
void MiniQCom::sendBuzzerTone(unsigned int frequency,
unsigned long durationMs) {
_txMessageBuffer[COMMAND_BYTE] = COMMAND_BUZZER_TONE;
_txMessageBuffer[BUZZER_TONE_FREQUENCY_LSB] = (byte) frequency;
_txMessageBuffer[BUZZER_TONE_FREQUENCY_MSB] = (byte)(frequency >> 8);
_txMessageBuffer[BUZZER_TONE_DURATION_BYTE0] = (byte) durationMs;
_txMessageBuffer[BUZZER_TONE_DURATION_BYTE1] = (byte)(durationMs >> 8);
_txMessageBuffer[BUZZER_TONE_DURATION_BYTE2] = (byte)(durationMs >> 16);
_txMessageBuffer[BUZZER_TONE_DURATION_BYTE3] = (byte)(durationMs >> 24);
_sendMessage (BUZZER_TONE_COMMAND_LENGTH);
}
void MiniQCom::sendLed(byte red, byte green, byte blue) {
_txMessageBuffer[COMMAND_BYTE] = COMMAND_LED;
_txMessageBuffer[LED_R] = red;
_txMessageBuffer[LED_G] = green;
_txMessageBuffer[LED_B] = blue;
_sendMessage (LED_COMMAND_LENGTH);
}
void MiniQCom::sendSendIr(byte byteToSend, unsigned int durationMs) {
_txMessageBuffer[COMMAND_BYTE] = COMMAND_SEND_IR;
_txMessageBuffer[SEND_IR_BYTE] = byteToSend;
_txMessageBuffer[SEND_IR_DURATION_LSB] = (byte) durationMs;
_txMessageBuffer[SEND_IR_DURATION_MSB] = (byte)(durationMs >> 8);
_sendMessage (SEND_IR_COMMAND_LENGTH);
}
void MiniQCom::sendIrModuleMode(irModuleMode_t irModuleMode) {
_txMessageBuffer[COMMAND_BYTE] = COMMAND_IR_MODULE_MODE;
_txMessageBuffer[IR_MODULE_MODE] = (byte) irModuleMode; // Already is a byte.
_sendMessage (IR_MODULE_MODE_COMMAND_LENGTH);
}
void MiniQCom::_sendMessage(byte messageLength) {
byte crc = 0;
if (_isMaster) {
Wire.beginTransmission(_miniQAddress);
}
Wire.write(START_BYTE);
_sendByte(messageLength);
for (int i = 0; i < messageLength; i++) {
_sendByte (_txMessageBuffer[i]);
crc += _txMessageBuffer[i];
}
_sendByte(-crc);
if (_isMaster) {
Wire.endTransmission();
}
}
void MiniQCom::_sendByte(byte unescapedbyte) {
if (unescapedbyte == START_BYTE || unescapedbyte == ESCAPE_BYTE) {
Wire.write(ESCAPE_BYTE);
Wire.write(unescapedbyte ^ ESCAPE_XOR);
} else {
Wire.write(unescapedbyte);
}
}
void MiniQCom::registerDrivePwmCallback(
void (*drivePwmCallback)(boolean leftIsForward, boolean rightIsForward,
byte leftDutyCycle, byte rightDutyCycle)) {
_drivePwmCallback = drivePwmCallback;
}
void MiniQCom::registerDriveSpeedArcCallback(
void (*driveSpeedArcCallback)(int speedMmPerS, int arcMm)) {
_driveSpeedArcCallback = driveSpeedArcCallback;
}
void MiniQCom::registerSensorMaskCallback(
void (*sensorMaskCallback)(sensorMaskSetAddOrRemove_t setAddOrRemove,
unsigned long sensorMaskParameter)) {
_sensorMaskCallback = sensorMaskCallback;
}
void MiniQCom::registerBuzzerToneCallback(
void (*buzzerToneCallback)(unsigned int frequency,
unsigned long durationMs)) {
_buzzerToneCallback = buzzerToneCallback;
}
void MiniQCom::registerLedCallback(
void (*ledCallback)(byte red, byte green, byte blue)) {
_ledCallback = ledCallback;
}
void MiniQCom::registerSendIrCallback(
void (*sendIrCallback)(byte byteToSend, unsigned int durationMs)) {
_sendIrCallback = sendIrCallback;
}
void MiniQCom::registerIrModuleMode(
void (*irModuleMode)(irModuleMode_t irModuleMode)) {
_irModuleMode = irModuleMode;
}
void MiniQCom::handleRxByte(byte newRxByte) {
// Highest priority is the start byte.
if (newRxByte == START_BYTE) {
_lastByteWasStartByte = true;
_lastByteWasEscapeByte = false;
return;
} else if (!_lastByteWasStartByte) {
// Make sure we are expecting bytes (ignore unexpected bytes).
if (_bytesRemainingInMessage < 0) {
return;
}
}
// Next handle the escaping mechanism.
if (_lastByteWasEscapeByte) {
newRxByte ^= ESCAPE_XOR;
} else {
if (newRxByte == ESCAPE_BYTE) {
_lastByteWasEscapeByte = true;
return;
}
}
_lastByteWasEscapeByte = false;
// Next handle the length byte
if (_lastByteWasStartByte) {
// This is the length byte.
_bytesRemainingInMessage = newRxByte;
_crc = 0;
_nextOpenByteInMessageBuffer = 0;
_lastByteWasStartByte = false;
return;
}
// Handle this data byte.
_crc += newRxByte;
if (_bytesRemainingInMessage > 0) {
// Receiving bytes in the message.
_rxMessageBuffer[_nextOpenByteInMessageBuffer] = newRxByte;
_nextOpenByteInMessageBuffer++;
} else {
// Message just finished time to validate the CRC byte.
if (_crc == 0) {
_parseValidMessage();
}
}
_bytesRemainingInMessage--;
}
void MiniQCom::_parseValidMessage() {
switch (_rxMessageBuffer[COMMAND_BYTE]) {
case COMMAND_DRIVE_PWM:
if (_drivePwmCallback != NULL) {
_drivePwmCallback(
(_rxMessageBuffer[DRIVE_PWM_DIRECTIONS] >> 1) & 0x01,
_rxMessageBuffer[DRIVE_PWM_DIRECTIONS] & 0x01,
_rxMessageBuffer[DRIVE_PWM_LEFT_DUTY_CYCLE],
_rxMessageBuffer[DRIVE_PWM_RIGHT_DUTY_CYCLE]);
}
break;
case COMMAND_DRIVE_SPEED_ARC:
if (_driveSpeedArcCallback != NULL) {
int speedMmPerS = _rxMessageBuffer[DRIVE_SPEED_ARC_SPEED_MSB];
speedMmPerS = speedMmPerS << 8;
speedMmPerS += _rxMessageBuffer[DRIVE_SPEED_ARC_SPEED_LSB];
int arcMm = _rxMessageBuffer[DRIVE_SPEED_ARC_ARC_MSB];
arcMm = arcMm << 8;
arcMm += _rxMessageBuffer[DRIVE_SPEED_ARC_ARC_LSB];
_driveSpeedArcCallback(speedMmPerS, arcMm);
}
break;
case COMMAND_SET_SENSOR_MASK:
if (_sensorMaskCallback != NULL) {
unsigned long sensorMaskParameter =
_rxMessageBuffer[SENSOR_MASK_BYTE3];
sensorMaskParameter = sensorMaskParameter << 8;
sensorMaskParameter += _rxMessageBuffer[SENSOR_MASK_BYTE2];
sensorMaskParameter = sensorMaskParameter << 8;
sensorMaskParameter += _rxMessageBuffer[SENSOR_MASK_BYTE1];
sensorMaskParameter = sensorMaskParameter << 8;
sensorMaskParameter += _rxMessageBuffer[SENSOR_MASK_BYTE0];
sensorMask = sensorMaskParameter; // Set the mask.
_sensorMaskCallback(SENSOR_MASK_SET, sensorMaskParameter);
}
break;
case COMMAND_ADD_TO_SENSOR_MASK:
if (_sensorMaskCallback != NULL) {
unsigned long sensorMaskParameter =
_rxMessageBuffer[SENSOR_MASK_BYTE3];
sensorMaskParameter = sensorMaskParameter << 8;
sensorMaskParameter += _rxMessageBuffer[SENSOR_MASK_BYTE2];
sensorMaskParameter = sensorMaskParameter << 8;
sensorMaskParameter += _rxMessageBuffer[SENSOR_MASK_BYTE1];
sensorMaskParameter = sensorMaskParameter << 8;
sensorMaskParameter += _rxMessageBuffer[SENSOR_MASK_BYTE0];
sensorMask |= sensorMaskParameter; // OR the two masks.
_sensorMaskCallback(SENSOR_MASK_ADD, sensorMaskParameter);
}
break;
case COMMAND_REMOVE_FROM_SENSOR_MASK:
if (_sensorMaskCallback != NULL) {
unsigned long sensorMaskParameter =
_rxMessageBuffer[SENSOR_MASK_BYTE3];
sensorMaskParameter = sensorMaskParameter << 8;
sensorMaskParameter += _rxMessageBuffer[SENSOR_MASK_BYTE2];
sensorMaskParameter = sensorMaskParameter << 8;
sensorMaskParameter += _rxMessageBuffer[SENSOR_MASK_BYTE1];
sensorMaskParameter = sensorMaskParameter << 8;
sensorMaskParameter += _rxMessageBuffer[SENSOR_MASK_BYTE0];
sensorMask &= ~sensorMaskParameter; // Remove only certain sensors.
_sensorMaskCallback(SENSOR_MASK_REMOVE, sensorMaskParameter);
}
break;
case COMMAND_BUZZER_TONE:
if (_buzzerToneCallback != NULL) {
unsigned int frequency = _rxMessageBuffer[BUZZER_TONE_FREQUENCY_MSB];
frequency = frequency << 8;
frequency += _rxMessageBuffer[BUZZER_TONE_FREQUENCY_LSB];
unsigned long durationMs =
_rxMessageBuffer[BUZZER_TONE_DURATION_BYTE3];
durationMs = durationMs << 8;
durationMs += _rxMessageBuffer[BUZZER_TONE_DURATION_BYTE2];
durationMs = durationMs << 8;
durationMs += _rxMessageBuffer[BUZZER_TONE_DURATION_BYTE1];
durationMs = durationMs << 8;
durationMs += _rxMessageBuffer[BUZZER_TONE_DURATION_BYTE0];
_buzzerToneCallback(frequency, durationMs);
}
break;
case COMMAND_LED:
if (_ledCallback != NULL) {
_ledCallback(_rxMessageBuffer[LED_R], _rxMessageBuffer[LED_G],
_rxMessageBuffer[LED_B]);
}
break;
case COMMAND_SEND_IR:
if (_sendIrCallback != NULL) {
unsigned int durationMs = _rxMessageBuffer[SEND_IR_DURATION_MSB];
durationMs = durationMs << 8;
durationMs += _rxMessageBuffer[SEND_IR_DURATION_LSB];
_sendIrCallback(_rxMessageBuffer[SEND_IR_BYTE], durationMs);
}
break;
case COMMAND_IR_MODULE_MODE:
if (_irModuleMode != NULL) {
_irModuleMode((irModuleMode_t) _rxMessageBuffer[IR_MODULE_MODE]);
}
break;
default:
// Silently do nothing with unknown commands
break;
}
}
| [
"fisherds@rose-hulman.edu"
] | fisherds@rose-hulman.edu |
06dcb4ee6bbb27a4f3840e29e05243ec6069e701 | 9e04c7abe5a87240447c68c2bae57797fbf02934 | /Module3/Chapter02/01_Line/main.cpp | 275743909afef38c0da5145a28914a471b2da83c | [
"MIT"
] | permissive | wow2006/OpenGLBuildHighPerformanceGraphics | 7f12a50c68f9125b2fd47b7ac6c57e4b8f889636 | 0174af58afd8da66425f15b218b26d4f99653899 | refs/heads/master | 2021-06-07T00:34:53.863031 | 2020-12-29T16:15:21 | 2020-12-29T16:15:21 | 140,864,836 | 1 | 2 | MIT | 2018-11-04T15:52:53 | 2018-07-13T15:37:33 | C++ | UTF-8 | C++ | false | false | 3,001 | cpp | // This is an open source non-commercial project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// STL
#include <cstdlib>
#include <string_view>
// OpenGL
#include <GLFW/glfw3.h>
constexpr auto g_cWindowsWidth = 640 * 2;
constexpr auto g_cWindowsHeight = 480;
constexpr auto g_cWindowTitle = "Chapter 2: Primitive drawings";
struct Vertex {
GLfloat x, y, z;
GLfloat r, g, b, a;
};
void drawLineSegment(Vertex v1, Vertex v2, GLfloat width = 1.0f);
void drawGrid(GLfloat width, GLfloat height, GLfloat grid_width);
void drawLineDemo();
auto main() -> int {
if (!glfwInit()) {
return EXIT_FAILURE;
}
GLFWwindow *pWindow = glfwCreateWindow(g_cWindowsWidth, g_cWindowsHeight,
g_cWindowTitle, nullptr, nullptr);
if (pWindow == nullptr) {
glfwTerminate();
return EXIT_FAILURE;
}
glfwMakeContextCurrent(pWindow);
// enable anti-aliasing
glEnable(GL_LINE_SMOOTH);
glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
glEnable(GL_POINT_SMOOTH);
glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
while (!glfwWindowShouldClose(pWindow)) {
int width = 0, height = 0;
glfwGetFramebufferSize(pWindow, &width, &height);
const float ratio = static_cast<float>(width) / static_cast<float>(height);
glViewport(0, 0, width, height);
glClear(GL_COLOR_BUFFER_BIT);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(-ratio, ratio, -1.f, 1.f, 1.f, -1.f);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
drawLineDemo();
glfwSwapBuffers(pWindow);
glfwPollEvents();
}
glfwDestroyWindow(pWindow);
glfwTerminate();
return EXIT_SUCCESS;
}
void drawLineDemo() {
// Draw a simple grid
drawGrid(5.0F, 1.0F, 0.1F);
Vertex v1 = {-5.F, 0.F, 0.F, 1.F, 0.F, 0.F, 0.7F};
Vertex v2 = { 5.F, 0.F, 0.F, 0.F, 1.F, 0.F, 0.7F};
Vertex v3 = { 0.F, 1.F, 0.F, 0.F, 0.F, 1.F, 0.7F};
Vertex v4 = { 0.F,-1.F, 0.F, 0.F, 0.F, 1.F, 0.7F};
drawLineSegment(v1, v2, 10.F);
drawLineSegment(v3, v4, 10.F);
}
void drawGrid(GLfloat width, GLfloat height, GLfloat grid_width) {
// horizontal lines
for (float i = -height; i < height; i += grid_width) {
Vertex v1 = {-width, i, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f};
Vertex v2 = {width, i, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f};
drawLineSegment(v1, v2);
}
// vertical lines
for (float i = -width; i < width; i += grid_width) {
Vertex v1 = {i, -height, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f};
Vertex v2 = {i, height, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f};
drawLineSegment(v1, v2);
}
}
void drawLineSegment(Vertex v1, Vertex v2, GLfloat width) {
glLineWidth(width);
glBegin(GL_LINES);
{
glColor4f(v1.r, v1.g, v1.b, v1.a);
glVertex3f(v1.x, v1.y, v1.z);
glColor4f(v2.r, v2.g, v2.b, v2.a);
glVertex3f(v2.x, v2.y, v2.z);
}
glEnd();
}
| [
"eng.ahmedhussein89@gmail.com"
] | eng.ahmedhussein89@gmail.com |
9cfe71c26ae96ba87b2fdab1bdcd2d6a336b58a4 | 0ce420545cad4388e31e655d61c991a1e8c204a1 | /Smaug Reborn/SmaugReborn/src/Vision.cpp | 1546a41ae3f93f2678ca158ec4617d369925f722 | [
"MIT"
] | permissive | MrMitten/Team2883-2017Code | 4178e9e1d3a47246a669e29f467961449ade97a7 | 385b70c2c0954aea35e233970ea48d3a5e73b143 | refs/heads/master | 2021-04-30T09:57:13.349859 | 2017-05-17T20:45:32 | 2017-05-17T20:45:32 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 283 | cpp | /*
* Vision.cpp
*
* Created on: May 11, 2017
* Author: FRED
*/
#include <Vision.h>
namespace MEC {
Vision::Vision() {
// TODO Auto-generated constructor stub
}
Vision::~Vision() {
// TODO Auto-generated destructor stub
}
} /* namespace MEC */
| [
"noreply@github.com"
] | MrMitten.noreply@github.com |
50965dfda98d44cd580b4b486c6a6b4a5a2442f4 | aa0ec5c7bf92bc74d1a3a64f0524c9cc8c2088ef | /src/sample/x2/xpp_cp/deps/xroc-framework/include/hobotxroc/node.h | f181dca8f84adc2e520f3f91280e6e7fc43ba1a6 | [] | no_license | xiaoliuzi/bootprint_x2 | 09ce0f6690bc4bdbcd0cb7bc2ab8bff71009f2b3 | 192e88672f27edccd48e6eee1a71aa30979e083a | refs/heads/master | 2020-12-10T23:38:39.609507 | 2020-01-15T10:32:39 | 2020-01-15T10:32:39 | 233,742,835 | 1 | 0 | null | 2020-01-14T02:53:18 | 2020-01-14T02:53:17 | null | UTF-8 | C++ | false | false | 3,984 | h | /**
* Copyright (c) 2018 Horizon Robotics. All rights reserved.
* @brief Node in xroc framework
* @file node.h
* @author shuhuan.sun
* @email shuhuan.sun@horizon.ai
* @version 0.0.0.1
* @date 2018.11.21
*/
#ifndef HOBOTXROC_NODE_H_
#define HOBOTXROC_NODE_H_
#include <chrono>
#include <functional>
#include <list>
#include <memory>
#include <thread>
#include <vector>
#include <string>
#include "common/concurrency_queue.h"
#include "hobotxroc/framework_data_shell.h"
#include "hobotxroc/method.h"
#include "hobotxroc/method_manager.h"
#include "hobotxroc/xroc_config.h"
#include "common/thread_pool.h"
namespace HobotXRoc {
class Sponge {
public:
explicit Sponge(int16_t max_size = 128) : cache_max_size_(max_size) {
// last_proc_timestamp_ = 0;
is_start_ = false;
}
~Sponge() = default;
bool Sop(const FrameworkDataPtr &data, std::list<FrameworkDataPtr> *ready);
private:
bool is_start_;
uint16_t cache_max_size_;
//int32_t waiting_time_;
//int64_t last_proc_timestamp_;
uint64_t expected_sequence_id_;
std::list<FrameworkDataPtr> cache_list_;
//std::mutex cache_mutex_;
};
struct NodeRunContext {
private:
XThreadRawPtr daemon_thread_;
ThreadManager *engine_;
XRocSharedConfig sharedconfig_;
public:
NodeRunContext(XThreadRawPtr daemon_thread,
ThreadManager *engine,
XRocSharedConfig sharedconfig) :
daemon_thread_(daemon_thread),
engine_(engine),
sharedconfig_(sharedconfig) {}
ThreadManager* GetEngine() const {
return engine_;
}
XThreadRawPtr GetNodeDaemon() const {
return daemon_thread_;
}
XRocSharedConfig GetSharedConfig() const {
return sharedconfig_;
}
};
class Node : public std::enable_shared_from_this<Node> {
public:
explicit Node(const std::string &unique_name) : unique_name_(unique_name) {}
~Node() = default;
void Init(
std::function<int(FrameworkDataPtr data,
std::shared_ptr<Node> readyNode)> callback,
const std::vector<int> &inputSlots,
const std::vector<int> &outputSlots,
const Config &config,
std::shared_ptr<NodeRunContext> run_context);
/// 此函数为scheduler调用接口函数,用于驱动Method计算
void Do(const FrameworkDataPtr &data);
int SetParameter(InputParamPtr ptr);
InputParamPtr GetParameter() const;
std::string GetVersion() const;
std::string GetUniqueName() const;
private:
// node唯一名字,Note:"__INPUT__"内部预留使用了。
std::string unique_name_;
MethodManager method_manager_;
std::function<int(FrameworkDataPtr data, std::shared_ptr<Node> ready_node)>
on_ready_;
std::vector<int> input_slots_, output_slots_;
bool is_need_reorder_;
std::vector<Sponge> sponge_list_;
int32_t setting_timeout_duration_ms_ = -1; // milliseconds
XThreadRawPtr daemon_thread_ = nullptr;
protected:
void Handle(const FrameworkDataPtr &framework_data);
//
bool IsNeedSkip(const FrameworkDataPtr &framework_data);
//
void FakeResult(const FrameworkDataPtr &framework_data);
// 供timer以及Method的回调函数使用,把消息发给Node线程以便把结果写回并推送给scheduler
void PostResult(FrameworkDataShellPtr result);
std::vector<InputParamPtr> GetInputParams(
const FrameworkDataBatchPtr &frame_data) const;
std::vector<std::vector<BaseDataPtr>> GetInputData(
const FrameworkDataBatchPtr &data) const;
void SetOutputData(FrameworkDataBatchPtr frameData,
const std::vector<std::vector<BaseDataPtr>> &data);
void SetTimeoutFlag(FrameworkDataBatchPtr frameData);
void CheckResult(const FrameworkData &frame_data);
void OnFakeResult(FrameworkDataPtr result);
void OnGetResult(FrameworkDataShellPtr result);
};
typedef std::shared_ptr<Node> NodePtr;
#define NODE_UNINAME_RESERVED_INPUT "__INPUT__"
} // namespace HobotXRoc
#endif // HOBOTXROC_NODE_H_
| [
"songshan.gong@horizon.ai"
] | songshan.gong@horizon.ai |
bc27d8eeb032e44a2f65ac602b417244b432f244 | ef4ce28d84d84c9403ae837d6447573361bf4c15 | /mruset.h | e9792054ac9baede80904e077d8392301c285c0d | [] | no_license | failcoin/ttt | f8e99f18dff5723a15d45d88a5ec5f318ae652ec | 0680f44c5c72d122f5057418897cc86b989dcaac | refs/heads/master | 2016-09-06T11:42:35.728958 | 2014-03-17T12:47:57 | 2014-03-17T12:47:57 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,183 | h | // Copyright (c) 2012 The Bitcoin developers
// Copyright (c) 2012 Litecoin Developers
// Copyright (c) 2013 AntiKeiserCoin Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_MRUSET_H
#define BITCOIN_MRUSET_H
#include <set>
#include <deque>
/** STL-like set container that only keeps the most recent N elements. */
template <typename T> class mruset
{
public:
typedef T key_type;
typedef T value_type;
typedef typename std::set<T>::iterator iterator;
typedef typename std::set<T>::const_iterator const_iterator;
typedef typename std::set<T>::size_type size_type;
protected:
std::set<T> set;
std::deque<T> queue;
size_type nMaxSize;
public:
mruset(size_type nMaxSizeIn = 0) { nMaxSize = nMaxSizeIn; }
iterator begin() const { return set.begin(); }
iterator end() const { return set.end(); }
size_type size() const { return set.size(); }
bool empty() const { return set.empty(); }
iterator find(const key_type& k) const { return set.find(k); }
size_type count(const key_type& k) const { return set.count(k); }
bool inline friend operator==(const mruset<T>& a, const mruset<T>& b) { return a.set == b.set; }
bool inline friend operator==(const mruset<T>& a, const std::set<T>& b) { return a.set == b; }
bool inline friend operator<(const mruset<T>& a, const mruset<T>& b) { return a.set < b.set; }
std::pair<iterator, bool> insert(const key_type& x)
{
std::pair<iterator, bool> ret = set.insert(x);
if (ret.second)
{
if (nMaxSize && queue.size() == nMaxSize)
{
set.erase(queue.front());
queue.pop_front();
}
queue.push_back(x);
}
return ret;
}
size_type max_size() const { return nMaxSize; }
size_type max_size(size_type s)
{
if (s)
while (queue.size() > s)
{
set.erase(queue.front());
queue.pop_front();
}
nMaxSize = s;
return nMaxSize;
}
};
#endif
| [
"root@failco.in"
] | root@failco.in |
5e05e40fcc3cd967b2d5170fdfeec0e5f786a12b | 8d3d96b8b919da781caec1c1c2a982ce8a38e355 | /Project3Aoife_Eoin/src/main.cpp | d11a4666e634cbe111b2e279f33f346cff5a82a8 | [] | no_license | EoinAM/3RD_Year_Final_Project | 1dbf9d8f4c4844351892a01335cc27204025bfcb | 1c3ea60049e9009c52c227df90a8b021e4e6b272 | refs/heads/master | 2020-12-20T19:40:30.464688 | 2020-03-02T22:37:54 | 2020-03-02T22:37:54 | 236,191,422 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,056 | cpp | #ifdef _DEBUG
#pragma comment(lib,"sfml-graphics-d.lib")
#pragma comment(lib,"sfml-audio-d.lib")
#pragma comment(lib,"sfml-system-d.lib")
#pragma comment(lib,"sfml-window-d.lib")
#pragma comment(lib,"sfml-network-d.lib")
#else
#pragma comment(lib,"sfml-graphics.lib")
#pragma comment(lib,"sfml-audio.lib")
#pragma comment(lib,"sfml-system.lib")
#pragma comment(lib,"sfml-window.lib")
#pragma comment(lib,"sfml-network.lib")
#endif
#include "Game.h"
#include <iostream>
#include <stdlib.h>
int main()
{
srand(time(NULL));
sf::RectangleShape screenShape;
sf::Texture loadTexture;
loadTexture.loadFromFile("Assets\\Sprites\\loading.png");
screenShape.setSize(sf::Vector2f(GlobalSettings::s_width, GlobalSettings::s_height));
screenShape.setTexture(&loadTexture);
sf::RenderWindow loadWindow;
loadWindow.create(sf::VideoMode(GlobalSettings::s_width, GlobalSettings::s_height, 32), "Aoife & Eoin Project 3", sf::Style::Default);
loadWindow.draw(screenShape);
loadWindow.display();
Game game(loadWindow);
game.run();
return 1;
} | [
"C00217717@itcarlow.ie"
] | C00217717@itcarlow.ie |
e9dccf0cdb8c33a93fe4586a0f1769ea35fbb823 | 1809b5bda803fbbf51dcbc4e2d464c762f3563c1 | /asa091/asa091.cpp | 60f47c4fe32f540ec8906a17df85b85c66ff65ad | [] | no_license | tnakaicode/jburkardt | 42c5ef74ab88d17afbd188e4ff2b4ecb8a30bb25 | 74eebcbda61423178b96cfdec5d8bb30d6494a33 | refs/heads/master | 2020-12-24T02:23:01.855912 | 2020-02-05T02:10:32 | 2020-02-05T02:10:32 | 237,349,784 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 18,537 | cpp | # include <cstdlib>
# include <iostream>
# include <iomanip>
# include <cmath>
# include <ctime>
using namespace std;
# include "asa091.hpp"
//****************************************************************************80
double alnorm ( double x, bool upper )
//****************************************************************************80
//
// Purpose:
//
// ALNORM computes the cumulative density of the standard normal distribution.
//
// Licensing:
//
// This code is distributed under the GNU LGPL license.
//
// Modified:
//
// 17 January 2008
//
// Author:
//
// Original FORTRAN77 version by David Hill.
// C++ version by John Burkardt.
//
// Reference:
//
// David Hill,
// Algorithm AS 66:
// The Normal Integral,
// Applied Statistics,
// Volume 22, Number 3, 1973, pages 424-427.
//
// Parameters:
//
// Input, double X, is one endpoint of the semi-infinite interval
// over which the integration takes place.
//
// Input, bool UPPER, determines whether the upper or lower
// interval is to be integrated:
// .TRUE. => integrate from X to + Infinity;
// .FALSE. => integrate from - Infinity to X.
//
// Output, double ALNORM, the integral of the standard normal
// distribution over the desired interval.
//
{
double a1 = 5.75885480458;
double a2 = 2.62433121679;
double a3 = 5.92885724438;
double b1 = -29.8213557807;
double b2 = 48.6959930692;
double c1 = -0.000000038052;
double c2 = 0.000398064794;
double c3 = -0.151679116635;
double c4 = 4.8385912808;
double c5 = 0.742380924027;
double c6 = 3.99019417011;
double con = 1.28;
double d1 = 1.00000615302;
double d2 = 1.98615381364;
double d3 = 5.29330324926;
double d4 = -15.1508972451;
double d5 = 30.789933034;
double ltone = 7.0;
double p = 0.398942280444;
double q = 0.39990348504;
double r = 0.398942280385;
bool up;
double utzero = 18.66;
double value;
double y;
double z;
up = upper;
z = x;
if ( z < 0.0 )
{
up = !up;
z = - z;
}
if ( ltone < z && ( ( !up ) || utzero < z ) )
{
if ( up )
{
value = 0.0;
}
else
{
value = 1.0;
}
return value;
}
y = 0.5 * z * z;
if ( z <= con )
{
value = 0.5 - z * ( p - q * y
/ ( y + a1 + b1
/ ( y + a2 + b2
/ ( y + a3 ))));
}
else
{
value = r * exp ( - y )
/ ( z + c1 + d1
/ ( z + c2 + d2
/ ( z + c3 + d3
/ ( z + c4 + d4
/ ( z + c5 + d5
/ ( z + c6 ))))));
}
if ( !up )
{
value = 1.0 - value;
}
return value;
}
//****************************************************************************80
void chi_square_cdf_values ( int *n_data, int *a, double *x, double *fx )
//****************************************************************************80
//
// Purpose:
//
// CHI_SQUARE_CDF_VALUES returns some values of the Chi-Square CDF.
//
// Discussion:
//
// In Mathematica, the function can be evaluated by:
//
// Needs["Statistics`ContinuousDistributions`"]
// dist = ChiSquareDistribution [ df ]
// CDF [ dist, x ]
//
// Licensing:
//
// This code is distributed under the GNU LGPL license.
//
// Modified:
//
// 09 August 2004
//
// Author:
//
// John Burkardt
//
// Reference:
//
// Milton Abramowitz, Irene Stegun,
// Handbook of Mathematical Functions,
// National Bureau of Standards, 1964,
// ISBN: 0-486-61272-4,
// LC: QA47.A34.
//
// Stephen Wolfram,
// The Mathematica Book,
// Fourth Edition,
// Cambridge University Press, 1999,
// ISBN: 0-521-64314-7,
// LC: QA76.95.W65.
//
// Parameters:
//
// Input/output, int *N_DATA. The user sets N_DATA to 0 before the
// first call. On each call, the routine increments N_DATA by 1, and
// returns the corresponding data; when there is no more data, the
// output value of N_DATA will be 0 again.
//
// Output, int *A, the parameter of the function.
//
// Output, double *X, the argument of the function.
//
// Output, double *FX, the value of the function.
//
{
//
# define N_MAX 21
int a_vec[N_MAX] = {
1, 2, 1, 2,
1, 2, 3, 4,
1, 2, 3, 4,
5, 3, 3, 3,
3, 3, 10, 10,
10 };
double fx_vec[N_MAX] = {
0.7965567455405796E-01,
0.4987520807317687E-02,
0.1124629160182849E+00,
0.9950166250831946E-02,
0.4729107431344619E+00,
0.1812692469220181E+00,
0.5975750516063926E-01,
0.1752309630642177E-01,
0.6826894921370859E+00,
0.3934693402873666E+00,
0.1987480430987992E+00,
0.9020401043104986E-01,
0.3743422675270363E-01,
0.4275932955291202E+00,
0.6083748237289110E+00,
0.7385358700508894E+00,
0.8282028557032669E+00,
0.8883897749052874E+00,
0.1721156299558408E-03,
0.3659846827343712E-02,
0.1857593622214067E-01 };
double x_vec[N_MAX] = {
0.01E+00,
0.01E+00,
0.02E+00,
0.02E+00,
0.40E+00,
0.40E+00,
0.40E+00,
0.40E+00,
1.00E+00,
1.00E+00,
1.00E+00,
1.00E+00,
1.00E+00,
2.00E+00,
3.00E+00,
4.00E+00,
5.00E+00,
6.00E+00,
1.00E+00,
2.00E+00,
3.00E+00 };
if ( *n_data < 0 )
{
*n_data = 0;
}
*n_data = *n_data + 1;
if ( N_MAX < *n_data )
{
*n_data = 0;
*a = 0;
*x = 0.0;
*fx = 0.0;
}
else
{
*a = a_vec[*n_data-1];
*x = x_vec[*n_data-1];
*fx = fx_vec[*n_data-1];
}
return;
# undef N_MAX
}
//****************************************************************************80
double gammad ( double x, double p, int *ifault )
//****************************************************************************80
//
// Purpose:
//
// GAMMAD computes the Incomplete Gamma Integral
//
// Licensing:
//
// This code is distributed under the GNU LGPL license.
//
// Modified:
//
// 20 January 2008
//
// Author:
//
// Original FORTRAN77 version by B Shea.
// C++ version by John Burkardt.
//
// Reference:
//
// B Shea,
// Algorithm AS 239:
// Chi-squared and Incomplete Gamma Integral,
// Applied Statistics,
// Volume 37, Number 3, 1988, pages 466-473.
//
// Parameters:
//
// Input, double X, P, the parameters of the incomplete
// gamma ratio. 0 <= X, and 0 < P.
//
// Output, int IFAULT, error flag.
// 0, no error.
// 1, X < 0 or P <= 0.
//
// Output, double GAMMAD, the value of the incomplete
// Gamma integral.
//
{
double a;
double an;
double arg;
double b;
double c;
double elimit = - 88.0;
double oflo = 1.0E+37;
double plimit = 1000.0;
double pn1;
double pn2;
double pn3;
double pn4;
double pn5;
double pn6;
double rn;
double tol = 1.0E-14;
bool upper;
double value;
double xbig = 1.0E+08;
value = 0.0;
//
// Check the input.
//
if ( x < 0.0 )
{
*ifault = 1;
return value;
}
if ( p <= 0.0 )
{
*ifault = 1;
return value;
}
*ifault = 0;
if ( x == 0.0 )
{
value = 0.0;
return value;
}
//
// If P is large, use a normal approximation.
//
if ( plimit < p )
{
pn1 = 3.0 * sqrt ( p ) * ( pow ( x / p, 1.0 / 3.0 )
+ 1.0 / ( 9.0 * p ) - 1.0 );
upper = false;
value = alnorm ( pn1, upper );
return value;
}
//
// If X is large set value = 1.
//
if ( xbig < x )
{
value = 1.0;
return value;
}
//
// Use Pearson's series expansion.
// (Note that P is not large enough to force overflow in ALOGAM).
// No need to test IFAULT on exit since P > 0.
//
if ( x <= 1.0 || x < p )
{
arg = p * log ( x ) - x - lgamma ( p + 1.0 );
c = 1.0;
value = 1.0;
a = p;
for ( ; ; )
{
a = a + 1.0;
c = c * x / a;
value = value + c;
if ( c <= tol )
{
break;
}
}
arg = arg + log ( value );
if ( elimit <= arg )
{
value = exp ( arg );
}
else
{
value = 0.0;
}
}
//
// Use a continued fraction expansion.
//
else
{
arg = p * log ( x ) - x - lgamma ( p );
a = 1.0 - p;
b = a + x + 1.0;
c = 0.0;
pn1 = 1.0;
pn2 = x;
pn3 = x + 1.0;
pn4 = x * b;
value = pn3 / pn4;
for ( ; ; )
{
a = a + 1.0;
b = b + 2.0;
c = c + 1.0;
an = a * c;
pn5 = b * pn3 - an * pn1;
pn6 = b * pn4 - an * pn2;
if ( pn6 != 0.0 )
{
rn = pn5 / pn6;
if ( fabs ( value - rn ) <= r8_min ( tol, tol * rn ) )
{
break;
}
value = rn;
}
pn1 = pn3;
pn2 = pn4;
pn3 = pn5;
pn4 = pn6;
//
// Re-scale terms in continued fraction if terms are large.
//
if ( oflo <= fabs ( pn5 ) )
{
pn1 = pn1 / oflo;
pn2 = pn2 / oflo;
pn3 = pn3 / oflo;
pn4 = pn4 / oflo;
}
}
arg = arg + log ( value );
if ( elimit <= arg )
{
value = 1.0 - exp ( arg );
}
else
{
value = 1.0;
}
}
return value;
}
//****************************************************************************80
double ppchi2 ( double p, double v, double g, int *ifault )
//****************************************************************************80
//
// Purpose:
//
// PPCHI2 evaluates the percentage points of the Chi-squared PDF.
//
// Discussion
//
// Incorporates the suggested changes in AS R85 (vol.40(1),
// pages 233-5, 1991) which should eliminate the need for the limited
// range for P, though these limits have not been removed
// from the routine.
//
// Licensing:
//
// This code is distributed under the GNU LGPL license.
//
// Modified:
//
// 05 June 2013
//
// Author:
//
// Original FORTRAN77 version by Donald Best, DE Roberts.
// C++ version by John Burkardt.
//
// Reference:
//
// Donald Best, DE Roberts,
// Algorithm AS 91:
// The Percentage Points of the Chi-Squared Distribution,
// Applied Statistics,
// Volume 24, Number 3, 1975, pages 385-390.
//
// Parameters:
//
// Input, double P, value of the chi-squared cumulative
// probability density function.
// 0.000002 <= P <= 0.999998.
//
// Input, double V, the parameter of the chi-squared probability
// density function.
// 0 < V.
//
// Input, double G, the value of log ( Gamma ( V / 2 ) ).
//
// Output, int *IFAULT, is nonzero if an error occurred.
// 0, no error.
// 1, P is outside the legal range.
// 2, V is not positive.
// 3, an error occurred in GAMMAD.
// 4, the result is probably as accurate as the machine will allow.
//
// Output, double PPCHI2, the value of the chi-squared random
// deviate with the property that the probability that a chi-squared random
// deviate with parameter V is less than or equal to PPCHI2 is P.
//
{
double a;
double aa = 0.6931471806;
double b;
double c;
double c1 = 0.01;
double c2 = 0.222222;
double c3 = 0.32;
double c4 = 0.4;
double c5 = 1.24;
double c6 = 2.2;
double c7 = 4.67;
double c8 = 6.66;
double c9 = 6.73;
double c10 = 13.32;
double c11 = 60.0;
double c12 = 70.0;
double c13 = 84.0;
double c14 = 105.0;
double c15 = 120.0;
double c16 = 127.0;
double c17 = 140.0;
double c18 = 175.0;
double c19 = 210.0;
double c20 = 252.0;
double c21 = 264.0;
double c22 = 294.0;
double c23 = 346.0;
double c24 = 420.0;
double c25 = 462.0;
double c26 = 606.0;
double c27 = 672.0;
double c28 = 707.0;
double c29 = 735.0;
double c30 = 889.0;
double c31 = 932.0;
double c32 = 966.0;
double c33 = 1141.0;
double c34 = 1182.0;
double c35 = 1278.0;
double c36 = 1740.0;
double c37 = 2520.0;
double c38 = 5040.0;
double ch;
double e = 0.5E-06;
int i;
int if1;
int maxit = 20;
double pmax = 0.999998;
double pmin = 0.000002;
double p1;
double p2;
double q;
double s1;
double s2;
double s3;
double s4;
double s5;
double s6;
double t;
double value;
double x;
double xx;
//
// Test arguments and initialize.
//
value = - 1.0;
if ( p < pmin || pmax < p )
{
*ifault = 1;
return value;
}
if ( v <= 0.0 )
{
*ifault = 2;
return value;
}
*ifault = 0;
xx = 0.5 * v;
c = xx - 1.0;
//
// Starting approximation for small chi-squared
//
if ( v < - c5 * log ( p ) )
{
ch = pow ( p * xx * exp ( g + xx * aa ), 1.0 / xx );
if ( ch < e )
{
value = ch;
return value;
}
}
//
// Starting approximation for V less than or equal to 0.32
//
else if ( v <= c3 )
{
ch = c4;
a = log ( 1.0 - p );
for ( ; ; )
{
q = ch;
p1 = 1.0 + ch * ( c7 + ch );
p2 = ch * (c9 + ch * ( c8 + ch ) );
t = - 0.5 + (c7 + 2.0 * ch ) / p1 - ( c9 + ch * ( c10 +
3.0 * ch ) ) / p2;
ch = ch - ( 1.0 - exp ( a + g + 0.5 * ch + c * aa ) * p2 / p1) / t;
if ( fabs ( q / ch - 1.0 ) <= c1 )
{
break;
}
}
}
else
{
//
// Call to algorithm AS 111 - note that P has been tested above.
// AS 241 could be used as an alternative.
//
x = ppnd ( p, ifault );
//
// Starting approximation using Wilson and Hilferty estimate
//
p1 = c2 / v;
ch = v * pow ( x * sqrt ( p1 ) + 1.0 - p1, 3 );
//
// Starting approximation for P tending to 1.
//
if ( c6 * v + 6.0 < ch )
{
ch = - 2.0 * ( log ( 1.0 - p ) - c * log ( 0.5 * ch ) + g );
}
}
//
// Call to algorithm AS 239 and calculation of seven term
// Taylor series
//
for ( i = 1; i <= maxit; i++ )
{
q = ch;
p1 = 0.5 * ch;
p2 = p - gammad ( p1, xx, &if1 );
if ( if1 != 0 )
{
*ifault = 3;
return value;
}
t = p2 * exp ( xx * aa + g + p1 - c * log ( ch ) );
b = t / ch;
a = 0.5 * t - b * c;
s1 = ( c19 + a * ( c17 + a * ( c14 + a * ( c13 + a * ( c12 +
c11 * a ))))) / c24;
s2 = ( c24 + a * ( c29 + a * ( c32 + a * ( c33 + c35 * a )))) / c37;
s3 = ( c19 + a * ( c25 + a * ( c28 + c31 * a ))) / c37;
s4 = ( c20 + a * ( c27 + c34 * a) + c * ( c22 + a * ( c30 + c36 * a ))) / c38;
s5 = ( c13 + c21 * a + c * ( c18 + c26 * a )) / c37;
s6 = ( c15 + c * ( c23 + c16 * c )) / c38;
ch = ch + t * ( 1.0 + 0.5 * t * s1 - b * c * ( s1 - b *
( s2 - b * ( s3 - b * ( s4 - b * ( s5 - b * s6 ))))));
if ( e < fabs ( q / ch - 1.0 ) )
{
value = ch;
return value;
}
}
*ifault = 4;
value = ch;
return value;
}
//****************************************************************************80
double ppnd ( double p, int *ifault )
//****************************************************************************80
//
// Purpose:
//
// PPND produces the normal deviate value corresponding to lower tail area = P.
//
// Licensing:
//
// This code is distributed under the GNU LGPL license.
//
// Modified:
//
// 21 January 2008
//
// Author:
//
// Original FORTRAN77 version by J Beasley, S Springer.
// C++ version by John Burkardt.
//
// Reference:
//
// J Beasley, S Springer,
// Algorithm AS 111:
// The Percentage Points of the Normal Distribution,
// Applied Statistics,
// Volume 26, Number 1, 1977, pages 118-121.
//
// Parameters:
//
// Input, double P, the value of the cumulative probability
// densitity function. 0 < P < 1.
//
// Output, integer *IFAULT, error flag.
// 0, no error.
// 1, P <= 0 or P >= 1. PPND is returned as 0.
//
// Output, double PPND, the normal deviate value with the property that
// the probability of a standard normal deviate being less than or
// equal to PPND is P.
//
{
double a0 = 2.50662823884;
double a1 = -18.61500062529;
double a2 = 41.39119773534;
double a3 = -25.44106049637;
double b1 = -8.47351093090;
double b2 = 23.08336743743;
double b3 = -21.06224101826;
double b4 = 3.13082909833;
double c0 = -2.78718931138;
double c1 = -2.29796479134;
double c2 = 4.85014127135;
double c3 = 2.32121276858;
double d1 = 3.54388924762;
double d2 = 1.63706781897;
double r;
double split = 0.42;
double value;
*ifault = 0;
//
// 0.08 < P < 0.92
//
if ( fabs ( p - 0.5 ) <= split )
{
r = ( p - 0.5 ) * ( p - 0.5 );
value = ( p - 0.5 ) * ( ( (
a3 * r
+ a2 ) * r
+ a1 ) * r
+ a0 ) / ( ( ( (
b4 * r
+ b3 ) * r
+ b2 ) * r
+ b1 ) * r
+ 1.0 );
}
//
// P < 0.08 or P > 0.92,
// R = min ( P, 1-P )
//
else if ( 0.0 < p && p < 1.0 )
{
if ( 0.5 < p )
{
r = sqrt ( - log ( 1.0 - p ) );
}
else
{
r = sqrt ( - log ( p ) );
}
value = ( ( (
c3 * r
+ c2 ) * r
+ c1 ) * r
+ c0 ) / ( (
d2 * r
+ d1 ) * r
+ 1.0 );
if ( p < 0.5 )
{
value = - value;
}
}
//
// P <= 0.0 or 1.0 <= P
//
else
{
*ifault = 1;
value = 0.0;
}
return value;
}
//****************************************************************************80
double r8_min ( double x, double y )
//****************************************************************************80
//
// Purpose:
//
// R8_MIN returns the minimum of two R8's.
//
// Licensing:
//
// This code is distributed under the GNU LGPL license.
//
// Modified:
//
// 31 August 2004
//
// Author:
//
// John Burkardt
//
// Parameters:
//
// Input, double X, Y, the quantities to compare.
//
// Output, double R8_MIN, the minimum of X and Y.
//
{
double value;
if ( y < x )
{
value = y;
}
else
{
value = x;
}
return value;
}
//****************************************************************************80
void timestamp ( )
//****************************************************************************80
//
// Purpose:
//
// TIMESTAMP prints the current YMDHMS date as a time stamp.
//
// Example:
//
// 31 May 2001 09:45:54 AM
//
// Licensing:
//
// This code is distributed under the GNU LGPL license.
//
// Modified:
//
// 24 September 2003
//
// Author:
//
// John Burkardt
//
// Parameters:
//
// None
//
{
# define TIME_SIZE 40
static char time_buffer[TIME_SIZE];
const struct tm *tm;
size_t len;
time_t now;
now = time ( NULL );
tm = localtime ( &now );
len = strftime ( time_buffer, TIME_SIZE, "%d %B %Y %I:%M:%S %p", tm );
cout << time_buffer << "\n";
return;
# undef TIME_SIZE
}
| [
"stesinigardi@hotmail.com"
] | stesinigardi@hotmail.com |
0ae5f65e3a4734c394c1e5972a02e0b063ed0794 | 5e41d0c94ddf924cf590ab094803ee91d3f1843d | /src/storage/test/unit/selectorcudatest.h | 3fbc0e06b5afc82891c68381510a397aefda7256 | [
"LicenseRef-scancode-unknown-license-reference",
"BSL-1.0"
] | permissive | sithhell/libgeodecomp | 5e26566588ba560702249f24af7ba8f8ae2148f8 | 20930da73d64b7b366ea1a368c9bc35f1723b6fc | refs/heads/master | 2021-01-18T06:41:45.924539 | 2016-06-13T07:55:11 | 2016-06-13T07:55:11 | 51,578,948 | 0 | 0 | null | 2016-02-12T09:49:27 | 2016-02-12T09:49:27 | null | UTF-8 | C++ | false | false | 5,388 | h | #include <cxxtest/TestSuite.h>
#include <libgeodecomp/config.h>
#ifdef LIBGEODECOMP_WITH_CUDA
#include <cuda.h>
#endif
#ifdef LIBGEODECOMP_WITH_HPX
#include <libgeodecomp/communication/hpxserialization.h>
#endif
#include <libgeodecomp/misc/stdcontaineroverloads.h>
#include <libgeodecomp/misc/testcell.h>
#include <libgeodecomp/storage/cudaarray.h>
#include <libgeodecomp/storage/selector.h>
using namespace LibGeoDecomp;
namespace LibGeoDecomp {
class YetAnotherDummyCell
{
public:
class API :
public APITraits::HasSoA
{};
explicit YetAnotherDummyCell(const double x = 0, const int y = 0, const float z0 = 0, const float z1 = 0, const float z2 = 0) :
x(x),
y(y)
{
z[0] = z0;
z[1] = z1;
z[2] = z2;
}
double x;
int y;
float z[3];
};
}
LIBFLATARRAY_REGISTER_SOA(LibGeoDecomp::YetAnotherDummyCell, ((double)(x))((int)(y))((float)(z)(3)) )
namespace LibGeoDecomp {
class SelectorCUDATest : public CxxTest::TestSuite
{
public:
void testCopyMemberOut()
{
#ifdef LIBGEODECOMP_WITH_CUDA
// it's sufficient to test with one of the two data locations
// being on the device. At this point we only need to know
// that the DefaultCUDA(Array)Filter is being instantiated.
Selector<YetAnotherDummyCell> selectorX(&YetAnotherDummyCell::x, "varX");
Selector<YetAnotherDummyCell> selectorY(&YetAnotherDummyCell::y, "varY");
Selector<YetAnotherDummyCell> selectorZ(&YetAnotherDummyCell::z, "varZ");
std::vector<YetAnotherDummyCell> vec;
for (int i = 0; i < 64; ++i) {
vec << YetAnotherDummyCell(
12.34 + i,
i,
i * 1000 + 55,
i * 1000 + 66,
i * 1000 + 77);
}
std::vector<double> targetX(64 * 1, -1);
std::vector<int> targetY(64 * 1, -1);
std::vector<float> targetZ(64 * 3, -1);
CUDAArray<double> deviceTargetX(&targetX[0], 64 * 1);
CUDAArray<int> deviceTargetY(&targetY[0], 64 * 1);
CUDAArray<float> deviceTargetZ(&targetZ[0], 64 * 3);
selectorX.copyMemberOut(
&vec[0], MemoryLocation::HOST, (char*)deviceTargetX.data(), MemoryLocation::CUDA_DEVICE, 64);
selectorY.copyMemberOut(
&vec[0], MemoryLocation::HOST, (char*)deviceTargetY.data(), MemoryLocation::CUDA_DEVICE, 64);
selectorZ.copyMemberOut(
&vec[0], MemoryLocation::HOST, (char*)deviceTargetZ.data(), MemoryLocation::CUDA_DEVICE, 64);
deviceTargetX.save(&targetX[0]);
deviceTargetY.save(&targetY[0]);
deviceTargetZ.save(&targetZ[0]);
for (int i = 0; i < 64; ++i) {
TS_ASSERT_EQUALS(targetX[i], 12.34 + i);
TS_ASSERT_EQUALS(targetY[i], i);
TS_ASSERT_EQUALS(targetZ[i * 3 + 0], i * 1000 + 55);
TS_ASSERT_EQUALS(targetZ[i * 3 + 1], i * 1000 + 66);
TS_ASSERT_EQUALS(targetZ[i * 3 + 2], i * 1000 + 77);
}
#endif
}
void testCopyMemberIn()
{
#ifdef LIBGEODECOMP_WITH_CUDA
// it's sufficient to test with one of the two data locations
// being on the device. At this point we only need to know
// that the DefaultCUDA(Array)Filter is being instantiated.
Selector<YetAnotherDummyCell> selectorX(&YetAnotherDummyCell::x, "varX");
Selector<YetAnotherDummyCell> selectorY(&YetAnotherDummyCell::y, "varY");
Selector<YetAnotherDummyCell> selectorZ(&YetAnotherDummyCell::z, "varZ");
std::vector<YetAnotherDummyCell> vec(90);
std::vector<double> sourceX;
std::vector<int> sourceY;
std::vector<float> sourceZ;
for (int i = 0; i < 90; ++i) {
sourceX << 56.78 + i;
sourceY << i * 2;
sourceZ << (i * 1000 + 22)
<< (i * 1000 + 33)
<< (i * 1000 + 44);
}
CUDAArray<double> deviceSourceX(&sourceX[0], 90);
CUDAArray<int> deviceSourceY(&sourceY[0], 90);
CUDAArray<float> deviceSourceZ(&sourceZ[0], 90 * 3);
selectorX.copyMemberIn(
(char*)deviceSourceX.data(), MemoryLocation::CUDA_DEVICE, &vec[0], MemoryLocation::HOST, 90);
selectorY.copyMemberIn(
(char*)deviceSourceY.data(), MemoryLocation::CUDA_DEVICE, &vec[0], MemoryLocation::HOST, 90);
selectorZ.copyMemberIn(
(char*)deviceSourceZ.data(), MemoryLocation::CUDA_DEVICE, &vec[0], MemoryLocation::HOST, 90);
for (int i = 0; i < 90; ++i) {
TS_ASSERT_EQUALS(vec[i].x, 56.78 + i);
TS_ASSERT_EQUALS(vec[i].y, i * 2);
TS_ASSERT_EQUALS(vec[i].z[0], i * 1000 + 22);
TS_ASSERT_EQUALS(vec[i].z[1], i * 1000 + 33);
TS_ASSERT_EQUALS(vec[i].z[2], i * 1000 + 44);
}
#endif
}
void testWithTestCell()
{
// this is important to ensure that there are no linker woes
// because of different instantiations of the selector type
// from NVCC and the host compiler, where earch gets a
// different filter (DefaultCUDAFilter vs. DefaultFilter).
Selector<TestCell<2> > selector = MAKE_SELECTOR(TestCell<2>, testValue);
selector.copyMemberIn(
0, MemoryLocation::CUDA_DEVICE, 0, MemoryLocation::CUDA_DEVICE, 0);
}
};
}
| [
"gentryx@gmx.de"
] | gentryx@gmx.de |
3eb0e9014dab8aa8081758a46b3f30a30d509dcb | d0fb46aecc3b69983e7f6244331a81dff42d9595 | /qualitycheck/src/model/DelRuleCategoryRequest.cc | 9d5b29ed0553b515570be4e6e6ca3e4ce9a04591 | [
"Apache-2.0"
] | permissive | aliyun/aliyun-openapi-cpp-sdk | 3d8d051d44ad00753a429817dd03957614c0c66a | e862bd03c844bcb7ccaa90571bceaa2802c7f135 | refs/heads/master | 2023-08-29T11:54:00.525102 | 2023-08-29T03:32:48 | 2023-08-29T03:32:48 | 115,379,460 | 104 | 82 | NOASSERTION | 2023-09-14T06:13:33 | 2017-12-26T02:53:27 | C++ | UTF-8 | C++ | false | false | 1,781 | cc | /*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/qualitycheck/model/DelRuleCategoryRequest.h>
using AlibabaCloud::Qualitycheck::Model::DelRuleCategoryRequest;
DelRuleCategoryRequest::DelRuleCategoryRequest()
: RpcServiceRequest("qualitycheck", "2019-01-15", "DelRuleCategory") {
setMethod(HttpRequest::Method::Post);
}
DelRuleCategoryRequest::~DelRuleCategoryRequest() {}
long DelRuleCategoryRequest::getResourceOwnerId() const {
return resourceOwnerId_;
}
void DelRuleCategoryRequest::setResourceOwnerId(long resourceOwnerId) {
resourceOwnerId_ = resourceOwnerId;
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
}
std::string DelRuleCategoryRequest::getJsonStr() const {
return jsonStr_;
}
void DelRuleCategoryRequest::setJsonStr(const std::string &jsonStr) {
jsonStr_ = jsonStr;
setParameter(std::string("JsonStr"), jsonStr);
}
std::string DelRuleCategoryRequest::getAccessKeyId() const {
return accessKeyId_;
}
void DelRuleCategoryRequest::setAccessKeyId(const std::string &accessKeyId) {
accessKeyId_ = accessKeyId;
setParameter(std::string("AccessKeyId"), accessKeyId);
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
4b2f6cb3bf85a083634eed180f49ef16607b8712 | c9fde4576216a22e8d5711bbe97adda1aafa2f08 | /inference-engine/thirdparty/clDNN/src/softmax_loss_grad.cpp | 4067b5da9f95204076ad9d6c2b310b1675348ed5 | [
"Apache-2.0",
"BSL-1.0"
] | permissive | dliang0406/dldt | c703d6a837de3f996528fc8a9543f9530b23342c | d9b10abcebafe8b10ba81e09e433de7a366c072c | refs/heads/2018 | 2020-04-03T08:24:47.723353 | 2018-10-29T07:58:05 | 2018-10-29T07:58:05 | 155,132,108 | 3 | 1 | Apache-2.0 | 2019-10-10T08:39:46 | 2018-10-29T01:03:54 | C++ | UTF-8 | C++ | false | false | 1,483 | cpp | /*
// Copyright (c) 2018 Intel Corporation
//
// 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 "softmax_loss_grad_inst.h"
#include "primitive_type_base.h"
#include "json_object.h"
namespace cldnn
{
primitive_type_id softmax_loss_grad_type_id()
{
static primitive_type_base<softmax_loss_grad> instance;
return &instance;
}
layout softmax_loss_grad_inst::calc_output_layout(softmax_loss_grad_node const& node)
{
return node.input().get_non_padded_output_layout();
}
std::string softmax_loss_grad_inst::to_string(softmax_loss_grad_node const& node)
{
auto desc = node.get_primitive();
auto node_info = node.desc_to_json();
std::stringstream primitive_description;
node_info.dump(primitive_description);
return primitive_description.str();
}
softmax_loss_grad_inst::typed_primitive_inst(network_impl& network, softmax_loss_grad_node const& node)
: parent(network, node)
{
//TODO: add size check here for labels
}
}
| [
"openvino_pushbot@intel.com"
] | openvino_pushbot@intel.com |
9b888e3e4f234faaa40a01dff4d908b99b4eef2a | 27d55e08cb565f4f48a12014e06682dd932aea61 | /src/Log.h | d2567239141c561704204bed6215077665e00f70 | [] | no_license | 3d0c/tmplib-public | 7fcd2b65eff9bc92fd527d980b812c1f0892514c | 6eac4d459c6009cebaf216c9f93e0325a8101d57 | refs/heads/master | 2016-09-01T16:15:45.365087 | 2016-01-24T11:42:49 | 2016-01-24T11:42:49 | 50,285,044 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 754 | h | #ifndef LOG_H
#define LOG_H
#include <fstream>
#include <iostream>
#include "DFDefinitions.h"
#include "DFPhysicalParams.h"
class Log
{
public:
Log();
virtual ~Log();
void Init(std::ostream *plog);
void Set(Log& log, std::ofstream::openmode _Mode = std::ofstream::out);
void Set(std::ostream *plog, std::ofstream::openmode _Mode = std::ofstream::out);
void Set(const std::string &fn, std::ofstream::openmode _Mode = std::ofstream::out);
void Close();
void operator=(const Log &a);
template<typename T>
Log& operator<<(const T& st)
{
std::cout << st;
return *this;
}
size_t GetMemoryUsage() const;
private:
std::ostream *p_log_out;
bool log_owner;
};
#endif // !LOG_H
| [
"alex.s.contact@gmail.com"
] | alex.s.contact@gmail.com |
35479b1637f51e1447a6ca94648fbb2f28c2c6d9 | 378acf3798d94b2a409152e53ab903368e6bd12f | /UVa Online Judge/volume102/10296 Jogging Trails/program1.cpp | 6d8bf38e0a0d97f3bcb0505d6cf8d5cf3d6e0ad1 | [] | no_license | FingerBlack/Code | aa6fee15a8e8792bb00390a8715fd259b3152c31 | 0f9609a2e9dc532b5283bb04f7ac938a12c69abf | refs/heads/master | 2020-03-22T15:30:56.130224 | 2018-07-09T03:25:22 | 2018-07-09T03:25:22 | 140,258,876 | 1 | 0 | null | 2018-07-09T08:57:56 | 2018-07-09T08:57:56 | null | UTF-8 | C++ | false | false | 1,922 | cpp | // Jogging Trails
// UVa ID: 10296
// Verdict: Accepted
// Submission Date: 2018-04-04
// UVa Run Time: 0.000s
//
// 版权所有(C)2018,邱秋。metaphysis # yeah dot net
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 24, INF = 0x3f3f3f3f;
int dist[MAXN][MAXN], deg[MAXN], dp[1 << 16], n, m;
vector<int> odd;
// DP + Memo.
int dfs(int state)
{
if (!state) return 0;
if (dp[state]) return dp[state];
int cost = INF;
for (int i = 0; i < odd.size(); i++)
{
if ((state >> i) & 1)
{
for (int j = i + 1; j < odd.size(); j++)
{
if ((state >> j) & 1)
{
cost = min(cost, dfs(state - (1 << i) - (1 << j)) + dist[odd[i]][odd[j]]);
}
}
break;
}
}
return dp[state] = cost;
}
int main(int argc, char *argv[])
{
cin.tie(0), cout.tie(0), ios::sync_with_stdio(false);
int u, v, w;
while (cin >> n, n > 0)
{
cin >> m;
memset(dist, 0x3f, sizeof(dist));
for (int i = 1; i <= n; i++)
dist[i][i] = 0;
memset(deg, 0, sizeof(deg));
int cost = 0;
for (int i = 1; i <= m; i++)
{
cin >> u >> v >> w;
dist[u][v] = min(dist[u][v], w);
dist[v][u] = min(dist[v][u], w);
deg[u]++, deg[v]++;
cost += w;
}
odd.clear();
for (int i = 1; i <= n; i++)
if (deg[i] & 1)
odd.push_back(i);
// Floyd-Warshall.
for (int k = 1; k <= n; k++)
for (int i = 1; i <= n; i++)
for (int j = 1; j <= n; j++)
dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j]);
memset(dp, 0, sizeof(dp));
cout << (cost + dfs((1 << odd.size()) - 1)) << '\n';
}
return 0;
}
| [
"metaphysis@yeah.net"
] | metaphysis@yeah.net |
f300f8e0913de74360259ebad2a4384c77a936dd | 82a9911f3f0d051f0cb93578c1a60f81bf1c9468 | /ncm/src/main/jni/_ncm/ncmcrypt.cpp | 53110f831a4728bba0af13d00cda71b108dd0654 | [
"MIT"
] | permissive | colinguozizhong/DroidNCM | 782da5810a475127e385258fbb398a0603ed9ce6 | a8b179dba518ae60d833d2015a79ebf2bff9150e | refs/heads/master | 2020-12-14T22:34:58.443051 | 2019-09-10T07:58:48 | 2019-09-10T07:58:48 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 9,325 | cpp | #include "ncmcrypt.h"
#include "aes.h"
#include "base64.h"
#include "cJSON.h"
#include <mpegfile.h>
#include <flacfile.h>
#include <attachedpictureframe.h>
#include <id3v2tag.h>
#include <tag.h>
#include <stdexcept>
#include <string>
#include "io_bunnyblue_droidncm_dump_NcmDumper.h"
const unsigned char NeteaseCrypt::sCoreKey[17] = {0x68, 0x7A, 0x48, 0x52, 0x41, 0x6D, 0x73, 0x6F, 0x35, 0x6B, 0x49, 0x6E, 0x62, 0x61, 0x78, 0x57, 0};
const unsigned char NeteaseCrypt::sModifyKey[17] = {0x23, 0x31, 0x34, 0x6C, 0x6A, 0x6B, 0x5F, 0x21, 0x5C, 0x5D, 0x26, 0x30, 0x55, 0x3C, 0x27, 0x28, 0};
const unsigned char NeteaseCrypt::mPng[8] = {0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A};
static void aesEcbDecrypt(const unsigned char *key, std::string &src, std::string &dst)
{
int n, i;
unsigned char out[16];
n = src.length() >> 4;
dst.clear();
AES aes(key);
for (i = 0; i < n - 1; i++)
{
aes.decrypt((unsigned char *)src.c_str() + (i << 4), out);
dst += std::string((char *)out, 16);
}
aes.decrypt((unsigned char *)src.c_str() + (i << 4), out);
char pad = out[15];
if (pad > 16)
{
pad = 0;
}
dst += std::string((char *)out, 16 - pad);
}
static void replace(std::string &str, const std::string &from, const std::string &to)
{
if (from.empty())
return;
size_t start_pos = 0;
while ((start_pos = str.find(from, start_pos)) != std::string::npos)
{
str.replace(start_pos, from.length(), to);
start_pos += to.length(); // In case 'to' contains 'from', like replacing 'x' with 'yx'
}
}
static std::string fileNameWithoutExt(const std::string &str)
{
size_t lastPath = str.find_last_of("/\\");
std::string path = str.substr(lastPath + 1);
size_t lastExt = path.find_last_of(".");
return path.substr(0, lastExt);
}
NeteaseMusicMetadata::~NeteaseMusicMetadata()
{
cJSON_Delete(mRaw);
}
NeteaseMusicMetadata::NeteaseMusicMetadata(cJSON *raw)
{
if (!raw)
{
return;
}
cJSON *swap;
int artistLen, i;
mRaw = raw;
swap = cJSON_GetObjectItem(raw, "musicName");
if (swap)
{
mName = std::string(cJSON_GetStringValue(swap));
}
swap = cJSON_GetObjectItem(raw, "album");
if (swap)
{
mAlbum = std::string(cJSON_GetStringValue(swap));
}
swap = cJSON_GetObjectItem(raw, "artist");
if (swap)
{
artistLen = cJSON_GetArraySize(swap);
i = 0;
for (i = 0; i < artistLen - 1; i++)
{
mArtist += std::string(cJSON_GetStringValue(cJSON_GetArrayItem(cJSON_GetArrayItem(swap, i), 0)));
mArtist += "/";
}
mArtist += std::string(cJSON_GetStringValue(cJSON_GetArrayItem(cJSON_GetArrayItem(swap, i), 0)));
}
swap = cJSON_GetObjectItem(raw, "bitrate");
if (swap)
{
mBitrate = swap->valueint;
}
swap = cJSON_GetObjectItem(raw, "duration");
if (swap)
{
mDuration = swap->valueint;
}
swap = cJSON_GetObjectItem(raw, "format");
if (swap)
{
mFormat = std::string(cJSON_GetStringValue(swap));
}
}
bool NeteaseCrypt::openFile(std::string const &path)
{
try
{
mFile.open(path, std::ios::in | std::ios::binary);
}
catch (...)
{
return false;
}
return true;
}
bool NeteaseCrypt::isNcmFile()
{
unsigned int header;
mFile.read(reinterpret_cast<char *>(&header), sizeof(header));
if (header != (unsigned int)0x4e455443)
{
return false;
}
mFile.read(reinterpret_cast<char *>(&header), sizeof(header));
if (header != (unsigned int)0x4d414446)
{
return false;
}
return true;
}
int NeteaseCrypt::read(char *s, std::streamsize n)
{
mFile.read(s, n);
int gcount = mFile.gcount();
if (gcount <= 0)
{
throw std::invalid_argument("can't read file");
}
return gcount;
}
void NeteaseCrypt::buildKeyBox(unsigned char *key, int keyLen)
{
int i;
for (i = 0; i < 256; ++i)
{
mKeyBox[i] = (unsigned char)i;
}
unsigned char swap = 0;
unsigned char c = 0;
unsigned char last_byte = 0;
unsigned char key_offset = 0;
for (i = 0; i < 256; ++i)
{
swap = mKeyBox[i];
c = ((swap + last_byte + key[key_offset++]) & 0xff);
if (key_offset >= keyLen)
key_offset = 0;
mKeyBox[i] = mKeyBox[c];
mKeyBox[c] = swap;
last_byte = c;
}
}
std::string NeteaseCrypt::mimeType(std::string &data)
{
if (memcmp(data.c_str(), mPng, 8) == 0)
{
return std::string("image/png");
}
return std::string("image/jpeg");
}
void NeteaseCrypt::FixMetadata()
{
if (mDumpFilepath.length() <= 0)
{
throw std::invalid_argument("must dump before");
}
TagLib::File *audioFile;
TagLib::Tag *tag;
TagLib::ByteVector vector(mImageData.c_str(), mImageData.length());
if (mFormat == NeteaseCrypt::MP3)
{
audioFile = new TagLib::MPEG::File(mDumpFilepath.c_str());
tag = dynamic_cast<TagLib::MPEG::File *>(audioFile)->ID3v2Tag(true);
if (mImageData.length() > 0)
{
TagLib::ID3v2::AttachedPictureFrame *frame = new TagLib::ID3v2::AttachedPictureFrame;
frame->setMimeType(mimeType(mImageData));
frame->setPicture(vector);
dynamic_cast<TagLib::ID3v2::Tag *>(tag)->addFrame(frame);
}
}
else if (mFormat == NeteaseCrypt::FLAC)
{
audioFile = new TagLib::FLAC::File(mDumpFilepath.c_str());
tag = audioFile->tag();
if (mImageData.length() > 0)
{
TagLib::FLAC::Picture *cover = new TagLib::FLAC::Picture;
cover->setMimeType(mimeType(mImageData));
cover->setType(TagLib::FLAC::Picture::FrontCover);
cover->setData(vector);
dynamic_cast<TagLib::FLAC::File *>(audioFile)->addPicture(cover);
}
}
if (mMetaData != NULL)
{
tag->setTitle(TagLib::String(mMetaData->name(), TagLib::String::UTF8));
tag->setArtist(TagLib::String(mMetaData->artist(), TagLib::String::UTF8));
tag->setAlbum(TagLib::String(mMetaData->album(), TagLib::String::UTF8));
}
tag->setComment(TagLib::String("Create by netease copyright protected dump tool. author 5L", TagLib::String::UTF8));
bool status=audioFile->save();
if (!status)
{
LOGE("save file failure");
}
}
void filterAllCase(std::string &str)
{
replace(str, "\\", "\");
replace(str, "/", "");
replace(str, "?", "?");
replace(str, ":", ":");
replace(str, "*", "*");
replace(str, "\"", "");
replace(str, "<", "<");
replace(str, ">", ">");
replace(str, "|", "|");
}
void NeteaseCrypt::Dump()
{
int n, i;
char targetPath[1024] = {'\0'};
std::string metaName = std::string(mMetaData->name().c_str());
std::string albumName = std::string(mMetaData->album().c_str());
std::string artist = std::string(mMetaData->artist());
filterAllCase(metaName);
filterAllCase(albumName);
filterAllCase(artist);
sprintf(targetPath, "/sdcard/Music/%s-%s", artist.c_str(), metaName.c_str());
mDumpFilepath = std::string(targetPath);
n = 0x8000;
i = 0;
unsigned char buffer[n];
std::ofstream output;
while (!mFile.eof())
{
n = read((char *)buffer, n);
for (i = 0; i < n; i++)
{
int j = (i + 1) & 0xff;
buffer[i] ^= mKeyBox[(mKeyBox[j] + mKeyBox[(mKeyBox[j] + j) & 0xff]) & 0xff];
}
if (!output.is_open())
{
// identify format
// ID3 format mp3
if (buffer[0] == 0x49 && buffer[1] == 0x44 && buffer[2] == 0x33)
{
mDumpFilepath += ".mp3";
mFormat = NeteaseCrypt::MP3;
}
else
{
mDumpFilepath += ".flac";
mFormat = NeteaseCrypt::FLAC;
}
output.open(mDumpFilepath, output.out | output.binary);
}
output.write((char *)buffer, n);
}
output.flush();
output.close();
}
NeteaseCrypt::~NeteaseCrypt()
{
if (mMetaData != NULL)
{
delete mMetaData;
}
mFile.close();
}
NeteaseCrypt::NeteaseCrypt(std::string const &path)
{
if (!openFile(path))
{
throw std::invalid_argument("can't open file");
}
if (!isNcmFile())
{
throw std::invalid_argument("not netease protected file");
}
if (!mFile.seekg(2, mFile.cur))
{
throw std::invalid_argument("can't seek file");
}
mFilepath = path;
int i;
unsigned int n;
read(reinterpret_cast<char *>(&n), sizeof(n));
if (n <= 0)
{
throw std::invalid_argument("broken ncm file");
}
char keydata[n];
read(keydata, n);
for (i = 0; i < n; i++)
{
keydata[i] ^= 0x64;
}
std::string rawKeyData(keydata, n);
std::string mKeyData;
aesEcbDecrypt(sCoreKey, rawKeyData, mKeyData);
buildKeyBox((unsigned char *)mKeyData.c_str() + 17, mKeyData.length() - 17);
read(reinterpret_cast<char *>(&n), sizeof(n));
if (n <= 0)
{
printf("[Warn] `%s` missing metadata infomation can't fix some infomation!\n", path.c_str());
mMetaData = NULL;
}
else
{
char modifyData[n];
read(modifyData, n);
for (i = 0; i < n; i++)
{
modifyData[i] ^= 0x63;
}
std::string swapModifyData;
std::string modifyOutData;
std::string modifyDecryptData;
swapModifyData = std::string(modifyData + 22, n - 22);
// escape `163 key(Don't modify):`
Base64::Decode(swapModifyData, modifyOutData);
aesEcbDecrypt(sModifyKey, modifyOutData, modifyDecryptData);
// escape `music:`
modifyDecryptData = std::string(modifyDecryptData.begin() + 6, modifyDecryptData.end());
// std::cout << modifyDecryptData << std::endl;
mMetaData = new NeteaseMusicMetadata(cJSON_Parse(modifyDecryptData.c_str()));
}
// skip crc32 & unuse charset
if (!mFile.seekg(9, mFile.cur))
{
throw std::invalid_argument("can't seek file");
}
read(reinterpret_cast<char *>(&n), sizeof(n));
if (n > 0)
{
char *imageData = (char *)malloc(n);
read(imageData, n);
mImageData = std::string(imageData, n);
}
else
{
printf("[Warn] `%s` missing album can't fix album image!\n", path.c_str());
}
}
| [
"bunnyblue.air+github@gmail.com"
] | bunnyblue.air+github@gmail.com |
1594cf59a38c0d4ad5603a5da06970bec83851d5 | a7118756ba921769ca46b40f433b4b784c36ca90 | /src/triangle-rasterizer-demo/src/trdInvalidFileException.hpp | d111abfe45d3aa514e94d157a72b7b0dece32f21 | [
"MIT"
] | permissive | frmr/triangle-rasterizer-demo | c5e4351db4036ac37c8e2850ae535f97b96dda11 | 963f32435ebae5b7fbe6fa212709bdc3ea66ac36 | refs/heads/master | 2021-11-16T12:28:52.086914 | 2021-10-14T12:31:04 | 2021-10-14T12:31:04 | 196,263,548 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 261 | hpp | #pragma once
#include <stdexcept>
#include "tfString.hpp"
namespace trd
{
class InvalidFileException : public std::runtime_error
{
public:
InvalidFileException(const tf::String& what) :
std::runtime_error("InvalidFileException: " + what)
{
}
};
} | [
"tfarmer@hamamatsu.co.uk"
] | tfarmer@hamamatsu.co.uk |
2823227dcbb15b5c5ebb8d89dd3bd2cea0d8e325 | 107b558561055314d9d40010e9c748888bffc3d8 | /multievent/interface/DigestSHA.h | c79c4efd2991d159c3f08b4b07647a33009e976c | [] | no_license | dq5070410/multievent | 44b2b228bbd86cde118769554584a2b7c1a654cb | 2006427c03202b68c0587494d87ec38bfc3c6824 | refs/heads/master | 2020-06-18T11:21:38.424426 | 2017-05-26T07:27:03 | 2017-05-26T07:27:03 | 75,140,434 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,742 | h | /** @file DigestSHA.h
*
* @note History
* @par 04/23/2016 Created
*/
#ifndef __ME_DIGEST_SHA_H_
#define __ME_DIGEST_SHA_H_
#include "Base.h"
#include "MessageBlock.h"
// openssl struct declaration
typedef struct env_md_st EVP_MD;
typedef struct env_md_ctx_st EVP_MD_CTX;
typedef struct hmac_ctx_st HMAC_CTX;
ME_NAME_SPACE_CRYPTO_BEGIN
class ME_OS_EXPORT CMEDigestSHA
{
public:
enum MODE_TYPE
{
MODE_TYPE_SHA1 = 100,
MODE_TYPE_SHA224,
MODE_TYPE_SHA256,
MODE_TYPE_SHA384,
MODE_TYPE_SHA512,
};
public:
CMEDigestSHA();
~CMEDigestSHA();
public:
ME_Result Digest(
CMEMessageBlockAutoPtr& pmbBlockAutoPtrIn,
CMEMessageBlockAutoPtr& pmbBlockAutoPtrOut,
DWORD dwMode = MODE_TYPE_SHA1,
const char* pKey = NULL,
INT iKeyLen = 0 );
ME_Result SetOption(
DWORD dwOptionType,
void* pOptionValue );
ME_Result GetOption(
DWORD dwOptionType,
void*& pOptionValue );
private:
ME_Result Digest(
CMEMessageBlockAutoPtr& pmbBlockAutoPtrIn,
CMEMessageBlockAutoPtr& pmbBlockAutoPtrOut,
const EVP_MD* pDigest );
ME_Result HMAC(
CMEMessageBlockAutoPtr& pmbBlockAutoPtrIn,
CMEMessageBlockAutoPtr& pmbBlockAutoPtrOut,
const EVP_MD* pDigest,
const char* pKey,
INT iKeyLen );
ME_Result GetDigest(
DWORD dwMode,
const EVP_MD*& pDigest );
private:
EVP_MD_CTX* m_pDigestCTX;
HMAC_CTX* m_pmacCTX;
};
ME_NAME_SPACE_CRYPTO_END
#endif // __DIGEST_SHA_H_
| [
"dq5070410@126.com"
] | dq5070410@126.com |
f73f104182c06215b4d0dad0ae2749d45b2fe9cb | 4c7be5622feb957f7ada6b31176398746ce0acc9 | /Communication/CC1101/CC1101_RX/CC1101_RX.ino | 2b4c916078563ce07c77e47af272bfaf80ef1ccb | [] | no_license | DPalmz/WeatherStation | dd9b5d5d5a0ebacd751dfe08a9bd4351e431f776 | d15ea6462c18c88d106f7e42bde896a46e36b2ca | refs/heads/master | 2022-06-30T18:55:18.786660 | 2022-05-27T01:09:54 | 2022-05-27T01:09:54 | 229,622,280 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,343 | ino | // cc110_server.pde
// -*- mode: C++ -*-
// Example sketch showing how to create a simple messageing server
// with the RH_CC110 class. RH_CC110 class does not provide for addressing or
// reliability, so you should only use RH_CC110 if you do not need the higher
// level messaging abilities.
// It is designed to work with the other example cc110_client
// Tested with Teensy 3.1 and Anaren 430BOOST-CC110L
#include <SPI.h>
#include <RH_CC110.h>
// Singleton instance of the radio driver
RH_CC110 cc110;
void setup()
{
Serial.begin(9600);
while (!Serial)
; // wait for serial port to connect. Needed for native USB
// CC110L may be equipped with either 26 or 27MHz crystals. You MUST
// tell the driver if a 27MHz crystal is installed for the correct configuration to
// occur. Failure to correctly set this flag will cause incorrect frequency and modulation
// characteristics to be used. You can call this function, or pass it to the constructor
cc110.setIs27MHz(false); // Anaren 430BOOST-CC110L Air BoosterPack test boards have 27MHz
if (!cc110.init())
Serial.println("init failed");
// After init(), the following default values apply:
// TxPower: TransmitPower5dBm
// Frequency: 915.0
// Modulation: GFSK_Rb1_2Fd5_2 (GFSK, Data Rate: 1.2kBaud, Dev: 5.2kHz, RX BW 58kHz, optimised for sensitivity)
// Sync Words: 0xd3, 0x91
// But you can change them:
// cc110.setTxPower(RH_CC110::TransmitPowerM30dBm);
// cc110.setModemConfig(RH_CC110::GFSK_Rb250Fd127);
cc110.setFrequency(430.0);
}
int count = 0;
int sCount = 0;
void loop()
{
if (cc110.available())
{
// Should be a message for us now
uint8_t buf[RH_CC110_MAX_MESSAGE_LEN];
uint8_t len = sizeof(buf);
if (cc110.recv(buf, &len))
{
// RH_CC110::printBuffer("request: ", buf, len);
//Serial.print("got request: ");
Serial.println((char*)buf);
// Serial.print("RSSI: ");
// Serial.println(cc110.lastRssi(), DEC);
// Send a reply
uint8_t data[] = "And hello back to you";
cc110.send(data, sizeof(data));
cc110.waitPacketSent();
count++;
//Serial.println("Sent a reply");
Serial.println(count);
}
else
{
Serial.println("recv failed");
}
if (count == 0){
sCount++;
Serial.println(sCount);
}
}
}
| [
"ditypa@gmail.com"
] | ditypa@gmail.com |
e7e1db88698fe909335edc9bd70b1aebb4c85d87 | caef7bee05f52d15dfbe267eaf9fc212dabe1504 | /inc/foreground.h | 25f753ea105a5b6b3fc550ca6252175288c37bcc | [] | no_license | jkhaynes/BasicShell | 59886033b7a16415a47a1b527f7d74c5c9d502fd | f8d5c496190181f2d293a35a08deba5d411ac36f | refs/heads/master | 2021-01-10T09:48:50.257712 | 2015-11-12T20:12:37 | 2015-11-12T20:12:37 | 46,077,366 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 552 | h | #ifndef __FOREGROUND_H__
#define __FOREGROUND_H__
//SYSTEM INCLUDES
#include <unistd.h>
#include <iostream>
#include <stdlib.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
using namespace std;
/**
A foreground job should be executed as follows:
1. Create a new process using fork
2. Replace the image of the created process with the desired command using execlp or
execvp.
3. Wait for the process to terminate using waitpid.
**/
void foreground(char *stringList[], char *oFile);
#endif //__FOREGROUND_H__ | [
"jkhaynes@iastate.edu"
] | jkhaynes@iastate.edu |
459194b38f2903d073c58cb0fa910e715771008c | 30c677ff3432c5220dfdbf30e068528099885a55 | /core/Window.h | 45bfbcf41fe2099748287f6f1f837b092798e473 | [] | no_license | zeluisping/hyphus | 9eb59730f3b8ff9e85eab3406aff863ac13f35ea | 1025dc49b205140313d740a76ea1ae06b2de0038 | refs/heads/master | 2021-06-03T16:01:46.320707 | 2016-09-11T14:14:00 | 2016-09-11T14:14:00 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,394 | h | //
// Created by 100GPing100 on 03/09/2016.
//
#ifndef HYPHUS_WINDOW_H
#define HYPHUS_WINDOW_H
// std
#include <string>
#include <stdexcept>
// sdl2
#include <SDL2/SDL.h>
namespace hyphus {
enum class WindowFlags : uint32_t {
None = 0,
Fullscreen = SDL_WINDOW_FULLSCREEN,
FullscreenDesktop = SDL_WINDOW_FULLSCREEN_DESKTOP,
OpenGL = SDL_WINDOW_OPENGL,
Shown = SDL_WINDOW_SHOWN,
Hidden = SDL_WINDOW_HIDDEN,
Borderless = SDL_WINDOW_BORDERLESS,
Resizable = SDL_WINDOW_RESIZABLE,
Minimized = SDL_WINDOW_MINIMIZED,
Maximized = SDL_WINDOW_MAXIMIZED,
InputGrabbed = SDL_WINDOW_INPUT_GRABBED,
InputFocus = SDL_WINDOW_INPUT_FOCUS,
MouseFocus = SDL_WINDOW_MOUSE_FOCUS,
Foreign = SDL_WINDOW_FOREIGN,
AllowHighDPI = SDL_WINDOW_ALLOW_HIGHDPI,
MouseCapture = SDL_WINDOW_MOUSE_CAPTURE,
};
class Window {
public:
static constexpr const uint32_t PositionCentered = SDL_WINDOWPOS_CENTERED;
static constexpr const uint32_t PositionUndefined = SDL_WINDOWPOS_UNDEFINED;
public:
SDL_Window * handle() const {
return _handle;
}
WindowFlags getFlags() const {
return static_cast<WindowFlags>(SDL_GetWindowFlags(_handle));
}
Window() = delete; // no default
Window(const Window &) = delete; // no copy
Window & operator=(const Window &&) = delete; // no move
Window(SDL_Window * handle);
Window(const std::string & title, const int x, const int y, const int width, const int height, const WindowFlags flags);
Window(const std::string & title, const int width, const int height, const WindowFlags flags);
virtual ~Window() noexcept;
private:
SDL_Window * _handle;
};
}
inline hyphus::WindowFlags operator |(const hyphus::WindowFlags & a, const hyphus::WindowFlags & b) {
return static_cast<hyphus::WindowFlags>(static_cast<uint32_t>(a) | static_cast<uint32_t>(b));
}
inline hyphus::WindowFlags operator &(const hyphus::WindowFlags & a, const hyphus::WindowFlags & b) {
return static_cast<hyphus::WindowFlags>(static_cast<uint32_t>(a) & static_cast<uint32_t>(b));
}
inline bool operator %(const hyphus::WindowFlags & a, const hyphus::WindowFlags & b) {
return (a & b) == b;
}
#endif //HYPHUS_WINDOW_H
| [
"zeluis.100@gmail.com"
] | zeluis.100@gmail.com |
52c2baeed7befc81a99b4e2a77e25d3a05b4a937 | 0a5645154953b0a09d3f78753a1711aaa76928ff | /common/c/nbgm/nbgmmain/include/private/nbgmdraworder.h | cc77e66e52be430d4d41171d24d8f23b554884c9 | [] | no_license | GENIVI/navigation-next | 3a6f26063350ac8862b4d0e2e9d3522f6f249328 | cb8f7ec5ec4c78ef57aa573315b75960b2a5dd36 | refs/heads/master | 2023-08-04T17:44:45.239062 | 2023-07-25T19:22:19 | 2023-07-25T19:22:19 | 116,230,587 | 17 | 11 | null | 2018-05-18T20:00:38 | 2018-01-04T07:43:22 | C++ | UTF-8 | C++ | false | false | 3,357 | h | /*
Copyright (c) 2018, TeleCommunication Systems, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the TeleCommunication Systems, Inc., nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
DISCLAIMED. IN NO EVENT SHALL TELECOMMUNICATION SYSTEMS, INC.BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*!--------------------------------------------------------------------------
@file nbgmdraworder.h
*/
/*
(C) Copyright 2010 by Networks In Motion, Inc.
The information contained herein is confidential, proprietary
to Networks In Motion, Inc., and considered a trade secret as
defined in section 499C of the penal code of the State of
California. Use of this information by anyone other than
authorized employees of Networks In Motion is granted only
under a written non-disclosure agreement, expressly
prescribing the scope and manner of such use.
---------------------------------------------------------------------------*/
#ifndef _NBGM_DRAWORDER_H_
#define _NBGM_DRAWORDER_H_
#include "nbrecolor.h"
#include "palmath.h"
#include "nbremath.h"
#include "nbgm.h"
class DrawOrderStruct
{
public:
DrawOrderStruct(uint8 mainDrawOrder, int32 subDrawOrder, int32 layer):
mainDrawOrder(mainDrawOrder), subDrawOrder(subDrawOrder), layer(layer)
{
}
bool operator < (const DrawOrderStruct& drawOrder) const
{
return (mainDrawOrder < drawOrder.mainDrawOrder)
||((mainDrawOrder == drawOrder.mainDrawOrder) && (subDrawOrder < drawOrder.subDrawOrder))
||((mainDrawOrder == drawOrder.mainDrawOrder) && (subDrawOrder == drawOrder.subDrawOrder) && (layer < drawOrder.layer));
}
bool operator > (const DrawOrderStruct& drawOrder) const
{
return drawOrder < *this;
}
bool operator != (const DrawOrderStruct& drawOrder) const
{
return (*this < drawOrder)||(*this > drawOrder);
}
bool operator == (const DrawOrderStruct& drawOrder) const
{
return !(*this != drawOrder);
}
uint8 mainDrawOrder;
int32 subDrawOrder;
int32 layer;
};
#endif
| [
"caavula@telecomsys.com"
] | caavula@telecomsys.com |
cc4989ea55127da0e4e03d2bb6e278d95d08a6dd | 7a4640a884d513dc60e66617802e95be9fe9b3f5 | /Unity/Temp/il2cppOutput/il2cppOutput/mscorlib_System_MonoEnumInfo_IntComparer2078450972.h | 5d353e86b274e9199fb7eeccf0b6f2aa3e779674 | [] | no_license | eray-z/Game-Engine-Benchmarks | 40e455c9eb04463fef1c9d11fdea80ecad4a6404 | 2b427d02a801a2c2c4fb496601a458634e646c8d | refs/heads/master | 2020-12-25T14:13:36.908703 | 2016-06-03T16:05:24 | 2016-06-03T16:05:24 | 60,355,376 | 5 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 514 | h | #pragma once
#include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <stdint.h>
#include "mscorlib_System_Object837106420.h"
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.MonoEnumInfo/IntComparer
struct IntComparer_t2078450972 : public Il2CppObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
| [
"erayzesen@gmail.com"
] | erayzesen@gmail.com |
3672687d7d00602799db2525932dedce983f7e92 | ccb6d2726b7522af43004875e2e233bc1088774a | /carma/monitor/C3gMax8PipelineSubsystemExt.h | 9bbab012eb5a6efdf3969c945146cd8f7abd0de0 | [
"FSFUL"
] | permissive | mpound/carma | a9ab28ed45b3114972d3f72bcc522c0010e80b42 | 9e317271eec071c1a53dca8b11af31320f69417b | refs/heads/master | 2020-06-01T11:43:47.397953 | 2019-06-07T15:05:57 | 2019-06-07T15:05:57 | 190,763,870 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,133 | h |
#ifndef CARMA_MONITOR_C3GMAX8PIPELINESUBSYSTEMEXT_H
#define CARMA_MONITOR_C3GMAX8PIPELINESUBSYSTEMEXT_H
/**
* @file
*
* Semi-hand-forged extensions to the auto-generated classes for the
* C3gPipeline subsystem. This file was originally
* created by mpml2cpp but then modified manually by the author.
*
* @author: Marc pound
*
* $CarmaCopyright$
*
*/
#include "carma/monitor/C3gMax8PipelineSubsystem.h"
namespace carma {
namespace monitor {
/**
* @brief The monitor system for the C3gMax8Pipeline subsystem
*
*
* This extends the functionality of the auto-generated class,
* C3gMax8PipelineSubsystemBase.
*/
class C3gMax8PipelineSubsystem : public C3gMax8PipelineSubsystemBase
{
public:
/**
* Constructor
* @param buffer pointer to system frame storage; NULL
* within subsystem
*/
C3gMax8PipelineSubsystem(SystemFrameBuffer * const buffer = NULL);
/**
* Destructor
*/
virtual ~C3gMax8PipelineSubsystem();
// add new or overriding method declarations here
};
}}
#endif // CARMA_MONITOR_C3GMAX8PIPELINESUBSYSTEMEXT_H
| [
"22331890+mpound@users.noreply.github.com"
] | 22331890+mpound@users.noreply.github.com |
c9cbcb9077738d8cb83a86faab6071e45d9e3bd9 | db5bba94cf3eae6f1a16b1e780aa36f4b8c3c2da | /emr/include/alibabacloud/emr/model/RefreshClusterResourcePoolForAdminRequest.h | b2932e814ef5ad28286e974a06dcb98a50a52661 | [
"Apache-2.0"
] | permissive | chaomengnan/aliyun-openapi-cpp-sdk | 42eb87a6119c25fd2d2d070a757b614a5526357e | bb7d12ae9db27f2d1b3ba7736549924ec8d9ef85 | refs/heads/master | 2020-07-25T00:15:29.526225 | 2019-09-12T15:34:29 | 2019-09-12T15:34:29 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,995 | h | /*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_EMR_MODEL_REFRESHCLUSTERRESOURCEPOOLFORADMINREQUEST_H_
#define ALIBABACLOUD_EMR_MODEL_REFRESHCLUSTERRESOURCEPOOLFORADMINREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/emr/EmrExport.h>
namespace AlibabaCloud
{
namespace Emr
{
namespace Model
{
class ALIBABACLOUD_EMR_EXPORT RefreshClusterResourcePoolForAdminRequest : public RpcServiceRequest
{
public:
RefreshClusterResourcePoolForAdminRequest();
~RefreshClusterResourcePoolForAdminRequest();
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
long getResourcePoolId()const;
void setResourcePoolId(long resourcePoolId);
std::string getClusterId()const;
void setClusterId(const std::string& clusterId);
std::string getUserId()const;
void setUserId(const std::string& userId);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
private:
long resourceOwnerId_;
std::string regionId_;
long resourcePoolId_;
std::string clusterId_;
std::string userId_;
std::string accessKeyId_;
};
}
}
}
#endif // !ALIBABACLOUD_EMR_MODEL_REFRESHCLUSTERRESOURCEPOOLFORADMINREQUEST_H_ | [
"noreply@github.com"
] | chaomengnan.noreply@github.com |
f505fd35e473410a22a39968300b37899b828281 | ba6c8c70541a7aacdd4cc2573776dbed9ea0d8f1 | /catkin_ws/devel/.private/bebop_msgs/include/bebop_msgs/Ardrone3PilotingStateNavigateHomeStateChanged.h | 7e7324f8b06a1feb885d686b6b20817ac6808a39 | [] | no_license | hotaro161/190703_catkin_ws | 74a62fa29a0f940a930df4c023f36f01f30b23f7 | 711c2665121e7452a2575c75058a037b479f4596 | refs/heads/master | 2020-06-14T09:03:15.900063 | 2019-10-10T07:29:05 | 2019-10-10T07:29:05 | 194,964,971 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 9,131 | h | // Generated by gencpp from file bebop_msgs/Ardrone3PilotingStateNavigateHomeStateChanged.msg
// DO NOT EDIT!
#ifndef BEBOP_MSGS_MESSAGE_ARDRONE3PILOTINGSTATENAVIGATEHOMESTATECHANGED_H
#define BEBOP_MSGS_MESSAGE_ARDRONE3PILOTINGSTATENAVIGATEHOMESTATECHANGED_H
#include <string>
#include <vector>
#include <map>
#include <ros/types.h>
#include <ros/serialization.h>
#include <ros/builtin_message_traits.h>
#include <ros/message_operations.h>
#include <std_msgs/Header.h>
namespace bebop_msgs
{
template <class ContainerAllocator>
struct Ardrone3PilotingStateNavigateHomeStateChanged_
{
typedef Ardrone3PilotingStateNavigateHomeStateChanged_<ContainerAllocator> Type;
Ardrone3PilotingStateNavigateHomeStateChanged_()
: header()
, state(0)
, reason(0) {
}
Ardrone3PilotingStateNavigateHomeStateChanged_(const ContainerAllocator& _alloc)
: header(_alloc)
, state(0)
, reason(0) {
(void)_alloc;
}
typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
_header_type header;
typedef uint8_t _state_type;
_state_type state;
typedef uint8_t _reason_type;
_reason_type reason;
enum {
state_available = 0u,
state_inProgress = 1u,
state_unavailable = 2u,
state_pending = 3u,
reason_userRequest = 0u,
reason_connectionLost = 1u,
reason_lowBattery = 2u,
reason_finished = 3u,
reason_stopped = 4u,
reason_disabled = 5u,
reason_enabled = 6u,
};
typedef boost::shared_ptr< ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged_<ContainerAllocator> const> ConstPtr;
}; // struct Ardrone3PilotingStateNavigateHomeStateChanged_
typedef ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged_<std::allocator<void> > Ardrone3PilotingStateNavigateHomeStateChanged;
typedef boost::shared_ptr< ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged > Ardrone3PilotingStateNavigateHomeStateChangedPtr;
typedef boost::shared_ptr< ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged const> Ardrone3PilotingStateNavigateHomeStateChangedConstPtr;
// constants requiring out of line definition
template<typename ContainerAllocator>
std::ostream& operator<<(std::ostream& s, const ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged_<ContainerAllocator> & v)
{
ros::message_operations::Printer< ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged_<ContainerAllocator> >::stream(s, "", v);
return s;
}
} // namespace bebop_msgs
namespace ros
{
namespace message_traits
{
// BOOLTRAITS {'IsFixedSize': False, 'IsMessage': True, 'HasHeader': True}
// {'std_msgs': ['/opt/ros/kinetic/share/std_msgs/cmake/../msg'], 'bebop_msgs': ['/home/mlab/catkin_ws/src/bebop_autonomy/bebop_msgs/msg']}
// !!!!!!!!!!! ['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_parsed_fields', 'constants', 'fields', 'full_name', 'has_header', 'header_present', 'names', 'package', 'parsed_fields', 'short_name', 'text', 'types']
template <class ContainerAllocator>
struct IsFixedSize< ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged_<ContainerAllocator> >
: FalseType
{ };
template <class ContainerAllocator>
struct IsFixedSize< ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged_<ContainerAllocator> const>
: FalseType
{ };
template <class ContainerAllocator>
struct IsMessage< ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged_<ContainerAllocator> >
: TrueType
{ };
template <class ContainerAllocator>
struct IsMessage< ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged_<ContainerAllocator> const>
: TrueType
{ };
template <class ContainerAllocator>
struct HasHeader< ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged_<ContainerAllocator> >
: TrueType
{ };
template <class ContainerAllocator>
struct HasHeader< ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged_<ContainerAllocator> const>
: TrueType
{ };
template<class ContainerAllocator>
struct MD5Sum< ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged_<ContainerAllocator> >
{
static const char* value()
{
return "a0ed1aa9e290b08479307e09890d8141";
}
static const char* value(const ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged_<ContainerAllocator>&) { return value(); }
static const uint64_t static_value1 = 0xa0ed1aa9e290b084ULL;
static const uint64_t static_value2 = 0x79307e09890d8141ULL;
};
template<class ContainerAllocator>
struct DataType< ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged_<ContainerAllocator> >
{
static const char* value()
{
return "bebop_msgs/Ardrone3PilotingStateNavigateHomeStateChanged";
}
static const char* value(const ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged_<ContainerAllocator>&) { return value(); }
};
template<class ContainerAllocator>
struct Definition< ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged_<ContainerAllocator> >
{
static const char* value()
{
return "# Ardrone3PilotingStateNavigateHomeStateChanged\n\
# auto-generated from up stream XML files at\n\
# github.com/Parrot-Developers/libARCommands/tree/master/Xml\n\
# To check upstream commit hash, refer to last_build_info file\n\
# Do not modify this file by hand. Check scripts/meta folder for generator files.\n\
#\n\
# SDK Comment: Return home state.\\n Availability is related to gps fix, magnetometer calibration.\n\
\n\
Header header\n\
\n\
# State of navigate home\n\
uint8 state_available=0 # Navigate home is available\n\
uint8 state_inProgress=1 # Navigate home is in progress\n\
uint8 state_unavailable=2 # Navigate home is not available\n\
uint8 state_pending=3 # Navigate home has been received, but its process is pending\n\
uint8 state\n\
# Reason of the state\n\
uint8 reason_userRequest=0 # User requested a navigate home (available->inProgress)\n\
uint8 reason_connectionLost=1 # Connection between controller and product lost (available->inProgress)\n\
uint8 reason_lowBattery=2 # Low battery occurred (available->inProgress)\n\
uint8 reason_finished=3 # Navigate home is finished (inProgress->available)\n\
uint8 reason_stopped=4 # Navigate home has been stopped (inProgress->available)\n\
uint8 reason_disabled=5 # Navigate home disabled by product (inProgress->unavailable or available->unavailable)\n\
uint8 reason_enabled=6 # Navigate home enabled by product (unavailable->available)\n\
uint8 reason\n\
\n\
================================================================================\n\
MSG: std_msgs/Header\n\
# Standard metadata for higher-level stamped data types.\n\
# This is generally used to communicate timestamped data \n\
# in a particular coordinate frame.\n\
# \n\
# sequence ID: consecutively increasing ID \n\
uint32 seq\n\
#Two-integer timestamp that is expressed as:\n\
# * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')\n\
# * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')\n\
# time-handling sugar is provided by the client library\n\
time stamp\n\
#Frame this data is associated with\n\
# 0: no frame\n\
# 1: global frame\n\
string frame_id\n\
";
}
static const char* value(const ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged_<ContainerAllocator>&) { return value(); }
};
} // namespace message_traits
} // namespace ros
namespace ros
{
namespace serialization
{
template<class ContainerAllocator> struct Serializer< ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged_<ContainerAllocator> >
{
template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
{
stream.next(m.header);
stream.next(m.state);
stream.next(m.reason);
}
ROS_DECLARE_ALLINONE_SERIALIZER
}; // struct Ardrone3PilotingStateNavigateHomeStateChanged_
} // namespace serialization
} // namespace ros
namespace ros
{
namespace message_operations
{
template<class ContainerAllocator>
struct Printer< ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged_<ContainerAllocator> >
{
template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::bebop_msgs::Ardrone3PilotingStateNavigateHomeStateChanged_<ContainerAllocator>& v)
{
s << indent << "header: ";
s << std::endl;
Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
s << indent << "state: ";
Printer<uint8_t>::stream(s, indent + " ", v.state);
s << indent << "reason: ";
Printer<uint8_t>::stream(s, indent + " ", v.reason);
}
};
} // namespace message_operations
} // namespace ros
#endif // BEBOP_MSGS_MESSAGE_ARDRONE3PILOTINGSTATENAVIGATEHOMESTATECHANGED_H
| [
"mlab@mlab-System-Product-Name"
] | mlab@mlab-System-Product-Name |
ef1f00f5b99fb45a295d2b945414e0c6d4ed70a8 | 3a68b2d9b028cf7b8a0ddd0635c87e22743880ce | /a67-pauladam2001/entity/trenchCoat.cpp | 63ef00ac1275951c2b8e62a0daaf10562ec24418 | [] | no_license | pauladam2001/Sem2_ObjectOrientedProgramming | 527be32f0daecc8215f939d2fb2ef906555102f1 | fc3ff465018cf4004ea5af70b2e880043d55a3db | refs/heads/main | 2023-08-13T18:03:49.998731 | 2021-10-18T08:55:11 | 2021-10-18T08:55:11 | 390,777,948 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,036 | cpp | //
// Created by paul on 3/20/2021.
//
#include "trenchCoat.h"
#include <string>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <vector>
#include <sstream>
trenchCoat::trenchCoat() = default;
trenchCoat::trenchCoat(const string& size, const string& color, int price, int quantity, const string& photograph):size{size}, color{color}, price{price}, quantity{quantity}, photograph{photograph} {
}
string trenchCoat::getSize() const {
return this->size;
}
string trenchCoat::getColor() const {
return this->color;
}
int trenchCoat::getPrice() const {
return this->price;
}
int trenchCoat::getQuantity() const {
return this->quantity;
}
string trenchCoat::getPhotograph() const {
return this->photograph;
}
//void trenchCoat::setPrice(int value) {
// this->price = value;
//}
//
//void trenchCoat::setQuantity(int value) {
// this->quantity = value;
//}
void trenchCoat::to_string(char stringParam[]) { //OR with stringstream
sprintf(stringParam, "Size:%s, Color:%s, Price:%d, Quantity:%d, Photograph:%s", this->size.c_str(), this->color.c_str(), this->price, this->quantity, this->photograph.c_str());
// OR with stringstream
// stringstream buffer;
// buffer << setw(20) << left << this->size << "| " << setw(20) << left << this->color << "| " << setw(20) << right << this->price << this->quantity << this->photograph;
// return buffer.str();
}
trenchCoat::trenchCoat(const trenchCoat &c):size{c.size}, color{c.color}, price{c.price}, quantity{c.quantity}, photograph{c.photograph} {
}
trenchCoat &trenchCoat::operator=(const trenchCoat &c) { //OR without nothing in function and = default; (see warning)
this->size = c.size;
this->color = c.color;
this->price = c.price;
this->quantity = c.quantity;
this->photograph = c.photograph;
return *this;
}
bool trenchCoat::operator==(const trenchCoat &c) const {
if (this->size == c.size && this->color == c.color && this->photograph == c.photograph)
return true;
return false;
}
//std::ostream &operator<<(ostream &os, const trenchCoat &c) {
// os<<c.size<<" "<<c.color<<" "<<c.price<<" "<<c.quantity<<" "<<c.photograph;
// return os;
//}
//std::istream &operator>>(istream &is, trenchCoat &c) {
// is>>c.size>>c.color>>c.price>>c.quantity>>c.photograph;
// return is;
//}
std::ostream &operator<<(ostream &os, const trenchCoat &c) {
os<<c.size<<","<<c.color<<","<<c.price<<","<<c.quantity<<","<<c.photograph;
return os;
}
vector<string> tokenize(const string& str, char delimiter) {
vector<string> result;
stringstream ss(str);
string token;
while (getline(ss, token, delimiter))
result.push_back(token);
return result;
}
std::istream &operator>>(istream &is, trenchCoat &c) {
string line;
getline(is, line);
vector<string> tokens = tokenize(line, ',');
if (tokens.size() != 5) // if we want to delimit by something different than space
return is;
c.size = tokens[0];
c.color = tokens[1];
c.price = stoi(tokens[2]);
c.quantity = stoi(tokens[3]);
c.photograph = tokens[4];
return is;
}
std::string trenchCoat::getCSVRepresentation() {
stringstream trenchCoatRepr;
trenchCoatRepr << this->size << "," << this->color << "," << this->price << "," << this->quantity << "," << this->photograph;
return trenchCoatRepr.str();
}
std::string trenchCoat::getHTMLRepresentation() {
stringstream trenchCoatRepr;
trenchCoatRepr << "\t<tr>\n" << "\t\t<td>" << this->size << "</td>\n" << "\t\t<td>" << this->color << "</td>\n" << "\t\t<td>" << this->price << "</td\n>" << "\t\t<td>" << this->quantity << "</td>\n" << "\t\t<td><a href=" << this->photograph << ">Link</a></td>\n" << "\t</tr>\n";
return trenchCoatRepr.str();
}
trenchCoat::~trenchCoat() = default;
| [
"noreply@github.com"
] | pauladam2001.noreply@github.com |
baea30f10db1fbbf521d1b937e27bd03c0cde806 | 53ec379c09992a89c36ae99bf62bd25e1fa06902 | /mines/compat/gdk_pixbuf.h | eec942ad1e8d2302594c31e79ee083215ef28df9 | [] | no_license | alanwj/mines-solver | 8f27ffe23f23e4a77b84773d671c34b17ace9d63 | 10feead5ea1983d174945d328366f21e5ce3d327 | refs/heads/master | 2020-12-02T06:35:33.014367 | 2017-08-17T22:26:11 | 2017-08-17T22:26:11 | 96,859,161 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 702 | h | #ifndef MINES_COMPAT_GDK_PIXBUF_H_
#define MINES_COMPAT_GDK_PIXBUF_H_
#include <gdkmm/pixbuf.h>
#include <glibmm/refptr.h>
namespace mines {
namespace compat {
// Creates a Pixbuf from the specified global resource.
//
// This is a compatibility shim for older versions of glibmm, notably the
// versions supported on Ubuntu 14.04.
//
// When support for these older versions is dropped this can be replaced with a
// call to Gdk::Pixbuf::create_from_resource.
Glib::RefPtr<Gdk::Pixbuf> CreatePixbufFromResource(const char* resource_path,
int width, int height);
} // namespace compat
} // namespace mines
#endif // MINES_COMPAT_GDK_PIXBUF_H_
| [
"alan.wayne.johnson@gmail.com"
] | alan.wayne.johnson@gmail.com |
386a7b1220de86d6be877f8063c4d9b0a7985355 | 5a6398e0b197dc76eb9d79e8c9a70940c826b00e | /src/include/izenelib/include/ir/id_manager/IDManager.h | 94cf0da20629857d64d588f7c438780a6d1193c9 | [
"Apache-2.0",
"PostgreSQL"
] | permissive | RMoraffah/hippo-postgresql | 38b07cd802e179c3fce00097f49c843b238c3e91 | 002702bab3a820bbc8cf99e6fcf3bb1eface96c1 | refs/heads/master | 2021-01-12T00:48:53.735686 | 2016-12-02T01:01:15 | 2016-12-02T01:13:51 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 19,190 | h | /**
* @file IDManager.h
* @brief Header file of ID Manager Class
* @author Do Hyun Yun
* @date 2008-06-05
* @details
*
* ==============
*
* Using SDB/hash
* @author Peisheng Wang
* @date 2009-04-16
*
* ==============
*
* Refactor to a policy-based design to make IDManager as flexible as possible
* @author Wei Cao
* @date 2009-08-07
*
* ==============
* Use LuxIO instead of SDB in AutoFillIDManager
* @author Hongliang Zhao
* @date 2013-02-15
*/
#ifndef _ID_MANAGER_
#define _ID_MANAGER_
#include "WildcardQueryManager.h"
#include "DocIdManager.h"
#include "TermIdManager.h"
#include "IDGenerator.h"
#include "IDStorage.h"
#include <types.h>
#include <util/ustring/UString.h>
#include <3rdparty/am/luxio/array.h>
/**
* @brief a class to manage all kinds of operations about ID.
*
* @details
* IDManager controls many kinds of IDs: Document ID, term ID,
* or any other types of ID which are requested from specific manager.
* ID data or Key data can be easily taken out from IDManager when the
* matched Key or ID is given. If new key is inserted into the IDManager,
* IDManager generates new ID which doesn't have duplication in the
* vocabulary (storage) of IDManager. Different ID set is managed by its
* type information. It means different ID type is stored in different
* vocabulary storage. IDManager use UString class for the Key value.
*
* - TODO List
* - There's multiple definition linking error while compiling test files.
* Currently I temporary set the option -Xlinker -zmuldefs to fix them.
*/
NS_IZENELIB_IR_BEGIN
namespace idmanager {
class IDManagerBase {
public:
virtual ~IDManagerBase(){};
virtual bool getTermIdByTermString(const char* termStringBuffer,
const size_t termStringLength, uint32_t & termId) {return false;}
virtual bool getTermIdByTermString(const char* termStringBuffer,
const size_t termStringLength, uint64_t & termId) {return false;}
};
#define MAJOR_VERSION "1"
#define MINOR_VERSION "0"
#define PATCH_VERSION "20091210"
/**
* @brief Combination of both TermIdManager, DocIdManager and RegexpManager.
*/
template<typename TermType,
typename DocType,
typename IDType,
typename LockType = izenelib::util::NullLock,
typename WildcardQueryHandler = EmptyWildcardQueryHandler<TermType, IDType>,
typename TermIDGenerator = HashIDGenerator<TermType, IDType>,
typename TermIDStorage = HDBIDStorage<TermType, IDType, LockType>,
typename DocIDGenerator = UniqueIDGenerator<DocType, IDType, LockType>,
typename DocIDStorage = HDBIDStorage<DocType, IDType, LockType> >
class _IDManager : public IDManagerBase
{
public:
_IDManager(const string& storageName = "idm")
:
termIdManager_(storageName + "_tid"),
docIdManager_(storageName + "_did"),
wildcardQueryManager_(storageName + "_regexp")
{
version_ = "ID Manager - ver. alpha ";
version_ += MAJOR_VERSION;
version_ += ".";
version_ += MINOR_VERSION;
version_ += ".";
version_ += PATCH_VERSION;
}
~_IDManager()
{
}
/**
* @brief a member function to get term ID from vocabulary which matches to the given term string.
*
* @param termString a UString object which contains term string.
* @param termId a term identifier which matches to the term string.
* @return true : Term exists in the dictionary.
* @return false : Term does not exist in the dictionary.
*/
bool getTermIdByTermString(const TermType& termString, IDType& termId)
{
return termIdManager_.getTermIdByTermString(termString, termId);
}
/**
* @brief a member function to add a term to be candidate of wildcard queries
*/
bool addWildcardCandidate(const TermType& termString)
{
wildcardQueryManager_.insert(termString);
return true;
}
/**
* @brief a member function to get a set of term ID list which matches to the given term strings respectively.
*
* @param termStringList a list of term strings.
* @param termIdList a list of term IDs.
* @return true : One or more terms exist in the dictionary.
* @return false : No term exists in the dictionary.
*/
bool getTermIdListByTermStringList(
const std::vector<TermType>& termStringList,
std::vector<IDType>& termIdList)
{
return termIdManager_.getTermIdListByTermStringList(termStringList, termIdList);
}
/**
* @brief a member function to add a list of terms to be candidates of wildcard queries.
*/
bool addWildcardCandidateList(const std::vector<TermType>& termStringList)
{
for(size_t i =0; i< termStringList.size(); i++ ) {
wildcardQueryManager_.insert(termStringList[i]);
}
return true;
}
/**
* @brief a member function to offer a result set of wildcard search with WildcardSearchManager.
*
* @param wildcardPattern a UString of wildcard pattern which contains '*';
* @param termIdList a list of term IDs which is the result of WildcardSearchManager.
* @return true : Given wildcard pattern is matched at least once in the dictionary.
* @return false : Given wildcard pattern is not matched in the dictionary.
*/
bool getTermIdListByWildcardPattern(
const TermType& wildcardPattern,
std::vector<IDType>& termIdList,
int maximumResultNumber = 5)
{
return wildcardQueryManager_.findRegExp(wildcardPattern, termIdList, maximumResultNumber);
}
/**
* @brief a member function to offer a result set of wildcard search with WildcardSearchManager.
*
* @param wildcardPattern a UString of wildcard pattern which contains '*';
* @param termList a list of terms which is the result of WildcardSearchManager.
* @return true : Given wildcard pattern is matched at least once in the dictionary.
* @return false : Given wildcard pattern is not matched in the dictionary.
*/
bool getTermListByWildcardPattern(
const TermType& wildcardPattern,
std::vector<TermType>& termList,
int maximumResultNumber = 5)
{
return wildcardQueryManager_.findRegExp(wildcardPattern, termList, maximumResultNumber);
}
/**
* @brief a member function to get term string by its ID.
*
* @param termId a term identifier for the input.
* @param termString a UString object which contains term string.
* @return true : Given term string exists in the dictionary.
* @return false : Given term string does not exist in the dictionary.
*/
bool getTermStringByTermId(const IDType& termId, TermType& termString)
{
return termIdManager_.getTermStringByTermId(termId, termString);
}
/**
* @brief a member function to term string list by a set of term IDs.
*
* @param termIdList a list of term IDs.
* @param termStringList a list of term strings.
* @return true : At least one term in the given list is matched in the dictionary.
* @return false : No term is matched in the dictionary.
*/
bool getTermStringListByTermIdList(
const std::vector<IDType>& termIdList,
std::vector<TermType>& termStringList)
{
return termIdManager_.getTermStringListByTermIdList(termIdList, termStringList);
}
/**
* @brief a member function to get document ID from the vocabulary which matches to the given document name.
*
* @param docName a unique string of the document which is used to distinguish between documents.
* @param docId a document identifier which matches to the document name.
* @param insert whether insert docName to IDManager;
* @return true : Document name exists in the dictionary.
* @return false : Document name does not exist in the dictionary.
*/
bool getDocIdByDocName(const DocType& docName, IDType& docId, bool insert = true)
{
return docIdManager_.getDocIdByDocName(docName, docId, insert);
}
/**
* @brief a member function to set the document ID to the new value so that it can satisfy the incremental document ID semantic.
*
* @param docName a unique string of the document which is used to distinguish between documents.
* @param updatedId the new old old document identifier which matches to the document name.
*/
void updateDocIdByDocName(const DocType& docName, IDType& updatedId)
{
docIdManager_.updateDocIdByDocName(docName, updatedId);
}
/**
* @brief a member function to get a name of the document by its ID.
*
* @param docId a document identifier.
* @param docName a unique string of the document which matches to the document ID.
* @return true : Given document name exists in the dictionary.
* @return false : Given document name does not exist in the dictionary.
*/
bool getDocNameByDocId(const IDType& docId, DocType& docName)
{
return docIdManager_.getDocNameByDocId(docId, docName);
}
/**
* @brief Get the maximum doc id.
* @return max doc id, 0 for no doc id exists or this function is not supported
*/
IDType getMaxDocId() const
{
return docIdManager_.getMaxDocId();
}
/**
* @brief Start a standalone thread to insert all cached terms and ids into RegexpManager.
*/
void startWildcardProcess(const int threadNumber = 1)
{
wildcardQueryManager_.startThread(threadNumber);
}
/**
* @brief Wait for thread initialized in startWildcardProcess() stop.
*/
void joinWildcardProcess()
{
wildcardQueryManager_.joinThread();
}
/**
* @brief Flush all cached data to disk
*/
void flush()
{
termIdManager_.flush();
docIdManager_.flush();
wildcardQueryManager_.flush();
}
/**
* @brief Close all resources.
*/
void close()
{
termIdManager_.close();
docIdManager_.close();
wildcardQueryManager_.close();
}
/**
* @brief retrieve version string of id-manager
* @return version string of id-manager
*/
const std::string& getVersionString() const {
return version_;
}
void display(){
termIdManager_.display();
docIdManager_.display();
}
private:
TermIdManager<TermType, IDType, TermIDGenerator, TermIDStorage> termIdManager_;
DocIdManager<DocType, IDType, DocIDGenerator, DocIDStorage> docIdManager_;
WildcardQueryManager<TermType, IDType, WildcardQueryHandler, LockType> wildcardQueryManager_;
std::string version_;
};
/*****************************************************************************
* Public Interfaces For Users With Different Requirements
*****************************************************************************/
/**
* VERY IMPORTANT NOTE!!!
*
* IDManagerDebug means, getTermStringByTermId() and getTermStringListByTermIdList()
* interface are available, this is especially helpful for those poor guys to convert
* the meaningless IDs back to strings which is easy to understand for human beings
* when debug their codes. However, the cost is, an additional SDB should be used
* for saving all TermID->Term mappings, introducing both computation and storage cost.
*
* Some one may be not comfortable to the cost of the above feature, so I also prepare
* the IDManagerRelease interfaces for these brave guys, in which getTermStringByTermId()
* and getTermStringListByTermIdList() are disabled, and TermID->Term mappings are simply
* neglected and lost.
*
* You may also want another intermediate solution, e.g. just record TermID->Term pairs
* in a disk file, process it elsewhere later. It's easy to implement so in current
* template-based code, have a look at SDBIDStorage and EmptyIDStorage first, write
* some IDStorage policy, say, LogIDStorage and pass it into _IDManager, then typedef your
* IDManagerLog here, enjoy it!
*/
/**
* This version of IDManager supports getTermStringByTermId() and
* getTermStringListByTermIdList() interface, generated ID are 32bits unsigned integer.
*/
typedef _IDManager<izenelib::util::UString, izenelib::util::UString, uint32_t> IDManagerDebug32;
/**
* This version of IDManager doesn't support getTermStringByTermId() and
* getTermStringListByTermIdList() interface, generated ID are 32bits unsigned integer.
*/
/*
typedef _IDManager<izenelib::util::UString, uint32_t,
izenelib::util::NullLock,
EmptyWildcardQueryHandler<izenelib::util::UString, uint32_t>,
HashIDGenerator<izenelib::util::UString, uint32_t>,
EmptyIDStorage<izenelib::util::UString, uint32_t>,
UniqueIDGenerator<izenelib::util::UString, uint32_t>,
SDBIDStorage<izenelib::util::UString, uint32_t> > IDManagerRelease32;*/
typedef _IDManager<izenelib::util::UString, izenelib::util::UString, uint32_t,
izenelib::util::ReadWriteLock,
EmptyWildcardQueryHandler<izenelib::util::UString, uint32_t>,
HashIDGenerator<izenelib::util::UString, uint32_t>,
EmptyIDStorage<izenelib::util::UString, uint32_t>,
UniqueIDGenerator<izenelib::util::UString, uint32_t>,
EmptyIDStorage<izenelib::util::UString, uint32_t> > IDManagerRelease32;
/**
* This version of IDManager supports getTermStringByTermId() and
* getTermStringListByTermIdList() interface, generated ID are 64bits unsigned integer.
*/
typedef _IDManager<izenelib::util::UString, izenelib::util::UString, uint64_t> IDManagerDebug64;
/**
* This version of IDManager doesn't support getTermStringByTermId() and
* getTermStringListByTermIdList() interface, generated ID are 64bits unsigned integer.
*/
typedef _IDManager<izenelib::util::UString, izenelib::util::UString, uint64_t,
izenelib::util::NullLock,
EmptyWildcardQueryHandler<izenelib::util::UString, uint64_t>,
HashIDGenerator<izenelib::util::UString, uint64_t>,
EmptyIDStorage<izenelib::util::UString, uint64_t>,
UniqueIDGenerator<izenelib::util::UString, uint64_t>,
HDBIDStorage<izenelib::util::UString, uint64_t> > IDManagerRelease64;
/**
* This version of IDManager is provided for I-classifier, which requires TermID to be
* uique for different terms, besides it doesn't need generate doc id.
* Besides, IClassifier requires multi-threads protection.
*/
//typedef _IDManager<izenelib::util::UString, uint32_t,
// izenelib::util::NullLock,
// EmptyWildcardQueryHandler<izenelib::util::UString, uint32_t>,
// UniqueIDGenerator<izenelib::util::UString, uint32_t, izenelib::util::ReadWriteLock>,
// HDBIDStorage<izenelib::util::UString, uint32_t, izenelib::util::ReadWriteLock>,
// EmptyIDGenerator<izenelib::util::UString, uint32_t>,
// EmptyIDStorage<izenelib::util::UString, uint32_t> > IDManagerIClassifier;
typedef _IDManager<izenelib::util::UString, izenelib::util::UString, uint32_t,
izenelib::util::ReadWriteLock,
EmptyWildcardQueryHandler<izenelib::util::UString, uint32_t>,
HashIDGenerator<izenelib::util::UString, uint32_t>,
EmptyIDStorage<izenelib::util::UString, uint32_t>,
EmptyIDGenerator<izenelib::util::UString, uint32_t>,
EmptyIDStorage<izenelib::util::UString, uint32_t> > IDManagerIClassifier;
/**
* This version of IDManager is provided for ESA, which requires TermId and DocId,
* it dose not generate any file.
*/
typedef _IDManager<izenelib::util::UString, izenelib::util::UString, uint32_t,
izenelib::util::NullLock,
EmptyWildcardQueryHandler<izenelib::util::UString, uint32_t>,
HashIDGenerator<izenelib::util::UString, uint32_t>,
EmptyIDStorage<izenelib::util::UString, uint32_t>,
UniqueIDGenerator<izenelib::util::UString, uint32_t>,
EmptyIDStorage<izenelib::util::UString, uint32_t> > IDManagerESA;
/**
* This version of IDManager is provided for MIA, which only wants TermID genrated by
* hash and doesn't permit generating any file.
*/
typedef _IDManager<izenelib::util::UString, izenelib::util::UString, uint32_t,
izenelib::util::NullLock,
EmptyWildcardQueryHandler<izenelib::util::UString, uint32_t>,
HashIDGenerator<izenelib::util::UString, uint32_t>,
HDBIDStorage<izenelib::util::UString, uint32_t>,
EmptyIDGenerator<izenelib::util::UString, uint32_t>,
EmptyIDStorage<izenelib::util::UString, uint32_t> > IDManagerMIA;
typedef _IDManager<izenelib::util::UString, uint128_t, uint32_t,
izenelib::util::ReadWriteLock,
EmptyWildcardQueryHandler<izenelib::util::UString, uint32_t>,
HashIDGenerator<izenelib::util::UString, uint32_t>,
EmptyIDStorage<izenelib::util::UString, uint32_t>,
UniqueIDGenerator<uint128_t, uint32_t>,
EmptyIDStorage<uint128_t, uint32_t> > IDManager;
typedef _IDManager<izenelib::util::UString, uint128_t, uint32_t,
izenelib::util::ReadWriteLock,
EmptyWildcardQueryHandler<izenelib::util::UString, uint32_t>,
HashIDGenerator<izenelib::util::UString, uint32_t>,
EmptyIDStorage<izenelib::util::UString, uint32_t>,
OldUniqueIDGenerator<uint128_t, uint32_t>,
EmptyIDStorage<uint128_t, uint32_t> > OldIDManager;
typedef _IDManager<izenelib::util::UString, izenelib::util::UString, uint64_t,
izenelib::util::NullLock,
EmptyWildcardQueryHandler<izenelib::util::UString, uint64_t>,
HashIDGenerator<izenelib::util::UString, uint64_t>,
EmptyIDStorage<izenelib::util::UString, uint64_t>,
UniqueIDGenerator<izenelib::util::UString, uint64_t>,
HDBIDStorage<izenelib::util::UString, uint64_t> > AutoFillIDManager_old;
typedef _IDManager<std::string, std::string, uint32_t,
izenelib::util::NullLock,
EmptyWildcardQueryHandler<std::string, uint32_t>,
HashIDGenerator<std::string, uint32_t>,
EmptyIDStorage<std::string, uint32_t>,
UniqueIDGenerator<std::string, uint32_t>,
Lux::IO::Array> AutoFillIDManager;
} // end - namespace idmanager
NS_IZENELIB_IR_END
#endif // _ID_MANAGER_
| [
"jiayu198910@gmail.com"
] | jiayu198910@gmail.com |
c36444cdae930a89848c07e15308d67c31535f2d | 5df66b7c0cf0241831ea7d8345aa4102f77eba03 | /Carberp Botnet/source - absource/pro/all source/BJWJ/source/Misc/PackageLoad.cpp | 0f3c9c017e07a4a52ef638d423ac3541946957b9 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | bengalm/fireroothacker | e8f20ae69f4246fc4fe8c48bbb107318f7a79265 | ceb71ba972caca198524fe91a45d1e53b80401f6 | refs/heads/main | 2023-04-02T03:00:41.437494 | 2021-04-06T00:26:28 | 2021-04-06T00:26:28 | null | 0 | 0 | null | null | null | null | WINDOWS-1251 | C++ | false | false | 2,311 | cpp | #include"PackageLoad.h"
#include <shlobj.h>
#define STEP 1024*100
void Download(char*URL,WCHAR*FileName)
{
WCHAR SysPath1[MAX_PATH];
m_memset(SysPath1,0,MAX_PATH);
if (FileName==NULL)
{
WCHAR LoadedFileName[] = {'\\','L','F','D','.','d','a','t',L'\0'};
pSHGetFolderPathW(NULL, CSIDL_APPDATA, NULL, SHGFP_TYPE_CURRENT, SysPath1);
plstrcatW( SysPath1, LoadedFileName );
}
else
{
plstrcatW( SysPath1, FileName );
}
HANDLE hFile = (HANDLE)pCreateFileW( SysPath1, GENERIC_WRITE, FILE_SHARE_WRITE, 0, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0 );
LONGLONG nFileLen = 0;
if (hFile!=INVALID_HANDLE_VALUE)
{
DWORD dwSizeHigh=0, dwSizeLow=0;
dwSizeLow = (DWORD)pGetFileSize(hFile, &dwSizeHigh);
// nFileLen = ((LONGLONG)dwSizeHigh * (LONGLONG)(4294967295+1)) + (LONGLONG)dwSizeLow;// на случай очень большого файла
nFileLen = dwSizeLow;
while (true)
{
PHTTPRequestRec R = HTTPCreateRequest(URL);
R->UseRange = true;
R->StartRange = (DWORD)nFileLen;
R->EndRange = (DWORD)(nFileLen+STEP);
PCHAR Result;
HTTP::TResponseData Resp;
ClearStruct(Resp);
Resp.Buffer = &Result;
DWORD Size;
Resp.Size =&Size;
if(false==HTTP::ExecuteMethod(R, &Resp))
{
pSleep(1000*60);
continue;
}
if (0==Resp.Response.FullSize)//по запросу нету данных, скорее всего все закачано
{
break;
}
DWORD ButeWriten;
pWriteFile(hFile, Result, Size, &ButeWriten, NULL );
nFileLen+=ButeWriten;
if (nFileLen==Resp.Response.FullSize)
{
//Получили данные, и они равны размеру файла, выходим
break;
}
STR::Free(Result);
HTTPFreeRequest(R);
HTTPResponse::Clear(&Resp.Response);
}
pCloseHandle(hFile);
}
}
DWORD WINAPI PackageLoad( LPVOID lpData )
{
while (true)
{
WCHAR SysPath1[MAX_PATH];
WCHAR LoadedFileName[] = {'\\','L','F','D','.','d','a','t',L'\0'};
pSHGetFolderPathW(NULL, CSIDL_APPDATA, NULL, SHGFP_TYPE_CURRENT, SysPath1);
plstrcatW( SysPath1, LoadedFileName );
HANDLE hFile = (HANDLE)pCreateFileW( SysPath1, GENERIC_WRITE, FILE_SHARE_WRITE, 0, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0 );
if (hFile!=INVALID_HANDLE_VALUE)
{
// HTTP::ExecuteMethod(R, &Resp);
}
}
} | [
"ludi@ps.ac.cn"
] | ludi@ps.ac.cn |
427c16a8631bca58cd99eaf67068ceee83aa98b6 | 502a9513d6f46cfc730c89c326c52351e6488d27 | /src/maxent_model.cpp | 195232a66770102bae134bad9ebdf91749e91db4 | [] | no_license | wanguanglu/maxent | 972b5629e8df9da7bf4b0f4c4ce23737fae71a23 | fc8ed736e7a6beb009e2e9e5128357e5ae9b13b2 | refs/heads/master | 2022-01-13T11:08:46.329609 | 2019-04-30T13:54:12 | 2019-04-30T13:54:12 | 56,677,053 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,153 | cpp | /**
* @file maxent.cpp
* @author wanguanglu
* @date 2016/03/22 18:15:54
* @brief
*
**/
#include "maxent_model.h"
namespace nlu {
namespace maxent {
LinearModel::LinearModel() {
_weight_mat = NULL;
_feat_num = 0;
_label_num = 0;
}
LinearModel::~LinearModel() {
if (_weight_mat) {
delete []_weight_mat;
}
}
int LinearModel::load_model(const char* model_file) {
FILE* fp = NULL;
char line[MAX_TEXT_LEN];
char* pos1, *pos2;
char tmp[MAX_TEXT_LEN];
int len = 0;
fp = fopen(model_file, "rb");
if (NULL == fp) {
log_warn("open model file %s failed.", model_file);
return -1;
}
//read label map
if(!fgets(line, MAX_TEXT_LEN, fp)) {
log_warn("read label number failed.");
return -1;
}
len = strlen(line);
if (line[len - 1] == '\n') {
line[len - 1] = '\0';
}
char* p = strtok(line, "\t ");
if (p == NULL) {
log_warn("wrong format %s", line);
return -1;
}
p += strlen(p) + 1;
_label_num = atoi(p);
log_notice("label number:%d.", _label_num);
if (_label_num <= 0) {
log_warn("read label_num failed.");
return -1;
}
for (int label_id=0; label_id<_label_num; label_id++) {
fgets(line, MAX_TEXT_LEN, fp);
int len = strlen(line);
if (line[len - 1] == '\n') {
line[len - 1] = '\0';
}
if (strlen(line) == 0) {
continue;
}
_label_map.add_item(std::string(line));
}
//read feat map
while(fgets(line, MAX_TEXT_LEN, fp)) {
len = strlen(line);
if (line[len - 1] == '\n') {
line[len - 1] = '\0';
}
if (strlen(line) == 0) {
continue;
}
break;
}
p = strtok(line, "\t ");
if (p == NULL) {
log_warn("wrong format %s", line);
return -1;
}
p += strlen(p) + 1;
_feat_num = atoi(p);
log_notice("feature number:%d.", _feat_num);
for (int feat_id=0; feat_id<_feat_num; feat_id++) {
fgets(line, MAX_TEXT_LEN, fp);
int len = strlen(line);
if (line[len - 1] == '\n') {
line[len - 1] = '\0';
}
_feat_map.add_item(std::string(line));
}
_weight_mat = new float[_feat_num*_label_num];
if (NULL == _weight_mat) {
log_warn("new for _weight_mat failed.");
return -1;
}
int feat_idx = 0;
while (fgets(line, MAX_TEXT_LEN, fp)) {
if (line[strlen(line)-1] == '\n') {
line[strlen(line)-1] = '\0';
}
if (strlen(line) == 0) {
continue;
}
pos1 = strtok(line, "\t ");
for (int i=0; i<_label_num; i++) {
pos1 = strtok(NULL, "\t ");
_weight_mat[feat_idx*_label_num+i ] = atof(pos1);
}
feat_idx ++;
}
fclose(fp);
log_notice("Load linear model from %s success.", model_file);
return 0;
}
int LinearModel::save_model(const char* model_file) {
FILE* fp = NULL;
std::string item;
fp = fopen(model_file, "wb");
if (fp == NULL) {
log_warn("open file %s for write failed.", model_file);
return -1;
}
//write label
fprintf(fp, "#label\t%d\n", _label_num);
for (int i=0; i<_label_num; i++) {
_label_map.get_item_str(i, item);
fprintf(fp, "%s\n", item.c_str());
}
fprintf(fp, "\n");
//write feature
fprintf(fp, "#feature\t%d\n", _feat_num);
for (int i=0; i<_feat_num; i++) {
_feat_map.get_item_str(i, item);
fprintf(fp, "%s\n", item.c_str());
}
fprintf(fp, "\n");
for (int feat_id=0; feat_id<_feat_num; feat_id++) {
fprintf(fp, "%d:", feat_id);
for (int label_id=0; label_id<_label_num; label_id++) {
fprintf(fp, "\t%f", _weight_mat[feat_id*_label_num + label_id]);
}
fprintf(fp, "\n");
}
fclose(fp);
return 0;
}
float LinearModel::cal_score(const float* feat, int label_id) const {
float score = 0.0;
score += _weight_mat[label_id]; //bias;
for (int feat_id=1; feat_id<_feat_num; feat_id++) {
score += feat[feat_id-1] * _weight_mat[feat_id*_label_num+label_id];
}
return score;
}
float LinearModel::cal_score(const std::map<int, float>& feat, int label_id) const {
float score = 0.0;
std::map<int, float>::const_iterator iter;
score += _weight_mat[label_id]; //bias;
for (iter = feat.begin(); iter != feat.end(); iter++) {
score += iter->second * _weight_mat[iter->first * _label_num + label_id];
}
return score;
}
float LinearModel::cal_score(const std::vector<FeatPair>& feat, int label_id) const {
float score = 0.0;
std::vector<FeatPair>::const_iterator iter;
score += _weight_mat[label_id]; //bias;
for (iter = feat.begin(); iter != feat.end(); iter++) {
score += iter->_val * _weight_mat[iter->_feat_id * _label_num + label_id];
}
return score;
}
int LinearModel::normalize_score(float* score) const {
float sum_score = 0.0;
float max_score = MIN_FLOAT;
for (int label_id=0; label_id<_label_num; label_id++) {
if (score[label_id] > max_score) {
max_score = score[label_id];
}
}
for (int label_id=0; label_id<_label_num; label_id++) {
score[label_id] = exp(score[label_id] - max_score);
sum_score += score[label_id];
}
for (int label_id=0; label_id<_label_num; label_id++) {
score[label_id] /= sum_score;
}
return 0;
}
int LinearModel::normalize_score(std::vector<float>& score) const {
float sum_score = 0.0;
for (int label_id = 0; label_id < _label_num; label_id++) {
score[label_id] = exp(score[label_id]);
sum_score += score[label_id];
}
for (int label_id=0; label_id < _label_num; label_id++) {
score[label_id] /= sum_score;
}
return 0;
}
int LinearModel::predict(const std::map<int, float>& feat, std::vector<float>& score, int& label) const {
label = -1;
score.clear();
for (int label_id = 0; label_id < _label_num; label_id++) {
float scr = cal_score(feat, label_id);
score.push_back(scr);
if (label == -1 || scr > score[label]) {
label = label_id;
}
}
if (normalize_score(score) != 0) {
log_warn("normalize score failed.");
}
return 0;
}
int LinearModel::predict(const std::vector<FeatPair>& feat, float* score, int& label) const {
label = -1;
for (int label_id = 0; label_id < _label_num; label_id++) {
float scr = cal_score(feat, label_id);
score[label_id] = scr;
if (label == -1 || scr > score[label]) {
label = label_id;
}
}
if (normalize_score(score) != 0) {
log_warn("normalize score failed.");
}
return 0;
}
int LinearModel::predict(const float* feat, int feat_len, float* score, int& label) const {
if (feat_len != _feat_num-1) {
log_warn("feature size not match. [model feat size: %d][input feat size:%d]",
_feat_num-1, feat_len);
}
float max_score = 0;
for (int label_id=0; label_id<_label_num; label_id++) {
score[label_id] = cal_score(feat, label_id);
}
if (normalize_score(score) != 0) {
log_warn("normalize score failed.");
}
for (int label_id=0; label_id<_label_num; label_id++) {
if (score[label_id] > max_score) {
max_score = score[label_id];
label = label_id;
}
}
return 0;
}
int LinearModel::set_feat_label_map(ItemMap& feat_map, ItemMap& label_map) {
_feat_map = feat_map;
_label_map = label_map;
_feat_num = feat_map.item_num();
_label_num = label_map.item_num();
if (_weight_mat != NULL) {
delete []_weight_mat;
}
_weight_mat = new float[_feat_num*_label_num];
if (_weight_mat == NULL) {
log_warn("new for weight matrix failed.");
return -1;
}
bzero(_weight_mat, sizeof(float)*_feat_num*_label_num);
return 0;
}
}
}
| [
"root@AY14020823153388370fZ.(none)"
] | root@AY14020823153388370fZ.(none) |
33c3f89281365c3612780d703acffde4e3cb5673 | 4e8fb3672f0c561bf85bd8230c5492e4457f33d1 | /dev/include/packages/core/Light_Sky.h | 7ddbcda355049250408f80b951ad462923d9d561 | [] | no_license | lythm/ld3d | 877abefefcea9b39734857714fe1974a8320fe6c | 91de1cca7cca77c1f8eae8e8a9423abc34f9b38f | refs/heads/master | 2020-12-24T15:23:29.766231 | 2014-07-11T04:42:49 | 2014-07-11T04:42:49 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 323 | h | #pragma once
namespace ld3d
{
class Light_Sky : public GameObjectComponent
{
public:
Light_Sky(GameObjectManagerPtr pManager) : GameObjectComponent("SkyLight", pManager){}
virtual ~Light_Sky(void){}
virtual SkyLightPtr GetLight() = 0;
virtual void EnableShadow(bool enable) = 0;
};
}
| [
"lythm780522@gmail.com"
] | lythm780522@gmail.com |
ee1db1515f526652332e77f06402477634a69b21 | c2aefb8f4f91301885f33ef7b10287d0f916c145 | /RaspberryPi/AlexandreTest/testconfigurationreseaux/test3configreseaux.cpp | 4ff70b98e380c0d4c3a20768866f7b159c9b0e3e | [] | no_license | ctonnerre/Documentation | 1793c18dbd2a744b3ba18d048a6d4640adbaf995 | fdf894fc089817e0cdef1608fbdb33b3684118b8 | refs/heads/master | 2022-04-11T00:05:01.202445 | 2020-03-12T14:27:40 | 2020-03-12T14:27:40 | 250,219,451 | 0 | 0 | null | 2020-03-26T09:51:51 | 2020-03-26T09:51:50 | null | UTF-8 | C++ | false | false | 784 | cpp | #include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
ifstream fichier("/etc/dhcpcd.conf");
string strCherche ("static ip_address");
string strnew
if(fichier)
{
//L'ouverture s'est bien passée, on peut donc lire
string ligne; //Une variable pour stocker les lignes lues
while(getline(fichier, ligne)) //Tant qu'on n'est pas à la fin, on lit
{
cout << "longueur : " << ligne.length() << " " << ligne << endl;
cout << "numero ou commance la chaine de charactere static ip address : " << ligne.find(strCherche) << " " << endl;
}
}
else
{
cout << "ERREUR: Impossible d'ouvrir le fichier en lecture." << endl;
}
return 0;
}
| [
"noreply@github.com"
] | ctonnerre.noreply@github.com |
980b97b001c4993d3e78f091dcfaf994832e8b30 | 66433c1b726dddfec94706d3dfa6a029c904b94b | /trunk/chat.cpp | a19100d56057fb9550a9eb904c9f3c3be951a058 | [] | no_license | LeandroPerrotta/DarghosTFS04_87 | 2177feb1d288b1d0341c682d7d12ab28320683ec | 392291bd826cfd30e369c440303ad1588016606f | refs/heads/master | 2023-06-15T13:59:44.906677 | 2021-07-16T22:32:47 | 2021-07-16T22:32:47 | 386,390,869 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 38,073 | cpp | ////////////////////////////////////////////////////////////////////////
// OpenTibia - an opensource roleplaying game
////////////////////////////////////////////////////////////////////////
// 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 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 General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
////////////////////////////////////////////////////////////////////////
#include "otpch.h"
#include "chat.h"
#include "player.h"
#include "iologindata.h"
#include "manager.h"
#include "configmanager.h"
#include "game.h"
extern ConfigManager g_config;
extern Game g_game;
extern Chat g_chat;
uint16_t ChatChannel::staticFlags = CHANNELFLAG_ENABLED | CHANNELFLAG_ACTIVE;
PrivateChatChannel::PrivateChatChannel(uint16_t id, std::string name, uint16_t flags):
ChatChannel(id, name, flags), m_owner(0) {}
bool PrivateChatChannel::isInvited(const Player* player)
{
if(player->getGUID() == m_owner)
return true;
return std::find(m_invites.begin(), m_invites.end(), player->getGUID()) != m_invites.end();
}
bool PrivateChatChannel::addInvited(Player* player)
{
if(std::find(m_invites.begin(), m_invites.end(), player->getGUID()) != m_invites.end())
return false;
m_invites.push_back(player->getGUID());
return true;
}
bool PrivateChatChannel::removeInvited(Player* player)
{
InviteList::iterator it = std::find(m_invites.begin(), m_invites.end(), player->getGUID());
if(it == m_invites.end())
return false;
m_invites.erase(it);
return true;
}
void PrivateChatChannel::invitePlayer(Player* player, Player* invitePlayer)
{
if(player == invitePlayer || !addInvited(invitePlayer))
return;
std::stringstream msg;
msg << player->getName() << " invites you to " << (player->getSex(false) ? "his" : "her") << " private chat channel.";
invitePlayer->sendTextMessage(MSG_INFO_DESCR, msg.str().c_str());
msg.str("");
msg << invitePlayer->getName() << " has been invited.";
player->sendTextMessage(MSG_INFO_DESCR, msg.str().c_str());
}
void PrivateChatChannel::excludePlayer(Player* player, Player* excludePlayer)
{
if(player == excludePlayer || !removeInvited(excludePlayer))
return;
std::string msg = excludePlayer->getName();
msg += " has been excluded.";
player->sendTextMessage(MSG_INFO_DESCR, msg.c_str());
removeUser(excludePlayer);
excludePlayer->sendClosePrivate(getId());
}
void PrivateChatChannel::closeChannel()
{
for(UsersMap::iterator it = m_users.begin(); it != m_users.end(); ++it)
it->second->sendClosePrivate(m_id);
}
ChatChannel::ChatChannel(uint16_t id, const std::string& name, uint16_t flags, uint32_t access/* = 0*/,
uint32_t level/* = 1*/, Condition* condition/* = NULL*/, int32_t conditionId/* = -1*/,
const std::string& conditionMessage/* = ""*/, VocationMap* vocationMap/* = NULL*/):
m_id(id), m_flags(flags), m_conditionId(conditionId), m_access(access), m_level(level),
m_name(name), m_conditionMessage(conditionMessage), m_condition(condition),
m_vocationMap(vocationMap)
{
if(hasFlag(CHANNELFLAG_LOGGED))
{
m_file.reset(new std::ofstream(getFilePath(FILE_TYPE_LOG, (std::string)"chat/" + g_config.getString(
ConfigManager::PREFIX_CHANNEL_LOGS) + m_name + (std::string)".log").c_str(), std::ios::app | std::ios::out));
if(!m_file->is_open())
m_flags &= ~CHANNELFLAG_LOGGED;
}
}
bool ChatChannel::addUser(Player* player)
{
if(m_users.find(player->getID()) != m_users.end())
return false;
ChatChannel* channel = g_chat.getChannel(player, m_id);
if(!channel)
{
#ifdef __DEBUG_CHAT__
std::clog << "ChatChannel::addUser - failed retrieving channel." << std::endl;
#endif
return false;
}
m_users[player->getID()] = player;
CreatureEventList joinEvents = player->getCreatureEvents(CREATURE_EVENT_CHANNEL_JOIN);
for(CreatureEventList::iterator it = joinEvents.begin(); it != joinEvents.end(); ++it)
(*it)->executeChannelJoin(player, m_id, m_users);
Manager::getInstance()->addUser(player->getID(), m_id);
return true;
}
bool ChatChannel::removeUser(Player* player)
{
if(!player || player->isRemoved())
return false;
UsersMap::iterator it = m_users.find(player->getID());
if(it == m_users.end())
return false;
m_users.erase(it);
CreatureEventList leaveEvents = player->getCreatureEvents(CREATURE_EVENT_CHANNEL_LEAVE);
for(CreatureEventList::iterator it = leaveEvents.begin(); it != leaveEvents.end(); ++it)
(*it)->executeChannelLeave(player, m_id, m_users);
Manager::getInstance()->removeUser(player->getID(), m_id);
return true;
}
bool ChatChannel::talk(Player* player, SpeakClasses type, const std::string& text)
{
UsersMap::iterator it = m_users.find(player->getID());
if(it == m_users.end())
return false;
if(m_condition && !player->hasFlag(PlayerFlag_CannotBeMuted))
{
if(Condition* condition = m_condition->clone())
player->addCondition(condition);
}
for(it = m_users.begin(); it != m_users.end(); ++it)
it->second->sendToChannel(player, type, text, m_id);
if(hasFlag(CHANNELFLAG_LOGGED) && m_file->is_open())
*m_file << "[" << formatDate() << "] " << player->getName() << ": " << text << std::endl;
return true;
}
bool ChatChannel::talk(std::string nick, SpeakClasses type, std::string text)
{
for(UsersMap::iterator it = m_users.begin(); it != m_users.end(); ++it)
it->second->sendChannelMessage(nick, text, type, m_id);
if(hasFlag(CHANNELFLAG_LOGGED) && m_file->is_open())
*m_file << "[" << formatDate() << "] " << nick << ": " << text << std::endl;
return true;
}
Chat::~Chat()
{
for(GuildChannelMap::iterator it = m_guildChannels.begin(); it != m_guildChannels.end(); ++it)
delete it->second;
m_guildChannels.clear();
clear();
}
void Chat::clear()
{
for(NormalChannelMap::iterator it = m_normalChannels.begin(); it != m_normalChannels.end(); ++it)
delete it->second;
m_normalChannels.clear();
for(PartyChannelMap::iterator it = m_partyChannels.begin(); it != m_partyChannels.end(); ++it)
delete it->second;
m_partyChannels.clear();
for(PrivateChannelMap::iterator it = m_privateChannels.begin(); it != m_privateChannels.end(); ++it)
delete it->second;
m_privateChannels.clear();
delete dummyPrivate;
}
bool Chat::reload()
{
clear();
return loadFromXml();
}
bool Chat::loadFromXml()
{
xmlDocPtr doc = xmlParseFile(getFilePath(FILE_TYPE_XML, "channels.xml").c_str());
if(!doc)
{
std::clog << "[Warning - Chat::loadFromXml] Cannot load channels file." << std::endl;
std::clog << getLastXMLError() << std::endl;
return false;
}
xmlNodePtr p, root = xmlDocGetRootElement(doc);
if(xmlStrcmp(root->name,(const xmlChar*)"channels"))
{
std::clog << "[Error - Chat::loadFromXml] Malformed channels file" << std::endl;
xmlFreeDoc(doc);
return false;
}
for(p = root->children; p; p = p->next)
parseChannelNode(p);
xmlFreeDoc(doc);
return true;
}
bool Chat::parseChannelNode(xmlNodePtr p)
{
int32_t intValue;
if(xmlStrcmp(p->name, (const xmlChar*)"channel"))
return false;
if(!readXMLInteger(p, "id", intValue) || intValue <= CHANNEL_GUILD)
{
std::clog << "[Warning - Chat::loadFromXml] Invalid or not specified channel id." << std::endl;
return false;
}
uint16_t id = intValue;
std::string strValue;
if(m_normalChannels.find(id) != m_normalChannels.end() && (!readXMLString(p, "override", strValue) || !booleanString(strValue)))
{
std::clog << "[Warning - Chat::loadFromXml] Duplicated channel with id: " << id << "." << std::endl;
return false;
}
if(!readXMLString(p, "name", strValue))
{
std::clog << "[Warning - Chat::loadFromXml] Missing name for channel with id: " << id << "." << std::endl;
return false;
}
std::string name = strValue;
uint16_t flags = ChatChannel::staticFlags;
if(readXMLString(p, "enabled", strValue) && !booleanString(strValue))
flags &= ~CHANNELFLAG_ENABLED;
if(readXMLString(p, "active", strValue) && !booleanString(strValue))
flags &= ~CHANNELFLAG_ACTIVE;
if((readXMLString(p, "logged", strValue) || readXMLString(p, "log", strValue)) && booleanString(strValue))
flags |= CHANNELFLAG_LOGGED;
uint32_t access = 0;
if(readXMLInteger(p, "access", intValue))
access = intValue;
uint32_t level = 1;
if(readXMLInteger(p, "level", intValue))
level = intValue;
int32_t conditionId = -1;
std::string conditionMessage = "You are muted.";
Condition* condition = NULL;
if(readXMLInteger(p, "muted", intValue))
{
conditionId = 2;
int32_t tmp = intValue * 1000;
if(readXMLInteger(p, "conditionId", intValue))
{
conditionId = intValue;
if(conditionId < 2)
std::clog << "[Warning - Chat::parseChannelNode] Using reserved muted condition sub id (" << conditionId << ")" << std::endl;
}
if((condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_MUTED, tmp, 0, false, conditionId)))
{
if(readXMLString(p, "conditionMessage", strValue))
conditionMessage = strValue;
}
else
conditionId = -1;
}
StringVec vocStringVec;
VocationMap vocMap;
std::string error;
for(xmlNodePtr tmpNode = p->children; tmpNode; tmpNode = tmpNode->next)
{
if(!parseVocationNode(tmpNode, vocMap, vocStringVec, error))
std::clog << "[Warning - Chat::loadFromXml] " << error << std::endl;
}
VocationMap* vocationMap = NULL;
if(!vocMap.empty())
vocationMap = new VocationMap(vocMap);
switch(id)
{
case CHANNEL_PARTY:
{
partyName = name;
break;
}
case CHANNEL_PRIVATE:
{
if(ChatChannel* newChannel = new PrivateChatChannel(CHANNEL_PRIVATE, name, flags))
dummyPrivate = newChannel;
break;
}
default:
{
if(ChatChannel* newChannel = new ChatChannel(id, name, flags, access, level,
condition, conditionId, conditionMessage, vocationMap))
m_normalChannels[id] = newChannel;
break;
}
}
return true;
}
ChatChannel* Chat::createChannel(Player* player, uint16_t channelId)
{
if(!player || player->isRemoved() || getChannel(player, channelId))
return NULL;
switch(channelId)
{
case CHANNEL_GUILD:
{
ChatChannel* newChannel = NULL;
if((newChannel = new ChatChannel(channelId, player->getGuildName(), ChatChannel::staticFlags)))
m_guildChannels[player->getGuildId()] = newChannel;
return newChannel;
}
case CHANNEL_PARTY:
{
ChatChannel* newChannel = NULL;
if(player->getParty() && (newChannel = new ChatChannel(channelId, partyName, ChatChannel::staticFlags)))
m_partyChannels[player->getParty()] = newChannel;
return newChannel;
}
case CHANNEL_PRIVATE:
{
//only 1 private channel for each premium player
if(!player->isPremium() || getPrivateChannel(player))
return NULL;
//find a free private channel slot
for(uint16_t i = 100; i < 10000; ++i)
{
if(m_privateChannels.find(i) != m_privateChannels.end())
continue;
uint16_t flags = 0;
if(dummyPrivate)
flags = dummyPrivate->getFlags();
PrivateChatChannel* newChannel = NULL;
if((newChannel = new PrivateChatChannel(i, player->getName() + "'s Channel", flags)))
{
newChannel->setOwner(player->getGUID());
m_privateChannels[i] = newChannel;
}
return newChannel;
}
}
default:
break;
}
return NULL;
}
bool Chat::deleteChannel(Player* player, uint16_t channelId)
{
switch(channelId)
{
case CHANNEL_GUILD:
{
GuildChannelMap::iterator it = m_guildChannels.find(player->getGuildId());
if(it == m_guildChannels.end())
return false;
delete it->second;
m_guildChannels.erase(it);
return true;
}
case CHANNEL_PARTY:
{
PartyChannelMap::iterator it = m_partyChannels.find(player->getParty());
if(it == m_partyChannels.end())
return false;
delete it->second;
m_partyChannels.erase(it);
return true;
}
default:
{
PrivateChannelMap::iterator it = m_privateChannels.find(channelId);
if(it == m_privateChannels.end())
return false;
it->second->closeChannel();
delete it->second;
m_privateChannels.erase(it);
return true;
}
}
return false;
}
ChatChannel* Chat::addUserToChannel(Player* player, uint16_t channelId)
{
ChatChannel* channel = getChannel(player, channelId);
if(channel && channel->addUser(player))
return channel;
return NULL;
}
bool Chat::removeUserFromChannel(Player* player, uint16_t channelId)
{
ChatChannel* channel = getChannel(player, channelId);
if(!channel || !channel->removeUser(player))
return false;
if(channel->getOwner() == player->getGUID())
deleteChannel(player, channelId);
return true;
}
void Chat::removeUserFromAllChannels(Player* player)
{
if(!player || player->isRemoved())
return;
for(NormalChannelMap::iterator it = m_normalChannels.begin(); it != m_normalChannels.end(); ++it)
it->second->removeUser(player);
for(PartyChannelMap::iterator it = m_partyChannels.begin(); it != m_partyChannels.end(); ++it)
it->second->removeUser(player);
for(GuildChannelMap::iterator it = m_guildChannels.begin(); it != m_guildChannels.end(); ++it)
it->second->removeUser(player);
for(PrivateChannelMap::iterator it = m_privateChannels.begin(); it != m_privateChannels.end(); ++it)
{
it->second->removeUser(player);
if(it->second->getOwner() == player->getGUID())
deleteChannel(player, it->second->getId());
}
}
bool Chat::talkToChannel(Player* player, SpeakClasses type, const std::string& text, uint16_t channelId)
{
if(text.empty())
return false;
ChatChannel* channel = getChannel(player, channelId);
if(!channel)
return false;
if(!player->hasFlag(PlayerFlag_CannotBeMuted))
{
if(!channel->hasFlag(CHANNELFLAG_ACTIVE))
{
player->sendTextMessage(MSG_STATUS_SMALL, "You may not speak into this channel.");
return true;
}
if(player->getLevel() < channel->getLevel())
{
char buffer[100];
sprintf(buffer, "You may not speak into this channel as long as you are on level %d.", channel->getLevel());
player->sendCancel(buffer);
return true;
}
if(channel->getConditionId() >= 0 && player->hasCondition(CONDITION_MUTED, channel->getConditionId()))
{
player->sendCancel(channel->getConditionMessage().c_str());
return true;
}
}
if(isPublicChannel(channelId))
Manager::getInstance()->talk(player->getID(), channelId, type, text);
if(channelId != CHANNEL_GUILD || !g_config.getBool(ConfigManager::INGAME_GUILD_MANAGEMENT)
|| (text[0] != '!' && text[0] != '/'))
{
if(channelId == CHANNEL_GUILD)
{
switch(player->getGuildLevel())
{
case GUILDLEVEL_VICE:
return channel->talk(player, SPEAK_CHANNEL_O, text);
case GUILDLEVEL_LEADER:
return channel->talk(player, SPEAK_CHANNEL_RN, text);
default:
break;
}
}
return channel->talk(player, type, text);
}
if(!player->getGuildId())
{
player->sendCancel("You are not in a guild.");
return true;
}
if(!IOGuild::getInstance()->guildExists(player->getGuildId()))
{
player->sendCancel("It seems like your guild does not exist anymore.");
return true;
}
char buffer[350];
if(text.substr(1) == "disband")
{
if(player->getGuildLevel() == GUILDLEVEL_LEADER)
{
IOGuild::getInstance()->disbandGuild(player->getGuildId());
channel->talk(player, SPEAK_CHANNEL_W, "The guild has been disbanded.");
}
else
player->sendCancel("You are not the leader of your guild.");
}
else if(text.substr(1, 6) == "invite")
{
if(player->getGuildLevel() > GUILDLEVEL_MEMBER)
{
if(text.length() > 7)
{
std::string param = text.substr(8);
trimString(param);
Player* paramPlayer = NULL;
if(g_game.getPlayerByNameWildcard(param, paramPlayer) == RET_NOERROR)
{
if(paramPlayer->getGuildId() == 0)
{
if(!paramPlayer->isGuildInvited(player->getGuildId()))
{
sprintf(buffer, "%s has invited you to join the guild, %s. You may join this guild by writing: !joinguild %s", player->getName().c_str(), player->getGuildName().c_str(), player->getGuildName().c_str());
paramPlayer->sendTextMessage(MSG_INFO_DESCR, buffer);
sprintf(buffer, "%s has invited %s to the guild.", player->getName().c_str(), paramPlayer->getName().c_str());
channel->talk(player, SPEAK_CHANNEL_W, buffer);
paramPlayer->invitedToGuildsList.push_back(player->getGuildId());
}
else
player->sendCancel("A player with that name has already been invited to your guild.");
}
else
player->sendCancel("A player with that name is already in a guild.");
}
else if(IOLoginData::getInstance()->playerExists(param))
{
uint32_t guid;
IOLoginData::getInstance()->getGuidByName(guid, param);
if(!IOGuild::getInstance()->hasGuild(guid))
{
if(!IOGuild::getInstance()->isInvited(player->getGuildId(), guid))
{
if(IOGuild::getInstance()->guildExists(player->getGuildId()))
{
IOGuild::getInstance()->invitePlayer(player->getGuildId(), guid);
sprintf(buffer, "%s has invited %s to the guild.", player->getName().c_str(), param.c_str());
channel->talk(player, SPEAK_CHANNEL_W, buffer);
}
else
player->sendCancel("Your guild does not exist anymore.");
}
else
player->sendCancel("A player with that name has already been invited to your guild.");
}
else
player->sendCancel("A player with that name is already in a guild.");
}
else
player->sendCancel("A player with that name does not exist.");
}
else
player->sendCancel("Invalid guildcommand parameters.");
}
else
player->sendCancel("You don't have rights to invite players to your guild.");
}
else if(text.substr(1, 5) == "leave")
{
if(player->getGuildLevel() < GUILDLEVEL_LEADER)
{
#ifdef __WAR_SYSTEM__
if(!player->hasEnemy())
{
#endif
sprintf(buffer, "%s has left the guild.", player->getName().c_str());
channel->talk(player, SPEAK_CHANNEL_W, buffer);
player->leaveGuild();
#ifdef __WAR_SYSTEM__
}
else
player->sendCancel("Your guild is currently at war, you cannot leave it right now.");
#endif
}
else
player->sendCancel("You cannot leave your guild because you are the leader of it, you have to pass the leadership to another member of your guild or disband the guild.");
}
else if(text.substr(1, 6) == "revoke")
{
if(player->getGuildLevel() > GUILDLEVEL_MEMBER)
{
if(text.length() > 7)
{
std::string param = text.substr(8);
trimString(param);
Player* paramPlayer = NULL;
if(g_game.getPlayerByNameWildcard(param, paramPlayer) == RET_NOERROR)
{
if(paramPlayer->getGuildId() == 0)
{
InvitedToGuildsList::iterator it = std::find(paramPlayer->invitedToGuildsList.begin(),paramPlayer->invitedToGuildsList.end(), player->getGuildId());
if(it != paramPlayer->invitedToGuildsList.end())
{
sprintf(buffer, "%s has revoked your invite to %s guild.", player->getName().c_str(), (player->getSex(false) ? "his" : "her"));
paramPlayer->sendTextMessage(MSG_INFO_DESCR, buffer);
sprintf(buffer, "%s has revoked the guildinvite of %s.", player->getName().c_str(), paramPlayer->getName().c_str());
channel->talk(player, SPEAK_CHANNEL_W, buffer);
paramPlayer->invitedToGuildsList.erase(it);
return true;
}
else
player->sendCancel("A player with that name is not invited to your guild.");
}
else
player->sendCancel("A player with that name is already in a guild.");
}
else if(IOLoginData::getInstance()->playerExists(param))
{
uint32_t guid;
IOLoginData::getInstance()->getGuidByName(guid, param);
if(IOGuild::getInstance()->isInvited(player->getGuildId(), guid))
{
if(IOGuild::getInstance()->guildExists(player->getGuildId()))
{
sprintf(buffer, "%s has revoked the guildinvite of %s.", player->getName().c_str(), param.c_str());
channel->talk(player, SPEAK_CHANNEL_W, buffer);
IOGuild::getInstance()->revokeInvite(player->getGuildId(), guid);
}
else
player->sendCancel("It seems like your guild does not exist anymore.");
}
else
player->sendCancel("A player with that name is not invited to your guild.");
}
else
player->sendCancel("A player with that name does not exist.");
}
else
player->sendCancel("Invalid guildcommand parameters.");
}
else
player->sendCancel("You don't have rights to revoke an invite of someone in your guild.");
}
else if(text.substr(1, 7) == "promote" || text.substr(1, 6) == "demote" || text.substr(1, 14) == "passleadership" || text.substr(1, 4) == "kick")
{
if(player->getGuildLevel() == GUILDLEVEL_LEADER)
{
std::string param;
uint32_t length = 0;
if(text[2] == 'r')
length = 9;
else if(text[2] == 'e')
length = 7;
else if(text[2] == 'a')
length = 16;
else
length = 6;
if(text.length() < length)
{
player->sendCancel("Invalid guildcommand parameters.");
return true;
}
param = text.substr(length);
trimString(param);
Player* paramPlayer = NULL;
if(g_game.getPlayerByNameWildcard(param, paramPlayer) == RET_NOERROR)
{
if(paramPlayer->getGuildId())
{
if(IOGuild::getInstance()->guildExists(paramPlayer->getGuildId()))
{
if(player->getGuildId() == paramPlayer->getGuildId())
{
if(text[2] == 'r')
{
if(paramPlayer->getGuildLevel() == GUILDLEVEL_MEMBER)
{
if(paramPlayer->isPremium())
{
paramPlayer->setGuildLevel(GUILDLEVEL_VICE);
sprintf(buffer, "%s has promoted %s to %s.", player->getName().c_str(), paramPlayer->getName().c_str(), paramPlayer->getRankName().c_str());
channel->talk(player, SPEAK_CHANNEL_W, buffer);
}
else
player->sendCancel("A player with that name does not have a premium account.");
}
else
player->sendCancel("You can only promote Members to Vice-Leaders.");
}
else if(text[2] == 'e')
{
if(paramPlayer->getGuildLevel() == GUILDLEVEL_VICE)
{
paramPlayer->setGuildLevel(GUILDLEVEL_MEMBER);
sprintf(buffer, "%s has demoted %s to %s.", player->getName().c_str(), paramPlayer->getName().c_str(), paramPlayer->getRankName().c_str());
channel->talk(player, SPEAK_CHANNEL_W, buffer);
}
else
player->sendCancel("You can only demote Vice-Leaders to Members.");
}
else if(text[2] == 'a')
{
if(paramPlayer->getGuildLevel() == GUILDLEVEL_VICE)
{
const uint32_t levelToFormGuild = g_config.getNumber(ConfigManager::LEVEL_TO_FORM_GUILD);
if(paramPlayer->getLevel() >= levelToFormGuild)
{
paramPlayer->setGuildLevel(GUILDLEVEL_LEADER);
player->setGuildLevel(GUILDLEVEL_VICE);
IOGuild::getInstance()->updateOwnerId(paramPlayer->getGuildId(), paramPlayer->getGUID());
sprintf(buffer, "%s has passed the guild leadership to %s.", player->getName().c_str(), paramPlayer->getName().c_str());
channel->talk(player, SPEAK_CHANNEL_W, buffer);
}
else
{
sprintf(buffer, "The new guild leader has to be at least Level %d.", levelToFormGuild);
player->sendCancel(buffer);
}
}
else
player->sendCancel("A player with that name is not a Vice-Leader.");
}
else
{
if(player->getGuildLevel() > paramPlayer->getGuildLevel())
{
#ifdef __WAR_SYSTEM__
if(!player->hasEnemy())
{
#endif
sprintf(buffer, "%s has been kicked from the guild by %s.", paramPlayer->getName().c_str(), player->getName().c_str());
channel->talk(player, SPEAK_CHANNEL_W, buffer);
paramPlayer->leaveGuild();
#ifdef __WAR_SYSTEM__
}
else
player->sendCancel("Your guild is currently at war, you cannot kick right now.");
#endif
}
else
player->sendCancel("You may only kick players with a guild rank below your.");
}
}
else
player->sendCancel("You are not in the same guild as a player with that name.");
}
else
player->sendCancel("Could not find the guild of a player with that name.");
}
else
player->sendCancel("A player with that name is not in a guild.");
}
else if(IOLoginData::getInstance()->playerExists(param))
{
uint32_t guid;
IOLoginData::getInstance()->getGuidByName(guid, param);
if(IOGuild::getInstance()->hasGuild(guid))
{
if(player->getGuildId() == IOGuild::getInstance()->getGuildId(guid))
{
if(text[2] == 'r')
{
if(IOGuild::getInstance()->getGuildLevel(guid) == GUILDLEVEL_MEMBER)
{
if(IOLoginData::getInstance()->isPremium(guid))
{
IOGuild::getInstance()->setGuildLevel(guid, GUILDLEVEL_VICE);
sprintf(buffer, "%s has promoted %s to %s.", player->getName().c_str(), param.c_str(), IOGuild::getInstance()->getRank(guid).c_str());
channel->talk(player, SPEAK_CHANNEL_W, buffer);
}
else
player->sendCancel("A player with that name does not have a premium account.");
}
else
player->sendCancel("You can only promote Members to Vice-Leaders.");
}
else if(text[2] == 'e')
{
if(IOGuild::getInstance()->getGuildLevel(guid) == GUILDLEVEL_VICE)
{
IOGuild::getInstance()->setGuildLevel(guid, GUILDLEVEL_MEMBER);
sprintf(buffer, "%s has demoted %s to %s.", player->getName().c_str(), param.c_str(), IOGuild::getInstance()->getRank(guid).c_str());
channel->talk(player, SPEAK_CHANNEL_W, buffer);
}
else
player->sendCancel("You can only demote Vice-Leaders to Members.");
}
else if(text[2] == 'a')
{
if(IOGuild::getInstance()->getGuildLevel(guid) == GUILDLEVEL_VICE)
{
const uint32_t levelToFormGuild = g_config.getNumber(ConfigManager::LEVEL_TO_FORM_GUILD);
if(IOLoginData::getInstance()->getLevel(guid) >= levelToFormGuild)
{
IOGuild::getInstance()->setGuildLevel(guid, GUILDLEVEL_LEADER);
player->setGuildLevel(GUILDLEVEL_VICE);
sprintf(buffer, "%s has passed the guild leadership to %s.", player->getName().c_str(), param.c_str());
channel->talk(player, SPEAK_CHANNEL_W, buffer);
}
else
{
sprintf(buffer, "The new guild leader has to be at least Level %d.", levelToFormGuild);
player->sendCancel(buffer);
}
}
else
player->sendCancel("A player with that name is not a Vice-Leader.");
}
else
{
sprintf(buffer, "%s has been kicked from the guild by %s.", param.c_str(), player->getName().c_str());
channel->talk(player, SPEAK_CHANNEL_W, buffer);
IOLoginData::getInstance()->resetGuildInformation(guid);
}
}
}
else
player->sendCancel("A player with that name is not in a guild.");
}
else
player->sendCancel("A player with that name does not exist.");
}
else
player->sendCancel("You are not the leader of your guild.");
}
else if(text.substr(1, 4) == "nick" && text.length() > 5)
{
StringVec params = explodeString(text.substr(6), ",");
if(params.size() >= 2)
{
std::string param1 = params[0], param2 = params[1];
trimString(param1);
trimString(param2);
Player* paramPlayer = NULL;
if(g_game.getPlayerByNameWildcard(param1, paramPlayer) == RET_NOERROR)
{
if(paramPlayer->getGuildId())
{
if(param2.length() > 2)
{
if(param2.length() < 21)
{
if(isValidName(param2, false))
{
if(IOGuild::getInstance()->guildExists(paramPlayer->getGuildId()))
{
if(player->getGuildId() == paramPlayer->getGuildId())
{
if(paramPlayer->getGuildLevel() < player->getGuildLevel() || (player == paramPlayer && player->getGuildLevel() > GUILDLEVEL_MEMBER))
{
paramPlayer->setGuildNick(param2);
if(player != paramPlayer)
sprintf(buffer, "%s has set the guildnick of %s to \"%s\".", player->getName().c_str(), paramPlayer->getName().c_str(), param2.c_str());
else
sprintf(buffer, "%s has set %s guildnick to \"%s\".", player->getName().c_str(), (player->getSex(false) ? "his" : "her"), param2.c_str());
channel->talk(player, SPEAK_CHANNEL_W, buffer);
}
else
player->sendCancel("You may only change the guild nick of players that have a lower rank than you.");
}
else
player->sendCancel("A player with that name is not in your guild.");
}
else
player->sendCancel("A player with that name's guild could not be found.");
}
else
player->sendCancel("That guildnick is not valid.");
}
else
player->sendCancel("That guildnick is too long, please select a shorter one.");
}
else
player->sendCancel("That guildnick is too short, please select a longer one.");
}
else
player->sendCancel("A player with that name is not in a guild.");
}
else if(IOLoginData::getInstance()->playerExists(param1))
{
uint32_t guid;
IOLoginData::getInstance()->getGuidByName(guid, (std::string&)param1);
if(IOGuild::getInstance()->hasGuild(guid))
{
if(param2.length() > 2)
{
if(param2.length() < 21)
{
if(isValidName(param2, false))
{
if(IOGuild::getInstance()->guildExists(guid))
{
if(player->getGuildId() == IOGuild::getInstance()->getGuildId(guid))
{
if(IOGuild::getInstance()->getGuildLevel(guid) < player->getGuildLevel())
{
IOGuild::getInstance()->setGuildNick(guid, param2);
sprintf(buffer, "%s has set the guildnick of %s to \"%s\".", player->getName().c_str(), param1.c_str(), param2.c_str());
channel->talk(player, SPEAK_CHANNEL_W, buffer);
}
else
player->sendCancel("You may only change the guild nick of players that have a lower rank than you.");
}
else
player->sendCancel("A player with that name is not in your guild.");
}
else
player->sendCancel("A player with that name's guild could not be found.");
}
else
player->sendCancel("That guildnick is not valid.");
}
else
player->sendCancel("That guildnick is too long, please select a shorter one.");
}
else
player->sendCancel("That guildnick is too short, please select a longer one.");
}
else
player->sendCancel("A player with that name is not in any guild.");
}
else
player->sendCancel("A player with that name does not exist.");
}
else
player->sendCancel("Invalid guildcommand parameters.");
}
else if(text.substr(1, 11) == "setrankname" && text.length() > 12)
{
StringVec params = explodeString(text.substr(13), ",");
if(params.size() >= 2)
{
std::string param1 = params[0], param2 = params[1];
trimString(param1);
trimString(param2);
if(player->getGuildLevel() == GUILDLEVEL_LEADER)
{
if(param2.length() > 2)
{
if(param2.length() < 21)
{
if(isValidName(param2, false))
{
if(IOGuild::getInstance()->getRankIdByName(player->getGuildId(), param1))
{
if(!IOGuild::getInstance()->getRankIdByName(player->getGuildId(), param2))
{
IOGuild::getInstance()->changeRank(player->getGuildId(), param1, param2);
sprintf(buffer, "%s has renamed the guildrank: \"%s\", to: \"%s\".", player->getName().c_str(), param1.c_str(), param2.c_str());
channel->talk(player, SPEAK_CHANNEL_W, buffer);
}
else
player->sendCancel("There is already a rank in your guild with that name.");
}
else
player->sendCancel("There is no such rankname in your guild.");
}
else
player->sendCancel("The new guildrank contains invalid characters.");
}
else
player->sendCancel("The new rankname is too long.");
}
else
player->sendCancel("The new rankname is too short.");
}
else
player->sendCancel("You are not the leader of your guild.");
}
else
player->sendCancel("Invalid guildcommand parameters");
}
else if(text.substr(1, 7) == "setmotd")
{
if(player->getGuildLevel() == GUILDLEVEL_LEADER)
{
if(text.length() > 8)
{
std::string param = text.substr(9);
trimString(param);
if(param.length() > 2)
{
if(param.length() < 225)
{
IOGuild::getInstance()->setMotd(player->getGuildId(), param);
sprintf(buffer, "%s has set the Message of the Day to: %s", player->getName().c_str(), param.c_str());
channel->talk(player, SPEAK_CHANNEL_W, buffer);
}
else
player->sendCancel("That motd is too long.");
}
else
player->sendCancel("That motd is too short.");
}
else
player->sendCancel("Invalid guildcommand parameters.");
}
else
player->sendCancel("Only the leader of your guild can set the guild motd.");
}
else if(text.substr(1, 9) == "cleanmotd")
{
if(player->getGuildLevel() == GUILDLEVEL_LEADER)
{
IOGuild::getInstance()->setMotd(player->getGuildId(), "");
sprintf(buffer, "%s has cleaned the Message of the Day.", player->getName().c_str());
channel->talk(player, SPEAK_CHANNEL_W, buffer);
}
else
player->sendCancel("Only the leader of your guild can clean the guild motd.");
}
else if(text.substr(1, 8) == "commands")
player->sendToChannel(player, SPEAK_CHANNEL_W, "Guild commands with parameters: disband, invite[name], leave, kick[name], revoke[name], demote[name], promote[name], passleadership[name], nick[name, nick], setrankname[oldName, newName], setmotd[text] and cleanmotd.", CHANNEL_GUILD);
else
return false;
return true;
}
std::string Chat::getChannelName(Player* player, uint16_t channelId)
{
if(ChatChannel* channel = getChannel(player, channelId))
return channel->getName();
return "";
}
ChannelList Chat::getChannelList(Player* player)
{
ChannelList list;
if(!player || player->isRemoved())
return list;
ChatChannel* channel = NULL;
if(player->getParty() && ((channel = getChannel(player, CHANNEL_PARTY)) || (channel = createChannel(player, CHANNEL_PARTY))))
list.push_back(channel);
if(player->getGuildId() && player->getGuildName().length() && ((channel = getChannel(
player, CHANNEL_GUILD)) || (channel = createChannel(player, CHANNEL_GUILD))))
list.push_back(channel);
for(NormalChannelMap::iterator it = m_normalChannels.begin(); it != m_normalChannels.end(); ++it)
{
if((channel = getChannel(player, it->first)))
list.push_back(it->second);
}
bool hasPrivate = false;
PrivateChatChannel* privChannel = NULL;
for(PrivateChannelMap::iterator pit = m_privateChannels.begin(); pit != m_privateChannels.end(); ++pit)
{
if(!(privChannel = pit->second))
continue;
if(privChannel->isInvited(player))
list.push_back(privChannel);
if(privChannel->getOwner() == player->getGUID())
hasPrivate = true;
}
if(!hasPrivate && player->isPremium())
list.push_front(dummyPrivate);
return list;
}
ChatChannel* Chat::getChannel(Player* player, uint16_t channelId)
{
#ifdef __DEBUG_CHAT__
std::clog << "Chat::getChannel - getChannel id " << channelId << std::endl;
#endif
if(!player || player->isRemoved())
return false;
if(channelId == CHANNEL_GUILD)
{
GuildChannelMap::iterator git = m_guildChannels.find(player->getGuildId());
if(git != m_guildChannels.end())
return git->second;
return NULL;
}
if(channelId == CHANNEL_PARTY)
{
if(player->getParty())
{
PartyChannelMap::iterator it = m_partyChannels.find(player->getParty());
if(it != m_partyChannels.end())
return it->second;
}
return NULL;
}
NormalChannelMap::iterator nit = m_normalChannels.find(channelId);
if(nit != m_normalChannels.end())
{
#ifdef __DEBUG_CHAT__
std::clog << "Chat::getChannel - found normal channel" << std::endl;
#endif
ChatChannel* tmpChannel = nit->second;
if(!tmpChannel || !tmpChannel->hasFlag(CHANNELFLAG_ENABLED) || player->getAccess() < tmpChannel->getAccess()
|| (!player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges) && !tmpChannel->checkVocation(
player->getVocationId())))
{
#ifdef __DEBUG_CHAT__
std::clog << "Chat::getChannel - cannot access normal channel" << std::endl;
#endif
return NULL;
}
#ifdef __DEBUG_CHAT__
std::clog << "Chat::getChannel - endpoint return" << std::endl;
#endif
return tmpChannel;
}
PrivateChannelMap::iterator pit = m_privateChannels.find(channelId);
if(pit != m_privateChannels.end() && pit->second->isInvited(player))
return pit->second;
return NULL;
}
ChatChannel* Chat::getChannelById(uint16_t channelId)
{
NormalChannelMap::iterator it = m_normalChannels.find(channelId);
if(it != m_normalChannels.end())
return it->second;
return NULL;
}
PrivateChatChannel* Chat::getPrivateChannel(Player* player)
{
if(!player || player->isRemoved())
return NULL;
PrivateChatChannel* channel = NULL;
for(PrivateChannelMap::iterator it = m_privateChannels.begin(); it != m_privateChannels.end(); ++it)
{
if((channel = it->second) && channel->getOwner() == player->getGUID())
return channel;
}
return NULL;
}
ChannelList Chat::getPublicChannels() const
{
ChannelList list;
for(NormalChannelMap::const_iterator it = m_normalChannels.begin(); it != m_normalChannels.end(); ++it)
{
if(isPublicChannel(it->first))
list.push_back(it->second);
}
return list;
}
| [
"leandro_perrotta@hotmail.com"
] | leandro_perrotta@hotmail.com |
612c95d1d88fa0abcd9a073d2c5982bff47c193f | aca92af686bc8a4b64a5c5ce2173d28e55f73d34 | /ConsoleApplication1/Square.h | 284290eded9a703e8179f34344b3229c6095c2de | [] | no_license | skylerWithAnE/CGFPS | a42ed4dff3d0e9fa74415a6e9316eb1688c1b7d7 | 9ff6e162a5ef51cb8f4eac3b8c8030dc1b4fcd2c | refs/heads/master | 2021-05-01T02:26:50.107800 | 2017-05-04T12:43:09 | 2017-05-04T12:43:09 | 79,923,249 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,503 | h | #pragma once
#include "Program.h"
#include "Texture.h"
class Square {
public:
static int vao;
Texture2D* tex;
Square(Texture2D* tex = NULL) {
this->tex = tex;
if (Square::vao == 0) {
GLuint tmp[1];
glGenVertexArrays(1, tmp);
Square::vao = tmp[0];
glBindVertexArray(Square::vao);
float vdata[] = {
-1, 1, -1,
-1,-1, -1,
1,-1, -1,
1, 1, -1
};
glGenBuffers(1, tmp);
GLuint vbuff = tmp[0];
glBindBuffer(GL_ARRAY_BUFFER, vbuff);
glBufferData(GL_ARRAY_BUFFER, sizeof(vdata), vdata, GL_STATIC_DRAW);
glEnableVertexAttribArray(Program::POSITION_INDEX);
glVertexAttribPointer(Program::POSITION_INDEX, 3, GL_FLOAT, false, 3 * 4, 0);
float tdata[] = {
0,1,
0,0,
1,0,
1,1
};
glGenBuffers(1, tmp);
GLuint tbuff = tmp[0];
glBindBuffer(GL_ARRAY_BUFFER, tbuff);
glBufferData(GL_ARRAY_BUFFER, sizeof(tdata), tdata, GL_STATIC_DRAW);
glEnableVertexAttribArray(Program::TEXCOORD_INDEX);
glVertexAttribPointer(Program::TEXCOORD_INDEX, 2, GL_FLOAT, false, 2 * 4, 0);
GLushort idata[] = {
0,1,2, 0,2,3
};
glGenBuffers(1, tmp);
GLuint ibuff = tmp[0];
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ibuff);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(idata), idata, GL_STATIC_DRAW);
glBindVertexArray(0);
}
}
void draw(Program* prog) {
if (this->tex)
prog->setUniform("tex", this->tex);
glBindVertexArray(Square::vao);
glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0);
}
};
| [
"mdcrabtree2@gmail.com"
] | mdcrabtree2@gmail.com |
f2295f891350a776b0d8ef9887e9d601023bd2c0 | e6819d7f98eb108d3b98fc91426cf1c324a6ed3c | /test.cpp | 0f2184cf47ae33c63e63694f0e355c4e3da412a3 | [] | no_license | likelyzhao/testjenkins | 08b0073597e4bdec0547554a54b7a47ef066ac46 | 3dcd65fbdee75b620a605aeec4eb679df2143bfa | refs/heads/master | 2021-01-01T04:40:34.195696 | 2016-05-14T15:16:38 | 2016-05-14T15:16:38 | 58,788,088 | 0 | 0 | null | 2016-05-14T15:16:38 | 2016-05-14T03:48:28 | C++ | UTF-8 | C++ | false | false | 86 | cpp | #include "stdio.h"
int main()
{
printf("hello world\n");
printf("now update\n");
}
| [
"likely_zhao@163.com"
] | likely_zhao@163.com |
2d8dd9720d5301311772754a26c8c07f8a02d950 | 5b953eff4d283a84460c5e7ff504006243cf69b0 | /chapter03/MyDial/mydial.h | 712658aa8b7741c1479a055c6af085a4091dd8ba | [] | no_license | zgbzsu2008/qt5-development-practice | a0ea136b4ea38114d3433ffe2b1798a16e1ab1ce | c45361ca72e2326b6770f428a244b69dc2033679 | refs/heads/master | 2020-06-02T07:49:03.204867 | 2019-06-11T16:58:53 | 2019-06-11T16:58:53 | 191,088,133 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 281 | h | #pragma once
#include <QtWidgets/QWidget>
//#include "ui_mydial.h"
#include <qdial.h>
class MyDial : public QWidget
{
Q_OBJECT
public:
MyDial(QWidget *parent = Q_NULLPTR);
private slots:
void changeData();
private:
//Ui::MyDialClass ui;
QDial *dial[3];
};
| [
"zgbzsu2008@163.com"
] | zgbzsu2008@163.com |
9b3271a8c81eaa857eba386419385f60d194431e | 814b7bca53ec968889de51d879940f28ab673a23 | /src/Editor/GuiWindow.cpp | c5d3095ce957ce4f6d96aa831842721c43d30ed9 | [] | no_license | edvinsternvik/glGame | 228ce8f12d0486ff0e204ae1b324c7a1aae6b887 | dad28786b16841608ffc2142dc99c1fb670de6fb | refs/heads/master | 2023-05-31T14:25:25.794042 | 2023-05-13T14:55:47 | 2023-05-13T14:55:47 | 206,394,689 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,315 | cpp | #include "GuiWindow.h"
#include "../Resources/Scene.h"
#include "Editor.h"
#include "../Input.h"
#include <imgui/imgui.h>
#include <imgui/imgui_impl_glfw.h>
#include <imgui/imgui_impl_opengl3.h>
#include <iostream>
namespace glGame {
SceneWindow::SceneWindow(Scene* scene) : m_scene(scene) {
}
SceneWindow::SceneWindow() : m_scene(nullptr) {
}
void SceneWindow::renderWindow() {
if(m_scene == nullptr) return;
if (ImGui::Button("Create GameObject", ImVec2(0, 0))) {
std::shared_ptr<GameObject> newGameObject = m_scene->createGameObject("New GameObject");
m_editor->actionManager.addCreateGameObjectAction(newGameObject, m_scene);
}
ImGui::Separator();
GameObject* current = nullptr;
if(!m_editor->getSelectedItem<GameObject>().expired()) current = m_editor->getSelectedItem<GameObject>().lock().get();
int gameObjects = m_scene->getGameObjectCount();
for (int i = 0; i < gameObjects; ++i) {
bool selected = (current == m_scene->getGameObjectByIndex(i).lock().get());
ImGui::PushID(i);
if (ImGui::Selectable(m_scene->getGameObjectByIndex(i).lock()->name.c_str(), selected, ImGuiSelectableFlags_SpanAllColumns)) {
std::weak_ptr<GameObject> gameObjectWeak = m_scene->getGameObjectByIndex(i);
m_editor->selectItem(gameObjectWeak);
}
ImGui::PopID();
}
}
} | [
"e.sternvik@gmail.com"
] | e.sternvik@gmail.com |
6b1d7a84ecbff0c9da02de128189bbc7c71e322a | 57f89bfe66c3383078d87e7fdcff7b048696545d | /example/model-loading/main.cc | 088ffa7dbe54ed51097c4a31f380165e12826810 | [] | no_license | awkr/LearnOpenGL | 09f72e587cf85b523fef88e6eed18dd05ca74211 | d4b6ccc765b9ea2062db60c4074ebc352c6e3d0e | refs/heads/main | 2023-03-31T05:01:09.922105 | 2021-03-28T13:26:12 | 2021-03-28T13:26:12 | 347,926,540 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,828 | cc | #define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>
#include <glad/glad.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <iostream>
#include <base/camera.h>
#include <base/model.h>
#include <base/shader.h>
// settings
const int WIN_WIDTH = 800;
const int WIN_HEIGHT = 600;
// camera
Camera camera(glm::vec3(.0f, 10.0f, 30.0f));
bool firstMouse = true;
double lastX = .0;
double lastY = .0;
// timing
float deltaTime = .0f; // time between current frame and last frame
float lastFrame = .0f;
void framebufferSizeCallback(GLFWwindow *window, int width, int height);
void mouseCallback(GLFWwindow *window, double x, double y);
void scrollCallback(GLFWwindow *window, double xOffset, double yOffset);
void processInput(GLFWwindow *window);
int main(int argc, char **argv) {
if (!glfwInit()) {
std::cerr << "failed to init GLFW" << std::endl;
return EXIT_FAILURE;
}
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
#ifdef __APPLE__
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
#endif
GLFWwindow *window;
// create a windowed mode window and its OpenGL context
if (window = glfwCreateWindow(WIN_WIDTH, WIN_HEIGHT, "Hello CG", nullptr, nullptr); !window) {
glfwTerminate();
return EXIT_FAILURE;
}
glfwMakeContextCurrent(window); // make the window's context current
glfwSetFramebufferSizeCallback(window, framebufferSizeCallback);
glfwSetCursorPosCallback(window, mouseCallback);
glfwSetScrollCallback(window, scrollCallback);
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED);
// load all OpenGL function pointers
if (!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)) {
std::cerr << "failed to initialize GLAD" << std::endl;
return EXIT_FAILURE;
}
int attrCount;
glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &attrCount);
std::cout << "GL_MAX_VERTEX_ATTRIBS: " << attrCount << std::endl;
std::cout << "size of GLfloat: " << sizeof(GLfloat) << " byte(s)" << std::endl;
// configure global opengl state
glad_glEnable(GL_DEPTH_TEST);
// build and compile shaders
Shader shader("shaders/model_loading.vert", "shaders/model_loading.frag");
// load model
Model ourModel("nanosuit/nanosuit.obj");
while (!glfwWindowShouldClose(window)) {
double currentFrame = glfwGetTime();
deltaTime = currentFrame - lastFrame;
lastFrame = currentFrame;
processInput(window);
// render
glClearColor(0.2f, 0.3f, 0.3f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
shader.use();
// view/projection transformations
glm::mat4 projection =
glm::perspective(glm::radians(camera.zoom), (float)WIN_WIDTH / (float)WIN_HEIGHT, 0.1f, 100.0f);
glm::mat4 view = camera.getViewMatrix();
shader.setMat4("projection", projection);
shader.setMat4("view", view);
// render the loaded model
glm::mat4 model = glm::mat4(1.0f);
model = glm::translate(model, glm::vec3(0.0f, 0.0f, 0.0f)); // translate it down so it's at the center of the scene
model = glm::scale(model, glm::vec3(1.0f, 1.0f, 1.0f)); // it's a bit too big for our scene, so scale it down
shader.setMat4("model", model);
ourModel.draw(shader);
/* Swap front and back buffers */
glfwSwapBuffers(window);
/* Poll for and process events */
glfwPollEvents();
}
glfwTerminate();
return EXIT_SUCCESS;
}
void mouseCallback(GLFWwindow *window, double x, double y) {
if (firstMouse) {
lastX = x;
lastY = y;
firstMouse = false;
}
auto xOffset = lastX - x;
auto yOffset = y - lastY;
lastX = x;
lastY = y;
camera.processMouseMovement(xOffset, yOffset);
}
void scrollCallback(GLFWwindow *window, double xOffset, double yOffset) { camera.processMouseScroll(yOffset); }
// glfw: whenever the window size changed, this callback function executes
void framebufferSizeCallback(GLFWwindow *window, int width, int height) {
// make sure the viewport matches the new window dimensions; note that width and height will be significantly larger
// than specified on retina displays
glViewport(0, 0, width, height);
}
void processInput(GLFWwindow *window) {
if (glfwGetKey(window, GLFW_KEY_ESCAPE) == GLFW_PRESS)
glfwSetWindowShouldClose(window, true);
if (glfwGetKey(window, GLFW_KEY_W) == GLFW_PRESS) {
camera.processKeyboard(FORWARD, deltaTime);
} else if (glfwGetKey(window, GLFW_KEY_S) == GLFW_PRESS) {
camera.processKeyboard(BACKWARD, deltaTime);
} else if (glfwGetKey(window, GLFW_KEY_A) == GLFW_PRESS) {
camera.processKeyboard(LEFT, deltaTime);
} else if (glfwGetKey(window, GLFW_KEY_D) == GLFW_PRESS) {
camera.processKeyboard(RIGHT, deltaTime);
}
}
| [
"zhu.life@gmail.com"
] | zhu.life@gmail.com |
2b55ab34ca53cd92ea6f555898a7c42370382f61 | 666f25de2586ae5252653b39802acbfb35aa0dbb | /practical_exercises/10_day_practice/day9/exception/7-1.cpp | 60fb10ccd298cbd1a070ef98ee2122f31961d2bf | [] | no_license | wangning7149/CPlusPlusThings | 16b9e0fac4d05989f1875ba256daccda746e3af5 | 334d4134e4b3e9d99f838494923db76afc74bc35 | refs/heads/master | 2023-04-23T19:32:55.309042 | 2023-04-01T05:58:16 | 2023-04-01T05:58:16 | 279,726,373 | 0 | 1 | null | 2023-04-01T05:58:17 | 2020-07-15T00:54:48 | null | UTF-8 | C++ | false | false | 608 | cpp | // Eg10-9.cpp
#include <iostream>
using namespace std;
class A {
int a;
public:
A(int i = 0) : a(i) {}
~A() { cout << "in A destructor..." << endl; }
};
class B {
A obj[3];
double *pb[10];
public:
B(int k) {
cout << "int B constructor..." << endl;
for (int i = 0; i < 10; i++) {
pb[i] = new double[20000000];
if (pb[i] == 0)
throw i;
else
cout << "Allocated 20000000 doubles in pb[" << i << "]" << endl;
}
}
};
int main() {
try {
B b(2);
} catch (int e) {
cout << "catch an exception when allocated pb[" << e << "]" << endl;
}
}
| [
"455954986@qq.com"
] | 455954986@qq.com |
fdeac9d74ebaf1ad149fd9be1a4954ca370e5821 | a46296e5a9aa2131dbca8faa1d1fa35109a6ea3f | /iOS_Developer/DevelopGuide_iOS/DevelopGuide_iOS/dwvlt_v3.0_0522/M3Core_iOS4/source/MPFDrawer/GraphicFormatParser/WMF/Meta/Header/.svn/text-base/XdwGraphicFormatWMFMetaPolylineRecord.h.svn-base | 708587c494299a57ee3d0419cbd39e87b92638bb | [] | no_license | fourglod/iOSDevelopment | df0ae061c2dc5480cdaed9a4e04acd13b1a85815 | 9362143a0a423232a5c6cac787b84840cd2564b3 | refs/heads/master | 2021-06-14T09:24:28.627123 | 2017-01-11T03:10:10 | 2017-01-11T03:10:10 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,353 | /**
* @file XdwGraphicFormatWMFMetaPolylineRecord.h
* @brief XdwGraphicFormat::WMF::Meta::PolylineRecordクラスの定義
*
* @author DPC DS&S STD T31G Tomohiro Yamada <Tomohiro.Yamada@fujiexreox.co.jp>
* @date 2002-3-28
* @version 1.0
* $Id: XdwGraphicFormatWMFMetaPolylineRecord.h,v 1.4 2009/12/22 08:10:48 chikyu Exp $
*
* Copyright (C) 2002 Fuji Xerox Co., Ltd.
*/
#ifndef _XDW_GRAPHICFORMAT_WMF_META_POLYLINE_RECORD_H_
#define _XDW_GRAPHICFORMAT_WMF_META_POLYLINE_RECORD_H_
/* パッケージを記述するためのIncludeファイル */
#include "XdwGraphicFormatWMFMeta.h"
/* 親クラスのIncludeファイル */
#include "XdwGraphicFormatWMFMetaPolyRecord.h"
/**
* @brief META_POLYLINEレコードを規定するクラス
*
*/
class XdwGraphicFormat::WMF::Meta::PolylineRecord : public XdwGraphicFormat::WMF::Meta::PolyRecord
{
public:
/********************************************/
/* メソッド */
/**
* @brief デフォルトコンストラクタ
*/
PolylineRecord();
/**
* @brief デストラクタ
*/
virtual ~PolylineRecord();
/**
* @brief META_POLYLINEレコードをパースする
*
* 座標配列を読み込み、描画する
*
* @return XdwErrorCode参照
*/
virtual XdwErrorCode Parse();
protected:
};
#endif
| [
"yang_jinxin@navercorp.com"
] | yang_jinxin@navercorp.com | |
40e9d23cb9870b048ec399920fca58dda3c78e52 | b8144bc060797c9fb7b51fd3c8960d3c21aaf61b | /Final Project/Maze.cpp | 0099d767e836bcb5f2b9154617f63bd36d812956 | [
"MIT"
] | permissive | gumgl/C | b384a9b95d1795e6a5ca245ac4f5e227798a786d | 83f1c19413294df561368ee5758358504513e1b5 | refs/heads/master | 2016-08-03T21:37:09.819580 | 2015-03-06T19:44:42 | 2015-03-06T19:44:42 | 26,712,684 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 18,627 | cpp | #include <iostream>
#include "Maze.h";
using namespace std;
Maze::Maze()
{
srand((unsigned int) time(NULL));
NO_CLIP = false;
BREAK = false;
TRAIL = SHOW_TRAIL;
USE_PRIM = false;
}
Maze::Maze(bool type)
{
srand((unsigned int) time(NULL));
NO_CLIP = false;
BREAK = false;
TRAIL = SHOW_TRAIL;
USE_PRIM = type;
}
void Maze::Go()
{
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hOut, 0x07); // Reset the text color
distTraveled = 0;
gridSize = GetSize();
maze = new Cell* [gridSize]; // Building the array of pointers to cells
for (int i = 0; i < gridSize; i++)
maze[i] = new Cell [gridSize];
Initilize();
//playerPos.Set(random(0, gridSize - 1), random(0, gridSize - 1)); // To start player @ random position
playerPos.Set(0, 0); // We start @ top-left corner
portalPos.Set(-1, -1); // We hide the portal so that Generate knows to position the portal
system("cls");
if (USE_PRIM)
GeneratePrim();
else
Generate(playerPos); // Generate the maze from the starting position
ShowWindow(GetConsoleWindow(), SW_MAXIMIZE);
/*ShowWindow(GetConsoleWindow(), SW_HIDE); // Hide console window
ShowWindow(GetConsoleWindow(), SW_SHOW); // Show console window
MoveWindow(GetConsoleWindow(), 200, 0, 800, 1000, true);*/
Draw();
while (true)
{
Key key = GetMove(); // Gets a valid move
if (key == QUIT) // If user wants to quit
{
COORD position = {0, gridSize * 2 + 3}; // Set cursor position to under the grid
SetConsoleCursorPosition(hOut, position);
SetConsoleTextAttribute(hOut, 0x07); // Reset the text color (was altered by maze)
cout << "Game Aborted. You moved " << distTraveled << " times.\n\n";
break;
}
else // User did a valid move
{
MakeMove(key);
}
if (playerPos == finishPos) // Reached the end and wins
{
COORD position = {0, gridSize * 2 + 3};
SetConsoleCursorPosition(hOut, position);
SetConsoleTextAttribute(hOut, 0x07);
cout << "Congrats! You have won in " << distTraveled << " steps!\n\n";
break;
}
}
// Overides the standard message
cout << "Press any key to quit . . . ";
system("pause > nul");
}
int Maze::GetSize()
{
int size;
cout << "Enter width of maze (" << MINSIZE << " to " << MAXSIZE << "): ";
cin >> size;
while (size < MINSIZE || size > MAXSIZE)
{
cout << "Invalid response, enter width (" << MINSIZE << " to " << MAXSIZE << "): ";
cin >> size;
}
return size;
}
void Maze::Initilize()
{
int row;
int col;
for (row = 0; row < gridSize; row++)
{
for (col = 0; col < gridSize; col++)
{
maze[row][col].top = true;
maze[row][col].right = true;
maze[row][col].bottom = true;
maze[row][col].left = true;
maze[row][col].visited = false;
}
}
}
void Maze::Generate(Coord startPos)
{
Coord DIRECTIONS[4]; // Lists the possible directions, so we can loop through them
DIRECTIONS[0].Set(-1, 0);
DIRECTIONS[1].Set(0, 1);
DIRECTIONS[2].Set(1, 0);
DIRECTIONS[3].Set(0, -1);
int currDist; // Keeps track of the current distance from start (is equal to positions.Size())
int maxDist = 0; // Keeps track of the longest distance from start (so we place the end point at the right spot)
Coord currPos = startPos; // Start generating from provided coordinate
Coord newPos; // Next position to go
Coord currDirection; // We need to save the current direction in a variable because we need it more than once (moving, breaking the walls)
Stack positions; // Saves all the positions where we go
Stack directions(4); // Current possible directions depending on grid boundaries and visited
bool hidePortal = (portalPos == playerPos); // 1st time we display the portal, but not 2nd time (if player currently is on portal)
positions.Push(currPos); // Add current position to stack because our loop needs the top position in stack
while (positions.Size() > 0) // While away from start point
{
currPos = positions.Pop(); // Get top position
positions.Push(currPos); // Put it back
currDist = positions.Size(); // This is our distance from start point
maze[currPos.Y][currPos.X].visited = true; // We visited this
if (currDist > maxDist) // If we are farther than our max
maxDist = currDist; // Save the new max
directions.Clear(); // Empty the stack
for (int count = 0; count < 4; count ++) // Search for all possible directions in directions and add them in stack
{
newPos = currPos + DIRECTIONS[count]; // Adding the possible direction to where we are, so that we can check if new position is valid
if (newPos.X >= 0 && newPos.X < gridSize && newPos.Y >= 0 && newPos.Y < gridSize) // If it is in boundaries of maze
if (!maze[newPos.Y][newPos.X].visited) // If never visited
directions.Push(DIRECTIONS[count]); // Add this direction to possible directions
}
if (directions.Size() > 0) // If we can go somewhere
{
currDirection = directions.GetRandom(); // Get a random direction
newPos = currPos + currDirection; // Calculate new position
for (int count = 0; count < 4; count ++) // Loop through all directions (up down left right) and depending on index, we know which way we went
{
if (currDirection == DIRECTIONS[count])
{
switch (count)
{
case 0: // going up
maze[currPos.Y][currPos.X].top = false;
maze[newPos.Y][newPos.X].bottom = false;
break;
case 1: // going right
maze[currPos.Y][currPos.X].right = false;
maze[newPos.Y][newPos.X].left = false;
break;
case 2: // going down
maze[currPos.Y][currPos.X].bottom = false;
maze[newPos.Y][newPos.X].top = false;
break;
case 3: // going left
maze[currPos.Y][currPos.X].left = false;
maze[newPos.Y][newPos.X].right = false;
break;
}
}
}
positions.Push(newPos); // Add new position to stack
}
else // no possible direction, go back
{
if (currDist == maxDist) // If we just set the max distance to our current distance, then we are the farthest from the start
{
portalPos = positions.GetRandom(positions.Size() / 2, (positions.Size() * 3) / 4); // Get a random position between 1/2 and 3/4 of all positions
finishPos = positions.Pop(); // finish is where we are right now and we remove that spot from stack (we are going back)
}
else
positions.Pop(); // Just go back by removing current position.stop
}
}
if (hidePortal)
{
portalPos.Set(-1, -1); // Set it outside of boundaries, so it will not be displayed and therefore not reached
}
}
void Maze::GeneratePrim()
{
Coord DIRECTIONS[4]; // Lists the possible directions, so we can loop through them
DIRECTIONS[0].Set(-1, 0);
DIRECTIONS[1].Set(0, 1);
DIRECTIONS[2].Set(1, 0);
DIRECTIONS[3].Set(0, -1);
portalPos.Set(-1, -1);
finishPos.Set(gridSize - 1, gridSize - 1);
Stack branches;
Coord currPos(0, 0); // Start generating from provided coordinate
Coord newPos; // Next position to go
Coord currDirection; // We need to save the current direction in a variable because we need it more than once (moving, breaking the walls)
branches.Push(currPos);
while (branches.Size() > 0) // While away from start point
{
branches.Shuffle();
currPos = branches.Pop(); // Get top position
maze[currPos.Y][currPos.X].visited = true; // We visited this
/*portalPos.Set(currPos.Y, currPos.X);
Draw();
system("pause");*/
Stack directions(4); // Current possible directions depending on grid boundaries and visited
for (int count = 0; count < 4; count ++) // Search for all possible directions and add them in stack
{
newPos = currPos + DIRECTIONS[count]; // Adding the possible direction to where we are, so that we can check if new position is valid
if (newPos.X >= 0 && newPos.X < gridSize && newPos.Y >= 0 && newPos.Y < gridSize) // If it is in boundaries of maze
if (maze[newPos.Y][newPos.X].visited == false) // If never visited
directions.Push(DIRECTIONS[count]); // Add this direction to possible directions
}
if (directions.Size() > 0) // If we can go somewhere
{
directions.Shuffle();
currDirection = directions.Pop(); // Get a random direction
newPos = currPos + currDirection; // Calculate new position
branches.Push(newPos); // Add new position to stack
maze[newPos.Y][newPos.X].visited = true;
for (int count = 0; count < 4; count ++) // Loop through all directions (up down left right) and depending on index, we know which way we went
{
if (currDirection == DIRECTIONS[count])
{
switch (count)
{
case 0: // going up
maze[currPos.Y][currPos.X].top = false;
maze[newPos.Y][newPos.X].bottom = false;
break;
case 1: // going right
maze[currPos.Y][currPos.X].right = false;
maze[newPos.Y][newPos.X].left = false;
break;
case 2: // going down
maze[currPos.Y][currPos.X].bottom = false;
maze[newPos.Y][newPos.X].top = false;
break;
case 3: // going left
maze[currPos.Y][currPos.X].left = false;
maze[newPos.Y][newPos.X].right = false;
break;
}
break;
}
}
if (directions.Size() > 1) // If we can still go somewhere else
branches.Push(currPos); // Save that spot for later
}
}
}
void Maze::Draw()
{
Intersection SINGLE[] = {{' ', false, false, false, false},// (SPACE)
{218, false, true, true, false},// ┌
{191, false, false, true, true},// ┐
{217, true, false, false, true},// ┘
{192, true, true, false, false},// └
{196, false, true, false, true},// ─
{179, true, false, true, false},// │
{194, false, true, true, true},// ┬
{180, true, false, true, true},// ┤
{193, true, true, false, true},// ┴
{195, true, true, true, false},// ├
{197, true, true, true, true}};// ┼
Intersection DOUBLE[] = {{' ', false, false, false, false},// (SPACE)
{201, false, true, true, false},// ╔
{187, false, false, true, true},// ╗
{188, true, false, false, true},// ╝
{200, true, true, false, false},// ╚
{205, false, true, false, true},// ═
{186, true, false, true, false},// ║
{203, false, true, true, true},// ╦
{185, true, false, true, true},// ╣
{202, true, true, false, true},// ╩
{204, true, true, true, false},// ╠
{206, true, true, true, true}};// ╬
Intersection * style = SINGLE;
if (DOUBLE_WALLS)
style = DOUBLE;
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
system("cls");
SetConsoleTextAttribute(hOut, WALLS_COLOR);
for (int row = 0; row <= gridSize * 2; row ++) // Draw Rows
{
if (row % 2 == 0) // If row is even, draw border row
{
for (int col = 0; col <= gridSize * 2; col ++)
{
if (col % 2 == 0) // If col is even, draw connection
{
// Depending on the cell position, we only check the connections that matter (we can't check outside of boundaries)
Intersection requirements = {' ', false, false, false, false}; // Start with no connection
if (row == 0) // Top row
{
if (col == 0) // Leftmost column
{
requirements.B = maze[row / 2][col / 2].left;
requirements.R = maze[row / 2][col / 2].top;
}
else if (col == gridSize * 2) // Rightmost column
{
requirements.B = maze[row / 2][col / 2 - 1].right;
requirements.L = maze[row / 2][col / 2 - 1].top;
}
else // anything in between
{
requirements.B = maze[row / 2][col / 2].left;
requirements.L = maze[row / 2][col / 2 - 1].top;
requirements.R = maze[row / 2][col / 2].top;
}
}
else if (row == gridSize * 2) // Bottom row
{
if (col == 0) // Leftmost column
{
requirements.T = maze[row / 2 - 1][col / 2].left;
requirements.R = maze[row / 2 - 1][col / 2].bottom;
}
else if (col == gridSize * 2) // Rightmost column
{
requirements.T = maze[row / 2 - 1][col / 2 - 1].right;
requirements.L = maze[row / 2 - 1][col / 2 - 1].bottom;
}
else // anything in between
{
requirements.T = maze[row / 2 - 1][col / 2].left;
requirements.L = maze[row / 2 - 1][col / 2 - 1].bottom;
requirements.R = maze[row / 2 - 1][col / 2].bottom;
}
}
else // anything in between
{
if (col == 0) // Leftmost column
{
requirements.T = maze[row / 2 - 1][col / 2].left;
requirements.B = maze[row / 2][col / 2].left;
requirements.R = maze[row / 2][col / 2].top;
}
else if (col == gridSize * 2) // Rightmost column
{
requirements.T = maze[row / 2 - 1][col / 2 - 1].right;
requirements.B = maze[row / 2][col / 2 - 1].right;
requirements.L = maze[row / 2][col / 2 - 1].top;
}
else // anything in between
{
requirements.T = maze[row / 2 - 1][col / 2].left;
requirements.L = maze[row / 2][col / 2 - 1].top;
requirements.B = maze[row / 2][col / 2].left;
requirements.R = maze[row / 2][col / 2].top;
}
}
int type;
for (type = 0; type < 12; type ++) // Search in the preset intersections according to our requirements
if (requirements.T == style[type].T &&
requirements.R == style[type].R &&
requirements.B == style[type].B &&
requirements.L == style[type].L)
break;
if (type == 12) // If it was not found in array of preset intersections
cout << ' ';
else
cout << style[type].C; // Display the correct intersection
}
else // col is odd, draw horizontal line
{
if (row == gridSize * 2) // If bottom row, look the cell above
{
if (maze[row / 2 - 1][col / 2].bottom)
cout << style[5].C;
else
cout << ' ';
}
else
{
if (maze[row / 2][col / 2].top) // Look at current cell, which is under that line
cout << style[5].C;
else
cout << ' ';
}
}
}
}
else // row is odd, draw content row
{
for (int col = 0; col <= gridSize * 2; col ++)
{
if (col % 2 == 0) // If col is even, draw vertical line
{
if (col == gridSize * 2) // If rightmost col, look left
{
if (maze[row / 2][col / 2 - 1].right)
cout << style[6].C;
else
cout << ' ';
}
else
{
if (maze[row / 2][col / 2].left) // Look at current cell, which is to the right
cout << style[6].C;
else
cout << ' ';
}
}
else // col is odd, draw content
{
Coord currPos(row / 2, col / 2); // Save current position into a Coord, so that we can compare using operator== (instead of .Y==row && .X==col)
if (currPos == playerPos)
{
SetConsoleTextAttribute(hOut, PLAYER_COLOR); // Change color
cout << PLAYER_CHAR;
}
else if (currPos == portalPos)
{
SetConsoleTextAttribute(hOut, PORTAL_COLOR); // Change color
cout << PORTAL_CHAR;
}
else if (currPos == finishPos)
{
SetConsoleTextAttribute(hOut, FINISH_COLOR); // Change color
cout << FINISH_CHAR;
}/*
else if (maze[currPos.Y][currPos.X].visited)
cout << 'V';*/
else
cout << EMPTY_CHAR;
SetConsoleTextAttribute(hOut, WALLS_COLOR); // Reset color for the walls
}
}
}
cout << endl; // This line is done
}
cout << "Use the arrow keys to move, Q to quit";
}
Key Maze::GetMove()
{
do
{
int key = getch(); // Wait for keyboard input
if (key == 81) // Q becomes q
key = 113;
if (key == QUIT)
return QUIT;
if ((key == 110 || key == 78) && NO_CLIP_ENABLED) // 'n' or 'N' and cheat is usable, switch on/off
NO_CLIP ^= true;
if ((key == 98 || key == 66) && BREAK_ENABLED) // 'b' or 'B' and cheat is usable, switch on/off
{
BREAK ^= true;
NO_CLIP = BREAK;
}
if (key == 116 || key == 84) // 't' or 'T'
TRAIL ^= true;
if ((key == RIGHT || key == LEFT || key == UP || key == DOWN) && (NO_CLIP || BREAK)) // If NO_CLIP and arrow key, then we don't care about walls
return (Key) key;
if (key == RIGHT && maze[playerPos.Y][playerPos.X].right == false) // If there is no wall
return RIGHT;
if (key == LEFT && maze[playerPos.Y][playerPos.X].left == false)
return LEFT;
if (key == UP && maze[playerPos.Y][playerPos.X].top == false)
return UP;
if (key == DOWN && maze[playerPos.Y][playerPos.X].bottom == false)
return DOWN;
}
while(true); // Will only exit is something is being returned (valid key press)
}
void Maze::MakeMove(Key key)
{
COORD position = {(playerPos.X * 2) + 1, (playerPos.Y * 2) + 1}; // Going from position in grid to position in console (takes into account the borders)
// Removes the flashing cursor
CONSOLE_CURSOR_INFO cciInfo;
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
cciInfo.dwSize = 1;
cciInfo.bVisible = false;
SetConsoleCursorInfo(hOut, &cciInfo);
distTraveled++;
SetConsoleCursorPosition(hOut, position);
if (TRAIL)
{
SetConsoleTextAttribute(hOut, TRAIL_COLOR); // Set color for breadcrumbs
cout << TRAIL_CHAR; // Print breadcrumb over player's old position
}
else
cout << EMPTY_CHAR;
if (BREAK)
{
position.X = (playerPos.X * 2) + 1; // From position in grid to position in console
position.Y = (playerPos.Y * 2) + 1;
if (key == RIGHT)
{
position.X += 1;
maze[playerPos.Y][playerPos.X].right = false;
maze[playerPos.Y][playerPos.X + 1].left = false;
}
else if (key == LEFT)
{
position.X -= 1;
maze[playerPos.Y][playerPos.X].left = false;
maze[playerPos.Y][playerPos.X - 1].right = false;
}
else if (key == UP)
{
position.Y -= 1;
maze[playerPos.Y][playerPos.X].top = false;
maze[playerPos.Y - 1][playerPos.X].bottom = false;
}
else //key == DOWN
{
position.Y += 1;
maze[playerPos.Y][playerPos.X].bottom = false;
maze[playerPos.Y + 1][playerPos.X].top = false;
}
SetConsoleCursorPosition(hOut, position);
cout << EMPTY_CHAR;
}
// We move the player:
if (key == RIGHT)
playerPos.X += 1;
else if (key == LEFT)
playerPos.X -= 1;
else if (key == UP)
playerPos.Y -= 1;
else //key == DOWN
playerPos.Y += 1;
position.X = (playerPos.X * 2) + 1; // From position in grid to position in console
position.Y = (playerPos.Y * 2) + 1;
SetConsoleTextAttribute(hOut, PLAYER_COLOR); // Set color for player
SetConsoleCursorPosition(hOut, position);
cout << PLAYER_CHAR; // Print the player character to the new position
if (playerPos == portalPos) // If player has reached the portal
{
Initilize(); // Reset cell array
Generate(portalPos); // Remap the maze starting at the portalPos
Draw();
}
} | [
"guillaume@labran.ch"
] | guillaume@labran.ch |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.