blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
2
247
content_id
stringlengths
40
40
detected_licenses
listlengths
0
57
license_type
stringclasses
2 values
repo_name
stringlengths
4
111
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
58
visit_date
timestamp[ns]date
2015-07-25 18:16:41
2023-09-06 10:45:08
revision_date
timestamp[ns]date
1970-01-14 14:03:36
2023-09-06 06:22:19
committer_date
timestamp[ns]date
1970-01-14 14:03:36
2023-09-06 06:22:19
github_id
int64
3.89k
689M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
25 values
gha_event_created_at
timestamp[ns]date
2012-06-07 00:51:45
2023-09-14 21:58:52
gha_created_at
timestamp[ns]date
2008-03-27 23:40:48
2023-08-24 19:49:39
gha_language
stringclasses
159 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
7
10.5M
extension
stringclasses
111 values
filename
stringlengths
1
195
text
stringlengths
7
10.5M
50292a2d637ac19de809e5ad4a39d6da4e927943
685972b082b132549b2dbf947456c197d7cba9bd
/Tanks2DSetup/objectsOnMap.cpp
df877bbd74c41ff9aa29010a12945259d4ef4f2e
[]
no_license
verciucsergiu/tanks2d
1aff80426842adb8b2d8d5dd36f96624be7bdc37
5bf5b0310a2d532e1be12e84a76c9a7d5f31b7e1
refs/heads/master
2021-06-10T19:10:23.627313
2017-01-13T21:51:47
2017-01-13T21:51:47
76,185,814
0
0
null
null
null
null
UTF-8
C++
false
false
800
cpp
objectsOnMap.cpp
#include "objectsOnMap.h" objectsOnMap::objectsOnMap() { } objectsOnMap::~objectsOnMap() { } void objectsOnMap::create(int gridX, int gridY, int x, int y, int type) { switch (type) { case 0: if (!objectTexture.loadFromFile("sprites/treelarge.png")); { } break; case 1: if (!objectTexture.loadFromFile("sprites/treesmall.png")); { } break; case 2: if (!objectTexture.loadFromFile("sprites/barrelred_side.png")); { } break; case 3: if (!objectTexture.loadFromFile("sprites/barrelgrey_side.png")); { } break; default: break; } float xPos = 800 * gridX + x; float yPos = 576 * gridY + y; objectSprite.setTexture(objectTexture); objectSprite.setPosition(xPos, yPos); } void objectsOnMap::draw(RenderWindow & window) { window.draw(objectSprite); }
919bdb3986c1a77ced25778ca7a54e5392b2f465
9a43be2820ef252137b3e0b9c132dcdefd1207ad
/moene/static_visitor.h
80bc23139fbda2b2f000e498a61aa768bc621db1
[ "BSL-1.0" ]
permissive
martinmoene/spike-expected
a80eb282ab1473374c6a548b333dbfa8e90a7ec6
79256e02389918d0e227a69dac7903569fa765b7
refs/heads/master
2021-01-20T07:29:43.667101
2016-03-14T14:31:29
2016-03-14T14:31:29
10,615,329
14
1
null
2016-03-14T14:19:37
2013-06-11T05:29:22
HTML
UTF-8
C++
false
false
485
h
static_visitor.h
// Copyright (C) 2013 Martin Moene <martin.moene@gmail.com> // // Use, modification, and distribution is 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) #ifndef NONSTD_STATIC_VISITOR_H_INCLUDED #define NONSTD_STATIC_VISITOR_H_INCLUDED namespace nonstd { template <typename T> class static_visitor { public: typedef T result_type; }; } #endif // NONSTD_STATIC_VISITOR_H_INCLUDED
12cbc11ef757f53eebe2a2c9d9dbf6cb08f7409e
194e4c583dc070150e021ae1405cdd990fb67161
/cppsrc/baduk/agent.h
4036e130e881cd4c8cd91fea8a5ab91493bb2e54
[]
no_license
macfergus/baduk
a9fe99f36bc964311222c6f511aee804da57486f
49195deb94bf7ca7c680a854e2fe66807d9a83a4
refs/heads/master
2023-05-09T08:38:09.943472
2021-05-21T23:57:13
2021-05-21T23:57:13
114,782,465
9
1
null
2018-10-06T19:51:55
2017-12-19T15:39:08
C++
UTF-8
C++
false
false
576
h
agent.h
#ifndef incl_BADUK_AGENT_H__ #define incl_BADUK_AGENT_H__ #include <chrono> #include <random> #include "game.h" namespace baduk { class Agent { public: virtual Move selectMove(GameState const& game_state) = 0; }; class RandomBot : public Agent { public: RandomBot() : rng_( std::chrono::duration_cast<std::chrono::microseconds>( std::chrono::system_clock::now().time_since_epoch() ).count()) {} Move selectMove(GameState const& game_state) override; private: std::default_random_engine rng_; }; } #endif
af192ae7ee78504a260928166ca1c68a30f474df
b40f71775712bb918887b198bfbfeeb1e7d3b326
/sOS/SRunnable.h
ed8703d90dbc26c9336e0828bbf8a901cd74fce5
[]
no_license
ZeroXCn/sLib
0d7c96d33759c9a043250194af62c64b3120cb9f
6cfe7d33febf72ece62ecf68e956e3b902460c93
refs/heads/master
2021-01-01T17:13:56.994223
2017-12-30T04:53:42
2017-12-30T04:53:42
98,029,033
4
0
null
null
null
null
GB18030
C++
false
false
584
h
SRunnable.h
/** * * SRunnable接口类 * SThread的接口 * @author ZeroX * @version v1.0 22/07/2017(22/07/2017) * */ #ifndef _SRUNNABLE_H_ #define _SRUNNABLE_H_ #include <functional> class SRunnable { public: virtual ~SRunnable() {}; //逻辑事件函数,子类重写此函数 virtual void Run() = 0; }; class SRunnableImpl :public SRunnable { private: std::function<void(void)> m_fCallback; public: SRunnableImpl(); SRunnableImpl(std::function<void(void)> fCallback); virtual ~SRunnableImpl(); public: void Run(std::function<void(void)> fCallback); virtual void Run(); }; #endif
0a0df9fba277ee0b1a5fe6a7bdac58fb03926e74
c0c44b30d6a9fd5896fd3dce703c98764c0c447f
/cpp/Targets/GUBI/include/Signal/SignalUtils.h
23a6286d9035ac3448702843494f52f32f7659b2
[ "BSD-3-Clause" ]
permissive
wayfinder/Wayfinder-CppCore-v2
59d703b3a9fdf4a67f9b75fbbf4474933aeda7bf
f1d41905bf7523351bc0a1a6b08d04b06c533bd4
refs/heads/master
2020-05-19T15:54:41.035880
2010-06-29T11:56:03
2010-06-29T11:56:03
744,294
1
0
null
null
null
null
UTF-8
C++
false
false
1,205
h
SignalUtils.h
#ifndef _SIGNAL_UTILS_H_ #define _SIGNAL_UTILS_H_ #include "Signal/ISignalCollection.h" #include "Signal/ISignalHub.h" #include "Signal/Signal.h" #include "Common/Identifier.h" namespace gubi { // Prototypes class IPropertyBag; /** * Helper function for connecting a signal to an object. */ template<class T> bool SignalConnect( gubi::ISignalCollection* pCollection, const gubi::Identifier& eSignalId, T* pInstance, void (T::*pFunction)(gubi::IPropertyBag*), gubi::Identifier* pConnectionId ) { bool bReturn = false; if (pCollection != NULL) { gubi::ISignalHub* pSignalHub = NULL; if (pCollection->GetSignal(eSignalId, &pSignalHub)) { bReturn = pSignalHub->Connect(new gubi::Signal<T>(pInstance, pFunction), pConnectionId); pSignalHub->Release(); } } return bReturn; } /** * Helper function for disconnecting a signal from an object. */ bool SignalDisconnect( gubi::ISignalCollection* pCollection, const gubi::Identifier& eSignalId, unsigned int iConnectionId ); } #endif // _SIGNAL_UTILS_H_
aa636e41c84003e605c9ac76da9d2aaac5acb653
a0ebf3f7218a7599ae603ad42b5810b85502b3f8
/DataStructures.Tests/array2D_tests.cpp
f60948862cf80fd5d86181706815692d09be84bc
[]
no_license
drussell33/Data-Structures-With-Tests
381cdc2ececd2d210b3fd8de9d349e707ab4819b
570c8ff25d979dc16910a1652b4658dac8931d67
refs/heads/main
2023-08-30T02:47:21.426698
2021-11-10T21:57:47
2021-11-10T21:57:47
426,788,191
0
0
null
null
null
null
UTF-8
C++
false
false
5,890
cpp
array2D_tests.cpp
#include "pch.h" #include "CppUnitTest.h" #include "crtdbg.h" #include "adt_exception.hpp" #include "crt_check_memory.hpp" #include "array2d.hpp" #include <string> #include <vector> using std::string; using namespace data_structures; using namespace Microsoft::VisualStudio::CppUnitTestFramework; namespace data_structures_tests { TEST_CLASS(Array2DTests) { public: Array2D<string> GetArray2DString() const { auto array = Array2D<string>(3, 4); for (auto i = 0u; i < 3; ++i) { for(auto j = 0u; j<4; ++j) { array[i][j] = std::to_string(i * j); } } return array; } TEST_METHOD(Array2dCopyCtor) { CrtCheckMemory check_memory; auto array = GetArray2DString(); auto array_2(array); for (auto i = 0u; i < 3; ++i) { for (auto j = 0u; j < 4; ++j) { Assert::AreEqual(array_2[i][j], std::to_string(i * j)); } } } TEST_METHOD(Array2dAssignmentOp) { CrtCheckMemory check_memory; auto array = GetArray2DString(); auto array_2 = array; for (auto i = 0u; i < 3; ++i) { for (auto j = 0u; j < 4; ++j) { Assert::AreEqual(array_2[i][j], std::to_string(i * j)); } } } TEST_METHOD(Array2DParamConstructorValidLengthTest) { CrtCheckMemory check; Array2D<int> array(5, 5); Assert::IsTrue(true); } TEST_METHOD(Array2DSetRowsBadLengthTest_ShouldThrowException) { CrtCheckMemory check; const auto should_throw = [] { Array2D<int> array(5, 3); array.Rows(-15); }; Assert::ExpectException<AdtException>(should_throw); } TEST_METHOD(Array2DSetColumnsBadLengthTest_ShouldThrowException) { CrtCheckMemory check; const auto should_throw = [] { Array2D<int> array(5, 3); array.Columns(-15); }; Assert::ExpectException<AdtException>(should_throw); } TEST_METHOD(ArrayDefaultConstructorTest) { CrtCheckMemory check; Array2D<int> my_array; Assert::IsTrue(true); } TEST_METHOD(Array2DNeutralColumnsTest) { CrtCheckMemory check; Array2D<int> my_array(5, 0); Assert::IsTrue(true); } TEST_METHOD(Array2DNeutralRowsTest) { CrtCheckMemory check; Array2D<int> my_array(0, 5); Assert::IsTrue(true); } TEST_METHOD(Array2DNegativeRowsConstructorTest_ShouldThrowException) { CrtCheckMemory check; const auto should_throw = [] {Array2D<int> negative_row_array(-12, 2); }; Assert::ExpectException<AdtException>(should_throw); } TEST_METHOD(ArrayOutOfBoundsNegativeTest_ShouldThrowException) { CrtCheckMemory check; const auto should_throw = [] { Array2D<int> my_array(5, 0); my_array[-2][0] = 1; }; Assert::ExpectException<AdtException>(should_throw); } TEST_METHOD(Array2DOutOfBoundsPositiveTest_ShouldThrowException) { CrtCheckMemory check; const auto should_throw = [] { Array2D<int> my_array(5, 2); my_array[10][15] = 1; }; Assert::ExpectException<AdtException>(should_throw); } TEST_METHOD(Array2DGetRowsTest) { CrtCheckMemory check; Array2D<int> my_array(1, 0); Assert::IsTrue(my_array.Rows()); } TEST_METHOD(Array2DGetColumnsTest) { CrtCheckMemory check; Array2D<int> my_array(0, 1); Assert::IsTrue(my_array.Columns()); } TEST_METHOD(Array2DMoveTest) { CrtCheckMemory check; { Array2D<int> my_array(3, 2); Array2D<int> my_array2(std::move(my_array)); } } TEST_METHOD(Array2DMoveAssignmentTest) { CrtCheckMemory check; { Array2D<string> my_array(10, 5); my_array = GetArray2DString(); } } TEST_METHOD(Array2DSetRowDataLossTest) { CrtCheckMemory check; Array2D<int> myArray(3, 3); int index = 0; for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) myArray[i][j] = index++; // 0 1 2 // 3 4 5 // 6 7 8 myArray.Rows(2); // 0 1 2 // 3 4 5 // + //-------- // 15 int total = 0; for (int i = 0; i < myArray.Rows(); i++) for (int j = 0; j < myArray.Columns(); j++) total += myArray[i][j]; Assert::IsTrue(total == 15); } TEST_METHOD(Array2DSetColumnDataLossTest) { CrtCheckMemory check; Array2D<int> myArray(3, 3); int index = 0; for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) myArray[i][j] = index++; // 0 1 2 // 3 4 5 // 6 7 8 myArray.Columns(2); // 0 1 // 3 4 // 6 7 // + //------ // 21 int total = 0; for (int i = 0; i < myArray.Rows(); i++) for (int j = 0; j < myArray.Columns(); j++) total += myArray[i][j]; Assert::IsTrue(total == 21); } TEST_METHOD(Array2DSetColumnDataLossTestLargerArray) { CrtCheckMemory check; Array2D<int> myArray(4, 4); int index = 0; for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) myArray[i][j] = index++; // 0 1 2 3 // 4 5 6 7 // 8 9 10 11 // 12 13 14 15 myArray.Columns(3); // 0 1 2 // 4 5 6 // 8 9 10 // 12 13 14 // + //------ // 21 int total = 0; for (int i = 0; i < myArray.Rows(); i++) for (int j = 0; j < myArray.Columns(); j++) total += myArray[i][j]; Assert::IsTrue(total == 84); } TEST_METHOD(Array2DSelectOfFourByFourArrya) { CrtCheckMemory check; Array2D<int> myArray(4, 4); int index = 0; for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) myArray[i][j] = index++; // 0 1 2 3 // 4 5 6 7 // 8 9 10 11 // 12 13 14 15 int check_select = myArray.Select(3, 3); Assert::IsTrue(check_select == 15); } TEST_METHOD(Array2DSelectOfThreeByFiveArray) { CrtCheckMemory check; Array2D<int> myArray(3, 5); int index = 0; for (int i = 0; i < 3; i++) for (int j = 0; j < 5; j++) myArray[i][j] = index++; // 0 1 2 3 4 // 5 6 7 8 9 // 10 11 12 13 14 int check_select = myArray.Select(2, 3); Assert::IsTrue(check_select == 13); } }; }
2125dc699a5f15a1ac42943dccefba3d25273368
da8b30ee378bdb08f52b4b7fb341c30032f371cc
/src/public/zthread.cpp
90d93520e5506612de265d1956f7388361d4af22
[ "MIT" ]
permissive
Shincey/emaild
0b6cf0015bc32a7003e3e1e1f7fab60059954cf2
e9bac0dc05660dac014c5a84bd82bf7ba7ab668a
refs/heads/master
2022-11-16T09:28:29.771242
2020-07-14T09:04:13
2020-07-14T09:04:13
272,872,602
0
0
null
null
null
null
UTF-8
C++
false
false
624
cpp
zthread.cpp
#include "zthread.h" #include <pthread.h> namespace lib { static void* thread_proc(void *__param) { zthread *ptr = static_cast<zthread *>(__param); zassert(ptr, "the pointer to zthread is null"); ptr->run(); return ptr; } bool zthread::start(s32 __threads) { for (s32 i = 0; i < __threads; i++) { pthread_t pid = 0; if (int ret = ::pthread_create(&pid, nullptr, thread_proc, (void*)this); ret != 0) { return false; } else { // TODO SOMETHING ... } } return true; } }
17b838cebbd1672c3e1b42fbd0e0170266511128
7710b6fe544f4aee705cc48b4d370701471e411d
/Semaphore/traffic_light.h
05d561798f7105ce24952fa03cffce5971878b5f
[]
no_license
NakedSolidSnake/Arduino_Examples
324b15335795b9382fca4f72c6c65aa7b520d631
60c77130d9083eff16b7f62bac2bfdd018e5c667
refs/heads/master
2023-03-20T06:06:54.127303
2021-02-21T20:29:29
2021-02-21T20:29:29
340,989,895
0
0
null
null
null
null
UTF-8
C++
false
false
471
h
traffic_light.h
/* * traffic_light.h * * Created on: May 25, 2020 * Author: cssouza */ #ifndef TRAFFIC_LIGHT_H_ #define TRAFFIC_LIGHT_H_ class TrafficLight{ public: enum light{ RED_LIGHT = 3, YELLOW_LIGHT = 4, GREEN_LIGHT = 5 }; static TrafficLight *getInstance(); void setTrafficLight(light l, int duration); private: TrafficLight(); void initLights(); void setLightOn(light l); void setLightOff(light l); class Lights; }; #endif /* TRAFFIC_LIGHT_H_ */
cfb269f5bfe24c5d26e2fb761ea07322669232c8
5d83739af703fb400857cecc69aadaf02e07f8d1
/Archive2/8f/3378a069b4ca7b/main.cpp
75f41f1df4cb4d3dfd2a928df57eae2e79570616
[]
no_license
WhiZTiM/coliru
3a6c4c0bdac566d1aa1c21818118ba70479b0f40
2c72c048846c082f943e6c7f9fa8d94aee76979f
refs/heads/master
2021-01-01T05:10:33.812560
2015-08-24T19:09:22
2015-08-24T19:09:22
56,789,706
3
0
null
null
null
null
UTF-8
C++
false
false
1,120
cpp
main.cpp
import QtQuick 2.3 Rectangle { width: 800 height: 600 color: "lightblue" Item { width: parent.width anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter Text { id: t1 anchors.top: parent.top width: parent.width horizontalAlignment: Text.AlignHCenter wrapMode: Text.WordWrap text: "hello all folks" font.pixelSize: 28 } Text { id: t2 anchors.top: t1.bottom anchors.topMargin: 5 width: parent.width horizontalAlignment: Text.AlignHCenter wrapMode: Text.WordWrap text: "Hahaha in the middle" font.pixelSize: 42 } Text { anchors.top: t2.bottom anchors.topMargin: 5 width: parent.width horizontalAlignment: Text.AlignHCenter wrapMode: Text.WordWrap text: "I am a sligthly longer text for enjoyment" font.pixelSize: 16 } } }
2b547530b8035e4cf934e20df24d3a76ceb5b2b3
9804d38d172052442fc23b18b5c0e24dc99080c9
/combineanalysis.cxx
9588e44d39ffc44016bfc5e6b876f7c81de08768
[]
no_license
marc1uk/wcsim_analysis
2d08069d866df1a01076a285ff07ba2b60bf14a2
45adc331c7ec4f82a11c8de1b614eb3fb1ad3921
refs/heads/master
2021-01-11T19:29:33.698385
2019-01-11T15:45:12
2019-01-11T15:45:12
79,377,727
0
1
null
null
null
null
UTF-8
C++
false
false
81,442
cxx
combineanalysis.cxx
/* vim:set noexpandtab tabstop=4 wrap */ /*TODO: to modify for new source files: 0. Re-generate and replace in this directory libWCSimRoot.so, .rootmap, .pcm files. 1. Re-enable #include RootOptions.hh 2. Disable timeArrayOffset lines. */ #ifndef VERBOSE //#define VERBOSE #endif #ifndef WCSIMDEBUG //#define WCSIMDEBUG #endif #ifndef MUTRACKDEBUG //#define MUTRACKDEBUG 1 #endif #include "TROOT.h" #include "TSystem.h" #include "TSystemFile.h" #include "TSystemDirectory.h" #include "TApplication.h" #include "TFile.h" #include "TH1.h" #include "TH2.h" #include "TH3.h" #include "TNtuple.h" #include "TChain.h" #include "TProfile.h" #include "TProfile2D.h" #include "TCanvas.h" #include "TString.h" #include "TMath.h" #include "Math/Vector3D.h" #include "Math/Vector4D.h" #include "TLorentzVector.h" #ifdef __MAKECINT__ #pragma link C++ class std::vector<TLorentzVector>+; #endif #include "TLegend.h" #include "TText.h" #include "TColor.h" #include <regex> #include "TStyle.h" #include <exception> // for stdexcept #include <vector> #include <map> #include <string> #include <algorithm> // remove and remove_if #include <iostream> #include <iomanip> #include <fstream> //std::ofstream #include <stdlib.h> /* atoi */ #include <valarray> #ifdef __MAKECINT__ #pragma link C++ class std::map<std::string,bool>+; // <<<< REQUIRED TO SAVE THIS KIND TO TREE #endif #include <thread> // std::this_thread::sleep_for #include <chrono> // std::chrono::seconds #include <time.h> // clock_t, clock, CLOCKS_PER_SEC // we need to #include all the WCSim headers. #include "../wcsim/include/WCSimRootEvent.hh" #include "../wcsim/include/WCSimRootGeom.hh" #include "../wcsim/include/WCSimPmtInfo.hh" #include "../wcsim/include/WCSimLAPPDInfo.hh" #include "../wcsim/include/WCSimEnumerations.hh" #include "../wcsim/include/WCSimRootLinkDef.hh" #include "../wcsim/include/WCSimRootOptions.hh" // the WCSim analysis headers #include "wcsimanalysis.hh" // bonsai class based on this output root file #include "BonsaiEventClass.C" // TODO // genie headers #include "GHEP/GHepParticle.h" #include "GHEP/GHepRecord.h" #include "GHEP/GHepUtils.h" #include "Ntuple/NtpMCTreeHeader.h" #include "Ntuple/NtpMCEventRecord.h" #include "Interaction/Interaction.h" #include "PDG/PDGUtils.h" #include "PDG/PDGCodes.h" #include "PDG/PDGLibrary.h" #include "Conventions/Constants.h" //#include "Numerical/GSFunc.h" // ensure in the evironment we have set //ROOT_INCLUDE_PATH=${ROOT_INCLUDE_PATH}:${GENIE}/../include/GENIE //ROOT_LIBRARY_PATH=${ROOT_LIBRARY_PATH}:${GENIE}/../lib void MakePMTmap(WCSimRootGeom* geo, std::map<int, std::pair<int,int> > &topcappositionmap, std::map<int, std::pair<int,int> > &bottomcappositionmap, std::map<int, std::pair<int,int> > &wallpositionmap); #include "makepmtmaps_standalone.cxx" // definition of this function void FillTankMapHist(WCSimRootGeom* geo, int tubeID, bool incone, std::map<std::string, TH2D*> &maphistos, double weight); void ClearMapHistos(std::map<std::string,TH2D*> maphistos); // clear the histograms #include "genieinfo_struct.cxx" // definition of a struct to hold genie info // function to fill the into void GetGenieEntryInfo(genie::EventRecord* gevtRec, genie::Interaction* genieint, GenieInfo& thegenieinfo); const Float_t fidcutradius=tank_radius*0.8; // fiducial volume is slightly lesss than the full tank radius const Float_t fidcuty=50.; // a meter total fiducial volume in the centre y const Float_t fidcutz=0; // fidcuial volume is before the tank centre. const Float_t mu_rest_mass_E = 105.658; // in MeV // needed for drawing tank 2D map histograms std::map<int, std::pair<int,int> > topcappositionmap; std::map<int, std::pair<int,int> > bottomcappositionmap; std::map<int, std::pair<int,int> > wallpositionmap; const char* dirtpath="/pnfs/annie/persistent/users/moflaher/g4dirt"; const char* geniepath="/pnfs/annie/persistent/users/rhatcher/genie"; //const char* wcsimpath="/pnfs/annie/persistent/users/moflaher/wcsim"; // first 1M sample, various issues //const char* wcsimpath="/annie/app/users/moflaher/wcsim/build"; const char* wcsimpath="/pnfs/annie/persistent/users/moflaher/wcsim_tankonly_17-06-17"; const char* wcsimlibrarypath="/annie/app/users/moflaher/wcsim/wcsim/libWCSimRoot.so"; //const char* outpath="/annie/app/users/moflaher/wcsim/root_work"; const char* outpath="/pnfs/annie/persistent/users/moflaher/wcsim_tankonly_17-06-17_ana"; //const char* analysispath="/annie/app/users/moflaher/wcsim/root_work"; const char* analysispath="/pnfs/annie/persistent/users/moflaher/wcsim_tankonly_17-06-17_ana"; const char* analysislibrarypath="/annie/app/users/moflaher/wcsim/root_work/analysiscaller_cxx.so"; //const char* bonsaipath="/annie/app/users/moflaher/bonsai/Bonsai_v0/results"; const char* bonsaipath="/pnfs/annie/persistent/users/moflaher/wcsim_tankonly_17-06-17_ana"; //const char* bonsaiclasspath="/annie/app/users/moflaher/bonsai/Bonsai_v0/cBonsaiEvent.C"; // TODO const Bool_t printneutrinoevent=false; double CalculateNeutrinoEnergy(double recoMuonEnergy, double recoMuonAngle); double CalculateEventQ2(double recoMuonEnergy, double recoNeutrinoEnergy, double recoMuonAngle); void truthtracks(){ //ColourPlotStyle(); // load WCSim library for reading WCSim files cout<<"loading "<<analysislibrarypath<<endl; gSystem->Load(analysislibrarypath); cout<<"loading "<<wcsimlibrarypath<<endl; //gSystem->Load(wcsimlibrarypath); //cout<<"loading "<<bonsaiclasspath<<endl; TODO //std::string loadclassstring = "\".L " + bonsaiclasspath + "\""; //gROOT->ProcessLine(loadclassstring.c_str()); // ============================================================================================== // ============================================================================================== // Declare input paths, files, trees... TFile* wcsimfile=0; TString wcsimfilepath; TTree* wcsimT=0; Int_t numwcsimentries=0; TFile* dirtfile=0; std::string dirtfilename; TTree* tankflux=0; TTree* tankmeta=0; TFile* geniefile=0; TString geniefilepath; TTree* gtree=0; Int_t numgenietentries=0; TFile* bonsaifile=0; TString bonsaifilepath; TTree* bonsaitree=0; Int_t numbonsaientries=0; TFile* mrdfile=0; TString mrdfilepath; TTree* mrdtree=0; Int_t nummrdentries=0; TFile* vetofile=0; TString vetofilepath; TTree* vetotree=0; Int_t numvetoentries=0; // TChain for dirt files - this will be the main driver of the loop - all it's events will be processed. TChain* c = new TChain("tankflux"); TString chainpattern = TString::Format("%s/annie_tank_flux.*.root",dirtpath); //1000->* cout<<"loading TChain entries from "<<chainpattern<<endl; c->Add(chainpattern); Int_t numents = c->GetEntries(); cout<<"loaded "<<numents<<" entries in the chain"<<endl; if(numents<1){ return; } // tankflux Int_t genieentry=0; TBranch* genieentrybranch=0; Int_t ntankbranchval=0; TBranch *nTankBranch=0; Int_t* nuprimarybranchval=0; TBranch* nuprimaryBranch=0; Char_t vertexmaterial[100]; TBranch* vertexmaterialbranch=0; // tankmeta TBranch* geniefilenamebranch=0; Char_t geniefilename[100]; TBranch* potsbranch=0; Double_t pots; Double_t totalpots=0; // count of POTs in all processed files // gtree genie::NtpMCEventRecord* genierecordval = new genie::NtpMCEventRecord; TBranch* genierecordBranch=0; // wcsimT WCSimRootEvent* b=0, *m=0, *v=0; TBranch* bp=0, *mp=0, *vp=0; WCSimRootTrigger* atrigt=0, *atrigm=0, *atrigv=0; // bonsaitree cBonsaiEvent* bonsaievent = new cBonsaiEvent(); // mrdtree Int_t mrdeventnum=-1; Int_t mrdtriggernum; Int_t numMrdEvents; Int_t numMrdTracks; TClonesArray* mrdevents = new TClonesArray("cMRDSubEvent"); int currentmrdtreeentry=-1; // keeps track of the matching of mrdtree entries with wcsimT entries // vetotree //Int_t vetoeventnum=-1; //Int_t vetotriggernum; //Int_t numVetoEvents; //TClonesArray* vetoevents = new TClonesArray("cVetoEvent"); int currentvetotreeentry=-1; // geoT WCSimRootGeom* geo = 0; // information from genie: GenieInfo thegenieinfo; // ============================================================================================== // ============================================================================================== // output file TFile* fileout = new TFile("CombinedAnalysis.root","RECREATE"); fileout->cd(); TTree* treeout = new TTree("recotree","Combined Event Reconstruction"); // store the file and event num info for further lookup later if needed TString geniefilestring; TBranch* bGenieFileString = treeout->Branch("GenieFile",&geniefilestring); int genieeventnum=-1; TBranch* bGenieEventNum = treeout->Branch("GenieEventNum",&genieeventnum); TString dirtfilestring; TBranch* bDirtFileString = treeout->Branch("DirtFile",&dirtfilestring); int dirteventnum=-1; TBranch* bDirtEventNum = treeout->Branch("DirtEventNum",&dirteventnum); TString wcsimfilestring; TBranch* bWCSimFileString = treeout->Branch("WCSimFile",&wcsimfilestring); int wcsimeventnum=-1; TBranch* bWCSimEventNum = treeout->Branch("WCSimEventNum",&wcsimeventnum); int wcsimtriggernum=-1; TBranch* bWCSimTriggerNum = treeout->Branch("WCSimTriggerNum",&wcsimtriggernum); TString mrdfilestring; TBranch* bMrdFileString = treeout->Branch("MrdTrackFile",&mrdfilestring); TString vetofilestring; TBranch* bVetoFileString = treeout->Branch("VetoEventFile",&vetofilestring); TString bonsaifilestring; TBranch* bBonsaiFileStrong = treeout->Branch("BonsaiFile",&bonsaifilestring); // genie information std::map<std::string,bool> eventtypes; std::map<std::string,bool>* eventtypesp=&eventtypes; TBranch* bEventType = treeout->Branch("TypesMap",&eventtypesp); // using a map is a bad idea! It means you can't use the event type in tree->Draw calls!!! // plus you need to load a CollectionProxy by putting the following code: // #include <map> // #ifdef __MAKECINT__ // #pragma link C++ class std::map<std::string,bool>+; // #endif // into a file and calling '.L thefile.C+' before you can even read that tree with Tree/Branch->GetEntry! // so use the genie method, and save a bunch of bools bool IsQuasiElastic=false; TBranch* bIsQuasiElastic = treeout->Branch("IsQuasiElastic",&IsQuasiElastic); bool IsResonant=false; TBranch* bIsResonant = treeout->Branch("IsResonant",&IsResonant); bool IsDeepInelastic=false; TBranch* bIsDeepInelastic = treeout->Branch("IsDeepInelastic",&IsDeepInelastic); bool IsCoherent=false; TBranch* bIsCoherent = treeout->Branch("IsCoherent",&IsCoherent); bool IsDiffractive=false; TBranch* bIsDiffractive = treeout->Branch("IsDiffractive",&IsDiffractive); bool IsInverseMuDecay=false; TBranch* bIsInverseMuDecay = treeout->Branch("IsInverseMuDecay",&IsInverseMuDecay); bool IsIMDAnnihilation=false; TBranch* bIsIMDAnnihilation = treeout->Branch("IsIMDAnnihilation",&IsIMDAnnihilation); bool IsSingleKaon=false; TBranch* bIsSingleKaon = treeout->Branch("IsSingleKaon",&IsSingleKaon); bool IsNuElectronElastic=false; TBranch* bIsNuElectronElastic = treeout->Branch("IsNuElectronElastic",&IsNuElectronElastic); bool IsEM=false; TBranch* bIsEM = treeout->Branch("IsEM",&IsEM); bool IsWeakCC=false; TBranch* bIsWeakCC = treeout->Branch("IsWeakCC",&IsWeakCC); bool IsWeakNC=false; TBranch* bIsWeakNC = treeout->Branch("IsWeakNC",&IsWeakNC); bool IsMEC=false; TBranch* bIsMEC = treeout->Branch("IsMEC",&IsMEC); bool isintank=false; TBranch* bInTank = treeout->Branch("NuVtxInTank",&isintank); bool isinfiducialvol=false; TBranch* bInFidVol = treeout->Branch("NuVtxInFidVol",&isinfiducialvol); double eventq2=0.; TBranch* bEventQ2 = treeout->Branch("EventQ2",&eventq2); double eventEnu=0.; TBranch* bEventEnu = treeout->Branch("NeutrinoEnergy",&eventEnu); int neutrinopdg=0; TBranch* bNeutrinoPdg = treeout->Branch("NeutrinoPDG",&neutrinopdg); bool hasmuon=false; TBranch* bEventHasMuon = treeout->Branch("EventHasMuon",&hasmuon); // wcsim info TVector3 mustartvtx(0,0,0); TBranch* bMuonStartVtx = treeout->Branch("MuonStartVertex",&mustartvtx); double mustarttime; TBranch* bMuonStartT = treeout->Branch("MuonStartT",&mustarttime); TVector3 mustopvtx(0,0,0); TBranch* bMuonStopVtx = treeout->Branch("MuonStopVertex",&mustopvtx); double muonangle=0.; TBranch* bMuonAngle = treeout->Branch("MuonAngle",&muonangle); double mustartE=0.; TBranch* bMuonStartE = treeout->Branch("MuonStartEnergy",&mustartE); double muendE=0.; TBranch* bMuonEndE = treeout->Branch("MuonEndEnergy",&muendE); double mutracklengthintank=0.; // keep this so we can do cuts on it, under the assumption our reconstruction will improve TBranch* bMuonTrackLengthInTank = treeout->Branch("MuonTrackLengthInTank",&mutracklengthintank); int numTankDigits=0; TBranch* bNumTankDigits = treeout->Branch("TotalTankDigits",&numTankDigits); double totaltankcharge=0.; TBranch* bTotalTankCharge = treeout->Branch("TotalTankCharge",&totaltankcharge); int numpizerotracks=-1; TBranch* bNumPiZeroTracks = treeout->Branch("NumPiZeroTracks",&numpizerotracks); int numpiplustracks=-1; TBranch* bNumPiPlusTracks = treeout->Branch("NumPiPlusTracks",&numpiplustracks); int numpiminustracks=-1; TBranch* bNumPiMinusTracks = treeout->Branch("NumPiMinusTracks",&numpiminustracks); int nummutracks=-1; TBranch* bNumMuTracks = treeout->Branch("NumMuTracks",&nummutracks); int numneutrontracks=-1; TBranch* bNumNeutronTracks = treeout->Branch("NumNeutronTracks",&numneutrontracks); int numprotontracks=-1; TBranch* bNumProtonTracks = treeout->Branch("NumProtonTracks",&numprotontracks); // bonsai info bool hadBonsaiEvent; TBranch* bHadBonsaiEvent = treeout->Branch("HadBonsaiEvent",&hadBonsaiEvent); TVector3 bonsaiVertex; TBranch* bBonsaiVertex = treeout->Branch("BonsaiVertex",&bonsaiVertex); double bonsaiVertexT; TBranch* bBonsaiVertexT = treeout->Branch("BonsaiVertexT",&bonsaiVertexT); double bonsaiVertexError; TBranch* bBonsaiVertexError = treeout->Branch("BonsaiVertexError",&bonsaiVertexError); bool bonsaiVertexInTank; TBranch* bBonsaiVertexInTank = treeout->Branch("BonsaiVertexInTank",&bonsaiVertexInTank); TVector3 bonsaiDirection; TBranch* bBonsaiDirection = treeout->Branch("BonsaiDirection",&bonsaiDirection); Double_t bonsaiDirectionError; TBranch* bBonsaiDirectionError = treeout->Branch("BonsaiDirectionError",&bonsaiDirectionError); TVector3 bonsaiTankExit; TBranch* bBonsaiTankExit = treeout->Branch("BonsaiTankExit",&bonsaiTankExit); bool bonsaiInterceptsMrd; TBranch* bBonsaiInterceptsMrd = treeout->Branch("BonsaiInterceptsMrd",&bonsaiInterceptsMrd); TVector3 bonsaiMrdEntry; TBranch* bBonsaiMrdEntry = treeout->Branch("BonsaiMrdEntry",&bonsaiMrdEntry); double bonsaiTrackLengthInTank; TBranch* bBonsaiTrackLengthInTank = treeout->Branch("BonsaiTrackLengthInTank",&bonsaiTrackLengthInTank); double bonsaiEnergyLoss; TBranch* bBonsaiEnergyLoss = treeout->Branch("BonsaiEnergyLoss",&bonsaiEnergyLoss); double bonsaiEnergyLossError; TBranch* bBonsaiEnergyLossError = treeout->Branch("BonsaiEnergyLossError",&bonsaiEnergyLossError); // mrd info bool hadMrdEvent; // may have had a bunch of digits but no reconstructable track TBranch* bHadMrdEvent = treeout->Branch("HadMrdEvent",&hadMrdEvent); bool hadMrdTrack; TBranch* bHadMrdTrack = treeout->Branch("HadMrdTrack",&hadMrdTrack); TVector3 mrdEntryVertex; TBranch* bMrdEntryVertex = treeout->Branch("MrdEntryVertex",&mrdEntryVertex); double mrdEntryTime; TBranch* bMrdEntryTime = treeout->Branch("MrdEntryTime",&mrdEntryTime); TVector3 mrdStopVertex; // could be exit or stopping point TBranch* bMrdStopVertex = treeout->Branch("MrdStopVertex",&mrdStopVertex); double mrdDirectionError; TBranch* bMrdDirectionError = treeout->Branch("MrdDirectionError",&mrdDirectionError); double mrdTrackLength; TBranch* bMrdTrackLength = treeout->Branch("MrdTrackLength",&mrdTrackLength); double mrdEnergyLoss; TBranch* bMrdEnergyLoss = treeout->Branch("MrdEnergyLoss",&mrdEnergyLoss); double mrdEnergyLossError; TBranch* bMrdEnergyLossError = treeout->Branch("MrdEnergyLossError",&mrdEnergyLossError); bool mrdPenetrated; TBranch* bMrdPenetrated = treeout->Branch("MrdPenetrated",&mrdPenetrated); bool mrdStopped; TBranch* bMrdStopped = treeout->Branch("MrdStopped",&mrdStopped); bool mrdSideExit; TBranch* bMrdSideExit = treeout->Branch("MrdSideExit",&mrdSideExit); // veto info bool hadVetoEvent; TBranch* bHadVetoEvent = treeout->Branch("HadVetoEvent",&hadVetoEvent); double vetoEventTime; TBranch* bVetoEventTime = treeout->Branch("VetoEventTime",&vetoEventTime); // combined reconstruction info bool hadRecoEvent; TBranch* bHadRecoEvent = treeout->Branch("HadRecoEvent",&hadRecoEvent); bool recoMuonStopped; TBranch* bRecoMuonStopped = treeout->Branch("RecoMuonStopped",&recoMuonStopped); double recoMuonEnergy; TBranch* bRecoMuonEnergy = treeout->Branch("RecoMuonEnergy",&recoMuonEnergy); double recoMuonEnergyError; TBranch* bRecoMuonEnergyError = treeout->Branch("RecoMuonEnergyError",&recoMuonEnergyError); double recoMuonAngle; TBranch* bRecoMuonAngle = treeout->Branch("RecoMuonAngle",&recoMuonAngle); double recoMuonAngleError; TBranch* bRecoMuonAngleError = treeout->Branch("RecoMuonAngleError",&recoMuonAngleError); double recoEventQ2; TBranch* bRecoEventQ2 = treeout->Branch("RecoEventQ2",&recoEventQ2); double recoEventQ2Error; TBranch* bRecoEventQ2Error = treeout->Branch("RecoEventQ2Error",&recoEventQ2Error); double recoNeutrinoEnergy; TBranch* bRecoNeutrinoEnergy = treeout->Branch("RecoNeutrinoEnergy",&recoNeutrinoEnergy); double recoNeutrinoEnergyError; TBranch* bRecoNeutrinoEnergyError = treeout->Branch("RecoNeutrinoEnergyError",&recoNeutrinoEnergyError); TVector3 recoVertex; TBranch* bRecoVertex = treeout->Branch("RecoVertex",&recoVertex); // combined bonsai+MRD fit TVector3 recoVertexError; TBranch* bRecoVertexError = treeout->Branch("RecoVertexError",&recoVertexError); // compatibility testing TVector3 bonsaiMrdTankVtxDiff; TBranch* bBonsaiMrdTankVtxDiff = treeout->Branch("BonsaiMrdTankVtxDiff",&bonsaiMrdTankVtxDiff); double bonsaiMrdAngDiff; TBranch* bBonsaiMrdAngDiff = treeout->Branch("BonsaiMrdAngDiff",&bonsaiMrdAngDiff); /* std::vector<TBranch*> thebranches{ bInTank, bEventType, bEventQ2, bEventEnu, bNeutrinoPdg, bInFidVol, bEventHasMuon, bMuonStartVtx, bMuonStopVtx, bMuonStartE, bMuonTrackLengthInTank, bMuonMrdPenetrationInCm, bMuonMrdPenetrationLayers, bMuonEntersMRD, bMuonStopsInMRD, bMuonRangesOutMRD, bMuonTrackLengthInMRD, bTankChargeFromMuon, bFractionOfMuonChargeInCone}; int someit=0; bool haszombies=false; for(auto abranch : thebranches){ if(abranch==0){ cout<<"branch "<<someit<<" is a zombie"<<endl; haszombies=true; } someit++; } assert(!haszombies&&"output file branches have zombies"); */ // ====================================================================================================== // ====================================================================================================== // // Just to test the inside/outside cherenkov cone algorithm // TH2D* inconehistowall = new TH2D("chargemap_incone_wall", "Charge Distribution Inside Cherenkov Cone (Wall)", pmtsperring+2,-1,pmtsperring+1,numpmtrings+2,-1,numpmtrings+1); // TH2D* inconehistotop = new TH2D("chargemap_incone_top","Charge Distribution Inside Cherenkov Cone (Top Cap)",caparraysize+2,-1,caparraysize+1,caparraysize+2,-1,caparraysize+1); // TH2D* inconehistobottom = new TH2D("chargemap_incone_bottom","Charge Distribution Inside Cherenkov Cone (Bottom Cap)",caparraysize+2,-1,caparraysize+1,caparraysize+2,-1,caparraysize+1); // // TH2D* outconehistowall = new TH2D("chargemap_outcone_wall", "Charge Distribution Outside Cherenkov Cone (Wall)", pmtsperring+2,-1,pmtsperring+1,numpmtrings+2,-1,numpmtrings+1); // TH2D* outconehistotop = new TH2D("chargemap_outcone_top","Charge Distribution Outside Cherenkov Cone (Top Cap)",caparraysize+2,-1,caparraysize+1,caparraysize+2,-1,caparraysize+1); // TH2D* outconehistobottom = new TH2D("chargemap_outcone_bottom","Charge Distribution Outside Cherenkov Cone (Bottom Cap)",caparraysize+2,-1,caparraysize+1,caparraysize+2,-1,caparraysize+1); // // std::map<std::string, TH2D*> maphistos; // maphistos.emplace("inconehistowall",inconehistowall); // maphistos.emplace("inconehistotop",inconehistotop); // maphistos.emplace("inconehistobottom",inconehistobottom); // maphistos.emplace("outconehistowall",outconehistowall); // maphistos.emplace("outconehistotop",outconehistotop); // maphistos.emplace("outconehistobottom",outconehistobottom); // ====================================================================================================== // ====================================================================================================== // done declaring file: move to loading and processing gROOT->cd(); cout<<"loading first tankflux tree from "<<chainpattern<<" tchain"<<endl; c->LoadTree(0); Int_t treeNumber = -1; tankflux = c->GetTree(); Int_t thistreesentries = tankflux->GetEntries(); cout<<thistreesentries<<" entries in the first tree"<<endl; /* 1. Load next g4dirt entry 2. Load associated genie genie If interaction is in tank: 4. WCSimRootEvent: 4a.i. Load true tracks, look for primary mu track, record track details. 5a. cBonsaiEvent: 5a.i. Load events, note times and tank exit vertices. 5a.i. Save bonsai event info. 5b. cMRDTrack: 5b.i. Load subevents, check for tracks. 5b.ii. Load tracks, find the highest energy track consistent with bonsai event or tank if none. 5b.ii. Save track details. 5b.iii.Combine MRD + bonsai information to improve muon constraints. 5c. cVetoEvent info 5c.i. Load events, note times. 5c.ii. Save ...? 6. Reconstruct & save neutrino event info. 7. Close & cleanup. */ cout<<"looping over tchain entries"<<endl; // numents=10000; int maxfilenum=2000; Int_t wcsimTentry; // since WCSim only propagated tank events, there is no longer a 1:1 mapping between event numbers // in dirt files and WCSim files. As long as the selection criterion for dirt events is the same here // as in WCSim's PrimaryGeneratorAction, we can select the dirt files, and then just pull the next // wcsim entry for(Int_t inputEntry=0; inputEntry<numents; inputEntry++){ //=================================================================================================== /* 1. Load next g4dirt entry */ //=================================================================================================== #ifdef VERBOSE cout<<"loading entry "<<inputEntry<<endl; #endif Long64_t localEntry = c->LoadTree(inputEntry); if( localEntry<0){ cout<<"end of tchain"<<endl; break; } Int_t nextTreeNumber = c->GetTreeNumber(); if(treeNumber!=nextTreeNumber){ cout<<"new tree: "<<nextTreeNumber<<endl; // this means we've switched file - need to load the new meta tree and genie tree. // first pull out the new file name tankflux = c->GetTree(); dirtfile = tankflux->GetCurrentFile(); dirtfilename=dirtfile->GetName(); thistreesentries = tankflux->GetEntries(); cout<<"tankflux has "<<thistreesentries<<" entries in this file"<<endl; // retrieve genie filename from the meta tree, and open the corresponding genie file tankmeta = (TTree*)dirtfile->Get("tankmeta"); tankmeta->SetBranchAddress("inputFluxName", geniefilename, &geniefilenamebranch); geniefilenamebranch->GetEntry(0); geniefilepath = TString::Format("%s/%s",geniepath,geniefilename); cout<<"corresponding genie file is "<<geniefilepath<<", loading this file"<<endl; if(geniefile) geniefile->Close(); geniefile=0; geniefile = TFile::Open(geniefilepath); if(!geniefile){ cout<<"this genie file doesn't exist!"<<endl; inputEntry += thistreesentries; // skip loop iterator forward by num entries in this file continue; } gtree = (TTree*)geniefile->Get("gtree"); if(!gtree){cout<<"gtree doesn't exist!"<<endl; break; } numgenietentries = gtree->GetEntries(); cout<<"gtree has "<<numgenietentries<<" entries in this file"<<endl; if(numgenietentries<1){cout<<"gtree has no entries!"<<endl; break; } // use regexp to pull out the file number needed for identifying the corresponding wcsim file std::match_results<string::const_iterator> submatches; // filename is of the form "annie_tank_flux.####.root" // #### is input file num. Need this to match against genie/wcsim file names std::regex theexpression (".*/[^0-9]+\\.([0-9]+)\\.root"); cout<<"matching regex for filename "<<dirtfilename<<endl; std::regex_match (dirtfilename, submatches, theexpression); std::string submatch = (std::string)submatches[0]; // match 0 is 'whole match' or smthg if(submatch==""){ cout<<"unrecognised input file pattern: "<<dirtfilename<<endl; return; } submatch = (std::string)submatches[1]; cout<<"extracted submatch is "<<submatch<<endl; int filenum = atoi(submatch.c_str()); if(filenum>maxfilenum) break; // use filenum to open the corresponding wcsim file wcsimfilepath = TString::Format("%s/wcsim_0.%d.root",wcsimpath,filenum); cout<<"corresponding wcsim file is "<<wcsimfilepath<<endl; if(wcsimfile) wcsimfile->Close(); wcsimfile=0; wcsimfile = TFile::Open(wcsimfilepath); if(!wcsimfile){ cout<<"wcsimfile "<<wcsimfilepath<<" doesn't exist!"<<endl; inputEntry += thistreesentries; // skip iterator forward by all the entries in this file continue; } // load the geometry tree and grab the geometry if we haven't already if(geo==0){ TFile* f = TFile::Open("/pnfs/annie/persistent/users/moflaher/wcsim_wdirt_17-06-17/wcsim_0.1000.root"); TTree* geotree = (TTree*)f->Get("wcsimGeoT"); // TODO temporary override //TTree* geotree = (TTree*)wcsimfile->Get("wcsimGeoT"); if(geotree==0){ cout<<"NO GEOMETRY IN FIRST FILE?"<<endl; assert(false); } geotree->SetBranchAddress("wcsimrootgeom", &geo); if (geotree->GetEntries() == 0) { cout<<"geotree has no entries!"<<endl; exit(9); } geotree->GetEntry(0); MakePMTmap(geo, topcappositionmap, bottomcappositionmap, wallpositionmap); } // load the next set of wcsim event info wcsimT = (TTree*)wcsimfile->Get("wcsimT"); if(!wcsimT){cout<<"wcsimT doesn't exist!"<<endl; break; } numwcsimentries = wcsimT->GetEntries(); cout<<"wcsimT has "<<numwcsimentries<<" entries in this file"<<endl; if(numwcsimentries==0){cout<<"wcsimT has no entries!"<<endl; break; } wcsimTentry=-1; // load reconstructed MRD info file mrdfilepath = TString::Format("%s/mrdtrackfile.%d.root",analysispath,filenum); //cout<<"corresponding mrd track file is "<<mrdfilepath<<endl; mrdfile = TFile::Open(mrdfilepath); if(!mrdfile){ cout<<"mrdfile "<<mrdfilepath<<" doesn't exist!"<<endl; inputEntry += thistreesentries; // skip iterator forward by all the entries in this file continue; } // load the set of reconstructed mrdtracks mrdtree = (TTree*)mrdfile->Get("mrdtree"); if(!mrdtree){cout<<"mrdtree doesn't exist!"<<endl; break; } nummrdentries = mrdtree->GetEntries(); if(nummrdentries==0){cout<<"mrdtree has no entries!"<<endl; break; } // load Veto event file /* disabled because dirt events won't have a veto. we should probably enable it anyway. vetofilepath = TString::Format("%s/vetotrackfile.%d.root",analysispath,filenum); //cout<<"corresponding veto event file is "<<wcsimfilepath<<endl; vetofile = TFile::Open(vetofilepath); if(!vetofile){ cout<<"vetofile "<<vetofilepath<<" doesn't exist!"<<endl; inputEntry += thistreesentries; // skip iterator forward by all the entries in this file continue; } // load the set of reconstructed mrdtracks vetotree = (TTree*)vetofile->Get("vetotree"); if(!vetotree{cout<<"vetotree doesn't exist!"<<endl; break; } numvetoentries = vetotree->GetEntries(); if(numvetoentries==0){cout<<"vetotree has no entries!"<<endl; break; } */ // load bonsai info bonsaifilepath = TString::Format("%s/bonsaiout.%d.root",bonsaipath,filenum); //cout<<"corresponding bonsai file is "<<bonsaifilepath<<endl; bonsaifile = TFile::Open(bonsaifilepath); if(!bonsaifile){ cout<<"bonsaifile "<<bonsaifilepath<<" doesn't exist!"<<endl; inputEntry += thistreesentries; // skip iterator forward by all the entries in this file continue; } // load the set of reconstructed mrdtracks bonsaitree = (TTree*)bonsaifile->Get("bonsaitree"); if(!bonsaitree){cout<<"bonsaitree doesn't exist!"<<endl; break; } numbonsaientries = bonsaitree->GetEntries(); //if(numbonsaientries==0){cout<<"bonsaitree has no entries!"<<endl; break; } /* Set the branch addresses for the new trees */ // tankflux: // genie file entry number for each entry, to get the genie intx info c->SetBranchAddress("entry",&genieentry,&genieentrybranch); // number of primaries (so we can create appropriately sized array) c->SetBranchAddress("ntank",&ntankbranchval, &nTankBranch); // material of vertex - identify as 'TankWater' to pull only primaries in the tank c->SetBranchAddress("vtxmat",&vertexmaterial, &vertexmaterialbranch); // array of whether particle is a genie primary nuprimaryBranch=c->GetBranch("primary"); // tankmeta: // POTs in this genie file, so we can normalise wcsim event frequency tankmeta->SetBranchAddress("inputTotalPOTs", &pots, &potsbranch); potsbranch->GetEntry(0); Double_t lasttotpots=totalpots; if(TMath::IsNaN(pots)==0){ totalpots += pots; } if(totalpots<lasttotpots){ cerr<<"ERROR! TOTAL POTS CAME DOWN FROM "<<lasttotpots<<" TO "<<totalpots<<endl; return; } else { cout<<"adding "<<pots<<" POTs to the running total, making "<<totalpots<<" POTs so far"<<endl; } // wcsimT: wcsimT->SetBranchAddress("wcsimrootevent",&b, &bp); wcsimT->SetBranchAddress("wcsimrootevent_mrd",&m, &mp); wcsimT->SetBranchAddress("wcsimrootevent_facc",&v, &vp); bp->SetAutoDelete(kTRUE); mp->SetAutoDelete(kTRUE); vp->SetAutoDelete(kTRUE); if(bp==0||mp==0||vp==0){ cout<<"branches are zombies!"<<endl; } // gtree: gtree->SetBranchAddress("gmcrec",&genierecordval,&genierecordBranch); // mrdtree: // to support multiple triggers, we won't have 1:1 event correspondance with wcsimT. // we need to scan mrdtree to find all events with mrdeventnum the same as the wcsimT entry. mrdtree->SetBranchAddress("EventID",&mrdeventnum); mrdtree->SetBranchAddress("TriggerID",&mrdtriggernum); mrdtree->SetBranchAddress("nummrdsubeventsthisevent",&numMrdEvents); mrdtree->SetBranchAddress("nummrdtracksthisevent",&numMrdTracks); mrdtree->SetBranchAddress("subeventsinthisevent",&mrdevents); // vetotree: TODO TODO TODO //vetotree->SetBranchAddress("EventID",&vetoeventnum); //vetotree->SetBranchAddress("TriggerID",&vetotriggernum); //vetotree->SetBranchAddress("numvetoeventsthisevent",&numVetoEvents); //vetotree->SetBranchAddress("vetoeventsinthisevent",&vetoevents); // bonsaitree: bonsaievent->Init(bonsaitree); bonsaievent->DisableBranches(); // reduces the amount of reading necessary treeNumber=nextTreeNumber; } // end of load new tree geniefilestring=geniefilepath; dirtfilestring=TString(dirtfilename); wcsimfilestring=wcsimfilepath; mrdfilestring=mrdfilepath; vetofilestring=vetofilepath; bonsaifilestring=bonsaifilepath; dirteventnum=localEntry; //=================================================================================================== /* 2. retrieve genie info to test if vertex was in tank. TODO DISABLE FOR FILES W/DIRT NEUTRINOS */ //=================================================================================================== #ifdef VERBOSE cout<<"processing inputEntry "<<inputEntry<<", localEntry "<<localEntry <<"/"<<thistreesentries<<" in tree "<<treeNumber<<endl; #endif nTankBranch->GetEntry(localEntry); vertexmaterialbranch->GetEntry(localEntry); // it doesn't make sense to count how many non-tank events there were if we didn't simulate them // they only contribute background, but they don't contribute background because they weren't simulated! // TODO remove this when analysing sample including dirt interactions. if(strcmp(vertexmaterial,"TankWater")!=0){ /*cout<<"neutrino vtx not in tank"<<endl;*/ continue; } if(nuprimarybranchval){delete[] nuprimarybranchval;} nuprimarybranchval = new Int_t[ntankbranchval]; nuprimaryBranch->SetAddress(nuprimarybranchval); nuprimaryBranch->GetEntry(localEntry); Bool_t primariesinthisentry=false; for(int i=0;i<ntankbranchval;i++){ if(nuprimarybranchval[i]==1){ primariesinthisentry=true; break; } } if(!primariesinthisentry){ cerr<<"wcsim primaries not genie primaries"<<endl; continue; } // These selection criteria are the WCSim PrimaryGeneratorAction ones. Any event that passes here // will have created a WCSimT entry: wcsimTentry++; // do this now in case we introduce any 'continue' statements later isintank=true; //=================================================================================================== /* 3. load remaining genie info. */ //=================================================================================================== #ifdef VERBOSE cout<<"getting genie info"<<endl; #endif if(localEntry>(numgenietentries-1)){ cerr<<"can't load localEntry "<<localEntry <<" from "<<geniefilepath<<" gtree: not enough entries!"<<endl; continue; } genieentrybranch->GetEntry(localEntry); genierecordBranch->GetEntry(genieentry); genie::EventRecord* gevtRec = genierecordval->event; genie::Interaction* genieint = gevtRec->Summary(); // fill thegenieinfo struct with all the genie info GetGenieEntryInfo(gevtRec, genieint, thegenieinfo); // fill the branches from the struct members genieeventnum=genieentry; eventtypes=thegenieinfo.eventtypes; // all the bools IsQuasiElastic=thegenieinfo.eventtypes.at("IsQuasiElastic"); IsResonant=thegenieinfo.eventtypes.at("IsResonant"); IsDeepInelastic=thegenieinfo.eventtypes.at("IsDeepInelastic"); IsCoherent=thegenieinfo.eventtypes.at("IsCoherent"); IsDiffractive=thegenieinfo.eventtypes.at("IsDiffractive"); IsInverseMuDecay=thegenieinfo.eventtypes.at("IsInverseMuDecay"); IsIMDAnnihilation=thegenieinfo.eventtypes.at("IsIMDAnnihilation"); IsSingleKaon=thegenieinfo.eventtypes.at("IsSingleKaon"); IsNuElectronElastic=thegenieinfo.eventtypes.at("IsNuElectronElastic"); IsEM=thegenieinfo.eventtypes.at("IsEM"); IsWeakCC=thegenieinfo.eventtypes.at("IsWeakCC"); IsWeakNC=thegenieinfo.eventtypes.at("IsWeakNC"); IsMEC=thegenieinfo.eventtypes.at("IsMEC"); // the other info eventq2=thegenieinfo.Q2; eventEnu=thegenieinfo.probeenergy; neutrinopdg=thegenieinfo.probepdg; muonangle=thegenieinfo.fslanglegenie; hasmuon=(thegenieinfo.fsleptonname=="mu-"); mustartE=thegenieinfo.fsleptonenergy; isinfiducialvol=false; if( (TMath::Sqrt(TMath::Power(thegenieinfo.genie_x, 2) + TMath::Power(thegenieinfo.genie_z-tank_start-tank_radius,2)) < fidcutradius) && (TMath::Abs(thegenieinfo.genie_y-tank_yoffset) < fidcuty) && ((thegenieinfo.genie_z-tank_start-tank_radius) < fidcutz) ){ isinfiducialvol=true; } //=================================================================================================== /* 4. load wcsim detector response. */ //=================================================================================================== #ifdef VERBOSE cout<<"getting wcsim entry "<<wcsimTentry<<endl; #endif if(wcsimTentry>(numwcsimentries-1)){ cerr<<"can't load wcsimT entry "<<wcsimTentry <<" from "<<wcsimfilepath<<" wcsimT - not enough entries!"<<endl; continue; } wcsimT->GetEntry(wcsimTentry); // read only first subtrigger; delayed events are not interesting for primary FSL tracks atrigt = b->GetTrigger(0); atrigm = m->GetTrigger(0); atrigv = v->GetTrigger(0); wcsimeventnum=wcsimTentry; Int_t numtracks = atrigt->GetNtrack(); #ifdef VERBOSE cout<<"wcsim event had "<<numtracks<<" truth tracks"<<endl; #endif numpizerotracks=0; numpiplustracks=0; numpiminustracks=0; nummutracks=0; numneutrontracks=0; numprotontracks=0; // pull just the primary muon track - there should only be one. // (there are on average ~1.4 muons per event!) Int_t mutrackindex=-1; for(int track=0; track<numtracks; track++){ WCSimRootTrack* nextrack = (WCSimRootTrack*)atrigt->GetTracks()->At(track); Int_t primarypdg = nextrack->GetIpnu(); if(nextrack->GetFlag()!=0) continue; switch (primarypdg){ case 111: numpizerotracks++; break; case 211: numpiplustracks++; break; case -211: numpiminustracks++; break; case 13: nummutracks++; break; case 2112: numneutrontracks++; break; case 2212: numprotontracks++; break; } if(TMath::Abs(primarypdg)!=13) continue; // not a muon if(nextrack->GetParenttype()!=0) continue; // not a primary mutrackindex=track; break; } if(mutrackindex<0){ // this should be the same as hasmuon==false set by genie // record tank/mrd events even for DIS/CC1Pi mustartvtx=TVector3(0,0,0); mustarttime=0.; mustopvtx=TVector3(0,0,0); muendE=0; mutracklengthintank=0; } else { //=============================================================================================== /* 6. Retrieve additional primary muon details from WCSim event. */ //=============================================================================================== WCSimRootTrack* nextrack = (WCSimRootTrack*)atrigt->GetTracks()->At(mutrackindex); TLorentzVector primarystartvertex( nextrack->GetStart(0), nextrack->GetStart(1), nextrack->GetStart(2), nextrack->GetTime()); TLorentzVector primarystopvertex( nextrack->GetStop(0), nextrack->GetStop(1), nextrack->GetStop(2), nextrack->GetStopTime()); mustartvtx=primarystartvertex.Vect(); mustarttime=primarystartvertex.T(); mustopvtx=primarystopvertex.Vect(); TVector3 differencevector = (primarystopvertex.Vect()-primarystartvertex.Vect()); muendE=nextrack->GetEndE(); // ---------------------------------------------------------------------------------------------- // calculate the track length in water - TODO remove once tank reco is good // ---------------------------------------------------------------------------------------------- // to calculate track length in water find distance from start vertex to the point // where it intercepts the tank. if this length > total track length, use total track length // otherwise use this length. // calculate track angles - assuming a straight track Float_t oppx = primarystopvertex.X() - primarystartvertex.X(); Float_t adj = primarystopvertex.Z() - primarystartvertex.Z(); Float_t avgtrackanglex = (oppx/adj); Float_t oppy = primarystopvertex.Y() - primarystartvertex.Y(); Float_t avgtrackangley = (oppy/adj); // first find out the z value where the tank would leave the radius of the tank #ifdef MUTRACKDEBUG cout<<"z0 = "<<genie_z-tank_start-tank_radius<<", x0 = "<<genie_x<<endl; #endif Double_t xatziszero = (thegenieinfo.genie_x - (thegenieinfo.genie_z-tank_start-tank_radius)*(avgtrackanglex)); Double_t firstterm = -(avgtrackanglex)*xatziszero; Double_t thirdterm = 1+TMath::Power((avgtrackanglex),2.); Double_t secondterm = (TMath::Power(tank_radius,2.)*thirdterm) - TMath::Power(xatziszero,2.); Double_t solution1 = (firstterm + TMath::Sqrt(secondterm))/thirdterm; Double_t solution2 = (firstterm - TMath::Sqrt(secondterm))/thirdterm; Double_t tankendpointz; if(primarystopvertex.Z() > primarystartvertex.Z()){ tankendpointz = solution1; //forward going track } else { tankendpointz = solution2; // backward going track } // correct for tank z offset (do after tankendpointx, before tankendpointy) tankendpointz += tank_start+tank_radius; Double_t tankendpointx = thegenieinfo.genie_x + (tankendpointz-thegenieinfo.genie_z)*(avgtrackanglex); // now check if the particle would have exited through one of the caps before reaching this radius Double_t tankendpointy = thegenieinfo.genie_y + (tankendpointz-thegenieinfo.genie_z)*(avgtrackangley); #ifdef MUTRACKDEBUG cout<<"avgtrackanglex="<<avgtrackanglex<<endl; cout<<"avgtrackangley="<<avgtrackangley<<endl; cout<<"xatziszero="<<xatziszero<<endl; cout<<"firstterm="<<firstterm<<endl; cout<<"thirdterm="<<thirdterm<<endl; cout<<"secondterm="<<secondterm<<endl; cout<<"solution1="<<solution1<<endl; cout<<"solution2="<<solution2<<endl<<endl; cout<<"values before cap exit check"<<endl; cout<<"tankendpointz="<<tankendpointz<<endl; cout<<"tankendpointx="<<tankendpointx<<endl; cout<<"tankendpointy="<<tankendpointy<<endl; #endif if(TMath::Abs(tankendpointy-tank_yoffset)>(tank_halfheight)){ // this trajectory exits through the cap. Need to recalculate x, z exiting points...! if(primarystopvertex.Y()>primarystartvertex.Y()){ tankendpointy = tank_halfheight+tank_yoffset; // by definition of leaving through cap } else { tankendpointy = -tank_halfheight+tank_yoffset; } tankendpointz = thegenieinfo.genie_z + (tankendpointy-thegenieinfo.genie_y)/(avgtrackangley); tankendpointx = thegenieinfo.genie_x + (tankendpointz-thegenieinfo.genie_z)*(avgtrackanglex); } else { // this trajectory exited the tank by a side point; existing value is valid } Double_t maxtanktracklength = TMath::Sqrt(TMath::Power(tank_radius*2.,2.)+TMath::Power(tank_halfheight*2.,2.)); #ifdef MUTRACKDEBUG cout<<"values after cap exit check"<<endl; cout<<"tankendpointz="<<tankendpointz<<endl; cout<<"tankendpointx="<<tankendpointx<<endl; cout<<"tankendpointy="<<tankendpointy<<endl; cout<<"max tank track length is "<<maxtanktracklength<<endl; #endif // we're now able to determine muon track length in the tank: mutracklengthintank = TMath::Sqrt( TMath::Power((tankendpointx-thegenieinfo.genie_x),2)+ TMath::Power((tankendpointy-thegenieinfo.genie_y),2)+ TMath::Power((tankendpointz-thegenieinfo.genie_z),2) ); #ifdef MUTRACKDEBUG cout<<"muon tank track length: ("<<(tankendpointx-thegenieinfo.genie_x) <<", "<<(tankendpointy-thegenieinfo.genie_y)<<", " <<(tankendpointz-thegenieinfo.genie_z)<<") = "<<mutracklengthintank<<"cm total"<<endl; cout<<"muon tank exit point: ("<<tankendpointx<<", "<<tankendpointy<<", "<<tankendpointz<<") "; cout<<"muon start point : ("<<thegenieinfo.genie_x<<", "<<thegenieinfo.genie_y <<", "<<thegenieinfo.genie_z<<")"<<endl; #endif if(mutracklengthintank > maxtanktracklength){ cerr<<"Track length is impossibly long!"<<endl; assert(false); } if(TMath::IsNaN(mutracklengthintank)){ cerr<<"NaN result from mu track length in tank!"<<endl; assert(false); } // ---------------------------------------------------------------------------------------------- // digit analysis // ---------------------------------------------------------------------------------------------- #ifdef VERBOSE cout<<"Analysing tank digits"<<endl; #endif numTankDigits = atrigt->GetCherenkovDigiHits()->GetEntries(); totaltankcharge=atrigt->GetSumQ(); /* just incase we want to draw events, leave this here. // it needs work to be enabled. ClearMapHistos(maphistos); for(Int_t i=0; i<numTankDigits; i++){ // retrieve the digit information ///////////////////////////////// WCSimRootCherenkovDigiHit* thedigihit = (WCSimRootCherenkovDigiHit*)atrigt->GetCherenkovDigiHits()->At(i); int digitstubeid = thedigihit->GetTubeId()-1; double digitsq = thedigihit->GetQ(); double digitst = thedigihit->GetT(); // this is time within the trigger window + 950ns WCSimRootEventHeader* trigheader=atrigt->GetHeader(); double triggertime=trigheader->GetDate(); double absolutedigitst=digitst-950.+triggertime; WCSimRootPMT pmt = geo->GetPMT(digitstubeid); double digitsx = pmt.GetPosition(0); double digitsy = pmt.GetPosition(1); double digitsz = pmt.GetPosition(2); int thepmtsloc = pmt.GetCylLoc(); switch (thepmtsloc){ case 0: topcapcharge+=digitsq; break; case 2: bottomcapcharge+=digitsq; break; case 1: ((digitsz-tank_start-tank_radius)<0) ? upstreamcharge+=digitsq : downstreamcharge+=digitsq; break; FillTankMapHist(geo, digitstubeid, true, maphistos, digitsq); } } // end loop over digits TH1* histowall=(TH1*)maphistos.at("inconehistowall"); if(histowall.GetEntries() > 10){ TCanvas c1("c1"); c1.cd(); TH1* histowall=(TH1*)maphistos.at("inconehistowall"); histowall->Draw("colz"); TCanvas c4("c4"); c4.cd(); histowall=maphistos.at("outconehistowall"); histowall->Draw("colz"); TCanvas c5("c5"); c5.cd(); hitpositions.SetMarkerStyle(20); hitpositions.Draw(); gPad->WaitPrimitive(); //std::this_thread::sleep_for (std::chrono::seconds(15)); // wait so we can look at histos } */ } // end if if WCSim true tracks had a primary muon // ================================================================================================== // load bonsai event // ================================================================================================== bonsaievent->GetEntry(wcsimTentry); // check this is the correct event /* if( bool correctevent=false; //bonsaievent->wcsimfilestring==wcsimfilestring&& //<<TODO: fix in bonsai files. bonsaievent->EventId==wcsimeventnum&& bonsaievent->SubtriggerId==0 //<<TODO: fix in bonsai files: all 32163??? ) correctevent=true; if(!correctevent){ cerr<<"bonsai event did not match wcsimT event!"<<endl <<"wcsimfile: "<<wcsimfilestring <<", bonsai's wcsimfile: "<<bonsaievent->wcsimfilestring <<", wcsimTentry: "<<wcsimTentry <<", bonsai's event entry: "<<bonsaievent->EventId <<", wcsimTentry subevent: "<<0 <<", bonsai subentry = "<<bonsaievent->SubtriggerId <<endl; assert(false); } */ // for the file: hadBonsaiEvent=bonsaievent->Vertex_Found; if(hadBonsaiEvent){ // bonsai only returns one vertex, so fill the info now // - no need to wait until we see if it's mrd matched bonsaiVertex = bonsaievent->RecoVtx_Vec; bonsaiVertexError = 80.; // TODO ?? how to calculate? bonsaiVertexT = bonsaievent->RecoVtx_T; bonsaiVertexInTank = bonsaievent->Vertex_In_Tank; bonsaiDirection = bonsaievent->RecoDir_Vec; bonsaiDirectionError = bonsaievent->RecoDir_Error; bonsaiTankExit = bonsaievent->Tank_Exit_Point; // could be updated if mrd track found TVector3 diffvec = bonsaiTankExit-bonsaiVertex; bonsaiTrackLengthInTank = diffvec.Mag(); bonsaiEnergyLoss = bonsaievent->TankEnergyLoss; // [MeV] bonsaiEnergyLossError = bonsaievent->TankEnergyLossError; bonsaiInterceptsMrd = bonsaievent->Intercepts_MRD; bonsaiMrdEntry = bonsaievent->Projected_MRDEntryPoint; } else { bonsaiVertex = TVector3(0,0,0); bonsaiVertexError = 0; bonsaiVertexT = 0; bonsaiVertexInTank = false; bonsaiDirection = TVector3(0,0,0); bonsaiDirectionError = 0; bonsaiTankExit = TVector3(0,0,0); bonsaiTrackLengthInTank = 0; bonsaiEnergyLoss = 0; bonsaiEnergyLossError = 0; bonsaiInterceptsMrd = false; bonsaiMrdEntry = TVector3(0,0,0); } // ================================================================================================== // load mrd event // ================================================================================================== TDatabasePDG db; Double_t muonmass = (db.GetParticle(13)->Mass())*1000.; // converted to MeV // need this when calculating neutrino event info, which uses relativistic muon energy // was this working before? didn't appear to actually load the MRD entry!?! // scan forward to the next MRD tree entry with eventnum = the current wcsimT tree entry. while(mrdeventnum<wcsimTentry){ currentmrdtreeentry++; mrdtree->GetEntry(currentmrdtreeentry); } // how about scanning to find the right trigger? we need to do that too! XXX FIXME XXX XXX FIXME XXX if(mrdeventnum==wcsimTentry&&numMrdEvents>0) hadMrdEvent=true; // in case we find no suitable tracks, pre-fill with blanks mrdEntryVertex=TVector3(0,0,0); mrdEntryTime= 0; mrdStopVertex=TVector3(0,0,0); mrdDirectionError=0; mrdTrackLength=0; mrdEnergyLoss=0; mrdEnergyLossError=0; mrdPenetrated=false; mrdStopped=false; mrdSideExit=false; recoVertex=TVector3(0,0,0); recoVertexError=TVector3(0,0,0); bonsaiMrdAngDiff=0.; TVector3 mrdtankvertex; int matchedsubevent=-1; int matchedtrack=-1; if(mrdeventnum==wcsimTentry&&numMrdTracks>0){ // quick skip hadMrdTrack=true; mrdevents->Clear(); assert(numMrdEvents==mrdevents->GetEntriesFast() &&"Num MRD SubEvents in TClonesArray does not match claimed number!"); // need to scan over all mrd tracks and find the "best" match. // this will be defined as the longest track, consistent with bonsai event if available, // or just with a tank interception otherwise. double maxtracklength=-1.; for(int subev=0; subev<numMrdEvents; subev++){ // TClonesArray->At() returns a pointer cMRDSubEvent* asubevent =(cMRDSubEvent*)mrdevents->At(subev); std::vector<cMRDTrack> &mrdtracks = *(asubevent->GetTracks()); // loop over tracks in the mrd subevent for(int tracki=0; tracki<mrdtracks.size(); tracki++){ auto anmrdtrack = mrdtracks.at(tracki); // is this track longer than our current max? if(anmrdtrack.GetTrackLength()<maxtracklength) continue; // if we had a bonsai event, is it consistent with the bonsai vertex? if(hadBonsaiEvent){ // Look for an overlap region... this gets tricky. // we know there will be an overlap region if the mrd track comes within // bonsaiVertexError of the bonsaiVertex. double closestapp = anmrdtrack.GetClosestApproach(bonsaiVertex, 0); if(closestapp<bonsaiVertexError){ // this is a simple case - best fit mrd track is consistent with bonsai region // next require the direction is compatible TVector3 mrdtrackdir = anmrdtrack.GetStopVertex() - anmrdtrack.GetStartVertex(); mrdDirectionError = anmrdtrack.GetTrackAngleError(); bonsaiMrdAngDiff = TMath::ACos(bonsaiDirection.Dot(mrdtrackdir.Unit())); if(bonsaiMrdAngDiff>(bonsaiDirectionError+mrdDirectionError)) continue; // this is a new longest consistent track! // the projected mrd vertex will be the point of closest approach mrdtankvertex = anmrdtrack.GetClosestPoint(bonsaiVertex, 0); // the global best fit point is between bonsai vertex and projected mrd vertex recoVertex = bonsaiVertex + 0.5*(bonsaiVertex-mrdtankvertex); // some rough estimates of error: TODO how to define? TVector3 vertexdiff = bonsaiVertex - mrdtankvertex; double vtxdiffmag = vertexdiff.Mag(); double xmax, xmin, ymax, ymin; anmrdtrack.GetProjectionLimits(recoVertex.Z(),xmax, xmin, ymax, ymin); double mrdvtxerrmag = sqrt(pow(xmax-xmin,2)+pow(ymax-ymin,2)); double errormag = 0.5*sqrt((vtxdiffmag+bonsaiVertexError)* (vtxdiffmag+mrdvtxerrmag)); recoVertexError=TVector3(errormag,errormag,errormag); // XXX??? // since this is new best match: retrieve/override details maxtracklength = anmrdtrack.GetTrackLength(); mrdEntryVertex = anmrdtrack.GetMrdEntryPoint(); mrdEntryTime = anmrdtrack.GetStartTime(); mrdStopVertex = anmrdtrack.GetStopVertex(); mrdTrackLength = anmrdtrack.GetTrackLength(); mrdEnergyLoss = anmrdtrack.GetEnergyLoss(); mrdEnergyLossError = anmrdtrack.GetEnergyLossError(); mrdPenetrated = anmrdtrack.GetIsPenetrating(); mrdStopped = anmrdtrack.GetIsStopped(); mrdSideExit = anmrdtrack.GetIsSideExit(); matchedsubevent=subev; matchedtrack=tracki; } else { // even if best fit line does not cross, we can still have consistency, provided // the region spanned by mrd track error intersects the bonsai allowed region. // This region exists if either mrd track upper or lower boundary lines // approaches within bonsaiVertexError of bonsaiVertex. // we have 4 corners that define the square based pryamid projection // from mrd. TODO: How do we find the closest point? // we can make an estimate by taking 2D case in the plane of bonsai vertex Z. // We can then find the closest point fairly easily from the projection corners: double xmax, xmin, ymax, ymin; anmrdtrack.GetProjectionLimits(recoVertex.Z(), xmax, xmin, ymax, ymin); double xclosest, yclosest; if(xmax>bonsaiVertex.X()&&xmin<bonsaiVertex.X()){ xclosest=bonsaiVertex.X(); } else { if(abs(bonsaiVertex.X()-xmin)>abs(bonsaiVertex.X()-xmax)){ xclosest=xmax; } else { xclosest=xmin; } } if(ymax>bonsaiVertex.Y()&&ymin<bonsaiVertex.Y()){ yclosest=bonsaiVertex.Y(); } else { if(abs(bonsaiVertex.Y()-ymin)>abs(bonsaiVertex.Y()-ymax)){ yclosest=ymax; } else { yclosest=ymin; } } // check the closest point within the mrd allowed region is within // the bonsai error radius double radiusofclosest = sqrt(pow(bonsaiVertex.X()-xclosest,2) +pow(bonsaiVertex.Y()-yclosest,2)); if(radiusofclosest>bonsaiVertexError) continue; mrdtankvertex =TVector3(xclosest,yclosest,bonsaiVertex.Z()); // vertices are consistent: next require the direction is compatible TVector3 mrdtrackdir = anmrdtrack.GetStopVertex() - anmrdtrack.GetStartVertex(); mrdDirectionError = anmrdtrack.GetTrackAngleError(); bonsaiMrdAngDiff = TMath::ACos(bonsaiDirection.Dot(mrdtrackdir.Unit())); if(bonsaiMrdAngDiff>(bonsaiDirectionError+mrdDirectionError)) continue; // the best fit point will be somewhere within the overlap region. // TODO: for now let's place it midway: halfway between closest point // (representing mrd outer limit) and bonsaiVertexError (representing // bonsai outer limit). double magofdistance = radiusofclosest + ((bonsaiVertexError - radiusofclosest)/2.); TVector3 dirofdistance = mrdtankvertex - bonsaiVertex; dirofdistance.SetMag(magofdistance); recoVertex = bonsaiVertex+dirofdistance; // TODO: error calculation... double errormag = 0.5*sqrt((magofdistance+bonsaiVertexError)* (magofdistance/*+mrdvtxerrmag*/)); //XXX??? recoVertexError = TVector3(errormag,errormag,errormag); // XXX??? // since this is new best match: retrieve/override details maxtracklength = anmrdtrack.GetTrackLength(); mrdEntryVertex = anmrdtrack.GetMrdEntryPoint(); mrdEntryTime = anmrdtrack.GetStartTime(); mrdStopVertex = anmrdtrack.GetStopVertex(); mrdTrackLength = anmrdtrack.GetTrackLength(); mrdEnergyLoss = anmrdtrack.GetEnergyLoss(); mrdEnergyLossError = anmrdtrack.GetEnergyLossError(); mrdPenetrated = anmrdtrack.GetIsPenetrating(); mrdStopped = anmrdtrack.GetIsStopped(); mrdSideExit = anmrdtrack.GetIsSideExit(); matchedsubevent=subev; matchedtrack=tracki; } } else { // no bonsai event if(anmrdtrack.GetInterceptsTank()){ // this is a simple case - best fit mrd track is consistent with tank region // this is a new longest consistent track! // we find the entry and exit points of the tank: TVector3 entrypoint; TVector3 exitpoint; bool valid = anmrdtrack.CheckTankIntercept(&entrypoint, &exitpoint,0); recoVertex = entrypoint+0.5*(exitpoint-entrypoint); // TODO i don't even know. double xmax, xmin, ymax, ymin; anmrdtrack.GetProjectionLimits(recoVertex.Z(),xmax, xmin, ymax, ymin); double errormag = sqrt(pow(entrypoint.Z()-exitpoint.Z(),2) +pow(xmax-xmin,2)+pow(ymax-ymin,2)); recoVertexError=TVector3(errormag,errormag,errormag); // n.b. no directionality check required, but still save error mrdDirectionError = anmrdtrack.GetTrackAngleError(); // since this is new best match: retrieve/override details maxtracklength = anmrdtrack.GetTrackLength(); mrdEntryVertex = anmrdtrack.GetMrdEntryPoint(); mrdEntryTime = anmrdtrack.GetStartTime(); mrdStopVertex = anmrdtrack.GetStopVertex(); mrdTrackLength = anmrdtrack.GetTrackLength(); mrdEnergyLoss = anmrdtrack.GetEnergyLoss(); mrdEnergyLossError = anmrdtrack.GetEnergyLossError(); mrdPenetrated = anmrdtrack.GetIsPenetrating(); mrdStopped = anmrdtrack.GetIsStopped(); mrdSideExit = anmrdtrack.GetIsSideExit(); matchedsubevent=subev; matchedtrack=tracki; } else { // // TODO THIS IS TOO COMPLICATED RIGHT NOW. NO VERTEX FOUND. // // even if best fit line does not cross, we can still have consistency, provided // // the region spanned by mrd track error intersects the tank. // // // we need to check all 4 corners: max and min of h projection // // each with max and min of v projection. Up to 2 of them may intersect the tank. // // TODO // // TVector3 entrypoint; // // TVector3 exitpoint; // // bool corner1 = anmrdtrack.CheckTankIntercept(&entrypoint, &exitpoint,1); // // // // if neither are within tank_radius of tank origin, there's no overlap region // if((maxclosestapp>tank_radius)&&(minclosestapp>tank_radius)) continue; // // // n.b. no directionality check required, but still save error // mrdDirectionError = anmrdtrack.GetTrackAngleError(); // // // since the best fit point is inconsistent, only one line can intersect // double closestapp = std::min(minclosestapp, maxclosestapp); // int maxmin = (closestapp==minclosestapp) ? 1 : -1; // // // TODO what we *should* do is find the smallest angle from best fit line that // // intercepts the tank, and find where it does so. // // since it's less complicated, just do as per best fit line, // // but with whichever limit intercepted the tank. // TVector3 entrypoint; // TVector3 exitpoint; // bool valid = anmrdtrack.CheckTankIntercept(&entrypoint, &exitpoint,maxmin); // recoVertex = entrypoint+0.5*(exitpoint-entrypoint); // // TVector3 tankorigin=(0,0,tank_start+tank_radius); // double bestfitclosestapp = anmrdtrack.GetClosestApproach(tankorigin, 0); // recoVertexError=closestapp-tank_radius; // // // since this is new best match: retrieve/override details // maxtracklength = anmrdtrack.GetTrackLength(); // mrdEntryVertex = anmrdtrack.GetMrdEntryPoint(); // mrdEntryTime = anmrdtrack.GetStartTime(); // mrdStopVertex = anmrdtrack.GetStopVertex(); // mrdTrackLength = anmrdtrack.GetTrackLength(); // mrdEnergyLoss = anmrdtrack.GetEnergyLoss(); // mrdEnergyLossError = anmrdtrack.GetEnergyLossError(); // mrdPenetrated = anmrdtrack.GetIsPenetrating(); // mrdStopped = anmrdtrack.GetIsStopped(); // mrdSideExit = anmrdtrack.GetIsSideExit(); // // matchedsubevent=subev; // matchedtrack=tracki; } // else: best fit does not intercept tank } // else : no bonsai event case } // loop over tracks in this mrd subevent } // loop over mrd subevents (note: these are not separate triggers) } if(hadBonsaiEvent&&(matchedtrack>0)){ if(true){ // TODO store MRD track even if it doesn't match bonsai <<<<<<<<<<<<<<<<<< // combine the information from bonsaiVertex and recalculate improved fit for // mrd values such as angle, energy loss etc. cMRDSubEvent* asubevent =(cMRDSubEvent*)mrdevents->At(matchedsubevent); auto anmrdtrack = asubevent->GetTracks()->at(matchedtrack); anmrdtrack.AddTrackPoint(bonsaiVertex, TVector3(bonsaiVertexError,bonsaiVertexError,bonsaiVertexError)); anmrdtrack.DoTGraphErrorsFit(); recoMuonAngle = anmrdtrack.GetTrackAngle(); recoMuonAngleError = anmrdtrack.GetTrackAngleError(); anmrdtrack.CheckIfStopping(); // stopping status may have change due to adjustment of track angle affecting endpoint // and fiducial requirements recoMuonStopped = anmrdtrack.GetIsStopped(); anmrdtrack.CalculateEnergyLoss(); // XXX where do we start using relativistic energy? need to add in rest mass recoMuonEnergy = anmrdtrack.GetEnergyLoss()+bonsaiEnergyLoss + pow(muonmass,2.); recoMuonEnergyError = anmrdtrack.GetEnergyLossError()+bonsaiEnergyLossError; } // whether or not the events were consistent, if we had both, fill the difference details bonsaiMrdTankVtxDiff = bonsaiVertex-mrdtankvertex; } // ================================================================================================== // load veto event // TODO // ================================================================================================== /* veto events are empty until dirt events are simulated */ /* // scan forward to the next MRD tree entry with eventnum = the current wcsimT tree entry. while(vetoeventnum<wcsimTentry){ currentvetotreeentry++; vetotree->GetEntry(currentvetotreeentry); } if(currentvetotreeentry!=wcsimTentry){ // don't think this should ever happen: we should have at least 1 hadVetoEvent = false; vetoEventTime = 0.; } else { // we should also check for matching trigger... we may have >1 trigger // at the least the event time will be relative to trigger time. // XXX FIXME XXX XXX FIXME XXX vetoevent->Clear();???? there is no variable vetoevent. placeholder code? unneeded? vetotree->GetEntry(wcsimTentry); */ hadVetoEvent = false; vetoEventTime = 0.; //} // ================================================================================================== // combine events to calculate neutrino reconstructed information // ================================================================================================== if(recoVertex!=TVector3(0,0,0)){ hadRecoEvent = true; //recoVertex = set above //recoVertexError = set above //recoMuonEnergy = set above //recoMuonEnergyError = set above //recoMuonAngle = set above //recoMuonAngleError = set above recoNeutrinoEnergy = CalculateNeutrinoEnergy(recoMuonEnergy, recoMuonAngle); double muangleerrorsign = (recoMuonAngle>0.) ? 1. : -1.; double recoEnumax = CalculateNeutrinoEnergy(recoMuonEnergy+recoMuonEnergyError, recoMuonAngle-(muangleerrorsign*recoMuonAngleError)); double recoEnumin = CalculateNeutrinoEnergy(recoMuonEnergy-recoMuonEnergyError, recoMuonAngle+(muangleerrorsign*recoMuonAngleError)); recoNeutrinoEnergyError = recoEnumax-recoEnumin; recoEventQ2 = CalculateEventQ2(recoMuonEnergy, recoNeutrinoEnergy, recoMuonAngle); double evq2max = CalculateEventQ2(recoMuonEnergy+recoMuonEnergyError, recoEnumin, recoMuonAngle-(muangleerrorsign*recoMuonAngleError)); double evq2min = CalculateEventQ2(recoMuonEnergy-recoMuonEnergyError, recoEnumax, recoMuonAngle+(muangleerrorsign*recoMuonAngleError)); recoEventQ2Error = evq2max-evq2min; } else { // no consistent event with mrd and tank track hadRecoEvent = false; recoMuonEnergy = 0; recoMuonEnergyError = 0; recoMuonAngle = 0; recoMuonAngleError = 0; recoEventQ2 = 0; recoEventQ2Error = 0; recoNeutrinoEnergy = 0; recoNeutrinoEnergyError = 0; recoVertex = TVector3(0,0,0); recoVertexError = TVector3(0,0,0); } // ================================================================================================== // should have set all the information now - fill the branches // ================================================================================================== treeout->Fill(); } // end of loop over events // ====================================================================================================== // ====================================================================================================== // Double_t numbeamspills = totalpots/(4.0 * TMath::Power(10.,12.)); // Double_t numbeamspillsperday = (24.*60.*60.*1000.)/133.3333; // 24 hours in ms / 133.33 ms between spills // Double_t numdays = numbeamspills/numbeamspillsperday; // cout<<"Results based on "<<totalpots<<" POTs, or "<<numbeamspills<<" beam spills, or "<<numdays<<" days of data"<<endl; // cout<<"There were "<<numneutrinoeventsintank<<" neutrino interactions in the tank, of which "<<numCCQEneutrinoeventsintank<<" were true CCQE events."<<endl; // cout<<"Of those, "<<numCCQEneutrinoeventsinfidvol<<" were within the fiducial volume."<<endl; // cout<<"Of those in turn, "<<numCCQEneutrinoeventsinfidvolmrd<<" produced an accepted MRD muon"<<endl; // cout<<"There were "<<nummuontracksintank<<" muons in the tank, of which " // <<nummuontracksinfidvol<<" were from (CCQE?) events in the fiducial volume."<<endl; // cleanup // ======= cout<<"cleanup"<<endl; if(c) c->ResetBranchAddresses(); //cout<<"resetting tankflux branches"<<endl; if(tankflux) tankflux->ResetBranchAddresses(); //cout<<"resetting tankmeta branches"<<endl; if(tankmeta) tankmeta->ResetBranchAddresses(); cout<<"closing dirtfile"<<endl; if(dirtfile) dirtfile->Close(); // do we need to do this with a TChain? //cout<<"deleting dirtfile"<<endl; if(c) delete c; c=0; // ?? //cout<<"resetting gtree branches"<<endl; if(gtree) gtree->ResetBranchAddresses(); cout<<"closing geniefile"<<endl; if(geniefile) geniefile->Close(); // should clean up gtree //cout<<"deleting genierecordval"<<endl; if(genierecordval) delete genierecordval; genierecordval=0; //cout<<"resetting wcsimT branches"<<endl; if(wcsimT) wcsimT->ResetBranchAddresses(); cout<<"closing wcsimfile"<<endl; if(wcsimfile) wcsimfile->Close(); // should clean up wcsimT //cout<<"deleting nuprimarybranchval array"<<endl; if(nuprimarybranchval) delete[] nuprimarybranchval; nuprimarybranchval=0; // ? branch array //cout<<"resetting bonsaitree branches"<<endl; if(bonsaitree) bonsaitree->ResetBranchAddresses(); cout<<"closing bonsai file"<<endl; if(bonsaifile) bonsaifile->Close(); //cout<<"resetting mrdfile branches"<<endl; if(mrdtree) mrdtree->ResetBranchAddresses(); cout<<"closing mrdtrack file"<<endl; if(mrdfile) mrdfile->Close(); //cout<<"resetting veto event branches"<<endl; if(vetotree) vetotree->ResetBranchAddresses(); cout<<"closing veto event file"<<endl; if(vetofile) vetofile->Close(); // write and close file of event information cout<<"writing and closing output file"<<endl; fileout->cd(); treeout->SetEntries(bInTank->GetEntries()); treeout->Write(); fileout->Close(); delete fileout; fileout=0; } void GetGenieEntryInfo(genie::EventRecord* gevtRec, genie::Interaction* genieint, GenieInfo &thegenieinfo){ // process information: /*TString*/ thegenieinfo.procinfostring = genieint->ProcInfo().AsString(); /*TString*/ thegenieinfo.scatteringtypestring = genieint->ProcInfo().ScatteringTypeAsString(); /*TString*/ thegenieinfo.interactiontypestring = genieint->ProcInfo().InteractionTypeAsString(); thegenieinfo.eventtypes.at("IsQuasiElastic") = genieint->ProcInfo().IsQuasiElastic(); thegenieinfo.eventtypes.at("IsResonant") = genieint->ProcInfo().IsResonant(); thegenieinfo.eventtypes.at("IsDeepInelastic") = genieint->ProcInfo().IsDeepInelastic(); thegenieinfo.eventtypes.at("IsCoherent") = genieint->ProcInfo().IsCoherent(); thegenieinfo.eventtypes.at("IsDiffractive") = genieint->ProcInfo().IsDiffractive(); thegenieinfo.eventtypes.at("IsInverseMuDecay") = genieint->ProcInfo().IsInverseMuDecay(); thegenieinfo.eventtypes.at("IsIMDAnnihilation") = genieint->ProcInfo().IsIMDAnnihilation(); thegenieinfo.eventtypes.at("IsSingleKaon") = genieint->ProcInfo().IsSingleKaon(); thegenieinfo.eventtypes.at("IsNuElectronElastic") = genieint->ProcInfo().IsNuElectronElastic(); thegenieinfo.eventtypes.at("IsEM") = genieint->ProcInfo().IsEM(); thegenieinfo.eventtypes.at("IsWeakCC") = genieint->ProcInfo().IsWeakCC(); thegenieinfo.eventtypes.at("IsWeakNC") = genieint->ProcInfo().IsWeakNC(); thegenieinfo.eventtypes.at("IsMEC") = genieint->ProcInfo().IsMEC(); /*Int_t*/ thegenieinfo.neutinteractioncode = genie::utils::ghep::NeutReactionCode(gevtRec); /*Int_t*/ thegenieinfo.nuanceinteractioncode = genie::utils::ghep::NuanceReactionCode(gevtRec); /*TLorentzVector**/ thegenieinfo.genieVtx = gevtRec->Vertex(); /*Double_t*/ thegenieinfo.genie_x = thegenieinfo.genieVtx->X() * 100.; // same info as nuvtx in g4dirt file /*Double_t*/ thegenieinfo.genie_y = thegenieinfo.genieVtx->Y() * 100.; // GENIE uses meters /*Double_t*/ thegenieinfo.genie_z = thegenieinfo.genieVtx->Z() * 100.; // GENIE uses meters /*Double_t*/ thegenieinfo.genie_t = thegenieinfo.genieVtx->T() * 1000000000; // GENIE uses seconds // neutrino information: /*Double_t*/ thegenieinfo.probeenergy = genieint->InitState().ProbeE(genie::kRfLab); // GeV /*Int_t*/ thegenieinfo.probepdg = genieint->InitState().Probe()->PdgCode(); /*TString*/ thegenieinfo.probepartname = genieint->InitState().Probe()->GetName(); /*TLorentzVector**/ thegenieinfo.probemomentum = gevtRec->Probe()->P4(); /*TVector3*/ thegenieinfo.probethreemomentum = thegenieinfo.probemomentum->Vect(); /*TVector3*/ thegenieinfo.probemomentumdir = thegenieinfo.probethreemomentum.Unit(); /*Double_t*/ thegenieinfo.probeanglex = TMath::ATan(thegenieinfo.probethreemomentum.X()/thegenieinfo.probethreemomentum.Z()); /*Double_t*/ thegenieinfo.probeangley = TMath::ATan(thegenieinfo.probethreemomentum.Y()/thegenieinfo.probethreemomentum.Z()); /*Double_t*/ thegenieinfo.probeangle = TMath::Max(thegenieinfo.probeanglex,thegenieinfo.probeangley); // n.b. genieint->InitState().Probe != gevtRec->Probe() // target nucleon: /*genie::GHepParticle**/ thegenieinfo.targetnucleon = gevtRec->HitNucleon(); /*int*/ thegenieinfo.targetnucleonpdg = genieint->InitState().Tgt().HitNucPdg(); /*TString*/ thegenieinfo.targetnucleonname=""; if ( genie::pdg::IsNeutronOrProton(thegenieinfo.targetnucleonpdg) ) { TParticlePDG * p = genie::PDGLibrary::Instance()->Find(thegenieinfo.targetnucleonpdg); thegenieinfo.targetnucleonname = p->GetName(); } else { thegenieinfo.targetnucleonname = std::to_string(thegenieinfo.targetnucleonpdg); } /*TVector3*/ thegenieinfo.targetnucleonthreemomentum=TVector3(0.,0.,0.); /*Double_t*/ thegenieinfo.targetnucleonenergy=0.; if(thegenieinfo.targetnucleon){ TLorentzVector* targetnucleonmomentum = thegenieinfo.targetnucleon->P4(); thegenieinfo.targetnucleonthreemomentum = targetnucleonmomentum->Vect(); thegenieinfo.targetnucleonenergy = targetnucleonmomentum->Energy(); //GeV } // target nucleus: /*Int_t*/ thegenieinfo.targetnucleuspdg = genieint->InitState().Tgt().Pdg(); /*TParticlePDG**/ thegenieinfo.targetnucleus = genie::PDGLibrary::Instance()->Find(thegenieinfo.targetnucleuspdg); /*TString*/ thegenieinfo.targetnucleusname = "unknown"; if(thegenieinfo.targetnucleus){ thegenieinfo.targetnucleusname = thegenieinfo.targetnucleus->GetName(); } /*Int_t*/ thegenieinfo.targetnucleusZ = genieint->InitState().Tgt().Z(); /*Int_t*/ thegenieinfo.targetnucleusA = genieint->InitState().Tgt().A(); // remnant nucleus: int remnucpos = gevtRec->RemnantNucleusPosition(); /*TString*/ thegenieinfo.remnantnucleusname="n/a"; /*Double_t*/ thegenieinfo.remnantnucleusenergy=-1.; if(remnucpos>-1){ thegenieinfo.remnantnucleusname = gevtRec->Particle(remnucpos)->Name(); thegenieinfo.remnantnucleusenergy = gevtRec->Particle(remnucpos)->Energy(); //GeV } // final state lepton: int fsleppos = gevtRec->FinalStatePrimaryLeptonPosition(); /*TString*/ thegenieinfo.fsleptonname="n/a"; /*Double_t*/ thegenieinfo.fsleptonenergy=-1.; if(fsleppos>-1){ thegenieinfo.fsleptonname = gevtRec->Particle(fsleppos)->Name(); thegenieinfo.fsleptonenergy = gevtRec->Particle(fsleppos)->Energy(); } // other remnants: TODO: this information is NOT being correctly read in /*Int_t*/ thegenieinfo.numfsprotons = genieint->ExclTag().NProtons(); /*Int_t*/ thegenieinfo.numfsneutrons = genieint->ExclTag().NNeutrons(); /*Int_t*/ thegenieinfo.numfspi0 = genieint->ExclTag().NPi0(); /*Int_t*/ thegenieinfo.numfspiplus = genieint->ExclTag().NPiPlus(); /*Int_t*/ thegenieinfo.numfspiminus = genieint->ExclTag().NPiMinus(); // kinematic information Double_t NucleonM = genie::constants::kNucleonMass; // Calculate kinematic variables "as an experimentalist would measure them; // neglecting fermi momentum and off-shellness of bound nucleons" /*TLorentzVector**/ thegenieinfo.k1 = gevtRec->Probe()->P4(); /*TLorentzVector**/ thegenieinfo.k2 = gevtRec->FinalStatePrimaryLepton()->P4(); /*Double_t*/ thegenieinfo.costhfsl = TMath::Cos( thegenieinfo.k2->Vect().Angle(thegenieinfo.k1->Vect()) ); /*Double_t*/ thegenieinfo.fslanglegenie = thegenieinfo.k2->Vect().Angle(thegenieinfo.k1->Vect()); // q=k1-k2, 4-p transfer /*TLorentzVector*/ thegenieinfo.q = (*(thegenieinfo.k1))-(*(thegenieinfo.k2)); // /*Double_t*/ thegenieinfo.Q2 = genieint->Kine().Q2(); // not set in our GENIE files! // momemtum transfer /*Double_t*/ thegenieinfo.Q2 = -1 * thegenieinfo.q.M2(); // E transfer to the nucleus /*Double_t*/ thegenieinfo.Etransf = (thegenieinfo.targetnucleon) ? thegenieinfo.q.Energy() : -1; // Bjorken x /*Double_t*/ thegenieinfo.x = (thegenieinfo.targetnucleon) ? 0.5*thegenieinfo.Q2/(NucleonM*thegenieinfo.Etransf) : -1; // Inelasticity, y = q*P1/k1*P1 /*Double_t*/ thegenieinfo.y = (thegenieinfo.targetnucleon) ? thegenieinfo.Etransf/thegenieinfo.k1->Energy() : -1; // Hadronic Invariant mass ^ 2 /*Double_t*/ thegenieinfo.W2 = (thegenieinfo.targetnucleon) ? (NucleonM*NucleonM + 2*NucleonM*thegenieinfo.Etransf - thegenieinfo.Q2) : -1; if(printneutrinoevent){ cout<<"This was a "<< thegenieinfo.procinfostring <<" interaction of a " <<thegenieinfo.probeenergy<<"GeV " << thegenieinfo.probepartname << " on a "; if( thegenieinfo.targetnucleonpdg==2212 || thegenieinfo.targetnucleonpdg==2122 ){ cout<<thegenieinfo.targetnucleonname<<" in a "; } else { cout<<"PDG-Code " << thegenieinfo.targetnucleonpdg<<" in a "; } if( thegenieinfo.targetnucleusname!="unknown"){ cout<<thegenieinfo.targetnucleusname<<" nucleus, "; } else { cout<<"Z=["<<thegenieinfo.targetnucleusZ<<","<<thegenieinfo.targetnucleusA<<"] nucleus, "; } if(remnucpos>-1){ cout<<"producing a "<<thegenieinfo.remnantnucleusenergy<<"GeV "<<thegenieinfo.remnantnucleusname; } else { cout<<"with no remnant nucleus"; } // DIS on 16O produces no remnant nucleus?! if(fsleppos>-1){ cout<<" and a "<<thegenieinfo.fsleptonenergy<<"GeV "<<thegenieinfo.fsleptonname<<endl; } else{ cout<<" and no final state leptons"<<endl; } cout<<endl<<"Q^2 was "<<thegenieinfo.Q2<<"(GeV/c)^2, with final state lepton" <<" ejected at Cos(θ)="<<thegenieinfo.costhfsl<<endl; cout<<"Additional final state particles included "<<endl; cout<< " N(p) = " << thegenieinfo.numfsprotons << " N(n) = " << thegenieinfo.numfsneutrons << endl << " N(pi^0) = " << thegenieinfo.numfspi0 << " N(pi^+) = " << thegenieinfo.numfspiplus << " N(pi^-) = " << thegenieinfo.numfspiminus <<endl; } } void FillTankMapHist(WCSimRootGeom* geo, int tubeID, bool incone, std::map<std::string, TH2D*> &maphistos, double weight=1){ //Fill a bin on a 2D map of PMTs WCSimRootPMT pmt = geo->GetPMT(tubeID); // WCSimRootPMT has members GetTubeNo(), GetCylLoc(), GetPosition(j), GetOrientation(j) // GetCylLoc(): 0=top cap, 2=bottom cap, 1=wall, 4=mrd, 5=veto, 3=obselete outer veto (shouldnt come up) // GetPosition(j), j=0..2: Returns x,y,z coordinates of the center of the sphere that forms the PMT. // GetOrientation(j), j=0..2: Returns the x,y,z components of a vector of the direction the PMT faces. // GetPMT(j) Returns a pmt object - NOT a pointer to a PMT object. //cout<<"Filling histogram for cylloc "<<pmt.GetCylLoc()<<" for tubeID "<<tubeID<<endl; switch(pmt.GetCylLoc()){ case 0: { if(topcappositionmap.count(tubeID)){ std::pair<int,int> thebins = topcappositionmap.at(tubeID); TH2D* histotop; if(incone){ histotop=maphistos.at("inconehistotop"); } else { histotop=maphistos.at("outconehistotop"); } if(histotop) histotop->Fill(thebins.first, thebins.second, weight); } else {cout<<"bad pmt: ID "<<tubeID<<" in CylLoc "<<pmt.GetCylLoc()<<endl;} break; } case 1: { if(wallpositionmap.count(tubeID)){ std::pair<int,int> thebins = wallpositionmap.at(tubeID); TH2D* histowall; if(incone) { histowall=maphistos.at("inconehistowall"); } else { histowall=maphistos.at("outconehistowall"); } if(histowall) histowall->Fill(thebins.first+0.5, thebins.second, weight); } else {cout<<"bad pmt: ID "<<tubeID<<" in CylLoc "<<pmt.GetCylLoc()<<endl;} break; } case 2: { if(bottomcappositionmap.count(tubeID)){ std::pair<int,int> thebins = bottomcappositionmap.at(tubeID); TH2D* histobottom; if(incone) { histobottom=maphistos.at("inconehistobottom"); } else { histobottom=maphistos.at("outconehistobottom"); } if(histobottom) histobottom->Fill(thebins.first, thebins.second, weight); } else {cout<<"bad pmt: ID "<<tubeID<<" in CylLoc "<<pmt.GetCylLoc()<<endl;} break; } case 4: { // std::pair<int,int> thebins = mrdpositionmap.at(tubeID); // mrdhist->Fill(thebins.first, thebins.second, weight); break; } case 5: { // std::pair<int,int> thebins = faccpositionmap.at(tubeID); // facchist->Fill(thebins.first, thebins.second, weight); break; } default: { //cout<<"PMT "<<tubeID<<" has unknown location "<<pmt.GetCylLoc()<<"!"<<endl; break; } } } void ClearMapHistos(std::map<std::string,TH2D*> maphistos){ for(std::map<std::string,TH2D*>::iterator it= maphistos.begin(); it!=maphistos.end(); it++){ it->second->Reset(); } } double CalculateNeutrinoEnergy(double recoMuonEnergy, double recoMuonAngle){ TDatabasePDG db; Double_t neutronmass = (db.GetParticle(2112)->Mass())*1000.; // converted to MeV Double_t protonmass = (db.GetParticle(2212)->Mass())*1000.; // converted to MeV Double_t muonmass = (db.GetParticle(13)->Mass())*1000.; // converted to MeV Double_t O16bindingEnergy = 7.9762086875; // MeV (per nucleon), from http://tinyurl.com/y8m9s4z6 Double_t boundneutronmass = neutronmass-O16bindingEnergy; // calculate neutrino energy: quasi-elastic, fermi-gas model double numerator = (2.*boundneutronmass*recoMuonEnergy) - (pow(boundneutronmass,2.) + pow(muonmass,2.) - pow(protonmass,2.)); double denominator = 2.*( boundneutronmass - recoMuonEnergy + sqrt( ( pow(recoMuonEnergy,2.) - (pow(muonmass,2.)*TMath::Cos(recoMuonAngle)) ) )); double recoNeutrinoEnergy = numerator / denominator; return recoNeutrinoEnergy; } double CalculateEventQ2(double recoMuonEnergy, double recoNeutrinoEnergy, double recoMuonAngle){ TDatabasePDG db; Double_t neutronmass = (db.GetParticle(2112)->Mass())*1000.; // converted to MeV Double_t protonmass = (db.GetParticle(2212)->Mass())*1000.; // converted to MeV Double_t muonmass = (db.GetParticle(13)->Mass())*1000.; // converted to MeV Double_t O16bindingEnergy = 7.9762086875; // MeV (per nucleon), from http://tinyurl.com/y8m9s4z6 Double_t boundneutronmass = neutronmass-O16bindingEnergy; double part1 = recoMuonEnergy - (sqrt(pow(recoMuonEnergy,2.)-pow(muonmass,2.))*TMath::Cos(recoMuonAngle)); double eventq2 = -pow(muonmass,2.) + 2.*recoNeutrinoEnergy*part1; return eventq2; }
79f327691c8fae24860f0ab3316239fd6cbfb0ee
9d2a3e1bdf6a74875e28c74cc80d2a18a57a1314
/src/lib/core/log/ReadableLogOutput.h
899dc6970e8d1c4396a1335b864b6c6adf87cfdf
[ "BSD-3-Clause" ]
permissive
eirTony/EIRC2
1a979539d2b29cfbb9a2bb1010fe1d39af36aae7
f0f917d101e3ca24d04c456c31a5b16252feeb62
refs/heads/master
2021-01-21T04:40:52.106253
2016-04-11T02:21:24
2016-04-11T02:21:24
55,930,007
0
0
null
null
null
null
UTF-8
C++
false
false
708
h
ReadableLogOutput.h
#ifndef READABLELOGOUTPUT_H #define READABLELOGOUTPUT_H #include "LogOutputPlugin.h" #include <type/QQDataStream.h> #include <type/QQFile.h> class ReadableLogOutput : public LogOutputPlugin { Q_OBJECT // handles stdout, stderr, logfile public: explicit ReadableLogOutput(LogFork * fork, QObject * parent=0); signals: public slots: private: QQDataStream * mpStream = 0; QQFile * mpFile = 0; private: //static const static BasicName csmPluginName; const static EightCC csmStdoutEcc; const static EightCC csmStderrEcc; const static EightCC csmLogFileEcc; const static EightCCList csmSchemataList; }; #endif // READABLELOGOUTPUT_H
7c7a15becd5d48e60e7152b0af341372b81abb62
cc43f33336dac054325d06170c00c40d8f61b080
/树/437. 路径总和 III.cpp
8a27d847fb9f60a7963aff4bf76eb0ae4b1cd33a
[]
no_license
MachineGunLin/LeetCode_Solutions
49f810ef7dc1d7603d8b37a761978481638f82e9
aed3d37681ed6a8b2a70f1b79d7ceeed5a3755fb
refs/heads/master
2023-05-12T23:21:47.412202
2021-05-31T03:54:58
2021-05-31T03:54:58
262,694,112
0
0
null
null
null
null
UTF-8
C++
false
false
592
cpp
437. 路径总和 III.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: int DFS(TreeNode* root, int sum) { if(root == NULL) return 0; sum -= root -> val; return (sum == 0 ? 1 : 0) + DFS(root -> left, sum) + DFS(root -> right, sum); } int pathSum(TreeNode* root, int sum) { if(root == NULL) return 0; return DFS(root, sum) + pathSum(root -> left, sum) + pathSum(root -> right, sum); } };
dee8618ae06b415b20e6ed7ecd8300f8a7598ad1
641fa8341d8c436ad24945bcbf8e7d7d1dd7dbb2
/components/subresource_filter/core/common/indexed_ruleset_unittest.cc
f423be3d6c36d9e0933eb5d3c5d8e555671c73e8
[ "BSD-3-Clause" ]
permissive
massnetwork/mass-browser
7de0dfc541cbac00ffa7308541394bac1e945b76
67526da9358734698c067b7775be491423884339
refs/heads/master
2022-12-07T09:01:31.027715
2017-01-19T14:29:18
2017-01-19T14:29:18
73,799,690
4
4
BSD-3-Clause
2022-11-26T11:53:23
2016-11-15T09:49:29
null
UTF-8
C++
false
false
26,179
cc
indexed_ruleset_unittest.cc
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/subresource_filter/core/common/indexed_ruleset.h" #include <memory> #include <string> #include <vector> #include "base/logging.h" #include "base/macros.h" #include "components/subresource_filter/core/common/first_party_origin.h" #include "components/subresource_filter/core/common/proto/rules.pb.h" #include "components/subresource_filter/core/common/url_pattern.h" #include "testing/gtest/include/gtest/gtest.h" namespace subresource_filter { namespace { constexpr proto::AnchorType kAnchorNone = proto::ANCHOR_TYPE_NONE; constexpr proto::AnchorType kBoundary = proto::ANCHOR_TYPE_BOUNDARY; constexpr proto::AnchorType kSubdomain = proto::ANCHOR_TYPE_SUBDOMAIN; constexpr proto::UrlPatternType kSubstring = proto::URL_PATTERN_TYPE_SUBSTRING; constexpr proto::SourceType kAnyParty = proto::SOURCE_TYPE_ANY; constexpr proto::SourceType kFirstParty = proto::SOURCE_TYPE_FIRST_PARTY; constexpr proto::SourceType kThirdParty = proto::SOURCE_TYPE_THIRD_PARTY; // Note: Returns unique origin on origin_string == nullptr. url::Origin GetOrigin(const char* origin_string) { return origin_string ? url::Origin(GURL(origin_string)) : url::Origin(); } class UrlRuleBuilder { public: explicit UrlRuleBuilder(const UrlPattern& url_pattern, bool is_whitelist = false) : UrlRuleBuilder(url_pattern, kAnyParty, is_whitelist) {} UrlRuleBuilder(const UrlPattern& url_pattern, proto::SourceType source_type, bool is_whitelist) { rule_.set_semantics(is_whitelist ? proto::RULE_SEMANTICS_WHITELIST : proto::RULE_SEMANTICS_BLACKLIST); rule_.set_source_type(source_type); rule_.set_element_types(proto::ELEMENT_TYPE_ALL); rule_.set_url_pattern_type(url_pattern.type); rule_.set_anchor_left(url_pattern.anchor_left); rule_.set_anchor_right(url_pattern.anchor_right); rule_.set_match_case(url_pattern.match_case); rule_.set_url_pattern(url_pattern.url_pattern.as_string()); } UrlRuleBuilder& AddDomain(std::string domain_pattern) { DCHECK(!domain_pattern.empty()); auto* domain = rule_.add_domains(); if (domain_pattern[0] == '~') { domain_pattern.erase(0, 1); domain->set_exclude(true); } domain->set_domain(domain_pattern); return *this; } UrlRuleBuilder& AddDomains(const std::vector<std::string>& domains) { for (const std::string domain : domains) AddDomain(domain); return *this; } const proto::UrlRule& rule() const { return rule_; } proto::UrlRule& rule() { return rule_; } private: proto::UrlRule rule_; DISALLOW_COPY_AND_ASSIGN(UrlRuleBuilder); }; } // namespace class IndexedRulesetTest : public testing::Test { public: IndexedRulesetTest() = default; protected: bool ShouldAllow(const char* url, const char* initiator = nullptr, proto::ElementType element_type = proto::ELEMENT_TYPE_OTHER, bool disable_generic_rules = false) const { DCHECK_NE(matcher_.get(), nullptr); url::Origin origin = GetOrigin(initiator); FirstPartyOrigin first_party(origin); return !matcher_->ShouldDisallowResourceLoad( GURL(url), first_party, element_type, disable_generic_rules); } bool ShouldAllow(const char* url, const char* initiator, bool disable_generic_rules) const { return ShouldAllow(url, initiator, proto::ELEMENT_TYPE_OTHER, disable_generic_rules); } bool ShouldDeactivate(const char* document_url, const char* initiator = nullptr, proto::ActivationType activation_type = proto::ACTIVATION_TYPE_UNSPECIFIED) const { DCHECK(matcher_); url::Origin origin = GetOrigin(initiator); return matcher_->ShouldDisableFilteringForDocument(GURL(document_url), origin, activation_type); } void AddUrlRule(const proto::UrlRule& rule) { ASSERT_TRUE(indexer_.AddUrlRule(rule)) << "URL pattern: " << rule.url_pattern(); } void AddSimpleRule(const UrlPattern& url_pattern, bool is_whitelist) { AddUrlRule(UrlRuleBuilder(url_pattern, is_whitelist).rule()); } void AddBlacklistRule(const UrlPattern& url_pattern, proto::SourceType source_type = kAnyParty) { AddUrlRule(UrlRuleBuilder(url_pattern, source_type, false).rule()); } void AddWhitelistRuleWithActivationTypes(const UrlPattern& url_pattern, int32_t activation_types) { UrlRuleBuilder builder(url_pattern, kAnyParty, true); builder.rule().set_element_types(proto::ELEMENT_TYPE_UNSPECIFIED); builder.rule().set_activation_types(activation_types); AddUrlRule(builder.rule()); } void Finish() { indexer_.Finish(); matcher_.reset(new IndexedRulesetMatcher(indexer_.data(), indexer_.size())); } void Reset() { matcher_.reset(nullptr); indexer_.~RulesetIndexer(); new (&indexer_) RulesetIndexer(); } RulesetIndexer indexer_; std::unique_ptr<IndexedRulesetMatcher> matcher_; private: DISALLOW_COPY_AND_ASSIGN(IndexedRulesetTest); }; TEST_F(IndexedRulesetTest, OneRuleWithoutMetaInfo) { const struct { UrlPattern url_pattern; const char* url; bool expect_allowed; } kTestCases[] = { // SUBSTRING {{"abcd", kSubstring}, "http://example.com/abcd", false}, {{"abcd", kSubstring}, "http://example.com/dcab", true}, {{"42", kSubstring}, "http://example.com/adcd/picture42.png", false}, {{"&test", kSubstring}, "http://example.com/params?para1=false&test=true", false}, {{"-test-42.", kSubstring}, "http://example.com/unit-test-42.1", false}, {{"/abcdtest160x600.", kSubstring}, "http://example.com/abcdtest160x600.png", false}, // WILDCARDED {{"http://example.com/abcd/picture*.png"}, "http://example.com/abcd/picture42.png", false}, {{"example.com", kSubdomain, kAnchorNone}, "http://example.com", false}, {{"example.com", kSubdomain, kAnchorNone}, "http://test.example.com", false}, {{"example.com", kSubdomain, kAnchorNone}, "https://test.example.com.com", false}, {{"example.com", kSubdomain, kAnchorNone}, "https://test.rest.example.com", false}, {{"example.com", kSubdomain, kAnchorNone}, "https://test_example.com", true}, {{"http://example.com", kBoundary, kAnchorNone}, "http://example.com/", false}, {{"http://example.com", kBoundary, kAnchorNone}, "http://example.com/42", false}, {{"http://example.com", kBoundary, kAnchorNone}, "http://example.com/42/http://example.com/", false}, {{"http://example.com", kBoundary, kAnchorNone}, "http://example.com/42/http://example.info/", false}, {{"http://example.com/", kBoundary, kBoundary}, "http://example.com", false}, {{"http://example.com/", kBoundary, kBoundary}, "http://example.com/42", true}, {{"http://example.com/", kBoundary, kBoundary}, "http://example.info/42/http://example.com/", true}, {{"http://example.com/", kBoundary, kBoundary}, "http://example.info/42/http://example.com/", true}, {{"http://example.com/", kBoundary, kBoundary}, "http://example.com/", false}, {{"http://example.com/", kBoundary, kBoundary}, "http://example.com/42.swf", true}, {{"http://example.com/", kBoundary, kBoundary}, "http://example.info/redirect/http://example.com/", true}, {{"pdf", kAnchorNone, kBoundary}, "http://example.com/abcd.pdf", false}, {{"pdf", kAnchorNone, kBoundary}, "http://example.com/pdfium", true}, {{"http://example.com^"}, "http://example.com/", false}, {{"http://example.com^"}, "http://example.com:8000/", false}, {{"http://example.com^"}, "http://example.com.ru", true}, {{"^example.com^"}, "http://example.com:8000/42.loss?a=12&b=%D1%82%D0%B5%D1%81%D1%82", false}, {{"^42.loss^"}, "http://example.com:8000/42.loss?a=12&b=%D1%82%D0%B5%D1%81%D1%82", false}, // FIXME(pkalinnikov): The '^' at the end should match end-of-string. // {"^%D1%82%D0%B5%D1%81%D1%82^", // "http://example.com:8000/42.loss?a=12&b=%D1%82%D0%B5%D1%81%D1%82", // false}, // {"/abcd/*/picture^", "http://example.com/abcd/42/picture", false}, {{"/abcd/*/picture^"}, "http://example.com/abcd/42/loss/picture?param", false}, {{"/abcd/*/picture^"}, "http://example.com/abcd//picture/42", false}, {{"/abcd/*/picture^"}, "http://example.com/abcd/picture", true}, {{"/abcd/*/picture^"}, "http://example.com/abcd/42/pictureraph", true}, {{"/abcd/*/picture^"}, "http://example.com/abcd/42/picture.swf", true}, {{"test.example.com^", kSubdomain, kAnchorNone}, "http://test.example.com/42.swf", false}, {{"test.example.com^", kSubdomain, kAnchorNone}, "http://server1.test.example.com/42.swf", false}, {{"test.example.com^", kSubdomain, kAnchorNone}, "https://test.example.com:8000/", false}, {{"test.example.com^", kSubdomain, kAnchorNone}, "http://test.example.com.ua/42.swf", true}, {{"test.example.com^", kSubdomain, kAnchorNone}, "http://example.com/redirect/http://test.example.com/", true}, {{"/abcd/*"}, "https://example.com/abcd/", false}, {{"/abcd/*"}, "http://example.com/abcd/picture.jpeg", false}, {{"/abcd/*"}, "https://example.com/abcd", true}, {{"/abcd/*"}, "http://abcd.example.com", true}, {{"*/abcd/"}, "https://example.com/abcd/", false}, {{"*/abcd/"}, "http://example.com/abcd/picture.jpeg", false}, {{"*/abcd/"}, "https://example.com/test-abcd/", true}, {{"*/abcd/"}, "http://abcd.example.com", true}, // FIXME(pkalinnikov): Implement REGEXP matching. // REGEXP // {"/test|rest\\d+/", "http://example.com/test42", false}, // {"/test|rest\\d+/", "http://example.com/test", false}, // {"/test|rest\\d+/", "http://example.com/rest42", false}, // {"/test|rest\\d+/", "http://example.com/rest", true}, // {"/example\\.com/.*\\/[a-zA-Z0-9]{3}/", "http://example.com/abcd/42y", // false}, // {"/example\\.com/.*\\/[a-zA-Z0-9]{3}/", "http://example.com/abcd/%42y", // true}, // {"||example.com^*/test.htm", "http://example.com/unit/test.html", // false}, // {"||example.com^*/test.htm", "http://examole.com/test.htm", true}, }; for (const auto& test_case : kTestCases) { SCOPED_TRACE(testing::Message() << "Rule: " << test_case.url_pattern.url_pattern << "; URL: " << test_case.url); AddBlacklistRule(test_case.url_pattern); Finish(); EXPECT_EQ(test_case.expect_allowed, ShouldAllow(test_case.url)); Reset(); } } TEST_F(IndexedRulesetTest, OneRuleWithThirdParty) { const struct { const char* url_pattern; proto::SourceType source_type; const char* url; const char* initiator; bool expect_allowed; } kTestCases[] = { {"example.com", kThirdParty, "http://example.com", "http://exmpl.org", false}, {"example.com", kThirdParty, "http://example.com", "http://example.com", true}, {"example.com", kThirdParty, "http://example.com/path?k=v", "http://exmpl.org", false}, {"example.com", kThirdParty, "http://example.com/path?k=v", "http://example.com", true}, {"example.com", kFirstParty, "http://example.com/path?k=v", "http://example.com", false}, {"example.com", kFirstParty, "http://example.com/path?k=v", "http://exmpl.com", true}, {"example.com", kAnyParty, "http://example.com/path?k=v", "http://example.com", false}, {"example.com", kAnyParty, "http://example.com/path?k=v", "http://exmpl.com", false}, {"example.com", kThirdParty, "http://subdomain.example.com", "http://example.com", true}, {"example.com", kThirdParty, "http://example.com", nullptr, false}, // Public Suffix List tests. {"example.com", kThirdParty, "http://two.example.com", "http://one.example.com", true}, {"example.com", kThirdParty, "http://example.com", "http://one.example.com", true}, {"example.com", kThirdParty, "http://two.example.com", "http://example.com", true}, {"example.com", kThirdParty, "http://example.com", "http://example.org", false}, {"appspot.com", kThirdParty, "http://two.appspot.org", "http://one.appspot.com", true}, }; for (auto test_case : kTestCases) { SCOPED_TRACE(testing::Message() << "Rule: " << test_case.url_pattern << "; source: " << (int)test_case.source_type << "; URL: " << test_case.url << "; Initiator: " << test_case.initiator); AddBlacklistRule(UrlPattern(test_case.url_pattern, kSubstring), test_case.source_type); Finish(); EXPECT_EQ(test_case.expect_allowed, ShouldAllow(test_case.url, test_case.initiator)); Reset(); } } TEST_F(IndexedRulesetTest, OneRuleWithDomainList) { const struct { const char* url_pattern; std::vector<std::string> domains; const char* url; const char* initiator; bool expect_allowed; } kTestCases[] = { {"example.com", {"domain1.com", "domain2.com"}, "http://example.com", "http://domain1.com", false}, {"example.com", {"domain1.com", "domain2.com"}, "http://example.com", "http://not_domain1.com", true}, {"example.com", {"domain1.com", "domain2.com"}, "http://example.com", "http://domain2.com", false}, {"example.com", {"domain1.com", "domain2.com"}, "http://example.com", "http://subdomain.domain2.com", false}, {"example.com", {"domain1.com", "domain2.com"}, "http://example.com", "http://domain3.com", true}, {"example.com", {"~domain1.com", "~domain2.com"}, "http://example.com", "http://domain2.com", true}, {"example.com", {"~domain1.com", "~domain2.com"}, "http://example.com", "http://domain3.com", false}, {"example.com", {"domain1.com", "~subdomain1.domain1.com"}, "http://example.com", "http://subdomain2.domain1.com", false}, {"example.com", {"domain1.com", "~subdomain1.domain1.com"}, "http://example.com", "http://subdomain1.domain1.com", true}, {"example.com", {"domain1.com", "domain2.com"}, "http://example.com", nullptr, true}, // The following test addresses a former bug in domain list matcher. When // "domain.com" was matched, the positive filters lookup stopped, and the // next domain was considered as a negative. The initial character was // skipped (supposing it's a '~') and the remainder was considered a // domain. So "ddomain.com" would be matched and thus the whole rule would // be classified as non-matching, which is not correct. {"ex.com", {"domain.com", "ddomain.com", "~sub.domain.com"}, "http://ex.com", "http://domain.com", false}, }; for (const auto& test_case : kTestCases) { SCOPED_TRACE(testing::Message() << "Rule: " << test_case.url_pattern << "; URL: " << test_case.url << "; Initiator: " << test_case.initiator); UrlRuleBuilder builder(UrlPattern(test_case.url_pattern, kSubstring)); builder.AddDomains(test_case.domains); AddUrlRule(builder.rule()); Finish(); EXPECT_EQ(test_case.expect_allowed, ShouldAllow(test_case.url, test_case.initiator)); Reset(); } } TEST_F(IndexedRulesetTest, OneRuleWithElementTypes) { constexpr proto::ElementType kAll = proto::ELEMENT_TYPE_ALL; constexpr proto::ElementType kImage = proto::ELEMENT_TYPE_IMAGE; constexpr proto::ElementType kFont = proto::ELEMENT_TYPE_FONT; constexpr proto::ElementType kScript = proto::ELEMENT_TYPE_SCRIPT; constexpr proto::ElementType kSubdoc = proto::ELEMENT_TYPE_SUBDOCUMENT; constexpr proto::ElementType kPopup = proto::ELEMENT_TYPE_POPUP; const struct { const char* url_pattern; int32_t element_types; const char* url; proto::ElementType element_type; bool expect_allowed; } kTestCases[] = { {"ex.com", kAll, "http://ex.com/img.jpg", kImage, false}, {"ex.com", kAll & ~kPopup, "http://ex.com/img", kPopup, true}, {"ex.com", kImage, "http://ex.com/img.jpg", kImage, false}, {"ex.com", kAll & ~kImage, "http://ex.com/img.jpg", kImage, true}, {"ex.com", kScript, "http://ex.com/img.jpg", kImage, true}, {"ex.com", kAll & ~kScript, "http://ex.com/img.jpg", kImage, false}, {"ex.com", kImage | kFont, "http://ex.com/font", kFont, false}, {"ex.com", kImage | kFont, "http://ex.com/image", kImage, false}, {"ex.com", kImage | kFont, "http://ex.com/video", proto::ELEMENT_TYPE_MEDIA, true}, {"ex.com", kAll & ~kFont & ~kScript, "http://ex.com/font", kFont, true}, {"ex.com", kAll & ~kFont & ~kScript, "http://ex.com/scr", kScript, true}, {"ex.com", kAll & ~kFont & ~kScript, "http://ex.com/img", kImage, false}, {"ex.com$subdocument,~subdocument", kSubdoc & ~kSubdoc, "http://ex.com/sub", kSubdoc, true}, {"ex.com", kAll, "http://ex.com", proto::ELEMENT_TYPE_OTHER, false}, {"ex.com", kAll, "http://ex.com", proto::ELEMENT_TYPE_UNSPECIFIED, true}, }; for (const auto& test_case : kTestCases) { SCOPED_TRACE(testing::Message() << "Rule: " << test_case.url_pattern << "; ElementTypes: " << (int)test_case.element_types << "; URL: " << test_case.url << "; ElementType: " << (int)test_case.element_type); UrlRuleBuilder builder(UrlPattern(test_case.url_pattern, kSubstring)); builder.rule().set_element_types(test_case.element_types); AddUrlRule(builder.rule()); Finish(); EXPECT_EQ(test_case.expect_allowed, ShouldAllow(test_case.url, nullptr /* initiator */, test_case.element_type)); Reset(); } } TEST_F(IndexedRulesetTest, OneRuleWithActivationTypes) { constexpr proto::ActivationType kNone = proto::ACTIVATION_TYPE_UNSPECIFIED; constexpr proto::ActivationType kDocument = proto::ACTIVATION_TYPE_DOCUMENT; const struct { const char* url_pattern; int32_t activation_types; const char* document_url; proto::ActivationType activation_type; bool expect_disabled; } kTestCases[] = { {"example.com", kDocument, "http://example.com", kDocument, true}, {"xample.com", kDocument, "http://example.com", kDocument, true}, {"exampl.com", kDocument, "http://example.com", kDocument, false}, {"example.com", kNone, "http://example.com", kDocument, false}, {"example.com", kDocument, "http://example.com", kNone, false}, {"example.com", kNone, "http://example.com", kNone, false}, // Invalid GURL. {"example.com", kDocument, "http;//example.com", kDocument, false}, }; for (const auto& test_case : kTestCases) { SCOPED_TRACE(testing::Message() << "Rule: " << test_case.url_pattern << "; ActivationTypes: " << (int)test_case.activation_types << "; DocURL: " << test_case.document_url << "; ActivationType: " << (int)test_case.activation_type); AddWhitelistRuleWithActivationTypes( UrlPattern(test_case.url_pattern, kSubstring), test_case.activation_types); Finish(); EXPECT_EQ(test_case.expect_disabled, ShouldDeactivate(test_case.document_url, nullptr /* initiator */, test_case.activation_type)); EXPECT_EQ(test_case.expect_disabled, ShouldDeactivate(test_case.document_url, "http://example.com/", test_case.activation_type)); EXPECT_EQ(test_case.expect_disabled, ShouldDeactivate(test_case.document_url, "http://xmpl.com/", test_case.activation_type)); Reset(); } } TEST_F(IndexedRulesetTest, MatchWithDisableGenericRules) { // Generic rules. ASSERT_NO_FATAL_FAILURE( AddUrlRule(UrlRuleBuilder(UrlPattern("some_text", kSubstring)).rule())); ASSERT_NO_FATAL_FAILURE( AddUrlRule(UrlRuleBuilder(UrlPattern("another_text", kSubstring)) .AddDomain("~example.com") .rule())); // Domain specific rules. ASSERT_NO_FATAL_FAILURE( AddUrlRule(UrlRuleBuilder(UrlPattern("some_text", kSubstring)) .AddDomain("example1.com") .rule())); ASSERT_NO_FATAL_FAILURE( AddUrlRule(UrlRuleBuilder(UrlPattern("more_text", kSubstring)) .AddDomain("example.com") .AddDomain("~exclude.example.com") .rule())); ASSERT_NO_FATAL_FAILURE( AddUrlRule(UrlRuleBuilder(UrlPattern("last_text", kSubstring)) .AddDomain("example1.com") .AddDomain("sub.example2.com") .rule())); Finish(); const struct { const char* url_pattern; const char* initiator; bool should_allow_with_disable_generic_rules; bool should_allow_with_enable_all_rules; } kTestCases[] = { {"http://ex.com/some_text", "http://example.com", true, false}, {"http://ex.com/some_text", "http://example1.com", false, false}, {"http://ex.com/another_text", "http://example.com", true, true}, {"http://ex.com/another_text", "http://example1.com", true, false}, {"http://ex.com/more_text", "http://example.com", false, false}, {"http://ex.com/more_text", "http://exclude.example.com", true, true}, {"http://ex.com/more_text", "http://example1.com", true, true}, {"http://ex.com/last_text", "http://example.com", true, true}, {"http://ex.com/last_text", "http://example1.com", false, false}, {"http://ex.com/last_text", "http://example2.com", true, true}, {"http://ex.com/last_text", "http://sub.example2.com", false, false}, }; constexpr bool kDisableGenericRules = true; constexpr bool kEnableAllRules = false; for (const auto& test_case : kTestCases) { SCOPED_TRACE(testing::Message() << "Url: " << test_case.url_pattern << "; Initiator: " << test_case.initiator); EXPECT_EQ(test_case.should_allow_with_disable_generic_rules, ShouldAllow(test_case.url_pattern, test_case.initiator, kDisableGenericRules)); EXPECT_EQ(test_case.should_allow_with_enable_all_rules, ShouldAllow(test_case.url_pattern, test_case.initiator, kEnableAllRules)); } } TEST_F(IndexedRulesetTest, EmptyRuleset) { Finish(); EXPECT_TRUE(ShouldAllow("http://example.com")); EXPECT_TRUE(ShouldAllow("http://another.example.com?param=val")); EXPECT_TRUE(ShouldAllow(nullptr)); } TEST_F(IndexedRulesetTest, NoRuleApplies) { AddSimpleRule(UrlPattern("?filtered_content=", kSubstring), false); AddSimpleRule(UrlPattern("&filtered_content=", kSubstring), false); Finish(); EXPECT_TRUE(ShouldAllow("http://example.com")); EXPECT_TRUE(ShouldAllow("http://example.com?filtered_not")); } TEST_F(IndexedRulesetTest, SimpleBlacklist) { AddSimpleRule(UrlPattern("?param=", kSubstring), false); Finish(); EXPECT_TRUE(ShouldAllow("https://example.com")); EXPECT_FALSE(ShouldAllow("http://example.org?param=image1")); } TEST_F(IndexedRulesetTest, SimpleWhitelist) { AddSimpleRule(UrlPattern("example.com/?filtered_content=", kSubstring), true); Finish(); EXPECT_TRUE(ShouldAllow("https://example.com?filtered_content=image1")); } TEST_F(IndexedRulesetTest, BlacklistWhitelist) { AddSimpleRule(UrlPattern("?filter=", kSubstring), false); AddSimpleRule(UrlPattern("whitelisted.com/?filter=", kSubstring), true); Finish(); EXPECT_TRUE(ShouldAllow("https://whitelisted.com?filter=off")); EXPECT_TRUE(ShouldAllow("https://notblacklisted.com")); EXPECT_FALSE(ShouldAllow("http://blacklisted.com?filter=on")); } TEST_F(IndexedRulesetTest, BlacklistAndActivationType) { const auto kDocument = proto::ACTIVATION_TYPE_DOCUMENT; AddSimpleRule(UrlPattern("example.com", kSubstring), false); AddWhitelistRuleWithActivationTypes(UrlPattern("example.com", kSubstring), kDocument); Finish(); EXPECT_TRUE(ShouldDeactivate("https://example.com", nullptr, kDocument)); EXPECT_FALSE(ShouldDeactivate("https://xample.com", nullptr, kDocument)); EXPECT_FALSE(ShouldAllow("https://example.com")); EXPECT_TRUE(ShouldAllow("https://xample.com")); } TEST_F(IndexedRulesetTest, RuleWithUnsupportedOptions) { UrlRuleBuilder builder(UrlPattern("exmpl"), proto::SOURCE_TYPE_ANY, false); builder.rule().set_activation_types(builder.rule().activation_types() | (proto::ACTIVATION_TYPE_MAX << 1)); builder.rule().set_element_types(builder.rule().element_types() | (proto::ELEMENT_TYPE_MAX << 1)); EXPECT_FALSE(indexer_.AddUrlRule(builder.rule())); AddSimpleRule(UrlPattern("example.com", kSubstring), false); Finish(); EXPECT_TRUE(ShouldAllow("https://exmpl.com")); EXPECT_FALSE(ShouldAllow("https://example.com")); } } // namespace subresource_filter
3efac002b427f778e730a5d1acc4f0d92f94d0ec
a1e938fa752e22d88a4cc128f7fbde8ca17aeb0c
/src/opencl/level1/tpch/product.hpp
ddc643a338c8db001c69f70f6e26ce1df8816c71
[]
no_license
jyoung3131/shoc
b6c7e53490799c0ca297e812fe76f0cd655b9fa8
a8f946959f97e6179c71afac5a00d56df664de76
refs/heads/master
2021-01-21T02:37:35.293720
2017-03-08T18:15:29
2017-03-08T18:15:29
29,740,653
0
0
null
2015-01-23T16:10:58
2015-01-23T16:10:58
null
UTF-8
C++
false
false
1,723
hpp
product.hpp
#ifndef PRODUCT_H #define PRODUCT_H #include "tpch.h" // ******************************************************************************************** // Class: ProductApp // // Purpose: // Defines the variables required to run the PRODUCT RA operator. // A binary operator that combines every OldTuple of one input relation to all of the // tuples of the second input relation to // produce a new relation. // Example: x={(4, a), (1, b)}, y={(1, c)} // PRODUCT(x,y) -> {(4, a, 1, c), (1, b, 1, c)} // // Programmer: Ifrah Saeed, Jeffrey Young // Creation: 2014 // // ******************************************************************************************** class ProductApp { private: vector<Tuple> mCpuOutput; //Output vector cl_kernel mKernel1; //Kernel object size_t mNumLeftElements; //Number of elements in left input size_t mNumRightElements; //Number of elements in right input size_t mLocalSize; //Work-group size size_t mGlobalSize; //Total number of work-items public: ProductApp() {} ~ProductApp() {} void SetSizes(size_t groupSize, size_t numLeftElements, size_t numRightElements); void ResetBuffers(); void FreeDevBuffers(); int SetBuffers(BmkParams param); //create buffers and push data to GPU. int SetKernel(BmkParams param); //create the kernel and set the arguments. size_t RunCPUReference(double&, vector<Tuple>, vector<Tuple>, size_t, size_t); //run the CPU reference. int RunKernel(BmkParams param); //runs kernels and displays results. void Run(BmkParams param); //starts the application. }; #endif
bcbc0070412336fbea0262db382e5f151de894f5
4a39fcb86be8dda4659eaf45f883423521c111cb
/1017. Queueing at Bank (25)/1017. Queueing at Bank (25)/1017.cpp
226ca476576fc1840ad802484b8572a3e70641dc
[]
no_license
burhanxz/Algorithm-PAT-2017
34cc9b9df6abed624f58d97cb9cbea8735b3b0c4
e527dc027763db4400142271fd0842b51a87d3fe
refs/heads/master
2020-03-11T01:15:53.144710
2018-04-16T07:47:34
2018-04-16T07:47:34
129,686,479
0
0
null
null
null
null
UTF-8
C++
false
false
2,131
cpp
1017.cpp
#include <iostream> #include<queue> #include<cstring> #include <sstream> #include<string> using namespace std; int N,K; int a,b,c,d; string s; stringstream ss; struct Time { int hh,mm,ss; Time(int HH,int MM,int SS):hh(HH),mm(MM),ss(SS){} Time& operator=(const Time &t) { hh = t.hh; mm = t.mm; ss = t.ss; } Time& operator++() { this->ss ++; if(this->ss >= 60) {this->mm++;this->ss -= 60;} if(this->mm >= 60) {this->hh++;this->mm -= 60;} return *this; } }; bool operator<(const Time &lhs,const Time &rhs) { if (lhs.hh == rhs.hh) { if(lhs.mm == rhs.mm) return lhs.ss < rhs.hh; else return lhs.mm < rhs.mm; } else return lhs.hh < rhs.hh; } Time& operator+(const Time &lhs,int minutes) { int m = lhs.mm + minutes, h=lhs.hh; m = m % 60; h += m / 60; return Time(h,m,0); } Time& operator-(const Time &lhs,const Time &rhs) { int h,m,s; int hh1 = lhs.hh, hh2 = rhs.hh, mm1 = lhs.mm, mm2 = rhs.mm, ss1 = lhs.ss, ss2 = rhs.ss; if(ss1 < ss2){s = ss1 + 60 - ss2;mm1--;}else s = ss1 - ss2; if(mm1 < mm2){m = mm1 + 60 - mm2;hh1--;}else m = mm1 - mm2; h = hh1 - hh2; return Time(h,m,s); } struct Person { Time arriveTime; int spend; int used; float waitTime; Person(int HH,int MM,int SS,int sp):arriveTime(Time(HH,MM,SS)),spend(sp) { used = 0; waitTime = 0.0; } // wait = hh * 60 + mm + ss / 60.0; // wait = (int)(wait * 10 + 0.5)/10.0; }; queue<Person> p; vector<Person> w; int main() { while (cin >> N >> K) { for(int i = 0;i != N;i++) { getline(cin, s, ' '); ss << string(s.begin(), s.begin() + 2);ss >> a;ss.clear();ss.str(""); ss << string(s.begin() + 3, s.begin() + 5);ss >> b;ss.clear();ss.str(""); ss << string(s.begin() + 6, s.end());ss >> c;ss.clear();ss.str(""); cin >> d; p.push(Person(a,b,c,d)); } Time endTime(17,0,1); for(int i = 0; i != K; i++) { if (!p.empty()) { Person _p = p.front(); p.pop(); w.push_back(_p); } } for (Time time(8,0,0);time < endTime; time++ ) { for (int i = 0;i != K; i++) { } } } }
8501a2d9cf5b84a68063615501b77aa375b54843
63926f6bc3dd5b3573d4e22c7d5ac0bc1a5e253c
/Plugins/ThumbnailExporter/Source/ThumbnailExporter/Public/ThumbnailExporter.h
3e6d8261c95b6cbb469886aff4993b3cbffbfa8b
[]
no_license
chaiyuntian/MPlugins
8c024cf3cb815614aa4c5eaf7d6d1e0f5af9eb6b
9050f15e0ac92657dbf63b403d873e87485892d2
refs/heads/main
2023-01-10T23:07:38.428583
2020-11-10T04:02:52
2020-11-10T04:02:52
309,244,097
2
0
null
null
null
null
UTF-8
C++
false
false
1,435
h
ThumbnailExporter.h
// Copyright 2018 Lian Zhang, All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "Modules/ModuleManager.h" enum ImageExportResolution { Res_64, Res_128, Res_256, Res_512, Res_1024 }; enum ImageExportMethod { ExportBySelected, ExportByPath }; class FToolBarBuilder; class FMenuBuilder; class FThumbnailExporterModule : public IModuleInterface { public: /** IModuleInterface implementation */ virtual void StartupModule() override; virtual void ShutdownModule() override; /** This function will be bound to Command (by default it will bring up plugin window) */ void PluginButtonClicked(); private: void AddToolbarExtension(FToolBarBuilder& Builder); void AddMenuExtension(FMenuBuilder& Builder); TSharedRef<class SDockTab> OnSpawnPluginTab(const class FSpawnTabArgs& SpawnTabArgs); private: TSharedPtr<class FUICommandList> PluginCommands; FText OutputMessageText; FText GetOutputMessageText() const; FReply ExportImages(); // ExportImages button click void SaveThumbnail(UObject * obj); FText OutputPath; FReply OpenPathPick(); FText GetOutputPath() const; ImageExportResolution ImageRes; FText GetResText() const; void SelectRes(ImageExportResolution res); TSharedRef<class SWidget> GetResContent(); ImageExportMethod ExportMethod; FText GetMethodText() const; void SelectMethod(ImageExportMethod method); TSharedRef<class SWidget> GetMethodContent(); };
0f22025caf6e6b26cf10ec6c6b8b2dabefaca97c
792431c821430beb85539ee5a9cb57b9ed06cc49
/src/layer/Layer.cpp
29737d0d01a8a7bca3b8967ebac6bbf790f993ee
[]
no_license
louisfaury/basic_ffnn
f8504e979e1ba221f527afb5b8dbebc40b2e87c6
974ef8c1b8771b145bf6316d76024f2e4cdb94c9
refs/heads/master
2021-01-25T04:27:23.539952
2017-08-12T14:29:48
2017-08-12T14:29:48
93,443,704
1
0
null
null
null
null
UTF-8
C++
false
false
1,159
cpp
Layer.cpp
/* file : Layer.cpp * author : Louis Faury * date : 08/06/17 */ #include "Layer.h" #include "assert.h" using namespace Eigen; Layer::Layer() : m_size(0) { } Layer::Layer(int size) : m_size(size) { } Layer::~Layer() { for (NeuralArrayIt it = m_neurons.begin(); it != m_neurons.end(); it++) { delete(*it); } } VectorXd Layer::getOutputs() { VectorXd res(m_size); int i(0); for (NeuralArrayIt it = m_neurons.begin(); it != m_neurons.end(); it++) { res(i) = (*it)->getOutput(); ++i; } return res; } VectorXd Layer::getDerivativeActivations() { VectorXd res(m_size); int i(0); for (NeuralArrayIt it = m_neurons.begin(); it != m_neurons.end(); it++) { res(i) = (*it)->getDerivativeActivation(); ++i; } return res; } void Layer::setActivations(VectorXd aa) { int size = aa.rows(); if (size!=m_size) printf("Wrong dimensions (Layer::setActivations)\n"); else { NeuralArrayIt it = m_neurons.begin(); for (int i=0; i<size; i++) { (*it)->setActivation(aa(i)); it++; } } }
c0c1dca77db3b8de202ec3a903300a81d8bb9471
5e50fcdef7ac87b11e61c27613b73b2e9891271e
/Queue ADT/Queue ADT/Source.cpp
56481b0f9e34cfaee645d6c446cf9aa666cfd1ab
[]
no_license
BilalAli181999/Data-Structures-in-C_Plus_Plus
70dfd4b8d7dc72a69ff1d797f584517b3e4f80a1
bbe6dad9763cd863c53086791f8b6bc4be09eaa7
refs/heads/master
2020-07-16T05:02:04.436346
2019-09-01T20:03:11
2019-09-01T20:03:11
205,724,906
0
0
null
null
null
null
UTF-8
C++
false
false
213
cpp
Source.cpp
#include<iostream> #include"Queue.h" using namespace std; int main() { Queue<int> q; q.enQueue(99); q.enQueue(13); q.enQueue(14); q.enQueue(15); q.enQueue(16); cout << q.deQueue(); cout << q.deQueue(); }
177307527a4b374951473edd1128adcbb8516519
cd237df71037057ed484e26c196fca589404c939
/rkclib/NumStr.h
d5b4ccf6bf54d304ef7bbeda5c23609f52182217
[ "MIT" ]
permissive
elasota/ricochet
85afa454c6a42b15ea99b6a36f1a6b8655e835f6
6c9687738e545c89a4bde94a4118aec40e0c3797
refs/heads/main
2023-05-30T22:58:09.085811
2021-06-30T04:44:02
2021-06-30T04:44:02
381,576,898
0
0
null
null
null
null
UTF-8
C++
false
false
655
h
NumStr.h
#pragma once #include "Vector.h" #include "BigUDecFloatProto.h" namespace rkci { class Result; template<class T> class ResultRV; struct IAllocator; template<class... T> class Tuple; template<class T> class ArraySliceView; class NumStr { public: typedef rkci::Vector<uint8_t, 32> NumStrString_t; explicit NumStr(IAllocator &alloc); ResultRV<BigUDecFloat_t> DecimalUTF8ToDecInt(const ArraySliceView<const uint8_t> &utf8Str, uint32_t &outNumTrailingZeroes) const; ResultRV<BigUDecFloat_t> DecimalUTF8ToDecFloat(const ArraySliceView<const uint8_t> &utf8Str, uint32_t &outNumTrailingZeroes) const; private: IAllocator &m_alloc; }; }
9e2e86710f5c68f818eeae2d29237d9e5309191a
e56bf2c4b199e4a88e5894f71b191db3cccd62d1
/conf_crawler/extractor/gen-cpp/StaticLinkBaseService_server.skeleton.cpp
8d01d9a88ae0f64f4726bc5961309c2c335db65f
[ "Apache-2.0" ]
permissive
seshucalypso/crawler_cpp
5155fa4f23913647618dff678f1856b33d9cf1ae
e0c8dba77233005b1ab13731d1cbcce274b70778
refs/heads/master
2021-06-14T20:24:50.112279
2017-04-06T07:45:13
2017-04-06T07:45:13
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,338
cpp
StaticLinkBaseService_server.skeleton.cpp
// This autogenerated skeleton file illustrates how to build a server. // You should copy it to another filename to avoid overwriting it. #include "StaticLinkBaseService.h" #include <thrift/protocol/TBinaryProtocol.h> #include <thrift/server/TSimpleServer.h> #include <thrift/transport/TServerSocket.h> #include <thrift/transport/TBufferTransports.h> using namespace ::apache::thrift; using namespace ::apache::thrift::protocol; using namespace ::apache::thrift::transport; using namespace ::apache::thrift::server; using boost::shared_ptr; class StaticLinkBaseServiceHandler : virtual public StaticLinkBaseServiceIf { public: StaticLinkBaseServiceHandler() { // Your initialization goes here } void load_db_task(const int32_t task_id, const bool is_add_task) { // Your implementation goes here printf("load_db_task\n"); } void load_mongodb_task(const int32_t task_id, const bool is_add_task) { // Your implementation goes here printf("load_mongodb_task\n"); } void get_download_task(std::vector<DownloadTask> & _return) { // Your implementation goes here printf("get_download_task\n"); } void get_extract_task(std::vector<ExtractItem> & _return) { // Your implementation goes here printf("get_extract_task\n"); } void get_one_extract_task(ExtractItem& _return) { // Your implementation goes here printf("get_one_extract_task\n"); } void upload_download_task(const DownloadedBodyItem& downloaded_body_item) { // Your implementation goes here printf("upload_download_task\n"); } void upload_extract_task(const ExtractItem& extract_item, const MatchedResultItem& matched_result_item) { // Your implementation goes here printf("upload_extract_task\n"); } }; int main(int argc, char **argv) { int port = 9090; shared_ptr<StaticLinkBaseServiceHandler> handler(new StaticLinkBaseServiceHandler()); shared_ptr<TProcessor> processor(new StaticLinkBaseServiceProcessor(handler)); shared_ptr<TServerTransport> serverTransport(new TServerSocket(port)); shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory()); shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory()); TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory); server.serve(); return 0; }
47715210487c54d087ecfe9af5887d4152ccd657
7a8a90dab1a7ebb99a1d71d160ada1ce73e916d6
/XafsM.cpp
3501f3761e962f64586c94f222505e44888e2710
[]
no_license
mtab3/xafsm2
95f5823f79f43105bc7ceef50746cc1f0cb3d623
46c6debf633d215de51eff9e150c61ff333155a1
refs/heads/master
2021-01-10T06:50:22.514830
2015-05-25T08:44:02
2015-05-25T08:44:02
46,334,410
0
0
null
null
null
null
UTF-8
C++
false
false
4,219
cpp
XafsM.cpp
#include <QtGlobal> #include <QSplashScreen> #include <QStyleFactory> #include <QApplication> #include <QTranslator> #include <QTextCodec> #include <QDebug> #include <stdio.h> #include "XafsM.h" #include "MainWindow.h" #include "Atoms.h" QSplashScreen *ShowSplashScreen( int m, int d ); enum LANG { English, Japanese, LANGS }; QString DefFileName; bool newFluoMode; int qMainVer, qSubVer, qSubSubVer; int main( int argc, char *argv[] ) { int month = QDate::currentDate().month(); int day = QDate::currentDate().day(); printf( "starting\n" ); getQVersion(); if ( qMainVer >= 5 ) QApplication::setStyle( "Fusion" ); else if ( qMainVer >= 4 ) { QApplication::setStyle( "Cleanlooks" ); } LANG Lang = Japanese; DefFileName = "XAFSM.def"; newFluoMode = false; QString myname = QString( argv[0] ) .section( "/", -1 ) // "/" を区切りに切り出したトークンの右から数えて1つめ .section( "\\", -1 ) // "\\" (エン記号)を区切りに、同上 // この 2つで、unix 系でも msdos 系でもファイル名が拾えるはず。 .section( ".", 0, 0 ); // 残ったファイル名に対して "." を区切りに切り出した最初のトークン for ( int i = 1; i < argc; i++ ) { if ( QString( argv[i] ) == "-nF" ) { newFluoMode = true; }; if ( QString( argv[i] ) == "-j" ) { Lang = Japanese; }; if ( QString( argv[i] ) == "-e" ) { Lang = English; }; if ( QString( argv[i] ) == "-d" ) { if ( i+1 < argc ) { DefFileName = QString( argv[i+1] ); } } if ( QString( argv[i] ) == "-m" ) { if ( i+1 < argc ) { QString MD = QString( argv[i+1] ); month = (int)(MD.toInt() / 100); day = MD.toInt() - month * 100; qDebug() << "md " << month << day; } } } if ( QString( argv[0] ).contains( "XafsM2e" ) == true ) { Lang = English; } QApplication app( argc, argv ); QSplashScreen *splash = ShowSplashScreen( month, day ); QTranslator appTr; switch( (int)Lang ) { case English: break; case Japanese: appTr.load( ":XafsMsg_ja_JP", qApp->applicationDirPath() ); app.installTranslator( &appTr ); break; } //QTextCodec::setCodecForTr( QTextCodec::codecForName( "Shift-JIS" ) ); // tr() マクロ中の文字列のコーディング指定 //QTextCodec::setCodecForCStrings( QTextCodec::codecForName( "Shift-JIS" ) ); // const char * "" を暗黙に QString に変換する時のコーディング指定 QTextCodec::setCodecForLocale( QTextCodec::codecForName( "Shift-JIS" ) ); /****** global initialize ******/ global_init(); /*******************************/ ReadVicF(); MainWindow *mw = new MainWindow( myname ); mw->show(); mw->InitSize(); splash->finish( mw ); delete splash; return app.exec(); } void getQVersion( void ) { qMainVer = qSubVer = qSubSubVer = 0; QString ver = QString( qVersion() ); QStringList vers = ver.split( "." ); if ( vers.count() >= 1 ) qMainVer = vers[0].toInt(); if ( vers.count() >= 2 ) qSubVer = vers[1].toInt(); if ( vers.count() >= 3 ) qSubSubVer = vers[2].toInt(); } QSplashScreen *ShowSplashScreen( int m, int d ) { // Show Splash Screen depending on month of a year QPixmap SSPixmap; //Insert your splash page image here SSPixmap.load( ":XafsM2.png" ); switch( m ) { case 1: if ( d < 16 ) SSPixmap.load( ":Monthly/Month01.gif" ); break; case 2: if ( d < 4 ) SSPixmap.load( ":Monthly/Month02_03.gif" ); break; case 3: if ( d < 4 ) SSPixmap.load( ":Monthly/Month03_03.gif" ); break; case 4: if ( d < 16 ) SSPixmap.load( ":Monthly/Month04.png" ); break; case 5: if ( d < 6 ) SSPixmap.load( ":Monthly/Month05.png" ); break; default: break; } QSplashScreen *splash = new QSplashScreen( SSPixmap ); splash->show(); // This line represents the alignment of text, color and position splash->showMessage( QObject::tr( "Starting XafsM2..." ), Qt::AlignHCenter | Qt::AlignVCenter, QColor( 0, 0, 255 ) ); // This is used to accept a click on the screen so that user can cancel the screen qApp->processEvents(); return splash; }
9959676362b153c89bc2f0404a39087d51982c1d
76171660651f1c680d5b5a380c07635de5b2367c
/SH6_43mps/0.48/rho
fda8e35572b2a6e1601146db3bd98ee98198aee1
[]
no_license
lisegaAM/SH_Paper1
3cd0cac0d95cc60d296268e65e2dd6fed4cc6127
12ceadba5c58c563ccac236b965b4b917ac47551
refs/heads/master
2021-04-27T19:44:19.527187
2018-02-21T16:16:50
2018-02-21T16:16:50
122,360,661
0
0
null
null
null
null
UTF-8
C++
false
false
132,260
rho
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 3.0.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0.48"; object rho; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -3 0 0 0 0 0]; internalField nonuniform List<scalar> 13800 ( 50.5146 50.5147 50.5148 50.5149 50.515 50.5151 50.5152 50.5154 50.5156 50.5158 50.516 50.5163 50.5166 50.5169 50.5172 50.5175 50.5179 50.5183 50.5187 50.5192 50.5197 50.5202 50.5207 50.5213 50.5219 50.5225 50.5232 50.5239 50.5246 50.5254 50.5262 50.527 50.5279 50.5288 50.5297 50.5307 50.5317 50.5327 50.5338 50.535 50.5361 50.5374 50.5387 50.54 50.5414 50.5428 50.5443 50.5458 50.5473 50.5489 50.5506 50.5523 50.554 50.5558 50.5576 50.5596 50.5616 50.5636 50.5657 50.5679 50.5701 50.5723 50.5746 50.577 50.5794 50.5818 50.5843 50.5869 50.5896 50.5923 50.5951 50.5979 50.6008 50.6038 50.6068 50.6099 50.6131 50.6163 50.6195 50.6229 50.6263 50.6297 50.6332 50.6368 50.6405 50.6442 50.648 50.6519 50.6558 50.6598 50.6638 50.668 50.6722 50.6764 50.6808 50.6852 50.6897 50.6942 50.6988 50.7035 50.7083 50.7131 50.718 50.723 50.7281 50.7332 50.7384 50.7437 50.749 50.7544 50.7599 50.7655 50.7711 50.7769 50.7827 50.7885 50.7945 50.8005 50.8066 50.8127 50.819 50.8253 50.8317 50.8382 50.8447 50.8514 50.8581 50.8648 50.8717 50.8786 50.8856 50.8927 50.8999 50.9071 50.9145 50.9219 50.9293 50.9369 50.9445 50.9522 50.96 50.9679 50.9758 50.9838 50.9919 51.0001 51.0083 51.0167 51.0251 51.0335 51.0421 51.0507 51.0594 51.0682 51.0771 51.086 51.095 51.1041 51.1133 51.1225 51.1318 51.1412 51.1507 51.1602 51.1698 51.1795 51.1892 51.1991 51.209 51.2189 51.229 51.2391 51.2493 51.2595 51.2698 51.2802 51.2907 51.3012 51.3118 51.3225 51.3332 51.344 51.3549 51.3658 51.3769 51.3879 51.3991 51.4102 51.4216 51.4327 51.4443 51.4554 51.4673 51.4784 51.4906 51.5016 51.5141 51.5251 51.5383 51.5486 50.5151 50.5152 50.5153 50.5154 50.5155 50.5156 50.5157 50.5159 50.5161 50.5163 50.5165 50.5168 50.517 50.5173 50.5177 50.518 50.5184 50.5188 50.5192 50.5197 50.5201 50.5206 50.5212 50.5217 50.5223 50.523 50.5236 50.5243 50.5251 50.5258 50.5266 50.5274 50.5283 50.5292 50.5301 50.5311 50.5321 50.5332 50.5342 50.5354 50.5366 50.5378 50.5391 50.5404 50.5418 50.5432 50.5447 50.5462 50.5477 50.5493 50.551 50.5527 50.5544 50.5562 50.558 50.5599 50.5619 50.564 50.5661 50.5682 50.5704 50.5727 50.575 50.5773 50.5797 50.5822 50.5847 50.5873 50.5899 50.5926 50.5954 50.5983 50.6012 50.6041 50.6072 50.6102 50.6134 50.6166 50.6199 50.6232 50.6266 50.63 50.6336 50.6371 50.6408 50.6445 50.6483 50.6522 50.6561 50.6601 50.6642 50.6683 50.6725 50.6768 50.6811 50.6855 50.69 50.6945 50.6992 50.7039 50.7086 50.7135 50.7184 50.7233 50.7284 50.7335 50.7387 50.744 50.7493 50.7548 50.7603 50.7658 50.7715 50.7772 50.783 50.7888 50.7948 50.8008 50.8069 50.8131 50.8193 50.8256 50.832 50.8385 50.8451 50.8517 50.8584 50.8652 50.872 50.879 50.886 50.8931 50.9002 50.9075 50.9148 50.9222 50.9297 50.9372 50.9448 50.9525 50.9603 50.9682 50.9761 50.9841 50.9922 51.0004 51.0087 51.017 51.0254 51.0339 51.0424 51.051 51.0597 51.0685 51.0774 51.0863 51.0953 51.1044 51.1136 51.1228 51.1321 51.1415 51.151 51.1605 51.1701 51.1798 51.1895 51.1994 51.2093 51.2192 51.2293 51.2394 51.2496 51.2598 51.2702 51.2806 51.291 51.3016 51.3122 51.3228 51.3336 51.3444 51.3552 51.3662 51.3772 51.3882 51.3994 51.4105 51.4219 51.433 51.4446 51.4558 51.4677 51.4787 51.4909 51.5019 51.5144 51.5254 51.5386 51.5476 50.5151 50.5152 50.5153 50.5154 50.5155 50.5156 50.5157 50.5159 50.5161 50.5163 50.5165 50.5168 50.517 50.5173 50.5177 50.518 50.5184 50.5188 50.5192 50.5197 50.5201 50.5206 50.5212 50.5217 50.5223 50.523 50.5236 50.5243 50.5251 50.5258 50.5266 50.5274 50.5283 50.5292 50.5301 50.5311 50.5321 50.5332 50.5342 50.5354 50.5366 50.5378 50.5391 50.5404 50.5418 50.5432 50.5447 50.5462 50.5477 50.5493 50.551 50.5527 50.5544 50.5562 50.558 50.5599 50.5619 50.564 50.5661 50.5682 50.5704 50.5727 50.575 50.5773 50.5797 50.5822 50.5847 50.5873 50.5899 50.5926 50.5954 50.5983 50.6012 50.6041 50.6072 50.6102 50.6134 50.6166 50.6199 50.6232 50.6266 50.63 50.6336 50.6371 50.6408 50.6445 50.6483 50.6522 50.6561 50.6601 50.6642 50.6683 50.6725 50.6768 50.6811 50.6855 50.69 50.6945 50.6992 50.7039 50.7086 50.7135 50.7184 50.7233 50.7284 50.7335 50.7387 50.744 50.7493 50.7548 50.7603 50.7658 50.7715 50.7772 50.783 50.7888 50.7948 50.8008 50.8069 50.8131 50.8193 50.8256 50.832 50.8385 50.8451 50.8517 50.8584 50.8652 50.872 50.879 50.886 50.8931 50.9002 50.9075 50.9148 50.9222 50.9297 50.9372 50.9448 50.9525 50.9603 50.9682 50.9761 50.9841 50.9922 51.0004 51.0087 51.017 51.0254 51.0339 51.0424 51.051 51.0597 51.0685 51.0774 51.0863 51.0953 51.1044 51.1136 51.1228 51.1321 51.1415 51.151 51.1605 51.1701 51.1798 51.1896 51.1994 51.2093 51.2192 51.2293 51.2394 51.2496 51.2598 51.2702 51.2806 51.291 51.3016 51.3122 51.3228 51.3336 51.3444 51.3552 51.3662 51.3772 51.3882 51.3994 51.4105 51.4219 51.433 51.4446 51.4558 51.4677 51.4787 51.4909 51.5019 51.5144 51.5254 51.5386 51.5478 50.5151 50.5152 50.5153 50.5154 50.5155 50.5156 50.5157 50.5159 50.5161 50.5163 50.5165 50.5168 50.517 50.5173 50.5177 50.518 50.5184 50.5188 50.5192 50.5197 50.5201 50.5206 50.5212 50.5217 50.5223 50.523 50.5236 50.5243 50.5251 50.5258 50.5266 50.5274 50.5283 50.5292 50.5301 50.5311 50.5321 50.5332 50.5342 50.5354 50.5366 50.5378 50.5391 50.5404 50.5418 50.5432 50.5447 50.5462 50.5477 50.5493 50.551 50.5527 50.5544 50.5562 50.558 50.5599 50.5619 50.564 50.5661 50.5682 50.5704 50.5727 50.575 50.5773 50.5797 50.5822 50.5847 50.5873 50.5899 50.5926 50.5954 50.5983 50.6012 50.6041 50.6072 50.6102 50.6134 50.6166 50.6199 50.6232 50.6266 50.63 50.6336 50.6371 50.6408 50.6445 50.6483 50.6522 50.6561 50.6601 50.6642 50.6683 50.6725 50.6768 50.6811 50.6855 50.69 50.6945 50.6992 50.7039 50.7086 50.7135 50.7184 50.7233 50.7284 50.7335 50.7387 50.744 50.7493 50.7548 50.7603 50.7658 50.7715 50.7772 50.783 50.7888 50.7948 50.8008 50.8069 50.8131 50.8193 50.8256 50.832 50.8385 50.8451 50.8517 50.8584 50.8652 50.872 50.879 50.886 50.8931 50.9002 50.9075 50.9148 50.9222 50.9297 50.9372 50.9448 50.9525 50.9603 50.9682 50.9761 50.9841 50.9922 51.0004 51.0087 51.017 51.0254 51.0339 51.0424 51.051 51.0597 51.0685 51.0774 51.0863 51.0953 51.1044 51.1136 51.1228 51.1321 51.1415 51.151 51.1605 51.1701 51.1798 51.1896 51.1994 51.2093 51.2192 51.2293 51.2394 51.2496 51.2598 51.2702 51.2806 51.291 51.3016 51.3122 51.3228 51.3336 51.3444 51.3552 51.3662 51.3772 51.3882 51.3994 51.4105 51.4219 51.433 51.4446 51.4558 51.4677 51.4787 51.4909 51.5019 51.5144 51.5255 51.5385 51.5491 50.5151 50.5152 50.5153 50.5154 50.5155 50.5156 50.5157 50.5159 50.5161 50.5163 50.5165 50.5168 50.517 50.5173 50.5177 50.518 50.5184 50.5188 50.5192 50.5197 50.5201 50.5206 50.5212 50.5217 50.5223 50.523 50.5236 50.5243 50.525 50.5258 50.5266 50.5274 50.5283 50.5292 50.5301 50.5311 50.5321 50.5332 50.5342 50.5354 50.5366 50.5378 50.5391 50.5404 50.5418 50.5432 50.5447 50.5462 50.5477 50.5493 50.551 50.5526 50.5544 50.5562 50.558 50.5599 50.5619 50.564 50.5661 50.5682 50.5704 50.5727 50.575 50.5773 50.5797 50.5822 50.5847 50.5873 50.5899 50.5926 50.5954 50.5983 50.6012 50.6041 50.6072 50.6102 50.6134 50.6166 50.6199 50.6232 50.6266 50.63 50.6336 50.6371 50.6408 50.6445 50.6483 50.6522 50.6561 50.6601 50.6642 50.6683 50.6725 50.6768 50.6811 50.6855 50.69 50.6945 50.6992 50.7039 50.7086 50.7135 50.7184 50.7233 50.7284 50.7335 50.7387 50.744 50.7493 50.7548 50.7603 50.7658 50.7715 50.7772 50.783 50.7888 50.7948 50.8008 50.8069 50.8131 50.8193 50.8256 50.832 50.8385 50.8451 50.8517 50.8584 50.8652 50.872 50.879 50.886 50.8931 50.9002 50.9075 50.9148 50.9222 50.9297 50.9372 50.9448 50.9525 50.9603 50.9682 50.9761 50.9841 50.9922 51.0004 51.0087 51.017 51.0254 51.0339 51.0424 51.051 51.0597 51.0685 51.0774 51.0863 51.0953 51.1044 51.1136 51.1228 51.1321 51.1415 51.151 51.1605 51.1701 51.1798 51.1896 51.1994 51.2093 51.2192 51.2293 51.2394 51.2496 51.2598 51.2702 51.2806 51.291 51.3016 51.3122 51.3228 51.3336 51.3444 51.3552 51.3662 51.3772 51.3882 51.3994 51.4105 51.4219 51.433 51.4446 51.4558 51.4677 51.4787 51.4909 51.502 51.5144 51.5255 51.5382 51.5488 50.5151 50.5152 50.5153 50.5154 50.5155 50.5156 50.5157 50.5159 50.5161 50.5163 50.5165 50.5168 50.517 50.5173 50.5177 50.518 50.5184 50.5188 50.5192 50.5197 50.5201 50.5206 50.5212 50.5217 50.5223 50.523 50.5236 50.5243 50.525 50.5258 50.5266 50.5274 50.5283 50.5292 50.5301 50.5311 50.5321 50.5332 50.5342 50.5354 50.5366 50.5378 50.5391 50.5404 50.5418 50.5432 50.5447 50.5462 50.5477 50.5493 50.551 50.5526 50.5544 50.5562 50.558 50.5599 50.5619 50.564 50.5661 50.5682 50.5704 50.5727 50.575 50.5773 50.5797 50.5822 50.5847 50.5873 50.5899 50.5926 50.5954 50.5983 50.6012 50.6041 50.6072 50.6102 50.6134 50.6166 50.6199 50.6232 50.6266 50.63 50.6336 50.6371 50.6408 50.6445 50.6483 50.6522 50.6561 50.6601 50.6642 50.6683 50.6725 50.6768 50.6811 50.6855 50.69 50.6945 50.6992 50.7039 50.7086 50.7135 50.7184 50.7233 50.7284 50.7335 50.7387 50.744 50.7493 50.7548 50.7603 50.7658 50.7715 50.7772 50.783 50.7888 50.7948 50.8008 50.8069 50.8131 50.8193 50.8256 50.832 50.8385 50.8451 50.8517 50.8584 50.8652 50.872 50.879 50.886 50.8931 50.9002 50.9075 50.9148 50.9222 50.9297 50.9372 50.9448 50.9525 50.9603 50.9682 50.9761 50.9841 50.9922 51.0004 51.0087 51.017 51.0254 51.0339 51.0424 51.051 51.0597 51.0685 51.0774 51.0863 51.0953 51.1044 51.1136 51.1228 51.1321 51.1415 51.151 51.1605 51.1701 51.1798 51.1896 51.1994 51.2093 51.2192 51.2293 51.2394 51.2496 51.2598 51.2702 51.2806 51.291 51.3016 51.3122 51.3228 51.3336 51.3444 51.3552 51.3662 51.3772 51.3882 51.3994 51.4106 51.4218 51.4331 51.4445 51.456 51.4673 51.4792 51.4904 51.5024 51.514 51.5257 51.5376 51.5488 50.5151 50.5152 50.5153 50.5154 50.5155 50.5156 50.5157 50.5159 50.5161 50.5163 50.5165 50.5168 50.517 50.5173 50.5177 50.518 50.5184 50.5188 50.5192 50.5197 50.5201 50.5206 50.5212 50.5217 50.5223 50.523 50.5236 50.5243 50.5251 50.5258 50.5266 50.5274 50.5283 50.5292 50.5301 50.5311 50.5321 50.5332 50.5342 50.5354 50.5366 50.5378 50.5391 50.5404 50.5418 50.5432 50.5447 50.5462 50.5477 50.5493 50.551 50.5527 50.5544 50.5562 50.558 50.5599 50.5619 50.564 50.5661 50.5682 50.5704 50.5727 50.575 50.5773 50.5797 50.5822 50.5847 50.5873 50.5899 50.5926 50.5954 50.5983 50.6012 50.6041 50.6072 50.6102 50.6134 50.6166 50.6199 50.6232 50.6266 50.63 50.6336 50.6371 50.6408 50.6445 50.6483 50.6522 50.6561 50.6601 50.6642 50.6683 50.6725 50.6768 50.6811 50.6855 50.69 50.6945 50.6992 50.7039 50.7086 50.7135 50.7184 50.7233 50.7284 50.7335 50.7387 50.744 50.7493 50.7548 50.7603 50.7658 50.7715 50.7772 50.783 50.7888 50.7948 50.8008 50.8069 50.8131 50.8193 50.8256 50.832 50.8385 50.8451 50.8517 50.8584 50.8652 50.872 50.879 50.886 50.8931 50.9002 50.9075 50.9148 50.9222 50.9297 50.9372 50.9448 50.9525 50.9603 50.9682 50.9761 50.9841 50.9922 51.0004 51.0087 51.017 51.0254 51.0339 51.0424 51.051 51.0597 51.0685 51.0774 51.0863 51.0953 51.1044 51.1136 51.1228 51.1321 51.1415 51.151 51.1605 51.1701 51.1798 51.1896 51.1994 51.2093 51.2192 51.2293 51.2394 51.2496 51.2598 51.2702 51.2806 51.291 51.3016 51.3122 51.3228 51.3336 51.3444 51.3552 51.3662 51.3772 51.3883 51.3993 51.4106 51.4217 51.4333 51.4443 51.4561 51.4672 51.4792 51.4903 51.5026 51.5136 51.5261 51.5361 51.5497 50.5151 50.5152 50.5153 50.5154 50.5155 50.5156 50.5157 50.5159 50.5161 50.5163 50.5165 50.5168 50.517 50.5173 50.5177 50.518 50.5184 50.5188 50.5192 50.5197 50.5201 50.5206 50.5212 50.5217 50.5223 50.523 50.5236 50.5243 50.5251 50.5258 50.5266 50.5274 50.5283 50.5292 50.5301 50.5311 50.5321 50.5332 50.5342 50.5354 50.5366 50.5378 50.5391 50.5404 50.5418 50.5432 50.5447 50.5462 50.5477 50.5493 50.551 50.5527 50.5544 50.5562 50.558 50.5599 50.5619 50.564 50.5661 50.5682 50.5704 50.5727 50.575 50.5773 50.5797 50.5822 50.5847 50.5873 50.5899 50.5926 50.5954 50.5983 50.6012 50.6041 50.6072 50.6102 50.6134 50.6166 50.6199 50.6232 50.6266 50.63 50.6336 50.6371 50.6408 50.6445 50.6483 50.6522 50.6561 50.6601 50.6642 50.6683 50.6725 50.6768 50.6811 50.6855 50.69 50.6945 50.6992 50.7039 50.7086 50.7135 50.7184 50.7233 50.7284 50.7335 50.7387 50.744 50.7493 50.7548 50.7603 50.7658 50.7715 50.7772 50.783 50.7888 50.7948 50.8008 50.8069 50.8131 50.8193 50.8256 50.832 50.8385 50.8451 50.8517 50.8584 50.8652 50.872 50.879 50.886 50.8931 50.9002 50.9075 50.9148 50.9222 50.9297 50.9372 50.9448 50.9525 50.9603 50.9682 50.9761 50.9841 50.9922 51.0004 51.0087 51.017 51.0254 51.0339 51.0424 51.051 51.0597 51.0685 51.0774 51.0863 51.0953 51.1044 51.1136 51.1228 51.1321 51.1415 51.151 51.1605 51.1701 51.1798 51.1896 51.1994 51.2093 51.2192 51.2293 51.2394 51.2496 51.2598 51.2702 51.2806 51.291 51.3016 51.3122 51.3228 51.3336 51.3444 51.3552 51.3662 51.3772 51.3883 51.3993 51.4106 51.4217 51.4333 51.4443 51.4562 51.4672 51.4793 51.4903 51.5026 51.5136 51.5262 51.5354 51.5545 50.5151 50.5152 50.5153 50.5154 50.5155 50.5156 50.5157 50.5159 50.5161 50.5163 50.5165 50.5168 50.517 50.5173 50.5177 50.518 50.5184 50.5188 50.5192 50.5197 50.5201 50.5206 50.5212 50.5217 50.5223 50.523 50.5236 50.5243 50.5251 50.5258 50.5266 50.5274 50.5283 50.5292 50.5301 50.5311 50.5321 50.5332 50.5342 50.5354 50.5366 50.5378 50.5391 50.5404 50.5418 50.5432 50.5447 50.5462 50.5477 50.5493 50.551 50.5527 50.5544 50.5562 50.558 50.5599 50.5619 50.564 50.5661 50.5682 50.5704 50.5727 50.575 50.5773 50.5797 50.5822 50.5847 50.5873 50.5899 50.5926 50.5954 50.5983 50.6012 50.6041 50.6072 50.6102 50.6134 50.6166 50.6199 50.6232 50.6266 50.63 50.6336 50.6371 50.6408 50.6445 50.6483 50.6522 50.6561 50.6601 50.6642 50.6683 50.6725 50.6768 50.6811 50.6855 50.69 50.6945 50.6992 50.7039 50.7086 50.7135 50.7184 50.7233 50.7284 50.7335 50.7387 50.744 50.7493 50.7548 50.7603 50.7658 50.7715 50.7772 50.783 50.7888 50.7948 50.8008 50.8069 50.8131 50.8193 50.8256 50.832 50.8385 50.8451 50.8517 50.8584 50.8652 50.872 50.879 50.886 50.8931 50.9002 50.9075 50.9148 50.9222 50.9297 50.9372 50.9448 50.9525 50.9603 50.9682 50.9761 50.9841 50.9922 51.0004 51.0087 51.017 51.0254 51.0339 51.0424 51.051 51.0597 51.0685 51.0774 51.0863 51.0953 51.1044 51.1136 51.1228 51.1321 51.1415 51.151 51.1605 51.1701 51.1798 51.1895 51.1994 51.2093 51.2192 51.2293 51.2394 51.2496 51.2598 51.2702 51.2806 51.291 51.3016 51.3122 51.3228 51.3336 51.3444 51.3552 51.3662 51.3772 51.3883 51.3993 51.4106 51.4217 51.4333 51.4443 51.4562 51.4672 51.4793 51.4903 51.5026 51.5136 51.5262 51.535 51.5575 50.5146 50.5147 50.5148 50.5149 50.515 50.5151 50.5152 50.5154 50.5156 50.5158 50.516 50.5163 50.5166 50.5169 50.5172 50.5175 50.5179 50.5183 50.5187 50.5192 50.5197 50.5202 50.5207 50.5213 50.5219 50.5225 50.5232 50.5239 50.5246 50.5254 50.5262 50.527 50.5279 50.5288 50.5297 50.5307 50.5317 50.5327 50.5338 50.535 50.5361 50.5374 50.5387 50.54 50.5414 50.5428 50.5443 50.5458 50.5473 50.5489 50.5506 50.5523 50.554 50.5558 50.5576 50.5596 50.5616 50.5636 50.5657 50.5679 50.5701 50.5723 50.5746 50.577 50.5794 50.5818 50.5843 50.5869 50.5896 50.5923 50.5951 50.5979 50.6008 50.6038 50.6068 50.6099 50.6131 50.6163 50.6195 50.6229 50.6263 50.6297 50.6332 50.6368 50.6405 50.6442 50.648 50.6519 50.6558 50.6598 50.6638 50.668 50.6722 50.6764 50.6808 50.6852 50.6897 50.6942 50.6988 50.7035 50.7083 50.7131 50.718 50.723 50.7281 50.7332 50.7384 50.7437 50.749 50.7544 50.7599 50.7655 50.7711 50.7769 50.7827 50.7885 50.7945 50.8005 50.8066 50.8127 50.819 50.8253 50.8317 50.8382 50.8447 50.8514 50.8581 50.8648 50.8717 50.8786 50.8856 50.8927 50.8999 50.9071 50.9145 50.9219 50.9293 50.9369 50.9445 50.9522 50.96 50.9679 50.9758 50.9838 50.9919 51.0001 51.0083 51.0167 51.0251 51.0335 51.0421 51.0507 51.0594 51.0682 51.0771 51.086 51.095 51.1041 51.1133 51.1225 51.1318 51.1412 51.1507 51.1602 51.1698 51.1795 51.1892 51.1991 51.209 51.2189 51.229 51.2391 51.2493 51.2595 51.2698 51.2802 51.2907 51.3012 51.3118 51.3225 51.3332 51.344 51.3549 51.3659 51.3768 51.3879 51.399 51.4103 51.4214 51.433 51.444 51.4558 51.4669 51.479 51.4899 51.5023 51.5133 51.5258 51.5344 51.5601 51.5685 51.5761 51.5801 51.5826 51.5848 51.5869 51.589 51.5911 51.5931 51.5951 51.5972 51.5992 51.6012 51.6031 51.6048 51.6063 51.6076 51.6088 51.6096 51.6102 51.5676 51.5747 51.579 51.5817 51.584 51.5863 51.5885 51.5906 51.5926 51.5946 51.5966 51.5986 51.6005 51.6023 51.604 51.6056 51.6069 51.6082 51.609 51.6097 51.5668 51.574 51.5787 51.5814 51.5838 51.5861 51.5883 51.5905 51.5925 51.5945 51.5965 51.5984 51.6003 51.6022 51.6039 51.6055 51.607 51.6081 51.6089 51.609 51.5641 51.5688 51.5717 51.5739 51.5759 51.5781 51.5803 51.5824 51.5845 51.5866 51.5885 51.5906 51.5924 51.5941 51.5957 51.5972 51.5985 51.5996 51.6004 51.6009 51.5614 51.5656 51.5694 51.5727 51.5756 51.5782 51.5805 51.5826 51.5847 51.5867 51.5886 51.5908 51.5926 51.5944 51.5962 51.5977 51.5991 51.6003 51.6013 51.6022 51.5527 51.5532 51.5534 51.5536 51.5542 51.5552 51.5567 51.5583 51.56 51.5619 51.5637 51.5657 51.5675 51.5696 51.5715 51.5735 51.5755 51.5778 51.5801 51.5829 51.5465 51.5462 51.5481 51.5507 51.5532 51.5555 51.5577 51.5599 51.5621 51.5643 51.5666 51.5685 51.5707 51.5728 51.575 51.5773 51.5797 51.5826 51.5857 51.5892 51.5351 51.5291 51.5245 51.5217 51.5206 51.5206 51.5212 51.5223 51.524 51.5259 51.5282 51.5307 51.5335 51.5368 51.5401 51.5441 51.5484 51.5536 51.5593 51.5661 51.5334 51.5274 51.5239 51.5225 51.5223 51.5228 51.5238 51.5252 51.5272 51.5294 51.5319 51.5347 51.5379 51.5412 51.5449 51.5489 51.5532 51.5582 51.5639 51.5702 51.5307 51.5207 51.5156 51.5134 51.5124 51.5123 51.5128 51.5138 51.5153 51.5172 51.5194 51.5219 51.5247 51.5278 51.5313 51.5353 51.5398 51.545 51.5511 51.5583 51.6048 51.6088 51.617 51.6265 51.6361 51.6458 51.6554 51.6651 51.6748 51.6847 51.6946 51.7044 51.7143 51.7242 51.7342 51.7441 51.7541 51.7641 51.7741 51.7841 51.7942 51.8043 51.8144 51.8245 51.8347 51.8449 51.8551 51.8653 51.8756 51.8858 51.8961 51.9064 51.9166 51.927 51.9373 51.9476 51.958 51.9684 51.9788 51.9891 51.9996 52.01 52.0204 52.0309 52.0413 52.0518 52.0623 52.0727 52.0832 52.0938 52.1043 52.1148 52.1253 52.1358 52.1463 52.1568 52.1673 52.1778 52.1884 52.1989 52.2094 52.22 52.2305 52.2411 52.2516 52.2621 52.2727 52.2832 52.2937 52.3042 52.3148 52.3253 52.3358 52.3464 52.3568 52.3673 52.3778 52.3883 52.3989 52.4096 52.4202 52.4308 52.4413 52.4517 52.4621 52.4728 52.484 52.4953 52.506 52.5146 52.5166 52.4966 52.4533 52.4108 52.3747 52.3488 52.335 52.333 52.3406 52.3532 52.3751 52.4297 52.5076 52.5736 52.6254 52.6634 52.69 52.7086 52.7225 52.7343 52.7436 52.7487 52.7545 52.7614 52.7693 52.7777 52.7866 52.7958 52.8051 52.8145 52.8239 52.8333 52.8428 52.8522 52.8616 52.871 52.8803 52.8896 52.8989 52.9082 52.9174 52.9266 52.9358 52.9449 52.954 52.9631 52.9721 52.9811 52.99 52.9989 53.0078 53.0166 53.0254 53.0342 53.0429 53.0516 53.0602 53.0688 53.0774 53.0859 53.0944 53.1028 53.1112 53.1196 53.1279 53.1362 53.1444 53.1526 53.1607 53.1688 53.1769 53.1849 53.1929 53.2008 53.2087 53.2166 53.2243 53.2321 53.2398 53.2475 53.2551 53.2627 53.2702 53.2777 53.2851 53.2925 53.2998 53.3072 53.3144 53.3216 53.3287 53.336 53.3428 53.3501 53.3567 53.364 53.3705 53.3778 53.384 53.3913 53.3974 53.4046 53.4107 53.4177 53.4237 53.4307 53.4365 53.4435 53.4487 53.456 51.6051 51.6096 51.6178 51.6273 51.637 51.6467 51.6564 51.666 51.6758 51.6856 51.6955 51.7054 51.7153 51.7252 51.7352 51.7451 51.7551 51.7651 51.7751 51.7852 51.7952 51.8053 51.8154 51.8256 51.8357 51.8459 51.8561 51.8664 51.8766 51.8869 51.8971 51.9074 51.9177 51.928 51.9383 51.9487 51.9591 51.9694 51.9798 51.9902 52.0006 52.011 52.0215 52.0319 52.0424 52.0529 52.0633 52.0738 52.0843 52.0948 52.1053 52.1158 52.1264 52.1369 52.1474 52.1579 52.1684 52.1789 52.1895 52.2 52.2105 52.2211 52.2316 52.2421 52.2527 52.2632 52.2738 52.2843 52.2948 52.3053 52.3159 52.3264 52.3369 52.3474 52.3579 52.3684 52.3789 52.3894 52.3999 52.4105 52.421 52.4315 52.4419 52.4522 52.4626 52.4733 52.4842 52.4954 52.5066 52.5179 52.5294 52.5411 52.5529 52.5645 52.5749 52.5819 52.5843 52.5857 52.5875 52.591 52.5969 52.6057 52.6169 52.6293 52.6447 52.6636 52.6801 52.6943 52.7071 52.7191 52.7306 52.7404 52.7493 52.7583 52.7675 52.7768 52.7862 52.7957 52.8052 52.8147 52.8241 52.8336 52.8431 52.8525 52.8619 52.8713 52.8806 52.89 52.8992 52.9085 52.9177 52.9269 52.9361 52.9452 52.9543 52.9634 52.9724 52.9814 52.9903 52.9992 53.0081 53.0169 53.0257 53.0345 53.0432 53.0519 53.0605 53.0691 53.0777 53.0862 53.0947 53.1031 53.1115 53.1199 53.1282 53.1365 53.1447 53.1529 53.161 53.1692 53.1772 53.1852 53.1932 53.2011 53.209 53.2169 53.2247 53.2324 53.2401 53.2478 53.2554 53.263 53.2705 53.278 53.2854 53.2928 53.3001 53.3074 53.3147 53.3219 53.329 53.3363 53.3431 53.3504 53.357 53.3643 53.3708 53.3781 53.3843 53.3916 53.3977 53.4049 53.411 53.418 53.424 53.431 53.4368 53.4437 53.4492 53.4561 51.6052 51.6098 51.6178 51.6272 51.6368 51.6465 51.6562 51.6658 51.6756 51.6855 51.6954 51.7052 51.7151 51.725 51.735 51.7449 51.7549 51.7649 51.7749 51.785 51.795 51.8051 51.8152 51.8254 51.8355 51.8457 51.8559 51.8662 51.8764 51.8867 51.8969 51.9072 51.9175 51.9278 51.9382 51.9485 51.9589 51.9692 51.9796 51.99 52.0004 52.0109 52.0213 52.0317 52.0422 52.0527 52.0631 52.0736 52.0841 52.0946 52.1051 52.1157 52.1262 52.1367 52.1472 52.1577 52.1682 52.1788 52.1893 52.1998 52.2103 52.2209 52.2314 52.242 52.2525 52.263 52.2736 52.2841 52.2946 52.3051 52.3157 52.3262 52.3367 52.3472 52.3577 52.3682 52.3787 52.3892 52.3997 52.4101 52.4207 52.4313 52.4418 52.4522 52.4624 52.4726 52.4829 52.4939 52.5057 52.5181 52.5313 52.5462 52.5604 52.5735 52.586 52.5982 52.6101 52.621 52.6287 52.6328 52.6367 52.6411 52.6467 52.6537 52.6621 52.6716 52.682 52.6929 52.704 52.7151 52.7259 52.7364 52.7466 52.7566 52.7665 52.7762 52.7859 52.7955 52.805 52.8146 52.8241 52.8336 52.8431 52.8525 52.8619 52.8713 52.8806 52.89 52.8992 52.9085 52.9177 52.9269 52.9361 52.9452 52.9543 52.9634 52.9724 52.9814 52.9903 52.9992 53.0081 53.0169 53.0257 53.0345 53.0432 53.0519 53.0605 53.0691 53.0777 53.0862 53.0947 53.1031 53.1115 53.1199 53.1282 53.1365 53.1447 53.1529 53.161 53.1692 53.1772 53.1852 53.1932 53.2011 53.209 53.2169 53.2247 53.2324 53.2401 53.2478 53.2554 53.263 53.2705 53.278 53.2854 53.2928 53.3001 53.3074 53.3147 53.3219 53.329 53.3363 53.3431 53.3504 53.357 53.3643 53.3708 53.3781 53.3843 53.3916 53.3977 53.4049 53.411 53.418 53.424 53.431 53.4368 53.4437 53.4494 53.4562 51.5999 51.6066 51.6155 51.6248 51.6345 51.6442 51.654 51.6637 51.6734 51.6832 51.693 51.7029 51.7127 51.7227 51.7326 51.7425 51.7525 51.7625 51.7725 51.7826 51.7926 51.8027 51.8128 51.823 51.8331 51.8433 51.8535 51.8637 51.874 51.8842 51.8945 51.9048 51.9151 51.9254 51.9357 51.9461 51.9564 51.9668 51.9772 51.9876 51.998 52.0084 52.0188 52.0293 52.0398 52.0502 52.0607 52.0712 52.0817 52.0922 52.1027 52.1132 52.1237 52.1342 52.1447 52.1553 52.1658 52.1763 52.1868 52.1974 52.2079 52.2184 52.229 52.2395 52.2501 52.2606 52.2711 52.2817 52.2922 52.3027 52.3133 52.3238 52.3343 52.3448 52.3553 52.3659 52.3764 52.387 52.3975 52.4081 52.4187 52.4293 52.4398 52.4501 52.4604 52.4707 52.4814 52.4929 52.5051 52.5178 52.5317 52.5458 52.5588 52.5713 52.5836 52.5956 52.6069 52.6164 52.6235 52.63 52.6365 52.6434 52.6509 52.659 52.6678 52.6771 52.6868 52.6967 52.7067 52.7168 52.7268 52.7368 52.7467 52.7565 52.7663 52.776 52.7856 52.7953 52.8049 52.8144 52.824 52.8335 52.843 52.8524 52.8618 52.8712 52.8806 52.8899 52.8992 52.9085 52.9177 52.9269 52.9361 52.9452 52.9543 52.9634 52.9724 52.9814 52.9903 52.9992 53.0081 53.0169 53.0257 53.0345 53.0432 53.0519 53.0605 53.0691 53.0777 53.0862 53.0947 53.1031 53.1115 53.1199 53.1282 53.1365 53.1447 53.1529 53.161 53.1692 53.1772 53.1852 53.1932 53.2011 53.209 53.2169 53.2247 53.2324 53.2401 53.2478 53.2554 53.263 53.2705 53.278 53.2854 53.2928 53.3001 53.3074 53.3147 53.3219 53.329 53.3362 53.3431 53.3503 53.3571 53.3642 53.3709 53.378 53.3844 53.3916 53.3977 53.4049 53.411 53.418 53.424 53.431 53.4368 53.4437 53.4497 53.4562 51.6037 51.6114 51.6201 51.629 51.6383 51.6476 51.6571 51.6667 51.6765 51.6862 51.696 51.7059 51.7157 51.7256 51.7356 51.7455 51.7555 51.7655 51.7755 51.7856 51.7957 51.8058 51.8159 51.826 51.8362 51.8463 51.8565 51.8668 51.877 51.8873 51.8975 51.9078 51.9181 51.9284 51.9388 51.9491 51.9595 51.9699 51.9802 51.9906 52.001 52.0115 52.0219 52.0324 52.0428 52.0533 52.0637 52.0742 52.0847 52.0952 52.1057 52.1162 52.1267 52.1373 52.1478 52.1583 52.1688 52.1794 52.1899 52.2004 52.211 52.2215 52.232 52.2425 52.2531 52.2636 52.2741 52.2847 52.2952 52.3057 52.3162 52.3267 52.3372 52.3477 52.3582 52.3687 52.3791 52.3896 52.4001 52.4105 52.4209 52.4313 52.4418 52.4523 52.4626 52.4729 52.4831 52.4933 52.5039 52.5151 52.5269 52.539 52.5511 52.5632 52.5751 52.5868 52.5979 52.6082 52.6178 52.6267 52.6353 52.6438 52.6524 52.6611 52.6701 52.6793 52.6887 52.6982 52.7079 52.7176 52.7273 52.737 52.7468 52.7565 52.7662 52.7759 52.7855 52.7952 52.8048 52.8144 52.8239 52.8334 52.8429 52.8524 52.8618 52.8712 52.8806 52.8899 52.8992 52.9085 52.9177 52.9269 52.9361 52.9452 52.9543 52.9634 52.9724 52.9814 52.9903 52.9992 53.0081 53.0169 53.0257 53.0345 53.0432 53.0519 53.0605 53.0691 53.0777 53.0862 53.0947 53.1031 53.1115 53.1199 53.1282 53.1365 53.1447 53.1529 53.161 53.1692 53.1772 53.1852 53.1932 53.2011 53.209 53.2169 53.2247 53.2324 53.2401 53.2478 53.2554 53.263 53.2705 53.278 53.2854 53.2928 53.3001 53.3074 53.3147 53.3219 53.3291 53.3361 53.3432 53.3502 53.3572 53.3641 53.371 53.3779 53.3846 53.3913 53.3981 53.4045 53.4114 53.4177 53.4242 53.4308 53.437 53.4435 53.4497 53.4561 51.5899 51.6009 51.6112 51.6211 51.6307 51.6402 51.6497 51.6592 51.6688 51.6785 51.6882 51.698 51.7079 51.7178 51.7277 51.7376 51.7476 51.7576 51.7676 51.7777 51.7877 51.7978 51.8079 51.8181 51.8282 51.8384 51.8486 51.8588 51.8691 51.8793 51.8896 51.8999 51.9102 51.9205 51.9308 51.9412 51.9515 51.9619 51.9723 51.9827 51.9931 52.0035 52.0139 52.0244 52.0349 52.0453 52.0558 52.0663 52.0768 52.0873 52.0978 52.1083 52.1189 52.1294 52.1399 52.1504 52.161 52.1715 52.1821 52.1926 52.2032 52.2137 52.2243 52.2349 52.2455 52.2561 52.2667 52.2774 52.288 52.2986 52.3092 52.3198 52.3305 52.3412 52.3519 52.3625 52.3732 52.3839 52.3945 52.4051 52.4155 52.4259 52.4363 52.447 52.4579 52.4693 52.4813 52.4934 52.5057 52.518 52.5299 52.5414 52.5527 52.5639 52.5749 52.5855 52.5955 52.605 52.6142 52.6232 52.6321 52.641 52.6501 52.6593 52.6687 52.6782 52.6878 52.6975 52.7073 52.717 52.7268 52.7366 52.7464 52.7562 52.7659 52.7756 52.7853 52.795 52.8046 52.8142 52.8238 52.8333 52.8429 52.8523 52.8618 52.8712 52.8806 52.8899 52.8992 52.9085 52.9177 52.9269 52.9361 52.9452 52.9543 52.9634 52.9724 52.9814 52.9903 52.9992 53.0081 53.0169 53.0257 53.0345 53.0432 53.0519 53.0605 53.0691 53.0777 53.0862 53.0947 53.1031 53.1115 53.1199 53.1282 53.1365 53.1447 53.1529 53.161 53.1692 53.1772 53.1852 53.1932 53.2011 53.209 53.2169 53.2247 53.2324 53.2401 53.2478 53.2554 53.263 53.2705 53.278 53.2854 53.2928 53.3002 53.3074 53.3147 53.3218 53.3291 53.3361 53.3433 53.3501 53.3573 53.3639 53.3712 53.3776 53.3848 53.3911 53.3983 53.4044 53.4115 53.4175 53.4245 53.4304 53.4373 53.4432 53.45 53.4557 51.6007 51.613 51.6229 51.6323 51.6418 51.6512 51.6608 51.6704 51.6801 51.6898 51.6996 51.7094 51.7193 51.7291 51.7391 51.749 51.759 51.769 51.7791 51.7891 51.7992 51.8093 51.8194 51.8296 51.8398 51.8499 51.8601 51.8704 51.8806 51.8908 51.9011 51.9114 51.9217 51.932 51.9423 51.9527 51.9631 51.9734 51.9838 51.9942 52.0046 52.0151 52.0255 52.0359 52.0464 52.0568 52.0673 52.0778 52.0883 52.0988 52.1093 52.1198 52.1303 52.1408 52.1513 52.1619 52.1724 52.1829 52.1935 52.204 52.2145 52.2251 52.2356 52.2461 52.2567 52.2672 52.2777 52.2883 52.2988 52.3094 52.3199 52.3304 52.3409 52.3514 52.3619 52.3724 52.3828 52.3933 52.4038 52.4143 52.4247 52.4351 52.4454 52.4558 52.4662 52.4766 52.487 52.4973 52.5076 52.5176 52.5274 52.5371 52.5471 52.5577 52.5689 52.5803 52.5919 52.6038 52.6156 52.6268 52.6367 52.6456 52.6542 52.6627 52.6713 52.6801 52.6892 52.6985 52.7079 52.7175 52.7271 52.7368 52.7465 52.7562 52.7659 52.7756 52.7853 52.795 52.8046 52.8142 52.8238 52.8333 52.8428 52.8523 52.8618 52.8712 52.8806 52.8899 52.8992 52.9085 52.9177 52.9269 52.9361 52.9452 52.9543 52.9634 52.9724 52.9814 52.9903 52.9992 53.0081 53.0169 53.0257 53.0345 53.0432 53.0519 53.0605 53.0691 53.0777 53.0862 53.0947 53.1031 53.1115 53.1199 53.1282 53.1365 53.1447 53.1529 53.161 53.1692 53.1772 53.1852 53.1932 53.2011 53.209 53.2169 53.2247 53.2324 53.2401 53.2478 53.2554 53.263 53.2705 53.278 53.2854 53.2928 53.3001 53.3074 53.3147 53.3218 53.3291 53.3361 53.3433 53.3501 53.3573 53.364 53.3712 53.3776 53.3848 53.3911 53.3983 53.4044 53.4115 53.4175 53.4245 53.4305 53.4373 53.4433 53.4497 53.4557 51.5884 51.6036 51.6143 51.6237 51.6328 51.6418 51.6509 51.6602 51.6696 51.6791 51.6887 51.6984 51.7082 51.7181 51.728 51.7379 51.7479 51.7579 51.7679 51.778 51.788 51.7981 51.8083 51.8184 51.8285 51.8387 51.8489 51.8591 51.8693 51.8796 51.8899 51.9002 51.9105 51.9208 51.9311 51.9415 51.9518 51.9622 51.9726 51.983 51.9934 52.0038 52.0143 52.0248 52.0352 52.0457 52.0562 52.0667 52.0772 52.0877 52.0983 52.1088 52.1194 52.1299 52.1404 52.151 52.1615 52.172 52.1825 52.193 52.2035 52.214 52.2246 52.2351 52.2457 52.2563 52.2668 52.2774 52.288 52.2986 52.3093 52.32 52.3307 52.3414 52.3521 52.3627 52.3733 52.3838 52.3942 52.4046 52.415 52.4254 52.4356 52.4459 52.4563 52.4669 52.4777 52.4891 52.5009 52.5129 52.525 52.5371 52.549 52.5606 52.572 52.5832 52.594 52.6044 52.6142 52.6236 52.6327 52.6416 52.6506 52.6597 52.669 52.6784 52.6879 52.6975 52.7072 52.7169 52.7266 52.7364 52.7462 52.756 52.7657 52.7755 52.7852 52.7949 52.8045 52.8142 52.8237 52.8333 52.8428 52.8523 52.8617 52.8712 52.8805 52.8899 52.8992 52.9085 52.9177 52.9269 52.9361 52.9452 52.9543 52.9634 52.9724 52.9814 52.9903 52.9992 53.0081 53.0169 53.0257 53.0345 53.0432 53.0519 53.0605 53.0691 53.0777 53.0862 53.0947 53.1031 53.1115 53.1199 53.1282 53.1365 53.1447 53.1529 53.161 53.1692 53.1772 53.1852 53.1932 53.2011 53.209 53.2169 53.2247 53.2324 53.2401 53.2478 53.2554 53.263 53.2705 53.278 53.2854 53.2928 53.3001 53.3074 53.3147 53.3218 53.3291 53.3361 53.3433 53.3501 53.3573 53.364 53.3712 53.3776 53.3848 53.3911 53.3983 53.4044 53.4115 53.4175 53.4245 53.4304 53.4373 53.4432 53.4499 53.4556 51.594 51.6089 51.6194 51.629 51.6383 51.6476 51.6569 51.6664 51.6759 51.6855 51.6951 51.7049 51.7147 51.7246 51.7345 51.7444 51.7544 51.7644 51.7745 51.7845 51.7946 51.8047 51.8148 51.8249 51.8351 51.8453 51.8555 51.8657 51.8759 51.8862 51.8964 51.9067 51.917 51.9273 51.9377 51.948 51.9584 51.9688 51.9792 51.9896 52 52.0104 52.0208 52.0312 52.0417 52.0521 52.0626 52.0731 52.0836 52.094 52.1045 52.115 52.1255 52.136 52.1465 52.157 52.1675 52.1781 52.1886 52.1991 52.2097 52.2202 52.2307 52.2412 52.2517 52.2622 52.2727 52.2832 52.2936 52.3041 52.3146 52.3252 52.3355 52.3458 52.3563 52.3669 52.3772 52.3873 52.3978 52.4088 52.4199 52.4306 52.4405 52.4499 52.459 52.4681 52.4775 52.4873 52.4978 52.5087 52.5201 52.5317 52.5433 52.5548 52.5661 52.5771 52.5877 52.5979 52.608 52.6178 52.6277 52.6374 52.6472 52.6571 52.6669 52.6768 52.6867 52.6966 52.7065 52.7164 52.7263 52.7362 52.746 52.7558 52.7656 52.7754 52.7851 52.7948 52.8045 52.8141 52.8237 52.8333 52.8428 52.8523 52.8617 52.8712 52.8805 52.8899 52.8992 52.9085 52.9177 52.9269 52.9361 52.9452 52.9543 52.9634 52.9724 52.9814 52.9903 52.9992 53.0081 53.0169 53.0257 53.0345 53.0432 53.0519 53.0605 53.0691 53.0777 53.0862 53.0947 53.1031 53.1115 53.1199 53.1282 53.1365 53.1447 53.1529 53.161 53.1692 53.1772 53.1852 53.1932 53.2011 53.209 53.2169 53.2247 53.2324 53.2401 53.2478 53.2554 53.263 53.2705 53.278 53.2854 53.2928 53.3001 53.3074 53.3147 53.3218 53.3291 53.3361 53.3433 53.3501 53.3573 53.364 53.3712 53.3776 53.3848 53.3911 53.3983 53.4044 53.4115 53.4175 53.4245 53.4304 53.4373 53.4432 53.4498 53.4555 51.588 51.6036 51.6137 51.6227 51.6314 51.6402 51.6492 51.6584 51.6678 51.6774 51.6871 51.6968 51.7067 51.7165 51.7264 51.7364 51.7464 51.7564 51.7664 51.7765 51.7865 51.7966 51.8067 51.8168 51.827 51.8372 51.8474 51.8577 51.8679 51.8781 51.8884 51.8987 51.909 51.9193 51.9296 51.94 51.9503 51.9607 51.9711 51.9815 51.9919 52.0024 52.0129 52.0234 52.0339 52.0444 52.0549 52.0654 52.0759 52.0865 52.097 52.1076 52.1181 52.1288 52.1394 52.1501 52.1607 52.1714 52.182 52.1925 52.203 52.2135 52.224 52.235 52.2467 52.2587 52.2709 52.2832 52.2952 52.3066 52.3179 52.3294 52.3408 52.351 52.3578 52.3584 52.3569 52.3551 52.3542 52.3548 52.3573 52.3616 52.3675 52.3748 52.3832 52.3926 52.4031 52.4147 52.4272 52.4407 52.4577 52.4771 52.4956 52.5132 52.5301 52.5462 52.5614 52.576 52.5901 52.6033 52.6159 52.6281 52.6401 52.6518 52.6629 52.6737 52.6844 52.6949 52.7052 52.7154 52.7255 52.7355 52.7455 52.7554 52.7652 52.775 52.7848 52.7945 52.8042 52.8138 52.8234 52.833 52.8425 52.852 52.8614 52.8708 52.8802 52.8896 52.8989 52.9082 52.9174 52.9266 52.9358 52.9449 52.954 52.9631 52.9721 52.9811 52.99 52.9989 53.0078 53.0166 53.0254 53.0342 53.0429 53.0516 53.0602 53.0688 53.0774 53.0859 53.0944 53.1028 53.1112 53.1196 53.1279 53.1362 53.1444 53.1526 53.1607 53.1688 53.1769 53.1849 53.1929 53.2008 53.2087 53.2166 53.2244 53.2321 53.2398 53.2475 53.2551 53.2627 53.2702 53.2777 53.2851 53.2925 53.2998 53.3071 53.3144 53.3215 53.3288 53.3358 53.343 53.3498 53.357 53.3637 53.3709 53.3773 53.3845 53.3908 53.398 53.4041 53.4112 53.4172 53.4242 53.4303 53.4366 53.4435 53.449 53.4554 53.4593 53.4603 53.4615 53.4628 53.4643 53.4659 53.4675 53.4691 53.4707 53.4722 53.4739 53.4754 53.477 53.4786 53.4801 53.4817 53.4832 53.4847 53.4862 53.4876 53.4596 53.4606 53.4618 53.4632 53.4646 53.4661 53.4676 53.4692 53.4708 53.4724 53.4741 53.4758 53.4774 53.4791 53.4807 53.4824 53.484 53.4855 53.487 53.4885 53.4596 53.4605 53.4616 53.4628 53.4642 53.4656 53.467 53.4685 53.4699 53.4714 53.473 53.4746 53.4761 53.4777 53.4793 53.4808 53.4823 53.4838 53.4852 53.4867 53.4602 53.4616 53.463 53.4644 53.4658 53.4673 53.4686 53.4701 53.4715 53.473 53.4745 53.476 53.4775 53.479 53.4805 53.482 53.4835 53.4849 53.4865 53.4879 53.4595 53.4609 53.4622 53.4636 53.4649 53.4664 53.4678 53.4692 53.4706 53.472 53.4734 53.4748 53.4761 53.4774 53.4786 53.4799 53.481 53.4821 53.4833 53.4846 53.4597 53.4614 53.4629 53.4644 53.4658 53.4673 53.4687 53.4702 53.4716 53.473 53.4745 53.4759 53.4774 53.4788 53.4803 53.4817 53.4831 53.4845 53.4859 53.4872 53.4595 53.461 53.4625 53.464 53.4654 53.4668 53.4682 53.4696 53.4709 53.4723 53.4736 53.475 53.4762 53.4774 53.4785 53.4797 53.4808 53.4821 53.4833 53.4847 53.4593 53.4611 53.4625 53.464 53.4654 53.4667 53.4681 53.4693 53.4705 53.4718 53.473 53.4745 53.4757 53.4772 53.4784 53.4799 53.4812 53.4826 53.4839 53.4854 53.4594 53.461 53.4626 53.464 53.4654 53.4667 53.4679 53.4691 53.4703 53.4716 53.4729 53.4743 53.4756 53.477 53.4783 53.4797 53.481 53.4824 53.4838 53.4853 53.4593 53.461 53.4627 53.4641 53.4654 53.4665 53.4675 53.4686 53.4698 53.4711 53.4724 53.4738 53.4751 53.4765 53.4778 53.4792 53.4805 53.4818 53.4832 53.4847 53.4921 53.4961 53.4998 53.5034 53.5072 53.5111 53.5153 53.5199 53.5246 53.5295 53.5346 53.5396 53.5447 53.5498 53.5549 53.5599 53.5649 53.5699 53.5748 53.5797 53.5845 53.5893 53.5941 53.5988 53.6035 53.6081 53.6126 53.6171 53.6216 53.626 53.6304 53.6348 53.6391 53.6434 53.6477 53.6519 53.656 53.6601 53.6642 53.6683 53.6723 53.6762 53.6801 53.684 53.6878 53.6916 53.6954 53.6991 53.7028 53.7065 53.71 53.7134 53.7167 53.72 53.7236 53.7276 53.7321 53.7371 53.7421 53.747 53.7517 53.756 53.76 53.7638 53.767 53.7682 53.7647 53.7546 53.7433 53.733 53.7242 53.7174 53.7127 53.7098 53.7085 53.7084 53.7098 53.7123 53.7157 53.7199 53.725 53.7329 53.7447 53.7557 53.7657 53.775 53.7833 53.7906 53.7971 53.8033 53.8086 53.8132 53.817 53.8207 53.824 53.8271 53.8296 53.8322 53.8338 53.8362 53.493 53.4982 53.5032 53.5081 53.513 53.518 53.5231 53.5282 53.5333 53.5383 53.5434 53.5484 53.5534 53.5584 53.5634 53.5684 53.5734 53.5783 53.5833 53.5881 53.593 53.5978 53.6025 53.6072 53.6119 53.6165 53.6211 53.6256 53.6301 53.6345 53.6388 53.6432 53.6475 53.6517 53.6559 53.6601 53.6642 53.6683 53.6723 53.6763 53.6802 53.684 53.6879 53.6916 53.6954 53.6991 53.7027 53.7063 53.7098 53.7134 53.7168 53.7202 53.7236 53.727 53.7303 53.7335 53.7367 53.7398 53.743 53.7461 53.7491 53.7519 53.7548 53.7578 53.7606 53.7632 53.766 53.7689 53.7714 53.7738 53.7763 53.7793 53.7826 53.7857 53.7881 53.7897 53.7909 53.792 53.7934 53.7955 53.7981 53.8013 53.8044 53.808 53.8113 53.8146 53.8174 53.8201 53.8218 53.8239 53.8248 53.8266 53.8273 53.8292 53.83 53.8319 53.8328 53.8348 53.8359 53.8378 53.4913 53.4963 53.5011 53.5057 53.5102 53.5147 53.5192 53.5237 53.5282 53.5328 53.5375 53.5422 53.5471 53.552 53.557 53.5619 53.5669 53.5718 53.5767 53.5815 53.5864 53.5912 53.5959 53.6006 53.6053 53.6099 53.6144 53.619 53.6234 53.6279 53.6323 53.6367 53.641 53.6452 53.6495 53.6536 53.6578 53.6619 53.6659 53.6699 53.6739 53.6778 53.6817 53.6855 53.6893 53.693 53.6967 53.7003 53.7039 53.7074 53.7108 53.7142 53.7176 53.7209 53.7242 53.7275 53.7307 53.734 53.7372 53.7403 53.7434 53.7465 53.7496 53.7527 53.7558 53.7588 53.7618 53.7648 53.7676 53.7704 53.7732 53.7759 53.7785 53.7809 53.7833 53.7857 53.7882 53.7908 53.7938 53.7973 53.801 53.8048 53.8087 53.8126 53.8162 53.8198 53.823 53.826 53.8282 53.8303 53.831 53.8324 53.8322 53.8333 53.833 53.8344 53.8345 53.8362 53.837 53.8386 53.4923 53.4984 53.5042 53.5097 53.5152 53.5207 53.5261 53.5316 53.537 53.5423 53.5476 53.5528 53.558 53.5632 53.5683 53.5733 53.5784 53.5834 53.5883 53.5932 53.598 53.6029 53.6076 53.6124 53.617 53.6217 53.6262 53.6308 53.6353 53.6397 53.6441 53.6484 53.6527 53.657 53.6612 53.6653 53.6694 53.6735 53.6775 53.6815 53.6854 53.6893 53.6932 53.697 53.7007 53.7044 53.7081 53.7117 53.7152 53.7188 53.7223 53.7257 53.7291 53.7325 53.7358 53.739 53.7423 53.7454 53.7486 53.7517 53.7547 53.7577 53.7607 53.7636 53.7665 53.7693 53.7722 53.7749 53.7776 53.7803 53.7829 53.7855 53.7881 53.7906 53.793 53.7954 53.7977 53.8 53.8023 53.8047 53.807 53.8089 53.8104 53.8117 53.8133 53.8156 53.8184 53.8218 53.8256 53.8296 53.8332 53.8361 53.8376 53.8378 53.8366 53.8371 53.8365 53.8375 53.8379 53.8389 53.4881 53.4933 53.4981 53.5028 53.5075 53.5124 53.5173 53.5221 53.527 53.532 53.537 53.542 53.547 53.5521 53.5571 53.5621 53.5671 53.572 53.5769 53.5818 53.5866 53.5914 53.5961 53.6008 53.6055 53.6101 53.6147 53.6192 53.6237 53.6281 53.6325 53.6369 53.6411 53.6454 53.6496 53.6537 53.6579 53.6619 53.666 53.6699 53.6739 53.6778 53.6816 53.6854 53.6892 53.6929 53.6966 53.7002 53.7038 53.7073 53.7108 53.7143 53.7177 53.721 53.7244 53.7277 53.731 53.7343 53.7375 53.7407 53.7438 53.7469 53.7499 53.753 53.756 53.759 53.762 53.765 53.7679 53.7708 53.7736 53.7762 53.7787 53.7812 53.7837 53.7865 53.7897 53.7935 53.7975 53.8017 53.8059 53.81 53.8137 53.817 53.8202 53.8232 53.8257 53.8277 53.8292 53.8301 53.8311 53.8311 53.8319 53.8321 53.8328 53.8337 53.8346 53.8358 53.837 53.8384 53.4905 53.4958 53.5012 53.5065 53.5118 53.5171 53.5226 53.5282 53.5336 53.539 53.5443 53.5495 53.5547 53.5599 53.565 53.57 53.575 53.58 53.5849 53.5898 53.5946 53.5994 53.6042 53.6089 53.6135 53.6182 53.6227 53.6272 53.6317 53.6361 53.6405 53.6449 53.6492 53.6534 53.6576 53.6618 53.6659 53.67 53.674 53.6779 53.6819 53.6858 53.6896 53.6934 53.6972 53.7009 53.7045 53.7081 53.7117 53.7152 53.7187 53.7222 53.7255 53.7289 53.7322 53.7354 53.7387 53.7418 53.745 53.748 53.7511 53.7541 53.757 53.76 53.7629 53.7657 53.7685 53.7712 53.7739 53.7766 53.7792 53.7818 53.7843 53.7868 53.7893 53.7918 53.7942 53.7963 53.7983 53.8003 53.8031 53.8064 53.8103 53.8146 53.819 53.8231 53.827 53.8306 53.8336 53.8354 53.8363 53.8357 53.836 53.8351 53.8357 53.8352 53.8364 53.8365 53.8379 53.8386 53.488 53.4932 53.4984 53.5037 53.5092 53.5147 53.52 53.5253 53.5306 53.5359 53.5412 53.5464 53.5516 53.5567 53.5617 53.5668 53.5718 53.5768 53.5817 53.5866 53.5914 53.5962 53.6009 53.6056 53.6103 53.6149 53.6195 53.624 53.6285 53.6329 53.6373 53.6416 53.6459 53.6502 53.6544 53.6585 53.6626 53.6667 53.6707 53.6747 53.6786 53.6825 53.6864 53.6902 53.6939 53.6976 53.7013 53.7049 53.7085 53.712 53.7155 53.7189 53.7223 53.7256 53.729 53.7322 53.7355 53.7386 53.7418 53.7448 53.7479 53.7509 53.7539 53.7568 53.7597 53.7626 53.7654 53.7682 53.771 53.7737 53.7764 53.7792 53.7819 53.7845 53.787 53.7892 53.7914 53.7937 53.797 53.8006 53.8047 53.8099 53.8174 53.8242 53.8297 53.8344 53.8387 53.8425 53.8456 53.8471 53.8453 53.8411 53.8384 53.8355 53.8345 53.8335 53.8339 53.8346 53.8357 53.837 53.4884 53.4936 53.499 53.5047 53.5104 53.5159 53.5213 53.5268 53.5324 53.5378 53.5432 53.5484 53.5536 53.5588 53.564 53.5691 53.5741 53.5791 53.5841 53.589 53.5938 53.5986 53.6033 53.608 53.6127 53.6173 53.6219 53.6264 53.6309 53.6353 53.6397 53.644 53.6483 53.6526 53.6567 53.6609 53.665 53.6691 53.6731 53.6771 53.681 53.6849 53.6888 53.6926 53.6963 53.7 53.7037 53.7073 53.7109 53.7144 53.7179 53.7213 53.7247 53.728 53.7313 53.7346 53.7378 53.741 53.7441 53.7472 53.7503 53.7533 53.7562 53.7592 53.7621 53.7649 53.7677 53.7705 53.7732 53.7759 53.7785 53.7811 53.7838 53.7865 53.789 53.7913 53.7933 53.7953 53.798 53.8014 53.8052 53.8096 53.8163 53.8256 53.8337 53.84 53.845 53.8494 53.8531 53.8558 53.8564 53.8508 53.8431 53.8363 53.8317 53.8287 53.8282 53.829 53.8312 53.8343 53.4883 53.4933 53.4988 53.5047 53.5104 53.5159 53.5214 53.5269 53.5325 53.538 53.5433 53.5486 53.5537 53.5589 53.5641 53.5692 53.5742 53.5792 53.5842 53.5891 53.5939 53.5987 53.6034 53.6081 53.6128 53.6174 53.622 53.6265 53.631 53.6354 53.6398 53.6442 53.6484 53.6527 53.6569 53.661 53.6651 53.6692 53.6732 53.6772 53.6811 53.685 53.6889 53.6927 53.6964 53.7001 53.7038 53.7074 53.711 53.7145 53.718 53.7214 53.7248 53.7282 53.7315 53.7347 53.7379 53.7411 53.7443 53.7473 53.7504 53.7534 53.7564 53.7593 53.7622 53.765 53.7678 53.7706 53.7733 53.776 53.7787 53.7814 53.784 53.7866 53.789 53.7913 53.7935 53.796 53.7989 53.8021 53.8056 53.8094 53.8136 53.8181 53.8225 53.8265 53.8296 53.8309 53.8267 53.8173 53.8085 53.8012 53.7969 53.7964 53.7984 53.8019 53.8104 53.8226 53.8305 53.8396 53.4875 53.4924 53.4979 53.5038 53.5095 53.5149 53.5205 53.5261 53.5316 53.537 53.5423 53.5476 53.5527 53.5579 53.5631 53.5682 53.5732 53.5782 53.5831 53.588 53.5929 53.5976 53.6024 53.6071 53.6117 53.6163 53.6209 53.6254 53.6299 53.6344 53.6387 53.6431 53.6473 53.6516 53.6558 53.6599 53.664 53.6681 53.6721 53.6761 53.6801 53.684 53.6878 53.6916 53.6953 53.699 53.7027 53.7063 53.7099 53.7134 53.7169 53.7203 53.7237 53.727 53.7303 53.7336 53.7368 53.74 53.7431 53.7462 53.7493 53.7523 53.7553 53.7582 53.7611 53.764 53.7667 53.7695 53.7722 53.7749 53.7777 53.7805 53.7832 53.7858 53.7882 53.7906 53.7932 53.7963 53.7996 53.8026 53.8047 53.8038 53.7917 53.7466 53.6807 53.6196 53.5682 53.53 53.5064 53.4965 53.4962 53.501 53.5234 53.5956 53.6814 53.7496 53.7986 53.8308 53.848 53.8581 53.8376 53.838 53.8385 53.839 53.8395 53.84 53.8405 53.841 53.8415 53.842 53.8425 53.8431 53.8436 53.8441 53.8446 53.845 53.8455 53.8459 53.8462 53.8464 53.8389 53.8392 53.8396 53.8399 53.8403 53.8407 53.8412 53.8416 53.8421 53.8426 53.843 53.8435 53.844 53.8445 53.845 53.8455 53.8459 53.8464 53.8467 53.847 53.8394 53.8397 53.84 53.8403 53.8406 53.841 53.8413 53.8416 53.8419 53.8423 53.8426 53.843 53.8434 53.8439 53.8443 53.8448 53.8452 53.8455 53.8459 53.8461 53.8397 53.84 53.8403 53.8406 53.8409 53.8412 53.8415 53.8418 53.8421 53.8425 53.8428 53.8432 53.8436 53.8439 53.8443 53.8447 53.8451 53.8454 53.8457 53.846 53.8391 53.8395 53.8398 53.8401 53.8403 53.8407 53.8409 53.8412 53.8415 53.8418 53.842 53.8423 53.8425 53.8427 53.8428 53.843 53.843 53.843 53.8431 53.8432 53.8392 53.8396 53.8398 53.8401 53.8404 53.8407 53.841 53.8413 53.8417 53.842 53.8423 53.8426 53.843 53.8433 53.8436 53.8439 53.8442 53.8444 53.8447 53.8449 53.838 53.8384 53.8388 53.8392 53.8396 53.84 53.8403 53.8407 53.841 53.8414 53.8416 53.8419 53.842 53.8423 53.8424 53.8425 53.8425 53.8426 53.8427 53.8428 53.8363 53.8372 53.8381 53.8389 53.8397 53.8403 53.8408 53.8413 53.8415 53.8417 53.8417 53.842 53.8419 53.8423 53.8423 53.8426 53.8427 53.8429 53.8431 53.8431 53.8448 53.8459 53.8467 53.8475 53.8481 53.8482 53.8478 53.8471 53.8462 53.8454 53.8446 53.844 53.8436 53.8434 53.8432 53.8433 53.8432 53.8433 53.8433 53.8433 53.8624 53.8635 53.8633 53.8618 53.8596 53.8571 53.8546 53.8521 53.8497 53.8478 53.8462 53.8451 53.8443 53.8438 53.8433 53.8432 53.8429 53.8429 53.8427 53.8429 53.8461 53.8449 53.8437 53.8429 53.8424 53.8424 53.8427 53.8432 53.8438 53.8446 53.8455 53.8464 53.8473 53.8481 53.849 53.8498 53.8505 53.8513 53.852 53.8527 53.8534 53.8541 53.8548 53.8555 53.8561 53.8567 53.8574 53.858 53.8586 53.8592 53.8597 53.8603 53.8609 53.8614 53.862 53.8625 53.863 53.8635 53.864 53.8645 53.865 53.8656 53.866 53.8663 53.8665 53.8669 53.8676 53.8688 53.8704 53.8725 53.8747 53.8767 53.8786 53.8803 53.8814 53.882 53.8817 53.8784 53.8699 53.8559 53.8402 53.8285 53.8179 53.8097 53.8037 53.7993 53.7965 53.7956 53.7958 53.7967 53.7988 53.8019 53.8071 53.816 53.8268 53.835 53.8428 53.8496 53.8554 53.8603 53.8648 53.8686 53.8715 53.8738 53.8757 53.8775 53.879 53.8802 53.881 53.8815 53.8819 53.8823 53.8825 53.8827 53.8829 53.883 53.8831 53.8831 53.8832 53.8832 53.8832 53.8832 53.8831 53.8831 53.883 53.883 53.8829 53.8829 53.8828 53.8827 53.8826 53.8825 53.8824 53.8823 53.8822 53.8821 53.882 53.8819 53.8818 53.8817 53.8816 53.8815 53.8814 53.8813 53.8812 53.881 53.8809 53.8808 53.8807 53.8806 53.8805 53.8804 53.8803 53.8802 53.88 53.8799 53.8798 53.8797 53.8796 53.8795 53.8794 53.8793 53.8792 53.8791 53.8791 53.879 53.8789 53.8788 53.8787 53.8786 53.8786 53.8785 53.8784 53.8783 53.8783 53.8782 53.8781 53.8781 53.878 53.878 53.8779 53.8779 53.8778 53.8778 53.8777 53.8777 53.8777 53.8776 53.8776 53.8776 53.8775 53.8775 53.8775 53.8775 53.8775 53.8774 53.8775 53.8774 53.8775 53.8774 53.8775 53.8773 53.8776 53.8773 53.8776 53.8774 53.8777 53.8774 53.8778 53.8774 53.8778 53.8775 53.8779 53.8776 53.878 53.8779 53.8777 53.8782 53.8779 53.878 53.8475 53.848 53.8484 53.849 53.8496 53.8504 53.8512 53.852 53.8528 53.8536 53.8544 53.8551 53.8559 53.8567 53.8574 53.8582 53.8589 53.8597 53.8604 53.8611 53.8619 53.8626 53.8632 53.8639 53.8645 53.8651 53.8657 53.8663 53.8668 53.8673 53.8679 53.8683 53.8688 53.8693 53.8697 53.8702 53.8706 53.871 53.8714 53.8718 53.8721 53.8725 53.8728 53.8732 53.8734 53.8738 53.8741 53.8744 53.8746 53.8749 53.8752 53.8755 53.8758 53.8759 53.876 53.8763 53.8766 53.8766 53.8768 53.8772 53.8773 53.8771 53.8773 53.8782 53.8794 53.8799 53.8794 53.8781 53.8767 53.8757 53.8757 53.8762 53.8773 53.8788 53.8803 53.8819 53.8834 53.8845 53.8851 53.8853 53.8852 53.8848 53.8844 53.884 53.8837 53.8835 53.8833 53.8832 53.8831 53.8831 53.8831 53.8832 53.8832 53.8833 53.8833 53.8834 53.8834 53.8834 53.8834 53.8834 53.8834 53.8834 53.8834 53.8833 53.8833 53.8832 53.8832 53.8831 53.883 53.8829 53.8829 53.8828 53.8827 53.8826 53.8825 53.8824 53.8823 53.8822 53.8821 53.882 53.8818 53.8817 53.8816 53.8815 53.8814 53.8813 53.8812 53.8811 53.8809 53.8808 53.8807 53.8806 53.8805 53.8804 53.8803 53.8802 53.8801 53.88 53.8799 53.8798 53.8797 53.8796 53.8795 53.8794 53.8793 53.8792 53.8791 53.879 53.879 53.8789 53.8788 53.8787 53.8786 53.8786 53.8785 53.8784 53.8784 53.8783 53.8783 53.8782 53.8782 53.8781 53.8781 53.878 53.878 53.8779 53.8779 53.8779 53.8778 53.8778 53.8778 53.8777 53.8777 53.8777 53.8777 53.8777 53.8777 53.8776 53.8777 53.8776 53.8778 53.8776 53.8778 53.8776 53.8779 53.8776 53.8779 53.8776 53.878 53.8777 53.8781 53.8777 53.8781 53.8778 53.8782 53.878 53.8784 53.8781 53.8784 53.8782 53.8467 53.847 53.8471 53.8472 53.8473 53.8473 53.8474 53.8475 53.8476 53.8479 53.8484 53.8489 53.8495 53.8502 53.8509 53.8516 53.8524 53.8532 53.8539 53.8546 53.8553 53.856 53.8567 53.8573 53.8579 53.8585 53.8591 53.8598 53.8604 53.8609 53.8615 53.862 53.8626 53.8631 53.8636 53.8641 53.8645 53.8649 53.8653 53.8657 53.8661 53.8665 53.8668 53.8671 53.8674 53.8677 53.868 53.8683 53.8687 53.869 53.8694 53.8697 53.8701 53.8705 53.8709 53.8713 53.8718 53.8723 53.8727 53.8731 53.8735 53.8739 53.8742 53.8746 53.8748 53.8749 53.8751 53.8754 53.876 53.8769 53.8785 53.8801 53.8819 53.8837 53.8856 53.8874 53.8891 53.8906 53.8916 53.8921 53.8919 53.8913 53.8903 53.8889 53.8876 53.8864 53.8855 53.8848 53.8843 53.884 53.8837 53.8836 53.8835 53.8835 53.8835 53.8835 53.8835 53.8835 53.8835 53.8835 53.8835 53.8834 53.8834 53.8833 53.8833 53.8832 53.8832 53.8831 53.883 53.8829 53.8829 53.8828 53.8827 53.8826 53.8825 53.8824 53.8823 53.8822 53.8821 53.882 53.8818 53.8817 53.8816 53.8815 53.8814 53.8813 53.8812 53.8811 53.8809 53.8808 53.8807 53.8806 53.8805 53.8804 53.8803 53.8802 53.8801 53.88 53.8799 53.8798 53.8797 53.8796 53.8795 53.8794 53.8793 53.8792 53.8791 53.879 53.879 53.8789 53.8788 53.8787 53.8786 53.8786 53.8785 53.8784 53.8784 53.8783 53.8783 53.8782 53.8782 53.8781 53.8781 53.878 53.878 53.8779 53.8779 53.8779 53.8778 53.8778 53.8778 53.8777 53.8777 53.8777 53.8777 53.8777 53.8777 53.8776 53.8777 53.8776 53.8778 53.8776 53.8778 53.8776 53.8779 53.8776 53.8779 53.8776 53.878 53.8777 53.8781 53.8777 53.8781 53.8778 53.8782 53.878 53.8784 53.8781 53.8784 53.8783 53.847 53.8485 53.8499 53.851 53.8521 53.8532 53.8543 53.8553 53.8564 53.8575 53.8585 53.8595 53.8604 53.8613 53.8622 53.863 53.8638 53.8646 53.8654 53.8662 53.8669 53.8676 53.8683 53.869 53.8697 53.8703 53.8709 53.8715 53.8721 53.8726 53.8731 53.8736 53.8741 53.8746 53.8751 53.8755 53.8759 53.8764 53.8768 53.8772 53.8776 53.8779 53.8783 53.8786 53.879 53.8793 53.8796 53.88 53.8803 53.8806 53.8809 53.8812 53.8814 53.8817 53.882 53.8823 53.8825 53.8827 53.883 53.8833 53.8835 53.8837 53.8839 53.8841 53.8844 53.8846 53.8847 53.8848 53.8849 53.8851 53.8853 53.8856 53.8858 53.8854 53.8846 53.8839 53.8843 53.8852 53.8869 53.8892 53.8916 53.8937 53.8949 53.8944 53.892 53.8897 53.8879 53.8865 53.8855 53.8848 53.8844 53.8841 53.8839 53.8837 53.8837 53.8836 53.8836 53.8836 53.8836 53.8835 53.8835 53.8835 53.8834 53.8834 53.8833 53.8833 53.8832 53.8831 53.883 53.8829 53.8829 53.8828 53.8827 53.8826 53.8825 53.8824 53.8823 53.8822 53.8821 53.882 53.8818 53.8817 53.8816 53.8815 53.8814 53.8813 53.8812 53.8811 53.8809 53.8808 53.8807 53.8806 53.8805 53.8804 53.8803 53.8802 53.8801 53.88 53.8799 53.8798 53.8797 53.8796 53.8795 53.8794 53.8793 53.8792 53.8791 53.879 53.879 53.8789 53.8788 53.8787 53.8786 53.8786 53.8785 53.8784 53.8784 53.8783 53.8783 53.8782 53.8782 53.8781 53.8781 53.878 53.878 53.8779 53.8779 53.8779 53.8778 53.8778 53.8778 53.8777 53.8777 53.8777 53.8777 53.8777 53.8777 53.8776 53.8777 53.8776 53.8778 53.8776 53.8778 53.8776 53.8779 53.8776 53.8779 53.8776 53.878 53.8777 53.8781 53.8778 53.8781 53.8778 53.8782 53.878 53.8783 53.8782 53.8783 53.8783 53.8437 53.844 53.8443 53.8445 53.8449 53.8453 53.8458 53.8463 53.8468 53.8475 53.8482 53.8489 53.8497 53.8505 53.8512 53.852 53.8528 53.8535 53.8543 53.855 53.8557 53.8563 53.857 53.8576 53.8582 53.8588 53.8594 53.86 53.8605 53.8611 53.8616 53.8621 53.8626 53.8631 53.8636 53.864 53.8644 53.8649 53.8653 53.8657 53.8661 53.8665 53.8668 53.8672 53.8676 53.8679 53.8683 53.8686 53.869 53.8694 53.8698 53.8701 53.8705 53.8709 53.8713 53.8717 53.8721 53.8725 53.873 53.8734 53.8739 53.8743 53.8746 53.8747 53.8749 53.8752 53.8756 53.8765 53.8782 53.88 53.8822 53.8845 53.8865 53.8884 53.8898 53.8912 53.8924 53.8931 53.8931 53.8927 53.892 53.8908 53.8894 53.888 53.8868 53.8858 53.8851 53.8846 53.8843 53.884 53.8839 53.8838 53.8837 53.8837 53.8837 53.8836 53.8836 53.8836 53.8836 53.8836 53.8835 53.8835 53.8834 53.8834 53.8833 53.8833 53.8832 53.8831 53.883 53.883 53.8829 53.8828 53.8827 53.8826 53.8825 53.8824 53.8823 53.8822 53.8821 53.882 53.8818 53.8817 53.8816 53.8815 53.8814 53.8813 53.8812 53.8811 53.8809 53.8808 53.8807 53.8806 53.8805 53.8804 53.8803 53.8802 53.8801 53.88 53.8799 53.8798 53.8797 53.8796 53.8795 53.8794 53.8793 53.8792 53.8791 53.879 53.879 53.8789 53.8788 53.8787 53.8786 53.8786 53.8785 53.8784 53.8784 53.8783 53.8783 53.8782 53.8782 53.8781 53.8781 53.878 53.878 53.8779 53.8779 53.8779 53.8778 53.8778 53.8778 53.8777 53.8777 53.8777 53.8777 53.8777 53.8777 53.8776 53.8777 53.8776 53.8778 53.8776 53.8778 53.8776 53.8779 53.8776 53.8779 53.8776 53.878 53.8777 53.8781 53.8778 53.8781 53.8778 53.8782 53.878 53.8784 53.8781 53.8785 53.8782 53.8456 53.8465 53.8476 53.8485 53.8493 53.8502 53.8513 53.8524 53.8536 53.8546 53.8556 53.8565 53.8574 53.8582 53.8591 53.8599 53.8607 53.8614 53.8622 53.8629 53.8636 53.8643 53.865 53.8656 53.8662 53.8668 53.8674 53.868 53.8685 53.8691 53.8696 53.8701 53.8706 53.8711 53.8715 53.872 53.8724 53.8728 53.8732 53.8736 53.874 53.8744 53.8747 53.8751 53.8754 53.8757 53.8761 53.8764 53.8767 53.877 53.8772 53.8775 53.8778 53.878 53.8783 53.8786 53.8788 53.8791 53.8793 53.8795 53.8797 53.88 53.8802 53.8804 53.8805 53.8808 53.881 53.8812 53.8813 53.8811 53.8808 53.8815 53.8828 53.8847 53.8872 53.8898 53.8922 53.8943 53.896 53.8972 53.8974 53.896 53.894 53.8919 53.89 53.8883 53.8869 53.8859 53.8852 53.8848 53.8845 53.8843 53.8842 53.8841 53.884 53.884 53.8839 53.8838 53.8838 53.8837 53.8836 53.8836 53.8835 53.8834 53.8834 53.8833 53.8832 53.8831 53.883 53.883 53.8829 53.8828 53.8827 53.8826 53.8825 53.8824 53.8823 53.8822 53.8821 53.882 53.8818 53.8817 53.8816 53.8815 53.8814 53.8813 53.8812 53.8811 53.8809 53.8808 53.8807 53.8806 53.8805 53.8804 53.8803 53.8802 53.8801 53.88 53.8799 53.8798 53.8797 53.8796 53.8795 53.8794 53.8793 53.8792 53.8791 53.879 53.879 53.8789 53.8788 53.8787 53.8786 53.8786 53.8785 53.8784 53.8784 53.8783 53.8783 53.8782 53.8782 53.8781 53.8781 53.878 53.878 53.8779 53.8779 53.8779 53.8778 53.8778 53.8778 53.8777 53.8777 53.8777 53.8777 53.8777 53.8777 53.8777 53.8777 53.8777 53.8777 53.8777 53.8777 53.8777 53.8777 53.8778 53.8777 53.8778 53.8778 53.8778 53.878 53.8778 53.8781 53.878 53.878 53.8782 53.8781 53.8782 53.8783 53.8784 53.8435 53.8444 53.8449 53.8457 53.8468 53.8479 53.8488 53.8497 53.8505 53.8515 53.8525 53.8534 53.8542 53.8551 53.8559 53.8567 53.8575 53.8583 53.859 53.8597 53.8604 53.8611 53.8617 53.8623 53.863 53.8636 53.8641 53.8647 53.8653 53.8658 53.8663 53.8669 53.8673 53.8678 53.8683 53.8687 53.8692 53.8696 53.87 53.8704 53.8708 53.8711 53.8715 53.8718 53.8722 53.8725 53.8728 53.8731 53.8734 53.8737 53.874 53.8743 53.8746 53.8749 53.8752 53.8755 53.8757 53.8759 53.8762 53.8765 53.8768 53.8771 53.8775 53.8779 53.8782 53.8784 53.8785 53.8784 53.8785 53.8797 53.8812 53.8832 53.8863 53.8919 53.8968 53.9005 53.9034 53.9059 53.9079 53.9091 53.9085 53.904 53.8982 53.8933 53.8894 53.8865 53.8845 53.8834 53.883 53.883 53.8832 53.8835 53.8837 53.8839 53.884 53.884 53.884 53.8839 53.8839 53.8838 53.8837 53.8836 53.8836 53.8835 53.8834 53.8833 53.8832 53.8831 53.8831 53.883 53.8829 53.8828 53.8827 53.8826 53.8825 53.8824 53.8823 53.8822 53.8821 53.882 53.8818 53.8817 53.8816 53.8815 53.8814 53.8813 53.8812 53.8811 53.8809 53.8808 53.8807 53.8806 53.8805 53.8804 53.8803 53.8802 53.8801 53.88 53.8799 53.8798 53.8797 53.8796 53.8795 53.8794 53.8793 53.8792 53.8791 53.879 53.879 53.8789 53.8788 53.8787 53.8786 53.8786 53.8785 53.8784 53.8784 53.8783 53.8783 53.8782 53.8782 53.8781 53.8781 53.878 53.878 53.8779 53.8779 53.8779 53.8778 53.8778 53.8778 53.8777 53.8777 53.8777 53.8777 53.8777 53.8777 53.8777 53.8776 53.8777 53.8776 53.8778 53.8776 53.8778 53.8776 53.8778 53.8776 53.878 53.8776 53.878 53.8777 53.8781 53.8778 53.8782 53.8779 53.8783 53.878 53.8784 53.8783 53.8784 53.8438 53.8446 53.8454 53.8467 53.8479 53.849 53.85 53.8511 53.8523 53.8534 53.8544 53.8554 53.8563 53.8572 53.8581 53.859 53.8598 53.8606 53.8614 53.8621 53.8628 53.8634 53.8641 53.8647 53.8653 53.8659 53.8665 53.8671 53.8677 53.8682 53.8687 53.8692 53.8697 53.8702 53.8707 53.8711 53.8715 53.872 53.8724 53.8728 53.8731 53.8735 53.8739 53.8742 53.8745 53.8749 53.8752 53.8755 53.8758 53.8761 53.8764 53.8767 53.877 53.8772 53.8775 53.8778 53.878 53.8783 53.8785 53.8788 53.879 53.8792 53.8794 53.8797 53.8801 53.8804 53.8806 53.8804 53.8801 53.8806 53.8819 53.8837 53.8861 53.8908 53.8983 53.9045 53.9089 53.9122 53.9147 53.9165 53.9172 53.9151 53.9066 53.8965 53.8883 53.8822 53.8785 53.8769 53.8773 53.8784 53.8801 53.8817 53.8829 53.8837 53.8841 53.8842 53.8842 53.8842 53.8841 53.884 53.8839 53.8837 53.8836 53.8835 53.8834 53.8834 53.8833 53.8832 53.8831 53.883 53.8829 53.8828 53.8827 53.8826 53.8825 53.8824 53.8823 53.8822 53.8821 53.882 53.8818 53.8817 53.8816 53.8815 53.8814 53.8813 53.8812 53.8811 53.8809 53.8808 53.8807 53.8806 53.8805 53.8804 53.8803 53.8802 53.8801 53.88 53.8799 53.8798 53.8797 53.8796 53.8795 53.8794 53.8793 53.8792 53.8791 53.879 53.879 53.8789 53.8788 53.8787 53.8786 53.8786 53.8785 53.8784 53.8784 53.8783 53.8783 53.8782 53.8782 53.8781 53.8781 53.878 53.878 53.8779 53.8779 53.8779 53.8778 53.8778 53.8778 53.8778 53.8777 53.8777 53.8777 53.8777 53.8777 53.8777 53.8776 53.8777 53.8776 53.8778 53.8775 53.8779 53.8776 53.8779 53.8776 53.878 53.8776 53.878 53.8777 53.8781 53.8778 53.8782 53.8779 53.8783 53.878 53.8784 53.8781 53.8784 53.8438 53.8445 53.8453 53.8466 53.8479 53.849 53.8501 53.8512 53.8523 53.8535 53.8546 53.8555 53.8564 53.8573 53.8582 53.8591 53.8599 53.8607 53.8615 53.8622 53.8629 53.8636 53.8642 53.8648 53.8654 53.866 53.8666 53.8672 53.8678 53.8683 53.8688 53.8693 53.8698 53.8703 53.8708 53.8712 53.8716 53.8721 53.8725 53.8729 53.8732 53.8736 53.874 53.8743 53.8747 53.875 53.8753 53.8756 53.8759 53.8762 53.8765 53.8768 53.8771 53.8773 53.8776 53.8779 53.8781 53.8784 53.8786 53.8789 53.8791 53.8794 53.8797 53.88 53.8803 53.8805 53.8805 53.8805 53.8809 53.8816 53.8826 53.884 53.8856 53.8878 53.8906 53.8933 53.8956 53.8967 53.8958 53.8892 53.8779 53.8674 53.8586 53.8533 53.8519 53.8522 53.8556 53.8657 53.8752 53.8817 53.8858 53.8883 53.8891 53.8885 53.8869 53.8858 53.8851 53.8846 53.8843 53.8841 53.8839 53.8838 53.8837 53.8836 53.8835 53.8834 53.8833 53.8832 53.8831 53.883 53.8829 53.8828 53.8827 53.8826 53.8825 53.8824 53.8823 53.8822 53.8821 53.882 53.8818 53.8817 53.8816 53.8815 53.8814 53.8813 53.8812 53.8811 53.8809 53.8808 53.8807 53.8806 53.8805 53.8804 53.8803 53.8802 53.8801 53.88 53.8799 53.8798 53.8797 53.8796 53.8795 53.8794 53.8793 53.8792 53.8791 53.879 53.879 53.8789 53.8788 53.8787 53.8786 53.8786 53.8785 53.8784 53.8784 53.8783 53.8783 53.8782 53.8782 53.8781 53.8781 53.878 53.878 53.8779 53.8779 53.8779 53.8778 53.8778 53.8778 53.8778 53.8777 53.8777 53.8777 53.8777 53.8777 53.8777 53.8776 53.8777 53.8776 53.8778 53.8775 53.8779 53.8776 53.8779 53.8776 53.878 53.8776 53.878 53.8777 53.8781 53.8778 53.8782 53.8779 53.8783 53.878 53.8784 53.8781 53.8782 53.8433 53.8436 53.8445 53.8458 53.847 53.848 53.8491 53.8503 53.8515 53.8526 53.8536 53.8545 53.8554 53.8563 53.8572 53.8581 53.8589 53.8597 53.8604 53.8611 53.8618 53.8625 53.8631 53.8638 53.8644 53.865 53.8656 53.8662 53.8667 53.8672 53.8678 53.8683 53.8688 53.8692 53.8697 53.8701 53.8706 53.871 53.8714 53.8718 53.8722 53.8725 53.8729 53.8732 53.8736 53.8739 53.8742 53.8745 53.8748 53.8751 53.8754 53.8757 53.876 53.8763 53.8765 53.8768 53.8771 53.8773 53.8775 53.8778 53.878 53.8784 53.8788 53.8792 53.8795 53.8796 53.8797 53.8802 53.8811 53.8823 53.8832 53.8832 53.8802 53.8657 53.8171 53.7466 53.6823 53.6294 53.591 53.5677 53.558 53.5567 53.5618 53.5939 53.6792 53.7613 53.8238 53.8658 53.8903 53.9024 53.9072 53.9077 53.904 53.8965 53.8914 53.8882 53.8863 53.8851 53.8845 53.884 53.8838 53.8836 53.8834 53.8833 53.8832 53.8831 53.883 53.8829 53.8828 53.8827 53.8826 53.8825 53.8824 53.8823 53.8822 53.8821 53.882 53.8819 53.8818 53.8817 53.8816 53.8815 53.8814 53.8813 53.8812 53.881 53.8809 53.8808 53.8807 53.8806 53.8805 53.8804 53.8803 53.8802 53.88 53.8799 53.8798 53.8797 53.8796 53.8795 53.8794 53.8793 53.8792 53.8791 53.8791 53.879 53.8789 53.8788 53.8787 53.8786 53.8786 53.8785 53.8784 53.8783 53.8783 53.8782 53.8781 53.8781 53.878 53.878 53.8779 53.8779 53.8778 53.8778 53.8777 53.8777 53.8777 53.8776 53.8776 53.8776 53.8775 53.8775 53.8775 53.8775 53.8775 53.8775 53.8774 53.8775 53.8774 53.8775 53.8773 53.8776 53.8773 53.8776 53.8773 53.8777 53.8773 53.8777 53.8774 53.8778 53.8775 53.8779 53.8776 53.878 53.8777 53.8781 53.8778 53.8782 53.8777 53.878 53.878 53.8779 53.8779 53.878 53.8779 53.8775 53.8771 53.8767 53.8764 53.8763 53.8762 53.8762 53.8761 53.8761 53.876 53.8759 53.8758 53.8756 53.8755 53.8755 53.8781 53.878 53.8779 53.8779 53.8778 53.8777 53.8776 53.8773 53.8771 53.8769 53.8767 53.8767 53.8766 53.8765 53.8765 53.8764 53.8763 53.8762 53.8761 53.876 53.878 53.878 53.8779 53.8778 53.8778 53.8777 53.8776 53.8775 53.8772 53.8772 53.8769 53.8769 53.8768 53.8767 53.8766 53.8766 53.8765 53.8764 53.8762 53.8762 53.8783 53.8783 53.8782 53.8782 53.8781 53.8781 53.878 53.878 53.8779 53.8778 53.8776 53.8776 53.8774 53.8773 53.8771 53.8769 53.8766 53.8765 53.8763 53.8761 53.8782 53.8782 53.8782 53.8783 53.8783 53.8783 53.8783 53.8783 53.8783 53.8784 53.8784 53.8784 53.8784 53.8783 53.8783 53.8782 53.8781 53.878 53.8779 53.878 53.8785 53.8785 53.8785 53.8785 53.8785 53.8785 53.8784 53.8784 53.8784 53.8784 53.8783 53.8782 53.8781 53.8779 53.8777 53.8774 53.8771 53.8767 53.8766 53.8765 53.8785 53.8786 53.8787 53.8787 53.8787 53.8788 53.8788 53.8788 53.8788 53.8789 53.8789 53.879 53.8791 53.8793 53.8794 53.8795 53.8796 53.8796 53.8796 53.8795 53.8785 53.8786 53.8786 53.8786 53.8787 53.8787 53.8787 53.8788 53.8789 53.8789 53.879 53.8792 53.8796 53.8801 53.8806 53.8804 53.8801 53.8799 53.8799 53.8798 53.8784 53.8784 53.8785 53.8785 53.8786 53.8787 53.8788 53.8789 53.8791 53.8792 53.8795 53.8798 53.8803 53.8808 53.8809 53.8803 53.8797 53.8795 53.8798 53.8801 53.8782 53.8783 53.8783 53.8784 53.8784 53.8785 53.8787 53.8788 53.879 53.8793 53.8796 53.8799 53.8804 53.8809 53.8805 53.8788 53.8776 53.8769 53.8765 53.8762 53.8752 53.8745 53.8746 53.8752 53.8756 53.8759 53.8761 53.8764 53.8767 53.877 53.8773 53.8775 53.8777 53.8779 53.8781 53.8784 53.8786 53.8788 53.879 53.8792 53.8795 53.8797 53.88 53.8802 53.8804 53.8807 53.881 53.8812 53.8815 53.8818 53.8821 53.8824 53.8826 53.8829 53.8831 53.8835 53.8839 53.8843 53.8845 53.8846 53.885 53.8861 53.8876 53.8886 53.8884 53.8842 53.8639 53.8017 53.7286 53.671 53.6318 53.611 53.6045 53.6053 53.623 53.6931 53.7778 53.8392 53.8769 53.8964 53.9046 53.9064 53.9037 53.8972 53.8931 53.8907 53.8893 53.8885 53.888 53.8877 53.8874 53.8872 53.8869 53.8867 53.8865 53.8863 53.886 53.8858 53.8856 53.8854 53.8852 53.8849 53.8847 53.8845 53.8843 53.8841 53.8839 53.8837 53.8835 53.8833 53.8831 53.8829 53.8828 53.8826 53.8824 53.8823 53.8822 53.882 53.8819 53.8818 53.8817 53.8816 53.8815 53.8815 53.8814 53.8814 53.8813 53.8813 53.8813 53.8813 53.8813 53.8813 53.8813 53.8813 53.8813 53.8814 53.8814 53.8815 53.8815 53.8816 53.8816 53.8817 53.8817 53.8818 53.8819 53.8819 53.882 53.8821 53.8821 53.8822 53.8823 53.8823 53.8824 53.8824 53.8825 53.8825 53.8826 53.8826 53.8826 53.8827 53.8827 53.8827 53.8827 53.8827 53.8827 53.8827 53.8827 53.8827 53.8826 53.8826 53.8826 53.8825 53.8825 53.8824 53.8824 53.8823 53.8823 53.8822 53.8821 53.8821 53.882 53.8819 53.8819 53.8818 53.8817 53.8816 53.8816 53.8815 53.8814 53.8814 53.8813 53.8812 53.8812 53.8811 53.8811 53.881 53.881 53.8809 53.8809 53.8809 53.8808 53.8808 53.8808 53.8808 53.8808 53.8807 53.8807 53.8808 53.8808 53.8808 53.8808 53.8808 53.8808 53.8809 53.8809 53.8809 53.881 53.881 53.881 53.8811 53.8811 53.8812 53.8812 53.8813 53.8813 53.8813 53.8814 53.8814 53.8815 53.8815 53.8815 53.8816 53.8816 53.8816 53.8816 53.8816 53.8817 53.8817 53.8817 53.8817 53.8817 53.8816 53.8816 53.8816 53.8816 53.8816 53.8815 53.8815 53.8815 53.8814 53.8814 53.8813 53.8813 53.8812 53.8812 53.8811 53.8811 53.881 53.881 53.8809 53.8808 53.8808 53.8807 53.8807 53.8807 53.8806 53.8806 53.8805 53.8805 53.8805 53.8805 53.8805 53.8805 53.8805 53.8805 53.8805 53.8805 53.8806 53.8806 53.8807 53.8807 53.8808 53.8808 53.8809 53.881 53.8811 53.8812 53.8813 53.8814 53.8816 53.8817 53.8818 53.882 53.8821 53.8822 53.8824 53.8825 53.8827 53.8828 53.883 53.8832 53.8833 53.8835 53.8836 53.8837 53.8839 53.884 53.8842 53.8843 53.8844 53.8845 53.8846 53.8847 53.8848 53.8849 53.8849 53.885 53.885 53.885 53.885 53.885 53.885 53.885 53.885 53.8849 53.8848 53.8848 53.8847 53.8846 53.8844 53.8843 53.8841 53.884 53.8838 53.8836 53.8834 53.8832 53.883 53.8828 53.8825 53.8823 53.882 53.8817 53.8815 53.8812 53.8809 53.8806 53.8803 53.88 53.8797 53.8793 53.879 53.8787 53.8784 53.8781 53.8778 53.8774 53.8771 53.8768 53.8765 53.8762 53.8759 53.8755 53.8752 53.8749 53.8746 53.8744 53.8741 53.8738 53.8735 53.8733 53.873 53.8727 53.8725 53.8723 53.872 53.8718 53.8716 53.8714 53.8712 53.871 53.8708 53.8706 53.8704 53.8702 53.8701 53.8699 53.8698 53.8696 53.8695 53.8693 53.8692 53.8691 53.869 53.8689 53.8688 53.8687 53.8686 53.8685 53.8684 53.8683 53.8682 53.8682 53.8681 53.868 53.868 53.8679 53.8678 53.8678 53.8677 53.8677 53.8677 53.8676 53.8676 53.8675 53.8675 53.8675 53.8674 53.8674 53.8674 53.8674 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8674 53.8674 53.8674 53.8674 53.8675 53.8675 53.8676 53.8676 53.8676 53.8677 53.8677 53.8678 53.8678 53.8679 53.868 53.868 53.8681 53.8682 53.8682 53.8683 53.8684 53.8685 53.8686 53.8686 53.8687 53.8688 53.8689 53.869 53.8691 53.8692 53.8693 53.8694 53.8694 53.8695 53.8696 53.8697 53.8698 53.8699 53.87 53.8701 53.8701 53.8702 53.8703 53.8704 53.8704 53.8705 53.8705 53.8706 53.8706 53.8707 53.8707 53.8707 53.8707 53.8708 53.8708 53.8708 53.8707 53.8707 53.8707 53.8707 53.8706 53.8706 53.8705 53.8704 53.8703 53.8703 53.8702 53.8701 53.8699 53.8698 53.8697 53.8696 53.8694 53.8693 53.8691 53.8689 53.8688 53.8686 53.8684 53.8682 53.868 53.8678 53.8676 53.8674 53.8672 53.867 53.8668 53.8666 53.8664 53.8661 53.8659 53.8657 53.8655 53.8653 53.865 53.8648 53.8646 53.8644 53.8642 53.864 53.8638 53.8636 53.8634 53.8632 53.863 53.8628 53.8626 53.8625 53.8623 53.8621 53.8619 53.8618 53.8616 53.8615 53.8613 53.8612 53.8611 53.8609 53.8608 53.8607 53.8606 53.8605 53.8603 53.8602 53.8601 53.8601 53.86 53.8599 53.8598 53.8597 53.8596 53.8596 53.8595 53.8595 53.8594 53.8593 53.8593 53.8592 53.8592 53.8591 53.8591 53.8591 53.859 53.859 53.859 53.8589 53.8589 53.8589 53.8588 53.8588 53.8588 53.8588 53.8588 53.8587 53.8587 53.8587 53.8587 53.8587 53.8587 53.8586 53.8587 53.8586 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.8586 53.8584 53.8586 53.8584 53.8586 53.8585 53.8589 53.8759 53.8755 53.8754 53.8758 53.8764 53.8767 53.877 53.8772 53.8775 53.8778 53.8781 53.8784 53.8786 53.8789 53.8791 53.8793 53.8796 53.8798 53.88 53.8802 53.8805 53.8807 53.881 53.8812 53.8815 53.8817 53.882 53.8823 53.8825 53.8828 53.8831 53.8833 53.8836 53.8839 53.8842 53.8844 53.8849 53.8853 53.8855 53.8855 53.8857 53.8861 53.8866 53.8873 53.8883 53.8899 53.8924 53.8954 53.898 53.8986 53.8963 53.8876 53.8774 53.8681 53.8619 53.8595 53.8596 53.8642 53.8752 53.8834 53.8888 53.892 53.8929 53.8921 53.8905 53.8895 53.8889 53.8884 53.8881 53.8878 53.8876 53.8874 53.8871 53.8869 53.8867 53.8865 53.8863 53.886 53.8858 53.8856 53.8854 53.8851 53.8849 53.8847 53.8845 53.8843 53.8841 53.8839 53.8837 53.8835 53.8833 53.8831 53.883 53.8828 53.8826 53.8825 53.8824 53.8822 53.8821 53.882 53.8819 53.8818 53.8817 53.8817 53.8816 53.8816 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8816 53.8816 53.8816 53.8817 53.8817 53.8818 53.8819 53.8819 53.882 53.8821 53.8821 53.8822 53.8823 53.8823 53.8824 53.8825 53.8825 53.8826 53.8826 53.8827 53.8827 53.8828 53.8828 53.8828 53.8828 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8828 53.8828 53.8828 53.8827 53.8827 53.8826 53.8826 53.8825 53.8825 53.8824 53.8823 53.8823 53.8822 53.8821 53.882 53.882 53.8819 53.8818 53.8818 53.8817 53.8816 53.8815 53.8815 53.8814 53.8814 53.8813 53.8812 53.8812 53.8811 53.8811 53.8811 53.881 53.881 53.881 53.881 53.8809 53.8809 53.8809 53.8809 53.8809 53.8809 53.881 53.881 53.881 53.881 53.881 53.8811 53.8811 53.8811 53.8812 53.8812 53.8813 53.8813 53.8813 53.8814 53.8814 53.8815 53.8815 53.8816 53.8816 53.8816 53.8817 53.8817 53.8817 53.8817 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8817 53.8817 53.8817 53.8816 53.8816 53.8815 53.8815 53.8814 53.8814 53.8813 53.8813 53.8812 53.8812 53.8811 53.8811 53.881 53.881 53.8809 53.8809 53.8808 53.8808 53.8807 53.8807 53.8807 53.8807 53.8806 53.8806 53.8806 53.8806 53.8806 53.8807 53.8807 53.8807 53.8808 53.8808 53.8809 53.8809 53.881 53.8811 53.8812 53.8813 53.8814 53.8815 53.8816 53.8817 53.8818 53.882 53.8821 53.8822 53.8824 53.8825 53.8827 53.8828 53.883 53.8831 53.8833 53.8835 53.8836 53.8838 53.8839 53.884 53.8842 53.8843 53.8844 53.8845 53.8847 53.8848 53.8848 53.8849 53.885 53.8851 53.8851 53.8851 53.8852 53.8852 53.8852 53.8852 53.8851 53.8851 53.8851 53.885 53.8849 53.8848 53.8847 53.8846 53.8844 53.8843 53.8841 53.884 53.8838 53.8836 53.8834 53.8831 53.8829 53.8827 53.8824 53.8821 53.8819 53.8816 53.8813 53.881 53.8807 53.8804 53.8801 53.8798 53.8795 53.8792 53.8788 53.8785 53.8782 53.8779 53.8776 53.8772 53.8769 53.8766 53.8763 53.876 53.8757 53.8754 53.8751 53.8748 53.8745 53.8742 53.8739 53.8737 53.8734 53.8731 53.8729 53.8726 53.8724 53.8722 53.8719 53.8717 53.8715 53.8713 53.8711 53.8709 53.8707 53.8705 53.8704 53.8702 53.87 53.8699 53.8697 53.8696 53.8695 53.8693 53.8692 53.8691 53.869 53.8689 53.8688 53.8687 53.8686 53.8685 53.8684 53.8684 53.8683 53.8682 53.8681 53.8681 53.868 53.868 53.8679 53.8679 53.8678 53.8678 53.8677 53.8677 53.8677 53.8676 53.8676 53.8676 53.8675 53.8675 53.8675 53.8675 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8675 53.8675 53.8675 53.8676 53.8676 53.8676 53.8677 53.8677 53.8677 53.8678 53.8678 53.8679 53.868 53.868 53.8681 53.8681 53.8682 53.8683 53.8683 53.8684 53.8685 53.8686 53.8687 53.8687 53.8688 53.8689 53.869 53.8691 53.8692 53.8693 53.8694 53.8695 53.8695 53.8696 53.8697 53.8698 53.8699 53.87 53.8701 53.8702 53.8702 53.8703 53.8704 53.8705 53.8705 53.8706 53.8706 53.8707 53.8707 53.8708 53.8708 53.8708 53.8708 53.8709 53.8709 53.8708 53.8708 53.8708 53.8708 53.8707 53.8707 53.8706 53.8706 53.8705 53.8704 53.8703 53.8702 53.8701 53.87 53.8699 53.8698 53.8696 53.8695 53.8693 53.8692 53.869 53.8688 53.8687 53.8685 53.8683 53.8681 53.8679 53.8677 53.8675 53.8673 53.8671 53.8669 53.8667 53.8664 53.8662 53.866 53.8658 53.8656 53.8653 53.8651 53.8649 53.8647 53.8645 53.8643 53.8641 53.8639 53.8637 53.8635 53.8633 53.8631 53.8629 53.8627 53.8625 53.8624 53.8622 53.862 53.8619 53.8617 53.8616 53.8614 53.8613 53.8611 53.861 53.8609 53.8608 53.8606 53.8605 53.8604 53.8603 53.8602 53.8601 53.86 53.86 53.8599 53.8598 53.8597 53.8597 53.8596 53.8595 53.8595 53.8594 53.8594 53.8593 53.8593 53.8592 53.8592 53.8591 53.8591 53.8591 53.859 53.859 53.859 53.8589 53.8589 53.8589 53.8589 53.8588 53.8588 53.8588 53.8588 53.8588 53.8588 53.8587 53.8587 53.8587 53.8587 53.8586 53.8587 53.8586 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.859 53.8761 53.8756 53.8756 53.8759 53.8764 53.8766 53.8768 53.8771 53.8774 53.8777 53.878 53.8782 53.8785 53.8787 53.8789 53.8792 53.8794 53.8796 53.8798 53.88 53.8803 53.8805 53.8808 53.881 53.8813 53.8815 53.8818 53.8821 53.8823 53.8826 53.8829 53.8832 53.8835 53.8838 53.884 53.8843 53.8845 53.8849 53.8854 53.8857 53.8857 53.8853 53.8851 53.8864 53.8884 53.8911 53.8963 53.9029 53.908 53.9118 53.9147 53.9167 53.9165 53.9122 53.9018 53.8932 53.8869 53.8833 53.8828 53.8835 53.8853 53.8869 53.8881 53.8886 53.8887 53.8886 53.8885 53.8883 53.888 53.8878 53.8876 53.8874 53.8871 53.8869 53.8867 53.8865 53.8863 53.886 53.8858 53.8856 53.8854 53.8852 53.8849 53.8847 53.8845 53.8843 53.8841 53.8839 53.8837 53.8835 53.8833 53.8831 53.883 53.8828 53.8826 53.8825 53.8824 53.8822 53.8821 53.882 53.8819 53.8818 53.8817 53.8817 53.8816 53.8816 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8816 53.8816 53.8816 53.8817 53.8818 53.8818 53.8819 53.8819 53.882 53.8821 53.8821 53.8822 53.8823 53.8823 53.8824 53.8825 53.8825 53.8826 53.8826 53.8827 53.8827 53.8828 53.8828 53.8828 53.8828 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8828 53.8828 53.8828 53.8827 53.8827 53.8826 53.8826 53.8825 53.8825 53.8824 53.8823 53.8823 53.8822 53.8821 53.882 53.882 53.8819 53.8818 53.8818 53.8817 53.8816 53.8815 53.8815 53.8814 53.8814 53.8813 53.8812 53.8812 53.8811 53.8811 53.8811 53.881 53.881 53.881 53.881 53.8809 53.8809 53.8809 53.8809 53.8809 53.8809 53.881 53.881 53.881 53.881 53.881 53.8811 53.8811 53.8811 53.8812 53.8812 53.8813 53.8813 53.8813 53.8814 53.8814 53.8815 53.8815 53.8816 53.8816 53.8816 53.8817 53.8817 53.8817 53.8817 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8817 53.8817 53.8817 53.8816 53.8816 53.8815 53.8815 53.8814 53.8814 53.8813 53.8813 53.8812 53.8812 53.8811 53.8811 53.881 53.881 53.8809 53.8809 53.8808 53.8808 53.8807 53.8807 53.8807 53.8807 53.8806 53.8806 53.8806 53.8806 53.8806 53.8807 53.8807 53.8807 53.8808 53.8808 53.8809 53.8809 53.881 53.8811 53.8812 53.8813 53.8814 53.8815 53.8816 53.8817 53.8818 53.882 53.8821 53.8822 53.8824 53.8825 53.8827 53.8828 53.883 53.8831 53.8833 53.8835 53.8836 53.8838 53.8839 53.884 53.8842 53.8843 53.8844 53.8845 53.8847 53.8848 53.8848 53.8849 53.885 53.8851 53.8851 53.8851 53.8852 53.8852 53.8852 53.8852 53.8851 53.8851 53.8851 53.885 53.8849 53.8848 53.8847 53.8846 53.8844 53.8843 53.8841 53.884 53.8838 53.8836 53.8834 53.8831 53.8829 53.8827 53.8824 53.8821 53.8819 53.8816 53.8813 53.881 53.8807 53.8804 53.8801 53.8798 53.8795 53.8792 53.8788 53.8785 53.8782 53.8779 53.8776 53.8772 53.8769 53.8766 53.8763 53.876 53.8757 53.8754 53.8751 53.8748 53.8745 53.8742 53.8739 53.8737 53.8734 53.8731 53.8729 53.8726 53.8724 53.8722 53.8719 53.8717 53.8715 53.8713 53.8711 53.8709 53.8707 53.8705 53.8704 53.8702 53.87 53.8699 53.8697 53.8696 53.8695 53.8693 53.8692 53.8691 53.869 53.8689 53.8688 53.8687 53.8686 53.8685 53.8684 53.8684 53.8683 53.8682 53.8681 53.8681 53.868 53.868 53.8679 53.8679 53.8678 53.8678 53.8677 53.8677 53.8677 53.8676 53.8676 53.8676 53.8675 53.8675 53.8675 53.8675 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8675 53.8675 53.8675 53.8676 53.8676 53.8676 53.8677 53.8677 53.8677 53.8678 53.8678 53.8679 53.868 53.868 53.8681 53.8681 53.8682 53.8683 53.8683 53.8684 53.8685 53.8686 53.8687 53.8687 53.8688 53.8689 53.869 53.8691 53.8692 53.8693 53.8694 53.8695 53.8695 53.8696 53.8697 53.8698 53.8699 53.87 53.8701 53.8702 53.8702 53.8703 53.8704 53.8705 53.8705 53.8706 53.8706 53.8707 53.8707 53.8708 53.8708 53.8708 53.8708 53.8709 53.8709 53.8708 53.8708 53.8708 53.8708 53.8707 53.8707 53.8706 53.8706 53.8705 53.8704 53.8703 53.8702 53.8701 53.87 53.8699 53.8698 53.8696 53.8695 53.8693 53.8692 53.869 53.8688 53.8687 53.8685 53.8683 53.8681 53.8679 53.8677 53.8675 53.8673 53.8671 53.8669 53.8667 53.8664 53.8662 53.866 53.8658 53.8656 53.8653 53.8651 53.8649 53.8647 53.8645 53.8643 53.8641 53.8639 53.8637 53.8635 53.8633 53.8631 53.8629 53.8627 53.8625 53.8624 53.8622 53.862 53.8619 53.8617 53.8616 53.8614 53.8613 53.8611 53.861 53.8609 53.8608 53.8606 53.8605 53.8604 53.8603 53.8602 53.8601 53.86 53.86 53.8599 53.8598 53.8597 53.8597 53.8596 53.8595 53.8595 53.8594 53.8594 53.8593 53.8593 53.8592 53.8592 53.8591 53.8591 53.8591 53.859 53.859 53.859 53.8589 53.8589 53.8589 53.8589 53.8588 53.8588 53.8588 53.8588 53.8588 53.8588 53.8587 53.8587 53.8587 53.8587 53.8586 53.8587 53.8586 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.859 53.8761 53.8755 53.875 53.875 53.8752 53.8754 53.8754 53.8754 53.8755 53.8757 53.8759 53.8761 53.8763 53.8765 53.8766 53.8768 53.877 53.8772 53.8775 53.8777 53.8779 53.8782 53.8784 53.8787 53.8789 53.8792 53.8794 53.8797 53.88 53.8803 53.8806 53.8808 53.8811 53.8814 53.8817 53.882 53.8824 53.8829 53.8833 53.8835 53.8834 53.8834 53.8839 53.8857 53.8878 53.891 53.8962 53.9009 53.9045 53.9074 53.9098 53.9114 53.9108 53.9058 53.9 53.8955 53.8922 53.89 53.8889 53.8885 53.8884 53.8885 53.8886 53.8886 53.8886 53.8884 53.8883 53.8881 53.8879 53.8877 53.8875 53.8873 53.8871 53.8869 53.8867 53.8865 53.8862 53.886 53.8858 53.8856 53.8854 53.8851 53.8849 53.8847 53.8845 53.8843 53.8841 53.8839 53.8837 53.8835 53.8833 53.8831 53.883 53.8828 53.8826 53.8825 53.8824 53.8822 53.8821 53.882 53.8819 53.8818 53.8817 53.8817 53.8816 53.8816 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8816 53.8816 53.8816 53.8817 53.8818 53.8818 53.8819 53.8819 53.882 53.8821 53.8821 53.8822 53.8823 53.8823 53.8824 53.8825 53.8825 53.8826 53.8826 53.8827 53.8827 53.8828 53.8828 53.8828 53.8828 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8828 53.8828 53.8828 53.8827 53.8827 53.8826 53.8826 53.8825 53.8825 53.8824 53.8823 53.8823 53.8822 53.8821 53.882 53.882 53.8819 53.8818 53.8818 53.8817 53.8816 53.8815 53.8815 53.8814 53.8814 53.8813 53.8812 53.8812 53.8811 53.8811 53.8811 53.881 53.881 53.881 53.881 53.8809 53.8809 53.8809 53.8809 53.8809 53.8809 53.881 53.881 53.881 53.881 53.881 53.8811 53.8811 53.8811 53.8812 53.8812 53.8813 53.8813 53.8813 53.8814 53.8814 53.8815 53.8815 53.8816 53.8816 53.8816 53.8817 53.8817 53.8817 53.8817 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8817 53.8817 53.8817 53.8816 53.8816 53.8815 53.8815 53.8814 53.8814 53.8813 53.8813 53.8812 53.8812 53.8811 53.8811 53.881 53.881 53.8809 53.8809 53.8808 53.8808 53.8807 53.8807 53.8807 53.8807 53.8806 53.8806 53.8806 53.8806 53.8806 53.8807 53.8807 53.8807 53.8808 53.8808 53.8809 53.8809 53.881 53.8811 53.8812 53.8813 53.8814 53.8815 53.8816 53.8817 53.8818 53.882 53.8821 53.8822 53.8824 53.8825 53.8827 53.8828 53.883 53.8831 53.8833 53.8835 53.8836 53.8838 53.8839 53.884 53.8842 53.8843 53.8844 53.8845 53.8847 53.8848 53.8848 53.8849 53.885 53.8851 53.8851 53.8851 53.8852 53.8852 53.8852 53.8852 53.8851 53.8851 53.8851 53.885 53.8849 53.8848 53.8847 53.8846 53.8844 53.8843 53.8841 53.884 53.8838 53.8836 53.8834 53.8831 53.8829 53.8827 53.8824 53.8821 53.8819 53.8816 53.8813 53.881 53.8807 53.8804 53.8801 53.8798 53.8795 53.8792 53.8788 53.8785 53.8782 53.8779 53.8776 53.8772 53.8769 53.8766 53.8763 53.876 53.8757 53.8754 53.8751 53.8748 53.8745 53.8742 53.8739 53.8737 53.8734 53.8731 53.8729 53.8726 53.8724 53.8722 53.8719 53.8717 53.8715 53.8713 53.8711 53.8709 53.8707 53.8705 53.8704 53.8702 53.87 53.8699 53.8697 53.8696 53.8695 53.8693 53.8692 53.8691 53.869 53.8689 53.8688 53.8687 53.8686 53.8685 53.8684 53.8684 53.8683 53.8682 53.8681 53.8681 53.868 53.868 53.8679 53.8679 53.8678 53.8678 53.8677 53.8677 53.8677 53.8676 53.8676 53.8676 53.8675 53.8675 53.8675 53.8675 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8675 53.8675 53.8675 53.8676 53.8676 53.8676 53.8677 53.8677 53.8677 53.8678 53.8678 53.8679 53.868 53.868 53.8681 53.8681 53.8682 53.8683 53.8683 53.8684 53.8685 53.8686 53.8687 53.8687 53.8688 53.8689 53.869 53.8691 53.8692 53.8693 53.8694 53.8695 53.8695 53.8696 53.8697 53.8698 53.8699 53.87 53.8701 53.8702 53.8702 53.8703 53.8704 53.8705 53.8705 53.8706 53.8706 53.8707 53.8707 53.8708 53.8708 53.8708 53.8708 53.8709 53.8709 53.8708 53.8708 53.8708 53.8708 53.8707 53.8707 53.8706 53.8706 53.8705 53.8704 53.8703 53.8702 53.8701 53.87 53.8699 53.8698 53.8696 53.8695 53.8693 53.8692 53.869 53.8688 53.8687 53.8685 53.8683 53.8681 53.8679 53.8677 53.8675 53.8673 53.8671 53.8669 53.8667 53.8664 53.8662 53.866 53.8658 53.8656 53.8653 53.8651 53.8649 53.8647 53.8645 53.8643 53.8641 53.8639 53.8637 53.8635 53.8633 53.8631 53.8629 53.8627 53.8625 53.8624 53.8622 53.862 53.8619 53.8617 53.8616 53.8614 53.8613 53.8611 53.861 53.8609 53.8608 53.8606 53.8605 53.8604 53.8603 53.8602 53.8601 53.86 53.86 53.8599 53.8598 53.8597 53.8597 53.8596 53.8595 53.8595 53.8594 53.8594 53.8593 53.8593 53.8592 53.8592 53.8591 53.8591 53.8591 53.859 53.859 53.859 53.8589 53.8589 53.8589 53.8589 53.8588 53.8588 53.8588 53.8588 53.8588 53.8588 53.8587 53.8587 53.8587 53.8587 53.8586 53.8587 53.8586 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.859 53.8781 53.8781 53.8778 53.8775 53.8775 53.8776 53.878 53.8783 53.8786 53.8788 53.879 53.8791 53.8793 53.8795 53.8797 53.8799 53.8801 53.8804 53.8806 53.8808 53.8811 53.8813 53.8816 53.8818 53.8821 53.8824 53.8826 53.8829 53.8832 53.8834 53.8837 53.884 53.8843 53.8845 53.8847 53.885 53.8853 53.8856 53.8858 53.886 53.8864 53.8867 53.8866 53.8862 53.8861 53.8871 53.8891 53.8918 53.8947 53.8975 53.8998 53.9015 53.902 53.901 53.8985 53.8961 53.894 53.8923 53.891 53.8902 53.8896 53.8892 53.8889 53.8887 53.8885 53.8884 53.8882 53.888 53.8878 53.8876 53.8875 53.8873 53.8871 53.8869 53.8867 53.8865 53.8862 53.886 53.8858 53.8856 53.8854 53.8851 53.8849 53.8847 53.8845 53.8843 53.8841 53.8839 53.8837 53.8835 53.8833 53.8831 53.883 53.8828 53.8826 53.8825 53.8824 53.8822 53.8821 53.882 53.8819 53.8818 53.8817 53.8817 53.8816 53.8816 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8816 53.8816 53.8816 53.8817 53.8818 53.8818 53.8819 53.8819 53.882 53.8821 53.8821 53.8822 53.8823 53.8823 53.8824 53.8825 53.8825 53.8826 53.8826 53.8827 53.8827 53.8828 53.8828 53.8828 53.8828 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8828 53.8828 53.8828 53.8827 53.8827 53.8826 53.8826 53.8825 53.8825 53.8824 53.8823 53.8823 53.8822 53.8821 53.882 53.882 53.8819 53.8818 53.8818 53.8817 53.8816 53.8815 53.8815 53.8814 53.8814 53.8813 53.8812 53.8812 53.8811 53.8811 53.8811 53.881 53.881 53.881 53.881 53.8809 53.8809 53.8809 53.8809 53.8809 53.8809 53.881 53.881 53.881 53.881 53.881 53.8811 53.8811 53.8811 53.8812 53.8812 53.8813 53.8813 53.8813 53.8814 53.8814 53.8815 53.8815 53.8816 53.8816 53.8816 53.8817 53.8817 53.8817 53.8817 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8817 53.8817 53.8817 53.8816 53.8816 53.8815 53.8815 53.8814 53.8814 53.8813 53.8813 53.8812 53.8812 53.8811 53.8811 53.881 53.881 53.8809 53.8809 53.8808 53.8808 53.8807 53.8807 53.8807 53.8807 53.8806 53.8806 53.8806 53.8806 53.8806 53.8807 53.8807 53.8807 53.8808 53.8808 53.8809 53.8809 53.881 53.8811 53.8812 53.8813 53.8814 53.8815 53.8816 53.8817 53.8818 53.882 53.8821 53.8822 53.8824 53.8825 53.8827 53.8828 53.883 53.8831 53.8833 53.8835 53.8836 53.8838 53.8839 53.884 53.8842 53.8843 53.8844 53.8845 53.8847 53.8848 53.8848 53.8849 53.885 53.8851 53.8851 53.8851 53.8852 53.8852 53.8852 53.8852 53.8851 53.8851 53.8851 53.885 53.8849 53.8848 53.8847 53.8846 53.8844 53.8843 53.8841 53.884 53.8838 53.8836 53.8834 53.8831 53.8829 53.8827 53.8824 53.8821 53.8819 53.8816 53.8813 53.881 53.8807 53.8804 53.8801 53.8798 53.8795 53.8792 53.8788 53.8785 53.8782 53.8779 53.8776 53.8772 53.8769 53.8766 53.8763 53.876 53.8757 53.8754 53.8751 53.8748 53.8745 53.8742 53.8739 53.8737 53.8734 53.8731 53.8729 53.8726 53.8724 53.8722 53.8719 53.8717 53.8715 53.8713 53.8711 53.8709 53.8707 53.8705 53.8704 53.8702 53.87 53.8699 53.8697 53.8696 53.8695 53.8693 53.8692 53.8691 53.869 53.8689 53.8688 53.8687 53.8686 53.8685 53.8684 53.8684 53.8683 53.8682 53.8681 53.8681 53.868 53.868 53.8679 53.8679 53.8678 53.8678 53.8677 53.8677 53.8677 53.8676 53.8676 53.8676 53.8675 53.8675 53.8675 53.8675 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8675 53.8675 53.8675 53.8676 53.8676 53.8676 53.8677 53.8677 53.8677 53.8678 53.8678 53.8679 53.868 53.868 53.8681 53.8681 53.8682 53.8683 53.8683 53.8684 53.8685 53.8686 53.8687 53.8687 53.8688 53.8689 53.869 53.8691 53.8692 53.8693 53.8694 53.8695 53.8695 53.8696 53.8697 53.8698 53.8699 53.87 53.8701 53.8702 53.8702 53.8703 53.8704 53.8705 53.8705 53.8706 53.8706 53.8707 53.8707 53.8708 53.8708 53.8708 53.8708 53.8709 53.8709 53.8708 53.8708 53.8708 53.8708 53.8707 53.8707 53.8706 53.8706 53.8705 53.8704 53.8703 53.8702 53.8701 53.87 53.8699 53.8698 53.8696 53.8695 53.8693 53.8692 53.869 53.8688 53.8687 53.8685 53.8683 53.8681 53.8679 53.8677 53.8675 53.8673 53.8671 53.8669 53.8667 53.8664 53.8662 53.866 53.8658 53.8656 53.8653 53.8651 53.8649 53.8647 53.8645 53.8643 53.8641 53.8639 53.8637 53.8635 53.8633 53.8631 53.8629 53.8627 53.8625 53.8624 53.8622 53.862 53.8619 53.8617 53.8616 53.8614 53.8613 53.8611 53.861 53.8609 53.8608 53.8606 53.8605 53.8604 53.8603 53.8602 53.8601 53.86 53.86 53.8599 53.8598 53.8597 53.8597 53.8596 53.8595 53.8595 53.8594 53.8594 53.8593 53.8593 53.8592 53.8592 53.8591 53.8591 53.8591 53.859 53.859 53.859 53.8589 53.8589 53.8589 53.8589 53.8588 53.8588 53.8588 53.8588 53.8588 53.8588 53.8587 53.8587 53.8587 53.8587 53.8586 53.8587 53.8586 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.859 53.8762 53.8749 53.8738 53.8729 53.8723 53.8717 53.8714 53.8712 53.8712 53.8712 53.8713 53.8715 53.8716 53.8718 53.872 53.8721 53.8723 53.8726 53.8728 53.873 53.8733 53.8735 53.8738 53.874 53.8743 53.8746 53.875 53.8753 53.8757 53.8761 53.8765 53.8769 53.8773 53.8778 53.8783 53.8789 53.8793 53.8797 53.8799 53.8801 53.8806 53.8816 53.8833 53.8857 53.8881 53.8907 53.8929 53.8948 53.8967 53.8981 53.8986 53.8984 53.8975 53.8962 53.8945 53.8928 53.8913 53.8903 53.8896 53.8892 53.8889 53.8886 53.8885 53.8883 53.8882 53.8881 53.888 53.8878 53.8877 53.8875 53.8874 53.8872 53.887 53.8868 53.8866 53.8864 53.8862 53.886 53.8858 53.8856 53.8854 53.8851 53.8849 53.8847 53.8845 53.8843 53.8841 53.8839 53.8837 53.8835 53.8833 53.8831 53.883 53.8828 53.8826 53.8825 53.8824 53.8822 53.8821 53.882 53.8819 53.8818 53.8817 53.8817 53.8816 53.8816 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8816 53.8816 53.8816 53.8817 53.8818 53.8818 53.8819 53.8819 53.882 53.8821 53.8821 53.8822 53.8823 53.8823 53.8824 53.8825 53.8825 53.8826 53.8826 53.8827 53.8827 53.8828 53.8828 53.8828 53.8828 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8828 53.8828 53.8828 53.8827 53.8827 53.8826 53.8826 53.8825 53.8825 53.8824 53.8823 53.8823 53.8822 53.8821 53.882 53.882 53.8819 53.8818 53.8818 53.8817 53.8816 53.8815 53.8815 53.8814 53.8814 53.8813 53.8812 53.8812 53.8811 53.8811 53.8811 53.881 53.881 53.881 53.881 53.8809 53.8809 53.8809 53.8809 53.8809 53.8809 53.881 53.881 53.881 53.881 53.881 53.8811 53.8811 53.8811 53.8812 53.8812 53.8813 53.8813 53.8813 53.8814 53.8814 53.8815 53.8815 53.8816 53.8816 53.8816 53.8817 53.8817 53.8817 53.8817 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8817 53.8817 53.8817 53.8816 53.8816 53.8815 53.8815 53.8814 53.8814 53.8813 53.8813 53.8812 53.8812 53.8811 53.8811 53.881 53.881 53.8809 53.8809 53.8808 53.8808 53.8807 53.8807 53.8807 53.8807 53.8806 53.8806 53.8806 53.8806 53.8806 53.8807 53.8807 53.8807 53.8808 53.8808 53.8809 53.8809 53.881 53.8811 53.8812 53.8813 53.8814 53.8815 53.8816 53.8817 53.8818 53.882 53.8821 53.8822 53.8824 53.8825 53.8827 53.8828 53.883 53.8831 53.8833 53.8835 53.8836 53.8838 53.8839 53.884 53.8842 53.8843 53.8844 53.8845 53.8847 53.8848 53.8848 53.8849 53.885 53.8851 53.8851 53.8851 53.8852 53.8852 53.8852 53.8852 53.8851 53.8851 53.8851 53.885 53.8849 53.8848 53.8847 53.8846 53.8844 53.8843 53.8841 53.884 53.8838 53.8836 53.8834 53.8831 53.8829 53.8827 53.8824 53.8821 53.8819 53.8816 53.8813 53.881 53.8807 53.8804 53.8801 53.8798 53.8795 53.8792 53.8788 53.8785 53.8782 53.8779 53.8776 53.8772 53.8769 53.8766 53.8763 53.876 53.8757 53.8754 53.8751 53.8748 53.8745 53.8742 53.8739 53.8737 53.8734 53.8731 53.8729 53.8726 53.8724 53.8722 53.8719 53.8717 53.8715 53.8713 53.8711 53.8709 53.8707 53.8705 53.8704 53.8702 53.87 53.8699 53.8697 53.8696 53.8695 53.8693 53.8692 53.8691 53.869 53.8689 53.8688 53.8687 53.8686 53.8685 53.8684 53.8684 53.8683 53.8682 53.8681 53.8681 53.868 53.868 53.8679 53.8679 53.8678 53.8678 53.8677 53.8677 53.8677 53.8676 53.8676 53.8676 53.8675 53.8675 53.8675 53.8675 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8675 53.8675 53.8675 53.8676 53.8676 53.8676 53.8677 53.8677 53.8677 53.8678 53.8678 53.8679 53.868 53.868 53.8681 53.8681 53.8682 53.8683 53.8683 53.8684 53.8685 53.8686 53.8687 53.8687 53.8688 53.8689 53.869 53.8691 53.8692 53.8693 53.8694 53.8695 53.8695 53.8696 53.8697 53.8698 53.8699 53.87 53.8701 53.8702 53.8702 53.8703 53.8704 53.8705 53.8705 53.8706 53.8706 53.8707 53.8707 53.8708 53.8708 53.8708 53.8708 53.8709 53.8709 53.8708 53.8708 53.8708 53.8708 53.8707 53.8707 53.8706 53.8706 53.8705 53.8704 53.8703 53.8702 53.8701 53.87 53.8699 53.8698 53.8696 53.8695 53.8693 53.8692 53.869 53.8688 53.8687 53.8685 53.8683 53.8681 53.8679 53.8677 53.8675 53.8673 53.8671 53.8669 53.8667 53.8664 53.8662 53.866 53.8658 53.8656 53.8653 53.8651 53.8649 53.8647 53.8645 53.8643 53.8641 53.8639 53.8637 53.8635 53.8633 53.8631 53.8629 53.8627 53.8625 53.8624 53.8622 53.862 53.8619 53.8617 53.8616 53.8614 53.8613 53.8611 53.861 53.8609 53.8608 53.8606 53.8605 53.8604 53.8603 53.8602 53.8601 53.86 53.86 53.8599 53.8598 53.8597 53.8597 53.8596 53.8595 53.8595 53.8594 53.8594 53.8593 53.8593 53.8592 53.8592 53.8591 53.8591 53.8591 53.859 53.859 53.859 53.8589 53.8589 53.8589 53.8589 53.8588 53.8588 53.8588 53.8588 53.8588 53.8588 53.8587 53.8587 53.8587 53.8587 53.8586 53.8587 53.8586 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.859 53.8797 53.88 53.8803 53.8804 53.8805 53.8806 53.8808 53.8811 53.8813 53.8815 53.8818 53.882 53.8823 53.8825 53.8828 53.883 53.8833 53.8836 53.8839 53.8842 53.8845 53.8848 53.8851 53.8854 53.8857 53.886 53.8863 53.8866 53.8869 53.8872 53.8875 53.8877 53.8881 53.8884 53.8887 53.8889 53.8892 53.8895 53.8898 53.89 53.8902 53.8904 53.8905 53.8907 53.891 53.8913 53.8913 53.8904 53.8896 53.8898 53.8908 53.8934 53.8966 53.8994 53.9009 53.8998 53.8965 53.8938 53.8918 53.8905 53.8896 53.8891 53.8887 53.8884 53.8882 53.8881 53.888 53.8878 53.8877 53.8875 53.8874 53.8872 53.887 53.8868 53.8866 53.8864 53.8862 53.886 53.8858 53.8856 53.8854 53.8851 53.8849 53.8847 53.8845 53.8843 53.8841 53.8839 53.8837 53.8835 53.8833 53.8831 53.883 53.8828 53.8826 53.8825 53.8824 53.8822 53.8821 53.882 53.8819 53.8818 53.8817 53.8817 53.8816 53.8816 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8816 53.8816 53.8816 53.8817 53.8818 53.8818 53.8819 53.8819 53.882 53.8821 53.8821 53.8822 53.8823 53.8823 53.8824 53.8825 53.8825 53.8826 53.8826 53.8827 53.8827 53.8828 53.8828 53.8828 53.8828 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8828 53.8828 53.8828 53.8827 53.8827 53.8826 53.8826 53.8825 53.8825 53.8824 53.8823 53.8823 53.8822 53.8821 53.882 53.882 53.8819 53.8818 53.8818 53.8817 53.8816 53.8815 53.8815 53.8814 53.8814 53.8813 53.8812 53.8812 53.8811 53.8811 53.8811 53.881 53.881 53.881 53.881 53.8809 53.8809 53.8809 53.8809 53.8809 53.8809 53.881 53.881 53.881 53.881 53.881 53.8811 53.8811 53.8811 53.8812 53.8812 53.8813 53.8813 53.8813 53.8814 53.8814 53.8815 53.8815 53.8816 53.8816 53.8816 53.8817 53.8817 53.8817 53.8817 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8817 53.8817 53.8817 53.8816 53.8816 53.8815 53.8815 53.8814 53.8814 53.8813 53.8813 53.8812 53.8812 53.8811 53.8811 53.881 53.881 53.8809 53.8809 53.8808 53.8808 53.8807 53.8807 53.8807 53.8807 53.8806 53.8806 53.8806 53.8806 53.8806 53.8807 53.8807 53.8807 53.8808 53.8808 53.8809 53.8809 53.881 53.8811 53.8812 53.8813 53.8814 53.8815 53.8816 53.8817 53.8818 53.882 53.8821 53.8822 53.8824 53.8825 53.8827 53.8828 53.883 53.8831 53.8833 53.8835 53.8836 53.8838 53.8839 53.884 53.8842 53.8843 53.8844 53.8845 53.8847 53.8848 53.8848 53.8849 53.885 53.8851 53.8851 53.8851 53.8852 53.8852 53.8852 53.8852 53.8851 53.8851 53.8851 53.885 53.8849 53.8848 53.8847 53.8846 53.8844 53.8843 53.8841 53.884 53.8838 53.8836 53.8834 53.8831 53.8829 53.8827 53.8824 53.8821 53.8819 53.8816 53.8813 53.881 53.8807 53.8804 53.8801 53.8798 53.8795 53.8792 53.8788 53.8785 53.8782 53.8779 53.8776 53.8772 53.8769 53.8766 53.8763 53.876 53.8757 53.8754 53.8751 53.8748 53.8745 53.8742 53.8739 53.8737 53.8734 53.8731 53.8729 53.8726 53.8724 53.8722 53.8719 53.8717 53.8715 53.8713 53.8711 53.8709 53.8707 53.8705 53.8704 53.8702 53.87 53.8699 53.8697 53.8696 53.8695 53.8693 53.8692 53.8691 53.869 53.8689 53.8688 53.8687 53.8686 53.8685 53.8684 53.8684 53.8683 53.8682 53.8681 53.8681 53.868 53.868 53.8679 53.8679 53.8678 53.8678 53.8677 53.8677 53.8677 53.8676 53.8676 53.8676 53.8675 53.8675 53.8675 53.8675 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8675 53.8675 53.8675 53.8676 53.8676 53.8676 53.8677 53.8677 53.8677 53.8678 53.8678 53.8679 53.868 53.868 53.8681 53.8681 53.8682 53.8683 53.8683 53.8684 53.8685 53.8686 53.8687 53.8687 53.8688 53.8689 53.869 53.8691 53.8692 53.8693 53.8694 53.8695 53.8695 53.8696 53.8697 53.8698 53.8699 53.87 53.8701 53.8702 53.8702 53.8703 53.8704 53.8705 53.8705 53.8706 53.8706 53.8707 53.8707 53.8708 53.8708 53.8708 53.8708 53.8709 53.8709 53.8708 53.8708 53.8708 53.8708 53.8707 53.8707 53.8706 53.8706 53.8705 53.8704 53.8703 53.8702 53.8701 53.87 53.8699 53.8698 53.8696 53.8695 53.8693 53.8692 53.869 53.8688 53.8687 53.8685 53.8683 53.8681 53.8679 53.8677 53.8675 53.8673 53.8671 53.8669 53.8667 53.8664 53.8662 53.866 53.8658 53.8656 53.8653 53.8651 53.8649 53.8647 53.8645 53.8643 53.8641 53.8639 53.8637 53.8635 53.8633 53.8631 53.8629 53.8627 53.8625 53.8624 53.8622 53.862 53.8619 53.8617 53.8616 53.8614 53.8613 53.8611 53.861 53.8609 53.8608 53.8606 53.8605 53.8604 53.8603 53.8602 53.8601 53.86 53.86 53.8599 53.8598 53.8597 53.8597 53.8596 53.8595 53.8595 53.8594 53.8594 53.8593 53.8593 53.8592 53.8592 53.8591 53.8591 53.8591 53.859 53.859 53.859 53.8589 53.8589 53.8589 53.8589 53.8588 53.8588 53.8588 53.8588 53.8588 53.8588 53.8587 53.8587 53.8587 53.8587 53.8586 53.8587 53.8586 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.859 53.8798 53.8784 53.877 53.8755 53.8741 53.873 53.8721 53.8715 53.8712 53.8711 53.8712 53.8713 53.8715 53.8717 53.8719 53.8721 53.8724 53.8726 53.8729 53.8731 53.8733 53.8736 53.8738 53.8741 53.8743 53.8746 53.8748 53.8751 53.8754 53.8758 53.8762 53.8766 53.8771 53.8776 53.8781 53.8786 53.8792 53.8796 53.8798 53.8801 53.8804 53.8809 53.8818 53.8832 53.8852 53.8871 53.8889 53.8911 53.8931 53.8951 53.8968 53.8976 53.8978 53.897 53.8957 53.894 53.8923 53.8909 53.89 53.8893 53.8888 53.8885 53.8883 53.8882 53.888 53.8879 53.8878 53.8877 53.8876 53.8875 53.8873 53.8872 53.887 53.8868 53.8866 53.8864 53.8862 53.886 53.8858 53.8856 53.8854 53.8851 53.8849 53.8847 53.8845 53.8843 53.8841 53.8839 53.8837 53.8835 53.8833 53.8831 53.883 53.8828 53.8826 53.8825 53.8824 53.8822 53.8821 53.882 53.8819 53.8818 53.8817 53.8817 53.8816 53.8816 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8816 53.8816 53.8816 53.8817 53.8818 53.8818 53.8819 53.8819 53.882 53.8821 53.8821 53.8822 53.8823 53.8823 53.8824 53.8825 53.8825 53.8826 53.8826 53.8827 53.8827 53.8828 53.8828 53.8828 53.8828 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8828 53.8828 53.8828 53.8827 53.8827 53.8826 53.8826 53.8825 53.8825 53.8824 53.8823 53.8823 53.8822 53.8821 53.882 53.882 53.8819 53.8818 53.8818 53.8817 53.8816 53.8815 53.8815 53.8814 53.8814 53.8813 53.8812 53.8812 53.8811 53.8811 53.8811 53.881 53.881 53.881 53.881 53.8809 53.8809 53.8809 53.8809 53.8809 53.8809 53.881 53.881 53.881 53.881 53.881 53.8811 53.8811 53.8811 53.8812 53.8812 53.8813 53.8813 53.8813 53.8814 53.8814 53.8815 53.8815 53.8816 53.8816 53.8816 53.8817 53.8817 53.8817 53.8817 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8817 53.8817 53.8817 53.8816 53.8816 53.8815 53.8815 53.8814 53.8814 53.8813 53.8813 53.8812 53.8812 53.8811 53.8811 53.881 53.881 53.8809 53.8809 53.8808 53.8808 53.8807 53.8807 53.8807 53.8807 53.8806 53.8806 53.8806 53.8806 53.8806 53.8807 53.8807 53.8807 53.8808 53.8808 53.8809 53.8809 53.881 53.8811 53.8812 53.8813 53.8814 53.8815 53.8816 53.8817 53.8818 53.882 53.8821 53.8822 53.8824 53.8825 53.8827 53.8828 53.883 53.8831 53.8833 53.8835 53.8836 53.8838 53.8839 53.884 53.8842 53.8843 53.8844 53.8845 53.8847 53.8848 53.8848 53.8849 53.885 53.8851 53.8851 53.8851 53.8852 53.8852 53.8852 53.8852 53.8851 53.8851 53.8851 53.885 53.8849 53.8848 53.8847 53.8846 53.8844 53.8843 53.8841 53.884 53.8838 53.8836 53.8834 53.8831 53.8829 53.8827 53.8824 53.8821 53.8819 53.8816 53.8813 53.881 53.8807 53.8804 53.8801 53.8798 53.8795 53.8792 53.8788 53.8785 53.8782 53.8779 53.8776 53.8772 53.8769 53.8766 53.8763 53.876 53.8757 53.8754 53.8751 53.8748 53.8745 53.8742 53.8739 53.8737 53.8734 53.8731 53.8729 53.8726 53.8724 53.8722 53.8719 53.8717 53.8715 53.8713 53.8711 53.8709 53.8707 53.8705 53.8704 53.8702 53.87 53.8699 53.8697 53.8696 53.8695 53.8693 53.8692 53.8691 53.869 53.8689 53.8688 53.8687 53.8686 53.8685 53.8684 53.8684 53.8683 53.8682 53.8681 53.8681 53.868 53.868 53.8679 53.8679 53.8678 53.8678 53.8677 53.8677 53.8677 53.8676 53.8676 53.8676 53.8675 53.8675 53.8675 53.8675 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8675 53.8675 53.8675 53.8676 53.8676 53.8676 53.8677 53.8677 53.8677 53.8678 53.8678 53.8679 53.868 53.868 53.8681 53.8681 53.8682 53.8683 53.8683 53.8684 53.8685 53.8686 53.8687 53.8687 53.8688 53.8689 53.869 53.8691 53.8692 53.8693 53.8694 53.8695 53.8695 53.8696 53.8697 53.8698 53.8699 53.87 53.8701 53.8702 53.8702 53.8703 53.8704 53.8705 53.8705 53.8706 53.8706 53.8707 53.8707 53.8708 53.8708 53.8708 53.8708 53.8709 53.8709 53.8708 53.8708 53.8708 53.8708 53.8707 53.8707 53.8706 53.8706 53.8705 53.8704 53.8703 53.8702 53.8701 53.87 53.8699 53.8698 53.8696 53.8695 53.8693 53.8692 53.869 53.8688 53.8687 53.8685 53.8683 53.8681 53.8679 53.8677 53.8675 53.8673 53.8671 53.8669 53.8667 53.8664 53.8662 53.866 53.8658 53.8656 53.8653 53.8651 53.8649 53.8647 53.8645 53.8643 53.8641 53.8639 53.8637 53.8635 53.8633 53.8631 53.8629 53.8627 53.8625 53.8624 53.8622 53.862 53.8619 53.8617 53.8616 53.8614 53.8613 53.8611 53.861 53.8609 53.8608 53.8606 53.8605 53.8604 53.8603 53.8602 53.8601 53.86 53.86 53.8599 53.8598 53.8597 53.8597 53.8596 53.8595 53.8595 53.8594 53.8594 53.8593 53.8593 53.8592 53.8592 53.8591 53.8591 53.8591 53.859 53.859 53.859 53.8589 53.8589 53.8589 53.8589 53.8588 53.8588 53.8588 53.8588 53.8588 53.8588 53.8587 53.8587 53.8587 53.8587 53.8586 53.8587 53.8586 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.859 53.8796 53.8781 53.8778 53.8777 53.8776 53.8776 53.8775 53.8775 53.8775 53.8775 53.8776 53.8777 53.8778 53.878 53.8782 53.8784 53.8786 53.8788 53.8791 53.8793 53.8795 53.8798 53.88 53.8802 53.8805 53.8807 53.8809 53.8812 53.8815 53.8818 53.882 53.8822 53.8824 53.8827 53.8829 53.8834 53.8837 53.8834 53.8836 53.8849 53.8862 53.8865 53.8854 53.8836 53.883 53.8831 53.8839 53.8853 53.8868 53.8883 53.8894 53.8898 53.8899 53.8895 53.889 53.8886 53.8884 53.8882 53.888 53.888 53.8879 53.8879 53.8879 53.8879 53.8879 53.8878 53.8878 53.8877 53.8876 53.8875 53.8873 53.8872 53.887 53.8868 53.8866 53.8864 53.8862 53.886 53.8858 53.8856 53.8854 53.8851 53.8849 53.8847 53.8845 53.8843 53.8841 53.8839 53.8837 53.8835 53.8833 53.8831 53.883 53.8828 53.8826 53.8825 53.8824 53.8822 53.8821 53.882 53.8819 53.8818 53.8817 53.8817 53.8816 53.8816 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8815 53.8816 53.8816 53.8816 53.8817 53.8817 53.8818 53.8819 53.8819 53.882 53.8821 53.8821 53.8822 53.8823 53.8823 53.8824 53.8825 53.8825 53.8826 53.8826 53.8827 53.8827 53.8828 53.8828 53.8828 53.8828 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8829 53.8828 53.8828 53.8828 53.8827 53.8827 53.8826 53.8826 53.8825 53.8825 53.8824 53.8823 53.8823 53.8822 53.8821 53.882 53.882 53.8819 53.8818 53.8818 53.8817 53.8816 53.8815 53.8815 53.8814 53.8814 53.8813 53.8812 53.8812 53.8811 53.8811 53.8811 53.881 53.881 53.881 53.881 53.8809 53.8809 53.8809 53.8809 53.8809 53.8809 53.881 53.881 53.881 53.881 53.881 53.8811 53.8811 53.8811 53.8812 53.8812 53.8813 53.8813 53.8813 53.8814 53.8814 53.8815 53.8815 53.8816 53.8816 53.8816 53.8817 53.8817 53.8817 53.8817 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8818 53.8817 53.8817 53.8817 53.8816 53.8816 53.8815 53.8815 53.8814 53.8814 53.8813 53.8813 53.8812 53.8812 53.8811 53.8811 53.881 53.881 53.8809 53.8809 53.8808 53.8808 53.8807 53.8807 53.8807 53.8807 53.8806 53.8806 53.8806 53.8806 53.8806 53.8807 53.8807 53.8807 53.8808 53.8808 53.8809 53.8809 53.881 53.8811 53.8812 53.8813 53.8814 53.8815 53.8816 53.8817 53.8818 53.882 53.8821 53.8822 53.8824 53.8825 53.8827 53.8828 53.883 53.8831 53.8833 53.8835 53.8836 53.8838 53.8839 53.884 53.8842 53.8843 53.8844 53.8845 53.8847 53.8848 53.8848 53.8849 53.885 53.8851 53.8851 53.8851 53.8852 53.8852 53.8852 53.8852 53.8851 53.8851 53.8851 53.885 53.8849 53.8848 53.8847 53.8846 53.8844 53.8843 53.8841 53.884 53.8838 53.8836 53.8834 53.8831 53.8829 53.8827 53.8824 53.8821 53.8819 53.8816 53.8813 53.881 53.8807 53.8804 53.8801 53.8798 53.8795 53.8792 53.8788 53.8785 53.8782 53.8779 53.8776 53.8772 53.8769 53.8766 53.8763 53.876 53.8757 53.8754 53.8751 53.8748 53.8745 53.8742 53.8739 53.8737 53.8734 53.8731 53.8729 53.8726 53.8724 53.8722 53.8719 53.8717 53.8715 53.8713 53.8711 53.8709 53.8707 53.8705 53.8704 53.8702 53.87 53.8699 53.8697 53.8696 53.8695 53.8693 53.8692 53.8691 53.869 53.8689 53.8688 53.8687 53.8686 53.8685 53.8684 53.8684 53.8683 53.8682 53.8681 53.8681 53.868 53.868 53.8679 53.8679 53.8678 53.8678 53.8677 53.8677 53.8677 53.8676 53.8676 53.8676 53.8675 53.8675 53.8675 53.8675 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8674 53.8675 53.8675 53.8675 53.8676 53.8676 53.8676 53.8677 53.8677 53.8677 53.8678 53.8678 53.8679 53.868 53.868 53.8681 53.8681 53.8682 53.8683 53.8683 53.8684 53.8685 53.8686 53.8687 53.8687 53.8688 53.8689 53.869 53.8691 53.8692 53.8693 53.8694 53.8695 53.8695 53.8696 53.8697 53.8698 53.8699 53.87 53.8701 53.8702 53.8702 53.8703 53.8704 53.8705 53.8705 53.8706 53.8706 53.8707 53.8707 53.8708 53.8708 53.8708 53.8708 53.8709 53.8709 53.8708 53.8708 53.8708 53.8708 53.8707 53.8707 53.8706 53.8706 53.8705 53.8704 53.8703 53.8702 53.8701 53.87 53.8699 53.8698 53.8696 53.8695 53.8693 53.8692 53.869 53.8688 53.8687 53.8685 53.8683 53.8681 53.8679 53.8677 53.8675 53.8673 53.8671 53.8669 53.8667 53.8664 53.8662 53.866 53.8658 53.8656 53.8653 53.8651 53.8649 53.8647 53.8645 53.8643 53.8641 53.8639 53.8637 53.8635 53.8633 53.8631 53.8629 53.8627 53.8625 53.8624 53.8622 53.862 53.8619 53.8617 53.8616 53.8614 53.8613 53.8611 53.861 53.8609 53.8608 53.8606 53.8605 53.8604 53.8603 53.8602 53.8601 53.86 53.86 53.8599 53.8598 53.8597 53.8597 53.8596 53.8595 53.8595 53.8594 53.8594 53.8593 53.8593 53.8592 53.8592 53.8591 53.8591 53.8591 53.859 53.859 53.859 53.8589 53.8589 53.8589 53.8589 53.8588 53.8588 53.8588 53.8588 53.8588 53.8588 53.8587 53.8587 53.8587 53.8587 53.8586 53.8587 53.8586 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.859 53.8741 53.8709 53.8696 53.869 53.8688 53.8687 53.8688 53.8688 53.869 53.8691 53.8693 53.8695 53.8698 53.8701 53.8704 53.8707 53.8709 53.8712 53.8716 53.872 53.8724 53.8727 53.8729 53.8732 53.8737 53.8745 53.8757 53.8771 53.8785 53.8799 53.881 53.8817 53.8818 53.8807 53.8766 53.8675 53.8533 53.8375 53.8251 53.8179 53.8111 53.8071 53.8059 53.806 53.8067 53.8087 53.8125 53.8182 53.8271 53.8389 53.8491 53.8559 53.8627 53.8684 53.8732 53.8768 53.8794 53.8815 53.8834 53.8851 53.8862 53.8868 53.8871 53.8873 53.8874 53.8875 53.8875 53.8874 53.8874 53.8872 53.8871 53.887 53.8868 53.8866 53.8864 53.8862 53.886 53.8858 53.8856 53.8854 53.8852 53.8849 53.8847 53.8845 53.8843 53.8841 53.8839 53.8837 53.8835 53.8833 53.8831 53.8829 53.8828 53.8826 53.8824 53.8823 53.8822 53.882 53.8819 53.8818 53.8817 53.8816 53.8815 53.8815 53.8814 53.8814 53.8813 53.8813 53.8813 53.8813 53.8813 53.8813 53.8813 53.8813 53.8813 53.8814 53.8814 53.8815 53.8815 53.8816 53.8816 53.8817 53.8817 53.8818 53.8819 53.8819 53.882 53.8821 53.8821 53.8822 53.8823 53.8823 53.8824 53.8824 53.8825 53.8825 53.8826 53.8826 53.8826 53.8827 53.8827 53.8827 53.8827 53.8827 53.8827 53.8827 53.8827 53.8827 53.8826 53.8826 53.8826 53.8825 53.8825 53.8824 53.8824 53.8823 53.8823 53.8822 53.8821 53.8821 53.882 53.8819 53.8819 53.8818 53.8817 53.8816 53.8816 53.8815 53.8814 53.8814 53.8813 53.8812 53.8812 53.8811 53.8811 53.881 53.881 53.8809 53.8809 53.8809 53.8808 53.8808 53.8808 53.8808 53.8808 53.8807 53.8807 53.8808 53.8808 53.8808 53.8808 53.8808 53.8808 53.8809 53.8809 53.8809 53.881 53.881 53.881 53.8811 53.8811 53.8812 53.8812 53.8813 53.8813 53.8813 53.8814 53.8814 53.8815 53.8815 53.8815 53.8816 53.8816 53.8816 53.8816 53.8816 53.8817 53.8817 53.8817 53.8817 53.8817 53.8816 53.8816 53.8816 53.8816 53.8816 53.8815 53.8815 53.8815 53.8814 53.8814 53.8813 53.8813 53.8812 53.8812 53.8811 53.8811 53.881 53.881 53.8809 53.8808 53.8808 53.8807 53.8807 53.8807 53.8806 53.8806 53.8805 53.8805 53.8805 53.8805 53.8805 53.8805 53.8805 53.8805 53.8805 53.8805 53.8806 53.8806 53.8807 53.8807 53.8808 53.8808 53.8809 53.881 53.8811 53.8812 53.8813 53.8814 53.8816 53.8817 53.8818 53.882 53.8821 53.8822 53.8824 53.8825 53.8827 53.8828 53.883 53.8832 53.8833 53.8835 53.8836 53.8837 53.8839 53.884 53.8842 53.8843 53.8844 53.8845 53.8846 53.8847 53.8848 53.8849 53.8849 53.885 53.885 53.885 53.885 53.885 53.885 53.885 53.885 53.8849 53.8848 53.8848 53.8847 53.8846 53.8844 53.8843 53.8841 53.884 53.8838 53.8836 53.8834 53.8832 53.883 53.8828 53.8825 53.8823 53.882 53.8817 53.8815 53.8812 53.8809 53.8806 53.8803 53.88 53.8797 53.8793 53.879 53.8787 53.8784 53.8781 53.8778 53.8774 53.8771 53.8768 53.8765 53.8762 53.8759 53.8755 53.8752 53.8749 53.8746 53.8744 53.8741 53.8738 53.8735 53.8733 53.873 53.8727 53.8725 53.8723 53.872 53.8718 53.8716 53.8714 53.8712 53.871 53.8708 53.8706 53.8704 53.8702 53.8701 53.8699 53.8698 53.8696 53.8695 53.8693 53.8692 53.8691 53.869 53.8689 53.8688 53.8687 53.8686 53.8685 53.8684 53.8683 53.8682 53.8682 53.8681 53.868 53.868 53.8679 53.8678 53.8678 53.8677 53.8677 53.8677 53.8676 53.8676 53.8675 53.8675 53.8675 53.8674 53.8674 53.8674 53.8674 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8674 53.8674 53.8674 53.8674 53.8675 53.8675 53.8676 53.8676 53.8676 53.8677 53.8677 53.8678 53.8678 53.8679 53.868 53.868 53.8681 53.8682 53.8682 53.8683 53.8684 53.8685 53.8686 53.8686 53.8687 53.8688 53.8689 53.869 53.8691 53.8692 53.8693 53.8694 53.8694 53.8695 53.8696 53.8697 53.8698 53.8699 53.87 53.8701 53.8701 53.8702 53.8703 53.8704 53.8704 53.8705 53.8705 53.8706 53.8706 53.8707 53.8707 53.8707 53.8707 53.8708 53.8708 53.8708 53.8707 53.8707 53.8707 53.8707 53.8706 53.8706 53.8705 53.8704 53.8703 53.8703 53.8702 53.8701 53.8699 53.8698 53.8697 53.8696 53.8694 53.8693 53.8691 53.8689 53.8688 53.8686 53.8684 53.8682 53.868 53.8678 53.8676 53.8674 53.8672 53.867 53.8668 53.8666 53.8664 53.8661 53.8659 53.8657 53.8655 53.8653 53.865 53.8648 53.8646 53.8644 53.8642 53.864 53.8638 53.8636 53.8634 53.8632 53.863 53.8628 53.8626 53.8625 53.8623 53.8621 53.8619 53.8618 53.8616 53.8615 53.8613 53.8612 53.8611 53.8609 53.8608 53.8607 53.8606 53.8605 53.8603 53.8602 53.8601 53.8601 53.86 53.8599 53.8598 53.8597 53.8596 53.8596 53.8595 53.8595 53.8594 53.8593 53.8593 53.8592 53.8592 53.8591 53.8591 53.8591 53.859 53.859 53.859 53.8589 53.8589 53.8589 53.8588 53.8588 53.8588 53.8588 53.8588 53.8587 53.8587 53.8587 53.8587 53.8587 53.8587 53.8586 53.8587 53.8586 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.8586 53.8584 53.8586 53.8584 53.8586 53.8585 53.8589 ) ; boundaryField { inlet { type calculated; value nonuniform List<scalar> 10(50.5146 50.5151 50.5151 50.5151 50.5151 50.5151 50.5151 50.5151 50.5151 50.5146); } outlet { type calculated; value nonuniform List<scalar> 10(53.8589 53.8589 53.8589 53.8589 53.8589 53.8589 53.8589 53.8589 53.8589 53.8589); } sides { type empty; } walls { type calculated; value nonuniform List<scalar> 2760 ( 50.5146 50.5147 50.5148 50.5149 50.515 50.5151 50.5152 50.5154 50.5156 50.5158 50.516 50.5163 50.5166 50.5169 50.5172 50.5175 50.5179 50.5183 50.5187 50.5192 50.5197 50.5202 50.5207 50.5213 50.5219 50.5225 50.5232 50.5239 50.5246 50.5254 50.5262 50.527 50.5279 50.5288 50.5297 50.5307 50.5317 50.5327 50.5338 50.535 50.5361 50.5374 50.5387 50.54 50.5414 50.5428 50.5443 50.5458 50.5473 50.5489 50.5506 50.5523 50.554 50.5558 50.5576 50.5596 50.5616 50.5636 50.5657 50.5679 50.5701 50.5723 50.5746 50.577 50.5794 50.5818 50.5843 50.5869 50.5896 50.5923 50.5951 50.5979 50.6008 50.6038 50.6068 50.6099 50.6131 50.6163 50.6195 50.6229 50.6263 50.6297 50.6332 50.6368 50.6405 50.6442 50.648 50.6519 50.6558 50.6598 50.6638 50.668 50.6722 50.6764 50.6808 50.6852 50.6897 50.6942 50.6988 50.7035 50.7083 50.7131 50.718 50.723 50.7281 50.7332 50.7384 50.7437 50.749 50.7544 50.7599 50.7655 50.7711 50.7769 50.7827 50.7885 50.7945 50.8005 50.8066 50.8127 50.819 50.8253 50.8317 50.8382 50.8447 50.8514 50.8581 50.8648 50.8717 50.8786 50.8856 50.8927 50.8999 50.9071 50.9145 50.9219 50.9293 50.9369 50.9445 50.9522 50.96 50.9679 50.9758 50.9838 50.9919 51.0001 51.0083 51.0167 51.0251 51.0335 51.0421 51.0507 51.0594 51.0682 51.0771 51.086 51.095 51.1041 51.1133 51.1225 51.1318 51.1412 51.1507 51.1602 51.1698 51.1795 51.1892 51.1991 51.209 51.2189 51.229 51.2391 51.2493 51.2595 51.2698 51.2802 51.2907 51.3012 51.3118 51.3225 51.3332 51.344 51.3549 51.3658 51.3769 51.3879 51.3991 51.4102 51.4216 51.4327 51.4443 51.4554 51.4673 51.4784 51.4906 51.5016 51.5141 51.5251 51.5383 51.5486 50.5146 50.5147 50.5148 50.5149 50.515 50.5151 50.5152 50.5154 50.5156 50.5158 50.516 50.5163 50.5166 50.5169 50.5172 50.5175 50.5179 50.5183 50.5187 50.5192 50.5197 50.5202 50.5207 50.5213 50.5219 50.5225 50.5232 50.5239 50.5246 50.5254 50.5262 50.527 50.5279 50.5288 50.5297 50.5307 50.5317 50.5327 50.5338 50.535 50.5361 50.5374 50.5387 50.54 50.5414 50.5428 50.5443 50.5458 50.5473 50.5489 50.5506 50.5523 50.554 50.5558 50.5576 50.5596 50.5616 50.5636 50.5657 50.5679 50.5701 50.5723 50.5746 50.577 50.5794 50.5818 50.5843 50.5869 50.5896 50.5923 50.5951 50.5979 50.6008 50.6038 50.6068 50.6099 50.6131 50.6163 50.6195 50.6229 50.6263 50.6297 50.6332 50.6368 50.6405 50.6442 50.648 50.6519 50.6558 50.6598 50.6638 50.668 50.6722 50.6764 50.6808 50.6852 50.6897 50.6942 50.6988 50.7035 50.7083 50.7131 50.718 50.723 50.7281 50.7332 50.7384 50.7437 50.749 50.7544 50.7599 50.7655 50.7711 50.7769 50.7827 50.7885 50.7945 50.8005 50.8066 50.8127 50.819 50.8253 50.8317 50.8382 50.8447 50.8514 50.8581 50.8648 50.8717 50.8786 50.8856 50.8927 50.8999 50.9071 50.9145 50.9219 50.9293 50.9369 50.9445 50.9522 50.96 50.9679 50.9758 50.9838 50.9919 51.0001 51.0083 51.0167 51.0251 51.0335 51.0421 51.0507 51.0594 51.0682 51.0771 51.086 51.095 51.1041 51.1133 51.1225 51.1318 51.1412 51.1507 51.1602 51.1698 51.1795 51.1892 51.1991 51.209 51.2189 51.229 51.2391 51.2493 51.2595 51.2698 51.2802 51.2907 51.3012 51.3118 51.3225 51.3332 51.344 51.3549 51.3659 51.3768 51.3879 51.399 51.4103 51.4214 51.433 51.444 51.4558 51.4669 51.479 51.4899 51.5023 51.5133 51.5258 51.5344 51.5601 51.5685 51.5761 51.5801 51.5826 51.5848 51.5869 51.589 51.5911 51.5931 51.5951 51.5972 51.5992 51.6012 51.6031 51.6048 51.6063 51.6076 51.6088 51.6096 51.6102 51.5307 51.5207 51.5156 51.5134 51.5124 51.5123 51.5128 51.5138 51.5153 51.5172 51.5194 51.5219 51.5247 51.5278 51.5313 51.5353 51.5398 51.545 51.5511 51.5583 51.6048 51.6088 51.617 51.6265 51.6361 51.6458 51.6554 51.6651 51.6748 51.6847 51.6946 51.7044 51.7143 51.7242 51.7342 51.7441 51.7541 51.7641 51.7741 51.7841 51.7942 51.8043 51.8144 51.8245 51.8347 51.8449 51.8551 51.8653 51.8756 51.8858 51.8961 51.9064 51.9166 51.927 51.9373 51.9476 51.958 51.9684 51.9788 51.9891 51.9996 52.01 52.0204 52.0309 52.0413 52.0518 52.0623 52.0727 52.0832 52.0938 52.1043 52.1148 52.1253 52.1358 52.1463 52.1568 52.1673 52.1778 52.1884 52.1989 52.2094 52.22 52.2305 52.2411 52.2516 52.2621 52.2727 52.2832 52.2937 52.3042 52.3148 52.3253 52.3358 52.3464 52.3568 52.3673 52.3778 52.3883 52.3989 52.4096 52.4202 52.4308 52.4413 52.4517 52.4621 52.4728 52.484 52.4953 52.506 52.5146 52.5166 52.4966 52.4533 52.4108 52.3747 52.3488 52.335 52.333 52.3406 52.3532 52.3751 52.4297 52.5076 52.5736 52.6254 52.6634 52.69 52.7086 52.7225 52.7343 52.7436 52.7487 52.7545 52.7614 52.7693 52.7777 52.7866 52.7958 52.8051 52.8145 52.8239 52.8333 52.8428 52.8522 52.8616 52.871 52.8803 52.8896 52.8989 52.9082 52.9174 52.9266 52.9358 52.9449 52.954 52.9631 52.9721 52.9811 52.99 52.9989 53.0078 53.0166 53.0254 53.0342 53.0429 53.0516 53.0602 53.0688 53.0774 53.0859 53.0944 53.1028 53.1112 53.1196 53.1279 53.1362 53.1444 53.1526 53.1607 53.1688 53.1769 53.1849 53.1929 53.2008 53.2087 53.2166 53.2243 53.2321 53.2398 53.2475 53.2551 53.2627 53.2702 53.2777 53.2851 53.2925 53.2998 53.3072 53.3144 53.3216 53.3287 53.336 53.3428 53.3501 53.3567 53.364 53.3705 53.3778 53.384 53.3913 53.3974 53.4046 53.4107 53.4177 53.4237 53.4307 53.4365 53.4435 53.4487 53.456 51.588 51.6036 51.6137 51.6227 51.6314 51.6402 51.6492 51.6584 51.6678 51.6774 51.6871 51.6968 51.7067 51.7165 51.7264 51.7364 51.7464 51.7564 51.7664 51.7765 51.7865 51.7966 51.8067 51.8168 51.827 51.8372 51.8474 51.8577 51.8679 51.8781 51.8884 51.8987 51.909 51.9193 51.9296 51.94 51.9503 51.9607 51.9711 51.9815 51.9919 52.0024 52.0129 52.0234 52.0339 52.0444 52.0549 52.0654 52.0759 52.0865 52.097 52.1076 52.1181 52.1288 52.1394 52.1501 52.1607 52.1714 52.182 52.1925 52.203 52.2135 52.224 52.235 52.2467 52.2587 52.2709 52.2832 52.2952 52.3066 52.3179 52.3294 52.3408 52.351 52.3578 52.3584 52.3569 52.3551 52.3542 52.3548 52.3573 52.3616 52.3675 52.3748 52.3832 52.3926 52.4031 52.4147 52.4272 52.4407 52.4577 52.4771 52.4956 52.5132 52.5301 52.5462 52.5614 52.576 52.5901 52.6033 52.6159 52.6281 52.6401 52.6518 52.6629 52.6737 52.6844 52.6949 52.7052 52.7154 52.7255 52.7355 52.7455 52.7554 52.7652 52.775 52.7848 52.7945 52.8042 52.8138 52.8234 52.833 52.8425 52.852 52.8614 52.8708 52.8802 52.8896 52.8989 52.9082 52.9174 52.9266 52.9358 52.9449 52.954 52.9631 52.9721 52.9811 52.99 52.9989 53.0078 53.0166 53.0254 53.0342 53.0429 53.0516 53.0602 53.0688 53.0774 53.0859 53.0944 53.1028 53.1112 53.1196 53.1279 53.1362 53.1444 53.1526 53.1607 53.1688 53.1769 53.1849 53.1929 53.2008 53.2087 53.2166 53.2244 53.2321 53.2398 53.2475 53.2551 53.2627 53.2702 53.2777 53.2851 53.2925 53.2998 53.3071 53.3144 53.3215 53.3288 53.3358 53.343 53.3498 53.357 53.3637 53.3709 53.3773 53.3845 53.3908 53.398 53.4041 53.4112 53.4172 53.4242 53.4303 53.4366 53.4435 53.449 53.4554 53.4593 53.4603 53.4615 53.4628 53.4643 53.4659 53.4675 53.4691 53.4707 53.4722 53.4739 53.4754 53.477 53.4786 53.4801 53.4817 53.4832 53.4847 53.4862 53.4876 53.4593 53.461 53.4627 53.4641 53.4654 53.4665 53.4675 53.4686 53.4698 53.4711 53.4724 53.4738 53.4751 53.4765 53.4778 53.4792 53.4805 53.4818 53.4832 53.4847 53.4921 53.4961 53.4998 53.5034 53.5072 53.5111 53.5153 53.5199 53.5246 53.5295 53.5346 53.5396 53.5447 53.5498 53.5549 53.5599 53.5649 53.5699 53.5748 53.5797 53.5845 53.5893 53.5941 53.5988 53.6035 53.6081 53.6126 53.6171 53.6216 53.626 53.6304 53.6348 53.6391 53.6434 53.6477 53.6519 53.656 53.6601 53.6642 53.6683 53.6723 53.6762 53.6801 53.684 53.6878 53.6916 53.6954 53.6991 53.7028 53.7065 53.71 53.7134 53.7167 53.72 53.7236 53.7276 53.7321 53.7371 53.7421 53.747 53.7517 53.756 53.76 53.7638 53.767 53.7682 53.7647 53.7546 53.7433 53.733 53.7242 53.7174 53.7127 53.7098 53.7085 53.7084 53.7098 53.7123 53.7157 53.7199 53.725 53.7329 53.7447 53.7557 53.7657 53.775 53.7833 53.7906 53.7971 53.8033 53.8086 53.8132 53.817 53.8207 53.824 53.8271 53.8296 53.8322 53.8338 53.8362 53.4875 53.4924 53.4979 53.5038 53.5095 53.5149 53.5205 53.5261 53.5316 53.537 53.5423 53.5476 53.5527 53.5579 53.5631 53.5682 53.5732 53.5782 53.5831 53.588 53.5929 53.5976 53.6024 53.6071 53.6117 53.6163 53.6209 53.6254 53.6299 53.6344 53.6387 53.6431 53.6473 53.6516 53.6558 53.6599 53.664 53.6681 53.6721 53.6761 53.6801 53.684 53.6878 53.6916 53.6953 53.699 53.7027 53.7063 53.7099 53.7134 53.7169 53.7203 53.7237 53.727 53.7303 53.7336 53.7368 53.74 53.7431 53.7462 53.7493 53.7523 53.7553 53.7582 53.7611 53.764 53.7667 53.7695 53.7722 53.7749 53.7777 53.7805 53.7832 53.7858 53.7882 53.7906 53.7932 53.7963 53.7996 53.8026 53.8047 53.8038 53.7917 53.7466 53.6807 53.6196 53.5682 53.53 53.5064 53.4965 53.4962 53.501 53.5234 53.5956 53.6814 53.7496 53.7986 53.8308 53.848 53.8581 53.8376 53.838 53.8385 53.839 53.8395 53.84 53.8405 53.841 53.8415 53.842 53.8425 53.8431 53.8436 53.8441 53.8446 53.845 53.8455 53.8459 53.8462 53.8464 53.8624 53.8635 53.8633 53.8618 53.8596 53.8571 53.8546 53.8521 53.8497 53.8478 53.8462 53.8451 53.8443 53.8438 53.8433 53.8432 53.8429 53.8429 53.8427 53.8429 53.8461 53.8449 53.8437 53.8429 53.8424 53.8424 53.8427 53.8432 53.8438 53.8446 53.8455 53.8464 53.8473 53.8481 53.849 53.8498 53.8505 53.8513 53.852 53.8527 53.8534 53.8541 53.8548 53.8555 53.8561 53.8567 53.8574 53.858 53.8586 53.8592 53.8597 53.8603 53.8609 53.8614 53.862 53.8625 53.863 53.8635 53.864 53.8645 53.865 53.8656 53.866 53.8663 53.8665 53.8669 53.8676 53.8688 53.8704 53.8725 53.8747 53.8767 53.8786 53.8803 53.8814 53.882 53.8817 53.8784 53.8699 53.8559 53.8402 53.8285 53.8179 53.8097 53.8037 53.7993 53.7965 53.7956 53.7958 53.7967 53.7988 53.8019 53.8071 53.816 53.8268 53.835 53.8428 53.8496 53.8554 53.8603 53.8648 53.8686 53.8715 53.8738 53.8757 53.8775 53.879 53.8802 53.881 53.8815 53.8819 53.8823 53.8825 53.8827 53.8829 53.883 53.8831 53.8831 53.8832 53.8832 53.8832 53.8832 53.8831 53.8831 53.883 53.883 53.8829 53.8829 53.8828 53.8827 53.8826 53.8825 53.8824 53.8823 53.8822 53.8821 53.882 53.8819 53.8818 53.8817 53.8816 53.8815 53.8814 53.8813 53.8812 53.881 53.8809 53.8808 53.8807 53.8806 53.8805 53.8804 53.8803 53.8802 53.88 53.8799 53.8798 53.8797 53.8796 53.8795 53.8794 53.8793 53.8792 53.8791 53.8791 53.879 53.8789 53.8788 53.8787 53.8786 53.8786 53.8785 53.8784 53.8783 53.8783 53.8782 53.8781 53.8781 53.878 53.878 53.8779 53.8779 53.8778 53.8778 53.8777 53.8777 53.8777 53.8776 53.8776 53.8776 53.8775 53.8775 53.8775 53.8775 53.8775 53.8774 53.8775 53.8774 53.8775 53.8774 53.8775 53.8773 53.8776 53.8773 53.8776 53.8774 53.8777 53.8774 53.8778 53.8774 53.8778 53.8775 53.8779 53.8776 53.878 53.8779 53.8777 53.8782 53.8779 53.878 53.8433 53.8436 53.8445 53.8458 53.847 53.848 53.8491 53.8503 53.8515 53.8526 53.8536 53.8545 53.8554 53.8563 53.8572 53.8581 53.8589 53.8597 53.8604 53.8611 53.8618 53.8625 53.8631 53.8638 53.8644 53.865 53.8656 53.8662 53.8667 53.8672 53.8678 53.8683 53.8688 53.8692 53.8697 53.8701 53.8706 53.871 53.8714 53.8718 53.8722 53.8725 53.8729 53.8732 53.8736 53.8739 53.8742 53.8745 53.8748 53.8751 53.8754 53.8757 53.876 53.8763 53.8765 53.8768 53.8771 53.8773 53.8775 53.8778 53.878 53.8784 53.8788 53.8792 53.8795 53.8796 53.8797 53.8802 53.8811 53.8823 53.8832 53.8832 53.8802 53.8657 53.8171 53.7466 53.6823 53.6294 53.591 53.5677 53.558 53.5567 53.5618 53.5939 53.6792 53.7613 53.8238 53.8658 53.8903 53.9024 53.9072 53.9077 53.904 53.8965 53.8914 53.8882 53.8863 53.8851 53.8845 53.884 53.8838 53.8836 53.8834 53.8833 53.8832 53.8831 53.883 53.8829 53.8828 53.8827 53.8826 53.8825 53.8824 53.8823 53.8822 53.8821 53.882 53.8819 53.8818 53.8817 53.8816 53.8815 53.8814 53.8813 53.8812 53.881 53.8809 53.8808 53.8807 53.8806 53.8805 53.8804 53.8803 53.8802 53.88 53.8799 53.8798 53.8797 53.8796 53.8795 53.8794 53.8793 53.8792 53.8791 53.8791 53.879 53.8789 53.8788 53.8787 53.8786 53.8786 53.8785 53.8784 53.8783 53.8783 53.8782 53.8781 53.8781 53.878 53.878 53.8779 53.8779 53.8778 53.8778 53.8777 53.8777 53.8777 53.8776 53.8776 53.8776 53.8775 53.8775 53.8775 53.8775 53.8775 53.8775 53.8774 53.8775 53.8774 53.8775 53.8773 53.8776 53.8773 53.8776 53.8773 53.8777 53.8773 53.8777 53.8774 53.8778 53.8775 53.8779 53.8776 53.878 53.8777 53.8781 53.8778 53.8782 53.8777 53.878 53.878 53.8779 53.8779 53.878 53.8779 53.8775 53.8771 53.8767 53.8764 53.8763 53.8762 53.8762 53.8761 53.8761 53.876 53.8759 53.8758 53.8756 53.8755 53.8755 53.8782 53.8783 53.8783 53.8784 53.8784 53.8785 53.8787 53.8788 53.879 53.8793 53.8796 53.8799 53.8804 53.8809 53.8805 53.8788 53.8776 53.8769 53.8765 53.8762 53.8752 53.8745 53.8746 53.8752 53.8756 53.8759 53.8761 53.8764 53.8767 53.877 53.8773 53.8775 53.8777 53.8779 53.8781 53.8784 53.8786 53.8788 53.879 53.8792 53.8795 53.8797 53.88 53.8802 53.8804 53.8807 53.881 53.8812 53.8815 53.8818 53.8821 53.8824 53.8826 53.8829 53.8831 53.8835 53.8839 53.8843 53.8845 53.8846 53.885 53.8861 53.8876 53.8886 53.8884 53.8842 53.8639 53.8017 53.7286 53.671 53.6318 53.611 53.6045 53.6053 53.623 53.6931 53.7778 53.8392 53.8769 53.8964 53.9046 53.9064 53.9037 53.8972 53.8931 53.8907 53.8893 53.8885 53.888 53.8877 53.8874 53.8872 53.8869 53.8867 53.8865 53.8863 53.886 53.8858 53.8856 53.8854 53.8852 53.8849 53.8847 53.8845 53.8843 53.8841 53.8839 53.8837 53.8835 53.8833 53.8831 53.8829 53.8828 53.8826 53.8824 53.8823 53.8822 53.882 53.8819 53.8818 53.8817 53.8816 53.8815 53.8815 53.8814 53.8814 53.8813 53.8813 53.8813 53.8813 53.8813 53.8813 53.8813 53.8813 53.8813 53.8814 53.8814 53.8815 53.8815 53.8816 53.8816 53.8817 53.8817 53.8818 53.8819 53.8819 53.882 53.8821 53.8821 53.8822 53.8823 53.8823 53.8824 53.8824 53.8825 53.8825 53.8826 53.8826 53.8826 53.8827 53.8827 53.8827 53.8827 53.8827 53.8827 53.8827 53.8827 53.8827 53.8826 53.8826 53.8826 53.8825 53.8825 53.8824 53.8824 53.8823 53.8823 53.8822 53.8821 53.8821 53.882 53.8819 53.8819 53.8818 53.8817 53.8816 53.8816 53.8815 53.8814 53.8814 53.8813 53.8812 53.8812 53.8811 53.8811 53.881 53.881 53.8809 53.8809 53.8809 53.8808 53.8808 53.8808 53.8808 53.8808 53.8807 53.8807 53.8808 53.8808 53.8808 53.8808 53.8808 53.8808 53.8809 53.8809 53.8809 53.881 53.881 53.881 53.8811 53.8811 53.8812 53.8812 53.8813 53.8813 53.8813 53.8814 53.8814 53.8815 53.8815 53.8815 53.8816 53.8816 53.8816 53.8816 53.8816 53.8817 53.8817 53.8817 53.8817 53.8817 53.8816 53.8816 53.8816 53.8816 53.8816 53.8815 53.8815 53.8815 53.8814 53.8814 53.8813 53.8813 53.8812 53.8812 53.8811 53.8811 53.881 53.881 53.8809 53.8808 53.8808 53.8807 53.8807 53.8807 53.8806 53.8806 53.8805 53.8805 53.8805 53.8805 53.8805 53.8805 53.8805 53.8805 53.8805 53.8805 53.8806 53.8806 53.8807 53.8807 53.8808 53.8808 53.8809 53.881 53.8811 53.8812 53.8813 53.8814 53.8816 53.8817 53.8818 53.882 53.8821 53.8822 53.8824 53.8825 53.8827 53.8828 53.883 53.8832 53.8833 53.8835 53.8836 53.8837 53.8839 53.884 53.8842 53.8843 53.8844 53.8845 53.8846 53.8847 53.8848 53.8849 53.8849 53.885 53.885 53.885 53.885 53.885 53.885 53.885 53.885 53.8849 53.8848 53.8848 53.8847 53.8846 53.8844 53.8843 53.8841 53.884 53.8838 53.8836 53.8834 53.8832 53.883 53.8828 53.8825 53.8823 53.882 53.8817 53.8815 53.8812 53.8809 53.8806 53.8803 53.88 53.8797 53.8793 53.879 53.8787 53.8784 53.8781 53.8778 53.8774 53.8771 53.8768 53.8765 53.8762 53.8759 53.8755 53.8752 53.8749 53.8746 53.8744 53.8741 53.8738 53.8735 53.8733 53.873 53.8727 53.8725 53.8723 53.872 53.8718 53.8716 53.8714 53.8712 53.871 53.8708 53.8706 53.8704 53.8702 53.8701 53.8699 53.8698 53.8696 53.8695 53.8693 53.8692 53.8691 53.869 53.8689 53.8688 53.8687 53.8686 53.8685 53.8684 53.8683 53.8682 53.8682 53.8681 53.868 53.868 53.8679 53.8678 53.8678 53.8677 53.8677 53.8677 53.8676 53.8676 53.8675 53.8675 53.8675 53.8674 53.8674 53.8674 53.8674 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8674 53.8674 53.8674 53.8674 53.8675 53.8675 53.8676 53.8676 53.8676 53.8677 53.8677 53.8678 53.8678 53.8679 53.868 53.868 53.8681 53.8682 53.8682 53.8683 53.8684 53.8685 53.8686 53.8686 53.8687 53.8688 53.8689 53.869 53.8691 53.8692 53.8693 53.8694 53.8694 53.8695 53.8696 53.8697 53.8698 53.8699 53.87 53.8701 53.8701 53.8702 53.8703 53.8704 53.8704 53.8705 53.8705 53.8706 53.8706 53.8707 53.8707 53.8707 53.8707 53.8708 53.8708 53.8708 53.8707 53.8707 53.8707 53.8707 53.8706 53.8706 53.8705 53.8704 53.8703 53.8703 53.8702 53.8701 53.8699 53.8698 53.8697 53.8696 53.8694 53.8693 53.8691 53.8689 53.8688 53.8686 53.8684 53.8682 53.868 53.8678 53.8676 53.8674 53.8672 53.867 53.8668 53.8666 53.8664 53.8661 53.8659 53.8657 53.8655 53.8653 53.865 53.8648 53.8646 53.8644 53.8642 53.864 53.8638 53.8636 53.8634 53.8632 53.863 53.8628 53.8626 53.8625 53.8623 53.8621 53.8619 53.8618 53.8616 53.8615 53.8613 53.8612 53.8611 53.8609 53.8608 53.8607 53.8606 53.8605 53.8603 53.8602 53.8601 53.8601 53.86 53.8599 53.8598 53.8597 53.8596 53.8596 53.8595 53.8595 53.8594 53.8593 53.8593 53.8592 53.8592 53.8591 53.8591 53.8591 53.859 53.859 53.859 53.8589 53.8589 53.8589 53.8588 53.8588 53.8588 53.8588 53.8588 53.8587 53.8587 53.8587 53.8587 53.8587 53.8587 53.8586 53.8587 53.8586 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.8586 53.8584 53.8586 53.8584 53.8586 53.8585 53.8589 53.8741 53.8709 53.8696 53.869 53.8688 53.8687 53.8688 53.8688 53.869 53.8691 53.8693 53.8695 53.8698 53.8701 53.8704 53.8707 53.8709 53.8712 53.8716 53.872 53.8724 53.8727 53.8729 53.8732 53.8737 53.8745 53.8757 53.8771 53.8785 53.8799 53.881 53.8817 53.8818 53.8807 53.8766 53.8675 53.8533 53.8375 53.8251 53.8179 53.8111 53.8071 53.8059 53.806 53.8067 53.8087 53.8125 53.8182 53.8271 53.8389 53.8491 53.8559 53.8627 53.8684 53.8732 53.8768 53.8794 53.8815 53.8834 53.8851 53.8862 53.8868 53.8871 53.8873 53.8874 53.8875 53.8875 53.8874 53.8874 53.8872 53.8871 53.887 53.8868 53.8866 53.8864 53.8862 53.886 53.8858 53.8856 53.8854 53.8852 53.8849 53.8847 53.8845 53.8843 53.8841 53.8839 53.8837 53.8835 53.8833 53.8831 53.8829 53.8828 53.8826 53.8824 53.8823 53.8822 53.882 53.8819 53.8818 53.8817 53.8816 53.8815 53.8815 53.8814 53.8814 53.8813 53.8813 53.8813 53.8813 53.8813 53.8813 53.8813 53.8813 53.8813 53.8814 53.8814 53.8815 53.8815 53.8816 53.8816 53.8817 53.8817 53.8818 53.8819 53.8819 53.882 53.8821 53.8821 53.8822 53.8823 53.8823 53.8824 53.8824 53.8825 53.8825 53.8826 53.8826 53.8826 53.8827 53.8827 53.8827 53.8827 53.8827 53.8827 53.8827 53.8827 53.8827 53.8826 53.8826 53.8826 53.8825 53.8825 53.8824 53.8824 53.8823 53.8823 53.8822 53.8821 53.8821 53.882 53.8819 53.8819 53.8818 53.8817 53.8816 53.8816 53.8815 53.8814 53.8814 53.8813 53.8812 53.8812 53.8811 53.8811 53.881 53.881 53.8809 53.8809 53.8809 53.8808 53.8808 53.8808 53.8808 53.8808 53.8807 53.8807 53.8808 53.8808 53.8808 53.8808 53.8808 53.8808 53.8809 53.8809 53.8809 53.881 53.881 53.881 53.8811 53.8811 53.8812 53.8812 53.8813 53.8813 53.8813 53.8814 53.8814 53.8815 53.8815 53.8815 53.8816 53.8816 53.8816 53.8816 53.8816 53.8817 53.8817 53.8817 53.8817 53.8817 53.8816 53.8816 53.8816 53.8816 53.8816 53.8815 53.8815 53.8815 53.8814 53.8814 53.8813 53.8813 53.8812 53.8812 53.8811 53.8811 53.881 53.881 53.8809 53.8808 53.8808 53.8807 53.8807 53.8807 53.8806 53.8806 53.8805 53.8805 53.8805 53.8805 53.8805 53.8805 53.8805 53.8805 53.8805 53.8805 53.8806 53.8806 53.8807 53.8807 53.8808 53.8808 53.8809 53.881 53.8811 53.8812 53.8813 53.8814 53.8816 53.8817 53.8818 53.882 53.8821 53.8822 53.8824 53.8825 53.8827 53.8828 53.883 53.8832 53.8833 53.8835 53.8836 53.8837 53.8839 53.884 53.8842 53.8843 53.8844 53.8845 53.8846 53.8847 53.8848 53.8849 53.8849 53.885 53.885 53.885 53.885 53.885 53.885 53.885 53.885 53.8849 53.8848 53.8848 53.8847 53.8846 53.8844 53.8843 53.8841 53.884 53.8838 53.8836 53.8834 53.8832 53.883 53.8828 53.8825 53.8823 53.882 53.8817 53.8815 53.8812 53.8809 53.8806 53.8803 53.88 53.8797 53.8793 53.879 53.8787 53.8784 53.8781 53.8778 53.8774 53.8771 53.8768 53.8765 53.8762 53.8759 53.8755 53.8752 53.8749 53.8746 53.8744 53.8741 53.8738 53.8735 53.8733 53.873 53.8727 53.8725 53.8723 53.872 53.8718 53.8716 53.8714 53.8712 53.871 53.8708 53.8706 53.8704 53.8702 53.8701 53.8699 53.8698 53.8696 53.8695 53.8693 53.8692 53.8691 53.869 53.8689 53.8688 53.8687 53.8686 53.8685 53.8684 53.8683 53.8682 53.8682 53.8681 53.868 53.868 53.8679 53.8678 53.8678 53.8677 53.8677 53.8677 53.8676 53.8676 53.8675 53.8675 53.8675 53.8674 53.8674 53.8674 53.8674 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8672 53.8673 53.8673 53.8673 53.8673 53.8673 53.8673 53.8674 53.8674 53.8674 53.8674 53.8675 53.8675 53.8676 53.8676 53.8676 53.8677 53.8677 53.8678 53.8678 53.8679 53.868 53.868 53.8681 53.8682 53.8682 53.8683 53.8684 53.8685 53.8686 53.8686 53.8687 53.8688 53.8689 53.869 53.8691 53.8692 53.8693 53.8694 53.8694 53.8695 53.8696 53.8697 53.8698 53.8699 53.87 53.8701 53.8701 53.8702 53.8703 53.8704 53.8704 53.8705 53.8705 53.8706 53.8706 53.8707 53.8707 53.8707 53.8707 53.8708 53.8708 53.8708 53.8707 53.8707 53.8707 53.8707 53.8706 53.8706 53.8705 53.8704 53.8703 53.8703 53.8702 53.8701 53.8699 53.8698 53.8697 53.8696 53.8694 53.8693 53.8691 53.8689 53.8688 53.8686 53.8684 53.8682 53.868 53.8678 53.8676 53.8674 53.8672 53.867 53.8668 53.8666 53.8664 53.8661 53.8659 53.8657 53.8655 53.8653 53.865 53.8648 53.8646 53.8644 53.8642 53.864 53.8638 53.8636 53.8634 53.8632 53.863 53.8628 53.8626 53.8625 53.8623 53.8621 53.8619 53.8618 53.8616 53.8615 53.8613 53.8612 53.8611 53.8609 53.8608 53.8607 53.8606 53.8605 53.8603 53.8602 53.8601 53.8601 53.86 53.8599 53.8598 53.8597 53.8596 53.8596 53.8595 53.8595 53.8594 53.8593 53.8593 53.8592 53.8592 53.8591 53.8591 53.8591 53.859 53.859 53.859 53.8589 53.8589 53.8589 53.8588 53.8588 53.8588 53.8588 53.8588 53.8587 53.8587 53.8587 53.8587 53.8587 53.8587 53.8586 53.8587 53.8586 53.8587 53.8585 53.8587 53.8585 53.8587 53.8585 53.8586 53.8584 53.8586 53.8584 53.8586 53.8585 53.8589 ) ; } } // ************************************************************************* //
8453addf481bc748ac33a76dd2927c3f7db83bc5
2960893dc3a549f34eaf40a3ab78673fc0f05156
/src/execEngine/ThreadPool.h
5c5a8f230bc5a98eff204fef23f70a0c8e368325
[]
no_license
SBU-BMI/nscale
dc548aabd53b91bdb8e80244b9da28052cfac5fe
945c091ceb3452a38f44cb0c3bedbec2188cfd18
refs/heads/master
2021-06-28T02:02:29.262063
2021-06-16T20:09:01
2021-06-16T20:09:01
37,320,460
8
7
null
2021-06-16T20:09:02
2015-06-12T12:22:18
C++
UTF-8
C++
false
false
2,012
h
ThreadPool.h
/* * ThreadPool.h * * Created on: Aug 18, 2011 * Author: george */ #ifndef THREADPOOL_H_ #define THREADPOOL_H_ #include <stdio.h> #include <stdlib.h> #include <vector> #include <pthread.h> #include <semaphore.h> #ifdef _MSC_VER #include "time_win.h" #else #include <sys/time.h> #endif #include "ExecEngineConstants.h" #include "TasksQueue.h" class TasksQueue; struct threadData{ int tid; int procType; void *execEnginePtr; }; class ThreadPool { private: // list of task from what the thread pool will consume TasksQueue *tasksQueue; // structure containing information about the threads used to GPU and CPU pthread_t *CPUWorkerThreads; pthread_t *GPUWorkerThreads; int gpuTempDataSize; vector<void *>gpuTempData; int numGPUThreads; int numCPUThreads; // This mutex is used to prevent the worker threads from initialized after // their creation, but only when initExecution function is called. pthread_mutex_t initExecutionMutex; // Used to make sure that threads are created before the main thread has leaved pthread_mutex_t createdThreads; // Auxiliar variables used to measured load imbalance in the threads execution time. bool firstToFinish; struct timeval firstToFinishTime; struct timeval lastToFinishTime; public: ThreadPool(TasksQueue *tasksQueues); virtual ~ThreadPool(); // Create threads and assign them to appropriate devices bool createThreadPool(int cpuThreads=1, int *cpuThreadsCoreMapping=NULL, int gpuThreads=0, int *gpuThreadsCoreMapping=NULL, int gpuTempDataSize=0); // Startup computation, so far, even if thread pool was created, the threads are awaiting for the // execution to be initialized. Make sure the thread poll was created before calling init execution. void initExecution(); void *getGPUTempData(int tid); // main computation loop, where threads are kept busy computing tasks void processTasks(int procType, int tid); void finishExecWaitEnd(); int getGPUThreads(); int getCPUThreads(); }; #endif /* THREADPOOL_H_ */
3804ba1e9dce224fe07fad73bd6dca16bbf91d3d
42f5c2263e9ad7955303022b35bad8fafb788ae9
/magloop_pico.cpp
1c04006c4ee15f23c190039d3ed5d5f27ef366b8
[ "MIT" ]
permissive
bowlingb/magloop_pico
7f1b0bac4ff27f4730b8ee820fc903138ac59ad6
951d6d55eaba92596ed4a314287a81133e844719
refs/heads/master
2023-05-14T23:48:55.864328
2021-06-04T10:01:49
2021-06-04T10:01:49
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,218
cpp
magloop_pico.cpp
// A "proof of concept" project to replace the STM32F103 "Blue Pill" // which is used in the "Magnetic Loop Controller" described in the book // "Microcontroller Projects for Amateur Radio by Jack Purdum, W8TEE, and // Albert Peter, AC8GY" with the Raspberry Pi Pico. // The project is to modify the Adafruit_ILI9341 to work // with the Pi Pico as a dedicated library, and then demonstrate the // loading of the "Splash" screen display which appears at power-up // in the original project. // The original library: // https://github.com/adafruit/Adafruit_ILI9341 #include "pico/stdlib.h" #include "hardware/spi.h" #include "hardware/timer.h" #include "hardware/clocks.h" #include "Adafruit_ILI9341/Adafruit_ILI9341.h" #define PIXELWIDTH 320 // Display limits #define PIXELHEIGHT 240 // These are the post-rotation dimensions. #define VERSION 1.01 #define RELEASEDATE "3-15-21" // Instantiate the display object. Note that the SPI is handled in the display object. Adafruit_ILI9341 tft = Adafruit_ILI9341(PIN_CS, DISP_DC, -1); void ErasePage() { tft.fillScreen(ILI9341_BLACK); } // The Splash function from the Mag Loop Arduino .ino file. void Splash() { ErasePage(); tft.setTextSize(2); tft.setTextColor(ILI9341_MAGENTA, ILI9341_BLACK); tft.setCursor(10, 20); tft.print("Microcontroller Projects"); tft.setCursor(40, 45); tft.print("for Amateur Radio"); tft.setTextColor(ILI9341_RED, ILI9341_BLACK); tft.setCursor(PIXELWIDTH / 2 - 30, PIXELHEIGHT / 4 + 20); tft.print("by"); tft.setCursor(65, PIXELHEIGHT - 100); tft.setTextColor(ILI9341_GREEN, ILI9341_BLACK); tft.println("Al Peter AC8GY"); tft.setCursor(45, PIXELHEIGHT - 70); tft.print("Jack Purdum W8TEE"); tft.setCursor(65, PIXELHEIGHT - 40); tft.print("Version "); tft.print(VERSION); tft.setCursor(65, PIXELHEIGHT - 20); tft.print("Release Date "); tft.print(RELEASEDATE); tft.setTextSize(2); } int main() { // Configure the display object. tft.initSPI(); tft.begin(); tft.setRotation(3); // Run the same Splash function as in the Mag Loop Controller project. Splash(); // Test a GFX graphics primitive by drawing a border: tft.drawRect(1, 1, 318, 238, ILI9341_WHITE); return 0; }
25f5a3a271d9ccfcb67f231f9dab02ef56076af1
27bfbd6ac1460a4f515cced4c6f6445e6e72e25d
/MakeGUID/UserRegisterDlg.h
a11bca1b6a951e11a76442a3699cb4424d50a709
[]
no_license
Ivanhan2018/MakeGUID
0f8e811ce0e6eacdaa72f472314acde0d3789e70
5f9d3efcfde1521efe974ce2d47fe34ef2441615
refs/heads/master
2022-02-27T09:30:53.674624
2022-02-18T10:06:04
2022-02-18T10:06:04
154,024,614
3
7
null
null
null
null
GB18030
C++
false
false
396
h
UserRegisterDlg.h
#pragma once // CUserRegisterDlg 对话框 class CUserRegisterDlg : public CDialogEx { DECLARE_DYNAMIC(CUserRegisterDlg) public: CUserRegisterDlg(CWnd* pParent = NULL); // 标准构造函数 virtual ~CUserRegisterDlg(); // 对话框数据 enum { IDD = IDD_DIALOG_USER_ADD }; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 DECLARE_MESSAGE_MAP() };
59a08c7a78463c363c7443d3d1b8260fe7ae9a84
5f5a5677aaa39f2f3d3cdf16d4d0d4731b9317e1
/demos/CIELCHColourDemo/Source/Main.cpp
4263d9219078d74fe133c7976b84e87143db6189
[ "MIT" ]
permissive
Alatar79/JUCE-CIELCH
ecd54a30526d7e183491aaba75568720e58ae70a
3b6d9d17ad9f88f037368f35bb447b1fb0aa2863
refs/heads/master
2021-01-13T14:37:11.162958
2018-08-31T16:34:13
2018-08-31T16:34:13
48,921,100
2
0
null
2018-08-31T16:34:14
2016-01-02T19:25:25
C++
UTF-8
C++
false
false
6,066
cpp
Main.cpp
/* ============================================================================== This file is part of the CIELCH Colour JUCE module Copyright 2016 by Alatar79 The CIELCH JUCE module is hosted on github: https://github.com/Alatar79/JUCE-CIELCH ------------------------------------------------------------------------------ The CIELCH Colour JUCE module is provided under the terms of The MIT License (MIT): Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ============================================================================== */ #include "../JuceLibraryCode/JuceHeader.h" #include "ColourDemoComponent.h" //============================================================================== class CIELCH_ColourApplication : public JUCEApplication { public: //============================================================================== CIELCH_ColourApplication() {} const String getApplicationName() override { return ProjectInfo::projectName; } const String getApplicationVersion() override { return ProjectInfo::versionString; } bool moreThanOneInstanceAllowed() override { return true; } //============================================================================== void initialise (const String& /* commandLine */) override { // This method is where you should put your application's initialisation code.. mainWindow = new MainWindow (getApplicationName()); } void shutdown() override { // Add your application's shutdown code here.. mainWindow = nullptr; // (deletes our window) } //============================================================================== void systemRequestedQuit() override { // This is called when the app is being asked to quit: you can ignore this // request and let the app carry on running, or call quit() to allow the app to close. quit(); } void anotherInstanceStarted (const String& /* commandLine */) override { // When another instance of the app is launched while this one is running, // this method is invoked, and the commandLine parameter tells you what // the other instance's command-line arguments were. } //============================================================================== /* This class implements the desktop window that contains an instance of our MainContentComponent class. */ class MainWindow : public DocumentWindow { public: MainWindow (String name) : DocumentWindow (name, Colours::lightgrey, DocumentWindow::allButtons) { setUsingNativeTitleBar (true); int bestWidth = 940; int bestHeight = 920; //Parent is the available desktop in this case int maxHeight = jmin(getParentHeight(), bestHeight); if (maxHeight < bestHeight) bestWidth = 960; int maxWidth = jmin(getParentWidth(), bestWidth); Viewport* viewport = new Viewport(); viewport->setViewedComponent(new ColourDemoComponent(), true); viewport->setSize(maxWidth, maxHeight); setContentOwned(viewport, true); centreWithSize (maxWidth, maxHeight); setVisible (true); // Add OpenGL renderer to our main Window. // Used automatically by all our 2D elements in the application. // Very important to do this. Gives big // performance gain, especially on Retina displays. openGLContext.attachTo(*this); setOpaque(true); } void closeButtonPressed() override { // This is called when the user tries to close this window. Here, we'll just // ask the app to quit when this happens, but you can change this to do // whatever you need. JUCEApplication::getInstance()->systemRequestedQuit(); } /* Note: Be careful if you override any DocumentWindow methods - the base class uses a lot of them, so by overriding you might break its functionality. It's best to do all your work in your content component instead, but if you really have to override any DocumentWindow methods, make sure your subclass also calls the superclass's method. */ private: /** OpenGL context for speeding up 2D drawings */ OpenGLContext openGLContext; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainWindow) }; private: ScopedPointer<MainWindow> mainWindow; }; //============================================================================== // This macro generates the main() routine that launches the app. START_JUCE_APPLICATION (CIELCH_ColourApplication)
3510d0ea2e40706d4528ad9772a1f2c8044462aa
83ce02487999b6556d7cdebd68550ebee3d8b8d9
/include/nontemplate_entitymanager.ipp
f7f796c1b6aa31427744643256ac26d4e59814c2
[ "MIT" ]
permissive
benjamin-allen/photon
4386d7db5c598ff51530909c3076a0bacb1d0c07
38faec5753285eb0444e551ee81e6234fd48e6eb
refs/heads/master
2021-09-03T14:32:07.212231
2017-09-06T23:08:26
2017-09-06T23:08:26
99,740,837
2
0
null
null
null
null
UTF-8
C++
false
false
5,263
ipp
nontemplate_entitymanager.ipp
// Photon: A fast, simple, open-source ECS library for C++ // // MIT License // // Copyright(c) 2017 Benjamin Allen // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files(the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions : // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. #pragma once namespace photon { /// Adds the components specified by the class constructors /// /// \remark This handles the registration of IDComponent, which is the only /// component that EntityManagerBase assumes to exist in its system. template <typename... Components> EntityManagerBase<Components...>::EntityManagerBase() { _entityCount = 0; _indexCount = PHOTON_INITIAL_ALLOCATION; IDComponent i; registerComponent<IDComponent>(); registerComponent<Components...>(); } /// Derived entity managers should call destroy on components registered /// within their constructor. /// /// \warning This is a virtual destructor and will be invoked by derived /// classes. /// /// \remark This handles the destruction of IDComponent. template<typename... Components> EntityManagerBase<Components...>::~EntityManagerBase() { destroyComponent<IDComponent>(); destroyComponent<Components...>(); } /// Best-case performance is O(1). Worst case is also O(1) but requires that /// the collection be expanded. template<typename... Components> unsigned int EntityManagerBase<Components...>::addEntity() { unsigned int IDIndex = _componentRegistry.getIndex<IDComponent>(); std::shared_ptr<std::vector<IDComponent>> idVec = std::any_cast<std::shared_ptr<std::vector<IDComponent>>>(componentCollection[IDIndex]); // Expand if we know there's no room left if(_entityCount == _indexCount) { growComponent<IDComponent>(); growComponent<Components...>(); idVec->at(_entityCount++).activate(); // post increment is correct _indexCount *= PHOTON_EXPANSION_FACTOR; return _entityCount; } // Try to add an entity at the next logical index if(!idVec->at(_entityCount).isActive()) { idVec->at(_entityCount).activate(); return _entityCount++; // post increment is correct here since the index of the new entity is desired } // Failing both of those things, get a deactivated entity and add it unsigned int entity = _deactivatedEntities.back(); _deactivatedEntities.pop_back(); idVec->at(entity).activate(); ++_entityCount; return entity; } /// This is recommended over adding entities one-at-a-time with addEntity(). template <typename... Components> void EntityManagerBase<Components...>::addEntities(unsigned int count) { unsigned int IDIndex = _componentRegistry.getIndex<IDComponent>(); std::shared_ptr<std::vector<IDComponent>> idVec = std::any_cast<std::shared_ptr<std::vector<IDComponent>>>(componentCollection[IDIndex]); // This is not guaranteed to execute, and should not if the number of entities to add // is less than the space already available while((int)_indexCount - (int)count < (int)_entityCount) { growComponent<IDComponent>(); growComponent<Components...>(); _indexCount *= PHOTON_EXPANSION_FACTOR; } // Fill in missing entities first while(_deactivatedEntities.size() > 0 && count > 0) { unsigned int entity = _deactivatedEntities.back(); _deactivatedEntities.pop_back(); idVec->at(entity).activate(); ++_entityCount; --count; } // Now start at _entityCount and continue to fill while(count > 0) { idVec->at(_entityCount).activate(); ++_entityCount; --count; } } /// If the entity is already deactivated, nothing happens. /// \warning This function does not touch the non-IDComponent data of an /// entity. It doesn't even deactivate the components. template <typename... Components> void EntityManagerBase<Components...>::removeEntity(unsigned int entity) { unsigned int cIndex = _componentRegistry.getIndex<IDComponent>(); std::shared_ptr<std::vector<IDComponent>> v = std::any_cast<std::shared_ptr<std::vector<IDComponent>>>(componentCollection[cIndex]); // Add a check for whether anything changed if(v->at(entity).isActive()) { v->at(entity).deactivate(); _deactivatedEntities.push_back(entity); // Add the removed entity for use later --_entityCount; } } template <typename... Components> unsigned int EntityManagerBase<Components...>::getEntityCount() { return _entityCount; } }
9baadef0787bbb3073d6454ae1a7db1a870dd244
12ce713c46fe2e6ee2f29cfb3759050fccb201b9
/android_test/android_test/android_test.NativeActivity/src/GameSystem.cpp
a7cded51b28b0648614f9e252f593e7e0a278722
[]
no_license
feveleK5563/android_test
38b152ed4cf78ddfb8af9c74f4b59634bf2c6039
e08b50d7ded5cc4416c51d249db0ec4b4ba43daa
refs/heads/master
2020-09-06T22:28:41.771248
2019-11-09T15:56:14
2019-11-09T15:56:14
220,574,651
0
0
null
null
null
null
UTF-8
C++
false
false
2,803
cpp
GameSystem.cpp
#include "GameSystem.h" #include "DxLib.h" #include "Fps.h" #include "SystemDefine.hpp" #include "TaskSystem.h" #include "ImageLoader.h" #include "ShaderManager.h" #include "Utility.h" #include "Task_Bg.h" #include "Task_Chikuwa.h" GameSystem::GameSystem(){} //----------------------------------------------------------------------------- // 初期化処理 void GameSystem::Initialize() { SetAlwaysRunFlag(TRUE); // ウィンドウがノンアクティブでも実行する SetOutApplicationLogValidFlag(FALSE); // Log.txtを作らない // 背景色設定 SetBackgroundColor(0, 0, 0); // 初期化と裏画面化 if (DxLib_Init() == -1 || SetDrawScreen(DX_SCREEN_BACK) != 0) { return; } int size_x, size_y; GetAndroidDisplayResolution(&size_x, &size_y); //SysDef::SizeX = size_x; //SysDef::SizeY = size_y; // 画面解像度とカラービット数設定 SetGraphMode(size_x, size_y, 32); Fps::Create(); ImageLoader::Create(); ShaderManager::Create(); FirstCreateTask(); } //----------------------------------------------------------------------------- // メインループ void GameSystem::MainLoop() { while (Run()) { Fps::Wait(); Fps::Update(); // タスクが存在しなかった場合終了する if (TaskSystem::GetAllTaskNum() == 0) { DOUT << "[System End]" << std::endl; break; } TaskSystem::Update(); TaskSystem::Draw(); Fps::Draw(); } } //----------------------------------------------------------------------------- // 終了処理 void GameSystem::Finalize() { Fps::Delete(); TaskSystem::Delete(); ImageLoader::Delete(); ShaderManager::Delete(); DxLib_End(); } //----------------------------------------------------------------------------- // ループを回す際の判定処理 bool GameSystem::Run() { return ScreenFlip() == 0 // 裏画面を表画面に反映 && ProcessMessage() == 0 // メッセージ処理 && ClearDrawScreen() == 0; // 画面をクリア } //----------------------------------------------------------------------------- // 最初に作成するタスク void GameSystem::FirstCreateTask() { // タスクシステムを生成 TaskSystem::Create(); //☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ // ゲーム開始時に作成するタスクを以下に記述 ※警告でるから(void)付けてね (void)Bg::Task::Create(); (void)Chikuwa::Task::Create(nullptr); }
12bee160b9b26c909729fda000d433b4280d21da
37302275aff7f8d634297b5d87f4bab40672da33
/src/ObjectPooling/src/Allocator.hpp
cc111bedb69e4d91a78fb10ee764918251fa83bd
[ "MIT" ]
permissive
m1keall1son/MemoryManagement
9e58b756445effd39a925d74022e654dff095064
b38b66607e0691b65348a98df751636bac6b91b6
refs/heads/master
2021-01-25T13:40:50.116415
2018-09-19T15:33:09
2018-09-19T15:33:09
123,600,280
0
0
null
null
null
null
UTF-8
C++
false
false
2,983
hpp
Allocator.hpp
// // AllocatorHost.h // PoolAllocator // // Created by Mike Allison on 2/26/17. // Copyright (c) 2017 Mike Allison. All rights reserved. // #pragma once #include "ObjectTraits.hpp" #include "AllocatorTraits.hpp" #include "HeapPolicy.hpp" #define FORWARD_ALLOCATOR_TRAITS(C) \ typedef typename C::value_type value_type; \ typedef typename C::pointer pointer; \ typedef typename C::const_pointer const_pointer; \ typedef typename C::reference reference; \ typedef typename C::const_reference const_reference; \ typedef typename C::size_type size_type; \ typedef typename C::difference_type difference_type; \ template<typename T, typename PolicyT = heap_policy<T>, typename TraitsT = basic_object_traits<T> > class Allocator : public PolicyT, public TraitsT { public: // Template parameters typedef PolicyT Policy; typedef TraitsT Traits; FORWARD_ALLOCATOR_TRAITS(Policy) template<typename U> struct rebind { typedef Allocator<U, typename Policy::template rebind<U>::other, typename Traits::template rebind<U>::other > other; }; template<typename...Args> Allocator(Args&&...args) : Policy(std::forward<Args>(args)...) {} // Copy Constructor template<typename U, typename PolicyU, typename TraitsU> Allocator(Allocator<U, PolicyU, TraitsU> const& other) : Policy(other), Traits(other) {} }; // Two allocators are not equal unless a specialization says so template<typename T, typename PolicyT, typename TraitsT, typename U, typename PolicyU, typename TraitsU> bool operator==(Allocator<T, PolicyT, TraitsT> const& left, Allocator<U, PolicyU, TraitsU> const& right) { return false; } // Also implement inequality template<typename T, typename PolicyT, typename TraitsT, typename U, typename PolicyU, typename TraitsU> bool operator!=(Allocator<T, PolicyT, TraitsT> const& left, Allocator<U, PolicyU, TraitsU> const& right) { return !(left == right); } // Comparing an allocator to anything else should not show equality template<typename T, typename PolicyT, typename TraitsT, typename OtherAllocator> bool operator==(Allocator<T, PolicyT, TraitsT> const& left, OtherAllocator const& right) { return false; } // Also implement inequality template<typename T, typename PolicyT, typename TraitsT, typename OtherAllocator> bool operator!=(Allocator<T, PolicyT, TraitsT> const& left, OtherAllocator const& right) { return !(left == right); } // Specialize for the heap policy template<typename T, typename TraitsT, typename U, typename TraitsU> bool operator==(Allocator<T, heap_policy<T>, TraitsT> const& left, Allocator<U, heap_policy<U>, TraitsU> const& right) { return true; } // Also implement inequality template<typename T, typename TraitsT, typename U, typename TraitsU> bool operator!=(Allocator<T, heap_policy<T>, TraitsT> const& left, Allocator<U, heap_policy<U>, TraitsU> const& right) { return !(left == right); }
5c061a8969b212262d9044dd6c1eae19ca543134
8da33704014b150b27eff3932f276ad7ec3e0216
/zetasql/common/proto_helper_test.cc
68b3db9097b73ac62b56648e13c77f5f29983db3
[ "Apache-2.0" ]
permissive
georgewfraser/zetasql
2e646eba2d1c88fd37f067c32be48c42eac1e1de
1ff78deddd2e5abe2ae64117ad04176d52f5724d
refs/heads/master
2021-07-13T23:32:39.856333
2020-11-28T23:45:09
2020-11-28T23:45:09
226,554,052
0
1
Apache-2.0
2019-12-07T17:51:12
2019-12-07T17:51:11
null
UTF-8
C++
false
false
8,074
cc
proto_helper_test.cc
// // Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // #include "zetasql/common/proto_helper.h" #include <memory> #include <string> #include <vector> #include "zetasql/base/path.h" #include "google/protobuf/compiler/importer.h" #include "google/protobuf/descriptor.pb.h" #include "google/protobuf/descriptor.h" #include "zetasql/base/testing/status_matchers.h" #include "zetasql/common/testing/testing_proto_util.h" #include "gmock/gmock.h" #include "gtest/gtest.h" #include "absl/memory/memory.h" #include "absl/strings/str_cat.h" namespace zetasql { using ::testing::_; using ::testing::HasSubstr; using ::testing::UnorderedElementsAreArray; using ::zetasql_base::testing::StatusIs; // Need to implement this to catch importing errors. class MultiFileErrorCollector : public google::protobuf::compiler::MultiFileErrorCollector { public: MultiFileErrorCollector() {} MultiFileErrorCollector(const MultiFileErrorCollector&) = delete; MultiFileErrorCollector& operator=(const MultiFileErrorCollector&) = delete; void AddError(const std::string& filename, int line, int column, const std::string& message) override { absl::StrAppend(&error_, "Line ", line, " Column ", column, " :", message, "\n"); } const std::string& GetError() const { return error_; } private: std::string error_; }; // Unittests for helper functions in proto_helper.h class ProtoHelperTest : public ::testing::Test { protected: void SetUp() override { const std::vector<std::string> test_files{ // Order matters for these imports. "google/protobuf/descriptor.proto", "zetasql/public/proto/type_annotation.proto", "zetasql/testdata/test_schema.proto", "zetasql/testdata/referencing_schema.proto", "zetasql/testdata/referenced_schema.proto", "zetasql/testdata/bad_test_schema.proto", "zetasql/testdata/bad_extension_schema.proto", }; source_tree_ = CreateProtoSourceTree(); proto_importer_ = absl::make_unique<google::protobuf::compiler::Importer>( source_tree_.get(), &error_collector_); for (const std::string& test_file : test_files) { ASSERT_THAT(proto_importer_->Import(test_file), testing::NotNull()) << "Error importing " << test_file << ": " << error_collector_.GetError(); } pool_ = absl::make_unique<google::protobuf::DescriptorPool>(proto_importer_->pool()); } absl::Status GetFileDescriptorSetContainingFile( const std::string& filename, google::protobuf::FileDescriptorSet* file_descriptor_set) { file_descriptor_set->Clear(); const google::protobuf::FileDescriptor* file = pool_->FindFileByName(filename); std::set<const google::protobuf::FileDescriptor*> file_descriptors; return PopulateFileDescriptorSet(file, absl::optional<int64_t>(), file_descriptor_set, &file_descriptors); } std::unique_ptr<google::protobuf::compiler::Importer> proto_importer_; MultiFileErrorCollector error_collector_; std::unique_ptr<google::protobuf::compiler::DiskSourceTree> source_tree_; std::unique_ptr<google::protobuf::DescriptorPool> pool_; }; TEST_F(ProtoHelperTest, PopulateFileDescriptorSet) { const google::protobuf::FileDescriptor* file = pool_->FindFileByName( "zetasql/public/proto/type_annotation.proto"); google::protobuf::FileDescriptorSet file_descriptor_set; std::set<const google::protobuf::FileDescriptor*> file_descriptors; ZETASQL_ASSERT_OK(PopulateFileDescriptorSet(file, absl::optional<int64_t>(), &file_descriptor_set, &file_descriptors)); ASSERT_EQ(2, file_descriptor_set.file_size()); EXPECT_THAT(file_descriptor_set.file(0).name(), testing::HasSubstr("/descriptor.proto")); EXPECT_THAT(file_descriptor_set.file(1).name(), testing::HasSubstr("/type_annotation.proto")); ASSERT_EQ(2, file_descriptors.size()); file = pool_->FindFileByName("zetasql/testdata/test_schema.proto"); file_descriptor_set.Clear(); file_descriptors.clear(); ZETASQL_ASSERT_OK(PopulateFileDescriptorSet(file, absl::optional<int64_t>(), &file_descriptor_set, &file_descriptors)); std::vector<testing::Matcher<const std::string&>> expected_proto_matchers = { HasSubstr("/descriptor.proto"), HasSubstr("/type_annotation.proto"), HasSubstr("/wire_format_annotation.proto"), HasSubstr("/test_schema.proto")}; std::vector<std::string> file_names; file_names.reserve(file_descriptor_set.file_size()); for (int i = 0; i < file_descriptor_set.file_size(); ++i) { file_names.push_back(file_descriptor_set.file(i).name()); } ASSERT_THAT(file_names, UnorderedElementsAreArray(expected_proto_matchers)); ASSERT_EQ(expected_proto_matchers.size(), file_descriptors.size()); } TEST_F(ProtoHelperTest, PopulateFileDescriptorSet_TooBig) { const google::protobuf::FileDescriptor* file = pool_->FindFileByName( "zetasql/public/proto/type_annotation.proto"); google::protobuf::FileDescriptorSet file_descriptor_set; std::set<const google::protobuf::FileDescriptor*> file_descriptors; const absl::Status status = PopulateFileDescriptorSet(file, /*file_descriptor_set_max_size_bytes=*/0, &file_descriptor_set, &file_descriptors); ASSERT_FALSE(status.ok()) << status; EXPECT_THAT(status, StatusIs(_, testing::HasSubstr( "Serializing proto descriptors failed due " "to maximum FileDescriptorSet size exceeded"))); } TEST_F(ProtoHelperTest, AddFileDescriptorSetToPool) { google::protobuf::DescriptorPool pool; google::protobuf::FileDescriptorSet file_descriptor_set; ZETASQL_ASSERT_OK(GetFileDescriptorSetContainingFile( "zetasql/public/proto/type_annotation.proto", &file_descriptor_set)); ZETASQL_ASSERT_OK(AddFileDescriptorSetToPool(&file_descriptor_set, &pool)); ASSERT_THAT(pool.FindFileByName( "zetasql/public/proto/type_annotation.proto"), testing::NotNull()); ZETASQL_ASSERT_OK(GetFileDescriptorSetContainingFile( "zetasql/testdata/test_schema.proto", &file_descriptor_set)); ZETASQL_ASSERT_OK(AddFileDescriptorSetToPool(&file_descriptor_set, &pool)); ASSERT_THAT(pool.FindFileByName( "zetasql/testdata/test_schema.proto"), testing::NotNull()); } TEST_F(ProtoHelperTest, AddFileDescriptorSetToPool_IncompleteData) { google::protobuf::DescriptorPool pool; google::protobuf::FileDescriptorSet file_descriptor_set; ZETASQL_ASSERT_OK(GetFileDescriptorSetContainingFile( "zetasql/public/proto/type_annotation.proto", &file_descriptor_set)); google::protobuf::FileDescriptorSet incomplete_file_descriptor_set; *incomplete_file_descriptor_set.add_file() = file_descriptor_set.file(1); auto status = AddFileDescriptorSetToPool(&incomplete_file_descriptor_set, &pool); ASSERT_FALSE(status.ok()); } TEST_F(ProtoHelperTest, AddFileDescriptorSetToPool_BadData) { google::protobuf::DescriptorPool pool; google::protobuf::FileDescriptorSet file_descriptor_set; ZETASQL_ASSERT_OK(GetFileDescriptorSetContainingFile( "zetasql/public/proto/type_annotation.proto", &file_descriptor_set)); *file_descriptor_set.mutable_file(1)->add_dependency() = "inexisting.proto"; auto status = AddFileDescriptorSetToPool(&file_descriptor_set, &pool); ASSERT_FALSE(status.ok()); } } // namespace zetasql
91b7845094840d991e8f600b28c9ab1f82ac5b7d
254c4ed40a61fca41ba688d821ca6db8b2c1ad36
/atcoder/arc116/_a/a.cc
22d8c2c0368cc9be87efef15e7ee2a84a47be3a0
[ "MIT" ]
permissive
candywater/ProCon
a52341a3d84a99e7a148cd32671e1478f8cc9445
7e994d67e5efdf7ac0b1bee5e0b19b317f07e8af
refs/heads/master
2021-07-12T15:29:05.538106
2021-03-30T13:19:58
2021-03-30T13:19:58
43,762,018
0
0
null
null
null
null
UTF-8
C++
false
false
1,711
cc
a.cc
#include <algorithm> #include <climits> #include <iostream> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> #define rep(i, n) for (size_t i = 0; i < (size_t)(n); i++) #define rep2(i, s, n) for (size_t i = (s); i < (size_t)(n); i++) #define rep3(i, s, n) for (long long i = (s); i >= (long long)(n); i--) using namespace std; using ll = long long; vector<int> dx = {0, 1, 0, -1}; vector<int> dy = {1, 0, -1, 0}; template <typename T> void show(T a) { for (auto i : a) { cout << i << " "; } cout << endl; } template <typename T> void showmatrix(T a) { for (auto j : a) { for (auto i : j) { cout << i; } cout << endl; } cout << endl; } void check(int i = 0) { cout << "checkpoint:[" << i << "]" << endl; } const string ODD = "Odd"; const string SAME = "Same"; const string EVEN = "Even"; bool isPrime(ll n) { for (ll i = 2; i * i <= n; i++) { if (n % i == 0) return false; } return true; } void calc(ll n) { if (n == 1) { cout << ODD << endl; } else if (n == 2) { cout << SAME << endl; } else if (n % 2 != 0) { cout << ODD << endl; } else if (n % 4 == 0) { cout << EVEN << endl; } else { cout << SAME << endl; } } int main(int argc, char *argv[]) { ios::sync_with_stdio(false); cin.tie(NULL); // unordered_set<ll> primes; // check(); // rep2(i, 998244352, 998244354){ // if(isPrime(i)){ // primes.insert(i); // cout<<i<<" "; // } // } // check(); // ll t; // cin >> t; // if(primes.count(t)>0){ // cout<<"isprime"; // } // check(); ll t, n; cin >> t; rep(i, t) { cin >> n; calc(n); } }
8d5b0f1ef819adf463a22e433a3a48aea0c0c6d4
2eeb446f7f34bdb75d148161da3ffae35c55645e
/TOANDFRO.cpp
9886753f4d4ba9283806b822d9787d5f77c66574
[]
no_license
Shadowfox38/SPOJ
507eb5a9459bd3c350cfa06d0d63373a65270660
2b02ed6a68b21a30ce9679c6fbc35d5997a42f6b
refs/heads/main
2023-03-20T16:38:11.457241
2021-03-15T06:34:12
2021-03-15T06:34:12
347,862,062
0
0
null
null
null
null
UTF-8
C++
false
false
1,101
cpp
TOANDFRO.cpp
#include<iostream> #include<vector> #include<cmath> #include<algorithm> #include<string> using namespace std; void display(vector<auto> vi) { for(int i=0;i<vi.size();i++) { cout<<vi[i]; } cout<<endl; } #define reset "\033[0m" #define black "\033[30m" #define red "\033[31m" #define green "\033[32m" #define yellow "\033[33m" #define blue "\033[34m" #define magenta "\033[35m" #define cyan "\033[36m" #define white "\033[37m" #define bold_black "\033[1m\033[30m" #define bold_red "\033[1m\033[31m" #define bold_green "\033[1m\033[32m" #define bold_yellow "\033[1m\033[33m" #define bold_blue "\033[1m\033[34m" #define bold_magenta "\033[1m\033[35m" #define bold_cyan "\033[1m\033[36m" #define bold_white "\033[1m\033[37m" int main() { int c,r; string str; while(cin>>c && c!=0) { int j=0; cin>>str; r=(str.length()/c); for(int i=0;i<c;i++) { j=i; for(int k=0;k<r;k++) { cout<<str[j]; if(k%2==0) j=j+(2*c)-(2*i)-1; else j=j+(2*i)+1; } } cout<<endl; } return 0; }
70cc2b02a21e2ed80a6a98928d6d991866f8bfa1
318a7bb3a195e6a9558228a338daab2ae6de5bc9
/nozomi/Classes/extend_nodes/CCImageLoader.h
649310e8689ca167a4944563cee625d377d022fe
[]
no_license
liyonghelpme/iosNozomiVideo
c0ce18e7393d35dca50e0e9b92ab5b682c959b12
b385f23363497eebea7e255b9fb53cdbb6d375b8
refs/heads/master
2020-12-24T17:54:52.769236
2013-07-06T06:02:04
2013-07-06T06:02:04
10,520,426
1
0
null
null
null
null
UTF-8
C++
false
false
823
h
CCImageLoader.h
#ifndef __CAESARS_NODE_CCIMAGELOADER_H__ #define __CAESARS_NODE_CCIMAGELOADER_H__ #include "cocos2d_ext_const.h" #include "base_nodes/CCNode.h" #include "textures/CCTexture2D.h" NS_CC_EXT_BEGIN typedef struct { char* imageFile; char* plistFile; CCTexture2DPixelFormat format; } LoadImageItem; class CCImageLoader: public CCNode { private: LoadImageItem* m_pLoadList; unsigned int m_uBufferSize; unsigned int m_uTotalImages; unsigned int m_uLoadedImages; public: static CCImageLoader* create(); public: CCImageLoader(); ~CCImageLoader(); bool init(); void addImage(const char* pszFileName, const char* plistFileName, CCTexture2DPixelFormat format); virtual void onEnter(); virtual void update(float diff); }; NS_CC_EXT_END #endif //__CAESARS_NODE_CCIMAGELOADER_H__
a6643d2a7454bbe4838e043de2702d4192afd2f4
5353bc9619cd5591aa1affb4d7945f814db7487e
/ngx_http_hi_module/lib/php-x/base.cc
1c6d0de13f10ede1b6bd2103f756ac9dceb08760
[ "BSD-2-Clause" ]
permissive
skyformat99/hi-nginx
56c263121228cb613650123c5bcf52a97ba61cf9
663bb367aa3c6051abd36acd60fb0e09025186da
refs/heads/master
2021-05-10T15:24:59.544311
2019-01-06T14:23:59
2019-01-06T14:23:59
118,550,256
0
0
NOASSERTION
2018-12-04T00:14:05
2018-01-23T03:07:58
C
UTF-8
C++
false
false
9,226
cc
base.cc
/* +----------------------------------------------------------------------+ | PHP-X | +----------------------------------------------------------------------+ | Copyright (c) 2016-2017 The Swoole Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.0 of the GPL license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.gnu.org/licenses/ | | If you did not receive a copy of the GPL3.0 license and are unable | | to obtain it through the world-wide-web, please send a note to | | license@swoole.com so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Author: Tianfeng Han <mikan.tenny@gmail.com> | +----------------------------------------------------------------------+ */ #include "phpx.h" using namespace std; namespace php { unordered_map<string, Resource *> resource_map; unordered_map<string, Class*> class_map; unordered_map<string, Interface*> interface_map; map<const char *, map<const char *, method_t, strCmp>, strCmp> method_map; map<const char *, function_t, strCmp> function_map; map<int, void *> object_array; unordered_map<string, Extension*> _name_to_extension; unordered_map<int, Extension*> _module_number_to_extension; void error(int level, const char *format, ...) { va_list args; va_start(args, format); php_verror(NULL, "", level, format, args); va_end(args); } void echo(const char *format, ...) { va_list args; char *buffer; size_t size; va_start(args, format); size = vspprintf(&buffer, 0, format, args); PHPWRITE(buffer, size); efree(buffer); va_end(args); } String number_format(double num, int decimals, char dec_point, char thousands_sep) { return _php_math_number_format(num, decimals, dec_point, thousands_sep); } int extension_startup(int type, int module_number) { zend_module_entry *module; void *ptr; ZEND_HASH_FOREACH_PTR(&module_registry, ptr) { module = (zend_module_entry *) ptr; if (module_number == module->module_number) { Extension *extension = _name_to_extension[module->name]; extension->started = true; extension->registerIniEntries(module_number); if (extension->onStart) { extension->onStart(); } _module_number_to_extension[module_number] = extension; break; } } ZEND_HASH_FOREACH_END(); return SUCCESS; } void extension_info(zend_module_entry *module) { Extension *extension = _module_number_to_extension[module->module_number]; if (extension->header.size() > 0 && extension->body.size() > 0) { php_info_print_table_start(); auto header = extension->header; size_t size = header.size(); switch (size) { case 2: php_info_print_table_header(size, header[0].c_str(), header[1].c_str()); break; case 3: php_info_print_table_header(size, header[0].c_str(), header[1].c_str(), header[2].c_str()); break; default: error(E_WARNING, "invalid info header size."); return; } for (auto row : extension->body) { size = row.size(); switch (size) { case 2: php_info_print_table_row(size, row[0].c_str(), row[1].c_str()); break; case 3: php_info_print_table_row(size, row[0].c_str(), row[1].c_str(), row[2].c_str()); break; default: error(E_WARNING, "invalid info row size."); return; } } php_info_print_table_end(); } } int extension_shutdown(int type, int module_number) { Extension *extension = _module_number_to_extension[module_number]; if (extension->onShutdown) { extension->onShutdown(); } extension->unregisterIniEntries(module_number); _name_to_extension.erase(extension->name); _module_number_to_extension.erase(module_number); delete extension; return SUCCESS; } int extension_before_request(int type, int module_number) { Extension *extension = _module_number_to_extension[module_number]; if (extension->onBeforeRequest) { extension->onBeforeRequest(); } return SUCCESS; } int extension_after_request(int type, int module_number) { Extension *extension = _module_number_to_extension[module_number]; if (extension->onAfterRequest) { extension->onAfterRequest(); } return SUCCESS; } static inline ZEND_RESULT_CODE _check_args_num(zend_execute_data *data, int num_args) { uint32_t min_num_args = data->func->common.required_num_args; uint32_t max_num_args = data->func->common.num_args; if (num_args < min_num_args || (num_args > max_num_args && max_num_args > 0)) { #if PHP_VERSION_ID < 70200 zend_wrong_parameters_count_error(num_args, min_num_args, max_num_args); #else zend_wrong_parameters_count_error(1, num_args, min_num_args, max_num_args); #endif return FAILURE; } return SUCCESS; } void _exec_function(zend_execute_data *data, zval *return_value) { function_t func = function_map[(const char *) data->func->common.function_name->val]; Args args; zval *param_ptr = ZEND_CALL_ARG(EG(current_execute_data), 1); int arg_count = ZEND_CALL_NUM_ARGS(EG(current_execute_data)); if (_check_args_num(data, arg_count) == FAILURE) { return; } while (arg_count-- > 0) { args.append(param_ptr); param_ptr++; } Variant _retval(return_value, true); func(args, _retval); } void _exec_method(zend_execute_data *data, zval *return_value) { method_t func = method_map[(const char *) data->func->common.scope->name->val][(const char *) data->func->common.function_name->val]; Args args; Object _this(&data->This, true); zval *param_ptr = ZEND_CALL_ARG(EG(current_execute_data), 1); int arg_count = ZEND_CALL_NUM_ARGS(EG(current_execute_data)); if (_check_args_num(data, arg_count) == FAILURE) { return; } while (arg_count-- > 0) { args.append(param_ptr); param_ptr++; } Variant _retval(return_value, true); func(_this, args, _retval); } Variant _call(zval *object, zval *func, Args &args) { Variant retval; zval params[PHPX_MAX_ARGC]; for (int i = 0; i < args.count(); i++) { ZVAL_COPY_VALUE(&params[i], args[i].ptr()); } if (call_user_function(EG(function_table), object, func, retval.ptr(), args.count(), params) == SUCCESS) { return retval; } else { return nullptr; } } Variant _call(zval *object, zval *func) { Variant retval = false; if (call_user_function(EG(function_table), object, func, retval.ptr(), 0, NULL) == 0) { return retval; } else { return nullptr; } } Variant include(string file) { zend_file_handle file_handle; int ret = php_stream_open_for_zend_ex(file.c_str(), &file_handle, USE_PATH | STREAM_OPEN_FOR_INCLUDE); if (ret != SUCCESS) { return false; } zend_string *opened_path; if (!file_handle.opened_path) { file_handle.opened_path = zend_string_init(file.c_str(), file.length(), 0); } opened_path = zend_string_copy(file_handle.opened_path); zval dummy; Variant retval = false; zend_op_array *new_op_array; ZVAL_NULL(&dummy); if (zend_hash_add(&EG(included_files), opened_path, &dummy)) { new_op_array = zend_compile_file(&file_handle, ZEND_INCLUDE); zend_destroy_file_handle(&file_handle); } else { new_op_array = NULL; zend_file_handle_dtor(&file_handle); } zend_string_release(opened_path); if (!new_op_array) { return false; } ZVAL_UNDEF(retval.ptr()); zend_execute(new_op_array, retval.ptr()); destroy_op_array(new_op_array); efree(new_op_array); return retval; } }
de01567f78395f83c6c888eb8512841b289a8125
51d247e7b283ef3733dafc8bba7546c5e30d710f
/Test02.h
20beb66dec8e4f7be87e165fac0cceebc7d878d3
[]
no_license
kij0156/08_28_Test
6f2cbfde3478d6b4da917ccb77b96c9ab4cc813c
8b50f9a23da8403242a91e970174731db08bdd1f
refs/heads/master
2020-07-12T20:50:08.942928
2019-08-28T10:16:45
2019-08-28T10:16:45
204,903,743
0
0
null
null
null
null
UTF-8
C++
false
false
64
h
Test02.h
#pragma once class Test02 { public: Test02(); ~Test02(); };
8168edea8d83d212a5c0144ebce55c208c58b3ed
b3ab39f35766be26469cba75b6e7a6a6b5cf5d9d
/source/Engine/Engine.hpp
dedce281d40a56171470083f8b804e0cad1de387
[]
no_license
simonjamespratt/Aleatoric
bc61802f2eb45a6f25e265f6774f377b1174f56e
31057d405e83588f89de1418e334c1d0a657a04a
refs/heads/master
2023-03-28T01:35:40.641374
2021-03-19T18:24:41
2021-03-19T18:24:41
218,398,291
0
0
null
2021-03-06T18:50:48
2019-10-29T22:51:44
C++
UTF-8
C++
false
false
235
hpp
Engine.hpp
#ifndef Engine_hpp #define Engine_hpp #include <pcg_random.hpp> namespace aleatoric { class Engine { public: Engine(); pcg32 &getEngine(); private: pcg32 m_engine; }; } // namespace aleatoric #endif /* Engine_hpp */
64ef1fd68421a461d20b618cabcb4afc279404b7
6473ddedee678813fb1db5c93a9b4b8048d6fa90
/src/main.cpp
6cefe3775aab68c9bfafb505528cf4b04f29e75c
[ "MIT" ]
permissive
mikeswhitney33/img-viewer
9cf4122d54996daaabec9dd8673e02b1e164ba1a
bdc7471abd62281a942b251d9afbc555d4ad3d7c
refs/heads/master
2020-09-05T15:50:10.435035
2019-11-07T04:06:20
2019-11-07T04:06:20
220,148,253
1
0
null
null
null
null
UTF-8
C++
false
false
5,262
cpp
main.cpp
#include <glad/glad.h> #include <GLFW/glfw3.h> #define STB_IMAGE_IMPLEMENTATION #include <stb_image.h> #include <iostream> unsigned int loadGeometry(); unsigned int loadShader(); unsigned int loadTexture(unsigned char *data, int channels); void framebuffer_resize(GLFWwindow *window, int w, int h); int offsetx, offsety, width, height; int main(int argc, char **argv) { if(argc != 2) { std::cerr << "Usage: " << argv[0] << " <imagename>" << std::endl; return EXIT_FAILURE; } offsetx = 0; offsety = 0; const char *filename = argv[1]; int channels; stbi_set_flip_vertically_on_load(true); unsigned char *data = stbi_load(filename, &width, &height, &channels, 0); if(data == nullptr) { perror(filename); return EXIT_FAILURE; } if(glfwInit() == GLFW_FALSE) { std::cerr << "failed to init glfw" << std::endl; return EXIT_FAILURE; } glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 5); glfwWindowHint(GLFW_OPENGL_CORE_PROFILE, GLFW_OPENGL_CORE_PROFILE); GLFWwindow * window = glfwCreateWindow(width, height, "Image", NULL, NULL); if(window == nullptr) { std::cerr << "failed to make window" << std::endl; glfwTerminate(); return EXIT_FAILURE; } glfwMakeContextCurrent(window); glfwSetFramebufferSizeCallback(window, framebuffer_resize); if(gladLoadGL() == GLFW_FALSE) { std::cerr << "failed to init glad" << std::endl; glfwTerminate(); return EXIT_FAILURE; } glViewport(offsetx, offsety, width, height); unsigned int VAO = loadGeometry(); unsigned int program = loadShader(); unsigned int texture = loadTexture(data, channels); while(!glfwWindowShouldClose(window)) { glClearColor(0, 0, 0, 1); glClear(GL_COLOR_BUFFER_BIT); glBindVertexArray(VAO); glUseProgram(program); glBindTexture(GL_TEXTURE_2D, texture); glUniform1i(glGetUniformLocation(program, "tex"), 0); glDrawArrays(GL_TRIANGLES, 0, 6); glfwSwapBuffers(window); glfwWaitEvents(); glfwPollEvents(); } glfwTerminate(); return EXIT_SUCCESS; } unsigned int loadGeometry() { float vertices[] = {-1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1}; unsigned int VAO; glGenVertexArrays(1, &VAO); glBindVertexArray(VAO); unsigned int VBO; glGenBuffers(1, &VBO); glBindBuffer(GL_ARRAY_BUFFER, VBO); glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW); glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, sizeof(float) * 2, (void*) 0); glEnableVertexAttribArray(0); glBindBuffer(GL_ARRAY_BUFFER, 0); glBindVertexArray(0); return VAO; } unsigned int loadShader() { int success; char infoLog[512]; const char *vCode = "#version 450 core\n" "layout(location = 0) in vec2 aPos;\n" "out vec2 uv;\n" "void main() {\n" "gl_Position = vec4(aPos, 0, 1);\n" "uv = (aPos + 1) / 2;\n" "}\n\0"; unsigned int vShader = glCreateShader(GL_VERTEX_SHADER); glShaderSource(vShader, 1, &vCode, NULL); glCompileShader(vShader); glGetShaderiv(vShader, GL_COMPILE_STATUS, &success); if(!success) { glGetShaderInfoLog(vShader, 512, NULL, infoLog); std::cerr << "SHADER::VERTEX::COMPILE ERROR\n" << infoLog << std::endl; } const char *fCode = "#version 450 core\n" "in vec2 uv;\n" "out vec4 FragColor;" "uniform sampler2D tex;" "void main() {\n" "FragColor = texture(tex, uv);\n" "}\n\0"; unsigned int fShader = glCreateShader(GL_FRAGMENT_SHADER); glShaderSource(fShader, 1, &fCode, NULL); glCompileShader(fShader); glGetShaderiv(fShader, GL_COMPILE_STATUS, &success); if(!success) { glGetShaderInfoLog(fShader, 512, NULL, infoLog); std::cerr << "SHADER::FRAGMENT::COMPILE ERROR\n" << infoLog << std::endl; } unsigned int program = glCreateProgram(); glAttachShader(program, vShader); glAttachShader(program, fShader); glLinkProgram(program); glGetProgramiv(program, GL_LINK_STATUS, &success); if(!success) { glGetProgramInfoLog(program, 512, NULL, infoLog); std::cerr << "SHADER::PROGRAM::LINKING ERROR\n" << infoLog << std::endl; } glDeleteShader(vShader); glDeleteShader(fShader); return program; } unsigned int loadTexture(unsigned char *data, int channels) { unsigned int texture; glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D, texture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); unsigned int format = channels == 3 ? GL_RGB : GL_RGBA; glTexImage2D(GL_TEXTURE_2D, 0, format, width, height, 0, format, GL_UNSIGNED_BYTE, data); glGenerateMipmap(GL_TEXTURE_2D); stbi_image_free(data); return texture; } void framebuffer_resize(GLFWwindow * window, int w, int h) { glViewport(offsetx, offsety, w, h); width = w; height = h; }
21d6beca43b5a04bb1f213ed1231bc5da406b174
903cbd58c474f8961e395b26396be92dcd8efe03
/build-QtRegistration-Desktop_Qt_5_6_3_GCC_64bit-Debug/ui_chat.h
aa3ed29d84ed9a38097c138800209464998bfc6f
[]
no_license
ayrtonlr/dorime
892103b0803411e16f19d376f8fc06c490d8c398
00d01a0f14c0c4cfa6ae0366a9a7a0980f3133e3
refs/heads/master
2022-02-08T22:13:40.914302
2017-12-11T15:09:22
2017-12-11T15:09:22
108,767,720
1
1
null
null
null
null
UTF-8
C++
false
false
4,030
h
ui_chat.h
/******************************************************************************** ** Form generated from reading UI file 'chat.ui' ** ** Created by: Qt User Interface Compiler version 5.6.3 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ #ifndef UI_CHAT_H #define UI_CHAT_H #include <QtCore/QVariant> #include <QtWidgets/QAction> #include <QtWidgets/QApplication> #include <QtWidgets/QButtonGroup> #include <QtWidgets/QDialog> #include <QtWidgets/QGroupBox> #include <QtWidgets/QHBoxLayout> #include <QtWidgets/QHeaderView> #include <QtWidgets/QLineEdit> #include <QtWidgets/QPushButton> #include <QtWidgets/QRadioButton> #include <QtWidgets/QTextEdit> #include <QtWidgets/QVBoxLayout> QT_BEGIN_NAMESPACE class Ui_Chat { public: QVBoxLayout *verticalLayout; QGroupBox *localAdapterBox; QHBoxLayout *horizontalLayout_3; QRadioButton *firstAdapter; QRadioButton *secondAdapter; QTextEdit *chat; QHBoxLayout *horizontalLayout; QLineEdit *sendText; QPushButton *sendButton; QHBoxLayout *horizontalLayout_2; QPushButton *quitButton; void setupUi(QDialog *Chat) { if (Chat->objectName().isEmpty()) Chat->setObjectName(QStringLiteral("Chat")); Chat->resize(400, 300); verticalLayout = new QVBoxLayout(Chat); verticalLayout->setObjectName(QStringLiteral("verticalLayout")); localAdapterBox = new QGroupBox(Chat); localAdapterBox->setObjectName(QStringLiteral("localAdapterBox")); localAdapterBox->setCheckable(false); horizontalLayout_3 = new QHBoxLayout(localAdapterBox); horizontalLayout_3->setObjectName(QStringLiteral("horizontalLayout_3")); firstAdapter = new QRadioButton(localAdapterBox); firstAdapter->setObjectName(QStringLiteral("firstAdapter")); horizontalLayout_3->addWidget(firstAdapter); secondAdapter = new QRadioButton(localAdapterBox); secondAdapter->setObjectName(QStringLiteral("secondAdapter")); horizontalLayout_3->addWidget(secondAdapter); verticalLayout->addWidget(localAdapterBox); chat = new QTextEdit(Chat); chat->setObjectName(QStringLiteral("chat")); chat->setFocusPolicy(Qt::NoFocus); verticalLayout->addWidget(chat); horizontalLayout = new QHBoxLayout(); horizontalLayout->setObjectName(QStringLiteral("horizontalLayout")); sendText = new QLineEdit(Chat); sendText->setObjectName(QStringLiteral("sendText")); horizontalLayout->addWidget(sendText); sendButton = new QPushButton(Chat); sendButton->setObjectName(QStringLiteral("sendButton")); horizontalLayout->addWidget(sendButton); verticalLayout->addLayout(horizontalLayout); horizontalLayout_2 = new QHBoxLayout(); horizontalLayout_2->setObjectName(QStringLiteral("horizontalLayout_2")); verticalLayout->addLayout(horizontalLayout_2); quitButton = new QPushButton(Chat); quitButton->setObjectName(QStringLiteral("quitButton")); verticalLayout->addWidget(quitButton); retranslateUi(Chat); sendButton->setDefault(true); QMetaObject::connectSlotsByName(Chat); } // setupUi void retranslateUi(QDialog *Chat) { Chat->setWindowTitle(QApplication::translate("Chat", "Bluetooth Chat", Q_NULLPTR)); localAdapterBox->setTitle(QApplication::translate("Chat", "Local Bluetooth Adapter", Q_NULLPTR)); firstAdapter->setText(QApplication::translate("Chat", "Default", Q_NULLPTR)); secondAdapter->setText(QString()); sendButton->setText(QApplication::translate("Chat", "Send", Q_NULLPTR)); quitButton->setText(QApplication::translate("Chat", "Quit", Q_NULLPTR)); } // retranslateUi }; namespace Ui { class Chat: public Ui_Chat {}; } // namespace Ui QT_END_NAMESPACE #endif // UI_CHAT_H
ca22b416b2110bb2c6dad6811376c47690a35b74
c7936083a966b9a989b4494a69b977aab1dfe6f3
/Application/plaform_tools.cpp
6a7d17db14d47db3a0fd535b2f1422faf4bd4a6c
[ "Zlib" ]
permissive
JeffM2501/TestFrame
6092493242e1db40c1fdca25045d144f308af6d8
d488fb43f1104c0637a56e3a0902957de7dc9bfd
refs/heads/master
2023-07-10T17:52:26.727513
2021-08-29T01:02:11
2021-08-29T01:02:11
374,242,296
23
4
Zlib
2021-09-06T04:01:03
2021-06-06T01:13:54
C++
UTF-8
C++
false
false
1,644
cpp
plaform_tools.cpp
#include "platform_tools.h" #include "../clip/clip.h" std::string OpenFileDialog(const char* filename, std::vector<std::pair<std::string, std::string>> filterValues); std::string SaveFileDialog(const char* filename, std::vector<std::pair<std::string, std::string>> filterValues); namespace PlatformTools { void CopyImageToClipboard(Image& image) { clip::image_spec spec; spec.width = image.width; spec.height = image.height; spec.bits_per_pixel = 32; spec.bytes_per_row = spec.width * 4; spec.red_mask = 0xff; spec.green_mask = 0xff00; spec.blue_mask = 0xff0000; spec.alpha_mask = 0xff000000; spec.red_shift = 0; spec.green_shift = 8; spec.blue_shift = 16; spec.alpha_shift = 24; clip::image img(image.data, spec); clip::set_image(img); } std::string ShowOpenFileDialog(const char* filename, std::vector<std::pair<std::string, std::string>> filterValues) { return OpenFileDialog(filename, filterValues); } std::string ShowOpenFileDialog(const char* filename) { std::vector<std::pair<std::string, std::string>> filterValues; return OpenFileDialog(filename, filterValues); } std::string ShowSaveFileDialog(const char* filename, std::vector<std::pair<std::string, std::string>> filterValues) { return SaveFileDialog(filename, filterValues); } std::string ShowSaveFileDialog(const char* filename) { std::vector<std::pair<std::string, std::string>> filterValues; return SaveFileDialog(filename, filterValues); } }
8ae0ad581de8dad7dfc9c1953c8816d72dc2cbb4
ed37dfa38bac315b755aebdf8a77ccdfe99b0c5f
/FileManager.h
9615629368cbd9110f3c51a6e282dc433ec72d96
[]
no_license
Gaffelmannen/BasicBank
fc4b3267cfbbf22ab64998585a25a41ad79f2286
49107a19288eab046d198786a6c2d48a7c42b8aa
refs/heads/master
2022-04-23T08:13:11.870473
2020-04-28T09:59:06
2020-04-28T09:59:06
258,707,946
0
0
null
null
null
null
UTF-8
C++
false
false
656
h
FileManager.h
#ifndef FILE_MANAGER_H #define FILE_MANAGER_H #include <iostream> #include <fstream> #include <string> #include <filesystem> #include <vector> #include "Account.h" using namespace std; class FileManager { private: static const std::string BASE_DIR; static const std::string ACCOUNT_FILE_HEADER; static const std::string FILE_ABBREVATION; void WriteToFile(std::string, std::string); vector<string> ReadFromFile(std::string); vector<string> ListFiles(void); vector<vector<string>> ReadAllFiles(void); public: FileManager(void); void SaveAccount(Account*); vector<Account> LoadAllAccounts(void); }; #endif
25548a2034f3861ba9396a8d48e561ab687757ea
3abbb2ce88f9087d3b270aeb384a6dbdc1fad888
/4Sum.cpp
ca85d98574db361270a92ca2448b17d81b24bbd5
[]
no_license
liulin2012/myLeetcode
262c8023ee2021dac02e5b055c0b071b5104f3c0
8a87da475a5206df5c33bfa6fdbab2042ca03a1a
refs/heads/master
2021-01-10T19:39:11.414637
2015-12-04T20:16:31
2015-12-04T20:16:31
30,717,188
0
0
null
null
null
null
UTF-8
C++
false
false
1,235
cpp
4Sum.cpp
class Solution { public: vector<vector<int>> fourSum(vector<int>& nums, int target) { vector<vector<int>> result; if (nums.size() < 4) return result; sort(nums.begin(), nums.end()); int start, end; for (int i = 0; i < nums.size() - 3; i++) { for (int j = i + 1; j < nums.size() - 2; j++) { int target2 = target - nums[i] - nums[j]; start = j + 1; end = nums.size() - 1; while (start < end) { if (nums[start] + nums[end] > target2) end--; else if (nums[start] + nums[end] < target2) start++; else { result.push_back({nums[i], nums[j], nums[start], nums[end]}); start++; end--; while (start != nums.size() - 1 && nums[start] == nums[start - 1]) start++; while (end > start && nums[end] == nums[end + 1]) end--; } } while(j != nums.size() - 1 && nums[j] == nums[j + 1]) j++; } while(i != nums.size() - 2 && nums[i] == nums[i + 1]) i++; } return result; } };
4b9633bd66593af04b68e30193f937c74c73f8d6
34ad34fb18ae96298db85589587285056f1d2aa6
/백준/Gold/2098. 외판원 순회/외판원 순회.cc
859e943f0c355f29827608cfb18498ee7bb2c806
[]
no_license
SeonghyeonKim/BOJ
2a473ac232ab95b12ae9f46b2dbbbc1d31de6929
1dbd78b797ca487555fa4b18558210e5ce4cbb94
refs/heads/master
2023-09-02T18:51:55.842309
2023-08-26T16:05:54
2023-08-26T16:05:54
173,932,904
2
0
null
null
null
null
UTF-8
C++
false
false
876
cc
외판원 순회.cc
#include <iostream> #include <cstring> #define INF 987654321 using namespace std; int N, visit; int board[16][16]; int cost[16][1<<16]; int dfs(int node, int visited) { if(visited == visit) { if(board[node][0]==0) return INF; return board[node][0]; } if(cost[node][visited] != -1) return cost[node][visited]; cost[node][visited] = INF; for(int i=0; i<N; i++) { if(board[node][i]==0) continue; if(visited & (1<<i)) continue; cost[node][visited] = min(cost[node][visited], board[node][i] + dfs(i, visited | (1<<i))); } return cost[node][visited]; } int main() { cin.tie(NULL); ios_base::sync_with_stdio(false); cin >> N; for(int i=0; i<N; i++) { for(int j=0; j<N; j++) { cin >> board[i][j]; } } memset(cost, -1, sizeof(cost)); visit = (1<<N)-1; cout << dfs(0, 1); return 0; }
be1c557bf5bf4397aaccaaec39e466fb5cd440c0
3f6ee25f2036e902aba03aaa51ab52b7b5d9b423
/threadpool/threadpool.h
23db15e45b51543b4e07f7a0ed47b8570f612abe
[]
no_license
liuguiyangnwpu/parallel
1d28525eb538af53e3e8abb85cb0bec929574ad8
ff76b8ee9c149262426bcf0d9bbe570bae9f87d2
refs/heads/master
2021-01-17T11:44:16.291194
2017-03-16T03:48:56
2017-03-16T03:48:56
84,044,142
7
0
null
null
null
null
UTF-8
C++
false
false
2,499
h
threadpool.h
#pragma once #include <pthread.h> #include <unistd.h> #include <deque> #include <iostream> #include <fstream> #include <vector> #include <errno.h> #include <string.h> #include <string> #include <map> #include <set> #include "mutex.h" #include "task.h" #include "log/log.h" /* * This thread pool not manage the memory delete and free * Who Malloc and New, who should pay attention to the memory management ! */ const int DEFAULT_POOL_SIZE = 10; const int STARTED = 0; const int STOPPED = 1; using namespace std; class ThreadPool { public: // 采用单例模式设计线程池 static ThreadPool* getSingleInstance(); // 释放所有线程池中的任务,需要在这个函数推出前将多任务进行保存 static void revokeSingleInstance(); private: ThreadPool(); ~ThreadPool(); private: static ThreadPool* p_ThreadPool; public: int initialize_threadpool(); int destroy_threadpool(); //主要是当线程池运行起来之后会显示增在运行的容量,如果线程池没有运行起来,则放回-1 int runningNumbers(); //当线程池正常创建时,返回线程池的可以接受的最大容量,当线程池没有运行起来的时候,返回-1 int getPoolCapacity(); int add_task(Task* task, const string& task_id); int fetchResultByTaskID(const string task_id, TaskPackStruct& res); void* execute_task(pthread_t thread_id); private: volatile int m_pool_state; Mutex m_task_mutex; Mutex m_finishMap_mutex; Mutex m_taskMap_mutex; CondVar m_task_cond_var; // 线程池使用生产者消费者模型进行设计 // 生产者是任务的发起者,可以产生特定的任务,放入到线程池中 // 消费者就是worker将不断的从任务队列中选择不同的任务,去执行,将执行的结果返回 // 任务队列,生产者将任务直接添加到队列中,如果添加的任务多,超多了规定的容量,则不会接受新的任务 // 消费者从队列的头部不断的取数据,如果队列为空则阻塞或者怎样 std::deque<Task*> m_tasks; std::vector<pthread_t> m_threads; std::set<pthread_t> m_run_threads; map<string, Task*> m_taskMap; // for <task_id, task*> map<string, TaskPackStruct> m_finishMap; // for <task_id, task_all_parameters> // 一个任务一旦被执行就会产生一个任务ID,用户可以根据任务fetch到任务的ID,通过任务ID查询的任务的状态 };
a97aff13d08c2fe7567af8c5aa9a480aab9f8168
a55b00eb64b0658de52e9d9892f49e0739237d0b
/sample/src/pipeline_with_params.cpp
6d11ff9a11ec901f1170fd2311b147f5916b9841
[ "Apache-2.0" ]
permissive
intel/ros2_openvino_toolkit
4eda6723452b909c1aa4541ed9f27744f1243e5f
33485e9b3c8ff2286522925cccba57ac72bf3641
refs/heads/master
2023-08-20T00:57:56.423218
2023-04-21T08:59:07
2023-04-21T08:59:07
148,517,341
155
103
Apache-2.0
2023-09-11T07:23:45
2018-09-12T17:32:50
C++
UTF-8
C++
false
false
3,538
cpp
pipeline_with_params.cpp
// Copyright (c) 2018-2022 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. /** * \brief A sample for this library. This sample performs face detection, * emotions detection, age gender detection and head pose estimation. * \file sample/pipeline_manager.cpp */ #include <rclcpp/rclcpp.hpp> #include <ament_index_cpp/get_resource.hpp> #include <openvino_param_lib/param_manager.hpp> #include <unistd.h> #include <algorithm> #include <chrono> #include <csignal> #include <fstream> #include <functional> #include <iostream> #include <iterator> #include <map> #include <memory> #include <random> #include <string> #include <thread> #include <utility> #include <vector> #include "openvino_wrapper_lib/pipeline.hpp" #include "openvino_wrapper_lib/pipeline_manager.hpp" #include "openvino_wrapper_lib/services/pipeline_processing_server.hpp" #include "openvino_wrapper_lib/slog.hpp" #if(defined(USE_OLD_E_PLUGIN_API)) #include <extension/ext_list.hpp> #endif #include "openvino/openvino.hpp" #include "librealsense2/rs.hpp" #include "opencv2/opencv.hpp" #include "utility.hpp" void signalHandler(int signum) { slog::warn << "!!!!!!!!!!!Interrupt signal (" << signum << ") received!!!!!!!!!!!!" << slog::endl; // cleanup and close up stuff here // terminate program PipelineManager::getInstance().stopAll(); // exit(signum); } int main(int argc, char * argv[]) { rclcpp::init(argc, argv); rclcpp::executors::SingleThreadedExecutor exec; rclcpp::Node::SharedPtr main_node = rclcpp::Node::make_shared("openvino_pipeline"); rclcpp::Node::SharedPtr service_node = std::make_shared<vino_service::PipelineProcessingServer <openvino_msgs::srv::PipelineSrv>>("pipeline_service"); // register signal SIGINT and signal handler //signal(SIGINT, signalHandler); try { std::cout << "OpenVINO: " << ov::get_openvino_version() << std::endl; // ----- Parsing and validation of input args----------------------- std::string config = getConfigPath(argc, argv); if(config.empty()){ throw std::runtime_error("Config File is not correctly set."); return -1; } slog::info << "Config File Path =" << config << slog::endl; Params::ParamManager::getInstance().parse(config); Params::ParamManager::getInstance().print(); auto pipelines = Params::ParamManager::getInstance().getPipelines(); if (pipelines.size() < 1) { throw std::logic_error("Pipeline parameters should be set!"); } for (auto & p : pipelines) { PipelineManager::getInstance().createPipeline(p, main_node); } PipelineManager::getInstance().runAll(); //rclcpp::spin(main_node); exec.add_node(main_node); exec.add_node(service_node); exec.spin(); PipelineManager::getInstance().stopAll(); rclcpp::shutdown(); } catch (const std::exception & error) { slog::err << error.what() << slog::endl; return -2; } catch (...) { slog::err << "Unknown/internal exception happened." << slog::endl; return -3; } return 0; }
40fe68f500c7dfc2782371078b5538ed17a5f386
e6df870cba4bc77eb6a86d03920bd6d874a719f5
/app/src/main/jni/sondmusic/Mp3Encoder.cpp
d5fc905511a9cfa387df35b4b44d18bc9e7d0380
[]
no_license
xingfeng2010/MultiMediaLearn
e0dc5217cdc763ed733609f7c22ce9fbca321a22
9cb20e533753936d662e9363fa0d9ef887732839
refs/heads/master
2021-11-06T08:11:17.964354
2021-11-02T08:09:03
2021-11-02T08:09:03
178,679,291
0
0
null
null
null
null
UTF-8
C++
false
false
1,197
cpp
Mp3Encoder.cpp
// // Created by 李世星 on 2019/3/31. // #include "com_player_xingfeng_multimedia_Mp3Encoder.h" #include "mp3_encoder.h" Mp3Encoder* encoder; JNIEXPORT void JNICALL Java_com_player_xingfeng_multimedia_Mp3Encoder_encode(JNIEnv *, jobject) { LOGI("My Audio Encoder!!!"); encoder->Encode(); } JNIEXPORT jint JNICALL Java_com_player_xingfeng_multimedia_Mp3Encoder_init (JNIEnv *env, jobject obj, jstring pcmPathParam, jint audioChannels, jint bitRate, jint sampleRate, jstring mp3PathParam) { const char * pcmPath = env->GetStringUTFChars(pcmPathParam, NULL); const char * mp3Path = env->GetStringUTFChars(mp3PathParam, NULL); LOGI("Mp3Encoder init come in!!"); encoder = new Mp3Encoder(); int result = encoder->Init(pcmPath,mp3Path,sampleRate, audioChannels, bitRate); LOGI("Mp3Encoder init success"); LOGI("Mp3Encoder releae String start"); env->ReleaseStringUTFChars(pcmPathParam, pcmPath); env->ReleaseStringUTFChars(mp3PathParam, mp3Path); LOGI("Mp3Encoder releae String end"); return result; } JNIEXPORT void JNICALL Java_com_player_xingfeng_multimedia_Mp3Encoder_destroy (JNIEnv *, jobject) { encoder->Destroy(); }
917d101d8e95e1f4e1ecbdc1e2425c83879c77f9
6e69eaf63109c10d434e5c8dcd4ffa16df26e2eb
/src/map_editor/export.cpp
593b2d713307a3c1f19ea26e6eb7d163771a31ea
[]
no_license
UIKit0/dont-stop-running
5e390473f6130724a0a9989d90c8376e00ef1fbd
89635714375234dc3365b468ad27a9f76295d7fb
refs/heads/master
2021-01-15T21:29:18.999842
2015-01-31T13:35:38
2015-01-31T13:35:38
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,696
cpp
export.cpp
#include "export.h" #include <fstream> #include <rapidjson/stringbuffer.h> #include <rapidjson/writer.h> #include "../engine/game_objects/static_tile.h" using namespace std; using namespace rapidjson; namespace dsr { template<typename T, typename V> static void appendMember(Writer<T> &w, std::string memberName, V value); template<typename T, typename E> static void append(Writer<T> &w, E &e); template<typename T> static void append(Writer<T> &w, bool elem) { w.Bool(elem); } template<typename T> static void append(Writer<T> &w, F64 elem) { w.Double(elem); } template<typename T> static void append(Writer<T> &w, F32 elem) { w.Double(elem); } template<typename T> static void append(Writer<T> &w, U32 elem) { w.Int(elem); } template<typename T> static void append(Writer<T> &w, std::string elem) { w.String(elem.c_str()); } template<typename T> static void append(Writer<T> &w, glm::vec2 vec2) { w.StartArray(); w.Double(vec2.x); w.Double(vec2.y); w.EndArray(); } template<typename T> static void append(Writer<T> &w, StaticTile &gameObject) { w.StartObject(); appendMember(w, "name", gameObject.getName()); w.EndObject(); } template<typename T> static void append(Writer<T> &w, LevelMap::Entity &entity) { w.StartObject(); appendMember(w, "type", entity.gameObject->getName()); appendMember(w, "position", entity.position); appendMember(w, "scale", entity.scale); appendMember(w, "rotation", entity.rotation); w.EndObject(); } template<typename T, typename E> static void append(Writer<T> &w, std::vector<E> vector) { w.StartArray(); for (auto &it : vector) { append(w, it); } w.EndArray(); } template<typename T, typename V> static void appendMember(Writer<T> &w, std::string memberName, V value) { w.String(memberName.c_str()); append(w, value); } void exportLevelMap(const std::string &filename, const LevelMap &levelMap) { StringBuffer s; Writer<StringBuffer> writer(s); writer.StartObject(); appendMember(writer, "player_start", levelMap.playerStartPosition); appendMember(writer, "entities", levelMap.entities); // TODO: export shapes // TODO: export background // TODO: export coins // TODO: export particle systems writer.EndObject(); ofstream fout(filename); fout << s.GetString() << endl; fout.close(); } }
cbb6e3b392ec136830078f4e5a61af8e847daf29
dc5fd9e482bd87d72695b14b9e0fd383b2ee9dcf
/src/lib/word.cc
3c1978458f50e3e9123bc11a8257629f3bfcc94a
[]
no_license
Ambier/crf
34dbe42e0c1468480a1222d64f46cf04cb451196
4cb7c8c3ef0537fe519d27a778e5a6272545069f
refs/heads/master
2020-05-25T16:39:44.036071
2013-04-16T08:39:19
2013-04-16T08:39:19
null
0
0
null
null
null
null
UTF-8
C++
false
false
430
cc
word.cc
#include "base.h" #include "hash.h" #include "hashtable/entry.h" namespace NLP { typedef Util::hashtable::StringEntry<uint64_t> WordInfo; uint64_t Word::_freq(void) const { return reinterpret_cast<WordInfo *>(_id)->value; } uint64_t Word::_index(void) const { return reinterpret_cast<WordInfo *>(_id)->index; } const char *Word::_str(void) const { return reinterpret_cast<WordInfo *>(_id)->str; } }
4dbee8081e527c718faf5dd64ee6c11213c1c614
d8faabd4088404d871236bd001c82494d0509e53
/GenBST.h
9cbc99b8e651ecb2a3f5e7f3f2ea83cf19a2c834
[]
no_license
adillon3/CPSC-350-Assignment-5
0e7ef7eb67dd2e658cc8e3966a8222a3ba31f468
948a344281f153448df20372aac4e99161a32dd8
refs/heads/master
2023-01-24T13:51:54.870837
2020-12-05T07:59:15
2020-12-05T07:59:15
318,114,045
0
0
null
null
null
null
UTF-8
C++
false
false
8,110
h
GenBST.h
/******************************* * Andrew Dillon * 2382400 * CPSC 350 * Assignment 05 *******************************/ #ifndef GENBST_H_ #define GENBST_H_ #include "TreeNode.h" template <class x> class GenBST { public: GenBST() { root = nullptr; } GenBST(const GenBST &other) { root = CopyConstructorHelper(other.root); } ~GenBST() { DeleteSubTree(root); } void DeleteTree() { DeleteSubTree(root); root = nullptr; } TreeNode<x>* CopyConstructorHelper(const TreeNode<x>* otherNode) { if(otherNode == nullptr) { return nullptr; } TreeNode<x>* temp = new TreeNode<x>; temp -> key = otherNode -> key; temp -> left = CopyConstructorHelper(otherNode -> left); temp -> right = CopyConstructorHelper(otherNode -> right); return temp; } void InsertNode(x value) { TreeNode<x> *node = new TreeNode<x>(value); if(IsEmpty()) { root = node; } else // not an empty tree, find insertion point { TreeNode<x> *current = root; TreeNode<x> *parent = nullptr; while(true) { //iterate to find insertion point parent = current; if(value < current -> key) { current = current -> left; if(current == nullptr) { //found location parent -> left = node; break; } } else { current = current -> right; if(current == nullptr) { parent -> right = node; break; } } } } } TreeNode<x>* ReturnPointerToNode(x value) { if(IsEmpty()) { return nullptr; } TreeNode<x> *current = root; //tree is not empty, lets go looking for the node while(current != nullptr) { if(current -> key == value) { break; } if(value < current -> key) { current = current -> left; } else { current = current -> right; } }//END while(current != nullptr || current -> key != value) return current; } bool IfSearchNode(x value) { if(IsEmpty()) { return false; } else { //tree is not empty, lets go looking for the node TreeNode<x> *current = root; while(current -> key != value) { if(value < current -> key) { current = current -> left; } else { current = current -> right; } if(current == nullptr) { return false; } } } return true; } bool DeleteNode(x value) { if(IsEmpty()) // root is null { return false; } //invoke search to determine if it exists in the tree or not TreeNode<x>* parent = nullptr; TreeNode<x>* current = root; bool isLeftNode = true; //finding node while(current -> key != value) { parent = current; if(value < current -> key) { isLeftNode = true; current = current -> left; } else { isLeftNode = false; current = current -> right; } if(current == nullptr) { return false; } } // END while(current -> key != value) //at this point, we jave found our key, now we need to delete out InOrder //case: node to be deleted does not have children aka a leafnode if(current -> left == nullptr && current -> right == nullptr) { if(current == root) //root is only node in tree { root = nullptr; } else if(isLeftNode) //left child { parent -> left = nullptr; } else //right child { parent -> right = nullptr; } }//END if(current -> left == nullptr && current -> right == nullptr) //case: node to be deleted has one child, determin of decendent is left or right else if(current -> right == nullptr)//does not have right child, must be left { if(current == root)//root { root = current -> left; } else if(isLeftNode) //left child { parent -> left = current -> left; } else //right child { parent -> right = current -> left; } }// END else if(current -> right == nullptr) else if(current -> left == nullptr)//does not have left child, must be right { if(current == root)//root { root = current -> right; } else if(isLeftNode) //left child { parent -> left = current -> right; } else //right child { parent -> right = current -> right; } }//END else if(current -> left == nullptr) //case: node has 2 children else { //find successor TreeNode<x>* successor = GetSuccessor(current);//current is node to be deleteNode if(current == root) { root = successor; } else if(isLeftNode) { parent -> left = successor; } else { parent -> right = successor; } successor -> left = current -> left; return true; } } TreeNode<x>* GetSuccessor(TreeNode<x> *d)//helper function for delete. d is node to delete { TreeNode<x>* sp = d; TreeNode<x>* successor = d; TreeNode<x>* current = d -> right; while(current != nullptr) { sp = successor; successor = current; current = current -> left; } if(successor != d -> right) { sp -> left = successor -> right; successor -> right = d -> right; } return successor; } bool IsEmpty() { if(root == nullptr) { return true; } else { return false; } } x GetMax() { if(root = nullptr) { throw "Tree Empty: No Max Value"; } TreeNode<x> *temp = root; while(temp -> right != nullptr) { temp = temp -> right; } return temp -> key; } x GetMin() { if(IsEmpty()) { throw "Tree Empty: No Minimum Value"; } TreeNode<x> *temp = root; while(temp -> left != nullptr) { temp = temp -> left; } return temp -> key; } void InOrder() { InOrderHelper(root); } void PostOrder() { PostOrderHelper(root); } void PreOrder() { PreOrderHelper(root); } void SerializeGenBST(ostream& oFile) { SerializeGenBSTHelper(oFile, root); } void SerializeGenBSTHelper(ostream& oFile, TreeNode<x>* parentNode) { if(parentNode == nullptr) { return; } oFile << parentNode -> key; SerializeGenBSTHelper(oFile, parentNode -> left); SerializeGenBSTHelper(oFile, parentNode -> right); } protected: //traversals void InOrderHelper(TreeNode<x>* n) { if(n != nullptr) { InOrderHelper(n -> left); cout << n -> key << endl; InOrderHelper(n -> right); } } void PostOrderHelper(TreeNode<x>* n) { if(n != nullptr) { PostOrderHelper(n -> left); PostOrderHelper(n -> right); cout << n -> key << endl; } } void PreOrderHelper(TreeNode<x>* n) { if(n != nullptr) { cout << n -> key << endl; PreOrderHelper(n -> left); PreOrderHelper(n -> right); } } void DeleteSubTree(TreeNode<x>* n) { if(n == nullptr) { return; } DeleteSubTree(n -> left); DeleteSubTree(n -> right); delete n; n == nullptr; } TreeNode<x> *root; }; #endif // GENBST_H_
d52843edeaa82a2ad8801ca4cb5cf00de9196ffa
f624f88cde99a35da8025c117c694afaa036815f
/concurrency-scheduler-montaserja/time.h
8dcd90c6b97243e556f46317c386fec90065029a
[]
no_license
montaserja/EXTProjects
1288ab61a7e96f4d2eae546112f85d93f784cde2
c2d134d6e71ceb1a25434103d6d86d94a74226a5
refs/heads/master
2022-12-22T11:28:06.996006
2020-09-10T16:51:05
2020-09-10T16:51:05
294,458,229
0
0
null
null
null
null
UTF-8
C++
false
false
1,468
h
time.h
#ifndef __TIME_H__ #define __TIME_H__ #include<time.h> class Time { public: Time(unsigned int time); ~Time(); void now(); Time operator+(Time const & other); Time operator+=(unsigned int & other); time_t get_time() const; private: time_t m_time; unsigned int u_time; }; bool operator<=(Time const & first,Time const & other); bool operator>=(Time const & first,Time const & other); bool operator<(Time const & first,Time const & other); bool operator>(Time const & first,Time const & other); /*********************inline*****************************/ inline Time::Time(unsigned int time) { now(); m_time += time; u_time = time; } inline Time::~Time(){} inline void Time::now() { m_time = time(NULL); } inline Time Time::operator+=(unsigned int & other) { m_time+=other; return *this; } inline Time Time::operator+(Time const & other) { Time result(u_time + other.u_time ); return result; } inline time_t Time::get_time() const { return m_time; } inline bool operator<=(Time const & first,Time const & other) { return (first.get_time() <= other.get_time()); } inline bool operator>=(Time const & first,Time const & other) { return (first.get_time() >= other.get_time()); } inline bool operator<(Time const & first,Time const & other) { return (first.get_time() < other.get_time()); } inline bool operator>(Time const & first,Time const & other) { return (first.get_time() > other.get_time()); } #endif /* __TIME_H__ */
c28eef908874fe7b9768d0f274249c0931c0ebd8
3114f5a15dfda238526b144e170bc3707a066cf7
/ludo/Source.cpp
3825a3dbb674105cef0a94568e91c1f8fd4d5e97
[]
no_license
M-K-Arshad/Snake-and-Ladder
6df2bb84cb18e969d95c3874e31b7bdca8733bd6
233b83b23ce7df7ce8a212c13117f669ddf02421
refs/heads/main
2023-05-13T06:38:28.138848
2021-06-06T19:11:08
2021-06-06T19:11:08
374,430,403
0
0
null
null
null
null
UTF-8
C++
false
false
20,532
cpp
Source.cpp
#include <cmath> #include <iostream> #include<fstream> #include <string> #include <time.h> #include <conio.h> #include "mygraphics.h" #include "myconsole.h" using namespace std; int board[10][10]; COLORREF black = RGB(0, 0, 0); COLORREF white = RGB(255, 255, 255); COLORREF random = RGB(0, 0, 0); COLORREF random1 = RGB(255, 255, 0); COLORREF blue = RGB(255, 0, 0); COLORREF green = RGB(0, 255, 0); void menu(); int y3 = 0; int y4 = 0; int n[5][4]; int l[2][4]; bool qr=true; int objects[2][5] = {0} ; void shield(int x,int y) { x = x + 10; y = y + 10; myLine(x, y, x + 20, y-10, white); myLine(x + 20, y - 10, x + 40, y, white); myLine(x, y, x + 20, y + 20, white); myLine(x + 20, y + 20, x + 40, y,white); } void player1(COLORREF blue = RGB(255, 0, 0),int x = 65 * 11, int y = 65 * 10) { x = x + 20,y=y+10; myEllipse(x, y, x + 15, y + 10, black, blue); myEllipse(x - 10, y + 10, x + 20, y + 35, black, blue); myEllipse(x + 20, y + 10, x + 30, y + 20, black, blue); myEllipse(x - 10, y + 12, x - 15, y + 18, black, blue); myEllipse(x + 10, y + 30, x + 25, y + 40, black, blue); myEllipse(x - 7, y + 30, x - 15, y + 40, black, blue); } void player2(COLORREF green= RGB(0,0,255),int x = 65*12,int y = 65*10) { x = x + 20, y = y + 10; myEllipse(x, y, x + 15, y + 10, black, green); myEllipse(x - 10, y + 10, x + 20, y + 35, black, green); myEllipse(x + 20, y + 10, x + 30, y + 20, black, green); myEllipse(x - 10, y + 12, x - 15, y + 18, black, green); myEllipse(x + 10, y + 30, x + 25, y + 40, black, green); myEllipse(x - 7, y + 30, x - 15, y + 40, black, green); } void dice() { myRect(700, 200, 790, 290, random, random1); } void gladder(int x, int y, int x1, int y1) { x = x + 10; y1 = y1 + 20; for (int i = x,j=y; i < x1&&j<y1;i++,j++) mySetPixel(i,j,black); for (int r = y,g=x; r < y1&&g<x1; r +=10,g+=10) myLine(g, r, g + 20, r-10, black); for (int i = x+30, j = y; i < x1+30&&j < y1; i++, j++) mySetPixel(i, j, black); } void ladder(int a[][4], int row, int col = 4) { for (int i = 0; i < row; i++) { gladder(a[i][0], a[i][1]+10, a[i][2], a[i][3]); } } void sword(int x1, int y1) { myLine(x1, y1, x1 + 5, y1 + 10, random1); for (int q = 0; q < 10; q++) myLine(x1 + 5, y1 + 5 + q, x1 + 5, y1 + 5, RGB(255, 0, 255)); myLine(x1, y1 + 10, x1 + 20, y1 + 10, random1); for (int t = 0; t < 10; t++) myLine(x1 + 5 + t, y1 + 10, x1 + 40, y1 + 40, white); } void numbers(int number, int x, int y, int ht) { switch (number) { case 0: myEllipse(x, y, x + ht, y + ht, random, random); break; case 1: myLine(x, y, x, y + ht, random); break; case 2: myLine(x, y, x + ht, y, random); myLine(x + ht, y, x + ht, y + ht / 2, random); myLine(x + ht, y + ht / 2, x, y + ht / 2, random); myLine(x, y + ht / 2, x, y + ht / 2 + 5, random); myLine(x, y + ht + ht / 5, x + ht, y + ht + ht / 5, random); break; case 3: myLine(x, y, x + ht, y, random); myLine(x + ht, y, x + ht, y + 3 * ht / 5, random); myLine(x + ht, y + 3 * ht / 5, x, y + 3 * ht / 5, random); myLine(x + ht, y + 3 * ht / 5, x + ht, y + 4 * ht / 5 + 2, random); myLine(x, y + ht + ht / 4, x + ht, y + ht + ht / 4, random); break; case 4: myLine(x, y, x, y + 3 * ht / 5, random); myLine(x, y + 3 * ht / 5, x + ht, y + 3 * ht / 5, random); myLine(x + 2 * ht / 5, y + ht / 4, x + 2 * ht / 5, y + 4 * ht / 5 + 3, random); break; case 5: myLine(x, y, x + ht, y, random); myLine(x, y, x, y + 3 * ht / 5, random); myLine(x + ht, y + 3 * ht / 5, x, y + 3 * ht / 5, random); myLine(x + ht, y + 3 * ht / 5, x + ht, y + 4 * ht / 5, random); myLine(x, y + ht + ht / 4, x + ht, y + ht + ht / 4, random); break; case 6: myLine(x, y, x + ht, y, random); myLine(x, y, x, y + ht + ht / 5, random); myLine(x, y + ht + ht / 5, x + ht, y + ht + ht / 5, random); myLine(x + ht, y + ht + ht / 5, x + ht, y + ht / 2, random); myLine(x + ht, y + ht / 2, x, y + ht / 2, random); break; case 7: myLine(x, y, x + ht, y, random); myLine(x + ht, y, x + 4 * ht / 5, y + ht, random); break; case 8: myLine(x, y, x + ht, y, random); myLine(x, y, x, y + ht + ht / 4, random); myLine(x + ht, y, x + ht, y + ht + ht / 4, random); myLine(x, y + ht + ht / 4, x + ht, y + ht + ht / 4, random); myLine(x, y + 3 * ht / 5, x + ht, y + 3 + ht / 4, random); break; case 9: myLine(x, y, x + ht, y, random); myLine(x, y, x, y + ht / 2, random); myLine(x + ht, y, x + ht, y + ht + ht / 5, random); myLine(x, y + ht + ht / 5, x + ht, y + ht + ht / 5, random); myLine(x, y + ht / 2, x + ht, y + 3 + ht / 5, random); break; } } int DiceNo() { srand((unsigned)time(NULL)); int no; no = rand() % 6 + 1; int x = 730, y = 230; numbers(no, x, y,30); return no; } void counting() { for (int i = 9,k=0; i >= 0; i--,k++) for (int j = 9,l=0; j>=0; j--,l++) { int x1 = 30 + l * 65, y1 = 30 + k * 65; numbers(i, x1 + 30, y1 + 10, 10); numbers(j, x1 + 45, y1 + 10, 10); } } void snake(int x, int y) { myEllipse(x, y, 40 + x, y + 40, black, white); //face myEllipse(x + 12, y + 12, x + 16, y + 16, black, black); //eye myEllipse(x + 20, y + 12, x + 24, y + 16, black, black); //eye myLine(x + 10, y + 28, x + 30, y + 35, black); //lips } void gsnake(int s[][4], int row, int col,int y) { for (int i = 0; i < y; i++) { snake(s[i][0], s[i][1]); myLine(s[i][0] + 20, s[i][1] + 40, s[i][2] + 10, s[i][3] + 20, white); myLine(s[i][0] + 23, s[i][1] + 40, s[i][2] + 10, s[i][3] + 20, black); myLine(s[i][0] + 25, s[i][1] + 40, s[i][2] + 10, s[i][3] + 20, black); myLine(s[i][0] + 27, s[i][1] + 40, s[i][2] + 10, s[i][3] + 20, white); } } void gcoin(int x,int y) { myEllipse(x+ 4, y + 12, x+30, y+40, RGB(0, 255, 255), RGB(255, 255, 0)); myEllipse(x + 4, y + 5,x+30, y+33, RGB(0, 255, 255), RGB(255, 255, 0)); } void scoin(int x, int y) { myEllipse(x + 4, y + 12, x + 30, y + 40, RGB(0, 25, 255), RGB(240, 240, 240)); myEllipse(x + 4, y + 5, x + 30, y + 33, RGB(0, 25, 255), RGB(240, 240, 240)); } void diamond(int x, int y) { for (int i = 0; i < 40; i++) for (int j = 10; j < 20; j++) myLine(x + i / 5, y + j / 2, x + i / 2 + 10, y + j + 10, RGB(255, 255, 255)); } void draw(int board[][10], bool& qr) { COLORREF g = RGB(0, 255, 0), p = RGB(255, 0, 255), s = RGB(120, 255, 255), b = RGB(100, 100, 255), r = RGB(255, 0, 0), o = RGB(255, 165, 0), y = RGB(255, 255, 0), w = RGB(255, 255, 255); for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { int x1 = 30 + j * 65, y1 = 30 + i * 65; int x2 = 100 + j * 65, y2 = 100 + i * 65; switch (board[i][j]) { case 0: myRect(x1, y1, x2, y2, w, g); sword(x1 + 5, y1 + 5); break; case 1: myRect(x1, y1, x2, y2, w, p); gcoin(x1, y1); break; case 2: myRect(x1, y1, x2, y2, w, s); scoin(x1, y1); case 3: myRect(x1, y1, x2, y2, w, b); if (x1 > 60) { for (int k = 4; k < 48; k += 6) myLine(x1 + k, y1 + 1, x1 + k, y1 + 58, RGB(150, 150, 150)); } break; case 4: myRect(x1, y1, x2, y2, w, r); diamond(x1 + 10, y1 + 20); break; case 5: myRect(x1, y1, x2, y2, w, o); if (qr) { if (!(y4 == 2) && y1 > 180 && x1 > 120 && x1 < 460) { bool c = 1; int p1 = 0; l[y4][p1] = x1; p1++; l[y4][p1] = y1; p1++; l[y4][p1] = x1 + ((rand() % 3) + 1) * 65; for (int i = 0; i < 5; i++) if (l[y4][p1] == n[i][p1]) c = 0; if (c) p1++; else { l[y4][p1] = x1 + ((rand() % 3) + 1) * 65; p1++; for (int i = 0; i < 5; i++) if (l[y4][p1] == n[i][p1]) c = 0; if (c) p1++; else { l[y4][p1] = x1 + ((rand() % 3) + 1) * 65; p1++; } } l[y4][p1] = y1 + ((rand() % 2) + 1) * 65; y4++; } } break; case 6: myRect(x1, y1, x2, y2, w, y); if (qr) { if (!(y3 == 5) && x1>120 && x1 < 420 && y1 < 420) { int p1 = 0; n[y3][p1] = x1; p1++; n[y3][p1] = y1; p1++; n[y3][p1] = x1 + ((rand() % 2) + 1) * 65 + 30; {int c = 0; for (int i = 0; i < 5; i++) if (n[y3][p1] == l[i][p1]) c = 0; if (c) p1++; else { n[y3][p1] = x1 + ((rand() % 3) + 1) * 65 + 30; for (int i = 0; i < 5; i++) if (n[y3][p1] == l[i][p1]) c = 0; if (c) p1++; else { n[y3][p1] = x1 + ((rand() % 3) + 1) * 65; p1++; } } n[y3][p1] = y1 + ((rand() % 3) + 1) * 65; y3++; } } break; case 7: myRect(x1, y1, x2, y2, w, g); shield(x1, y1); break; } } } } gsnake(n, 5, 4, y3); ladder(l, y4); counting(); qr = false; } int yes(int board[][10], int o, int y, int obj[][5], bool a, bool b = 0,bool p=1) { int c = 0; int q; if (!a) q = 0; else q = 1; int i = (o - 30) / 65; int j = (y - 30) / 65; if (b) { switch (board[i][j]) { case 0: myRect(o, y, o + 65, y + 65, white, green); obj[q][0] += 10; c=1; break; case 1: myRect(o, y, o + 65, y + 65, white, green); obj[q][1] += 10; c = 1; break; case 2: myRect(o, y, o + 65, y + 65, white, green); obj[q][2] += 5; c = 1; break; case 3: obj[q][3] -= 20; c = 1; p = 0; break; case 4: obj[q][4] += 50; myRect(o, y, o + 65, y + 65, white, green); c = 1; break; case 7: myRect(o, y, o + 65, y + 65, white, green); obj[q][5] += 20; c = 1; break; } if (c == 1) { myRect(65 * 11, 400, 65 * 14, 500, green, green); if (q==0) myDrawText(65 * 11, 400, 34, "score of player 1:", white, black); else myDrawText(65 * 11, 400, 34, "score of player 2:", white, black); int number = obj[q][0] + obj[q][1] + obj[q][2] + obj[q][3]; int y = 34; if (!(number > 0)) { number = (-number); if (q==1) myDrawText(65 * 11, 400, 34, "score of player 2: -", white, black); else myDrawText(65 * 11, 400, 34, "score of player 1: -", white, black); } if (number == 0) { numbers(i, 65 * 14 - y, 420, 20); number = -1; } while (number >0) { int i = number % 10; numbers(i,65*14-y,420,20); number = number / 10; y = y + y; } } } return p; } int play1(int boad[][10], int n[][4], int l[][4], int& y1,bool&p, int x1 = 9 * 65 + 30) { int bq; int c = 0; int q = 9* 65+30; int y = y1; int o; bool h; myDrawText(700, 100, 30, "press 1 to roll", white, random); cin >> h; draw(boad, qr); player2(black, x1 + 65, y); dice(); int r= DiceNo(); o = x1 - ((r-1) * 65); if (o >= 30) { for (int i = 0; i < 5; i++) if (o == n[i][0] && y == n[i][1]) { myDrawText(750, 100, 23, "if you want to kill snake press 1", black, white); cin >> bq; if (!(bq > 0 && c == 0)) { o = n[i][2], y = n[i][3]; i = 5; player1(RGB(255, 0, 0), o, y); for (int i = 0; i < 5; i++) if (o == n[i][0] && y == n[i][1]) { myDrawText(750, 100, 23, "if you want to kill snake press 1", black, white); cin >> bq; if (!(bq > 0 && c == 0)) { o = n[i][2], y = n[i][3]; i = 5; player1(RGB(255, 0, 0), o, y); y1 = y; return o - 65; } } return o - 65; } } for (int i = 0; i < 2; i++) if (o == l[i][2] && y == l[i][3]) { o = l[i][0], y = l[i][1]; i = 2; player1(RGB(255, 0, 0), o, y); y1 = y; return o - 65; } player1(RGB(255, 0, 0), o, y); myDrawText(400, 0, 34, "do you want to pick this object enter 1", white, black); bool c; cin >> c; p=yes(boad, o, y, objects, 0, c,p); y1 = y; } else { int u=x1; int m=0; while (u >30) { u = u - 65; m++; } r = r - m; o = q - ((r - 1) * 65), y = y1 - 65; for (int i = 0; i < 5; i++) if (o == n[i][0] && y == n[i][1]) { myDrawText(750, 100, 23, "if you want to kill snake press 1", black, white); cin >> bq; if (!(bq > 0 && c == 0)) { o = n[i][2], y = n[i][3]; i = 5; player1(RGB(255, 0, 0), o, y); y1 = y; yes(boad, o, y, objects, 0); return o - 65; } } for (int i = 0; i < 2; i++) if (o == l[i][2] && y == l[i][3]) { o = l[i][0], y = l[i][1]; i = 2; player1(RGB(255, 0, 0), o, y); yes(boad, o, y, objects, 0); y1 = y; return o - 65; } player1(RGB(255, 0, 0), o,y); myDrawText(400, 0, 34, "do you want to pick this object enter 1", white, black); bool c; cin >> c; p= yes(boad, o, y, objects, 0, c,p); y1 = y; return o-65; } return o-65; } int play2(int boad[][10], int n[][4], int l[][4], int& y1,bool& p, int x1 = 9 * 65 + 30) { int c = 0; bool bq = true; int q = 9 * 65 + 30; int y = y1; int o; bool h; myDrawText(700, 100, 30, "press 1 to roll", white, random); cin >> h; draw(boad, qr); player2(black, x1 + 65, y); dice(); int r = DiceNo(); player2(black); o = x1 - ((r - 1) * 65); if (o >= 30) { for (int i = 0; i < 5; i++) { if (o == n[i][0] && y == n[i][1]) { myDrawText(750, 100, 23, "if you want to kill snake press 1", black, white); cin >> bq; if (!(bq>0&&c==0)) { o = n[i][2], y = n[i][3]; i = 5; player2(RGB(0, 0, 255), o, y); for (int i = 0; i < 5; i++) { if (o == n[i][0] && y == n[i][1]) { myDrawText(750, 100, 23, "if you want to kill snake press 1", black, white); cin >> bq; if (!(bq > 0 && c == 0)) o = n[i][2], y = n[i][3]; i = 5; player1(RGB(255, 0, 0), o, y); c++; y1 = y; return o - 65; } c++; y1 = y; return o - 65; } } } } for (int i = 0; i < 2; i++) if (o == l[i][2] && y == l[i][3]) { o = l[i][0], y = l[i][1]; i = 2; player2(RGB(0, 0, 255), o, y); yes(boad, o, y, objects, 1); y1 = y; return o - 65; } myDrawText(400, 0, 34, "do you want to pick this object enter 1", white, black); bool c; cin >> c; p=yes(boad, o, y, objects, 1, c,p); y1 = y; player2(RGB(0, 0, 255), o, y); } else { int u = x1; int m = 0; while (u >30) { u = u - 65; m++; } r = r - m; o = q - ((r - 1) * 65), y = y1 - 65; for (int i = 0; i < 5; i++) { if (o == n[i][0] && y == n[i][1]) { myDrawText(750, 100, 23, "if you want to kill snake press 1", black, white); cin >> bq; if (!(bq> 0&&c==0)) o = n[i][2], y = n[i][3]; i = 5; player1(RGB(255, 0, 0), o, y); c++; y1 = y; return o - 65; } } for (int i = 0; i < 2; i++) if (o == l[i][2] && y == l[i][3]) { o = l[i][0], y = l[i][1]; i = 2; player1(RGB(0, 0, 255), o, y); y1 = y; return o - 65; } player2(RGB(0, 0, 255), o, y); myDrawText(400, 0, 34, "do you want to pick this object enter 1", white, black); bool c; cin >> c; p=yes(boad, o, y, objects,1, c,p); y1 = y; return o - 65; } return o - 65; } void savegame(int x, int y, int x1, int y1,int y3,int y4) { ofstream fout; fout.open("kami&&iffi.txt"); for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { fout << board[i][j] << " "; } fout << endl; } for (int i = 0; i < 5; i++) { for (int j = 0; j < 4; j++) { fout << n[i][j] << " "; } fout << endl; } for (int i = 0; i < 2; i++) { for (int j = 0; j < 4; j++) { fout << l[i][j] << " "; } fout << endl; } for (int i = 0; i < 2; i++) { for (int j = 0; j < 5; j++) { fout << objects[i][j] << " "; } fout << endl; } x = (x - 30) / 65; y = (y - 30) / 65; x1 = (x1 - 30) / 65; y1 = (y1 - 30) / 65; fout << x<<" "; fout << y<<" "; fout << x1<<" "; fout << y1<<" "; fout << y3 << " "; fout << y4 << " "; fout.close(); } void savedgame() { char ch; ifstream fin; fin.open("kami&&iffi.txt"); for (int i = 0; i < 10; i++) for (int j = 0; j < 10; j++) { fin >> board[i][j]; } for (int i = 0; i < 5; i++) for (int j = 0; j < 4; j++) { fin >> n[i][j]; } for (int i = 0; i < 2; i++) for (int j = 0; j < 4; j++) { fin >> l[i][j]; } for (int i = 0; i < 2; i++) for (int j = 0; j < 5; j++) { fin >> objects[i][j]; } int x, x1, y, y1; fin >> x; fin >> y; fin >> x1; fin >> y1; fin >> y3; fin >> y4; fin.close(); qr = 0; int c4 = 0; int end=0; int c3 = 0; int c1 = 0; int c2 = 0; bool p1 = true; bool p2 = true; x = 30 + (x * 65); y = 30 + (y * 65); x1 = 30 + (x1 * 65); y1 = 30 + (y1 * 65); draw(board, qr); player1(RGB(255,0,0),y,x); player2(blue,y1,x1); system("cls"); while (x >= 30 && x1 >= 30) { c3++; if (c3 == 7) { myDrawText(0, 600, 34, "to save game press any key in 1 second or wait", black, white); cin >> end; } if (end == 0) { if (p1) { myDrawText(65 * 11, 130, 30, "player 1 turn", white, black); y = play1(board, n, l, x, p1,y ); system("cls"); } else { c1++; myDrawText(65 * 11, 130, 30, "player 1 is not allowed yet", white, black); if (c1 >= 3) p1 = true; } if (p2) { myDrawText(65 * 11, 130, 30, "player 2 turn", white, black); y1 = play2(board,n, l, x1, p2, y1); system("cls"); } else { c2++; myDrawText(65 * 11, 130, 30, "player 2 is not allowed yet", white, black); if (c2 >= 3) p2 = true; } } else { savegame(x,y,x1,y1,y3,y4); x = 0; c4 = 1; } } if (c4 == 0) { int sum1 = objects[0][0] + objects[0][1] + objects[0][2] + objects[0][3]; int sum2 = objects[1][0] + objects[1][1] + objects[1][2] + objects[1][3]; if (x <30 && sum1>sum2) myDrawTextWithFont(65 * 4, 65 * 4, 100, "player 1 won", white, random1); else if (x1<30 && sum2>sum1) myDrawTextWithFont(65 * 4, 65 * 4, 100, "player 2 won", white, black); else myDrawTextWithFont(65 * 4, 65 * 4, 100, "it is draw", white, black); cout << "the score of 1st player" << sum1; cout << "the score of 2nd player" << sum2; Sleep(1000); } } void go() { srand((unsigned)time(NULL)); qr = true; int c5 = 0; int c3 = 0; int end=0; int c1 = 0; int c2 = 0; bool p1 = true; bool p2 = true; int x=9*65+30; int x1 = 9 * 65 + 30; for (int i = 0; i < 10; i++) for (int j = 0; j < 10; j++) { board[i][j] = rand() % 8; } draw(board,qr); player1(); player2(); myDrawText(65 * 11, 130, 30, "player 1 turn", white, black); int y = play1(board, n, l, x,p1); myDrawText(65 * 11, 130, 30, "player 2 turn", white, black); int y1 = play2(board, n, l, x1,p2); system("cls"); while (x >= 30 && x1 >= 30) { c3++; if (c3 == 7) { myDrawText(0, 600, 34, "to save game press any key in 1 second or wait", black, white); cin >> end; c3 = 0; } if (end==0) { if (p1) { myDrawText(65 * 11, 130, 30, "player 1 turn", white, black); y = play1(board, n, l, x, p1, y); system("cls"); } else { c1++; myDrawText(65 * 11, 130, 30, "player 1 is not allowed yet", white, black); if (c1 >= 3) p1 = true; } if (p2) { myDrawText(65 * 11, 130, 30, "player 2 turn", white, black); y1 = play2(board, n, l, x1, p2, y1); system("cls"); } else { c2++; myDrawText(65 * 11, 130, 30, "player 2 is not allowed yet", white, black); if (c2 >= 3) p2 = true; } } else { savegame(x,y,x1,y1,y3,y4); x = 0; } } int sum1 = objects[0][0] + objects[0][1] + objects[0][2] + objects[0][3]; int sum2 = objects[1][0] + objects[1][1] + objects[1][2] + objects[1][3]; if (x <30 && sum1>sum2) myDrawTextWithFont(65 * 4, 65 * 4, 100, "player 1 won", white, random1); else if (x1<30&&sum2>sum1) myDrawTextWithFont(65 * 4, 65 * 4, 100, "player 2 won", white, black); else myDrawTextWithFont(65 * 4, 65 * 4, 100, "it is draw", white, black); cout <<"the score of 1st player"<< sum1; cout << "the score of 2nd player" << sum2; menu(); } void menu() { int e; myEllipse(0, 0, 680, 650, green, blue); myDrawTextWithFont(100, 100, 50, "The Ludo", white, black); myDrawTextWithFont(100, 150, 30, "by iffat and kamran", white, black); myRect(200, 250, 600, 400, white, RGB(0, 255, 0)); myDrawTextWithFont(220, 250, 40, "press 1 for new game", white, black); myDrawTextWithFont(220, 300, 40, "press 2 for saved game", white, black); myDrawTextWithFont(220, 350, 40, "press 0 for exit", white, black); cin >> e; if (e==1) go(); else if (e==2) savedgame(); } int main() { menu(); system("pause"); return 0; }
21c005fc1a725a63ad553b6b7ffa891f251bd6e1
a831a62b4a744c8b5315bdeef7ad16af1acf4fb0
/codes/hdu/2546.cpp
b321c71c6ad3bcf43f0def06319b57d8d93219ef
[]
no_license
Lodour/ACM-ICPC
a93a039d9557a1c24f141363fc98927e0cb79ead
7c85191f0e0932be3f339696177b483483a394ef
refs/heads/master
2020-04-06T13:11:53.490611
2016-09-17T11:53:42
2016-09-17T11:53:42
42,819,071
0
0
null
null
null
null
UTF-8
C++
false
false
780
cpp
2546.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int maxn = 1010; int a[maxn], dp[maxn]; int main() { #ifndef ONLINE_JUDGE freopen("data.in", "r", stdin); #endif int n, m; while (cin >> n && n) { for (int i = 0; i < n; i++) cin >> a[i]; cin >> m; if (m < 5) { cout << m << endl; continue; } sort(a, a + n); memset(dp, 0, sizeof(dp)); for (int i = 0; i < n - 1; i++) for (int j = m - 5; j >= a[i]; j--) dp[j] = max(dp[j], dp[j - a[i]] + a[i]); cout << m - dp[m - 5] - a[n - 1] << endl; } #ifndef ONLINE_JUDGE cout << "Done..." << endl; while (1); #endif return 0; }
9b0a225c044d1125f033b83fac5e5ff0118c00a5
410294010417d6674c3e205ded162b7e6d5eb710
/data/tplcache/1c75881d83f793dbc0f4d0600a51dcb6.inc
8845d24a1174bf8d2cb2334b9112ccfcacb67c90
[]
no_license
wzsx/gw
44c0fa6e109be1c3e27ec4a860102751f31ec84d
c88e1eb19c3dd04c396bf7abf9cfcf900361b7a3
refs/heads/main
2023-06-27T17:53:47.016925
2021-07-28T03:44:19
2021-07-28T03:44:19
390,202,603
0
0
null
null
null
null
UTF-8
C++
false
false
437
inc
1c75881d83f793dbc0f4d0600a51dcb6.inc
{dede:charset}utf-8{/dede:charset}{dede:list}http://www.baitong666.com/zcgs/list_20_[1-14].html{/dede:list}{dede:page}http://www.baitong666.com/zcgs/(*).html{/dede:page}{dede:titlerule} <h1>[内容]</h1> {/dede:titlerule}{dede:authorrule}达丰财务{/dede:authorrule}{dede:sourcerule}整理自网络{/dede:sourcerule}{dede:bodyrule} <div id="articlecontent">[内容] <div class="dede_pages"> {/dede:bodyrule}{dede:fyrule}{/dede:fyrule}
8ae1b594706bd256536aeb1233bf3e4db0e4b555
359590f39bc97c0d1af3fd62bf7f82607be8fa31
/src/ui/mainform.cpp
fcf1b86ff2efd322bfa8ffc602fb3a3400d10582
[]
no_license
danielwolney/SQtify
24eb66c2eca26fd9aa69d10c2e76926aeb09408f
b6531862677511c6bd251f74932645b84d7f43db
refs/heads/main
2023-02-09T09:11:25.617311
2020-12-19T15:08:26
2020-12-19T15:08:26
321,770,828
0
0
null
null
null
null
UTF-8
C++
false
false
4,533
cpp
mainform.cpp
#include "mainform.h" #include "ui_mainform.h" #include "control/appcontrol.h" #include "api/searchresult.h" #include "ui/searchresultwidget.h" #include "model/playlistmodel.h" #include "model/localtracksmodel.h" #include <QInputDialog> #include <QMessageBox> #include <QAction> #include <QIcon> MainForm::MainForm(AppControl *appControl, QWidget *parent) : QWidget(parent), ui(new Ui::MainForm), m_control(appControl), m_playlistModel(new PlaylistModel()), m_tracksModel(new LocalTracksModel()) { ui->setupUi(this); ui->playlistList->setModel(m_playlistModel); ui->playlistList->setModelColumn(m_playlistModel->columnNameIndex()); auto action = new QAction(QIcon(":/delete-black-24dp.svg"), "Remover"); connect(action, &QAction::triggered, this, &MainForm::removePlaylist); ui->playlistList->addAction(action); ui->playslistTracksList->setModel(m_tracksModel); ui->playslistTracksList->setModelColumn(m_tracksModel->columnNameIndex()); action = new QAction(QIcon(":/play_arrow-green-24dp.svg"), "Play"); connect(action, &QAction::triggered, this, &MainForm::playCurrentTrack); ui->playslistTracksList->addAction(action); action = new QAction(QIcon(":/delete-black-24dp.svg"), "Remover"); connect(action, &QAction::triggered, this, &MainForm::removeCurrentTrack); ui->playslistTracksList->addAction(action); connect(ui->tabWidget, &QTabWidget::tabCloseRequested, this, &MainForm::removeSearchTab); ui->tabWidget->setTabsClosable(true); ui->playerWidget->setPlayer(m_control->player()); ui->playerWidget->setHttpRequestManager(m_control->requestManager()); } MainForm::~MainForm() { delete ui; } int MainForm::createPlaylist() { bool ok = false; QString name = QInputDialog::getText(this, "Nova playlist", "Nova playlist:", QLineEdit::Normal ,"", &ok, (Qt::Popup)); if (ok && !name.isEmpty()) { return m_playlistModel->addPlaylist(name); } return 0; } void MainForm::on_addPlaylist_clicked() { createPlaylist(); } void MainForm::on_btnSearch_clicked() { createSearchTab(ui->searchEdit->text()); ui->searchEdit->clear(); } void MainForm::on_playlistList_clicked(const QModelIndex &index) { m_tracksModel->setCurrentPlaylistID(m_playlistModel->id(index.row())); } void MainForm::removeSearchTab(int tabIndex) { if (tabIndex > 0) { ui->tabWidget->removeTab(tabIndex); } } void MainForm::createSearchTab(QString searchTerm) { if (!searchTerm.isEmpty()) { SearchResult * result = m_control->searchTracks(ui->searchEdit->text()); auto tab = new SearchResultWidget(result, m_playlistModel); connect(tab, &SearchResultWidget::addToPlaylist, this, &MainForm::addTrack); connect(tab, &SearchResultWidget::addToNewPlaylist, this, [&, this](QJsonObject item) { int id = createPlaylist(); addTrack(id, item); }); ui->tabWidget->setCurrentIndex(ui->tabWidget->addTab(tab, "Resultados: '" + searchTerm + "'")); } } void MainForm::addTrack(int playlistID, QJsonObject trackItem) { m_tracksModel->addPlaylistTrack(playlistID, trackItem); } void MainForm::on_playslistTracksList_doubleClicked(const QModelIndex &index) { playTrack(index); } void MainForm::removeTrack(const QModelIndex &index) { if (QMessageBox::question(this, "Remover música", QString("Remover '%1' da playlist?").arg(m_tracksModel->name(index.row()))) == QMessageBox::Yes) { if (m_tracksModel->removeRow(index.row())) { m_tracksModel->select(); } } } void MainForm::playTrack(const QModelIndex &index) { m_control->startPlaylist(index); } void MainForm::removePlaylist() { QModelIndex index = ui->playlistList->focusIndex(); if (QMessageBox::question(this, "Remover playlist", QString("Remover playlist '%1'?").arg(m_playlistModel->name(index.row()))) == QMessageBox::Yes) { int id = m_playlistModel->id(index.row()); if (m_playlistModel->removeRow(index.row())) { m_playlistModel->select(); m_tracksModel->setCurrentPlaylistID(id); m_tracksModel->removeAll(); } } } void MainForm::removeCurrentTrack() { QModelIndex index = ui->playslistTracksList->focusIndex(); removeTrack(index); } void MainForm::playCurrentTrack() { QModelIndex index = ui->playslistTracksList->focusIndex(); playTrack(index); }
05d01ea305a2101dbdea1f3dfd94213794894b0b
224a3edc1e5271b9f08eb786e0604dbbf7cad045
/Lua/LuaHelpers.h
67520582a5257979ba1fa079fec63fcd06587b2d
[]
no_license
kevinhartman/turnt-bloom
df06de39286fee0232698adafde50f7fff8ff653
402a7b2d1809a58bff17c1ad17abdf92ad4c5621
refs/heads/master
2020-05-17T02:06:40.194856
2014-07-14T15:41:47
2014-07-14T15:41:47
19,090,555
1
0
null
null
null
null
UTF-8
C++
false
false
694
h
LuaHelpers.h
// // LuaHelpers.h // LuaProject // // Created by Kevin Hartman on 4/22/14. // Copyright (c) 2014 Kevin Hartman. All rights reserved. // #ifndef __LuaProject__LuaHelpers__ #define __LuaProject__LuaHelpers__ #include <iostream> #include <lua.hpp> class LuaHelpers { public: static bool getVec3(lua_State *lua, lua_Number *vec3); static bool getVec4(lua_State *lua, lua_Number *vec4); static bool getfield (lua_State *lua, const char *key, lua_Number *value); static bool loadLibs(lua_State *lua); static bool loadFile(lua_State *lua, std::string scriptPath); static bool runFunction(lua_State *lua); }; #endif /* defined(__LuaProject__LuaHelpers__) */
dbe01219aa532d87714c52173299c62055d88ca7
440f814f122cfec91152f7889f1f72e2865686ce
/src/game_server/server/extension/item/request_get_packet_item_template.cc
34f32781596f48a5148dc566cf0045e8a2e3d7fd
[]
no_license
hackerlank/buzz-server
af329efc839634d19686be2fbeb700b6562493b9
f76de1d9718b31c95c0627fd728aba89c641eb1c
refs/heads/master
2020-06-12T11:56:06.469620
2015-12-05T08:03:25
2015-12-05T08:03:25
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,224
cc
request_get_packet_item_template.cc
// // Summary: buzz source code. // // Author: LuXuefeng. // Email: lxf@gmail.com. // Last modify: 2013-11-22 21:06:48. // File name: request_get_packet_item_template.cc // // Description: // #include "game_server/server/extension/item/request_get_packet_item_template.h" #include <boost/bind.hpp> #include "game_server/server/extension_manager.h" #include "game_server/server/extension/item/configure.h" #include "game_server/server/extension/item/item.h" #include "game_server/server/extension/item/item_actor.h" #include "game_server/server/extension/item/item_actor_manager.h" #include "game_server/server/request/game_item_request_types.h" #include "game_server/server/request/game_request_types.h" #include "global/logging.h" namespace game { namespace server { namespace item { RequestGetPacketItemTemplate::RequestGetPacketItemTemplate() {} RequestGetPacketItemTemplate::~RequestGetPacketItemTemplate() {} bool RequestGetPacketItemTemplate::Initialize() { ExtensionManager::GetInstance()->SetRequestHandler( request::RequestType::REQUEST_GET_PAKCET_ITEM_TEMPLATE, boost::bind(&RequestGetPacketItemTemplate::OnRequest, this, _1, _2)); return true; } void RequestGetPacketItemTemplate::Finalize() { ExtensionManager::GetInstance()->ResetRequestHandler( request::RequestType::REQUEST_GET_PAKCET_ITEM_TEMPLATE); } int RequestGetPacketItemTemplate::OnRequest(void *message, size_t size) { if(message == NULL || sizeof(request::RequestGetPacketItemTemplate) != size) { global::LogError("%s:%d (%s) 请求获取背包道具个数时,参数错误", __FILE__, __LINE__, __FUNCTION__); return -1; } request::RequestGetPacketItemTemplate *request = (request::RequestGetPacketItemTemplate *)message; // 获取 ItemActor 对象 ItemActor *actor = ItemActorManager::GetInstance()->Get(request->actor_id_); if(actor == NULL) { global::LogError("%s:%d (%s) 请求获取背包道具个数时,道具玩家(%lu)对象 不存在", __FILE__, __LINE__, __FUNCTION__, request->actor_id_); return -1; } // 获取背包容器 PacketContainer *container = (PacketContainer *)actor->GetContainer( entity::ItemContainerType::PACKET); if(container == NULL) { global::LogError("%s:%d (%s) 请求获取背包道具个数时,道具玩家(%lu) 背包 不存在", __FILE__, __LINE__, __FUNCTION__, request->actor_id_); return -1; } // 得到道具模板id Item *item = NULL; if(request->__isset.location_ == true) { item = container->GetItem(request->location_); } else { if(request->__isset.item_id_ == false) { LOG_ERROR("参数错误"); return -1; } item = container->GetItemByID(request->item_id_); } if(item == NULL) { LOG_ERROR("道具没找到位置[%d] item_id[%lu]", request->location_, request->item_id_); return -1; } request->__set_item_template_(item->GetTemplateID()); request->__set_bind_(item->GetAttribute(entity::ItemClientFields::BIND_TYPE) != 0 ? true : false); if(request->__isset.item_extra_info_ == true) { item->ExportExtraInfo(request->item_extra_info_); } return 0; } } // namespace item } // namespace server } // namespace game
dae346700d6aeef4d8b71b4ada8976b29d5f5833
100b22feb26bcfd49bd71d284fd0ad4386b71a07
/src/HTTP.h
02548614d388631d7d919ed79d8b16410e9535a2
[ "MIT" ]
permissive
sebastianbergt/influxdb-cxx
a79e3f26ae5b814ed0eeb053e4e08c38500369e5
e7a186ddf11aecae7521dc44b84bcd6b54c374ee
refs/heads/master
2020-08-21T23:43:49.265523
2019-10-20T20:29:02
2019-10-20T20:29:02
216,273,941
0
0
MIT
2019-10-19T21:41:24
2019-10-19T21:41:24
null
UTF-8
C++
false
false
1,035
h
HTTP.h
/// /// \author Adam Wegrzynek /// #ifndef INFLUXDATA_TRANSPORTS_HTTP_H #define INFLUXDATA_TRANSPORTS_HTTP_H #include "Transport.h" #include <curl/curl.h> #include <memory> #include <string> namespace influxdb { namespace transports { /// \brief HTTP transport class HTTP : public Transport { public: /// Constructor HTTP(const std::string& url); /// Default destructor ~HTTP() = default; /// Sends point via HTTP POST void send(std::string&& post); /// Enable Basic Auth /// \param auth <username>:<password> void enableBasicAuth(const std::string& auth); /// Enable SSL void enableSsl(); private: /// Custom deleter of CURL object static void deleteCurl(CURL * curl); /// Initilizes CURL and all common options CURL* initCurl(const std::string& url); /// CURL smart pointer with custom deleter std::unique_ptr<CURL, decltype(&HTTP::deleteCurl)> curlHandle; }; } // namespace transports } // namespace influxdb #endif // INFLUXDATA_TRANSPORTS_HTTP_H
fd9050c02e31afb7e865f899189bb90fafb0ed6a
ad57ffe2372cf614796e316b4865ba02a760acab
/tcs/csp_solver_stratified_tes.cpp
bb6e35b6c84579e34d0fcf5eb73e684868225113
[ "LGPL-2.0-or-later", "LGPL-2.1-only", "BSD-3-Clause" ]
permissive
NREL/ssc
6208c26a9bbab21d7beca630d61b8640fe073f49
38860345e14a14357cf2ad4f1918729a0c7ac0c6
refs/heads/develop
2023-08-30T10:09:17.654286
2023-08-16T20:27:59
2023-08-16T20:27:59
94,245,800
74
84
BSD-3-Clause
2023-09-14T20:03:50
2017-06-13T18:40:17
C++
UTF-8
C++
false
false
48,037
cpp
csp_solver_stratified_tes.cpp
/* BSD 3-Clause License Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/ssc/blob/develop/LICENSE All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. 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. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "csp_solver_stratified_tes.h" #include "csp_solver_util.h" C_storage_node::C_storage_node() { m_V_prev = m_T_prev = m_m_prev = m_V_total = m_V_active = m_V_inactive = m_UA = m_T_htr = m_max_q_htr = std::numeric_limits<double>::quiet_NaN(); } void C_storage_node::init(HTFProperties htf_class_in, double V_tank_one_temp, double h_tank, bool lid, double u_tank, double tank_pairs, double T_htr, double max_q_htr, double V_ini, double T_ini) { mc_htf = htf_class_in; m_V_total = V_tank_one_temp; //[m^3] double A_cs = m_V_total / (h_tank*tank_pairs); //[m^2] Cross-sectional area of a single tank double diameter = pow(A_cs / CSP::pi, 0.5)*2.0; //[m] Diameter of a single tank if (lid) {// Calculate tank conductance if including top area in losses (top node of stratified tank.) m_UA = u_tank * (A_cs + CSP::pi*diameter*h_tank)*tank_pairs; //[W/K] } if (!lid) {// Calculate tank conductance if only including sides of node m_UA = u_tank * (CSP::pi*diameter*h_tank)*tank_pairs; //[W/K] } m_T_htr = T_htr; m_max_q_htr = max_q_htr; m_V_prev = V_ini; m_T_prev = T_ini; m_m_prev = calc_mass_at_prev(); } double C_storage_node::calc_mass_at_prev() { return m_V_prev * mc_htf.dens(m_T_prev, 1.0); //[kg] } double C_storage_node::get_m_T_prev() { return m_T_prev; //[K] } double C_storage_node::get_m_T_calc() { return m_T_calc; } double C_storage_node::get_m_m_calc() //ARD new getter for current mass { return m_m_calc; } double C_storage_node::m_dot_available(double f_unavail, double timestep) { double rho = mc_htf.dens(m_T_prev, 1.0); //[kg/m^3] double V = m_m_prev / rho; //[m^3] Volume available in tank (one temperature) double V_avail = fmax(V - m_V_inactive, 0.0); //[m^3] Volume that is active - need to maintain minimum height (corresponding m_V_inactive) // "Unavailable" fraction now applied to one temperature tank volume, not total tank volume double m_dot_avail = fmax(V_avail - m_V_active * f_unavail, 0.0)*rho / timestep; //[kg/s] Max mass flow rate available return m_dot_avail; //[kg/s] } void C_storage_node::converged() { // Reset 'previous' timestep values to 'calculated' values m_V_prev = m_V_calc; //[m^3] m_T_prev = m_T_calc; //[K] m_m_prev = m_m_calc; //[kg] } void C_storage_node::energy_balance(double timestep /*s*/, double m_dot_in, double m_dot_out, double T_in /*K*/, double T_amb /*K*/, double &T_ave /*K*/, double & q_heater /*MW*/, double & q_dot_loss /*MW*/) { // Get properties from tank state at the end of last time step double rho = mc_htf.dens(m_T_prev, 1.0); //[kg/m^3] double cp = mc_htf.Cp(m_T_prev)*1000.0; //[J/kg-K] spec heat, convert from kJ/kg-K // Calculate ending volume levels m_m_calc = fmax(0.001, m_m_prev + timestep * (m_dot_in - m_dot_out)); //[kg] Available mass at the end of this timestep, limit to nonzero positive number m_V_calc = m_m_calc / rho; //[m^3] Available volume at end of timestep (using initial temperature...) if ((m_dot_in - m_dot_out) != 0.0) { double a_coef = m_dot_in * T_in + m_UA / cp * T_amb; double b_coef = m_dot_in + m_UA / cp; double c_coef = (m_dot_in - m_dot_out); m_T_calc = a_coef / b_coef + (m_T_prev - a_coef / b_coef)*pow((timestep*c_coef / m_m_prev + 1), -b_coef / c_coef); T_ave = a_coef / b_coef + m_m_prev * (m_T_prev - a_coef / b_coef) / ((c_coef - b_coef)*timestep)*(pow((timestep*c_coef / m_m_prev + 1.0), 1.0 - b_coef / c_coef) - 1.0); q_dot_loss = m_UA * (T_ave - T_amb) / 1.E6; //[MW] if (m_T_calc < m_T_htr) { q_heater = b_coef * ((m_T_htr - m_T_prev * pow((timestep*c_coef / m_m_prev + 1), -b_coef / c_coef)) / (-pow((timestep*c_coef / m_m_prev + 1), -b_coef / c_coef) + 1)) - a_coef; q_heater = q_heater * cp; q_heater /= 1.E6; } else { q_heater = 0.0; return; } if (q_heater > m_max_q_htr) { q_heater = m_max_q_htr; } a_coef += q_heater * 1.E6 / cp; m_T_calc = a_coef / b_coef + (m_T_prev - a_coef / b_coef)*pow((timestep*c_coef / m_m_prev + 1), -b_coef / c_coef); T_ave = a_coef / b_coef + m_m_prev * (m_T_prev - a_coef / b_coef) / ((c_coef - b_coef)*timestep)*(pow((timestep*c_coef / m_m_prev + 1.0), 1.0 - b_coef / c_coef) - 1.0); q_dot_loss = m_UA * (T_ave - T_amb) / 1.E6; //[MW] } else // No mass flow rate, tank is idle { double b_coef = m_UA / (cp*m_m_prev); double c_coef = m_UA / (cp*m_m_prev) * T_amb; m_T_calc = c_coef / b_coef + (m_T_prev - c_coef / b_coef)*exp(-b_coef * timestep); T_ave = c_coef / b_coef - (m_T_prev - c_coef / b_coef) / (b_coef*timestep)*(exp(-b_coef * timestep) - 1.0); q_dot_loss = m_UA * (T_ave - T_amb) / 1.E6; if (m_T_calc < m_T_htr) { q_heater = (b_coef*(m_T_htr - m_T_prev * exp(-b_coef * timestep)) / (-exp(-b_coef * timestep) + 1.0) - c_coef)*cp*m_m_prev; q_heater /= 1.E6; //[MW] } else { q_heater = 0.0; return; } if (q_heater > m_max_q_htr) { q_heater = m_max_q_htr; } c_coef += q_heater * 1.E6 / (cp*m_m_prev); m_T_calc = c_coef / b_coef + (m_T_prev - c_coef / b_coef)*exp(-b_coef * timestep); T_ave = c_coef / b_coef - (m_T_prev - c_coef / b_coef) / (b_coef*timestep)*(exp(-b_coef * timestep) - 1.0); q_dot_loss = m_UA * (T_ave - T_amb) / 1.E6; //[MW] } } void C_storage_node::energy_balance_constant_mass(double timestep /*s*/, double m_dot_in, double T_in /*K*/, double T_amb /*K*/, double &T_ave /*K*/, double & q_heater /*MW*/, double & q_dot_loss /*MW*/) { // Get properties from tank state at the end of last time step double rho = mc_htf.dens(m_T_prev, 1.0); //[kg/m^3] double cp = mc_htf.Cp(m_T_prev)*1000.0; //[J/kg-K] spec heat, convert from kJ/kg-K // Calculate ending volume levels m_m_calc = m_m_prev; //[kg] Available mass at the end of this timestep, same as previous m_V_calc = m_m_calc / rho; //[m^3] Available volume at end of timestep (using initial temperature...) //Analytical method to calculate final temperature at end of timestep double a_coef = m_dot_in / m_m_calc + m_UA / (m_m_calc*cp); double b_coef = m_dot_in / m_m_calc * T_in + m_UA / (m_m_calc*cp)*T_amb; m_T_calc = b_coef / a_coef - (b_coef / a_coef - m_T_prev)*exp(-a_coef * timestep); T_ave = b_coef / a_coef - (b_coef / a_coef - m_T_prev)*exp(-a_coef * timestep / 2); //estimate of average q_dot_loss = m_UA * (T_ave - T_amb) / 1.E6; //[MW] q_heater = 0.0; //Assume no heater. return; } C_csp_stratified_tes::C_csp_stratified_tes() { m_vol_tank = m_V_tank_active = m_q_pb_design = m_V_tank_hot_ini = std::numeric_limits<double>::quiet_NaN(); m_m_dot_tes_dc_max = m_m_dot_tes_ch_max = std::numeric_limits<double>::quiet_NaN(); } void C_csp_stratified_tes::init(const C_csp_tes::S_csp_tes_init_inputs init_inputs) { if (!(ms_params.m_ts_hours > 0.0)) { m_is_tes = false; return; // No storage! } m_is_tes = true; // Declare instance of fluid class for FIELD fluid // Set fluid number and copy over fluid matrix if it makes sense if (ms_params.m_field_fl != HTFProperties::User_defined && ms_params.m_field_fl < HTFProperties::End_Library_Fluids) { if (!mc_field_htfProps.SetFluid(ms_params.m_field_fl)) { throw(C_csp_exception("Field HTF code is not recognized", "Two Tank TES Initialization")); } } else if (ms_params.m_field_fl == HTFProperties::User_defined) { int n_rows = (int)ms_params.m_field_fl_props.nrows(); int n_cols = (int)ms_params.m_field_fl_props.ncols(); if (n_rows > 2 && n_cols == 7) { if (!mc_field_htfProps.SetUserDefinedFluid(ms_params.m_field_fl_props)) { error_msg = util::format(mc_field_htfProps.UserFluidErrMessage(), n_rows, n_cols); throw(C_csp_exception(error_msg, "Two Tank TES Initialization")); } } else { error_msg = util::format("The user defined field HTF table must contain at least 3 rows and exactly 7 columns. The current table contains %d row(s) and %d column(s)", n_rows, n_cols); throw(C_csp_exception(error_msg, "Two Tank TES Initialization")); } } else { throw(C_csp_exception("Field HTF code is not recognized", "Two Tank TES Initialization")); } // Declare instance of fluid class for STORAGE fluid. // Set fluid number and copy over fluid matrix if it makes sense. if (ms_params.m_tes_fl != HTFProperties::User_defined && ms_params.m_tes_fl < HTFProperties::End_Library_Fluids) { if (!mc_store_htfProps.SetFluid(ms_params.m_tes_fl)) { throw(C_csp_exception("Storage HTF code is not recognized", "Two Tank TES Initialization")); } } else if (ms_params.m_tes_fl == HTFProperties::User_defined) { int n_rows = (int)ms_params.m_tes_fl_props.nrows(); int n_cols = (int)ms_params.m_tes_fl_props.ncols(); if (n_rows > 2 && n_cols == 7) { if (!mc_store_htfProps.SetUserDefinedFluid(ms_params.m_tes_fl_props)) { error_msg = util::format(mc_store_htfProps.UserFluidErrMessage(), n_rows, n_cols); throw(C_csp_exception(error_msg, "Two Tank TES Initialization")); } } else { error_msg = util::format("The user defined storage HTF table must contain at least 3 rows and exactly 7 columns. The current table contains %d row(s) and %d column(s)", n_rows, n_cols); throw(C_csp_exception(error_msg, "Two Tank TES Initialization")); } } else { throw(C_csp_exception("Storage HTF code is not recognized", "Two Tank TES Initialization")); } bool is_hx_calc = true; if (ms_params.m_tes_fl != ms_params.m_field_fl) is_hx_calc = true; else if (ms_params.m_field_fl != HTFProperties::User_defined) is_hx_calc = false; else { is_hx_calc = !mc_field_htfProps.equals(&mc_store_htfProps); } if (ms_params.m_is_hx != is_hx_calc) { if (is_hx_calc) mc_csp_messages.add_message(C_csp_messages::NOTICE, "Input field and storage fluids are different, but the inputs did not specify a field-to-storage heat exchanger. The system was modeled assuming a heat exchanger."); else mc_csp_messages.add_message(C_csp_messages::NOTICE, "Input field and storage fluids are identical, but the inputs specified a field-to-storage heat exchanger. The system was modeled assuming no heat exchanger."); ms_params.m_is_hx = is_hx_calc; } // Calculate thermal power to PC at design m_q_pb_design = ms_params.m_W_dot_pc_design / ms_params.m_eta_pc_factor*1.E6; //[Wt] - using pc efficiency factor for cold storage ARD // Convert parameter units ms_params.m_hot_tank_Thtr += 273.15; //[K] convert from C ms_params.m_cold_tank_Thtr += 273.15; //[K] convert from C ms_params.m_T_cold_des += 273.15; //[K] convert from C ms_params.m_T_hot_des += 273.15; //[K] convert from C ms_params.m_T_tank_hot_ini += 273.15; //[K] convert from C ms_params.m_T_tank_cold_ini += 273.15; //[K] convert from C double Q_tes_des = m_q_pb_design / 1.E6 * ms_params.m_ts_hours; //[MWt-hr] TES thermal capacity at design double d_tank_temp = std::numeric_limits<double>::quiet_NaN(); double q_dot_loss_temp = std::numeric_limits<double>::quiet_NaN(); two_tank_tes_sizing(mc_store_htfProps, Q_tes_des, ms_params.m_T_hot_des, ms_params.m_T_cold_des, ms_params.m_h_tank_min, ms_params.m_h_tank, ms_params.m_tank_pairs, ms_params.m_u_tank, m_V_tank_active, m_vol_tank, d_tank_temp, q_dot_loss_temp); // 5.13.15, twn: also be sure that hx is sized such that it can supply full load to power cycle, in cases of low solar multiples double duty = m_q_pb_design * fmax(1.0, ms_params.m_solarm); //[W] Allow all energy from the field to go into storage at any time if (ms_params.m_ts_hours > 0.0) { mc_hx.init(mc_field_htfProps, mc_store_htfProps, duty, ms_params.m_dt_hot, ms_params.m_T_hot_des, ms_params.m_T_cold_des); } // Do we need to define minimum and maximum thermal powers to/from storage? // The 'duty' definition should allow the tanks to accept whatever the field and/or power cycle can provide... // Calculate initial storage values int n_nodes = ms_params.m_ctes_type; //local variable for number of nodes double V_node_ini = m_V_tank_active / n_nodes; //[m^3] Each node has equal volume double T_hot_ini = ms_params.m_T_tank_hot_ini; //[K] double T_cold_ini = ms_params.m_T_tank_cold_ini; //[K] double dT_node_ini = (T_hot_ini - T_cold_ini); //[K] spacing in temperature to initialize // Initialize nodes. For these tanks disregard active versus inactive volume. Use active volume. double h_node = ms_params.m_h_tank / n_nodes; //Height of each section of tank equal divided equally //Cold node (bottom) mc_node_n.init(mc_store_htfProps, V_node_ini, h_node, false, ms_params.m_u_tank, ms_params.m_tank_pairs, ms_params.m_cold_tank_Thtr, ms_params.m_cold_tank_max_heat, V_node_ini, T_cold_ini); switch (n_nodes) { case 6: mc_node_five.init(mc_store_htfProps, V_node_ini, h_node, false, ms_params.m_u_tank, ms_params.m_tank_pairs, ms_params.m_cold_tank_Thtr, ms_params.m_cold_tank_max_heat, V_node_ini, T_cold_ini+(n_nodes-5.0)/(n_nodes-1.0)*dT_node_ini); //Assume equal spacing between initial temperatures case 5: mc_node_four.init(mc_store_htfProps, V_node_ini, h_node, false, ms_params.m_u_tank, ms_params.m_tank_pairs, ms_params.m_cold_tank_Thtr, ms_params.m_cold_tank_max_heat, V_node_ini, T_cold_ini + (n_nodes - 4.0) / (n_nodes - 1.0)*dT_node_ini); case 4: mc_node_three.init(mc_store_htfProps, V_node_ini, h_node, false, ms_params.m_u_tank, ms_params.m_tank_pairs, ms_params.m_cold_tank_Thtr, ms_params.m_cold_tank_max_heat, V_node_ini, T_cold_ini + (n_nodes - 3.0) / (n_nodes - 1.0)*dT_node_ini); case 3: mc_node_two.init(mc_store_htfProps, V_node_ini, h_node, false, ms_params.m_u_tank, ms_params.m_tank_pairs, ms_params.m_cold_tank_Thtr, ms_params.m_cold_tank_max_heat, V_node_ini, T_cold_ini + (n_nodes - 2.0) / (n_nodes - 1.0)*dT_node_ini); } // Hot node (top) mc_node_one.init(mc_store_htfProps, V_node_ini, h_node, true, ms_params.m_u_tank, ms_params.m_tank_pairs, ms_params.m_hot_tank_Thtr, ms_params.m_hot_tank_max_heat, V_node_ini, T_hot_ini); } bool C_csp_stratified_tes::does_tes_exist() { return m_is_tes; } double C_csp_stratified_tes::get_hot_temp() { return mc_node_one.get_m_T_prev(); //[K] } double C_csp_stratified_tes::get_cold_temp() { return mc_node_n.get_m_T_prev(); //[K] } double C_csp_stratified_tes::get_hot_mass() { return mc_node_one.get_m_m_calc(); // [kg] } double C_csp_stratified_tes::get_cold_mass() { return mc_node_n.get_m_m_calc(); //[kg] } double C_csp_stratified_tes::get_hot_mass_prev() { return mc_node_one.calc_mass_at_prev(); // [kg] } double C_csp_stratified_tes::get_cold_mass_prev() { return mc_node_n.calc_mass_at_prev(); //[kg] } double C_csp_stratified_tes::get_physical_volume() { return m_vol_tank; //[m^3] } double C_csp_stratified_tes::get_hot_massflow_avail(double step_s) //[kg/sec] { return mc_node_one.m_dot_available(0, step_s); } double C_csp_stratified_tes::get_cold_massflow_avail(double step_s) //[kg/sec] { return mc_node_n.m_dot_available(0, step_s); } double C_csp_stratified_tes::get_initial_charge_energy() { //MWh if (std::isnan(m_V_tank_hot_ini)) { return m_q_pb_design * ms_params.m_ts_hours * (ms_params.m_f_V_hot_ini / 100.0) * 1.e-6; } else { return m_q_pb_design * ms_params.m_ts_hours * m_V_tank_hot_ini / m_vol_tank * 1.e-6; } } double C_csp_stratified_tes::get_min_charge_energy() { //MWh return 0.; //ms_params.m_q_pb_design * ms_params.m_ts_hours * ms_params.m_h_tank_min / ms_params.m_h_tank*1.e-6; } double C_csp_stratified_tes::get_max_charge_energy() { //MWh //double cp = mc_store_htfProps.Cp(ms_params.m_T_hot_des); //[kJ/kg-K] spec heat at average temperature during discharge from hot to cold // double rho = mc_store_htfProps.dens(ms_params.m_T_hot_des, 1.); // double fadj = (1. - ms_params.m_h_tank_min / ms_params.m_h_tank); // double vol_avail = m_vol_tank * ms_params.m_tank_pairs * fadj; // double e_max = vol_avail * rho * cp * (ms_params.m_T_hot_des - ms_params.m_T_cold_des) / 3.6e6; //MW-hr // return e_max; return m_q_pb_design * ms_params.m_ts_hours / 1.e6; } double C_csp_stratified_tes::get_degradation_rate() { //calculates an approximate "average" tank heat loss rate based on some assumptions. Good for simple optimization performance projections. double d_tank = sqrt(m_vol_tank / ((double)ms_params.m_tank_pairs * ms_params.m_h_tank * 3.14159)); double e_loss = ms_params.m_u_tank * 3.14159 * ms_params.m_tank_pairs * d_tank * (ms_params.m_T_cold_des + ms_params.m_T_hot_des - 576.3)*1.e-6; //MJ/s -- assumes full area for loss, Tamb = 15C return e_loss / (m_q_pb_design * ms_params.m_ts_hours * 3600.); //s^-1 -- fraction of heat loss per second based on full charge } void C_csp_stratified_tes::discharge_avail_est(double T_cold_K, double step_s, double &q_dot_dc_est, double &m_dot_field_est, double &T_hot_field_est) { double f_storage = 0.0; // for now, hardcode such that storage always completely discharges double m_dot_tank_disch_avail = mc_node_one.m_dot_available(f_storage, step_s); //[kg/s] double T_hot_ini = mc_node_one.get_m_T_prev(); //[K] if (ms_params.m_is_hx) { double eff, T_cold_tes; eff = T_cold_tes = std::numeric_limits<double>::quiet_NaN(); mc_hx.hx_discharge_mdot_tes(T_hot_ini, m_dot_tank_disch_avail, T_cold_K, eff, T_cold_tes, T_hot_field_est, q_dot_dc_est, m_dot_field_est); // If above method fails, it will throw an exception, so if we don't want to break here, need to catch and handle it } else { double cp_T_avg = mc_store_htfProps.Cp(0.5*(T_cold_K + T_hot_ini)); //[kJ/kg-K] spec heat at average temperature during discharge from hot to cold q_dot_dc_est = m_dot_tank_disch_avail * cp_T_avg * (T_hot_ini - T_cold_K)*1.E-3; //[MW] m_dot_field_est = m_dot_tank_disch_avail; T_hot_field_est = T_hot_ini; } m_m_dot_tes_dc_max = m_dot_tank_disch_avail * step_s; //[kg/s] } void C_csp_stratified_tes::charge_avail_est(double T_hot_K, double step_s, double &q_dot_ch_est, double &m_dot_field_est, double &T_cold_field_est) { double f_ch_storage = 0.0; // for now, hardcode such that storage always completely charges double m_dot_tank_charge_avail = mc_node_three.m_dot_available(f_ch_storage, step_s); //[kg/s] double T_cold_ini = mc_node_three.get_m_T_prev(); //[K] if (ms_params.m_is_hx) { double eff, T_hot_tes; eff = T_hot_tes = std::numeric_limits<double>::quiet_NaN(); mc_hx.hx_charge_mdot_tes(T_cold_ini, m_dot_tank_charge_avail, T_hot_K, eff, T_hot_tes, T_cold_field_est, q_dot_ch_est, m_dot_field_est); // If above method fails, it will throw an exception, so if we don't want to break here, need to catch and handle it } else { double cp_T_avg = mc_store_htfProps.Cp(0.5*(T_cold_ini + T_hot_K)); //[kJ/kg-K] spec heat at average temperature during charging from cold to hot q_dot_ch_est = m_dot_tank_charge_avail * cp_T_avg * (T_hot_K - T_cold_ini) *1.E-3; //[MW] m_dot_field_est = m_dot_tank_charge_avail; T_cold_field_est = T_cold_ini; } m_m_dot_tes_ch_max = m_dot_tank_charge_avail * step_s; //[kg/s] } void C_csp_stratified_tes::discharge_full(double timestep /*s*/, double T_amb /*K*/, double T_htf_cold_in /*K*/, double & T_htf_hot_out /*K*/, double & m_dot_htf_out /*kg/s*/, S_csp_strat_tes_outputs &outputs) { // This method calculates the hot discharge temperature on the HX side (if applicable) during FULL DISCHARGE. If no heat exchanger (direct storage), // the discharge temperature is equal to the average (timestep) hot tank outlet temperature // Inputs are: // 2) inlet temperature on the HX side (if applicable). If no heat exchanger, the inlet temperature is the temperature // of HTF directly entering the cold tank. double q_heater_cold, q_heater_hot, q_dot_loss_cold, q_dot_loss_hot, T_cold_ave; q_heater_cold = q_heater_hot = q_dot_loss_cold = q_dot_loss_hot = T_cold_ave = std::numeric_limits<double>::quiet_NaN(); // If no heat exchanger, no iteration is required between the heat exchanger and storage tank models if (!ms_params.m_is_hx) { m_dot_htf_out = m_m_dot_tes_dc_max / timestep; //[kg/s] // Call energy balance on hot tank discharge to get average outlet temperature over timestep mc_node_one.energy_balance(timestep, 0.0, m_dot_htf_out, 0.0, T_amb, T_htf_hot_out, q_heater_hot, q_dot_loss_hot); // Call energy balance on cold tank charge to track tank mass and temperature mc_node_three.energy_balance(timestep, m_dot_htf_out, 0.0, T_htf_cold_in, T_amb, T_cold_ave, q_heater_cold, q_dot_loss_cold); } else { // Iterate between field htf - hx - and storage } outputs.m_q_heater = q_heater_cold + q_heater_hot; outputs.m_m_dot = m_dot_htf_out; outputs.m_W_dot_rhtf_pump = m_dot_htf_out * ms_params.m_htf_pump_coef / 1.E3; //[MWe] Pumping power for Receiver HTF, convert from kW/kg/s*kg/s outputs.m_q_dot_loss = q_dot_loss_cold + q_dot_loss_hot; outputs.m_T_hot_ave = T_htf_hot_out; outputs.m_T_cold_ave = T_cold_ave; outputs.m_T_hot_final = mc_node_one.get_m_T_calc(); //[K] outputs.m_T_cold_final = mc_node_three.get_m_T_calc(); //[K] // Calculate thermal power to HTF double T_htf_ave = 0.5*(T_htf_cold_in + T_htf_hot_out); //[K] double cp_htf_ave = mc_field_htfProps.Cp(T_htf_ave); //[kJ/kg-K] outputs.m_q_dot_dc_to_htf = m_dot_htf_out * cp_htf_ave*(T_htf_hot_out - T_htf_cold_in) / 1000.0; //[MWt] outputs.m_q_dot_ch_from_htf = 0.0; //[MWt] } bool C_csp_stratified_tes::discharge(double timestep /*s*/, double T_amb /*K*/, double m_dot_htf_in /*kg/s*/, double T_htf_cold_in /*K*/, double & T_htf_hot_out /*K*/, S_csp_strat_tes_outputs &outputs) { // This method calculates the hot discharge temperature on the HX side (if applicable). If no heat exchanger (direct storage), // the discharge temperature is equal to the average (timestep) hot tank outlet temperature. // Inputs are: // 1) Required hot side mass flow rate on the HX side (if applicable). If no heat exchanger, then the mass flow rate // is equal to the hot tank exit mass flow rate (and cold tank fill mass flow rate) // 2) inlet temperature on the HX side (if applicable). If no heat exchanger, the inlet temperature is the temperature // of HTF directly entering the cold tank. double q_heater_cold, q_heater_hot, q_dot_loss_cold, q_dot_loss_hot, T_cold_ave; q_heater_cold = q_heater_hot = q_dot_loss_cold = q_dot_loss_hot = T_cold_ave = std::numeric_limits<double>::quiet_NaN(); // If no heat exchanger, no iteration is required between the heat exchanger and storage tank models if (!ms_params.m_is_hx) { if (m_dot_htf_in > m_m_dot_tes_dc_max / timestep) { outputs.m_q_heater = std::numeric_limits<double>::quiet_NaN(); outputs.m_m_dot = std::numeric_limits<double>::quiet_NaN(); outputs.m_W_dot_rhtf_pump = std::numeric_limits<double>::quiet_NaN(); outputs.m_q_dot_loss = std::numeric_limits<double>::quiet_NaN(); outputs.m_q_dot_dc_to_htf = std::numeric_limits<double>::quiet_NaN(); outputs.m_q_dot_ch_from_htf = std::numeric_limits<double>::quiet_NaN(); outputs.m_T_hot_ave = std::numeric_limits<double>::quiet_NaN(); outputs.m_T_cold_ave = std::numeric_limits<double>::quiet_NaN(); outputs.m_T_hot_final = std::numeric_limits<double>::quiet_NaN(); outputs.m_T_cold_final = std::numeric_limits<double>::quiet_NaN(); return false; } // Call energy balance on hot tank discharge to get average outlet temperature over timestep mc_node_one.energy_balance(timestep, 0.0, m_dot_htf_in, 0.0, T_amb, T_htf_hot_out, q_heater_hot, q_dot_loss_hot); // Call energy balance on cold tank charge to track tank mass and temperature mc_node_three.energy_balance(timestep, m_dot_htf_in, 0.0, T_htf_cold_in, T_amb, T_cold_ave, q_heater_cold, q_dot_loss_cold); } else { // Iterate between field htf - hx - and storage } outputs.m_q_heater = q_heater_cold + q_heater_hot; //[MWt] outputs.m_m_dot = m_dot_htf_in; outputs.m_W_dot_rhtf_pump = m_dot_htf_in * ms_params.m_htf_pump_coef / 1.E3; //[MWe] Pumping power for Receiver HTF, convert from kW/kg/s*kg/s outputs.m_q_dot_loss = q_dot_loss_cold + q_dot_loss_hot; //[MWt] outputs.m_T_hot_ave = T_htf_hot_out; //[K] outputs.m_T_cold_ave = T_cold_ave; //[K] outputs.m_T_hot_final = mc_node_one.get_m_T_calc(); //[K] outputs.m_T_cold_final = mc_node_three.get_m_T_calc(); //[K] // Calculate thermal power to HTF double T_htf_ave = 0.5*(T_htf_cold_in + T_htf_hot_out); //[K] double cp_htf_ave = mc_field_htfProps.Cp(T_htf_ave); //[kJ/kg-K] outputs.m_q_dot_dc_to_htf = m_dot_htf_in * cp_htf_ave*(T_htf_hot_out - T_htf_cold_in) / 1000.0; //[MWt] outputs.m_q_dot_ch_from_htf = 0.0; //[MWt] return true; } bool C_csp_stratified_tes::charge(double timestep /*s*/, double T_amb /*K*/, double m_dot_htf_in /*kg/s*/, double T_htf_hot_in /*K*/, double & T_htf_cold_out /*K*/, S_csp_strat_tes_outputs &outputs) { // This method calculates the cold charge return temperature on the HX side (if applicable). If no heat exchanger (direct storage), // the return charge temperature is equal to the average (timestep) cold tank outlet temperature. // The method returns FALSE if the input mass flow rate 'm_dot_htf_in' * timestep is greater than the allowable charge // Inputs are: // 1) Required cold side mass flow rate on the HX side (if applicable). If no heat exchanger, then the mass flow rate // is equal to the cold tank exit mass flow rate (and hot tank fill mass flow rate) // 2) Inlet temperature on the HX side (if applicable). If no heat exchanger, the inlet temperature is the temperature // of HTF directly entering the hot tank double q_heater_cold, q_heater_hot, q_dot_loss_cold, q_dot_loss_hot, T_hot_ave; q_heater_cold = q_heater_hot = q_dot_loss_cold = q_dot_loss_hot = T_hot_ave = std::numeric_limits<double>::quiet_NaN(); // If no heat exchanger, no iteration is required between the heat exchanger and storage tank models if (!ms_params.m_is_hx) { if (m_dot_htf_in > m_m_dot_tes_ch_max / timestep) { outputs.m_q_dot_loss = std::numeric_limits<double>::quiet_NaN(); outputs.m_q_heater = std::numeric_limits<double>::quiet_NaN(); outputs.m_m_dot = std::numeric_limits<double>::quiet_NaN(); outputs.m_T_hot_ave = std::numeric_limits<double>::quiet_NaN(); outputs.m_T_cold_ave = std::numeric_limits<double>::quiet_NaN(); outputs.m_T_hot_final = std::numeric_limits<double>::quiet_NaN(); outputs.m_T_cold_final = std::numeric_limits<double>::quiet_NaN(); return false; } // Call energy balance on cold tank discharge to get average outlet temperature over timestep mc_node_three.energy_balance(timestep, 0.0, m_dot_htf_in, 0.0, T_amb, T_htf_cold_out, q_heater_cold, q_dot_loss_cold); // Call energy balance on hot tank charge to track tank mass and temperature mc_node_one.energy_balance(timestep, m_dot_htf_in, 0.0, T_htf_hot_in, T_amb, T_hot_ave, q_heater_hot, q_dot_loss_hot); } else { // Iterate between field htf - hx - and storage } outputs.m_q_heater = q_heater_cold + q_heater_hot; //[MW] Storage thermal losses outputs.m_m_dot = m_dot_htf_in; outputs.m_W_dot_rhtf_pump = m_dot_htf_in * ms_params.m_htf_pump_coef / 1.E3; //[MWe] Pumping power for Receiver HTF, convert from kW/kg/s*kg/s outputs.m_q_dot_loss = q_dot_loss_cold + q_dot_loss_hot; //[MW] Heating power required to keep tanks at a minimum temperature outputs.m_T_hot_ave = T_hot_ave; //[K] Average hot tank temperature over timestep outputs.m_T_cold_ave = T_htf_cold_out; //[K] Average cold tank temperature over timestep outputs.m_T_hot_final = mc_node_one.get_m_T_calc(); //[K] Hot temperature at end of timestep outputs.m_T_cold_final = mc_node_three.get_m_T_calc(); //[K] Cold temperature at end of timestep // Calculate thermal power to HTF double T_htf_ave = 0.5*(T_htf_hot_in + T_htf_cold_out); //[K] double cp_htf_ave = mc_field_htfProps.Cp(T_htf_ave); //[kJ/kg-K] outputs.m_q_dot_ch_from_htf = m_dot_htf_in * cp_htf_ave*(T_htf_hot_in - T_htf_cold_out) / 1000.0; //[MWt] outputs.m_q_dot_dc_to_htf = 0.0; //[MWt] return true; } bool C_csp_stratified_tes::charge_discharge(double timestep /*s*/, double T_amb /*K*/, double m_dot_hot_in /*kg/s*/, double T_hot_in /*K*/, double m_dot_cold_in /*kg/s*/, double T_cold_in /*K*/, S_csp_strat_tes_outputs &outputs) { // ARD This is for simultaneous charge and discharge. If no heat exchanger (direct storage), // the return charge temperature is equal to the average (timestep) cold tank outlet temperature. // The method returns FALSE if the input mass flow rate 'm_dot_htf_in' * timestep is greater than the allowable charge // Inputs are: // 1) (Assumes no heat exchanger) The cold tank exit mass flow rate (and hot tank fill mass flow rate) // 2) The temperature of HTF directly entering the hot tank. // 3) The hot tank exit mass flow rate (and cold tank fill mass flow rate) // 4) The temperature of the HTF directly entering the cold tank. double q_heater_cold, q_heater_hot, q_dot_loss_cold, q_dot_loss_hot, T_hot_ave, T_cold_ave; q_heater_cold = q_heater_hot = q_dot_loss_cold = q_dot_loss_hot = T_hot_ave = T_cold_ave = std::numeric_limits<double>::quiet_NaN(); // If no heat exchanger, no iteration is required between the heat exchanger and storage tank models if (!ms_params.m_is_hx) { if (m_dot_hot_in > m_m_dot_tes_ch_max / timestep) { outputs.m_q_dot_loss = std::numeric_limits<double>::quiet_NaN(); outputs.m_q_heater = std::numeric_limits<double>::quiet_NaN(); outputs.m_m_dot = std::numeric_limits<double>::quiet_NaN(); outputs.m_T_hot_ave = std::numeric_limits<double>::quiet_NaN(); outputs.m_T_cold_ave = std::numeric_limits<double>::quiet_NaN(); outputs.m_T_hot_final = std::numeric_limits<double>::quiet_NaN(); outputs.m_T_cold_final = std::numeric_limits<double>::quiet_NaN(); return false; } // Call energy balance on cold tank discharge to get average outlet temperature over timestep mc_node_three.energy_balance(timestep, m_dot_cold_in, m_dot_hot_in, T_cold_in, T_amb, T_cold_ave, q_heater_cold, q_dot_loss_cold); // Call energy balance on hot tank charge to track tank mass and temperature mc_node_one.energy_balance(timestep, m_dot_hot_in, m_dot_cold_in, T_hot_in, T_amb, T_hot_ave, q_heater_hot, q_dot_loss_hot); } else { // Iterate between field htf - hx - and storage } outputs.m_q_heater = q_heater_cold + q_heater_hot; //[MW] Storage thermal losses outputs.m_m_dot = m_dot_hot_in; outputs.m_W_dot_rhtf_pump = m_dot_hot_in * ms_params.m_htf_pump_coef / 1.E3; //[MWe] Pumping power for Receiver HTF, convert from kW/kg/s*kg/s outputs.m_q_dot_loss = q_dot_loss_cold + q_dot_loss_hot; //[MW] Heating power required to keep tanks at a minimum temperature outputs.m_T_hot_ave = T_hot_ave; //[K] Average hot tank temperature over timestep outputs.m_T_cold_ave = T_cold_ave; //[K] Average cold tank temperature over timestep outputs.m_T_hot_final = mc_node_one.get_m_T_calc(); //[K] Hot temperature at end of timestep outputs.m_T_cold_final = mc_node_three.get_m_T_calc(); //[K] Cold temperature at end of timestep // Calculate thermal power to HTF double T_htf_ave = 0.5*(T_hot_in + T_cold_ave); //[K] double cp_htf_ave = mc_field_htfProps.Cp(T_htf_ave); //[kJ/kg-K] outputs.m_q_dot_ch_from_htf = m_dot_hot_in * cp_htf_ave*(T_hot_in - T_cold_ave) / 1000.0; //[MWt] outputs.m_q_dot_dc_to_htf = 0.0; //[MWt] return true; } bool C_csp_stratified_tes::recirculation(double timestep /*s*/, double T_amb /*K*/, double m_dot_cold_in /*kg/s*/, double T_cold_in /*K*/, S_csp_strat_tes_outputs &outputs) { // This method calculates the average (timestep) cold tank outlet temperature when recirculating cold fluid for further cooling. // This warm tank is idle and its state is also determined. // The method returns FALSE if the input mass flow rate 'm_dot_htf_in' * timestep is greater than the allowable charge // Inputs are: // 1) The cold tank exit mass flow rate // 2) The inlet temperature of HTF directly entering the cold tank double q_heater_cold, q_heater_hot, q_dot_loss_cold, q_dot_loss_hot, T_hot_ave, T_cold_ave; q_heater_cold = q_heater_hot = q_dot_loss_cold = q_dot_loss_hot = T_hot_ave = T_cold_ave = std::numeric_limits<double>::quiet_NaN(); // If no heat exchanger, no iteration is required between the heat exchanger and storage tank models if (!ms_params.m_is_hx) { if (m_dot_cold_in > m_m_dot_tes_ch_max / timestep) //Is this necessary for recirculation mode? ARD { outputs.m_q_dot_loss = std::numeric_limits<double>::quiet_NaN(); outputs.m_q_heater = std::numeric_limits<double>::quiet_NaN(); outputs.m_m_dot = std::numeric_limits<double>::quiet_NaN(); outputs.m_T_hot_ave = std::numeric_limits<double>::quiet_NaN(); outputs.m_T_cold_ave = std::numeric_limits<double>::quiet_NaN(); outputs.m_T_hot_final = std::numeric_limits<double>::quiet_NaN(); outputs.m_T_cold_final = std::numeric_limits<double>::quiet_NaN(); return false; } // Call energy balance on cold tank discharge to get average outlet temperature over timestep mc_node_three.energy_balance(timestep, m_dot_cold_in, m_dot_cold_in, T_cold_in, T_amb, T_cold_ave, q_heater_cold, q_dot_loss_cold); // Call energy balance on hot tank charge to track tank mass and temperature while idle mc_node_one.energy_balance(timestep, 0.0, 0.0, 0.0, T_amb, T_hot_ave, q_heater_hot, q_dot_loss_hot); } else { // Iterate between field htf - hx - and storage } outputs.m_q_heater = q_heater_cold + q_heater_hot; //[MW] Storage thermal losses outputs.m_m_dot = m_dot_cold_in; outputs.m_W_dot_rhtf_pump = m_dot_cold_in * ms_params.m_htf_pump_coef / 1.E3; //[MWe] Pumping power for Receiver HTF, convert from kW/kg/s*kg/s outputs.m_q_dot_loss = q_dot_loss_cold + q_dot_loss_hot; //[MW] Heating power required to keep tanks at a minimum temperature outputs.m_T_hot_ave = T_hot_ave; //[K] Average hot tank temperature over timestep outputs.m_T_cold_ave = T_cold_ave; //[K] Average cold tank temperature over timestep outputs.m_T_hot_final = mc_node_one.get_m_T_calc(); //[K] Hot temperature at end of timestep outputs.m_T_cold_final = mc_node_three.get_m_T_calc(); //[K] Cold temperature at end of timestep // Calculate thermal power to HTF double T_htf_ave = 0.5*(T_cold_in + T_cold_ave); //[K] double cp_htf_ave = mc_field_htfProps.Cp(T_htf_ave); //[kJ/kg-K] outputs.m_q_dot_ch_from_htf = m_dot_cold_in * cp_htf_ave*(T_cold_in - T_cold_ave) / 1000.0; //[MWt] outputs.m_q_dot_dc_to_htf = 0.0; //[MWt] return true; } bool C_csp_stratified_tes::stratified_tanks(double timestep /*s*/, double T_amb /*K*/, double m_dot_cond /*kg/s*/, double T_cond_out /*K*/, double m_dot_rad /*kg/s*/, double T_rad_out /*K*/, S_csp_strat_tes_outputs &outputs) { // ARD This is completing the energy balance on a stratified tank. Uses nodal model in Duffie & Beckman. 3-6 nodes accomodated by this code. // Inputs are: // 1) The mass flow rate through condenser // 2) The temperature of HTF directly entering from the condenser to top node // 3) The mass flow rate through radiator field/HX // 4) The temperature of the HTF directly entering from the radiator to bottom node // Determine mass flow rates for each node and mass-averaged inlet temperature for each node int n_nodes = ms_params.m_ctes_type; //Number of nodes specified in input (3-5) int n_last = n_nodes - 1; //Zero based index of last node double T_node_prev[6] = {}; //Temperatures of each node at previous converged timestep. Initialize to zero. T_node_prev[n_last] = mc_node_n.get_m_T_prev();//Bottom node switch (n_nodes) //Use switch to determine how many other nodes to access { case 6: T_node_prev[4] = mc_node_five.get_m_T_prev(); case 5: T_node_prev[3] = mc_node_four.get_m_T_prev(); case 4: T_node_prev[2] = mc_node_three.get_m_T_prev(); case 3: T_node_prev[1] = mc_node_two.get_m_T_prev(); } T_node_prev[0] = mc_node_one.get_m_T_prev(); //Top node int F_C_node[6] = {}; //Condenser control function determining which node condenser return water goes to int F_C_down[6] = {}; int F_R_node[6] = {}; //Radiator control function determining which node radiator return water goes to int F_R_up[6] = {}; double m_dot_in_node[6] = {};//Mass flow rate into & out of each node double T_in_node[6] = {}; //Mass averaged inlet water temperature double T_node_ave[6] = {}; double q_heater[6] = {}; double q_dot_loss[6] = {}; //Set control function for condenser return flow if (T_cond_out > T_node_prev[0]) { F_C_node[0] = 1; } for (int n = 1; n != n_last; ++n) { if ( (T_node_prev[n-1] >= T_cond_out) && (T_cond_out > T_node_prev[n]) ) { F_C_node[n] = 1; } } if (T_node_prev[n_last-1] >= T_cond_out) { F_C_node[n_last] = 1; } //Set control function for radiator return flow if (T_rad_out > T_node_prev[0]) { F_R_node[0] = 1; } for (int n = 1; n != n_last; ++n) { if ((T_node_prev[n-1] >= T_rad_out) && (T_rad_out > T_node_prev[n])) { F_R_node[n] = 1; } } if (T_node_prev[n_last-1] >= T_rad_out) { F_R_node[n_last] = 1; } //Set mass flow rates for each node for (int j = 1; j != n_last + 1; ++j) //Loop through all nodes below top node { F_R_up[0] = F_R_up[0] + F_R_node[j]; } m_dot_in_node[0] = F_C_node[0] * m_dot_cond + F_C_down[0] * m_dot_cond + F_R_node[0] * m_dot_rad + F_R_up[0] * m_dot_rad; // Top node mass flow rate in T_in_node[0] = (F_C_node[0] * m_dot_cond*T_cond_out + F_R_node[0] * m_dot_rad*T_rad_out + F_R_up[0] * m_dot_rad*T_node_prev[1]) / (0.001 + m_dot_in_node[0]); //Top node mass-averaged temperature in for (int n = 1; n != n_last; ++n) //Loop through all nodes except top and bottom { for (int i = 0; i != n; ++i) //Loop through all nodes above { F_C_down[n] = F_C_down[n] + F_C_node[i]; } for (int j = (n+1); j != n_last+1; ++j) //Loop through all nodes below { F_R_up[n] = F_R_up[n] + F_R_node[j]; } m_dot_in_node[n] = F_C_node[n] * m_dot_cond + F_C_down[n] * m_dot_cond + F_R_node[n] * m_dot_rad + F_R_up[n] * m_dot_rad; T_in_node[n] = (F_C_node[n] * m_dot_cond*T_cond_out + F_C_down[n] * m_dot_cond*T_node_prev[n - 1] + F_R_node[n] * m_dot_rad*T_rad_out + F_R_up[n] * m_dot_rad*T_node_prev[n + 1]) / (0.001 + m_dot_in_node[n]); } for (int i = 0; i != n_last; ++i) //Loop through all nodes above bottom node { F_C_down[n_last] = F_C_down[n_last] + F_C_node[i]; } m_dot_in_node[n_last] = F_C_node[n_last] * m_dot_cond + F_C_down[n_last] * m_dot_cond + F_R_node[n_last] * m_dot_rad; //Bottom node T_in_node[n_last] = (F_C_node[n_last] * m_dot_cond*T_cond_out + F_C_down[n_last] * m_dot_cond*T_node_prev[n_last - 1] + F_R_node[n_last] * m_dot_rad*T_rad_out) / (0.001 + m_dot_in_node[n_last]); // Call energy balance on top node mc_node_n.energy_balance_constant_mass(timestep, m_dot_in_node[n_last], T_in_node[n_last], T_amb, T_node_ave[n_last], q_heater[n_last], q_dot_loss[n_last]); switch (n_nodes) { case 6: mc_node_five.energy_balance_constant_mass(timestep, m_dot_in_node[4], T_in_node[4], T_amb, T_node_ave[4], q_heater[4], q_dot_loss[4]); case 5: mc_node_four.energy_balance_constant_mass(timestep, m_dot_in_node[3], T_in_node[3], T_amb, T_node_ave[3], q_heater[3], q_dot_loss[3]); case 4: mc_node_three.energy_balance_constant_mass(timestep, m_dot_in_node[2], T_in_node[2], T_amb, T_node_ave[2], q_heater[2], q_dot_loss[2]); case 3: mc_node_two.energy_balance_constant_mass(timestep, m_dot_in_node[1], T_in_node[1], T_amb, T_node_ave[1], q_heater[1], q_dot_loss[1]); } mc_node_one.energy_balance_constant_mass(timestep, m_dot_in_node[0], T_in_node[0], T_amb, T_node_ave[0], q_heater[0], q_dot_loss[0]); outputs.m_q_heater = q_heater[0] +q_heater[1] + q_heater[2] + q_heater[4]+q_heater[5]; //[MW] Storage thermal losses //outputs.m_W_dot_rhtf_pump = m_dot_cond * ms_params.m_htf_pump_coef / 1.E3; //[MWe] Pumping power for Receiver HTF, convert from kW/kg/s*kg/s outputs.m_q_dot_loss = q_dot_loss[0] + q_dot_loss[1]+q_dot_loss[2]+q_dot_loss[3]+q_dot_loss[4]+q_dot_loss[5]; //[MW] Heating power required to keep tanks at a minimum temperature outputs.m_T_hot_ave = T_node_ave[0]; //[K] Average hot tank temperature over timestep outputs.m_T_cold_ave = T_node_ave[n_last]; //[K] Average cold tank temperature over timestep outputs.m_T_hot_final = mc_node_one.get_m_T_calc(); //[K] Hot temperature at end of timestep outputs.m_T_cold_final = mc_node_n.get_m_T_calc(); //[K] Cold temperature at end of timestep // Calculate thermal power to HTF - CHECK THESE FOR COLD STORAGE? //double T_htf_ave = 0.5*(T_cond_out + T_node_ave[2]); //[K] //double cp_htf_ave = mc_field_htfProps.Cp(T_htf_ave); //[kJ/kg-K] //outputs.m_q_dot_ch_from_htf = m_dot_cond * cp_htf_ave*(T_cond_out - T_node_ave[2]) / 1000.0; //[MWt] //outputs.m_q_dot_dc_to_htf = 0.0; //[MWt] return true; } void C_csp_stratified_tes::charge_full(double timestep /*s*/, double T_amb /*K*/, double T_htf_hot_in /*K*/, double & T_htf_cold_out /*K*/, double & m_dot_htf_out /*kg/s*/, S_csp_strat_tes_outputs &outputs) { // This method calculates the cold charge return temperature and mass flow rate on the HX side (if applicable) during FULL CHARGE. If no heat exchanger (direct storage), // the charge return temperature is equal to the average (timestep) cold tank outlet temperature // Inputs are: // 1) inlet temperature on the HX side (if applicable). If no heat exchanger, the inlet temperature is the temperature // of HTF directly entering the hot tank. double q_heater_cold, q_heater_hot, q_dot_loss_cold, q_dot_loss_hot, T_hot_ave; q_heater_cold = q_heater_hot = q_dot_loss_cold = q_dot_loss_hot = T_hot_ave = std::numeric_limits<double>::quiet_NaN(); // If no heat exchanger, no iteration is required between the heat exchanger and storage tank models if (!ms_params.m_is_hx) { m_dot_htf_out = m_m_dot_tes_ch_max / timestep; //[kg/s] // Call energy balance on hot tank charge to track tank mass and temperature mc_node_one.energy_balance(timestep, m_dot_htf_out, 0.0, T_htf_hot_in, T_amb, T_hot_ave, q_heater_hot, q_dot_loss_hot); // Call energy balance on cold tank charge to calculate cold HTF return temperature mc_node_three.energy_balance(timestep, 0.0, m_dot_htf_out, 0.0, T_amb, T_htf_cold_out, q_heater_cold, q_dot_loss_cold); } else { // Iterate between field htf - hx - and storage } outputs.m_q_heater = q_heater_cold + q_heater_hot; outputs.m_m_dot = m_dot_htf_out; outputs.m_W_dot_rhtf_pump = m_dot_htf_out * ms_params.m_htf_pump_coef / 1.E3; //[MWe] Pumping power for Receiver HTF, convert from kW/kg/s*kg/s outputs.m_q_dot_loss = q_dot_loss_cold + q_dot_loss_hot; outputs.m_T_hot_ave = T_hot_ave; outputs.m_T_cold_ave = T_htf_cold_out; outputs.m_T_hot_final = mc_node_one.get_m_T_calc(); //[K] outputs.m_T_cold_final = mc_node_three.get_m_T_calc(); //[K] // Calculate thermal power to HTF double T_htf_ave = 0.5*(T_htf_hot_in + T_htf_cold_out); //[K] double cp_htf_ave = mc_field_htfProps.Cp(T_htf_ave); //[kJ/kg-K] outputs.m_q_dot_ch_from_htf = m_dot_htf_out * cp_htf_ave*(T_htf_hot_in - T_htf_cold_out) / 1000.0; //[MWt] outputs.m_q_dot_dc_to_htf = 0.0; //[MWt] } void C_csp_stratified_tes::idle(double timestep, double T_amb, S_csp_strat_tes_outputs &outputs) { int n_nodes = ms_params.m_ctes_type; int n_last = n_nodes - 1; double T_node_ave[6] = {}; double q_heater[6] = {}; double q_dot_loss[6] = {}; // Call energy balance on top node mc_node_n.energy_balance_constant_mass(timestep, 0, 0, T_amb, T_node_ave[n_last], q_heater[n_last], q_dot_loss[n_last]); switch (n_nodes) { case 6: mc_node_five.energy_balance_constant_mass(timestep, 0, 0, T_amb, T_node_ave[4], q_heater[4], q_dot_loss[4]); case 5: mc_node_four.energy_balance_constant_mass(timestep, 0, 0, T_amb, T_node_ave[3], q_heater[3], q_dot_loss[3]); case 4: mc_node_three.energy_balance_constant_mass(timestep, 0, 0, T_amb, T_node_ave[2], q_heater[2], q_dot_loss[2]); case 3: mc_node_two.energy_balance_constant_mass(timestep, 0, 0, T_amb, T_node_ave[1], q_heater[1], q_dot_loss[1]); } mc_node_one.energy_balance_constant_mass(timestep, 0, 0, T_amb, T_node_ave[0], q_heater[0], q_dot_loss[0]); outputs.m_q_heater = q_heater[0] + q_heater[1] + q_heater[2] + q_heater[4] + q_heater[5]; //[MW] Storage thermal losses outputs.m_m_dot = 0.; //outputs.m_W_dot_rhtf_pump = 0; //[MWe] Pumping power for Receiver HTF, convert from kW/kg/s*kg/s outputs.m_q_dot_loss = q_dot_loss[0] + q_dot_loss[1] + q_dot_loss[2] + q_dot_loss[3] + q_dot_loss[4] + q_dot_loss[5]; //[MW] Heating power required to keep tanks at a minimum temperature outputs.m_T_hot_ave = T_node_ave[0]; //[K] outputs.m_T_cold_ave = T_node_ave[n_last]; //[K] outputs.m_T_hot_final = mc_node_one.get_m_T_calc(); //[K] outputs.m_T_cold_final = mc_node_n.get_m_T_calc(); //[K] outputs.m_q_dot_ch_from_htf = 0.0; //[MWt] outputs.m_q_dot_dc_to_htf = 0.0; //[MWt] } void C_csp_stratified_tes::converged() { mc_node_n.converged(); switch (ms_params.m_ctes_type) { case 6: mc_node_five.converged(); case 5: mc_node_four.converged(); case 4: mc_node_three.converged(); case 3: mc_node_two.converged(); } mc_node_one.converged(); // The max charge and discharge flow rates should be set at the beginning of each timestep // during the q_dot_xx_avail_est calls m_m_dot_tes_dc_max = m_m_dot_tes_ch_max = std::numeric_limits<double>::quiet_NaN(); } int C_csp_stratified_tes::pressure_drops(double m_dot_sf, double m_dot_pb, double T_sf_in, double T_sf_out, double T_pb_in, double T_pb_out, bool recirculating, double &P_drop_col, double &P_drop_gen) { P_drop_col = 0.; P_drop_gen = 0.; return 0; } double C_csp_stratified_tes::pumping_power(double m_dot_sf, double m_dot_pb, double m_dot_tank, double T_sf_in, double T_sf_out, double T_pb_in, double T_pb_out, bool recirculating) { return m_dot_tank * this->ms_params.m_htf_pump_coef / 1.E3; }
e48a26ef44908ecd137e5c75fd7f09ab3b9ff75b
670ae36ad5a67b14e9214e9627b65248b1851d87
/Proyecto Tetris/juego.cpp
55c6882cbc732054642ac3fa48dccbc266f08856
[]
no_license
lefmejia/EstructurasDeDatos1Periodo52020
b1c82ca74b30f6ef510f71b19045f226391c6705
b28d0283c0a81e8c44ca1007e1555ff523ad6314
refs/heads/main
2023-01-31T03:47:20.064712
2020-12-18T07:55:03
2020-12-18T07:55:03
305,874,192
0
0
null
null
null
null
UTF-8
C++
false
false
11,733
cpp
juego.cpp
#include <iostream> #include <string.h> #include "tapio/rlutil.h" #include <stdlib.h> #include <stdio.h> #include <thread> #include <termios.h> #include <unistd.h> #include <sys/types.h> #include <sys/time.h> #include <vector> #include <list> #include <time.h> using namespace std; const int nScreenWidth = 25; const int nScreenHeight = 25; string tetromino[7][4]; const int boardW = 14; const int boardH = 20; string board[boardH]; void Rotation(int idx, int nPosX, int nPosY) { string temp[4]; for(int i=0;i<4;i++) temp[i] = " "; for(int i=0; i<4; i++) { for(int j=0; j<4; j++) { temp[i][j] = tetromino[idx][3-j][i]; } } while(temp[0][3] == ' ' && temp[1][3] == ' ' && temp[2][3] == ' ' && temp[3][3] == ' ') { for(int i=0; i<4; i++) { for(int j=0; j<3; j++) { temp[i][3-j] = temp[i][3-j-1]; temp[i][3-j-1] = ' '; } } } for(int i=0;i<4; i++) { for(int j=0; j<4; j++) { if(temp[i][j]=='X' && (board[nPosY+i][nPosX+j]=='X' || board[nPosY+i][nPosX+j]=='#')) return; } } for(int i=0; i<4; i++) tetromino[idx][i] = temp[i]; } void cRotation(int idx, int nPosX, int nPosY) { string temp[4]; for(int i=0;i<4;i++) temp[i] = " "; for(int i=0; i<4; i++) { for(int j=0; j<4; j++) { temp[i][j] = tetromino[idx][j][3-i]; } } while(temp[0][3] == ' ' && temp[1][3] == ' ' && temp[2][3] == ' ' && temp[3][3] == ' ') { for(int i=0; i<4; i++) { for(int j=0; j<3; j++) { temp[i][3-j] = temp[i][3-j-1]; temp[i][3-j-1] = ' '; } } } for(int i=0;i<4; i++) { for(int j=0; j<4; j++) { if(temp[i][j]=='X' && (board[nPosY+i][nPosX+j]=='X' || board[nPosY+i][nPosX+j]=='#')) return; } } for(int i=0; i<4; i++) tetromino[idx][i] = temp[i]; } bool canMove(int piece, int nPosX, int nPosY, char dir) { for(int i=0;i<4; i++) { for(int j=0; j<4; j++) { if(dir == 'r') { if(tetromino[piece][i][j]=='X' && (board[nPosY+i][nPosX+j+1]=='X' || board[nPosY+i][nPosX+j+1]=='#')) return false; } else { if(tetromino[piece][i][j]=='X' && (board[nPosY+i][nPosX+j-1]=='X' || board[nPosY+i][nPosX+j-1]=='#')) return false; } } } return true; } bool canDown(int piece, int nPosX, int nPosY) { for(int i=0;i<4; i++) { for(int j=0; j<4; j++) { if(tetromino[piece][i][j]=='X' && (board[nPosY+i+1][nPosX+j]=='X' || board[nPosY+i+1][nPosX+j]=='#')) return false; } } return true; } bool canRotate(int piece, int nPosX, int nPosY, char dir) { for(int i=0;i<4; i++) { for(int j=0; j<4; j++) { if(tetromino[piece][i][j]=='X' && (board[nPosY+i][nPosX+j+1]=='X' || board[nPosY+i][nPosX+j+1]=='#')) return false; } } return true; } int main() { list<int> que; srand (time(NULL)); for(int i=0; i<4; i++) que.push_back(rand() % 7); for(auto n: board) n=""; for(int i=0; i<boardH; i++) { for(int j=0; j<boardW; j++) { if(i!=boardH-1) board[i] += ' '; if(i==boardH-1) board[boardH-1] += '#'; } } for(int i=0; i<boardH; i++) { board[i][0] = '#'; board[i][boardW-1] = '#'; } string newscreen[nScreenHeight]; for(int i=0; i<boardH; i++) { newscreen[i] = board[i]; } tetromino[0][0] = " X"; tetromino[0][1] = " X"; tetromino[0][2] = " X"; tetromino[0][3] = " X"; tetromino[1][0] = " "; tetromino[1][1] = " XX"; tetromino[1][2] = " XX"; tetromino[1][3] = " "; tetromino[2][0] = " "; tetromino[2][1] = " XX"; tetromino[2][2] = " X "; tetromino[2][3] = " X "; tetromino[3][0] = " "; tetromino[3][1] = " XX"; tetromino[3][2] = " X"; tetromino[3][3] = " X"; tetromino[4][0] = " "; tetromino[4][1] = " X"; tetromino[4][2] = " XX"; tetromino[4][3] = " X"; tetromino[5][0] = " "; tetromino[5][1] = " X "; tetromino[5][2] = " XX"; tetromino[5][3] = " X"; tetromino[6][0] = " "; tetromino[6][1] = " X"; tetromino[6][2] = " XX"; tetromino[6][3] = " X "; bool gameover = false; bool active = false; bool collision = false; int currentPiece = rand() % 7; int minX; int minY; int currentX = boardW / 2 - 1; int currentY = 0; int nSpeed = 0; int hold; int framecount=0; int nSpeedCount = 0; bool bForceDown = false; bool bRotateHold = true; int nPieceCount = 0; int nScore = 0; vector<int> vLines; while(!gameover) { // Timer this_thread::sleep_for(16ms); framecount++; if(kbhit()) { char in = getch(); if(in == '\033') { getch(); switch(getch()) { case 'A': //FLECHA ARRIBA while(true) { if(canDown(currentPiece,currentX, currentY)) currentY++; else break; } break; case 'B': //FLECHA ABAJO if(canDown(currentPiece,currentX, currentY)) currentY++; break; case 'C': //FLECHA DERECHA if(canMove(currentPiece,currentX, currentY, 'r')) currentX++; break; case 'D': // FLECHA IZQUIERDA if(canMove(currentPiece,currentX, currentY, 'e')) currentX--; break; default: gameover = true; // ESC } } else { switch(in) { case 'r': Rotation(currentPiece, currentX, currentY); break; case 'e': cRotation(currentPiece, currentX, currentY); break; } } } // Logic if(framecount>= 60 - nSpeed) { currentY++; framecount = 0; } for(int i=0; i<boardH; i++) { newscreen[i] = board[i]; } //Calculate if new piece fits int endpos = -1; if(currentY==0) { for(int i=0; i<4; i++) { if(i==endpos) break; for(int j=0; j<4; j++) { if(tetromino[currentPiece][i][j] == 'X' && newscreen[currentY+i][currentX+j] == 'X') { endpos = i; i=0; break; } } if(endpos != -1) { for(int j=0; j<4; j++) { newscreen[i][currentX+j] = tetromino[currentPiece][4-endpos+i][j]; } gameover = true; } } } //Draw current piece and its position if(endpos==-1) for(int i=0; i<4; i++) { for(int j=0; j<4; j++) { if(tetromino[currentPiece][i][j] != ' ') newscreen[currentY+i][currentX+j] = tetromino[currentPiece][i][j]; } } //Colission detection for(int i=0; i<4; i++) { for(int j=0; j<4; j++) { if((newscreen[currentY+i+1][currentX+j] == 'X' && tetromino[currentPiece][i+1][j]!='X' && tetromino[currentPiece][i][j]!=' ') || (newscreen[currentY+i+1][currentX+j] == '#' && tetromino[currentPiece][i][j]!=' ')) { for(int i=0; i<boardH; i++) { board[i] = newscreen[i]; } currentPiece = que.front(); que.pop_front(); que.push_back(rand()%7); currentX = boardW/2 - 1; currentY = 0; for(int h = 0; h<4; h++) { if(board[currentY][currentX+h]=='X') gameover = true; } tetromino[0][0] = " X"; tetromino[0][1] = " X"; tetromino[0][2] = " X"; tetromino[0][3] = " X"; tetromino[1][0] = " "; tetromino[1][1] = " XX"; tetromino[1][2] = " XX"; tetromino[1][3] = " "; tetromino[2][0] = " "; tetromino[2][1] = " XX"; tetromino[2][2] = " X "; tetromino[2][3] = " X "; tetromino[3][0] = " "; tetromino[3][1] = " XX"; tetromino[3][2] = " X"; tetromino[3][3] = " X"; tetromino[4][0] = " "; tetromino[4][1] = " X"; tetromino[4][2] = " XX"; tetromino[4][3] = " X"; tetromino[5][0] = " "; tetromino[5][1] = " X "; tetromino[5][2] = " XX"; tetromino[5][3] = " X"; tetromino[6][0] = " "; tetromino[6][1] = " X"; tetromino[6][2] = " XX"; tetromino[6][3] = " X "; nScore+=20; } } } //Complete line for(int i=0; i<boardH-1; i++) { for(int j=1; j<boardW-1; j++) { if(board[i][j]!='X') break; else if(j==boardW-2) { for(int py = i; py>0; py--) { board[py] = board[py-1]; } for(int px=1; px<boardW-2; px++) { board[0][px] = ' '; } nScore += ((boardW-2)*100); if(nSpeed<48) nSpeed += 2; } } } collision = false; //Output rlutil::cls(); bool first = true; std::list<int>::iterator it = que.begin(); newscreen[0] += " Next:"; for(int i=0; i<que.size(); i++) { for(int j = 0; j<4; j++) { newscreen[(i*4)+j+1] += " " + tetromino[*it][j]; } it++; } for(int i=0; i < boardH; i++) { cout<<newscreen[i]; cout<<'\n'; } active = false; } cout << "Game Over!! Score:" << nScore << endl; return 0; }
2457dc3c384782c058317713226f91a1123d4e88
1bbfeca83bac53d22b1110ca7f6c9a28bc46c22e
/ru-olymp-train-winter-2009/Submits/0812xx/18_19_42_17_25tC_7192.cpp
0bc40de49f59bae3d46db793f0668e9d08a31002
[]
no_license
stden/olymp
a633c1dfb1dd8d184a123d6da89f46163d5fad93
d85a4bb0b88797ec878b64db86ad8ec8854a63cd
refs/heads/master
2016-09-06T06:30:56.466755
2013-07-13T08:48:16
2013-07-13T08:48:16
5,158,472
1
0
null
null
null
null
UTF-8
C++
false
false
6,757
cpp
18_19_42_17_25tC_7192.cpp
#include <cstdio> #include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <string> #include <cstring> #include <ctime> #include <memory.h> #include <cstdlib> using namespace std; #define y1 botva #define forn(i,n) for (int i = 0; i < (int)n; i ++) #define ford(i,n) for (int i = n-1; i >= 0; i --) #define l first #define r second #define all(x) x.begin(), x.end() #define last(x) (int)x.size()-1 #define pb push_back #define mp make_pair #define ws botva1 typedef long long int64; typedef long double ldb; const int inf = (1 << 30) - 1; struct node { int n, x, y, s, sl; node *l, *r; }; typedef pair < node*, node* > rec; typedef node* node1; node t1[400010]; int list, str[200000]; int n, m, a[200010][4]; int fin[400010]; node *rt; int ls, list2, val[400010]; node* t[524288]; node t2[5000000]; node1 newnode (int num, int x) { node *res; res = &t1[list]; res->y = rand (); res->x = x; res->n = num; res->s = 1; res->sl = 0; res->l = res->r = NULL; list ++; return res; } node1 newnode1 (int x) { node *res; res = &t2[list2]; res->y = rand (); res->x = x; res->n = 1; res->s = 1; res->sl = 0; res->l = res->r = NULL; list2 ++; return res; } node1 merge (node1 &l, node1 &r) { if (l == NULL) return r; if (r == NULL) return l; if (l->y < r->y) { l->s += r->s; l->r = merge (l->r, r); return l; } else { r->s += l->s; r->l = merge (l, r->l); r->sl = r->l->s; return r; } } void split (node1 &v, node1 &l, node1 &r, int x) { if (v == NULL) { l = NULL; r = NULL; return; } if (x <= v->sl) { r = v; split (v->l, l, r->l, x); if (l != NULL && r != NULL) { r->s -= l->s; r->sl -= l->s; } } else { l = v; split (v->r, l->r, r, x- (l->sl +1)); if (l != NULL && r != NULL) l->s -= r->s; } } void insert (int num, int x, int p) { node *v = newnode (num, x); rec q; split (rt, q.l, q.r, p); rt = merge (q.l, v); rt = merge (rt, q.r); } int find (node *v, int p) { if (v->sl >= p) return find (v->l, p); else if (v->sl + 1 == p) return fin[v->n]; else return find (v->r, p- v->sl-1); } int cp; void go (node *v) { if (v == NULL) return; go (v->l); cp ++; fin[v->n] = cp; go (v->r); } node1 merge1 (node1 l, node1 r) { if (l == NULL) return r; if (r == NULL) return l; if (l->y < r->y) { l->s += r->s; l->r = merge1 (l->r, r); return l; } else { r->s += l->s; r->l = merge1 (l, r->l); r->sl = r->l->s; return r; } } void erase1 (node1 &v, int x) { if (v == NULL) return; if (v->x == x) { if (v->n == 1) v = merge1 (v->l, v->r); else { v->n --; v->s --; } return; } if (v->x > x) { erase1 (v->l, x); v->s --; v->sl --; } else if (v->x < x) { erase1 (v->r, x); v->s --; } } bool find1 (node1 v, int x) { if (v == NULL) return 0; if (v->x == x) { v->n ++; v->s ++; return true; } if (v->x > x) { if (find1 (v->l, x)) { v->s ++; v->sl ++; return true; } return false; } if (v->x < x) { if (find1 (v->r, x)) { v->s ++; return true; } return false; } return false; } void split1 (node1 &v, node1 &l, node1 &r, int x) { if (v == NULL) { l = NULL; r = NULL; return; } if (x <= v->x) { r = v; split1 (v->l, l, r->l, x); if (l != NULL && r != NULL) { r->s -= l->s; r->sl -= l->s; } } else { l = v; split1 (v->r, l->r, r, x); if (l != NULL && r != NULL) l->s -= r->s; } } int sum (node *v, int x) { if (v == NULL) return 0; int qt = 0; if (v->x > x) return sum (v->l, x); else return v->sl + v->n + sum (v->r, x); } void insert1 (node1 &rt, int x) { node* v1 = newnode1 (x); rec q; split1 (rt, q.l, q.r, x); rt = merge1 (q.l, v1); rt = merge1 (rt, q.r); } void ins (int v, int w) { val[v] = w; v = v + ls - 1; while (v > 0) { if (!find1 (t[v], w)) insert1 (t[v], w); v >>= 1; } } void upd (int v, int w) { int v1 = v; int w1 = val[v]; v = v + ls - 1; while (v > 0) { erase1 (t[v], w1); if (!find1 (t[v], w)) insert1 (t[v], w); v >>= 1; } val[v1] = w; } int rsq (int v, int l, int r, int a, int b, int p) { if (l > b || r < a) return 0; if (a <= l && r <= b) return sum (t[v], p); return rsq (v*2, l, l+r>>1, a, b, p) + rsq (v*2+1, (l+r>>1)+1, r, a, b, p); } int main () { freopen ("dynarray.in", "r", stdin); freopen ("dynarray.out", "w", stdout); srand (63463); scanf ("%d%d", &n ,&m); rt = NULL; list = 0; forn (i, n) { int x; scanf ("%d", &x); str[i] = x; insert (i, x, i); } forn (i, m) { int o; int x, y, z; scanf ("%d", &o); a[i][0] = o; if (o == 2) { scanf ("%d%d", &x, &y); a[i][1] = x; a[i][2] = y; insert (i+n, y, x); } else if (o == 1) { scanf ("%d%d", &x, &y); a[i][1] = x; a[i][2] = y; } else { scanf ("%d%d%d", &x, &y, &z); a[i][1] = x; a[i][2] = y; a[i][3] = z; } } cp = 0; memset (fin, 0, sizeof (fin)); go (rt); rt = NULL; list = 0; ls = 1; while (ls < n+m) ls *= 2; forn (i, ls*2) t[i] = NULL; list2 = 0; forn (i, n) { int x; x = str[i]; ins (fin[i], x); insert (i, x, i); } forn (i, m) { int o; int x, y, z; o = a[i][0]; if (o == 2) { x = a[i][1]; y = a[i][2]; insert (i+n, y, x); ins (fin[i+n], y); } else if (o == 1) { scanf ("%d%d", &x, &y); x = a[i][1]; y = a[i][2]; int num = find (rt, x); upd (num, y); } else { scanf ("%d%d%d", &x, &y, &z); x = a[i][1]; y = a[i][2]; z = a[i][3]; int lf, rg; lf = find (rt, x); rg = find (rt, y); printf ("%d\n", rsq (1, 1, ls, lf, rg, z)); } } cerr << sizeof (t2) << endl; return 0; }
9178ebf10275618e3627ba26a29894197d62ea3b
bf640267ece25953368eaadd0a2f78aa1854f06a
/outer_player.h
3fb85c718ff1c8189862cda2d67c0a37b624337d
[]
no_license
salseeg/mir_v2
58abfe2d24a2f47601521d04fc4cd3645f137604
29505a93efcfe9241f5b0c62a88d2456ef347b67
refs/heads/master
2021-01-10T04:00:20.251393
2020-04-20T07:46:06
2020-04-20T07:46:06
50,790,283
0
0
null
null
null
null
UTF-8
C++
false
false
610
h
outer_player.h
#ifndef __MIR__OUTER_PLAYER #define __MIR__OUTER_PLAYER /********************************************** * * Реализация плейера * для внешней линии * **********************************/ #include "player.h" #include "hard.h" #include "aux/ring_.h" class C_outer_player:public C_player{ private: int line_id; outer_key key; unsigned long time; C_ring_<C_melody> q; void finish(); public: C_outer_player(int line, outer_key k); ~C_outer_player(); void add(melody_name name); void reset(); void execute(unsigned long dtime); int q_length(); }; #endif
8b78633fd963b01939a19cc2130c4269c7c2a841
13737a10849b184fe9181d48ca1be2ce052d80f9
/galvininkas.h
de97bb53f8db3e2bb17abe2dbd2874afb7f0de34
[]
no_license
nepaulius/2uzduotis
2761ddd333787a0669f774e15566a214e75aa7a4
bdebaf20c930f89dbc3de0cb135968a627a2b77d
refs/heads/master
2020-04-23T08:50:41.682620
2019-03-26T07:22:48
2019-03-26T07:22:48
171,049,955
0
0
null
null
null
null
UTF-8
C++
false
false
1,654
h
galvininkas.h
#ifndef GALVININKAS_H_INCLUDED #define GALVININKAS_H_INCLUDED #include <iostream> #include <string> #include <iomanip> #include <algorithm> #include <cctype> #include <vector> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <fstream> #include <iterator> #include <exception> #include <limits> #include <sstream> #include <cmath> #include <chrono> #include <list> #include <deque> #include <random> struct Studentai{ std::string vardas; std::string pavarde; std::vector <int> balai; int testas; double galutinis; double galutinismediana; bool operator() (Studentai i,Studentai j) { return (i.pavarde<j.pavarde);} }; int Tik(std::string tikrinimas); std::string Tik2(); void Tekstas(); void Pirmasfailas(int k); std::vector<Studentai> Rusis(std::vector<Studentai> & vektstud,int k); double Mediana(std::vector<int> balai,int namsk); double Vidurkis(double laikinvid,int e); int Ilgiausia(std::vector<std::string>pavardes); int countWordsInString(std::string const& str); std::string ValidacijaVidurkiuIrMedianai(std::string b); void Rusis2(std::list<Studentai> liststud,int k); void Rusis3(std::deque<Studentai>dekasstud,int k); void Ivedimas(); int PerkeltiIrasyma1sdekas(std::deque<Studentai>nemoka,std::deque<Studentai>moka,int k); int PerkeltiIrasymas1vector(std::vector<Studentai>nemoka,std::vector<Studentai>moka,int k); void PerkeltiRusis3(std::deque<Studentai>dekasstud,int k); int PerkeltiIrasymaslistas(std::list<Studentai>nemoka,std::list<Studentai>moka,int k); void PerkeltiRusis2(std::list<Studentai> liststud,int k); void PerkeltiRusis(std::vector<Studentai> vektstud,int k); #endif // GALVININKAS_H_INCLUDED
9b5f3d177d1995cd526a675f9f7f9bd83a80efd1
ddf3e4b66336a2cdc917016de4efc939355a8bc9
/include/RemoveTool.h
fec10b81da9f3b3c3095daf0da272fab9623c470
[]
no_license
nitinagarwal/OnlineSurfaceReconstruction
ea8c6a3c620579f24875722f107fd1535291e7b4
5841486c689cc1ce1237b8473f74a6a11f1b61c7
refs/heads/master
2021-01-23T06:15:13.242395
2017-05-16T15:51:59
2017-05-16T15:51:59
null
0
0
null
null
null
null
UTF-8
C++
false
false
789
h
RemoveTool.h
#pragma once #include "Tool.h" #include "Data.h" #include "Selection.h" #include "AbstractViewer.h" //Represents a modification tool that removes points within a user-defined region. class RemoveTool : public Tool { public: RemoveTool(AbstractViewer* viewer, DataGL& data, float& selectionRadius); void enterTool(); void exitTool(); void draw(const Matrix4f& mv, const Matrix4f& proj); bool mouseButtonEvent(const Eigen::Vector2i & p, int button, bool down, int modifiers); bool mouseMotionEvent(const Eigen::Vector2i & p, const Eigen::Vector2i & rel, int button, int modifiers); bool scrollEvent(const Eigen::Vector2i & p, const Eigen::Vector2f & rel); private: float& selectionRadius; DataGL& data; Selection selection; int pixelsMoved; AbstractViewer* viewer; };
b2630c468bec901c88913cf3353e3a7994bc4261
76be8f87437b6e44d0ce9aea37981056a88ba877
/Game_process.h
3634269652bac0b203443e9ccc6f5f3870cb0001
[]
no_license
team-seed/NeoHandUI
b32330b4d2f06d620acb7abab4775652e0a675a3
3d0b08fb043f8e1d4add0c73aa7e707e9c54041e
refs/heads/master
2020-09-05T07:15:56.605218
2019-12-03T16:15:42
2019-12-03T16:15:42
220,022,991
0
0
null
null
null
null
UTF-8
C++
false
false
1,788
h
Game_process.h
#ifndef GAME_PROCESS_H #define GAME_PROCESS_H #include <QObject> #include <QUrl> #include <QJsonObject> #include <QJsonDocument> #include <QJsonArray> #include <QFile> #include "Effect_play.h" #include "Player.h" #include "Array_effect.h" struct slide { int time, left, right; }; struct note { int time, gesture, left, right, type; int direction; QList<slide> path; }; struct chart_section { double bpm; int offset; int beats; QList<note> notes; }; class Game_process : public QObject { Q_OBJECT Q_PROPERTY(QString bpm_range READ bpm_range NOTIFY bpm_rangeChanged) Q_PROPERTY(QVariantList chart READ chart NOTIFY chartChanged) public: Game_process() { hit_effect.init(QUrl("qrc:/hit_effect/click.wav")); swipe_effect.init(QUrl("qrc:/hit_effect/swipe.wav")); hold_effect.init(QUrl("qrc:/hit_effect/t1.wav")); } ~Game_process(){ hit_effect.destruct(); swipe_effect.destruct(); hold_effect.destruct(); } QString bpm_range () { return m_bpm_range; } QVariantList chart() { return qml_chart; } void chart_toList (); signals: void bpm_rangeChanged(); void chartChanged(); public slots: bool song_chart_parse (QString filepath); void hit_play(){hit_effect.play();} void swipe_play(){swipe_effect.play();} void hold_play(){hold_effect.play();} private: Player music_player; QList<chart_section> song_chart; QList<QList<int>> note_list; QString m_bpm_range; QVariantList qml_chart; //Effect_play hit_effect; //Effect_play swipe_effect; //Effect_play hold_effect; Array_effect hit_effect; Array_effect swipe_effect; Array_effect hold_effect; }; #endif // GAME_PROCESS_H
226b18e118ba417cee73afc48c3099b84f757e0a
edb6fbf773328b966eb99cb5e747e15894fabe42
/BattleBoats/HardCodedPersistance.cpp
6b650e0a3bcef2724468b1be493136d5a327bfef
[]
no_license
cinfusino/BattleBoats-v2
6fd184330a6031b70eab6686bd356c2188c1cee7
2f506146f02f7099652982ea46c47989f30d512a
refs/heads/master
2020-04-09T09:37:06.330714
2018-12-03T19:04:49
2018-12-03T19:04:49
160,239,918
0
0
null
null
null
null
UTF-8
C++
false
false
1,073
cpp
HardCodedPersistance.cpp
#include <string> #include <vector> #include <iostream> #include "HardCodedPersistance.hpp" namespace TechnicalServices::Persistance { HardCodedPersistance::HardCodedPersistance() {} HardCodedPersistance::~HardCodedPersistance() {} std::vector<std::string> HardCodedPersistance::findRoles() { return { "Admin", "Player" }; } void HardCodedPersistance::createNewUser(const UserCredentials credentials) { std::cout << "\nThis Configuration cannot support any new users."; } UserCredentials HardCodedPersistance::findCredentialsByName(const std::string & name) { struct Users { std::string name; std::string password; std::vector<std::string> roles; }; static std::vector<Users> storedUsers = { //name password roles {"Carmine", "123", {"Player", "Admin" }}, {"Justin", "456",{"Player" }}, {"Jason", "789",{"Admin" }}, }; for (const auto & user : storedUsers) { if (user.name == name) { return { user.name, user.password, user.roles }; } } //Else invalid return { "","", {""}}; } }
f4cf752872aea7164daa1ae0ad92af694c036ef4
a64a8d76aac2c9a9cba574f7361f055472488557
/Tugas Lain/trans.cpp
82cc38c3c8d88495e9eeeadf42abcaf047fc2b27
[]
no_license
danielsitepu36/Cpp-as-the-first
10ea28beff8557afecea15e4db5d677ac08e4ee2
d94b8b7cfe8c3bdb3fbd55fb3cea11ee72534bd6
refs/heads/master
2020-07-06T12:49:53.446105
2019-08-28T12:29:16
2019-08-28T12:29:16
203,023,073
1
0
null
null
null
null
UTF-8
C++
false
false
406
cpp
trans.cpp
#include<iostream> using namespace std; int main(){ int x=6, y=3; cout<<"PROGRAM MENENTUKAN TRANSPOSE"<<endl; int a[x][y]; int i,j; cout<<"Masukkan Matriks Anda ="<<endl; for(i=0;i<x;i++){ for(j=0;j<y;j++){ cin>>a[i][j]; } } cout<<endl; cout<<"Transpose matriks anda ="<<endl; for(i=0;i<y;i++){ for(j=0;j<x;j++){ cout<<a[j][i]; cout<<" "; } cout<<endl; } return 0; }
c61030d25f05dff1a3b4249a63e496e0bca9b55c
81de7aaf7ba6a591720056ca9771dd0256e2396a
/include/CsShipObject.h
f469b46c05a00fe3c2b266f80d5411038652917a
[]
no_license
SabinT/Wings-Of-Chaos
9286add428d4a9a76f713bcc9ce6ac2560ace58f
71359b1287613f82a35997c50a1c6c5882f98581
refs/heads/master
2021-01-10T21:45:41.628525
2013-11-25T08:37:22
2013-11-25T08:37:22
13,536,656
0
1
null
null
null
null
UTF-8
C++
false
false
2,302
h
CsShipObject.h
#pragma once #include <CsDestructibleObject.h> #include <CsWeaponManager.h> #include <string> #include <CsStateMachine.h> #include <CsEnemyShipStates.h> // temporary, get parameters for each ship from ship scene file (tinyXML parser) class CsShipObject : public CsDestructibleObject { public: enum ShipStatus { ACTIVE, INACTIVE, DYING }; CsShipObject(void); virtual ~CsShipObject(void); void Reset(); CsShipObject* Clone(Ogre::String name); void SetPlayerShip(bool b); // overloaded to care for damping void SetRigidBody (btRigidBody* rigidBody); inline int GetShipStatus () {return mShipStatus;} inline void SetShipStatus (int status) {mShipStatus = status;} inline std::string GetShipType () {return mShipType;} inline void SetShipType (std::string type) {mShipType = type;} inline Ogre::SceneNode* GetLeftWing() {return mLeftWing;} void SetLeftWing(Ogre::SceneNode* leftWing); inline Ogre::SceneNode* GetRightWing() {return mRightWing; } void SetRightWing(Ogre::SceneNode* rightWing); // TODO: these manipulate nodes so should be called from the Render part void Spawn(); void Destroy(); void UpdateSceneNode(); void Update(); void UpdateAI(); // logic related update // movement related void SetThrottle(); void ResetThrottle(); void SetDamping(); void ResetDamping(); // pass +1, -1 for direction, 0 for reset void Roll(int direction); void Pitch(int direction); // firing void FirePrimary(); void FireSecondary(); float mThrottleForce; float mRollTorque; float mPitchTorque; // ship parameters like throttle force etc float mLinearDamping, mAngularDamping; inline CsStateMachine* GetFSM() {return mFSM;} protected: static CsShipObject* sPlayerShip; // calculated from ship model node and wing nodes Ogre::SceneNode* mLeftWing; Ogre::SceneNode* mRightWing; // Ogre::OverlayContainer* mDot; CsWeaponManager mWeaponManager; MachineGun mMachineGun; RocketLauncher mRocketLauncher; Ogre::ParticleSystem *mJetEngineFX; CsSource mJetSound; // ship active/ deactivated/ destroying int mShipStatus; std::string mShipType; bool mAIShip; CsStateMachine *mFSM; friend class CsShipManager; friend class CsDefendBase; friend class CsChase; friend class CsIdle; friend class CsShoot; friend class CsRetreat; };
4ad2ee1e8ec0a8df59987e273da953770b6ae29b
cc1ff43f71ee5ef3d681eb3ce0aa512352dfb68a
/backup/Intersection.cpp
e6863aa4844d959e3308811647367376644bdbd5
[]
no_license
imjjs/sumoc-
3ba389252d3ebeaef30566879dab4666b0cf29f5
f6f06b9c2ff77cff3ad4d117ca5013cd6d7542cb
refs/heads/master
2020-12-01T19:57:18.254556
2016-09-09T07:01:52
2016-09-09T07:01:52
67,171,946
0
0
null
null
null
null
UTF-8
C++
false
false
4,224
cpp
Intersection.cpp
#include "config.hpp" #include "Intersection.hpp" #include <cassert> #include <algorithm> #include <cstdlib> #include <iostream> using namespace std; Direction::Direction(const string& name, int lanes_num):_name(name), _lanes_num(lanes_num), _q_length_list(lanes_num, 0){ } int Direction::getQLength() const { if (0 == _lanes_num){ return 0; } return _q_length_list[0]; //return (*max_element(_q_length_list.begin(),_q_length_list.end())); } void Direction::updateQLengthList() { if(0 == _lanes_num) return; _q_length_list[0] = singleton.multientryexit.getLastStepVehicleNumber(_name); // for(int i = 0; i < _lanes_num; ++i){ // string sensor_name = _name + to_string(i); // _q_length_list[i] = singleton.lane.getLastStepVehicleNumber(sensor_name); // } } Intersection::Intersection(const string& name):_name(name), west(nullptr), east(nullptr), north(nullptr), south(nullptr){ } void Intersection::setLight(int min, int max){ lightMin = min; lightMax = max; } void Intersection::setLightEncode(const string& nsG, const string& weG){ nsGreen = nsG; weGreen = weG; } string Intersection::getLightState(){ return singleton.trafficlights.getRedYellowGreenState(_name); } void Intersection::setLightState(const string& ltState){ singleton.trafficlights.setRedYellowGreenState(_name, ltState); } void Intersection::setLines(int west_lanes_num, int east_lanes_num, int north_lanes_num, int south_lanes_num){ west = new Direction(_name + "W", west_lanes_num); east = new Direction(_name + "E", east_lanes_num); north = new Direction(_name + "N", north_lanes_num); south = new Direction(_name + "S", south_lanes_num); } void Intersection::setThreshold(int we, int ns){ weThreshold = we; nsThreshold = ns; } void Intersection::loadFromData(const map<string, vector<string>>& dataDict){ vector<string> dataList = dataDict.at(_name); assert(6 == dataList.size()); setLightEncode(dataList[0], dataList[1]); setLines(stoi(dataList[2]), stoi(dataList[3]), stoi(dataList[4]), stoi(dataList[5])); } void Intersection::updateQLength(){ west->updateQLengthList(); east->updateQLengthList(); north->updateQLengthList(); south->updateQLengthList(); nsQLength = north->getQLength() + south->getQLength(); weQLength = west->getQLength() + east->getQLength(); } void Intersection::updateClock(){ if(lightState == nsGreen){ ++nsClock; weClock = 0; }else if(lightState == weGreen){ ++weClock; nsClock = 0; } } void Intersection::init(){ lightMax = 1200; lightMin = 300; defaultInterval = 900; weClock = 0; weQLength = 0; nsClock = 0; nsQLength = 0; lightState = getLightState(); assert(lightState == nsGreen || lightState == weGreen); } void Intersection::changeLight(){ if(nsGreen == lightState){ setLightState(weGreen); lightState = weGreen; }else if(weGreen == lightState){ setLightState(nsGreen); lightState = nsGreen; } } void Intersection::keepLight(){ setLightState(lightState); } void Intersection::controllor(){ if(((weQLength < weThreshold && nsQLength < nsThreshold) || (weQLength >= weThreshold && nsQLength >= nsThreshold)) && (weClock > lightMax || nsClock > lightMax)){ changeLight(); }else if((weQLength >= weThreshold && nsQLength < nsThreshold) &&(nsClock > lightMin || weClock > lightMax)){ changeLight(); }else if((nsQLength >= nsThreshold && weQLength < weThreshold) &&(weClock > lightMin || nsClock > lightMax)){ changeLight(); }else keepLight(); } void Intersection::defaultControllor(){ if(weClock > defaultInterval || nsClock > defaultInterval) changeLight(); } void Intersection::defaultRun(){ defaultControllor(); updateClock(); assert(lightState == nsGreen || lightState == weGreen); } void Intersection::run(){ if(0 == nsThreshold && 0 == weThreshold){ defaultControllor(); updateClock(); }else{ updateQLength(); controllor(); updateClock(); } assert (lightState == nsGreen || lightState == weGreen); } void Intersection::debug(){ return; } Intersection::~Intersection(){ assert (nullptr != west); assert (nullptr != east); assert (nullptr != north); assert (nullptr != south); delete west; delete east; delete north; delete south; }
d0a063d74922d0502df48097716765e058de0180
e29811cd57f7cdb9b499bcde681916dc6148b93d
/Semaphore/Button/Button.cpp
956016a839b3eac69ac171dd2e0e0a92b1c474b4
[ "MIT" ]
permissive
tkapin/Semaphore
9fb1be5ef6fcb176a61e049dfdb3f4aff3cd26c1
ac7c52d8ebc8bb416698f4e995200750594dbd20
refs/heads/master
2020-03-18T05:10:38.217436
2018-05-25T22:14:46
2018-05-25T22:14:46
134,328,262
1
0
null
null
null
null
UTF-8
C++
false
false
248
cpp
Button.cpp
/* * Button.cpp * * Created: 2017-03-21 20:55:59 * Author: Tomas Kapin */ #include "Button.h" Button::Button(IoPort *port, uint8_t pin) { _port = port; _pin = pin; // set as input and enable pull-up _port->SetAsInputAndEnablePullUp(_pin); }
ab66e339a22d8f228ad17ae70fbb93de81fe7b56
a91946a034e9909dad24a20777447ba4762983a5
/OptionBase.h
8a28abea665f043f7fcbeea4bf8648ee6eab3765
[]
no_license
ashpace/Out-of-money-derivative-pricing-model
20b563e2141eaf047e1767be647dd17031f3f36a
5b58e89568747faee11182fbb142e89a0ff06331
refs/heads/master
2021-05-07T03:48:34.606672
2017-11-16T16:52:10
2017-11-16T16:52:10
110,997,813
0
0
null
null
null
null
UTF-8
C++
false
false
999
h
OptionBase.h
//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX // OptionBase.h // By : 1222781 //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX #ifndef OptionBaseH #define OptionBaseH //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX #include <string> //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX // class OptionBase //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX class OptionBase { public: virtual ~OptionBase(){} virtual std::string Identity() const = 0; virtual double IdentityN() const = 0; virtual double ComputePO(double S) const = 0; }; //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX #endif //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX // End //XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
24a21bf91bd61d2ed0e6fe241815a8aac512371d
897ef84932251c57a790b75b1410a147b9b64792
/seqtime.cpp
db5fa932e5ceeed7fdd75c10eed6a76bfd707b6a
[]
no_license
erophames/CamX
a92b789d758e514d43e6fd676dbb9eed1b7b3468
56b08ed02d976621f538feca10e1aaa58926aa5a
refs/heads/master
2021-06-21T21:14:27.776691
2017-07-22T11:46:09
2017-07-22T11:46:09
98,467,657
1
2
null
null
null
null
UTF-8
C++
false
false
32,513
cpp
seqtime.cpp
#include "defines.h" #include "object.h" #include "seqtime.h" #include "songmain.h" #include "audiodevice.h" #include "object_song.h" #include "audiohardware.h" #include "gui.h" #include "languagefiles.h" #include "arrangeeditor.h" #include "semapores.h" #include "object_project.h" #include "editdata.h" #include "chunks.h" #include "camxfile.h" Seq_Time::Seq_Time () { // default 120 BPM, 4/4 Signature, zoom 1/16 // StartEvents zoomticks=TICK16nd; // 1/16nd newMIDIclocktempo_record=false; refreshflag=0; lastselectedtempo=0; flag=0; ppqsampleratemul=-1; } void Seq_Time::RemoveAllTimeMaps(bool full) { RemoveSignatureMap(full); RemoveTempoMap(full); } Seq_Tempo *Seq_Time::RemoveTempo(Seq_Tempo *t) { LockTimeTrack(); Seq_Tempo *n=(Seq_Tempo *)tempomap.RemoveO(t); UnlockTimeTrack(); return n; } void Seq_Time::Load(camxFile *file) { file->CloseReadChunk(); file->LoadChunk(); if(file->GetChunkHeader()==CHUNK_TEMPOMAP) LoadTempoMap(file); file->LoadChunk(); if(file->GetChunkHeader()==CHUNK_SIGNATUREMAP) { file->ChunkFound(); int nrsigs=0; file->ReadChunk(&nrsigs); if(nrsigs) { signaturemap.DeleteAllO(); // Delete old Signature while(nrsigs--){ if(Seq_Signature *sig=new Seq_Signature) { sig->Load(file); sig->map=this; // map set later ! signaturemap.AddOSort(sig,sig->ostart); } } signaturemap.Close(); RefreshSignatureMeasures(); } file->CloseReadChunk(); } } void Seq_Time::LoadTempoMap(camxFile *file) { file->ChunkFound(); // OSTART songposition=song->GetSongPosition(); int nrtempos=0; file->ReadChunk(&nrtempos); if(nrtempos) { tempomap.DeleteAllO(); // Delete old Tempomap while(nrtempos--){ if(Seq_Tempo *tempo=new Seq_Tempo){ tempo->Load(file); tempo->map=this; // Connect to map tempomap.AddOSort(tempo,tempo->ostart); } } Close(); RefreshTempoFactor(false); // No RefreshTempoChanges } file->CloseReadChunk(); } void Seq_Time::SaveTempoMap(camxFile *file) { file->OpenChunk(CHUNK_TEMPOMAP); file->Save_Chunk(tempomap.GetCount()); Seq_Tempo *t=FirstTempo(); while(t){ t->Save(file); t=t->NextTempo(); } file->CloseChunk(); } void Seq_Time::Save(camxFile *file) { file->OpenChunk(CHUNK_TIMETRACK); file->CloseChunk(); // Tempo Map SaveTempoMap(file); // Signature Map file->OpenChunk(CHUNK_SIGNATUREMAP); file->Save_Chunk(signaturemap.GetCount()); Seq_Signature *s=FirstSignature(); while(s){ s->Save(file); s=s->NextSignature(); } file->CloseChunk(); } void Seq_Time::RemoveTempoMap(bool full) { Seq_Tempo *t=FirstTempo(); if(full==false){ OSTART songposition=song->GetSongPosition(); LockTimeTrack(); t->tempo=120; // default RefreshTempoFactor(); UnlockTimeTrack(); t=t->NextTempo(); } while(t) t=RemoveTempo(t); } void Seq_Time::SelectTempo(Seq_Tempo *tempo,bool select) { if((select==true && (!(tempo->flag&OFLAG_SELECTED))) || (select==false && (tempo->flag&OFLAG_SELECTED)) ) { if(select==true) tempo->flag|=OFLAG_SELECTED; else tempo->flag^=OFLAG_SELECTED; } } void Seq_Time::SelectAllTempos(bool select) { tempomap.Select(select); } void Seq_Time::CreateSignatureAndEdit(guiWindow *win,OSTART time) { time=ConvertTicksToMeasureTicks(time,false); // Quant int measure=ConvertTicksToMeasure(time); Seq_Signature *check=FindSignature(time); if((!check) || check->GetSignatureStart()>time) { mainthreadcontrol->LockActiveSong(); Seq_Signature *newsig=AddNewSignature(measure,4,TICK4nd); mainthreadcontrol->UnlockActiveSong(); if(newsig) { maingui->RefreshAllEditors(song,REFRESHSIGNATURE_DISPLAY); //maingui->RefreshTimeSlider(song); if(EditData *edit=new EditData) { edit->song=song; edit->signature=newsig; edit->win=win; edit->x=win->GetWindowMouseX(); edit->y=win->GetWindowMouseY(); TimeString timestring; song->timetrack.CreateTimeString(&timestring,newsig->GetSignatureStart(),Seq_Pos::POSMODE_NORMAL); edit->title=mainvar->GenerateString(Cxs[CXS_NEW],":",timestring.string); edit->deletename=true; edit->id=EDIT_SIGNATURE; edit->type=EditData::EDITDATA_TYPE_SIGNATURE; edit->deletesigifcancel=true; maingui->EditDataValue(edit); } } } } void Seq_Time::DeleteSignature(guiWindow *win,Seq_Signature *sig) { if(sig) { Seq_Time *map=sig->map; if(map && map->FirstSignature()!=sig) { mainthreadcontrol->LockActiveSong(); LockTimeTrack(); map->RemoveSignature(sig); map->RefreshSignatureMeasures(); UnlockTimeTrack(); mainthreadcontrol->UnlockActiveSong(); maingui->RefreshAllEditors(win->WindowSong(),REFRESHSIGNATURE_DISPLAY); //maingui->RefreshTimeSlider(win->WindowSong()); } } } void Seq_Time::EditSignature(guiWindow *win,Seq_Signature *f) { if(f) { if(EditData *edit=new EditData) { edit->song=song; edit->signature=f; edit->win=win; edit->x=win->GetWindowMouseX(); edit->y=win->GetWindowMouseY(); TimeString timestring; song->timetrack.CreateTimeString(&timestring,f->GetSignatureStart(),Seq_Pos::POSMODE_NORMAL); edit->title=mainvar->GenerateString(Cxs[CXS_SIGNATURE],":",timestring.string); edit->deletename=true; edit->id=EDIT_SIGNATURE; edit->type=EditData::EDITDATA_TYPE_SIGNATURE; maingui->EditDataValue(edit); } } } void Seq_Time::EditSignature(guiWindow *win,OSTART time) { EditSignature(win,FindSignatureBefore(time)); } void Seq_Time::OpenPRepairTempoSelection() { Seq_Tempo *t=FirstTempo(); while(t) { if(t->flag&OFLAG_UNDERSELECTION) { t->flag|=OFLAG_OLDUNDERSELECTION; t->flag CLEARBIT OFLAG_UNDERSELECTION; } else t->flag CLEARBIT OFLAG_OLDUNDERSELECTION; t=t->NextTempo(); } } Seq_Tempo *Seq_Time::FirstSelectedTempo() { Seq_Tempo *t=FirstTempo(); while(t) { if(t->IsSelected()==true) return t; t=t->NextTempo(); } return 0; } void Seq_Time::CloneTempos(OListStart *list) { Seq_Tempo *t=FirstTempo(); while(t) { if(Seq_Tempo *nt=new Seq_Tempo) { t->CloneData(nt); list->AddEndO(nt); } t=t->NextTempo(); } } double Seq_Time::GetLowestTempo() { Seq_Tempo *t=FirstTempo(); double low=t->tempo; t=t->NextTempo(); while(t){ if(t->tempo<low) low=t->tempo; t=t->NextTempo(); } return low; } void Seq_Time::RepairTempomap() { RefreshTempoFactor(); refreshflag CLEARBIT Seq_Time::LOOP_REFRESH; song->RepairLoops(Seq_Song::RLF_NOLOCK); } double Seq_Time::GetHighestTempo() { Seq_Tempo *t=FirstTempo(); double low=t->tempo; t=t->NextTempo(); while(t){ if(t->tempo>low) low=t->tempo; t=t->NextTempo(); } return low; } int Seq_Time::GetSelectedTempos() { int c=0; Seq_Tempo *t=FirstTempo(); while(t){ if(t->flag&OFLAG_SELECTED)c++; t=t->NextTempo(); } return c; } double Seq_Time::SubTicksToTempoTicks(double ticks) { Seq_Tempo *starttempo=FirstTempo(); if(Seq_Tempo *nexttempo=starttempo->NextTempo()) { OSTART endticks=(OSTART)ticks; if(nexttempo->GetTempoStart()<endticks) { double tickcount=0,lastfactor=starttempo->tempofactor; OSTART laststart=0; do{ tickcount+=(double)(nexttempo->GetTempoStart()-laststart)*lastfactor; laststart=nexttempo->GetTempoStart(); lastfactor=nexttempo->tempofactor; nexttempo=nexttempo->NextTempo(); }while(nexttempo && nexttempo->GetTempoStart()<endticks); //add rest ? if(laststart<endticks) tickcount+=(double)(endticks-laststart)*lastfactor; return tickcount; //return floor(tickcount+0.5); } } return ticks*starttempo->tempofactor; //No Tempomap, or last tempo } double Seq_Time::SubTicksToTempoTicks(OSTART startticks,double ticks) { Seq_Tempo *starttempo=GetTempo(startticks); if(Seq_Tempo *nexttempo=starttempo->NextTempo()) { OSTART endticks=startticks+(OSTART)ticks; if(nexttempo->GetTempoStart()<endticks) { double tickcount=0,lastfactor=starttempo->tempofactor; OSTART laststart=startticks; do{ tickcount+=(double)(nexttempo->GetTempoStart()-laststart)*lastfactor; laststart=nexttempo->GetTempoStart(); lastfactor=nexttempo->tempofactor; nexttempo=nexttempo->NextTempo(); }while(nexttempo && nexttempo->GetTempoStart()<endticks); //add rest ? if(laststart<endticks) tickcount+=(double)(endticks-laststart)*lastfactor; return tickcount; //return floor(tickcount+0.5); } } return ticks*starttempo->tempofactor; //No Tempomap, or last tempo } double Seq_Time::AddTempoToTicks(OSTART startticks,double ticks) { Seq_Tempo *starttempo=GetTempo(startticks); if(Seq_Tempo *nexttempo=starttempo->NextTempo()) { OSTART endticks=startticks+(OSTART)ticks; if(nexttempo->GetTempoStart()<endticks) { double tickcount=0,lastfactor=starttempo->tempofactor; OSTART laststart=startticks; do{ tickcount+=(double)(nexttempo->GetTempoStart()-laststart)/lastfactor; laststart=nexttempo->GetTempoStart(); lastfactor=nexttempo->tempofactor; nexttempo=nexttempo->NextTempo(); }while(nexttempo && nexttempo->GetTempoStart()<endticks); //add rest ? if(laststart<endticks) tickcount+=(double)(endticks-laststart)/lastfactor; return tickcount; //return floor(tickcount+0.5); } } return ticks/starttempo->tempofactor; //No Tempomap, or last tempo } OSTART Seq_Time::ConvertTempoTicksToTicks(OSTART startticks,double ticks) { Seq_Tempo *starttempo=GetTempo(startticks); if(Seq_Tempo *nexttempo=starttempo->NextTempo()) { // double h=ticks/starttempo->tempofactor; // h+=startticks; if(startticks+(OSTART)(ticks/starttempo->tempofactor)>nexttempo->ostart) // Next Tempo inside |start---|end { double lastfactor=starttempo->tempofactor; OSTART laststart=startticks,tickcount=0; for(;;) { OSTART diff=nexttempo->ostart-laststart; tickcount+=diff; ticks-=(double)diff*lastfactor; lastfactor=nexttempo->tempofactor; laststart=nexttempo->ostart; if(!(nexttempo=nexttempo->NextTempo()))break; //h=ticks/lastfactor; //h+=laststart; if(laststart+(OSTART)(ticks/lastfactor)<=nexttempo->ostart) break; }//while(h>nexttempo->ostart); ticks/=lastfactor; return startticks+tickcount+(OSTART)ticks; } } return startticks+(OSTART)(ticks/starttempo->tempofactor); } double Seq_Time::ConvertTempoTicksToTicks(double ticks) { Seq_Tempo *starttempo=FirstTempo(); if(Seq_Tempo *nexttempo=starttempo->NextTempo()) { //double h=ticks/starttempo->tempofactor; if((OSTART)(ticks/starttempo->tempofactor)>nexttempo->ostart) // Next Tempo inside |start---|end { double lastfactor=starttempo->tempofactor; OSTART tickcount=0,laststart=0; for(;;){ OSTART diff=nexttempo->ostart-laststart; tickcount+=diff; ticks-=(double)diff*lastfactor; lastfactor=nexttempo->tempofactor; laststart=nexttempo->ostart; if(!(nexttempo=nexttempo->NextTempo()))break; if(laststart+(OSTART)(ticks/lastfactor)<=nexttempo->ostart) break; } ticks/=lastfactor; ticks+=tickcount; return ticks; } } return ticks/starttempo->tempofactor; } double Seq_Time::ConvertTempoTicksToTicks(OSTART startticks,double ticks,Seq_Tempo **writetempo) { Seq_Tempo *starttempo=GetTempo(startticks); if(Seq_Tempo *nexttempo=starttempo->NextTempo()) { if((OSTART)(ticks/starttempo->tempofactor)>nexttempo->ostart) // Next Tempo inside |start---|end { double lastfactor=starttempo->tempofactor; OSTART tickcount=0,laststart=startticks; //h+=startticks; for(;;) { OSTART diff=nexttempo->ostart-laststart; tickcount+=diff; ticks-=(double)diff*lastfactor; lastfactor=nexttempo->tempofactor; laststart=nexttempo->ostart; *writetempo=nexttempo; if(!(nexttempo=nexttempo->NextTempo()))break; //h=ticks/lastfactor; //h+=laststart; if(laststart+(OSTART)(ticks/lastfactor)<=nexttempo->ostart) break; }//while(h>nexttempo->ostart); ticks/=lastfactor; ticks+=tickcount; return (double)startticks+ticks; } } *writetempo=starttempo; return (double)startticks+ticks/starttempo->tempofactor; } LONGLONG Seq_Time::ConvertTicksToTempoSamplesStart(OSTART startticks,double ticks) { if(ticks<0) return (LONGLONG)(-SubTicksToTempoTicks(startticks,-ticks)*ppqsampleratemul); return (LONGLONG)(SubTicksToTempoTicks(startticks,ticks)*ppqsampleratemul); } LONGLONG Seq_Time::ConvertTicksToTempoSamplesStart(OSTART startticks,OSTART ticks) { if(ticks<0) return (LONGLONG)(-SubTicksToTempoTicks(startticks,(double)-ticks)*ppqsampleratemul); return (LONGLONG)(SubTicksToTempoTicks(startticks,(double)ticks)*ppqsampleratemul); } LONGLONG Seq_Time::ConvertTicksToTempoSamples(OSTART ticks) { if(ticks<0) return (LONGLONG)(-SubTicksToTempoTicks((double)-ticks)*ppqsampleratemul); return (LONGLONG)(SubTicksToTempoTicks((double)ticks)*ppqsampleratemul); } LONGLONG Seq_Time::ConvertTicksToTempoSamples(double ticks) { if(ticks<0) return (LONGLONG)(-SubTicksToTempoTicks(-ticks)*ppqsampleratemul); return (LONGLONG)(SubTicksToTempoTicks(ticks)*ppqsampleratemul); } OSTART Seq_Time::ConvertSamplesToOSTART(LONGLONG sampleposition) { return ConvertTempoTicksToTicks((double)sampleposition/ppqsampleratemul); } void Seq_Time::ConvertSamplesToOSTART(LONGLONG s1,OSTART *o1,LONGLONG s2,OSTART *o2) { *o1=ConvertTempoTicksToTicks((double)s1/ppqsampleratemul); *o2=ConvertTempoTicksToTicks((double)s2/ppqsampleratemul); } void Seq_Time::ConvertLengthToPos(Seq_Pos *pos,OSTART from,OSTART ticks) { Seq_Signature *sig=FindSignatureBefore(from),*nextsig; OSTART endticks=from+ticks; pos->pos[0]=pos->pos[1]=pos->pos[2]=pos->pos[3]=pos->pos[4]=0; while(sig && sig->GetSignatureStart()<endticks && ticks) { nextsig=sig->NextSignature(); OSTART measure; if(nextsig && nextsig->GetSignatureStart()<endticks) { measure=nextsig->GetSignatureStart()-from; measure/=sig->measurelength; } else measure=ticks/sig->measurelength; ticks-=measure*sig->measurelength; pos->pos[0]+=(int)measure; sig=nextsig; if(sig) from=sig->GetSignatureStart(); } } void Seq_Time::CreateLengthString(TimeString *timestr,OSTART time,OSTART length,int format) { timestr->pos.mode=format; timestr->pos.song=song; timestr->pos.measureformat=song->project->projectmeasureformat; ConvertTicksToLength(time,length,&timestr->pos); timestr->index=timestr->pos.index; timestr->pos.ConvertToLengthString(song,timestr->string,70,timestr->stringspointer); } void Seq_Time::CreateTimeString(TimeString *timestr,OSTART time,int format,int iflag) { timestr->time=time; timestr->pos.mode=format; timestr->pos.offset=&song->smpteoffset; ConvertTicksToPos(time,&timestr->pos); timestr->index=timestr->pos.index; timestr->pos.ConvertToString(song,timestr->string,70,timestr->stringspointer,iflag); } OSTART Seq_Time::ConvertPosToTicks(Seq_Pos *pos) { switch(pos->mode) { case Seq_Pos::POSMODE_NORMAL: case Seq_Pos::POSMODE_COMPRESS: { Seq_Signature *sig=FindSignatureBefore(ConvertMeasureToTicks(pos->pos[0])); // measure ****************** OSTART m=ConvertTicksToMeasure(sig->GetSignatureStart()); m=pos->pos[0]-m; OSTART t=sig->GetSignatureStart(); t+=m*sig->measurelength; // x-1-x-x t+=sig->dn_ticks*(pos->pos[1]-1); if(pos->mode==Seq_Pos::POSMODE_COMPRESS) { double dh=mainaudio->ConvertPPQToInternRate(pos->pos[2]-1); // x-x-1, no Zoom t+=dh; } else { // x-x-1-x switch(song->project->projectmeasureformat) { case PM_1111: case PM_1p1p1p1: case PM_1110: case PM_1p1p1p0: t+=zoomticks*(pos->pos[2]-1); break; } if(pos->mode==Seq_Pos::POSMODE_NORMAL) { switch(song->project->projectmeasureformat) { case PM_1111: case PM_1p1p1p1: case PM_11_1: case PM_1p1p_1: { #ifdef DEBUG if(pos->pos[pos->index-1]==0) maingui->MessageBoxOk(0,"POS3==0"); #endif double dh=mainaudio->ConvertPPQToInternRate(pos->pos[pos->index-1]-1); // x-x-x-1 or x-x-1 t+=dh; } break; case PM_1110: case PM_1p1p1p0: case PM_11_0: case PM_1p1p_0: { double dh=mainaudio->ConvertPPQToInternRate(pos->pos[pos->index-1]); // x-x-x-0 or x-x-0 t+=dh; } break; } } } return t; } break; default: { if(pos->IsSmpte()==true) { double ms= pos->pos[0]*3600+ // h pos->pos[1]*60+ // min pos->pos[2]; // sec ms*=1000; // Frame double ffact=1000; ffact/=SMPTE_FPS[pos->mode]; // Frame ms+=ffact*pos->pos[3]; // QF Factor ffact/=4; ms+=ffact*pos->pos[4]; /* // Quantize MS<->Quarter Frames ms/=ffact; modf (ms , &ms); ms*=ffact; */ if(pos->offset) ms-=pos->offset->GetOffSetMs(); ms*=INTERNRATEMSMUL; // ms->ticks Seq_Tempo *lasttempo; double newticks=ConvertTempoTicksToTicks(0,ms,&lasttempo),tempoticks=ConvertTempoTicksToTicks(lasttempo->ostart), h=newticks-tempoticks,h2=INTERNRATEMSMUL/lasttempo->tempofactor; TRACE ("ConvertPosToMS Ticks %f LastStart %d LastFactor %f\n",newticks,lasttempo->ostart,lasttempo->tempofactor); if(h>=h2)return newticks+1; return newticks; //return ceil(ticks); //return ConvertTicksToTempoTicks(0,ms); //return ConvertMsToTempoTicks(ms); // Calc Tempomap, SMPTE use tempompap //return mainvar->ConvertMilliSecToTicks(ms); } else { // H:M:Sec double ms= pos->pos[0]*3600+ // h pos->pos[1]*60+ // min pos->pos[2]; // sec ms*=1000; ms+=pos->pos[3]*10; ms*=INTERNRATEMSMUL; // ms->ticks Seq_Tempo *lasttempo; double newticks=ConvertTempoTicksToTicks(0,ms,&lasttempo),tempoticks=ConvertTempoTicksToTicks(lasttempo->ostart), h=newticks-tempoticks,h2=INTERNRATEMSMUL/lasttempo->tempofactor; // TRACE ("ConvertPosToMS Ticks %f LastStart %d LastFactor %f\n",newticks,lasttempo->ostart,lasttempo->tempofactor); if(h>=h2)return newticks+1; return newticks; } } break; } return -1; // unknown pos format ? } void Seq_Time::ConvertTicksToPos(OSTART time,Seq_Pos *pos,OSTART zticks) { if(!zticks) zticks=zoomticks; // default Song Zoom ticks pos->song=song; if(song) pos->measureformat=song->project->projectmeasureformat; switch(pos->measureformat) { case PM_1p1p_1: case PM_1p1p_0: case PM_11_1: case PM_11_0: pos->nozoom=true; break; default: pos->nozoom=false; break; } switch(pos->mode) { case Seq_Pos::POSMODE_NORMAL: case Seq_Pos::POSMODE_COMPRESS: if(song) { switch(pos->measureformat) { case PM_1p1p1p1: case PM_1p1p_1: case PM_1p1p1p0: case PM_1p1p_0: pos->space=measure_str; // . . . . break; default: pos->space=measure_str_empty; // _ _ _ _ break; } pos->usesmpte=false; Seq_Signature *sig; if(sig=LastSignature()) { while(sig && sig->GetSignatureStart()>time && sig->PrevSignature()) sig=sig->PrevSignature(); time-=sig->GetSignatureStart(); // - Signaturemap last found Signature Event } pos->sig=sig; pos->zoomticks=zticks; pos->pos[0]=time/sig->measurelength; time-=sig->measurelength*(OSTART)pos->pos[0]; pos->pos[1]=time/sig->dn_ticks; // X-1-X-X time-=sig->dn_ticks*(OSTART)pos->pos[1]; if(pos->nozoom==true || pos->mode==Seq_Pos::POSMODE_COMPRESS) { // 1.1.5000 pos->pos[2]=mainaudio->ConvertInternRateToPPQ(time); // Rest Ticks pos->pos[3]=1; // set to 1 pos->index=3; } else { pos->pos[2]=time/zticks; // X-X-1-ticks time-=zticks*(OSTART)pos->pos[2]; pos->pos[3]=mainaudio->ConvertInternRateToPPQ(time); // Rest Ticks pos->index=4; } pos->pos[0]+=sig->sig_measure; pos->pos[1]++; switch(pos->measureformat) { case PM_1111: case PM_1p1p1p1: pos->pos[2]++; pos->pos[3]++; break; case PM_11_1: case PM_1p1p_1: pos->pos[2]++; break; case PM_1110: case PM_1p1p1p0: pos->pos[2]++; break; case PM_11_0: case PM_1p1p_0: break; } } break; case Seq_Pos::POSMODE_SAMPLES: { pos->pos[0]=song->timetrack.ConvertTicksToTempoSamples(time); pos->index=1; } break; default: if(pos->IsSmpte()==true || pos->mode==Seq_Pos::POSMODE_TIME) { pos->usesmpte=true; double ms=SubTicksToTempoTicks(time); ms*=INTERNRATEMSDIV;// ticks->ms if(pos->IsSmpte()==true && song && pos->offset) { ms+=pos->offset->GetOffSetMs(); } if(ms<0) { pos->minus=true; ms=-ms; } else pos->minus=false; // Hour double h=ms; h/=1000*60*60; pos->pos[0]=(OSTART)h; // round down ms-=pos->pos[0]*1000*60*60; #ifdef _DEBUG if(ms<0) MessageBox(NULL,"Convert Ticks to Pos Error Ms<0","Error",MB_OK); if(pos->pos[0]<0) { MessageBox(NULL,"Convert Ticks to Pos error Hour","Error",MB_OK); } #endif // Min h=ms; h/=60*1000; pos->pos[1]=(OSTART)h; // round down ms-=pos->pos[1]*60*1000; #ifdef _DEBUG if(ms<0) MessageBox(NULL,"Convert Ticks to Pos Error Ms<0","Error",MB_OK); if(pos->pos[1]<0) { MessageBox(NULL,"Convert Ticks to Pos error Min","Error",MB_OK); } #endif // Sec h=ms; h/=1000; pos->pos[2]=(OSTART)h; #ifdef _DEBUG if(ms<0) MessageBox(NULL,"Convert Ticks to Pos Error Ms<0","Error",MB_OK); if(pos->pos[2]<0) { MessageBox(NULL,"Convert Ticks to Pos error Sec","Error",MB_OK); } #endif if(pos->mode==Seq_Pos::POSMODE_TIME) { ms-=pos->pos[2]*1000; h=ms; h/=10; pos->pos[3]=h; // /sec100 pos->index=4; pos->space=sec_str; } else { double framefactor=1000; pos->space=smpte_str; pos->index=5; ms-=pos->pos[2]*1000; framefactor/=SMPTE_FPS[pos->mode]; h=ms; h/=framefactor; // frames pos->pos[3]=(OSTART)h; ms-=pos->pos[3]*framefactor; // qframes framefactor/=4; //TRACE ("MSREST %f\n",ms); h=ms; h/=framefactor; pos->pos[4]=h; #ifdef _DEBUG //ms-=pos->pos[4]*framefactor; //TRACE ("Rest ms %f P4 %d\n",ms,pos->pos[4]); if(pos->pos[3]<0) { MessageBox(NULL,"Convert Ticks to Pos error Frames","Error",MB_OK); } #endif } } break; } } OSTART Seq_Time::ConvertPosToLength(OSTART from,Seq_Pos *pos) { switch(pos->mode) { case Seq_Pos::POSMODE_NORMAL: case Seq_Pos::POSMODE_COMPRESS: { pos->sig=FindSignatureBefore(from); pos->zoomticks=zoomticks; OSTART l= pos->pos[0]*pos->sig->measurelength+ pos->pos[1]*pos->sig->dn_ticks+ pos->pos[2]*zoomticks; double dh=mainaudio->ConvertPPQToInternRate(pos->pos[3]); l+=dh; return l; } break; case Seq_Pos::POSMODE_TIME: { double ms= pos->pos[0]*3600+ // h pos->pos[1]*60+ // min pos->pos[2]; // sec ms*=1000; ms*=INTERNRATEMSMUL; // ms->ticks double h1,h2=modf(ms,&h1);// 121.1 > 122, 121.0 = 121 if(h2>0) ms++; return SubTicksToTempoTicks(from,ms); // Ticks->Tempo Ticks } break; default: { if(pos->IsSmpte()==true) { double ms= pos->pos[0]*3600+ // h pos->pos[1]*60+ // min pos->pos[2]; // sec ms*=1000; // Frame double ffact=1000; ffact/=SMPTE_FPS[pos->mode]; // Frame ms+=ffact*pos->pos[3]; // QF Factor ffact/=4; ms+=ffact*pos->pos[4]; ms*=INTERNRATEMSMUL; // ms->ticks double h1,h2=modf(ms,&h1);// 121.1 > 122, 121.0 = 121 if(h2>0) ms++; return SubTicksToTempoTicks(from,ms); // Ticks->Tempo Ticks } } break; } return 0; } void Seq_Time::ConvertTicksToLength(OSTART from,OSTART length,Seq_Pos *pos) { //length++; // Min 1 Tick //pos->startposition=from; pos->song=song; pos->length=true; switch(pos->mode) { case Seq_Pos::POSMODE_NORMAL: case Seq_Pos::POSMODE_COMPRESS: { pos->usesmpte=false; switch(pos->measureformat) { case PM_1p1p1p1: case PM_1p1p_1: case PM_1p1p1p0: case PM_1p1p_0: pos->space=measure_str; // . . . . break; default: pos->space=measure_str_empty; // _ _ _ _ break; } pos->sig=FindSignatureBefore(from); pos->zoomticks=zoomticks; // int h=sig->measurelength; // 1-X-X-X pos->pos[0]=(int)(length/pos->sig->measurelength); length-=pos->sig->measurelength*pos->pos[0]; pos->pos[1]=(int)(length/pos->sig->dn_ticks); // X-1-X-X length-=pos->sig->dn_ticks*pos->pos[1]; if(pos->nozoom==true) { pos->pos[2]=0; pos->pos[3]=(int)mainaudio->ConvertInternRateToPPQ(length); pos->index=4; } else { if(pos->mode==Seq_Pos::POSMODE_NORMAL) { switch(pos->measureformat) { case PM_1p1p1p1: case PM_1p1p1p0: case PM_1111: case PM_1110: { pos->pos[2]=(int)(length/zoomticks); // X-X-1-ticks length-=zoomticks*pos->pos[2]; pos->pos[3]=(int)mainaudio->ConvertInternRateToPPQ(length); // Rest Ticks pos->index=4; /* switch(pos->measureformat) { case PM_1p1p1p1: case PM_1111: pos->pos[3]++; break; } */ } break; default: pos->pos[2]=(int)mainaudio->ConvertInternRateToPPQ(length); // Rest Ticks, 1-1-ticks pos->index=3; /* switch(pos->measureformat) { case PM_11_1: case PM_1p1p_1: pos->pos[2]++; break; }*/ break; } } else { pos->pos[2]=(int)mainaudio->ConvertInternRateToPPQ(length); // compress mode : 1-1-ticks pos->index=3; } } // Offset //if(withmap==true) { // pos->pos[0]+=sig->measure; //pos->pos[1]++; //pos->pos[2]++; //pos->pos[3]++; } } break; case Seq_Pos::POSMODE_SAMPLES: { LONGLONG s=ConvertTicksToTempoSamplesStart(from,length); pos->usesmpte=false; pos->pos[0]=s; pos->index=1; } break; default: { if(pos->IsSmpte()==true || pos->mode==Seq_Pos::POSMODE_TIME) { double samples=ConvertTicksToTempoSamplesStart(from,length); double h2=song->project->projectsamplerate; // Hour double h=h2*60*60; double hr=floor(samples/h); pos->pos[0]=(int)hr; // round down samples-=hr*h; // Min h=h2*60; double min=floor(samples/h); pos->pos[1]=(int)min; // round down samples-=min*h; // Sec h=h2; double sec=floor(samples/h); pos->pos[2]=(int)sec; // round down samples-=sec*h; if(pos->IsSmpte()==true) // Frames { pos->usesmpte=true; pos->space=smpte_str; h=h2/SMPTE_FPS[pos->mode]; double frames=floor(samples/h); pos->pos[3]=(int)frames; samples-=frames*h; // QF h/=4; double qf=samples/h; pos->pos[4]=(int)qf; pos->index=5; } else { pos->space=sec_str; pos->index=4; h=samples/h2; h*=100; pos->pos[3]=(int)h; } } } break; } } int Seq_Time::ConvertTicksToMeasure(OSTART ticks) { Seq_Pos spos(Seq_Pos::POSMODE_COMPRESS); ConvertTicksToPos(ticks,&spos); return spos.pos[0]; } OSTART Seq_Time::ConvertMeasureToTicks(OSTART measure) // 1.1.1.0 or more, 1 min { #ifdef _DEBUG if(measure<1) MessageBox(NULL,"Illegal Convert Measure To Ticks","Error",MB_OK); #endif if(measure>=0) { Seq_Signature *sig=FirstSignature(); while(sig) { if(sig->sig_measure==measure) return sig->GetSignatureStart(); if(sig->sig_measure<measure) return sig->ostart+sig->measurelength*(measure-sig->sig_measure); sig=sig->NextSignature(); } } return 0; } LONGLONG Seq_Time::ConvertSamplesToNextSamples(LONGLONG tsamples,LONGLONG step_samples) { LONGLONG c=tsamples/step_samples; LONGLONG qsamples=c*step_samples; if(qsamples==tsamples) return tsamples; return qsamples+step_samples; } OSTART Seq_Time::ConvertTicksToNextMs(OSTART time,double sec,bool forceup) { double h=sec*mainaudio->GetGlobalSampleRate(); LONGLONG msstep=(LONGLONG)h; LONGLONG tsamples=ConvertTicksToTempoSamples(time); if(forceup==true) return ConvertSamplesToTicks(tsamples+msstep); LONGLONG c=tsamples/msstep; LONGLONG qsamples=c*msstep; if(tsamples==qsamples) return time; return ConvertSamplesToTicks(qsamples+msstep); } OSTART Seq_Time::ConvertTicksToNextMeasureTicks(OSTART time) { Seq_Signature *sig=FindSignatureBefore(time); OSTART mul=(time-sig->GetSignatureStart())/sig->measurelength; if(time-(mul*sig->measurelength+sig->ostart)) // rest ? mul++; return sig->GetSignatureStart()+mul*sig->measurelength; } OSTART Seq_Time::ConvertTicksToNextBeatTicks(OSTART time) { Seq_Signature *sig=FindSignatureBefore(time); OSTART mul=(time-sig->GetSignatureStart())/sig->dn_ticks; if(time-(mul*sig->dn_ticks+sig->ostart)) // rest ? mul++; return sig->GetSignatureStart()+mul*sig->dn_ticks; } OSTART Seq_Time::ConvertTicksToMeasureTicks(OSTART time,bool up) { Seq_Signature *sig=FindSignatureBefore(time); OSTART h=time-sig->GetSignatureStart(); h/=sig->measurelength; // if(time-(h*sig->measurelength+sig->ostart) && up==true) // rest ? // h+=1; h=sig->GetSignatureStart()+h*sig->measurelength; if(up==true) return time==h?h:h+sig->measurelength; return h; } OSTART Seq_Time::ConvertTicksToNextZoomTicks(OSTART time,OSTART zticks) { OSTART h=time/zticks; h*=zticks; if(h==time) return time; return h+zticks; } OSTART Seq_Time::ConvertTicksToFrameTicks(OSTART time) { Seq_Pos pos(song->project->standardsmpte); pos.song=song; pos.offset=0; ConvertTicksToPos(time,&pos); if(pos.pos[4]<2) { pos.pos[4]=0; } else { pos.pos[4]=0; pos.AddFrame(1); } return ConvertPosToTicks(&pos); } OSTART Seq_Time::ConvertTicksToQFrameTicks(OSTART time) { Seq_Pos pos(song->project->standardsmpte); pos.song=song; pos.offset=0; ConvertTicksToPos(time,&pos); return ConvertPosToTicks(&pos); } OSTART Seq_Time::ConvertTicksLeftQuantizeTicks(OSTART time,OSTART qticks) { return mainvar->SimpleQuantizeLeft(time,qticks); } OSTART Seq_Time::ConvertTicksQuantizeTicks(OSTART time,OSTART qticks) { Seq_Signature *sig=FindSignatureBefore(time); return sig->GetSignatureStart()+mainvar->SimpleQuantize(time-sig->GetSignatureStart(),qticks); } OSTART Seq_Time::ConvertTicksToBeatTicks(OSTART time,bool up) { Seq_Signature *sig=FindSignatureBefore(time); if(up==true) return sig->dn_ticks+sig->GetSignatureStart()+mainvar->SimpleQuantize(time-sig->GetSignatureStart(),sig->dn_ticks); return sig->GetSignatureStart()+mainvar->SimpleQuantize(time-sig->GetSignatureStart(),sig->dn_ticks); } bool Seq_Pos::PositionChanged() { // Check QFrames if(IsSmpte()==true) { if(pos[4]>3) { pos[3]++; pos[4]=0; } else if(pos[4]<0) { pos[3]--; pos[4]=3; } } // Check Frames switch(mode) { case POSMODE_SMPTE_239: case POSMODE_SMPTE_24: { if(pos[3]>23) { pos[2]++; pos[3]=0; } else if(pos[3]<0) { pos[2]--; pos[3]=23; } } break; case POSMODE_SMPTE_249: case POSMODE_SMPTE_25: { if(pos[3]>24) { pos[2]++; pos[3]=0; } else if(pos[3]<0) { pos[2]--; pos[3]=24; } } break; case POSMODE_SMPTE_2997df: case POSMODE_SMPTE_30df: case POSMODE_SMPTE_2997: case POSMODE_SMPTE_30: { if(pos[3]>29) { pos[2]++; pos[3]=0; } else if(pos[3]<0) { pos[2]--; pos[3]=29; } } break; case POSMODE_SMPTE_599: case POSMODE_SMPTE_60: { if(pos[3]>59) { pos[2]++; pos[3]=0; } else if(pos[3]<0) { pos[2]--; pos[3]=59; } } break; case POSMODE_SMPTE_48: if(pos[3]>47) { pos[2]++; pos[3]=0; } else if(pos[3]<0) { pos[2]--; pos[3]=47; } break; case POSMODE_SMPTE_50: if(pos[3]>49) { pos[2]++; pos[3]=0; } else if(pos[3]<0) { pos[2]--; pos[3]=49; } break; } // Check Sec if(IsSmpte()==true) { if(pos[2]>59) { pos[1]++; pos[2]=0; } else if(pos[2]<0) { pos[1]--; pos[2]=59; } // Check Min if(pos[1]>59) { pos[0]++; pos[1]=0; } else if(pos[1]<0) { pos[0]--; pos[1]=59; } // Check HOUR if(pos[0]<0)pos[0]=0; if(pos[0]<24) // max 24 h return true; } return false; }
3a79ec85cdfe814848b83caa3a23804d4517ad66
e074bd82ca35ea1a74d34e48be5bd8b9714c80cc
/codechef/CHEGLOVE/cheglove.cpp
9757eae61a570180b4f6f34297ddc1e217271425
[]
no_license
justachetan/cp
07367e8ed75e8b46ade2cf187483ce5fd70a7d46
c3dc88b5305762b90dc8a098e3d7a71197611c4d
refs/heads/master
2021-04-06T04:20:34.424442
2020-04-14T08:49:16
2020-04-14T08:49:16
124,506,364
2
0
null
null
null
null
UTF-8
C++
false
false
1,077
cpp
cheglove.cpp
#include <iostream> #include <vector> using namespace std; int main() { int tests; cin >> tests; for(int i = 0; i < tests; i ++) { vector<int> glove; vector<int> hand; vector<int> reverse; bool front = true; bool back = true; int size; cin >> size; for(int j = 0; j < size; j++) { int finger; cin >> finger; hand.push_back(finger); } for(int j = 0; j< size; j++) { int sheath; cin >> sheath; if(sheath < hand[j]) { front = false; } if(sheath < hand[size - j - 1]){ back = false; } glove.push_back(sheath); } if(front && back) { cout << "both" <<endl; } else if(front) { cout << "front" <<endl; } else if(back) { cout << "back" << endl; } else { cout << "none" <<endl; } } }
53ec559bb82d67bedfd5af5264fb9a6aacde498c
dc37e552f89f1accd2bac2b613a6ffc0bfaf9d79
/Vector类/Vector.cpp
5106c848fe25389034e47788c4436b793bea1089
[]
no_license
carzymad/STL-INITATE
e0c5a4221b4e85d90fa27cef74518b05ff3ad4be
c96d3ff055aaef3a8a214e893f51040e9b0e60da
refs/heads/master
2021-01-10T13:28:03.281184
2016-03-04T12:29:59
2016-03-04T12:29:59
53,133,769
3
0
null
null
null
null
UTF-8
C++
false
false
833
cpp
Vector.cpp
#include "Vector.h" #include <iostream> using namespace std; Vector::Vector() { arry = new int[LENGTH+2]; Size = 0; Length = LENGTH; } Vector::Vector(Vector &tmp) { Size = tmp.Size; Length = tmp.Length; arry = new int[Length]; for (int i = 0; i < tmp.size(); i++) arry[i] = tmp[i]; } Vector::~Vector() { //dtor } int Vector::size() { return Size; } void Vector::push_back(int num) { Size++; if (num > Length) { Vector tmp = *this; delete arry; arry = NULL; arry = new int[2*Length]; Length *= 2; for (int i = 0; i < Length; i++) { arry[i] = tmp[i]; } } arry[Size-1] = num; } void Vector::pop_back() { Size--; arry[Size] = 0; } int Vector::top() { return arry[Size-1]; }
401befc1f67cefe21169a24924ea4d2dbd4d9208
03a373df58e86b016cdbc17d130548b7cc237b0e
/TrabalhoDeCg/mainwindow.cpp
8deeb45f6570ca476cbc5d6a6369f532282148fe
[]
no_license
dennermiranda/Computer-Graphics-Project
316e69a42159d0663a6cec7f1e44f517819666c9
bafd842ff191f450e516994085edbf03e4a2199a
refs/heads/master
2021-03-27T10:30:54.182245
2016-12-22T18:46:14
2016-12-22T18:46:14
null
0
0
null
null
null
null
UTF-8
C++
false
false
11,429
cpp
mainwindow.cpp
#include "mainwindow.h" #include "ui_mainwindow.h" #include <iostream> #include <string> #include <limits> #include <cmath> #include <cstdlib> #include <cstdio> #include <ctime> #include "primitive.h" #include "vector.h" #include "ray.h" #include "camera.h" #include "material.h" #include "color.h" #include "light.h" #include "object.h" #include "sphere.h" #include "plane.h" #include "triangle.h" #include "torus.h" #include "cubo.h" #include "wind.h" #include "mesa.h" #include "hex.h" #include "bed.h" #include "closet.h" #include "lamp.h" #include "laptop.h" #include "chair.h" #include "desk.h" #include "tv.h" #include "cenario.h" #include "canto.h" using namespace std; /* Globals */ vector<Primitive *> objects; vector<Light *> light_sources; //double accuracy = 0.0000000001; int W = 320*2; int H = 240*2; Color white(1.0, 1.0, 1.0); Color black(0, 0, 0); Material green(Color(0.2, 0.2, 0.2), Color(0.5, 1.0, 0.5), Color(0.5, 1.0, 0.5), 2); Material brown(Color(0.2, 0.2, 0.2), Color(0.4, 0.2, 0.25), Color(0.1, 0.1, 0.1), 0); Material metal(Color(0.2, 0.2, 0.2), Color(0.1, 0.1, 0.1), Color(1, 1, 1), 50); Material red(Color(0.2, 0.2, 0.2), Color(1,0.1,0.1), Color(1, 1, 1), 70); Material brass(Color(0.33, 0.22, 0.03), Color(0.78, 0.57, 0.11), Color(0.99, 0.91, 0.81), 27.8); Material piso1(Color(0.8, 0.8, 0.8), Color(0.8, 0.8, 0.8), Color(0.8, 0.8, 0.8), 1); Material blacktv(Color(0, 0, 0), Color(0, 0, 0), Color(0, 0, 0), 1); Material realRed(Color(0.7, 0.0, 0.0), Color(0.7, 0.0, 0.0), Color(1, 1, 1), 70); Material realYellow(Color(0.6, 0.8, 0.0), Color(0.6, 0.8, 0.0), Color(1, 1, 1), 70); Material realBrown(Color(0.7, 0.5, 0.3), Color(0.7, 0.5, 0.3), Color(0.7, 0.5, 0.3), 70); //Materiais & texturas: Material gold(Color(0.25, 0.20, 0.07), Color(0.75, 0.61, 0.23), Color(0.63, 0.65, 0.37), 70); //0.2 Material emerald(Color(0.0215, 0.1745, 0.0215), Color(0.07568, 0.61424, 0.07568), Color(0.633, 0.727811, 0.633), 70); //0.6 Material jade(Color(0.135, 0.2225, 0.1575), Color(0.54, 0.89, 0.63), Color(0.31622, 0.31622, 0.31622), 70); //0.1 Material silver(Color(0.19, 0.19, 0.19), Color(0.51, 0.51, 0.51), Color(0.51, 0.51, 0.51), 70); //0.4 Material ruby(Color(0.1745, 0.01175, 0.01175), Color(0.61424, 0.04136, 0.04136), Color(0.727811, 0.626959, 0.626959), 0.6); //0.6 Material copper(Color(0.19, 0.07, 0.02), Color(0.7, 0.27, 0.08), Color(0.26, 0.14, 0.09), 70); //0.1 //Plastico: Material blackPlastic(Color(0.0, 0.0, 0.0), Color(0.01, 0.01, 0.01), Color(0.5, 0.5, 0.5), 70); //0.25 Material cyanPlastic(Color(0, 0.1, 0.06), Color(0, 0.509803, 0.509803), Color(0.50196078, 0.50196078, 0.50196078), 0.25); //0.25 Material greenPlastic(Color(0, 0, 0), Color(0.1, 0.35, 0.1), Color(0.45, 0.55, 0.45), 70); //0.25 Material yellowPlastic(Color(0.0, 0.0, 0.0), Color(0.5, 0.5, 0.0), Color(0.6, 0.6, 0.5), 70); //0.25 //Borracha: Material greenRubber(Color(0.05, 0.05, 0.0), Color(0.5, 0.5, 0.4), Color(0.7, 0.7, 0.04), 0.078125); //0.078125 Material whiteRubber(Color(0.05, 0.05, 0.0), Color(0.5, 0.5, 0.5), Color(0.7, 0.7, 0.7), 0.078125); //0.078125 Material yellowRubber(Color(0.05, 0.05, 0.0), Color(0.5, 0.5, 0.4), Color(0.7, 0.7, 0.04), 70); //0.078125 Vector X(1, 0, 0); Vector Y(0, 1, 0); Vector Z(0, 0, 1); Vector O(0, 0, 0); long getIndexOfClosestObject(vector<double> intersections) { if (intersections.size() == 0) //return null if intersections vector is empty return -1; if (intersections.size() == 1) { //theres just one if (intersections.at(0) > 0) return 0; return -1; } double min = numeric_limits<double>::max(); double index = -1; for (unsigned int j = 0; j < intersections.size(); j++) { if (intersections.at(j) > 0 && intersections.at(j) < min) { min = intersections.at(j); //Getting the nearest object index = j; } } return index; } Color getColorAt(Vector intersectionPoint, Vector camera_ray_direction, long index_of_closest_object) { //Modelo de iluminação de Phong Primitive *closest_object = objects.at(index_of_closest_object); //getting the closest obj Vector n = closest_object->getNormalAt(intersectionPoint); //closest obj normal Material object_material = closest_object->getMaterial(); //getting its material Color color(0, 0, 0); //color = color.scale(ambientLight); for (unsigned int light_i = 0; light_i < light_sources.size(); light_i++) { Color light_color_a = light_sources.at(light_i)->col_a(); Color light_color_d = light_sources.at(light_i)->col_d(); Color light_color_s = light_sources.at(light_i)->col_s(); Vector l = light_sources.at(light_i)->pos().add(intersectionPoint.negative()).normalize(); float cossine = n.dotProduct(l); // Componente ambiente color = color.add(light_color_a.multiply(object_material.ka())); if (cossine > 0) { // Componente Difusa color = color.add(light_color_d.multiply(object_material.kd()).scale(cossine)); //Luz + luz difusa //Componente especular Vector v = camera_ray_direction.negative(); //Vetor do ray double _2ln = 2*l.dotProduct(n); Vector _2lnn = n.multiply(_2ln); Vector r = _2lnn.add(l.negative()).normalize(); double specular = r.dotProduct(v); //if (specular > 0) { color = color.add(light_color_s.multiply(object_material.ks()).scale(pow(specular, object_material.m()))); //Multiplicando pela especular //} } } return color.clip(); //Normalizar cores } void addPrimitive(Primitive * primitive) { objects.push_back(primitive); //Adicionando primitivas básicas } void addObject(Object object) { vector<Primitive *> faces = object.getFaces(); for(unsigned int i = 0; i < faces.size(); i++) { addPrimitive(faces.at(i)); } } void addLight(Light &light) { light_sources.push_back(dynamic_cast<Light *>(&light)); } MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); //Ground: Plane ground(Vector(0,1,0), -3, brown); addPrimitive(&ground); /* // Random objects: // //Torus Torus torus(red); // torus.scale(0.5,0.5,0.5); // torus.translate(0.75,1,0); // addObject(torus); //Windmll Wind wind(metal); // wind.scale(0.0Closet,0.0Closet,0.0Closet); // wind.rotateX(270); // addObject(wind); //Hexagono Hex hexagono(green); hexagono.scale(0.015,0.015,0.015); // hexagono.rotateX(90); // hexagono.translate(0,0.47,0); //quando hex esta deitado hexagono.rotateY(150); hexagono.translate(0,0.5,0.5); addObject(hexagono); //Hexagono 2 Hex hexagono_2(brass); hexagono_2.scale(0.015,0.015,0.015); // hexagono_2.rotateX(90); // hexagono_2.translate(0,0.47,0); //quando hex esta deitado hexagono_2.rotateY(120); hexagono_2.translate(0,0.5,-0.5); addObject(hexagono_2); Mesa mesa(metal); addObject(mesa); mesa.rotateY(60); //Piso: Cubo piso(piso1); piso.scale(3, 0.1, 2.5); piso.translate(0,-1.3,-1); addObject(piso); */ //laptop: Laptop notebook(silver); notebook.rotateY(-45); notebook.scale(0.005, 0.005, 0.005); notebook.translate(-1.45, 0.15, -2.75); addObject(notebook); //Televisao: Tv televisao(blackPlastic); televisao.scale(0.01,0.01,0.01); televisao.translate(0.25,0.5,-3.1); addObject(televisao); //Closet: Closet armario(copper); armario.scale(0.0035,0.0035,0.0035); armario.rotateY(270); armario.translate(2.2, 0, -1); addObject(armario); //Cadeira: Chair cadeira(gold); cadeira.scale(0.012,0.012,0.012); cadeira.rotateY(230); cadeira.translate(-1, -0.45, -2.35); addObject(cadeira); //Mesa: Desk mesa(copper); mesa.rotateY(90); mesa.scale(0.02,0.02,0.02); mesa.translate(-2.1,-0.5,-2.65); addObject(mesa); //Cama: Bed cama(jade); cama.scale(0.1,0.1,0.1); cama.rotateY(90); cama.translate(0.0, -0.25, 0.25); addObject(cama); //Criado mudo 1 (direita): Mesa cmudo1(ruby); cmudo1.scale(0.1, 0.3, 0.183); cmudo1.translate(1.2, 0.0, 0.9); addObject(cmudo1); //Criado mudo 2 (esquerda): Mesa cmudo2(greenPlastic); cmudo2.scale(0.1, 0.3, 0.183); cmudo2.translate(-0.4, 0.0, 0.9); addObject(cmudo2); //Luminaria mesa 1 Lamp luminaria1(gold); luminaria1.scale(0.01, 0.01, 0.01); luminaria1.rotateY(230); luminaria1.translate(1.2, 0.0, 0.9); addObject(luminaria1); //Luminaria mesa 2 Lamp luminaria2(gold); luminaria2.scale(0.01, 0.01, 0.01); luminaria2.rotateY(90); luminaria2.translate(-0.4, 0.0, 0.9); addObject(luminaria2); //Cenario Cenario quarto(silver); quarto.scale(0.75,0.5,0.75); quarto.rotateY(90); quarto.translate(0,-0.5,-1); addObject(quarto); double aspectRatio = (double)W / (double)H; // Vector camera_position(-6, 0.3, 3); // Vector camera_position(-6, 4, 3); // Vector camera_position(0, 4, 4); Vector camera_position(2, 5, 4); //visao de canto // Vector camera_position(8, 0, 1); //de lado // Vector camera_position(0, 3, 4); //de frente Vector look_at(0, 0, 0); Vector up(0, 1, 0); Camera camera(camera_position, look_at, up); Light light1(Vector(0, 0, 10), Color(1, 1, 1), white, white); Light light2(Vector(0, 10, 10), Color(1, 1, 1), white, white); addLight(light1); addLight(light2); QImage image = QImage(W, H, QImage::Format_RGB32); QGraphicsScene * graphic = new QGraphicsScene(this); double xamnt, yamnt; for (int j = 0; j < H; j++) { //Uma thread para cada linha da matriz de pixels #pragma omp parallel for for (int i = 0; i < W; i++) { if (W > H) { xamnt = ((i + 0.5)/W)*aspectRatio - ((W - H)/(double)H)/2; yamnt = ((H - j) + 0.5)/H; } else if (H > W){ xamnt = (i + 0.5)/W; yamnt = (((H - j) + 0.5)/H)/aspectRatio - (((H - W)/(double)W)/2); } else { xamnt = (i + 0.5)/W; yamnt = ((H - j) + 0.5)/H; } Ray camera_ray = camera.createRay(xamnt, yamnt); vector<double> intersections; for (unsigned int index = 0; index < objects.size(); index++) { intersections.push_back(objects.at(index)->findIntersection(camera_ray)); } long index_of_closest_object = getIndexOfClosestObject(intersections); Color c; if (index_of_closest_object < 0) c = black; else { Vector intersectionPoint = camera_ray.origin().add(camera_ray.direction().multiply(intersections.at(index_of_closest_object))); //MIT c = getColorAt(intersectionPoint, camera_ray.direction(), index_of_closest_object); } QRgb qtRGB = qRgb(c.r()*255, c.g()*255, c.b()*255); image.setPixel(i, j, qtRGB); // cout << i << " pixel " << j << endl; } } graphic->addPixmap(QPixmap::fromImage(image)); ui->graphicsView->setScene(graphic); } MainWindow::~MainWindow() { delete ui; }
f455aa600a10e1d477af5ac36b2999c90464e275
ba4db75b9d1f08c6334bf7b621783759cd3209c7
/src_main/game/shared/tf/tf_weapon_shovel.cpp
b0414d30df40e6ba453395d5f7ff031875e7bad4
[]
no_license
equalent/source-2007
a27326c6eb1e63899e3b77da57f23b79637060c0
d07be8d02519ff5c902e1eb6430e028e1b302c8b
refs/heads/master
2020-03-28T22:46:44.606988
2017-03-27T18:05:57
2017-03-27T18:05:57
149,257,460
2
0
null
2018-09-18T08:52:10
2018-09-18T08:52:09
null
WINDOWS-1252
C++
false
false
1,134
cpp
tf_weapon_shovel.cpp
//====== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======= // // Purpose: // //============================================================================= #include "cbase.h" #include "tf_weapon_shovel.h" #include "decals.h" // Client specific. #ifdef CLIENT_DLL #include "c_tf_player.h" // Server specific. #else #include "tf_player.h" #endif //============================================================================= // // Weapon Shovel tables. // IMPLEMENT_NETWORKCLASS_ALIASED( TFShovel, DT_TFWeaponShovel ) BEGIN_NETWORK_TABLE( CTFShovel, DT_TFWeaponShovel ) END_NETWORK_TABLE() BEGIN_PREDICTION_DATA( CTFShovel ) END_PREDICTION_DATA() LINK_ENTITY_TO_CLASS( tf_weapon_shovel, CTFShovel ); PRECACHE_WEAPON_REGISTER( tf_weapon_shovel ); //============================================================================= // // Weapon Shovel functions. // //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- CTFShovel::CTFShovel() { }
155b534590e0fe7ee0cc778e248fbfb32d37b861
21ff7dc19b5829a85ef044d9a7bcc01513cdc3ef
/CIRCULAR_LINKED_LIST/LINKED_LIST/Node_Implementation.cpp
e2d68d258d13326f8e534809434afb3a74416d9c
[]
no_license
AbdulWajid768/Data_Structures
fa894ecad8d3a04c05b52e07f0ebad61a04327da
fde5bad6bcf273d896e755e7093059427c0cf771
refs/heads/main
2023-03-01T09:50:15.374978
2021-02-03T17:54:39
2021-02-03T17:54:39
335,704,151
0
0
null
null
null
null
UTF-8
C++
false
false
46
cpp
Node_Implementation.cpp
#include "Node.cpp" template class Node<int>;
b79ef52b00baed44a8a3fa5e609bad3aaf03acf1
968e85460cfbf7429b24a910e592d00797a6f908
/C/HDU/2005.cpp
cb75a394da14f2e099aa4925a6b6977a652b8e58
[]
no_license
Dodd2013/Study
f54a0360c3debfce9b69d96703c373ea5465a916
156ba67ca4fa4486e02ff8d6795118357aaeea1c
refs/heads/master
2023-01-10T00:19:39.015999
2019-08-01T14:16:46
2019-08-01T14:16:46
80,272,251
3
1
null
2023-01-04T06:00:14
2017-01-28T07:28:14
JavaScript
UTF-8
C++
false
false
307
cpp
2005.cpp
#include <cstdio> int mouth[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; int main(){ int y,m,d,f,sum; while(~scanf("%d/%d/%d",&y,&m,&d)){ sum=0,f=0; if((y%4==0&&y%100!=0)||y%400==0)f=1; for(int i=1;i<m;i++){ sum+=mouth[i]; } if(f==1&&m>2)sum++; sum+=d; printf("%d\n",sum); } return 0; }
48d2c046e6b2131e6b2ca783a8d9da26da18e21d
250a624a85fa14b611ef49468a0396d8bb14070c
/activeminion.h
8b12380003a92597cdcb141ccaff31ea5e619777
[]
no_license
bboy8863/Sorcery
66a2291c08ffebfcd5df77172fda3335d254e777
7a99e7f030583e718edd896ee469159dcdbfc096
refs/heads/master
2020-03-28T08:33:53.540038
2018-09-08T22:29:50
2018-09-08T22:29:50
147,973,654
0
0
null
null
null
null
UTF-8
C++
false
false
428
h
activeminion.h
#ifndef ACTIVEMINION_H #define ACTIVEMINION_H #include "minion.h" class ActiveMinion : public Minion { protected: int abCost; std::string desc; public: ActiveMinion(std::string name, int cost, Player * o, Player * e ,int att, int def, int abCost, std::string desc); card_template_t makeTemplate(int newAtt, int newDef) override; card_template_t makeTemplate() override; virtual ~ActiveMinion()=0; }; #endif
712c12d76c168a5a605ff10cff2b8bbc395a1063
b9816ae2b659419183c892fbaf8cad9c2423f1d9
/src/actionmanager.h
e52663b951aeef772cf82783ff5052c530fccc2c
[]
no_license
petokal/harbour-smscontrol
cbef01a3fdf6d0dd7719c6919cab9c1690b076fa
2202006ace94cac34459323eeb65849cf54ada4f
refs/heads/master
2021-06-02T09:28:24.761663
2016-06-29T08:13:57
2016-06-29T08:13:57
null
0
0
null
null
null
null
UTF-8
C++
false
false
352
h
actionmanager.h
#ifndef ACTIONMANAGER_H #define ACTIONMANAGER_H #include <QObject> #include "action.h" class ActionManager : public QObject { Q_OBJECT public: explicit ActionManager(QObject *parent = 0); QList<Action *> getActions(qlonglong deviceID) const; signals: public slots: private: QList<Action *> m_actions; }; #endif // ACTIONMANAGER_H
fe20fb0e34c4907ee975dd44684d2da55cbc54df
591b9c72cbbf0c7390dd12c2d3d2a2fe60dd31ea
/windpyfoam/windPyFoamDict
c9751bf876730ddb52d05ff2cea21016b6103ede
[]
no_license
alon/myOpenFOAMscripts
fb37b70d2e724ecf328e958461c2ed5d4ef73342
c7796196c93fad38e7b2df6607d1b5abe664022b
refs/heads/master
2021-01-15T11:34:00.519493
2012-12-14T16:02:22
2012-12-14T16:02:22
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,477
windPyFoamDict
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location system; object windPyFoamDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Wind Py Foam specific parameters. template "test_template"; runArg "sfoam"; procnr 20; procnrSnappy 10; caseTypes { gridConvergence 0; gridConvergenceParams { gridRange (1 2 3 4 5); windDir 30; } windRose { blockMeshCellSize 15; /* Inlet profile, direction and freaquency of occurance */ /* weight [0, 1.0], direction [0, 360.0], z0 [m [0,100]], TKE/us^2 [0,100], us [m/s [0,100]]*/ windDir ( (0.15 90 0.0003 5.8 0.4) (0.35 75 0.0003 5.8 0.4) (0.05 59 0.0003 5.8 0.4) (0.45 270 0.015 5.8 0.5) ); }; }; // general simulation parameters simParams { nu 1.4076485; // [m^2/s] caseType SHM; }; SHMParams { rectanguleDomainSTL 0; cellSize { fLayerRatio 4; //notice if the test_template uses relative values or not levelRef 2; layers 12; r 1.2; zp_z0 20; //ratio between middle of first cell from the ground to the roughness length - 13.5 is Martinez value for Askervein } domainSize { refinement_length 80; [m] typical_height 12; [m] fXup 200; // upwind fetch [m] fXdown 800; // downwind fetch [m] fY 660; // dom_y = fX * a [m] domZ 120; // = Href [m] z_min 0.75;// [m] } pointInDomain { zz 111; } centerOfDomain { x0 0; y0 0; } }; kEpsParams { Cmu 0.03; // castro 96 - redundent for windRose k 0.4; }; Measurments { M0 { x -180.8; // [m] y -103.3; // [m] gl 0.75; // [m] ground level } M1 { x -52.4; // [m] y -31.0; // [m] gl 0.80; // [m] ground level } M2 { x -34.9; // [m] y -21.1; // [m] gl 10.80; // [m] ground level } M3 { x 3.2 ; // [m] y 0.0; // [m] gl 11.7; // [m] ground level } M4 { x 51.5; // [m] y 30.6; // [m] gl 1.40; // [m] ground level } M5 { x 1.5; // [m] y -48.9; // [m] gl 2.60; // [m] ground level } M6 { x -46.1; // [m] y 0.2; // [m] gl 11.50; // [m] ground level } M7 { x -66.9; // [m] y 0.0; // [m] gl 0.80; // [m] ground level } M8 { x 92.0; // [m] y -0.1; // [m] gl 2.0; // [m] ground level } M9 { x 327.3; // [m] y -39.3; // [m] gl 0.75; // [m] ground level } } sampleParams { hSample (10 50); Nx 100; }; // *********************************************************************** //
0266ed57b4913fab0ac2a4718be99c9302f7ef18
e08379436e5023c15ffc0ab9481c67a3c2fd385a
/calculator2/calculator2/Print.cpp
018845fba0bab94e7ae67441adffe3de2a92c91d
[]
no_license
huangxusijia/object-oriented
943f3ba6a935ed03c55dcebeadd49908a72c7102
8f41124df8b99ea25da3aee11b1bf62e913882fe
refs/heads/master
2021-01-21T13:57:58.745006
2016-06-05T14:04:14
2016-06-05T14:04:14
50,351,719
0
0
null
null
null
null
GB18030
C++
false
false
313
cpp
Print.cpp
#include "Print.h" #include<iostream> #include<string> #include<queue> using namespace std; void Print::printqueue(queue<string> que) { int i; if (!que.empty()) { while (!que.empty()) { cout << que.front() << endl; que.pop(); } } else cout << "输入有误,请重新输入" << endl; }
c349105c1dfbbfa883a4379fbccaee2ab10482d5
30986ac6466165e25aa80b782e13c30bfa82174b
/src/yal/interpreter.cpp
cb191417e483424a2735ab7cff7bf7cc33a81b0e
[ "MIT" ]
permissive
zhouqqhh/VLSI_project
141dc5585017cb3a40419f958962be324f5d2463
23c1967674cd4aac3b243161bb0e51487a38a70e
refs/heads/master
2021-10-11T01:03:23.879199
2019-01-20T16:06:48
2019-01-20T16:06:48
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,790
cpp
interpreter.cpp
/* * The MIT License (MIT) * * Copyright (c) 2014 Krzysztof Narkiewicz <krzysztof.narkiewicz@ezaquarii.com> * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. * */ #include "interpreter.h" #include "module.h" #include <unordered_map> using namespace yal; Interpreter::Interpreter() : m_scanner(*this), m_parser(m_scanner, *this) { } Interpreter::Interpreter(std::istream & is) : Interpreter() { switch_input_stream(is); } bool Interpreter::parse() { return !m_parser.parse(); } void Interpreter::clear() { m_location.initialize(); m_modules.clear(); m_parent.clear(); } std::ostream & Interpreter::print() const { return print(std::cout); } std::ostream & Interpreter::print(std::ostream & os, const std::string & blank) const { for (const Module &m : m_modules) m.print(os, blank); if (!m_parent.name.empty()) m_parent.print(os, blank); return os; } void Interpreter::switch_input_stream(std::istream &is) { m_scanner.switch_streams(&is, nullptr); } std::vector<std::size_t> Interpreter::make_module_index() const { unordered_map<string, size_t> map; map.reserve(m_modules.size()); size_t cnt = 0; for (const Module &m : m_modules) { auto ib = map.emplace(m.name, cnt++); if (!ib.second) throw runtime_error("Conflicting module name: " + m.name); } vector<size_t> index; index.reserve(m_parent.network.size()); for (const auto &e : m_parent.network) { const string &name = ParentModule::get_module_name(e); auto it = map.find(name); if (it == map.end()) throw runtime_error("Invalid module name: " + name); index.push_back(it->second); } return index; }
07cd81d583536b1dc3ec33b874c34115cf14e075
b4bb307b8b72d0c7c6f9c76ad46f0853055417c4
/old[CPP]/Mytool.h
859cbc682887abeed8cecd2b7e9d27f0c8160efc
[]
no_license
hlz2516/Mytool
3e46c94ae64c206a7ff9bf9d081946483761d8f2
26cd5365f74cec660750810b47de97c60054dff2
refs/heads/master
2021-07-13T04:59:27.522387
2021-06-24T17:02:08
2021-06-24T17:02:08
153,772,656
0
0
null
null
null
null
MacCentralEurope
C++
false
false
4,386
h
Mytool.h
//this is a joke #pragma once #include <iostream> #include <iomanip> #include <stdlib.h> #include <ctime> #define random(x) (rand()%x) /*When your function uses random numbers, call the srand () function in the main function or in the function that calls the random number. The srand () function must be called before the random number is generated. */ using namespace std; inline void setprecision(int n) { std::cout.setf(std::ios_base::fixed);std::cout.precision(n);} //Set the output precision of the output floating point, n is the digit reserved after the decimal point. inline void unsetprecision(){ std::cout.unsetf(std::ios_base::fixed); }//Cancel output precision of output floating point number. inline int get_random(int n) { return random(n);} //Get a random integer of [0, n) template<class T> inline void h_swap(T& a, T& b) { T temp = a; a = b; b = temp; } template<class T, int N> void array_rand(T(&arr)[N], int valid_len=N) //Array scrambling device,arr:Array name(not pointer)£¨valid_len:Effective length { for (int i = 0; i < valid_len; i++) { int m = get_random(valid_len); h_swap(arr[i], arr[m]); } } template<class T> void array_rand(T* arr, int valid_len) //Array scrambling device,arr:array name (pointer)£¨valid_len:Effective length { for (int i = 0; i < valid_len; i++) { int m = get_random(valid_len); h_swap(arr[i], arr[m]); } } template<class T,int N> inline int array_length(T const (&arr)[N]){return N;} //Get array length , arr:array name template <class T,int N> inline void array_out(T const (&arr)[N],int valid_len=N) //Output array ; { for (int i = 0; i < valid_len; i++) cout << arr[i] << " "; } template <class T> void BubbleSort(T* arr,int n) { int m = n; for (int i = 0; i < n; i++) { for (int j = 1; j < m; j++) { if (arr[j-1] > arr[j]) h_swap(arr[j-1], arr[j]); } m--; } } template <class T> void MergeSort(T* arr, int lo, int hi) { if (hi - lo < 2) return; int mi = (lo + hi) / 2; MergeSort(arr, lo, mi); MergeSort(arr, mi, hi); //Operation of each sub item: int templo = lo; int la = mi - lo; int lb = hi - mi; T *temp1 = new int[la]; T *temp2 = new int[lb]; for (int i = 0; i < la; i++) temp1[i] = arr[i + lo]; for (int j = 0; j < lb; j++) temp2[j] = arr[j + mi]; T *a = temp1, *b = temp2; while (a < (temp1 + la) && b < (temp2 + lb)) { if (*a > *b) { arr[lo++] = *b; b++; } else { arr[lo++] = *a; a++; } } if (a < (temp1 + la)) { for (int i = lo; i < hi; i++) arr[lo++] = *(a++); } else if (b < (temp2 + lb)) { for (int i = lo; i < hi; i++) arr[lo++] = *(b++); } lo = templo; delete[] temp1; delete[] temp2; } long SortOfTime(void(*Algorithm)(int *, int)) /*Computational algorithm time £¨Algorithm writes for you the name of the algorithm function (if your function parameter receives int *, int, it will jump to this) */ const int length =10000; int arr[length]; for (int i = 0; i < length; i++) arr[i] = get_random(length); long t1 =clock(); (*Algorithm)(arr, length); long t2 = clock() - t1; //for (int i = 0; i < length;) //This is the output data. //{ // std::cout << arr[i] << " "; // if (++i % 10 == 0) // std::cout << endl; //} std::cout << endl; return t2; } long SortOfTime(void(*Algorithm)(int *, int,int)) /*Calculate the algorithm time, Algorithm writes the algorithm function name for you (if your function parameter receives int *, int, int, it will jump to this) */ { const int length = 10000; int arr[length]; for (int i = 0; i < length; i++) arr[i] = get_random(length); long t1 = clock(); (*Algorithm)(arr,0, length); long t2 = clock() - t1; //for (int i = 0; i < length;) //{ // std::cout << arr[i] << " "; // if (++i % 20 == 0) // std::cout << endl; //} std::cout << endl; return t2; } inline char get_lowercase() //Get a random lowercase letter. { int lower = 97 + get_random(26); return char(lower); } inline char get_uppercase() //Get a random uppercase letter. { int upper = 65 + get_random(26); return char(upper); } char get_case() //Get a random letter. { int others[] = { 91,92,93,94,95,96 }; int _case = 65 + get_random(26 * 2); for (int i = 0; i < array_length(others); ) { if (_case == others[i]) { _case = 65 + get_random(26 * 2); i = 0; } else i++; } return char(_case); }
4433c4d7d96c2d82dbf6a639e2ab44b907928858
ba1f470c1f405bbf0d97ee5bad4d9c430427858a
/Code/Engine/Math/Objects/GeomObject.hpp
9da9040cb4370ce5b800c011c9244eae35b186e1
[ "MIT" ]
permissive
ntaylorbishop/Copycat
38b4a36ed9bd35e4518767dea36b49a960697ef6
c02f2881f0700a33a2630fd18bc409177d80b8cd
refs/heads/master
2021-07-16T18:05:01.742876
2017-10-24T02:09:51
2017-10-24T02:09:51
91,923,450
2
0
null
null
null
null
UTF-8
C++
false
false
272
hpp
GeomObject.hpp
#pragma once enum eGeomType { GEOM_TYPE_SPHERE = 0, GEOM_TYPE_AABB3 }; class GeomObject { public: GeomObject(eGeomType type) : m_type(type) { } eGeomType GetType() const { return m_type; } private: eGeomType m_type; }; GeomObject* CreateGeomType(eGeomType type);
8f3b254df12db9473145469ccd04a971d99f54af
2e35347816583741a3808fa81700c03f1bf54004
/TankStorm/TankStorm/FiredEvent.h
214303515f4498613cc1a54e9962fe32d18946ec
[]
no_license
JackOfDawn/TankStorm
abd1ec1f558fbb29e5597073812171b6c651ce89
75942c8b0d4474783a95a63a56c41beb67ffb786
refs/heads/master
2016-09-06T20:09:50.932965
2015-04-04T14:48:32
2015-04-04T14:48:32
33,408,700
0
0
null
null
null
null
UTF-8
C++
false
false
297
h
FiredEvent.h
#ifndef FIRED_EVENT_H #define FIRED_EVENT_H #include "Event.h" #include "Vector2D.h" class FiredEvent : public Event { public: FiredEvent(Vector2D location, double angle, float speed, float accuracy); ~FiredEvent(); Vector2D location; double angle; float speed; float accuracy; }; #endif
32fd2e448aefbb4f573fed355797c252614dd474
bf8e51adccd60a6915b002f619e750052bbeab8c
/Projects/CoX/Servers/MapServer/ScriptingEngine_Null.cpp
762d9d23a29750d84d0cfdced4310cdc87cfb92d
[ "BSD-3-Clause", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-unknown-license-reference" ]
permissive
teronis84/Segs
14b796a485d9de3b8bf89273d12c43ec18be1339
71ac841a079fd769c3a45836ac60f34e4fff32b9
refs/heads/master
2020-03-09T07:57:25.957769
2018-04-11T11:33:25
2018-04-11T11:33:25
128,677,317
0
0
BSD-3-Clause
2018-04-08T20:02:02
2018-04-08T20:02:01
null
UTF-8
C++
false
false
638
cpp
ScriptingEngine_Null.cpp
#include "ScriptingEngine.h" ScriptingEngine::ScriptingEngine() {} ScriptingEngine::~ScriptingEngine() {} void ScriptingEngine::registerTypes() {} int ScriptingEngine::runScript(const QString &script_contents, const char *script_name) {return -1;} int ScriptingEngine::runScript(MapClient * client, const QString &script_contents, const char *script_name) {return -1;} int ScriptingEngine::loadAndRunFile(const QString &path) { return -1; } std::string ScriptingEngine::callFunc(const char *name, int arg1) { return ""; } std::string ScriptingEngine::callFuncWithClientContext(MapClient *client, const char *name, int arg1) { return "";}
04e775f926feda2c4b4797c07284929cfb49e9e1
ddbdbc0ce681558fac8d0fad3a5b346bdb8db561
/libOpenCL/OpenCLInfos.h
97959d23ef7238f6323a5404a19e64edd8e2838c
[]
no_license
Trisoil/Regards
9488f4ee31784490e06a24a136a76a45a09910f9
3eda6669f4d1a2043f631f747a6c36fa644c590d
refs/heads/master
2020-05-07T11:57:03.681785
2019-04-09T16:41:14
2019-04-09T16:41:14
null
0
0
null
null
null
null
UTF-8
C++
false
false
952
h
OpenCLInfos.h
#pragma once #ifdef __APPLE__ #include <OpenCL/cl.h> #else #include <CL/cl.h> #endif namespace Regards { namespace OpenCL { class COpenCLInfos { public: COpenCLInfos(); ~COpenCLInfos(); // Minimal alignment in bytes for memory used in clCreateBuffer with CL_MEM_USE_HOST_PTR static cl_uint requiredOpenCLAlignment(cl_device_id device); // Maximum number of work-items in a workgroup static size_t deviceMaxWorkGroupSize(cl_device_id device); // Maximum number of work-items that can be // specified in each dimension of the workgroup static void deviceMaxWorkItemSizes(cl_device_id device, size_t* sizes); static cl_ulong devideMaxMemAllocSize(cl_device_id device); // Maximum work-group size that can be used to execute // a kernel on a specific device static size_t kernelMaxWorkGroupSize(cl_kernel kernel, cl_device_id device); }; } }
ca86ef937cde2df960cb883d3fec93a2b81a4f59
5e6c7783679596dca371a5b15071cdfe99683daf
/tasks/Sorting Strings/Word.h
03658494f7f31b4b26bac9a17df03d63ed4d2f78
[]
no_license
Mitkosa333/Learning-C_PLUS_PLUS
e5ad4b0aa653c50c1910f13d5482999c43564d5c
ac3898f96fb921703d2ec8f3954fdef1cfbdc6a2
refs/heads/master
2020-03-31T02:56:46.895580
2018-10-07T11:28:45
2018-10-07T11:28:45
151,845,626
0
0
null
2018-10-07T10:39:22
2018-10-06T14:02:54
null
UTF-8
C++
false
false
612
h
Word.h
#ifndef WORD_H #define WORD_H #include <iostream> const unsigned MAX_SIZE = 15; const char types[4][MAX_SIZE] = {"NOT_DEFINED","SIMPLE","HASHTAG","DATE"}; enum WordType { NOT_DEFINED, SIMPLE, HASHTAG, DATE }; class Word { public: Word(); Word(const Word&); Word& operator=(const Word&); virtual ~Word(); public: virtual unsigned compare(const Word&) const = 0; virtual Word* clone() const = 0; const char* getType() const; const char* getContent() const; private: void setWord(const Word&); protected: char* content; WordType type; }; #endif // WORD_H
d90dadb25c64d262b14ebce044e3f64c076237af
929176edaf123ac997847f3f6cc657727fe0681b
/pgis/lib/include/config/PiraIIConfig.h
bc6e24750c1398815d41dfac9312981e08d913a5
[ "BSD-3-Clause" ]
permissive
tudasc/MetaCG
080444fa1e051de74a21f4009903bbb970e3cd64
71711db1946c27bd50c284b5a8e05569ad03b15b
refs/heads/master
2023-08-18T17:40:27.464783
2023-01-11T21:49:37
2023-01-11T21:49:37
286,386,642
31
4
null
null
null
null
UTF-8
C++
false
false
1,528
h
PiraIIConfig.h
/** * File: PiraIIConfig.h * License: Part of the MetaCG project. Licensed under BSD 3 clause license. See LICENSE.txt file at * https://github.com/tudasc/metacg/LICENSE.txt */ #ifndef PGIS_PIRAIICONFIG_H #define PGIS_PIRAIICONFIG_H #include "nlohmann/json.hpp" namespace pgis::config { /** * Strategies to aggregate multiple models for a single function into one */ enum class ModelAggregationStrategy { // use the first model exclusively FirstModel, // use the sum of all models Sum, // calculate the mean of the models (sum devided by the number of models) Average, // calculate the maximum function from the availabel models Maximum }; struct PiraIIConfig { double extrapolationThreshold; int statementThreshold; ModelAggregationStrategy modelAggregationStrategy; }; NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(PiraIIConfig, extrapolationThreshold, statementThreshold, modelAggregationStrategy) NLOHMANN_JSON_SERIALIZE_ENUM(ModelAggregationStrategy, { {ModelAggregationStrategy::FirstModel, "FirstModel"}, {ModelAggregationStrategy::Sum, "Sum"}, {ModelAggregationStrategy::Average, "Average"}, {ModelAggregationStrategy::Maximum, "Maximum"}, }) } // namespace pgis::config #endif // PGIS_PIRAIICONFIG_H
202667af2020a9d688f876125b47f68b38f131b4
ad29f5ea29738c7adeb4b6a8abacca0b0fbef8b4
/tools/catkin_ws/src/linefit_ground_segmentation/linefit_ground_segmentation_ros/src/ground_segmentation_node.cc
464558e24247359c3a9310fee5181078d2116ceb
[ "BSD-3-Clause" ]
permissive
ccyinlu/OGDT_multi_lidar_calibration
8381e3b8a4b9785e204fa657dda4673bb70020c5
61e8c6306320b6839b81a2cbf4d771d559ac95a2
refs/heads/master
2022-11-30T10:19:03.254346
2020-08-11T17:01:55
2020-08-11T17:01:55
283,453,691
8
1
null
null
null
null
UTF-8
C++
false
false
3,906
cc
ground_segmentation_node.cc
#include <ros/ros.h> #include <pcl/io/ply_io.h> #include <pcl_ros/point_cloud.h> #include "ground_segmentation/ground_segmentation.h" class SegmentationNode { ros::Publisher ground_pub_; ros::Publisher obstacle_pub_; GroundSegmentationParams params_; public: SegmentationNode(ros::NodeHandle& nh, const std::string& ground_topic, const std::string& obstacle_topic, const GroundSegmentationParams& params, const bool& latch = false) : params_(params) { ground_pub_ = nh.advertise<pcl::PointCloud<pcl::PointXYZ>>(ground_topic, 1, latch); obstacle_pub_ = nh.advertise<pcl::PointCloud<pcl::PointXYZ>>(obstacle_topic, 1, latch); } void scanCallback(const pcl::PointCloud<pcl::PointXYZ>& cloud) { GroundSegmentation segmenter(params_); std::vector<int> labels; segmenter.segment(cloud, &labels); pcl::PointCloud<pcl::PointXYZ> ground_cloud, obstacle_cloud; ground_cloud.header = cloud.header; obstacle_cloud.header = cloud.header; for (size_t i = 0; i < cloud.size(); ++i) { if (labels[i] == 1) ground_cloud.push_back(cloud[i]); else obstacle_cloud.push_back(cloud[i]); } ground_pub_.publish(ground_cloud); obstacle_pub_.publish(obstacle_cloud); } }; int main(int argc, char** argv) { ros::init(argc, argv, "ground_segmentation"); google::InitGoogleLogging(argv[0]); ros::NodeHandle nh("~"); // Do parameter stuff. GroundSegmentationParams params; nh.param("visualize", params.visualize, params.visualize); nh.param("n_bins", params.n_bins, params.n_bins); nh.param("n_segments", params.n_segments, params.n_segments); nh.param("max_dist_to_line", params.max_dist_to_line, params.max_dist_to_line); nh.param("max_slope", params.max_slope, params.max_slope); nh.param("long_threshold", params.long_threshold, params.long_threshold); nh.param("max_long_height", params.max_long_height, params.max_long_height); nh.param("max_start_height", params.max_start_height, params.max_start_height); nh.param("sensor_height", params.sensor_height, params.sensor_height); nh.param("line_search_angle", params.line_search_angle, params.line_search_angle); nh.param("n_threads", params.n_threads, params.n_threads); // Params that need to be squared. double r_min, r_max, max_fit_error; if (nh.getParam("r_min", r_min)) { params.r_min_square = r_min*r_min; } if (nh.getParam("r_max", r_max)) { params.r_max_square = r_max*r_max; } if (nh.getParam("max_fit_error", max_fit_error)) { params.max_error_square = max_fit_error * max_fit_error; } std::string ground_topic, obstacle_topic, input_topic; bool latch; nh.param<std::string>("input_topic", input_topic, "input_cloud"); nh.param<std::string>("ground_output_topic", ground_topic, "ground_cloud"); nh.param<std::string>("obstacle_output_topic", obstacle_topic, "obstacle_cloud"); nh.param("latch", latch, false); ROS_INFO("r_min_square: %f", params.r_min_square); ROS_INFO("r_max_square: %f", params.r_max_square); ROS_INFO("n_bins: %d", params.n_bins); ROS_INFO("n_segments: %d", params.n_segments); ROS_INFO("max_dist_to_line: %f", params.max_dist_to_line); ROS_INFO("max_slope: %f", params.max_slope); ROS_INFO("max_error_square: %f", params.max_error_square); ROS_INFO("long_threshold: %f", params.long_threshold); ROS_INFO("max_long_height: %f", params.max_long_height); ROS_INFO("max_start_height: %f", params.max_start_height); ROS_INFO("sensor_height: %f", params.sensor_height); ROS_INFO("line_search_angle: %f", params.line_search_angle); ROS_INFO("n_threads: %d", params.n_threads); // Start node. SegmentationNode node(nh, ground_topic, obstacle_topic, params, latch); ros::Subscriber cloud_sub; cloud_sub = nh.subscribe(input_topic, 1, &SegmentationNode::scanCallback, &node); ros::spin(); }
3674f03483b1229dc838b51b1eb12ee6387e132e
845c6766b13394e9f10094025cc5d86b83463b39
/Practise/16-Jun-17-Prac/rat_in_a_maze.cpp
1b556f3da660b2e13fb5f035ad924331f56de62c
[]
no_license
MaximumEndurance/Algo-17
47acc274d49e285d97dd2dce23430d9d3860be19
87b9219a34dd3ddd7cd8f12076f6b33e7ef39f9d
refs/heads/master
2021-06-21T05:40:10.173748
2017-07-27T15:31:56
2017-07-27T15:31:56
98,552,569
0
0
null
null
null
null
UTF-8
C++
false
false
912
cpp
rat_in_a_maze.cpp
#include <iostream> #include <algorithm> #include <vector> #include <stdio.h> using namespace std; int cheese_row, cheese_col; const int N = 5; void printBoard(char board[N][N]){ for(int i =0 ;i<N;++i) { for(int j=0;j<N;++j) cout<<board[i][j]<<' '; cout<<endl; } } char maze(char board[N][N], int row, int col) { if(row == cheese_row && col == cheese_col) { printBoard(board); return true; } if(row>=N && col>=N) return false; if(board[row][col] == '0') { cout << "yes"<<endl; board[row][col] = '1'; if(maze(board, row+1, col) || maze(board, row, col+1)) return true; board[row][col] = '0'; return false; } } int main() { freopen("rat_in_a_maze.in", "r", stdin); char board[N][N]; cheese_row = N-1; cheese_col = N-1; for(int i =0 ;i<N;++i) { for(int j=0;j<N;++j) cin >> board[i][j]; } printBoard(board); cout<<"\n\nNewBoard\n\n"; maze(board, 0, 0); }
a25f6f9d868bcf9a56d294abefc229b73ed3eda2
dfd6e4bb0a6e6b395f3753e11ec2459c8c3b8adc
/Dot_Engine/src/Dot/Utils/MousePicker.cpp
3a4c6ea0235b8b51e5064a9f180485a9fb4a7d0e
[ "Apache-2.0" ]
permissive
SimonGido/Dot_Engine
f2bce1d4b85c7aa6bd32afd43618da2b4a29c437
1db28c56eeecefaed8aa3f1d87932765d5b16dd4
refs/heads/master
2022-04-03T08:37:16.832443
2020-02-09T21:30:23
2020-02-09T21:30:23
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,582
cpp
MousePicker.cpp
#include "stdafx.h" #include "MousePicker.h" #include "Dot/Core/Input.h" #include "Dot/Core/Application.h" #include <glm/gtx/transform.hpp> #define RAY_RECURSION_COUNT 200 #define RAY_RANGE 400 namespace Dot { MousePicker::MousePicker() : m_CurrentRay(glm::vec3(0)) { m_RayRange = 400; } void MousePicker::CalculateMouseRay(const Camera& camera) { Application& app = Application::Get(); float mouseX = Input::GetMouseX(); float mouseY = Input::GetMouseY();; float mouseZ = 1.0f; mouseX = mouseX / (app.GetWin().GetWidth() * 0.5f) - 1.0f; mouseY = mouseY / (app.GetWin().GetHeight() * 0.5f)- 1.0f; glm::mat4 invVP = glm::inverse(camera.GetProjectionMatrix() * camera.GetViewMatrix()); glm::vec4 screenPos = glm::vec4(mouseX, -mouseY, 1.0f, 1.0f); glm::vec4 worldPos = invVP * screenPos; glm::vec3 dir = glm::normalize(glm::vec3(worldPos)); m_CurrentRay = dir; //glm::vec4 clipCoords = glm::vec4(mouseX, -mouseY, -1.0f, 1.0f); //glm::vec4 rayEye = glm::inverse(camera.GetProjectionMatrix()) * clipCoords; //rayEye = glm::vec4(rayEye.x, rayEye.y,-1.0f, 0.0f); // //glm::vec3 rayWorld = glm::inverse(camera.GetViewMatrix()) * rayEye; //rayWorld = glm::normalize(rayWorld); //m_CurrentRay = rayWorld; } const glm::vec3& MousePicker::TestIntersectionTerr(const Camera& camera, const Ref<Terrain>& terr) { m_RayRange = RAY_RANGE + camera.GetPosition().y; return binarySearch(camera.GetPosition(), terr, 0, m_RayRange, 0); } glm::vec3 MousePicker::binarySearch(const glm::vec3& camPos, const Ref<Terrain>& terr, float start, float finish, int count) { float half = start + ((finish - start) / 2.0f); glm::vec3 startPoint = getPointOnRay(m_CurrentRay, start, camPos); glm::vec3 endPoint = getPointOnRay(m_CurrentRay, half, camPos); //float height = terr->GetHeight(endPoint); float height = 0.0f; if (count >= RAY_RECURSION_COUNT) { glm::vec3 result = getPointOnRay(m_CurrentRay, half, camPos); result.y = height; return getPointOnRay(m_CurrentRay, half, camPos); } else if (startPoint.y >= height && endPoint.y < height) { return binarySearch(camPos, terr,start, half, count + 1); } else { return binarySearch(camPos, terr, half, finish, count + 1); } } glm::vec3 MousePicker::getPointOnRay(const glm::vec3& ray, float distance, const glm::vec3& camPos) { glm::vec3 scaledRay = glm::vec3(ray.x * distance, ray.y * distance, ray.z * distance); glm::vec3 result = glm::vec3(camPos.x + scaledRay.x, camPos.y + scaledRay.y, camPos.z + scaledRay.z); return result; } }
6843034de32db444c0e3cf82e717faad0ddb62b4
506d3798f4b191d91bc9ed88aa1a437b4cabe5c4
/homepagedialogue.cpp
1aab66e5ba79461e50738aa3463026b3b081f840
[]
no_license
shihabshahriar16/Social-network-with-messenger
7607039f66bf58b59cdb80d0cd543dfd5cf25f00
392a896a387bafa24c74bf4b6580b4bd0e46a3ec
refs/heads/master
2020-07-19T07:35:16.574744
2019-09-05T08:51:25
2019-09-05T08:51:25
206,402,968
0
0
null
null
null
null
UTF-8
C++
false
false
1,017
cpp
homepagedialogue.cpp
#include "homepagedialogue.h" #include "ui_homepagedialogue.h" #include "profiledialogue.h" #include <QtCore> #include <QtGui> #include <QMessageBox> #include "user.h" #include <string> #include "groupsdialogue.h" #include "friendspage_dialog.h" homepagedialogue::homepagedialogue(QWidget *parent) : QDialog(parent), ui(new Ui::homepagedialogue) { ui->setupUi(this); } homepagedialogue::~homepagedialogue() { delete ui; } void homepagedialogue::on_profile_clicked() { profiledialogue prodialogue; prodialogue.setModal(true); prodialogue.exec(); } void homepagedialogue::on_logout_clicked() { QMessageBox::information(this,"Logout details","You have logged out. See you again!"); } void homepagedialogue::on_groups_clicked() { groupsdialogue gdialog; gdialog.setModal(true); gdialog.exec(); } void homepagedialogue::on_pushButton_clicked() { friendspage_dialog fpage; fpage.setModal(true); fpage.exec(); }
08d2449367acaeb82d5384928b6240a84ff6a3ae
d5749c8baa3c653f7fb8a6006a0776306cd3cfca
/EnumeratedTypes.cpp
f26777ee4aeaccb69d873fbe6b039e3aff2a4475
[]
no_license
kupull74/test_c--
dd2d714501924a3592a9af121c425a09ffc94f4b
06567488268cdcde1f23c84e439f4e2e4e2ab095
refs/heads/master
2023-01-23T03:57:31.883412
2020-11-27T01:14:39
2020-11-27T01:14:39
311,860,275
0
0
null
null
null
null
UTF-8
C++
false
false
409
cpp
EnumeratedTypes.cpp
#include <iostream> /* This is first Comment */ using namespace std; /*enum enum-name { list of names } var-list; */ int main() { enum weekend { Monday, Tuesday, Friday=4, Saturday } enumRed; enumRed = weekend::Monday; //cout << "Monday : " << enumRed << "\t"; //cout << "Tuesday : " << enumRed << "\t"; //cout << "Friday : " << enumRed << "\t"; // EnumeratedTypes. return 0; }
92a4d6dcf27e5aa13c55608e2965010f5ff3feb7
85bab7d09fe236d80bd786708101d7ee8c271c13
/Source/GameModeLobby.cpp
cd123e10e7972c793118901f9ccf3659333848de
[]
no_license
wasteproduct/Unreal_Portfolio_BattleGround
b38969d488f8b7cfb25f96b1c6e003887d2209c1
4b9d0d8f3a3bd41a6211e01994d2114d518eaec4
refs/heads/master
2020-04-24T02:07:18.845187
2019-02-21T09:30:01
2019-02-21T09:30:01
171,625,180
1
0
null
null
null
null
UTF-8
C++
false
false
406
cpp
GameModeLobby.cpp
// Fill out your copyright notice in the Description page of Project Settings. #include "GameModeLobby.h" #include "PlayerControllerLobby.h" AGameModeLobby::AGameModeLobby() { PlayerControllerClass = APlayerControllerLobby::StaticClass(); DefaultPawnClass = nullptr; } void AGameModeLobby::BeginPlay() { Super::BeginPlay(); } void AGameModeLobby::Tick(float DeltaTime) { Super::Tick(DeltaTime); }
60a3d0ac13e9b4a7320f3ec2fb5c1ca546de4dae
e149e4ed7e7634ab0fb1e87c26d1a6bc4fcfe3a1
/leetcode_vscode/leetcode_378/leetcode_378.cpp
dd23c2b55fffb58220521f15cb2642a489d01be6
[]
no_license
sailor-ux/mycodes
9291c78c4af2ffa8a4cd593184837a41b288e1ee
92f6b6338376daaec2d35a508845077fdcf4c25c
refs/heads/main
2023-08-31T13:29:36.675819
2023-08-20T16:19:05
2023-08-20T16:19:05
214,383,672
0
0
null
null
null
null
GB18030
C++
false
false
1,047
cpp
leetcode_378.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: int kthSmallest(vector<vector<int>>& matrix, int k) { int n = matrix.size(); int left = matrix[0][0], right = matrix[n - 1][n - 1]; while (left < right) { int mid = left + (right - left) / 2; // 注意(l+r)/2的写法不对! if (countNum(matrix, n, k, mid)) { right = mid; } else { left = mid + 1; } } return left; } bool countNum(const vector<vector<int>>& matrix, const int& n, const int& k, int mid) { int i = n - 1, j = 0, sum = 0; while (i >= 0 && j < n) { if (matrix[i][j] <= mid) { sum += (i + 1); j++; } else { i--; } } return sum >= k; } }; int main() { vector<vector<int>> matrix{{-5, -4}, {-5, -4}}; Solution sol; cout << sol.kthSmallest(matrix, 2); system("pause"); return 0; }
7903a666ad57af707676bb327974b8c905e2e9b8
529afabd474a0be26f777f636fd88a0f73b9b1bd
/modules/gr-Metrics/swig/Metrics_swig.i
326b4db7f9085d1a6b3d025d27e45d9823021737
[]
no_license
camihera333/GNURadio
f67d9b6fc0928f43b77a6f841e1386b2ad42db4c
1afa3644a32a72a27120f5d32941483cca3e91c2
refs/heads/master
2020-03-25T13:50:20.105665
2018-08-07T23:02:33
2018-08-07T23:02:33
143,845,352
0
0
null
null
null
null
UTF-8
C++
false
false
159
i
Metrics_swig.i
/* -*- c++ -*- */ #define METRICS_API %include "gnuradio.i" // the common stuff //load generated python docstrings %include "Metrics_swig_doc.i" %{ %}
d9e8526b7c0c9cf1b13f9e851e4ab4a231e4aab7
b19f3f3c6409bbea0c7d506e2c921255f4c4a4b0
/ApocMeowUnreal/Source/GunSIm/AI_Character.cpp
b2b85fe97a2b8c7f416acfedf9fac9cf8c8901ee
[]
no_license
gpcmax/ApocalypseMeow
f2edb12b577d6c11f6c395008809a3e7b5185d68
9cfd690f323e2355034d6856960898d5a38d83cb
refs/heads/master
2020-05-05T00:45:19.972317
2019-04-04T22:17:07
2019-04-04T22:17:07
179,584,298
0
0
null
null
null
null
UTF-8
C++
false
false
2,867
cpp
AI_Character.cpp
//Apocalypse Meow //Sleepless Ambitions ///2018 //Gage Copelin #include "AI_Character.h" #include "Components/SkeletalMeshComponent.h" #include "Components/CapsuleComponent.h" #include "VRMainCharacter.h" #include "Sound/SoundCue.h" #include "Kismet/GameplayStatics.h" // Sets default values AAI_Character::AAI_Character() { // Set this character to call Tick() every frame. You can turn this off to improve performance if you don't need it. PrimaryActorTick.bCanEverTick = true; ShirtMesh = CreateDefaultSubobject<USkeletalMeshComponent>(TEXT("ShirtMesh")); ShirtMesh->SetupAttachment(GetMesh()); PantsMesh = CreateDefaultSubobject<USkeletalMeshComponent>(TEXT("PantsMesh")); PantsMesh->SetupAttachment(GetMesh()); BeltMesh = CreateDefaultSubobject<USkeletalMeshComponent>(TEXT("BeltMesh")); BeltMesh->SetupAttachment(GetMesh()); BootsMesh = CreateDefaultSubobject<USkeletalMeshComponent>(TEXT("BootMesh")); BootsMesh->SetupAttachment(GetMesh()); MaxHealth = 50.f; MaxArmorHealth = 100.f; bRagDoll = false; //bIArmored = false; //Scrap = 0.f; } // Called when the game starts or when spawned void AAI_Character::BeginPlay() { Super::BeginPlay(); CurrentHealth = MaxHealth; //CurrentArmorHealth = MaxArmorHealth } //function that damages the enemy void AAI_Character::HurtAi(float GunDam,bool bIsShark) { if (bIsShark) { /*if is a shark or another damage over time it only plays sound once*/ CurrentHealth = CurrentHealth - GunDam; if (CurrentHealth < 0) { //main body mesh RagdollEnemy(); GetCapsuleComponent()->SetCollisionEnabled(ECollisionEnabled::NoCollision); InitialLifeSpan = 2.0f; bRagDoll = true; } } else { /* if a one time damage plays sound everytime*/ CurrentHealth = CurrentHealth - GunDam; UGameplayStatics::PlaySoundAtLocation(GetWorld(), EnemyHit, GetMesh()->GetComponentLocation()); UGameplayStatics::PlaySoundAtLocation(GetWorld(), HitMarker, GetMesh()->GetComponentLocation()); if (CurrentHealth < 0) { //main body mesh RagdollEnemy(); GetCapsuleComponent()->SetCollisionEnabled(ECollisionEnabled::NoCollision); InitialLifeSpan = 2.0f; bRagDoll = true; } } } /*Destroys the enemy*/ void AAI_Character::KillEnemies() { Destroy(); } /*Function that is called when enemy dies, has them ragdoll*/ void AAI_Character::RagdollEnemy() { //body GetMesh()->SetSimulatePhysics(true); GetMesh()->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics); GetMesh()->DetachFromComponent(FDetachmentTransformRules::KeepWorldTransform); } // Called every frame void AAI_Character::Tick(float DeltaTime) { Super::Tick(DeltaTime); } // Called to bind functionality to input //ai player has no player input void AAI_Character::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) { Super::SetupPlayerInputComponent(PlayerInputComponent); }
3200f9f455de3c08fedfe5dff427d382013271ca
e17509fd923921a1528dcaf23ebe30614d9dd299
/Task-6-JOY/Task-6-JOY.ino
0ac5cbeab958737d4768b818fa210e8ef2aa2df0
[]
no_license
sim2908/ES-SS19
d6d14902d611db66a4d8c9c3e1d86ca8b2e481af
b2740ce4cc418b7a715bc457a839ec2aea1cde5a
refs/heads/master
2021-08-19T18:13:03.837251
2020-05-06T10:16:05
2020-05-06T10:16:05
179,088,360
2
0
null
null
null
null
UTF-8
C++
false
false
539
ino
Task-6-JOY.ino
/* * JOYSTICK SETUP */ const uint8_t joyX_pin = 8; const uint8_t joyY_pin = 9; const uint8_t joyButton = 47; volatile bool pressed = false; void setup() { Serial.begin(9600); attachInterrupt(joyButton, alarm, RISING); } void loop() { Serial.print("X"); int x = analogRead(8); Serial.println(x); Serial.print("Y"); int y = analogRead(9); Serial.println(y); Serial.println("__________"); delay(250); if(pressed) { Serial.println("alarm"); pressed = false; } } void alarm () { pressed = true; }
2d8ca7bb3769f7f9efd6d5e5412c7ca389d1c186
19c529c3fa37b2314ff540844d8955e722eb659b
/include/UnitInfo.h
53b6d3b04e763a221687b760b46143343476054b
[ "MIT" ]
permissive
AirstrikeIvanov/Boris
11c77942c2bcb49332034f2a3db5e810e4811fba
884f852bf62143babb5c86c2eb2ba7f261bf8c2d
refs/heads/master
2021-07-16T20:19:46.370995
2021-02-08T03:47:43
2021-02-08T03:47:43
236,300,146
9
0
null
null
null
null
UTF-8
C++
false
false
1,572
h
UnitInfo.h
#pragma once #include <BWAPI.h> #include <vector> using namespace BWAPI; namespace Boris { class UnitInfo { public: bool isDepot() { return type.isResourceDepot(); } bool isWorker() { return type.isWorker(); } bool isBuilding() { return type.isBuilding(); } bool isSupply() { return type == UnitTypes::Zerg_Overlord || type == UnitTypes::Terran_Supply_Depot || type == UnitTypes::Protoss_Pylon; } bool isLightAir() { return type == UnitTypes::Terran_Wraith || type == UnitTypes::Protoss_Scout || type == UnitTypes::Zerg_Mutalisk; } bool isCapital() { return type == UnitTypes::Zerg_Guardian || type == UnitTypes::Protoss_Carrier || type == UnitTypes::Terran_Battlecruiser; } bool isTransport() { return type == UnitTypes::Zerg_Overlord || type == UnitTypes::Terran_Dropship || type == UnitTypes::Protoss_Shuttle; } bool isAirSuperiority() { return type == UnitTypes::Terran_Valkyrie || type == UnitTypes::Protoss_Corsair || type == UnitTypes::Zerg_Devourer; } bool isCaster() { return type.isSpellcaster(); } UnitInfo(Unit u); UnitInfo(const UnitInfo&) = delete; UnitInfo& operator= (const UnitInfo&) = delete; void update(); BWAPI::Position text(int x = 0, int y = 0); BWAPI::Position text(BWAPI::UnitType t, int y = 0); bool canSee(BWAPI::Position t); bool isAssigned = false; Unit unit = nullptr; UnitType type = UnitTypes::Unknown; int id = -1, health = 0, shields = 0, energy = 0, resources = 0; Position position = BWAPI::Positions::None, target = BWAPI::Positions::None; Player owner = nullptr; private: }; }
5bb92176c51bdd50ecf209d00b344cfd247fb297
c8dc46be72604b1522eb114129ac8f767f61e399
/12.27.cpp
ada1b5b4b894081cdb7dde320fc68851e53c54e9
[]
no_license
mutlukilic/structured-programming---C
a13e72acc8e5db4c0258bc1ff849658e3e3b43ba
bb3ba7469e8a10149dd25b2dc9a2482d4f0ebe9e
refs/heads/master
2021-01-12T06:39:56.563661
2017-03-13T08:44:03
2017-03-13T08:44:03
77,405,981
0
0
null
null
null
null
UTF-8
C++
false
false
436
cpp
12.27.cpp
#include<stdio.h> #include<math.h> float noktakaydir(float *,float *,float,int,int); int main ( void ){ float x = 2.5,y = 2.5,msf; int yatay = 5,dusey = 4; msf = noktakaydir(&x,&y,msf,yatay,dusey); printf("%.2f,%.2f,%.2f",x,y,msf); return 0; } float noktakaydir(float *xp,float *yp,float msfp,int yatay,int dusey){ int i; *xp = (*xp)+yatay; *yp = (*yp)+dusey; i = pow(yatay,2)+pow(dusey,2); msfp = sqrt(i); return msfp; }