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
d2838d7723bec10af122648d89ddec7b22e52cd2
3e265c6ef6af8148c7f040e48543aebe76434fd1
/Recursion Advanced/SelectionSort.cpp
32445d3486820fa3faa6cfc7d07da734f495933f
[]
no_license
RishabhAttri/Codes
3332c10d8833fa547e971784034568f7136b7798
0e00d4c383843f5102ca472e2356b116544387b9
refs/heads/master
2020-05-04T12:50:23.387684
2019-04-02T18:39:03
2019-04-02T18:39:03
179,137,410
1
0
null
null
null
null
UTF-8
C++
false
false
422
cpp
SelectionSort.cpp
#include <iostream> using namespace std; void SelectionSort (int *arr, int n){ if (n<=1) return; int smallestIndex=0; for (int i=1;i<n;i++){ if (arr[i]<arr[smallestIndex]) smallestIndex=i; } swap(arr[0],arr[smallestIndex]); SelectionSort(arr+1,n-1); } int main(){ int arr[]={7,13,5,16,20,22,9}; SelectionSort (arr,7); for (int i=0;i<7;i++) cout<<arr[i]<<" "; cout<<endl; }
df1159eb60db63126639b5e6fb08cb32fa1eca1e
e680ea51931bd531c6c7ccd56d364585d60b032e
/SceneScrollerTeatheredCloth.cpp
198b33d77f9961710fa3f9deebf2469896b0c882
[]
no_license
yuyuyu00/ClothScrollerDemo
f13b41b7c7a49a1a5f89dee1537f8bee3b8ab7b6
af315910b02eaa749fad2acf2b45f5a00c4786fc
refs/heads/master
2021-01-15T18:59:12.387733
2013-08-22T11:30:45
2013-08-22T11:30:45
null
0
0
null
null
null
null
WINDOWS-1252
C++
false
false
5,876
cpp
SceneScrollerTeatheredCloth.cpp
// SceneScrollerTeatheredCloth.cpp - Cloth teathered on four corners, being blown by wind from // directly behind, with a scrolling message imprinted on // the cloth - implementation. #include "SceneScrollerTeatheredCloth.h" CSceneScrollerTeatheredCloth::CSceneScrollerTeatheredCloth() : CBaseClothScrollerScene(CSceneScrollerTeatheredCloth::mkTeatheredClothSceneConstants) { } CSceneScrollerTeatheredCloth::~CSceneScrollerTeatheredCloth() { } bool CSceneScrollerTeatheredCloth::InitializeScene() { bool bSceneInitializedSuccessfully = false; // Set the time quantum used for force application calculations. this->mClothNodeNetwork.SetForceTimeQuantum(mkTeatheredClothSceneConstants.mSimulationTimeQuantum); // Set the teathered cloth color and specularity values (for rendering). this->mClothNodeNetwork.SetClothBaseColor(mkTeatheredClothSceneConstants.mClothColor); this->mClothNodeNetwork.SetClothSpecularity(mkTeatheredClothSceneConstants.mClothSpecularity); // Set the nodes at the corners of the flag node network to be anchor nodes. bSceneInitializedSuccessfully = this->mClothNodeNetwork.SetAnchorNode(0, 0, true) && this->mClothNodeNetwork.SetAnchorNode(this->mkTeatheredClothSceneConstants.mNodesPerRow - 1, 0, true) && this->mClothNodeNetwork.SetAnchorNode(0, this->mkTeatheredClothSceneConstants.mNodesPerColumn - 1, true) && this->mClothNodeNetwork.SetAnchorNode(this->mkTeatheredClothSceneConstants.mNodesPerRow - 1, this->mkTeatheredClothSceneConstants.mNodesPerColumn - 1, true); // Create the scene backdrop. bSceneInitializedSuccessfully = this->SetupBackDrop() && bSceneInitializedSuccessfully; return(bSceneInitializedSuccessfully); } void CSceneScrollerTeatheredCloth::PositionSceneCamera(const QuantityType currentClockTick) { CSceneCameraOpenGL sceneCamera; //View frustrum definition //90° Field of view. const FloatCoord kFieldOfView = 90.0; //4:3 Aspect ratio. const FloatCoord kAspectRatio = (FloatCoord)4.0 / (FloatCoord)3.0; //Near and far clip plane distances const FloatCoord kNearClipDistance = 1.0; const FloatCoord kFarClipDistance = 90.0; const ScalarType kClockTickSpinDivisor = 700.0; const FloatCoord kMaxZBounce = 5.0; const FloatCoord kMinZCoord = 2.5; // Range of values for t required to plot Z = n - t^2 const FloatCoord inputRange = 2.0 * ::sqrt(kMaxZBounce); // Compute Z = n - t^2, with t ranging from (-range / 2) to (range / 2). This parabolic // curve produces a "bouncing" efffect. const FloatCoord currentZ = kMaxZBounce - ::pow(::fmod(((FloatCoord)currentClockTick / kClockTickSpinDivisor), inputRange) - inputRange / 2.0, 2.0); //Camera position and orientation //Camera position. const CFloatPoint kCameraPosition(0.0, 0.0, currentZ + kMinZCoord); //Camera focus point const CFloatPoint kCameraFocusPoint(0.0, 0.0, 0.0); //Camera orientation vector const CVector kCameraOrientVector(::cos((ScalarType)currentClockTick / kClockTickSpinDivisor), ::sin((ScalarType)currentClockTick / kClockTickSpinDivisor), 0.0); //Adjust the scene camera. sceneCamera.SetFOV(kFieldOfView); sceneCamera.SetAspectRatio(kAspectRatio); sceneCamera.SetNearClipPlane(kNearClipDistance); sceneCamera.SetFarClipPlane(kFarClipDistance); sceneCamera.SetCameraPosition(kCameraPosition); sceneCamera.SetFocusPoint(kCameraFocusPoint); sceneCamera.SetCameraUpVector(kCameraOrientVector); SetSceneCamera(sceneCamera); } //Performs a stepwise scene update. bool CSceneScrollerTeatheredCloth::UpdateScene(const QuantityType currentClockTick) { bool bUpdatedSuccessfully = false; const ScalarType kClockDivisor = 947.0; const ScalarType variedColorComponent = ::pow(::cos(currentClockTick / kClockDivisor), 2.0); this->mScrollerBackgroundColor = CFloatColor(variedColorComponent, variedColorComponent, 1.0); this->mScrollerTextColor = CFloatColor(1.0 - variedColorComponent, 1.0 - variedColorComponent, 1.0); // Scroll the scroller. CScrollerManager::IncrementScroller(); // Position the scene camera. this->PositionSceneCamera(currentClockTick); this->mWindForce.SetAlterationConstant(currentClockTick); // Perform a cloth network simulation step. bUpdatedSuccessfully = this->mClothNodeNetwork.EvaluateClothNodeNetworkForces(this->mExternalForceCollection); return(bUpdatedSuccessfully); } //Renders the scene (does not perform a flush or buffer swap). bool CSceneScrollerTeatheredCloth::RenderScene() const { bool bRenderedSuccessfully = false; // Render the backdrop mesh if it has been created. if (this->mpBackDropMesh) { (this->mpBackDropMesh)->RenderMesh(); } // Render the teathered cloth. bRenderedSuccessfully = this->RenderClothNetworkWithScrollerTexture(); return(bRenderedSuccessfully); } const CBaseClothScrollerSceneParamBlock CSceneScrollerTeatheredCloth::mkTeatheredClothSceneConstants( 5, // Nodes per row 10, // Nodes per column 10.0, // Node network physical width 10.0, // Node network physical height CFloatPoint(-4.0, -4.5, 0.0), // Node network physical offset 0.01, // Mass (kg) per node 20.0, // Structural spring constant. 15.0, // Shear spring constant. 3.0, // Flexion spring constant. 9.8, // Gravitational acceleration constant (N) CVector(0.0, 0.0, -1.0), // Gravity vector 0.01, // Simulation time quantum (s). CFloatColor(0.7, 0.7, 0.7), // Teathered cloth color 0.99, // Teathered cloth specularity 0.8, // Wind magnitude CVector(0.0, 0.0, 1.0), // Wind direction 0.001, // Viscous drag coefficient CFloatColor(0.0, 0.0, 0.5)); // Backdrop cylinder color.
a57f8a745f9667feb9b5f36167077433a696879c
7ca198de2cd10cfb7c313609f2b0f10ac169e8a9
/src/Character.hh
46756f101009242d7cb9c5c75f2e20d419147367
[]
no_license
atikf3/pac-man
147d7800c454295e5911d581f3ab0b50f2ba5b47
4212512e9a47a3d5b6ce7d6dbc3b0e454e71e11b
refs/heads/master
2023-03-29T11:46:00.630569
2021-04-02T04:54:33
2021-04-02T04:54:33
354,032,248
0
0
null
null
null
null
UTF-8
C++
false
false
797
hh
Character.hh
#ifndef CHARACTER_HH #define CHARACTER_HH #include "AbstractEntity.hh" #include "IObservable.hh" #include "IObserver.hh" #include "json.hpp" using json = nlohmann::json; class Character : public AbstractEntity, public IObservable { private: double _x; double _y; int _life; std::string _type; public: virtual ~Character() = 0; virtual void Update(); virtual void Draw(); double GetX() const; void SetX(double); double GetY() const; void SetY(double); int GetLife() const; void SetLife(int); virtual void AddObserver(IObserver *observer) override; virtual void RemoveObserver(IObserver *observer) override; virtual std::string Serialize(); }; #endif
e6cc1c726ab016a85ecc4eab241ef892b06ac079
7f1a4ca6e2e51c560e27e84b52908cae77c2eac6
/OJ/CSES/Cycle Finding.cpp
9b63dce2de4c5699d1503daa927242d6524162e2
[]
no_license
gabrielmorete/Competitive-Programming
ebab7d03c341c5a90b4536564122feb8183d2923
724771c6f3cf20758bfd417f1138f02ae230e88b
refs/heads/master
2023-03-04T14:09:43.768784
2023-02-25T22:53:14
2023-02-25T22:53:14
206,603,364
5
0
null
null
null
null
UTF-8
C++
false
false
1,589
cpp
Cycle Finding.cpp
#include "bits/stdc++.h" using namespace std; #define pb push_back #define fst first #define snd second #define fr(i,n) for (int i = 0; i < n; i++) #define frr(i,n) for (int i = 1; i <= n; i++) #define endl '\n' #define gnl cout << endl #define chapa cout << "oi meu chapa" << endl #define dbg(x) cout << #x << " = " << x << endl #define all(x) x.begin(), x.end() typedef long long int ll; typedef pair<int,int> pii; typedef vector<int> vi; typedef vector<pii> vii; const int INF = 0x3f3f3f3f; const ll llINF = (long long)(1e18) + 100; const int MAXN = 4e5 + 10; int n, m; vector<int> adj[MAXN]; vector<array<int, 3>> edges; ll dist[MAXN], p[MAXN]; void bellman(){ fr(i, n) for (auto e : edges) dist[e[1]] = min(dist[e[1]], dist[e[0]] + e[2]); fr(i, n) for (auto e : edges) if (dist[e[1]] > dist[e[0]] + e[2]){ if (p[e[1]] == 0){ p[e[1]] = e[0]; dist[e[1]] = min(dist[e[1]], dist[e[0]] + e[2]); } } } int vis[MAXN]; void dfs(int v){ vis[v] = 1; if (vis[p[v]] == 1){ int u = v; vi ans; do{ ans.pb(u); u = p[u]; } while (u != v); cout<<"YES"<<endl; ans.pb(v); while (!ans.empty()){ cout<<ans.back()<<' '; ans.pop_back(); } gnl; exit(0); } dfs(p[v]); } signed main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin>>n>>m; fr(i, m){ int a, b, c; cin>>a>>b>>c; edges.pb({a, b, c}); adj[a].pb(i); } bellman(); bool ok = 1; frr(i, n) if (p[i] != 0) ok = 0; if (ok == 1) cout<<"NO"<<endl; else{ frr(i, n) if (p[i] != 0) dfs(i); } }
f761a75d18607c33e85f402e2f8130acf1ebb083
1a66e03b11ec7a2967e5dda4b64702ae9d2f6f52
/acmp/string/password.cpp
59397fb3a739c46cd9c6be8a6376a0ecc87c16f3
[]
no_license
Bonaparto/CPP-Codes
42dda7470788a151ef542dd49bcd33097d477ecb
7ae23eee1f41ca2d130ad94fd69686b0aad13677
refs/heads/main
2023-08-04T07:33:53.859954
2021-10-02T17:21:00
2021-10-02T17:21:00
347,952,241
1
0
null
null
null
null
UTF-8
C++
false
false
953
cpp
password.cpp
#include <iostream> using namespace std; int main(){ int n, A, B, C; cin >> n >> A >> B >> C; string s = ""; for(int i = 0; i < A; ++i){ cout << char('A' + i % 26); s += char('A' + i % 26);} for(int i = 0; i < B; ++i){ cout << char('a' + i % 26); s += char('a' + i % 26);} for(int i = 0; i < C; ++i){ cout << char('0' + i % 10); s += char('0' + i % 10);} if(A + B + C < n){ if((s[s.size() - 1] >= 'a' && s[s.size() - 1] <= 'z') || (s[s.size() - 1] >= '0' && s[s.size() - 1] <= '9') || s.size() == 0){ cout << 'A'; s += 'A'; } else if(s[s.size() - 1] >= 'A' && s[s.size() - 1] <= 'Z' || s.size() == 0){ cout << 'a'; s += 'a'; } for(int i = 0; i < n - (A + B + C) - 1; ++i){ if(s[s.size() - 1] <= 'Z' && s[s.size() - 1] >= 'A') cout << char('a' + i % 26); if(s[s.size() - 1] <= 'z' && s[s.size() - 1] >= 'a') cout << char('0' + i % 10); } } }
c25da208e3d84d5a0acaf8ff022d40c2f83eca97
c9f9cdea7b401c4be29c70dd0cda8972811f833a
/MyHash.h
f65ef212e7bcec485a912c44d76413e2f7c90bf6
[]
no_license
jenny-l-li/Decryptor
686484d3a9660c855090e23299418558911d4233
0f26c7d22f4fd597ed4dd7b7cadc771989b76f15
refs/heads/master
2020-03-31T19:26:15.124460
2018-10-10T22:29:10
2018-10-10T22:29:10
152,497,414
1
0
null
null
null
null
UTF-8
C++
false
false
4,040
h
MyHash.h
// // main.cpp // proj4 // // Created by Jenny Li on 3/8/18. // Copyright © 2018 Jenny Li. All rights reserved. // #include <iostream> #ifndef MYHASH_H #define MYHASH_H template<typename KeyType, typename ValueType> class MyHash { public: MyHash(double maxLoadFactor = 0.5) //O(B) : m_maxLoad(maxLoadFactor), m_nBuckets(100), m_nItems(0) { if (maxLoadFactor <= 0) m_maxLoad = 0.5; else if (maxLoadFactor > 2.0) m_maxLoad = 2.0; m_buckets = new Node*[100]; for (int i = 0; i < m_nBuckets; i++) m_buckets[i] = nullptr; } ~MyHash() { for (int i = 0; i < m_nBuckets; i++) //O(B) if (m_buckets[i] != nullptr) deleteItems(m_buckets[i]); delete [] m_buckets; } void reset() //O(B) because X total items<B { for (int i = 0; i < m_nBuckets; i++) if (m_buckets[i] != nullptr) deleteItems(m_buckets[i]); delete [] m_buckets; m_nBuckets = 100; m_nItems = 0; m_buckets = new Node*[100]; for (int i = 0; i < m_nBuckets; i++) m_buckets[i] = nullptr; } void associate(const KeyType& key, const ValueType& value) //O(1); O(X) pathological { ValueType* v = find(key); if (v == nullptr) { addItem(key, value, m_buckets[getBucketNumber(key)]); m_nItems++; if (getLoadFactor() > m_maxLoad) //move items, delete old array, allocate new array; O(B) reallocate(); } else *v = value; } int getNumItems() const { return m_nItems; } //maxLoadFactor = max # of values to insert/total buckets in array double getLoadFactor() const { return (double)m_nItems/m_nBuckets; } // for a map that can't be modified, return a pointer to const ValueType const ValueType* find(const KeyType& key) const //O(1), pathological O(X) { Node* p = m_buckets[getBucketNumber(key)]; while (p != nullptr) { if (p->k == key) return &(p->v); p = p->next; } return nullptr; } // for a modifiable map, return a pointer to modifiable ValueType ValueType* find(const KeyType& key) { return const_cast<ValueType*>(const_cast<const MyHash*>(this)->find(key)); } // C++11 syntax for preventing copying and assignment MyHash(const MyHash&) = delete; MyHash& operator=(const MyHash&) = delete; private: struct Node { KeyType k; ValueType v; Node* next; }; Node** m_buckets; int m_nBuckets; int m_nItems; double m_maxLoad; void addItem(const KeyType& key, const ValueType& value, Node*& ptr) { Node* n = new Node; n->k = key; n->v = value; n->next = ptr; ptr = n; } unsigned int getBucketNumber(const KeyType& key) const { unsigned int hash(const KeyType& k); //prototype unsigned int h = hash(key); return h % m_nBuckets; } void deleteItems(Node*& p) { while (p != nullptr) { Node *temp = p->next; delete p; p = temp; } } void reallocate() { m_nItems = 0; int oldBuckets = m_nBuckets; m_nBuckets *= 2; //now 200 buckets Node** temp = new Node*[m_nBuckets]; for (int i = 0; i < m_nBuckets; i++) //new hash table temp[i] = nullptr; for (int i = 0; i < oldBuckets; i++) { Node* p = m_buckets[i]; while (p != nullptr) { addItem(p->k, p->v, temp[getBucketNumber(p->k)]); m_nItems++; Node *nextNode = p->next; delete p; p = nextNode; } } delete [] m_buckets; m_buckets = temp; temp = nullptr; } }; #endif
e025340593385efc9d4b7a67481f3a95dfeee1e3
e05c6343d03ea5d015c0a805e9b4ff334e4063b2
/opengl/inc/OpenGLFBRenderTarget.hpp
ef5933d7d934fa85134842cd5319ef907b503542
[]
no_license
nguyenvuducthuy/3Dengine
a74e4ea43d1461f4b92e0f3f7f0a5e2e7cf3f9b5
8d0d38a5f1373c1ba632386657965679e026fd0b
refs/heads/master
2020-05-21T21:22:48.286975
2018-12-10T11:14:56
2018-12-10T11:14:56
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,327
hpp
OpenGLFBRenderTarget.hpp
/** * @class OpenGLFBRenderTarget * @brief Render target for OpenGL. A render target allows to render objects to it * instead of to the main screen. Then the target can be rendered to the main screen as * a texture * * The FB render target uses no effect-shader and performs no blending, it * just does a copy-pixel operation * * @author Roberto Cano (http://www.robertocano.es) */ #pragma once #include "FBRenderTarget.hpp" #include "OpenGL.h" #include "Shader.hpp" class OpenGLFBRenderTarget : public FBRenderTarget { public: ~OpenGLFBRenderTarget(); bool init(uint32_t width, uint32_t height, uint32_t maxSamples, uint32_t numTargets); void bind(); void bindDepth(); void unbind(); bool blit(uint32_t dstX, uint32_t dstY, uint32_t width, uint32_t height, uint32_t target = 0, bool bindMainFB = true); void clear(); private: GLuint _frameBuffer; /**< Frame buffer object containing the color and depth buffers */ uint32_t _numTargets; /**< Number of color attachments for this target */ GLuint *_colorBuffer; /**< Array of GL allocated IDs for the color buffers */ GLuint *_attachments; /**< Array of color attachments locations for the draw buffers */ GLuint _depthBuffer; /**< GL allocated ID for the depth buffer */ };
1959ed98ce89eed655eaa1a573231c99418159a8
1ea5d69824f2d3fa8cdbc106e7af2ce299607367
/Aufgabe5/Aufgabe5.cpp
692e59418af5e48aa065119a0ead53e5fa2fc6fe
[]
no_license
MoritzMessner/CLion
26ef0ce1c946e6eb21da01deed7f8f646e5faed9
4d2239342251ac1c5d614e3bb242ee7f300192ca
refs/heads/main
2023-06-04T12:43:14.750240
2021-06-22T07:59:34
2021-06-22T07:59:34
363,932,266
0
0
null
null
null
null
UTF-8
C++
false
false
3,345
cpp
Aufgabe5.cpp
// // Created by moritz on 20.04.2021. // #include "Aufgabe5.h" #include "Date.h" #include "Person.h" #include "Friends.h" #include <iostream> #include <cassert> namespace AufgabeFive { void test_person_date() { Date test_date(1992, 8, 16); Person a = Person("Gustav", "Hüha", test_date); assert(a.get_born().get_year() == 1992); assert(a.get_born().get_month() == 8); assert(a.get_born().get_day() == 16); test_date.set_year(2005); assert(a.get_born().get_year() == 1992); assert(a.get_born().get_month() == 8); assert(a.get_born().get_day() == 16); Date test_date_two = test_date; test_date.set_year(2020); assert(test_date_two.get_year() == 2005); assert(test_date_two.get_month() == 8); assert(test_date_two.get_day() == 16); Person b = a; assert(&a != &b); assert(b.get_born().get_year() == 1992); assert(b.get_born().get_month() == 8); assert(b.get_born().get_day() == 16); } void test_friends() { std::string names[] = {"Friedrich", "Olav", "Heinz"}; ArrayList a(names, 3); assert(a.name(1) == "Olav"); /* // Hier wäre Kopierkunstruktor sinnvoll ArrayList b = a; a.set_name_on_position(1, "Willi"); assert(a.name(1) == "Willi"); -> wahr assert(b.name(1) == "Willi"); -> wahr b.getNames(); */ ArrayList b = a; a.set_name_on_position(1, "Willi"); assert(a.name(1) == "Willi"); // -> wahr assert(b.name(1) == "Olav"); // -> wahr } class Point { private: int x, y; public: Point(int x, int y) : x(x), y(y) {} int getX() const { return x; } void setX(int _x) { Point::x = _x; } int getY() const { return y; } void setY(int _y) { Point::y = _y; } }; class Segment { Point &p1, p2; public: Segment(Point &p1, Point &p2) : p1(p1), p2(p2) {} Point &getP1() const { return p1; } void setP1(Point &_p1) { Segment::p1 = _p1; } const Point &getP2() const { return p2; } void setP2(const Point &_p2) { Segment::p2 = _p2; } }; void test_segment() { Point a(1, 2); Point b(3, 4); Segment seg(a, b); Segment seg2 = seg; assert(seg.getP1().getX() == 1); a.setX(10); assert(seg.getP1().getX() == 10); // sieht so aus, als müssten wir auch bei references einen Kopierkonstruktor bauen seg2.getP1().setX(2); assert(seg2.getP1().getX() == 2); std::cout << seg.getP1().getX() << " " << seg2.getP1().getX() << std::endl; } } int main() { std::cout << "starting" << std::endl; AufgabeFive::test_person_date(); std::cout << "test_person_date finished" << std::endl; AufgabeFive::test_friends(); std::cout << "test_friends finished" << std::endl; AufgabeFive::test_segment(); std::cout << "test_segment finished" << std::endl; std::cout << "tests passed" << std::endl; std::cout << "terminating ..." << std::endl; return 0; }
c8d2db478c2428a7f2128ded626f61beed6eefda
fa09f9ae0eee4a1cad0d0d65b9e8b85e8be200eb
/Progra1_P2.cpp
da0e0594d6157807a39648461cfb5042b7824bc4
[]
no_license
jcdlacruz/umg-examen-final-p1-sa
6d3c785952f407b884a477c86d926c9c7a8f7a56
1500e5a3006a87cd4a77d4f4ade058272a3ef5b0
refs/heads/master
2022-10-08T23:58:49.063781
2020-06-06T01:52:09
2020-06-06T01:52:09
269,555,629
0
0
null
null
null
null
UTF-8
C++
false
false
5,109
cpp
Progra1_P2.cpp
#include <fstream> #include <iostream> #include <string> #include <iomanip> using namespace std; void mp(); void ejercicio01(); void ejercicio02(); void ejercicio03(); void agregarRegistro01(); void agregarRegistro02(); void agregarRegistro03(); void descargarRegistro02(); void descargarRegistro03(); void reporte01(); void reporte02(); void reporte03(); void programaEnvio03(); void reporteEnvio(); int main() { mp(); } void mp(){ MenuPrincipal: int i; system("CLS"); cout<<"-------------------"<<endl; cout<<" Menu Principal "<<endl; cout<<" Examen Final P1 SA"<<endl; cout<<"-------------------"<<endl; cout<<"1 - Ejercicio 01"<<endl; cout<<"2 - Ejercicio 02"<<endl; cout<<"3 - Ejercicio 03"<<endl; cout<<"-------------------"<<endl; cout<<"4 - Salir"<<endl; cout<<"-------------------"<<endl; cout<<"Seleccione su opcion: "; cin>>i; switch(i){ case 1: {ejercicio01();} system("cls"); goto MenuPrincipal; break; case 2: {ejercicio02();} system("cls"); goto MenuPrincipal; break; case 3: {ejercicio03();} system("cls"); goto MenuPrincipal; break; case 4: break; default: system("cls"); cout<<"No existe la opcion seleccionada, vuelva a intentar. "<<endl; system("Pause"); goto MenuPrincipal; break; } } void ejercicio01(){ MenuEjercicio01: char i; system("CLS"); cout<<"--------------------------"<<endl; cout<<"------ Menu Garita ------"<<endl; cout<<"--------------------------"<<endl; cout<<"1 - Ingresar registro"<<endl; cout<<"-------------------"<<endl; cout<<"2 - Regresar a menu principal"<<endl; cout<<"-------------------"<<endl; cout<<"F - Salir"<<endl; cout<<"-------------------"<<endl; cout<<"Seleccione su opcion: "; cin>>i; switch(i){ case '1': {agregarRegistro01();} system("Pause"); system("cls"); goto MenuEjercicio01; break; case '2': break; case 'F': case 'f': {reporte01();} system("Pause"); exit(1); default: system("cls"); cout<<"No existe la opcion seleccionada, vuelva a intentar."<<endl; system("Pause"); goto MenuEjercicio01; break; } } void ejercicio02(){ MenuEjercicio02: int i; system("CLS"); cout<<"-------------------------"<<endl; cout<<"Menu Inventario en Bodega"<<endl; cout<<"------- Libreria --------"<<endl; cout<<"-------------------------"<<endl; cout<<"1 - Cargar inventario"<<endl; cout<<"2 - Descargar inventario"<<endl; cout<<"3 - Reporte inventario actual"<<endl; cout<<"-------------------------"<<endl; cout<<"4 - Regresar a menu principal"<<endl; cout<<"--------------------"<<endl; cout<<"5 - Salir"<<endl; cout<<"--------------------"<<endl; cout<<"Seleccione su opcion: "; cin>>i; switch(i){ case 1: {agregarRegistro02();} system("Pause"); system("cls"); goto MenuEjercicio02; break; case 2: {descargarRegistro02();} system("Pause"); system("cls"); goto MenuEjercicio02; break; case 3: {reporte02();} system("Pause"); system("cls"); goto MenuEjercicio02; break; case 4: break; case 5: exit(1); default: system("cls"); cout<<"No existe la opcion seleccionada, vuelva a intentar. "<<endl; system("Pause"); goto MenuEjercicio02; break; } } void ejercicio03(){ MenuEjercicio03: int i; system("CLS"); cout<<"----------------------------"<<endl; cout<<"----- Menu Encomiendas -----"<<endl; cout<<"----------------------------"<<endl; cout<<"1 - Agregar paquete"<<endl; cout<<"2 - Descargar paquete"<<endl; cout<<"3 - Programar envio"<<endl; cout<<"4 - Revisar envio"<<endl; cout<<"5 - Generar reporte"<<endl; cout<<"----------------------------"<<endl; cout<<"6 - Regresar a menu principal"<<endl; cout<<"----------------------------"<<endl; cout<<"7 - Salir"<<endl; cout<<"----------------------------"<<endl; cout<<"Seleccione su opcion: "; cin>>i; switch(i){ case 1: {agregarRegistro03();} system("Pause"); system("cls"); goto MenuEjercicio03; break; case 2: {descargarRegistro03();} system("Pause"); system("cls"); goto MenuEjercicio03; break; case 3: {programaEnvio03();} system("Pause"); system("cls"); goto MenuEjercicio03; break; case 4: {reporteEnvio();} system("Pause"); system("cls"); goto MenuEjercicio03; break; case 5: {reporte03();} system("Pause"); system("cls"); goto MenuEjercicio03; break; case 6: break; case 7: exit(1); default: system("cls"); cout<<"No existe la opcion seleccionada, vuelva a intentar. "<<endl; system("Pause"); goto MenuEjercicio03; break; } }
46a127855ef909ab7ec96d9aa3ba987e2684b28c
5196c4a1265ea3584dc5b8739fb4f62d1723cbb1
/1553_api_project/src/zynq_1553b_api.cpp
dfd2c7217b09bd23fa340e2546ed67761f1b434e
[]
no_license
yinhonggen/1553b
88876f3a427c3d22ad31da2d583a528929db7f02
ab4cc2f4d98764fb65e7cb5fc42c5b5f610aa083
refs/heads/master
2021-06-20T22:30:13.497839
2017-06-30T09:30:59
2017-06-30T09:30:59
90,962,395
1
1
null
null
null
null
GB18030
C++
false
false
8,883
cpp
zynq_1553b_api.cpp
#include <string.h> #include "zynq_1553b_api.h" #include "common_bc.h" #include "genmti.h" #include "BrAda1553B_RT.h" #include "actel1553io.h" /*定义全局类,包括BC,RT,MT的类*/ BrAda1553B_RT adaRT; BrAda1553B_BC_COMM adaBC; GIST_MT2 adaMT; /************************************************************* *函数名 :zynq_bc_set_config *函数功能描述 :此函数用于在 BC 模式下,对配置文件的名字的设定, 以及配置文件的解析,模块函数调用入口。 *函数参数 :cfg:输入参数,配置文件的名字 *函数返回值 :成功:RET_OK 失败:RET_ERR ***************************************************************/ int zynq_bc_set_config(const std::string cfg) { std::string str; adaBC.set_address("192.168.13.226", "1"); str.clear(); str = "ConfFile=" + cfg + ";ChangeEndian=FALSE;"; adaBC.set_config(str); return RET_OK; } /************************************************************* *函数名 :zynq_bc_init *函数功能描述 :进行 BC 初始化操作,包括模式选择,寄存器配置, 内存初始化 *函数参数 :无 *函数返回值 :成功:RET_OK 失败:RET_ERR ***************************************************************/ int zynq_bc_init(void) { U16BIT ret = 0; open_device(); ret = adaBC.source_init(); return ret; } /************************************************************* *函数名 :zynq_bc_start *函数功能描述 :线程处理函数的设置,启动 core 和线程, core和线 程开始工作 *函数参数 :无 *函数返回值 :成功:RET_OK 失败:RET_ERR ***************************************************************/ int zynq_bc_start(void) { return adaBC.start(); } /************************************************************* *函数名 :zynq_bc_stop *函数功能描述 :停止 core 和线程, core和线程停止工作 *函数参数 :无 *函数返回值 :成功:RET_OK 失败:RET_ERR ***************************************************************/ int zynq_bc_stop(void) { U16BIT ret = 0; ret = adaBC.stop(); close_device(); return ret; } /****************************************************************** *函数名 :zynq_rt_msg_write *函数功能描述 :周期性消息时用于修改或删除数据字的内容,并周期性的发送出去; 非周期性消息时用于增加数据字的内容,并插入到周期性里发送出去, 数据发送完成后退出。 *函数参数 :datahead:输入参数,需要修改的消息结构体 *函数返回值 :成功:RET_OK 失败:RET_ERR ********************************************************************/ int zynq_bc_msg_write(ctl_data_wrd_info *datahead) { return adaBC.write(datahead); } /****************************************************************** *函数名 :zynq_bc_ioctl *函数功能描述 :是否保存某一确定的地址,子地址所对应的数据 *函数参数 :msg_id:输入参数,消息id,每一组消息都有唯一的消息id去加以区分的 flag:是否保存消息的标记 save_path:输入参数,保存文件的路径 *函数返回值 :无 ********************************************************************/ void zynq_bc_ioctl(unsigned short msg_id, msg_is_save flag, const char *save_path) { adaBC.ioctl(msg_id, flag, save_path); } /************************************************************* *函数名 :zynq_rt_set_config *函数功能描述 :此函数用于在 RT 模式下,对配置文件的名字的设定, 以及配置文件的解析,模块函数调用入口。 *函数参数 :cfg:输入参数,配置文件的名字 *函数返回值 :成功:RET_OK 失败:RET_ERR ***************************************************************/ int zynq_rt_set_config(const std::string cfg) { std::string str; adaRT.set_address("192.168.13.226", "0"); str.clear(); str = "ConfigFilePath=" + cfg + ";ChangeEndian=false;"; adaRT.set_config(str); return RET_OK; } /************************************************************* *函数名 :zynq_rt_init *函数功能描述 :进行 RT 初始化操作,包括模式选择,寄存器配置, 内存初始化 *函数参数 :无 *函数返回值 :成功:RET_OK 失败:RET_ERR ***************************************************************/ int zynq_rt_init(void) { U16BIT ret = 0; SyncEvent tim_mutex; open_device(); ret = adaRT.source_init(&tim_mutex); return ret; } /************************************************************* *函数名 :zynq_rt_start *函数功能描述 :线程处理函数的设置,启动 core 和线程, core和线程开始工作 *函数参数 :无 *函数返回值 :成功:RET_OK 失败:RET_ERR ***************************************************************/ int zynq_rt_start(void) { return adaRT.start(); } /************************************************************* *函数名 :zynq_rt_stop *函数功能描述 :停止 core 和线程, core和线程停止工作 *函数参数 :无 *函数返回值 :成功:RET_OK 失败:RET_ERR ***************************************************************/ int zynq_rt_stop(void) { U16BIT ret = 0; ret = adaRT.stop(); close_device(); return ret; } /****************************************************************** *函数名 :zynq_rt_msg_write *函数功能描述 :修改某一确定的子地址所对应的数据字里的内容,主要用 于RT向BC发数据时,修改数据字里的内容 *函数参数 :subaddr:输入参数,RT的子地址 data:写入的数据 len:输入参数,要写入数据的长度 *函数返回值 :成功:RET_OK 失败:RET_ERR ********************************************************************/ int zynq_rt_msg_write(unsigned short subaddr, const char *data, size_t len) { return adaRT.write(subaddr, data, len); } /****************************************************************** *函数名 :zynq_rt_ioctl *函数功能描述 :是否保存某一确定的地址,子地址所对应的数据 *函数参数 :subaddr:输入参数,RT的子地址 flag:是否保存消息的标记 save_path:输入参数,保存文件的路径 *函数返回值 :无 ********************************************************************/ void zynq_rt_ioctl(unsigned short subaddr, msg_is_save flag, const char *save_path) { adaRT.ioctl(subaddr, flag, save_path); } /************************************************************* *函数名 :zynq_mt_init *函数功能描述 :MT初始化函数,设置为MT模式,MT模式下相应寄存器 配置,内存的初始化。 *函数参数 :无 *函数返回值 :成功:RET_OK 失败:RET_ERR ***************************************************************/ int zynq_mt_init(void) { open_device(); adaMT.set_address("192.168.13.226", "0"); adaMT.set_config("BIG_ENDIAN=FALSE;"); U16BIT ret = adaMT.source_init(NULL); return ret; } /************************************************************* *函数名 :zynq_mt_start *函数功能描述 :设置MT模式下线程的处理函数,启动core和线程,启动 成功后core和线程就开始工作。 *函数参数 :无 *函数返回值 :成功:RET_OK 失败:RET_ERR ***************************************************************/ int zynq_mt_start(void) { return adaMT.start(); } /************************************************************* *函数名 :zynq_rt_stop *函数功能描述 :停止 core 和线程, core和线程停止工作 *函数参数 :无 *函数返回值 :成功:RET_OK 失败:RET_ERR ***************************************************************/ int zynq_mt_stop(void) { U16BIT ret = adaMT.stop(); close_device(); return ret; } /************************************************************* *函数名 :zynq_mt_msg_save *函数功能描述 :MT模式下时用于保存所有的消息,并将以数据字,命令 字,状态字,时间等信息保存于文本文件中 *函数参数 : save_path:输入参数,监控的数据存放的位置及名称 *函数返回值 :成功:RET_OK 失败:RET_ERR ***************************************************************/ int zynq_mt_msg_save(const char *save_path) { return adaMT.msg_save (save_path); }
b01ecefbee720394388cbe24038c90f1af6e3b26
baa58c1bb63456da866f1a40123161036d6f7d29
/Coding/Extra/LinkList.h
f5f3721b27749a8f1cd0fbf0d79b3879722a45f9
[]
no_license
sachin5284/CodingCPP
4b7815d8959acb18ae67ac5d0e408c97e28dd478
2cc7449a8085548f45d2459fc86ef7dd5006d0aa
refs/heads/master
2021-06-19T12:38:38.803337
2019-05-31T11:45:32
2019-05-31T11:45:32
149,019,195
0
0
null
2021-01-05T07:42:17
2018-09-16T17:30:14
C++
UTF-8
C++
false
false
1,856
h
LinkList.h
#include<iostream> using namespace std; struct Node { int data; Node* next; Node(int val) { this->data=val; this->next=NULL; } } ; class LinkList { private: Node* root; Node* iterator; public: LinkList(int val) { root=new Node(val); iterator=root; } LinkList(initializer_list<int> list) { int n=sizeof(list)/sizeof(int); if(n>0) { int count=0; iterator=root; initializer_list<int> :: iterator i; for ( i = list.begin(); i != list.end(); ++i) { if(count==0){ root=new Node(*i); iterator=root; } else{ iterator->next=new Node(*i); iterator=iterator->next; } count++; } } } public: void Addnode(int val) { iterator->next=new Node(val); iterator=iterator->next; } void PrintNode() { PrintNode(root); } private: void PrintNode(Node* next) { if(next) { cout<<next->data<<endl; PrintNode(next->next); } } public: void ReverseLinkList() { ReverseLinkList(&root); } private: void ReverseLinkList(Node** node) { if(node==NULL)return; Node* first=*node; Node* last=first->next; //cout<<last->data<<endl; if(last==NULL)return; ReverseLinkList(&last); first->next->next=first; first->next=NULL; //cout<<last->data<<endl; *node=last; } };
6cb6c318945c08cba86fbc65c4efe6eefaccb72e
5d844df52b8297602c3a92a670ef4eb4bb18da07
/SearchBusinessByEmailOrWebsite.cpp
90abeee495f1a5e3cdd4e8d632efa940774953e7
[]
no_license
ChristoferBerruz/DirectoryManagementSystem
02f78fa6af22523f8067216bbc36347c44fc3536
453713277598612523f45b770156b62baa8ad742
refs/heads/master
2023-04-11T06:00:46.391704
2021-05-03T02:48:32
2021-05-03T02:48:32
357,252,042
0
0
null
null
null
null
UTF-8
C++
false
false
2,369
cpp
SearchBusinessByEmailOrWebsite.cpp
#include "SearchBusinessByEmailOrWebsite.h" /// <summary> /// Searches a business contact that matches either a email ending or website domain. /// Returns results aggregated by Category /// </summary> /// <param name="contacts"></param> /// <returns></returns> map<string, int> SearchBusinessByEmailOrWebsite::Search(const vector<Contact*>& contacts) { map<string, int> res; string emailEnding = (*this).emailEnding; string websiteDomain = (*this).websiteDomain; for_each(contacts.begin(), contacts.end(), [&emailEnding, &websiteDomain, &res](Contact* const& contact) { BusinessWebContact* webContact = dynamic_cast<BusinessWebContact*>(contact); if (webContact) { vector<string> websites = webContact->GetWebAddresses(); vector<string>::iterator website; // Bool to not double count the contact bool previouslyAdded = false; // Check the websites for (website = websites.begin(); website != websites.end(); website++) { if (website->find(websiteDomain) != string::npos) { // Website contains domain, so take it string category = webContact->GetCategory(); if (res.find(category) == res.end()) res[category] = 0; res[category] += 1; previouslyAdded = true; break; } } // Check the emails only if contact not previously counted if (!previouslyAdded) { vector<string> emails = webContact->GetEmailAddresses(); vector<string>::iterator email; for (email = emails.begin(); email != emails.end(); email++) { if (email->find(emailEnding) != string::npos) { string category = webContact->GetCategory(); if (res.find(category) == res.end()) res[category] = 0; res[category] += 1; break; } } } } } ); return res; } void SearchBusinessByEmailOrWebsite::GetParametersFromCLI() { cout << "Please enter emailEnding: "; string emailEnding; getline(cin,emailEnding); cout << "Please enter websiteDomain: "; string websiteDomain; getline(cin,websiteDomain); SetEmailEnding(emailEnding); SetWebsiteDomain(websiteDomain); } string SearchBusinessByEmailOrWebsite::Execute(const vector<Contact*>& contacts) { map<string, int> queryRes = Search(contacts); if (queryRes.empty()) return "NO RESULTS"; return FormatAsTable(queryRes, "Category", "Number"); }
d4c2a14251a221a6e470f9aa003357349524c520
4f267de5c3abde3eaf3a7b89d71cd10d3abad87c
/ThirdParty/Libigl/igl/false_barycentric_subdivision.h
98426b57253363add5fcfddde3b2d0e133caff4d
[ "MIT" ]
permissive
MeshGeometry/IogramSource
5f627ca3102e85cd4f16801f5ee67557605eb506
a82302ccf96177dde3358456c6dc8e597c30509c
refs/heads/master
2022-02-10T19:19:18.984763
2018-01-31T20:09:08
2018-01-31T20:09:08
83,458,576
29
17
MIT
2022-02-01T13:45:33
2017-02-28T17:07:02
C++
UTF-8
C++
false
false
1,265
h
false_barycentric_subdivision.h
// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com> // // This Source Code Form is subject to the terms of the Mozilla Public License // v. 2.0. If a copy of the MPL was not distributed with this file, You can // obtain one at http://mozilla.org/MPL/2.0/. #ifndef IGL_ADD_BARYCENTER_H #define IGL_ADD_BARYCENTER_H #include "igl_inline.h" #include <Eigen/Dense> namespace igl { // Refine the mesh by adding the barycenter of each face // Inputs: // V #V by 3 coordinates of the vertices // F #F by 3 list of mesh faces (must be triangles) // Outputs: // VD #V + #F by 3 coordinate of the vertices of the dual mesh // The added vertices are added at the end of VD (should not be // same references as (V,F) // FD #F*3 by 3 faces of the dual mesh // template <typename Scalar, typename Index> IGL_INLINE void false_barycentric_subdivision( const Eigen::PlainObjectBase<Scalar> & V, const Eigen::PlainObjectBase<Index> & F, Eigen::PlainObjectBase<Scalar> & VD, Eigen::PlainObjectBase<Index> & FD); } #ifndef IGL_STATIC_LIBRARY # include "false_barycentric_subdivision.cpp" #endif #endif
1e477f58e92bc53f3fd9a2529ec0e7949b5cd1a1
03c255c3ef68e7f0a484daaf2356aefef5f1f0e5
/main.cpp
55d5528db426446a590be4b700f302c46cf8ad96
[]
no_license
kajetanoss123/Modbus_Tester
7cedd41941267d2fe5f8788d583e91001538ce37
cd052e22479c45da227e2a9a5315b28d2b2d4777
refs/heads/master
2020-12-07T18:07:33.312303
2020-01-09T09:06:22
2020-01-09T09:06:22
232,766,876
0
0
null
null
null
null
UTF-8
C++
false
false
954
cpp
main.cpp
#include "ToshibaVFS15.h" #include <thread> #include "modbus.h" int main() { // ToshibaVFS15 inverter = ToshibaVFS15(8899, 5, "192.168.106.165"); // // inverter.tryConnect(); //inverter.readStatus(); // inverter.start(); // inverter.setFrequency(20); // std::this_thread::sleep_for(10s); //inverter.setDirection(false); //std::this_thread::sleep_for(15s); // inverter.stop(); // inverter.disconnect(); ModbusDevice smd630 = ModbusDevice(8899, 1, "192.168.0.45"); smd630.tryConnect(); smd630.disconnect(); // uint16_t buffer; // modbus mb = modbus("192.168.106.165", 8899); // mb.modbus_set_slave_id(4); // mb.modbus_connect(); // mb.modbus_read_holding_registers(0xFD01, 1, &buffer); // cout<<buffer<<endl; // mb.modbus_write_register(0xFA00, 49664); // //std::this_thread::sleep_for(1s); // //mb.modbus_write_register(0xFA06, 50176); // mb.modbus_close(); return 0; }
b81ceda256148e1f8eea40d751976afb05a3bae7
bc01d89e3b77b9b60afd6f5f8fcad5675b813f8e
/natfw/natfwstunplugin/tsrc/ut_cnatfwstunplugin/src/ut_cnatfwstunconnectionhandler.cpp
d0b3eb22f371671ac44190ced395a10d4897a147
[]
no_license
SymbianSource/oss.FCL.sf.mw.ipappsrv
fce862742655303fcfa05b9e77788734aa66724e
65c20a5a6e85f048aa40eb91066941f2f508a4d2
refs/heads/master
2021-01-12T15:40:59.380107
2010-09-17T05:32:38
2010-09-17T05:32:38
71,849,396
1
0
null
null
null
null
UTF-8
C++
false
false
31,332
cpp
ut_cnatfwstunconnectionhandler.cpp
/* * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" * which accompanies this distribution, and is available * at the URL "http://www.eclipse.org/legal/epl-v10.html". * * Initial Contributors: * Nokia Corporation - initial contribution. * * Contributors: * * Description: * */ // CLASS HEADER #include "ut_cnatfwstunconnectionhandler.h" // EXTERNAL INCLUDES #include <digia/eunit/eunitmacros.h> #include <digia/eunit/EUnitDecorators.h> // INTERNAL INCLUDES #include "natfwstunconnectionhandler.h" #include "cncmconnectionmultiplexer.h" #include "natfwstunbinding.h" #include "natfwstunclient.h" #include "natfwcandidate.h" #include "natfwstunstreamdata.h" #include "cstunasynccallback.h" #include <cnatfwsettingsapi.h> #include "testsettings.h" #include "natfwunittestmacros.h" _LIT8( KDomain,"www.domain.fi" ); const TUint KIapId = 6; const TUint KRtoValue = 500; const TUint KQos = 100; // CONSTRUCTION UT_CNATFWStunConnectionHandler* UT_CNATFWStunConnectionHandler::NewL() { UT_CNATFWStunConnectionHandler* self = UT_CNATFWStunConnectionHandler::NewLC(); CleanupStack::Pop(); return self; } UT_CNATFWStunConnectionHandler* UT_CNATFWStunConnectionHandler::NewLC() { UT_CNATFWStunConnectionHandler* self = new( ELeave ) UT_CNATFWStunConnectionHandler(); CleanupStack::PushL( self ); self->ConstructL(); return self; } // Destructor (virtual by CBase) UT_CNATFWStunConnectionHandler::~UT_CNATFWStunConnectionHandler() { } // Default constructor UT_CNATFWStunConnectionHandler::UT_CNATFWStunConnectionHandler() { } // Second phase construct void UT_CNATFWStunConnectionHandler::ConstructL() { // The ConstructL from the base class CEUnitTestSuiteClass must be called. // It generates the test case table. CEUnitTestSuiteClass::ConstructL(); } // METHODS void UT_CNATFWStunConnectionHandler::SetupL( ) { iConnMux = CNcmConnectionMultiplexer::NewL( *this ); iSessionId = iConnMux->CreateSessionL( KIapId, 0, 0 ); iStreamId = iConnMux->CreateStreamL( iSessionId, KQos, KProtocolInetUdp ); iConnHandler = CNATFWStunConnectionHandler::NewL( *iStunPlugin, *this ); iConnHandler->PluginInitializeL( KIapId, KDomain, *iConnMux ); iSettings = CTestSettings::NewL( KDomain, KIapId ); } void UT_CNATFWStunConnectionHandler::Teardown( ) { delete iConnHandler; iConnHandler = NULL; delete iConnMux; iConnMux = NULL; delete iSettings; iSettings = NULL; } // From MNATFWConnectionMultiplexerObserver void UT_CNATFWStunConnectionHandler::Notify( TUint /*aSessionId*/, TUint /*aStreamId*/, TNotifyType /*aType*/, TInt /*aError*/ ) { } // From MNATFWConnectionMultiplexerObserver void UT_CNATFWStunConnectionHandler::IcmpError( TUint /*aSessionId*/, TUint /*aStreamId*/, const TInetAddr& /*aAddress*/ ) { } // From MNATFWPluginObserver void UT_CNATFWStunConnectionHandler::Error( const CNATFWPluginApi& /*aPlugin*/, TUint /*aStreamId*/, TInt /*aErrorCode*/ ) { } // From MNATFWPluginObserver void UT_CNATFWStunConnectionHandler::Notify( const CNATFWPluginApi& /*aPlugin*/, TUint /*aStreamId*/, TNATFWPluginEvent /*aEvent*/, TInt /*aErrCode*/ ) { if ( iAsyncTestCase ) { CActiveScheduler::Stop(); iAsyncTestCase = EFalse; } } // From MNATFWPluginObserver void UT_CNATFWStunConnectionHandler::NewCandidatePairFound( const CNATFWPluginApi& /*aPlugin*/, CNATFWCandidatePair* /*aCandidatePair*/ ) { } // From MNATFWPluginObserver void UT_CNATFWStunConnectionHandler::NewLocalCandidateFound( const CNATFWPluginApi& /*aPlugin*/, CNATFWCandidate* aLocalCandidate ) { delete aLocalCandidate; } void UT_CNATFWStunConnectionHandler::UT_CNATFWStunConnectionHandler_ConnectServerLL( ) { RSocketServ* socketServ; TName connectionName; socketServ = iConnMux->GetSessionInfoL( iSessionId, connectionName ); NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->ConnectServerL( *socketServ, connectionName ) ); socketServ = NULL; } void UT_CNATFWStunConnectionHandler::UT_CNATFWStunConnectionHandler_TryNextServerLL( ) { NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->TryNextServerL() ); EUNIT_ASSERT_LEAVE( iConnHandler->TryNextServerL() ); } void UT_CNATFWStunConnectionHandler::UT_CNATFWStunConnectionHandler_ConnectionByIdL( ) { // create STUN Client iConnHandler->TryNextServerL(); // Store stream ID and create connection to array iConnHandler->FetchCandidateL( iStreamId, 0, KAFUnspec, KAFUnspec ); TUint streamIndex( 0 ); TUint connectionId( 3 ); TConnectionData* connection = iConnHandler->ConnectionById( streamIndex, connectionId ); if ( connection ) { EUNIT_ASSERT( EFalse ); } connectionId = 2; connection = iConnHandler->ConnectionById( streamIndex, connectionId ); if ( !connection ) { EUNIT_ASSERT( EFalse ); } } void UT_CNATFWStunConnectionHandler::UT_CNATFWStunConnectionHandler_FetchCandidateLL( ) { EUNIT_ASSERT_LEAVE( iConnHandler->FetchCandidateL( 222, KRtoValue, KAFUnspec, KInetAddrAny ) ); // Must create STUN Client before fetching candidate: iConnHandler->TryNextServerL(); NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->FetchCandidateL( 222, KRtoValue, KAFUnspec, KInetAddrAny ) ); NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->FetchCandidateL( 222, KRtoValue, KAFUnspec, KInetAddrAny ) ); NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->FetchCandidateL( 333, KRtoValue, KAFUnspec, KInetAddrAny ) ); } void UT_CNATFWStunConnectionHandler::UT_CNATFWStunConnectionHandler_StartStunRefreshL( ) { CSTUNClient* dummyClient = NULL; CSTUNBinding* dummyBinding = CSTUNBinding::NewLC( *dummyClient, 222, 2 ); TConnectionData connData; TStreamData streamData; streamData.iStreamId = 222; streamData.iRtoValue = 555; // used in relay binding stub for the this test connData.iConnectionId = 2; connData.iStunBinding = dummyBinding; streamData.iConnArray.AppendL( connData ); CleanupClosePushL( streamData.iConnArray ); iConnHandler->iStreamArray.AppendL( streamData ); CleanupStack::Pop( &streamData.iConnArray ); CleanupStack::Pop( dummyBinding ); iConnHandler->iStunRefreshInterval = 1000; iConnHandler->StartStunRefresh( ); if( !iConnHandler->iStunRefreshStarted ) { EUNIT_ASSERT( EFalse ); } CActiveScheduler::Start(); iConnHandler->iStunRefreshInterval = 0; iConnHandler->StartStunRefresh( ); if ( iConnHandler->iStunRefreshStarted ) { EUNIT_ASSERT( EFalse ); } } void UT_CNATFWStunConnectionHandler::UT_CNATFWStunConnectionHandler_CreateSTUNBindingLL( ) { NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->CreateSTUNBindingL( 222, 2 ) ); TConnectionData connData; TStreamData streamData; streamData.iStreamId = 222; connData.iConnectionId = 2; streamData.iConnArray.AppendL( connData ); CleanupClosePushL( streamData.iConnArray ); iConnHandler->iStreamArray.AppendL( streamData ); CleanupStack::Pop( &streamData.iConnArray ); NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->CreateSTUNBindingL( 222, 2 ) ); if ( !iConnHandler->iStreamArray[0].iConnArray[0].iStunBinding ) { EUNIT_ASSERT( EFalse ); } } void UT_CNATFWStunConnectionHandler::UT_CNATFWStunConnectionHandler_SetReceivingStateLL( ) { CNATFWCandidate* candidate = CNATFWCandidate::NewL(); CleanupStack::PushL( candidate ); candidate->SetStreamId( 333 ); iAsyncTestCase = ETrue; NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->SetReceivingStateL( *candidate, EStreamingStateActive ) ); CActiveScheduler::Start(); iAsyncTestCase = ETrue; NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->SetReceivingStateL( *candidate, EStreamingStatePassive ) ); CActiveScheduler::Start(); CNATFWCandidate* candidate2 = CNATFWCandidate::NewL(); CleanupStack::PushL( candidate2 ); candidate2->SetStreamId( 222 ); candidate2->SetType( CNATFWCandidate::EServerReflexive ); TStreamData streamData; streamData.iStreamId = 222; TConnectionData connData; connData.iConnectionId = 2; connData.iLocalCandidate = candidate2; streamData.iConnArray.AppendL( connData ); CleanupClosePushL( streamData.iConnArray ); iConnHandler->iStreamArray.AppendL( streamData ); CleanupStack::Pop( &streamData.iConnArray ); NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->SetReceivingStateL( *candidate2, EStreamingStateActive ) ); iConnHandler->iStreamArray[0].iConnArray[0].iReceivingActivated = ETrue; iAsyncTestCase = ETrue; NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->SetReceivingStateL( *candidate2, EStreamingStateActive ) ); CActiveScheduler::Start(); NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->SetReceivingStateL( *candidate2, EStreamingStatePassive ) ); iConnHandler->iStreamArray[0].iConnArray[0].iReceivingActivated = EFalse; iAsyncTestCase = ETrue; NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->SetReceivingStateL( *candidate2, EStreamingStatePassive ) ); CActiveScheduler::Start(); CleanupStack::PopAndDestroy( candidate2 ); CleanupStack::PopAndDestroy( candidate ); } void UT_CNATFWStunConnectionHandler::UT_CNATFWStunConnectionHandler_SetSendingStateLL( ) { CNATFWCandidate* candidate = CNATFWCandidate::NewL(); CleanupStack::PushL( candidate ); candidate->SetStreamId( 333 ); iAsyncTestCase = ETrue; NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->SetSendingStateL( *candidate, EStreamingStateActive, KInetAddrLoop ) ); CActiveScheduler::Start(); iAsyncTestCase = ETrue; NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->SetSendingStateL( *candidate, EStreamingStatePassive, KInetAddrLoop ) ); CActiveScheduler::Start(); CNATFWCandidate* candidate2 = CNATFWCandidate::NewL(); CleanupStack::PushL( candidate2 ); candidate2->SetStreamId( 222 ); candidate2->SetType( CNATFWCandidate::EServerReflexive ); TStreamData streamData; streamData.iStreamId = 222; TConnectionData connData; connData.iConnectionId = 2; connData.iLocalCandidate = candidate2; streamData.iConnArray.AppendL( connData ); CleanupClosePushL( streamData.iConnArray ); iConnHandler->iStreamArray.AppendL( streamData ); CleanupStack::Pop( &streamData.iConnArray ); NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->SetSendingStateL( *candidate2, EStreamingStateActive, KInetAddrLoop ) ); iConnHandler->iStreamArray[0].iConnArray[0].iSendingActivated = ETrue; // Destination address must be set here as KInetAddrLoop has no address family iConnHandler->iStreamArray[0].iConnArray[0].iDestAddr = KInetAddrLoop; iAsyncTestCase = ETrue; NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->SetSendingStateL( *candidate2, EStreamingStateActive, KInetAddrLoop ) ); CActiveScheduler::Start(); NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->SetSendingStateL( *candidate2, EStreamingStateActive, KInetAddrLinkLocalNet ) ); // Destination address must be set here as KInetAddrLinkLocalNet has no address family iConnHandler->iStreamArray[0].iConnArray[0].iDestAddr = KInetAddrLinkLocalNet; NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->SetSendingStateL( *candidate2, EStreamingStatePassive, KInetAddrLoop ) ); iConnHandler->iStreamArray[0].iConnArray[0].iSendingActivated = EFalse; iAsyncTestCase = ETrue; NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->SetSendingStateL( *candidate2, EStreamingStatePassive, KInetAddrLoop ) ); CActiveScheduler::Start(); CleanupStack::PopAndDestroy(); CleanupStack::PopAndDestroy(); } void UT_CNATFWStunConnectionHandler::UT_CNATFWStunConnectionHandler_GetConnectionIdLL( ) { // Matching candidate CNATFWCandidate* candidate = CNATFWCandidate::NewL(); CleanupStack::PushL( candidate ); candidate->SetStreamId( 222 ); candidate->SetType( CNATFWCandidate::EServerReflexive ); candidate->SetBase( KInetAddrAny ); candidate->SetTransportAddrL( KInetAddrAny ); // Non-matching candidate CNATFWCandidate* candidate2 = CNATFWCandidate::NewL(); CleanupStack::PushL( candidate2 ); candidate2->SetStreamId( 222 ); // create STUN Client iConnHandler->TryNextServerL(); // Store stream ID and create connection to array iConnHandler->FetchCandidateL( iStreamId, 0, KAFUnspec, KAFUnspec ); iConnHandler->iStreamArray[0].iConnArray[0].iConnectionId = 2; iConnHandler->iStreamArray[0].iConnArray[0].iLocalCandidate = candidate; TUint connectionId( 0 ); EUNIT_ASSERT_LEAVE( iConnHandler->GetConnectionIdL( *candidate2, 222, connectionId ) ); connectionId = 0; NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->GetConnectionIdL( *candidate, 222, connectionId ) ); CleanupStack::PopAndDestroy(); CleanupStack::PopAndDestroy(); } void UT_CNATFWStunConnectionHandler:: UT_CNATFWStunConnectionHandler_STUNClientInitCompletedL( ) { TStreamData streamData; streamData.iStreamId = 222; TConnectionData connData; connData.iConnectionId = 2; streamData.iConnArray.AppendL( connData ); CleanupClosePushL( streamData.iConnArray ); iConnHandler->iStreamArray.AppendL( streamData ); CleanupStack::Pop( &streamData.iConnArray ); iAsyncTestCase = ETrue; iConnHandler->STUNClientInitCompleted( *iConnHandler->iStunClient, KErrNone ); CActiveScheduler::Start(); iConnHandler->STUNClientInitCompleted( *iConnHandler->iStunClient, KErrArgument ); } void UT_CNATFWStunConnectionHandler:: UT_CNATFWStunConnectionHandler_STUNClientInitCompleted_AllocL( ) { TStreamData streamData; streamData.iStreamId = 222; TConnectionData connData; connData.iConnectionId = 2; streamData.iConnArray.AppendL( connData ); CleanupClosePushL( streamData.iConnArray ); iConnHandler->iStreamArray.AppendL( streamData ); CleanupStack::Pop( &streamData.iConnArray ); iAsyncTestCase = ETrue; iConnHandler->STUNClientInitCompleted( *iConnHandler->iStunClient, KErrNone ); iConnHandler->STUNClientInitCompleted( *iConnHandler->iStunClient, KErrArgument ); } void UT_CNATFWStunConnectionHandler:: UT_CNATFWStunConnectionHandler_STUNBindingEventOccurredLL( ) { // Create STUN Client iConnHandler->TryNextServerL(); CSTUNBinding* dummyBinding = CSTUNBinding::NewLC( *iConnHandler->iStunClient, iStreamId, 2 ); NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->STUNBindingEventOccurredL( MSTUNClientObserver::EPublicAddressResolved, *dummyBinding ) ); // Store stream and create connection to array iConnHandler->FetchCandidateL( iStreamId, 0, KAFUnspec, KAFUnspec ); iConnHandler->iStreamArray[0].iConnArray[0].iStunBinding = dummyBinding; CleanupStack::Pop( dummyBinding ); iAsyncTestCase = ETrue; NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->STUNBindingEventOccurredL( MSTUNClientObserver::EPublicAddressResolved, *dummyBinding ) ); CActiveScheduler::Start(); NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->STUNBindingEventOccurredL( MSTUNClientObserver::EPublicAddressResolved, *dummyBinding ) ); iAsyncTestCase = ETrue; delete iConnHandler->iStreamArray[0].iConnArray[0].iLocalCandidate; iConnHandler->iStreamArray[0].iConnArray[0].iLocalCandidate = NULL; NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->STUNBindingEventOccurredL( MSTUNClientObserver::EPublicAddressResolved, *dummyBinding ) ); CActiveScheduler::Start(); iAsyncTestCase = ETrue; NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->STUNBindingEventOccurredL( MSTUNClientObserver::ECredentialsRejected, *dummyBinding ) ); CActiveScheduler::Start(); } void UT_CNATFWStunConnectionHandler:: UT_CNATFWStunConnectionHandler_STUNBindingErrorOccurredL( ) { // Create STUN Client iConnHandler->TryNextServerL(); CSTUNBinding* dummyBinding = CSTUNBinding::NewLC( *iConnHandler->iStunClient, iStreamId, 2 ); iConnHandler->STUNBindingErrorOccurred( *dummyBinding, KErrNotFound ); // Store stream ID and create connection to array iConnHandler->FetchCandidateL( iStreamId, 0, KAFUnspec, KAFUnspec ); iConnHandler->iStreamArray[0].iConnArray[0].iStunBinding = dummyBinding; CleanupStack::Pop( dummyBinding ); // Alternate server case iConnHandler->STUNBindingErrorOccurred( *dummyBinding, 300 ); // Error during candidate fetching case dummyBinding = CSTUNBinding::NewL( *iConnHandler->iStunClient, iStreamId, 2 ); iConnHandler->iStreamArray[0].iConnArray[0].iStunBinding = dummyBinding; iAsyncTestCase = ETrue; iConnHandler->STUNBindingErrorOccurred( *dummyBinding, KErrNotFound ); CActiveScheduler::Start(); // Error after candidate fetching is completed dummyBinding = CSTUNBinding::NewL( *iConnHandler->iStunClient, iStreamId, 2 ); iConnHandler->FetchCandidateL( iStreamId, 0, KAFUnspec, KAFUnspec ); iConnHandler->iStreamArray[0].iConnArray[0].iStunBinding = dummyBinding; CNATFWCandidate* candidate = CNATFWCandidate::NewL(); CleanupStack::PushL( candidate ); candidate->SetStreamId( iStreamId ); iConnHandler->iStreamArray[0].iConnArray[0].iLocalCandidate = candidate; CleanupStack::Pop( candidate ); iConnHandler->STUNBindingErrorOccurred( *dummyBinding, KErrNotFound ); } void UT_CNATFWStunConnectionHandler:: UT_CNATFWStunConnectionHandler_STUNBindingErrorOccurred_AllocL() { // Create STUN Client iConnHandler->TryNextServerL(); CSTUNBinding* dummyBinding = CSTUNBinding::NewLC( *iConnHandler->iStunClient, iStreamId, 2 ); iConnHandler->STUNBindingErrorOccurred( *dummyBinding, KErrNotFound ); // Store stream ID and create connection to array iConnHandler->FetchCandidateL( iStreamId, 0, KAFUnspec, KAFUnspec ); iConnHandler->iStreamArray[0].iConnArray[0].iStunBinding = dummyBinding; CleanupStack::Pop( dummyBinding ); // Alternate server case iConnHandler->STUNBindingErrorOccurred( *dummyBinding, 300 ); // Error during candidate fetching case dummyBinding = CSTUNBinding::NewL( *iConnHandler->iStunClient, iStreamId, 2 ); iConnHandler->iStreamArray[0].iConnArray[0].iStunBinding = dummyBinding; iAsyncTestCase = ETrue; iConnHandler->STUNBindingErrorOccurred( *dummyBinding, KErrNotFound ); // Error after candidate fetching is completed dummyBinding = CSTUNBinding::NewL( *iConnHandler->iStunClient, iStreamId, 2 ); iConnHandler->FetchCandidateL( iStreamId, 0, KAFUnspec, KAFUnspec ); iConnHandler->iStreamArray[0].iConnArray[0].iStunBinding = dummyBinding; CNATFWCandidate* candidate = CNATFWCandidate::NewL(); CleanupStack::PushL( candidate ); candidate->SetStreamId( iStreamId ); iConnHandler->iStreamArray[0].iConnArray[0].iLocalCandidate = candidate; CleanupStack::Pop( candidate ); iConnHandler->STUNBindingErrorOccurred( *dummyBinding, KErrNotFound ); } void UT_CNATFWStunConnectionHandler:: UT_CNATFWStunConnectionHandler_IncomingMessageLL( ) { TInetAddr dummyAddr; const TInetAddr dummyAddr2; HBufC8* dummyMessage = NULL; TBool consumed( EFalse ); // Create STUN Client iConnHandler->TryNextServerL(); // Create connections to array iConnHandler->FetchCandidateL( iStreamId, 0, KAFUnspec, KAFUnspec ); CSTUNBinding* dummyBinding = CSTUNBinding::NewL( *iConnHandler->iStunClient, iStreamId, 2 ); iConnHandler->iStreamArray[0].iConnArray[0].iStunBinding = dummyBinding; iConnHandler->FetchCandidateL( iStreamId, 0, KAFUnspec, KAFUnspec ); NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->IncomingMessageL( 333, *dummyMessage, dummyAddr2, dummyAddr2, dummyAddr, consumed ) ); NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->IncomingMessageL( 222, *dummyMessage, dummyAddr2, dummyAddr2, dummyAddr, consumed ) ); } void UT_CNATFWStunConnectionHandler::UT_CNATFWStunConnectionHandler_ConnectionNotifyL( ) { iConnHandler->TryNextServerL(); iConnHandler->FetchCandidateL( iStreamId, 0, KAFUnspec, KAFUnspec ); iConnHandler->ConnectionNotify( 333, 3, MNcmConnectionObserver::ESendingActivated, KErrNone ); // Events during candidate fetching iConnHandler->ConnectionNotify( iStreamId, 2, MNcmConnectionObserver::ESendingActivated, KErrNone ); iConnHandler->ConnectionNotify( iStreamId, 2, MNcmConnectionObserver::ESendingActivated, KErrNone ); iConnHandler->ConnectionNotify( iStreamId, 2, MNcmConnectionObserver::EReceivingActivated, KErrNone ); iConnHandler->ConnectionNotify( iStreamId, 2, MNcmConnectionObserver::ESendingDeactivated, KErrNone ); iConnHandler->ConnectionNotify( iStreamId, 2, MNcmConnectionObserver::EReceivingDeactivated, KErrNone ); // Events after candidate has been fetched CNATFWCandidate* candidate = CNATFWCandidate::NewL(); CleanupStack::PushL( candidate ); candidate->SetStreamId( 222 ); iConnHandler->iStreamArray[0].iConnArray[0].iLocalCandidate = candidate; CleanupStack::Pop( candidate ); iConnHandler->ConnectionNotify( iStreamId, 2, MNcmConnectionObserver::ESendingActivated, KErrNone ); iConnHandler->ConnectionNotify( iStreamId, 2, MNcmConnectionObserver::EReceivingActivated, KErrNone ); iConnHandler->ConnectionNotify( iStreamId, 2, MNcmConnectionObserver::ESendingDeactivated, KErrNone ); iConnHandler->ConnectionNotify( iStreamId, 2, MNcmConnectionObserver::EReceivingDeactivated, KErrNone ); iConnHandler->ConnectionNotify( iStreamId, 2, MNcmConnectionObserver::EFirstMediaPacketSent, KErrNone ); iConnHandler->ConnectionNotify( iStreamId, 2, MNcmConnectionObserver::EConnectionRemoved, KErrNone ); // Error events iConnHandler->FetchCandidateL( iStreamId, 0, KAFUnspec, KAFUnspec ); iConnHandler->ConnectionNotify( iStreamId, 2, MNcmConnectionObserver::EConnectionError, KErrCouldNotConnect ); iConnHandler->FetchCandidateL( iStreamId, 0, KAFUnspec, KAFUnspec ); iConnHandler->iStreamArray[0].iConnArray[0].iLocalCandidate = candidate; iConnHandler->ConnectionNotify( iStreamId, 2, MNcmConnectionObserver::EConnectionError, KErrCouldNotConnect ); } void UT_CNATFWStunConnectionHandler::UT_CNATFWStunConnectionHandler_BindingRefreshLL( ) { CSTUNClient* dummyClient = NULL; CSTUNBinding* dummyBinding = CSTUNBinding::NewLC( *dummyClient, iStreamId, 2 ); NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->BindingRefreshL() ); TConnectionData connData; TStreamData streamData; streamData.iStreamId = iStreamId; connData.iConnectionId = 2; connData.iStunBinding = dummyBinding; streamData.iConnArray.AppendL( connData ); CleanupClosePushL( streamData.iConnArray ); iConnHandler->iStreamArray.AppendL( streamData ); CleanupStack::Pop( &streamData.iConnArray ); CleanupStack::Pop( dummyBinding ); NATFW_EUNIT_ASSERT_NO_LEAVE( iConnHandler->BindingRefreshL() ); } void UT_CNATFWStunConnectionHandler::UT_CNATFWStunConnectionHandler_DeleteStreamL( ) { // create STUN Client iConnHandler->TryNextServerL(); // Store stream ID and create connections to array iConnHandler->FetchCandidateL( iStreamId, 0, KAFUnspec, KAFUnspec ); iConnHandler->FetchCandidateL( iStreamId, 0, KAFUnspec, KAFUnspec ); CSTUNBinding* dummyBinding = CSTUNBinding::NewL( *iConnHandler->iStunClient, iStreamId, 2 ); iConnHandler->iStreamArray[0].iConnArray[1].iStunBinding = dummyBinding; TUint streamIndex( 0 ); iConnHandler->DeleteStream( streamIndex, ETrue ); if ( iConnHandler->iStreamArray.Count() ) { EUNIT_ASSERT( EFalse ); } iConnHandler->FetchCandidateL( iStreamId, 0, KAFUnspec, KAFUnspec ); iConnHandler->DeleteStream( streamIndex, EFalse ); if ( iConnHandler->iStreamArray.Count() ) { EUNIT_ASSERT( EFalse ); } } // TEST TABLE EUNIT_BEGIN_TEST_TABLE( UT_CNATFWStunConnectionHandler, "Add test suite description here.", "UNIT" ) EUNIT_TEST( "ConnectServerL - test ", "CNATFWStunConnectionHandler", "ConnectServerL", "FUNCTIONALITY", SetupL, UT_CNATFWStunConnectionHandler_ConnectServerLL, Teardown) EUNIT_TEST( "TryNextServerL - test ", "CNATFWStunConnectionHandler", "TryNextServerL", "FUNCTIONALITY", SetupL, UT_CNATFWStunConnectionHandler_TryNextServerLL, Teardown) EUNIT_TEST( "ConnectionById - test ", "CNATFWStunConnectionHandler", "ConnectionById", "FUNCTIONALITY", SetupL, UT_CNATFWStunConnectionHandler_ConnectionByIdL, Teardown) EUNIT_TEST( "FetchCandidateL - test ", "CNATFWStunConnectionHandler", "FetchCandidateL", "FUNCTIONALITY", SetupL, UT_CNATFWStunConnectionHandler_FetchCandidateLL, Teardown) EUNIT_TEST( "StartStunRefresh - test ", "CNATFWStunConnectionHandler", "StartStunRefresh", "FUNCTIONALITY", SetupL, UT_CNATFWStunConnectionHandler_StartStunRefreshL, Teardown) EUNIT_TEST( "CreateSTUNBindingL - test ", "CNATFWStunConnectionHandler", "CreateSTUNBindingL", "FUNCTIONALITY", SetupL, UT_CNATFWStunConnectionHandler_CreateSTUNBindingLL, Teardown) EUNIT_TEST( "SetReceivingStateL - test ", "CNATFWStunConnectionHandler", "SetReceivingStateL", "FUNCTIONALITY", SetupL, UT_CNATFWStunConnectionHandler_SetReceivingStateLL, Teardown) EUNIT_TEST( "SetSendingStateL - test ", "CNATFWStunConnectionHandler", "SetSendingStateL", "FUNCTIONALITY", SetupL, UT_CNATFWStunConnectionHandler_SetSendingStateLL, Teardown) EUNIT_TEST( "GetConnectionIdL - test ", "CNATFWStunConnectionHandler", "GetConnectionIdL", "FUNCTIONALITY", SetupL, UT_CNATFWStunConnectionHandler_GetConnectionIdLL, Teardown) EUNIT_ALLOC_TEST( "STUNClientInitCompleted - alloc test ", "CNATFWStunConnectionHandler", "STUNClientInitCompleted", "ERROHANDLING", SetupL, UT_CNATFWStunConnectionHandler_STUNClientInitCompleted_AllocL, Teardown) EUNIT_NOT_DECORATED_TEST( "STUNClientInitCompleted - test ", "CNATFWStunConnectionHandler", "STUNClientInitCompleted", "FUNCTIONALITY", SetupL, UT_CNATFWStunConnectionHandler_STUNClientInitCompletedL, Teardown) EUNIT_TEST( "STUNBindingEventOccurredL - test ", "CNATFWStunConnectionHandler", "STUNBindingEventOccurredL", "FUNCTIONALITY", SetupL, UT_CNATFWStunConnectionHandler_STUNBindingEventOccurredLL, Teardown) EUNIT_ALLOC_TEST( "STUNBindingErrorOccurred - alloc test ", "CNATFWStunConnectionHandler", "STUNBindingErrorOccurred", "ERROHANDLING", SetupL, UT_CNATFWStunConnectionHandler_STUNBindingErrorOccurred_AllocL, Teardown) EUNIT_NOT_DECORATED_TEST( "STUNBindingErrorOccurred - test ", "CNATFWStunConnectionHandler", "STUNBindingErrorOccurred", "FUNCTIONALITY", SetupL, UT_CNATFWStunConnectionHandler_STUNBindingErrorOccurredL, Teardown) EUNIT_TEST( "IncomingMessageL - test ", "CNATFWStunConnectionHandler", "IncomingMessageL", "FUNCTIONALITY", SetupL, UT_CNATFWStunConnectionHandler_IncomingMessageLL, Teardown) EUNIT_TEST( "ConnectionNotify - test ", "CNATFWStunConnectionHandler", "ConnectionNotify", "FUNCTIONALITY", SetupL, UT_CNATFWStunConnectionHandler_ConnectionNotifyL, Teardown) EUNIT_TEST( "BindingRefreshL - test ", "CNATFWStunConnectionHandler", "BindingRefreshL", "FUNCTIONALITY", SetupL, UT_CNATFWStunConnectionHandler_BindingRefreshLL, Teardown) EUNIT_TEST( "DeleteStream - test ", "CNATFWStunConnectionHandler", "DeleteStream", "FUNCTIONALITY", SetupL, UT_CNATFWStunConnectionHandler_DeleteStreamL, Teardown) EUNIT_END_TEST_TABLE // END OF FILE
6c364d42568104c6ad573b05a892ed46babdc86c
2962f164cecb440ecd905ab9f3cc569c03a01ad5
/RtspPlayer/assemblies/sunell/include/NvdcDll.h
fa24b1da67dc04d47951c044ac59f9537db93008
[]
no_license
paxan222/hello-world
5ef9bd04a5c4337c1403a04973e2c0c11665bb26
c55c60e0f72a04e1e2560dc19c2a6bbd7e8b430f
refs/heads/master
2020-12-11T21:09:30.200433
2017-05-04T08:39:53
2017-05-04T08:39:53
55,044,669
0
1
null
null
null
null
GB18030
C++
false
false
92,814
h
NvdcDll.h
// NvdcDll.h : NvdcDll DLL 的主头文件 // #ifndef _NVDCDLL_H_ #define _NVDCDLL_H_ #ifdef __cplusplus extern "C" { #endif #include "SNPlatOS.h" #include "SN_Struct.h" #include "SNError.h" #if (defined(WIN32) || defined(_WIN32_WCE)) #include "EventConst.h" #endif #ifndef byte typedef unsigned char byte; #endif using namespace NVDC_STRUCT; namespace NVDC_FUC { //获取SDK版本号 void SN_C_API NvdSdk_GetVersion(long* p_nVersion); bool SN_C_API NvdSdk_Is_Handle_Valid(const long p_hHandle ); long SN_C_API NvdSdk_SetCharSet(const int p_nCharSet);//0:GB2312; 1:UTF8 //初始化接口,在使用Remote C接口之前必须调用Remote_Nvd_Init初始化函数,使用完后应当调用Remote_Nvd_UnInit释放环境 long SN_C_API Remote_Nvd_Init(long* p_handle, const ST_DeviceInfo* p_stDeviceInfo, const long p_nTransferProtocol); long SN_C_API Remote_Nvd_InitEx(long* p_handle, const ST_DeviceInfoEx* p_stDeviceInfoEx, const long p_nTransferProtocol); long SN_C_API Remote_Nvd_UnInit(long p_hHandle); void SN_C_API Remote_Nvd_formatMessage(const int p_nErrorCode, char* p_pszErrorMessage, const long p_nMessageBufLen); //RemoteCamera C Interface( 接口废弃,使用Remote_Camera2_***接口 ) long SN_C_API Remote_Camera_SetDefaultImageFormatId(long p_hHandle, const unsigned long p_nImageFormatId); long SN_C_API Remote_Camera_SetDefaultFrameRate(long p_hHandle, const unsigned long p_nFrameRate); long SN_C_API Remote_Camera_SetDefaultBitRate(long p_hHandle, const unsigned long p_nBitRateType, const unsigned long p_nBitRate); long SN_C_API Remote_Camera_SetDefaultQuality(long p_hHandle, const unsigned long p_nQuality); long SN_C_API Remote_Camera_Open(long p_hHandle, const long p_nCameraID); long SN_C_API Remote_Camera_Close(long p_hHandle); long SN_C_API Remote_Camera_Read(long p_hHandle, ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_Camera_ReadTS(long p_hHandle, ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_Camera_StartAudio(long p_hHandle); long SN_C_API Remote_Camera_StopAudio(long p_hHandle); long SN_C_API Remote_Camera_GetVideoInfo(long p_hHandle, ST_VideoInfo* p_stVideoInfo); long SN_C_API Remote_Camera_GetAudioInfo(long p_hHandle, ST_AudioInfo* p_stAudioInfo); long SN_C_API Remote_Camera_GetVideoSystem(long p_hHandle, long* p_nVideoSystem); long SN_C_API Remote_Camera_MakeKeyFrame(long p_hHandle); long SN_C_API Remote_Camera_SetCurrentImageFormatId(long p_hHandle, const unsigned long p_nImageFormatId); long SN_C_API Remote_Camera_GetCurrentImageFormatId(long p_hHandle, unsigned long* p_nImageFormatId); long SN_C_API Remote_Camera_SetCurrentFrameRate(long p_hHandle, const unsigned long p_nFrameRate); long SN_C_API Remote_Camera_GetCurrentFrameRate(long p_hHandle, unsigned long* p_nFrameRate); long SN_C_API Remote_Camera_SetCurrentConfirmBitRate(long p_hHandle, const unsigned long p_nBitRateType, const unsigned long p_nConfirmBitRate); long SN_C_API Remote_Camera_GetCurrentConfirmBitRate(long p_hHandle, unsigned long* p_nBitRateType, unsigned long* p_nConfirmBitRate); long SN_C_API Remote_Camera_SetCurrentQuant(long p_hHandle, const unsigned long p_nQuant); long SN_C_API Remote_Camera_GetCurrentQuant(long p_hHandle, unsigned long* p_nQuant); long SN_C_API Remote_Camera_SetCurrentQuality(long p_hHandle, const unsigned long p_nQuality); long SN_C_API Remote_Camera_GetCurrentQuality(long p_hHandle, unsigned long* p_nQuality); //RemoteCamera2 C Interface long SN_C_API Remote_Camera2_SetDefaultStreamId(long p_hHandle, const unsigned long p_nStreamId); long SN_C_API Remote_Camera2_SetMulticastFlag(long p_hHandle, const bool p_bFlag); bool SN_C_API Remote_Camera2_GetMulticastFlag(long p_hHandle); long SN_C_API Remote_Camera2_Open(long p_hHandle, const long p_nCameraID); long SN_C_API Remote_Camera2_Close(long p_hHandle); long SN_C_API Remote_Camera2_Read(long p_hHandle, ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_Camera2_ReadTS(long p_hHandle, ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_Camera2_ReadPS(long p_hHandle, ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_Camera2_StartAudio(long p_hHandle); long SN_C_API Remote_Camera2_StopAudio(long p_hHandle); long SN_C_API Remote_Camera2_SetCurrentStreamId(long p_hHandle, const unsigned long p_nStreamId); long SN_C_API Remote_Camera2_GetCurrentStreamId(long p_hHandle, unsigned long* p_nStreamId); long SN_C_API Remote_Camera2_MakeKeyFrame(long p_hHandle); long SN_C_API Remote_Camera2_Pause(long p_hHandle); long SN_C_API Remote_Camera2_Resume(long p_hHandle); long SN_C_API Remote_Camera2_KeepAlive(long p_hHandle); long SN_C_API Remote_Camera2_StartIntelligenceAnalyse(long p_hHandle); long SN_C_API Remote_Camera2_StopIntelligenceAnalyse(long p_hHandle); //RemoteCamera3 C Interface long SN_C_API Remote_Camera3_SetDefaultStreamId(long p_hHandle, const unsigned long p_nStreamId); long SN_C_API Remote_Camera3_SetStreamFormat(long p_hHandle, const int p_nStreamFormat); long SN_C_API Remote_Camera3_SetAutoConnectFlag(long p_hHandle, const bool p_bFlag); long SN_C_API Remote_Camera3_SetMulticastFlag(long p_hHandle, const bool p_bFlag); bool SN_C_API Remote_Camera3_GetMulticastFlag(long p_hHandle); long SN_C_API Remote_Camera3_Open(long p_hHandle, const long p_nCameraID); long SN_C_API Remote_Camera3_Close(long p_hHandle); long SN_C_API Remote_Camera3_SetMessageCallback(long p_hHandle, long (CALLBACK* fMessageCallback)(long p_hHandle, const int p_nMessageID, void* pUserData), void* pUserData); long SN_C_API Remote_Camera3_SetAVDateCallback(long p_hHandle, long (CALLBACK* fAVDateCallback)(long p_hHandle, ST_AVFrameData* p_pstAVFrameData, void* pUserData), void* pUserData); long SN_C_API Remote_Camera3_StartAudio(long p_hHandle); long SN_C_API Remote_Camera3_StopAudio(long p_hHandle); long SN_C_API Remote_Camera3_SetCurrentStreamId(long p_hHandle, const unsigned long p_nStreamId); long SN_C_API Remote_Camera3_GetCurrentStreamId(long p_hHandle, unsigned long* p_nStreamId); long SN_C_API Remote_Camera3_MakeKeyFrame(long p_hHandle); long SN_C_API Remote_Camera3_Pause(long p_hHandle); long SN_C_API Remote_Camera3_Resume(long p_hHandle); long SN_C_API Remote_Camera3_KeepAlive(long p_hHandle); //RemoteMicrophone C Interface( 接口废弃,使用Remote_Microphone2_***接口 ) long SN_C_API Remote_Microphone_Open(long p_hHandle, const long p_nCameraID); long SN_C_API Remote_Microphone_Close(long p_hHandle); long SN_C_API Remote_Microphone_Read(long p_hHandle, ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_Microphone_ReadTS(long p_hHandle, ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_Microphone_GetAudioInfo(long p_hHandle, ST_AudioInfo* p_stAudioInfo); //RemoteMicrophone2 C Interface long SN_C_API Remote_Microphone2_SetEncodeType(long p_hHandle, const int p_nEncodeType); long SN_C_API Remote_Microphone2_Open(long p_hHandle, const long p_nCameraID); long SN_C_API Remote_Microphone2_Close(long p_hHandle); long SN_C_API Remote_Microphone2_Read(long p_hHandle, ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_Microphone2_ReadTS(long p_hHandle, ST_AVFrameData* p_pstAVFrameData); //RemoteAudioPlayer C Interface(在设备端播放音频)(接口废弃,使用Remote_AudioPlayer2_***接口) long SN_C_API Remote_AudioPlayer_Open(long p_hHandle); long SN_C_API Remote_AudioPlayer_Close(long p_hHandle); long SN_C_API Remote_AudioPlayer_Write(long p_hHandle, const ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_AudioPlayer_WriteTS(long p_hHandle, const ST_AVFrameData* p_pstAVFrameData); //RemoteAudioPlayer C Interface(在设备端播放音频) long SN_C_API Remote_AudioPlayer2_SetEncodeType(long p_hHandle, const int p_nEncodeType); long SN_C_API Remote_AudioPlayer2_Open(long p_hHandle); long SN_C_API Remote_AudioPlayer2_Close(long p_hHandle); long SN_C_API Remote_AudioPlayer2_Write(long p_hHandle, const ST_AVFrameData* p_pstAVFrameData); //RemoteRS485 C Interface long SN_C_API Remote_RS485_SetTimeout(long p_hHandle, const int p_nTimeout); long SN_C_API Remote_RS485_Open(long p_hHandle); long SN_C_API Remote_RS485_Close(long p_hHandle); long SN_C_API Remote_RS485_SetComId(long p_hHandle, const int p_nComId); long SN_C_API Remote_RS485_SetOpenMode(long p_hHandle, const char p_btComOpenMode); long SN_C_API Remote_RS485_Write(long p_hHandle, const char* p_pszWriteDate, const int p_nDateLen); long SN_C_API Remote_RS485Ex_Open(long p_hHandle); long SN_C_API Remote_RS485Ex_Close(long p_hHandle); long SN_C_API Remote_RS485Ex_SetRS485Device(long p_hHandle, const ST_RS485Param* p_pstRS485Device); long SN_C_API Remote_RS485Ex_Read(long p_hHandle, char* p_pszReadBuf, const int p_nBufLen); long SN_C_API Remote_RS485Ex_Write(long p_hHandle, const char* p_pszWriteDate, const int p_nDateLen); //RemoteSensor C Interface long SN_C_API Remote_Sensor_SetTimeout(long p_hHandle, const int p_nTimeout); long SN_C_API Remote_Sensor_Open(long p_hHandle); long SN_C_API Remote_Sensor_Close(long p_hHandle); long SN_C_API Remote_Sensor_GetSensorType(long p_hHandle, int &p_nSensorType); long SN_C_API Remote_Sensor_SetParameters(long p_hHandle, const char* p_pszParameters, const int p_nLength); long SN_C_API Remote_Sensor_GetAllParameters(long p_hHandle, char *p_pszParameterBuffer,int p_nParameterBufferLen, int* p_nOutDataLen); long SN_C_API Remote_Sensor_ResetParameters(long p_hHandle); long SN_C_API Remote_Sensor_Save(long p_hHandle); long SN_C_API Remote_Sensor_SetSecretArea(long p_hHandle, const char* p_pszSecretArea, const int p_nLength); long SN_C_API Remote_Sensor2_SetTimeout(long p_hHandle, const int p_nTimeout); long SN_C_API Remote_Sensor2_Open(long p_hHandle); long SN_C_API Remote_Sensor2_Close(long p_hHandle); long SN_C_API Remote_Sensor2_SetBrightness(long p_hHandle, const int p_nValue); long SN_C_API Remote_Sensor2_GetBrightness(long p_hHandle, int* p_pnValue); long SN_C_API Remote_Sensor2_SetSharpness(long p_hHandle, const int p_nValue); long SN_C_API Remote_Sensor2_GetSharpness(long p_hHandle, int* p_pnValue); long SN_C_API Remote_Sensor2_SetHue(long p_hHandle, const int p_nValue); long SN_C_API Remote_Sensor2_GetHue(long p_hHandle, int* p_pnValue); long SN_C_API Remote_Sensor2_SetContrast(long p_hHandle, const int p_nValue); long SN_C_API Remote_Sensor2_GetContrast(long p_hHandle, int* p_pnValue); long SN_C_API Remote_Sensor2_SetSaturation(long p_hHandle, const int p_nValue); long SN_C_API Remote_Sensor2_GetSaturation(long p_hHandle, int* p_pnValue); long SN_C_API Remote_Sensor2_ResetParameters(long p_hHandle); long SN_C_API Remote_Sensor2_Save(long p_hHandle); //RemoteSensorUI C Interface #if (defined(WIN32)&&!defined(_WIN32_WCE)) long SN_C_API Remote_SensorUI_show(long p_hHandle,int p_nLanguage); #endif //RemotePTZ C Interface( 接口废弃 ,使用Remote_PTZEx_***接口) long SN_C_API Remote_PTZ_SetDeviceId(long p_hHandle, const long p_nPTZId); long SN_C_API Remote_PTZ_SetProtocol(long p_hHandle, const long p_nPTZProtocol); long SN_C_API Remote_PTZ_SetCOMId(long p_hHandle, const long p_nCOMId); long SN_C_API Remote_PTZ_Open(long p_hHandle, const long p_nCameraID); long SN_C_API Remote_PTZ_Close(long p_hHandle); long SN_C_API Remote_PTZ_Stop(long p_hHandle); long SN_C_API Remote_PTZ_RotateUp(long p_hHandle, const long p_nSpeedValue); long SN_C_API Remote_PTZ_RotateDown(long p_hHandle, const long p_nSpeedValue); long SN_C_API Remote_PTZ_RotateLeft(long p_hHandle, const long p_nSpeedValue); long SN_C_API Remote_PTZ_RotateRight(long p_hHandle, const long p_nSpeedValue); long SN_C_API Remote_PTZ_RotateLeftUp(long p_hHandle, const long p_nSpeedValue); long SN_C_API Remote_PTZ_RotateLeftUpEx(long p_hHandle, const long p_nPanSpeedValue, const long p_nTiltSpeedValue); long SN_C_API Remote_PTZ_RotateLeftDown(long p_hHandle, const long p_nSpeedValue); long SN_C_API Remote_PTZ_RotateLeftDownEx(long p_hHandle, const long p_nPanSpeedValue, const long p_nTiltSpeedValue); long SN_C_API Remote_PTZ_RotateRightUp(long p_hHandle, const long p_nSpeedValue); long SN_C_API Remote_PTZ_RotateRightUpEx(long p_hHandle, const long p_nPanSpeedValue, const long p_nTiltSpeedValue); long SN_C_API Remote_PTZ_RotateRightDown(long p_hHandle, const long p_nSpeedValue); long SN_C_API Remote_PTZ_RotateRightDownEx(long p_hHandle, const long p_nPanSpeedValue, const long p_nTiltSpeedValue); long SN_C_API Remote_PTZ_ZoomIn(long p_hHandle); long SN_C_API Remote_PTZ_ZoomOut(long p_hHandle); long SN_C_API Remote_PTZ_FocusFar(long p_hHandle); long SN_C_API Remote_PTZ_FocusNear(long p_hHandle); long SN_C_API Remote_PTZ_IrisIncrease(long p_hHandle); long SN_C_API Remote_PTZ_IrisDecrease(long p_hHandle); long SN_C_API Remote_PTZ_PresetSet(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZ_PresetInvoke(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZ_PresetRemove(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZ_Scan(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZ_ScanRemove(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZ_ScanSetStartPoint(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZ_ScanSetStopPoint(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZ_RunAutoFocus(long p_hHandle); long SN_C_API Remote_PTZ_RunAutoIris(long p_hHandle); long SN_C_API Remote_PTZ_SetAutoStudyStartPoint(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZ_SetAutoStudyEndPoint(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZ_RunAutoStudy(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZ_AutoStudyRemove(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZ_Reset(long p_hHandle); long SN_C_API Remote_PTZ_SendOperation(long p_hHandle, const byte* p_bytePTZCommand, const long p_nCommandLen); //RemotePTZEx C Interface long SN_C_API Remote_PTZEx_Open(long p_hHandle, const long p_nCameraID); long SN_C_API Remote_PTZEx_Close(long p_hHandle); long SN_C_API Remote_PTZEx_Stop(long p_hHandle); long SN_C_API Remote_PTZEx_RotateUp(long p_hHandle, const long p_nSpeedValue); long SN_C_API Remote_PTZEx_RotateDown(long p_hHandle, const long p_nSpeedValue); long SN_C_API Remote_PTZEx_RotateLeft(long p_hHandle, const long p_nSpeedValue); long SN_C_API Remote_PTZEx_RotateRight(long p_hHandle, const long p_nSpeedValue); long SN_C_API Remote_PTZEx_RotateLeftUp(long p_hHandle, const long p_nSpeedValue); long SN_C_API Remote_PTZEx_RotateLeftUpEx(long p_hHandle, const long p_nPanSpeedValue, const long p_nTiltSpeedValue); long SN_C_API Remote_PTZEx_RotateLeftDown(long p_hHandle, const long p_nSpeedValue); long SN_C_API Remote_PTZEx_RotateLeftDownEx(long p_hHandle, const long p_nPanSpeedValue, const long p_nTiltSpeedValue); long SN_C_API Remote_PTZEx_RotateRightUp(long p_hHandle, const long p_nSpeedValue); long SN_C_API Remote_PTZEx_RotateRightUpEx(long p_hHandle, const long p_nPanSpeedValue, const long p_nTiltSpeedValue); long SN_C_API Remote_PTZEx_RotateRightDown(long p_hHandle, const long p_nSpeedValue); long SN_C_API Remote_PTZEx_RotateRightDownEx(long p_hHandle, const long p_nPanSpeedValue, const long p_nTiltSpeedValue); long SN_C_API Remote_PTZEx_ZoomIn(long p_hHandle); long SN_C_API Remote_PTZEx_ZoomOut(long p_hHandle); long SN_C_API Remote_PTZEx_FocusFar(long p_hHandle); long SN_C_API Remote_PTZEx_FocusNear(long p_hHandle); long SN_C_API Remote_PTZEx_IrisIncrease(long p_hHandle); long SN_C_API Remote_PTZEx_IrisDecrease(long p_hHandle); long SN_C_API Remote_PTZEx_PresetSet(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZEx_PresetInvoke(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZEx_PresetRemove(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZEx_Scan(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZEx_ScanRemove(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZEx_ScanSetStartPoint(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZEx_ScanSetStopPoint(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZEx_RunAutoFocus(long p_hHandle); long SN_C_API Remote_PTZEx_RunAutoIris(long p_hHandle);//(此接口废弃) long SN_C_API Remote_PTZEx_setAutoStudyStartPoint(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZEx_setAutoStudyEndPoint(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZEx_RunAutoStudy(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZEx_AutoStudyRemove(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZEx_threeDimensionalPositioning(long p_hHandle, const long p_nX, const long p_nY, const long p_nZoomRate); long SN_C_API Remote_PTZEx_SetTourStartPoint(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZEx_AddTourPoint(long p_hHandle, const long p_nPresetValue, const long p_nSpeedValue, const long p_nTimeValue); long SN_C_API Remote_PTZEx_SetTourEndPoint(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZEx_RunTour(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZEx_StopTour(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZEx_DeleteTour(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZEx_SetKeeper(long p_hHandle, const long p_nTypeValue, const long p_nIdValue, const long p_nTimeValue); long SN_C_API Remote_PTZEx_RunKeeper(long p_hHandle, const long p_nValue); long SN_C_API Remote_PTZEx_Reset(long p_hHandle); long SN_C_API Remote_PTZEx_RunBrush(long p_hHandle); long SN_C_API Remote_PTZEx_OpenLight(long p_hHandle); long SN_C_API Remote_PTZEx_CloseLight(long p_hHandle); long SN_C_API Remote_PTZEx_SetInfrared(long p_hHandle, const int p_nMode, const int p_nNear, const int p_nMiddle, const int p_nFar); long SN_C_API Remote_PTZEx_SetInfraredV2(long p_hHandle, const int p_nOpenMode, const int p_nBrightnessMode, const int p_nNear, const int p_nMiddle, const int p_nFar); long SN_C_API Remote_PTZEx_SetNorthPostion(long p_hHandle); long SN_C_API Remote_PTZEx_SetPostion(long p_hHandle, const int p_nType, const float p_nPan, const float p_nTilt, const float p_nZoom); long SN_C_API Remote_PTZEx_GetPostion(long p_hHandle, float* p_nPan, float* p_nTilt, float* p_nZoom, int* p_nDirection); long SN_C_API Remote_PTZEx_SendOperation(long p_hHandle, const char* p_bytePTZCommand, const long p_nCommandLen); //RemotePTZConfigure long SN_C_API Remote_PTZConfigure_Open(long p_hHandle,const int p_nCameraID); long SN_C_API Remote_PTZConfigure_Close(long p_hHandle); long SN_C_API Remote_PTZConfigure_SetPTZPresetName(long p_hHandle,const int p_nPresetID, const char* p_pszPresetName); long SN_C_API Remote_PTZConfigure_GetPTZPreset(long p_hHandle, const int p_nPresetID, ST_PTZPreset* p_pstPTZPreset); long SN_C_API Remote_PTZConfigure_GetAllPTZPreset(long p_hHandle,ST_PTZPresetList* p_pszPTZPresetList); long SN_C_API Remote_PTZConfigure_DeletePTZPreset(long p_hHandle,const int p_nPresetID); long SN_C_API Remote_PTZConfigure_DeleteAllPTZPreset(long p_hHandle); long SN_C_API Remote_PTZConfigure_SetPTZKeeper(long p_hHandle,const int p_nKeeperType, const int p_nPTZKeeperID, const int p_nKeepTime); long SN_C_API Remote_PTZConfigure_GetPTZKeeper(long p_hHandle,int* p_nKeeperType, int* p_nPTZKeeperID, int* p_nKeeperTime); long SN_C_API Remote_PTZConfigure_DeletePTZKeeper(long p_hHandle); long SN_C_API Remote_PTZConfigure_SetPTZKeeperState(long p_hHandle,const int p_nKeeperState); long SN_C_API Remote_PTZConfigure_GetPTZKeeperState(long p_hHandle, int* p_nKeeperState); long SN_C_API Remote_PTZConfigure_DeleteKeeperState(long p_hHandle); long SN_C_API Remote_PTZConfigure_SetPTZTour(long p_hHandle,const int p_nTourID, const char* p_pszTourName, const ST_PTZTourPointList* p_pstPTZTourPointList); long SN_C_API Remote_PTZConfigure_GetPTZTour(long p_hHandle,int p_nTourID, ST_PTZTourEx* p_stPTZTourEx); long SN_C_API Remote_PTZConfigure_GetPTZAllTour(long p_hHandle,ST_PTZTourExList* p_pstPTZTourList); long SN_C_API Remote_PTZConfigure_DeletePTZTour(long p_hHandle,const int p_nTourID); long SN_C_API Remote_PTZConfigure_SetPTZScan(long p_hHandle,const int p_nScanID, const char* p_pszScanName); long SN_C_API Remote_PTZConfigure_GetPTZScan(long p_hHandle,const int p_nScanID, ST_PTZScan* p_pstPTZScan); long SN_C_API Remote_PTZConfigure_GetAllPTZScan(long p_hHandle,ST_PTZScanList* p_pstPTZScanList); long SN_C_API Remote_PTZConfigure_DeletePTZScan(long p_hHandle,const int p_nScanID); long SN_C_API Remote_PTZConfigure_SetPTZTrack(long p_hHandle,const int p_nTrackID, const char* p_pszTrackName); long SN_C_API Remote_PTZConfigure_GetPTZTrack(long p_hHandle,const int p_nTrackID, ST_PTZTrack* p_pstPTZTrack); long SN_C_API Remote_PTZConfigure_GetAllPTZTrack(long p_hHandle,ST_PTZTrackList* p_pstPTZTrackList); long SN_C_API Remote_PTZConfigure_DeletePTZTrack(long p_hHandle,const int p_nTrackID); //清空配置文件 long SN_C_API Remote_PTZConfigure_DeleteAllParam(long p_hHandle); //RemoteVideoFile C Interface (文件下载) long SN_C_API Remote_VideoFile_OpenEx(long p_hHandle, const ST_RecordInfo* p_stRecordInfo); long SN_C_API Remote_VideoFile_OpenV2(long p_hHandle, const ST_RecordInfoV2* p_stRecordInfo); long SN_C_API Remote_VideoFile_Close(long p_hHandle); long SN_C_API Remote_VideoFile_Read(long p_hHandle, char* p_pszBuf, const unsigned int p_nBufSize); long SN_C_API Remote_VideoFile_Seek(long p_hHandle, const INT64 p_nOffset, const unsigned char p_nSeekMode); long SN_C_API Remote_VideoFile_GetFileLength(long p_hHandle, INT64 * p_nLength); #ifdef RECORD_INTERFACE long SN_C_API Remote_VideoFileV2_Open(long p_hHandle, const ST_RecordInfoV2* p_stRecordInfo, bool p_bIsNeedLocateIFrame = true); long SN_C_API Remote_VideoFileV2_Close(long p_hHandle); bool SN_C_API Remote_VideoFileV2_RecallRead(long p_hHandle); long SN_C_API Remote_VideoFileV2_ReadNextFrame(long p_hHandle, ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_VideoFileV2_ReadNextVideoFrame(long p_hHandle, ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_VideoFileV2_ReadNextIFrame(long p_hHandle, ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_VideoFileV2_ReadPreviousVideoIFrame(long p_hHandle, ST_AVFrameData* p_pstAVFrameData, bool p_bCurPosFlag = false); long SN_C_API Remote_VideoFileV2_PrevFrame(long p_hHandle, ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_VideoFileV2_LocatePreIFrame(long p_hHandle, const ST_TimeStruct* p_pstTime, ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_VideoFileV2_LocateFrame(long p_hHandle, const ST_TimeStruct* p_pstTime, ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_VideoFileV2_ReadNextFrameTS(long p_hHandle, ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_VideoFileV2_ReadNextVideoFrameTS(long p_hHandle, ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_VideoFileV2_ReadPreviousVideoIFrameTS(long p_hHandle, ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_VideoFileV2_LocateFrameTS(long p_hHandle, const ST_TimeStruct* p_pstTime, ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_VideoFileV2_ReadNextFramePS(long p_hHandle, ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_VideoFileV2_ReadNextVideoFramePS(long p_hHandle, ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_VideoFileV2_ReadPreviousVideoIFramePS(long p_hHandle, ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_VideoFileV2_LocateFramePS(long p_hHandle, const ST_TimeStruct* p_pstTime, ST_AVFrameData* p_pstAVFrameData); #endif #if (defined(WIN32)&&!defined(_WIN32_WCE)) //RemoteLivePlayer C Interface (实时预览)( 接口已废弃,使用Remote_LivePlayer2_***接口 ) long SN_C_API Remote_LivePlayer_SetUseTimeStamp(long p_hHandle, const bool bUseFlag); long SN_C_API Remote_LivePlayer_SetPlayBufferSize(long p_hHandle, const unsigned long p_nSecSize);//p_nSecSize, 以毫秒(s)为单位 必须在0秒-最大5000毫秒缓冲。注:播放缓冲越大,播放越平滑,但延时将增大,当为0时,无论是否用时间戳,视频将立即被播放 long SN_C_API Remote_LivePlayer_SetStretchMode(long p_hHandle, const bool p_bStretchMode); long SN_C_API Remote_LivePlayer_SetNotifyWindow(long p_hHandle, const unsigned long p_nNotifyWnd, const unsigned long p_nMessage, const void * p_pParam); long SN_C_API Remote_LivePlayer_SetTryConnectCount(long p_hHandle, const unsigned long p_nTryCount ); long SN_C_API Remote_LivePlayer_SetAutoConnectFlag(long p_hHandle, const bool p_bAutoFlag ); long SN_C_API Remote_LivePlayer_SetDefaultImageFormatId(long p_hHandle, const unsigned long p_nImageFormatId); long SN_C_API Remote_LivePlayer_SetDefaultFrameRate(long p_hHandle, const unsigned long p_nFrameRate); long SN_C_API Remote_LivePlayer_SetDefaultBitRate(long p_hHandle, const unsigned long p_nBitRateType, const unsigned long p_nBitRate); long SN_C_API Remote_LivePlayer_SetDefaultQuality(long p_hHandle, const unsigned long p_nQuality); long SN_C_API Remote_LivePlayer_SetAutoResizeFlag(long p_hHandle, const bool p_bAutoResizeFlag = true); long SN_C_API Remote_LivePlayer_SetVideoWindow(long p_hHandle, const unsigned long p_hDisplayWnd, const long x, const long y, const long width, const long height); long SN_C_API Remote_LivePlayer_SetVideoWindowEx(long p_hHandle, const unsigned long p_hDisplayWnd); long SN_C_API Remote_LivePlayer_SetDrawCallBack(long p_hHandle, long hHandle,long (CALLBACK *DrawCallBack)(long hHandle, HDC hDc, void *pUserData), void* pUserData); long SN_C_API Remote_LivePlayer_Open(long p_hHandle, const long p_nCameraID); long SN_C_API Remote_LivePlayer_Close(long p_hHandle); long SN_C_API Remote_LivePlayer_Play(long p_hHandle); long SN_C_API Remote_LivePlayer_Pause(long p_hHandle); long SN_C_API Remote_LivePlayer_GetPlayStatus(long p_hHandle, long* p_nPlayStatus); long SN_C_API Remote_LivePlayer_PlaySound(long p_hHandle); long SN_C_API Remote_LivePlayer_StopSound(long p_hHandle); long SN_C_API Remote_LivePlayer_IsOnSound(long p_hHandle, bool* p_bOnSound); long SN_C_API Remote_LivePlayer_ResizeWindow(long p_hHandle, const long x, const long y, const long width, const long height); long SN_C_API Remote_LivePlayer_Refresh(long p_hHandle); long SN_C_API Remote_LivePlayer_GetDeviceInfo(long p_hHandle, ST_DeviceInfo* p_stDeviceInfo); long SN_C_API Remote_LivePlayer_GetDeviceInfoEx(long p_hHandle, ST_DeviceInfoEx* p_stDeviceInfoEx); long SN_C_API Remote_LivePlayer_SetRecorderFile(long p_hHandle, const char* p_pszFileName); long SN_C_API Remote_LivePlayer_StartRecord(long p_hHandle); long SN_C_API Remote_LivePlayer_StopRecord(long p_hHandle); long SN_C_API Remote_LivePlayer_GetRecorderStatus(long p_hHandle, long* p_nStatus); long SN_C_API Remote_LivePlayer_SnapShot(long p_hHandle, const char* p_pszFileName); long SN_C_API Remote_LivePlayer_GetVideoSystem(long p_hHandle, long* p_nVideoSystem); long SN_C_API Remote_LivePlayer_SetCurrentFrameRate(long p_hHandle, const unsigned long p_nFrameRate); long SN_C_API Remote_LivePlayer_GetCurrentFrameRate(long p_hHandle, unsigned long* p_nFrameRate); long SN_C_API Remote_LivePlayer_SetCurrentImageFormatId(long p_hHandle, const unsigned long p_nCurrentImageFormatId); long SN_C_API Remote_LivePlayer_GetCurrentImageFormatId(long p_hHandle, unsigned long* p_nCurrentImageFormatId); long SN_C_API Remote_LivePlayer_SetCurrentConfirmBitRate(long p_hHandle, const unsigned long p_nBitRateType, const unsigned long p_nConfirmBitRate); long SN_C_API Remote_LivePlayer_GetCurrentConfirmBitRate(long p_hHandle, unsigned long* p_nBitRateType, unsigned long* p_nConfirmBitRate); long SN_C_API Remote_LivePlayer_SetCurrentQuant(long p_hHandle, const unsigned long p_nQuant); long SN_C_API Remote_LivePlayer_GetCurrentQuant(long p_hHandle, unsigned long* p_nQuant); long SN_C_API Remote_LivePlayer_SetCurrentQuality(long p_hHandle, const unsigned long p_nQuality); long SN_C_API Remote_LivePlayer_GetCurrentQuality(long p_hHandle, unsigned long* p_nQuality); long SN_C_API Remote_LivePlayer_SetCurrentBrightness(long p_hHandle, const unsigned long p_nValue); long SN_C_API Remote_LivePlayer_GetCurrentBrightness(long p_hHandle, unsigned long* p_nValue); long SN_C_API Remote_LivePlayer_SetCurrentContrast(long p_hHandle, const unsigned long p_nValue); long SN_C_API Remote_LivePlayer_GetCurrentContrast(long p_hHandle, unsigned long* p_nValue); long SN_C_API Remote_LivePlayer_SetCurrentHue(long p_hHandle, const unsigned long p_nValue); long SN_C_API Remote_LivePlayer_GetCurrentHue(long p_hHandle, unsigned long* p_nValue); long SN_C_API Remote_LivePlayer_SetCurrentSaturation(long p_hHandle, const unsigned long p_nValue); long SN_C_API Remote_LivePlayer_GetCurrentSaturation(long p_hHandle, unsigned long* p_nValue); long SN_C_API Remote_LivePlayer_ResetPictureAdjustFilter(long p_hHandle); long SN_C_API Remote_LivePlayer_GetCurrentBitRate(long p_hHandle, unsigned long* p_nBitRate); long SN_C_API Remote_LivePlayer_GetPictureSize(long p_hHandle, long* p_nWidth, long* p_nHeight); long SN_C_API Remote_LivePlayer_SetVolume(long p_hHandle, const long p_nVolume); long SN_C_API Remote_LivePlayer_GetVolume(long p_hHandle, long* p_nVolume); long SN_C_API Remote_LivePlayer_ZoomInVideoEx(long p_hHandle, const unsigned int x, const unsigned int y, const unsigned int width, const unsigned int height); long SN_C_API Remote_LivePlayer_ZoomInVideo(long p_hHandle); long SN_C_API Remote_LivePlayer_ZoomOutVideo(long p_hHandle); long SN_C_API Remote_LivePlayer_RestoreVideo(long p_hHandle); //RemoteLivePlayer2 C Interface (实时预览) long SN_C_API Remote_LivePlayer2_SetUseTimeStamp(long p_hHandle, const bool p_bUseFlag); long SN_C_API Remote_LivePlayer2_SetPlayBufferSize(long p_hHandle, const unsigned long p_nSecSize);//p_nSecSize, 以毫秒(s)为单位 必须在0秒-最大5000毫秒缓冲。注:播放缓冲越大,播放越平滑,但延时将增大,当为0时,无论是否用时间戳,视频将立即被播放 long SN_C_API Remote_LivePlayer2_SetStretchMode(long p_hHandle, const bool p_bStretchMode); long SN_C_API Remote_LivePlayer2_SetNotifyWindow(long p_hHandle, const unsigned long p_nNotifyWnd, const unsigned long p_nMessage, const void * p_pParam); long SN_C_API Remote_LivePlayer2_SetTryConnectCount(long p_hHandle, const unsigned long p_nTryCount ); long SN_C_API Remote_LivePlayer2_SetAutoConnectFlag(long p_hHandle, const bool p_bAutoFlag ); long SN_C_API Remote_LivePlayer2_SetDefaultStreamId(long p_hHandle, const unsigned long p_nStreamId); long SN_C_API Remote_LivePlayer2_SetAutoResizeFlag(long p_hHandle, const bool p_bAutoResizeFlag = true); long SN_C_API Remote_LivePlayer2_SetVideoWindow(long p_hHandle, const unsigned long p_hDisplayWnd, const long x, const long y, const long width, const long height); long SN_C_API Remote_LivePlayer2_SetVideoWindowEx(long p_hHandle, const unsigned long p_hDisplayWnd); long SN_C_API Remote_LivePlayer2_SetDrawCallBack(long p_hHandle, long hHandle,long (CALLBACK *DrawCallBack)(long hHandle, HDC hDc, void *pUserData), void* pUserData); long SN_C_API Remote_LivePlayer2_Open(long p_hHandle, const long p_nCameraID); long SN_C_API Remote_LivePlayer2_Close(long p_hHandle); long SN_C_API Remote_LivePlayer2_Play(long p_hHandle); long SN_C_API Remote_LivePlayer2_Pause(long p_hHandle); long SN_C_API Remote_LivePlayer2_GetPlayStatus(long p_hHandle, long* p_nPlayStatus); long SN_C_API Remote_LivePlayer2_PlaySound(long p_hHandle); long SN_C_API Remote_LivePlayer2_StopSound(long p_hHandle); long SN_C_API Remote_LivePlayer2_IsOnSound(long p_hHandle, bool* p_bOnSound); long SN_C_API Remote_LivePlayer2_ResizeWindow(long p_hHandle, const long x, const long y, const long width, const long height); long SN_C_API Remote_LivePlayer2_Refresh(long p_hHandle); long SN_C_API Remote_LivePlayer2_GetDeviceInfoEx(long p_hHandle, ST_DeviceInfoEx* p_stDeviceInfoEx); long SN_C_API Remote_LivePlayer2_SetRecorderFile(long p_hHandle, const char* p_pszFileName); long SN_C_API Remote_LivePlayer2_SetRecordFileFormat(long p_hHandle, const int p_nFileFormat); long SN_C_API Remote_LivePlayer2_SetRecordFileHead(long p_hHandle, const char* p_pszRecordFileHead, const int p_nRecordFileLength); long SN_C_API Remote_LivePlayer2_StartRecord(long p_hHandle); long SN_C_API Remote_LivePlayer2_StopRecord(long p_hHandle); long SN_C_API Remote_LivePlayer2_GetRecorderStatus(long p_hHandle, long* p_nStatus); long SN_C_API Remote_LivePlayer2_SnapShot(long p_hHandle, const char* p_pszFileName); long SN_C_API Remote_LivePlayer2_SetCurrentStreamId(long p_hHandle, const unsigned long p_nCurrentStreamId); long SN_C_API Remote_LivePlayer2_GetCurrentStreamId(long p_hHandle, unsigned long* p_nCurrentStreamId); long SN_C_API Remote_LivePlayer2_SetCurrentBrightness(long p_hHandle, const unsigned long p_nValue); long SN_C_API Remote_LivePlayer2_GetCurrentBrightness(long p_hHandle, unsigned long* p_nValue); long SN_C_API Remote_LivePlayer2_SetCurrentContrast(long p_hHandle, const unsigned long p_nValue); long SN_C_API Remote_LivePlayer2_GetCurrentContrast(long p_hHandle, unsigned long* p_nValue); long SN_C_API Remote_LivePlayer2_SetCurrentHue(long p_hHandle, const unsigned long p_nValue); long SN_C_API Remote_LivePlayer2_GetCurrentHue(long p_hHandle, unsigned long* p_nValue); long SN_C_API Remote_LivePlayer2_SetCurrentSaturation(long p_hHandle, const unsigned long p_nValue); long SN_C_API Remote_LivePlayer2_GetCurrentSaturation(long p_hHandle, unsigned long* p_nValue); long SN_C_API Remote_LivePlayer2_ResetPictureAdjustFilter(long p_hHandle); long SN_C_API Remote_LivePlayer2_GetCurrentFrameRate(long p_hHandle, unsigned long* p_nFrameRate); long SN_C_API Remote_LivePlayer2_GetCurrentBitRate(long p_hHandle, unsigned long* p_nBitRate); long SN_C_API Remote_LivePlayer2_GetPictureSize(long p_hHandle, long* p_nWidth, long* p_nHeight); long SN_C_API Remote_LivePlayer2_SetVolume(long p_hHandle, const long p_nVolume); long SN_C_API Remote_LivePlayer2_GetVolume(long p_hHandle, long* p_nVolume); long SN_C_API Remote_LivePlayer2_ZoomInVideoEx(long p_hHandle, const unsigned int x, const unsigned int y, const unsigned int width, const unsigned int height); long SN_C_API Remote_LivePlayer2_ZoomInVideo(long p_hHandle); long SN_C_API Remote_LivePlayer2_ZoomOutVideo(long p_hHandle); long SN_C_API Remote_LivePlayer2_RestoreVideo(long p_hHandle); //RemoteInterphone C Interface (语音对讲)(接口废弃,使用Remote_Interphone2_***接口) long SN_C_API Remote_Interphone_Start(long p_hHandle); long SN_C_API Remote_Interphone_Stop(long p_hHandle); //RemoteInterphone2 C Interface (语音对讲) long SN_C_API Remote_Interphone2_SetEncodeType(long p_hHandle, const int p_nEncodeType); long SN_C_API Remote_Interphone2_Start(long p_hHandle); long SN_C_API Remote_Interphone2_Stop(long p_hHandle); ////RemotePlayBack C Interface (远端文件回放) long SN_C_API Remote_PlayBack_SetStretchMode(long p_hHandle, const bool p_bStretchMode); long SN_C_API Remote_PlayBack_SetAutoResizeFlag(long p_hHandle, const bool p_bAutoFlag ); long SN_C_API Remote_PlayBack_SetNotifyWindow(long p_hHandle, const unsigned long p_nNotifyWnd, const unsigned long p_nMessage, const void * p_pParam); long SN_C_API Remote_PlayBack_SetTryConnectCount(long p_hHandle, const unsigned long p_nTryCount ); long SN_C_API Remote_PlayBack_SetAutoConnectFlag(long p_hHandle, const bool p_bAutoFlag ); long SN_C_API Remote_PlayBack_SetVideoWindow(long p_hHandle, const unsigned long p_hDisplayWnd, const long x, const long y, const long width, const long height); long SN_C_API Remote_PlayBack_SetRecordInfo(long p_hHandle, const ST_RecordInfo* p_stRecordInfo); //此接口废弃 long SN_C_API Remote_PlayBack_SetRecordInfoV2(long p_hHandle, const ST_RecordInfoV2* p_stRecordInfo); long SN_C_API Remote_PlayBack_Open(long p_hHandle); long SN_C_API Remote_PlayBack_Close(long p_hHandle); long SN_C_API Remote_PlayBack_Play(long p_hHandle); long SN_C_API Remote_PlayBack_Pause(long p_hHandle); long SN_C_API Remote_PlayBack_Stop(long p_hHandle); long SN_C_API Remote_PlayBack_ResizeWindow(long p_hHandle, const long x, const long y, const long width, const long height); long SN_C_API Remote_PlayBack_Refresh(long p_hHandle); long SN_C_API Remote_PlayBack_GetPlayStatus(long p_hHandle, long* p_nPlayStatus); long SN_C_API Remote_PlayBack_PlayNextFrame(long p_hHandle); long SN_C_API Remote_PlayBack_PlayPreviousFrame(long p_hHandle); long SN_C_API Remote_PlayBack_PlaySound(long p_hHandle); long SN_C_API Remote_PlayBack_StopSound(long p_hHandle); long SN_C_API Remote_PlayBack_IsOnSound(long p_hHandle, bool* p_bOnSound); long SN_C_API Remote_PlayBack_SetVolume(long p_hHandle, const long p_nVolume); long SN_C_API Remote_PlayBack_GetVolume(long p_hHandle, long* p_nVolume); long SN_C_API Remote_PlayBack_GetDuration(long p_hHandle, long* p_nDuration); long SN_C_API Remote_PlayBack_GetPlayPosByTime(long p_hHandle, long* p_nDuration); long SN_C_API Remote_PlayBack_SetPlayPosByTime(long p_hHandle, const long p_nDuration); long SN_C_API Remote_PlayBack_GetPlayPosByPercent(long p_hHandle, long* p_nPercent); long SN_C_API Remote_PlayBack_SetPlayPosByPercent(long p_hHandle, const long p_nPercent); long SN_C_API Remote_PlayBack_SetSpeed( long p_hHandle, float p_nSpeed ); long SN_C_API Remote_PlayBack_GetSpeed( long p_hHandle,float* p_nSpeed ); long SN_C_API Remote_PlayBack_GetFileTotalFrames(long p_hHandle, long* p_nTotalFrames); long SN_C_API Remote_PlayBack_GetPlayedFrames(long p_hHandle, long* p_nPlayedFrames); long SN_C_API Remote_PlayBack_SetCurrentFrameNum(long p_hHandle, const long p_nCurrentFrameNum); long SN_C_API Remote_PlayBack_SetBrightness(long p_hHandle, const unsigned long p_nValue); long SN_C_API Remote_PlayBack_GetBrightness(long p_hHandle, unsigned long* p_nValue); long SN_C_API Remote_PlayBack_SetContrast(long p_hHandle, const unsigned long p_nValue); long SN_C_API Remote_PlayBack_GetContrast(long p_hHandle, unsigned long* p_nValue); long SN_C_API Remote_PlayBack_SetHue(long p_hHandle, const unsigned long p_nValue); long SN_C_API Remote_PlayBack_GetHue(long p_hHandle, unsigned long* p_nValue); long SN_C_API Remote_PlayBack_SetSaturation(long p_hHandle, const unsigned long p_nValue); long SN_C_API Remote_PlayBack_GetSaturation(long p_hHandle, unsigned long* p_nValue); long SN_C_API Remote_PlayBack_ResetPictureAdjustFilter(long p_hHandle); long SN_C_API Remote_PlayBack_SnapShot(long p_hHandle, const char* p_pszFileName); long SN_C_API Remote_PlayBack_ZoomInVideoEx(long p_hHandle, const unsigned int x, const unsigned int y, const unsigned int width, const unsigned int height); long SN_C_API Remote_PlayBack_ZoomInVideo(long p_hHandle); long SN_C_API Remote_PlayBack_ZoomOutVideo(long p_hHandle); long SN_C_API Remote_PlayBack_RestoreVideo(long p_hHandle); long SN_C_API Remote_PlayBack_SetRecorderFile(long p_hHandle, const char* p_pszFileName); long SN_C_API Remote_PlayBack_SetRecordFileFormat(long p_hHandle, const int p_nFileFormat); long SN_C_API Remote_PlayBack_SetRecordFileHead(long p_hHandle, const char* p_pszRecordFileHead, const int p_nRecordFileLength); long SN_C_API Remote_PlayBack_StartRecord(long p_hHandle); long SN_C_API Remote_PlayBack_StopRecord(long p_hHandle); long SN_C_API Remote_PlayBack_GetRecorderStatus(long p_hHandle, long* p_nStatus); #endif //end win32 //RemoteSystem C Interface(参数设置接口) long SN_C_API Remote_System_SetTimeout(long p_hHandle, const int p_nTimeout); long SN_C_API Remote_System_Open(long p_hHandle); long SN_C_API Remote_System_Close(long p_hHandle); //重启 long SN_C_API Remote_System_Restart(long p_hHandle); //复位 long SN_C_API Remote_System_Reset(long p_hHandle); //关机 long SN_C_API Remote_System_ShutDown(long p_hHandle); //格式化磁盘 long SN_C_API Remote_System_FormatDisk(long p_hHandle); long SN_C_API Remote_System_FormatDiskEx(long p_hHandle, const char* p_szDiskName, long p_nFileSystemType); //设置设备ID long SN_C_API Remote_System_SetDeviceId(long p_hHandle, const char* p_pszDeviceId); //设置设备名 long SN_C_API Remote_System_SetDeviceName(long p_hHandle, const char* p_pszDeviceName); //获取概要信息 long SN_C_API Remote_System_GetSystemInfo(long p_hHandle, const ST_InetAddr p_stAddr, ST_DeviceSummaryParam* p_pstDeviceSummaryInfo, long p_nTransferProtocol); //获取设备能力 long SN_C_API Remote_System_GetDeviceAbility(long p_hHandle, ST_DeviceAbility* p_pstDeviceAbility); long SN_C_API Remote_System_GetDeviceExAbility(long p_hHandle, ST_DeviceExAbility* p_pstDeviceExAbility); long SN_C_API Remote_System_GetDeviceExAbilityV2(long p_hHandle, ST_DeviceExAbilityV2* p_pstDeviceExAbility); long SN_C_API Remote_System_GetMotionDetectionExAbility(long p_hHandle, const long p_nCameraID,ST_MotionDetectionExAbility* p_pstMotionDetectionExAbility); //获取工作状态 long SN_C_API Remote_System_GetDeviceWorkState(long p_hHandle, ST_DeviceWorkState* p_pstDeviceWorkState); //获取磁盘信息 long SN_C_API Remote_System_GetDeviceDiskInfo(long p_hHandle, ST_AllDiskStatistic* p_pstDiskStatisticList); //设置获取通道信息 long SN_C_API Remote_System_SetAllCameraDevice(long p_hHandle, const ST_AllCameraInfoParam* p_pstAllCameraInfoParam); long SN_C_API Remote_System_GetAllCameraDevice(long p_hHandle, ST_AllCameraInfoParam* p_pstAllCameraInfoParam); long SN_C_API Remote_System_SetCameraDevice(long p_hHandle, const long p_nCameraId, const ST_CameraInfoParam* p_pstCameraDevice); long SN_C_API Remote_System_GetCameraDevice(long p_hHandle, const long p_nCameraId, ST_CameraInfoParam* p_pstCameraDevice); //设置拾音器参数 long SN_C_API Remote_System_SetAllToneArmParam(long p_hHandle, const ST_AllToneArmParam* p_pstAllToneArmParam); long SN_C_API Remote_System_GetAllToneArmParam(long p_hHandle, ST_AllToneArmParam* p_pstAllToneArmParam); long SN_C_API Remote_System_SetToneArmParam(long p_hHandle, const long p_nCameraId, const ST_ToneArmParam* p_pstToneArmParam); long SN_C_API Remote_System_GetToneArmParam(long p_hHandle, const long p_nCameraId, ST_ToneArmParam* p_pstToneArmParam); //设置获取扬声器参数 long SN_C_API Remote_System_SetAllLoudhailerParam(long p_hHandle, const ST_AllLoudhailerParam* p_pstAllLoudhailerParam); long SN_C_API Remote_System_GetAllLoudhailerParam(long p_hHandle, ST_AllLoudhailerParam* p_pstAllLoudhailerParam); long SN_C_API Remote_System_SetLoudhailerParam(long p_hHandle, const long p_nCameraId, const ST_LoudhailerParam* p_stLoudhailerParam); long SN_C_API Remote_System_GetLoudhailerParam(long p_hHandle, const long p_nCameraId, ST_LoudhailerParam* p_pstLoudhailerParam); //获取指定通道制式 long SN_C_API Remote_System_GetCameraVideoSystem(long p_hHandle, const long p_nCameraId, long* p_nVideoSystem); //设置获取RS485信息 long SN_C_API Remote_System_SetAllRS485Device(long p_hHandle, const ST_AllRS485Param* p_pstAllRS485DeviceParam); long SN_C_API Remote_System_GetAllRS485Device(long p_hHandle, ST_AllRS485Param* p_pstAllRS485DeviceParam); long SN_C_API Remote_System_SetRS485Device(long p_hHandle, const long p_nRS485ComId, const ST_RS485Param* p_pstRS485Device); long SN_C_API Remote_System_GetRS485Device(long p_hHandle, const long p_nRS485ComId, ST_RS485Param* p_pstRS485Device); //设置获取报警输入信息 long SN_C_API Remote_System_SetAllAlarmInDevice(long p_hHandle, const ST_AllAlarmInParam* p_pstAllAlarmInParam); long SN_C_API Remote_System_GetAllAlarmInDevice(long p_hHandle, ST_AllAlarmInParam* p_pstAllAlarmInParam); long SN_C_API Remote_System_SetAlarmInDevice(long p_hHandle, const long p_nAlarmInId, const ST_AlarmInParam* p_pstAlarmInParam); long SN_C_API Remote_System_GetAlarmInDevice(long p_hHandle, const long p_nAlarmInId, ST_AlarmInParam* p_pstAlarmInParam); //设备获取报警输出信息 long SN_C_API Remote_System_SetAllAlarmOutDevice(long p_hHandle, const ST_AllAlarmOutParam* p_pstAllAlarmOutParam); long SN_C_API Remote_System_GetAllAlarmOutDevice(long p_hHandle, ST_AllAlarmOutParam* p_pstAllAlarmOutParam); long SN_C_API Remote_System_SetAlarmOutDevice(long p_hHandle, const long p_nAlarmOutId, const ST_AlarmOutParam* p_pstAlarmOutParam); long SN_C_API Remote_System_GetAlarmOutDevice(long p_hHandle, const long p_nAlarmOutId, ST_AlarmOutParam* p_pstAlarmOutParam); //设置获取设备时间 long SN_C_API Remote_System_SetDeviceLongTime(long p_hHandle, const unsigned long p_nDeviceTime); long SN_C_API Remote_System_SetDeviceTime(long p_hHandle, const unsigned short p_nYear, const unsigned short p_nMonth, const unsigned short p_nDay, const unsigned short p_nHour, const unsigned short p_nMinute, const unsigned short p_nSecond); long SN_C_API Remote_System_GetDeviceLongTime(long p_hHandle, unsigned long* p_nDeviceTime); long SN_C_API Remote_System_GetDeviceTime(long p_hHandle, unsigned short * p_nYear, unsigned short * p_nMonth, unsigned short * p_nDay, unsigned short * p_nHour, unsigned short * p_nMinute, unsigned short * p_nSecond); //设置获取时区 long SN_C_API Remote_System_SetTimeZoneParam(long p_hHandle, const ST_TimeZoneParam* p_pstTimeZoneParam); long SN_C_API Remote_System_GetTimeZoneParam(long p_hHandle, ST_TimeZoneParam* p_pstTimeZoneParam); long SN_C_API Remote_System_GetDefaultTimeZoneParam(long p_hHandle, const long p_nTimeZone, ST_TimeZoneParam* p_pstTimeZoneParam); //设置获取网络信息 long SN_C_API Remote_System_SetHostNetwork(long p_hHandle, const long p_nIPProtoVer, const ST_HostNetworkParam* p_pstHostNetworkParam); long SN_C_API Remote_System_GetHostNetwork(long p_hHandle, const long p_nIPProtoVer, ST_HostNetworkParam* p_pstHostNetworkParam); long SN_C_API Remote_System_GetAdslHostNetwork(long p_hHandle, const long p_nIPProtoVer, ST_HostNetworkParam* p_pstHostNetworkParam); //设置获取端口参数 long SN_C_API Remote_System_SetDevicePort(long p_hHandle, const ST_DevicePortParam* p_pstDevicePortParam); long SN_C_API Remote_System_GetDevicePort(long p_hHandle, ST_DevicePortParam* p_pstDeviceParam); //设置获取NTP参数 long SN_C_API Remote_System_SetNTPParam(long p_hHandle, const long p_nIPProtoVer, const ST_NTPParam* p_pstNTPParam); long SN_C_API Remote_System_GetNTPParam(long p_hHandle, const long p_nIPProtoVer, ST_NTPParam* p_pstNTPParam); long SN_C_API Remote_System_SetPPPoEParam(long p_hHandle, const ST_PPPoEParam* p_pstPPPoEParam); long SN_C_API Remote_System_GetPPPoEParam(long p_hHandle, ST_PPPoEParam* p_pstPPPoEParam); //设置获取DDNS参数 long SN_C_API Remote_System_SetDDNSParam(long p_hHandle, const ST_DDNSParam* p_pstDDNSParam); long SN_C_API Remote_System_GetDDNSParam(long p_hHandle, ST_DDNSParam* p_pstDDNSParam); //设置获取FTP参数 long SN_C_API Remote_System_SetFTPParam(long p_hHandle, const long p_nIPProtoVer, const ST_FTPParam* p_pstFTPParam); long SN_C_API Remote_System_GetFTPParam(long p_hHandle, const long p_nIPProtoVer, ST_FTPParam* p_pstFTPParam); //设置获取FTP参数 long SN_C_API Remote_System_SetSMTPParam(long p_hHandle, const ST_SMTPParam* p_pstSMTPParam); long SN_C_API Remote_System_GetSMTPParam(long p_hHandle, ST_SMTPParam* p_pstSMTPParam); //设置获取OSD参数 long SN_C_API Remote_System_SetAllVideoOSD_V2(long p_hHandle, const ST_AllVideoOSDInfoParam * p_pstAllVideoOSDInfoParam); long SN_C_API Remote_System_GetAllVideoOSD_V2(long p_hHandle, ST_AllVideoOSDInfoParam * p_pstAllVideoOSDInfoParam); long SN_C_API Remote_System_SetVideoOSD_V2(long p_hHandle, const long p_nCameraId, const ST_VideoOSDInfoParam* p_pstVideoOSDInfoParam); long SN_C_API Remote_System_GetVideoOSD_V2(long p_hHandle, const long p_nCameraId, ST_VideoOSDInfoParam* p_pstVideoOSDInfoParam); long SN_C_API Remote_System_SetAllVideoOSD_V3(long p_hHandle, const ST_AllVideoOSDInfoExParam * p_pstAllVideoOSDInfoParam); long SN_C_API Remote_System_GetAllVideoOSD_V3(long p_hHandle, ST_AllVideoOSDInfoExParam * p_pstAllVideoOSDInfoParam); long SN_C_API Remote_System_SetVideoOSD_V3(long p_hHandle, const long p_nCameraId, const ST_VideoOSDInfoExParam* p_pstVideoOSDInfoParam); long SN_C_API Remote_System_GetVideoOSD_V3(long p_hHandle, const long p_nCameraId, ST_VideoOSDInfoExParam* p_pstVideoOSDInfoParam); long SN_C_API Remote_System_SetAllVideoOSDFont(long p_hHandle, const ST_AllVideoOSDFontParam* p_pstAllVideoOSDFontParam); long SN_C_API Remote_System_GetAllVideoOSDFont(long p_hHandle, ST_AllVideoOSDFontParam* p_pstAllVideoOSDFontParam); long SN_C_API Remote_System_SetVideoOSDFont(long p_hHandle, const long p_nCameraId, const ST_VideoOSDFontParam* p_pstVideoOSDFontParam); long SN_C_API Remote_System_GetVideoOSDFont(long p_hHandle, const long p_nCameraId, ST_VideoOSDFontParam* p_pstVideoOSDFontParam); long SN_C_API Remote_System_GetOSDFontAbility(long p_hHandle, ST_OSDFontAbilityParam* p_pstOSDFontAbilityParam); long SN_C_API Remote_System_GetOSDFormatAbility(long p_hHandle,ST_OSDFormatAbility* p_pstOSDFormatAbility); //设置通信参数 long SN_C_API Remote_System_SetCommunicationParam(long p_hHandle, const ST_CommunicationParam* p_pstCommunicationParam); long SN_C_API Remote_System_GetCommunicationParam(long p_hHandle, ST_CommunicationParam* p_pstCommunicationParam); //设置获取广播参数 long SN_C_API Remote_System_SetBroadcastParam(long p_hHandle, const ST_BroadcastParam* p_pstBroadcastParam); long SN_C_API Remote_System_GetBroadcastParam(long p_hHandle, ST_BroadcastParam* p_pstBroadcastParam); //设置获取PTZ参数 long SN_C_API Remote_System_SetAllPTZParam(long p_hHandle, const ST_AllPTZParam* p_pstAllPTZParam); long SN_C_API Remote_System_GetAllPTZParam(long p_hHandle, ST_AllPTZParam* p_pstPTZParam); long SN_C_API Remote_System_SetPTZParam(long p_hHandle, const long p_nCameraId, const ST_PTZParam* p_pstPTZParam); long SN_C_API Remote_System_GetPTZParam(long p_hHandle, const long p_nCameraId, ST_PTZParam* p_pstPTZParam); long SN_C_API Remote_System_SetIPDomePTZId(long p_hHandle, const int p_nPTZId); long SN_C_API Remote_System_GetIPDomePTZId(long p_hHandle, int* p_nPTZId); long SN_C_API Remote_System_GetExternDeviceAbility(long p_hHandle,ST_ExternDeviceAbility* p_stExternDeviceAbility); long SN_C_API Remote_System_SetPTZKeyboardParam(long p_hHandle, const ST_PTZKeyboardParam* p_pobjPTZKeyboardParam); long SN_C_API Remote_System_GetPTZKeyboardParam(long p_hHandle, ST_PTZKeyboardParam* p_pobjPTZKeyboardParam); //设置获取点钞机参数 long SN_C_API Remote_System_SetCashRegistersParam(long p_hHandle, const ST_CashRegistersParam* p_pobjCashRegistersParam); long SN_C_API Remote_System_GetCashRegistersParam(long p_hHandle, ST_CashRegistersParam* p_pobjCashRegistersParam); //本地录像接口 long SN_C_API Remote_System_SetRecordFileHead(long p_hHandle, const char * p_pszHeadDate); long SN_C_API Remote_System_GetRecordFileHead(long p_hHandle, char * p_pszHeadDate); long SN_C_API Remote_System_SetRecordPolicy(long p_hHandle, const int p_nCameraId, const ST_RecordPolicyParam* p_pstRecordPolicyParam); long SN_C_API Remote_System_GetRecordPolicy(long p_hHandle, const int p_nCameraId, ST_RecordPolicyParam* p_pstRecordPolicyParam); long SN_C_API Remote_System_SetAllRecordPolicy(long p_hHandle, const ST_AllRecordPolicyParam* p_pstAllRecordPolicyParam); long SN_C_API Remote_System_GetAllRecordPolicy(long p_hHandle, ST_AllRecordPolicyParam* p_pstAllRecordPolicyParam); long SN_C_API Remote_System_SetRecordDirInfo(long p_hHandle, const ST_RecordDirInfoList* p_pstRecordDirInfoList); long SN_C_API Remote_System_GetRecordDirInfo(long p_hHandle, ST_RecordDirInfoList* p_pstRecordDirInfoList); //报警接口 //设置报警服务器参数 long SN_C_API Remote_System_SetAlarmServiceParam(long p_hHandle, const long p_nIPProtoVer, const ST_AlarmServiceParam* p_pstAlarmServiceParam); long SN_C_API Remote_System_GetAlarmServiceParam(long p_hHandle, const long p_nIPProtoVer, ST_AlarmServiceParam* p_pstAlarmServiceParam); //IO报警 long SN_C_API Remote_System_GetAlarmIOMode(long p_hHandle,ST_AlarmIOMode* p_stAlarmIOMode); long SN_C_API Remote_System_SetAllAlarmIOEvent(long p_hHandle, const ST_AllAlarmIOEventParam* p_pstAllAlarmIOEventParam); long SN_C_API Remote_System_GetAllAlarmIOEvent(long p_hHandle, ST_AllAlarmIOEventParam* p_pstAllAlarmIOEventParam); long SN_C_API Remote_System_SetAlarmIOEvent(long p_hHandle, const long p_nAlarmInId, const ST_AlarmIOEventParam* p_pstAlarmIOEventParam); long SN_C_API Remote_System_GetAlarmIOEvent(long p_hHandle, const long p_nAlarmInId, ST_AlarmIOEventParam* p_pstAlarmIOEventParam); //移动侦测报警 long SN_C_API Remote_System_SetAllMotionDetectionEvent(long p_hHandle, const ST_AllMotionDetectionEventParam* p_pstAllMotionDetectionEventParam); //该接口废弃 long SN_C_API Remote_System_GetAllMotionDetectionEvent(long p_hHandle, ST_AllMotionDetectionEventParam* p_pstAllMotionDetectionEventParam); //该接口废弃 long SN_C_API Remote_System_SetMotionDetectionEvent(long p_hHandle, const long p_nCameraId, const ST_MotionDetectionEventParam* p_pstMotionDetectionEventParam); //该接口废弃 long SN_C_API Remote_System_GetMotionDetectionEvent(long p_hHandle, const long p_nCameraId, ST_MotionDetectionEventParam* p_pstMotionDetectionEventParam); //该接口废弃 long SN_C_API Remote_System_GetAllMotionDetectionEventV2(long p_hHandle, ST_AllMotionDetectionEventParamV2* p_pszMotionDetectionEventV2Vector); long SN_C_API Remote_System_SetAllMotionDetectionEventV2(long p_hHandle, ST_AllMotionDetectionEventParamV2* p_pszMotionDetectionEventV2Vector); long SN_C_API Remote_System_SetMotionDetectionEventV2(long p_hHandle,const int p_nCameraId, ST_MotionDetectionEventParamV2* p_pstMotionDetectionEventV2); long SN_C_API Remote_System_GetMotionDetectionEventV2(long p_hHandle,const int p_nCameraId, ST_MotionDetectionEventParamV2* p_pstMotionDetectionEventV2); //遮挡报警 long SN_C_API Remote_System_SetAllOcclusionDetectionEvent(long p_hHandle, const ST_AllOcclusionDetectionEventParam* p_pstAllOcclusionDetectionEventParam); long SN_C_API Remote_System_GetAllOcclusionDetectionEvent(long p_hHandle, ST_AllOcclusionDetectionEventParam* p_pstAllOcclusionDetectionEventParam); long SN_C_API Remote_System_SetOcclusionDetectionEvent(long p_hHandle, const long p_nCameraId, const ST_OcclusionDetectionEventParam* p_pstOcclusionDetectionEventParam); long SN_C_API Remote_System_GetOcclusionDetectionEvent(long p_hHandle, const long p_nCameraId, ST_OcclusionDetectionEventParam* p_pstOcclusionDetectionEventParam); //视频丢失报警 long SN_C_API Remote_System_SetAllVideoLoseDetectionEvent(long p_hHandle, const ST_AllVideoLoseDetectionEventParam* p_pstAllVideoLoseDetectionEventParam); long SN_C_API Remote_System_GetAllVideoLoseDetectionEvent(long p_hHandle, ST_AllVideoLoseDetectionEventParam* p_pstAllVideoLoseDetectionEventParam); long SN_C_API Remote_System_SetVideoLoseDetectionEvent(long p_hHandle, const long p_nCameraId, const ST_VideoLoseDetectionEventParam* p_pstVideoLoseDetectionEventParam); long SN_C_API Remote_System_GetVideoLoseDetectionEvent(long p_hHandle, const long p_nCameraId, ST_VideoLoseDetectionEventParam* p_pstVideoLoseDetectionEventParam); //磁盘报警 long SN_C_API Remote_System_SetDiskAlarmParam(long p_hHandle, const ST_DiskAlarmParam* p_pstDiskAlarmParam); //该接口废弃 long SN_C_API Remote_System_GetDiskAlarmParam(long p_hHandle, ST_DiskAlarmParam* p_pstDiskAlarmParam); //该接口废弃 long SN_C_API Remote_System_SetDiskAlarmParamV2(long p_hHandle, const ST_DiskAlarmParamV2* p_pstDiskAlarmParam); long SN_C_API Remote_System_GetDiskAlarmParamv2(long p_hHandle, ST_DiskAlarmParamV2* p_pstDiskAlarmParam); long SN_C_API Remote_System_GetNetworkAlarmParam(long p_hHandle,ST_NetworkAlarmParam* p_pstNetworkAlarmParam); long SN_C_API Remote_System_SetNetworkAlarmParam(long p_hHandle,const ST_NetworkAlarmParam* p_pstNetworkAlarmParam); //手动报警 long SN_C_API Remote_System_ManualAlarm(long p_hHandle, const long p_nAlarmType, const long p_nAlarmSourceId, const ST_AlarmActionStrategy* p_pstAlarmActionStrategy); long SN_C_API Remote_System_SetAlarmOut(long p_hHandle, const long p_nAlarmDeviceType, const long p_nAlarmOutId, const long p_nAlarmOutFlag); //报警参数 long SN_C_API Remote_System_SetAlarmParam(long p_hHandle, const ST_AlarmParam* p_pstAlarmParam); long SN_C_API Remote_System_GetAlarmParam(long p_hHandle, ST_AlarmParam* p_pstAlarmParam); long SN_C_API Remote_System_SetSnapshotParam(long p_hHandle, const long p_nCameraId, const ST_SnapshotParam* p_pstSnapshotParam); long SN_C_API Remote_System_GetSnapshotParam(long p_hHandle, const long p_nCameraId, ST_SnapshotParam* p_pstSnapshotParam); long SN_C_API Remote_System_SetAllSnapshotParam(long p_hHandle, const ST_AllSnapshotParam* p_pstAllSnapshotParam); long SN_C_API Remote_System_GetAllSnapshotParam(long p_hHandle, ST_AllSnapshotParam* p_pstAllSnapshotParam); long SN_C_API Remote_System_SetAllAVStreamParam(long p_hHandle, const ST_AllAVStreamParam* p_pstAllStreamParam); long SN_C_API Remote_System_GetAllAVStreamParam(long p_hHandle, ST_AllAVStreamParam* p_pstAllStreamParam); long SN_C_API Remote_System_SetAllCameraAVStreamParam(long p_hHandle, const long p_nCameraId, const ST_AllAVStreamParam* p_pstAllStreamParam); long SN_C_API Remote_System_GetAllCameraAVStreamParam(long p_hHandle, const long p_nCameraId, ST_AllAVStreamParam* p_pstAllStreamParam); long SN_C_API Remote_System_SetAVStreamParam(long p_hHandle, const long p_nCameraId, const long p_nStreamId, const ST_AVStreamParam* p_pstAllStreamParam); long SN_C_API Remote_System_GetAVStreamParam(long p_hHandle, const long p_nCameraId, const long p_nStreamId, ST_AVStreamParam* p_pstAllStreamParam); long SN_C_API Remote_System_GetStreamURI(long p_hHandle, const long p_nCameraId, const long p_nStreamId, char* p_pszStreamURI, const long p_nInputLen, long* p_nOutputLen); long SN_C_API Remote_System_GetStreamURIEx(long p_hHandle, const long p_nCameraId, const long p_nStreamId, const long p_nRtspTransferProtocol, char* p_pszStreamURI, const long p_nInputLen, long* p_nOutputLen); //查询录像文件接口 long SN_C_API Remote_System_QueryRecord(long p_hHandle, const ST_RecordQueryCondition* p_pstRecordQueryCondition); long SN_C_API Remote_System_GetRecordQueryResultCount(long p_hHandle, long* p_nRecordQueryResultCount); long SN_C_API Remote_System_GetRecordQueryResult(long p_hHandle, const long p_nIndex,ST_RecordQueryResult* p_pstRecordQueryResult); long SN_C_API Remote_System_ClearRecordQueryResult(long p_hHandle); long SN_C_API Remote_System_QueryRecordV2(long p_hHandle, const ST_RecordQueryConditionV2* p_pstRecordQueryCondition); long SN_C_API Remote_System_GetRecordQueryResultCountV2(long p_hHandle, long* p_nRecordQueryResultCount); long SN_C_API Remote_System_GetRecordQueryResultV2(long p_hHandle, const long p_nIndex,ST_RecordQueryResultV2* p_pstRecordQueryResult); long SN_C_API Remote_System_ClearRecordQueryResultV2(long p_hHandle); //查询系统日志接口 long SN_C_API Remote_System_QuerySystemLog(long p_hHandle, const ST_LogRequestParam* p_pstLogRequestParam); long SN_C_API Remote_System_GetSystemLogCount(long p_hHandle, long * p_nLogInfoCount); long SN_C_API Remote_System_GetSystemLog(long p_hHandle, const long p_nIndex,ST_LogInfo* p_pstLogInfo); long SN_C_API Remote_System_ClearSystemLogQueryResult(long p_hHandle); long SN_C_API Remote_System_QuerySystemLogV2(long p_hHandle, const ST_LogRequestParamV2* p_pstLogRequestParam); long SN_C_API Remote_System_GetSystemLogCountV2(long p_hHandle, long * p_nLogInfoCount); long SN_C_API Remote_System_GetSystemLogV2(long p_hHandle, const long p_nIndex,ST_LogInfoV2* p_pstLogInfo); long SN_C_API Remote_System_ClearSystemLogQueryResultV2(long p_hHandle); //报警日志 long SN_C_API Remote_System_QueryAlarmLog(long p_hHandle, const ST_AlarmInfoExQueryParam* p_pstAlarmInfoQueryParam); long SN_C_API Remote_System_GetAlarmLogCount(long p_hHandle, long* p_nAlarmInfoCount); long SN_C_API Remote_System_GetAlarmLog(long p_hHandle, const long p_nIndex, ST_AlarmInfoExRecordSet* p_pstAlarmInfoRecordSet); long SN_C_API Remote_System_ClearAlarmLogQueryResult(long p_hHandle); //隐私遮蔽接口 long SN_C_API Remote_System_SetBlindAreaParam(long p_hHandle, const long p_nCameraId, const ST_BlindAreaParam* p_pstBlindAreaParam); long SN_C_API Remote_System_GetBlindAreaParam(long p_hHandle, const long p_nCameraId, ST_BlindAreaParam* p_pstBlindAreaParam); long SN_C_API Remote_System_SetAllBlindAreaParam(long p_hHandle, const ST_AllBlindAreaParam* p_pstAllBlindAreaParam); long SN_C_API Remote_System_GetAllBlindAreaParam(long p_hHandle, ST_AllBlindAreaParam* p_pstAllBlindAreaParam); long SN_C_API Remote_System_GetBlindAreaAbility(long p_hHandle, ST_BlindAbilityV2* p_pstBlindAbilityV2); //Decoder long SN_C_API Remote_System_GetWindowMode(long p_hHandle, int* p_pnWindowMode); long SN_C_API Remote_System_SetWindowMode(long p_hHandle, const int p_nWindowMode); //wifi long SN_C_API Remote_System_GetWifiHotspotParam(long p_hHandle,ST_WifiHotspotParamList* p_pstWifiHotspotParamList); long SN_C_API Remote_System_GetWifiParam(long p_hHandle,ST_WifiParam* p_pstWifiParam); long SN_C_API Remote_System_SetWifiParam(long p_hHandle,const ST_WifiParam* p_pszWifiParam); long SN_C_API Remote_System_GetWifiStateParam(long p_hHandle,ST_WifiStateParam* p_pstWifiStateParam); long SN_C_API Remote_System_GetWifiAbilityParam(long p_hHandle,ST_WifiAbilityParam* p_pstWifiAbilityParam); long SN_C_API Remote_System_GetWifiNetworkParam(long p_hHandle,ST_WifiNetworkParam* p_pstWifiNetworkParam); //伴随流 long SN_C_API Remote_System_SetSVCStreamParam(long p_hHandle, const long p_nCameraID, const long p_nStreamId,const ST_SVCStreamParam* p_pstSVCStreamParam); long SN_C_API Remote_System_GetSVCStreamParam(long p_hHandle, const long p_nCameraID, const long p_nStreamId,ST_SVCStreamParam* p_pstSVCStreamParam); //Sensor long SN_C_API Remote_System_GetSensorAbility(long p_hHandle,ST_SensorAbility* p_pstSensorAbility); long SN_C_API Remote_System_SetPTZTimer(long p_hHandle, const long p_nCameraID, ST_PTZTimer* p_stPTZTimer); long SN_C_API Remote_System_GetPTZTimer(long p_hHandle, const long p_nCameraID, ST_PTZTimer* p_stPTZTimer); long SN_C_API Remote_System_SetAllPTZTimer(long p_hHandle, const ST_PTZTimerList* p_stPTZTimerList); long SN_C_API Remote_System_GetAllPTZTimer(long p_hHandle, ST_PTZTimerList* p_pstPTZTimerList); long SN_C_API Remote_System_SetMTUParam(long p_hHandle,ST_MTUParam *p_pstMTUParam); long SN_C_API Remote_System_GetMTUParam(long p_hHandle,ST_MTUParam *p_pstMTUParam); //智能分析 long SN_C_API Remote_System_GetIntelligenceAnalyseAbility(long p_hHandle,ST_IntelligenceAnalyseAbility* p_pstIntelligenceAnalyseAbility); long SN_C_API Remote_System_SetPerimeterParam(long p_hHandle,ST_PerimeterParam* p_pstPerimeterParam); long SN_C_API Remote_System_GetPerimeterParam(long p_hHandle,ST_PerimeterParam* p_pstPerimeterParam); long SN_C_API Remote_System_SetTripWireParam(long p_hHandle,ST_TripWireParam* p_pstTripWireParam); long SN_C_API Remote_System_GetTripWireParam(long p_hHandle,ST_TripWireParam* p_pstTripWireParam); long SN_C_API Remote_System_SetMultiTripWireParam(long p_hHandle,ST_MultiTripWireParam* p_pstMultiTripWireParam); long SN_C_API Remote_System_GetMultiTripWireParam(long p_hHandle,ST_MultiTripWireParam* p_pstMultiTripWireParam); long SN_C_API Remote_System_SetLoiterParam(long p_hHandle,ST_LoiterParam* p_objLoiterParam); long SN_C_API Remote_System_GetLoiterParam(long p_hHandle,ST_LoiterParam* p_objLoiterParam); long SN_C_API Remote_System_SetMultiLoiterParam(long p_hHandle,ST_MultiLoiterParam* p_pstMultiLoiterParam); long SN_C_API Remote_System_GetMultiLoiterParam(long p_hHandle,ST_MultiLoiterParam* p_pstMultiLoiterParam); long SN_C_API Remote_System_SetObjectLeftParam(long p_hHandle,ST_ObjectLeftParam* p_pstObjectLeftParam); long SN_C_API Remote_System_GetObjectLeftParam(long p_hHandle,ST_ObjectLeftParam* p_pstObjectLeftParam); long SN_C_API Remote_System_SetObjectMovedParam(long p_hHandle,ST_ObjectMovedParam* p_pstObjectMovedParam); long SN_C_API Remote_System_GetObjectMovedParam(long p_hHandle,ST_ObjectMovedParam* p_pstObjectMovedParam); long SN_C_API Remote_System_SetAbnormalSpeedParam(long p_hHandle,ST_AbnormalSpeedParam* p_pstAbnormalSpeedParam); long SN_C_API Remote_System_GetAbnormalSpeedParam(long p_hHandle,ST_AbnormalSpeedParam* p_pstAbnormalSpeedParam); long SN_C_API Remote_System_SetConverseParam(long p_hHandle,ST_ConverseParam* p_pstConverseParam); long SN_C_API Remote_System_GetConverseParam(long p_hHandle,ST_ConverseParam* p_pstConverseParam); long SN_C_API Remote_System_SetNoParkingParam(long p_hHandle,ST_NoParkingParam* p_pstNoParkingParam); long SN_C_API Remote_System_GetNoParkingParam(long p_hHandle,ST_NoParkingParam* p_pstNoParkingParam); long SN_C_API Remote_System_SetMotionDetectionParamV3(long p_hHandle,ST_MotionDetectionParamV3* p_pstMotionDetectionParamV3); long SN_C_API Remote_System_GetMotionDetectionParamV3(long p_hHandle,ST_MotionDetectionParamV3* p_pstMotionDetectionParamV3); long SN_C_API Remote_System_SetCameraTamperParam(long p_hHandle,ST_CameraTamperParam* p_pstCameraTamperParam); long SN_C_API Remote_System_GetCameraTamperParam(long p_hHandle,ST_CameraTamperParam* p_pstCameraTamperParam); long SN_C_API Remote_System_SetCameraMovedParam(long p_hHandle,ST_CameraMovedParam* p_pstCameraMoveParam); long SN_C_API Remote_System_GetCameraMovedParam(long p_hHandle,ST_CameraMovedParam* p_pstCameraMoveParam); long SN_C_API Remote_System_SetAdvancedParam(long p_hHandle,ST_AdvancedParam* p_pstAdvancedParam); long SN_C_API Remote_System_GetAdvancedParam(long p_hHandle,ST_AdvancedParam* p_pstAdvancedParam); long SN_C_API Remote_System_SetSignalBadParam(long p_hHandle,ST_SignalBadParam* p_pstSignalBadParam); long SN_C_API Remote_System_GetSignalBadParam(long p_hHandle,ST_SignalBadParam* p_pstSignalBadParam); long SN_C_API Remote_System_AddBlindAreaParamV2(long p_hHandle,const int p_nCameraId, ST_BlindAreaParamV2* p_stBlindAreaParamV2); long SN_C_API Remote_System_ModifyBlindAreaParamV2(long p_hHandle,const int p_nCameraId, ST_BlindAreaParamV2* p_stBlindAreaParamV2); long SN_C_API Remote_System_DeleteBlindAreaParamV2(long p_hHandle,const int p_nCameraId, ST_BlindAreaParamV2* p_stBlindAreaParamV2); long SN_C_API Remote_System_GetAllBlindAreaParamV2(long p_hHandle,const int p_nCameraId, ST_AllBlindAreaParamV2* p_stBlindAreaParamV2List); long SN_C_API Remote_System_DeleteAllBlindAreaParamV2(long p_hHandle,const int p_nCameraId); long SN_C_API Remote_System_GetBlindAreaParamV2(long p_hHandle,const int p_nCameraId, const int p_nAreaParamV2ID, ST_BlindAreaParamV2* p_stBlindAreaParamV2); long SN_C_API Remote_System_GotoBlindAreaParamV2(long p_hHandle,const int p_nCameraId, const int p_nAreaParamV2ID); //鱼眼设备参数配置 //{ long SN_C_API Remote_System_SetFisheyeDewarpParam(long p_hHandle,const int p_nCameraID, ST_FisheyeDewarpModeParam* p_stFisheyeDewarpParam); long SN_C_API Remote_System_GetFisheyeDewarpParam(long p_hHandle,const int p_nCameraID, ST_FisheyeDewarpModeParam* p_stFisheyeDewarpParam); long SN_C_API Remote_System_GetFisheyeVideoLayout(long p_hHandle,const int p_nCameraId, ST_FisheyeVideoLayout* p_stFisheyeVideoLayout); long SN_C_API Remote_System_SetFisheyeMountparam(long p_hHandle,ST_FisheyeMountParam* p_stFisheyeMountParam); long SN_C_API Remote_System_GetFisheyeMountparam(long p_hHandle,ST_FisheyeMountParam* p_stFisheyeMountParam); long SN_C_API Remote_System_GetFisheyeAbility(long p_hHandle,ST_FisheyeAbility* p_stFisheyeAbility); //} long SN_C_API Remote_Snapshot_SetTimeout(long p_hHandle, const int p_nTimeout); long SN_C_API Remote_Snapshot_Open(long p_hHandle); long SN_C_API Remote_Snapshot_Close(long p_hHandle); long SN_C_API Remote_Snapshot_GetSnapshotPicture(long p_hHandle, ST_RemoteSnapshotParam* p_pstRemoteSnapshotParam, ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_Snapshot_GetSnapshotPictureV2(long p_hHandle, ST_RemoteSnapshotParam* p_pstRemoteSnapshotParam, ST_AVFrameData* p_pstAVFrameData); //CMS C Interface(CMS服务初始化和反初始化,调用CMS_*函数时需调用以下两个函数初始化和反初始化) long SN_C_API CMS_Init(long* p_hHandle); long SN_C_API CMS_UnInit(long p_hHandle); //CMSAlarmCenter C Interface(报警接收) long SN_C_API CMS_AlarmCenter_setListenAddr(long p_hHandle, const ST_InetAddr* p_stInetAddr); long SN_C_API CMS_AlarmCenter_setAlarmCallback(long p_hHandle, long (CALLBACK* fAlarmCallback)(long p_hHandle, ST_AlarmInfo* p_stAlarmInfo, void* pUserData), void* pUserData); //接口废弃 long SN_C_API CMS_AlarmCenter_setAlarmCallbackEx(long p_hHandle, long (CALLBACK* fAlarmCallback)(long p_hHandle, ST_AlarmInfoEx* p_stAlarmInfo, void* pUserData), void* pUserData); //接口废弃 long SN_C_API CMS_AlarmCenter_setAlarmCallbackExV2(long p_hHandle, long (CALLBACK* fAlarmCallback)(long p_hHandle, ST_AlarmInfoExV2* p_stAlarmInfo, void* pUserData), void* pUserData); long SN_C_API CMS_AlarmCenter_open(long p_hHandle); long SN_C_API CMS_AlarmCenter_close(long p_hHandle); long SN_C_API CMS_AlarmCenter2_setAlarmCallbackEx(long p_hHandle, long (CALLBACK* fAlarmCallback)(long p_hHandle, ST_AlarmInfoEx* p_stAlarmInfo, void* pUserData), void* pUserData); //接口废弃 long SN_C_API CMS_AlarmCenter2_setAlarmCallbackExV2(long p_hHandle, long (CALLBACK* fAlarmCallback)(long p_hHandle, ST_AlarmInfoExV2* p_stAlarmInfo, void* pUserData), void* pUserData); long SN_C_API CMS_AlarmCenter2_setMessageCallback(long p_hHandle, long (CALLBACK* fMessageCallback)(long p_hHandle, const char * p_szDeviceIP , const char * p_szDeviceId,const int p_nMessageID,void* pUserData) ,void* pUserData); long SN_C_API CMS_AlarmCenter2_AddDeviceInfo(long p_hHandle, const ST_DeviceInfoEx * p_stDeviceInfo); //按设备id来删除接口废弃 long SN_C_API CMS_AlarmCenter2_RemoveDeviceInfo(long p_hHandle, const char * p_szDeviceId); long SN_C_API CMS_AlarmCenter2_RemoveDeviceInfoByInetAddr(long p_hHandle, const ST_InetAddr *p_stInetAddr); long SN_C_API CMS_AlarmCenter2_RemoveAll(long p_hHandle); long SN_C_API CMS_AlarmCenter2_open(long p_hHandle); long SN_C_API CMS_AlarmCenter2_close(long p_hHandle); //CMSDeviceSearcher C Interface(设备广播搜索) long SN_C_API CMS_DeviceSearcher_SetListenAddr(long p_hHandle, const ST_InetAddr* p_stInetAddr); long SN_C_API CMS_DeviceSearcher_SetDeviceFilterFlag(long p_hHandle, const unsigned char bFlag); long SN_C_API CMS_DeviceSearcher_SetDeviceInfoCallback(long p_hHandle, long (CALLBACK* fSearchCallback)(long p_hHandle, ST_NetVideoDeviceInfo* p_pstNetVideoDeviceInfo, void* pUserData), void* pUserData); long SN_C_API CMS_DeviceSearcher_Start(long p_hHandle); long SN_C_API CMS_DeviceSearcher_Stop(long p_hHandle); //CMSDeviceSearcherEx C Interface(设备主动搜索) long SN_C_API CMS_DeviceSearcherEx_SetDevicePort(long p_hHandle, const unsigned short p_nPort = 30001); long SN_C_API CMS_DeviceSearcherEx_SetDeviceFilterFlag(long p_hHandle, const bool p_bFlag); long SN_C_API CMS_DeviceSearcherEx_SetSearchCount(long p_hHandle, const int p_nSearchCount); long SN_C_API CMS_DeviceSearcherEx_SetSearchInterval(long p_hHandle, const int p_nSearchInterval); long SN_C_API CMS_DeviceSearcherEx_AddSearchDeviceIPRange(long p_hHandle, const char* p_szDeviceIPBegin, const char* p_szDeviceIPEnd); long SN_C_API CMS_DeviceSearcherEx_ClearSearchDeviceIP(long p_hHandle); long SN_C_API CMS_DeviceSearcherEx_SetDeviceInfoCallback(long p_hHandle, long (CALLBACK* fSearchCallback)(long p_hHandle, ST_NetVideoDeviceInfo* p_pstNetVideoDeviceInfo, void* pUserData), void* pUserData); long SN_C_API CMS_DeviceSearcherEx_Start(long p_hHandle); long SN_C_API CMS_DeviceSearcherEx_Stop(long p_hHandle); //CMSDeviceOnlineService C Interface(设备在线服务) //设置监听者 long SN_C_API CMS_DeviceOnlineService_SetDeviceInfoCallback(long p_hHandle, long (CALLBACK* fDeviceInfoCallBack)(long p_hHandle, ST_DeviceBaseInfo* p_pstDeviceBaseInfo, void* pUserData), void* pUserData); long SN_C_API CMS_DeviceOnlineService_SetDeviceStateCallback(long p_hHandle, long (CALLBACK* fDeviceInfoCallBack)(long p_hHandle, ST_DeviceStateInfo* p_pstDeviceStateInfo, void* pUserData), void* pUserData); void SN_C_API CMS_DeviceOnlineService_SetIPProtoVer(long p_hHandle, const int p_nIPProtoVer); //广播需调用接口 //设置是否使用广播 void SN_C_API CMS_DeviceOnlineService_SetUseBroadcastFlag(long p_hHandle, const unsigned char p_bFlag); void SN_C_API CMS_DeviceOnlineService_SetBroadcastListenAddr(long p_hHandle, const ST_InetAddr* p_pstListenAddr); //主动搜索需调用接口 long SN_C_API CMS_DeviceOnlineService_AddSearchDeviceAddr1(long p_hHandle, const char* p_szDeviceIPBegin, const char* p_szDeviceIPEnd, const int p_nSearchPort); long SN_C_API CMS_DeviceOnlineService_AddSearchDeviceAddr2(long p_hHandle, const char* p_szDeviceIP, const int p_nSearchPort); long SN_C_API CMS_DeviceOnlineService_AddSearchDeviceAddr3(long p_hHandle, const ST_InetAddr* p_pstInetAddr); long SN_C_API CMS_DeviceOnlineService_Start(long p_hHandle); void SN_C_API CMS_DeviceOnlineService_Stop(long p_hHandle); long SN_C_API CMS_DeviceOnlineService_FindDeviceStateInfo(long p_hHandle, const char* p_pszDeviceId, ST_DeviceStateInfo* p_pstDeviceStateInfo); #if (defined(WIN32)&&!defined(_WIN32_WCE)) //RemoteAudioBroadcast C Interface(远程语音广播服务初始化和反初始化,调用Remote_AudioBroadcast_*函数时需调用以下两个函数初始化和反初始化) long SN_C_API Remote_AudioBroadcast_Init(long* p_hHandle); long SN_C_API Remote_AudioBroadcast_UnInit(long p_hHandle); void SN_C_API Remote_AudioBroadcast_SetEncoderType(long p_hHandle, const int p_nEncoderType); long SN_C_API Remote_AudioBroadcast_AddBroadcastDevice(long p_hHandle, const ST_DeviceInfoEx* p_stDeviceInfo, const int p_nAudioChannel = 1); long SN_C_API Remote_AudioBroadcast_Start(long p_hHandle); void SN_C_API Remote_AudioBroadcast_Stop(long p_hHandle); void SN_C_API Remote_AudioBroadcast_RemoveBroadcastDevice(long p_hHandle, const char* p_pszDeviceId, const int p_nAudioChannel = 1); #endif //end WIN32 #ifdef RECORD_INTERFACE //CMS录像接口 long SN_C_API CMS_RecordCenter_Init(long* p_hHandle); long SN_C_API CMS_RecordCenter_UnInit(long p_hHandle); long SN_C_API CMS_RecordCenter_SetRecordDirInfoList(long p_hHandle, const ST_RecordDirInfoList* p_stRecordDirInfoList); long SN_C_API CMS_RecordCenter_OpenRecord(long p_hHandle, const char* p_pszDeviceId, const char* p_pszDeviceIp, int p_nCameraId, int p_nDiskGroupId, int p_nSaveDays, long* p_hRecorderHandle); long SN_C_API CMS_RecordCenter_CloseRecord(long p_hHandle, const char* p_pszDeviceId, const char* p_pszDeviceIp, int p_nCameraId); long SN_C_API CMS_RecordCenter_CloseRecordEx(long p_hHandle, long p_hRecorderHandle); long SN_C_API CMS_RecordCenter_CloseAllRecord(long p_hHandle); bool SN_C_API CMS_RecordCenter_IsRecording(long p_hHandle, const char* p_pszDeviceId, const char* p_pszDeviceIp, int p_nCameraId); //录像写接口,此次使用的p_hRecordHandle是调用CMS_RecordCenter_OpenRecord返回的p_hRecordHandle long SN_C_API CMS_Recorder_Write(long p_hRecorderHandle, ST_AVFrameData* p_pstAVFrameData); //CMS录像接口V2 long SN_C_API CMS_RecordCenterV2_Init(long* p_hHandle); long SN_C_API CMS_RecordCenterV2_UnInit(long p_hHandle); long SN_C_API CMS_RecordCenterV2_SetRecordDirInfoList(long p_hHandle, const ST_RecordDirInfoList* p_stRecordDirInfoList); long SN_C_API CMS_RecordCenterV2_OpenRecord(long p_hHandle, const ST_DeviceInfoEx* p_stDeviceInfoEx, const int p_nCameraId, const int p_nStreamId, const int p_nDiskGroupId = 1, const int p_nSaveDays = -1); long SN_C_API CMS_RecordCenterV2_CloseRecord(long p_hHandle, const char* p_pszDeviceId, const char* p_pszDeviceIp, int p_nCameraId); long SN_C_API CMS_RecordCenterV2_CloseAllRecord(long p_hHandle); bool SN_C_API CMS_RecordCenterV2_IsRecording(long p_hHandle, const char* p_pszDeviceId, const char* p_pszDeviceIp, int p_nCameraId); //录像查询接口 long SN_C_API CMS_RecordSearcher_Init(long* p_hHandle); long SN_C_API CMS_RecordSearcher_UnInit(long p_hHandle); long SN_C_API CMS_RecordSearcher_SetRecordDirInfoList(long p_hHandle, const ST_RecordDirInfoList* p_stRecordDirInfoList); long SN_C_API CMS_RecordSearcher_QueryRecord(long p_hHandle, const ST_RecordQueryCondition* p_pstRecordQueryCondition); long SN_C_API CMS_RecordSearcher_GetRecordQueryResultCount(long p_hHandle, long* p_nRecordQueryResultCount); long SN_C_API CMS_RecordSearcher_GetRecordQueryResult(long p_hHandle, const long p_nIndex,ST_RecordQueryResult* p_pstRecordQueryResult); long SN_C_API CMS_RecordSearcher_ClearRecordQueryResult(long p_hHandle); long SN_C_API CMS_RecordSearcher_QueryRecordV2(long p_hHandle, const ST_RecordQueryConditionV2* p_pstRecordQueryCondition); long SN_C_API CMS_RecordSearcher_GetRecordQueryResultCountV2(long p_hHandle, long* p_nRecordQueryResultCount); long SN_C_API CMS_RecordSearcher_GetRecordQueryResultV2(long p_hHandle, const long p_nIndex,ST_RecordQueryResultV2* p_pstRecordQueryResult); long SN_C_API CMS_RecordSearcher_ClearRecordQueryResultV2(long p_hHandle); //录像读取接口 long SN_C_API CMS_RecordRetriever_Init(long* p_hHandle); long SN_C_API CMS_RecordRetriever_UnInit(long p_hHandle); long SN_C_API CMS_RecordRetriever_SetRecordDirInfoList(long p_hHandle, const ST_RecordDirInfoList* p_stRecordDirInfoList); long SN_C_API CMS_RecordRetriever_Open(long p_hHandle, const ST_RecordInfo* p_stRecordInfo); //接口废弃 long SN_C_API CMS_RecordRetriever_OpenV2(long p_hHandle, const ST_RecordInfoV2* p_stRecordInfo); long SN_C_API CMS_RecordRetriever_Close(long p_hHandle); long SN_C_API CMS_RecordRetriever_Read(long p_hHandle, char *p_szAVData,int p_nDataLength); long SN_C_API CMS_RecordRetriever_LocateTime(long p_hHandle, unsigned long p_nTime); long SN_C_API CMS_RecordRetriever_LocateNextIFrame(long p_hHandle); long SN_C_API CMS_RecordRetriever_LocatePreIFrame(long p_hHandle); #endif #if (defined(WIN32)&&!defined(_WIN32_WCE)) //本地录像回放接口 long SN_C_API Local_PlayBack_Init(long* p_hHandle); long SN_C_API Local_PlayBack_UnInit(long p_hHandle); long SN_C_API Local_PlayBack_SetRecordDirInfoList(long p_hHandle, const ST_RecordDirInfoList* p_stRecordDirInfoList); long SN_C_API Local_PlayBack_SetStretchMode(long p_hHandle, const bool p_bStretchMode); long SN_C_API Local_PlayBack_SetAutoResizeFlag(long p_hHandle, const bool p_bAutoResizeFlag = true); long SN_C_API Local_PlayBack_SetNotifyWindow(long p_hHandle, const unsigned long p_nNotifyWnd, const unsigned long p_nMessage, const void* p_pParam); long SN_C_API Local_PlayBack_SetVideoWindow(long p_hHandle, const unsigned long p_hDisplayWnd, const long x, const long y, const long width, const long height); long SN_C_API Local_PlayBack_Open(long p_hHandle, ST_RecordInfo* p_stRecordInfo); //接口废弃 long SN_C_API Local_PlayBack_OpenV2(long p_hHandle, ST_RecordInfoV2* p_stRecordInfo); long SN_C_API Local_PlayBack_Close(long p_hHandle); long SN_C_API Local_PlayBack_Play(long p_hHandle); long SN_C_API Local_PlayBack_Pause(long p_hHandle); long SN_C_API Local_PlayBack_Stop(long p_hHandle); long SN_C_API Local_PlayBack_ResizeWindow(long p_hHandle, const long x, const long y, const long width, const long height); long SN_C_API Local_PlayBack_Refresh(long p_hHandle); long SN_C_API Local_PlayBack_GetPlayStatus(long p_hHandle, long* p_nPlayStatus); long SN_C_API Local_PlayBack_PlayNextFrame(long p_hHandle); long SN_C_API Local_PlayBack_PlayPreviousFrame(long p_hHandle); long SN_C_API Local_PlayBack_PlaySound(long p_hHandle); long SN_C_API Local_PlayBack_StopSound(long p_hHandle); long SN_C_API Local_PlayBack_IsOnSound(long p_hHandle, bool* p_bOnSound); long SN_C_API Local_PlayBack_SetVolume(long p_hHandle, const long p_nVolume); long SN_C_API Local_PlayBack_GetVolume(long p_hHandle, long* p_nVolume); long SN_C_API Local_PlayBack_GetPlayPosByTime(long p_hHandle, unsigned long* p_nDuration); long SN_C_API Local_PlayBack_SetPlayPosByTime(long p_hHandle, const unsigned long p_nDuration); long SN_C_API Local_PlayBack_SetRate (long p_hHandle, const float p_nRate); long SN_C_API Local_PlayBack_GetRate(long p_hHandle, float& p_nRate ); long SN_C_API Local_PlayBack_SetBrightness(long p_hHandle, const unsigned long p_nValue); long SN_C_API Local_PlayBack_GetBrightness(long p_hHandle, unsigned long* p_nValue); long SN_C_API Local_PlayBack_SetContrast(long p_hHandle, const unsigned long p_nValue); long SN_C_API Local_PlayBack_GetContrast(long p_hHandle, unsigned long* p_nValue); long SN_C_API Local_PlayBack_SetHue(long p_hHandle, const unsigned long p_nValue); long SN_C_API Local_PlayBack_GetHue(long p_hHandle, unsigned long* p_nValue); long SN_C_API Local_PlayBack_SetSaturation(long p_hHandle, const unsigned long p_nValue); long SN_C_API Local_PlayBack_GetSaturation(long p_hHandle, unsigned long* p_nValue); long SN_C_API Local_PlayBack_ResetPictureAdjustFilter(long p_hHandle); long SN_C_API Local_PlayBack_GetPictureSize(long p_hHandle, long* p_nWidth, long* p_nHeight); long SN_C_API Local_PlayBack_SnapShot(long p_hHandle, const char* p_pszFileName); long SN_C_API Local_PlayBack_ZoomInVideoEx(long p_hHandle, const unsigned int x, const unsigned int y, const unsigned int width, const unsigned int height); long SN_C_API Local_PlayBack_ZoomInVideo(long p_hHandle); long SN_C_API Local_PlayBack_ZoomOutVideo(long p_hHandle); long SN_C_API Local_PlayBack_RestoreVideo(long p_hHandle); long SN_C_API Local_PlayBack_SetRecorderFile(long p_hHandle, const char* p_pszFileName); long SN_C_API Local_PlayBack_SetRecordFileFormat(long p_hHandle, const int p_nFileFormat); long SN_C_API Local_PlayBack_SetRecordFileHead(long p_hHandle, const char* p_pszRecordFileHead, const int p_nRecordFileLength); long SN_C_API Local_PlayBack_StartRecord(long p_hHandle); long SN_C_API Local_PlayBack_StopRecord(long p_hHandle); long SN_C_API Local_PlayBack_GetRecorderStatus(long p_hHandle, long* p_nStatus); #endif //end WIN32 //手动录像接口,在使用手动录像C接口之前必须调用Manual_Recorder_Init初始化函数,使用完后应当调用Manual_Recorder_UnInit释放环境 long SN_C_API Manual_Recorder_Init(long* p_handle, const ST_DeviceInfoEx* p_stDeviceInfo, const int p_nCameraId, const int p_nStreamId, const int p_nTransferProtocol); long SN_C_API Manual_Recorder_SetRecordAudioFlag(long p_hHandle, const bool p_bFlag); long SN_C_API Manual_Recorder_SetRecordFileName(long p_hHandle, const char* p_pszRecordFileName); long SN_C_API Manual_Recorder_SetMessageCallback(long p_hHandle, long (CALLBACK* fRecordMessageCallback)(long p_hHandle, const int p_nMessageID, void* pUserData), void* pUserData); long SN_C_API Manual_Recorder_StartRecord(long p_hHandle); long SN_C_API Manual_Recorder_StopRecord(long p_hHandle); long SN_C_API Manual_Recorder_UnInit(long p_hHandle); //解码器接口 long SN_C_API Remote_Decoder_Init(long* p_handle, const ST_DeviceInfoEx* p_stDeviceInfo, const int p_nWindowID); long SN_C_API Remote_Decoder_UnInit(long p_hHandle); long SN_C_API Remote_Decoder_Open(long p_hHandle); long SN_C_API Remote_Decoder_Decode(long p_hHandle, ST_AVFrameData* p_pstAVFrameData); long SN_C_API Remote_Decoder_Close(long p_hHandle); //////////////////////////////////TS解包器//////////////////////////////////////// /************************************************************************ **概述: * 初始化TS解包器。 **输入: * **输出: * hHandle:解包器句柄。 **返回值: * 执行成功返回0,输出句柄; 错误时返回错误码。 **功能: * ************************************************************************/ long SN_C_API TSUnpackager_Init( long* p_hHandle ); /************************************************************************ **概述: * 释放TS解包器环境。 **输入: * hHandle:解包器句柄。 **输出: * 无。 **返回值: * 执行成功返回0,错误时返回错误码。 **功能: * 在使用完TS解包器后,必须调用该函数释放编解码器 ************************************************************************/ long SN_C_API TSUnpackager_Uninit(long p_hHandle); /************************************************************************ **概述: * 输入TS音视频流 **输入: * p_objTSAVData:TS数据流。 * p_nDataLen:流数据大小,单位为字节。 **输出: * **返回值: * SN_SUCCESS:成功。 * SN_ERROR_QUEUE_FULL:缓冲队列满,需要重新调用接口塞入数据。 **功能: * ************************************************************************/ long SN_C_API TSUnpackager_InputTSData(long p_hHandle, const char* p_szTSData, const unsigned int p_nDataLen); /************************************************************************ **概述: * 设置解包回调函数,当UnpackageCallBack设置NULL时取消回调。 **输入: * hHandle:回调函数参数。当UnpackageCallBack执行,回传该参数。一个32位整形值,当没有句柄时可以设置NULL * fUnpackageCallBack:解包回调函数。 **输出: * 无。 **返回值: * 执行成功返回0,错误时返回错误码。 **功能: ************************************************************************/ long SN_C_API TSUnpackager_SetUnpackageCallBack( long p_hHandle, long ( CALLBACK * fUnpackageCallBack ) ( long p_hHandle, NVDC_STRUCT::ST_AVFrameData* pAVFrameData, void* pUserData), void* pUserData); //////////////////////////////////PS解包器//////////////////////////////////////// /************************************************************************ **概述: * 初始化PS解包器。 **输入: * **输出: * hHandle:解包器句柄。 **返回值: * 执行成功返回0,输出句柄; 错误时返回错误码。 **功能: * ************************************************************************/ long SN_C_API PSUnpackager_Init( long* p_hHandle ); /************************************************************************ **概述: * 释放PS解包器环境。 **输入: * hHandle:解包器句柄。 **输出: * 无。 **返回值: * 执行成功返回0,错误时返回错误码。 **功能: * 在使用完PS解包器后,必须调用该函数释放编解码器 ************************************************************************/ long SN_C_API PSUnpackager_Uninit(long p_hHandle); /************************************************************************ **概述: * 输入PS音视频流 **输入: * p_objPSAVData:PS数据流。 * p_nDataLen:流数据大小,单位为字节。 **输出: * **返回值: * SN_SUCCESS:成功。 * SN_ERROR_QUEUE_FULL:缓冲队列满,需要重新调用接口塞入数据。 **功能: * ************************************************************************/ long SN_C_API PSUnpackager_InputPSData(long p_hHandle, const char* p_szPSData, const unsigned int p_nDataLen); /************************************************************************ **概述: * 设置解包回调函数,当UnpackageCallBack设置NULL时取消回调。 **输入: * hHandle:回调函数参数。当UnpackageCallBack执行,回传该参数。一个32位整形值,当没有句柄时可以设置NULL * fUnpackageCallBack:解包回调函数。 **输出: * 无。 **返回值: * 执行成功返回0,错误时返回错误码。 **功能: ************************************************************************/ long SN_C_API PSUnpackager_SetUnpackageCallBack( long p_hHandle, long ( CALLBACK * fUnpackageCallBack ) ( long p_hHandle, NVDC_STRUCT::ST_AVFrameData* pAVFrameData, void* pUserData), void* pUserData); /************************************************************************ **概述: * 初始化PS解包器。 **输入: * **输出: * hHandle:解包器句柄。 **返回值: * 执行成功返回0,输出句柄; 错误时返回错误码。 **功能: * ************************************************************************/ long SN_C_API PSUnpackagerV2_Init( long* p_hHandle ); /************************************************************************ **概述: * 释放PS解包器环境。 **输入: * hHandle:解包器句柄。 **输出: * 无。 **返回值: * 执行成功返回0,错误时返回错误码。 **功能: * 在使用完PS解包器后,必须调用该函数释放编解码器 ************************************************************************/ long SN_C_API PSUnpackagerV2_Uninit(long p_hHandle); //设置数据帧的格式,1:原始流,4:ps流 long SN_C_API PSUnpackagerV2_SetFrameDataFormat(long p_hHandle, const int p_nFormat); //使用数据标志,false:返回的帧数据没有视频数据,true:返回的帧数据里携带视频数据 long SN_C_API PSUnpackagerV2_SetUseDateFlag(long p_hHandle, const bool p_bFlag); /************************************************************************ **概述: * 输入PS音视频流 **输入: * p_objPSAVData:PS数据流。 * p_nDataLen:流数据大小,单位为字节。 **输出: * **返回值: * SN_SUCCESS:成功。 * SN_ERROR_QUEUE_FULL:缓冲队列满,需要重新调用接口塞入数据。 **功能: * ************************************************************************/ long SN_C_API PSUnpackagerV2_InputPSData(long p_hHandle, const char* p_szPSData, const unsigned int p_nDataLen); /************************************************************************ **概述: * 输入PS音视频流 **输入: * p_objPSAVData:PS数据流。 * p_nDataLen:流数据大小,单位为字节。 **输出: * **返回值: * SN_SUCCESS:成功。 * SN_ERROR_QUEUE_FULL:缓冲队列满,需要重新调用接口塞入数据。 **功能: * ************************************************************************/ long SN_C_API PSUnpackagerV2_GetNextAVFrameData(long p_hHandle, NVDC_STRUCT::ST_AVFrameData* p_pstAVFrameData); /************************************************************************ **概述: * 初始化PS解包器。 **输入: * **输出: * hHandle:解包器句柄。 **返回值: * 执行成功返回0,输出句柄; 错误时返回错误码。 **功能: * ************************************************************************/ long SN_C_API PSUnpackagerV3_Init( long* p_hHandle ); /************************************************************************ **概述: * 释放PS解包器环境。 **输入: * hHandle:解包器句柄。 **输出: * 无。 **返回值: * 执行成功返回0,错误时返回错误码。 **功能: * 在使用完PS解包器后,必须调用该函数释放编解码器 ************************************************************************/ long SN_C_API PSUnpackagerV3_Uninit(long p_hHandle); //设置数据帧的格式,1:原始流,4:ps流 long SN_C_API PSUnpackagerV3_SetFrameDataFormat(long p_hHandle, const int p_nFormat); //使用数据标志,false:返回的帧数据没有视频数据,true:返回的帧数据里携带视频数据 long SN_C_API PSUnpackagerV3_SetUseDateFlag(long p_hHandle, const bool p_bFlag); /************************************************************************ **概述: * 输入PS音视频流 **输入: * p_objPSAVData:PS数据流。 * p_nDataLen:流数据大小,单位为字节。 **输出: * **返回值: * SN_SUCCESS:成功。 * SN_ERROR_QUEUE_FULL:缓冲队列满,需要重新调用接口塞入数据。 **功能: * ************************************************************************/ long SN_C_API PSUnpackagerV3_InputPSData(long p_hHandle, const char* p_szPSData, const unsigned int p_nDataLen); /************************************************************************ **概述: * 输入PS音视频流 **输入: * p_objPSAVData:PS数据流。 * p_nDataLen:流数据大小,单位为字节。 **输出: * **返回值: * SN_SUCCESS:成功。 * SN_ERROR_QUEUE_FULL:缓冲队列满,需要重新调用接口塞入数据。 **功能: * ************************************************************************/ long SN_C_API PSUnpackagerV3_GetNextAVFrameData(long p_hHandle, NVDC_STRUCT::ST_AVFrameData* p_pstAVFrameData); } //namespace #ifdef __cplusplus } #endif //__cplusplus #endif
5bb3ca03c53031b4466ab7089b8ecc4b1e5d5c30
d56bfa586706bd10853051597453e7fae0d993e5
/src/unit.cc
590ff2b91475fe9d0c86a6a7ce57e9e6fa3addaa
[]
no_license
sxy799/TEST
59cc45b3a9c7b4367d31dfff7ecc88a0e77428b9
a939012453c5a3885cc13d8e5ba6621f3126f993
refs/heads/master
2020-03-07T02:23:40.695227
2018-03-28T22:58:16
2018-03-28T22:58:16
127,208,021
0
0
null
null
null
null
UTF-8
C++
false
false
3,773
cc
unit.cc
#include <math.h> #include "unit.h" #include <stdio.h> #include <inttypes.h> #include <string.h> double newton_sqrt(double n) { if (n < 0) { printf("你输入的数是负数不能被开平方\n"); return 0.0; } double x = 1.0; while(fabs(x * x - n) > EPSLON) { x = x - (x * x - n) / (2 * x); } return x; } int get_sum(int n) { if (n <= 0) { printf(" 您输入的n 是负数 不符合我们的要求 \n"); return 0;} // if (n > INT_MAX) { printf("输入的数字超过int最大值不在判断的范围\n");return 0; } int sum = 0; for (int i=1; i < n; i++) { if (i % 3 == 0 || i % 5 == 0) { // printf(" **** %d \n",i); sum += i; } } return sum; } int IsPrime(int n) { if (n <= 0) { printf(" 您输入的n 是负数 不符合我们的要求 \n"); return 0;} // if (n > INT_MAX) { printf("输入的数字超过INT_MAX 不在判断的范围\n"); return 0;} for (int i =2; i* i < n; i++){ if (n%i == 0)return 0; } return 1; } int Palindrome (int x ) { if (x < 0) return 0; else if (x<10)return 1; else { int num = 0; while(x){ num += x % 10; x /= 10; } if (num == x) return 1; else return 0; } } int Istriangle(int a,int b,int c) { // scanf("%d%d%d", &a, &b, &c); if (a <= 0 || b <= 0 || c <= 0){ printf("你输入的数不是正整数\n"); return 0; } if (a > c) { int tmp = a; a = c; c = tmp; } if (b > c) { int tmp =b; b = c; c = tmp; } if (a + b <= c) { //printf("It's not a triangle"); return 0; } else { return 1; } } int str_len(const char *str) { int i=0; while(str[i]!='\0') i++; return i; } long long Fib_s(int x) { if(x<=0) return 0; if(x == 1 || x == 2) return 1; if(x > 91) return 0; long long Fib1 = 1; long long Fib2 = 2; int i = 0; while(1) { i++; if(Fib1<=Fib2) Fib1 += Fib2; else Fib2 += Fib1; if(i+3 == x) { return Fib1 > Fib2 ? Fib1 : Fib2; } } } int gcd(int a,int b) { if (a < b) { int tmp = a; a = b; b = tmp; } int r; while(b>0) { r=a%b; a=b; b=r; } return a; } char* new_hash(const char *str) { if (strlen(str) != 32 ){ printf("你的输入是不合法的!!!\n"); //: return 0; } char *ret ; int len, i; int arr[40] = {0}, bits[40] = {0}; len = strlen(str); for (i = 1; i <= len; ++i) { arr[i % 32] += (int)str[i - 1]; } for (i = 0; i < 32; i++) { bits[i] = arr[31 - i] ^ (arr[i] << 1); bits[i] = bits[i] % 85 + 34; printf("strlen = %d\n",strlen(str)); ret[i] = (char)(bits[i]); } return ret; } double BinSearch(int p, int q) { double xmin, xmax, xmid; double value_min, value_max, value_mid; xmin = -1000; xmax = 1001; value_min = p*xmin + q; value_max = p*xmax + q; // printf("max : %lf min : %lf \n",value_max,value_min) ; do { xmid = (xmin + xmax) / 2; value_mid = p*xmid + q; if (fabs(value_mid) < EPSLON) { return xmid; } else if (value_mid * value_min < 0.0) { xmax = xmid; value_max = value_mid; } else if (value_mid * value_max < 0.0) { xmin = xmid; value_min = value_mid; } } while (1); return -1; }
2299da5871a301e4a31f82b94beb8473ed53b3ae
fc79fe29914d224d9f3a1e494aff6b8937be723f
/Libraries/Rim Sound/include/rim/sound/filters/rimSoundParametricEqualizer.h
d996d29197b7c95a5c626faf522602433613b8ca
[]
no_license
niti1987/Quadcopter
e078d23dd1e736fda19b516a5cd5e4aca5aa3c50
6ca26b1224395c51369442f202d1b4c4b7188351
refs/heads/master
2021-01-01T18:55:55.210906
2014-12-09T23:37:09
2014-12-09T23:37:09
null
0
0
null
null
null
null
UTF-8
C++
false
false
25,431
h
rimSoundParametricEqualizer.h
/* * rimSoundParametricEqualizer.h * Rim Sound * * Created by Carl Schissler on 11/30/12. * Copyright 2012 __MyCompanyName__. All rights reserved. * */ #ifndef INCLUDE_RIM_SOUND_PARAMETRIC_EQUALIZER_H #define INCLUDE_RIM_SOUND_PARAMETRIC_EQUALIZER_H #include "rimSoundFiltersConfig.h" #include "rimSoundFilter.h" #include "rimSoundParametricFilter.h" #include "rimSoundCutoffFilter.h" #include "rimSoundShelfFilter.h" #include "rimSoundGainFilter.h" //########################################################################################## //************************ Start Rim Sound Filters Namespace ***************************** RIM_SOUND_FILTERS_NAMESPACE_START //****************************************************************************************** //########################################################################################## //******************************************************************************** //******************************************************************************** //******************************************************************************** /// A class that provides a basic 5-band parametric EQ with additional high/low shelf/pass filters. class ParametricEqualizer : public SoundFilter { public: //******************************************************************************** //******************************************************************************** //******************************************************************************** //****** Constructors /// Create a default parametric equalizer with 5 parametric filter bands. ParametricEqualizer(); //******************************************************************************** //******************************************************************************** //******************************************************************************** //****** Output Gain Accessor Methods /// Return the linear output gain for this parametric equalizer. RIM_INLINE Gain getOutputGain() const { return gainFilter.getGain(); } /// Return the output gain in decibels for this parametric equalizer. RIM_INLINE Gain getOutputGainDB() const { return gainFilter.getGainDB(); } /// Set the linear output gain for this parametric equalizer. RIM_INLINE void setOutputGain( Gain newGain ) { lockMutex(); gainFilter.setGain( newGain ); unlockMutex(); } /// Set the output gain in decibels for this parametric equalizer. RIM_INLINE void setOutputGainDB( Gain newGain ) { lockMutex(); gainFilter.setGainDB( newGain ); unlockMutex(); } //******************************************************************************** //******************************************************************************** //******************************************************************************** //****** Parametric Filter Accessor Methods /// Return the number of parametric EQ filters that make up this parametric equalizer. RIM_INLINE Size getParametricCount() const { return parametrics.getSize(); } /// Set the number of parametric EQ filters that make up this parametric equalizer. /** * If the specified new number of parametric filters is less than the old number, * the unnecessary filters are removed and deleted. If the new number is greater, * the new frequency bands are initialzed to have the center frequency of 1000Hz. */ RIM_INLINE void setParametricCount( Size newNumberOfParametrics ) { lockMutex(); parametrics.setSize( newNumberOfParametrics ); unlockMutex(); } /// Return whether or not the parametric filter within this equalizer at the specified index is enabled. RIM_INLINE Bool getParametricIsEnabled( Index parametricIndex ) const { if ( parametricIndex < parametrics.getSize() ) return parametrics[parametricIndex].isEnabled; else return false; } /// Set whether or not the parametric filter within this equalizer at the specified index is enabled. RIM_INLINE void setParametricIsEnabled( Index parametricIndex, Bool newIsEnabled ) { lockMutex(); if ( parametricIndex < parametrics.getSize() ) parametrics[parametricIndex].isEnabled = newIsEnabled; unlockMutex(); } //******************************************************************************** //******************************************************************************** //******************************************************************************** //****** Parametric Filter Gain Accessor Methods /// Return the linear gain of the parametric filter within this equalizer at the specified index. RIM_INLINE Gain getParametricGain( Index parametricIndex ) const { if ( parametricIndex < parametrics.getSize() ) return parametrics[parametricIndex].filter.getGain(); else return Gain(0); } /// Return the gain in decibels of the parametric filter within this equalizer at the specified index. RIM_INLINE Gain getParametricGainDB( Index parametricIndex ) const { if ( parametricIndex < parametrics.getSize() ) return parametrics[parametricIndex].filter.getGainDB(); else return math::negativeInfinity<Gain>(); } /// Set the linear gain of the parametric filter within this equalizer at the specified index. RIM_INLINE void setParametricGain( Index parametricIndex, Gain newGain ) { lockMutex(); if ( parametricIndex < parametrics.getSize() ) parametrics[parametricIndex].filter.setGain( newGain ); unlockMutex(); } /// Set the gain in decibels of the parametric filter within this equalizer at the specified index. RIM_INLINE void setParametricGainDB( Index parametricIndex, Gain newGain ) { lockMutex(); if ( parametricIndex < parametrics.getSize() ) parametrics[parametricIndex].filter.setGainDB( newGain ); unlockMutex(); } //******************************************************************************** //******************************************************************************** //******************************************************************************** //****** Parametric Filter Frequency Accessor Methods /// Return the center frequency of the parametric filter within this equalizer at the specified index. RIM_INLINE Float getParametricFrequency( Index parametricIndex ) const { if ( parametricIndex < parametrics.getSize() ) return parametrics[parametricIndex].filter.getFrequency(); else return Float(0); } /// Set the center frequency of the parametric filter within this equalizer at the specified index. RIM_INLINE void setParametricFrequency( Index parametricIndex, Float newFrequency ) { lockMutex(); if ( parametricIndex < parametrics.getSize() ) parametrics[parametricIndex].filter.setFrequency( newFrequency ); unlockMutex(); } //******************************************************************************** //******************************************************************************** //******************************************************************************** //****** Parametric Filter Bandwidth Accessor Methods /// Return the Q factor of the parametric filter within this equalizer at the specified index. RIM_INLINE Float getParametricQ( Index parametricIndex ) const { if ( parametricIndex < parametrics.getSize() ) return parametrics[parametricIndex].filter.getQ(); else return Float(0); } /// Set the Q factor of the parametric filter within this equalizer at the specified index. RIM_INLINE void setParametricQ( Index parametricIndex, Float newQ ) { lockMutex(); if ( parametricIndex < parametrics.getSize() ) parametrics[parametricIndex].filter.setQ( newQ ); unlockMutex(); } /// Return the bandwidth in octaves of the parametric filter within this equalizer at the specified index. RIM_INLINE Float getParametricBandwidth( Index parametricIndex ) const { if ( parametricIndex < parametrics.getSize() ) return parametrics[parametricIndex].filter.getBandwidth(); else return Float(0); } /// Set the bandwidth in octaves of the parametric filter within this equalizer at the specified index. RIM_INLINE void setParametricBandwidth( Index parametricIndex, Float newBandwidth ) { lockMutex(); if ( parametricIndex < parametrics.getSize() ) parametrics[parametricIndex].filter.setBandwidth( newBandwidth ); unlockMutex(); } //******************************************************************************** //******************************************************************************** //******************************************************************************** //****** High-Pass Filter Frequency Accessor Methods /// Return the corner frequency of this parametric equalizer's high pass filter. RIM_INLINE Float getHighPassFrequency() const { return highPass.getFrequency(); } /// Set the corner frequency of this parametric equalizer's high pass filter. RIM_INLINE void setHighPassFrequency( Float newFrequency ) { lockMutex(); highPass.setFrequency( newFrequency ); unlockMutex(); } /// Return the order of this parametric equalizer's high pass filter. RIM_INLINE Size getHighPassOrder() const { return highPass.getOrder(); } /// Set the order of this parametric equalizer's high pass filter. RIM_INLINE void setHighPassOrder( Size newOrder ) { lockMutex(); highPass.setOrder( newOrder ); unlockMutex(); } /// Return whether or not the high pass filter of this parametric equalizer is enabled. RIM_INLINE Bool getHighPassIsEnabled() const { return highPassEnabled; } /// Set whether or not the high pass filter of this parametric equalizer is enabled. RIM_INLINE void setHighPassIsEnabled( Bool newIsEnabled ) { lockMutex(); highPassEnabled = newIsEnabled; unlockMutex(); } //******************************************************************************** //******************************************************************************** //******************************************************************************** //****** Low-Pass Filter Attribute Accessor Methods /// Return the corner frequency of this parametric equalizer's low pass filter. RIM_INLINE Float getLowPassFrequency() const { return lowPass.getFrequency(); } /// Set the corner frequency of this parametric equalizer's low pass filter. RIM_INLINE void setLowPassFrequency( Float newFrequency ) { lockMutex(); lowPass.setFrequency( newFrequency ); unlockMutex(); } /// Return the order of this parametric equalizer's low pass filter. RIM_INLINE Size getLowPassOrder() const { return lowPass.getOrder(); } /// Set the order of this parametric equalizer's low pass filter. RIM_INLINE void setLowPassOrder( Size newOrder ) { lockMutex(); lowPass.setOrder( newOrder ); unlockMutex(); } /// Return whether or not the low pass filter of this parametric equalizer is enabled. RIM_INLINE Bool getLowPassIsEnabled() const { return lowPassEnabled; } /// Set whether or not the low pass filter of this parametric equalizer is enabled. RIM_INLINE void setLowPassIsEnabled( Bool newIsEnabled ) { lockMutex(); lowPassEnabled = newIsEnabled; unlockMutex(); } //******************************************************************************** //******************************************************************************** //******************************************************************************** //****** Low Shelf Filter Attribute Accessor Methods /// Return the corner frequency of this parametric equalizer's low shelf filter. RIM_INLINE Float getLowShelfFrequency() const { return lowShelf.getFrequency(); } /// Set the corner frequency of this parametric equalizer's low shelf filter. RIM_INLINE void setLowShelfFrequency( Float newFrequency ) { lockMutex(); lowShelf.setFrequency( newFrequency ); unlockMutex(); } /// Return the linear gain of this parametric equalizer's low shelf filter. RIM_INLINE Gain getLowShelfGain() const { return lowShelf.getGain(); } /// Return the gain in decibels of this parametric equalizer's low shelf filter. RIM_INLINE Gain getLowShelfGainDB() const { return lowShelf.getGainDB(); } /// Set the linear gain of this parametric equalizer's low shelf filter. RIM_INLINE void setLowShelfGain( Gain newGain ) { lockMutex(); lowShelf.setGain( newGain ); unlockMutex(); } /// Set the gain in decibels of this parametric equalizer's low shelf filter. RIM_INLINE void setLowShelfGainDB( Gain newGain ) { lockMutex(); lowShelf.setGainDB( newGain ); unlockMutex(); } /// Return the slope of this parametric equalizer's low shelf filter. RIM_INLINE Float getLowShelfSlope() const { return lowShelf.getGain(); } /// Set the slope of this parametric equalizer's low shelf filter. RIM_INLINE void setLowShelfSlope( Float newSlope ) { lockMutex(); lowShelf.setSlope( newSlope ); unlockMutex(); } /// Return whether or not the low shelf filter of this parametric equalizer is enabled. RIM_INLINE Bool getLowShelfIsEnabled() const { return lowShelfEnabled; } /// Set whether or not the low shelf filter of this parametric equalizer is enabled. RIM_INLINE void setLowShelfIsEnabled( Bool newIsEnabled ) { lockMutex(); lowShelfEnabled = newIsEnabled; unlockMutex(); } //******************************************************************************** //******************************************************************************** //******************************************************************************** //****** High Shelf Filter Attribute Accessor Methods /// Return the corner frequency of this parametric equalizer's high shelf filter. RIM_INLINE Float getHighShelfFrequency() const { return highShelf.getFrequency(); } /// Set the corner frequency of this parametric equalizer's high shelf filter. RIM_INLINE void setHighShelfFrequency( Float newFrequency ) { lockMutex(); highShelf.setFrequency( newFrequency ); unlockMutex(); } /// Return the linear gain of this parametric equalizer's high shelf filter. RIM_INLINE Gain getHighShelfGain() const { return highShelf.getGain(); } /// Return the gain in decibels of this parametric equalizer's high shelf filter. RIM_INLINE Gain getHighShelfGainDB() const { return highShelf.getGainDB(); } /// Set the linear gain of this parametric equalizer's high shelf filter. RIM_INLINE void setHighShelfGain( Gain newGain ) { lockMutex(); highShelf.setGain( newGain ); unlockMutex(); } /// Set the gain in decibels of this parametric equalizer's high shelf filter. RIM_INLINE void setHighShelfGainDB( Gain newGain ) { lockMutex(); highShelf.setGainDB( newGain ); unlockMutex(); } /// Return the slope of this parametric equalizer's high shelf filter. RIM_INLINE Float getHighShelfSlope() const { return highShelf.getGain(); } /// Set the slope of this parametric equalizer's high shelf filter. RIM_INLINE void setHighShelfSlope( Float newSlope ) { lockMutex(); highShelf.setSlope( newSlope ); unlockMutex(); } /// Return whether or not the high shelf filter of this parametric equalizer is enabled. RIM_INLINE Bool getHighShelfIsEnabled() const { return highShelfEnabled; } /// Set whether or not the high shelf filter of this parametric equalizer is enabled. RIM_INLINE void setHighShelfIsEnabled( Bool newIsEnabled ) { lockMutex(); highShelfEnabled = newIsEnabled; unlockMutex(); } //******************************************************************************** //******************************************************************************** //******************************************************************************** //****** Filter Attribute Accessor Methods /// Return a human-readable name for this parametric equalizer. /** * The method returns the string "Parametric Equalizer". */ virtual UTF8String getName() const; /// Return the manufacturer name of this parametric equalizer. /** * The method returns the string "Headspace Sound". */ virtual UTF8String getManufacturer() const; /// Return an object representing the version of this parametric equalizer. virtual SoundFilterVersion getVersion() const; /// Return an object which describes the category of effect that this filter implements. /** * This method returns the value SoundFilterCategory::EQUALIZER. */ virtual SoundFilterCategory getCategory() const; /// Return whether or not this parametric equalizer can process audio data in-place. /** * This method always returns TRUE, parameteric equalizers can process audio data in-place. */ virtual Bool allowsInPlaceProcessing() const; //******************************************************************************** //******************************************************************************** //******************************************************************************** //****** Filter Parameter Accessor Methods /// Return the total number of generic accessible parameters this filter has. virtual Size getParameterCount() const; /// Get information about the parameter at the specified index. virtual Bool getParameterInfo( Index parameterIndex, FilterParameterInfo& info ) const; //******************************************************************************** //******************************************************************************** //******************************************************************************** //****** Public Static Property Objects /// A string indicating the human-readable name of this parametric equalizer. static const UTF8String NAME; /// A string indicating the manufacturer name of this parametric equalizer. static const UTF8String MANUFACTURER; /// An object indicating the version of this parametric equalizer. static const SoundFilterVersion VERSION; private: //******************************************************************************** //******************************************************************************** //******************************************************************************** //****** Private Data Members /// A class which holds information about a single band of parametric EQ. class ParametricFilterBand { public: /// Create a new parametric filter band, enabled by default. RIM_INLINE ParametricFilterBand() : filter(), isEnabled( true ) { } /// The parametric filter associated with this frequency band. ParametricFilter filter; /// A boolean value indicating whether or not this frequency band is enabled. Bool isEnabled; }; //******************************************************************************** //******************************************************************************** //******************************************************************************** //****** Filter Parameter Value Accessor Methods /// Place the value of the parameter at the specified index in the output parameter. virtual Bool getParameterValue( Index parameterIndex, FilterParameter& value ) const; /// Attempt to set the parameter value at the specified index. virtual Bool setParameterValue( Index parameterIndex, const FilterParameter& value ); //******************************************************************************** //******************************************************************************** //******************************************************************************** //****** Private Stream Reset Method /// A method which is called whenever the filter's stream of audio is being reset. /** * This method allows the filter to reset all parameter interpolation * and processing to its initial state to avoid coloration from previous * audio or parameter values. */ virtual void resetStream(); //******************************************************************************** //******************************************************************************** //******************************************************************************** //****** Private Filter Processing Methods /// Apply this parametric filter to the samples in the input frame and place them in the output frame. virtual SoundFilterResult processFrame( const SoundFilterFrame& inputFrame, SoundFilterFrame& outputFrame, Size numSamples ); /// Return whether or not the specified linear gain value is very close to unity gain. RIM_INLINE static Bool gainIsUnity( Gain linearGain ) { return math::abs( Gain(1) - linearGain ) < 2*math::epsilon<Gain>(); } //******************************************************************************** //******************************************************************************** //******************************************************************************** //****** Private Static Data Members /// Define the default number of parametric filters that should make up a parametric equalizer. static const Size DEFAULT_NUMBER_OF_PARAMETRIC_FILTERS = 5; /// Define the default center frequencies of the parametric filters that make up this equalizer. static const Float DEFAULT_PARAMETRIC_FREQUENCIES[DEFAULT_NUMBER_OF_PARAMETRIC_FILTERS]; //******************************************************************************** //******************************************************************************** //******************************************************************************** //****** Private Data Members /// A high pass filter for this parametric equalizer. CutoffFilter highPass; /// A low shelf filter for this parametric equalizer. ShelfFilter lowShelf; /// An array of the parametric filters that make up this parametric equalizer. Array<ParametricFilterBand> parametrics; /// A high shelf filter for this parametric equalizer. ShelfFilter highShelf; /// A low pass filter for this parametric equalizer. CutoffFilter lowPass; /// A master gain filter for this parametric equalizer. GainFilter gainFilter; /// A boolean value indicating whether or not the high pass filter is enabled. Bool highPassEnabled; /// A boolean value indicating whether or not the low pass filter is enabled. Bool lowPassEnabled; /// A boolean value indicating whether or not the low shelf filter is enabled. Bool lowShelfEnabled; /// A boolean value indicating whether or not the high shelf filter is enabled. Bool highShelfEnabled; }; //########################################################################################## //************************ End Rim Sound Filters Namespace ******************************* RIM_SOUND_FILTERS_NAMESPACE_END //****************************************************************************************** //########################################################################################## #endif // INCLUDE_RIM_SOUND_PARAMETRIC_EQUALIZER_H
5b5b984272da44db22d8fa1e0993d001ddb6b127
7c617b4fcb1970b0e1540b730c1b6580714012aa
/Classes/CompControllerTest.cpp
78d68d4ac4ddfd88daf20f1798854a03d7cea313
[]
no_license
YoungForLong/TDDEMO
d93036322200ff78f0309f6ec33d3d65f59855cf
cdf6f127c12b39bd32fc55ccaa545b2f483f3a73
refs/heads/master
2021-01-11T12:06:55.828820
2017-03-23T09:28:51
2017-03-23T09:28:51
76,558,377
0
0
null
null
null
null
UTF-8
C++
false
false
2,229
cpp
CompControllerTest.cpp
#include "ComponentDependencies.h" #include "EntityBase.h" #include "Cell_Space_Partition.h" #include <numeric> bool CompControllerTest::init() { if (!root) return false; return true; } void CompControllerTest::update() { if (_curKeyState == 0) return; auto cm = root->getComponent<CompMoving>(comp_moving); switch (_curKeyState) { case 1: cm->moveTowards(Vec2::UNIT_Y); break; case 2: cm->moveTowards(-Vec2::UNIT_X); break; case 3: cm->moveTowards(-Vec2::UNIT_Y); break; case 4: cm->moveTowards(Vec2::UNIT_X); break; case 5: attack(); break; default: break; } } void CompControllerTest::clear() { } void CompControllerTest::onKeyboardPressed(cocos2d::EventKeyboard::KeyCode code) { switch (code) { case cocos2d::EventKeyboard::KeyCode::KEY_SPACE: _curKeyState = 5; break; case cocos2d::EventKeyboard::KeyCode::KEY_W: _curKeyState = 1; break; case cocos2d::EventKeyboard::KeyCode::KEY_A: _curKeyState = 2; break; case cocos2d::EventKeyboard::KeyCode::KEY_S: _curKeyState = 3; break; case cocos2d::EventKeyboard::KeyCode::KEY_D: _curKeyState = 4; break; default: break; } } void CompControllerTest::onKeyboardReleased(cocos2d::EventKeyboard::KeyCode code) { _curKeyState = 0; /*if (code == EventKeyboard::KeyCode::KEY_ESCAPE) { auto& arrRef = CU->testNumArr; float aver = accumulate(arrRef.begin(), arrRef.end(), 0.0f) / arrRef.size(); CCLOG("averange obs force: %f", aver); CCDirector::getInstance()->end(); }*/ } bool CompControllerTest::attack() { auto cb = root->getComponent<CompBattle>(comp_battle); auto selfCm = root->getComponent<CompMoving>(comp_moving); auto neighbors = CSP->getNeighbors(root->getComponent<CompMoving>(comp_moving), 1200); if (neighbors.empty()) return false; //find the nearest one float distSq = max_float; CompMoving* nearestCm = nullptr; for_each(neighbors.cbegin(), neighbors.cend(), [&distSq, &nearestCm, selfCm](CompMoving* eachCm) { auto curDistSq = selfCm->position().getDistanceSq(eachCm->position()); if (distSq > curDistSq) { distSq = curDistSq; nearestCm = eachCm; } }); if (nearestCm == nullptr) return false; return cb->normalAttack(nearestCm->root->id()); }
91565d05a85b3f15e3b7e573ea9c2d01304796ac
276c472235c963c01160275830fb68a68bc78eed
/POJ/POJ3666.cpp
6b3a701e521303421580e630fc9d3afb7485088b
[]
no_license
MicDZ/Code
057f5ef39e6b296d3d38897f20a7fae1edf37fa9
6665d48c742fd6e80f87b5ef23c030ec7f60fd2f
refs/heads/master
2022-12-07T20:33:49.153077
2022-11-28T03:49:35
2022-11-28T03:49:35
218,696,992
3
0
null
null
null
null
UTF-8
C++
false
false
638
cpp
POJ3666.cpp
#include<iostream> #include<cstdio> #include<queue> #include<cmath> using namespace std; priority_queue<int, vector<int>, greater<int> > q; priority_queue<int> p; int ans1,ans2; int my_abs(int x) { if(x>0) return x; else return -x; } int main(){ int n; cin>>n; for(int i=1; i<=n; i++) { int x; cin>>x; p.push(x); q.push(x); if(q.top()<x) { int t=q.top(); ans1+=my_abs(t-x); q.pop(); q.push(x); } if(p.top()>x) { ans2+=p.top()-x; p.pop(); p.push(x); } } printf("%d\n",min(ans1,ans2)); return 0; }
542cdd14726e6a3f696a25b416a5e8a7b1e7e044
9c400e7e3a84f4657af32d1fbaf7da0572ccca5b
/applications/gps/GPSsysc/src/GUI_HEARTBEAT_class.cpp
b7b9a84bedac064f9fdbefc0d43c72b0b69dca05
[]
no_license
xtuml/models
1986868b6a12f92017588c3a38f894a1bc7c00bb
34dc3e28318207e17a0e532bc81f88fef8b011d5
refs/heads/master
2023-07-20T14:38:42.048389
2023-07-06T14:14:44
2023-07-06T14:14:44
6,943,299
14
98
null
2023-07-06T14:14:45
2012-11-30T17:59:41
C
UTF-8
C++
false
false
3,835
cpp
GUI_HEARTBEAT_class.cpp
/*---------------------------------------------------------------------------- * File: GUI_HEARTBEAT_class.cpp * * Class: UI Heartbeat (HEARTBEAT) * Component: GUI * * (C) Copyright 1998-2012 Mentor Graphics Corporation. All rights reserved. *--------------------------------------------------------------------------*/ #include "GPSsysc_sys_types.h" #include "GUI.h" #include "GUI_GuiBridge_bridge.h" #include "LOG_bridge.h" #include "TIM_bridge.h" /* * Statically allocate space for the instance population for this class. * Allocate space for the class instance and its attribute values. * Depending upon the collection scheme, allocate containoids (collection * nodes) for gathering instances into free and active extents. */ static sys_sets::Escher_SetElement_s GUI_HEARTBEAT_container[ GUI_HEARTBEAT_MAX_EXTENT_SIZE ]; static GUI_HEARTBEAT GUI_HEARTBEAT_instances[ GUI_HEARTBEAT_MAX_EXTENT_SIZE ]; sys_sets::Escher_Extent_t pG_GUI_HEARTBEAT_extent = { {0}, {0}, &GUI_HEARTBEAT_container[ 0 ], (Escher_iHandle_t) &GUI_HEARTBEAT_instances, sizeof( GUI_HEARTBEAT ), GUI_HEARTBEAT_STATE_1, GUI_HEARTBEAT_MAX_EXTENT_SIZE }; /*---------------------------------------------------------------------------- * State and transition action implementations for the following class: * * Class: UI Heartbeat (HEARTBEAT) * Component: GUI *--------------------------------------------------------------------------*/ /* * State 1: [beating] */ static void GUI_HEARTBEAT_act1( GUI_HEARTBEAT *, const Escher_xtUMLEvent_t * const ); static void GUI_HEARTBEAT_act1( GUI_HEARTBEAT * self, const Escher_xtUMLEvent_t * const event ) { GUI * thismodule = (GUI *) event->thismodule; /* GuiBridge::receive( ) */ XTUML_OAL_STMT_TRACE( 1, "GuiBridge::receive( )" ); GUI_GuiBridge::receive( thismodule ); } const Escher_xtUMLEventConstant_t GUI_HEARTBEATevent1c = { GUI_DOMAIN_ID, GUI_HEARTBEAT_CLASS_NUMBER, GUI_HEARTBEATEVENT1NUM, ESCHER_IS_INSTANCE_EVENT, 0 }; /* * State-Event Matrix (SEM) * Row index is object (MC enumerated) current state. * Row zero is the uninitialized state (e.g., for creation event transitions). * Column index is (MC enumerated) state machine events. */ static const Escher_SEMcell_t GUI_HEARTBEAT_StateEventMatrix[ 1 + 1 ][ 1 ] = { /* row 0: uninitialized state (for creation events) */ { EVENT_CANT_HAPPEN }, /* row 1: GUI_HEARTBEAT_STATE_1 (beating) */ { GUI_HEARTBEAT_STATE_1 } }; /* * Array of pointers to the class state action procedures. * Index is the (MC enumerated) number of the state action to execute. */ static const StateAction_t GUI_HEARTBEAT_acts[ 2 ] = { (StateAction_t) 0, (StateAction_t) GUI_HEARTBEAT_act1 /* beating */ }; /* * instance state machine event dispatching */ void GUI_HEARTBEAT_Dispatch( Escher_xtUMLEvent_t * event ) { GUI * thismodule = (GUI *) event->thismodule; Escher_iHandle_t instance = GetEventTargetInstance( event ); Escher_EventNumber_t event_number = GetOoaEventNumber( event ); Escher_StateNumber_t current_state; Escher_StateNumber_t next_state; if ( 0 != instance ) { current_state = instance->current_state; if ( current_state > 1 ) { /* instance validation failure (object deleted while event in flight) */ UserEventNoInstanceCallout( event_number ); } else { next_state = GUI_HEARTBEAT_StateEventMatrix[ current_state ][ event_number ]; if ( next_state <= 1 ) { /* Execute the state action and update the current state. */ ( *GUI_HEARTBEAT_acts[ next_state ] )( instance, event ); instance->current_state = next_state; } else { /* empty else */ } } } }
678d693915c32acb4971a1ac20ffb84c84f2f997
5aff8752c20fc8f57d28cff74f6b70bae3b836c6
/src/detector.cpp
3a90753863868eab38d9edbaf3e32b7125aae8ee
[]
no_license
rll/proctor
a4e410a6d6d1f48822edbcec806529ed83800397
3d1f38d34123734ddd0409f3ac2ea6e750dd0c22
refs/heads/master
2016-09-06T15:38:01.091393
2011-10-24T17:46:29
2011-10-24T17:46:29
2,258,604
5
1
null
null
null
null
UTF-8
C++
false
false
10,464
cpp
detector.cpp
#include <pcl/features/fpfh.h> #include <pcl/io/pcd_io.h> #include <pcl/keypoints/uniform_sampling.h> #include <pcl/registration/icp.h> #include "proctor/detector.h" #include "proctor/ia_ransac_sub.h" #include "proctor/proctor.h" /** create the viewports to be used by top candidates */ class create_viewports { public: create_viewports(PointCloud<PointNormal>::ConstPtr sentinel) : sentinel(sentinel) {} void operator()(visualization::PCLVisualizer &v) { for (int ci = 0; ci < Detector::num_registration; ci++) { int vp; v.createViewPort(double(ci) / Detector::num_registration, 0, double(ci + 1) / Detector::num_registration, 1, vp); { stringstream ss; ss << "candidate_" << ci; v.addPointCloud(sentinel, visualization::PointCloudColorHandlerCustom<PointNormal>(sentinel, 0xc0, 0x00, 0x40), ss.str(), vp); } { stringstream ss; ss << "aligned_" << ci; v.addPointCloud(sentinel, visualization::PointCloudColorHandlerCustom<PointNormal>(sentinel, 0xc0, 0x00, 0x40), ss.str(), vp); } } } private: PointCloud<PointNormal>::ConstPtr sentinel; }; /** show a candidate model as the specified candidate */ class show_candidate { public: show_candidate(int ci, PointCloud<PointNormal>::ConstPtr candidate) : ci(ci), candidate(candidate) {} void operator()(visualization::PCLVisualizer &v) { { stringstream ss; ss << "candidate_" << ci; v.updatePointCloud(candidate, visualization::PointCloudColorHandlerCustom<PointNormal>(candidate, 0xc0, 0x00, 0x40), ss.str()); } { stringstream ss; ss << "aligned_" << ci; v.updatePointCloud(candidate, visualization::PointCloudColorHandlerCustom<PointNormal>(candidate, 0xc0, 0x00, 0x40), ss.str()); } } private: int ci; PointCloud<PointNormal>::ConstPtr candidate; }; /** show an aligned point cloud in the specified viewport */ class show_aligned { public: show_aligned(int ci, PointCloud<PointNormal>::ConstPtr aligned) : ci(ci), aligned(aligned) {} void operator()(visualization::PCLVisualizer &v) { stringstream ss; ss << "aligned_" << ci; v.updatePointCloud(aligned, visualization::PointCloudColorHandlerCustom<PointNormal>(aligned, 0xff, 0xff, 0xff), ss.str()); } private: int ci; PointCloud<PointNormal>::ConstPtr aligned; }; class visualization_callback { public: visualization_callback(int ci, visualization::CloudViewer *vis) : ci(ci), vis(vis) {} void operator()(const PointCloud<PointNormal> &cloud_src, const vector<int> &indices_src, const PointCloud<PointNormal> &cloud_tgt, const vector<int> &indices_tgt) { // make a copy of the cloud. expensive. PointCloud<PointNormal>::ConstPtr aligned (new PointCloud<PointNormal>(cloud_src)); vis->runOnVisualizationThreadOnce(show_aligned(ci, aligned)); } private: int ci; visualization::CloudViewer *vis; }; void Detector::train(PointCloud<PointNormal>::Ptr *models) { srand(time(NULL)); PointCloud<Signature>::Ptr features (new PointCloud<Signature>); for (int mi = 0; mi < Config::num_models; mi++) { Entry &e = database[mi]; e.cloud = models[mi]; timer.start(); e.indices = computeKeypoints(e.cloud); timer.stop(KEYPOINTS_TRAINING); timer.start(); e.features = obtainFeatures(mi, e.cloud, e.indices); timer.stop(OBTAIN_FEATURES_TRAINING); *features += *e.features; cout << "finished model " << mi << endl; } timer.start(); tree = KdTree<Signature>::Ptr(new KdTreeFLANN<Signature>()); tree->setInputCloud(features); timer.stop(BUILD_TREE); } typedef struct { int mi; float votes; } Candidate; bool operator<(const Candidate &a, const Candidate &b) { return a.votes > b.votes; // sort descending } int Detector::query(PointCloud<PointNormal>::Ptr scene, float *classifier, double *registration) { Entry e; e.cloud = scene; timer.start(); e.indices = computeKeypoints(e.cloud); timer.stop(KEYPOINTS_TESTING); timer.start(); e.features = computeFeatures(e.cloud, e.indices); timer.stop(COMPUTE_FEATURES_TESTING); // let each point cast votes timer.start(); memset(classifier, 0, Config::num_models * sizeof(*classifier)); for (int pi = 0; pi < e.indices->size(); pi++) { vector<int> indices; vector<float> distances; tree->nearestKSearch(*e.features, pi, max_votes, indices, distances); for (int ri = 0; ri < max_votes; ri++) { // do a linear search to determine which model // this will make sense when we switch to dense int index = indices[ri]; int mi; for (mi = 0; mi < Config::num_models; mi++) { if (index < database[mi].indices->size()) break; index -= database[mi].indices->size(); } // TODO: is this appropriate weighting? classifier[mi] += 1. / (distances[ri] + numeric_limits<float>::epsilon()); } } // get top candidates vector<Candidate> ballot(Config::num_models); for (int mi = 0; mi < Config::num_models; mi++) { ballot[mi].mi = mi; ballot[mi].votes = classifier[mi]; } sort(ballot.begin(), ballot.end()); timer.stop(VOTING_CLASSIFIER); if (vis.get()) { for (int ci = 0; ci < num_registration; ci++) { vis->runOnVisualizationThreadOnce(show_candidate(ci, database[ballot[ci].mi].cloud)); } } // run registration on top candidates memset(registration, 0, Config::num_models * sizeof(*registration)); double best = numeric_limits<double>::infinity(); int guess = -1; for (int ci = 0; ci < num_registration; ci++) { int mi = ballot[ci].mi; flush(cout << mi << ": " << ballot[ci].votes); registration[mi] = computeRegistration(e, mi, ci); cout << " / " << registration[mi] << endl; if (registration[mi] < best) { guess = mi; best = registration[mi]; } } for (int ci = num_registration; ci < Config::num_models; ci++) { cout << ballot[ci].mi << ": " << ballot[ci].votes << endl; } return guess; } void Detector::enableVisualization() { vis.reset(new visualization::CloudViewer("Detector Visualization")); PointCloud<PointNormal>::Ptr sentinel (new PointCloud<PointNormal>()); sentinel->points.push_back(PointNormal()); vis->runOnVisualizationThreadOnce(create_viewports(sentinel)); } void Detector::printTimer() { printf( "select training keypoints: %10.3f sec\n" "obtain training features: %10.3f sec\n" "build feature tree: %10.3f sec\n" "select testing keypoints: %10.3f sec\n" "compute testing features: %10.3f sec\n" "voting classifier: %10.3f sec\n" "initial alignment: %10.3f sec\n" "ICP: %10.3f sec\n", timer[KEYPOINTS_TRAINING], timer[OBTAIN_FEATURES_TRAINING], timer[BUILD_TREE], timer[KEYPOINTS_TESTING], timer[COMPUTE_FEATURES_TESTING], timer[VOTING_CLASSIFIER], timer[IA_RANSAC], timer[ICP] ); } IndicesPtr Detector::computeKeypoints(PointCloud<PointNormal>::Ptr cloud) { IndicesPtr indices (new vector<int>()); PointCloud<int> leaves; UniformSampling<PointNormal> us; us.setRadiusSearch(keypoint_separation); us.setInputCloud(cloud); us.compute(leaves); indices->assign(leaves.points.begin(), leaves.points.end()); // can't use operator=, probably because of different allocators return indices; } PointCloud<Detector::Signature>::Ptr Detector::computeFeatures(PointCloud<PointNormal>::Ptr cloud, IndicesPtr indices) { cout << "computing features on " << indices->size() << " points" << endl; PointCloud<Signature>::Ptr features (new PointCloud<Signature>()); FPFHEstimation<PointNormal, PointNormal, Signature> fpfh; fpfh.setRadiusSearch(0.1); fpfh.setInputCloud(cloud); fpfh.setIndices(indices); KdTree<PointNormal>::Ptr kdt (new KdTreeFLANN<PointNormal>()); fpfh.setSearchMethod(kdt); fpfh.setInputNormals(cloud); fpfh.compute(*features); if (features->points.size() != indices->size()) cout << "got " << features->points.size() << " features from " << indices->size() << " points" << endl; return features; } PointCloud<Detector::Signature>::Ptr Detector::obtainFeatures(int mi, PointCloud<PointNormal>::Ptr cloud, IndicesPtr indices) { char name[17]; sprintf(name, "feature_%04d.pcd", Proctor::models[mi].id); if (ifstream(name)) { PointCloud<Signature>::Ptr features (new PointCloud<Signature>()); io::loadPCDFile(name, *features); if (features->points.size() != indices->size()) cout << "got " << features->points.size() << " features from " << indices->size() << " points" << endl; return features; } else { PointCloud<Signature>::Ptr features = computeFeatures(cloud, indices); io::savePCDFileBinary(name, *features); return features; } } double Detector::computeRegistration(Entry &source, int mi, int ci) { Entry &target = database[mi]; typedef boost::function<void(const PointCloud<PointNormal> &cloud_src, const vector<int> &indices_src, const PointCloud<PointNormal> &cloud_tgt, const vector<int> &indices_tgt)> f; timer.start(); SubsetSAC_IA<PointNormal, PointNormal, Signature> ia_ransac_sub; PointCloud<PointNormal>::Ptr aligned (new PointCloud<PointNormal>()); ia_ransac_sub.setSourceIndices(source.indices); ia_ransac_sub.setTargetIndices(target.indices); ia_ransac_sub.setMinSampleDistance(0.05); ia_ransac_sub.setMaxCorrespondenceDistance(0.5); ia_ransac_sub.setMaximumIterations(256); ia_ransac_sub.setInputCloud(source.cloud); ia_ransac_sub.setSourceFeatures(source.features); ia_ransac_sub.setInputTarget(target.cloud); ia_ransac_sub.setTargetFeatures(target.features); if (vis.get()) { f updater (visualization_callback(ci, vis.get())); ia_ransac_sub.registerVisualizationCallback(updater); } ia_ransac_sub.align(*aligned); timer.stop(IA_RANSAC); timer.start(); IterativeClosestPoint<PointNormal, PointNormal> icp; PointCloud<PointNormal>::Ptr aligned2 (new PointCloud<PointNormal>()); icp.setInputCloud(aligned); icp.setInputTarget(target.cloud); icp.setMaxCorrespondenceDistance(0.1); icp.setMaximumIterations(64); if (vis.get()) { f updater (visualization_callback(ci, vis.get())); icp.registerVisualizationCallback(updater); } icp.align(*aligned2); timer.stop(ICP); return icp.getFitnessScore(); }
96f1d1011f85f66a316cca741466492b23e5479b
8f50c262f89d3dc4f15f2f67eb76e686b8f808f5
/Generators/GeneratorFilters/src/FourLeptonMassFilter.cxx
93dadaec833af29bb5d6e30169f87c54128bf79d
[ "Apache-2.0" ]
permissive
strigazi/athena
2d099e6aab4a94ab8b636ae681736da4e13ac5c9
354f92551294f7be678aebcd7b9d67d2c4448176
refs/heads/master
2022-12-09T02:05:30.632208
2020-09-03T14:03:18
2020-09-03T14:03:18
292,587,480
0
1
null
null
null
null
UTF-8
C++
false
false
5,996
cxx
FourLeptonMassFilter.cxx
/* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ #include "GeneratorFilters/FourLeptonMassFilter.h" FourLeptonMassFilter::FourLeptonMassFilter(const std::string& name, ISvcLocator* pSvcLocator) : GenFilter(name,pSvcLocator) { declareProperty("MinPt", m_minPt = 5000.); declareProperty("MaxEta", m_maxEta = 3.0); declareProperty("MinMass1", m_minMass1 = 60000); // To avoid fsr etc declareProperty("MaxMass1", m_maxMass1 = 14000000); declareProperty("MinMass2", m_minMass2 = 12000); // To avoid fsr etc declareProperty("MaxMass2", m_maxMass2 = 14000000); declareProperty("AllowElecMu", m_allowElecMu = true); declareProperty("AllowSameCharge", m_allowSameCharge = true); } StatusCode FourLeptonMassFilter::filterInitialize() { ATH_MSG_DEBUG("MinPt " << m_minPt); ATH_MSG_DEBUG("MaxEta " << m_maxEta); ATH_MSG_DEBUG("MinMass1 " << m_minMass1); ATH_MSG_DEBUG("MaxMass1 " << m_maxMass1); ATH_MSG_DEBUG("MinMass2 " << m_minMass2); ATH_MSG_DEBUG("MaxMass2 " << m_maxMass2); ATH_MSG_DEBUG("AllowElecMu " << m_allowElecMu); ATH_MSG_DEBUG("AllowSameCharge " << m_allowSameCharge); return StatusCode::SUCCESS; } StatusCode FourLeptonMassFilter::filterEvent() { McEventCollection::const_iterator itr; for (itr = events()->begin(); itr!=events()->end(); ++itr) { const HepMC::GenEvent* genEvt = *itr; auto genEvt_particles_begin = HepMC::begin(*genEvt); auto genEvt_particles_end = HepMC::begin(*genEvt); for (auto pitr1 = genEvt_particles_begin; pitr1 != genEvt_particles_end; ++pitr1) { if ((*pitr1)->status() != 1) continue; // Pick electrons or muons with Pt > m_inPt and |eta| < m_maxEta int pdgId1((*pitr1)->pdg_id()); if (!(abs(pdgId1) == 11 || abs(pdgId1) == 13)) continue; if (!((*pitr1)->momentum().perp() >= m_minPt && std::abs((*pitr1)->momentum().pseudoRapidity()) <= m_maxEta)) continue; // Loop over all remaining particles in the event auto pitr2 = pitr1; pitr2++; for (; pitr2 != genEvt_particles_end; ++pitr2) { if ((*pitr2)->status()!=1 || pitr1 == pitr2) continue; // Pick electrons or muons with Pt > m_inPt and |eta| < m_maxEta int pdgId2((*pitr2)->pdg_id()); if (!(std::abs(pdgId2) == 11 || abs(pdgId2) == 13)) continue; if (!((*pitr2)->momentum().perp() >= m_minPt && std::abs((*pitr2)->momentum().pseudoRapidity()) <= m_maxEta)) continue; // Loop over all remaining particles in the event auto pitr3 = pitr2; pitr3++; for (; pitr3 != genEvt_particles_end; ++pitr3) { if ((*pitr3)->status()!=1 || pitr1 == pitr3 || pitr2 == pitr3 ) continue; // Pick electrons or muons with Pt > m_inPt and |eta| < m_maxEta int pdgId3((*pitr3)->pdg_id()); if (!(std::abs(pdgId3) == 11 || std::abs(pdgId3) == 13)) continue; if (!((*pitr3)->momentum().perp() >= m_minPt && std::abs((*pitr3)->momentum().pseudoRapidity()) <= m_maxEta)) continue; // Loop over all remaining particles in the event auto pitr4 = pitr3; pitr4++; for (; pitr4 != genEvt_particles_end; ++pitr4) { if ((*pitr4)->status()!=1 || pitr1 == pitr4 || pitr2 == pitr4 || pitr3 == pitr4) continue; // Pick electrons or muons with Pt > m_inPt and |eta| < m_maxEta int pdgId4((*pitr4)->pdg_id()); if (!(std::abs(pdgId4) == 11 || abs(pdgId4) == 13)) continue; if (!((*pitr4)->momentum().perp() >= m_minPt && std::abs((*pitr4)->momentum().pseudoRapidity()) <= m_maxEta)) continue; decltype(pitr1) apitr[4] = {pitr1,pitr2,pitr3,pitr4}; int pdgIds[4]={pdgId1,pdgId2,pdgId3,pdgId4}; for (int ii = 0; ii < 4; ii++) { for (int jj = 0; jj < 4; jj++) { if (jj == ii) continue; for (int kk = 0; kk < 4; kk++) { if (kk == jj || kk == ii) continue; for (int ll = 0; ll < 4; ll++) { if (ll == kk || ll == jj|| ll == ii) continue; if (!m_allowElecMu && (abs(pdgIds[ii])!=abs(pdgIds[jj]) || abs(pdgIds[kk])!=abs(pdgIds[ll]))) continue; if (!m_allowSameCharge && (pdgIds[ii]*pdgIds[jj]>0. || pdgIds[kk]*pdgIds[ll]>0.)) continue; // Leading dilepton pair HepMC::FourVector vec((*(apitr[ii]))->momentum().px() + (*(apitr[jj]))->momentum().px(), (*(apitr[ii]))->momentum().py() + (*(apitr[jj]))->momentum().py(), (*(apitr[ii]))->momentum().pz() + (*(apitr[jj]))->momentum().pz(), (*(apitr[ii]))->momentum().e() + (*(apitr[jj]))->momentum().e() ); double invMass1 = vec.m(); if (invMass1 < m_minMass1 || invMass1 > m_maxMass1) continue; ATH_MSG_DEBUG("PASSED FILTER1 " << invMass1); // Sub-leading dilepton pair HepMC::FourVector vec2((*(apitr[kk]))->momentum().px() + (*(apitr[ll]))->momentum().px(), (*(apitr[kk]))->momentum().py() + (*(apitr[ll]))->momentum().py(), (*(apitr[kk]))->momentum().pz() + (*(apitr[ll]))->momentum().pz(), (*(apitr[kk]))->momentum().e() + (*(apitr[ll]))->momentum().e() ); double invMass2 = vec2.m(); if (invMass2 < m_minMass2 || invMass2 > m_maxMass2) continue; ATH_MSG_DEBUG("PASSED FILTER2 " << invMass2); return StatusCode::SUCCESS; } } } } } } } } } setFilterPassed(false); return StatusCode::SUCCESS; }
948bed53a5e74c3bfc9faa38667a7032bdc26f56
f957a687dbb54e40f3f6ff1a57e0a172822d903d
/CPU.h
72403f0a845d3630ef5bd62258e01e8750c96e77
[]
no_license
tectronics/theft
c5e5ad252265355d6609bbbc111858d75d310831
5bd20d3e6e2b7adfe334e46810722a81892fa56b
refs/heads/master
2018-01-11T15:15:32.277740
2008-05-31T21:43:02
2008-05-31T21:43:02
45,602,492
0
0
null
null
null
null
UTF-8
C++
false
false
252
h
CPU.h
#pragma once #include "player.h" #include "define.h" class CCPU : public CPlayer { public: CCPU(void); ~CCPU(void); int GetState() {return m_State;}; void SetState(_CPU_STATE a) {m_State = a;}; private: _CPU_STATE m_State; };
085f6ee82828b4c32a67f84ec2a7d084016f98df
2af28d499c4865311d7b350d7b8f96305af05407
/inference-engine/thirdparty/movidius/tests/XLink/cases/XLink_tests_case.hpp
26e223717c177c4b6c32184d69b8ff29cabae278
[ "Apache-2.0" ]
permissive
Dipet/dldt
cfccedac9a4c38457ea49b901c8c645f8805a64b
549aac9ca210cc5f628a63174daf3e192b8d137e
refs/heads/master
2021-02-15T11:19:34.938541
2020-03-05T15:12:30
2020-03-05T15:12:30
244,893,475
1
0
Apache-2.0
2020-03-04T12:22:46
2020-03-04T12:22:45
null
UTF-8
C++
false
false
3,491
hpp
XLink_tests_case.hpp
// Copyright (C) 2018-2019 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #pragma once #include "gtest/gtest.h" #include "XLink.h" #include "XLink_tests_helpers.hpp" //------------------------------------------------------------------------------ // class XLinkTests //------------------------------------------------------------------------------ class XLinkTests : public ::testing::Test { public: static void SetUpTestCase(); }; //------------------------------------------------------------------------------ // class XLinkBootUSBTests //------------------------------------------------------------------------------ class XLinkBootUSBTests : public XLinkTestsHelpersBoot, public XLinkTests { protected: void SetUp() override; }; //------------------------------------------------------------------------------ // class XLinkOneDeviceUSBTests //------------------------------------------------------------------------------ class XLinkOneDeviceUSBTests : public XLinkTestsHelpersOneUSBDevice, public XLinkTests {}; //------------------------------------------------------------------------------ // class XLinkOpenStreamUSBTests //------------------------------------------------------------------------------ class XLinkOpenStreamUSBTests : public XLinkOneDeviceUSBTests { void SetUp() override; void TearDown() override ; }; //------------------------------------------------------------------------------ // class XLinkFindFirstSuitableDeviceUSBTests //------------------------------------------------------------------------------ class XLinkFindFirstSuitableDeviceUSBTests : public XLinkBootUSBTests {}; //------------------------------------------------------------------------------ // class XLinkFindAllSuitableDevicesTests //------------------------------------------------------------------------------ class XLinkFindAllSuitableDevicesTests : public XLinkBootUSBTests {}; //------------------------------------------------------------------------------ // class XLinkResetAllUSBTests //------------------------------------------------------------------------------ class XLinkResetAllUSBTests : public XLinkBootUSBTests {}; //------------------------------------------------------------------------------ // class XLinkConnectUSBTests //------------------------------------------------------------------------------ class XLinkConnectUSBTests : public XLinkBootUSBTests {}; //------------------------------------------------------------------------------ // class XLinkNullPtrTests //------------------------------------------------------------------------------ class XLinkNullPtrTests: public XLinkTests {}; //------------------------------------------------------------------------------ // class XLinkFindPCIEDeviceTests //------------------------------------------------------------------------------ class XLinkFindPCIEDeviceTests: public XLinkBootUSBTests { public: static deviceDesc_t getPCIeDeviceRequirements(); int available_devices = 0; protected: void SetUp() override; }; //------------------------------------------------------------------------------ // class XLinkResetRemoteUSBTests //------------------------------------------------------------------------------ class XLinkResetRemoteUSBTests : public XLinkTestsHelpersBoot, public XLinkTests {};
ed2bf2f901d855e4c172897a5f72c498615381d6
00f1ccbe095de1611e48a91b199c0edc93220e25
/SetOnceVariable_Template.h
f149cb4cd819a40fc8d60e1f0539460d3f55d4ee
[]
no_license
romintomasetti/Effect-of-electromagnetic-radiation-on-the-brain
81e6bb5e5b2f3761188b8f3779055413fefe566d
20fbec2c3768205068288ffbaeecd8c037fb41e4
refs/heads/master
2018-07-17T06:46:49.186204
2018-06-01T18:03:03
2018-06-01T18:03:03
120,669,952
3
4
null
2018-04-26T11:53:43
2018-02-07T20:50:01
C++
UTF-8
C++
false
false
1,201
h
SetOnceVariable_Template.h
/* This is a template for providing variables that can be set only once */ /* That is, when it has been set once, it can never be changed. */ #ifndef SETONCEVARIABLE_TEMPLATE_H #define SETONCEVARIABLE_TEMPLATE_H #include <iostream> #include <typeinfo> #include <stdio.h> #include <stdlib.h> template<typename T> class SetOnceVariable_Template{ private: T value; bool alreadySet = false; public: // Default constructor: SetOnceVariable_Template(){}; // Constructor: SetOnceVariable_Template(T init){ this->value = init; this->alreadySet = true; }; // Destructor: ~SetOnceVariable_Template(void){}; // Set the value / overloading of the '=' operator: SetOnceVariable_Template<T>& operator=(const T& value){ if(this->alreadySet == false){ this->value = value; this->alreadySet = true; }else{ fprintf(stderr,"In %s :: %s :: variable has already been set. Aborting.\n", typeid(this).name(), __FUNCTION__); fprintf(stderr,"File %s:%d\n",__FILE__,__LINE__); abort(); } return *this; } // Get the value: const T& get(void){return this->value;} // bool get_alreadySet(void){ return this->alreadySet; } }; #endif
33de488ab6eb00600d33aa6c8bf6ef74cb0d27a2
13c905cf85bdcbfbbbaec327c06b07056393cd36
/presentations/work-summer.tpp
2eec8bf08111ec44dabecfc79428621f9ce04014
[]
no_license
vrthra/java-clones
5292619af242a816601062771d21085450dafea8
e276fc3040f30ebd9cd238b61d0b30628f4b238a
refs/heads/master
2021-01-20T07:15:25.700189
2012-10-24T01:07:33
2012-10-24T01:07:33
null
0
0
null
null
null
null
UTF-8
C++
false
false
15,861
tpp
work-summer.tpp
--title Test Recommendation --author Rahul Gopinath <gopinath@eecs.oregonstate.edu> --##--footer Repository: https://github.com/vrthra/java-clones/ --newpage Why --heading Why --horline * We are lazy --- * A survey on programmers found that very few actually test code. * Testing is tedious and boring[1], not worth the time spent. * Developers want better tools for writing test cases, especially on reused code. * 75% felt that their test cases were not good enough. * 48% rarely test their code [1]. --- * Usually copy and paste if we can find similar, but forget the tests * Reinvent the wheel often times (Not Invented Here), but postpone testing * We can increase the quality of the code if we can adapt test cases --- * But even a little testing can increase the quality of code by preventing regression --horline [1]: A Survey on Testing and Reuse / ICS03 --newpage Easy --heading Easy --horline * Write the snippet --- * Check for similar snippets in the repository --- * Steal its test case --- --beginslideleft --fgcolor yellow * Profit! --fgcolor white --endslideleft --newpage Reuse --heading Reuse --horline * 53% of Survey[1] said they had some elements of reuse. * Of these only 34% tested the reused code[1]. * 36% actively search for snippets to reuse[1]. * 46% likes to rewrite code rather than reuse[1] --newpage Find Similarities --heading Find Similarities --horline * Program Comprehension * Clone Detection * Spam Detection --newpage Program Comprehension --heading Program Comprehension --horline * Linguistics * Rule Based * Cliches (Snippets) + Advice * Similar Execution Trace (Dynamic) * Vector based Decision tree classifier (*ICPC 2010) --horline --- --boldon --color red Problems --boldoff --color white - Mostly from 1990 --##--- - Very difficult to get implementations --##--- - Analysis - if any - done on trivial projects (<1kloc) --##--- --newpage SpamSpam Detection/Text Classification --heading Spam Detection/Text Classification --horline * Not specific to programs * But has good approaches, e.g fast fingerprinting (related code has similar hashes : high locality) --newpage Clone Detection --heading Clone Detection --horline * Metrics based * Halstead Metrics * Text Based (Usually with normalization) * Lines (with checsum and treating single lines as unit) * Tokens * Graph Based * AST Subgraph matching * PDG Slices * Linguistics * Comments and Names * Hybrid --newpage Clone Detection Tools --heading Clone Detection Tools --horline --color green * Simian --color white * CPD * Clone Digger * Checkstyle * ConQAT * CloneDr * Duplo * ... --horline The industry standard is Simian, and of the tools I tried to use, it is the fastest. --newpage Strategy --heading Strategy --horline --beginoutput Run Simian for each pair of projects we have, Look at each instance of duplication reported by it; Run coverage analysis to get the test covering the duplicate snippets. If duplication on one side is missing, then copy the test case covering it to the other project. --endoutput --newpage Strategy --heading Strategy --horline - Mean 31.52% (Median 20.61%) - However it included a large number of projects with no tests at all. - So we cleaned up projects that were less than 1000 loc, and had test coverage near zero. > txtplot(x[order(x$coverage_percentage),]$coverage_percentage, width=80) +--+----------+----------+----------+----------+----------+----------+-----+ 100 + ** + | **** | | **** | 80 + ******* + | ****** | | ***** | 60 + ***** + | ***** | | ***** | | *** | 40 + *** + | *** | | ****** | 20 + ****** + | **** | | **** | 0 + ****** + +--+----------+----------+----------+----------+----------+----------+-----+ 0 50 100 150 200 250 300 --newpage Only those who made an effort to test --heading Only those who made an effort to test --horline --boldon Densitiy plot of coverage% --boldoff r| txtdensity(cov[cov$coverage_percentage > 0,]$coverage_percentage,width=80) +--+------------+------------+------------+-------------+------------+---+ 0.012 + ********* + | **** ** | | **** ** | | ** *** * | 0.01 + ***** **** *** * + | *** *** *** ** | | ** *** *** ** | | ** ********* ** | 0.008 + * * + | ** * | | ** ** | 0.006 + ** ^ ** + | | ** | | probabilty of this value as the % for a random project * | | ** | 0.004 + ** + | coverage% -> ** | +--+------------+------------+------------+-------------+------------+---+ 0 20 40 60 80 100 - Mean without 0's = 50.202 (Median 53.434) --newpage Similarity --heading Similarity --horline * First tried with Javascript * Too much pseudo-duplication (too much noise) * Java was better, analysis of 100 best coverage X 130 randomly selected * Found too many getters/setters, array constructors * Stricter match criteria discarded a lot of possible cases - yet - 679 getters/setters - 186 equals/hashCode matches - 2 Copies of files (Base64.java,GraphMLWriter) with tests in one project - one shared (readFileAsString) but no tests - Results too low to be graphed - Too slow to run on large repositories --newpage Epiphani --heading Epiphani --horline --color red --boldon We are doing it wrong. --boldoff --color white * Clone detection looks for copied code. In particular it tries hard to avoid detecting code that is similar in intent but not cloned. * We want the opposite. * We just want programs that are similar. * We can just look at the type signature and names to get those. * We dont care about the structure of the program (unlike clone detection) but about intent. * We can use invariants to detect that. * There are automatic invariant detectors like Daikon that will help us there. --horline Invariants: --beginoutput { x > 10, y == 20} y = x+1 { x > 10, y > 11 } --endoutput --newpage Similarity Results (Same Signature) --heading Similarity Results (Same Signature) --horline * Eliminated duplicate projects (file name dups > 50%) * Eliminated test classes from methods defined by project. --boldon Densitiy plot of shared functions% (shared signature) --boldoff r| txtdensity(cov$share_percentage_fn ,width=80) +--+-------------+------------+------------+------------+-------------+---+ 0.04 + **** + | * ** | | * * | | ** * | 0.03 + ** * + | ** * | | * ** shared fn% -> | | ** * | 0.02 + ** ** + | * ** | | ** *** | | ** ** | 0.01 + * ** + | ** *** | | *** ******* | | ***** | 0 + ****************************** + +--+-------------+------------+------------+------------+-------------+---+ 0 20 40 60 80 100 - Median shared functions: 21.36%, Mean : 23.98% --newpage Similarity Results (Same Signature) - problems --heading Similarity Results (Same Signature) - problems --horline - Generic naems - Methods like toString, main, getName, getId etc have the same signature but that does not mean they are similar. (need to use invariant detection here.) - Functions are not self contained: - Especially for above methods, object state becomes important. It is not clear how to deal with that. --newpage Both --heading Both --horline - Used the signatures as a guide, and used similarity measures to check the similarity between functions with same signature. - Results better than using simian alone, still not a lot. --newpage Upperbound --heading Upperbound --horline Aim: To find an upper bound for increase in coverage. projectA/addFn (high coverage) --beginoutput 1aaaaa 2bbbbb 3ccccc 4ddddd 5eeeee --endoutput - Has 20% coverage from testAddFn (say 12) - Contributes 5% of the projectA:loc projectB/addFn (low coverage) --beginoutput 0zzzzz 1aaaaa 2bbbbb 3ccccc 4ddddd --endoutput - Contributes 10% of the projectB:loc Then we have 1234 that mathed; Copying testAddFn to projectB would increase the %coverage by two lines (assuming that it was not covered earlier by other test cases). --newpage cont So the new coverage of projectB would be --beginoutput projectB:originalcov_ = projectB:orig_coveredloc_ / projectB:totalloc_ projectB:newcov = projectB:new_coveredloc / projectB:totalloc_ projectB:new_coveredloc = projectB:orig_coveredloc_ + (projectA/testAddFn:contrib_lines - projectB/testAddFn:cov%addFn_) projectA/testAddFn:contrib_lines = projectA/testAddFn%cov (And) projectB/addFn_ --endoutput --newpage Current Status --heading Current Status --horline It is hard to obtain line-coverage per Test case. - Emma which I was using, has it buried deep in horrible html soup. - Codecover (FOSS), and Clover (Commercial) are the ones who provide test specific data, - unable to get either of them to work well with apache maven, which is what we are running. - fell back to the simple strategy of iterating through test cases, running them one by one and collecting coverage, but it is time intensive. - Finding the intersection of projectA:method1 and projectB:method1 is difficult (variable names, space etc are normalized before compare) - What I have: - Test coverage per test case of each method in the projects analyzed, - Methods that are similar to given method in each of these. - From the above, tests that cover these similar methods. - Shooting for Function Coverage. --beginoutput function_coverage = functions_cov_ / functions_total_ function_coverage_new = functions_newly_cov + functions_cov_ / functions_total_ functions_newly_cov = (functions_total_ - functions_cov_) A (covered_repo_functions) --endoutput --newpage Function Coverage --heading Function Coverage --horline +--+-------------------+-------------------+-------------------+-----------+ 100 + . . ...... + | . . . ........ | | . . . ............ | 80 + . . . ............//./ + | . ... .. ......../../// | | . .......... .. ///// | 60 | . . .. . . .. ./// | 60 + . . . ..... ././// + | . . . . ..........././ | | . . .. .........../// | 40 + . .... ...... /// Legend + | . . .. ... . //./ / Old Coverage | | . . . ../////. ^ . New Coverage | 20 | . .. .... .//// | | 20 + .......///. percentage coverage + | ... .//.// rank -> | 0 | /..// | +--+-------------------+-------------------+-------------------+-----------+ 0 100 200 300 Old New Median 51.3 69.1 Mean 49.9 63.9 --newpage Recommendations --heading Recommendations --horline - Used a parser to obtain the calls made from each test class. - No type information unfortunately, so it is even less reliable - Still working on it. --newpage Near Future --heading Near Future --horline - Incorporting Invariants to ensure that the unit tests are indeed applicable - Of the recommendations collected, how many can make it to actual unittests? --newpage Future --heading Future --horline - Both method signatures and Invariants do not preclude recommendations across language boundaries (unlike clone detection) - What can we do about tests that require object states? - Can we automatecally adapt the test cases? - Can we understand the program sufficiently enough to identify variants? - And track these variants so that the origin is identified? - Fingerprinting? - Is code coverage a good metric? Should we look at which properties are satisfied instead? - We get good code coverage if we rely on clone detection - good property coverage if we rely on types and invariants.
ce452e99c78e4c08e23f21783e038ad9527e043e
2e3bc5b5c60ed2d5cbdf7b66f6ffe2502207e605
/SMD0080/068_objLoaderDesignPatterns/src/loader/textFileParser.cpp
9d811af93fc275dd6ed6a825ecc8a927762be100
[]
no_license
Tiago24/SMD
c120daca5b6be0b07773e2b5d9e8f15ceecbeff6
ba24efa31ebf3c439749803eb1d42cf635bc8099
refs/heads/master
2020-03-18T07:04:18.932213
2018-05-19T02:30:29
2018-05-19T02:30:29
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,819
cpp
textFileParser.cpp
#include <loader/textFileParser.h> // -------------------------------------------------------------------------- // LineBasedParsingCommand // -------------------------------------------------------------------------- LineBasedParsingCommand::LineBasedParsingCommand( const char* pref) : _prefix(pref) { } // -------------------------------------------------------------------------- LineBasedParsingCommand::~LineBasedParsingCommand() { } // -------------------------------------------------------------------------- bool LineBasedParsingCommand::acceptsLine(String& line) { if( line.find( _prefix ) == 0 ) { line.erase( 0, _prefix.size() ); return true; } return false; } // -------------------------------------------------------------------------- // TexFileParser // -------------------------------------------------------------------------- TextFileParser::TextFileParser(const String& fn) : filename(fn), is(fn), lineCommands() { } // -------------------------------------------------------------------------- TextFileParser::~TextFileParser() { } // -------------------------------------------------------------------------- void TextFileParser::trim( String& str, const char* delims ) { // direita primeiro, para dar espaço size_t endpos = str.find_last_not_of(delims); if( String::npos != endpos ) { str = str.substr( 0, endpos+1 ); } // trim espaços à esquerda size_t startpos = str.find_first_not_of(delims); if( String::npos != startpos ) { str = str.substr( startpos ); } } // -------------------------------------------------------------------------- String TextFileParser::getBaseDir(void) const { size_t pos = filename.find_last_of("\\/"); if( pos != String::npos) return filename.substr( 0, pos+1); return String(); } // -------------------------------------------------------------------------- bool TextFileParser::parse() { if( !is.is_open() ) { std::cerr << "[ERROR] cannot open \'" << filename << "\'"; return true; } String line; line.reserve( 512 ); // vai até o fim while( !is.eof() ) { // lê a linha do arquivo std::getline( is, line ); // remove caracteres vazios TextFileParser::trim( line ); if( line.empty() || line[0] == '#' ) continue; if( _processLine(line) ) { std::cerr << "Erro na linha \n" <<line << std::endl; return true; } } return false; } // -------------------------------------------------------------------------- bool TextFileParser::_processLine( String& line ) { for( auto ptr: lineCommands ) { LineBasedParsingCommand& pbcm = *ptr; String prev = line; if( pbcm.acceptsLine(line) ) { //std::cout << "NHAM! " << prev << std::endl; return pbcm.processLine(*this, line); } } return false; } // --------------------------------------------------------------------------
631a423cc933ee7af867d576515b51f0ce90792d
e55f8545f4a133a63800297bc83e3080082b7a11
/include/Tcp_server.h
5dc68958da373db3fe207d182ca02d4956ae8219
[]
no_license
frankwyw7/Calliope
c0a7e523308f835ed241558fd14a1d4d7c2ea878
8d5e1543c275257f469dacc8c49ec9469a78fce4
refs/heads/master
2021-05-31T22:29:48.282706
2016-08-12T19:17:36
2016-08-12T19:17:36
null
0
0
null
null
null
null
UTF-8
C++
false
false
908
h
Tcp_server.h
#ifndef __TCP__SERVER__H__ #define __TCP__SERVER__H__ #include <memory> namespace honoka { class Reactor; class Acceptor; class Configuration; class Connection_processor; class Tcp_server { public: Tcp_server(int thread_pool_size = 1); //读取json,更新config,reactor,acceptor更新相关,包括各种事件的处理 //acceptor设置监听,添加进epoller void init(std::string configfilename); void init(); // void run(); void set_conn_processor(std::shared_ptr<Connection_processor> conn_processor); //信号处理 void reset_config(); void stop(); void go_on(); void shutdown(); private: std::shared_ptr<Configuration> config_; std::shared_ptr<Reactor> reactor_; std::shared_ptr<Acceptor> acceptor_; }; } #endif
0b020e54011cfd5edb34390320df7073a168855a
ee7ea642b0b6e4d64804efd71b342951f74ea7c8
/brep_application.cpp
13e358b438ee34a1bb8080bad421ffe75bb97fad
[]
no_license
yamanatoo/brep_application
4428c2808b81537fb7b77538cdfb7136463ea498
d9c91e70558d68e1f3d0c5bf47ff470b443356d7
refs/heads/master
2022-11-16T12:21:34.216465
2020-07-15T13:08:56
2020-07-15T13:08:56
279,871,926
0
0
null
null
null
null
UTF-8
C++
false
false
1,575
cpp
brep_application.cpp
// // Project Name: Kratos // Last Modified by: $Author: hbui $ // Date: $Date: Oct 25, 2014$ // Revision: $Revision: 1.0 $ // // //Change log: // + 28/7/2015: create brep_application.cpp // System includes // External includes // Project includes #include "brep_application.h" // #include "geometries/triangle_2d_3.h" namespace Kratos { KRATOS_CREATE_VARIABLE( boost::python::object, LOAD_FUNCTION ) KRATOS_CREATE_VARIABLE( int, CUT_STATUS ) KRATOS_CREATE_VARIABLE( double, CURVE_SEARCH_TOLERANCE ) KRATOS_CREATE_VARIABLE( int, CURVE_MAX_ITERATIONS ) KRATOS_CREATE_VARIABLE( double, CURVE_LOWER_BOUND ) KRATOS_CREATE_VARIABLE( double, CURVE_UPPER_BOUND ) KRATOS_CREATE_VARIABLE( int, CURVE_NUMBER_OF_SAMPLING ) KratosBRepApplication::KratosBRepApplication() : KratosApplication() {} void KratosBRepApplication::Register() { // calling base class register to register Kratos components KratosApplication::Register(); std::cout << "Initializing KratosBRepApplication... " << std::endl; // register variables to Kratos kernel KRATOS_REGISTER_VARIABLE( LOAD_FUNCTION ) KRATOS_REGISTER_VARIABLE( CUT_STATUS ) KRATOS_REGISTER_VARIABLE( CURVE_SEARCH_TOLERANCE ) KRATOS_REGISTER_VARIABLE( CURVE_MAX_ITERATIONS ) KRATOS_REGISTER_VARIABLE( CURVE_LOWER_BOUND ) KRATOS_REGISTER_VARIABLE( CURVE_UPPER_BOUND ) KRATOS_REGISTER_VARIABLE( CURVE_NUMBER_OF_SAMPLING ) } } // namespace Kratos
fbc94e1480eb194c3ec53c0a99519cd0b2d1b029
5b79e29dd7be6ca7577b0e84a2c906fade7e0b69
/optional.hpp
d50727cd0ef1d032352ba306420d8882ac899bb8
[]
no_license
eugeneyche/index-pool
18f6dd6fbd500d7569d48412aa426c942c3b0bd4
2c1cb8f1b4da1ad22dbe390af2cb370ba7d9a498
refs/heads/master
2022-12-22T18:23:52.538418
2016-12-17T08:23:30
2016-12-17T08:27:19
null
0
0
null
null
null
null
UTF-8
C++
false
false
951
hpp
optional.hpp
#pragma once #include <memory> #include <stdexcept> #include <sstream> template <typename T> class Optional { public: Optional(); Optional(const T& value); Optional(T&& value); Optional(const Optional& other) = default; Optional(Optional&& other) = default; virtual ~Optional() = default; Optional& operator=(const Optional& other) = default; Optional& operator=(Optional&& other) = default; inline bool has_value() { return has_value_; } T& unwrap(); private: bool has_value_; T value_; }; template <typename T> Optional<T>::Optional() : has_value_ {false} { } template <typename T> Optional<T>::Optional(const T& value) : has_value_ {true} , value_ {value} { } template <typename T> Optional<T>::Optional(T&& value) : has_value_ {true} , value_ {std::move(value)} { } template <typename T> T& Optional<T>::unwrap() { if (not has_value_) { throw std::logic_error("Cannot unwrap empty Optional."); } return value_; }
2d4c17b564c36c00540872ffde0f450b11baf1a0
47cec727aa95560ac54184fccab50d1a6c727083
/ReEngine/src/Runtime/RHI/IShader.h
b361e44c906cfce58237cee6e9e2898bf98cd499
[]
no_license
kingdomheartstao/Renderer-Learning
303cd8f054178dfdc629d81f3569c7fcb2b1eb1d
b35f963414a4dabf6d2fd9ab7dee278ecf38284a
refs/heads/master
2023-07-28T01:07:32.919132
2021-09-10T09:24:46
2021-09-10T09:24:46
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,062
h
IShader.h
#pragma once #include <string> #include <vector> #include "IRHIResources.h" #include "RHI_API.h" class Matrix4x4; class Matrix3x3; class IShader : public IRHIResources { public: //Set Uniforms virtual void SetUniform1f(const std::string& name, float v0) = 0; virtual void SetUniform2f(const std::string& name, float v0, float v1) = 0; virtual void SetUniform3f(const std::string& name, float v0, float v1, float v2) = 0; virtual void SetUniform4f(const std::string& name, float v0, float v1, float v2, float v3) = 0; virtual void SetUniform1i(const std::string& name, uint32_t v0) = 0; virtual void SetUniform2i(const std::string& name, uint32_t v0, uint32_t v1) = 0; virtual void SetUniform3i(const std::string& name, uint32_t v0, uint32_t v1, uint32_t v2) = 0; virtual void SetUniform4i(const std::string& name, uint32_t v0, uint32_t v1, uint32_t v2, uint32_t v3) = 0; virtual void SetUniformMatrix3(const std::string& name, std::vector<float>& mat) = 0; virtual void SetUniformMatrix4(const std::string& name, std::vector<float>& mat) = 0; };
d2bcdce9b8142a618acf91296befa84018b34fbc
3a7b62c2d94746d2a1309e87a5222b90c93f6590
/PlanetaEngine/src/planeta/core/InputUtility.hpp
1f3f6d90d7c992430a3739db06cd6f216efcbc5a
[ "MIT" ]
permissive
CdecPGL/PlanetaEngine
8d49b5a3514be2cbb9f40edd0753d6027c00dbf1
b15d5b13c3b2aee886d3f92d13777f1b12860260
refs/heads/master
2021-05-11T20:20:09.199919
2018-01-14T13:42:38
2018-01-14T13:42:38
117,433,139
0
0
null
null
null
null
UTF-8
C++
false
false
443
hpp
InputUtility.hpp
#pragma once #include<string> #include"InputDefinitions.hpp" namespace plnt { namespace private_ { namespace utils { std::string ConvertKeyToString(Key::type); std::string ConvertPadToString(Pad::type); std::string ConvertButtonToString(Button::type); Key::type ConvertStringToKey(const std::string&); Pad::type ConvertStringToPad(const std::string&); Button::type ConvertStringToButton(const std::string&); } } }
c2b91e9118cf4dcf892238552b7975785f7be335
b0893dbcad94f7677871bd77a1f7f9abfc40cc46
/example/check/geometry/ellipse/check.cpp
63b13f7b0a3c9bb41b34aef9977e6d30a9c79ade
[ "Apache-2.0" ]
permissive
dmilos/math
71124fc3e750eae5bf5fb787ff371573bb9e2464
41131d481d8112eda4f71a86a0effe7c3154a17e
refs/heads/master
2023-04-28T05:48:20.038227
2023-04-22T17:43:09
2023-04-22T20:26:09
140,083,004
2
1
null
null
null
null
UTF-8
C++
false
false
954
cpp
check.cpp
#include <iostream> #include <iomanip> #include <string> #include "math/math.hpp" using namespace std; int main( int argc, char *argv[] ) { cout << "Hello World" << endl; ::math::linear::vector::point<double,2> point; ::math::geometry::direction::parametric<double,2> direction; ::math::geometry::ellipse::base2D<double> b; ::math::geometry::ellipse::simple2D<double> s; ::math::geometry::ellipse::general2D<double> g; g = g; g= s; g = b; s = s; s = b; ::math::geometry::ellipse::distance( b, point ); ::math::geometry::ellipse::distance( s, point ); ::math::geometry::ellipse::distance( g, point ); double l0, l1; ::math::geometry::ellipse::intersect( l0, l1, b, direction ); ::math::geometry::ellipse::intersect( l0, l1, s, direction ); ::math::geometry::ellipse::intersect( l0, l1, g, direction ); return EXIT_SUCCESS; }
165098462ff07ee0b1d9ed802c85399ba27620ca
9891c65690bfc3d774285ccfbd4733c2ad249d5a
/ok/ok/MainForm.h
5fc156b92cbbf90cbbb0dc709c6bcf2606d2b1cc
[]
no_license
saki21/saki21
55569cdebd012b861f7b0ca9843caf1a404df0cc
f50ef1b9c5ac305f4edce6a4502ecc6afd104a34
refs/heads/master
2021-01-19T07:53:59.989872
2010-10-09T15:22:16
2010-10-09T15:22:16
null
0
0
null
null
null
null
SHIFT_JIS
C++
false
false
21,704
h
MainForm.h
#pragma once namespace ok { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; /// <summary> /// MainForm の概要 /// </summary> #define OFF listView1->off() #define ON listView1->on() public ref class MainForm : public System::Windows::Forms::Form { private: System::Windows::Forms::ColumnHeader^ columnHeader9; private: System::Windows::Forms::ColumnHeader^ columnHeader10; private: System::Windows::Forms::CheckBox^ checkBox1; private: System::Windows::Forms::CheckBox^ point; private: System::Windows::Forms::CheckBox^ food; private: System::Windows::Forms::CheckBox^ interior; private: System::Windows::Forms::CheckBox^ seikatuzac; private: System::Windows::Forms::CheckBox^ hobby; private: System::Windows::Forms::CheckBox^ kadencamera; private: System::Windows::Forms::CheckBox^ checkBox2; private: System::Windows::Forms::ContextMenuStrip^ contextMenuStrip; private: System::Windows::Forms::ToolStripMenuItem^ histStripMenuItem; private: System::Windows::Forms::ToolStripMenuItem^ waitStripMenuItem; private: System::Windows::Forms::ToolStripMenuItem^ deleteStripMenuItem; private: System::Windows::Forms::CheckBox^ game; private: System::Windows::Forms::ToolStripMenuItem^ updateStripMenuItem; private: System::Windows::Forms::CheckBox^ pcoption; private: System::Windows::Forms::CheckBox^ other; private: System::Windows::Forms::ColumnHeader^ columnHeader11; private: AuctionPage^ap; private: void setLimit(System::Object^ sender) { String ^s = dynamic_cast<ComboBox^>(sender)->Text; Single v = Convert::ToSingle(s) * ok::SEP; AuctionItem::limitGo = Convert::ToInt32(v); Trace::WriteLine(String::Format("{0}", v)); } private: void preThread(Object^ sender, EventArgs^ e) { IEnumerator ^i = listView1->SelectedItems->GetEnumerator (); while (i->MoveNext()){ safe_cast<AuctionItem^>(i->Current)->preThread(); } } private: void doRireki(Object^ sender, EventArgs^ e) { IEnumerator ^i = listView1->SelectedItems->GetEnumerator (); while (i->MoveNext()){ safe_cast<AuctionItem^>(i->Current)->doRireki(); } } private: void doDelete(Object^ sender, EventArgs^ e) { IEnumerator ^i = listView1->SelectedItems->GetEnumerator (); while (i->MoveNext()){ listView1->Items->Remove(safe_cast<AuctionItem^>(i->Current)); /// safe_cast<AuctionItem^>(i->Current)->doDelete(); } } public: MainForm(AuctionPage ^ap) : ap(ap) { InitializeComponent(); //TODO: ここにコンストラクター コードを追加します listView1->View = View::Details; // listView1->LabelEdit = true; listView1->AllowColumnReorder = true; listView1->CheckBoxes = true; listView1->FullRowSelect = true; listView1->GridLines = true; listView1->Sorting = SortOrder::Ascending; ap->listview = listView1; ap->UpdateItems(); #if 0 ListView::ListViewItemCollection^items = listView1->Items; for (int k = 0; k < AuctionPage::Length; k++) { items->Add(AuctionPage::all[k]); } #endif ok::mogi = this->checkBox2->Checked; waitStripMenuItem->Click += gcnew EventHandler(this, &MainForm::preThread); histStripMenuItem->Click += gcnew EventHandler(this, &MainForm::doRireki); deleteStripMenuItem->Click += gcnew EventHandler(this, &MainForm::doDelete); timer1->Interval = 1000 / ok::SEP; //125; timer1->Enabled = true; #define A_(a) #a##".75", #a##".5", #a##".25" #define B_(a) "-"## #a##".25", "-"## #a##".5", "-"## #a##".75" #define a_(a) #a##".875",#a##".75", #a##".625", #a##".5", #a##".375", #a##".25", #a##".125" #define b_(a) "-"## #a##".125", "-"## #a##".25", "-"## #a##".375", "-"## #a##".5",\ "-"## #a##".625", "-"## #a##".75", "-"## #a##".875" // (56) #define A(a) A_(a), #a #define C(a) A_(a), #a, B_(a) #define B(a) "-"## #a, B_(a) #define a(a) a_(a), #a #define c(a) a_(a), #a, b_(a) #define b(a) "-"## #a, b_(a) comboBox1->Items->AddRange( ok::SEP == 4 ? gcnew cli::array< System::Object^ > {L"2", A(1),C(0),B(1),B(2),B(3),B(4),B(5)}: gcnew cli::array< System::Object^ > {L"2", a(1),c(0),b(1),b(2),b(3),b(4),b(5)} ); #undef a #undef b #undef c } protected: /// <summary> /// 使用中のリソースをすべてクリーンアップします。 /// </summary> ~MainForm() { if (components) { delete components; } } protected: protected: protected: protected: protected: private: LV^ listView1; // private: System::Windows::Forms::ListView^ listView1; private: System::Windows::Forms::ComboBox^ comboBox1; private: System::Windows::Forms::ColumnHeader^ columnHeader1; private: System::Windows::Forms::ColumnHeader^ columnHeader2; private: System::Windows::Forms::ColumnHeader^ columnHeader3; private: System::Windows::Forms::ColumnHeader^ columnHeader4; private: System::Windows::Forms::ColumnHeader^ columnHeader5; private: System::Windows::Forms::ColumnHeader^ columnHeader6; private: System::Windows::Forms::ColumnHeader^ columnHeader7; private: System::Windows::Forms::ColumnHeader^ columnHeader8; private: System::Windows::Forms::Timer^ timer1; private: System::ComponentModel::IContainer^ components; protected: private: /// <summary> /// 必要なデザイナー変数です。 /// </summary> #pragma region Windows Form Designer generated code // this->listView1 = (gcnew LV()); //System::Windows::Forms::ListView()); /// <summary> /// デザイナー サポートに必要なメソッドです。このメソッドの内容を /// コード エディターで変更しないでください。 /// </summary> void InitializeComponent(void) { this->components = (gcnew System::ComponentModel::Container()); this->comboBox1 = (gcnew System::Windows::Forms::ComboBox()); this->timer1 = (gcnew System::Windows::Forms::Timer(this->components)); this->checkBox1 = (gcnew System::Windows::Forms::CheckBox()); this->point = (gcnew System::Windows::Forms::CheckBox()); this->food = (gcnew System::Windows::Forms::CheckBox()); this->interior = (gcnew System::Windows::Forms::CheckBox()); this->seikatuzac = (gcnew System::Windows::Forms::CheckBox()); this->hobby = (gcnew System::Windows::Forms::CheckBox()); this->kadencamera = (gcnew System::Windows::Forms::CheckBox()); this->game = (gcnew System::Windows::Forms::CheckBox()); this->checkBox2 = (gcnew System::Windows::Forms::CheckBox()); this->contextMenuStrip = (gcnew System::Windows::Forms::ContextMenuStrip(this->components)); this->updateStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->histStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->waitStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->deleteStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->listView1 = (gcnew LV()); this->columnHeader1 = (gcnew System::Windows::Forms::ColumnHeader()); this->columnHeader2 = (gcnew System::Windows::Forms::ColumnHeader()); this->columnHeader3 = (gcnew System::Windows::Forms::ColumnHeader()); this->columnHeader4 = (gcnew System::Windows::Forms::ColumnHeader()); this->columnHeader5 = (gcnew System::Windows::Forms::ColumnHeader()); this->columnHeader6 = (gcnew System::Windows::Forms::ColumnHeader()); this->columnHeader7 = (gcnew System::Windows::Forms::ColumnHeader()); this->columnHeader8 = (gcnew System::Windows::Forms::ColumnHeader()); this->columnHeader9 = (gcnew System::Windows::Forms::ColumnHeader()); this->columnHeader10 = (gcnew System::Windows::Forms::ColumnHeader()); this->pcoption = (gcnew System::Windows::Forms::CheckBox()); this->other = (gcnew System::Windows::Forms::CheckBox()); this->columnHeader11 = (gcnew System::Windows::Forms::ColumnHeader()); this->contextMenuStrip->SuspendLayout(); this->SuspendLayout(); // // comboBox1 // this->comboBox1->FormattingEnabled = true; this->comboBox1->Location = System::Drawing::Point(934, 7); this->comboBox1->Name = L"comboBox1"; this->comboBox1->Size = System::Drawing::Size(68, 20); this->comboBox1->TabIndex = 3; this->comboBox1->Text = L"-1"; this->comboBox1->SelectedIndexChanged += gcnew System::EventHandler(this, &MainForm::comboBox1_SelectedIndexChanged); this->comboBox1->Layout += gcnew System::Windows::Forms::LayoutEventHandler(this, &MainForm::comboBox1_Layout); // // timer1 // this->timer1->Interval = 1000; this->timer1->Tick += gcnew System::EventHandler(this, &MainForm::timer1_Tick); // // checkBox1 // this->checkBox1->AutoSize = true; this->checkBox1->Location = System::Drawing::Point(12, 11); this->checkBox1->Name = L"checkBox1"; this->checkBox1->Size = System::Drawing::Size(48, 16); this->checkBox1->TabIndex = 4; this->checkBox1->Text = L"選択"; this->checkBox1->UseVisualStyleBackColor = true; this->checkBox1->CheckedChanged += gcnew System::EventHandler(this, &MainForm::checkBox1_CheckedChanged); // // point // this->point->AutoSize = true; this->point->Location = System::Drawing::Point(692, 11); this->point->Name = L"point"; this->point->Size = System::Drawing::Size(60, 16); this->point->TabIndex = 5; this->point->Text = L"ポイント"; this->point->UseVisualStyleBackColor = true; this->point->CheckedChanged += gcnew System::EventHandler(this, &MainForm::radioButton_CheckedChanged); // // food // this->food->AutoSize = true; this->food->Location = System::Drawing::Point(632, 11); this->food->Name = L"food"; this->food->Size = System::Drawing::Size(48, 16); this->food->TabIndex = 6; this->food->Text = L"食品"; this->food->UseVisualStyleBackColor = true; this->food->CheckedChanged += gcnew System::EventHandler(this, &MainForm::radioButton_CheckedChanged); // // interior // this->interior->AutoSize = true; this->interior->Location = System::Drawing::Point(556, 9); this->interior->Name = L"interior"; this->interior->Size = System::Drawing::Size(67, 16); this->interior->TabIndex = 7; this->interior->Text = L"インテリア"; this->interior->UseVisualStyleBackColor = true; this->interior->CheckedChanged += gcnew System::EventHandler(this, &MainForm::radioButton_CheckedChanged); // // seikatuzac // this->seikatuzac->AutoSize = true; this->seikatuzac->Location = System::Drawing::Point(478, 9); this->seikatuzac->Name = L"seikatuzac"; this->seikatuzac->Size = System::Drawing::Size(72, 16); this->seikatuzac->TabIndex = 8; this->seikatuzac->Text = L"生活雑貨"; this->seikatuzac->UseVisualStyleBackColor = true; this->seikatuzac->CheckedChanged += gcnew System::EventHandler(this, &MainForm::radioButton_CheckedChanged); // // hobby // this->hobby->AutoSize = true; this->hobby->Location = System::Drawing::Point(419, 9); this->hobby->Name = L"hobby"; this->hobby->Size = System::Drawing::Size(48, 16); this->hobby->TabIndex = 9; this->hobby->Text = L"趣味"; this->hobby->UseVisualStyleBackColor = true; this->hobby->CheckedChanged += gcnew System::EventHandler(this, &MainForm::radioButton_CheckedChanged); // // kadencamera // this->kadencamera->AutoSize = true; this->kadencamera->Location = System::Drawing::Point(303, 8); this->kadencamera->Name = L"kadencamera"; this->kadencamera->Size = System::Drawing::Size(48, 16); this->kadencamera->TabIndex = 10; this->kadencamera->Text = L"家電"; this->kadencamera->UseVisualStyleBackColor = true; this->kadencamera->CheckedChanged += gcnew System::EventHandler(this, &MainForm::radioButton_CheckedChanged); // // game // this->game->AutoSize = true; this->game->Location = System::Drawing::Point(357, 8); this->game->Name = L"game"; this->game->Size = System::Drawing::Size(54, 16); this->game->TabIndex = 11; this->game->Text = L"ゲーム"; this->game->UseVisualStyleBackColor = true; this->game->CheckedChanged += gcnew System::EventHandler(this, &MainForm::radioButton_CheckedChanged); // // checkBox2 // this->checkBox2->AutoSize = true; this->checkBox2->Checked = true; this->checkBox2->CheckState = System::Windows::Forms::CheckState::Checked; this->checkBox2->Location = System::Drawing::Point(67, 10); this->checkBox2->Name = L"checkBox2"; this->checkBox2->Size = System::Drawing::Size(48, 16); this->checkBox2->TabIndex = 12; this->checkBox2->Text = L"模擬"; this->checkBox2->UseVisualStyleBackColor = true; this->checkBox2->CheckedChanged += gcnew System::EventHandler(this, &MainForm::checkBox2_CheckedChanged); // // contextMenuStrip // this->contextMenuStrip->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(4) {this->updateStripMenuItem, this->histStripMenuItem, this->waitStripMenuItem, this->deleteStripMenuItem}); this->contextMenuStrip->Name = L"contextMenuStrip1"; this->contextMenuStrip->Size = System::Drawing::Size(153, 114); this->contextMenuStrip->Text = L"更新"; this->contextMenuStrip->ItemClicked += gcnew System::Windows::Forms::ToolStripItemClickedEventHandler(this, &MainForm::contextMenuStrip1_ItemClicked); // // updateStripMenuItem // this->updateStripMenuItem->Name = L"updateStripMenuItem"; this->updateStripMenuItem->Size = System::Drawing::Size(152, 22); this->updateStripMenuItem->Text = L"更新"; this->updateStripMenuItem->Click += gcnew System::EventHandler(this, &MainForm::updateStripMenuItem_Click); // // histStripMenuItem // this->histStripMenuItem->Name = L"histStripMenuItem"; this->histStripMenuItem->Size = System::Drawing::Size(152, 22); this->histStripMenuItem->Text = L"履歴"; this->histStripMenuItem->ToolTipText = L"履歴\r\n"; // // waitStripMenuItem // this->waitStripMenuItem->CheckOnClick = true; this->waitStripMenuItem->Name = L"waitStripMenuItem"; this->waitStripMenuItem->Size = System::Drawing::Size(152, 22); this->waitStripMenuItem->Text = L"入札準備"; this->waitStripMenuItem->ToolTipText = L"スレッドの起動"; // // deleteStripMenuItem // this->deleteStripMenuItem->Name = L"deleteStripMenuItem"; this->deleteStripMenuItem->Size = System::Drawing::Size(152, 22); this->deleteStripMenuItem->Text = L"削除"; this->deleteStripMenuItem->ToolTipText = L"オークション削除"; // // listView1 // this->listView1->Columns->AddRange(gcnew cli::array< System::Windows::Forms::ColumnHeader^ >(11) {this->columnHeader1, this->columnHeader2, this->columnHeader3, this->columnHeader4, this->columnHeader5, this->columnHeader6, this->columnHeader7, this->columnHeader8, this->columnHeader9, this->columnHeader10, this->columnHeader11}); this->listView1->ContextMenuStrip = this->contextMenuStrip; this->listView1->Location = System::Drawing::Point(12, 38); this->listView1->Name = L"listView1"; this->listView1->Size = System::Drawing::Size(990, 484); this->listView1->TabIndex = 2; this->listView1->UseCompatibleStateImageBehavior = false; this->listView1->ItemCheck += gcnew System::Windows::Forms::ItemCheckEventHandler(this, &MainForm::listView1_ItemCheck); // // columnHeader1 // this->columnHeader1->Text = L"ID"; // // columnHeader2 // this->columnHeader2->Text = L"商品名"; this->columnHeader2->Width = 200; // // columnHeader3 // this->columnHeader3->Text = L"価格"; this->columnHeader3->Width = 100; // // columnHeader4 // this->columnHeader4->Text = L"時間"; // // columnHeader5 // this->columnHeader5->Text = L"入札者"; this->columnHeader5->Width = 200; // // columnHeader6 // this->columnHeader6->Text = L"単位"; // // columnHeader7 // this->columnHeader7->Text = L"該当"; // // columnHeader8 // this->columnHeader8->Text = L"手動"; // // columnHeader9 // this->columnHeader9->Text = L"モード"; // // columnHeader10 // this->columnHeader10->Text = L"備考"; // // pcoption // this->pcoption->AutoSize = true; this->pcoption->Location = System::Drawing::Point(237, 9); this->pcoption->Name = L"pcoption"; this->pcoption->Size = System::Drawing::Size(60, 16); this->pcoption->TabIndex = 13; this->pcoption->Text = L"パソコン"; this->pcoption->UseVisualStyleBackColor = true; this->pcoption->CheckedChanged += gcnew System::EventHandler(this, &MainForm::radioButton_CheckedChanged); // // other // this->other->AutoSize = true; this->other->Location = System::Drawing::Point(759, 9); this->other->Name = L"other"; this->other->Size = System::Drawing::Size(55, 16); this->other->TabIndex = 14; this->other->Text = L"その他"; this->other->UseVisualStyleBackColor = true; this->other->CheckedChanged += gcnew System::EventHandler(this, &MainForm::radioButton_CheckedChanged); // // columnHeader11 // this->columnHeader11->Text = L"カテゴリ"; // // MainForm // this->AutoScaleDimensions = System::Drawing::SizeF(6, 12); this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; this->ClientSize = System::Drawing::Size(1014, 549); this->Controls->Add(this->other); this->Controls->Add(this->pcoption); this->Controls->Add(this->checkBox2); this->Controls->Add(this->game); this->Controls->Add(this->hobby); this->Controls->Add(this->kadencamera); this->Controls->Add(this->seikatuzac); this->Controls->Add(this->food); this->Controls->Add(this->interior); this->Controls->Add(this->point); this->Controls->Add(this->checkBox1); this->Controls->Add(this->comboBox1); this->Controls->Add(this->listView1); this->Name = L"MainForm"; this->Text = L"DMM ペニーオークション"; this->Load += gcnew System::EventHandler(this, &MainForm::MainForm_Load); this->ResizeBegin += gcnew System::EventHandler(this, &MainForm::MainForm_ResizeBegin); this->ResizeEnd += gcnew System::EventHandler(this, &MainForm::MainForm_ResizeEnd); this->contextMenuStrip->ResumeLayout(false); this->ResumeLayout(false); this->PerformLayout(); } #pragma endregion private: System::Void textBox1_TextChanged(System::Object^ sender, System::EventArgs^ e) { } private: System::Void listView1_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) { } private: System::Void MainForm_Load(System::Object^ sender, System::EventArgs^ e) { } private: System::Void MainForm_ResizeEnd(System::Object^ sender, System::EventArgs^ e) { listView1->Width = Width - 20; listView1->Height = Height - 30; } private: System::Void MainForm_ResizeBegin(System::Object^ sender, System::EventArgs^ e) { } private: System::Void timer1_Tick(System::Object^ sender, System::EventArgs^ e) { AuctionArg b; OFF; IEnumerator ^i = listView1->Items->GetEnumerator (); while (i->MoveNext()){ AuctionItem ^a = safe_cast<AuctionItem^>(i->Current); switch (a->mode) { default: if (a->down > AuctionItem::limitGo || (!a->Checked && a->down > ok::limitFinal)) {a->skip();} else { b.set(a);} break; case 2: case 3: case 6: if (a->down != a->look) { a->skip();} else {b.set(a);} break; case 4:; } } if (b.test()) AuctionItem::UpdateStatus(b.arg); // AuctionItem::UpdateStatus(); ON; } private: System::Void listView1_ItemCheck(System::Object^ sender, System::Windows::Forms::ItemCheckEventArgs^ e) { // ag_flag = true; } private: System::Void comboBox1_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) { setLimit(sender); } private: System::Void checkBox1_CheckedChanged(System::Object^ sender, System::EventArgs^ e) { bool v = dynamic_cast<CheckBox^>(sender)->Checked; OFF; array<AuctionItem^>^ a = AuctionPage::all; for (int i = 0; i < AuctionPage::Length; i++) { a[i]->Checked = v; } ON; } private: System::Void radioButton_CheckedChanged(System::Object^ sender, System::EventArgs^ e) { ap->setsub(dynamic_cast<CheckBox^>(sender)->Name, dynamic_cast<CheckBox^>(sender)->Checked); } private: System::Void comboBox1_Layout(System::Object^ sender, System::Windows::Forms::LayoutEventArgs^ e) { setLimit(sender); } private: System::Void checkBox2_CheckedChanged(System::Object^ sender, System::EventArgs^ e) { ok::mogi = dynamic_cast<CheckBox^>(sender)->Checked; } private: System::Void contextMenuStrip1_ItemClicked(System::Object^ sender, System::Windows::Forms::ToolStripItemClickedEventArgs^ e) { W_("FFF"); } private: System::Void updateStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) { ap->UpdateItems(); } }; }
040c18c8771097216184802aa236556c25de1fb6
b1ad48788ca9da319c3f808faf52d58013d1ee61
/Math/筛素数&&分解素因子.cpp
93f551eda5aa50428b2416c58fd6e88b92262a72
[]
no_license
darenlin49/ACM_Algorithm_Templates
e26f59bd933595b602ee5291dbeef4d65aad83b5
3359717b1c6b36464f2bc4e67952a8c60ce9c018
refs/heads/master
2021-05-28T03:43:34.594182
2014-11-18T05:18:16
2014-11-18T05:18:16
null
0
0
null
null
null
null
GB18030
C++
false
false
2,416
cpp
筛素数&&分解素因子.cpp
/* 关于厄拉多塞筛法和线性筛法的选择: ①如果只用bool型数组的1和0表示某个数是否是素数,因为厄拉多塞筛法可以把i的范围缩到sqrt(n),效果会比较好. ②如果需要把素数单独放到一个数组中使用,则因为两者都需要i从2~n,此时线性筛法效果会好很多. ------情况②下: 筛 [0, 3200000) 范围内的素数: 第一种素数筛法 297 毫秒 第二种素数筛法 109 毫秒 筛 [0, 6400000) 范围内的素数: 第一种素数筛法 922 毫秒 第二种素数筛法 266 毫秒 筛 [0, 12800000) 范围内的素数: 第一种素数筛法 2187 毫秒 第二种素数筛法 563 毫秒 */ /*-------------------厄拉多塞筛法-------------------*/ #define MAX 100000 bool noprime[MAX]; void Prime(int n){ int k; noprime[0] = noprime[1] = 1; for (int i = 2; i * i <= n; i ++) if (!noprime[i]){ k = i + i; while(k <= n){ noprime[k]=1; k += i; } } } /*--------------------线性筛素数--------------------*/ bool noprime[MAX]; vector <int> prime; void Prime(int n){ noprime[0] = noprime[1] = 1; for (int i = 2; i <= n; i ++){ if (!noprime[i]){ prime.push_back(i); } for (int j = 0; j < prime.size() && prime[j] * i <= n; j ++){ noprime[prime[j]*i] = 1; if (i % prime[j] == 0) break; //每个数只被他自身最小的素因子筛去 } } } /*----------------试除法求n的素因子-------------------*/ vector <int> p; void find_prime_factor(int n) { for (int i = 2; i * i <= n; i ++){ //枚举到sqrt(n)即可 //这里有一个优化就是可以预处理筛出素数,然后上面i只用枚举素数即可 if (n % i == 0){ p.push_back(i); while(n % i == 0){ n = n / i; } } if (n == 1) break; } if (n > 1){ //只可能有一个大于sqrt(n)的素因子,留在最后就行 p.push_back(n); } return; } /*----------------试除法求n的所有因子-------------------*/ vector <int> factor; void Factor(int n){ factor.clear(); factor.push_back(1); factor.push_back(n); for (int i = 2; i * i <= n; i ++){ if (n % i == 0){ factor.push_back(i); factor.push_back(n / i); } } }
5733064f4a2ebd6ec84de58d2ba75d4495bf071e
07c0798498968cfd5f5467dd0241a4881e6bb160
/leetcode38.cpp
09b40acb8fd7ed39adc79ab96051f6e902742e2a
[]
no_license
yuqingqing/leetcode
5efd7d51fcae1d98a9a20b308f87e3656dc4d0ad
688825dc19046e2cf268e8d20ca567f963302fd7
refs/heads/master
2021-01-04T16:57:29.968275
2020-02-15T13:04:32
2020-02-15T13:04:32
240,645,700
0
0
null
null
null
null
UTF-8
C++
false
false
738
cpp
leetcode38.cpp
// // Created by yqq3081 on 2020/2/13. // //38. 外观数列 #include <iostream> using namespace std; string countAndSayCore(string s) { string res; size_t idx = 0; while(idx < s.size()) { int cnt = 1; while(s[idx] == s[idx + 1]) { cnt++; idx++; } res += to_string(cnt); res += s[idx]; idx++; } return res; } string countAndSay(int n) { int i = 1; string s = to_string(1); while(i < n) { s = countAndSayCore(s); i++; } return s; } int main() { int n; while(cin >> n) { cout << countAndSay(n) << endl; } return 0; }
c3c21cff9c907ed1e9b2156ccff2ee050cfad68a
0a447323231cebdb8a22d0623f70ea12d4a8efc4
/src/crypto/argon2gpu/opencl/device.cpp
70a80c0021fcd1454a832a3fd8eb670df58ccdc6
[ "MIT" ]
permissive
duality-solutions/Dynamic
06ae668ef5b55b598fa4721f6e16766016f51db7
7e31544f63ec85024cf46801965930c02a706fb0
refs/heads/main
2021-12-26T00:14:56.287647
2021-08-21T03:00:10
2021-08-21T03:00:10
108,872,749
64
41
NOASSERTION
2021-12-17T02:22:50
2017-10-30T15:46:23
C++
UTF-8
C++
false
false
9,800
cpp
device.cpp
/* * Copyright (C) 2015-2021 Łukasz Kurowski <crackcomm@gmail.com>, Ondrej Mosnacek <omosnacek@gmail.com> * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation: either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "crypto/argon2gpu/opencl/device.h" #include <sstream> #include <stdexcept> #include <unordered_map> namespace argon2gpu { namespace opencl { std::string Device::getName() const { return "OpenCL Device '" + device.getInfo<CL_DEVICE_NAME>() + "' (" + device.getInfo<CL_DEVICE_VENDOR>() + ")"; } std::size_t Device::getTotalMemory() const { return device.getInfo<CL_DEVICE_GLOBAL_MEM_SIZE>(); } template <class T> static std::ostream& printBitfield(std::ostream& out, T value, const std::vector<std::pair<T, std::string> >& lookup) { bool first = true; for (auto& entry : lookup) { if (value & entry.first) { if (!first) { out << " | "; } first = false; out << entry.second; } } return out; } template <class T> static std::ostream& printEnum(std::ostream& out, T value, const std::unordered_map<T, std::string>& lookup) { try { return out << lookup.at(value); } catch (const std::out_of_range&) { return out << "<invalid>"; } } template <class T> std::ostream& operator<<(std::ostream& out, const std::vector<T>& vec) { out << "["; bool first = true; for (T value : vec) { if (!first) { out << ", "; } first = false; out << value; } return out << "]"; } std::string Device::getInfo() const { std::ostringstream out; out << "OpenCL Device '" << device.getInfo<CL_DEVICE_NAME>() << "':" << std::endl; out << " Type: "; printBitfield(out, device.getInfo<CL_DEVICE_TYPE>(), { {CL_DEVICE_TYPE_CPU, "CPU"}, {CL_DEVICE_TYPE_GPU, "GPU"}, {CL_DEVICE_TYPE_ACCELERATOR, "Accelerator"}, {CL_DEVICE_TYPE_DEFAULT, "Default"}, }) << std::endl; out << " Available: " << device.getInfo<CL_DEVICE_AVAILABLE>() << std::endl; out << " Compiler available: " << device.getInfo<CL_DEVICE_COMPILER_AVAILABLE>() << std::endl; out << std::endl; out << " Version: " << device.getInfo<CL_DEVICE_VERSION>() << std::endl; out << " OpenCL C Version: " << device.getInfo<CL_DEVICE_OPENCL_C_VERSION>() << std::endl; out << " Extensions: " << device.getInfo<CL_DEVICE_EXTENSIONS>() << std::endl; out << std::endl; out << " Vendor: " << device.getInfo<CL_DEVICE_VENDOR>() << std::endl; out << " Vendor ID: " << device.getInfo<CL_DEVICE_VENDOR_ID>() << std::endl; out << std::endl; cl::Platform platform(device.getInfo<CL_DEVICE_PLATFORM>()); out << " Platform name: " << platform.getInfo<CL_PLATFORM_NAME>() << std::endl; out << " Platform vendor: " << platform.getInfo<CL_PLATFORM_VENDOR>() << std::endl; out << " Platform version: " << platform.getInfo<CL_PLATFORM_VERSION>() << std::endl; out << " Platform extensions: " << platform.getInfo<CL_PLATFORM_EXTENSIONS>() << std::endl; out << std::endl; out << " Driver version: " << device.getInfo<CL_DRIVER_VERSION>() << std::endl; out << " Little-endian: " << device.getInfo<CL_DEVICE_ENDIAN_LITTLE>() << std::endl; out << std::endl; out << " Max compute units: " << device.getInfo<CL_DEVICE_MAX_COMPUTE_UNITS>() << std::endl; out << " Max work-item dimensions: " << device.getInfo<CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS>() << std::endl; out << " Max work-item sizes: " << device.getInfo<CL_DEVICE_MAX_WORK_ITEM_SIZES>() << std::endl; out << std::endl; out << " Max clock frequency: " << device.getInfo<CL_DEVICE_MAX_CLOCK_FREQUENCY>() << " MHz" << std::endl; out << std::endl; out << " Address bits: " << device.getInfo<CL_DEVICE_ADDRESS_BITS>() << std::endl; out << " Max memory allocation size: " << device.getInfo<CL_DEVICE_MAX_MEM_ALLOC_SIZE>() << " bytes" << std::endl; out << " Max parameter size: " << device.getInfo<CL_DEVICE_MAX_PARAMETER_SIZE>() << " bytes" << std::endl; out << " Memory base address alignment: " << device.getInfo<CL_DEVICE_MEM_BASE_ADDR_ALIGN>() << " bits" << std::endl; out << " Min data type alignment: " << device.getInfo<CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE>() << " bytes" << std::endl; out << std::endl; out << " Unified memory: " << device.getInfo<CL_DEVICE_HOST_UNIFIED_MEMORY>() << std::endl; out << " Global memory cache type: "; printEnum(out, device.getInfo<CL_DEVICE_GLOBAL_MEM_CACHE_TYPE>(), {{CL_NONE, "None"}, {CL_READ_ONLY_CACHE, "Read-only"}, {CL_READ_WRITE_CACHE, "Read-write"}}) << std::endl; out << " Global memory cacheline size: " << device.getInfo<CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE>() << " bytes" << std::endl; out << " Global memory cache size: " << device.getInfo<CL_DEVICE_GLOBAL_MEM_CACHE_SIZE>() << " bytes" << std::endl; out << " Global memory size: " << device.getInfo<CL_DEVICE_GLOBAL_MEM_SIZE>() << " bytes" << std::endl; out << std::endl; out << " Max constant buffer size: " << device.getInfo<CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE>() << " bytes" << std::endl; out << " Max constant arguments: " << device.getInfo<CL_DEVICE_MAX_CONSTANT_ARGS>() << std::endl; out << std::endl; out << " Local memory type: "; printEnum(out, device.getInfo<CL_DEVICE_LOCAL_MEM_TYPE>(), { {CL_LOCAL, "Dedicated"}, {CL_GLOBAL, "Global"}, }) << std::endl; out << " Local memory size: " << device.getInfo<CL_DEVICE_LOCAL_MEM_SIZE>() << " bytes" << std::endl; out << std::endl; out << " Preferred vector width (char): " << device.getInfo<CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR>() << " (native: " << device.getInfo<CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR>() << ")" << std::endl; out << " Preferred vector width (short): " << device.getInfo<CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT>() << " (native: " << device.getInfo<CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT>() << ")" << std::endl; out << " Preferred vector width (int): " << device.getInfo<CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT>() << " (native: " << device.getInfo<CL_DEVICE_NATIVE_VECTOR_WIDTH_INT>() << ")" << std::endl; out << " Preferred vector width (long): " << device.getInfo<CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG>() << " (native: " << device.getInfo<CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG>() << ")" << std::endl; out << " Preferred vector width (float): " << device.getInfo<CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT>() << " (native: " << device.getInfo<CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT>() << ")" << std::endl; out << " Preferred vector width (double): " << device.getInfo<CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE>() << " (native: " << device.getInfo<CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE>() << ")" << std::endl; out << " Preferred vector width (half): " << device.getInfo<CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF>() << " (native: " << device.getInfo<CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF>() << ")" << std::endl; out << std::endl; out << " Error correction supported: " << device.getInfo<CL_DEVICE_ERROR_CORRECTION_SUPPORT>() << std::endl; out << " Profiling timer resolution: " << device.getInfo<CL_DEVICE_PROFILING_TIMER_RESOLUTION>() << " ns" << std::endl; out << std::endl; out << " Execution capabilites: "; printBitfield(out, device.getInfo<CL_DEVICE_EXECUTION_CAPABILITIES>(), { {CL_EXEC_KERNEL, "OpenCL kernels"}, {CL_EXEC_NATIVE_KERNEL, "Native kernels"}, }) << std::endl; out << " Command queue properties: "; printBitfield(out, device.getInfo<CL_DEVICE_QUEUE_PROPERTIES>(), { {CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, "Out-of-order execution"}, {CL_QUEUE_PROFILING_ENABLE, "Profiling"}, }) << std::endl; return out.str(); } } // namespace opencl } // namespace argon2gpu
556b04ee4b23d08d7d8989da008a729638fe205c
2ea3a45c079d62b68d56b531d9bc985810d6db72
/blackjack/c++/Cards.h
852feb6812386a417510c760d2904953e6d3ed07
[]
no_license
jimwise/shared
e3a7d7ac671af0b11491e0ecffd936fcd098d30f
9c81210d781bbdd058cc3fc8edce2b20cc8ea2ea
refs/heads/master
2022-08-08T17:19:36.659521
2022-06-10T15:35:18
2022-06-10T15:35:18
460,874
3
4
null
null
null
null
UTF-8
C++
false
false
787
h
Cards.h
#ifndef CARDS_H #define CARDS_H #include <deque> #include <string> #include <vector> using namespace std; class Card { public: enum _suit {HEARTS=0, DIAMONDS, CLUBS, SPADES}; enum _value {ACE=0, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, TEN, JACK, QUEEN, KING}; typedef unsigned int suit; typedef unsigned int val; Card (suit s, val v) : su(s), va(v) {} string name (void); virtual int value (void) {return 0;}; virtual ~Card (void) {} protected: suit su; val va; }; class Shoe { public: Shoe (int d = 6); Card *draw (void); ~Shoe (void); protected: virtual Card *makeCard (Card::suit s, Card::val v) {return new Card(s, v);} private: int decksinshoe; vector<Card *> onedeck; deque<Card *> shoe; void refill (void); }; #endif
091118c60b555ca118580458d7a788fb5b1934d4
0158c4e47ab426b3a54e9931b9cd656a00e51cc2
/tetris/tetris_ui/tetris_ui_L_M.cpp
f9b8421b65428547e97a2ee6a3475620d03ce420
[]
no_license
tinnfu/game
c3578af94457a61ca12391284c6a3c8627006fcd
9de9fd631052e2a9693cacccde8e881b85d03610
refs/heads/master
2021-06-18T13:43:43.337725
2017-01-25T11:57:41
2017-01-25T11:57:41
33,314,740
0
0
null
null
null
null
UTF-8
C++
false
false
2,514
cpp
tetris_ui_L_M.cpp
#include "tetris_ui.h" /////////////////////////////////////////////////////////// // classs ui_interface_L_M int ui_interface_L_M_0::set_tetris_ui(tetris_ui & ui) { int status = ui.get_status(); if(0 == status) { int row = ui.get_tetris_rows(); int col = ui.get_tetris_cols(); // @ // # // @ @ ui.set_value_at(row/2 - 1, col/2, 1); ui.set_value_at(row/2, col/2, 1); ui.set_value_at(row/2 + 1, col/2 - 1, 1); ui.set_value_at(row/2 + 1, col/2, 1); return 0; } if(status < 0) { cerr << "tetris_ui_L_M hasn't " << status << "status."; return -1; } ui.set_ui_interface(new ui_interface_L_M_1); return ui.set_tetris_ui(); } int ui_interface_L_M_1::set_tetris_ui(tetris_ui & ui) { int status = ui.get_status(); if(1 == status) { int row = ui.get_tetris_rows(); int col = ui.get_tetris_cols(); // @ # @ // @ ui.set_value_at(row/2, col/2 - 1, 1); ui.set_value_at(row/2, col/2, 1); ui.set_value_at(row/2, col/2 + 1, 1); ui.set_value_at(row/2 + 1, col/2 + 1, 1); return 0; } ui.set_ui_interface(new ui_interface_L_M_2); return ui.set_tetris_ui(); } int ui_interface_L_M_2::set_tetris_ui(tetris_ui & ui) { int status = ui.get_status(); if(2 == status) { int row = ui.get_tetris_rows(); int col = ui.get_tetris_cols(); // @ @ // # // @ ui.set_value_at(row/2 - 1, col/2, 1); ui.set_value_at(row/2 - 1, col/2 + 1, 1); ui.set_value_at(row/2, col/2, 1); ui.set_value_at(row/2 + 1, col/2, 1); return 0; } ui.set_ui_interface(new ui_interface_L_M_3); return ui.set_tetris_ui(); } int ui_interface_L_M_3::set_tetris_ui(tetris_ui & ui) { int status = ui.get_status(); if(3 == status) { int row = ui.get_tetris_rows(); int col = ui.get_tetris_cols(); // @ // @ # @ ui.set_value_at(row/2 - 1, col/2 - 1, 1); ui.set_value_at(row/2, col/2 - 1, 1); ui.set_value_at(row/2, col/2, 1); ui.set_value_at(row/2, col/2 + 1, 1); return 0; } if(status > 3) { cerr << "tetris_ui_L_M hasn't " << status << "status."; return -1; } ui.set_ui_interface(new ui_interface_L_M_0); return ui.set_tetris_ui(); }
e65ce2cb5f52c5efb39474792e602de31fb725bd
a63fe1b25bc6c56b40443bce1f303950399c9884
/Sandbox/src/SandboxApp.cpp
8b7b0c086055952b38a6577bc6e70e7ad494deb6
[]
no_license
AlikanakelaKarwowski/Walnut
b100ee2289a2314c5917522a992c17aad5acd753
dd791647d93a496c156655f3a3cf5c4e8871db6d
refs/heads/main
2023-07-13T05:33:29.851708
2021-08-23T22:24:31
2021-08-23T22:24:31
396,890,909
0
0
null
null
null
null
UTF-8
C++
false
false
190
cpp
SandboxApp.cpp
#include <Walnut.h> class Sandbox : public Walnut::Application { public: Sandbox() { } ~Sandbox() { } }; Walnut::Application* Walnut::CreateApplication() { return new Sandbox(); }
323b192b9f0f7417d8abb53be6a5f271b5eba28b
65049dc869fab93a09eb096a1665583d57b0532b
/Source code/Coursework_V3/user.cpp
e732cb39a65e016c1fd3ef341fe902b064b5a37c
[ "MIT" ]
permissive
benkalmus/UniversityLogin_coursework_gui
8200b043059a0c6ab7d44b3a0306e1f85adc86ce
00569dc117ba4c8bf3bb4efedc27687e79a67cd5
refs/heads/main
2023-02-15T14:49:55.342393
2021-01-14T12:05:50
2021-01-14T12:05:50
329,603,552
0
0
null
null
null
null
UTF-8
C++
false
false
10,094
cpp
user.cpp
#include "user.h" #include <string> #include <ios> #include <iostream> #include <fstream> #include <QDebug> #include <QCryptographicHash> int person::User::userCount=0; int person::Employee::staffCount=0; namespace person { User::User() { this->userCount++; this->idUser = -1; } person::User::User(int idUser, QString FirstName, QString Surname, QString Email, QString PostCode, QString StreetAddress, QString County, QDate DOB, QString Gender, QString Nationality, QString Password) { Email = Email.replace(" ", "").toLower(); //removes whitespaces and turns to lowercase this->userCount++; this->idUser = idUser; this->FirstName = FirstName; this->Surname = Surname; this->Email = Email; this->PostCode = PostCode; this->StreetAddress = StreetAddress; this->County = County; this->DOB = DOB; this->Gender = Gender; this->Nationality = Nationality; this->Password = Password; } int person::User::getUserCount() { return User::userCount; } void User::printUserDetails() { qDebug() << this->idUser; qDebug() << this->FirstName; qDebug() << this->Surname; qDebug() << this->Email; qDebug() << this->PostCode; qDebug() << this->StreetAddress; qDebug() << this->County; qDebug() << this->DOB.toString("yyyy-MM-dd"); qDebug() << this->Gender; qDebug() << this->Nationality; qDebug() << this->Password; } QString User::sha1Hash(QString text) { QCryptographicHash hash(QCryptographicHash::Sha1); //declare hashing algorithm hash.addData(text.toLocal8Bit()); //convert string to a byte array QByteArray res = hash.result(); //return the hash result return res.toHex(); //return a hex code (40 characters) } void person::User::setID(int id) { this->idUser = id; } void person::User::setDetails(QString FirstName, QString Surname, QString Email, QString PostCode, QString StreetAddress, QString County, QDate DOB, QString Gender, QString Nationality) { Email = Email.replace(" ", "").toLower(); //removes whitespaces and turns to lowercase this->FirstName = FirstName; this->Surname = Surname; this->Email = Email; this->PostCode = PostCode; this->StreetAddress = StreetAddress; this->County = County; this->DOB = DOB; this->Gender = Gender; this->Nationality = Nationality; } void User::setPassword(QString pass) { this->Password = pass; //trims whitespace } void User::setEmail(QString email) { email = email.replace(" ", "").toLower(); //removes whitespaces and turns to lowercase this->Email = email; } int person::User::getID() { return this->idUser; } void person::User::getDetails(QString &FirstName, QString &Surname, QString &Email, QString &PostCode, QString &StreetAddress, QString &County, QDate &DOB, QString &Gender, QString &Nationality) { FirstName = this->FirstName; Surname = this->Surname; Email = this->Email; PostCode = this->PostCode; StreetAddress = this->StreetAddress; County = this->County; DOB = this->DOB; Gender = this->Gender; Nationality = this->Nationality; } QString User::getFullName() { QString temp = this->FirstName; temp += " "; temp += this->Surname; return temp; } bool person::User::operator==(const person::User &u) { bool result = u.idUser == idUser; result &= u.FirstName == FirstName; result &= u.Surname == Surname; result &= u.Email == Email; result &= u.PostCode == PostCode; result &= u.StreetAddress == StreetAddress; result &= u.County == County; result &= u.DOB == DOB; result &= u.Gender == Gender; result &= u.Nationality == Nationality; result &= u.Password == Password; return result; } // ######################################################### EMPLOYEEE #################################################### void person::Employee::printAllDetails() { qDebug() << this->idUser; qDebug() << this->OfficeNumber; qDebug() << this->NINO; qDebug() << this->Role; qDebug() << this->AnnualSalary; printUserDetails(); } void Employee::updateFile(std::string filename) { std::ifstream file; std::ofstream temp; //will copy details to this file file.open(filename); //open the file as read only temp.open("../temp.txt"); std::string id, tempStr; int lines = 15; bool found = false; id = std::to_string(this->getID()); //convert id to string if (file.is_open() && temp.is_open()) //check if files opened { while (getline(file, tempStr)) //read line { if (tempStr == id && found == false) //check if string matches id { id = "___"; //make sure id is never matched again so that no more records get altered found = true; } if (found == true) { //do not copy lines lines--; if (lines == 0) found = false; //continue copying as normal } else { //copy line to temp temp << tempStr << "\n"; } tempStr.clear(); } } file.close(); //close files temp.close(); //delete original std::remove(filename.c_str()); //rename temp file to original file name std::rename("../temp.txt", filename.c_str()); this->writeToFile(filename); //add object to end of file } void person::Employee::writeToFile(std::string filename) { std::fstream file; //std::ios::out means writing to file //std::ios::app means appending to the end of the file. file.open(filename, std::ios::out | std::ios::app); if (file.is_open()) { file << this->idUser << "\n"; file << this->OfficeNumber.toStdString() << "\n"; file << this->NINO.toStdString() << "\n"; file << this->Role.toStdString() << "\n"; file << this->AnnualSalary << "\n"; file << this->FirstName.toStdString() << "\n"; file << this->Surname.toStdString() << "\n"; file << this->Email.toStdString() << "\n"; file << this->PostCode.toStdString() << "\n"; file << this->StreetAddress.toStdString() << "\n"; file << this->County.toStdString() << "\n"; file << this->DOB.toString("yyyy-MM-dd").toStdString() << "\n"; file << this->Gender.toStdString() << "\n"; file << this->Nationality.toStdString() << "\n"; file << this->Password.toStdString() << "\n"; } file.close(); } size_t Employee::copyFromFile(std::string filename, Employee empl[], size_t N) { size_t count=0; std::ifstream file; file.open(filename); //open the file as read only if (file.is_open()) //check if it's open first { std::string line; QString qline[16]; size_t lineNumFile = 1, i = 0; //read line while (getline(file, line)) { qline[i] = QString::fromStdString(line); //qDebug() << qline[i]; if (lineNumFile % 15 == 0 && count < N) //every 15 lines, new user starts. { int idUser = qline[0].toInt(); int salary = qline[4].toInt(); QDate date; date = date.fromString(qline[11], "yyyy-MM-dd"); //convert qstring to qdate //qDebug() << qline[15]; //line 14-17 string //the rest are strings empl[count].setDetails(qline[5], qline[6], qline[7], qline[8], qline[9],qline[10], date, qline[12], qline[13]); empl[count].setPassword(qline[14]); empl[count].setID(idUser); empl[count].setOfficeNumber(qline[1]); empl[count].setNINO(qline[2]); empl[count].setRole(qline[3]); empl[count].setEmplSalary(salary); count++; i = 0; } else i++; //increment lineNumFile++; } } file.close(); //close the file when no longer needed so that other programs can use it. return count; } size_t Employee::copyFromFile(std::string filename, std::vector<Employee> &empl, size_t N) { size_t count=0; std::ifstream file; file.open(filename); //open the file as read only if (file.is_open()) //check if it's open first { std::string line; QString qline[16]; size_t lineNumFile = 1, i = 0; //read line while (getline(file, line)) { qline[i] = QString::fromStdString(line); //qDebug() << qline[i]; if (lineNumFile % 15 == 0 && count < N) //every 15 lines, new user starts. { //line 1 and 2 are integers int idUser = qline[0].toInt(); //line 3-5 string //line 6 is salary, int int salary = qline[4].toInt(); //line 7-12 string //line 13 dob QDate date; date = date.fromString(qline[11], "yyyy-MM-dd"); //convert qstring to qdate //line 14-17 string //the rest are strings empl.push_back(Employee()); empl[count].setDetails(qline[5], qline[6], qline[7], qline[8], qline[9],qline[10], date, qline[12], qline[13]); empl[count].setPassword(qline[14]); empl[count].setID(idUser); empl[count].setOfficeNumber(qline[1]); empl[count].setNINO(qline[2]); empl[count].setRole(qline[3]); empl[count].setEmplSalary(salary); count++; i = 0; } else i++; //increment lineNumFile++; } } file.close(); //close the file when no longer needed so that other programs can use it. return count; } } //namespace person
b2f4072a8987ce6c9bb1a6d8b6d0d822d08ec041
6ef38b23501b812b841f327183945af33a3cd7b3
/src/decoder.cpp
5812a1125c129dce7f7a40968bbcd161520d5afb
[ "MIT" ]
permissive
JakubVojvoda/LPC-decoder
5795a4c072dcdfa34c3d1c3ae1084e633e30db90
12dac0ee535517a7cd0b62620bc586ecc5384563
refs/heads/master
2021-01-10T16:30:48.898403
2016-12-21T18:48:37
2016-12-21T18:48:46
52,218,813
12
1
null
null
null
null
UTF-8
C++
false
false
4,813
cpp
decoder.cpp
/* * Simple LPC (Linear Predictive Coding) decoder in C++ * by Jakub Vojvoda [github.com/JakubVojvoda] * 2015 * * Source code is licensed under MIT License * (for more details see LICENSE) * */ #include "decoder.h" #include <fstream> #include <string> #include <sstream> double value(std::vector<double> x, unsigned int index) { if (index >= x.size()) { return 0; } return x[index]; } bool readCOD(std::string filename, std::vector<int> *a, std::vector<int> *g, std::vector<int> *L) { std::ifstream file(filename.c_str()); if (!file.is_open()) return false; std::string line; while (getline(file, line)) { std::stringstream nums(line); double as, gs, l; nums >> as >> gs >> l; a->push_back(as); g->push_back(gs); L->push_back(l); } file.close(); return true; } std::vector<std::vector<double> > readMAT(std::string filename) { std::ifstream file(filename.c_str()); std::vector<double> data; std::string line; if (!file.is_open()) return std::vector<std::vector<double> >(); int width = 0; int height = 0; while (getline(file, line)) { std::stringstream str(line); double n; while (str >> n) { data.push_back(n); if (height == 0) width += 1; } height += 1; } file.close(); std::vector<std::vector<double> > matrix(width, std::vector<double>(height)); for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { matrix[x][y] = data[x + y * width]; } } return matrix; } std::vector<double> synthesize(std::vector<std::vector<double> > A, std::vector<double> G, std::vector<int> L, int P, int lram) { int Nram = G.size(); std::vector<double> init(P); std::vector<double> ss(Nram * lram); int nextvoiced = 1; int from = 1; int to = from + lram - 1; for (int index = 0; index < Nram; index++) { std::vector<double> a; a.push_back(1.0); for (unsigned int j = 0; j < A[index].size(); j++) a.push_back(A[index][j]); double g = G[index]; double l = L[index]; std::vector<double> excit; if (l == 0) { excit = randn(lram); } else { std::vector<int> where = goperator(nextvoiced, l, lram); nextvoiced = *max_element(where.begin(), where.end()) + l - lram; excit = std::vector<double>(lram); for (unsigned int i = 0; i < where.size(); i++) { int index = where[i] - 1; excit[index] = 1; } } double sum = 0.0; for (unsigned int i = 0; i < excit.size(); i++) sum += pow(excit[i], 2); double norm = 1.0 / sqrt(sum / lram); for (unsigned int i = 0; i < excit.size(); i++) { excit[i] = excit[i] * norm; } std::vector<double> b(1); b[0] = g; std::vector<double> synt = filter(b, a, excit, &init); for (int i = from - 1; i < to; i++) { ss[i] = synt[i - from + 1]; } a.clear(); b.clear(); excit.clear(); from += lram; to = from + lram - 1; } return ss; } std::vector<double> randn(int size) { return randn(size, 0, 1); } std::vector<double> randn(int size, float mean, float sd) { std::vector<double> vrandom(size); boost::mt19937 rnd = boost::mt19937(); rnd.seed(rand()); boost::normal_distribution<> d(mean, sd); boost::variate_generator<boost::mt19937, boost::normal_distribution<> > dist(rnd, d); for (int i = 0; i < size; i++) { vrandom[i] = dist(); } return vrandom; } std::vector<int> goperator(int from, int step, int to) { std::vector<int> result; if (step < 1) return result; for (int i = from; i <= to; i += step) { result.push_back(i); } return result; } std::vector<double> filter(std::vector<double> b, std::vector<double> a, std::vector<double> x, std::vector<double> *zi) { std::vector<double> y(x.size()); std::vector<std::vector<double> > state(zi->size() + 1, std::vector<double>(x.size() + 1)); for (unsigned int i = 0; i < zi->size() + 1; i++) state[i][0] = value((*zi), i); for (unsigned int i = 0; i < y.size(); i++) { y[i] = (value(state[0],i) + value(b,0) * value(x,i)); for (unsigned int n = 0; n < zi->size(); n++) { state[n][i+1] = value(state[n+1],i) + value(b,n+1) * value(x,i) - value(a,n+1) * value(y,i); } } for (unsigned int n = 0; n < zi->size(); n++) (*zi)[n] = value(state[n], x.size()); return y; }
1fa48c177950d588c3fe7d868a4f34ce6a30224a
3e27f2a7ec01b5032d67bf0d6fef08e7fc22eba3
/Chapter 3/3_2.cpp
305f71e770085da73b3b4d51a2bdd265b674ccfd
[]
no_license
AntonSivalnev/Prata_6
c8ed3bf744194d1fdf02faaaefc8233de2c6d694
14984cd108dcce11bcc5f3008eb0959b82eedc26
refs/heads/master
2021-07-21T20:59:04.005377
2017-10-21T19:02:33
2017-10-21T19:02:33
96,557,269
0
0
null
null
null
null
UTF-8
C++
false
false
808
cpp
3_2.cpp
#include <iostream> const int INCH_IN_FOOT = 12; const float INCH_IN_METER = 0.0254; const float KILOGRAM_IN_POUND = 2.2; int main() { int feet, inches, pounds; float meters, kilograms, body_mass_index; std::cout << "Enter your height in feet: _\b"; std::cin >> feet; std::cout << "And inches: _\b"; std::cin >> inches; std::cout "\nEnter your weight in pounds: _\b"; std::cin >> pounds; meters = (feet * INCH_IN_FOOT + inches) * INCH_IN_METER; kilograms = pounds / KILOGRAM_IN_POUND; body_mass_index = kilograms / (meters * meters); std::cout << "Your height is " << meters << " meters, your weight is " << kilograms << " kilograms and you body mass index is " << body_mass_index << std::endl; return 0; }
0d1f5eec605cbe41e658be4a1e73ba5a026b583e
4bc6d2dcc7aadcd075890c0e75d9645896314710
/vol105/10583.cpp
47dae27005eb5113c875fafc9643ae839a30d070
[]
no_license
dibery/UVa
ed50d28abae01a2bc119648b448ebb48f249d0b0
9696e6b8ed8cf459a9f3b917d6fb0549b13504e6
refs/heads/master
2021-06-09T11:10:07.721013
2021-05-14T17:07:58
2021-05-14T17:07:58
19,485,747
6
1
null
null
null
null
UTF-8
C++
false
false
960
cpp
10583.cpp
#include<cstdio> #include<list> using namespace std; int DFS( list<int> *adj, int index, bool *visited ) { int back = 1; visited[ index ] = true; for( list<int>::iterator it = adj[ index ].begin(); it != adj[ index ].end(); ++it ) if( !visited[ *it ] ) back += DFS( adj, *it, visited ); return back; } int main() { int stu, query, t = 0, a, b; while( scanf( "%d %d", &stu, &query ) && stu ) { list<int> same[ stu+1 ]; bool visited[ 50000 ] = { false }; int ans = stu; for( int i = 0; i < query; ++i ) { scanf( "%d %d", &a, &b ); if( a == b ) continue; same[ a ].push_back( b ); same[ b ].push_back( a ); } for( int i = 1; i <= stu; ++i ) if( !visited[ i ] ) ans -= DFS( same, i, visited ) - 1; printf( "Case %d: %d\n", ++t, ans ); } return 0; }
f372645337b8ae5204a17bd7470056e24d495cb5
f2308b7afff535131d28fb63812f46253f592d20
/NCSU_Monopoly/main.cpp
029c96b94474ef5986871de8c24e49380085e14e
[]
no_license
NRDavis/NRDavis_CPlusPlus
d5009863394071754181f43ae3fd47bb11198165
e0034e0a8309119050232f474d2b38cc5e48c51f
refs/heads/master
2021-02-04T10:22:18.977611
2020-06-24T01:36:19
2020-06-24T01:36:19
243,656,509
0
0
null
null
null
null
UTF-8
C++
false
false
2,536
cpp
main.cpp
#include <iostream> // we're going to create a series of modularized functions useful in a monopoly game using namespace std; struct property { char name[20]; // string variable for a name int price; int costPerNight; }; // we're going to define a template class to handle struct player { char player_name[30]; // we allow the player to have a name of 29 characters + null char property *collection; // we allocate an undefined array of properties int numOfProperties; // we have a int field to track the number of properties each player has }; void propertyInfo(property place) { cout << "\tname:\t"<< place.name <<"\n\tprice:\t"<< place.price<<"\n\tRent:\t"<< place.costPerNight<< "\n" <<endl; return; } void playerInfo(player name) { cout <<"\tName: "<< name.player_name <<"\n\tProperty: "<< name.collection->name <<"\n\tAsset Num: "<< name.numOfProperties<<"\n"<<endl; return; } // generic template function to swap two items, could be integers or structs template <typename T> void Swap(T &a, T &b) { //cout << "\tname: "<< a.name << "\n\tprice: " << a.price <<"\n\tRent: "<< a.costPerNight <<endl; T temp = a; // we save //cout << "\tname: "<< temp.name << "\n\tprice: " << temp.price <<"\n\tRent: "<< temp.costPerNight <<endl; a = b; //cout << "\tname: "<< a.name << "\n\tprice: " << a.price <<"\n\tRent: "<< a.costPerNight <<endl; b = temp; //cout<<"\n"<<endl; //cout << "\tname: "<< a.name << "\n\tprice: " << a.price <<"\n\tRent: "<< a.costPerNight <<endl; //cout << "\tname: "<< b.name << "\n\tprice: " << b.price <<"\n\tRent: "<< b.costPerNight <<endl; //cout <<"\n\n"<<endl; } // explicit specialization for trading properties template <> void Swap<player>(player &p1, player &p2) { property *temp = p1.collection; // we allocate a temp ptr to a property p1.collection = p2.collection; p2.collection = temp; return; } int main() { // we allocate two properties to simulate when we players trade properties property Belltower = {"Bell Tower", 1000, 20}; property Talley = {"Talley", 500, 0}; player Nathan = {"Nathan", &Belltower, 1}; player Rhea = {"Rhea", &Talley, 1}; cout << "Pre-Property-Swap"<<endl; playerInfo(Nathan); playerInfo(Rhea); cout << "Post-Property-Swap"<<endl; Swap(Nathan, Rhea); playerInfo(Nathan); playerInfo(Rhea); return 0; }
dfe4ad70302f0490ccb2e521b42bfd7b7f22e861
904c4904cf2ae7e4b207b2a553521e0215b4f66b
/HiLib/ChildRowHeaderColumn.h
351828ffb6d559c6e97fd62c4caa5703618623a4
[]
no_license
higeze/XYZViewer
aa503760b5490e168f56d14278c2edd4a98dd809
f9fefe900ac521e557d43066cbddd67064090837
refs/heads/master
2021-07-16T21:37:55.523687
2017-10-23T12:35:12
2017-10-23T12:35:12
107,979,230
1
0
null
null
null
null
UTF-8
C++
false
false
358
h
ChildRowHeaderColumn.h
#pragma once #include "ChildIndexColumn.h" class CChildRowHeaderColumn:public CChildIndexColumn { public: CChildRowHeaderColumn(CSheetCell* pSheetCell):CChildIndexColumn(pSheetCell){} virtual ~CChildRowHeaderColumn(){} virtual cell_type HeaderCellTemplate(CRow* pRow, CColumn* pColumn); virtual cell_type CellTemplate(CRow* pRow, CColumn* pColumn); };
91cbe7cb36a693fe8c0a0f06710947227e3fa976
de5f555645ac0f70a129d5531fdc3934b1803bea
/Online-Judges/Codechef/DISTNUMS.cc
ed9fec315b10ed1066d0ef0a9d6d1da902ccb9f5
[]
no_license
kaushal02/CP
52737875c70a40b3e0f7885b2553fdb1b7447bf9
704543bcd17e75759a584f88300033a348dc71ab
refs/heads/master
2022-10-20T06:59:33.421829
2022-10-18T05:25:54
2022-10-18T05:26:20
70,631,083
33
18
null
2018-10-26T13:48:52
2016-10-11T20:09:00
C++
UTF-8
C++
false
false
1,263
cc
DISTNUMS.cc
#include <iostream> using namespace std; const int MOD = 1E9 + 7; int pwr(int a, int n, int mod) { // a^n % mod int ans = 1; while (n) { if (n & 1) ans = (long long) ans * a % mod; if (n >>= 1) a = (long long) a * a % mod; } return ans; } int inv(int n) { return pwr(n, MOD - 2, MOD); } int sumGeometric(int p, int k, int s) { // p^k + p^(k+1) + p^(k+2) ... + p^((2^s)*k) int power = 1 + (long long) k * pwr(2, s, MOD - 1) % (MOD - 1); int ans = (pwr(p, power, MOD) - pwr(p, k, MOD)) % MOD; if (ans < 0) { ans += MOD; } return (long long) ans * inv(p - 1) % MOD; } int main() { // your code goes here int cases; cin >> cases; while (cases--) { int n, k; cin >> n >> k; int ans = 1; for (int factor = 2; factor * factor <= n; factor++) { int power = 0; while (n % factor == 0) { n /= factor; power++; } if (power) { ans = (long long) ans * sumGeometric(factor, power, k) % MOD; } } if (n > 1) { ans = (long long) ans * sumGeometric(n, 1, k) % MOD; } cout << ans << '\n'; } return 0; }
af4b537a296107b9ef518b94e7daa250850c6892
46c56e2305159f05362adbc084d6a0ff0dfe9495
/gui/StatusBar.cpp
e6d1510d37ee97cff635b19de08f2ccae6f6aea3
[]
no_license
fritzone/netscan
6da63eda87f71721237de39f687fbfb12d49f89b
d8313942ba65a82645d66cbd09c1b875dca8666b
refs/heads/master
2020-05-30T05:28:59.422254
2016-08-25T09:30:27
2016-08-25T09:30:27
21,980,082
1
1
null
null
null
null
UTF-8
C++
false
false
1,038
cpp
StatusBar.cpp
#include "StatusBar.h" #include "Debugger.h" #include "Window.h" #include "wind_upg.h" #include "leaker.h" /** * Constructor */ CStatusBar::CStatusBar(CWindow* _parent, int _id, int _parts, int* _partPos):CControl( _parent, 0, 0,0 ,0, L"", _id) { HWND mainHandle = _parent->getHandle(); hwnd = CreateWindowEx( 0, (LPCWSTR)STATUSCLASSNAME , // predefined class L"Welcome", // text WS_VISIBLE | WS_CHILD | SBARS_SIZEGRIP, // styles 0, // starting x position 0, // starting y position 0, // width 0, // height mainHandle, // parent window (HMENU)id, // No menu (HINSTANCE) GetWindowLong(mainHandle, GWL_HINSTANCE), NULL); // pointer not needed SendMessage(hwnd, SB_SETPARTS, _parts, (LPARAM)_partPos); SendMessage(hwnd, WM_SIZE, 0, 0); show(); } void CStatusBar::autoSize() { SendMessage(hwnd, WM_SIZE, 0, 0); } void CStatusBar::setText(LPCWSTR text, int idx) { SendMessage(hwnd, SB_SETTEXT, (WPARAM)idx, (LPARAM)text); }
bdeca7da38198b83f03b0d2ed5f923acc104c742
cb77dcbbce6c480f68c3dcb8610743f027bee95c
/android/art/compiler/optimizing/linear_order.h
151db001e1ae42c826a6d68eecccb575aaf6fc37
[ "Apache-2.0", "NCSA", "MIT" ]
permissive
fengjixuchui/deoptfuscator
c888b93361d837ef619b9eb95ffd4b01a4bef51a
dec8fbf2b59f8dddf2dbd10868726b255364e1c5
refs/heads/master
2023-03-17T11:49:00.988260
2023-03-09T02:01:47
2023-03-09T02:01:47
333,074,914
0
0
MIT
2023-03-09T02:01:48
2021-01-26T12:16:31
null
UTF-8
C++
false
false
1,912
h
linear_order.h
/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef ART_COMPILER_OPTIMIZING_LINEAR_ORDER_H_ #define ART_COMPILER_OPTIMIZING_LINEAR_ORDER_H_ #include <type_traits> #include "nodes.h" namespace art { void LinearizeGraphInternal(const HGraph* graph, ArrayRef<HBasicBlock*> linear_order); // Linearizes the 'graph' such that: // (1): a block is always after its dominator, // (2): blocks of loops are contiguous. // // Storage is obtained through 'allocator' and the linear order it computed // into 'linear_order'. Once computed, iteration can be expressed as: // // for (HBasicBlock* block : linear_order) // linear order // // for (HBasicBlock* block : ReverseRange(linear_order)) // linear post order // template <typename Vector> void LinearizeGraph(const HGraph* graph, Vector* linear_order) { static_assert(std::is_same<HBasicBlock*, typename Vector::value_type>::value, "Vector::value_type must be HBasicBlock*."); // Resize the vector and pass an ArrayRef<> to internal implementation which is shared // for all kinds of vectors, i.e. ArenaVector<> or ScopedArenaVector<>. linear_order->resize(graph->GetReversePostOrder().size()); LinearizeGraphInternal(graph, ArrayRef<HBasicBlock*>(*linear_order)); } } // namespace art #endif // ART_COMPILER_OPTIMIZING_LINEAR_ORDER_H_
5e046cf8f6ec29aa41635373ddab81fef896e7bf
3d7c2de12fe9e107eac972bc5be834f13876644b
/Arrays/check-if-array-elements-are-consecutive.cpp
9a4e155e55757249da91134ef4d6e023a2b13f41
[]
no_license
shah-antriksh/Coding
abdb2f14a9a35da54d3527e454d5c3664c65176f
c5d2b16de9dfdca5a45d7b546c5eb48ba8f46d57
refs/heads/master
2020-12-25T14:12:49.186225
2016-08-06T17:31:15
2016-08-06T17:31:15
64,283,067
0
0
null
null
null
null
UTF-8
C++
false
false
501
cpp
check-if-array-elements-are-consecutive.cpp
//http://www.geeksforgeeks.org/check-if-array-elements-are-consecutive/ #include<bits/stdc++.h> using namespace std; int main() { int arr[]={88,89,90,91,92,94,93}; int n = sizeof(arr)/sizeof(int); int maxv=INT_MIN; int minv=INT_MAX; for (int i=0;i<n;i++) { maxv=max(arr[i],maxv); minv=min(arr[i],minv); } for (int i=0;i<n;i++) { if(arr[arr[i]-minv]>=0) { cout<<arr[arr[i]-minv]<<endl; arr[arr[i]-minv]=-1; } else { maxv=INT_MAX; } } if(maxv-minv+1 == n) cout<<"yes"; else cout<<"no"; }
dfbe042353221014acbfa7961ca1baf02ba4bf65
f0b4ce0ba6972301435f182a6d4c02987ee17ab3
/addTwoNums.cc
0afd6ad3a779c5e353f60a2586f1a0b7c2b636c8
[]
no_license
gs0622/leetcode
b64bf1ac8d52ea473cac98b057a5edd1c8ff3591
ef9388f875c375f6f3cd290b04e457b416d860dc
refs/heads/master
2021-06-02T00:54:32.332803
2020-05-19T01:13:51
2020-05-19T01:13:51
20,798,407
0
0
null
null
null
null
UTF-8
C++
false
false
2,176
cc
addTwoNums.cc
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ #include <iostream> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: ListNode* addTwoNumbers(ListNode* a1, ListNode* a2) { ListNode dummy, *tail = &dummy; bool carry = false; while (a1 && a2) { ListNode *n = new ListNode; tail->next = n; n->val = a1->val + a2->val + (carry? 1: 0); if (n->val > 9) { carry = true; n->val %= 10; } else carry = false; a1 = a1->next, a2 = a2->next; tail = tail->next; } while (a1) { ListNode *n = new ListNode; tail->next = n; n->val = a1->val + (carry? 1: 0); if (n->val > 9) { carry = true; n->val %= 10; } else carry = false; a1 = a1->next; tail = tail->next; } while (a2) { ListNode *n = new ListNode; tail->next = n; n->val = a2->val + (carry? 1: 0); if (n->val > 9) { carry = true; n->val %= 10; } else carry = false; a2 = a2->next; tail = tail->next; } if (carry) { ListNode *n = new ListNode; tail->next = n; n->val = 1; carry = false; tail = tail->next; } return dummy.next; } }; int main(void) { ListNode a1[3], a2[3], *r; a1[0].val = 9, a1[0].next = &a1[1]; a1[1].val = 9, a1[1].next = &a1[2]; a1[2].val = 9, a1[2].next = nullptr; a2[0].val = 1, a2[0].next = nullptr; a2[1].val = 6, a2[1].next = &a2[2]; a2[2].val = 4, a2[2].next = nullptr; Solution s; r = s.addTwoNumbers(a1, a2); while (r) { cout << r->val << " "; r = r->next; } cout << endl; return 0; }
2f35e1c85d6e9e7b49a5538cf9be6119acc95b92
62d48af115ea9d14bc5a7dd85212e616a48dcac6
/src/tpchBench/headers/SupplierData.h
88e6e41215ff2908e1b2a86d9c70b10891d9ef48
[ "Apache-2.0", "LicenseRef-scancode-public-domain", "BSD-3-Clause" ]
permissive
asu-cactus/lachesis
ab1ab1704e4f0f2d6aef1a2bff2dc99ea8f09337
92efa7b124a23894485a900bb394670487051948
refs/heads/master
2023-03-05T11:41:35.016673
2021-02-14T21:50:32
2021-02-14T21:50:32
151,744,205
2
0
Apache-2.0
2021-02-14T16:37:54
2018-10-05T15:49:15
C++
UTF-8
C++
false
false
2,703
h
SupplierData.h
#ifndef CUSTOMER_SUPPLIER_PART_AGG_H #define CUSTOMER_SUPPLIER_PART_AGG_H #include "Object.h" #include "PDBVector.h" #include "PDBString.h" #include "Handle.h" using namespace pdb; // This class represents a triple that holds a triple of (customerName, SupplierName, PartID) class SupplierData : public pdb::Object { public: String supplierName; Map<String, Vector<int>> soldPartIDs; ENABLE_DEEP_COPY // Default constructor: SupplierData() {} // Default destructor: ~SupplierData() {} // Constructor with arguments: SupplierData(pdb::String supplierName) { this->supplierName = supplierName; // this->soldPartIDs = pdb::makeObject<pdb::Map<pdb::String, pdb::Vector<int>>>(); } String& getKey() { return supplierName; } Map<String, Vector<int>>& getValue() { return soldPartIDs; } /*void addSupplierPart(pdb::String supplierName, int partKey) { if(soldPartIDs->count(supplierName)==0) { // not found pdb::Handle<pdb::Vector<int>> partKeyVector = pdb::makeObject<pdb::Vector<int>>(); partKeyVector->push_back(partKey); (*soldPartIDs)[supplierName] = * partKeyVector; } else { // found pdb::Vector<int> existing_partKeyVector = (*soldPartIDs)[supplierName]; existing_partKeyVector.push_back(partKey); (*soldPartIDs)[supplierName] = existing_partKeyVector; } }*/ Map<String, Vector<int>> getSoldPartIDs() { return soldPartIDs; } void setSoldPartIDs(Map<String, Vector<int>> soldPartIDs) { this->soldPartIDs = soldPartIDs; } int print() { std::cout << "SupplierName: " << supplierName << " [ "; auto iter = soldPartIDs.begin(); int count = 0; while (iter != soldPartIDs.end()) { pdb::String customerName = (*iter).key; pdb::Vector<int> partIDs = soldPartIDs[customerName]; std::cout << "Customer: " << customerName.c_str() << " ("; for (int i = 0; i < partIDs.size(); ++i) { std::cout << " " << partIDs[i] << ","; } std::cout << ") "; ++iter; count++; } std::cout << " ] " << std::endl; std::cout << " the count is " << count << std::endl; return count; } /*const pdb::String& getCustomerName() const { return supplierName; } void setCustomerName(const pdb::String& customerName) { this->supplierName = customerName; }*/ }; #endif
13786816b11b346945238376b05cc261ffb0b121
387549ab27d89668e656771a19c09637612d57ed
/DRGLib UE project/Source/FSD/Public/ArmorPrimitiveDestroyedDelegate.h
746da9593b559f5083e145b69737f31c8cc77e98
[ "MIT" ]
permissive
SamsDRGMods/DRGLib
3b7285488ef98b7b22ab4e00fec64a4c3fb6a30a
76f17bc76dd376f0d0aa09400ac8cb4daad34ade
refs/heads/main
2023-07-03T10:37:47.196444
2023-04-07T23:18:54
2023-04-07T23:18:54
383,509,787
16
5
MIT
2023-04-07T23:18:55
2021-07-06T15:08:14
C++
UTF-8
C++
false
false
255
h
ArmorPrimitiveDestroyedDelegate.h
#pragma once #include "CoreMinimal.h" #include "ArmorPrimitiveDestroyedDelegate.generated.h" class UPrimitiveComponent; UDELEGATE(BlueprintCallable) DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FArmorPrimitiveDestroyed, UPrimitiveComponent*, collider);
59ed9208acaa7038fffb9fb8d195e7c01b1b78b1
c0d0251b9d22b2570cd61c2692d7014a6261e247
/hollowknight/playGround.cpp
765ff80bf1f72a89e4d92a54d1b34a575ab76747
[]
no_license
KRkimyj/hollowknight
825c64093ae687de394664be4ac7db3dd89dc0f6
1e9c63ec6286cda71d66e953bff4ad756e6744fb
refs/heads/master
2023-07-31T10:14:51.136003
2021-09-28T04:31:41
2021-09-28T04:31:41
411,134,389
0
0
null
null
null
null
UHC
C++
false
false
2,735
cpp
playGround.cpp
#include "stdafx.h" #include "playGround.h" playGround::playGround() { } playGround::~playGround() { } //초기화는 여기다 하세요 제발 HRESULT playGround::init() { gameNode::init(true); //===전방선언 삽입=== _sm = new stageManager; _sm->init(); _pl = new player; _pl->init(); _em = new enemyManager; _sm->setPlayer(_pl); _sm->setEnemyManager(_em); _pl->setstageManager(_sm); _pl->setEnemyManager(_em); _em->setPlayer(_pl); _em->setstageManager(_sm); //================== imageInit(); _ef->imageInit(); _cameraRect = RectMakeCenter(_pl->getPlayerX(), _pl->getPlayerY(), WINSIZEX, WINSIZEY); _cameraPoint.x = _pl->getPlayerX(); _cameraPoint.y = _pl->getPlayerY(); _cameraWidth = WINSIZEX / 2; _cameraHeight = WINSIZEY / 2; _start = _end = 0; _vibe = false; //_img = IMAGEMANAGER->addImage("grim bullet", "enemyEffectImage/grim bullet.bmp", 64, 64, true, RGB(255, 0, 255), true); return S_OK; } //메모리 해제는 여기다 하세요 제발 void playGround::release() { gameNode::release(); } void playGround::update() { gameNode::update(); _sm->update(); /*if (!_sm->getStop())*/ _pl->update(); _em->update(); //camera(); //진동 한 거 연습했어 //====================================== } void playGround::render() { PatBlt(getMemDC(), 0, 0, WINSIZEX, WINSIZEY, WHITENESS); //========================================= //SCENEMANAGER->render(); _sm->render(); if (!SCENEMANAGER->getCurrentScene("stage1")) _em->render(); _pl->render(); /* char str[100]; sprintf_s(str, "x : %d, y : %d, 현재 프레임: %d, ", _pl->getPlayerRect().left, _pl->getPlayerRect().top, _pl->getState()->getFrameX()); TextOut(getMemDC(), _pl->getPlayerX() - 100, _pl->getPlayerY() - 100, str, strlen(str));*/ TIMEMANAGER->render(getMemDC()); //_img->alphaRender(getMemDC(), 2000, 1000, 100); //================================================== //this->getBackBuffer()->render(getHDC(), 0, 0, _cameraRect.left, _cameraRect.top, WINSIZEX, WINSIZEY); CAMERAMANAGER->render(getHDC(), 0, 0, getMemDC()); } void playGround::imageInit() { IMAGEMANAGER->addImage("fly bullet", "enemyEffectImage/fly bullet.bmp", 50, 50, true, RGB(255, 0, 255), false); IMAGEMANAGER->addFrameImage("fly bullet remove", "enemyEffectImage/fly bullet remove.bmp", 528, 103, 6, 1, true, RGB(255, 0, 255), false); IMAGEMANAGER->addFrameImage("fly bullet remove LR", "enemyEffectImage/fly bullet remove LR.bmp", 606, 174, 6, 2, true, RGB(255, 0, 255), false); IMAGEMANAGER->addImage("hit image", "stageImage/hit image.bmp", 3840, 2160, true, RGB(255, 0, 255), true); IMAGEMANAGER->addImage("hit image2", "stageImage/hit image2.bmp", 1920, 1080, true, RGB(255, 0, 255), true); }
92dc33fb6d5543394d5dcae1dd78b797016e1772
12f2153cce750f245e309370f02ead5609b49d50
/day01 (BASICS 2)/ex05/Human.hpp
fae7f4a1e8bcdd97fa66ce42f53f1a3e8b097ff0
[]
no_license
hlombard/Piscine_CPP
e638d082171b0e84ead6444373e2ec57b03da1ff
90ce065d9a1714cdca0551c438c6e491742d0410
refs/heads/master
2023-02-23T16:56:24.722420
2021-01-26T18:52:08
2021-01-26T18:52:08
333,182,153
0
0
null
null
null
null
UTF-8
C++
false
false
256
hpp
Human.hpp
#ifndef HUMAN_HPP # define HUMAN_HPP #include <string> #include "Brain.hpp" class Human { private: const Brain _brain; public: Human(void); std::string identify(void) const; const Brain &getBrain(void) const; }; #endif
d39ae52d681917b52c53eeafcd995faf275cbf4a
805e83058e2cb1c4042fe31a0c5f2aacf76eca63
/Glanda/CmdChangeCurrentScene.h
03f254a5b54ba6e336d706ae54b571f9e954eee0
[]
no_license
progmalover/vc-stgld
70ee037f3f27857fcdbb344b5ee8533c724b43b9
96055b2a2deca44eed5bb2c6e1e3f6cb1aff3a6b
refs/heads/master
2021-01-12T05:17:05.334966
2017-01-12T14:49:44
2017-01-12T14:49:44
77,895,327
0
0
null
null
null
null
UTF-8
C++
false
false
412
h
CmdChangeCurrentScene.h
#pragma once #include "command.h" class gldScene2; class CCmdChangeCurrentScene : public TCommand { protected: gldScene2* m_pNewScene; gldScene2* m_pOldScene; public: CCmdChangeCurrentScene(gldScene2* pScene); virtual ~CCmdChangeCurrentScene(void); virtual bool Execute(); virtual bool Unexecute(); virtual bool CanMix(TCommand *pOther); virtual TCommand *Mix(TCommand *pOther); };
1a111b002550da6acdde6b0165ce5fed64876320
981d954ac6f5930d6cf14f2becfb5deb92b5df3d
/libnet/tests/sctx.h
6e8715fb1d43ff3d139a66debb111089af987ae7
[ "MIT" ]
permissive
wma1729/simple-n-fast
e04b97afad55c5964930509b2ff763723a0d2bf9
abb06a9147b1eb4418ef5acb176eead64b991c51
refs/heads/master
2021-07-09T17:27:09.630851
2021-04-30T18:33:56
2021-04-30T18:33:56
102,918,847
0
1
null
null
null
null
UTF-8
C++
false
false
1,191
h
sctx.h
#include "ctx.h" class sctx : public snf::tf::test { private: static constexpr const char *class_name = "sctx"; public: sctx() : snf::tf::test() {} ~sctx() {} virtual const char *name() const { return "Certificate"; } virtual const char *description() const { return "Tests SSL context"; } virtual bool execute(const snf::config *conf) { bool exception_caught = false; try { snf::net::initialize(); snf::ssl::context ctx1; ASSERT_EQ(bool, true, true, "ssl context creation passed"); } catch (const snf::ssl::exception &ex) { std::cerr << ex.what() << std::endl; for (auto I = ex.begin(); I != ex.end(); ++I) std::cerr << *I << std::endl; exception_caught = true; } catch (const std::system_error &ex) { std::cerr << "system error: " << ex.code() << std::endl; std::cerr << ex.what() << std::endl; exception_caught = true; } catch (const std::invalid_argument &ex) { std::cerr << "invalid argument: " << ex.what() << std::endl; exception_caught = true; } catch (const std::runtime_error &ex) { std::cerr << "runtime error: " << ex.what() << std::endl; exception_caught = true; } return !exception_caught; } };
90e888c1228f5bca40705aaeb96a4f39807dc4da
b9c8bb339751898ad37989e8fc6d1360bd90639f
/Include/TLS_Socket.h
1ee48e394ec3e0c86f04db85c00b596ad268a252
[]
no_license
ski0090/PK_Sock
84f5f401f1fe85994fb5f438933e987947bf07fa
a67924912bdcebd2cdc1e05b230378f574ef38b6
refs/heads/main
2022-05-12T06:06:15.795648
2020-04-06T08:02:18
2022-03-26T07:12:18
253,431,282
4
0
null
null
null
null
UHC
C++
false
false
766
h
TLS_Socket.h
#pragma once /* openssl 라이브러리가 base이다. TCPsocket 클래스의 컴포넌트로 활용한다. */ #ifdef _USE_SSL class SOCK_DLL TLS_Socket :BaseSocket { public: ~TLS_Socket(); int32_t Connect(const SocketAddress& inToAddress); int32_t Bind(const SocketAddress& inToAddress); int32_t Listen(int inBackLog = 32); shared_ptr<TLS_Socket> Accept(SocketAddress& inToAddress); int32_t Send(const void* inData, size_t inLen); int32_t Receive(void* inBuffer, size_t inLen); int32_t Disconnect(); int32_t SetNonBlockingMode(bool inShouldBeNonBlocking); private: SSL* mSSL = nullptr; friend class SSL_Utill; TLS_Socket(SOCKET _socket); TLS_Socket(SOCKET _socket, SSL* _ssl); }; using TLS_SocketPtr = shared_ptr<TLS_Socket>; #endif
e0f08f6cb4128fc9822f06204955d4c71a75d20a
85971f9d33b2ebfb70ee1fc4ef24042b7f586d2d
/sensor_system/include/sensor.h
715ea02a4c04509bc2f292a468d569e692629f8e
[]
no_license
andrei-herdt/coding-exercises
f33a87a5cf545a925ee14d0e667bad367b2c6dd6
7c77011c9caa2c575cc0ae0ec52858d84e97e0cc
refs/heads/master
2023-06-22T07:49:36.526283
2023-06-07T12:55:56
2023-06-07T12:55:56
167,746,529
0
0
null
null
null
null
UTF-8
C++
false
false
477
h
sensor.h
#ifndef SENSOR_H_ #define SENSOR_H_ #include <functional> template <class DataT> class Sensor { using CallBackType = std::function<void(DataT)>; public: bool Start() { return true; } void Register(const CallBackType& call_back) { consumer_call_back_ = call_back; } void Send(const DataT& data) const { consumer_call_back_(data); } private: CallBackType consumer_call_back_; }; #endif // SENSOR_H_
f04427c140cbec0ea67d331849cc8ea94588536b
8c92baa9eb58de359dec00a785c7648b31076b03
/infoarena_campion/palmieri.cpp
2b7f4f82043e58cb8f3c72016f1592d185340353
[]
no_license
george-popoiu/infoarena_campion
2e5f2433c4fe4252d11765411cb0ff4ed4eb941a
22569d32ac87f8031d9fdaf123da4adf4a7b2a9e
refs/heads/master
2021-01-19T14:59:04.887725
2012-08-08T12:42:30
2012-08-08T12:42:30
5,341,237
3
2
null
null
null
null
UTF-8
C++
false
false
1,251
cpp
palmieri.cpp
#include<stdio.h> #include<algorithm> #define inf "palmieri.in" #define outf "palmieri.out" #define NMax 250001 using namespace std; int N, A; struct punct { int x, y; } V[NMax]; void read() { scanf("%d%d", &N, &A); for(int i=1; i<=N; i++) scanf("%d%d", &V[i].x, &V[i].y); } struct cmp { bool operator () (const punct &a, const punct &b) { if( a.x<b.x ) return true; if( a.x==b.x ) return a.y<b.y; return false; } }; inline int min(int a, int b) { return a<b ? a : b; } inline int max(int a, int b) { return a>b ? a : b; } inline int mod(int a) { return a<0 ? -a : a; } void solve() { sort( V+1, V+N+1, cmp() ); int nrd = 1, maxy = 0, miny = 0; punct lp, fp; fp = V[1]; maxy = miny = V[1].y; for(int i=2; i<=N; i++) { if( mod( mod(V[i].x) - mod(fp.x) ) * ( max(maxy, V[i].y) - min(miny, V[i].y) ) <= A ) { maxy = max(maxy, V[i].y); miny = min(miny, V[i].y); } else { nrd++; fp = V[i]; maxy = miny = fp.y; } } printf("%d", nrd); } int main() { freopen(inf,"r",stdin); freopen(outf,"w",stdout); read(); solve(); return 0; }
7a7082563b3a901527780583ab6c46d6df890bd3
bc583598fa9319ebb537f10f7749cdcf1b1c8819
/LineTopology/console/src/src_line/FEA.cpp
5ad68ff9f0fafb00c906fd583f19f7662024997b
[ "BSL-1.0" ]
permissive
mrcoder95/codeSamples
3f4b90a5715e8910a9fb9d51be06631925757b59
18bcf0e616ba999f4413f9ea1971d61214951a37
refs/heads/master
2022-11-29T14:16:13.293114
2020-08-11T15:00:12
2020-08-11T15:00:12
283,332,983
0
0
null
null
null
null
UTF-8
C++
false
false
2,715
cpp
FEA.cpp
/** Finite Element Analysis Solving linear system of equation using GMRES solver (BOOST) Original Code was developed by Ole Sigmund in MATLAB. Source: https://www.topopt.mek.dtu.dk/Apps-and-software/A-99-line-topology-optimization-code-written-in-MATLAB The MATLAB code is converted to C++ code. Created by: Mohamed Imran Peer Mohamed Email: mrmdimran95@gmail.com */ #include "../main.h" void LineToplogy::FEA (std::vector <std::vector <double>> &x) { // Global Stiffness Matrix Size unsigned int SIZE = 2 * (nelemX + 1) * (nelemY + 1); // Stiffness(Sparse) Matrix compressed_mat K(SIZE, SIZE, 100); // Vector Vector F(SIZE, 0.0); U.resize(SIZE, 0.0); // Building Stiffness Matrix #pragma omp parallel for for (unsigned int i = 0; i < nelemX; i++) { unsigned int n1 = 0; unsigned int n2 = 0; double val = 0.0; for (unsigned int j = 0; j < nelemY; j++) { n1 = (nelemY + 1) * (i ) + j + 1; n2 = (nelemY + 1) * (i + 1) + j + 1; unsigned int dof[8] = { (2 * n1) - 2, (2 * n1) - 1, (2 * n2) - 2, (2 * n2) - 1, 2 * n2 , (2 * n2) + 1, 2 * n1 , (2 * n1) + 1 }; val = std::pow(x[j][i], penal); BOOST_MAT_INSERT(K, KE, &dof[0], 8, val); } } // Creation of Load F(1) = -1.0; // Generation of fixed and free degrees of freedom std::vector <unsigned int> fixeddof(nelemY + 1, 0); Generate_Numbers(fixeddof, 0, (nelemY + 1) * 2, 2); fixeddof.push_back(2 * (nelemX + 1) * (nelemY + 1) - 1); std::vector <unsigned int> alldof(2 * (nelemX + 1) * (nelemY + 1), 0); Generate_Numbers(alldof, 0, 2 * (nelemX + 1) * (nelemY + 1)); std::vector <unsigned int> freedof; std::set_difference(alldof.begin(), alldof.end(), fixeddof.begin(), fixeddof.end(), std::inserter(freedof, freedof.begin())); // Creation of stiffness matrix for freedof mat A(freedof.size(), freedof.size()); Vector b(freedof.size()); Vector x1(freedof.size()); // Extraction of stiffness matrix and load vector from global stiffness matrix and global load vector #pragma omp parallel for for (unsigned int i = 0; i < freedof.size(); i++){ for (unsigned int j = 0; j < freedof.size(); j++) A(i, j) = K(freedof[i], freedof[j]); b(i) = F(freedof[i]); } // Solving linear system of equation SOLVE_SYSTEM_EQUATIONS(x1, A, b, false, false); // assignment of solution to global domain #pragma omp parallel for for (unsigned int i = 0; i < freedof.size(); i++) U[freedof[i]] = x1(i); // Clear allocated memory x1.clear(); A.clear(); K.clear(); F.clear(); }
6da93ea74502af25333e2abe59b178c2180684f1
1482f92f53ee677463a0c200e0481a5e5ddc522a
/src/Renderer/camera.cpp
74c9e638da44a828c10d5479d68696d8f1703472
[ "MIT" ]
permissive
Whittler23/WhitE-SFML-Engine
b8673b3d82b7218dac3f86be1e2265cedc323270
98f6fcba303dc169dfcc4ef21b13e9cb369def66
refs/heads/master
2020-06-25T13:15:54.874479
2019-08-30T19:00:28
2019-08-30T19:00:28
199,318,454
1
0
null
null
null
null
UTF-8
C++
false
false
1,174
cpp
camera.cpp
#include "Renderer/camera.hpp" #include "Logger/logs.hpp" #include "Utilities/cast.hpp" #include "Tests/player.hpp" namespace WhitE { Camera::Camera(sf::RenderTarget& renderTarget) :mRenderTarget(renderTarget) ,mView(renderTarget.getView()) //,mCameraTarget(nullptr) { WE_CORE_INFO("Camera initialized with view size: " + Cast::toString(mView.getSize())); WE_CORE_INFO("Camera center: " + Cast::toString(mView.getCenter())); } void Camera::update(const sf::Time& deltaTime) { //if(mCameraTarget != nullptr) // setViewCenter(mCameraTarget->getPosition()); mRenderTarget.setView(mView); } void Camera::zoom(const float zoomFactor) { mView.zoom(zoomFactor); } void Camera::setViewSize(const sf::Vector2f& viewSize) { mView.setSize(viewSize); } void Camera::setViewCenter(const sf::Vector2f viewCenter) { mView.setCenter(viewCenter); } //void Camera::setCameraTarget(DrawableGameObject* object) //{ // mCameraTarget = object; //} //void Camera::resetCameraTarget() //{ // mCameraTarget = nullptr; //} auto Camera::getViewSize() const -> const sf::Vector2f { return mView.getSize(); } auto Camera::getView() const -> const sf::View & { return mView; } }
fd1fdf1dee3a0e27be2ef8b12fe0347905701926
b59e6c14b813897a7515ccca050f64055ac8a84e
/ConsolePrompt/Main.cpp
2d153e24898acb33ab00f2f32f1ac88d39048664
[]
no_license
kongressnlt/ConsolePrompt
94d365c174ae54ad88eadb159bf4e2f0521c6edb
78768378293f5a053f7811e0a6fa4516b7bbc57a
refs/heads/master
2021-07-15T08:12:14.988257
2017-10-21T19:36:56
2017-10-21T19:36:56
107,580,538
0
0
null
null
null
null
UTF-8
C++
false
false
3,711
cpp
Main.cpp
#include <iostream> #include <fstream> #include <string> #include <Windows.h> #include <vector> #include "Custom_Class.h" #include "aditionally.h" #include "Process_Working.h" #include "MemoryEngine.h" using namespace std; /* Привет, данный проект кодил @alexuiop1337, не удаляй данный ватермарк хотя бы в знак уважения к проделанной работе. К сожалению сюда не попал kewriteprocessmemory() и mmap, но ничего, сурс вы все же увидите, а так ждите byte4???? */ const int cmds_count = 12; string cmds[cmds_count] = { "cmdlist - Shows all commands", "cat read <path to the file> - reads from file and shows it in console", "cat write <path to the file> <your string> - writes string to the file", "ls - info about application startup path folder", "echo <string> - shows your string in the console", "find - find strings by sub-strings", "find_proc_pid <string process name> - returns process's pID", "currentDateTime - shows string with current Date Time", "fileExists <string path> - shows true or false in order if file exists or not", "inject <method> <pid> <pth to a dll> - injects your dll into a process (methods: lla)", "clear - clearing console", "exit - closes app" }; int main() { string command; Custom_Class c_f; aditionally misc; Process_Working pw; cout << "cmdlist - for help" << endl; while (true) { cin >> command; if (command == "cmdlist") { for (int i = 0; i < cmds_count; i++) { cout << cmds[i] << endl; } } else if (command == "find") { string sub_com; cin >> sub_com; for (int i = 0; i < cmds_count; i++) { string res = c_f.find_by_substr(cmds[i], sub_com); res == "" ? (cout << res) : (cout << res << endl); } } else if (command == "find_proc_pid") { string proc_n; cin >> proc_n; cout << pw.FindProcessIdByStr(proc_n) << endl; } else if (command == "inject") { string sub_com; cin >> sub_com; if(sub_com == "lla") { string proc_n; cin >> proc_n; DWORD pid = pw.FindProcessIdByStr(proc_n); if (pid != 0) { string path; cin >> path; char * p = misc.convert_str_to_char(path); if (pw.Inject(pid, p)) { c_f.echo("Injected!"); } else { c_f.echo("Can't inject!"); } } else { c_f.echo("Can't find a process! (" + proc_n + ")"); } } else { c_f.echo("Can't find this method!"); } } else if (command == "currentDateTime") { cout << misc.currentDateTime() << endl; } else if (command == "fileExists") { string path; cin >> path; misc.FileExists(path) ? (cout << "Exist" << endl) : (cout << "File doesn't exist" << endl); } else if (command == "cat") { string arg; cin >> arg; if (arg == "read") { string path; cin >> path; cout << "Readed: " << endl << c_f.cat_raw_read(path) << endl; } else if (arg == "write") { string path; cin >> path; string str; getline(cin, str); c_f.cat_raw_write(path, str); } } else if (command == "ls") { system("dir"); } else if (command == "echo") { string sub_com; getline(cin, sub_com); c_f.Remove_First_Char(sub_com); c_f.echo(sub_com); } else if (command == "clear") { system("cls"); } else if (command == "exit") { return 0; } else { cout << "Unknown command: " << command << endl; } } //6 return 0; }
10d601a174ace541a42411fd4a96748e55afe4ea
3e88ef7f012b58b6d03e06fbc6c6628e1a675ae5
/GameOfLife_mod/Source/Keyboard.hpp
25c4b338f33acdb27178a5ccc93be4e515693ed3
[]
no_license
Kraftex/cpp_proys
b85c0b4b0c7317e50bd9c041670308dee87f3c2f
bcb43953718d89555e66eab4148ae1896c43664d
refs/heads/master
2021-01-16T06:06:17.397363
2020-02-25T19:53:47
2020-02-25T19:53:47
243,002,495
0
0
null
null
null
null
UTF-8
C++
false
false
358
hpp
Keyboard.hpp
#ifndef KEYBOARD_HPP #define KEYBOARD_HPP #include <SFML/Window/Event.hpp> #include <SFML/Window/Keyboard.hpp> #include <array> class Keyboard { private: // array with "KeyCount" number of elements std::array<bool, sf::Keyboard::KeyCount> keys; public: Keyboard(); void update(sf::Event e); bool isKeyDown(sf::Keyboard::Key key) const; }; #endif
278a853ed0b4d449b9192333d333b1bf66285bb5
93343c49771b6e6f2952d03df7e62e6a4ea063bb
/HDOJ/5279_autoAC.cpp
4c17a613fe25d323e4c45984e02db02901bbf405
[]
no_license
Kiritow/OJ-Problems-Source
5aab2c57ab5df01a520073462f5de48ad7cb5b22
1be36799dda7d0e60bd00448f3906b69e7c79b26
refs/heads/master
2022-10-21T08:55:45.581935
2022-09-24T06:13:47
2022-09-24T06:13:47
55,874,477
36
9
null
2018-07-07T00:03:15
2016-04-10T01:06:42
C++
UTF-8
C++
false
false
3,251
cpp
5279_autoAC.cpp
#include <stdio.h> #include <string.h> #include <algorithm> using namespace std ; typedef long long LL ; #define clr(a,x); memset ( a , x , sizeof a ) ; const int MAXN = 1 << 17 ; const int mod = 998244353 ; const int g = 3 ; LL f[MAXN] , invf[MAXN] ; LL tcnt[MAXN] ; LL dp[MAXN] , dp2[MAXN] ; LL x1[MAXN] , x2[MAXN] , x3[MAXN] ; int n ; LL power ( LL a , int b ) { LL res = 1 , tmp = a ; while ( b ) { if ( b & 1 ) res = res * tmp % mod ; tmp = tmp * tmp % mod ; b >>= 1 ; } return res ; } void NTT ( LL y[] , int n , int rev ) { for ( int i = 1 , j , k , t ; i < n ; ++ i ) { for ( j = 0 , k = n >> 1 , t = i ; k ; k >>= 1 , t >>= 1 ) { j = j << 1 | ( t & 1 ) ; } if ( i < j ) swap ( y[i] , y[j] ) ; } for ( int s = 2 , ds = 1 ; s <= n ; ds = s , s <<= 1 ) { LL wn = power ( g , ( mod - 1 ) / s ) ; if ( !rev ) wn = power ( wn , mod - 2 ) ; for ( int k = 0 ; k < n ; k += s ) { LL w = 1 , t ; for ( int i = k ; i < k + ds ; ++ i , w = w * wn % mod ) { y[i + ds] = ( y[i] - ( t = y[i + ds] * w % mod ) + mod ) % mod ; y[i] = ( y[i] + t ) % mod ; } } } if ( !rev ) { LL invn = power ( n , mod - 2 ) ; for ( int i = 0 ; i < n ; ++ i ) { y[i] = y[i] * invn % mod ; } } } void cdq_fz ( int l , int r ) { if ( l == r ) return ; if ( l + 1 == r ) { dp[r] = ( dp[r] + dp[l] ) % mod ; return ; } int m = ( l + r ) >> 1 , n1 = 1 ; cdq_fz ( l , m ) ; while ( n1 <= r - l + 1 ) n1 <<= 1 ; for ( int i = 0 ; i < n1 ; ++ i ) { x1[i] = l + i <= m ? dp[l + i] * invf[l + i] % mod : 0 ; x2[i] = l + i <= r ? tcnt[i + 1] * invf[i] % mod : 0 ; x3[i] = l + i <= r ? tcnt[i + 2] * invf[i] % mod : 0 ; } NTT ( x1 , n1 , 1 ) ; NTT ( x2 , n1 , 1 ) ; NTT ( x3 , n1 , 1 ) ; for ( int i = 0 ; i < n1 ; ++ i ) { x3[i] = x1[i] * x3[i] % mod ; x2[i] = x1[i] * x2[i] % mod ; } NTT ( x2 , n1 , 0 ) ; NTT ( x3 , n1 , 0 ) ; for ( int i = m + 1 ; i <= r ; ++ i ) { dp[i] = ( dp[i] + f[i - 1] * x2[i - l - 1] % mod ) % mod ; dp2[i] = ( dp2[i] + f[i - 2] * x3[i - l - 2] % mod ) % mod ; } cdq_fz ( m + 1 , r ) ; } void preprocess () { f[0] = invf[0] = 1 ; dp[0] = dp2[0] = dp2[1] = 1 ; for ( int i = 1 ; i <= 100000 ; ++ i ) { f[i] = f[i - 1] * i % mod ; invf[i] = power ( f[i] , mod - 2 ) ; if ( i >= 2 ) tcnt[i] = power ( i , i - 2 ) ; } tcnt[1] = 1 ; cdq_fz ( 0 , 100000 ) ; } void solve () { int x ; scanf ( "%d" , &n ) ; int ans1 = power ( 2 , n ) , ans2 = 1 ; for ( int i = 1 ; i <= n ; ++ i ) { scanf ( "%d" , &x ) ; ans1 = ans1 * dp[x] % mod ; if ( n > 2 ) ans2 = ans2 * dp2[x] % mod ; } printf ( "%d\n" , ( ans1 - ans2 + mod ) % mod ) ; } int main () { int T ; preprocess () ; scanf ( "%d" , &T ) ; for ( int i = 1 ; i <= T ; ++ i ) { solve () ; } return 0 ; }
3028580797bcdbc661817187d3d774e5fe098232
ad314dea4fc194b741d69c91ce157b13b8c84959
/LinesMeasurerLibrary/detect-lines.cpp
12fe232bcde494a0c9662d77777baf9a9e1c6566
[]
no_license
aliakseis/Coordinator
2741dc4f6cec8a75111dd89a858a609f9e03a8ea
5820c6ed3a3d9bbee92d882c93336ddad3f0204a
refs/heads/master
2023-03-27T15:35:24.099432
2021-03-26T13:46:43
2021-03-26T13:46:43
344,247,291
0
0
null
null
null
null
UTF-8
C++
false
false
68,802
cpp
detect-lines.cpp
#include "detect-lines.h" #include "known-good.h" #include "tswdft2d.h" #include "opencv2/highgui.hpp" #include "opencv2/imgcodecs.hpp" #include "opencv2/imgproc.hpp" #include <opencv2/photo.hpp> #include <opencv2/plot.hpp> #include <opencv2/xfeatures2d.hpp> #include <opencv2/ximgproc.hpp> #include <ceres/ceres.h> #include "nanoflann.hpp" #include <iostream> #include <map> #include <unordered_map> #include <random> #include <array> #include <deque> #include <set> #include <queue> #include <functional> #include <future> #include <utility> #include <chrono> using namespace cv; using namespace cv::ximgproc; namespace { using namespace cv; // https://hbfs.wordpress.com/2018/03/13/paeths-method-square-roots-part-vii/ template <typename T> auto fastHypot(T v1, T v2) { auto x = std::abs(v1); auto y = std::abs(v2); if (x < y) std::swap(x, y); if (x == 0) return 0.; auto y_x = static_cast<double>(y) / x; auto sq_y_x = y_x * y_x; return x * (1 + sq_y_x / 2 - (sq_y_x * sq_y_x) / 8); } /* // not repeatable void MultithreadedGaussianBlur(const cv::Mat& src, cv::Mat& dst, Size ksize, double sigmaX, double sigmaY = 0) { if (&src != &dst) dst = cv::Mat(src.rows, src.cols, src.type()); bool first = true; enum { NUM_THREADS = 8 }; if (ksize.width != 1) { parallel_for_({0, dst.rows}, [&src, &dst, width = ksize.width, sigmaX, sigmaY](const Range& range) { auto rect = cv::Rect(0, range.start, dst.cols, range.size()); GaussianBlur(src(rect), dst(rect), cv::Size(width, 1), sigmaX, sigmaY); }, NUM_THREADS); first = false; } if (ksize.height != 1) { parallel_for_({0, dst.cols}, [& src = (first ? src : dst), &dst, height = ksize.height, sigmaX, sigmaY](const Range& range) { auto rect = cv::Rect(range.start, 0, range.size(), dst.rows); GaussianBlur(src(rect), dst(rect), cv::Size(1, height), sigmaX, sigmaY); }, NUM_THREADS); } } */ #define MultithreadedGaussianBlur GaussianBlur void doFindPath(const cv::Mat& mat, const cv::Point& pt, cv::Point& final, int vertical, float cumulativeAngle, std::set<std::pair<int, int>>& passed = std::array<std::set<std::pair<int, int>>, 1>()[0]) { if (pt.x < 0 || pt.x >= mat.cols || pt.y < 0 || pt.y >= mat.rows) return; if (!passed.emplace(pt.x, pt.y).second) return; // int dist = pt.y - final.y; // if (abs(vertical) > ((dist > 5)? 1 : 5)) // return; // if (fabs(cumulativeAngle) > ((dist > 5) ? 1.8 : 10.)) // return; if (abs(vertical) > 1) return; if (fabs(cumulativeAngle) > 1.8) return; if (mat.at<uchar>(pt) == 0) return; if (final.y > pt.y) final = pt; cumulativeAngle *= 0.8; doFindPath(mat, Point(pt.x, pt.y - 1), final, 0, cumulativeAngle, passed); doFindPath(mat, Point(pt.x + 1, pt.y - 1), final, 0, cumulativeAngle + 0.5, passed); doFindPath(mat, Point(pt.x - 1, pt.y - 1), final, 0, cumulativeAngle - 0.5, passed); if (vertical >= 0) doFindPath(mat, Point(pt.x + 1, pt.y), final, vertical + 1, cumulativeAngle + 1, passed); if (vertical <= 0) doFindPath(mat, Point(pt.x - 1, pt.y), final, vertical - 1, cumulativeAngle - 1, passed); } cv::Point FindPath(const cv::Mat& mat, const cv::Point& start) { cv::Point pos = start; while (pos.x >= 0 && (mat.at<uchar>(pos) == 0 || (doFindPath(mat, pos, pos, 0, 0), pos.y == start.y))) --pos.x; if (pos.x < 0) return start; // doFindPath(mat, pos, pos, 0, 0); return pos; } ////////////////////////////////////////////////////////////////////////////// auto extendedLine(const Vec4i& line, double d, double max_coeff) { const auto length = fastHypot(line[2] - line[0], line[3] - line[1]); const auto coeff = std::min(d / length, max_coeff); double xd = (line[2] - line[0]) * coeff; double yd = (line[3] - line[1]) * coeff; return Vec4f(line[0] - xd, line[1] - yd, line[2] + xd, line[3] + yd); } std::array<Point2f, 4> boundingRectangleContour(const Vec4i& line, float d) { // finds coordinates of perpendicular lines with length d in both line points const auto length = fastHypot(line[2] - line[0], line[3] - line[1]); const auto coeff = d / length; // dx: -dy // dy: dx double yd = (line[2] - line[0]) * coeff; double xd = -(line[3] - line[1]) * coeff; return {Point2f(line[0] - xd, line[1] - yd), Point2f(line[0] + xd, line[1] + yd), Point2f(line[2] + xd, line[3] + yd), Point2f(line[2] - xd, line[3] - yd)}; } double pointPolygonTest_(const std::array<Point2f, 4>& contour, Point2f pt, bool measureDist) { double result = 0; int i, total = contour.size(), counter = 0; double min_dist_num = FLT_MAX, min_dist_denom = 1; const auto& cntf = contour; Point2f v0, v; v = cntf[total - 1]; if (!measureDist) { for (i = 0; i < total; i++) { double dist; v0 = v; v = cntf[i]; // if ((v0.y <= pt.y && v.y <= pt.y) || (v0.y > pt.y && v.y > pt.y) || (v0.x < pt.x && v.x < pt.x)) { if ((v0.y <= pt.y) == (v.y <= pt.y) || (v0.x < pt.x && v.x < pt.x)) { if (pt.y == v.y && (pt.x == v.x || (pt.y == v0.y && ((v0.x <= pt.x && pt.x <= v.x) || (v.x <= pt.x && pt.x <= v0.x))))) return 0; continue; } dist = (double)(pt.y - v0.y) * (v.x - v0.x) - (double)(pt.x - v0.x) * (v.y - v0.y); if (dist == 0) return 0; if (v.y < v0.y) dist = -dist; counter += dist > 0; } result = counter % 2 == 0 ? -1 : 1; } else { for (i = 0; i < total; i++) { double dx, dy, dx1, dy1, dx2, dy2, dist_num, dist_denom = 1; v0 = v; v = cntf[i]; dx = v.x - v0.x; dy = v.y - v0.y; dx1 = pt.x - v0.x; dy1 = pt.y - v0.y; dx2 = pt.x - v.x; dy2 = pt.y - v.y; if (dx1 * dx + dy1 * dy <= 0) dist_num = dx1 * dx1 + dy1 * dy1; else if (dx2 * dx + dy2 * dy >= 0) dist_num = dx2 * dx2 + dy2 * dy2; else { dist_num = (dy1 * dx - dx1 * dy); dist_num *= dist_num; dist_denom = dx * dx + dy * dy; } if (dist_num * min_dist_denom < min_dist_num * dist_denom) { min_dist_num = dist_num; min_dist_denom = dist_denom; if (min_dist_num == 0) break; } if ((v0.y <= pt.y && v.y <= pt.y) || (v0.y > pt.y && v.y > pt.y) || (v0.x < pt.x && v.x < pt.x)) continue; dist_num = dy1 * dx - dx1 * dy; if (dy < 0) dist_num = -dist_num; counter += dist_num > 0; } result = std::sqrt(min_dist_num / min_dist_denom); if (counter % 2 == 0) result = -result; } return result; } bool extendedBoundingRectangleLineEquivalence(const Vec4i& l1, const Vec4i& l2, float extensionLength, float extensionLengthMaxFraction, float boundingRectangleThickness) { const auto el1 = extendedLine(l1, extensionLength, extensionLengthMaxFraction); const auto el2 = extendedLine(l2, extensionLength, extensionLengthMaxFraction); // calculate window around extended line // at least one point needs to inside extended bounding rectangle of other line, const auto lineBoundingContour = boundingRectangleContour(el1, boundingRectangleThickness / 2); return pointPolygonTest_(lineBoundingContour, {el2[0], el2[1]}, false) >= 0 || pointPolygonTest_(lineBoundingContour, {el2[2], el2[3]}, false) >= 0 || pointPolygonTest_(lineBoundingContour, Point2f(l2[0], l2[1]), false) >= 0 || pointPolygonTest_(lineBoundingContour, Point2f(l2[2], l2[3]), false) >= 0; } Vec4i HandlePointCloud(const std::vector<Point2i>& pointCloud) { // lineParams: [vx,vy, x0,y0]: (normalized vector, point on our contour) // (x,y) = (x0,y0) + t*(vx,vy), t -> (-inf; inf) Vec4f lineParams; fitLine(pointCloud, lineParams, DIST_L2, 0, 0.01, 0.01); // derive the bounding xs of point cloud std::vector<Point2i>::const_iterator minYP; std::vector<Point2i>::const_iterator maxYP; std::tie(minYP, maxYP) = std::minmax_element(pointCloud.begin(), pointCloud.end(), [](const Point2i& p1, const Point2i& p2) { return p1.y < p2.y; }); // derive y coords of fitted line float m = lineParams[0] / lineParams[1]; int x1 = ((minYP->y - lineParams[3]) * m) + lineParams[2]; int x2 = ((maxYP->y - lineParams[3]) * m) + lineParams[2]; return {x1, minYP->y, x2, maxYP->y}; } std::vector<Vec4i> reduceLines(const std::vector<Vec4i>& linesP, float extensionLength, float extensionLengthMaxFraction, float boundingRectangleThickness) { // partition via our partitioning function std::vector<int> labels; int equilavenceClassesCount = cv::partition( linesP, labels, [extensionLength, extensionLengthMaxFraction, boundingRectangleThickness](const Vec4i& l1, const Vec4i& l2) { return extendedBoundingRectangleLineEquivalence(l1, l2, // line extension length extensionLength, // line extension length - as fraction of original line width extensionLengthMaxFraction, // thickness of bounding rectangle around each line boundingRectangleThickness); }); std::vector<std::vector<Vec4i>> groups(equilavenceClassesCount); for (int i = 0; i < linesP.size(); i++) { const Vec4i& detectedLine = linesP[i]; groups[labels[i]].push_back(detectedLine); } equilavenceClassesCount = groups.size(); // build point clouds out of each equivalence classes std::vector<std::vector<Point2i>> pointClouds(equilavenceClassesCount); for (int i = 0; i < equilavenceClassesCount; ++i) { for (auto& detectedLine : groups[i]) { pointClouds[i].emplace_back(detectedLine[0], detectedLine[1]); pointClouds[i].emplace_back(detectedLine[2], detectedLine[3]); } } std::vector<Vec4i> reducedLines = std::accumulate(pointClouds.begin(), pointClouds.end(), std::vector<Vec4i>{}, [](std::vector<Vec4i> target, const std::vector<Point2i>& pointCloud) { target.push_back(HandlePointCloud(pointCloud)); return target; }); return reducedLines; } template <typename T> void MergeLines(std::vector<Vec4i>& reducedLines, T sortLam) { for (int i = reducedLines.size(); --i >= 0;) { auto& line = reducedLines[i]; if (fastHypot(line[2] - line[0], line[3] - line[1]) > 30) { continue; } auto val = sortLam(line); double dist; std::vector<Vec4i>::iterator it; if (i == 0) { it = reducedLines.begin() + 1; dist = sortLam(*it) - val; } else if (i == reducedLines.size() - 1) { it = reducedLines.begin() + i - 2; dist = val - sortLam(*it); } else { const auto dist1 = val - sortLam(reducedLines[i - 1]); const auto dist2 = sortLam(reducedLines[i + 1]) - val; if (dist1 < dist2) { it = reducedLines.begin() + i - 1; dist = dist1; } else { it = reducedLines.begin() + i + 1; dist = dist2; } } const auto distY = abs((line[1] + line[3]) / 2 - ((*it)[1] + (*it)[3]) / 2) - (abs(line[1] - line[3]) + abs((*it)[1] - (*it)[3])) / 2; const auto threshold = 2.5; const auto thresholdY = 25; if (dist > threshold || distY > thresholdY) { reducedLines.erase(reducedLines.begin() + i); continue; } std::vector<Point2i> pointCloud; for (auto& detectedLine : {line, *it}) { pointCloud.emplace_back(detectedLine[0], detectedLine[1]); pointCloud.emplace_back(detectedLine[2], detectedLine[3]); } line = HandlePointCloud(pointCloud); reducedLines.erase(it); } } ////////////////////////////////////////////////////////////////////////////// void calcGST(const cv::Mat& inputImg, cv::Mat& imgCoherencyOut, cv::Mat& imgOrientationOut, int w = 52) { using namespace cv; Mat img; inputImg.convertTo(img, CV_32F); // GST components calculation (start) // J = (J11 J12; J12 J22) - GST Mat imgDiffX, imgDiffY, imgDiffXY; Sobel(img, imgDiffX, CV_32F, 1, 0, 3); Sobel(img, imgDiffY, CV_32F, 0, 1, 3); multiply(imgDiffX, imgDiffY, imgDiffXY); Mat imgDiffXX, imgDiffYY; multiply(imgDiffX, imgDiffX, imgDiffXX); multiply(imgDiffY, imgDiffY, imgDiffYY); Mat J11, J22, J12; // J11, J22 and J12 are GST components boxFilter(imgDiffXX, J11, CV_32F, Size(w, w)); boxFilter(imgDiffYY, J22, CV_32F, Size(w, w)); boxFilter(imgDiffXY, J12, CV_32F, Size(w, w)); // GST components calculation (stop) // eigenvalue calculation (start) // lambda1 = 0.5*(J11 + J22 + sqrt((J11-J22)^2 + 4*J12^2)) // lambda2 = 0.5*(J11 + J22 - sqrt((J11-J22)^2 + 4*J12^2)) Mat tmp1, tmp2, tmp3, tmp4; tmp1 = J11 + J22; tmp2 = J11 - J22; multiply(tmp2, tmp2, tmp2); multiply(J12, J12, tmp3); sqrt(tmp2 + 4.0 * tmp3, tmp4); Mat lambda1, lambda2; lambda1 = tmp1 + tmp4; lambda1 = 0.5 * lambda1; // biggest eigenvalue lambda2 = tmp1 - tmp4; lambda2 = 0.5 * lambda2; // smallest eigenvalue // eigenvalue calculation (stop) // Coherency calculation (start) // Coherency = (lambda1 - lambda2)/(lambda1 + lambda2)) - measure of anisotropism // Coherency is anisotropy degree (consistency of local orientation) divide(lambda1 - lambda2, lambda1 + lambda2, imgCoherencyOut); // Coherency calculation (stop) // orientation angle calculation (start) // tan(2*Alpha) = 2*J12/(J22 - J11) // Alpha = 0.5 atan2(2*J12/(J22 - J11)) phase(J22 - J11, 2.0 * J12, imgOrientationOut, false); imgOrientationOut = 0.5 * imgOrientationOut; // orientation angle calculation (stop) } const int IMAGE_DIMENSION = 800; // const int IMAGE_DIMENSION = 512; enum { WINDOW_DIMENSION_X = 64 }; enum { WINDOW_DIMENSION_Y = 1 }; const auto visualizationRows = IMAGE_DIMENSION - WINDOW_DIMENSION_Y + 1; const auto visualizationCols = IMAGE_DIMENSION - WINDOW_DIMENSION_X + 1; ////////////////////////////////////////////////////////////////////////////// const double POLY_COEFF = 0.001; ////////////////////////////////////////////////////////////////////////////// double CalcPoly(const cv::Mat& X, double x) { double result = X.at<double>(0, 0); double v = 1.; for (int i = 1; i < X.rows; ++i) { v *= x; result += X.at<double>(i, 0) * v; } return result; } void fitLineRANSAC2(const std::vector<cv::Point>& vals, cv::Mat& a, int n_samples, std::vector<bool>& inlierFlag, double noise_sigma = 5.) { // int n_data = vals.size(); int N = 5000; // iterations double T = 3 * noise_sigma; // residual threshold // int n_sample = 3; // int max_cnt = 0; double max_weight = 0.; cv::Mat best_model(n_samples, 1, CV_64FC1); std::default_random_engine dre; std::vector<int> k(n_samples); for (int n = 0; n < N; n++) { // random sampling - n_samples points for (int j = 0; j < n_samples; ++j) k[j] = j; std::map<int, int> displaced; // Fisher-Yates shuffle Algorithm for (int j = 0; j < n_samples; ++j) { std::uniform_int_distribution<int> di(j, vals.size() - 1); int idx = di(dre); if (idx != j) { int& to_exchange = (idx < n_samples) ? k[idx] : displaced.try_emplace(idx, idx).first->second; std::swap(k[j], to_exchange); } } // printf("random sample : %d %d %d\n", k[0], k[1], k[2]); // model estimation cv::Mat AA(n_samples, n_samples, CV_64FC1); cv::Mat BB(n_samples, 1, CV_64FC1); for (int i = 0; i < n_samples; i++) { AA.at<double>(i, 0) = 1.; double v = 1.; for (int j = 1; j < n_samples; ++j) { v *= vals[k[i]].x * POLY_COEFF; AA.at<double>(i, j) = v; } BB.at<double>(i, 0) = vals[k[i]].y; } cv::Mat AA_pinv(n_samples, n_samples, CV_64FC1); invert(AA, AA_pinv, cv::DECOMP_SVD); cv::Mat X = AA_pinv * BB; // evaluation // int cnt = 0; std::unordered_map<int, double> bestValues; double weight = 0.; for (const auto& v : vals) { const double arg = std::abs(v.y - CalcPoly(X, v.x * POLY_COEFF)); const double data = exp(-arg * arg / (2 * noise_sigma * noise_sigma)); auto& val = bestValues[v.x]; if (data > val) { weight += data - val; val = data; } // if (data < T) //{ // cnt++; //} } // if (cnt > max_cnt) if (weight > max_weight) { best_model = X; max_weight = weight; } } //------------------------------------------------------------------- optional LS fitting inlierFlag = std::vector<bool>(vals.size(), false); std::vector<int> vec_index; for (int i = 0; i < vals.size(); i++) { const auto& v = vals[i]; double data = std::abs(v.y - CalcPoly(best_model, v.x * POLY_COEFF)); if (data < T) { inlierFlag[i] = true; vec_index.push_back(i); } } cv::Mat A2(vec_index.size(), n_samples, CV_64FC1); cv::Mat B2(vec_index.size(), 1, CV_64FC1); for (int i = 0; i < vec_index.size(); i++) { A2.at<double>(i, 0) = 1.; double v = 1.; for (int j = 1; j < n_samples; ++j) { v *= vals[vec_index[i]].x * POLY_COEFF; A2.at<double>(i, j) = v; } B2.at<double>(i, 0) = vals[vec_index[i]].y; } cv::Mat A2_pinv(n_samples, vec_index.size(), CV_64FC1); invert(A2, A2_pinv, cv::DECOMP_SVD); a = A2_pinv * B2; // return X; } ////////////////////////////////////////////////////////////////////////////// struct PolynomialResidual { PolynomialResidual(double x, double y, int n_samples) : x_(x), y_(y), n_samples_(n_samples) {} template <typename T> bool operator()(T const* const* relative_poses, T* residuals) const { T y = *(relative_poses[0]) + *(relative_poses[1]) * x_; for (int i = 2; i < n_samples_; ++i) y += *(relative_poses[i]) * std::pow(x_, i); residuals[0] = T(y_) - y; return true; } private: // Observations for a sample. const double x_; const double y_; int n_samples_; }; ////////////////////////////////////////////////////////////////////////////// class PointsProvider { public: PointsProvider(const std::vector<cv::Point>& ptSet) : ptSet_(ptSet) {} size_t kdtree_get_point_count() const { return ptSet_.size(); } // Returns the dim'th component of the idx'th point in the class: // Since this is inlined and the "dim" argument is typically an immediate value, the // "if/else's" are actually solved at compile time. float kdtree_get_pt(const size_t idx, const size_t dim) const { auto& v = ptSet_[idx]; return dim ? v.y : v.x; } // Optional bounding-box computation: return false to default to a standard bbox computation loop. // Return true if the BBOX was already computed by the class and returned in "bb" so it can be avoided to redo it again. // Look at bb.size() to find out the expected dimensionality (e.g. 2 or 3 for point clouds) template <class BBOX> bool kdtree_get_bbox(BBOX& /* bb */) const { return false; } private: const std::vector<cv::Point>& ptSet_; }; // namespace // construct a kd-tree index: typedef nanoflann::KDTreeSingleIndexAdaptor<nanoflann::L2_Simple_Adaptor<float, PointsProvider>, PointsProvider, 2 /* dim */ > my_kd_tree_t; } // namespace std::vector<std::tuple<double, double, double, double, double>> calculating( const std::string& filename, std::function<void(const cv::String&, cv::InputArray)> do_imshow_) { //* auto imshow = [do_imshow_](const char* winname, InputArray mat) { if (do_imshow_) do_imshow_(winname, mat); }; const bool do_imshow = do_imshow_ != nullptr; //*/ /* const bool do_imshow = true; auto name = filename; auto pos = name.find_last_of("\\/"); if (std::string::npos != pos) { name = name.substr(pos + 1); } pos = name.find('.'); if (std::string::npos != pos) { name = name.substr(0, pos); } static std::atomic<int> count; auto imshow = [&name, cnt = ++count](const char* winname, InputArray mat) { std::string fname = "/generated/" + std::to_string(cnt) + '_' + name + '_' + winname + ".jpg"; imwrite(fname, mat); }; //*/ auto start = std::chrono::high_resolution_clock::now(); Mat src = imread(filename, cv::IMREAD_ANYDEPTH | IMREAD_GRAYSCALE); auto duration = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::high_resolution_clock::now() - start); std::cout << duration.count() << " microseconds.\n"; if (src.empty()) { throw std::runtime_error("Error opening image"); } // std::cout << src.type() << '\n'; const Size originalSize(src.cols, src.rows); cv::Mat img; src.convertTo(img, CV_32F); if ((src.type() & CV_MAT_DEPTH_MASK) == CV_16U) { img /= 256.; } cv::resize(img, img, cv::Size(IMAGE_DIMENSION, IMAGE_DIMENSION), 0, 0, cv::INTER_LANCZOS4); // cv::normalize(img, img, 0, 255, cv::NORM_MINMAX); Scalar m = cv::mean(img); std::cout << "*** Mean value: " << m << '\n'; auto ms = moments(img); const double base = ms.m00 * (IMAGE_DIMENSION - 1.) / 2; const bool mirrorX = ms.m10 > base; const bool mirrorY = ms.m01 > base; if (mirrorX) { flip(img, img, 1); } if (mirrorY) { flip(img, img, 0); } const auto kernel_size = 3; cv::Mat dst; MultithreadedGaussianBlur(img, dst, cv::Size(kernel_size, kernel_size), 0, 0); const auto filtered = dst.clone(); Mat background; MultithreadedGaussianBlur(img, background, Size(63, 11), 0, 0); // background -= 1; // histogram if (do_imshow) { cv::Mat hist; int histSize = 256; float range[] = {0, 256}; // the upper boundary is exclusive const float* histRange = {range}; bool uniform = true, accumulate = false; calcHist(&dst, 1, 0, Mat(), hist, 1, &histSize, &histRange, uniform, accumulate); int hist_w = 512, hist_h = 400; int bin_w = cvRound((double)hist_w / histSize); Mat histImage(hist_h, hist_w, CV_8UC3, Scalar(0, 0, 0)); normalize(hist, hist, 0, histImage.rows, NORM_MINMAX, -1, Mat()); for (int i = 1; i < histSize; i++) { line(histImage, Point(bin_w * (i - 1), hist_h - cvRound(hist.at<float>(i - 1))), Point(bin_w * (i), hist_h - cvRound(hist.at<float>(i))), Scalar(0, 255, 0), 2, 8, 0); } imshow("calcHist Demo", histImage); } Mat diff = dst < background; imshow("Diff", diff); // median stuff float thr = 0; { std::priority_queue<float, std::vector<float>, std::greater<float>> heap; enum { HEAP_SIZE = IMAGE_DIMENSION * IMAGE_DIMENSION * 2 / 5 }; for (int y = 0; y < dst.rows; ++y) for (int x = 0; x < dst.rows; ++x) { auto v = dst.at<float>(y, x); if (heap.size() >= HEAP_SIZE) { if (heap.top() >= v) continue; heap.pop(); } heap.push(v); } thr = heap.top(); } // mask /* auto thr = cv::mean(dst.row(0))[0]; std::cout << "Threshold: " << thr << '\n'; if (thr > 254.) thr -= 10; else thr -= 30; */ Mat mask = dst < thr; // dst.convertTo(mask, CV_8U); // threshold(dst, mask, 180, 255, THRESH_BINARY_INV); int horizontal_size = 40; // Create structure element for extracting vertical lines through morphology operations Mat horizontalStructure = getStructuringElement(MORPH_RECT, Size(horizontal_size, 1)); // Apply morphology operations dilate(mask, mask, horizontalStructure); imshow("Mask", mask); dst += 1.; cv::log(dst, dst); auto tomasiLam = [](cv::Mat dst) { cv::Mat tomasiRspImg = Mat::zeros(dst.size(), CV_32FC1); // Calculate the minimum eigenvalue, namely ShiTomasi angle response value R = min(L1, L2) int blockSize = 3; int ksize = 3; cv::cornerMinEigenVal(dst, tomasiRspImg, blockSize, ksize, BORDER_DEFAULT); return tomasiRspImg; }; auto tomasiFut = std::async(std::launch::async, tomasiLam, dst.clone()).share(); cv::Mat stripeless; MultithreadedGaussianBlur(dst, stripeless, cv::Size(63, 1), 0, 0); // cv::Mat funcFloat = (dst - stripeless + 8) * 16; cv::Mat funcFloat = dst - stripeless; normalize(funcFloat, funcFloat, -64, 255 + 64, cv::NORM_MINMAX); cv::Mat func; funcFloat.convertTo(func, CV_8U); // !!! dst = func.clone(); MultithreadedGaussianBlur(dst, dst, cv::Size(1, 5), 0, 0); imshow("dst filtered", dst); auto surfLam = [&func] { auto surf = cv::xfeatures2d::SURF::create(1700); std::vector<cv::KeyPoint> keypoints; cv::Mat descriptors; surf->detectAndCompute(func, cv::noArray(), keypoints, descriptors); // http://itnotesblog.ru/note.php?id=271 cv::FlannBasedMatcher matcher; std::vector<cv::DMatch> matches; matcher.match(descriptors, GetKnownGood(), matches); return std::make_pair(keypoints, matches); }; auto surfFut = std::async(std::launch::async, surfLam).share(); auto imgCoherencyOrientationLam = [&funcFloat] { cv::Mat imgCoherency, imgOrientation; calcGST(funcFloat, imgCoherency, imgOrientation); return std::make_pair(imgCoherency, imgOrientation); }; auto imgCoherencyOrientationFut = std::async(std::launch::async, imgCoherencyOrientationLam); MultithreadedGaussianBlur(img, img, cv::Size(1, 33), 0, 0); #if 0 auto transformed = tswdft2d((float*)img.data, WINDOW_DIMENSION_Y, WINDOW_DIMENSION_X, img.rows, img.cols); std::vector<unsigned char> freqs(visualizationRows * visualizationCols); { double amplitudeCoeffs[WINDOW_DIMENSION_X]; amplitudeCoeffs[0] = 0; for (int i = 1; i < WINDOW_DIMENSION_X; ++i) amplitudeCoeffs[i] = 1. / sqrt(sqrt(i)); parallel_for_({0, visualizationRows}, [&](const Range& range) { // for (int y = 0; y < visualizationRows; ++y) for (int y = range.start; y < range.end; ++y) for (int x = 0; x < visualizationCols; ++x) { const auto sourceOffset = y * visualizationCols + x; unsigned int freq = 0; float threshold = 0; for (unsigned int j = 3; j <= WINDOW_DIMENSION_X / 2; ++j) { const auto& v = transformed[sourceOffset * WINDOW_DIMENSION_Y * WINDOW_DIMENSION_X + j]; const auto amplitude = fastHypot(v.real(), v.imag()) * amplitudeCoeffs[j]; if (amplitude > threshold) { freq = j; threshold = amplitude; } } freqs[sourceOffset] = freq; } }); } #endif std::vector<unsigned char> freqs(visualizationRows * visualizationCols); cv::Mat amplitudes(visualizationRows, visualizationCols, CV_32FC1); { double amplitudeCoeffs[WINDOW_DIMENSION_X]; amplitudeCoeffs[0] = 0; for (int i = 1; i < WINDOW_DIMENSION_X; ++i) amplitudeCoeffs[i] = 1. / sqrt(sqrt(i)); auto lam = [&](const Range& range) { auto transformed = tswdft2d(((float*)img.data) + img.cols * range.start, WINDOW_DIMENSION_Y, WINDOW_DIMENSION_X, range.end - range.start, // img.rows, img.cols); // for (int y = 0; y < visualizationRows; ++y) for (int y = range.start; y < range.end; ++y) for (int x = 0; x < visualizationCols; ++x) { const auto sourceOffset = (y - range.start) * visualizationCols + x; const auto destinationOffset = y * visualizationCols + x; unsigned int freq = 0; float threshold = 0; for (unsigned int j = 3; j <= WINDOW_DIMENSION_X / 2; ++j) { const auto& v = transformed[sourceOffset * WINDOW_DIMENSION_Y * WINDOW_DIMENSION_X + j]; const auto amplitude = fastHypot(v.real(), v.imag()) * amplitudeCoeffs[j]; if (amplitude > threshold) { freq = j; threshold = amplitude; } } freqs[destinationOffset] = freq; amplitudes.at<float>(y, x) = threshold; } }; // parallel_for_({0, visualizationRows}, lam); std::vector<std::future<void>> proxies; const auto numChunks = visualizationRows / 2; for (int i = 0; i < numChunks; ++i) { proxies.push_back(std::async(std::launch::async, lam, Range((visualizationRows * i) / numChunks, (visualizationRows * (i + 1)) / numChunks))); } } amplitudes += 1.; cv::log(amplitudes, amplitudes); cv::normalize(amplitudes, amplitudes, 0, 1, cv::NORM_MINMAX); imshow("amplitudes", amplitudes); cv::Mat borderline00(visualizationRows, visualizationCols, CV_8UC1, cv::Scalar(0)); cv::Mat borderline0(visualizationRows, visualizationCols, CV_8UC1, cv::Scalar(0)); auto [imgCoherency, imgOrientation] = imgCoherencyOrientationFut.get(); cv::Mat imgOrientationBin; inRange(imgOrientation, cv::Scalar(CV_PI / 2 - 0.2), cv::Scalar(CV_PI / 2 + 0.2), imgOrientationBin); cv::Mat imgCoherencyBin = imgCoherency > 0.28; // for (int gloriousAttempt = 0; gloriousAttempt < 2; ++gloriousAttempt) { // border line std::vector<cv::Point> ptSet; for (int gloriousAttempt = 0; gloriousAttempt < 2; ++gloriousAttempt) { std::vector<int> lastTransitions(visualizationCols, INT_MIN / 2); for (int yy = 0; yy < visualizationRows - 1; ++yy) for (int x = 0; x < visualizationCols; ++x) { const int y = gloriousAttempt ? (visualizationRows - 1 - yy) : yy; const auto sourceOffset1 = y * visualizationCols + x; const auto sourceOffset2 = (gloriousAttempt ? (visualizationRows - 2 - yy) : (yy + 1)) * visualizationCols + x; #if 0 int freq1 = 0; int freq2 = 0; float threshold1 = 0; float threshold2 = 0; for (int j = 3; j <= WINDOW_DIMENSION_X / 2; ++j) { const auto amplitude1 = std::abs(transformed[sourceOffset1 * WINDOW_DIMENSION_Y * WINDOW_DIMENSION_X + j]) * amplitudeCoeffs[j]; const auto amplitude2 = std::abs(transformed[sourceOffset2 * WINDOW_DIMENSION_Y * WINDOW_DIMENSION_X + j]) * amplitudeCoeffs[j]; if (amplitude1 > threshold1) { freq1 = j; threshold1 = amplitude1; } if (amplitude2 > threshold2) { freq2 = j; threshold2 = amplitude2; } } #endif int freq1 = freqs[sourceOffset1]; int freq2 = freqs[sourceOffset2]; enum { PROBE_BIAS = 10 }; // if (freq1 > 2 && freq1 >= ((freq2 * 3 / 5 - 1)) && freq1 <= ((freq2 * 3 / 5 + 1))) if (y > PROBE_BIAS && freq2 > freq1 && freq2 >= freq1 * 5 / 3 && freq2 <= freq1 * 3) // 5 / 2) { // const auto coherency = imgCoherency.at<float>(y + WINDOW_DIMENSION_Y / 2, x + WINDOW_DIMENSION_X / 2); const auto coherencyOK = imgCoherencyBin.at<uchar>(y + WINDOW_DIMENSION_Y / 2, x + WINDOW_DIMENSION_X / 2) && imgCoherencyBin.at<uchar>(y + WINDOW_DIMENSION_Y / 2 - PROBE_BIAS, x + WINDOW_DIMENSION_X / 2); const auto orientationOk = imgOrientationBin.at<uchar>(y + WINDOW_DIMENSION_Y / 2, x + WINDOW_DIMENSION_X / 2) && imgOrientationBin.at<uchar>(y + WINDOW_DIMENSION_Y / 2 - PROBE_BIAS, x + WINDOW_DIMENSION_X / 2); const auto maskOk = mask.at<uchar>(y + WINDOW_DIMENSION_Y / 2, x + WINDOW_DIMENSION_X / 2) && mask.at<uchar>(y + WINDOW_DIMENSION_Y / 2 - PROBE_BIAS, x + WINDOW_DIMENSION_X / 2); if (coherencyOK && orientationOk && maskOk && yy - lastTransitions[x] > 50) { lastTransitions[x] = yy; if (y < visualizationRows - 100) { // exclude lowest area borderline00.at<uchar>(y, x) = 255; ptSet.emplace_back(x, y); } } } } } // filtering #if 1 for (auto& pt : ptSet) pt.y *= 2; // introduce anisotropy for (;;) { PointsProvider provider(ptSet); my_kd_tree_t infos(2, provider); infos.buildIndex(); const int k = 16; std::vector<size_t> index(k); std::vector<float> dist(k); std::vector<bool> goodOnes(ptSet.size()); for (int i = 0; i < ptSet.size(); ++i) { float pos[2]; pos[0] = ptSet[i].x; pos[1] = ptSet[i].y; infos.knnSearch(&pos[0], k, &index[0], &dist[0]); goodOnes[i] = dist[k - 1] < 30 * 30; } bool found = false; for (int i = ptSet.size(); --i >= 0;) { if (!goodOnes[i]) { found = true; ptSet.erase(ptSet.begin() + i); } } if (!found) break; } for (auto& pt : ptSet) pt.y /= 2; #endif { // partition via our partitioning function std::vector<int> labels; int equilavenceClassesCount = cv::partition( ptSet, labels, [](const cv::Point& p1, const cv::Point& p2) { return fastHypot(p2.x - p1.x, p2.y - p1.y) < 25; }); if (equilavenceClassesCount == 0) return {}; cv::Mat borderline01 = cv::Mat::zeros(visualizationRows, visualizationCols, CV_8UC3); for (int i = 0; i < ptSet.size(); ++i) { RNG rng(labels[i]); borderline01.at<Vec3b>(ptSet[i].y, ptSet[i].x) = Vec3b(rng.uniform(30, 255), rng.uniform(30, 255), rng.uniform(30, 255)); } imshow("borderline01", borderline01); std::vector<int> groupCounts(equilavenceClassesCount); std::vector<int> groupXCounts(equilavenceClassesCount); std::vector<int> groupSqXCounts(equilavenceClassesCount); std::vector<int> groupYCounts(equilavenceClassesCount); std::vector<int> groupSqYCounts(equilavenceClassesCount); std::vector<float> groupAccumCoherencies(equilavenceClassesCount); for (int i = ptSet.size(); --i >= 0;) // for (auto& l : labels) { auto l = labels[i]; auto& pt = ptSet[i]; ++groupCounts[l]; groupXCounts[l] += pt.x; groupSqXCounts[l] += pt.x * pt.x; groupYCounts[l] += pt.y; groupSqYCounts[l] += pt.y * pt.y; groupAccumCoherencies[l] += imgCoherency.at<float>(pt.y, pt.x); } // merge enum { MERGE_VARIANCE = 10 }; for (int l2 = equilavenceClassesCount; --l2 > 0;) { for (int l1 = l2; --l1 >= 0;) { if (std::abs(double(groupYCounts[l1]) / groupCounts[l1] - double(groupYCounts[l2]) / groupCounts[l2]) < MERGE_VARIANCE) { groupCounts[l1] += groupCounts[l2]; groupCounts.erase(groupCounts.begin() + l2); groupXCounts[l1] += groupXCounts[l2]; groupXCounts.erase(groupXCounts.begin() + l2); groupSqXCounts[l1] += groupSqXCounts[l2]; groupSqXCounts.erase(groupSqXCounts.begin() + l2); groupYCounts[l1] += groupYCounts[l2]; groupYCounts.erase(groupYCounts.begin() + l2); groupSqYCounts[l1] += groupSqYCounts[l2]; groupSqYCounts.erase(groupSqYCounts.begin() + l2); groupAccumCoherencies[l1] += groupAccumCoherencies[l2]; groupAccumCoherencies.erase(groupAccumCoherencies.begin() + l2); --equilavenceClassesCount; for (auto& l : labels) { if (l == l2) l = l1; else if (l > l2) --l; } break; } } } cv::Mat borderline02 = cv::Mat::zeros(visualizationRows, visualizationCols, CV_8UC3); for (int i = 0; i < ptSet.size(); ++i) { RNG rng(labels[i]); borderline02.at<Vec3b>(ptSet[i].y, ptSet[i].x) = Vec3b(rng.uniform(30, 255), rng.uniform(30, 255), rng.uniform(30, 255)); } imshow("borderline02", borderline02); auto maxIdx = std::max_element(groupCounts.begin(), groupCounts.end()) - groupCounts.begin(); const auto threshold = groupCounts[maxIdx] * 0.4; for (int i = 0; i < equilavenceClassesCount; ++i) { groupAccumCoherencies[i] /= groupCounts[i]; } const auto coherencyThreshold = *std::max_element(groupAccumCoherencies.begin(), groupAccumCoherencies.end()) * 0.7; auto lam = [&](int l) { auto avgX = double(groupXCounts[l]) / groupCounts[l]; auto avgY = double(groupYCounts[l]) / groupCounts[l]; auto devX = sqrt(double(groupSqXCounts[l]) / groupCounts[l] - avgX * avgX); auto devY = sqrt(double(groupSqYCounts[l]) / groupCounts[l] - avgY * avgY); return devY / (devX + devY); }; auto bestSlope = lam(maxIdx); auto slopeThreshold = std::min(bestSlope * 4.2, std::max(bestSlope, 0.3)); double maxY = 0; for (int i = ptSet.size(); --i >= 0;) { auto l = labels[i]; if (groupCounts[l] < threshold || lam(l) > slopeThreshold || groupAccumCoherencies[l] < coherencyThreshold) { ptSet.erase(ptSet.begin() + i); labels.erase(labels.begin() + i); } else { double y = double(groupYCounts[l]) / groupCounts[l]; if (y > maxY) { maxY = y; } } } for (int i = ptSet.size(); --i >= 0;) { auto l = labels[i]; double y = double(groupYCounts[l]) / groupCounts[l]; if (maxY - y > 50) { ptSet.erase(ptSet.begin() + i); labels.erase(labels.begin() + i); } } } if (ptSet.empty()) { imshow("image", func); return {}; } for (auto& v : ptSet) borderline0.at<uchar>(v.y, v.x) = 255; if (do_imshow) { // y + WINDOW_DIMENSION_Y / 2, x + WINDOW_DIMENSION_X / 2 auto convertX = [&originalSize, mirrorX](int x) { int result = (x + WINDOW_DIMENSION_X / 2) * originalSize.width / IMAGE_DIMENSION; if (mirrorX) result = originalSize.width - 1 - result; return result; }; auto convertY = [&originalSize, mirrorY](int y) { int result = (y + WINDOW_DIMENSION_Y / 2) * originalSize.height / IMAGE_DIMENSION; if (mirrorY) result = originalSize.height - 1 - result; return result; }; Mat src = imread(filename); // , IMREAD_GRAYSCALE); Scalar color = Scalar(0, 255, 0); int radius = 2; int thickness = -1; for (auto& pt : ptSet) { circle(src, {convertX(pt.x), convertY(pt.y)}, radius, color, thickness); } imshow("fourier", src); } cv::Mat poly; enum { n_samples = 8 }; double bestCost = 1.e38; auto ransacLam = [&ptSet](int n_ransac_samples) { //* cv::Mat A; std::vector<bool> inliers; fitLineRANSAC2(ptSet, A, n_ransac_samples, // A, B, C, inliers); //*/ for (int i = 0; i < n_samples - n_ransac_samples; ++i) A.push_back(0.); //* // cv::Mat A(n_samples, 1, CV_64FC1, 0.); std::vector<double*> params; params.reserve(n_samples); for (int i = 0; i < n_samples; ++i) params.push_back(&A.at<double>(i, 0)); ceres::Problem problem; for (auto& i : ptSet) { auto cost_function = new ceres::DynamicAutoDiffCostFunction<PolynomialResidual>( new PolynomialResidual(i.x * POLY_COEFF, i.y, n_samples)); // cost_function->AddParameterBlock(params.size()); for (int j = 0; j < params.size(); ++j) cost_function->AddParameterBlock(1); cost_function->SetNumResiduals(1); problem.AddResidualBlock(cost_function, new ceres::ArctanLoss(5.), params); } ceres::Solver::Options options; options.linear_solver_type = ceres::DENSE_QR; options.minimizer_progress_to_stdout = true; options.max_num_iterations = 1000; // options.max_linear_solver_iterations = 1000; // options.min_linear_solver_iterations = 950; ceres::Solver::Summary summary; Solve(options, &problem, &summary); return std::make_pair(summary.final_cost, A); }; { std::vector<std::future<decltype(ransacLam(0))>> proxies; for (int n_ransac_samples = 1; n_ransac_samples <= n_samples; ++n_ransac_samples) { proxies.push_back(std::async(std::launch::async, ransacLam, n_ransac_samples)); } for (auto& p : proxies) { auto v = p.get(); if (v.first < bestCost) { bestCost = v.first; poly = v.second; } } } int x_min = INT_MAX, x_max = INT_MIN; // limits for (auto& v : ptSet) { auto y = CalcPoly(poly, v.x * POLY_COEFF); if (fabs(y - v.y) < 15) { x_min = std::min(x_min, v.x); x_max = std::max(x_max, v.x); } } // auto surf = cv::xfeatures2d::SURF::create(1700); // std::vector<cv::KeyPoint> keypoints; // cv::Mat descriptors; // surf->detectAndCompute(func, cv::noArray(), keypoints, descriptors); //// http://itnotesblog.ru/note.php?id=271 // cv::FlannBasedMatcher matcher; // std::vector<cv::DMatch> matches; // matcher.match(descriptors, GetKnownGood(), matches); std::vector<cv::KeyPoint> goodkeypoints; double tomasi_min_rsp, tomasi_max_rsp; auto tomasiRspImg = tomasiFut.get(); if (do_imshow) { auto tomasiRspDisplay = tomasiRspImg.clone(); cv::normalize(tomasiRspDisplay, tomasiRspDisplay, 0, 1, cv::NORM_MINMAX); tomasiRspDisplay = (tomasiRspDisplay * 100.) + 1.; cv::log(tomasiRspDisplay, tomasiRspDisplay); cv::normalize(tomasiRspDisplay, tomasiRspDisplay, 0, 1, cv::NORM_MINMAX); imshow("tomasiRspDisplay", tomasiRspDisplay); } // Find the maximum and minimum angle response of tomasiRspImg, and their location, pass 0 for position parameter minMaxLoc(tomasiRspImg, &tomasi_min_rsp, &tomasi_max_rsp, 0, 0, Mat()); const double tomasi_coeff = 0.02; const float tomasi_t = tomasi_min_rsp + tomasi_coeff * (tomasi_max_rsp - tomasi_min_rsp); auto [keypoints, matches] = surfFut.get(); for (int i = 0; i < keypoints.size(); i++) { if (keypoints[i].size < 5 || keypoints[i].size > 50) continue; enum { HALF_SIZE = 5 }; float v = tomasi_min_rsp; for (int y = std::max(int(keypoints[i].pt.y + 0.5) - HALF_SIZE, 0); y <= std::min(int(keypoints[i].pt.y + 0.5) + HALF_SIZE, tomasiRspImg.rows - 1); ++y) for (int x = std::max(int(keypoints[i].pt.x + 0.5) - HALF_SIZE, 0); x <= std::min(int(keypoints[i].pt.x + 0.5) + HALF_SIZE, tomasiRspImg.cols - 1); ++x) v = std::max(v, tomasiRspImg.at<float>(y, x)); if (v < tomasi_t) continue; if (matches[i].distance < 0.33) { double y = CalcPoly(poly, std::clamp(keypoints[i].pt.x - WINDOW_DIMENSION_X / 2, float(x_min), float(x_max)) * POLY_COEFF) + WINDOW_DIMENSION_Y / 2; if (fabs(y - keypoints[i].pt.y) < 50) goodkeypoints.push_back(keypoints[i]); } } for (int i = goodkeypoints.size() - 1; --i >= 0;) for (int j = goodkeypoints.size(); --j > i;) { if (fastHypot(goodkeypoints[i].pt.x - goodkeypoints[j].pt.x, goodkeypoints[i].pt.y - goodkeypoints[j].pt.y) < 5) { goodkeypoints.erase(goodkeypoints.begin() + j); } } imshow("borderline00", borderline00); imshow("borderline0", borderline0); std::vector<cv::Point> points_fitted; for (int x = 0; x < visualizationCols; x++) { double y = CalcPoly(poly, std::clamp(x, x_min, x_max) * POLY_COEFF); points_fitted.emplace_back(x + WINDOW_DIMENSION_X / 2, y + WINDOW_DIMENSION_Y / 2); } if (do_imshow) { auto color = cv::Scalar(0, 255, 0); cv::drawKeypoints(func, goodkeypoints, func, color); // , cv::DrawMatchesFlags::DRAW_RICH_KEYPOINTS); cv::polylines(func, points_fitted, false, cv::Scalar(0, 255, 255), 1, 8, 0); imshow("image", func); } cv::Mat theMask(IMAGE_DIMENSION, IMAGE_DIMENSION, CV_8UC1, cv::Scalar(0)); std::vector<std::vector<cv::Point>> fillContAll; fillContAll.push_back(points_fitted); fillContAll[0].emplace_back(IMAGE_DIMENSION - WINDOW_DIMENSION_X / 2, 0); fillContAll[0].emplace_back(WINDOW_DIMENSION_X / 2, 0); cv::fillPoly(theMask, fillContAll, cv::Scalar(255)); enum { BELT_WIDTH = 30 }; theMask(cv::Rect(0, 0, dst.cols, dst.rows - BELT_WIDTH)) &= ~theMask(cv::Rect(0, BELT_WIDTH, dst.cols, dst.rows - BELT_WIDTH)); imshow("theMask", theMask); imshow("imgCoherencyBin", imgCoherencyBin); imshow("imgOrientationBin", imgOrientationBin); // imgCoherency *= 10; // cv::exp(imgCoherency, imgCoherency); cv::normalize(imgCoherency, imgCoherency, 0, 1, cv::NORM_MINMAX); cv::normalize(imgOrientation, imgOrientation, 0, 1, cv::NORM_MINMAX); imshow("imgCoherency", imgCoherency); imshow("imgOrientation", imgOrientation); /////////////////////////////////////////////////////////////////////////////// adaptiveThreshold(dst, dst, 255, ADAPTIVE_THRESH_MEAN_C, THRESH_BINARY_INV, 19, 3.); imshow("Dst before 000", dst); dst &= imgCoherencyBin; dst &= imgOrientationBin; // imshow("Dst before 00", dst); dst &= mask; // imshow("Dst before 0", dst); // dst &= (diff | theMask); dst &= diff; imshow("Dst before", dst); // cv::ximgproc::thinning(dst, dst); auto thinningLam = [](cv::Mat src) { cv::Mat result; cv::ximgproc::thinning(src, result); return result; }; enum { THINNING_MARGIN = 50 }; auto thinningFut00 = std::async(std::launch::async, thinningLam, dst(cv::Rect(0, 0, dst.cols / 2 + THINNING_MARGIN, dst.rows / 2 + THINNING_MARGIN))); auto thinningFut01 = std::async( std::launch::async, thinningLam, dst(cv::Rect(0, dst.rows / 2 - THINNING_MARGIN, dst.cols / 2 + THINNING_MARGIN, dst.rows / 2 + THINNING_MARGIN))); auto thinningFut10 = std::async( std::launch::async, thinningLam, dst(cv::Rect(dst.cols / 2 - THINNING_MARGIN, 0, dst.cols / 2 + THINNING_MARGIN, dst.rows / 2 + THINNING_MARGIN))); auto thinningFut11 = std::async(std::launch::async, thinningLam, dst(cv::Rect(dst.cols / 2 - THINNING_MARGIN, dst.rows / 2 - THINNING_MARGIN, dst.cols / 2 + THINNING_MARGIN, dst.rows / 2 + THINNING_MARGIN))); // auto skeleton = dst.clone(); cv::Mat skeleton(dst.rows, dst.cols, CV_8UC1); thinningFut00.get()(cv::Rect(0, 0, dst.cols / 2, dst.rows / 2)).copyTo(skeleton(cv::Rect(0, 0, dst.cols / 2, dst.rows / 2))); thinningFut01.get()(cv::Rect(0, THINNING_MARGIN, dst.cols / 2, dst.rows / 2)) .copyTo(skeleton(cv::Rect(0, dst.rows / 2, dst.cols / 2, dst.rows / 2))); thinningFut10.get()(cv::Rect(THINNING_MARGIN, 0, dst.cols / 2, dst.rows / 2)) .copyTo(skeleton(cv::Rect(dst.cols / 2, 0, dst.cols / 2, dst.rows / 2))); thinningFut11.get()(cv::Rect(THINNING_MARGIN, THINNING_MARGIN, dst.cols / 2, dst.rows / 2)) .copyTo(skeleton(cv::Rect(dst.cols / 2, dst.rows / 2, dst.cols / 2, dst.rows / 2))); dst = skeleton.clone(); // dst &= theMask; imshow("Thinning", dst); // Specify size on vertical axis int vertical_size = 5; // dst.rows / 30; // Create structure element for extracting vertical lines through morphology operations Mat verticalStructure = getStructuringElement(MORPH_RECT, Size(1, vertical_size)); // Apply morphology operations erode(dst, dst, verticalStructure); dilate(dst, dst, verticalStructure); for (int y = 0; y < dst.rows - 4; ++y) for (int x = 0; x < dst.cols; ++x) { if (dst.at<uchar>(y, x) && dst.at<uchar>(y + 3, x)) { dst.at<uchar>(y + 1, x) = 127; dst.at<uchar>(y + 2, x) = 127; } } for (int y = 0; y < dst.rows; ++y) for (int x = 0; x < dst.cols; ++x) { if (dst.at<uchar>(y, x) == 127) { dst.at<uchar>(y, x) = 255; } } for (int y = 1; y < dst.rows - 1; ++y) for (int x = 1; x < dst.cols - 1; ++x) { if (skeleton.at<uchar>(y, x) == 255 && dst.at<uchar>(y, x) == 0 && (dst.at<uchar>(y - 1, x - 1) == 255 || dst.at<uchar>(y + 1, x - 1) == 255 || dst.at<uchar>(y - 1, x + 1) == 255 || dst.at<uchar>(y + 1, x + 1) == 255 || dst.at<uchar>(y, x - 1) == 255 || dst.at<uchar>(y, x + 1) == 255)) { dst.at<uchar>(y, x) = 127; } } for (int y = 0; y < dst.rows; ++y) for (int x = 0; x < dst.cols; ++x) { if (dst.at<uchar>(y, x) == 127) { dst.at<uchar>(y, x) = 255; } } // x for (int y = 0; y < dst.rows - 1; ++y) for (int x = 0; x < dst.cols - 1; ++x) { if (dst.at<uchar>(y, x) == 255 && dst.at<uchar>(y + 1, x + 1) == 255 && dst.at<uchar>(y, x + 1) == 0 && dst.at<uchar>(y + 1, x) == 0) { dst.at<uchar>(y, x + 1) = 127; dst.at<uchar>(y + 1, x) = 127; } else if (dst.at<uchar>(y, x) == 0 && dst.at<uchar>(y + 1, x + 1) == 0 && dst.at<uchar>(y, x + 1) == 255 && dst.at<uchar>(y + 1, x) == 255) { dst.at<uchar>(y, x) = 127; dst.at<uchar>(y + 1, x + 1) = 127; } } for (int y = 0; y < dst.rows; ++y) for (int x = 0; x < dst.cols; ++x) { if (dst.at<uchar>(y, x) == 127) { dst.at<uchar>(y, x) = 255; } } //* auto houghLinesLam = [](const cv::Mat& dst) { std::vector<cv::Vec4i> linesP; // will hold the results of the detection const int threshold = 8; HoughLinesP(dst, linesP, 0.5, CV_PI / 180 / 2, threshold, 3, 25); // runs the actual detection return linesP; }; enum { HOUGH_THINNING_MARGIN = 50 }; auto houghLinesFut0 = std::async(std::launch::async, houghLinesLam, dst(cv::Rect(0, 0, dst.cols / 2 + HOUGH_THINNING_MARGIN, dst.rows))); auto houghLinesFut1 = std::async(std::launch::async, houghLinesLam, dst(cv::Rect(dst.cols / 2 - HOUGH_THINNING_MARGIN, 0, dst.cols / 2 + HOUGH_THINNING_MARGIN, dst.rows))); auto linesP = houghLinesFut0.get(); linesP.erase(std::remove_if(linesP.begin(), linesP.end(), [cols = dst.cols](const Vec4i& l) { return l[0] > cols / 2 && l[2] > cols / 2; }), linesP.end()); { auto linesP1 = houghLinesFut1.get(); linesP1.erase(std::remove_if(linesP1.begin(), linesP1.end(), [cols = dst.cols](const Vec4i& l) { return l[0] < HOUGH_THINNING_MARGIN && l[2] < HOUGH_THINNING_MARGIN; }), linesP1.end()); for (auto& l : linesP1) { l[0] += dst.cols / 2 - HOUGH_THINNING_MARGIN; l[2] += dst.cols / 2 - HOUGH_THINNING_MARGIN; } linesP.insert(linesP.end(), linesP1.begin(), linesP1.end()); } //*/ linesP.erase(std::remove_if(linesP.begin(), linesP.end(), [&dst](const Vec4i& l) { const double expectedAlgle = 0; const double expectedAngleDiff = 1.; const auto border = 10; // gloriousAttempt ? 50 : 10; return l[1] == l[3] || fabs(double(l[0] - l[2]) / (l[1] - l[3]) + expectedAlgle) > expectedAngleDiff || l[0] < border && l[2] < border || l[1] == 0 && l[3] == 0 || l[0] >= (dst.cols - border) && l[2] >= (dst.cols - border) || l[1] == dst.rows - 1 && l[3] == dst.rows - 1; }), linesP.end()); if (linesP.empty()) return {}; { // partition via our partitioning function std::vector<int> labels; int equilavenceClassesCount = cv::partition(linesP, labels, [](const Vec4i& l1, const Vec4i& l2) { const auto distX = std::max(abs((l1[0] + l1[2]) / 2 - (l2[0] + l2[2]) / 2) - (abs(l1[0] - l1[2]) + abs(l2[0] - l2[2])) / 2, 0); const auto distY = std::max(abs((l1[1] + l1[3]) / 2 - (l2[1] + l2[3]) / 2) - (abs(l1[1] - l1[3]) + abs(l2[1] - l2[3])) / 2, 0); return fastHypot(distX / 25., distY / 15.) < 1; }); std::vector<int> groupCounts(equilavenceClassesCount); for (auto& l : labels) ++groupCounts[l]; const auto threshold = *std::max_element(groupCounts.begin(), groupCounts.end()) * 0.2; for (int i = linesP.size(); --i >= 0;) { if (groupCounts[labels[i]] < threshold) linesP.erase(linesP.begin() + i); } } auto angleSortLam = [](const Vec4i& l) { return double(l[0] - l[2]) / (l[1] - l[3]); }; std::sort(linesP.begin(), linesP.end(), [&angleSortLam](const Vec4i& l1, const Vec4i& l2) { return angleSortLam(l1) < angleSortLam(l2); }); const double maxDiff = 0.1; auto itFirst = linesP.begin(); auto itLast = linesP.begin(); double sum = 0; double maxSum = 0; auto itBegin = linesP.begin(); auto itEnd = linesP.begin(); while (itFirst != linesP.end() && itLast != linesP.end()) { auto start = angleSortLam(*itFirst); while (itLast != linesP.end() && angleSortLam(*itLast) < start + maxDiff) { sum += fastHypot((*itLast)[0] - (*itLast)[2], (*itLast)[1] - (*itLast)[3]); ++itLast; } if (sum > maxSum) { itBegin = itFirst; itEnd = itLast; maxSum = sum; } sum -= fastHypot((*itFirst)[0] - (*itFirst)[2], (*itFirst)[1] - (*itFirst)[3]); ++itFirst; } // vector<Vec4i> linesP = {itBegin, itEnd}; imshow("Transform", dst); if (do_imshow) { Mat cdstP; cvtColor(dst, cdstP, COLOR_GRAY2BGR); for (Vec4i& l : linesP) { auto color = (min(l[1], l[3]) < 380) ? Scalar(0, 0, 255) : Scalar(0, 255, 0); line(cdstP, Point(l[0], l[1]), Point(l[2], l[3]), color, 1, LINE_AA); } imshow("Detected Lines (in red) - Probabilistic Line Transform", cdstP); } auto reducedLines0 = reduceLines(linesP, 25, 1., 3); { // find prevailing direction std::vector<Point2i> pointCloud; for (auto& reduced : reducedLines0) { auto centerX = (reduced[0] + reduced[2]) / 2; auto centerY = (reduced[1] + reduced[3]) / 2; pointCloud.emplace_back(reduced[0] - centerX, reduced[1] - centerY); pointCloud.emplace_back(reduced[2] - centerX, reduced[3] - centerY); } Vec4f lineParams; fitLine(pointCloud, lineParams, DIST_L2, 0, 0.01, 0.01); // const auto cos_phi = -lineParams[1]; // const auto sin_phi = -lineParams[0]; const auto tan_phi = lineParams[0] / lineParams[1]; reducedLines0.erase(std::remove_if(reducedLines0.begin(), reducedLines0.end(), [tan_phi](const Vec4i& line) { return fastHypot(line[2] - line[0], line[3] - line[1]) <= 10 || //(gloriousAttempt ? 5 : 10) || fabs(double(line[2] - line[0]) / (line[3] - line[1]) - tan_phi) > 0.07; }), reducedLines0.end()); } auto reducedLines = reduceLines(reducedLines0, 50, 0.7, 4); // reducedLines.erase(std::remove_if(reducedLines.begin(), reducedLines.end(), [](const Vec4i& line) { // return hypot(line[2] - line[0], line[3] - line[1]) <= 10; //}), reducedLines.end()); if (do_imshow) { Mat reducedLinesImg0 = Mat::zeros(dst.rows, dst.cols, CV_8UC3); RNG rng(215526); for (auto& reduced : reducedLines0) { auto color = Scalar(rng.uniform(30, 255), rng.uniform(30, 255), rng.uniform(30, 255)); line(reducedLinesImg0, Point(reduced[0], reduced[1]), Point(reduced[2], reduced[3]), color, 2); } imshow("Reduced Lines 0", reducedLinesImg0); } // find prevailing direction std::vector<Point2i> pointCloud; for (auto& reduced : reducedLines) { auto centerX = (reduced[0] + reduced[2]) / 2; auto centerY = (reduced[1] + reduced[3]) / 2; pointCloud.emplace_back(reduced[0] - centerX, reduced[1] - centerY); pointCloud.emplace_back(reduced[2] - centerX, reduced[3] - centerY); } Vec4f lineParams; fitLine(pointCloud, lineParams, DIST_L2, 0, 0.01, 0.01); auto cos_phi = lineParams[1]; auto sin_phi = lineParams[0]; if (cos_phi < 0) { cos_phi = -cos_phi; sin_phi = -sin_phi; } auto sortLam = [cos_phi, sin_phi](const Vec4i& detectedLine) { double x = (detectedLine[0] + detectedLine[2]) / 2.; double y = (detectedLine[1] + detectedLine[3]) / 2.; double x_new = x * cos_phi - y * sin_phi; return x_new; }; std::sort(reducedLines.begin(), reducedLines.end(), [&sortLam](const Vec4i& l1, const Vec4i& l2) { return sortLam(l1) < sortLam(l2); }); auto approveLam = [](const Vec4i& line) { return fastHypot(line[2] - line[0], line[3] - line[1]) > 45; }; reducedLines.erase(reducedLines.begin(), std::find_if(reducedLines.begin(), reducedLines.end(), approveLam)); reducedLines.erase(std::find_if(reducedLines.rbegin(), reducedLines.rend(), approveLam).base(), reducedLines.end()); // merge MergeLines(reducedLines, sortLam); // normalize direction for (auto& line : reducedLines) { if (line[1] > line[3]) { std::swap(line[0], line[2]); std::swap(line[1], line[3]); } } // Cutting lines const auto removeThreshold = 33; // gloriousAttempt ? 5 : 40; // const auto tooHighThreshold = 60; for (int i = reducedLines.size(); --i >= 0;) { auto& line = reducedLines[i]; double x = (line[0] + line[2]) / 2.; double y = CalcPoly(poly, std::clamp(x - WINDOW_DIMENSION_X / 2, double(x_min), double(x_max)) * POLY_COEFF) + WINDOW_DIMENSION_Y / 2; if (y < line[1] + removeThreshold || i < reducedLines.size() - 1 && line[3] < reducedLines[i + 1][1]) { // y > line[3] + tooHighThreshold) { reducedLines.erase(reducedLines.begin() + i); } else if (y > line[3]) { continue; } else { line[2] = line[0] + double(line[2] - line[0]) / (line[3] - line[1]) * (y - line[1]); line[3] = y; } } if (do_imshow) { Mat reducedLinesImg = Mat::zeros(dst.rows, dst.cols, CV_8UC3); RNG rng(215526); for (auto& reduced : reducedLines) { auto color = Scalar(rng.uniform(30, 255), rng.uniform(30, 255), rng.uniform(30, 255)); line(reducedLinesImg, Point(reduced[0], reduced[1]), Point(reduced[2], reduced[3]), color, 2); } imshow("Reduced Lines", reducedLinesImg); } ////////////////////////////////////////////////////////////////////////// // turtle stuff std::deque<std::pair<Point, Point>> turtleLines; const double correction_coeff = 0.2; // for (auto& kp : goodkeypoints) for (int i = goodkeypoints.size(); --i >= 0;) { auto& kp = goodkeypoints[i]; cv::Point pos(kp.pt); auto start = FindPath(skeleton, pos); if (start.y > pos.y - 10) { goodkeypoints.erase(goodkeypoints.begin() + i); continue; } pos.x += kp.size * sin_phi * correction_coeff; pos.y += kp.size * cos_phi * correction_coeff; turtleLines.emplace_front(start, pos); } for (int i = goodkeypoints.size(); --i >= 0;) { bool erase = false; for (int j = goodkeypoints.size(); --j >= 0;) { if (i == j) continue; if (turtleLines[i].first == turtleLines[j].first && abs(turtleLines[i].second.x - turtleLines[j].second.x) < 10) { double y_i = CalcPoly(poly, std::clamp(turtleLines[i].second.x - WINDOW_DIMENSION_X / 2, x_min, x_max) * POLY_COEFF) + WINDOW_DIMENSION_Y / 2; double y_j = CalcPoly(poly, std::clamp(turtleLines[j].second.x - WINDOW_DIMENSION_X / 2, x_min, x_max) * POLY_COEFF) + WINDOW_DIMENSION_Y / 2; if (abs(y_j - turtleLines[j].second.y) < abs(y_i - turtleLines[i].second.y)) { erase = true; break; } } } if (erase) { goodkeypoints.erase(goodkeypoints.begin() + i); turtleLines.erase(turtleLines.begin() + i); } } if (do_imshow) { cv::Mat outSkeleton; cv::drawKeypoints(skeleton, goodkeypoints, outSkeleton, {0, 255, 0}); // , cv::DrawMatchesFlags::DRAW_RICH_KEYPOINTS); for (auto& l : turtleLines) { int radius = 2; int thickness = -1; circle(outSkeleton, l.first, radius, {0, 255, 0}, thickness); line(outSkeleton, l.second, l.first, {0, 255, 0}); } imshow("outSkeleton", outSkeleton); } if (reducedLines.size() < 3) return {}; { // quick'n'dirty fix auto sample = reducedLines.back(); auto step = (sample - reducedLines.front()) / int(reducedLines.size() - 1); for (int i = reducedLines.size(); i < 32; ++i) { sample += step; reducedLines.push_back(sample); } } // Cutting lines once more for (int i = reducedLines.size(); --i >= 0;) { const auto removeThreshold = 5; auto& line = reducedLines[i]; double x = (line[0] + line[2]) / 2.; double y = CalcPoly(poly, std::clamp(x - WINDOW_DIMENSION_X / 2, double(x_min), double(x_max)) * POLY_COEFF) + WINDOW_DIMENSION_Y / 2; if (y > line[3]) continue; if (y > line[1] + removeThreshold) { line[2] = line[0] + double(line[2] - line[0]) / (line[3] - line[1]) * (y - line[1]); line[3] = y; } } // Trying to apply turtle stuff for (auto& line : reducedLines) { for (int shift : {0, 1, -1, 2, -2}) { cv::Point pos(line[0] + shift, line[1]); doFindPath(skeleton, pos, pos, 0, 0); if (pos.y != line[1]) { line[0] = pos.x; line[1] = pos.y; break; } } } // Merge turtleLines and reducedLines std::vector<std::tuple<double, double, double, double, double>> result; for (int i = 0; i < int(reducedLines.size()) - 1; ++i) { auto& first = reducedLines[i]; auto& second = reducedLines[i + 1]; // if (first[1] > second[1]) { // continue; //} auto y_first = first[1]; auto x_first = first[0]; auto y_second = (first[3] + second[3]) / 2.; auto x_second = (first[2] + second[2]) / 2.; for (auto& l : turtleLines) { if (l.second.x > first[2] && l.second.x < second[2]) { y_first = l.first.y; x_first = l.first.x; y_second = l.second.y; x_second = l.second.x; break; } } const auto y_first_rotated = first[0] * sin_phi + first[1] * cos_phi; const auto y_second_rotated = x_second * sin_phi + y_second * cos_phi; // const auto x_first = first[0] * cos_phi - first[1] * sin_phi; // const auto x_second = second[0] * cos_phi - second[1] * sin_phi; const auto diff = (y_second_rotated - y_first_rotated) /* * originalSize.height */ / IMAGE_DIMENSION; auto convertX = [&originalSize, mirrorX](int x) { auto result = double(x) / IMAGE_DIMENSION; if (mirrorX) result = 1 - result; return result; }; auto convertY = [&originalSize, mirrorY](int y) { auto result = double(y) / IMAGE_DIMENSION; if (mirrorY) result = 1 - result; return result; }; result.emplace_back(convertX(x_first), convertY(y_first), convertX(x_second), convertY(y_second), diff); } if (result.empty()) return {}; return result; //} // return {}; }
a3ce37938ca99e0d0843581032b6755b4eb2ebe5
205045c80436de28abe4c73cc33bb512cc3d8b08
/19.04.2018/zad1/Person.cpp
7e80c91c728baf1214b4c5388cd91dac4105813d
[]
no_license
KarolinaSerpatowska/Programowanie-obiektowe
8acb317d5cf8e81704670c66662862081c97d249
ed8e4412379617f6a3b490bf5de5050927576d87
refs/heads/master
2021-04-27T16:04:40.527887
2018-06-21T13:01:22
2018-06-21T13:01:22
122,481,796
0
2
null
2018-03-04T19:51:45
2018-02-22T13:24:57
C++
UTF-8
C++
false
false
124
cpp
Person.cpp
#include "Person.h" Person::Person(string name) { this->name = name; } string Person::ident() { return name; }
84832371435a21570115c3d115000ab4e57955bd
734f735b60f64c4f85b8ef5c689c0ef43443c630
/rucy/ext/rucy/defs.h
a3676580863942da024f9d79b2e8fbed88917a54
[ "MIT" ]
permissive
xord/reflexion
3440f5481744b566dfc9d104413a1a9673ca94d4
f8cd058f4a8c8275496872a9cbfc5cf48e1fba1a
refs/heads/master
2023-03-03T15:29:57.999704
2023-02-27T14:39:35
2023-02-27T14:39:35
32,271,244
3
0
MIT
2022-11-13T17:36:17
2015-03-15T16:37:07
C++
UTF-8
C++
false
false
150
h
defs.h
// -*- c++ -*- #pragma once #ifndef __RUCY_EXT_DEFS_H__ #define __RUCY_EXT_DEFS_H__ #include <rucy.h> #define RUCY_END RUCY_DEF_END #endif//EOH
33cf0bd795f73b39790a4d08e3b7970c0eb1fc9a
f80795913b6fbbfbc1501ca1e04140d1dac1d70e
/10.0.14393.0/winrt/internal/Windows.Media.Import.2.h
84f604966a02bc1835431545cc70145c6fc0c6de
[ "LicenseRef-scancode-generic-cla", "MIT" ]
permissive
jjhegedus/cppwinrt
13fffb02f2e302b57e0f2cac74e02a9e2d94b9cf
fb3238a29cf70edd154de8d2e36b2379e25cc2c4
refs/heads/master
2021-01-09T06:21:16.273638
2017-02-05T05:34:37
2017-02-05T05:34:37
80,971,093
1
0
null
2017-02-05T05:27:18
2017-02-05T05:27:17
null
UTF-8
C++
false
false
31,035
h
Windows.Media.Import.2.h
// C++ for the Windows Runtime v1.0.161012.5 // Copyright (c) 2016 Microsoft Corporation. All rights reserved. #pragma once #include "Windows.Media.Import.1.h" #include "Windows.Foundation.2.h" WINRT_EXPORT namespace winrt { namespace ABI::Windows::Foundation { #ifndef WINRT_GENERIC_cdb5efb3_5788_509d_9be1_71ccb8a3362a #define WINRT_GENERIC_cdb5efb3_5788_509d_9be1_71ccb8a3362a template <> struct __declspec(uuid("cdb5efb3-5788-509d-9be1-71ccb8a3362a")) __declspec(novtable) IAsyncOperation<bool> : impl_IAsyncOperation<bool> {}; #endif #ifndef WINRT_GENERIC_513ef3af_e784_5325_a91e_97c2b8111cf3 #define WINRT_GENERIC_513ef3af_e784_5325_a91e_97c2b8111cf3 template <> struct __declspec(uuid("513ef3af-e784-5325-a91e-97c2b8111cf3")) __declspec(novtable) IReference<uint32_t> : impl_IReference<uint32_t> {}; #endif #ifndef WINRT_GENERIC_5541d8a7_497c_5aa4_86fc_7713adbf2a2c #define WINRT_GENERIC_5541d8a7_497c_5aa4_86fc_7713adbf2a2c template <> struct __declspec(uuid("5541d8a7-497c-5aa4-86fc-7713adbf2a2c")) __declspec(novtable) IReference<Windows::Foundation::DateTime> : impl_IReference<Windows::Foundation::DateTime> {}; #endif } namespace ABI::Windows::Foundation::Collections { #ifndef WINRT_GENERIC_2f13c006_a03a_5f69_b090_75a43e33423e #define WINRT_GENERIC_2f13c006_a03a_5f69_b090_75a43e33423e template <> struct __declspec(uuid("2f13c006-a03a-5f69-b090-75a43e33423e")) __declspec(novtable) IVectorView<hstring> : impl_IVectorView<hstring> {}; #endif #ifndef WINRT_GENERIC_e2fcc7c1_3bfc_5a0b_b2b0_72e769d1cb7e #define WINRT_GENERIC_e2fcc7c1_3bfc_5a0b_b2b0_72e769d1cb7e template <> struct __declspec(uuid("e2fcc7c1-3bfc-5a0b-b2b0-72e769d1cb7e")) __declspec(novtable) IIterable<hstring> : impl_IIterable<hstring> {}; #endif #ifndef WINRT_GENERIC_8b7e83fc_e035_59dc_8100_fcb935c2d7e4 #define WINRT_GENERIC_8b7e83fc_e035_59dc_8100_fcb935c2d7e4 template <> struct __declspec(uuid("8b7e83fc-e035-59dc-8100-fcb935c2d7e4")) __declspec(novtable) IVectorView<Windows::Media::Import::PhotoImportSource> : impl_IVectorView<Windows::Media::Import::PhotoImportSource> {}; #endif #ifndef WINRT_GENERIC_a5b07808_7d18_5300_9f01_1d85149546d2 #define WINRT_GENERIC_a5b07808_7d18_5300_9f01_1d85149546d2 template <> struct __declspec(uuid("a5b07808-7d18-5300-9f01-1d85149546d2")) __declspec(novtable) IVectorView<Windows::Media::Import::PhotoImportOperation> : impl_IVectorView<Windows::Media::Import::PhotoImportOperation> {}; #endif } namespace ABI::Windows::Foundation { #ifndef WINRT_GENERIC_6e6f9b4e_c6e1_5364_a650_11c35211bead #define WINRT_GENERIC_6e6f9b4e_c6e1_5364_a650_11c35211bead template <> struct __declspec(uuid("6e6f9b4e-c6e1-5364-a650-11c35211bead")) __declspec(novtable) IAsyncOperationWithProgress<Windows::Media::Import::PhotoImportFindItemsResult, uint32_t> : impl_IAsyncOperationWithProgress<Windows::Media::Import::PhotoImportFindItemsResult, uint32_t> {}; #endif #ifndef WINRT_GENERIC_d874ec64_0951_5459_a0dd_0f8bf3917eb1 #define WINRT_GENERIC_d874ec64_0951_5459_a0dd_0f8bf3917eb1 template <> struct __declspec(uuid("d874ec64-0951-5459-a0dd-0f8bf3917eb1")) __declspec(novtable) IAsyncOperationWithProgress<Windows::Media::Import::PhotoImportImportItemsResult, Windows::Media::Import::PhotoImportProgress> : impl_IAsyncOperationWithProgress<Windows::Media::Import::PhotoImportImportItemsResult, Windows::Media::Import::PhotoImportProgress> {}; #endif #ifndef WINRT_GENERIC_3e2371a9_281a_5226_ae85_caa55c0d61de #define WINRT_GENERIC_3e2371a9_281a_5226_ae85_caa55c0d61de template <> struct __declspec(uuid("3e2371a9-281a-5226-ae85-caa55c0d61de")) __declspec(novtable) IAsyncOperationWithProgress<Windows::Media::Import::PhotoImportDeleteImportedItemsFromSourceResult, double> : impl_IAsyncOperationWithProgress<Windows::Media::Import::PhotoImportDeleteImportedItemsFromSourceResult, double> {}; #endif #ifndef WINRT_GENERIC_c8c5dc1e_eb47_50b8_b5d9_aafe1a82318a #define WINRT_GENERIC_c8c5dc1e_eb47_50b8_b5d9_aafe1a82318a template <> struct __declspec(uuid("c8c5dc1e-eb47-50b8-b5d9-aafe1a82318a")) __declspec(novtable) IAsyncOperation<Windows::Media::Import::PhotoImportSource> : impl_IAsyncOperation<Windows::Media::Import::PhotoImportSource> {}; #endif } namespace ABI::Windows::Foundation::Collections { #ifndef WINRT_GENERIC_35499439_e03e_5711_a955_f7c45928bc90 #define WINRT_GENERIC_35499439_e03e_5711_a955_f7c45928bc90 template <> struct __declspec(uuid("35499439-e03e-5711-a955-f7c45928bc90")) __declspec(novtable) IVectorView<Windows::Media::Import::PhotoImportStorageMedium> : impl_IVectorView<Windows::Media::Import::PhotoImportStorageMedium> {}; #endif } namespace ABI::Windows::Foundation { #ifndef WINRT_GENERIC_3c00fd60_2950_5939_a21a_2d12c5a01b8a #define WINRT_GENERIC_3c00fd60_2950_5939_a21a_2d12c5a01b8a template <> struct __declspec(uuid("3c00fd60-2950-5939-a21a-2d12c5a01b8a")) __declspec(novtable) IReference<bool> : impl_IReference<bool> {}; #endif } namespace ABI::Windows::Foundation::Collections { #ifndef WINRT_GENERIC_a6fa3abe_cdb9_5054_bf3d_525607f9c2d2 #define WINRT_GENERIC_a6fa3abe_cdb9_5054_bf3d_525607f9c2d2 template <> struct __declspec(uuid("a6fa3abe-cdb9-5054-bf3d-525607f9c2d2")) __declspec(novtable) IVectorView<Windows::Media::Import::PhotoImportSidecar> : impl_IVectorView<Windows::Media::Import::PhotoImportSidecar> {}; #endif #ifndef WINRT_GENERIC_db5493cd_6915_5682_8dd5_1de144ec599d #define WINRT_GENERIC_db5493cd_6915_5682_8dd5_1de144ec599d template <> struct __declspec(uuid("db5493cd-6915-5682-8dd5-1de144ec599d")) __declspec(novtable) IVectorView<Windows::Media::Import::PhotoImportVideoSegment> : impl_IVectorView<Windows::Media::Import::PhotoImportVideoSegment> {}; #endif #ifndef WINRT_GENERIC_9a90a84e_924b_5879_88f7_bb2f7b131898 #define WINRT_GENERIC_9a90a84e_924b_5879_88f7_bb2f7b131898 template <> struct __declspec(uuid("9a90a84e-924b-5879-88f7-bb2f7b131898")) __declspec(novtable) IVectorView<Windows::Media::Import::PhotoImportItem> : impl_IVectorView<Windows::Media::Import::PhotoImportItem> {}; #endif } namespace ABI::Windows::Foundation { #ifndef WINRT_GENERIC_e67279fe_692f_5602_820b_865098d9b43e #define WINRT_GENERIC_e67279fe_692f_5602_820b_865098d9b43e template <> struct __declspec(uuid("e67279fe-692f-5602-820b-865098d9b43e")) __declspec(novtable) TypedEventHandler<Windows::Media::Import::PhotoImportFindItemsResult, Windows::Media::Import::PhotoImportSelectionChangedEventArgs> : impl_TypedEventHandler<Windows::Media::Import::PhotoImportFindItemsResult, Windows::Media::Import::PhotoImportSelectionChangedEventArgs> {}; #endif #ifndef WINRT_GENERIC_a3cce94d_f26e_58d9_8138_599ad63c7069 #define WINRT_GENERIC_a3cce94d_f26e_58d9_8138_599ad63c7069 template <> struct __declspec(uuid("a3cce94d-f26e-58d9-8138-599ad63c7069")) __declspec(novtable) TypedEventHandler<Windows::Media::Import::PhotoImportFindItemsResult, Windows::Media::Import::PhotoImportItemImportedEventArgs> : impl_TypedEventHandler<Windows::Media::Import::PhotoImportFindItemsResult, Windows::Media::Import::PhotoImportItemImportedEventArgs> {}; #endif #ifndef WINRT_GENERIC_c1d3d1a2_ae17_5a5f_b5a2_bdcc8844889a #define WINRT_GENERIC_c1d3d1a2_ae17_5a5f_b5a2_bdcc8844889a template <> struct __declspec(uuid("c1d3d1a2-ae17-5a5f-b5a2-bdcc8844889a")) __declspec(novtable) AsyncOperationCompletedHandler<bool> : impl_AsyncOperationCompletedHandler<bool> {}; #endif } namespace ABI::Windows::Foundation::Collections { #ifndef WINRT_GENERIC_8c304ebb_6615_50a4_8829_879ecd443236 #define WINRT_GENERIC_8c304ebb_6615_50a4_8829_879ecd443236 template <> struct __declspec(uuid("8c304ebb-6615-50a4-8829-879ecd443236")) __declspec(novtable) IIterator<hstring> : impl_IIterator<hstring> {}; #endif #ifndef WINRT_GENERIC_7d70f831_6ee4_5130_a7b8_253a21154e82 #define WINRT_GENERIC_7d70f831_6ee4_5130_a7b8_253a21154e82 template <> struct __declspec(uuid("7d70f831-6ee4-5130-a7b8-253a21154e82")) __declspec(novtable) IIterator<Windows::Media::Import::PhotoImportSource> : impl_IIterator<Windows::Media::Import::PhotoImportSource> {}; #endif #ifndef WINRT_GENERIC_40e01d62_b413_5b43_ab07_ab28b23fc886 #define WINRT_GENERIC_40e01d62_b413_5b43_ab07_ab28b23fc886 template <> struct __declspec(uuid("40e01d62-b413-5b43-ab07-ab28b23fc886")) __declspec(novtable) IIterable<Windows::Media::Import::PhotoImportSource> : impl_IIterable<Windows::Media::Import::PhotoImportSource> {}; #endif #ifndef WINRT_GENERIC_7c9dde1a_a8a1_5957_8e0d_c401d19c9237 #define WINRT_GENERIC_7c9dde1a_a8a1_5957_8e0d_c401d19c9237 template <> struct __declspec(uuid("7c9dde1a-a8a1-5957-8e0d-c401d19c9237")) __declspec(novtable) IIterator<Windows::Media::Import::PhotoImportOperation> : impl_IIterator<Windows::Media::Import::PhotoImportOperation> {}; #endif #ifndef WINRT_GENERIC_94f33a8f_115a_50cb_b59d_ab8483a84842 #define WINRT_GENERIC_94f33a8f_115a_50cb_b59d_ab8483a84842 template <> struct __declspec(uuid("94f33a8f-115a-50cb-b59d-ab8483a84842")) __declspec(novtable) IIterable<Windows::Media::Import::PhotoImportOperation> : impl_IIterable<Windows::Media::Import::PhotoImportOperation> {}; #endif } namespace ABI::Windows::Foundation { #ifndef WINRT_GENERIC_91190f62_7956_5e8f_83f1_84f9fe011b21 #define WINRT_GENERIC_91190f62_7956_5e8f_83f1_84f9fe011b21 template <> struct __declspec(uuid("91190f62-7956-5e8f-83f1-84f9fe011b21")) __declspec(novtable) AsyncOperationProgressHandler<Windows::Media::Import::PhotoImportFindItemsResult, uint32_t> : impl_AsyncOperationProgressHandler<Windows::Media::Import::PhotoImportFindItemsResult, uint32_t> {}; #endif #ifndef WINRT_GENERIC_dd7a69d4_2456_5250_9653_31bd2d487104 #define WINRT_GENERIC_dd7a69d4_2456_5250_9653_31bd2d487104 template <> struct __declspec(uuid("dd7a69d4-2456-5250-9653-31bd2d487104")) __declspec(novtable) AsyncOperationWithProgressCompletedHandler<Windows::Media::Import::PhotoImportFindItemsResult, uint32_t> : impl_AsyncOperationWithProgressCompletedHandler<Windows::Media::Import::PhotoImportFindItemsResult, uint32_t> {}; #endif #ifndef WINRT_GENERIC_acd8a978_b2e1_55d0_bbf6_8dc5088d728a #define WINRT_GENERIC_acd8a978_b2e1_55d0_bbf6_8dc5088d728a template <> struct __declspec(uuid("acd8a978-b2e1-55d0-bbf6-8dc5088d728a")) __declspec(novtable) AsyncOperationProgressHandler<Windows::Media::Import::PhotoImportImportItemsResult, Windows::Media::Import::PhotoImportProgress> : impl_AsyncOperationProgressHandler<Windows::Media::Import::PhotoImportImportItemsResult, Windows::Media::Import::PhotoImportProgress> {}; #endif #ifndef WINRT_GENERIC_0d141ec2_ee90_53a0_9318_10f0ab7f2d17 #define WINRT_GENERIC_0d141ec2_ee90_53a0_9318_10f0ab7f2d17 template <> struct __declspec(uuid("0d141ec2-ee90-53a0-9318-10f0ab7f2d17")) __declspec(novtable) AsyncOperationWithProgressCompletedHandler<Windows::Media::Import::PhotoImportImportItemsResult, Windows::Media::Import::PhotoImportProgress> : impl_AsyncOperationWithProgressCompletedHandler<Windows::Media::Import::PhotoImportImportItemsResult, Windows::Media::Import::PhotoImportProgress> {}; #endif #ifndef WINRT_GENERIC_ac6e425d_49e8_50d7_988c_cd5e42038577 #define WINRT_GENERIC_ac6e425d_49e8_50d7_988c_cd5e42038577 template <> struct __declspec(uuid("ac6e425d-49e8-50d7-988c-cd5e42038577")) __declspec(novtable) AsyncOperationProgressHandler<Windows::Media::Import::PhotoImportDeleteImportedItemsFromSourceResult, double> : impl_AsyncOperationProgressHandler<Windows::Media::Import::PhotoImportDeleteImportedItemsFromSourceResult, double> {}; #endif #ifndef WINRT_GENERIC_5e24e7c1_f356_59c1_b0e5_b2dfb225eb4e #define WINRT_GENERIC_5e24e7c1_f356_59c1_b0e5_b2dfb225eb4e template <> struct __declspec(uuid("5e24e7c1-f356-59c1-b0e5-b2dfb225eb4e")) __declspec(novtable) AsyncOperationWithProgressCompletedHandler<Windows::Media::Import::PhotoImportDeleteImportedItemsFromSourceResult, double> : impl_AsyncOperationWithProgressCompletedHandler<Windows::Media::Import::PhotoImportDeleteImportedItemsFromSourceResult, double> {}; #endif #ifndef WINRT_GENERIC_dc38b22a_872e_53f8_8e97_45ed85df0d23 #define WINRT_GENERIC_dc38b22a_872e_53f8_8e97_45ed85df0d23 template <> struct __declspec(uuid("dc38b22a-872e-53f8-8e97-45ed85df0d23")) __declspec(novtable) AsyncOperationCompletedHandler<Windows::Media::Import::PhotoImportSource> : impl_AsyncOperationCompletedHandler<Windows::Media::Import::PhotoImportSource> {}; #endif } namespace ABI::Windows::Foundation::Collections { #ifndef WINRT_GENERIC_985cb948_9769_55dc_85d9_125a5d03d6bb #define WINRT_GENERIC_985cb948_9769_55dc_85d9_125a5d03d6bb template <> struct __declspec(uuid("985cb948-9769-55dc-85d9-125a5d03d6bb")) __declspec(novtable) IIterator<Windows::Media::Import::PhotoImportStorageMedium> : impl_IIterator<Windows::Media::Import::PhotoImportStorageMedium> {}; #endif #ifndef WINRT_GENERIC_3233cbfe_f9ee_560f_bd0f_e36abe6cda7f #define WINRT_GENERIC_3233cbfe_f9ee_560f_bd0f_e36abe6cda7f template <> struct __declspec(uuid("3233cbfe-f9ee-560f-bd0f-e36abe6cda7f")) __declspec(novtable) IIterable<Windows::Media::Import::PhotoImportStorageMedium> : impl_IIterable<Windows::Media::Import::PhotoImportStorageMedium> {}; #endif #ifndef WINRT_GENERIC_aef5ebf0_1363_593a_86d5_f92bc230bfd6 #define WINRT_GENERIC_aef5ebf0_1363_593a_86d5_f92bc230bfd6 template <> struct __declspec(uuid("aef5ebf0-1363-593a-86d5-f92bc230bfd6")) __declspec(novtable) IIterator<Windows::Media::Import::PhotoImportSidecar> : impl_IIterator<Windows::Media::Import::PhotoImportSidecar> {}; #endif #ifndef WINRT_GENERIC_2b7f92ad_e596_5669_b622_fbfbc7040e89 #define WINRT_GENERIC_2b7f92ad_e596_5669_b622_fbfbc7040e89 template <> struct __declspec(uuid("2b7f92ad-e596-5669-b622-fbfbc7040e89")) __declspec(novtable) IIterable<Windows::Media::Import::PhotoImportSidecar> : impl_IIterable<Windows::Media::Import::PhotoImportSidecar> {}; #endif #ifndef WINRT_GENERIC_c4c16a75_3310_5ab9_9307_78755ab1094d #define WINRT_GENERIC_c4c16a75_3310_5ab9_9307_78755ab1094d template <> struct __declspec(uuid("c4c16a75-3310-5ab9-9307-78755ab1094d")) __declspec(novtable) IIterator<Windows::Media::Import::PhotoImportVideoSegment> : impl_IIterator<Windows::Media::Import::PhotoImportVideoSegment> {}; #endif #ifndef WINRT_GENERIC_94dd3b44_da03_5d79_bbfb_1beaf2ede482 #define WINRT_GENERIC_94dd3b44_da03_5d79_bbfb_1beaf2ede482 template <> struct __declspec(uuid("94dd3b44-da03-5d79-bbfb-1beaf2ede482")) __declspec(novtable) IIterable<Windows::Media::Import::PhotoImportVideoSegment> : impl_IIterable<Windows::Media::Import::PhotoImportVideoSegment> {}; #endif #ifndef WINRT_GENERIC_d04d6068_b5a3_508e_bc6b_1dcdfcfb0d08 #define WINRT_GENERIC_d04d6068_b5a3_508e_bc6b_1dcdfcfb0d08 template <> struct __declspec(uuid("d04d6068-b5a3-508e-bc6b-1dcdfcfb0d08")) __declspec(novtable) IIterator<Windows::Media::Import::PhotoImportItem> : impl_IIterator<Windows::Media::Import::PhotoImportItem> {}; #endif #ifndef WINRT_GENERIC_82347483_3b75_5e95_bba4_abc0b8a320aa #define WINRT_GENERIC_82347483_3b75_5e95_bba4_abc0b8a320aa template <> struct __declspec(uuid("82347483-3b75-5e95-bba4-abc0b8a320aa")) __declspec(novtable) IIterable<Windows::Media::Import::PhotoImportItem> : impl_IIterable<Windows::Media::Import::PhotoImportItem> {}; #endif } namespace ABI::Windows::Foundation { #ifndef WINRT_GENERIC_3ef45f6e_39b9_5976_8643_6bafea4d1479 #define WINRT_GENERIC_3ef45f6e_39b9_5976_8643_6bafea4d1479 template <> struct __declspec(uuid("3ef45f6e-39b9-5976-8643-6bafea4d1479")) __declspec(novtable) IAsyncOperation<Windows::Foundation::Collections::IVectorView<Windows::Media::Import::PhotoImportSource>> : impl_IAsyncOperation<Windows::Foundation::Collections::IVectorView<Windows::Media::Import::PhotoImportSource>> {}; #endif #ifndef WINRT_GENERIC_72cde698_9247_5053_8cbd_d9076bfdfda5 #define WINRT_GENERIC_72cde698_9247_5053_8cbd_d9076bfdfda5 template <> struct __declspec(uuid("72cde698-9247-5053-8cbd-d9076bfdfda5")) __declspec(novtable) AsyncOperationCompletedHandler<Windows::Foundation::Collections::IVectorView<Windows::Media::Import::PhotoImportSource>> : impl_AsyncOperationCompletedHandler<Windows::Foundation::Collections::IVectorView<Windows::Media::Import::PhotoImportSource>> {}; #endif } namespace Windows::Media::Import { template <typename D> struct WINRT_EBO impl_IPhotoImportDeleteImportedItemsFromSourceResult { Windows::Media::Import::PhotoImportSession Session() const; bool HasSucceeded() const; Windows::Foundation::Collections::IVectorView<Windows::Media::Import::PhotoImportItem> DeletedItems() const; uint32_t PhotosCount() const; uint64_t PhotosSizeInBytes() const; uint32_t VideosCount() const; uint64_t VideosSizeInBytes() const; uint32_t SidecarsCount() const; uint64_t SidecarsSizeInBytes() const; uint32_t SiblingsCount() const; uint64_t SiblingsSizeInBytes() const; uint32_t TotalCount() const; uint64_t TotalSizeInBytes() const; }; template <typename D> struct WINRT_EBO impl_IPhotoImportFindItemsResult { Windows::Media::Import::PhotoImportSession Session() const; bool HasSucceeded() const; Windows::Foundation::Collections::IVectorView<Windows::Media::Import::PhotoImportItem> FoundItems() const; uint32_t PhotosCount() const; uint64_t PhotosSizeInBytes() const; uint32_t VideosCount() const; uint64_t VideosSizeInBytes() const; uint32_t SidecarsCount() const; uint64_t SidecarsSizeInBytes() const; uint32_t SiblingsCount() const; uint64_t SiblingsSizeInBytes() const; uint32_t TotalCount() const; uint64_t TotalSizeInBytes() const; void SelectAll() const; void SelectNone() const; Windows::Foundation::IAsyncAction SelectNewAsync() const; void SetImportMode(Windows::Media::Import::PhotoImportImportMode value) const; Windows::Media::Import::PhotoImportImportMode ImportMode() const; uint32_t SelectedPhotosCount() const; uint64_t SelectedPhotosSizeInBytes() const; uint32_t SelectedVideosCount() const; uint64_t SelectedVideosSizeInBytes() const; uint32_t SelectedSidecarsCount() const; uint64_t SelectedSidecarsSizeInBytes() const; uint32_t SelectedSiblingsCount() const; uint64_t SelectedSiblingsSizeInBytes() const; uint32_t SelectedTotalCount() const; uint64_t SelectedTotalSizeInBytes() const; event_token SelectionChanged(const Windows::Foundation::TypedEventHandler<Windows::Media::Import::PhotoImportFindItemsResult, Windows::Media::Import::PhotoImportSelectionChangedEventArgs> & value) const; using SelectionChanged_revoker = event_revoker<IPhotoImportFindItemsResult>; SelectionChanged_revoker SelectionChanged(auto_revoke_t, const Windows::Foundation::TypedEventHandler<Windows::Media::Import::PhotoImportFindItemsResult, Windows::Media::Import::PhotoImportSelectionChangedEventArgs> & value) const; void SelectionChanged(event_token token) const; Windows::Foundation::IAsyncOperationWithProgress<Windows::Media::Import::PhotoImportImportItemsResult, Windows::Media::Import::PhotoImportProgress> ImportItemsAsync() const; event_token ItemImported(const Windows::Foundation::TypedEventHandler<Windows::Media::Import::PhotoImportFindItemsResult, Windows::Media::Import::PhotoImportItemImportedEventArgs> & value) const; using ItemImported_revoker = event_revoker<IPhotoImportFindItemsResult>; ItemImported_revoker ItemImported(auto_revoke_t, const Windows::Foundation::TypedEventHandler<Windows::Media::Import::PhotoImportFindItemsResult, Windows::Media::Import::PhotoImportItemImportedEventArgs> & value) const; void ItemImported(event_token token) const; }; template <typename D> struct WINRT_EBO impl_IPhotoImportFindItemsResult2 { void AddItemsInDateRangeToSelection(const Windows::Foundation::DateTime & rangeStart, const Windows::Foundation::TimeSpan & rangeLength) const; }; template <typename D> struct WINRT_EBO impl_IPhotoImportImportItemsResult { Windows::Media::Import::PhotoImportSession Session() const; bool HasSucceeded() const; Windows::Foundation::Collections::IVectorView<Windows::Media::Import::PhotoImportItem> ImportedItems() const; uint32_t PhotosCount() const; uint64_t PhotosSizeInBytes() const; uint32_t VideosCount() const; uint64_t VideosSizeInBytes() const; uint32_t SidecarsCount() const; uint64_t SidecarsSizeInBytes() const; uint32_t SiblingsCount() const; uint64_t SiblingsSizeInBytes() const; uint32_t TotalCount() const; uint64_t TotalSizeInBytes() const; Windows::Foundation::IAsyncOperationWithProgress<Windows::Media::Import::PhotoImportDeleteImportedItemsFromSourceResult, double> DeleteImportedItemsFromSourceAsync() const; }; template <typename D> struct WINRT_EBO impl_IPhotoImportItem { hstring Name() const; uint64_t ItemKey() const; Windows::Media::Import::PhotoImportContentType ContentType() const; uint64_t SizeInBytes() const; Windows::Foundation::DateTime Date() const; Windows::Media::Import::PhotoImportSidecar Sibling() const; Windows::Foundation::Collections::IVectorView<Windows::Media::Import::PhotoImportSidecar> Sidecars() const; Windows::Foundation::Collections::IVectorView<Windows::Media::Import::PhotoImportVideoSegment> VideoSegments() const; bool IsSelected() const; void IsSelected(bool value) const; Windows::Storage::Streams::IRandomAccessStreamReference Thumbnail() const; Windows::Foundation::Collections::IVectorView<hstring> ImportedFileNames() const; Windows::Foundation::Collections::IVectorView<hstring> DeletedFileNames() const; }; template <typename D> struct WINRT_EBO impl_IPhotoImportItemImportedEventArgs { Windows::Media::Import::PhotoImportItem ImportedItem() const; }; template <typename D> struct WINRT_EBO impl_IPhotoImportManagerStatics { Windows::Foundation::IAsyncOperation<bool> IsSupportedAsync() const; Windows::Foundation::IAsyncOperation<Windows::Foundation::Collections::IVectorView<Windows::Media::Import::PhotoImportSource>> FindAllSourcesAsync() const; Windows::Foundation::Collections::IVectorView<Windows::Media::Import::PhotoImportOperation> GetPendingOperations() const; }; template <typename D> struct WINRT_EBO impl_IPhotoImportOperation { Windows::Media::Import::PhotoImportStage Stage() const; Windows::Media::Import::PhotoImportSession Session() const; Windows::Foundation::IAsyncOperationWithProgress<Windows::Media::Import::PhotoImportFindItemsResult, uint32_t> ContinueFindingItemsAsync() const; Windows::Foundation::IAsyncOperationWithProgress<Windows::Media::Import::PhotoImportImportItemsResult, Windows::Media::Import::PhotoImportProgress> ContinueImportingItemsAsync() const; Windows::Foundation::IAsyncOperationWithProgress<Windows::Media::Import::PhotoImportDeleteImportedItemsFromSourceResult, double> ContinueDeletingImportedItemsFromSourceAsync() const; }; template <typename D> struct WINRT_EBO impl_IPhotoImportSelectionChangedEventArgs { bool IsSelectionEmpty() const; }; template <typename D> struct WINRT_EBO impl_IPhotoImportSession { Windows::Media::Import::PhotoImportSource Source() const; GUID SessionId() const; void DestinationFolder(const Windows::Storage::IStorageFolder & value) const; Windows::Storage::IStorageFolder DestinationFolder() const; void AppendSessionDateToDestinationFolder(bool value) const; bool AppendSessionDateToDestinationFolder() const; void SubfolderCreationMode(Windows::Media::Import::PhotoImportSubfolderCreationMode value) const; Windows::Media::Import::PhotoImportSubfolderCreationMode SubfolderCreationMode() const; void DestinationFileNamePrefix(hstring_ref value) const; hstring DestinationFileNamePrefix() const; Windows::Foundation::IAsyncOperationWithProgress<Windows::Media::Import::PhotoImportFindItemsResult, uint32_t> FindItemsAsync(Windows::Media::Import::PhotoImportContentTypeFilter contentTypeFilter, Windows::Media::Import::PhotoImportItemSelectionMode itemSelectionMode) const; }; template <typename D> struct WINRT_EBO impl_IPhotoImportSession2 { void SubfolderDateFormat(Windows::Media::Import::PhotoImportSubfolderDateFormat value) const; Windows::Media::Import::PhotoImportSubfolderDateFormat SubfolderDateFormat() const; void RememberDeselectedItems(bool value) const; bool RememberDeselectedItems() const; }; template <typename D> struct WINRT_EBO impl_IPhotoImportSidecar { hstring Name() const; uint64_t SizeInBytes() const; Windows::Foundation::DateTime Date() const; }; template <typename D> struct WINRT_EBO impl_IPhotoImportSource { hstring Id() const; hstring DisplayName() const; hstring Description() const; hstring Manufacturer() const; hstring Model() const; hstring SerialNumber() const; hstring ConnectionProtocol() const; Windows::Media::Import::PhotoImportConnectionTransport ConnectionTransport() const; Windows::Media::Import::PhotoImportSourceType Type() const; Windows::Media::Import::PhotoImportPowerSource PowerSource() const; Windows::Foundation::IReference<uint32_t> BatteryLevelPercent() const; Windows::Foundation::IReference<Windows::Foundation::DateTime> DateTime() const; Windows::Foundation::Collections::IVectorView<Windows::Media::Import::PhotoImportStorageMedium> StorageMedia() const; Windows::Foundation::IReference<bool> IsLocked() const; bool IsMassStorage() const; Windows::Storage::Streams::IRandomAccessStreamReference Thumbnail() const; Windows::Media::Import::PhotoImportSession CreateImportSession() const; }; template <typename D> struct WINRT_EBO impl_IPhotoImportSourceStatics { Windows::Foundation::IAsyncOperation<Windows::Media::Import::PhotoImportSource> FromIdAsync(hstring_ref sourceId) const; Windows::Foundation::IAsyncOperation<Windows::Media::Import::PhotoImportSource> FromFolderAsync(const Windows::Storage::IStorageFolder & sourceRootFolder) const; }; template <typename D> struct WINRT_EBO impl_IPhotoImportStorageMedium { hstring Name() const; hstring Description() const; hstring SerialNumber() const; Windows::Media::Import::PhotoImportStorageMediumType StorageMediumType() const; Windows::Media::Import::PhotoImportAccessMode SupportedAccessMode() const; uint64_t CapacityInBytes() const; uint64_t AvailableSpaceInBytes() const; void Refresh() const; }; template <typename D> struct WINRT_EBO impl_IPhotoImportVideoSegment { hstring Name() const; uint64_t SizeInBytes() const; Windows::Foundation::DateTime Date() const; Windows::Media::Import::PhotoImportSidecar Sibling() const; Windows::Foundation::Collections::IVectorView<Windows::Media::Import::PhotoImportSidecar> Sidecars() const; }; struct IPhotoImportDeleteImportedItemsFromSourceResult : Windows::IInspectable, impl::consume<IPhotoImportDeleteImportedItemsFromSourceResult> { IPhotoImportDeleteImportedItemsFromSourceResult(std::nullptr_t = nullptr) noexcept {} auto operator->() const noexcept { return ptr<IPhotoImportDeleteImportedItemsFromSourceResult>(m_ptr); } }; struct IPhotoImportFindItemsResult : Windows::IInspectable, impl::consume<IPhotoImportFindItemsResult> { IPhotoImportFindItemsResult(std::nullptr_t = nullptr) noexcept {} auto operator->() const noexcept { return ptr<IPhotoImportFindItemsResult>(m_ptr); } }; struct IPhotoImportFindItemsResult2 : Windows::IInspectable, impl::consume<IPhotoImportFindItemsResult2> { IPhotoImportFindItemsResult2(std::nullptr_t = nullptr) noexcept {} auto operator->() const noexcept { return ptr<IPhotoImportFindItemsResult2>(m_ptr); } }; struct IPhotoImportImportItemsResult : Windows::IInspectable, impl::consume<IPhotoImportImportItemsResult> { IPhotoImportImportItemsResult(std::nullptr_t = nullptr) noexcept {} auto operator->() const noexcept { return ptr<IPhotoImportImportItemsResult>(m_ptr); } }; struct IPhotoImportItem : Windows::IInspectable, impl::consume<IPhotoImportItem> { IPhotoImportItem(std::nullptr_t = nullptr) noexcept {} auto operator->() const noexcept { return ptr<IPhotoImportItem>(m_ptr); } }; struct IPhotoImportItemImportedEventArgs : Windows::IInspectable, impl::consume<IPhotoImportItemImportedEventArgs> { IPhotoImportItemImportedEventArgs(std::nullptr_t = nullptr) noexcept {} auto operator->() const noexcept { return ptr<IPhotoImportItemImportedEventArgs>(m_ptr); } }; struct IPhotoImportManagerStatics : Windows::IInspectable, impl::consume<IPhotoImportManagerStatics> { IPhotoImportManagerStatics(std::nullptr_t = nullptr) noexcept {} auto operator->() const noexcept { return ptr<IPhotoImportManagerStatics>(m_ptr); } }; struct IPhotoImportOperation : Windows::IInspectable, impl::consume<IPhotoImportOperation> { IPhotoImportOperation(std::nullptr_t = nullptr) noexcept {} auto operator->() const noexcept { return ptr<IPhotoImportOperation>(m_ptr); } }; struct IPhotoImportSelectionChangedEventArgs : Windows::IInspectable, impl::consume<IPhotoImportSelectionChangedEventArgs> { IPhotoImportSelectionChangedEventArgs(std::nullptr_t = nullptr) noexcept {} auto operator->() const noexcept { return ptr<IPhotoImportSelectionChangedEventArgs>(m_ptr); } }; struct IPhotoImportSession : Windows::IInspectable, impl::consume<IPhotoImportSession>, impl::require<IPhotoImportSession, Windows::Foundation::IClosable> { IPhotoImportSession(std::nullptr_t = nullptr) noexcept {} auto operator->() const noexcept { return ptr<IPhotoImportSession>(m_ptr); } }; struct IPhotoImportSession2 : Windows::IInspectable, impl::consume<IPhotoImportSession2> { IPhotoImportSession2(std::nullptr_t = nullptr) noexcept {} auto operator->() const noexcept { return ptr<IPhotoImportSession2>(m_ptr); } }; struct IPhotoImportSidecar : Windows::IInspectable, impl::consume<IPhotoImportSidecar> { IPhotoImportSidecar(std::nullptr_t = nullptr) noexcept {} auto operator->() const noexcept { return ptr<IPhotoImportSidecar>(m_ptr); } }; struct IPhotoImportSource : Windows::IInspectable, impl::consume<IPhotoImportSource> { IPhotoImportSource(std::nullptr_t = nullptr) noexcept {} auto operator->() const noexcept { return ptr<IPhotoImportSource>(m_ptr); } }; struct IPhotoImportSourceStatics : Windows::IInspectable, impl::consume<IPhotoImportSourceStatics> { IPhotoImportSourceStatics(std::nullptr_t = nullptr) noexcept {} auto operator->() const noexcept { return ptr<IPhotoImportSourceStatics>(m_ptr); } }; struct IPhotoImportStorageMedium : Windows::IInspectable, impl::consume<IPhotoImportStorageMedium> { IPhotoImportStorageMedium(std::nullptr_t = nullptr) noexcept {} auto operator->() const noexcept { return ptr<IPhotoImportStorageMedium>(m_ptr); } }; struct IPhotoImportVideoSegment : Windows::IInspectable, impl::consume<IPhotoImportVideoSegment> { IPhotoImportVideoSegment(std::nullptr_t = nullptr) noexcept {} auto operator->() const noexcept { return ptr<IPhotoImportVideoSegment>(m_ptr); } }; } }
0fb3ed228deb2976b43e4a8e3c7a74dec1e00093
b9fccefb37e5b293e30a6ca3071c2b23f4cb7351
/Game/AI_Rise.h
3f2f82bf3e9f7b9f99520c263967195e357fafa2
[]
no_license
qavenger97/Automaton-Assault
bb60fe07b52bd78521410a3e874f02a20290fa72
616c1dedabfe649f31b064c5024d4bad6c2b0876
refs/heads/master
2020-12-31T07:11:33.554420
2017-01-31T22:04:42
2017-01-31T22:04:42
80,561,820
3
0
null
null
null
null
UTF-8
C++
false
false
434
h
AI_Rise.h
#pragma once class AI_Rise : public Hourglass::IAction { public: void LoadFromXML( tinyxml2::XMLElement* data ); void Init( Hourglass::Entity* entity ); IBehavior::Result Update( Hourglass::Entity* entity ); IBehavior* MakeCopy() const; private: StrID m_LaserEntityName; hg::Entity* m_LaserEntity; Vector3 m_TravelVec; float m_StartSpeed; float m_EndSpeed; float m_Duration; float m_Timer; uint32_t m_Reverse : 1; };
f307e69259880d74c2dc925978fe1a70b186c949
23297db7d8a2a402acb1afad022b7081fed5701e
/legacy/spike/weather.cc
8bfd5910764544b00c03e1967c3d6ec339055d0b
[]
permissive
drewvlaz/virtual-assistant
0e87f6141c57aefd67960887bb19545683186546
a790d8ae1fce633a85efc8750dae5730c8bd14b5
refs/heads/master
2022-10-02T00:03:21.045152
2021-08-06T23:06:52
2021-08-06T23:06:52
203,483,995
6
3
MIT
2022-09-01T23:22:02
2019-08-21T01:42:59
Java
UTF-8
C++
false
false
2,895
cc
weather.cc
#include <iostream> #include <map> #include <curl/curl.h> #include "CommonFunctions.h" void RetrieveWeather() { // Recieve weather information from the Dark Sky API (1000 calls/day) Json::Value api_keys {CommonFunctions::ReadInJson("../data/api_keys.json")}; std::string url {"https://api.darksky.net/forecast/"}; std::string key; std::string coordinates {"/40.957130,-74.737640"}; // Get the api key if it exists for (const auto &label : api_keys.getMemberNames()) { if (label == "weather") { url += CommonFunctions::Clean(api_keys[label].toStyledString()); } else { std::cout << "Can't retrieve api keys" << std::endl; } } // Get ride of trailing \r from toStyledString url = url.substr(0, url.length() - 1); url += coordinates; // Use curl to retrieve the weather info CURL *curl {curl_easy_init()}; FILE *fp; CURLcode result; char outfilename[FILENAME_MAX] {"weather.json"}; if (curl) { fp = fopen(outfilename,"wb"); curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, NULL); curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp); // Request webpage, result stores return code result = curl_easy_perform(curl); curl_easy_cleanup(curl); fclose(fp); } } void DisplayWeather() { // Display relevant weather information Json::Value weather_data {CommonFunctions::ReadInJson("weather.json")}; std::array<std::string, 5> weather_summary; // Clean data and add it to array weather_summary.at(0) = { "Summary: " + weather_data["currently"]["summary"].toStyledString() }; weather_summary.at(1) = { "Temperature: " + weather_data["currently"]["temperature"].toStyledString().substr(0, 5) + "\n" }; std::string test = weather_data["currently"]["apparentTemperature"].toStyledString(); weather_summary.at(2) = { "Feels like: " + (test.substr(0, 1)) + "\n" }; weather_summary.at(3) = { "Chance of Rain: " + weather_data["currently"]["precipProbability"].toStyledString().substr(0, 5) + "\n" }; for (const auto &info : weather_summary) { std::cout << info; } // Maps are unordered // std::map<std::string, std::string> weather_info = { // {"Summary", "summary"}, // {"Temperature", "temperature"}, // {"Feels like", "apparentTemperature"}, // {"Chance of Rain", "precipProbability"}, // {"Humidity", "humidity"} // }; // for (const auto &label : weather_info) { // std::cout << label.first << ": " << weather_data["currently"][label.second] << std::endl; // } } int main() { RetrieveWeather(); DisplayWeather(); return 0; }
8a4d32685ab2a6b08945ceda033d1e65e88bc75f
10aa9c991f12457074c91058d4d800ef5e96bad1
/Bai Thuc Hanh So 3/Bai3.4.cpp
5cbfd7976f10b6c5f6d75c89ed780a3b964d2785
[]
no_license
nguyennhatminh230801/LapTrinhHDT
566b1cb3cc7fda796c3697b3d697270016859097
59f6d62bf44cc335805b3b44e1b29a60b91b64de
refs/heads/master
2023-06-21T06:52:14.616439
2021-07-26T17:08:31
2021-07-26T17:08:31
341,476,429
0
0
null
null
null
null
UTF-8
C++
false
false
1,745
cpp
Bai3.4.cpp
#include <bits/stdc++.h> using namespace std; class PTB2 { float a, b, c; public: PTB2(); PTB2(float a, float b, float c); void NHAP(); void XUAT(); void GIAI(); }; PTB2::PTB2() { a = 0; b = 0; c = 0; } PTB2::PTB2(float a, float b, float c) { this->a = a; this->b = b; this->c = c; } void PTB2::NHAP() { cout << "Nhap a: "; cin >> a; cout << "Nhap b: "; cin >> b; cout << "Nhap c: "; cin >> c; } void PTB2::XUAT() { cout << a << "x^2 + " << b << "x + " << c << "= 0" << endl; } void PTB2::GIAI() { if(a == 0) { if(b == 0) { if(c == 0) { cout << "Phuong trinh vo so nghiem" << endl; } else{ cout << "Phuong trinh vo nghiem" << endl; } } else{ cout << "Phuong trinh co 1 nghiem " << -c / b << endl; } } else{ float delta = b * b - 4 * a * c; if(delta < 0) { cout << "Phuong trinh vo nghiem" << endl; } else if (delta == 0) { cout << "Phuong trinh co 1 nghiem " << -b / (2 * a) << endl; } else{ cout << "x1 = " << (-b + sqrt(delta)) / (2 * a) << endl; cout << "x2 = " << (-b - sqrt(delta)) / (2 * a) << endl; } } } int main() { PTB2 P(2, 4, 2); cout << "Phuong trinh P: "; P.XUAT(); cout << "Giai phuong trinh P: "; P.GIAI(); PTB2 Q; cout << "Nhap gia tri phuong trinh P: " << endl; Q.NHAP(); cout << "Phuong trinh Q: "; Q.XUAT(); cout << "Giai phuong trinh Q: "; Q.GIAI(); return 0; }
fb43e1b822168f0791bdeaee24597d9187546684
41828199720027d440a2409e7208fa47ca421c3c
/DRUGON-Qt-Project-Folder/katastasi.h
c73ecb84d166df5a9d4e41f39584a6b3f01e376b
[]
no_license
RoboGR00t/DRUGON
832c184eab05b376ce7d2498a6ef218e34e077f0
cb9786362d79cb4162c67b28974a9a7b7c85bd0a
refs/heads/main
2023-01-30T12:00:43.919858
2020-12-17T20:06:20
2020-12-17T20:06:20
302,967,215
1
0
null
null
null
null
UTF-8
C++
false
false
703
h
katastasi.h
#ifndef KATASTASI_H #define KATASTASI_H #include <QDialog> #include <iostream> #include <vector> using namespace std; namespace Ui { class Katastasi; } class Katastasi : public QDialog { Q_OBJECT public: explicit Katastasi(QString dataset,QWidget *parent = nullptr); ~Katastasi(); vector< vector <string> > CSV_DATA; string CSV_FILE ; string onoma = ""; private slots: void on_categories_currentIndexChanged(const QString &arg1); int highlight_date(string csv_data); void on_search_clicked(); void on_printer_clicked(); void on_pushButton_clicked(); private: Ui::Katastasi *ui; }; #endif // KATASTASI_H
7eaf629cb333c491e862841559a87c8439e41156
88ae8695987ada722184307301e221e1ba3cc2fa
/third_party/blink/renderer/platform/graphics/color_behavior.h
ede3256c36c8e7e9404d401306c3d6c3135b49aa
[ "BSD-3-Clause", "LGPL-2.0-or-later", "LicenseRef-scancode-warranty-disclaimer", "LGPL-2.1-only", "GPL-1.0-or-later", "GPL-2.0-only", "LGPL-2.0-only", "BSD-2-Clause", "LicenseRef-scancode-other-copyleft", "Apache-2.0", "MIT" ]
permissive
iridium-browser/iridium-browser
71d9c5ff76e014e6900b825f67389ab0ccd01329
5ee297f53dc7f8e70183031cff62f37b0f19d25f
refs/heads/master
2023-08-03T16:44:16.844552
2023-07-20T15:17:00
2023-07-23T16:09:30
220,016,632
341
40
BSD-3-Clause
2021-08-13T13:54:45
2019-11-06T14:32:31
null
UTF-8
C++
false
false
2,129
h
color_behavior.h
// Copyright 2016 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_COLOR_BEHAVIOR_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_COLOR_BEHAVIOR_H_ #include "third_party/blink/renderer/platform/platform_export.h" #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" #include "third_party/blink/renderer/platform/wtf/cross_thread_copier.h" #include "ui/gfx/color_space.h" namespace blink { class PLATFORM_EXPORT ColorBehavior { DISALLOW_NEW(); public: // This specifies to ignore color profiles embedded in images entirely. No // transformations will be applied to any pixel data, and no SkImages will be // tagged with an SkColorSpace. static ColorBehavior Ignore() { return ColorBehavior(Type::kIgnore); } bool IsIgnore() const { return type_ == Type::kIgnore; } // This specifies that images will not be transformed (to the extent // possible), but that SkImages will be tagged with the embedded SkColorSpace // (or sRGB if there was no embedded color profile). static ColorBehavior Tag() { return ColorBehavior(Type::kTag); } bool IsTag() const { return type_ == Type::kTag; } // This specifies that images will be transformed to sRGB, and that SkImages // will not be tagged with any SkColorSpace. static ColorBehavior TransformToSRGB() { return ColorBehavior(Type::kTransformToSRGB); } bool IsTransformToSRGB() const { return type_ == Type::kTransformToSRGB; } bool operator==(const ColorBehavior&) const; bool operator!=(const ColorBehavior&) const; private: enum class Type { kIgnore, kTag, kTransformToSRGB, }; ColorBehavior(Type type) : type_(type) {} Type type_; }; } // namespace blink namespace WTF { template <> struct CrossThreadCopier<blink::ColorBehavior> { STATIC_ONLY(CrossThreadCopier); using Type = blink::ColorBehavior; static Type Copy(Type pointer) { return pointer; } }; } // namespace WTF #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_COLOR_BEHAVIOR_H_
ddd37ad25a0a60501bf1987b1507908879aef8aa
59d8e103219b6df4fb564f57168e02c42772c20e
/main.cpp
14d7292d4107bc4e999d7b42d8623c04dcb53ca2
[]
no_license
incredibleLeitman/kd-tree
7e73504824a110fd30f6e29467a6552dd69cc186
6bac06c90cf6ca13a125ba2604457d048489dc87
refs/heads/main
2023-03-11T15:27:05.160371
2021-03-02T10:50:47
2021-03-02T10:50:47
335,015,207
0
0
null
null
null
null
UTF-8
C++
false
false
5,313
cpp
main.cpp
#include "kdtree.h" #ifdef _WIN32 // vis only supported on windows #include "vis.h" #endif #include "pointGenerator.h" #include <cstring> // stoi #include <chrono> void raycast (KDTree& tree, Ray& ray) { const Triangle* triangle = tree.raycast(ray); std::cout << "hit triangle: " << (triangle ? triangle->toString() : "nullptr") << std::endl; triangle = tree.bruteforce(ray); std::cout << "hit triangle: " << (triangle ? triangle->toString() : "nullptr") << std::endl; } int main (int argc, char* argv[]) { std::cout << "ALGO assignment \"kd-tree\"\n=============================\n" << std::endl; // read program arguments // TODO: care a little more <3 --> use getopt // -v mode with enabled visualization // -f <filename> read triangle points from file // --rngcount <count> generates count random float values bool vis = true; //uint32_t runs = 0; std::string fileRnd = ""; //fileRnd = "Monkey.obj"; //fileRnd = "MonkeySimple.obj"; //fileRnd = "nubian_complex.obj"; //fileRnd = "icosphere.obj"; //fileRnd = "sphere.obj"; //fileRnd = "noobPot.obj"; uint32_t count = 1000000; // TODO: add params: // -runs <count> runs performance mode multiple times for (int i = 0; i < argc; ++i) { if (strcmp(argv[i], "-v") == 0) vis = true; else if (strcmp(argv[i], "-p") == 0) vis = false; else if (strcmp(argv[i], "-f") == 0) fileRnd = argv[i + 1]; else if (strcmp(argv[i], "--rngcount") == 0) count = std::stoi(argv[i + 1]); //else if (strcmp(argv[i], "--runs") == 0) runs = std::stoi(argv[i + 1]); } std::vector<float> triangleVertices; if (fileRnd.empty() == false) // read points from given file { std::cout << "reading vertices from file: " << fileRnd << "..." << std::endl; auto start = std::chrono::high_resolution_clock::now(); triangleVertices = PointGenerator::read_file(fileRnd); std::cout << " took " << std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::high_resolution_clock::now() - start).count() << " microseconds" << std::endl; } else if (count != 0) // generate random points { std::cout << "generating " << count << " random triangles" << std::endl; triangleVertices = PointGenerator::generate_triangles(count); } else { std::cout << "using simple test setup" << std::endl; triangleVertices = { #if defined (AXIS_X) // center -0.5f, -0.5f, 0.0f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, 0.0f, // left -5.5f, -0.5f, 0.0f, -4.5f, -0.5f, 0.0f, -5.0f, 0.5f, 0.0f, // right 4.5f, -0.5f, 0.0f, 5.5f, -0.5f, 0.0f, 5.0f, 0.5f, 0.0f #elif defined (AXIS_Y_Z) // top -0.5f, 4.5f, 0.0f, // left 0.5f, 4.5f, 0.0f, // right 0.0f, 5.5f, 0.0f, // top // back -0.5f, -0.5f, -5.0f, 0.5f, -0.5f, -5.0f, 0.0f, 0.5f, -5.0f, // center -0.5f, -0.5f, 0.0f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, 0.0f, // front -0.5f, -0.5f, 5.0f, 0.5f, -0.5f, 5.0f, 0.0f, 0.5f, 5.0f, // bottom -0.5f, -5.5f, 0.0f, 0.5f, -5.5f, 0.0f, 0.0f, -4.5f, 0.0f #elif defined (AXIS_X_Y_Z) // top -0.5f, 4.5f, 0.0f, // left 0.5f, 4.5f, 0.0f, // right 0.0f, 5.5f, 0.0f, // top // center -0.5f, -0.5f, 0.0f, 0.5f, -0.5f, 0.0f, 0.0f, 0.5f, 0.0f, // left -5.5f, -0.5f, 0.0f, -4.5f, -0.5f, 0.0f, -5.0f, 0.5f, 0.0f, // right 4.5f, -0.5f, 0.0f, 5.5f, -0.5f, 0.0f, 5.0f, 0.5f, 0.0f, // front -0.5f, -0.5f, 5.0f, 0.5f, -0.5f, 5.0f, 0.0f, 0.5f, 5.0f, // back -0.5f, -0.5f, -5.0f, 0.5f, -0.5f, -5.0f, 0.0f, 0.5f, -5.0f, // bottom -0.5f, -5.5f, 0.0f, 0.5f, -5.5f, 0.0f, 0.0f, -4.5f, 0.0f #endif }; } KDTree tree(&triangleVertices[0], triangleVertices.size()); //tree.print(); if (vis) { #ifdef _WIN32 Vis vis(tree, &triangleVertices[0], triangleVertices.size()); vis.display(); #else std::cout << "visualization not supported in non-windows systems" << std::endl; #endif } else { std::cout << std::endl << "performance mode" << std::endl << "==========================================================" << std::endl << "x... exit" << std::endl << "r... test raycast from 0, 0, 0 to random point" << std::endl << "c... test raycast between two random points" << std::endl << "----------------------------------------------------------" << std::endl << std::endl; char input = '0'; while (input != 'x') { std::cin >> input; // TODO: parse vector input for custom point if (input == 'r') { std::vector<float> point = PointGenerator::generate_3dpoint(); std::cout << "testing intersection from " << "0, 0, 0 - " << point[0] << ", " << point[1] << ", " << point[2] << std::endl; Ray ray(point[0], point[1], point[2]); raycast(tree, ray); } else if (input == 'c') { std::vector<float> dir = PointGenerator::generate_3dpoint(); std::vector<float> from = PointGenerator::generate_3dpoint(); std::cout << "testing intersection from " << dir[0] << ", " << dir[1] << ", " << dir[2] << " - " << from[0] << ", " << from[1] << ", " << from[2] << std::endl; Ray ray(dir[0], dir[1], dir[2], from[0], from[1], from[2]); raycast(tree, ray); } } } }
b06c7c3dad49bfecb55266022e17dd8279b4282e
7eb0a1418bac3c352a0b79043f2a411db4806f1b
/Contest/Con637B.cpp
91f8a2a25906124a0af194c22a5682dbc714cdd3
[ "Apache-2.0" ]
permissive
Satyabrat35/Programming
6a88ee7f8726d2d279e1191f667d0602d8eec94e
841ead1bf847b567d8e21963673413cbd65277f4
refs/heads/master
2022-01-15T08:17:56.938907
2022-01-12T16:27:21
2022-01-12T16:27:21
142,171,986
1
0
null
null
null
null
UTF-8
C++
false
false
1,685
cpp
Con637B.cpp
/**************erik****************/ #include<bits/stdc++.h> #include <cstdio> #include <iostream> #include <algorithm> using namespace std; typedef long long int ll; typedef unsigned long long int ull; //map<ll,ll> mp1; //set<int> s1; //set<int>::iterator it; #define maxm(a,b,c) max(a,max(c,b)) #define minm(a,b,c) min(a,min(c,b)) #define f(i,n) for(int i=1;i<n;i++) #define rf(i,n) for(int i=n-1;i>=0;i--) int main() { int t; cin>>t; while(t--){ int n,k; cin>>n>>k; int a[n]; for(int i=0;i<n;i++){ cin>>a[i]; } int pk[n]; pk[0]=0; pk[n-1]=0; for(int i=1;i<(n-1);i++){ if(a[i-1]<a[i] && a[i]>a[i+1]){ pk[i]=1; } else { pk[i]=0; } } int pref[n]; pref[0]=0; for(int i=1;i<n;i++){ pref[i]=pref[i-1]+pk[i]; } //cout<<endl; int peaks = 0; int st = 0; for(int i=0;i<n;){ int x; if(i+k-1<n){ if(!i){ x = pref[i+k-1]; if(pk[i+k-1]==1)x-=1; if(peaks<x){ peaks = x; st = i; } } else { x = pref[i+k-1] - pref[i-1]; if(pk[i+k-1]==1)x-=1; if(pk[i]==1)x-=1; if(peaks<x){ peaks = x; st = i; } } } i++; } cout<<peaks+1<<' '<<st+1<<endl; } return 0; }
a0daa3fce6c2c438a3cc645463502471dec0c906
5581753996de11d1940effd55127e5ff6a9e5fad
/src/Proto/GameEventBuffer.pb.h
10d1d9f77657b5f9353e5057f84797329a1749b9
[ "Apache-2.0" ]
permissive
redhat-gamedev/srt-game-server
8b28805a7463036bbf74293f2f81ee2924b212ed
7f53264b2282494f977b184f71b42125fe8a64b8
refs/heads/master
2023-08-13T08:59:01.516065
2021-09-29T12:26:42
2021-09-29T12:26:42
319,087,483
5
2
Apache-2.0
2021-06-09T17:00:17
2020-12-06T17:12:30
C++
UTF-8
C++
false
true
52,090
h
GameEventBuffer.pb.h
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: GameEventBuffer.proto #ifndef PROTOBUF_INCLUDED_GameEventBuffer_2eproto #define PROTOBUF_INCLUDED_GameEventBuffer_2eproto #include <string> #include <google/protobuf/stubs/common.h> #if GOOGLE_PROTOBUF_VERSION < 3006001 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif #if 3006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. #endif #include <google/protobuf/io/coded_stream.h> #include <google/protobuf/arena.h> #include <google/protobuf/arenastring.h> #include <google/protobuf/generated_message_table_driven.h> #include <google/protobuf/generated_message_util.h> #include <google/protobuf/inlined_string_field.h> #include <google/protobuf/metadata.h> #include <google/protobuf/message.h> #include <google/protobuf/repeated_field.h> // IWYU pragma: export #include <google/protobuf/extension_set.h> // IWYU pragma: export #include <google/protobuf/generated_enum_reflection.h> #include <google/protobuf/unknown_field_set.h> #include "EntityGameEventBuffer.pb.h" // @@protoc_insertion_point(includes) #define PROTOBUF_INTERNAL_EXPORT_protobuf_GameEventBuffer_2eproto namespace protobuf_GameEventBuffer_2eproto { // Internal implementation detail -- do not use these members. struct TableStruct { static const ::google::protobuf::internal::ParseTableField entries[]; static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; static const ::google::protobuf::internal::ParseTable schema[4]; static const ::google::protobuf::internal::FieldMetadata field_metadata[]; static const ::google::protobuf::internal::SerializationTable serialization_table[]; static const ::google::protobuf::uint32 offsets[]; }; void AddDescriptors(); } // namespace protobuf_GameEventBuffer_2eproto namespace redhatgamedev { namespace srt { class GameEventBuffer; class GameEventBufferDefaultTypeInternal; extern GameEventBufferDefaultTypeInternal _GameEventBuffer_default_instance_; class JoinSecurityGameEventBuffer; class JoinSecurityGameEventBufferDefaultTypeInternal; extern JoinSecurityGameEventBufferDefaultTypeInternal _JoinSecurityGameEventBuffer_default_instance_; class LeaveSecurityGameEventBuffer; class LeaveSecurityGameEventBufferDefaultTypeInternal; extern LeaveSecurityGameEventBufferDefaultTypeInternal _LeaveSecurityGameEventBuffer_default_instance_; class SecurityGameEventBuffer; class SecurityGameEventBufferDefaultTypeInternal; extern SecurityGameEventBufferDefaultTypeInternal _SecurityGameEventBuffer_default_instance_; } // namespace srt } // namespace redhatgamedev namespace google { namespace protobuf { template<> ::redhatgamedev::srt::GameEventBuffer* Arena::CreateMaybeMessage<::redhatgamedev::srt::GameEventBuffer>(Arena*); template<> ::redhatgamedev::srt::JoinSecurityGameEventBuffer* Arena::CreateMaybeMessage<::redhatgamedev::srt::JoinSecurityGameEventBuffer>(Arena*); template<> ::redhatgamedev::srt::LeaveSecurityGameEventBuffer* Arena::CreateMaybeMessage<::redhatgamedev::srt::LeaveSecurityGameEventBuffer>(Arena*); template<> ::redhatgamedev::srt::SecurityGameEventBuffer* Arena::CreateMaybeMessage<::redhatgamedev::srt::SecurityGameEventBuffer>(Arena*); } // namespace protobuf } // namespace google namespace redhatgamedev { namespace srt { enum SecurityGameEventBuffer_SecurityGameEventBufferType { SecurityGameEventBuffer_SecurityGameEventBufferType_UNKNOWN = 0, SecurityGameEventBuffer_SecurityGameEventBufferType_JOIN = 1, SecurityGameEventBuffer_SecurityGameEventBufferType_LEAVE = 2 }; bool SecurityGameEventBuffer_SecurityGameEventBufferType_IsValid(int value); const SecurityGameEventBuffer_SecurityGameEventBufferType SecurityGameEventBuffer_SecurityGameEventBufferType_SecurityGameEventBufferType_MIN = SecurityGameEventBuffer_SecurityGameEventBufferType_UNKNOWN; const SecurityGameEventBuffer_SecurityGameEventBufferType SecurityGameEventBuffer_SecurityGameEventBufferType_SecurityGameEventBufferType_MAX = SecurityGameEventBuffer_SecurityGameEventBufferType_LEAVE; const int SecurityGameEventBuffer_SecurityGameEventBufferType_SecurityGameEventBufferType_ARRAYSIZE = SecurityGameEventBuffer_SecurityGameEventBufferType_SecurityGameEventBufferType_MAX + 1; const ::google::protobuf::EnumDescriptor* SecurityGameEventBuffer_SecurityGameEventBufferType_descriptor(); inline const ::std::string& SecurityGameEventBuffer_SecurityGameEventBufferType_Name(SecurityGameEventBuffer_SecurityGameEventBufferType value) { return ::google::protobuf::internal::NameOfEnum( SecurityGameEventBuffer_SecurityGameEventBufferType_descriptor(), value); } inline bool SecurityGameEventBuffer_SecurityGameEventBufferType_Parse( const ::std::string& name, SecurityGameEventBuffer_SecurityGameEventBufferType* value) { return ::google::protobuf::internal::ParseNamedEnum<SecurityGameEventBuffer_SecurityGameEventBufferType>( SecurityGameEventBuffer_SecurityGameEventBufferType_descriptor(), name, value); } enum GameEventBuffer_GameEventBufferType { GameEventBuffer_GameEventBufferType_UNKNOWN = 0, GameEventBuffer_GameEventBufferType_ENTITY = 1, GameEventBuffer_GameEventBufferType_SECURITY = 2 }; bool GameEventBuffer_GameEventBufferType_IsValid(int value); const GameEventBuffer_GameEventBufferType GameEventBuffer_GameEventBufferType_GameEventBufferType_MIN = GameEventBuffer_GameEventBufferType_UNKNOWN; const GameEventBuffer_GameEventBufferType GameEventBuffer_GameEventBufferType_GameEventBufferType_MAX = GameEventBuffer_GameEventBufferType_SECURITY; const int GameEventBuffer_GameEventBufferType_GameEventBufferType_ARRAYSIZE = GameEventBuffer_GameEventBufferType_GameEventBufferType_MAX + 1; const ::google::protobuf::EnumDescriptor* GameEventBuffer_GameEventBufferType_descriptor(); inline const ::std::string& GameEventBuffer_GameEventBufferType_Name(GameEventBuffer_GameEventBufferType value) { return ::google::protobuf::internal::NameOfEnum( GameEventBuffer_GameEventBufferType_descriptor(), value); } inline bool GameEventBuffer_GameEventBufferType_Parse( const ::std::string& name, GameEventBuffer_GameEventBufferType* value) { return ::google::protobuf::internal::ParseNamedEnum<GameEventBuffer_GameEventBufferType>( GameEventBuffer_GameEventBufferType_descriptor(), name, value); } // =================================================================== class JoinSecurityGameEventBuffer : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:redhatgamedev.srt.JoinSecurityGameEventBuffer) */ { public: JoinSecurityGameEventBuffer(); virtual ~JoinSecurityGameEventBuffer(); JoinSecurityGameEventBuffer(const JoinSecurityGameEventBuffer& from); inline JoinSecurityGameEventBuffer& operator=(const JoinSecurityGameEventBuffer& from) { CopyFrom(from); return *this; } #if LANG_CXX11 JoinSecurityGameEventBuffer(JoinSecurityGameEventBuffer&& from) noexcept : JoinSecurityGameEventBuffer() { *this = ::std::move(from); } inline JoinSecurityGameEventBuffer& operator=(JoinSecurityGameEventBuffer&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const JoinSecurityGameEventBuffer& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const JoinSecurityGameEventBuffer* internal_default_instance() { return reinterpret_cast<const JoinSecurityGameEventBuffer*>( &_JoinSecurityGameEventBuffer_default_instance_); } static constexpr int kIndexInFileMessages = 0; void Swap(JoinSecurityGameEventBuffer* other); friend void swap(JoinSecurityGameEventBuffer& a, JoinSecurityGameEventBuffer& b) { a.Swap(&b); } // implements Message ---------------------------------------------- inline JoinSecurityGameEventBuffer* New() const final { return CreateMaybeMessage<JoinSecurityGameEventBuffer>(NULL); } JoinSecurityGameEventBuffer* New(::google::protobuf::Arena* arena) const final { return CreateMaybeMessage<JoinSecurityGameEventBuffer>(arena); } void CopyFrom(const ::google::protobuf::Message& from) final; void MergeFrom(const ::google::protobuf::Message& from) final; void CopyFrom(const JoinSecurityGameEventBuffer& from); void MergeFrom(const JoinSecurityGameEventBuffer& from); void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) final; void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const final; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(JoinSecurityGameEventBuffer* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline void* MaybeArenaPtr() const { return NULL; } public: ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required string UUID = 1; bool has_uuid() const; void clear_uuid(); static const int kUUIDFieldNumber = 1; const ::std::string& uuid() const; void set_uuid(const ::std::string& value); #if LANG_CXX11 void set_uuid(::std::string&& value); #endif void set_uuid(const char* value); void set_uuid(const char* value, size_t size); ::std::string* mutable_uuid(); ::std::string* release_uuid(); void set_allocated_uuid(::std::string* uuid); // @@protoc_insertion_point(class_scope:redhatgamedev.srt.JoinSecurityGameEventBuffer) private: void set_has_uuid(); void clear_has_uuid(); ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::internal::ArenaStringPtr uuid_; friend struct ::protobuf_GameEventBuffer_2eproto::TableStruct; }; // ------------------------------------------------------------------- class LeaveSecurityGameEventBuffer : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:redhatgamedev.srt.LeaveSecurityGameEventBuffer) */ { public: LeaveSecurityGameEventBuffer(); virtual ~LeaveSecurityGameEventBuffer(); LeaveSecurityGameEventBuffer(const LeaveSecurityGameEventBuffer& from); inline LeaveSecurityGameEventBuffer& operator=(const LeaveSecurityGameEventBuffer& from) { CopyFrom(from); return *this; } #if LANG_CXX11 LeaveSecurityGameEventBuffer(LeaveSecurityGameEventBuffer&& from) noexcept : LeaveSecurityGameEventBuffer() { *this = ::std::move(from); } inline LeaveSecurityGameEventBuffer& operator=(LeaveSecurityGameEventBuffer&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const LeaveSecurityGameEventBuffer& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const LeaveSecurityGameEventBuffer* internal_default_instance() { return reinterpret_cast<const LeaveSecurityGameEventBuffer*>( &_LeaveSecurityGameEventBuffer_default_instance_); } static constexpr int kIndexInFileMessages = 1; void Swap(LeaveSecurityGameEventBuffer* other); friend void swap(LeaveSecurityGameEventBuffer& a, LeaveSecurityGameEventBuffer& b) { a.Swap(&b); } // implements Message ---------------------------------------------- inline LeaveSecurityGameEventBuffer* New() const final { return CreateMaybeMessage<LeaveSecurityGameEventBuffer>(NULL); } LeaveSecurityGameEventBuffer* New(::google::protobuf::Arena* arena) const final { return CreateMaybeMessage<LeaveSecurityGameEventBuffer>(arena); } void CopyFrom(const ::google::protobuf::Message& from) final; void MergeFrom(const ::google::protobuf::Message& from) final; void CopyFrom(const LeaveSecurityGameEventBuffer& from); void MergeFrom(const LeaveSecurityGameEventBuffer& from); void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) final; void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const final; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(LeaveSecurityGameEventBuffer* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline void* MaybeArenaPtr() const { return NULL; } public: ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // required string UUID = 1; bool has_uuid() const; void clear_uuid(); static const int kUUIDFieldNumber = 1; const ::std::string& uuid() const; void set_uuid(const ::std::string& value); #if LANG_CXX11 void set_uuid(::std::string&& value); #endif void set_uuid(const char* value); void set_uuid(const char* value, size_t size); ::std::string* mutable_uuid(); ::std::string* release_uuid(); void set_allocated_uuid(::std::string* uuid); // @@protoc_insertion_point(class_scope:redhatgamedev.srt.LeaveSecurityGameEventBuffer) private: void set_has_uuid(); void clear_has_uuid(); ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::internal::ArenaStringPtr uuid_; friend struct ::protobuf_GameEventBuffer_2eproto::TableStruct; }; // ------------------------------------------------------------------- class SecurityGameEventBuffer : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:redhatgamedev.srt.SecurityGameEventBuffer) */ { public: SecurityGameEventBuffer(); virtual ~SecurityGameEventBuffer(); SecurityGameEventBuffer(const SecurityGameEventBuffer& from); inline SecurityGameEventBuffer& operator=(const SecurityGameEventBuffer& from) { CopyFrom(from); return *this; } #if LANG_CXX11 SecurityGameEventBuffer(SecurityGameEventBuffer&& from) noexcept : SecurityGameEventBuffer() { *this = ::std::move(from); } inline SecurityGameEventBuffer& operator=(SecurityGameEventBuffer&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const SecurityGameEventBuffer& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const SecurityGameEventBuffer* internal_default_instance() { return reinterpret_cast<const SecurityGameEventBuffer*>( &_SecurityGameEventBuffer_default_instance_); } static constexpr int kIndexInFileMessages = 2; void Swap(SecurityGameEventBuffer* other); friend void swap(SecurityGameEventBuffer& a, SecurityGameEventBuffer& b) { a.Swap(&b); } // implements Message ---------------------------------------------- inline SecurityGameEventBuffer* New() const final { return CreateMaybeMessage<SecurityGameEventBuffer>(NULL); } SecurityGameEventBuffer* New(::google::protobuf::Arena* arena) const final { return CreateMaybeMessage<SecurityGameEventBuffer>(arena); } void CopyFrom(const ::google::protobuf::Message& from) final; void MergeFrom(const ::google::protobuf::Message& from) final; void CopyFrom(const SecurityGameEventBuffer& from); void MergeFrom(const SecurityGameEventBuffer& from); void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) final; void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const final; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(SecurityGameEventBuffer* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline void* MaybeArenaPtr() const { return NULL; } public: ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- typedef SecurityGameEventBuffer_SecurityGameEventBufferType SecurityGameEventBufferType; static const SecurityGameEventBufferType UNKNOWN = SecurityGameEventBuffer_SecurityGameEventBufferType_UNKNOWN; static const SecurityGameEventBufferType JOIN = SecurityGameEventBuffer_SecurityGameEventBufferType_JOIN; static const SecurityGameEventBufferType LEAVE = SecurityGameEventBuffer_SecurityGameEventBufferType_LEAVE; static inline bool SecurityGameEventBufferType_IsValid(int value) { return SecurityGameEventBuffer_SecurityGameEventBufferType_IsValid(value); } static const SecurityGameEventBufferType SecurityGameEventBufferType_MIN = SecurityGameEventBuffer_SecurityGameEventBufferType_SecurityGameEventBufferType_MIN; static const SecurityGameEventBufferType SecurityGameEventBufferType_MAX = SecurityGameEventBuffer_SecurityGameEventBufferType_SecurityGameEventBufferType_MAX; static const int SecurityGameEventBufferType_ARRAYSIZE = SecurityGameEventBuffer_SecurityGameEventBufferType_SecurityGameEventBufferType_ARRAYSIZE; static inline const ::google::protobuf::EnumDescriptor* SecurityGameEventBufferType_descriptor() { return SecurityGameEventBuffer_SecurityGameEventBufferType_descriptor(); } static inline const ::std::string& SecurityGameEventBufferType_Name(SecurityGameEventBufferType value) { return SecurityGameEventBuffer_SecurityGameEventBufferType_Name(value); } static inline bool SecurityGameEventBufferType_Parse(const ::std::string& name, SecurityGameEventBufferType* value) { return SecurityGameEventBuffer_SecurityGameEventBufferType_Parse(name, value); } // accessors ------------------------------------------------------- // optional .redhatgamedev.srt.JoinSecurityGameEventBuffer joinSecurityGameEventBuffer = 3; bool has_joinsecuritygameeventbuffer() const; void clear_joinsecuritygameeventbuffer(); static const int kJoinSecurityGameEventBufferFieldNumber = 3; private: const ::redhatgamedev::srt::JoinSecurityGameEventBuffer& _internal_joinsecuritygameeventbuffer() const; public: const ::redhatgamedev::srt::JoinSecurityGameEventBuffer& joinsecuritygameeventbuffer() const; ::redhatgamedev::srt::JoinSecurityGameEventBuffer* release_joinsecuritygameeventbuffer(); ::redhatgamedev::srt::JoinSecurityGameEventBuffer* mutable_joinsecuritygameeventbuffer(); void set_allocated_joinsecuritygameeventbuffer(::redhatgamedev::srt::JoinSecurityGameEventBuffer* joinsecuritygameeventbuffer); // optional .redhatgamedev.srt.LeaveSecurityGameEventBuffer leaveSecurityGameEventBuffer = 4; bool has_leavesecuritygameeventbuffer() const; void clear_leavesecuritygameeventbuffer(); static const int kLeaveSecurityGameEventBufferFieldNumber = 4; private: const ::redhatgamedev::srt::LeaveSecurityGameEventBuffer& _internal_leavesecuritygameeventbuffer() const; public: const ::redhatgamedev::srt::LeaveSecurityGameEventBuffer& leavesecuritygameeventbuffer() const; ::redhatgamedev::srt::LeaveSecurityGameEventBuffer* release_leavesecuritygameeventbuffer(); ::redhatgamedev::srt::LeaveSecurityGameEventBuffer* mutable_leavesecuritygameeventbuffer(); void set_allocated_leavesecuritygameeventbuffer(::redhatgamedev::srt::LeaveSecurityGameEventBuffer* leavesecuritygameeventbuffer); // required .redhatgamedev.srt.SecurityGameEventBuffer.SecurityGameEventBufferType type = 1 [default = UNKNOWN]; bool has_type() const; void clear_type(); static const int kTypeFieldNumber = 1; ::redhatgamedev::srt::SecurityGameEventBuffer_SecurityGameEventBufferType type() const; void set_type(::redhatgamedev::srt::SecurityGameEventBuffer_SecurityGameEventBufferType value); // @@protoc_insertion_point(class_scope:redhatgamedev.srt.SecurityGameEventBuffer) private: void set_has_type(); void clear_has_type(); void set_has_joinsecuritygameeventbuffer(); void clear_has_joinsecuritygameeventbuffer(); void set_has_leavesecuritygameeventbuffer(); void clear_has_leavesecuritygameeventbuffer(); ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::redhatgamedev::srt::JoinSecurityGameEventBuffer* joinsecuritygameeventbuffer_; ::redhatgamedev::srt::LeaveSecurityGameEventBuffer* leavesecuritygameeventbuffer_; int type_; friend struct ::protobuf_GameEventBuffer_2eproto::TableStruct; }; // ------------------------------------------------------------------- class GameEventBuffer : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:redhatgamedev.srt.GameEventBuffer) */ { public: GameEventBuffer(); virtual ~GameEventBuffer(); GameEventBuffer(const GameEventBuffer& from); inline GameEventBuffer& operator=(const GameEventBuffer& from) { CopyFrom(from); return *this; } #if LANG_CXX11 GameEventBuffer(GameEventBuffer&& from) noexcept : GameEventBuffer() { *this = ::std::move(from); } inline GameEventBuffer& operator=(GameEventBuffer&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { return _internal_metadata_.unknown_fields(); } inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { return _internal_metadata_.mutable_unknown_fields(); } static const ::google::protobuf::Descriptor* descriptor(); static const GameEventBuffer& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const GameEventBuffer* internal_default_instance() { return reinterpret_cast<const GameEventBuffer*>( &_GameEventBuffer_default_instance_); } static constexpr int kIndexInFileMessages = 3; void Swap(GameEventBuffer* other); friend void swap(GameEventBuffer& a, GameEventBuffer& b) { a.Swap(&b); } // implements Message ---------------------------------------------- inline GameEventBuffer* New() const final { return CreateMaybeMessage<GameEventBuffer>(NULL); } GameEventBuffer* New(::google::protobuf::Arena* arena) const final { return CreateMaybeMessage<GameEventBuffer>(arena); } void CopyFrom(const ::google::protobuf::Message& from) final; void MergeFrom(const ::google::protobuf::Message& from) final; void CopyFrom(const GameEventBuffer& from); void MergeFrom(const GameEventBuffer& from); void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) final; void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const final; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(GameEventBuffer* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline void* MaybeArenaPtr() const { return NULL; } public: ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- typedef GameEventBuffer_GameEventBufferType GameEventBufferType; static const GameEventBufferType UNKNOWN = GameEventBuffer_GameEventBufferType_UNKNOWN; static const GameEventBufferType ENTITY = GameEventBuffer_GameEventBufferType_ENTITY; static const GameEventBufferType SECURITY = GameEventBuffer_GameEventBufferType_SECURITY; static inline bool GameEventBufferType_IsValid(int value) { return GameEventBuffer_GameEventBufferType_IsValid(value); } static const GameEventBufferType GameEventBufferType_MIN = GameEventBuffer_GameEventBufferType_GameEventBufferType_MIN; static const GameEventBufferType GameEventBufferType_MAX = GameEventBuffer_GameEventBufferType_GameEventBufferType_MAX; static const int GameEventBufferType_ARRAYSIZE = GameEventBuffer_GameEventBufferType_GameEventBufferType_ARRAYSIZE; static inline const ::google::protobuf::EnumDescriptor* GameEventBufferType_descriptor() { return GameEventBuffer_GameEventBufferType_descriptor(); } static inline const ::std::string& GameEventBufferType_Name(GameEventBufferType value) { return GameEventBuffer_GameEventBufferType_Name(value); } static inline bool GameEventBufferType_Parse(const ::std::string& name, GameEventBufferType* value) { return GameEventBuffer_GameEventBufferType_Parse(name, value); } // accessors ------------------------------------------------------- // optional .redhatgamedev.srt.EntityGameEventBuffer entityGameEventBuffer = 2; bool has_entitygameeventbuffer() const; void clear_entitygameeventbuffer(); static const int kEntityGameEventBufferFieldNumber = 2; private: const ::redhatgamedev::srt::EntityGameEventBuffer& _internal_entitygameeventbuffer() const; public: const ::redhatgamedev::srt::EntityGameEventBuffer& entitygameeventbuffer() const; ::redhatgamedev::srt::EntityGameEventBuffer* release_entitygameeventbuffer(); ::redhatgamedev::srt::EntityGameEventBuffer* mutable_entitygameeventbuffer(); void set_allocated_entitygameeventbuffer(::redhatgamedev::srt::EntityGameEventBuffer* entitygameeventbuffer); // optional .redhatgamedev.srt.SecurityGameEventBuffer securityGameEventBuffer = 3; bool has_securitygameeventbuffer() const; void clear_securitygameeventbuffer(); static const int kSecurityGameEventBufferFieldNumber = 3; private: const ::redhatgamedev::srt::SecurityGameEventBuffer& _internal_securitygameeventbuffer() const; public: const ::redhatgamedev::srt::SecurityGameEventBuffer& securitygameeventbuffer() const; ::redhatgamedev::srt::SecurityGameEventBuffer* release_securitygameeventbuffer(); ::redhatgamedev::srt::SecurityGameEventBuffer* mutable_securitygameeventbuffer(); void set_allocated_securitygameeventbuffer(::redhatgamedev::srt::SecurityGameEventBuffer* securitygameeventbuffer); // required .redhatgamedev.srt.GameEventBuffer.GameEventBufferType type = 1 [default = UNKNOWN]; bool has_type() const; void clear_type(); static const int kTypeFieldNumber = 1; ::redhatgamedev::srt::GameEventBuffer_GameEventBufferType type() const; void set_type(::redhatgamedev::srt::GameEventBuffer_GameEventBufferType value); // @@protoc_insertion_point(class_scope:redhatgamedev.srt.GameEventBuffer) private: void set_has_type(); void clear_has_type(); void set_has_entitygameeventbuffer(); void clear_has_entitygameeventbuffer(); void set_has_securitygameeventbuffer(); void clear_has_securitygameeventbuffer(); ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::redhatgamedev::srt::EntityGameEventBuffer* entitygameeventbuffer_; ::redhatgamedev::srt::SecurityGameEventBuffer* securitygameeventbuffer_; int type_; friend struct ::protobuf_GameEventBuffer_2eproto::TableStruct; }; // =================================================================== // =================================================================== #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif // __GNUC__ // JoinSecurityGameEventBuffer // required string UUID = 1; inline bool JoinSecurityGameEventBuffer::has_uuid() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void JoinSecurityGameEventBuffer::set_has_uuid() { _has_bits_[0] |= 0x00000001u; } inline void JoinSecurityGameEventBuffer::clear_has_uuid() { _has_bits_[0] &= ~0x00000001u; } inline void JoinSecurityGameEventBuffer::clear_uuid() { uuid_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); clear_has_uuid(); } inline const ::std::string& JoinSecurityGameEventBuffer::uuid() const { // @@protoc_insertion_point(field_get:redhatgamedev.srt.JoinSecurityGameEventBuffer.UUID) return uuid_.GetNoArena(); } inline void JoinSecurityGameEventBuffer::set_uuid(const ::std::string& value) { set_has_uuid(); uuid_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:redhatgamedev.srt.JoinSecurityGameEventBuffer.UUID) } #if LANG_CXX11 inline void JoinSecurityGameEventBuffer::set_uuid(::std::string&& value) { set_has_uuid(); uuid_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:redhatgamedev.srt.JoinSecurityGameEventBuffer.UUID) } #endif inline void JoinSecurityGameEventBuffer::set_uuid(const char* value) { GOOGLE_DCHECK(value != NULL); set_has_uuid(); uuid_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:redhatgamedev.srt.JoinSecurityGameEventBuffer.UUID) } inline void JoinSecurityGameEventBuffer::set_uuid(const char* value, size_t size) { set_has_uuid(); uuid_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast<const char*>(value), size)); // @@protoc_insertion_point(field_set_pointer:redhatgamedev.srt.JoinSecurityGameEventBuffer.UUID) } inline ::std::string* JoinSecurityGameEventBuffer::mutable_uuid() { set_has_uuid(); // @@protoc_insertion_point(field_mutable:redhatgamedev.srt.JoinSecurityGameEventBuffer.UUID) return uuid_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* JoinSecurityGameEventBuffer::release_uuid() { // @@protoc_insertion_point(field_release:redhatgamedev.srt.JoinSecurityGameEventBuffer.UUID) if (!has_uuid()) { return NULL; } clear_has_uuid(); return uuid_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void JoinSecurityGameEventBuffer::set_allocated_uuid(::std::string* uuid) { if (uuid != NULL) { set_has_uuid(); } else { clear_has_uuid(); } uuid_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), uuid); // @@protoc_insertion_point(field_set_allocated:redhatgamedev.srt.JoinSecurityGameEventBuffer.UUID) } // ------------------------------------------------------------------- // LeaveSecurityGameEventBuffer // required string UUID = 1; inline bool LeaveSecurityGameEventBuffer::has_uuid() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void LeaveSecurityGameEventBuffer::set_has_uuid() { _has_bits_[0] |= 0x00000001u; } inline void LeaveSecurityGameEventBuffer::clear_has_uuid() { _has_bits_[0] &= ~0x00000001u; } inline void LeaveSecurityGameEventBuffer::clear_uuid() { uuid_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); clear_has_uuid(); } inline const ::std::string& LeaveSecurityGameEventBuffer::uuid() const { // @@protoc_insertion_point(field_get:redhatgamedev.srt.LeaveSecurityGameEventBuffer.UUID) return uuid_.GetNoArena(); } inline void LeaveSecurityGameEventBuffer::set_uuid(const ::std::string& value) { set_has_uuid(); uuid_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:redhatgamedev.srt.LeaveSecurityGameEventBuffer.UUID) } #if LANG_CXX11 inline void LeaveSecurityGameEventBuffer::set_uuid(::std::string&& value) { set_has_uuid(); uuid_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:redhatgamedev.srt.LeaveSecurityGameEventBuffer.UUID) } #endif inline void LeaveSecurityGameEventBuffer::set_uuid(const char* value) { GOOGLE_DCHECK(value != NULL); set_has_uuid(); uuid_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:redhatgamedev.srt.LeaveSecurityGameEventBuffer.UUID) } inline void LeaveSecurityGameEventBuffer::set_uuid(const char* value, size_t size) { set_has_uuid(); uuid_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast<const char*>(value), size)); // @@protoc_insertion_point(field_set_pointer:redhatgamedev.srt.LeaveSecurityGameEventBuffer.UUID) } inline ::std::string* LeaveSecurityGameEventBuffer::mutable_uuid() { set_has_uuid(); // @@protoc_insertion_point(field_mutable:redhatgamedev.srt.LeaveSecurityGameEventBuffer.UUID) return uuid_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* LeaveSecurityGameEventBuffer::release_uuid() { // @@protoc_insertion_point(field_release:redhatgamedev.srt.LeaveSecurityGameEventBuffer.UUID) if (!has_uuid()) { return NULL; } clear_has_uuid(); return uuid_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void LeaveSecurityGameEventBuffer::set_allocated_uuid(::std::string* uuid) { if (uuid != NULL) { set_has_uuid(); } else { clear_has_uuid(); } uuid_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), uuid); // @@protoc_insertion_point(field_set_allocated:redhatgamedev.srt.LeaveSecurityGameEventBuffer.UUID) } // ------------------------------------------------------------------- // SecurityGameEventBuffer // required .redhatgamedev.srt.SecurityGameEventBuffer.SecurityGameEventBufferType type = 1 [default = UNKNOWN]; inline bool SecurityGameEventBuffer::has_type() const { return (_has_bits_[0] & 0x00000004u) != 0; } inline void SecurityGameEventBuffer::set_has_type() { _has_bits_[0] |= 0x00000004u; } inline void SecurityGameEventBuffer::clear_has_type() { _has_bits_[0] &= ~0x00000004u; } inline void SecurityGameEventBuffer::clear_type() { type_ = 0; clear_has_type(); } inline ::redhatgamedev::srt::SecurityGameEventBuffer_SecurityGameEventBufferType SecurityGameEventBuffer::type() const { // @@protoc_insertion_point(field_get:redhatgamedev.srt.SecurityGameEventBuffer.type) return static_cast< ::redhatgamedev::srt::SecurityGameEventBuffer_SecurityGameEventBufferType >(type_); } inline void SecurityGameEventBuffer::set_type(::redhatgamedev::srt::SecurityGameEventBuffer_SecurityGameEventBufferType value) { assert(::redhatgamedev::srt::SecurityGameEventBuffer_SecurityGameEventBufferType_IsValid(value)); set_has_type(); type_ = value; // @@protoc_insertion_point(field_set:redhatgamedev.srt.SecurityGameEventBuffer.type) } // optional .redhatgamedev.srt.JoinSecurityGameEventBuffer joinSecurityGameEventBuffer = 3; inline bool SecurityGameEventBuffer::has_joinsecuritygameeventbuffer() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void SecurityGameEventBuffer::set_has_joinsecuritygameeventbuffer() { _has_bits_[0] |= 0x00000001u; } inline void SecurityGameEventBuffer::clear_has_joinsecuritygameeventbuffer() { _has_bits_[0] &= ~0x00000001u; } inline void SecurityGameEventBuffer::clear_joinsecuritygameeventbuffer() { if (joinsecuritygameeventbuffer_ != NULL) joinsecuritygameeventbuffer_->Clear(); clear_has_joinsecuritygameeventbuffer(); } inline const ::redhatgamedev::srt::JoinSecurityGameEventBuffer& SecurityGameEventBuffer::_internal_joinsecuritygameeventbuffer() const { return *joinsecuritygameeventbuffer_; } inline const ::redhatgamedev::srt::JoinSecurityGameEventBuffer& SecurityGameEventBuffer::joinsecuritygameeventbuffer() const { const ::redhatgamedev::srt::JoinSecurityGameEventBuffer* p = joinsecuritygameeventbuffer_; // @@protoc_insertion_point(field_get:redhatgamedev.srt.SecurityGameEventBuffer.joinSecurityGameEventBuffer) return p != NULL ? *p : *reinterpret_cast<const ::redhatgamedev::srt::JoinSecurityGameEventBuffer*>( &::redhatgamedev::srt::_JoinSecurityGameEventBuffer_default_instance_); } inline ::redhatgamedev::srt::JoinSecurityGameEventBuffer* SecurityGameEventBuffer::release_joinsecuritygameeventbuffer() { // @@protoc_insertion_point(field_release:redhatgamedev.srt.SecurityGameEventBuffer.joinSecurityGameEventBuffer) clear_has_joinsecuritygameeventbuffer(); ::redhatgamedev::srt::JoinSecurityGameEventBuffer* temp = joinsecuritygameeventbuffer_; joinsecuritygameeventbuffer_ = NULL; return temp; } inline ::redhatgamedev::srt::JoinSecurityGameEventBuffer* SecurityGameEventBuffer::mutable_joinsecuritygameeventbuffer() { set_has_joinsecuritygameeventbuffer(); if (joinsecuritygameeventbuffer_ == NULL) { auto* p = CreateMaybeMessage<::redhatgamedev::srt::JoinSecurityGameEventBuffer>(GetArenaNoVirtual()); joinsecuritygameeventbuffer_ = p; } // @@protoc_insertion_point(field_mutable:redhatgamedev.srt.SecurityGameEventBuffer.joinSecurityGameEventBuffer) return joinsecuritygameeventbuffer_; } inline void SecurityGameEventBuffer::set_allocated_joinsecuritygameeventbuffer(::redhatgamedev::srt::JoinSecurityGameEventBuffer* joinsecuritygameeventbuffer) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete joinsecuritygameeventbuffer_; } if (joinsecuritygameeventbuffer) { ::google::protobuf::Arena* submessage_arena = NULL; if (message_arena != submessage_arena) { joinsecuritygameeventbuffer = ::google::protobuf::internal::GetOwnedMessage( message_arena, joinsecuritygameeventbuffer, submessage_arena); } set_has_joinsecuritygameeventbuffer(); } else { clear_has_joinsecuritygameeventbuffer(); } joinsecuritygameeventbuffer_ = joinsecuritygameeventbuffer; // @@protoc_insertion_point(field_set_allocated:redhatgamedev.srt.SecurityGameEventBuffer.joinSecurityGameEventBuffer) } // optional .redhatgamedev.srt.LeaveSecurityGameEventBuffer leaveSecurityGameEventBuffer = 4; inline bool SecurityGameEventBuffer::has_leavesecuritygameeventbuffer() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void SecurityGameEventBuffer::set_has_leavesecuritygameeventbuffer() { _has_bits_[0] |= 0x00000002u; } inline void SecurityGameEventBuffer::clear_has_leavesecuritygameeventbuffer() { _has_bits_[0] &= ~0x00000002u; } inline void SecurityGameEventBuffer::clear_leavesecuritygameeventbuffer() { if (leavesecuritygameeventbuffer_ != NULL) leavesecuritygameeventbuffer_->Clear(); clear_has_leavesecuritygameeventbuffer(); } inline const ::redhatgamedev::srt::LeaveSecurityGameEventBuffer& SecurityGameEventBuffer::_internal_leavesecuritygameeventbuffer() const { return *leavesecuritygameeventbuffer_; } inline const ::redhatgamedev::srt::LeaveSecurityGameEventBuffer& SecurityGameEventBuffer::leavesecuritygameeventbuffer() const { const ::redhatgamedev::srt::LeaveSecurityGameEventBuffer* p = leavesecuritygameeventbuffer_; // @@protoc_insertion_point(field_get:redhatgamedev.srt.SecurityGameEventBuffer.leaveSecurityGameEventBuffer) return p != NULL ? *p : *reinterpret_cast<const ::redhatgamedev::srt::LeaveSecurityGameEventBuffer*>( &::redhatgamedev::srt::_LeaveSecurityGameEventBuffer_default_instance_); } inline ::redhatgamedev::srt::LeaveSecurityGameEventBuffer* SecurityGameEventBuffer::release_leavesecuritygameeventbuffer() { // @@protoc_insertion_point(field_release:redhatgamedev.srt.SecurityGameEventBuffer.leaveSecurityGameEventBuffer) clear_has_leavesecuritygameeventbuffer(); ::redhatgamedev::srt::LeaveSecurityGameEventBuffer* temp = leavesecuritygameeventbuffer_; leavesecuritygameeventbuffer_ = NULL; return temp; } inline ::redhatgamedev::srt::LeaveSecurityGameEventBuffer* SecurityGameEventBuffer::mutable_leavesecuritygameeventbuffer() { set_has_leavesecuritygameeventbuffer(); if (leavesecuritygameeventbuffer_ == NULL) { auto* p = CreateMaybeMessage<::redhatgamedev::srt::LeaveSecurityGameEventBuffer>(GetArenaNoVirtual()); leavesecuritygameeventbuffer_ = p; } // @@protoc_insertion_point(field_mutable:redhatgamedev.srt.SecurityGameEventBuffer.leaveSecurityGameEventBuffer) return leavesecuritygameeventbuffer_; } inline void SecurityGameEventBuffer::set_allocated_leavesecuritygameeventbuffer(::redhatgamedev::srt::LeaveSecurityGameEventBuffer* leavesecuritygameeventbuffer) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete leavesecuritygameeventbuffer_; } if (leavesecuritygameeventbuffer) { ::google::protobuf::Arena* submessage_arena = NULL; if (message_arena != submessage_arena) { leavesecuritygameeventbuffer = ::google::protobuf::internal::GetOwnedMessage( message_arena, leavesecuritygameeventbuffer, submessage_arena); } set_has_leavesecuritygameeventbuffer(); } else { clear_has_leavesecuritygameeventbuffer(); } leavesecuritygameeventbuffer_ = leavesecuritygameeventbuffer; // @@protoc_insertion_point(field_set_allocated:redhatgamedev.srt.SecurityGameEventBuffer.leaveSecurityGameEventBuffer) } // ------------------------------------------------------------------- // GameEventBuffer // required .redhatgamedev.srt.GameEventBuffer.GameEventBufferType type = 1 [default = UNKNOWN]; inline bool GameEventBuffer::has_type() const { return (_has_bits_[0] & 0x00000004u) != 0; } inline void GameEventBuffer::set_has_type() { _has_bits_[0] |= 0x00000004u; } inline void GameEventBuffer::clear_has_type() { _has_bits_[0] &= ~0x00000004u; } inline void GameEventBuffer::clear_type() { type_ = 0; clear_has_type(); } inline ::redhatgamedev::srt::GameEventBuffer_GameEventBufferType GameEventBuffer::type() const { // @@protoc_insertion_point(field_get:redhatgamedev.srt.GameEventBuffer.type) return static_cast< ::redhatgamedev::srt::GameEventBuffer_GameEventBufferType >(type_); } inline void GameEventBuffer::set_type(::redhatgamedev::srt::GameEventBuffer_GameEventBufferType value) { assert(::redhatgamedev::srt::GameEventBuffer_GameEventBufferType_IsValid(value)); set_has_type(); type_ = value; // @@protoc_insertion_point(field_set:redhatgamedev.srt.GameEventBuffer.type) } // optional .redhatgamedev.srt.EntityGameEventBuffer entityGameEventBuffer = 2; inline bool GameEventBuffer::has_entitygameeventbuffer() const { return (_has_bits_[0] & 0x00000001u) != 0; } inline void GameEventBuffer::set_has_entitygameeventbuffer() { _has_bits_[0] |= 0x00000001u; } inline void GameEventBuffer::clear_has_entitygameeventbuffer() { _has_bits_[0] &= ~0x00000001u; } inline const ::redhatgamedev::srt::EntityGameEventBuffer& GameEventBuffer::_internal_entitygameeventbuffer() const { return *entitygameeventbuffer_; } inline const ::redhatgamedev::srt::EntityGameEventBuffer& GameEventBuffer::entitygameeventbuffer() const { const ::redhatgamedev::srt::EntityGameEventBuffer* p = entitygameeventbuffer_; // @@protoc_insertion_point(field_get:redhatgamedev.srt.GameEventBuffer.entityGameEventBuffer) return p != NULL ? *p : *reinterpret_cast<const ::redhatgamedev::srt::EntityGameEventBuffer*>( &::redhatgamedev::srt::_EntityGameEventBuffer_default_instance_); } inline ::redhatgamedev::srt::EntityGameEventBuffer* GameEventBuffer::release_entitygameeventbuffer() { // @@protoc_insertion_point(field_release:redhatgamedev.srt.GameEventBuffer.entityGameEventBuffer) clear_has_entitygameeventbuffer(); ::redhatgamedev::srt::EntityGameEventBuffer* temp = entitygameeventbuffer_; entitygameeventbuffer_ = NULL; return temp; } inline ::redhatgamedev::srt::EntityGameEventBuffer* GameEventBuffer::mutable_entitygameeventbuffer() { set_has_entitygameeventbuffer(); if (entitygameeventbuffer_ == NULL) { auto* p = CreateMaybeMessage<::redhatgamedev::srt::EntityGameEventBuffer>(GetArenaNoVirtual()); entitygameeventbuffer_ = p; } // @@protoc_insertion_point(field_mutable:redhatgamedev.srt.GameEventBuffer.entityGameEventBuffer) return entitygameeventbuffer_; } inline void GameEventBuffer::set_allocated_entitygameeventbuffer(::redhatgamedev::srt::EntityGameEventBuffer* entitygameeventbuffer) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(entitygameeventbuffer_); } if (entitygameeventbuffer) { ::google::protobuf::Arena* submessage_arena = NULL; if (message_arena != submessage_arena) { entitygameeventbuffer = ::google::protobuf::internal::GetOwnedMessage( message_arena, entitygameeventbuffer, submessage_arena); } set_has_entitygameeventbuffer(); } else { clear_has_entitygameeventbuffer(); } entitygameeventbuffer_ = entitygameeventbuffer; // @@protoc_insertion_point(field_set_allocated:redhatgamedev.srt.GameEventBuffer.entityGameEventBuffer) } // optional .redhatgamedev.srt.SecurityGameEventBuffer securityGameEventBuffer = 3; inline bool GameEventBuffer::has_securitygameeventbuffer() const { return (_has_bits_[0] & 0x00000002u) != 0; } inline void GameEventBuffer::set_has_securitygameeventbuffer() { _has_bits_[0] |= 0x00000002u; } inline void GameEventBuffer::clear_has_securitygameeventbuffer() { _has_bits_[0] &= ~0x00000002u; } inline void GameEventBuffer::clear_securitygameeventbuffer() { if (securitygameeventbuffer_ != NULL) securitygameeventbuffer_->Clear(); clear_has_securitygameeventbuffer(); } inline const ::redhatgamedev::srt::SecurityGameEventBuffer& GameEventBuffer::_internal_securitygameeventbuffer() const { return *securitygameeventbuffer_; } inline const ::redhatgamedev::srt::SecurityGameEventBuffer& GameEventBuffer::securitygameeventbuffer() const { const ::redhatgamedev::srt::SecurityGameEventBuffer* p = securitygameeventbuffer_; // @@protoc_insertion_point(field_get:redhatgamedev.srt.GameEventBuffer.securityGameEventBuffer) return p != NULL ? *p : *reinterpret_cast<const ::redhatgamedev::srt::SecurityGameEventBuffer*>( &::redhatgamedev::srt::_SecurityGameEventBuffer_default_instance_); } inline ::redhatgamedev::srt::SecurityGameEventBuffer* GameEventBuffer::release_securitygameeventbuffer() { // @@protoc_insertion_point(field_release:redhatgamedev.srt.GameEventBuffer.securityGameEventBuffer) clear_has_securitygameeventbuffer(); ::redhatgamedev::srt::SecurityGameEventBuffer* temp = securitygameeventbuffer_; securitygameeventbuffer_ = NULL; return temp; } inline ::redhatgamedev::srt::SecurityGameEventBuffer* GameEventBuffer::mutable_securitygameeventbuffer() { set_has_securitygameeventbuffer(); if (securitygameeventbuffer_ == NULL) { auto* p = CreateMaybeMessage<::redhatgamedev::srt::SecurityGameEventBuffer>(GetArenaNoVirtual()); securitygameeventbuffer_ = p; } // @@protoc_insertion_point(field_mutable:redhatgamedev.srt.GameEventBuffer.securityGameEventBuffer) return securitygameeventbuffer_; } inline void GameEventBuffer::set_allocated_securitygameeventbuffer(::redhatgamedev::srt::SecurityGameEventBuffer* securitygameeventbuffer) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete securitygameeventbuffer_; } if (securitygameeventbuffer) { ::google::protobuf::Arena* submessage_arena = NULL; if (message_arena != submessage_arena) { securitygameeventbuffer = ::google::protobuf::internal::GetOwnedMessage( message_arena, securitygameeventbuffer, submessage_arena); } set_has_securitygameeventbuffer(); } else { clear_has_securitygameeventbuffer(); } securitygameeventbuffer_ = securitygameeventbuffer; // @@protoc_insertion_point(field_set_allocated:redhatgamedev.srt.GameEventBuffer.securityGameEventBuffer) } #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- // @@protoc_insertion_point(namespace_scope) } // namespace srt } // namespace redhatgamedev namespace google { namespace protobuf { template <> struct is_proto_enum< ::redhatgamedev::srt::SecurityGameEventBuffer_SecurityGameEventBufferType> : ::std::true_type {}; template <> inline const EnumDescriptor* GetEnumDescriptor< ::redhatgamedev::srt::SecurityGameEventBuffer_SecurityGameEventBufferType>() { return ::redhatgamedev::srt::SecurityGameEventBuffer_SecurityGameEventBufferType_descriptor(); } template <> struct is_proto_enum< ::redhatgamedev::srt::GameEventBuffer_GameEventBufferType> : ::std::true_type {}; template <> inline const EnumDescriptor* GetEnumDescriptor< ::redhatgamedev::srt::GameEventBuffer_GameEventBufferType>() { return ::redhatgamedev::srt::GameEventBuffer_GameEventBufferType_descriptor(); } } // namespace protobuf } // namespace google // @@protoc_insertion_point(global_scope) #endif // PROTOBUF_INCLUDED_GameEventBuffer_2eproto
7d962e7fbb0d6cca7ee01fea53f7fbe07dafbb97
7852ad083d3fb837171ff5b04173bee2a25ee354
/ch13/13_1/Ex_13_1.cpp
cc212f032ee170593e800ca2df2cdfd92d915b3b
[]
no_license
SeA-xiAoD/Learning_OpenCV3_Homework
2d19cde2063c148ce641393816fc3a4b4d4559da
47dc1c90783a84c246c7013bd59bdad3464e116c
refs/heads/master
2021-08-10T02:51:45.170860
2018-09-30T06:57:09
2018-09-30T06:57:09
136,334,801
4
4
null
null
null
null
UTF-8
C++
false
false
567
cpp
Ex_13_1.cpp
#include <opencv2/opencv.hpp> #include <iostream> #include <vector> using namespace std; int main(int argc, char** argv) { cv::Mat img = cv::Mat::zeros(1000, 1, CV_32FC1); cv::RNG rng = cv::theRNG(); rng.fill(img, cv::RNG::UNIFORM, 0.0, 1.0); cv::Mat hist; float value_range[] = {0.0, 1.0}; const float* ranges[] = {value_range}; int channel_size[] = {0}; int hist_size[] = {10}; cv::calcHist(&img, 1, channel_size, cv::noArray(), hist, 1, hist_size, ranges); cout << "Histgram:" << endl << hist << endl; return 0; }
ab3170c105f7e898bde007068edb1ebb8940e607
bee9b4cb77c34e173f95c93a2c7acc8db7f47339
/3DServer/Object.h
0d862c308def7b9e5358419d62bdb9aa308cea2e
[]
no_license
ParkByoungHO/AttackFieldServer
e3864ab90b01778173919451019cb7a567f0d9b0
00bf0f771750905d0464548d58f3b3728704a94d
refs/heads/master
2020-12-31T07:42:44.981542
2017-09-03T20:00:37
2017-09-03T20:00:37
86,552,061
0
0
null
null
null
null
UHC
C++
false
false
3,649
h
Object.h
#pragma once class CGameObject; struct CollisionInfo { CGameObject* m_pHitObject = nullptr; float m_fDistance = FLT_MAX; XMFLOAT3 m_f3HitNormal = XMFLOAT3(0, 0, 0); DWORD m_dwFaceIndex = 0; float m_fU = 0.0f; float m_fV = 0.0f; UINT m_nObjectID = 0; ChracterBoundingBoxParts m_HitParts = ChracterBoundingBoxParts::eNone; }; class CGameObject { public: CGameObject(int nMeshes = 0); virtual ~CGameObject(); public: XMMATRIX m_mtxLocal = XMMatrixIdentity(); XMMATRIX m_mtxWorld = XMMatrixIdentity(); XMMATRIX m_mtxShadow = XMMatrixIdentity(); protected: // ----- Identity ----- // static UINT g_nObjectId; UINT m_nObjectId = 0; // 팀 종류 구별하여 충돌 처리시 사용하기. 현재는 아무것도 없음 TeamType m_tagTeam = TeamType::eNone; bool m_bActive = true; // ----- Collision ------ // bool m_bIsCollision = false; BoundingBox m_bcMeshBoundingBox; // 카메라 컬링용 Box BoundingSphere m_bsMeshBoundingSphere; BoundingOrientedBox m_bcMeshBoundingOBox; CollisionInfo m_infoCollision; public: virtual void Update(float fDeltaTime); virtual void OnCollisionCheck() {}; void GenerateRayForPicking(XMVECTOR *pd3dxvPickPosition, XMMATRIX *pd3dxmtxWorld, XMMATRIX *pd3dxmtxView, XMVECTOR *pd3dxvPickRayPosition, XMVECTOR *pd3dxvPickRayDirection); void MoveStrafe(float fDistance = 1.0f); void MoveUp(float fDistance = 1.0f); void MoveForward(float fDistance = 1.0f); void Move(XMFLOAT3 vPos, bool isLocal = false); void Rotate(float fPitch = 10.0f, float fYaw = 10.0f, float fRoll = 10.0f, bool isLocal = false); void Rotate(XMFLOAT3 fAngle, bool isLocal = false); void Rotate(XMVECTOR *pd3dxvAxis, float fAngle, bool isLocal = false); // ---------- Get, Setter ---------- // void SetActive(bool bActive = false) { m_bActive = bActive; } bool GetActive() const { return m_bActive; } void SetPosition(float x, float y, float z, bool isLocal = false); void SetPosition(XMVECTOR d3dxvPosition, bool isLocal = false); void SetPosition(XMFLOAT3 d3dxvPosition, bool isLocal = false); virtual void SetRotate(float fPitch, float fYaw, float fRoll, bool isLocal = false); virtual void SetRotate(XMFLOAT3 fAngle, bool isLocal = false); virtual void SetRotate(XMVECTOR *pd3dxvAxis, float fAngle, bool isLocal = false); XMVECTOR GetvPosition(bool bIsLocal = false) const; XMFLOAT3 GetPosition(bool isLocal = false) const; XMVECTOR GetvLook(bool bIsLocal = false) const; XMVECTOR GetvUp(bool bIsLocal = false) const; XMVECTOR GetvRight(bool bIsLocal = false) const; XMFLOAT3 GetLook(bool bIsLocal = false) const; XMFLOAT3 GetUp(bool bIsLocal = false) const; XMFLOAT3 GetRight(bool bIsLocal = false) const; void SetLook(XMFLOAT3 axis, bool bIsLocal = false); void SetvLook(XMVECTOR axis, bool bIsLocal = false); void SetUp(XMFLOAT3 axis, bool bIsLocal = false); void SetRight(XMFLOAT3 axis, bool bIsLocal = false); void SetBoundingBox(BoundingBox box) { m_bcMeshBoundingBox = box; BoundingSphere::CreateFromBoundingBox(m_bsMeshBoundingSphere, m_bcMeshBoundingBox); BoundingOrientedBox::CreateFromBoundingBox(m_bcMeshBoundingOBox, m_bcMeshBoundingBox); } BoundingBox GetBoundingBox(bool isLocal = false) const; BoundingSphere GetBoundingSphere(bool isLocal = false) const; BoundingOrientedBox GetBoundingOBox(bool isLocal = false) const; bool GetCollisionCheck() const { return m_bIsCollision; } void SetCollision(bool collision) { m_bIsCollision = collision; } UINT GetObjectID()const { return m_nObjectId; } CollisionInfo GetCollisionInfo() const { return m_infoCollision; } };
6f9492b0fc810dd40b2b1f12fdf970763acb3226
5ef7f5ba06b98319a5406dfa3b25c985257713d4
/IGC/Compiler/Legalizer/InstPromoter.h
ff3baf6132f6613c203e545afd90cb0cb5268e31
[ "MIT" ]
permissive
intel/intel-graphics-compiler
6a1ae1a84c541e967e70324492f22c941a02e38f
ea522543be6d042ec80e5db8e8878be31af68938
refs/heads/master
2023-09-03T20:31:55.215461
2023-08-29T18:31:52
2023-09-02T08:55:05
105,299,467
546
176
NOASSERTION
2023-08-23T08:57:03
2017-09-29T17:27:54
C++
UTF-8
C++
false
false
2,346
h
InstPromoter.h
/*========================== begin_copyright_notice ============================ Copyright (C) 2017-2021 Intel Corporation SPDX-License-Identifier: MIT ============================= end_copyright_notice ===========================*/ #ifndef LEGALIZER_INSTPROMOTER_H #define LEGALIZER_INSTPROMOTER_H #include "TypeLegalizer.h" #include "common/LLVMWarningsPush.hpp" #include "llvm/IR/InstVisitor.h" #include "common/LLVMWarningsPop.hpp" namespace IGC { namespace Legalizer { class InstPromoter : public InstVisitor<InstPromoter, bool> { friend class InstVisitor<InstPromoter, bool>; TypeLegalizer* TL; BuilderType* IRB; Value* Promoted; public: InstPromoter(TypeLegalizer* L, BuilderType* B) : TL(L), IRB(B) {} bool promote(Instruction* I); private: /// Helpers const char* getSuffix() const { return TL->getSuffix(Promote); } Value* getSinglePromotedValueIfExist(Value* OriginalValue); private: // By default, capture all missing instructions! bool visitInstruction(Instruction& I); /// Terminator instructions /// bool visitTerminatorInst(IGCLLVM::TerminatorInst& I); /// Standard binary operators /// bool visitSelectInst(SelectInst& I); bool visitICmpInst(ICmpInst& I); bool visitBinaryOperator(BinaryOperator& I); /// Memory operators /// bool visitAllocaInst(AllocaInst& I); bool visitLoadInst(LoadInst& I); bool visitStoreInst(StoreInst& I); /// Cast operators bool visitTruncInst(TruncInst& I); bool visitSExtInst(SExtInst& I); bool visitZExtInst(ZExtInst& I); bool visitBitCastInst(BitCastInst& I); /// Other operators bool visitExtractElementInst(ExtractElementInst& I); bool visitInsertElementInst(InsertElementInst& I); bool visitGenIntrinsicInst(GenIntrinsicInst& I); bool visitLLVMIntrinsicInst(IntrinsicInst& I); bool visitCallInst(CallInst& I); }; } // End Legalizer namespace } // End IGC namespace #endif // LEGALIZER_INSTPROMOTER_H
3fe27a68f84e935049bd227e09ba7573dc274475
6c1669b18999df5168f597e980e7f3c69e43aae0
/imglib/block_compressed_image.h
45334ff8fbd3f2510902bc849951ec3c94d33c34
[]
no_license
biomorphs/Glimmer
48dd9d9f1945f402c0a477bdc07377009848e8ab
0b4665c75e2f5be44940cafa8fa91bc7145e1761
refs/heads/master
2020-04-26T02:39:02.835564
2019-08-05T23:22:51
2019-08-05T23:22:51
173,240,771
0
0
null
null
null
null
UTF-8
C++
false
false
1,871
h
block_compressed_image.h
#ifndef IMGCONVERTER_BLOCK_COMPRESSED_IMAGE_INCLUDED #define IMGCONVERTER_BLOCK_COMPRESSED_IMAGE_INCLUDED #include "block_compressed_pixels.h" #include <stdint.h> #include <vector> // An image containing 4x4 blocks of DXT1 pixel data // Note! Data is stored with flipped y-axis (i.e. top left = 0,0; bottom right = w, h) class BlockCompressedImage { public: BlockCompressedImage(uint32_t widthPixels, uint32_t heightPixels); BlockCompressedImage(BlockCompressedImage&& other); ~BlockCompressedImage(); BlockCompressedImage(const BlockCompressedImage& other) = delete; BlockCompressedImage& operator=(const BlockCompressedImage& other) = delete; BlockCompressedImage& operator=(BlockCompressedImage&& other); inline uint32_t GetWidthPixels() const { return m_widthPixels; } inline uint32_t GetHeightPixels() const { return m_heightPixels; } inline uint32_t GetWidthBlocks() const { return m_widthBlocks; } inline uint32_t GetHeightBlocks() const { return m_heightBlocks; } // Access at pixel level is slow since the LUT for a block must be generated each time // However, this is useful for testing void GetPixelColour(uint32_t x, uint32_t y, ColourRGB& colour) const; // Block access BlockCompressedPixels* BlockAt(uint32_t x, uint32_t y); const BlockCompressedPixels* BlockAt(uint32_t x, uint32_t y) const; // Raw data accessors for fast serialisation const uint8_t* BlockData() const { return reinterpret_cast<const uint8_t*>(m_pixelData.data()); } uint8_t* BlockData() { return reinterpret_cast<uint8_t*>(m_pixelData.data()); } private: BlockCompressedPixels& GetBlock(uint32_t blckX, uint32_t blckY); const BlockCompressedPixels& GetBlock(uint32_t blckX, uint32_t blckY) const; uint32_t m_widthPixels; uint32_t m_heightPixels; uint32_t m_widthBlocks; uint32_t m_heightBlocks; std::vector<BlockCompressedPixels> m_pixelData; }; #endif
db480e3e402d895fb9bf12b8f1a7ecf0de09acd3
d4d5a0bc519294e4b3f312048dd52cf9264b7e29
/HYSBZ/1040/19909327_AC_3112ms_62504kB.cpp
7b9a97e275bc3561644c42777431cb68c4bfbd2a
[]
no_license
imhdx/My-all-code-of-Vjudge-Judge
fc625f83befbaeda7a033fd271fd4f61d295e807
b0db5247db09837be9866f39b183409f0a02c290
refs/heads/master
2020-04-29T08:16:24.607167
2019-07-24T01:17:15
2019-07-24T01:17:15
175,981,455
0
0
null
null
null
null
UTF-8
C++
false
false
1,267
cpp
19909327_AC_3112ms_62504kB.cpp
#include<bits/stdc++.h> using namespace std; const int maxn=1000006; int pre[maxn],a[maxn]; vector<int> v[maxn]; int getx(int x) { if (pre[x]==x) return x; return pre[x]=getx(pre[x]); } pair<int,int> huan[maxn]; int root1=-1,root2=-1; long long dp[maxn][2]; void dfs(int now,int fa) { dp[now][0]=0; dp[now][1]=a[now]; for (int i=0;i<v[now].size();i++) { int u=v[now][i]; if (u==fa) continue; dfs(u,now); dp[now][1]+=dp[u][0]; dp[now][0]+=max(dp[u][1],dp[u][0]); } } int main() { int cnt=0; int n; scanf("%d",&n);for (int i=0;i<=n;i++) pre[i]=i; for (int i=1;i<=n;i++) { int x; scanf("%d%d",&a[i],&x); int xx=getx(i); int yy=getx(x); if (xx!=yy) { v[i].push_back(x); v[x].push_back(i); pre[xx]=yy; } else{ huan[cnt++]={i,x}; } } long long ans=0; for (int i=0;i<cnt;i++) { root1=huan[i].first; root2=huan[i].second; //printf("root=%d %d\n",root1,root2); dfs(root1,-1); long long tmp=dp[root1][0]; dfs(root2,-1); ans+=max(tmp,dp[root2][0]); } printf("%lld\n",ans); return 0; }//
c87cbf3473f3d9f8d52cc366f25006d8014e89ff
2aa75176e93bc5cee6e3c66a82acf3701af56678
/qt5/qt5/Cube2/main.cpp
35425d40577cb70f55b211b26ee09b8d4da15f48
[]
no_license
dedowsdi/journey
5d5c11a5e2c143f031ad2d801c731c2ca381c18a
0e9f1dd34a6bb7d5c9c8225ef1595a8cfd188593
refs/heads/master
2021-06-02T00:31:44.925551
2020-10-05T06:14:08
2020-10-05T06:14:08
116,079,146
12
1
null
null
null
null
UTF-8
C++
false
false
578
cpp
main.cpp
#include "MainWindow.h" #include <QtWidgets/QApplication> #include <QSurfaceFormat> int main(int argc, char *argv[]) { QApplication a(argc, argv); // setup surface format QSurfaceFormat fmt; fmt.setSamples(4); fmt.setVersion(3, 3); fmt.setRedBufferSize(8); // default fmt.setGreenBufferSize(8); // default fmt.setBlueBufferSize(8); // default fmt.setAlphaBufferSize(8); fmt.setProfile(QSurfaceFormat::CompatibilityProfile); // default QSurfaceFormat::setDefaultFormat(fmt); MainWindow w; w.show(); return a.exec(); }
67614d1b23d7caf2854cd9c107f11c6d5e3c2ea2
12d3a7f7b82c3498ca5942dbf0c641d3d8741c73
/MurderMagic/Source/MurderMagic/Private/Enemies/NPC.cpp
7a3e1aebca67f4a2240c63d6dc4fa80d1d88e557
[]
no_license
beckrpgirl/Murder-Magic
7b5864d826979e088654a6174f01cbb8b89d7de0
42c0717e05c1e23882daabf4aca6b3d1a59134c1
refs/heads/master
2020-07-24T06:19:10.215674
2019-10-12T00:40:46
2019-10-12T00:40:46
207,823,263
0
0
null
null
null
null
UTF-8
C++
false
false
2,359
cpp
NPC.cpp
// Fill out your copyright notice in the Description page of Project Settings. #include "NPC.h" #include "CollectibleParent.h" #include "Math/Vector.h" #include "Components/PrimitiveComponent.h" // Sets default values ANPC::ANPC(const FObjectInitializer& OI) { AIControllerClass = ANPCAIController::StaticClass(); // 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; CollisionSphere = OI.CreateDefaultSubobject<USphereComponent>(this, TEXT("SphereComponent")); CollisionSphere->InitSphereRadius(500.0f); CollisionSphere->SetCollisionResponseToAllChannels(ECR_Overlap); CollisionSphere->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics); CollisionSphere->SetGenerateOverlapEvents(true); CollisionSphere->AttachToComponent(RootComponent, FAttachmentTransformRules::KeepRelativeTransform); hpBar = OI.CreateDefaultSubobject<UWidgetComponent>(this, TEXT("HP Bar")); hpBar->AttachToComponent(RootComponent, FAttachmentTransformRules::KeepRelativeTransform); } // Called when the game starts or when spawned void ANPC::BeginPlay() { Super::BeginPlay(); ANPCAIController* AIController = Cast<ANPCAIController>(GetController()); if (AIController) { AIController->SetTargetEnemy(GetWorld()->GetFirstPlayerController()->GetPawn()); } } // Called every frame void ANPC::Tick(float DeltaTime) { Super::Tick(DeltaTime); } void ANPC::SetHealth(float hp) { Health = hp; } float ANPC::GetHealthPercent() { return Health / MaxHealth; } void ANPC::ReduceHealth(int DamageAmount) { Health -= DamageAmount; if (Health <= 0) { SpawnCollectible(EXPWorth); Destroy(); } } void ANPC::SpawnCollectible(int SpawnAmount) { FVector Location; Location = GetActorLocation(); FActorSpawnParameters SpawnInfo; SpawnInfo.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn; if (CollectiblePickups) { for (int i = 0; i <= SpawnAmount; i++) { Location.X += (FMath::RandRange(-100, 100)); Location.Y += (FMath::RandRange(-100, 100)); ACollectibleParent* Collectibles = GetWorld()->SpawnActor<ACollectibleParent>(CollectiblePickups, SpawnInfo); Collectibles->SetActorLocation(Location); } } } float ANPC::GetDamage() { return Damage; } int ANPC::GetXPValue() { return EXPWorth; }
618de04b237bdcf47a86ca7734261ffbf0825f15
1f17c16f3c492cc8061b4a6fa911c8897c2094c3
/Settings.h
6434d4d58799a8476773161dae0c7e15d4d75052
[]
no_license
misakshoyan/MovingDetection
235f0d5ec36a57a3ada0c52746f76adb34ed9afe
426d3080e8ae441a6efbc573a0da4e81a574b149
refs/heads/master
2020-12-26T19:24:30.997698
2020-02-01T12:49:45
2020-02-01T12:49:45
237,613,811
0
0
null
null
null
null
UTF-8
C++
false
false
820
h
Settings.h
#ifndef SETTINGS_H #define SETTINGS_H class Settings { public: Settings() {} static Settings* createSettings(); public: bool m_detectShadows = true; int m_historyLength = 500; bool m_isGaussianBlur = false; bool m_isMedianBlur = true; int m_minBoundingRectArea = 100; double m_minBoundingRectAspectRatio = 0.2; double m_maxBoundingRectAspectRatio = 1.25; int m_minBoundingRectWidth = 20; int m_minBoundingRectHeight = 20; double m_minBoundingRectDiagonalSize = 30.0; double m_minContourSizeDivBoundingRect = 0.4; double m_maxDistanceCoefficient = 1.15; bool m_drawDirectionLine = true; bool m_showObjectNumber = true; int m_speedLevel = 1; private: static Settings* s_instance; }; #endif // SETTINGS_H
e4449e30b38612dca602500eaff11d3629a259f1
14654aafdd514fdb7ce794b5abe7faf66b36cbe2
/Project/main.cpp
dbecca55ba6acd2ce885e76104001922f3138bc5
[]
no_license
Shiro-Kitsune/Hidden-Object-3D-Game
68d8999e7cbd43fa7a9d278e9373b82a983f9d4a
525a9f197f111c25471cb29e8182dfeb8d26614d
refs/heads/master
2020-04-16T21:52:27.806417
2019-01-16T00:24:49
2019-01-16T00:24:49
165,943,541
1
0
null
null
null
null
UTF-8
C++
false
false
142
cpp
main.cpp
#include "Window.h" #include "Shader.h" int main(void) { Window window(1366, 768, "Project"); window.run(); glfwTerminate(); return 0; }
39ef6c9bb8b3d28d2bc8e60e88cbd4b94cc95936
34cfe613e04e84b630bf9bcb8d66ea36e379af5e
/wildcard_matching.cpp
018d396d15caab4a4d945c7681cf42e2d93e4a69
[]
no_license
happysiddharth/DynmaicProgramming
e23de5852c518cc254bd77099e89b789d5117265
4024311d9fa7813501632894ddf7ce8853577110
refs/heads/master
2020-09-26T17:57:09.470611
2020-01-01T19:54:46
2020-01-01T19:54:46
226,307,555
0
0
null
null
null
null
UTF-8
C++
false
false
862
cpp
wildcard_matching.cpp
#include <cstring> #include <iostream> using namespace std; int main() { string text, pattern; cin>>text>>pattern; int textL = text.length(); int patternL = pattern.length(); bool dp[patternL+1][textL+1]; memset(dp,false,sizeof(dp)); dp[0][0] = 1; for (int j = 1; j <= patternL; j++) if (pattern[j - 1] == '*') dp[j][0] = dp[j-1][0]; for(int i=1;i<=patternL;i++){ for(int j=1;j<=textL;j++){ if(pattern[i-1]==text[j-1] || pattern[i-1]=='?'){ dp[i][j] = dp[i-1][j-1]; }else if(pattern[i-1]=='*'){ dp[i][j] = dp[i-1][j] || dp[i][j-1]; }else{ dp[i][j] = false; } } } if(dp[patternL][textL]){ cout<<"MATCHED"<<endl; }else{ cout<<"NOT MATCHED"; } return 0; }
c3c5f7d97f74ac1ba43281f328659a37f1369777
9647a9403862a14079c57b8039c31819eb135d6b
/inc/NutellaPlayer.hpp
1a77050f166011759b029e9d0d9ec136f306d36d
[]
no_license
ajthompson/cs4513-proj3
01e1ef1b8f9ef5aa4c08c155bde22ec9bcd09faf
f785aa5c6c015c443ff9b3903e0f2a4abcb51822
refs/heads/master
2021-01-10T14:56:56.935084
2016-02-16T18:39:19
2016-02-16T18:39:19
51,858,603
0
0
null
null
null
null
UTF-8
C++
false
false
1,061
hpp
NutellaPlayer.hpp
/** * NutellaPlayer.h * * The NutellaPlayer is forked off to handle receiving and playing * a movie. * * Alec Thompson - ajthompson@wpi.edu * February 2016 */ #ifndef NUTELLA_PLAYER_HPP_ #define NUTELLA_PLAYER_HPP_ #include <string> #include <queue> #include "MoviePlayer.hpp" class NutellaPlayer { int tflag, vflag; int sock; std::string title; MoviePlayer *mp; std::queue<std::string> frame_queue; std::string partial_frame; // leftover frame without any end delimiters // transfer time logging struct timeval start_time; double total_reception_time; public: /* Constructor and Destructor */ NutellaPlayer(std::string title, std::string streamer_host, int streamer_port, unsigned long fps, int fps_flag, int tflag, int vflag); ~NutellaPlayer(); void run(); private: void connectToStreamer(std::string streamer_host, int streamer_port); void disconnect(); void sendTitle(); void receiveStream(); struct addrinfo getServInfo(std::string streamer_host, int streamer_port); void setStartTime(); void addTimeDiff(); }; #endif
a654c1fef60dea6bf5762c8e47fdd4fb1614ac5c
13b14c9c75143bf2eda87cb4a41006a52dd6f02b
/Uva/Uva2010/10771/10771.cpp
6db9013270d266edcbb05501835d12a047b0a31e
[]
no_license
yutaka-watanobe/problem-solving
2c311ac856c79c20aef631938140118eb3bc3835
f0b92125494fbd3c8d203989ec9fef53f52ad4b4
refs/heads/master
2021-06-03T12:58:39.881107
2020-12-16T14:34:16
2020-12-16T14:34:16
94,963,754
0
1
null
null
null
null
UTF-8
C++
false
false
843
cpp
10771.cpp
#include<iostream> #include<vector> #include<cassert> using namespace std; #define MAX 2000 int n, m, k, s, pos; vector<char> T; void next(){ pos = (pos+k)%(T.size()); } void pre(){ if ( pos == 0 ) pos = T.size()-1; else pos--; } void simulate(){ T.clear(); s = n + m; for ( int i = 0; i < n ; i++ ) T.push_back('G'); for ( int i = 0; i < m; i++ ) T.push_back('K'); pos = -1; char ch; for ( int step = 0; step < s-1; step++ ){ next(); char ch = T[pos]; T.erase(T.begin() + pos); pre(); next(); if ( T[pos] == ch ) T[pos] = 'G'; else T[pos] = 'K'; } if ( T[0] == 'K' ) cout << "Keka" << endl; else if ( T[0] == 'G' )cout << "Gared" << endl; else assert(false); } main(){ while(1){ cin >> n >> m >> k; if ( n == 0 && m == 0 && k == 0 ) break; simulate(); } }
092d696783ca260cfb912c92194e6a56bbbf32c2
b3814242f60ebb4393e4a105b91ac464078c88a7
/shared/packets/ClientPacketWrapper.hpp
3e3c0b018c2825f371c776a7875e8bf110e7b406
[]
no_license
Techno-coder/SpaceShift
f858402c60637bfa68ff700c29557620cfee0966
ed3a6a041d9d7ea2078242e38998f4f299e59040
refs/heads/master
2021-03-27T13:59:35.785446
2017-09-27T06:56:57
2017-09-27T06:56:57
103,614,271
0
1
null
null
null
null
UTF-8
C++
false
false
464
hpp
ClientPacketWrapper.hpp
#pragma once #include "PacketWrapper.hpp" class ClientPacketWrapper : public PacketWrapper { public: enum class Type : sf::Uint16 { DISCONNECT = 0, AUTHENTICATION_REQUEST = 1, CHECK_ALIVE_RESPONSE = 2, QUICK_JOIN_REQUEST = 3, MOVE_REQUEST = 5 } type = Type::DISCONNECT; private: sf::Uint16 getType() const override { return static_cast<sf::Uint16>(type); } void setType(sf::Uint16 newType) override { type = static_cast<Type>(newType); } };
34a7d5b402bbfb1b1bac27f22620fa9356e6750c
11b59df37235d5d61515ca79e6a18e0cb3e2bece
/src/Coroutine.cpp
08058a2f939db11112488b6070318575a41786d8
[ "BSD-3-Clause" ]
permissive
blastbao/coroutine-2
932282ff589596427b873604de08dd8e49c8b3cc
a8c48aa4506e52088bc368b2f8292d92b1511d55
refs/heads/master
2021-01-13T12:06:32.302132
2015-04-15T08:18:14
2015-04-15T08:18:14
null
0
0
null
null
null
null
UTF-8
C++
false
false
880
cpp
Coroutine.cpp
#include "Coroutine.h" #include "Schedule.h" #include <assert.h> #include <string.h> #include <stdlib.h> namespace coroutine { Coroutine::Coroutine(const CoroutineFunc& func, int id_arg) : func_(func), id_(id_arg), state_(kReady), stack_(NULL), capacity_(0), size_(0) { } Coroutine::~Coroutine() { assert(state_ == kDead); } void Coroutine::start(Schedule* schedule) { if (func_) { setState(kRunning); func_(schedule); } } void Coroutine::saveStack(char* top) { char dummy = 0; assert(top - &dummy <= static_cast<ptrdiff_t>(Schedule::kStackSize)); if (capacity_ < top - &dummy) { ::free(stack_); capacity_ = top - &dummy; stack_ = static_cast<char*>(::malloc(capacity_)); } size_ = top - &dummy; memcpy(stack_, &dummy, size_); } } // namespace coroutine
9436c714d7f4bf2109a9936d740e01552bb8b598
1ba24756d0333d23511866af27702f5a9021ca6a
/src/AnarchyHook/Threading/Win32Thread.h
2c57abf32ed1c406af660a13487d2fc953977fc7
[ "WTFPL" ]
permissive
gordonc64/AOtomation.Hook
84ffa54d944a7be4fe3d6a56b9c1456596022d63
5aec454260e177c737fe41df6f58ffe45b161297
refs/heads/master
2021-01-17T23:24:33.939296
2013-05-29T19:35:18
2013-05-29T19:35:18
null
0
0
null
null
null
null
UTF-8
C++
false
false
720
h
Win32Thread.h
#pragma once #include "Mutex.h" namespace AnarchyHook { namespace Threading { // Simple Win32 Thread Class - David Poon // http://www.flipcode.com/archives/Simple_Win32_Thread_Class.shtml class Win32Thread { public: Win32Thread(); virtual ~Win32Thread(); unsigned int Id() const; bool Create(unsigned int stackSize = 0); void Start(); void Join(); void Resume(); void Suspend(); void Shutdown(); protected: bool CanRun(); virtual void Run() = 0; private: HANDLE threadHandle; unsigned int id; volatile bool canRun; volatile bool suspended; Mutex mutex; static unsigned int __stdcall threadFunc(void *args); }; } }
b98cce0a4d52b790cf34a0745e0f63c7e6b9e73c
b35023db97093d0c1566d400e1ff9c3b8ffda278
/tool/measuringCore/src/sharedEntities/configurators/RunCommandConfigurator.cpp
8fa052af0cc49c08c0d9b79603f0291606896fd4
[]
no_license
GeorgOfenbeck/Thesis_Steinmann
39b98eb25c6c83b6d4551f8a05ddd84792651de7
6ea893bdfbf2e97d036d59807f53a14c397b9616
refs/heads/master
2018-12-27T23:30:43.487941
2012-12-03T16:11:36
2012-12-03T16:11:36
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,884
cpp
RunCommandConfigurator.cpp
/* * SystemConfigurator.cpp * * Created on: Feb 1, 2012 * Author: ruedi */ #include "Logger.h" #include "RunCommandConfigurator.h" #include "sharedEntities/configurators/RunCommand.h" #include <cstdlib> #include <sys/wait.h> #include "utils.h" #include <cstdio> #include "Exception.h" using namespace std; RunCommandConfigurator::~RunCommandConfigurator() { // TODO Auto-generated destructor stub } void RunCommandConfigurator::beforeMeasurement(){ LENTER runConfigurator(getBeforeMeasurementCommands()); LLEAVE } void RunCommandConfigurator::afterMeasurement(){ LENTER runConfigurator(getAfterMeasurementCommands()); LLEAVE } void RunCommandConfigurator::beforeRun(){ LENTER runConfigurator(getBeforeRunCommands()); LLEAVE } void RunCommandConfigurator::afterRun(){ LENTER runConfigurator(getAfterRunCommands()); LLEAVE } void RunCommandConfigurator::runConfigurator(std::vector<RunCommand*> &commands) { foreach(RunCommand *command, commands){ pid_t pid=fork(); // are we the child process? if (pid==0){ const char * cmd[command->getArgs().size()+1]; memset(cmd, 0, sizeof(char*) * (command->getArgs().size()+1)); int idx=0; foreach(string arg, command->getArgs()){ cmd[idx++]=arg.c_str(); } cmd[idx++]=NULL; if (execvp(command->getExecutable().c_str(),(char*const*)cmd)<0){ perror("failed to start system configurator"); exit(1); } } // check if fork succeeded if (pid<0){ throw "failed to fork"; } int status; // wait for the child if (waitpid(pid,&status,0)<0){ perror("waiting for child process failed"); exit(1); } // check if the child exited if (!WIFEXITED(status)){ perror("child dit not termiate"); exit(1); } // chck if the child ran succefully if (WEXITSTATUS(status)!=0){ throw Exception("systemConfigurator encountered an error"); } } }
37fce3cf034bf4d77453acaba657fdbd49f29a37
e4f62c6e1a160c46fabab9d4de962802fdef5e2e
/command_pattern/command/main.cpp
acd6bc5b5be47b592481a6555f8de5b808571c6f
[]
no_license
wayneliu0512/cpp-design-pattern
625a205bc65b8ca5b4fe6cefae9c58b63cedb0e7
a06ec2360126db781eb716275729b1d0c89c5d08
refs/heads/master
2020-04-19T08:16:02.661543
2019-06-13T09:52:47
2019-06-13T09:52:47
168,071,090
0
0
null
null
null
null
UTF-8
C++
false
false
2,176
cpp
main.cpp
#include <iostream> #include <vector> using namespace std; struct BankAccount { int balance {0}; void deposit(int amount) { balance += amount; cout << "bank deposit " << amount << " and balance is " << balance << endl; } void withdraw(int amount) { balance -= amount; cout << "bank withdraw " << amount << " and balance is " << balance << endl; } }; struct Command { virtual ~Command() = default; virtual void execute() = 0; virtual void undo() = 0; }; struct BankAccountDepositCommand : Command { BankAccountDepositCommand(BankAccount& account, int amount): account_(account), amount_(amount){} void execute() { account_.deposit(amount_); } void undo() { account_.withdraw(amount_); } private: BankAccount& account_; int amount_; }; struct BankAccountWithdrawCommand : Command { BankAccountWithdrawCommand(BankAccount& account, int amount): account_(account), amount_(amount){} void execute() { account_.withdraw(amount_); } void undo() { account_.deposit(amount_); } private: BankAccount& account_; int amount_; }; struct MultiCommand : Command { MultiCommand(vector<Command*> commands):commands_(commands) {} void execute() { for(auto command : commands_) { command->execute(); } } void undo() { for(auto command : commands_) { command->undo(); } } private: vector<Command*> commands_; }; int main() { BankAccount account; BankAccountDepositCommand deposit_command(account, 100); BankAccountWithdrawCommand withdraw_command(account, 200); //example 1 // deposit_command.execute(); // deposit_command.undo(); // deposit_command.execute(); // deposit_command.undo(); // withdraw_command.execute(); // withdraw_command.undo(); //example 2 // vector<Command*> commands {&deposit_command, &withdraw_command, &deposit_command}; // MultiCommand multi_commands {commands}; // multi_commands.execute(); // multi_commands.undo(); cout << account.balance << endl; return 0; }
01bbda7052b107af4cf12f1c9eb1dad5861a8c21
9030ce2789a58888904d0c50c21591632eddffd7
/SDK/ARKSurvivalEvolved_FPVWeaponAnimBP_Base_Carrying_classes.hpp
18f36920e6bddc8d84ec06807cab29de8b07c97a
[ "MIT" ]
permissive
2bite/ARK-SDK
8ce93f504b2e3bd4f8e7ced184980b13f127b7bf
ce1f4906ccf82ed38518558c0163c4f92f5f7b14
refs/heads/master
2022-09-19T06:28:20.076298
2022-09-03T17:21:00
2022-09-03T17:21:00
232,411,353
14
5
null
null
null
null
UTF-8
C++
false
false
45,237
hpp
ARKSurvivalEvolved_FPVWeaponAnimBP_Base_Carrying_classes.hpp
#pragma once // ARKSurvivalEvolved (332.8) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_FPVWeaponAnimBP_Base_Carrying_structs.hpp" namespace sdk { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------------------------------- // AnimBlueprintGeneratedClass FPVWeaponAnimBP_Base_Carrying.FPVWeaponAnimBP_Base_Carrying_C // 0x158E (0x18CE - 0x0340) class UFPVWeaponAnimBP_Base_Carrying_C : public UAnimInstance { public: struct FAnimNode_Root AnimGraphNode_Root_19BF97FE4F2037E9A85A04BA8B73DA51; // 0x0340(0x0028) struct FAnimNode_Slot AnimGraphNode_Slot_40B25FDE460923C5133DBFB2EEA00BE4; // 0x0368(0x0038) struct FAnimNode_TransitionResult AnimGraphNode_TransitionResult_B4A8B14C47696FF6C966698FF1B14DC7;// 0x03A0(0x0018) struct FAnimNode_TransitionResult AnimGraphNode_TransitionResult_80BFA98C4CD37EBCF07EEC857A2229F5;// 0x03B8(0x0018) struct FAnimNode_TransitionResult AnimGraphNode_TransitionResult_62FC01B340CC6EB1F23009A48B4FD947;// 0x03D0(0x0018) struct FAnimNode_TransitionResult AnimGraphNode_TransitionResult_46D3843C4621199ADE23558F65ACE18F;// 0x03E8(0x0018) struct FAnimNode_TransitionResult AnimGraphNode_TransitionResult_BE835BC843858304B80DA2AE91A5B5EC;// 0x0400(0x0018) struct FAnimNode_TransitionResult AnimGraphNode_TransitionResult_A8BAFD0F4689B5C75E31BE8B32609E6F;// 0x0418(0x0018) struct FAnimNode_TransitionResult AnimGraphNode_TransitionResult_A9BC0A3B4ACD86AAFD12629794C19556;// 0x0430(0x0018) struct FAnimNode_TransitionResult AnimGraphNode_TransitionResult_B4D5259D4046E3EFE9C84AB22BFE3BE1;// 0x0448(0x0018) struct FAnimNode_TransitionResult AnimGraphNode_TransitionResult_0FFA32754FA9FDF2EF7426873DA0450A;// 0x0460(0x0018) struct FAnimNode_TransitionResult AnimGraphNode_TransitionResult_21BF806641A634D5BB7F368E7FA38196;// 0x0478(0x0018) struct FAnimNode_TransitionResult AnimGraphNode_TransitionResult_813EA40A4B8251936C4FE79168ADEB65;// 0x0490(0x0018) struct FAnimNode_TransitionResult AnimGraphNode_TransitionResult_0BFB979A4DB67763FE1CC8B92A17CADA;// 0x04A8(0x0018) struct FAnimNode_TransitionResult AnimGraphNode_TransitionResult_54A95F764D3BAFB93680BA917C771AB8;// 0x04C0(0x0018) struct FAnimNode_TransitionResult AnimGraphNode_TransitionResult_2A2A338C4CE4B62D546F0FA3DDA360AC;// 0x04D8(0x0018) struct FAnimNode_TransitionResult AnimGraphNode_TransitionResult_1477BF7841EF279D1003388FBB329ECC;// 0x04F0(0x0018) struct FAnimNode_SequencePlayer AnimGraphNode_SequencePlayer_85BAF15047A69145765D899133E25E02;// 0x0508(0x0030) struct FAnimNode_Root AnimGraphNode_StateResult_99D9C49644EA48852297AEA2D40281C5;// 0x0538(0x0028) struct FAnimNode_SequencePlayer AnimGraphNode_SequencePlayer_EC98062A42CFB44E63B296A3F0AC98B4;// 0x0560(0x0030) struct FAnimNode_Root AnimGraphNode_StateResult_F588247949356C2042905495BC0829F7;// 0x0590(0x0028) struct FAnimNode_SequencePlayer AnimGraphNode_SequencePlayer_A3EE772749282E1538A1C1A543D1D045;// 0x05B8(0x0030) struct FAnimNode_Root AnimGraphNode_StateResult_72B035DB419D031B70F1639320B1D4DF;// 0x05E8(0x0028) struct FAnimNode_SequencePlayer AnimGraphNode_SequencePlayer_1B59474E40DD93306BE4ABAFF4AFCDB8;// 0x0610(0x0030) struct FAnimNode_BlendListByBool AnimGraphNode_BlendListByBool_6EF69B0F4DCC2251A8FA678E90DF41BA;// 0x0640(0x0060) struct FAnimNode_ConvertComponentToLocalSpace AnimGraphNode_ComponentToLocalSpace_36CBA5AB4AC6EAB8ECFFE2B6E5CF0449;// 0x06A0(0x0028) struct FAnimNode_ConvertLocalToComponentSpace AnimGraphNode_LocalToComponentSpace_7DE09197400CEACDFB7B6CA20D40AEFE;// 0x06C8(0x0028) struct FAnimNode_ModifyBone AnimGraphNode_ModifyBone_95C7347148FB1B6F11679CA755B0B752;// 0x06F0(0x00B0) struct FAnimNode_SequencePlayer AnimGraphNode_SequencePlayer_036F483C4A9A511DEE455FABB3C23B7E;// 0x07A0(0x0030) struct FAnimNode_BlendListByBool AnimGraphNode_BlendListByBool_5EA14AC24AF8245ED37A149617880057;// 0x07D0(0x0060) struct FAnimNode_SequencePlayer AnimGraphNode_SequencePlayer_AC41B6014725ADA314F560BF65F205DE;// 0x0830(0x0030) struct FAnimNode_BlendListByBool AnimGraphNode_BlendListByBool_C41C0D734D36C5FDA805E7BFB88775C0;// 0x0860(0x0060) struct FAnimNode_SequencePlayer AnimGraphNode_SequencePlayer_197132FF4AD055A612BB6D9D63B830D8;// 0x08C0(0x0030) struct FAnimNode_Root AnimGraphNode_StateResult_38A9256F40D689880E2FABB069060C03;// 0x08F0(0x0028) struct FAnimNode_SequencePlayer AnimGraphNode_SequencePlayer_6509E2784008357F64A3B19B9A4D3DA8;// 0x0918(0x0030) struct FAnimNode_Root AnimGraphNode_StateResult_813375E1431F9191973C61BB4F636479;// 0x0948(0x0028) struct FAnimNode_SequencePlayer AnimGraphNode_SequencePlayer_0406B80B48F9A6E7E8657AA07C6DD92E;// 0x0970(0x0030) struct FAnimNode_Root AnimGraphNode_StateResult_81A15CC84E54C8459C8711856C6269E3;// 0x09A0(0x0028) struct FAnimNode_SequencePlayer AnimGraphNode_SequencePlayer_6FFD8B234255228660133EB2381AA0A2;// 0x09C8(0x0030) struct FAnimNode_BlendListByBool AnimGraphNode_BlendListByBool_522BC11F4E2B278EA24FD599D824CB02;// 0x09F8(0x0060) struct FAnimNode_ConvertComponentToLocalSpace AnimGraphNode_ComponentToLocalSpace_475AF8B2498CDD7A67CAA28F08E99C0D;// 0x0A58(0x0028) struct FAnimNode_ConvertLocalToComponentSpace AnimGraphNode_LocalToComponentSpace_26DD551740710A4E17254CA48156D4B3;// 0x0A80(0x0028) unsigned char UnknownData00[0x8]; // 0x0AA8(0x0008) MISSED OFFSET struct FAnimNode_ModifyBone AnimGraphNode_ModifyBone_5A49D7DD46A503D92A9FACBA293C6DEB;// 0x0AB0(0x00B0) struct FAnimNode_SequencePlayer AnimGraphNode_SequencePlayer_EC63A71448DDCE572EC5749145424A7A;// 0x0B60(0x0030) struct FAnimNode_BlendListByBool AnimGraphNode_BlendListByBool_112DBA794398FC3CB080C8857FFB1808;// 0x0B90(0x0060) struct FAnimNode_SequencePlayer AnimGraphNode_SequencePlayer_852421FF4E2478F77D2960BF2CF90DCE;// 0x0BF0(0x0030) struct FAnimNode_BlendListByBool AnimGraphNode_BlendListByBool_1F40B06340BA65D36776A0B5CDC6532B;// 0x0C20(0x0060) struct FAnimNode_SequencePlayer AnimGraphNode_SequencePlayer_52CE9827433D59CFA9FF10A04941C704;// 0x0C80(0x0030) struct FAnimNode_Root AnimGraphNode_StateResult_54F7FBF94E17654F1B1BA1826D27040F;// 0x0CB0(0x0028) struct FAnimNode_StateMachine AnimGraphNode_StateMachine_014360974412E94DD08AB882349FAE68;// 0x0CD8(0x0060) struct FAnimNode_LayeredBoneBlend AnimGraphNode_LayeredBoneBlend_62FFCB444B560C23A67C988C6EE3C053;// 0x0D38(0x0080) struct FAnimNode_TransitionResult AnimGraphNode_TransitionResult_3FCAEB8F4ABAE5363A48FB941FA3BF27;// 0x0DB8(0x0018) struct FAnimNode_TransitionResult AnimGraphNode_TransitionResult_ACBB553A42B383490189C5A052A9C44A;// 0x0DD0(0x0018) struct FAnimNode_SequencePlayer AnimGraphNode_SequencePlayer_8AC97D8A4266E7547BE3AAB0386F4D69;// 0x0DE8(0x0030) struct FAnimNode_Root AnimGraphNode_StateResult_5BCA4BA54A9BC0DFBF4A70B65C6C0D4D;// 0x0E18(0x0028) struct FAnimNode_SequencePlayer AnimGraphNode_SequencePlayer_54F1B47A466C428C28D03F9C6648A11A;// 0x0E40(0x0030) struct FAnimNode_Root AnimGraphNode_StateResult_C8FBC4524CC417B8BDF61FB6A43D99CA;// 0x0E70(0x0028) struct FAnimNode_StateMachine AnimGraphNode_StateMachine_3F83CBA04868301771EFB2A5E9636603;// 0x0E98(0x0060) unsigned char UnknownData01[0x8]; // 0x0EF8(0x0008) MISSED OFFSET struct FAnimNode_ModifyBone AnimGraphNode_ModifyBone_9DD181054273F4117C152AA851C4BAD2;// 0x0F00(0x00B0) struct FAnimNode_ConvertLocalToComponentSpace AnimGraphNode_LocalToComponentSpace_6162F47E4AB1E342B647519396FB6E30;// 0x0FB0(0x0028) struct FAnimNode_ConvertComponentToLocalSpace AnimGraphNode_ComponentToLocalSpace_AAFF73214A115E3947B2BD82A795C779;// 0x0FD8(0x0028) struct FAnimNode_ModifyBone AnimGraphNode_ModifyBone_8750F37449831C164C5B298D622C2A40;// 0x1000(0x00B0) struct FAnimNode_ConvertLocalToComponentSpace AnimGraphNode_LocalToComponentSpace_6E3026B94872058E04C6D8B5DFB63273;// 0x10B0(0x0028) struct FAnimNode_ConvertComponentToLocalSpace AnimGraphNode_ComponentToLocalSpace_25C535DA4A808209AA648A8879D49323;// 0x10D8(0x0028) struct FAnimNode_Slot AnimGraphNode_Slot_85D872E746A18A32ED759F85704E59B3; // 0x1100(0x0038) struct FAnimNode_SequencePlayer AnimGraphNode_SequencePlayer_497C5DA240C8EA3B35CF849139E29B9B;// 0x1138(0x0030) struct FAnimNode_SequencePlayer AnimGraphNode_SequencePlayer_B7EF169847FEA230910B959B0A98500C;// 0x1168(0x0030) struct FAnimNode_ConvertLocalToComponentSpace AnimGraphNode_LocalToComponentSpace_3E53A8E549B88DD572BEEC9DB40F354D;// 0x1198(0x0028) struct FAnimNode_ConvertComponentToLocalSpace AnimGraphNode_ComponentToLocalSpace_E8BE14FE41238FC8D738CEA07060035E;// 0x11C0(0x0028) struct FAnimNode_BlendListByBool AnimGraphNode_BlendListByBool_9EA20B4E41810D6AE8627299ED89781A;// 0x11E8(0x0060) unsigned char UnknownData02[0x8]; // 0x1248(0x0008) MISSED OFFSET struct FAnimNode_ModifyBone AnimGraphNode_ModifyBone_9BED136F44C5B6883225AF9DB189B473;// 0x1250(0x00B0) struct FAnimNode_BlendListByBool AnimGraphNode_BlendListByBool_DA22F20B45A7890C36D0E7B56E58628B;// 0x1300(0x0060) struct FAnimNode_BlendListByBool AnimGraphNode_BlendListByBool_9CF77470407DFAADFD58E2BDEEC73124;// 0x1360(0x0060) struct FAnimNode_SequencePlayer AnimGraphNode_SequencePlayer_C503F06E4B649E2BE13CADB9DDD628AB;// 0x13C0(0x0030) struct FAnimNode_ConvertLocalToComponentSpace AnimGraphNode_LocalToComponentSpace_44AE454743B6C05FDB660FAFD87DBE03;// 0x13F0(0x0028) struct FAnimNode_ConvertComponentToLocalSpace AnimGraphNode_ComponentToLocalSpace_4AF9CFDA4C644B57641E119CD975D707;// 0x1418(0x0028) struct FAnimNode_ModifyBone AnimGraphNode_ModifyBone_F9A431AF4A587B845A953DAC70A5E1C1;// 0x1440(0x00B0) struct FAnimNode_SaveCachedPose AnimGraphNode_SaveCachedPose_07BD728A49A8F4CE569DB5977DF9EBE8;// 0x14F0(0x0040) struct FAnimNode_UseCachedPose AnimGraphNode_UseCachedPose_7130B91742F151B70296C0AA56AA31E9;// 0x1530(0x0028) struct FAnimNode_BlendListByBool AnimGraphNode_BlendListByBool_08E3F5A14873C64C5D7E60B3A450022E;// 0x1558(0x0060) struct FAnimNode_SequencePlayer AnimGraphNode_SequencePlayer_499E94B9446860AB75BFEA925D6540B3;// 0x15B8(0x0030) struct FAnimNode_ConvertLocalToComponentSpace AnimGraphNode_LocalToComponentSpace_D583FC574DDFB18FC133659B12FD631C;// 0x15E8(0x0028) struct FAnimNode_ConvertComponentToLocalSpace AnimGraphNode_ComponentToLocalSpace_6A0300AA49A15172254280A2AE2E3D03;// 0x1610(0x0028) unsigned char UnknownData03[0x8]; // 0x1638(0x0008) MISSED OFFSET struct FAnimNode_ModifyBone AnimGraphNode_ModifyBone_FEE21B1944F494E0EAF7A8AEDB68E30C;// 0x1640(0x00B0) bool IsRunning; // 0x16F0(0x0001) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) bool IsTargeting; // 0x16F1(0x0001) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) bool bIsMoving; // 0x16F2(0x0001) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) bool bUseMoving; // 0x16F3(0x0001) (Edit, BlueprintVisible, ZeroConstructor, IsPlainOldData) float MovementAnimRate; // 0x16F4(0x0004) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) bool bIsSwimming; // 0x16F8(0x0001) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) bool bUseSwimming; // 0x16F9(0x0001) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) unsigned char UnknownData04[0x6]; // 0x16FA(0x0006) MISSED OFFSET double LastSwimmingTime; // 0x1700(0x0008) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) bool bUseInventory; // 0x1708(0x0001) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) bool bIsInventory; // 0x1709(0x0001) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) unsigned char UnknownData05[0x2]; // 0x170A(0x0002) MISSED OFFSET struct FVector DefaultTranslation; // 0x170C(0x000C) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) bool bUseNoClipAmmoIdle; // 0x1718(0x0001) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) bool bHasClipAmmo; // 0x1719(0x0001) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) bool bIsUsingShield; // 0x171A(0x0001) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) unsigned char UnknownData06[0x1]; // 0x171B(0x0001) MISSED OFFSET float UsingShieldWeight; // 0x171C(0x0004) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) bool bIsBlockingWithShield; // 0x1720(0x0001) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) unsigned char UnknownData07[0x3]; // 0x1721(0x0003) MISSED OFFSET struct FVector BlockingShieldTranslation; // 0x1724(0x000C) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) float BlockingShieldWeight; // 0x1730(0x0004) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) struct FRotator BlockingShieldRotation; // 0x1734(0x000C) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) bool bUseCarryingAnimation; // 0x1740(0x0001) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) bool bIsClimbing; // 0x1741(0x0001) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) unsigned char UnknownData08[0x2]; // 0x1742(0x0002) MISSED OFFSET float ClimbingRate; // 0x1744(0x0004) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) float ClimbAnimSpeedMultiplier; // 0x1748(0x0004) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) float MaxClimbingRate; // 0x174C(0x0004) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) bool IsNearLadderTop; // 0x1750(0x0001) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) bool IsDraggingCharacter; // 0x1751(0x0001) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) unsigned char UnknownData09[0x2]; // 0x1752(0x0002) MISSED OFFSET float MaxSwimRate; // 0x1754(0x0004) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) float SwimPowerMult; // 0x1758(0x0004) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) float SwimRate; // 0x175C(0x0004) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) bool bIsUsingGliderSuit; // 0x1760(0x0001) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) bool bPreventSwimmingAnims; // 0x1761(0x0001) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData) bool CallFunc_Not_PreBool_ReturnValue; // 0x1762(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_Not_PreBool_ReturnValue2; // 0x1763(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_BooleanAND_ReturnValue; // 0x1764(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_BooleanAND_ReturnValue2; // 0x1765(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_Not_PreBool_ReturnValue3; // 0x1766(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_Not_PreBool_ReturnValue4; // 0x1767(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_BooleanAND_ReturnValue3; // 0x1768(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_Not_PreBool_ReturnValue5; // 0x1769(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_Not_PreBool_ReturnValue6; // 0x176A(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_BooleanAND_ReturnValue4; // 0x176B(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_Not_PreBool_ReturnValue7; // 0x176C(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_BooleanAND_ReturnValue5; // 0x176D(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_Not_PreBool_ReturnValue8; // 0x176E(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_Not_PreBool_ReturnValue9; // 0x176F(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_BooleanAND_ReturnValue6; // 0x1770(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_BooleanAND_ReturnValue7; // 0x1771(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_Not_PreBool_ReturnValue10; // 0x1772(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_Not_PreBool_ReturnValue11; // 0x1773(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_Not_PreBool_ReturnValue12; // 0x1774(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_BooleanAND_ReturnValue8; // 0x1775(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) unsigned char UnknownData10[0x2]; // 0x1776(0x0002) MISSED OFFSET float CallFunc_SelectFloat_ReturnValue; // 0x1778(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) float CallFunc_SelectFloat_ReturnValue2; // 0x177C(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_Not_PreBool_ReturnValue13; // 0x1780(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) unsigned char UnknownData11[0x3]; // 0x1781(0x0003) MISSED OFFSET float CallFunc_Abs_ReturnValue; // 0x1784(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_BooleanAND_ReturnValue9; // 0x1788(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_Greater_FloatFloat_ReturnValue; // 0x1789(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_BooleanAND_ReturnValue10; // 0x178A(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_Not_PreBool_ReturnValue14; // 0x178B(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) float K2Node_Event_DeltaTimeX; // 0x178C(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) class AActor* CallFunc_GetOwningActor_ReturnValue; // 0x1790(0x0008) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) class AShooterWeapon* K2Node_DynamicCast_AsShooterWeapon; // 0x1798(0x0008) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool K2Node_DynamicCast_CastSuccess; // 0x17A0(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) unsigned char UnknownData12[0x7]; // 0x17A1(0x0007) MISSED OFFSET class AShooterCharacter* CallFunc_GetPawnOwner_ReturnValue; // 0x17A8(0x0008) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_Greater_IntInt_ReturnValue; // 0x17B0(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) unsigned char UnknownData13[0x7]; // 0x17B1(0x0007) MISSED OFFSET class AShooterCharacter* K2Node_DynamicCast_AsShooterCharacter; // 0x17B8(0x0008) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool K2Node_DynamicCast2_CastSuccess; // 0x17C0(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_BooleanOR_ReturnValue; // 0x17C1(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) unsigned char UnknownData14[0x2]; // 0x17C2(0x0002) MISSED OFFSET struct FVector CallFunc_GetBlockingShieldOffsets_OutBlockingShieldFPVTranslation;// 0x17C4(0x000C) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) struct FRotator CallFunc_GetBlockingShieldOffsets_OutBlockingShieldFPVRotation;// 0x17D0(0x000C) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_GetBlockingShieldOffsets_ReturnValue; // 0x17DC(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_IsBlockingWithShield_ReturnValue; // 0x17DD(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_IsUsingShield_ReturnValue; // 0x17DE(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_IsNearTopOfLadder_ReturnValue; // 0x17DF(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) float CallFunc_GetDefaultMovementSpeed_ReturnValue; // 0x17E0(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) float CallFunc_BreakVector_X; // 0x17E4(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) float CallFunc_BreakVector_Y; // 0x17E8(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) float CallFunc_BreakVector_Z; // 0x17EC(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) float CallFunc_Divide_FloatFloat_ReturnValue; // 0x17F0(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) unsigned char UnknownData15[0x4]; // 0x17F4(0x0004) MISSED OFFSET class UAnimInstance* CallFunc_GetAnimInstance_ReturnValue; // 0x17F8(0x0008) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) class UBaseHumanAnimBP_C* K2Node_DynamicCast_AsBaseHumanAnimBP_C; // 0x1800(0x0008) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool K2Node_DynamicCast3_CastSuccess; // 0x1808(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_IsValid_ReturnValue; // 0x1809(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) unsigned char UnknownData16[0x2]; // 0x180A(0x0002) MISSED OFFSET struct FRotator CallFunc_K2_GetActorRotation_ReturnValue; // 0x180C(0x000C) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) float CallFunc_GetDefaultMovementSpeed_ReturnValue2; // 0x1818(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) struct FVector CallFunc_Conv_RotatorToVector_ReturnValue; // 0x181C(0x000C) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_IsTargeting_ReturnValue; // 0x1828(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) unsigned char UnknownData17[0x3]; // 0x1829(0x0003) MISSED OFFSET struct FVector CallFunc_GetCurrentAcceleration_ReturnValue; // 0x182C(0x000C) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) struct FVector CallFunc_Normal_ReturnValue; // 0x1838(0x000C) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) float CallFunc_Dot_VectorVector_ReturnValue; // 0x1844(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) float CallFunc_BreakVector_X2; // 0x1848(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) float CallFunc_BreakVector_Y2; // 0x184C(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) float CallFunc_BreakVector_Z2; // 0x1850(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_Greater_FloatFloat_ReturnValue2; // 0x1854(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_Greater_FloatFloat_ReturnValue3; // 0x1855(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_BooleanAND_ReturnValue11; // 0x1856(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_EqualEqual_ByteByte_ReturnValue; // 0x1857(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) struct FVector2D CallFunc_Conv_VectorToVector2D_ReturnValue; // 0x1858(0x0008) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) float CallFunc_VSize_ReturnValue; // 0x1860(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) float CallFunc_VSize2D_ReturnValue; // 0x1864(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_Greater_FloatFloat_ReturnValue4; // 0x1868(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) unsigned char UnknownData18[0x3]; // 0x1869(0x0003) MISSED OFFSET float CallFunc_Divide_FloatFloat_ReturnValue2; // 0x186C(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_Not_PreBool_ReturnValue15; // 0x1870(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) unsigned char UnknownData19[0x3]; // 0x1871(0x0003) MISSED OFFSET float CallFunc_FClamp_ReturnValue; // 0x1874(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_BooleanOR_ReturnValue2; // 0x1878(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_BooleanAND_ReturnValue12; // 0x1879(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_IsRunning_ReturnValue; // 0x187A(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_Not_PreBool_ReturnValue16; // 0x187B(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) unsigned char UnknownData20[0x4]; // 0x187C(0x0004) MISSED OFFSET double CallFunc_GetGameTimeInSeconds_ReturnValue; // 0x1880(0x0008) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_BooleanAND_ReturnValue13; // 0x1888(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) unsigned char UnknownData21[0x7]; // 0x1889(0x0007) MISSED OFFSET double CallFunc_Subtract_DoubleDouble_ReturnValue; // 0x1890(0x0008) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) float CallFunc_Conv_DoubleToFloat_ReturnValue; // 0x1898(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_Less_FloatFloat_ReturnValue; // 0x189C(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_BooleanAND_ReturnValue14; // 0x189D(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) unsigned char UnknownData22[0x2]; // 0x189E(0x0002) MISSED OFFSET float CallFunc_FInterpTo_ReturnValue; // 0x18A0(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_BooleanAND_ReturnValue15; // 0x18A4(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) unsigned char UnknownData23[0x3]; // 0x18A5(0x0003) MISSED OFFSET float CallFunc_FInterpTo_ReturnValue2; // 0x18A8(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_Not_PreBool_ReturnValue17; // 0x18AC(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_BooleanAND_ReturnValue16; // 0x18AD(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) unsigned char UnknownData24[0x2]; // 0x18AE(0x0002) MISSED OFFSET float CallFunc_FInterpTo_ReturnValue3; // 0x18B0(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) float CallFunc_FInterpTo_ReturnValue4; // 0x18B4(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) float CallFunc_Multiply_FloatFloat_ReturnValue; // 0x18B8(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) float CallFunc_Multiply_FloatFloat_ReturnValue2; // 0x18BC(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) float CallFunc_FClamp_ReturnValue2; // 0x18C0(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) float CallFunc_MultiplyMultiply_FloatFloat_ReturnValue; // 0x18C4(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) float CallFunc_FMin_ReturnValue; // 0x18C8(0x0004) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_Not_PreBool_ReturnValue18; // 0x18CC(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) bool CallFunc_BooleanAND_ReturnValue17; // 0x18CD(0x0001) (ZeroConstructor, Transient, DuplicateTransient, IsPlainOldData) static UClass* StaticClass() { static auto ptr = UObject::FindClass("AnimBlueprintGeneratedClass FPVWeaponAnimBP_Base_Carrying.FPVWeaponAnimBP_Base_Carrying_C"); return ptr; } void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_TransitionResult_186(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_TransitionResult_185(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_TransitionResult_184(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_TransitionResult_183(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_TransitionResult_182(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_TransitionResult_181(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_TransitionResult_180(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_TransitionResult_179(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_TransitionResult_178(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_TransitionResult_177(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_TransitionResult_176(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_TransitionResult_175(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_TransitionResult_174(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_TransitionResult_173(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_TransitionResult_172(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_BlendListByBool_242(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_ModifyBone_70(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_SequencePlayer_297(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_BlendListByBool_243(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_SequencePlayer_298(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_BlendListByBool_244(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_BlendListByBool_239(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_ModifyBone_69(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_SequencePlayer_291(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_BlendListByBool_240(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_SequencePlayer_292(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_BlendListByBool_241(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_LayeredBoneBlend_42(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_TransitionResult_171(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_TransitionResult_170(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_ModifyBone_68(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_ModifyBone_67(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_SequencePlayer_287(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_BlendListByBool_238(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_BlendListByBool_237(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_BlendListByBool_236(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_SequencePlayer_285(); void EvaluateGraphExposedInputs_ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying_AnimGraphNode_BlendListByBool_235(); void BlueprintUpdateAnimation(float* DeltaTimeX); void ExecuteUbergraph_FPVWeaponAnimBP_Base_Carrying(int EntryPoint); }; } #ifdef _MSC_VER #pragma pack(pop) #endif
21e8011952dc3799f37689a5de16fcbf3bd106df
3ff1fe3888e34cd3576d91319bf0f08ca955940f
/cls/include/tencentcloud/cls/v20201016/model/KafkaConsumerContent.h
4b2aa5a341370e2cfbf65b04a3861641120b68bc
[ "Apache-2.0" ]
permissive
TencentCloud/tencentcloud-sdk-cpp
9f5df8220eaaf72f7eaee07b2ede94f89313651f
42a76b812b81d1b52ec6a217fafc8faa135e06ca
refs/heads/master
2023-08-30T03:22:45.269556
2023-08-30T00:45:39
2023-08-30T00:45:39
188,991,963
55
37
Apache-2.0
2023-08-17T03:13:20
2019-05-28T08:56:08
C++
UTF-8
C++
false
false
8,226
h
KafkaConsumerContent.h
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef TENCENTCLOUD_CLS_V20201016_MODEL_KAFKACONSUMERCONTENT_H_ #define TENCENTCLOUD_CLS_V20201016_MODEL_KAFKACONSUMERCONTENT_H_ #include <string> #include <vector> #include <map> #include <tencentcloud/core/utils/rapidjson/document.h> #include <tencentcloud/core/utils/rapidjson/writer.h> #include <tencentcloud/core/utils/rapidjson/stringbuffer.h> #include <tencentcloud/core/AbstractModel.h> namespace TencentCloud { namespace Cls { namespace V20201016 { namespace Model { /** * kafka协议消费内容 */ class KafkaConsumerContent : public AbstractModel { public: KafkaConsumerContent(); ~KafkaConsumerContent() = default; void ToJsonObject(rapidjson::Value &value, rapidjson::Document::AllocatorType& allocator) const; CoreInternalOutcome Deserialize(const rapidjson::Value &value); /** * 获取消费格式 0:全文;1:json * @return Format 消费格式 0:全文;1:json * */ int64_t GetFormat() const; /** * 设置消费格式 0:全文;1:json * @param _format 消费格式 0:全文;1:json * */ void SetFormat(const int64_t& _format); /** * 判断参数 Format 是否已赋值 * @return Format 是否已赋值 * */ bool FormatHasBeenSet() const; /** * 获取是否投递 TAG 信息 Format为0时,此字段不需要赋值 * @return EnableTag 是否投递 TAG 信息 Format为0时,此字段不需要赋值 * */ bool GetEnableTag() const; /** * 设置是否投递 TAG 信息 Format为0时,此字段不需要赋值 * @param _enableTag 是否投递 TAG 信息 Format为0时,此字段不需要赋值 * */ void SetEnableTag(const bool& _enableTag); /** * 判断参数 EnableTag 是否已赋值 * @return EnableTag 是否已赋值 * */ bool EnableTagHasBeenSet() const; /** * 获取元数据信息列表, 可选值为:\_\_SOURCE\_\_、\_\_FILENAME\_\_ 、\_\_TIMESTAMP\_\_、\_\_HOSTNAME\_\_、\_\_PKGID\_\_ Format为0时,此字段不需要赋值 * @return MetaFields 元数据信息列表, 可选值为:\_\_SOURCE\_\_、\_\_FILENAME\_\_ 、\_\_TIMESTAMP\_\_、\_\_HOSTNAME\_\_、\_\_PKGID\_\_ Format为0时,此字段不需要赋值 * */ std::vector<std::string> GetMetaFields() const; /** * 设置元数据信息列表, 可选值为:\_\_SOURCE\_\_、\_\_FILENAME\_\_ 、\_\_TIMESTAMP\_\_、\_\_HOSTNAME\_\_、\_\_PKGID\_\_ Format为0时,此字段不需要赋值 * @param _metaFields 元数据信息列表, 可选值为:\_\_SOURCE\_\_、\_\_FILENAME\_\_ 、\_\_TIMESTAMP\_\_、\_\_HOSTNAME\_\_、\_\_PKGID\_\_ Format为0时,此字段不需要赋值 * */ void SetMetaFields(const std::vector<std::string>& _metaFields); /** * 判断参数 MetaFields 是否已赋值 * @return MetaFields 是否已赋值 * */ bool MetaFieldsHasBeenSet() const; /** * 获取tag数据处理方式: 1:不平铺(默认值) 2:平铺 注意:此字段可能返回 null,表示取不到有效值。 * @return TagTransaction tag数据处理方式: 1:不平铺(默认值) 2:平铺 注意:此字段可能返回 null,表示取不到有效值。 * */ int64_t GetTagTransaction() const; /** * 设置tag数据处理方式: 1:不平铺(默认值) 2:平铺 注意:此字段可能返回 null,表示取不到有效值。 * @param _tagTransaction tag数据处理方式: 1:不平铺(默认值) 2:平铺 注意:此字段可能返回 null,表示取不到有效值。 * */ void SetTagTransaction(const int64_t& _tagTransaction); /** * 判断参数 TagTransaction 是否已赋值 * @return TagTransaction 是否已赋值 * */ bool TagTransactionHasBeenSet() const; /** * 获取消费数据Json格式: 1:不转义(默认格式) 2:转义 * @return JsonType 消费数据Json格式: 1:不转义(默认格式) 2:转义 * */ int64_t GetJsonType() const; /** * 设置消费数据Json格式: 1:不转义(默认格式) 2:转义 * @param _jsonType 消费数据Json格式: 1:不转义(默认格式) 2:转义 * */ void SetJsonType(const int64_t& _jsonType); /** * 判断参数 JsonType 是否已赋值 * @return JsonType 是否已赋值 * */ bool JsonTypeHasBeenSet() const; private: /** * 消费格式 0:全文;1:json */ int64_t m_format; bool m_formatHasBeenSet; /** * 是否投递 TAG 信息 Format为0时,此字段不需要赋值 */ bool m_enableTag; bool m_enableTagHasBeenSet; /** * 元数据信息列表, 可选值为:\_\_SOURCE\_\_、\_\_FILENAME\_\_ 、\_\_TIMESTAMP\_\_、\_\_HOSTNAME\_\_、\_\_PKGID\_\_ Format为0时,此字段不需要赋值 */ std::vector<std::string> m_metaFields; bool m_metaFieldsHasBeenSet; /** * tag数据处理方式: 1:不平铺(默认值) 2:平铺 注意:此字段可能返回 null,表示取不到有效值。 */ int64_t m_tagTransaction; bool m_tagTransactionHasBeenSet; /** * 消费数据Json格式: 1:不转义(默认格式) 2:转义 */ int64_t m_jsonType; bool m_jsonTypeHasBeenSet; }; } } } } #endif // !TENCENTCLOUD_CLS_V20201016_MODEL_KAFKACONSUMERCONTENT_H_
ab6aa71b691fb2823000da11d65aa7847690bf3f
cfeac52f970e8901871bd02d9acb7de66b9fb6b4
/generated/src/aws-cpp-sdk-finspace/source/model/KxCluster.cpp
4cd71f3e53173d6af1c76ba203aa2a1ec4864722
[ "Apache-2.0", "MIT", "JSON" ]
permissive
aws/aws-sdk-cpp
aff116ddf9ca2b41e45c47dba1c2b7754935c585
9a7606a6c98e13c759032c2e920c7c64a6a35264
refs/heads/main
2023-08-25T11:16:55.982089
2023-08-24T18:14:53
2023-08-24T18:14:53
35,440,404
1,681
1,133
Apache-2.0
2023-09-12T15:59:33
2015-05-11T17:57:32
null
UTF-8
C++
false
false
5,220
cpp
KxCluster.cpp
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/finspace/model/KxCluster.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { namespace finspace { namespace Model { KxCluster::KxCluster() : m_status(KxClusterStatus::NOT_SET), m_statusHasBeenSet(false), m_statusReasonHasBeenSet(false), m_clusterNameHasBeenSet(false), m_clusterType(KxClusterType::NOT_SET), m_clusterTypeHasBeenSet(false), m_clusterDescriptionHasBeenSet(false), m_releaseLabelHasBeenSet(false), m_initializationScriptHasBeenSet(false), m_executionRoleHasBeenSet(false), m_azMode(KxAzMode::NOT_SET), m_azModeHasBeenSet(false), m_availabilityZoneIdHasBeenSet(false), m_lastModifiedTimestampHasBeenSet(false), m_createdTimestampHasBeenSet(false) { } KxCluster::KxCluster(JsonView jsonValue) : m_status(KxClusterStatus::NOT_SET), m_statusHasBeenSet(false), m_statusReasonHasBeenSet(false), m_clusterNameHasBeenSet(false), m_clusterType(KxClusterType::NOT_SET), m_clusterTypeHasBeenSet(false), m_clusterDescriptionHasBeenSet(false), m_releaseLabelHasBeenSet(false), m_initializationScriptHasBeenSet(false), m_executionRoleHasBeenSet(false), m_azMode(KxAzMode::NOT_SET), m_azModeHasBeenSet(false), m_availabilityZoneIdHasBeenSet(false), m_lastModifiedTimestampHasBeenSet(false), m_createdTimestampHasBeenSet(false) { *this = jsonValue; } KxCluster& KxCluster::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("status")) { m_status = KxClusterStatusMapper::GetKxClusterStatusForName(jsonValue.GetString("status")); m_statusHasBeenSet = true; } if(jsonValue.ValueExists("statusReason")) { m_statusReason = jsonValue.GetString("statusReason"); m_statusReasonHasBeenSet = true; } if(jsonValue.ValueExists("clusterName")) { m_clusterName = jsonValue.GetString("clusterName"); m_clusterNameHasBeenSet = true; } if(jsonValue.ValueExists("clusterType")) { m_clusterType = KxClusterTypeMapper::GetKxClusterTypeForName(jsonValue.GetString("clusterType")); m_clusterTypeHasBeenSet = true; } if(jsonValue.ValueExists("clusterDescription")) { m_clusterDescription = jsonValue.GetString("clusterDescription"); m_clusterDescriptionHasBeenSet = true; } if(jsonValue.ValueExists("releaseLabel")) { m_releaseLabel = jsonValue.GetString("releaseLabel"); m_releaseLabelHasBeenSet = true; } if(jsonValue.ValueExists("initializationScript")) { m_initializationScript = jsonValue.GetString("initializationScript"); m_initializationScriptHasBeenSet = true; } if(jsonValue.ValueExists("executionRole")) { m_executionRole = jsonValue.GetString("executionRole"); m_executionRoleHasBeenSet = true; } if(jsonValue.ValueExists("azMode")) { m_azMode = KxAzModeMapper::GetKxAzModeForName(jsonValue.GetString("azMode")); m_azModeHasBeenSet = true; } if(jsonValue.ValueExists("availabilityZoneId")) { m_availabilityZoneId = jsonValue.GetString("availabilityZoneId"); m_availabilityZoneIdHasBeenSet = true; } if(jsonValue.ValueExists("lastModifiedTimestamp")) { m_lastModifiedTimestamp = jsonValue.GetDouble("lastModifiedTimestamp"); m_lastModifiedTimestampHasBeenSet = true; } if(jsonValue.ValueExists("createdTimestamp")) { m_createdTimestamp = jsonValue.GetDouble("createdTimestamp"); m_createdTimestampHasBeenSet = true; } return *this; } JsonValue KxCluster::Jsonize() const { JsonValue payload; if(m_statusHasBeenSet) { payload.WithString("status", KxClusterStatusMapper::GetNameForKxClusterStatus(m_status)); } if(m_statusReasonHasBeenSet) { payload.WithString("statusReason", m_statusReason); } if(m_clusterNameHasBeenSet) { payload.WithString("clusterName", m_clusterName); } if(m_clusterTypeHasBeenSet) { payload.WithString("clusterType", KxClusterTypeMapper::GetNameForKxClusterType(m_clusterType)); } if(m_clusterDescriptionHasBeenSet) { payload.WithString("clusterDescription", m_clusterDescription); } if(m_releaseLabelHasBeenSet) { payload.WithString("releaseLabel", m_releaseLabel); } if(m_initializationScriptHasBeenSet) { payload.WithString("initializationScript", m_initializationScript); } if(m_executionRoleHasBeenSet) { payload.WithString("executionRole", m_executionRole); } if(m_azModeHasBeenSet) { payload.WithString("azMode", KxAzModeMapper::GetNameForKxAzMode(m_azMode)); } if(m_availabilityZoneIdHasBeenSet) { payload.WithString("availabilityZoneId", m_availabilityZoneId); } if(m_lastModifiedTimestampHasBeenSet) { payload.WithDouble("lastModifiedTimestamp", m_lastModifiedTimestamp.SecondsWithMSPrecision()); } if(m_createdTimestampHasBeenSet) { payload.WithDouble("createdTimestamp", m_createdTimestamp.SecondsWithMSPrecision()); } return payload; } } // namespace Model } // namespace finspace } // namespace Aws
3d2b2c2598205904887ec6c66a46e73b441f9f9d
5b36dcac15f22f4fa0f03d408fbdd361cdea4e97
/grasping_oru/aass_icr/libicr/icrcpp/include/utilities.h
95b5b164f3301db3af35b338bfe30ce4a1342876
[]
no_license
windbicycle/oru-ros-pkg
54706d94e0b085bfdf4c495aa2c2f5a36906a7f2
b93b907d634a2749a95d0e978b5236a0146c4672
refs/heads/master
2021-01-10T02:19:45.152464
2014-05-04T13:49:57
2014-05-04T13:49:57
47,093,044
6
3
null
null
null
null
UTF-8
C++
false
false
2,768
h
utilities.h
#ifndef utilities_h___ #define utilities_h___ #include <Eigen/Core> #include <Eigen/StdVector> #include <list> #include <vector> #include <tr1/memory> #define EPSILON_WRENCH_CONE_ROTATION 1e-10 #define EPSILON_UNIT_NORMAL 1e-6 #define EPSILON_FORCE_CLOSURE 1e-10 #define PI 3.14159265358979323846264338327950 #define NOT_VISITED -1 #define NOT_EXPLORED 0 #define EXPLORED_QUALIFIED 1 #define EXPLORED_UNQUALIFIED 2 namespace ICR { //-------------------------------------------------------------------- //-------------------------------------------------------------------- //Forward declerations class ContactPoint; class WrenchCone; class OWS; class Finger; class PointContactModel; class MultiPointContactModel; class FingerParameters; class SearchZones; class LimitSurface; class IndependentContactRegions; class Grasp; class TargetObject; class WrenchSpace; class SphericalWrenchSpace; class DiscreteWrenchSpace; class ObjectLoader; struct Node; struct PrimitiveSearchZone; struct Patch; struct InclusionRule; enum ContactType {Undefined_CT=1,Frictionless, Frictional, Soft_Finger}; enum ModelType {Undefined_MT=1,Single_Point,Multi_Point}; enum RuleType {Undefined_RT=1,Sphere}; enum WrenchSpaceType {Undefined_WS=1,Discrete,Spherical}; typedef unsigned int uint; typedef Eigen::Matrix<double,6,Eigen::Dynamic> Matrix6Xd; typedef Eigen::Matrix<uint,1, Eigen::Dynamic > RowVectorXui; typedef Eigen::Matrix<double,6,1> Vector6d; typedef Eigen::Matrix<uint,Eigen::Dynamic,6> MatrixX6ui; typedef Eigen::Array<uint,Eigen::Dynamic,6> ArrayX6ui; typedef Eigen::Array<uint,1,6> Array6ui; typedef Eigen::Matrix<uint,Eigen::Dynamic,1> VectorXui; typedef std::list<uint> IndexList; typedef std::list<uint>::iterator IndexListIterator; typedef std::list<uint>::const_iterator ConstIndexListIterator; typedef std::vector<ContactPoint*> ContactPointList; typedef std::vector<WrenchCone* > WrenchConeList; typedef std::vector<PrimitiveSearchZone*> SearchZone; typedef std::vector<FingerParameters> FParamList; typedef std::vector<Patch*> ContactRegion; typedef std::tr1::shared_ptr<TargetObject> TargetObjectPtr; typedef std::tr1::shared_ptr<Grasp> GraspPtr; typedef std::tr1::shared_ptr<SearchZones> SearchZonesPtr; typedef std::tr1::shared_ptr<OWS> OWSPtr; typedef std::tr1::shared_ptr<std::vector<Patch*> > PatchListPtr; typedef std::vector<std::tr1::shared_ptr<Finger> > FingerPtrList; typedef std::tr1::shared_ptr<IndependentContactRegions> IndependentContactRegionsPtr; Eigen::Matrix3d skewSymmetricMatrix(Eigen::Vector3d vector); uint factorial(uint x); uint dfactorial(uint x); //-------------------------------------------------------------------- //-------------------------------------------------------------------- }//namespace ICR #endif
066bd3e8e392f156b6cd2567c932150738fb2234
4352b5c9e6719d762e6a80e7a7799630d819bca3
/tutorials/eulerVortex.twitch/eulerVortex.cyclic.twitch.test.test/1.07/p
aa6a28ad281523d6b7d4e1c83fb5b1d03386e6a5
[]
no_license
dashqua/epicProject
d6214b57c545110d08ad053e68bc095f1d4dc725
54afca50a61c20c541ef43e3d96408ef72f0bcbc
refs/heads/master
2022-02-28T17:20:20.291864
2019-10-28T13:33:16
2019-10-28T13:33:16
184,294,390
1
0
null
null
null
null
UTF-8
C++
false
false
87,569
p
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 6 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "1.07"; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField nonuniform List<scalar> 22500 ( 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 1 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999998 0.999998 0.999999 0.999998 0.999999 0.999999 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999998 0.999998 0.999998 0.999998 0.999998 0.999998 0.999997 0.999998 0.999998 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999999 0.999999 0.999999 0.999999 0.999998 0.999998 0.999998 0.999998 0.999997 0.999997 0.999996 0.999997 0.999997 0.999997 0.999997 0.999998 0.999998 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 1 0.999999 0.999999 0.999999 0.999998 0.999998 0.999997 0.999997 0.999997 0.999996 0.999996 0.999995 0.999996 0.999995 0.999996 0.999996 0.999997 0.999998 0.999998 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 0.999999 0.999998 0.999998 0.999998 0.999997 0.999996 0.999995 0.999995 0.999994 0.999994 0.999993 0.999993 0.999993 0.999994 0.999994 0.999995 0.999997 0.999998 0.999999 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 0.999998 0.999998 0.999996 0.999996 0.999995 0.999994 0.999993 0.999992 0.999991 0.999991 0.999991 0.999991 0.999991 0.999992 0.999994 0.999995 0.999997 0.999999 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 0.999998 0.999997 0.999996 0.999995 0.999994 0.999993 0.999991 0.99999 0.999989 0.999988 0.999988 0.999988 0.999988 0.999988 0.99999 0.999991 0.999994 0.999996 0.999999 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 0.999998 0.999998 0.999998 0.999996 0.999995 0.999993 0.999992 0.999991 0.999989 0.999987 0.999985 0.999984 0.999983 0.999983 0.999983 0.999984 0.999986 0.999988 0.999991 0.999995 0.999999 1 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 0.999997 0.999996 0.999995 0.999994 0.999992 0.999989 0.999987 0.999985 0.999982 0.999981 0.999979 0.999978 0.999977 0.999978 0.999979 0.999981 0.999985 0.999989 0.999994 0.999998 1 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999998 0.999997 0.999996 0.999993 0.999992 0.999989 0.999986 0.999983 0.99998 0.999977 0.999974 0.999972 0.999971 0.99997 0.999971 0.999973 0.999976 0.99998 0.999986 0.999992 0.999998 1.00001 1.00001 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999998 0.999997 0.999996 0.999995 0.999992 0.999989 0.999986 0.999982 0.999979 0.999974 0.99997 0.999967 0.999964 0.999962 0.999961 0.999963 0.999965 0.999969 0.999975 0.999982 0.999991 1 1.00001 1.00002 1.00002 1.00003 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00003 1.00003 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999998 0.999997 0.999995 0.999993 0.99999 0.999987 0.999982 0.999977 0.999972 0.999967 0.999962 0.999957 0.999953 0.999951 0.99995 0.999952 0.999956 0.999962 0.999969 0.999979 0.99999 1 1.00001 1.00002 1.00003 1.00004 1.00005 1.00005 1.00006 1.00006 1.00005 1.00005 1.00005 1.00004 1.00004 1.00003 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999998 0.999997 0.999994 0.999991 0.999988 0.999983 0.999977 0.999971 0.999965 0.999958 0.999952 0.999946 0.999942 0.999939 0.999939 0.999942 0.999947 0.999954 0.999965 0.999977 0.999992 1.00001 1.00002 1.00004 1.00005 1.00006 1.00007 1.00007 1.00008 1.00007 1.00007 1.00007 1.00006 1.00005 1.00005 1.00004 1.00003 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999998 0.999996 0.999993 0.99999 0.999985 0.999979 0.999973 0.999965 0.999957 0.999948 0.99994 0.999933 0.999928 0.999925 0.999926 0.999929 0.999936 0.999947 0.999961 0.999978 0.999997 1.00002 1.00003 1.00005 1.00007 1.00008 1.00009 1.0001 1.0001 1.0001 1.00009 1.00009 1.00008 1.00007 1.00006 1.00005 1.00004 1.00003 1.00002 1.00002 1.00001 1.00001 1.00001 1 1 1 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999998 0.999996 0.999993 0.999988 0.999982 0.999975 0.999966 0.999957 0.999947 0.999937 0.999927 0.99992 0.999914 0.999911 0.999913 0.999918 0.999929 0.999943 0.999962 0.999983 1.00001 1.00003 1.00006 1.00008 1.0001 1.00011 1.00013 1.00013 1.00013 1.00013 1.00012 1.00011 1.0001 1.00009 1.00008 1.00006 1.00005 1.00004 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999996 0.999992 0.999986 0.999979 0.999971 0.99996 0.999949 0.999937 0.999925 0.999914 0.999906 0.9999 0.999898 0.999902 0.99991 0.999925 0.999946 0.999971 0.999999 1.00003 1.00006 1.00009 1.00012 1.00014 1.00016 1.00017 1.00018 1.00018 1.00017 1.00016 1.00015 1.00013 1.00011 1.0001 1.00008 1.00006 1.00005 1.00004 1.00003 1.00002 1.00001 1.00001 1 1 1 0.999999 0.999998 0.999998 0.999999 0.999999 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999996 0.999992 0.999985 0.999976 0.999966 0.999954 0.999941 0.999927 0.999913 0.999901 0.999892 0.999887 0.999888 0.999896 0.999909 0.999931 0.999959 0.999993 1.00003 1.00007 1.00011 1.00015 1.00018 1.00021 1.00023 1.00024 1.00024 1.00024 1.00023 1.00021 1.00019 1.00017 1.00015 1.00012 1.0001 1.00008 1.00006 1.00004 1.00003 1.00002 1.00001 1.00001 1 1 0.999999 0.999998 0.999998 0.999998 0.999998 0.999998 0.999999 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999997 0.999992 0.999985 0.999975 0.999963 0.999949 0.999934 0.999918 0.999904 0.999892 0.999884 0.999881 0.999886 0.9999 0.999922 0.999953 0.999992 1.00004 1.00009 1.00014 1.00019 1.00023 1.00027 1.0003 1.00032 1.00033 1.00033 1.00032 1.00031 1.00028 1.00025 1.00022 1.00019 1.00015 1.00012 1.0001 1.00007 1.00005 1.00004 1.00002 1.00001 1.00001 1 0.999999 0.999997 0.999996 0.999996 0.999996 0.999997 0.999997 0.999998 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1 0.999999 0.999993 0.999985 0.999974 0.999961 0.999945 0.999929 0.999912 0.999898 0.999887 0.999883 0.999886 0.999899 0.999923 0.999957 1 1.00006 1.00012 1.00018 1.00025 1.00031 1.00037 1.00041 1.00044 1.00046 1.00047 1.00046 1.00044 1.00041 1.00037 1.00033 1.00028 1.00024 1.0002 1.00015 1.00012 1.00009 1.00006 1.00004 1.00003 1.00001 1.00001 1 0.999997 0.999995 0.999994 0.999994 0.999995 0.999995 0.999996 0.999997 0.999998 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 0.999996 0.999987 0.999975 0.999961 0.999944 0.999927 0.999911 0.9999 0.999893 0.999896 0.999908 0.999934 0.999974 1.00003 1.00009 1.00017 1.00025 1.00034 1.00042 1.0005 1.00057 1.00062 1.00065 1.00067 1.00066 1.00064 1.0006 1.00056 1.0005 1.00044 1.00037 1.00031 1.00025 1.0002 1.00015 1.00011 1.00008 1.00005 1.00003 1.00001 1 0.999998 0.999994 0.999993 0.999992 0.999992 0.999993 0.999994 0.999995 0.999996 0.999997 0.999998 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 0.999991 0.999979 0.999965 0.999949 0.999934 0.999921 0.999914 0.999917 0.999931 0.999961 1.00001 1.00007 1.00015 1.00025 1.00035 1.00047 1.00058 1.00069 1.00079 1.00086 1.00092 1.00095 1.00096 1.00094 1.00089 1.00083 1.00076 1.00067 1.00058 1.00049 1.0004 1.00032 1.00025 1.00019 1.00013 1.00009 1.00006 1.00003 1.00001 1 0.999995 0.99999 0.999989 0.999988 0.999989 0.999991 0.999992 0.999994 0.999995 0.999996 0.999997 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1 0.999989 0.999975 0.999961 0.99995 0.999945 0.999949 0.999967 1 1.00006 1.00013 1.00023 1.00035 1.00049 1.00064 1.00079 1.00094 1.00108 1.0012 1.00129 1.00135 1.00138 1.00137 1.00132 1.00125 1.00115 1.00103 1.0009 1.00077 1.00064 1.00052 1.00041 1.00032 1.00023 1.00017 1.00011 1.00007 1.00004 1.00001 1 0.99999 0.999985 0.999984 0.999984 0.999985 0.999987 0.99999 0.999992 0.999994 0.999995 0.999997 0.999997 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00002 1.00001 1 0.999995 0.999987 0.999984 0.999991 1.00001 1.00006 1.00012 1.00022 1.00034 1.00049 1.00066 1.00086 1.00106 1.00127 1.00146 1.00164 1.00178 1.00189 1.00195 1.00197 1.00193 1.00185 1.00173 1.00158 1.00141 1.00122 1.00104 1.00086 1.00069 1.00054 1.00041 1.0003 1.00021 1.00014 1.00008 1.00004 1.00001 0.999996 0.999985 0.999979 0.999978 0.999978 0.999981 0.999983 0.999986 0.999989 0.999992 0.999994 0.999995 0.999997 0.999998 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00002 1.00003 1.00003 1.00004 1.00004 1.00004 1.00004 1.00004 1.00003 1.00003 1.00003 1.00003 1.00004 1.00007 1.00012 1.0002 1.00031 1.00046 1.00065 1.00086 1.00111 1.00138 1.00166 1.00193 1.00219 1.00241 1.00259 1.00271 1.00277 1.00277 1.0027 1.00257 1.00239 1.00217 1.00192 1.00166 1.00139 1.00114 1.00091 1.0007 1.00053 1.00038 1.00026 1.00017 1.0001 1.00005 1.00001 0.99999 0.999978 0.999972 0.99997 0.999971 0.999974 0.999978 0.999982 0.999986 0.999989 0.999992 0.999994 0.999996 0.999997 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00002 1.00003 1.00004 1.00004 1.00005 1.00005 1.00006 1.00006 1.00006 1.00006 1.00007 1.00008 1.00009 1.00013 1.00019 1.00029 1.00042 1.0006 1.00082 1.00109 1.00141 1.00175 1.00212 1.00249 1.00284 1.00316 1.00344 1.00366 1.0038 1.00386 1.00383 1.00371 1.00352 1.00326 1.00294 1.0026 1.00223 1.00187 1.00152 1.00121 1.00093 1.00069 1.00049 1.00033 1.00021 1.00012 1.00006 1.00001 0.999985 0.999969 0.999962 0.99996 0.999962 0.999967 0.999972 0.999977 0.999982 0.999986 0.99999 0.999993 0.999995 0.999996 0.999997 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00002 1.00003 1.00004 1.00004 1.00005 1.00006 1.00007 1.00008 1.00009 1.0001 1.00011 1.00012 1.00015 1.00019 1.00027 1.00037 1.00053 1.00074 1.001 1.00133 1.00172 1.00215 1.00262 1.0031 1.00358 1.00403 1.00443 1.00477 1.00503 1.00519 1.00524 1.00519 1.00502 1.00474 1.00438 1.00396 1.00348 1.00298 1.00249 1.00202 1.0016 1.00122 1.0009 1.00064 1.00043 1.00027 1.00015 1.00007 1.00001 0.999979 0.999959 0.999951 0.999949 0.999953 0.999958 0.999965 0.999971 0.999977 0.999983 0.999987 0.999991 0.999993 0.999995 0.999997 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00003 1.00003 1.00004 1.00006 1.00007 1.00008 1.00009 1.00011 1.00012 1.00014 1.00016 1.0002 1.00025 1.00033 1.00046 1.00063 1.00087 1.00118 1.00157 1.00203 1.00256 1.00313 1.00375 1.00436 1.00496 1.00552 1.00601 1.00642 1.00672 1.0069 1.00695 1.00686 1.00663 1.00627 1.0058 1.00523 1.00461 1.00395 1.0033 1.00268 1.00211 1.00161 1.00118 1.00084 1.00056 1.00035 1.0002 1.00009 1.00002 0.999974 0.999949 0.999938 0.999937 0.999941 0.999948 0.999956 0.999965 0.999972 0.999979 0.999984 0.999989 0.999992 0.999994 0.999996 0.999997 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00002 1.00003 1.00004 1.00006 1.00007 1.00008 1.0001 1.00012 1.00014 1.00017 1.0002 1.00024 1.0003 1.00039 1.00053 1.00072 1.00099 1.00134 1.00178 1.00232 1.00294 1.00364 1.00439 1.00516 1.00592 1.00665 1.00731 1.00788 1.00834 1.00868 1.00888 1.00893 1.00882 1.00854 1.0081 1.00751 1.0068 1.00601 1.00516 1.00432 1.00351 1.00277 1.00211 1.00155 1.0011 1.00074 1.00046 1.00026 1.00012 1.00003 0.999969 0.999938 0.999924 0.999923 0.999927 0.999936 0.999946 0.999957 0.999966 0.999974 0.999981 0.999986 0.99999 0.999993 0.999995 0.999997 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00002 1.00003 1.00004 1.00005 1.00007 1.00008 1.0001 1.00013 1.00015 1.00018 1.00022 1.00027 1.00034 1.00044 1.00058 1.00079 1.00108 1.00146 1.00195 1.00256 1.00328 1.0041 1.00499 1.00592 1.00685 1.00775 1.00857 1.0093 1.00993 1.01043 1.01079 1.01102 1.01108 1.01097 1.01067 1.01017 1.00949 1.00864 1.00768 1.00663 1.00557 1.00455 1.00359 1.00275 1.00203 1.00143 1.00097 1.00061 1.00035 1.00016 1.00004 0.999969 0.999928 0.99991 0.999907 0.999913 0.999923 0.999935 0.999948 0.99996 0.999969 0.999977 0.999983 0.999988 0.999992 0.999994 0.999996 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00002 1.00003 1.00005 1.00006 1.00008 1.0001 1.00013 1.00016 1.00019 1.00023 1.00029 1.00036 1.00047 1.00062 1.00083 1.00113 1.00154 1.00207 1.00274 1.00355 1.00449 1.00552 1.00661 1.00771 1.00876 1.00974 1.0106 1.01134 1.01196 1.01244 1.01281 1.01306 1.01316 1.01309 1.01283 1.01234 1.01162 1.01069 1.00958 1.00835 1.00707 1.0058 1.00461 1.00354 1.00262 1.00186 1.00126 1.0008 1.00046 1.00023 1.00007 0.999974 0.99992 0.999896 0.999891 0.999897 0.999909 0.999924 0.999938 0.999952 0.999963 0.999972 0.99998 0.999986 0.99999 0.999993 0.999995 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00003 1.00004 1.00005 1.00007 1.00009 1.00012 1.00015 1.00019 1.00024 1.00029 1.00037 1.00048 1.00063 1.00085 1.00115 1.00157 1.00213 1.00284 1.00373 1.00477 1.00593 1.00718 1.00844 1.00965 1.01076 1.01171 1.01249 1.01311 1.01359 1.01398 1.0143 1.01456 1.01474 1.01481 1.01469 1.01434 1.01372 1.0128 1.01163 1.01027 1.00878 1.00728 1.00583 1.00451 1.00336 1.0024 1.00164 1.00105 1.00062 1.00032 1.00011 0.999987 0.999916 0.999883 0.999874 0.99988 0.999893 0.99991 0.999927 0.999943 0.999956 0.999968 0.999977 0.999983 0.999988 0.999992 0.999995 0.999997 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00002 1.00002 1.00003 1.00005 1.00006 1.00009 1.00011 1.00014 1.00018 1.00023 1.00029 1.00037 1.00048 1.00062 1.00084 1.00114 1.00156 1.00212 1.00286 1.00379 1.00492 1.0062 1.0076 1.00902 1.01039 1.0116 1.01259 1.01332 1.01381 1.01409 1.01426 1.0144 1.01459 1.01486 1.01519 1.01552 1.01574 1.01574 1.01542 1.01472 1.01365 1.01226 1.01065 1.00894 1.00724 1.00566 1.00425 1.00307 1.00211 1.00137 1.00082 1.00043 1.00017 1.00001 0.999919 0.999873 0.999858 0.999864 0.999878 0.999897 0.999916 0.999934 0.99995 0.999963 0.999973 0.99998 0.999987 0.999991 0.999994 0.999996 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00003 1.00004 1.00005 1.00007 1.0001 1.00013 1.00017 1.00021 1.00027 1.00035 1.00045 1.0006 1.0008 1.00109 1.00149 1.00205 1.00279 1.00375 1.00493 1.00631 1.00784 1.00943 1.01095 1.01228 1.01328 1.0139 1.0141 1.01395 1.01357 1.01313 1.01281 1.01274 1.01299 1.01357 1.01436 1.0152 1.01587 1.01619 1.01603 1.01533 1.01413 1.01254 1.01071 1.00881 1.00697 1.0053 1.00386 1.00268 1.00176 1.00108 1.00059 1.00026 1.00005 0.999928 0.999867 0.999845 0.999848 0.999862 0.999882 0.999904 0.999924 0.999943 0.999958 0.999969 0.999978 0.999985 0.99999 0.999993 0.999995 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00003 1.00004 1.00006 1.00008 1.00011 1.00015 1.00019 1.00025 1.00032 1.00042 1.00056 1.00074 1.00101 1.00139 1.00192 1.00264 1.00359 1.00479 1.00624 1.00788 1.00962 1.01132 1.01278 1.01383 1.0143 1.01413 1.01334 1.01207 1.01056 1.00911 1.008 1.0075 1.00772 1.00866 1.01019 1.01203 1.01385 1.01531 1.01616 1.01625 1.01558 1.01426 1.01248 1.01047 1.00841 1.00648 1.00478 1.00336 1.00224 1.00139 1.00079 1.00037 1.00011 0.999949 0.999867 0.999835 0.999833 0.999847 0.999868 0.999892 0.999915 0.999936 0.999952 0.999964 0.999975 0.999983 0.999988 0.999992 0.999995 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00002 1.00002 1.00003 1.00005 1.00007 1.00009 1.00013 1.00017 1.00022 1.00029 1.00038 1.0005 1.00067 1.00091 1.00126 1.00174 1.00242 1.00333 1.00452 1.00599 1.00771 1.00959 1.01146 1.0131 1.01425 1.01466 1.01412 1.01259 1.01017 1.00712 1.00386 1.00084 0.998557 0.997373 0.997511 0.998989 1.0016 1.00496 1.00854 1.01183 1.01435 1.01583 1.01619 1.01552 1.01407 1.01211 1.00993 1.00778 1.00582 1.00415 1.00281 1.00178 1.00103 1.00052 1.00018 0.999984 0.999876 0.99983 0.999821 0.999833 0.999855 0.999881 0.999905 0.999927 0.999946 0.999961 0.999972 0.999981 0.999987 0.999991 0.999994 0.999996 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00003 1.00004 1.00005 1.00008 1.0001 1.00014 1.00019 1.00025 1.00033 1.00044 1.00059 1.0008 1.0011 1.00154 1.00215 1.003 1.00413 1.00558 1.00732 1.0093 1.01135 1.01321 1.01456 1.01503 1.01427 1.01208 1.00843 1.00355 0.997888 0.992086 0.986857 0.982892 0.980746 0.980748 0.98294 0.987054 0.992544 0.998671 1.00462 1.00969 1.01337 1.01544 1.01596 1.01521 1.01357 1.01144 1.00915 1.00696 1.00504 1.00346 1.00223 1.00133 1.0007 1.00029 1.00004 0.999895 0.99983 0.999812 0.999821 0.999843 0.99987 0.999897 0.99992 0.999941 0.999958 0.999969 0.999978 0.999986 0.99999 0.999994 0.999996 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00003 1.00004 1.00006 1.00008 1.00011 1.00016 1.00021 1.00028 1.00037 1.0005 1.00068 1.00094 1.00132 1.00186 1.00262 1.00366 1.00503 1.00674 1.00876 1.01095 1.01306 1.0147 1.01542 1.01469 1.0121 1.00741 1.00069 0.992355 0.983107 0.97388 0.965696 0.95951 0.956089 0.955889 0.958989 0.965054 0.973364 0.982904 0.992535 1.00118 1.00805 1.0127 1.01513 1.01562 1.01467 1.0128 1.01051 1.00816 1.00601 1.0042 1.00276 1.00168 1.00092 1.00042 1.0001 0.999926 0.999839 0.999809 0.999812 0.999833 0.999861 0.999888 0.999914 0.999935 0.999953 0.999966 0.999977 0.999984 0.999989 0.999993 0.999996 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00003 1.00004 1.00006 1.00009 1.00012 1.00017 1.00023 1.00031 1.00042 1.00057 1.00079 1.0011 1.00156 1.00222 1.00314 1.00439 1.00601 1.008 1.01027 1.01259 1.01458 1.01572 1.01533 1.01276 1.0075 0.999326 0.988454 0.975548 0.961659 0.94809 0.936208 0.927273 0.922273 0.921804 0.925992 0.934435 0.946243 0.960101 0.974476 0.987864 0.999057 1.00734 1.01254 1.01495 1.01516 1.01389 1.01178 1.00937 1.00704 1.005 1.00335 1.00209 1.00119 1.00058 1.00019 0.99997 0.999856 0.999811 0.999807 0.999825 0.999852 0.999882 0.999909 0.999931 0.99995 0.999964 0.999975 0.999983 0.999989 0.999993 0.999996 0.999997 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00003 1.00005 1.00007 1.0001 1.00013 1.00018 1.00025 1.00034 1.00046 1.00064 1.0009 1.00128 1.00183 1.00261 1.00371 1.00518 1.00707 1.00932 1.01178 1.01411 1.01576 1.016 1.01395 1.00877 0.999876 0.987116 0.970929 0.952332 0.932794 0.914044 0.897826 0.885704 0.87888 0.878083 0.883491 0.894659 0.910538 0.929525 0.949667 0.968958 0.985689 0.998741 1.00771 1.01283 1.01481 1.01452 1.01286 1.01054 1.00809 1.00586 1.00399 1.00254 1.00149 1.00077 1.00031 1.00003 0.999884 0.999821 0.999808 0.999821 0.999847 0.999876 0.999904 0.999927 0.999947 0.999962 0.999973 0.999982 0.999988 0.999992 0.999995 0.999997 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00002 1.00002 1.00003 1.00005 1.00007 1.0001 1.00014 1.00019 1.00026 1.00036 1.00051 1.00071 1.00101 1.00146 1.00211 1.00303 1.00432 1.00603 1.00816 1.01065 1.01322 1.0154 1.01644 1.01533 1.01096 1.0023 0.988742 0.970276 0.94766 0.922362 0.896344 0.87179 0.850814 0.83524 0.826455 0.82529 0.831977 0.846057 0.866377 0.891084 0.917824 0.944053 0.967474 0.986453 1.00024 1.00896 1.01336 1.01454 1.01362 1.01158 1.00913 1.00674 1.00468 1.00304 1.00183 1.00099 1.00044 1.00011 0.999924 0.999839 0.999814 0.999821 0.999845 0.999873 0.9999 0.999925 0.999945 0.999961 0.999972 0.999981 0.999988 0.999992 0.999995 0.999997 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00002 1.00002 1.00004 1.00005 1.00007 1.0001 1.00015 1.0002 1.00028 1.00039 1.00055 1.00078 1.00113 1.00165 1.0024 1.00348 1.00496 1.0069 1.00928 1.01195 1.01454 1.01637 1.01645 1.01348 1.00608 0.993066 0.973832 0.948627 0.918647 0.885898 0.852883 0.822232 0.796376 0.777328 0.766583 0.765037 0.772967 0.789947 0.81478 0.845464 0.879304 0.913229 0.944299 0.970255 0.989886 1.00309 1.01064 1.0138 1.01399 1.01243 1.01009 1.00762 1.0054 1.00358 1.00221 1.00124 1.0006 1.0002 0.999975 0.999866 0.999826 0.999825 0.999845 0.999871 0.999898 0.999923 0.999944 0.99996 0.999971 0.999981 0.999987 0.999992 0.999994 0.999997 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00002 1.00002 1.00004 1.00005 1.00007 1.00011 1.00015 1.00021 1.00029 1.00041 1.00059 1.00085 1.00125 1.00184 1.0027 1.00393 1.0056 1.00777 1.01037 1.01317 1.01565 1.01692 1.01568 1.01033 0.99919 0.980972 0.955178 0.922417 0.884438 0.843863 0.803745 0.767102 0.736593 0.714308 0.70176 0.699852 0.708892 0.728529 0.757622 0.794135 0.835151 0.877135 0.91649 0.950247 0.976608 0.995126 1.00651 1.0122 1.01385 1.01303 1.01095 1.00848 1.00612 1.00414 1.00261 1.00151 1.00077 1.00031 1.00004 0.999901 0.999844 0.999835 0.999849 0.999873 0.999899 0.999923 0.999943 0.999959 0.999971 0.99998 0.999987 0.999991 0.999994 0.999996 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00002 1.00002 1.00004 1.00005 1.00007 1.00011 1.00015 1.00021 1.0003 1.00043 1.00062 1.00092 1.00136 1.00203 1.003 1.00438 1.00625 1.00863 1.01142 1.01427 1.01651 1.01698 1.01406 1.00581 0.99031 0.966188 0.933168 0.892349 0.846128 0.797789 0.750896 0.708766 0.674153 0.649104 0.635046 0.632826 0.642762 0.664617 0.697402 0.739196 0.787006 0.836953 0.88482 0.926874 0.960621 0.985142 1.00099 1.00969 1.01318 1.01333 1.01167 1.00927 1.00684 1.00471 1.00303 1.0018 1.00096 1.00043 1.00011 0.999946 0.99987 0.999849 0.999856 0.999877 0.999901 0.999924 0.999943 0.99996 0.999972 0.99998 0.999987 0.999992 0.999995 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00002 1.00002 1.00003 1.00005 1.00007 1.00011 1.00015 1.00021 1.00031 1.00044 1.00065 1.00098 1.00147 1.00221 1.00329 1.00483 1.00688 1.00945 1.01238 1.01521 1.01706 1.01652 1.0116 1.00003 0.979662 0.949146 0.908535 0.859528 0.805249 0.74963 0.696682 0.649891 0.611967 0.584797 0.569612 0.567149 0.577717 0.601214 0.636895 0.683095 0.736914 0.794281 0.850446 0.900911 0.942395 0.973393 0.994179 1.00631 1.01196 1.01331 1.01221 1.00999 1.00752 1.00528 1.00346 1.00211 1.00117 1.00057 1.0002 0.999999 0.999903 0.999869 0.999868 0.999884 0.999906 0.999927 0.999945 0.999961 0.999973 0.999981 0.999987 0.999992 0.999995 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00003 1.00005 1.00007 1.0001 1.00015 1.00021 1.00031 1.00045 1.00068 1.00103 1.00157 1.00238 1.00357 1.00524 1.00747 1.01021 1.01324 1.01597 1.01732 1.01556 1.0084 0.9932 0.967656 0.930528 0.882301 0.825361 0.763588 0.701523 0.643513 0.593082 0.552761 0.524174 0.508283 0.505654 0.516574 0.541089 0.578767 0.628304 0.687062 0.750943 0.814793 0.87339 0.922626 0.960309 0.986329 1.00219 1.01025 1.01299 1.01258 1.01061 1.00816 1.00583 1.00389 1.00242 1.00139 1.00071 1.00029 1.00006 0.999941 0.999894 0.999885 0.999895 0.999913 0.999932 0.999949 0.999963 0.999974 0.999982 0.999988 0.999992 0.999995 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00003 1.00005 1.00007 1.0001 1.00014 1.0002 1.0003 1.00045 1.00069 1.00107 1.00165 1.00253 1.00382 1.00563 1.00801 1.01089 1.01398 1.01654 1.01729 1.0142 1.00462 0.985653 0.954864 0.911203 0.855673 0.791394 0.722988 0.655529 0.593576 0.540569 0.498754 0.469419 0.453209 0.450484 0.4615 0.486452 0.525249 0.577025 0.639527 0.708792 0.779403 0.845506 0.902174 0.946465 0.977793 0.997524 1.00814 1.0124 1.01277 1.01113 1.00874 1.00635 1.00431 1.00273 1.00161 1.00086 1.0004 1.00013 0.999986 0.999923 0.999905 0.999908 0.999922 0.999938 0.999953 0.999966 0.999975 0.999983 0.999989 0.999993 0.999995 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00003 1.00004 1.00006 1.00009 1.00013 1.00019 1.00029 1.00045 1.0007 1.00109 1.00171 1.00266 1.00404 1.00596 1.00848 1.01148 1.01458 1.01693 1.01701 1.01253 1.00052 0.977826 0.941968 0.892146 0.829921 0.759155 0.685156 0.613431 0.548634 0.494024 0.451497 0.42196 0.405741 0.402976 0.413885 0.438802 0.477973 0.530996 0.596081 0.669522 0.745789 0.818512 0.881996 0.932536 0.969012 0.992574 1.00577 1.0116 1.01281 1.01155 1.00926 1.00683 1.00471 1.00304 1.00183 1.00102 1.0005 1.0002 1.00004 0.999957 0.999928 0.999924 0.999933 0.999946 0.999959 0.99997 0.999978 0.999985 0.99999 0.999993 0.999996 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00002 1.00002 1.00004 1.00005 1.00008 1.00012 1.00018 1.00028 1.00044 1.00069 1.00111 1.00176 1.00276 1.00422 1.00624 1.00887 1.01196 1.01505 1.01716 1.01656 1.01072 0.996385 0.970206 0.929696 0.874342 0.806272 0.730035 0.651543 0.57663 0.509948 0.454517 0.411867 0.382515 0.366486 0.363724 0.374393 0.398955 0.437954 0.491434 0.558093 0.634562 0.715319 0.793608 0.863059 0.919241 0.960476 0.987652 1.00333 1.01069 1.01275 1.01187 1.00971 1.00727 1.00508 1.00332 1.00204 1.00117 1.00061 1.00028 1.00009 0.999994 0.999954 0.999943 0.999946 0.999955 0.999965 0.999974 0.999981 0.999987 0.999991 0.999994 0.999996 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00003 1.00005 1.00007 1.0001 1.00016 1.00026 1.00042 1.00068 1.00111 1.00178 1.00282 1.00435 1.00646 1.00917 1.01233 1.01539 1.01725 1.01603 1.00895 0.992532 0.963286 0.918758 0.858717 0.78581 0.705194 0.623272 0.546112 0.478304 0.422604 0.380195 0.351244 0.335507 0.332769 0.343145 0.367191 0.405689 0.459086 0.526531 0.605026 0.689144 0.771866 0.846274 0.907283 0.952685 0.983083 1.001 1.00978 1.01262 1.01212 1.0101 1.00766 1.00541 1.00359 1.00225 1.00132 1.00072 1.00035 1.00014 1.00003 0.999983 0.999963 0.999961 0.999966 0.999972 0.999979 0.999985 0.99999 0.999993 0.999995 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00002 1.00002 1.00004 1.00006 1.00009 1.00014 1.00023 1.00039 1.00065 1.00109 1.00179 1.00286 1.00443 1.0066 1.00939 1.01258 1.01561 1.01726 1.0155 1.00738 0.989256 0.957523 0.909782 0.846058 0.769425 0.685531 0.601152 0.522508 0.454108 0.398463 0.356454 0.327966 0.312541 0.309837 0.319934 0.343442 0.381324 0.434335 0.502021 0.581728 0.668178 0.754196 0.832445 0.897307 0.946109 0.979179 0.998988 1.00896 1.01249 1.01232 1.01041 1.00799 1.0057 1.00383 1.00243 1.00146 1.00082 1.00043 1.0002 1.00008 1.00001 0.999986 0.999977 0.999977 0.999981 0.999985 0.999989 0.999993 0.999995 0.999996 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00002 1.00003 1.00004 1.00007 1.00012 1.0002 1.00036 1.00062 1.00105 1.00176 1.00285 1.00445 1.00667 1.0095 1.01273 1.01572 1.01721 1.01506 1.00618 0.986814 0.953296 0.903278 0.836981 0.757785 0.671682 0.585709 0.506173 0.437515 0.382049 0.340436 0.312357 0.2972 0.294536 0.304418 0.32748 0.364799 0.417338 0.484935 0.565229 0.6531 0.741308 0.82223 0.889857 0.941152 0.976217 0.997451 1.00834 1.01239 1.01248 1.01067 1.00826 1.00594 1.00403 1.00259 1.00158 1.00092 1.0005 1.00026 1.00012 1.00005 1.00001 0.999994 0.999989 0.999989 0.999991 0.999993 0.999995 0.999997 0.999998 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00002 1.00003 1.00005 1.00009 1.00017 1.00032 1.00057 1.001 1.00171 1.00281 1.00442 1.00666 1.00952 1.01276 1.01574 1.01714 1.01477 1.00546 0.985397 0.950879 0.899603 0.831901 0.751322 0.664045 0.577242 0.497278 0.428538 0.373241 0.331904 0.304098 0.289125 0.286505 0.296268 0.319054 0.35598 0.408114 0.47547 0.555884 0.644377 0.733711 0.816118 0.88535 0.938135 0.974413 0.996527 1.00798 1.01236 1.01261 1.01087 1.00846 1.00613 1.00419 1.00272 1.00169 1.00101 1.00057 1.00031 1.00016 1.00008 1.00003 1.00001 1 0.999999 0.999998 0.999998 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999999 1 0.999999 1 1 1.00001 1.00003 1.00006 1.00014 1.00027 1.00052 1.00094 1.00164 1.00273 1.00434 1.00658 1.00944 1.01269 1.01568 1.01708 1.01467 1.0053 0.985115 0.950427 0.898945 0.831025 0.750241 0.662793 0.575869 0.495857 0.427143 0.37192 0.330683 0.302975 0.288079 0.285505 0.295265 0.317981 0.35475 0.406639 0.473707 0.55388 0.642274 0.731711 0.814408 0.884043 0.937256 0.973908 0.996302 1.00794 1.01242 1.01273 1.011 1.0086 1.00626 1.00431 1.00283 1.00178 1.00108 1.00063 1.00036 1.0002 1.00011 1.00006 1.00003 1.00002 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 0.999999 0.999997 0.999996 0.999995 0.999993 0.999993 0.999996 1.00001 1.00004 1.0001 1.00022 1.00046 1.00086 1.00154 1.00261 1.0042 1.00642 1.00927 1.01252 1.01553 1.01701 1.01478 1.00571 0.98599 0.951962 0.901321 0.834362 0.754533 0.6679 0.581562 0.50187 0.433274 0.378031 0.336713 0.308925 0.294 0.291473 0.301347 0.324204 0.361058 0.41288 0.479648 0.559258 0.646869 0.735405 0.8172 0.886029 0.938584 0.974747 0.996806 1.00823 1.01259 1.01283 1.01108 1.00867 1.00633 1.00438 1.0029 1.00185 1.00114 1.00069 1.0004 1.00024 1.00014 1.00008 1.00005 1.00003 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 0.999999 1 1 0.999999 0.999999 0.999998 0.999997 0.999995 0.999992 0.999988 0.999986 0.999982 0.999981 0.999986 1.00001 1.00006 1.00017 1.00039 1.00078 1.00143 1.00246 1.00402 1.00619 1.00901 1.01225 1.0153 1.01695 1.01507 1.00665 0.987956 0.955384 0.906591 0.841723 0.763989 0.679157 0.594137 0.515199 0.446869 0.391569 0.35004 0.322031 0.306995 0.30452 0.314618 0.337795 0.374935 0.426816 0.493223 0.571915 0.658044 0.744674 0.824385 0.891214 0.942051 0.976882 0.998001 1.00883 1.01284 1.01291 1.01109 1.00866 1.00633 1.0044 1.00293 1.00189 1.00118 1.00073 1.00044 1.00027 1.00016 1.0001 1.00006 1.00004 1.00003 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999998 0.999998 0.999997 0.999996 0.999992 0.999989 0.999984 0.999979 0.999971 0.999966 0.999966 0.999981 1.00002 1.00012 1.00032 1.00068 1.0013 1.00229 1.00379 1.0059 1.00866 1.01187 1.01499 1.01685 1.01549 1.00802 0.990865 0.960472 0.914459 0.852749 0.778205 0.696181 0.613264 0.53562 0.467837 0.412555 0.370781 0.342489 0.327299 0.324899 0.335303 0.358926 0.396459 0.448417 0.514283 0.591599 0.675481 0.759185 0.835651 0.89933 0.947447 0.980162 0.999794 1.00967 1.01314 1.01295 1.01102 1.00858 1.00627 1.00437 1.00293 1.00191 1.00121 1.00076 1.00048 1.0003 1.00019 1.00012 1.00008 1.00005 1.00003 1.00002 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999999 0.999998 0.999997 0.999996 0.999994 0.99999 0.999986 0.99998 0.999972 0.999962 0.999952 0.999948 0.999953 0.999986 1.00007 1.00025 1.00058 1.00116 1.00209 1.00352 1.00555 1.00823 1.0114 1.01458 1.01671 1.01598 1.0097 0.994489 0.9669 0.924493 0.866924 0.796609 0.718405 0.638465 0.562771 0.495978 0.440969 0.399051 0.370518 0.355202 0.352912 0.363675 0.387779 0.425681 0.477562 0.542538 0.617873 0.698648 0.778377 0.850479 0.909947 0.954444 0.984358 1.00203 1.01068 1.01345 1.01292 1.01087 1.00842 1.00615 1.00429 1.00289 1.0019 1.00122 1.00078 1.0005 1.00032 1.00021 1.00014 1.00009 1.00006 1.00004 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 0.999998 0.999997 0.999995 0.999994 0.999988 0.999984 0.999976 0.999966 0.999953 0.99994 0.999931 0.999929 0.999951 1.00002 1.00018 1.00047 1.00101 1.00188 1.00322 1.00515 1.00773 1.01084 1.01406 1.01647 1.01644 1.01152 0.998561 0.974267 0.936149 0.883585 0.81847 0.745079 0.669063 0.596123 0.530939 0.476639 0.434873 0.406268 0.390927 0.38881 0.399926 0.424433 0.462509 0.513949 0.577467 0.650049 0.726765 0.801462 0.868154 0.922481 0.962607 0.989174 1.00453 1.01174 1.01371 1.0128 1.01063 1.00818 1.00596 1.00416 1.00282 1.00187 1.00122 1.00079 1.00051 1.00034 1.00022 1.00015 1.0001 1.00007 1.00005 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999998 0.999997 0.999995 0.999992 0.999987 0.999981 0.999972 0.99996 0.999947 0.999929 0.999915 0.999907 0.999919 0.999974 1.00011 1.00037 1.00085 1.00166 1.0029 1.00472 1.00717 1.01019 1.01343 1.01611 1.0168 1.01331 1.00278 0.982111 0.948798 0.901943 0.8429 0.775282 0.704164 0.634908 0.572134 0.519175 0.478026 0.449671 0.434499 0.432606 0.44401 0.468704 0.506562 0.556981 0.618266 0.687159 0.758797 0.827449 0.887807 0.936235 0.971428 0.994272 1.00709 1.01273 1.01387 1.01258 1.01029 1.00786 1.00571 1.00399 1.00271 1.00181 1.0012 1.00079 1.00052 1.00035 1.00024 1.00016 1.00011 1.00008 1.00005 1.00004 1.00002 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 0.999998 0.999996 0.999994 0.999991 0.999986 0.99998 0.999969 0.999956 0.999941 0.999921 0.999902 0.999888 0.999892 0.999931 1.00004 1.00027 1.0007 1.00143 1.00257 1.00426 1.00656 1.00946 1.01269 1.01559 1.01696 1.01489 1.00684 0.989953 0.961763 0.921122 0.868857 0.807896 0.742658 0.678079 0.61865 0.567839 0.527942 0.500286 0.485537 0.483931 0.495471 0.519981 0.557039 0.605651 0.66376 0.727935 0.793473 0.855168 0.908462 0.950455 0.980371 0.999303 1.0095 1.01356 1.01386 1.01222 1.00985 1.00746 1.0054 1.00378 1.00258 1.00174 1.00116 1.00077 1.00052 1.00035 1.00024 1.00017 1.00012 1.00008 1.00006 1.00004 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999998 0.999997 0.999994 0.999991 0.999985 0.999978 0.999968 0.999953 0.999936 0.999914 0.999893 0.999873 0.999868 0.999895 0.999982 1.00018 1.00056 1.00121 1.00224 1.00378 1.00593 1.00867 1.01184 1.0149 1.01688 1.01614 1.01048 0.997343 0.974362 0.940207 0.895217 0.84163 0.783171 0.724271 0.669189 0.62144 0.583553 0.557145 0.543115 0.541827 0.553265 0.577092 0.612613 0.658493 0.71239 0.770807 0.829321 0.883338 0.929082 0.964379 0.98892 1.00394 1.01157 1.01413 1.01367 1.01172 1.00931 1.007 1.00505 1.00354 1.00243 1.00164 1.00111 1.00075 1.00051 1.00035 1.00025 1.00017 1.00012 1.00009 1.00006 1.00004 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 1 1 1 1 1 1 0.999999 0.999998 0.999998 0.999996 0.999993 0.99999 0.999984 0.999977 0.999966 0.999952 0.999932 0.999911 0.999885 0.999862 0.999849 0.999864 0.999931 1.0001 1.00042 1.00099 1.00191 1.00331 1.00527 1.00784 1.01089 1.01404 1.0165 1.01694 1.01348 1.00388 0.985976 0.958311 0.920812 0.875079 0.824123 0.771804 0.722048 0.678305 0.643222 0.618638 0.605629 0.604657 0.615683 0.638242 0.671408 0.713583 0.762256 0.813999 0.864775 0.910666 0.948678 0.977302 0.996615 1.00792 1.01317 1.01437 1.01325 1.01109 1.00868 1.00647 1.00466 1.00326 1.00225 1.00154 1.00105 1.00072 1.0005 1.00035 1.00025 1.00017 1.00012 1.00009 1.00006 1.00004 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999997 0.999996 0.999993 0.99999 0.999984 0.999976 0.999965 0.99995 0.999931 0.999907 0.999881 0.999854 0.999835 0.99984 0.999888 1.00002 1.0003 1.00079 1.0016 1.00284 1.00462 1.00698 1.00988 1.01303 1.01583 1.01723 1.01568 1.00929 0.996092 0.974644 0.944555 0.906836 0.863838 0.818775 0.775171 0.736275 0.704751 0.68253 0.670805 0.670107 0.680381 0.701071 0.731088 0.768667 0.811264 0.855655 0.898296 0.935963 0.966393 0.988655 1.00311 1.01105 1.01419 1.01425 1.01263 1.01033 1.00798 1.00591 1.00424 1.00298 1.00206 1.00142 1.00098 1.00068 1.00048 1.00034 1.00024 1.00017 1.00012 1.00009 1.00006 1.00004 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999998 0.999997 0.999996 0.999993 0.99999 0.999985 0.999977 0.999965 0.999951 0.999932 0.999907 0.999878 0.99985 0.999826 0.999821 0.999854 0.999958 1.00019 1.00061 1.00131 1.0024 1.00398 1.00612 1.00882 1.01189 1.01488 1.017 1.01702 1.01336 1.00436 0.988601 0.965514 0.935629 0.900664 0.86322 0.826317 0.792901 0.765524 0.746099 0.735861 0.735368 0.74457 0.762859 0.789062 0.821371 0.857337 0.894051 0.928532 0.958242 0.981572 0.998041 1.00819 1.01323 1.01463 1.01378 1.0118 1.00946 1.00722 1.00532 1.00381 1.00268 1.00186 1.0013 1.00091 1.00064 1.00045 1.00032 1.00023 1.00017 1.00012 1.00009 1.00006 1.00004 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999998 0.999998 0.999996 0.999993 0.99999 0.999984 0.999977 0.999966 0.999951 0.999933 0.999907 0.999879 0.999849 0.99982 0.999809 0.999828 0.999906 1.00009 1.00044 1.00104 1.00198 1.00337 1.00529 1.00775 1.01065 1.0137 1.01629 1.0175 1.01607 1.01059 0.999809 0.983028 0.960442 0.933212 0.903345 0.873322 0.845716 0.822821 0.806455 0.797817 0.797463 0.805348 0.820856 0.842812 0.869479 0.898631 0.92776 0.954457 0.97683 0.993812 1.00526 1.01178 1.01445 1.01449 1.013 1.01081 1.00852 1.00643 1.00471 1.00337 1.00238 1.00167 1.00117 1.00083 1.00059 1.00042 1.00031 1.00022 1.00016 1.00012 1.00008 1.00006 1.00004 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999999 0.999999 0.999998 0.999996 0.999994 0.99999 0.999985 0.999978 0.999967 0.999954 0.999933 0.99991 0.999882 0.999851 0.999822 0.999803 0.99981 0.999868 1.00001 1.0003 1.00081 1.0016 1.00281 1.00449 1.00669 1.00938 1.01235 1.0152 1.01723 1.01747 1.01479 1.00813 0.996772 0.980641 0.960481 0.937748 0.914395 0.89255 0.874198 0.86096 0.853932 0.853656 0.860088 0.872638 0.890208 0.91123 0.933784 0.955822 0.975482 0.991424 1.00301 1.01031 1.01393 1.01479 1.01385 1.01195 1.00971 1.00753 1.00564 1.00411 1.00294 1.00208 1.00147 1.00104 1.00074 1.00054 1.00039 1.00029 1.00021 1.00015 1.00011 1.00008 1.00006 1.00004 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999999 0.999997 0.999996 0.999994 0.999991 0.999986 0.999979 0.999969 0.999955 0.999937 0.999915 0.999887 0.999857 0.999824 0.999803 0.9998 0.999839 0.999955 1.00018 1.0006 1.00127 1.00229 1.00375 1.00568 1.00811 1.01091 1.01381 1.01632 1.01772 1.01715 1.01371 1.00674 0.996036 0.981991 0.965607 0.948341 0.931872 0.917836 0.907594 0.902108 0.901856 0.906807 0.916443 0.929798 0.945532 0.962076 0.977844 0.991476 1.00207 1.00931 1.01337 1.01482 1.01439 1.01282 1.01072 1.00854 1.00654 1.00486 1.00353 1.00253 1.0018 1.00128 1.00092 1.00066 1.00049 1.00036 1.00027 1.0002 1.00015 1.00011 1.00008 1.00005 1.00004 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999998 0.999996 0.999995 0.999992 0.999987 0.99998 0.99997 0.999958 0.999941 0.99992 0.999892 0.999863 0.999832 0.999807 0.999799 0.999822 0.999908 1.00009 1.00043 1.00098 1.00184 1.00307 1.00475 1.00689 1.00945 1.01225 1.01496 1.01706 1.01793 1.01685 1.01324 1.00683 0.997782 0.986733 0.974707 0.962962 0.952768 0.945224 0.941125 0.940871 0.944437 0.951397 0.960958 0.972043 0.983439 0.993981 1.00273 1.00913 1.01305 1.01474 1.01467 1.01342 1.01151 1.00939 1.00736 1.00557 1.00412 1.00299 1.00215 1.00154 1.0011 1.0008 1.00059 1.00043 1.00032 1.00024 1.00018 1.00013 1.0001 1.00007 1.00005 1.00004 1.00002 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999999 0.999999 0.999998 0.999997 0.999994 0.999992 0.999988 0.999982 0.999973 0.999961 0.999946 0.999925 0.9999 0.999872 0.999841 0.999816 0.999802 0.999812 0.999876 1.00002 1.00029 1.00074 1.00144 1.00248 1.0039 1.00575 1.00802 1.01061 1.0133 1.01575 1.0175 1.018 1.01679 1.01358 1.00837 1.00153 0.993753 0.985908 0.978936 0.973681 0.970755 0.970481 0.972847 0.97752 0.983887 0.991141 0.998398 1.00484 1.00986 1.01315 1.01472 1.01479 1.01376 1.01205 1.01004 1.00803 1.0062 1.00466 1.00343 1.00249 1.00179 1.00129 1.00094 1.00069 1.00051 1.00038 1.00029 1.00022 1.00016 1.00012 1.00009 1.00007 1.00005 1.00003 1.00002 1.00002 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 0.999997 0.999995 0.999993 0.999989 0.999983 0.999975 0.999964 0.999949 0.999932 0.999908 0.999882 0.999853 0.999827 0.99981 0.999812 0.999856 0.999965 1.00018 1.00054 1.00111 1.00196 1.00315 1.00472 1.00668 1.00899 1.01152 1.01404 1.01622 1.01767 1.01803 1.01703 1.01458 1.01087 1.00631 1.00149 0.997065 0.993628 0.991644 0.991348 0.992744 0.995597 0.999455 1.00375 1.00787 1.01129 1.01365 1.0148 1.01481 1.0139 1.01235 1.01047 1.00853 1.00671 1.00512 1.00382 1.0028 1.00204 1.00147 1.00107 1.00079 1.00059 1.00044 1.00034 1.00026 1.00019 1.00015 1.00011 1.00008 1.00006 1.00004 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999998 0.999997 0.999996 0.999994 0.99999 0.999985 0.999978 0.999968 0.999955 0.999938 0.999917 0.999892 0.999867 0.999839 0.999821 0.999821 0.999847 0.999926 1.0001 1.00038 1.00084 1.00153 1.0025 1.00381 1.00546 1.00747 1.00974 1.01213 1.01443 1.01635 1.01762 1.01801 1.0174 1.01585 1.01358 1.01096 1.00841 1.00633 1.00505 1.00475 1.00543 1.00692 1.00894 1.0111 1.01302 1.01437 1.01496 1.01476 1.01384 1.01241 1.01066 1.00882 1.00705 1.00547 1.00414 1.00307 1.00225 1.00164 1.00119 1.00088 1.00065 1.00049 1.00038 1.00029 1.00022 1.00017 1.00013 1.0001 1.00007 1.00005 1.00004 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 0.999998 0.999996 0.999994 0.999991 0.999986 0.99998 0.999972 0.999959 0.999945 0.999926 0.999905 0.99988 0.999857 0.999836 0.99983 0.999847 0.999908 1.00003 1.00026 1.00062 1.00117 1.00196 1.00302 1.0044 1.00609 1.00805 1.01021 1.01241 1.01446 1.01616 1.01732 1.01781 1.01763 1.01687 1.01573 1.01447 1.01335 1.01258 1.01228 1.01246 1.01303 1.01379 1.01452 1.01499 1.01504 1.01457 1.01361 1.01224 1.01062 1.0089 1.00722 1.00568 1.00436 1.00327 1.00242 1.00177 1.0013 1.00095 1.00071 1.00054 1.00041 1.00032 1.00025 1.00019 1.00015 1.00011 1.00009 1.00006 1.00005 1.00003 1.00002 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999998 0.999997 0.999995 0.999992 0.999989 0.999982 0.999975 0.999965 0.999951 0.999935 0.999915 0.999894 0.999872 0.999853 0.999845 0.999854 0.999896 0.999993 1.00017 1.00045 1.00088 1.00151 1.00237 1.00348 1.00488 1.00653 1.00839 1.01037 1.01234 1.01414 1.01562 1.01669 1.01728 1.01742 1.0172 1.01676 1.01626 1.01583 1.01554 1.01541 1.0154 1.01538 1.01524 1.01486 1.01417 1.01315 1.01185 1.01035 1.00876 1.00719 1.00573 1.00446 1.00338 1.00252 1.00186 1.00137 1.00101 1.00075 1.00057 1.00043 1.00034 1.00027 1.00021 1.00017 1.00013 1.0001 1.00008 1.00006 1.00004 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 0.999999 0.999999 0.999997 0.999995 0.999993 0.99999 0.999985 0.999978 0.999968 0.999959 0.999942 0.999927 0.999907 0.999886 0.999872 0.999859 0.999865 0.999898 0.999965 1.0001 1.00032 1.00066 1.00115 1.00183 1.00272 1.00384 1.0052 1.00676 1.00845 1.01021 1.01191 1.01345 1.01472 1.01567 1.01628 1.01656 1.0166 1.01647 1.01625 1.01598 1.01569 1.01534 1.01489 1.01428 1.01347 1.01244 1.01121 1.00984 1.0084 1.00698 1.00563 1.00443 1.0034 1.00256 1.0019 1.0014 1.00103 1.00077 1.00058 1.00044 1.00035 1.00028 1.00022 1.00018 1.00014 1.00011 1.00009 1.00007 1.00005 1.00004 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 0.999998 0.999996 0.999993 0.999992 0.999987 0.999981 0.999974 0.999962 0.999953 0.999935 0.999921 0.999904 0.999886 0.999879 0.999879 0.9999 0.999954 1.00005 1.00023 1.00049 1.00087 1.0014 1.0021 1.00299 1.00407 1.00534 1.00675 1.00824 1.00973 1.01115 1.01242 1.01346 1.01424 1.01476 1.01503 1.01509 1.01499 1.01475 1.01438 1.01388 1.01323 1.01243 1.01146 1.01035 1.00914 1.00786 1.00659 1.00538 1.00427 1.00332 1.00252 1.00188 1.00139 1.00102 1.00076 1.00057 1.00044 1.00034 1.00027 1.00022 1.00018 1.00015 1.00012 1.00009 1.00007 1.00006 1.00004 1.00003 1.00002 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999998 0.999997 0.999995 0.999992 0.999989 0.999984 0.999977 0.99997 0.999958 0.999948 0.999932 0.999917 0.999906 0.999894 0.999895 0.999911 0.99995 1.00003 1.00016 1.00036 1.00065 1.00106 1.0016 1.00229 1.00315 1.00415 1.00528 1.0065 1.00775 1.00898 1.01011 1.01109 1.01188 1.01245 1.0128 1.01295 1.0129 1.01268 1.0123 1.01176 1.01107 1.01024 1.00929 1.00824 1.00715 1.00605 1.00499 1.00401 1.00314 1.00241 1.00181 1.00134 1.00099 1.00073 1.00054 1.00041 1.00033 1.00026 1.00021 1.00018 1.00015 1.00012 1.0001 1.00008 1.00006 1.00005 1.00003 1.00003 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999998 0.999997 0.999996 0.999993 0.99999 0.999987 0.999981 0.999974 0.999967 0.999954 0.999945 0.999931 0.999919 0.999912 0.99991 0.999922 0.999951 1.00001 1.00011 1.00026 1.00049 1.0008 1.00122 1.00175 1.00241 1.00319 1.00407 1.00504 1.00605 1.00705 1.008 1.00885 1.00955 1.01008 1.01043 1.01058 1.01056 1.01035 1.00999 1.00948 1.00883 1.00807 1.00721 1.00631 1.00539 1.00449 1.00364 1.00288 1.00223 1.00168 1.00125 1.00092 1.00067 1.0005 1.00038 1.00029 1.00024 1.00019 1.00016 1.00014 1.00012 1.0001 1.00008 1.00006 1.00005 1.00004 1.00003 1.00002 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999998 0.999998 0.999996 0.999995 0.999992 0.999989 0.999985 0.999979 0.999971 0.999965 0.999952 0.999943 0.999936 0.999925 0.999927 0.999934 0.999956 1 1.00008 1.00019 1.00037 1.0006 1.00092 1.00132 1.00183 1.00242 1.0031 1.00385 1.00463 1.00543 1.00618 1.00687 1.00745 1.00789 1.00819 1.00832 1.0083 1.00812 1.00778 1.00733 1.00677 1.00611 1.0054 1.00466 1.00392 1.00321 1.00256 1.00199 1.00151 1.00112 1.00082 1.0006 1.00044 1.00032 1.00025 1.0002 1.00017 1.00014 1.00012 1.00011 1.00009 1.00008 1.00006 1.00005 1.00004 1.00003 1.00002 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999999 0.999999 0.999998 0.999997 0.999996 0.999993 0.999992 0.999988 0.999981 0.999978 0.999969 0.999963 0.999954 0.999946 0.999943 0.999938 0.999947 0.999965 0.999996 1.00006 1.00015 1.00027 1.00046 1.00069 1.001 1.00138 1.00182 1.00234 1.0029 1.0035 1.0041 1.00468 1.00521 1.00566 1.00601 1.00624 1.00633 1.0063 1.00614 1.00586 1.00547 1.005 1.00447 1.00389 1.00331 1.00274 1.0022 1.00173 1.00131 1.00098 1.00071 1.00051 1.00036 1.00026 1.0002 1.00016 1.00013 1.00011 1.0001 1.00009 1.00008 1.00007 1.00006 1.00005 1.00004 1.00003 1.00003 1.00002 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 0.999999 0.999998 0.999998 0.999997 0.999995 0.999993 0.99999 0.999987 0.99998 0.999977 0.999969 0.999963 0.999958 0.999952 0.999954 0.999957 0.999971 1 1.00004 1.00011 1.00022 1.00035 1.00053 1.00075 1.00104 1.00137 1.00175 1.00217 1.00261 1.00306 1.00349 1.00388 1.00422 1.00447 1.00463 1.0047 1.00465 1.00451 1.00427 1.00395 1.00357 1.00315 1.0027 1.00226 1.00183 1.00144 1.0011 1.00081 1.00058 1.00041 1.00028 1.00019 1.00014 1.00011 1.00009 1.00008 1.00007 1.00007 1.00006 1.00006 1.00005 1.00005 1.00004 1.00003 1.00003 1.00002 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 0.999998 0.999997 0.999996 0.999994 0.999992 0.999989 0.999986 0.99998 0.999977 0.999971 0.999966 0.999965 0.999963 0.999968 0.99998 1 1.00004 1.00009 1.00017 1.00027 1.0004 1.00058 1.00078 1.00103 1.00131 1.00161 1.00193 1.00226 1.00257 1.00285 1.00309 1.00326 1.00337 1.00339 1.00334 1.00321 1.00302 1.00276 1.00247 1.00214 1.0018 1.00147 1.00116 1.00089 1.00065 1.00046 1.00031 1.0002 1.00012 1.00008 1.00005 1.00004 1.00004 1.00004 1.00004 1.00005 1.00005 1.00004 1.00004 1.00004 1.00003 1.00003 1.00002 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 1 0.999999 0.999999 0.999998 0.999997 0.999996 0.999994 0.999991 0.999987 0.999986 0.999981 0.999978 0.999975 0.999971 0.999974 0.999976 0.999986 1.00001 1.00003 1.00007 1.00013 1.00021 1.00031 1.00044 1.00059 1.00077 1.00097 1.00119 1.00142 1.00165 1.00187 1.00207 1.00223 1.00234 1.0024 1.0024 1.00235 1.00223 1.00207 1.00187 1.00164 1.00139 1.00115 1.00091 1.00069 1.0005 1.00034 1.00021 1.00012 1.00006 1.00002 1 1 1 1.00001 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999998 0.999997 0.999997 0.999995 0.999993 0.999991 0.999988 0.999987 0.999982 0.99998 0.99998 0.99998 0.999984 0.999992 1.00001 1.00003 1.00006 1.00011 1.00017 1.00024 1.00034 1.00045 1.00058 1.00073 1.00088 1.00105 1.0012 1.00136 1.00148 1.00159 1.00166 1.00168 1.00167 1.00161 1.00151 1.00138 1.00122 1.00105 1.00086 1.00068 1.00051 1.00036 1.00024 1.00013 1.00006 1 0.999974 0.99996 0.999959 0.999965 0.999977 0.999988 0.999999 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 0.999999 0.999999 0.999999 0.999999 0.999999 0.999996 0.999996 0.999994 0.999993 0.999992 0.999989 0.999988 0.999986 0.999985 0.999987 0.999989 0.999997 1.00001 1.00003 1.00005 1.00009 1.00013 1.0002 1.00026 1.00035 1.00044 1.00055 1.00066 1.00077 1.00088 1.00098 1.00106 1.00112 1.00116 1.00116 1.00114 1.00108 1.001 1.00089 1.00077 1.00064 1.0005 1.00037 1.00025 1.00015 1.00007 1 0.999961 0.999935 0.999925 0.999925 0.999934 0.999946 0.999962 0.999976 0.99999 0.999999 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 0.999998 0.999997 0.999996 0.999995 0.999993 0.999992 0.99999 0.99999 0.999989 0.999991 0.999993 1 1.00001 1.00003 1.00005 1.00007 1.00011 1.00015 1.00021 1.00027 1.00034 1.00041 1.00049 1.00057 1.00064 1.00071 1.00076 1.00079 1.00081 1.0008 1.00077 1.00072 1.00064 1.00056 1.00046 1.00036 1.00026 1.00017 1.00009 1.00002 0.999968 0.999931 0.999908 0.999898 0.9999 0.99991 0.999923 0.999939 0.999955 0.999971 0.999983 0.999994 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999998 0.999997 0.999997 0.999996 0.999996 0.999994 0.999994 0.999992 0.999993 0.999995 0.999997 1 1.00001 1.00002 1.00004 1.00006 1.00009 1.00013 1.00017 1.00021 1.00026 1.00031 1.00037 1.00042 1.00047 1.00051 1.00054 1.00056 1.00056 1.00054 1.00051 1.00047 1.0004 1.00034 1.00026 1.00019 1.00011 1.00005 0.999992 0.999946 0.999913 0.999893 0.999885 0.999885 0.999893 0.999906 0.999922 0.999938 0.999955 0.999968 0.999981 0.999991 0.999997 1 1 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999998 0.999997 0.999996 0.999996 0.999995 0.999995 0.999995 0.999997 1 1 1.00001 1.00002 1.00003 1.00005 1.00008 1.0001 1.00013 1.00016 1.0002 1.00024 1.00028 1.00032 1.00035 1.00037 1.00039 1.0004 1.00039 1.00037 1.00034 1.0003 1.00025 1.00019 1.00013 1.00008 1.00002 0.999978 0.999939 0.99991 0.999891 0.999881 0.99988 0.999885 0.999896 0.99991 0.999926 0.999942 0.999957 0.999969 0.99998 0.999989 0.999995 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999999 0.999999 0.999998 0.999999 0.999997 0.999998 0.999997 0.999997 0.999997 0.999998 0.999998 1 1 1.00001 1.00002 1.00003 1.00004 1.00006 1.00008 1.0001 1.00013 1.00016 1.00019 1.00022 1.00024 1.00026 1.00027 1.00028 1.00028 1.00027 1.00025 1.00022 1.00019 1.00015 1.0001 1.00006 1.00002 0.999976 0.999942 0.999915 0.999897 0.999886 0.999883 0.999886 0.999894 0.999906 0.999919 0.999933 0.999947 0.999961 0.999973 0.999981 0.999988 0.999994 0.999998 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999999 1 0.999998 0.999999 0.999998 0.999997 0.999998 0.999998 0.999998 0.999999 1 1 1.00001 1.00002 1.00003 1.00004 1.00005 1.00006 1.00008 1.0001 1.00012 1.00014 1.00016 1.00018 1.0002 1.0002 1.0002 1.0002 1.00019 1.00017 1.00015 1.00012 1.00008 1.00005 1.00002 0.999983 0.999953 0.999929 0.999911 0.999899 0.999894 0.999893 0.999898 0.999906 0.999917 0.999929 0.999942 0.999954 0.999965 0.999974 0.999983 0.999989 0.999994 0.999997 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 1 1 1 1.00001 1.00001 1.00002 1.00003 1.00004 1.00005 1.00007 1.00008 1.0001 1.00011 1.00013 1.00014 1.00015 1.00015 1.00015 1.00015 1.00014 1.00012 1.0001 1.00007 1.00005 1.00002 0.999992 0.999967 0.999945 0.999928 0.999916 0.999908 0.999904 0.999907 0.999912 0.99992 0.99993 0.99994 0.999951 0.999962 0.99997 0.999978 0.999985 0.999991 0.999994 0.999997 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 0.999999 1 1 1 1 1 1.00001 1.00001 1.00002 1.00002 1.00003 1.00004 1.00005 1.00006 1.00007 1.00009 1.0001 1.0001 1.00011 1.00011 1.00011 1.00011 1.0001 1.00008 1.00006 1.00005 1.00002 1 0.999983 0.999964 0.999948 0.999935 0.999925 0.999921 0.99992 0.999921 0.999926 0.999933 0.999941 0.999951 0.99996 0.999968 0.999975 0.999982 0.999987 0.999991 0.999994 0.999997 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 1 0.999999 0.999999 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00003 1.00003 1.00004 1.00005 1.00006 1.00007 1.00007 1.00008 1.00008 1.00009 1.00008 1.00008 1.00007 1.00006 1.00004 1.00003 1.00001 0.999995 0.999979 0.999965 0.999952 0.999944 0.999937 0.999933 0.999933 0.999936 0.99994 0.999946 0.999953 0.99996 0.999967 0.999973 0.99998 0.999985 0.99999 0.999992 0.999995 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00002 1.00003 1.00003 1.00004 1.00005 1.00005 1.00006 1.00006 1.00006 1.00006 1.00006 1.00006 1.00005 1.00004 1.00003 1.00002 1.00001 0.999992 0.99998 0.999969 0.99996 0.999953 0.999949 0.999947 0.999946 0.999948 0.999952 0.999957 0.999963 0.999968 0.999974 0.999979 0.999984 0.999987 0.999991 0.999994 0.999996 0.999998 0.999998 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 0.999999 1 0.999999 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00003 1.00004 1.00004 1.00004 1.00005 1.00005 1.00005 1.00005 1.00004 1.00004 1.00003 1.00002 1.00001 1 0.999991 0.999982 0.999974 0.999968 0.999962 0.999958 0.999958 0.999958 0.99996 0.999962 0.999966 0.99997 0.999975 0.99998 0.999984 0.999987 0.999991 0.999993 0.999995 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00004 1.00004 1.00003 1.00003 1.00003 1.00002 1.00001 1.00001 1 0.999992 0.999985 0.99998 0.999975 0.999971 0.999968 0.999967 0.999968 0.999969 0.999971 0.999973 0.999977 0.999981 0.999985 0.999987 0.99999 0.999993 0.999995 0.999996 0.999997 0.999998 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00001 1.00001 0.999999 0.999994 0.999989 0.999983 0.99998 0.999977 0.999975 0.999975 0.999975 0.999976 0.999978 0.999981 0.999983 0.999985 0.999988 0.99999 0.999993 0.999994 0.999996 0.999997 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1 0.999999 0.999995 0.999991 0.999988 0.999985 0.999983 0.999982 0.999981 0.999981 0.999982 0.999984 0.999985 0.999987 0.999989 0.999991 0.999993 0.999994 0.999995 0.999996 0.999998 0.999999 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 0.999999 0.999996 0.999993 0.999991 0.999989 0.999987 0.999986 0.999986 0.999986 0.999987 0.999988 0.999989 0.99999 0.999991 0.999993 0.999994 0.999995 0.999996 0.999997 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 0.999999 0.999997 0.999995 0.999993 0.999991 0.999991 0.99999 0.99999 0.99999 0.99999 0.999991 0.999992 0.999993 0.999994 0.999995 0.999996 0.999997 0.999998 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 1 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 0.999998 0.999997 0.999995 0.999994 0.999993 0.999993 0.999993 0.999993 0.999993 0.999993 0.999994 0.999995 0.999995 0.999996 0.999997 0.999997 0.999998 0.999999 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 0.999999 0.999997 0.999997 0.999996 0.999995 0.999995 0.999995 0.999995 0.999995 0.999995 0.999996 0.999996 0.999997 0.999997 0.999998 0.999999 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 0.999997 0.999997 0.999997 0.999997 0.999996 0.999996 0.999996 0.999997 0.999997 0.999997 0.999998 0.999998 0.999999 0.999999 0.999999 0.999999 1 1 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999998 0.999998 0.999998 0.999998 0.999997 0.999997 0.999998 0.999998 0.999998 0.999998 0.999998 0.999999 1 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 0.999999 0.999998 0.999999 0.999998 0.999998 0.999998 0.999998 0.999999 0.999999 0.999999 1 0.999999 0.999999 0.999999 1 1 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 0.999999 0.999998 0.999999 0.999999 0.999999 0.999999 0.999999 1 1 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 1 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 1 1 1 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 1 1 0.999999 1 1 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 1 1 1 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 1 1 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ) ; boundaryField { emptyPatches_empt { type empty; } top_cyc { type cyclic; } bottom_cyc { type cyclic; } inlet_cyc { type cyclic; } outlet_cyc { type cyclic; } } // ************************************************************************* //