blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
3
264
content_id
stringlengths
40
40
detected_licenses
listlengths
0
85
license_type
stringclasses
2 values
repo_name
stringlengths
5
140
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
905 values
visit_date
timestamp[us]date
2015-08-09 11:21:18
2023-09-06 10:45:07
revision_date
timestamp[us]date
1997-09-14 05:04:47
2023-09-17 19:19:19
committer_date
timestamp[us]date
1997-09-14 05:04:47
2023-09-06 06:22:19
github_id
int64
3.89k
681M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]date
2012-06-07 00:51:45
2023-09-14 21:58:39
gha_created_at
timestamp[us]date
2008-03-27 23:40:48
2023-08-21 23:17:38
gha_language
stringclasses
141 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
10.4M
extension
stringclasses
115 values
content
stringlengths
3
10.4M
authors
listlengths
1
1
author_id
stringlengths
0
158
234f0fe16235ce0ecea6f4a9ff6ab4f8e5141bdd
b7b78ff0e51257bb4d1669ab76c329f213795da1
/NeHe Tutorials/lesson02/glwidget.h
1dd540b5f616fcc69d63aaf1b2cff781d6522d5b
[]
no_license
peteristhegreat/qt-redbook-nehe-opengl
67dcd95db5fa22e4c7cdd43392554be50e86ad2f
8db5a02af7e480074effef481ee1b64628bce122
refs/heads/master
2021-01-22T19:26:11.518576
2015-03-03T15:58:18
2015-03-03T15:58:18
31,606,841
2
2
null
null
null
null
UTF-8
C++
false
false
607
h
/* * This code was created by Jeff Molofee 1999 * And ported to C++/Qt4 by Wesley Stessens 2009 * * Contact Jeff through his website: http://nehe.gamedev.net/ * Contact Wesley for port-specific comments: wesley@ubuntu.com */ #ifndef GLWIDGET_H #define GLWIDGET_H #include <QGLWidget> #include <GL/GLU.h> class GLWidget : public QGLWidget { Q_OBJECT public: GLWidget(); ~GLWidget(); protected: void initializeGL(); void resizeGL(int width, int height); void paintGL(); void keyPressEvent(QKeyEvent *event); void changeEvent(QEvent *event); }; #endif // GLWIDGET_H
[ "peter.hyatt@gmail.com" ]
peter.hyatt@gmail.com
dcf63439b8e6eb9bda8180715cc5cf0da0c95bc2
dd6ad7444def2be540f006d42801bf1cb0187713
/Source.cpp
b8487c006547a65a0e418428da58d645fea18a0f
[ "MIT" ]
permissive
bjomar/lilcppmtex
7133f905dc6b1a37327e1c4d24f5cd3c5ffeaec6
a2b609ae2d724b77a3712c790ac41c442d2eb8b5
refs/heads/master
2020-08-30T13:41:18.604467
2019-10-30T21:26:33
2019-10-30T21:26:33
218,394,361
0
0
null
null
null
null
UTF-8
C++
false
false
4,616
cpp
#include <iostream> #include <vector> #include <fstream> //threading libs #include <thread> #include <future> using matrix = std::vector<std::vector<int>>; void printm(matrix& m) { std::cout << "matrix is: " << m.size() << " x " << m[0].size() << std::endl; for (size_t i = 0; i < m.size(); i++) { for (size_t j = 0; j < m[0].size(); j++) { std::cout << "[" << m[i][j] << "]"; } std::cout << std::endl; } std::cout << std::endl; std::cout << std::endl; } static matrix operator * (matrix& m1, matrix& m2) { if (!(m1.size() == m2[0].size() && m2.size() == m1[0].size())) return matrix(); matrix res; int b = 0; for (size_t i = 0; i < m1.size(); i++) { res.push_back(std::vector<int>()); for (size_t j = 0; j < m2[0].size(); j++) { for (size_t k = 0; k < m1[0].size(); k++) { b += m1[i][k] * m2[k][j]; } res[i].push_back(b); b = 0; } } return res; } matrix sub_matrix(matrix& m, int startRow, int endRow, int startCol, int endCol) { matrix subMat; for (size_t i = startRow; i < endRow; i++) { subMat.push_back(std::vector<int>()); for (size_t j = startCol; j < endCol; j++) { subMat[subMat.size() - 1].push_back(m[i][j]); } } return subMat; } void app_col(matrix& dst, matrix& m) { if (dst.size() != m.size() && dst.size()) return; if (dst.size() == 0) dst = matrix(m.size()); for (size_t i = 0; i < dst.size(); i++) { for (size_t j = 0; j < m[0].size(); j++) { dst.at(i).push_back(m[i][j]); } } } void app_row(matrix& dst, matrix& m) { for (auto v : m) dst.push_back(v); } matrix merge_matrices(std::vector<matrix> matrices, int colappBreaker) { matrix merged; matrix b; int i = 0; for (matrix m : matrices) { if (i == colappBreaker) { app_row(merged, b); b = matrix(); i = 0; } app_col(b, m); i++; } app_row(merged, b); return merged; } matrix matmul(matrix& m1, matrix& m2) { return m1 * m2; } // it is advised to use a number for threads that fulfills sqrt(threads) elemnt N // we will expect the matresses to be nxm with 2|n and m, and m*n is possible matrix multMultiThread(matrix& m1, matrix& m2, unsigned int threads) { #ifdef STATIC_4_T matrix r1 = sub_matrix(m1, 0, m1.size() / 2, 0, m1[0].size()), r2 = sub_matrix(m1, m1.size() / 2, m1.size(), 0, m1[0].size()); matrix l1 = sub_matrix(m2, 0, m2.size(), 0, m2[0].size() / 2), l2 = sub_matrix(m2, 0, m2.size(), m2[0].size() / 2, m2[0].size()); auto f1 = std::async([&]() {return r1 * l1; }); auto f2 = std::async([&]() {return r1 * l2; }); auto f3 = std::async([&]() {return r2 * l1; }); auto f4 = std::async([&]() {return r2 * l2; }); std::vector<matrix> mx = { f1.get(), f2.get(), f3.get(), f4.get() }; int splits = 2; #elif !STATIC_4_T int splits = sqrt(threads); std::vector<matrix> r, l; //split matrices for (size_t i = 0; i < splits; i++) { r.push_back(sub_matrix(m1, i * (m1.size() / splits), (i + 1) * (m1.size() / splits), 0, m1[0].size())); l.push_back(sub_matrix(m2, 0, m2.size(), i * (m2[0].size() / splits), (i + 1) * (m2[0].size() / splits))); } std::vector<std::future<matrix>> fs; //spawn threads via std::async, mainly used because it returns a future wich offers a syncronasation point for (size_t i = 0; i < splits; i++) { for (size_t j = 0; j < splits; j++) { fs.push_back(std::async([&, i, j]() {return r.at(i) * l.at(j); })); } } std::vector<matrix> mx; //wait for all thread to finish //wait is made so that the matrices are also in correct order for (size_t i = 0; i < threads; i++) { mx.push_back(fs[i].get()); } #endif auto res = merge_matrices(mx, splits); return res; } void init_random_sqare_matrix(matrix& m, unsigned int size) { for (size_t i = 0; i < size; i++) { m.push_back(std::vector<int>()); for (size_t j = 0; j < size; j++) { m[i].push_back(rand() % 2); } } } void printm_in_file(const char* name, matrix& m) { std::fstream f; f.open(name, std::ios::out); for (size_t i = 0; i < m.size(); i++) { for (size_t j = 0; j < m[0].size(); j++) { f << "[" << m[i][j] << "]"; } f << std::endl; } } int main() { matrix m1, m2; init_random_sqare_matrix(m1, 3000); init_random_sqare_matrix(m2, 3000); auto startTime = std::chrono::system_clock::now(); auto r = multMultiThread(m1, m2, 1); auto endTime = std::chrono::system_clock::now(); std::chrono::duration<double> elapsedSecs = endTime - startTime; std::cout << "calculation done in: " << elapsedSecs.count() << "seconds" << std::endl; printm_in_file("result.txt", r); std::cout << "result written in file"; std::cin.get(); }
[ "bm502101@fh-muenster.de" ]
bm502101@fh-muenster.de
26b302f72d16ac6e6e0174cf0d5f5e12899b1805
a463276ac63c97815d60730322497f608e9fec0f
/Deft/tags/start/src/Values.cxx
63772dd97c4c657f3022d4955733c65572a54545
[]
no_license
hjmjohnson/test_teem
89507bcde1176c0ea757da008f185087546dc8ee
ba26af49236165dab8c6560a775bdbacc0a147e0
refs/heads/master
2021-03-19T02:44:41.769844
2020-02-14T12:32:40
2020-02-14T12:32:40
247,125,406
0
0
null
null
null
null
UTF-8
C++
false
false
2,532
cxx
/* Deft: experiments in minimalist scientific visualization Copyright (C) 2005 Gordon Kindlmann Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "Values.H" namespace Deft { Values::Values(size_t size1, const gageKind *kind, std::vector<int> item) { char me[]="Values::Values", labelBuff[AIR_STRLEN_MED], *err; _size1 = size1; _kind = kind; _item = item; _size0 = 0; sprintf(labelBuff, "gage(%s:", kind->name); for (unsigned int ii=0; ii<item.size(); ii++) { _size0 += gageKindAnswerLength(kind, item[ii]); if (ii) { strcat(labelBuff, ","); } strcat(labelBuff, airEnumStr(kind->enm, item[ii])); } strcat(labelBuff, ")"); // fprintf(stderr, "%s: labelBuff = |%s|\n", me, labelBuff); if (_size0) { _nvalues = nrrdNew(); if (nrrdMaybeAlloc_va(_nvalues, nrrdTypeDouble, 2, _size0, _size1)) { fprintf(stderr, "%s: trouble:\n%s", me, err=biffGetDone(NRRD)); exit(1); } _nvalues->axis[0].label = airStrdup(labelBuff); } else { _nvalues = NULL; } // fprintf(stderr, "%s: data at %p\n", me, _nvalues->data); return; } Values::~Values() { if (_nvalues) { nrrdNuke(_nvalues); } } void Values::save() { char fname[AIR_STRLEN_MED]; if (_nvalues) { strcpy(fname, "values"); for (unsigned int ii=0; ii<_item.size(); ii++) { strcat(fname, "-"); strcat(fname, airEnumStr(_kind->enm, _item[ii])); } strcat(fname, ".nrrd"); nrrdSave(fname, _nvalues, NULL); } } } /* namespace Deft */
[ "nobody@3d70eeeb-363e-0410-a505-8a46323a89f2" ]
nobody@3d70eeeb-363e-0410-a505-8a46323a89f2
993dede10e1caefd0086df84919b840eaf961bf1
11704d7d8a7cf2c35550137794bab0c993f03348
/src/cell.cpp
dcf5a0150c3b4062aee1d993c1d9585871791370
[ "MIT" ]
permissive
guildenstern70/playground
0a65dc69100fe2a8ee7b1313f333109882f70477
23d60933a378f5b062b9716011dd05a3f9f8fb05
refs/heads/master
2020-05-18T17:56:26.757990
2014-01-08T11:52:23
2014-01-08T11:52:23
15,733,850
1
0
null
null
null
null
UTF-8
C++
false
false
509
cpp
/* * * CELL.CPP * Cell class * * (C) Alessio Saltarin 2014 * */ #include "cell.h" #include <string> #include <sstream> const char* Cell::tostring() const { ostringstream cell_representation; cell_representation << "["; cell_representation.width(2); cell_representation << _x << ","; cell_representation.width(2); cell_representation << _y << "]: (" << _color << "," << _value << ")" << ends; return cell_representation.str().c_str(); }
[ "alessiosaltarin@gmail.com" ]
alessiosaltarin@gmail.com
8be66e9931dae4f63f02bbd750059b13bb6ae736
ec11179770ec8e573267aed78bbd087affab841c
/labfeb14task2/labfeb14task2/personType.h
35150fedda49867817f3aece1bbc87c525018796
[]
no_license
jinxTelesis/cpp230
30d8cdd08744a791b9554bb702e260adb7e772b0
08aca6a293a3a80315993794b2dc071763b507aa
refs/heads/master
2021-10-10T12:24:36.753746
2019-01-10T18:30:02
2019-01-10T18:30:02
121,046,545
0
0
null
2018-03-02T17:58:13
2018-02-10T19:24:21
C++
UTF-8
C++
false
false
717
h
#pragma once #include <string> using namespace std; class personType { public: void print() const; void setName(string first, string last); void setNameTest(string first, string last); bool testName(string firstT, string lastT); bool testName(); void setNameFir(string first); void setNameLas(string last); void setNameMid(string middle); void setNameFirt(string firstT); void setNamelasT(string lastT); string getFirstName() const; string getLastName() const; string getFirstNameT() const; string getLastNameT() const; personType(string first = "", string last = ""); private: string firstName; string lastName; string middleName; string firstNameT; string lastNameT; bool result = false; };
[ "dremon7@hotmail.com" ]
dremon7@hotmail.com
0b22e2a6b1b43acab5afd693fa2c7cf77a4329a8
1825800f6cf66d299496ab66066f5f4786719ffa
/src/datagen.cpp
6cdcc3063599661b0422b06dff068f065cfcfa64
[]
no_license
mikgral/Master_thesis
e5aebe2b84b0efa3054a70e977877ae10eb16e69
5a5b750d3f9c69829aedad3ef88d89291e4899be
refs/heads/master
2020-03-22T08:16:29.803632
2018-09-10T21:37:42
2018-09-10T21:37:42
139,756,364
0
0
null
null
null
null
UTF-8
C++
false
false
4,216
cpp
#include "performance.h" void DataGenerator::performActionOnGeneratedData(const unsigned char &data_char, unsigned int index) { if (check_for_errors) { if (data[index] != data_char) errors += 1; } else { data[index] = data_char; } } void DataGenerator::asic() { uint16_t amplitude = 0x123; // 16b uint64_t timestamp = 0; // 36b const uint8_t max_id = 15; // 4b const uint8_t max_channel = 255; // 8b const uint16_t max_amplitude = 65535; // 16b const uint64_t max_timestamp = 68719476735; // 36b unsigned char asic_data[8]; uint8_t id = 1; uint8_t channel = 1; unsigned int i_data = 0; while (i_data < pattern_size) { timestamp = i_data + 1; asic_data[0] = static_cast<unsigned char>(id); asic_data[0] += static_cast<unsigned char>(channel << 4); // ID and half of channel asic_data[1] = static_cast<unsigned char>(channel >> 4); asic_data[1] += static_cast<unsigned char>(amplitude << 4); // second half of CHANNEL and 1/4 of AMPLITUDE asic_data[2] = static_cast<unsigned char>(amplitude >> 4); // 1/2 of AMPLITUDE asic_data[3] = static_cast<unsigned char>(amplitude >> 12); asic_data[3] += static_cast<unsigned char>(timestamp << 4); // 1/4 of AMPLITUDE and 1/9 of TIMESTAMP asic_data[4] = static_cast<unsigned char>(timestamp >> 4); // 2/9 of TIMESTAMP asic_data[5] = static_cast<unsigned char>(timestamp >> 12); // 2/9 of TIMESTAMP asic_data[6] = static_cast<unsigned char>(timestamp >> 20); // 2/9 of TIMESTAMP asic_data[7] = static_cast<unsigned char>(timestamp >> 28); // 2/9 of TIMESTAMP amplitude = (amplitude << 1) | ((((amplitude >> 11)^(amplitude >> 5)^(amplitude >> 3)) & 1)); // {amplitude[15:0], amplitude[11] ^ amplitude[5] ^ amplitude[3]}; so: x^12 + x^6 + x^4 for (std::size_t i = 0; i < sizeof(asic_data); i++) { if (check_for_errors && i >= 3) break; performActionOnGeneratedData(asic_data[i], i_data + i); } i_data += 8; if (channel == max_channel) { channel = 1; ++id; } else { ++channel; } if (id == max_id) { id = 1; } } } void DataGenerator::walking1() { uint64_t iter = 1; uint64_t last_possible_value = max_register_size / 2 + 1; for (unsigned int i=0; i < pattern_size; i+=register_size) { for (unsigned int j=0; j < register_size; j++) { unsigned char data_char = static_cast<unsigned char>((iter >> j*8) & 0xFF); performActionOnGeneratedData(data_char, i+j); } if (iter == last_possible_value) iter = 1; else iter *= 2; } } void DataGenerator::counter32Bit() { uint64_t iter = 0; for (unsigned int i = 0; i < pattern_size; i+=register_size) { for (unsigned int j = 0; j < register_size; j++) { unsigned char data_char = static_cast<unsigned char>((iter >> j*8) & 0xFF); performActionOnGeneratedData(data_char, i+j); } if (iter > max_register_size) iter = 0; else ++iter; } } void DataGenerator::counter8Bit() { uint64_t iter = 0; for (unsigned int i = 0; i < pattern_size; i++) { unsigned char data_char = static_cast<unsigned char>(iter); performActionOnGeneratedData(data_char, i); if (iter > max_register_size) iter = 0; else ++iter; } } void DataGenerator::determineRegisterParameters() { if (mode == BIT32 || mode == DUPLEX) { register_size = 4; max_register_size = std::numeric_limits<unsigned int>::max(); } else if (mode == NONSYM) { register_size = 8; max_register_size = std::numeric_limits<uint64_t>::max(); } else { LOG(FATAL) << "Wrong width mode detected"; } DLOG(INFO) << "Register size set to: " << register_size; DLOG(INFO) << "Max register size set to: " << max_register_size; } void DataGenerator::generateData() { determineRegisterParameters(); switch(pattern) { case COUNTER_8BIT: counter8Bit(); break; case COUNTER_32BIT: counter32Bit(); break; case WALKING_1: walking1(); break; case ASIC: asic(); break; } DLOG(INFO) << "Data to write generated"; } void DataGenerator::fillArrayWithData(unsigned char *data) { check_for_errors = false; this->data = data; generateData(); } unsigned int DataGenerator::checkArrayForErrors(unsigned char *data) { check_for_errors = true; this->data = data; generateData(); return errors; }
[ "mg@mg.com" ]
mg@mg.com
f7fdc911893433702063d4abbca0a405af1c3f66
622df67006344be452e62f9b346ec438337f0cab
/codejam/qual21/score.cpp
574af18234caae5a925cadaa3b04e178304ef065
[]
no_license
arpu-nagar/Coding
090981921cdeac70641fdb602ebfdad8b49d4867
ec71c039784d423eae67b3a5c070c21117771edc
refs/heads/master
2023-07-14T12:15:35.601131
2021-08-31T05:53:22
2021-08-31T05:53:22
252,650,938
0
0
null
null
null
null
UTF-8
C++
false
false
1,746
cpp
// author: arpunagar #include <bits/stdc++.h> using namespace std; using ll = long long int; typedef pair<int, int> pi; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<string> vs; #define inv(v) \ for (auto &it : v) \ cin >> it; #define MOD 1000000007 #define pb push_back #define popb pop_back() #define endl "\n" #define fi first #define se second #define ar array typedef priority_queue<ll, vector<ll>, greater<ll>> minheap; typedef priority_queue<ll> maxheap; #define sortv(v) sort(v.begin(),v.end()) #define db(x) cout << (#x) << " is " << (x) << endl; #define rsortv(v) sort(v.begin(),v.end(), greater<>()); ll nCr(ll n, ll r) { ll res = 1; if (r > n - r) { r = n - r; } for(int i=0;i<r;i++) { res *= (n - i); res /= (i + 1); } return res; } void solve(){ int x; cin >> x; int arr[100][100]; for(int i = 0;i<100;i++){ string s; cin >> s; for(int j = 0;j<100;j++){ arr[i][j] = s[j]=='1'? 1:0; } } // int cheaters = 0; int tot[100]; memset(tot,0,sizeof(tot)); for(int i = 0;i<100;i++){ for(int j = 0;j<100;j++){ tot[j]+=arr[i][j]; } } int cheaters = 0; double avg = 0; for(int i = 0;i<100;i++){ avg+=tot[i]; } avg = avg*1.0; avg /= 100.0; for(int i=0;i<100;i++){ if(tot[i] > avg) cheaters++; } cout << cheaters << '\n'; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int tt; cin >> tt; for(int i = 1;i<=tt;i++){ cout << "Case #" << i << ": "; solve(); } // solve(); return 0; }
[ "arpnagar1@gmail.com" ]
arpnagar1@gmail.com
3d004d6ee827e59dc71e492a6c51ac025d8961b2
ac48be2df07d4d15314cbd32ea264cec50a0b8d4
/examples/cellCollision/cellCollision.cpp
8ac54ca5e9b32b16c96bc42f21f4cf5fa0b4240d
[]
no_license
jacktreado/cells
7e69dea098e1e9d48385403acec4fab857e11cbf
f2ba418f045778e7544d51b7b5002d14a2d33396
refs/heads/master
2021-07-24T05:32:04.451302
2021-07-23T18:46:33
2021-07-23T18:46:33
207,389,696
4
2
null
null
null
null
UTF-8
C++
false
false
6,396
cpp
/* Test .cpp file to test forces and print functions on two cells colliding */ // include file #include "deformableParticles2D.h" // use std name space using namespace std; // define PI const double PI = 4.0*atan(1); int main(){ // local main variables int i,t,d; double postmp,veltmp,anew; double dx,dy,dnorm,dscale; ofstream vertexPrintObject; ofstream energyPrintObject; string vertexPositionsStr = "/Users/JackTreado/Jamming/Flowers/sim/cells/examples/cellCollision/cellCollisionPositions.dat"; string energyStr = "/Users/JackTreado/Jamming/Flowers/sim/cells/examples/cellCollision/cellCollisionEnergy.dat"; // open output files vertexPrintObject.open(vertexPositionsStr.c_str()); if (!vertexPrintObject.is_open()){ std::cout << " ERROR: vertex positions output file not open, file string " << vertexPositionsStr << " is not functioning, ending." << std::endl; return 1; } energyPrintObject.open(energyStr.c_str()); if (!energyPrintObject.is_open()){ std::cout << " ERROR: energy output file not open, file string " << energyStr << " is not functioning, ending." << std::endl; return 1; } // box variables double L = 30.0; // Basic cell variables (cells will be identical) int NV = 30; double kl,ka,gam,kb,kint,l0,a0,del,C,l,segmentMass; double asphericity; double polyRad; // set l0 to 1 l0 = 1.0; // set interaction distance to a fraction of l0 del = 1.0*l0; // set attraction parameter to be 0, which is in units of delta C = 0.0; l = 0.0; // deformability asphericity = 1.06; a0 = (NV*NV*l0*l0)/(4*PI*asphericity); // size polyRad = sqrt((2*a0)/(NV*sin(2*PI/NV))); // using perimeter and area force kl = 1.0; ka = 1.0; kb = 1.0; // set a strong interaction parameter kint = 1.0; // NOT using surface tension and bending force gam = 0.0; // get segment mass segmentMass = l0*del + (PI*del*0.5*del*0.5); // instantiate 2 cell objects deformableParticles2D cell1(NV); deformableParticles2D cell2(NV); // set box for both cells cell1.setL(L); cell2.setL(L); // set initial position of cells to be on either side of box, // on slightly different lines so the cells bounce off of one another // and scatter cell1.setCPos(0,0.3*L); cell1.setCPos(1,0.55*L); cell2.setCPos(0,0.7*L); cell2.setCPos(1,0.45*L); // set values for dimensional quantities to set scales cell1.setl0(l0); cell1.seta0(a0); cell1.setdel(del); cell1.setC(C); cell1.setl(l); cell2.setl0(l0); cell2.seta0(a0); cell2.setdel(del); cell2.setC(C); cell2.setl(l); // set force constants cell1.setkl(kl); cell1.setka(ka); cell1.setgam(gam); cell1.setkb(kb); cell1.setkint(kint); cell2.setkl(kl); cell2.setka(ka); cell2.setgam(gam); cell2.setkb(kb); cell2.setkint(kint); // initialize both objects to be regular polygons cout << "making both cells regular polygons" << endl; cell1.regularPolygon(); cell2.regularPolygon(a0); cout << "perturbing perimeter slightly" << endl; cell1.vertexPerturbation(0.4); cell2.vertexPerturbation(0.4); cout << "initial area = " << cell1.area() << endl; cout << "a0 = " << a0 << endl; // run cell collision event int NT = 10000; int NFRAMES = 1000; int NPRINT = floor(NT/(NFRAMES-1)); int printCount = 0; int inContact = 0; double timeScale = sqrt((segmentMass*l0*l0)/kint); double dt = 0.05*timeScale; // use damping double dampingParam = 0.0*sqrt(segmentMass*kint); // print initial configuration cout << "printing INITIAL vertex positions" << endl; // print sim details as header vertexPrintObject << setw(12) << left << "START" << " " << endl; vertexPrintObject << setw(12) << left << "NUMCL" << setw(6) << right << 2 << endl; vertexPrintObject << setw(12) << left << "NUMFR" << setw(6) << right << NFRAMES+1 << endl; vertexPrintObject << setw(12) << left << "BOXSZ" << setw(6) << right << L << endl; // print cell positions cell1.printVertexPositions(vertexPrintObject,0,0); cell2.printVertexPositions(vertexPrintObject,1); // initialize velocities for collision double vscale = 0.2*(l0/timeScale); // initialize velocities for shape relaxation for (i=0; i<NV; i++){ for (d=0; d<2; d++){ cell1.setVVel(i,d,0.075*drand48()); cell2.setVVel(i,d,0.075*drand48()); } } // print simulation header cout << endl << endl; cout << "================================================" << endl << endl; cout << " Beginning MD to relax shape to minimum energy" << endl; cout << " * NT = " << NT << endl; cout << " * NPRINT = " << NPRINT << endl; cout << " * segmentMass = " << segmentMass << endl; cout << " * timeScale = " << timeScale << endl; cout << " * dampingParam = " << dampingParam << endl; cout << " * dt = " << dt << endl; cout << " * collision velocity scale = " << vscale << endl << endl; cout << "================================================" << endl; cout << endl << endl; // loop over time to relax shape for (t=0; t<NT; t++){ // update vertex positions cell1.verletPositionUpdate(dt); cell2.verletPositionUpdate(dt); // update cell pos cell1.updateCPos(); cell2.updateCPos(); // give velocity if (t == 20){ cell1.setCVel(0,vscale); cell1.setCVel(1,0.0); cell2.setCVel(0,-vscale); cell2.setCVel(1,0.0); } // update vertex forces cell1.shapeForces(); cell2.shapeForces(); // calculate interaction inContact = cell1.vertexForce(cell2); // update vertex velocities cell1.verletVelocityUpdate(dt,dampingParam); cell2.verletVelocityUpdate(dt,dampingParam); // output if printint time if (t % NPRINT == 0){ cout << "===================" << endl << endl; cout << " t = " << t << endl << endl; cout << "===================" << endl; cout << " * inContact = " << inContact << endl; cout << " * Printing vetex positions to file" << endl; cell1.printVertexPositions(vertexPrintObject,0,printCount+1); cell2.printVertexPositions(vertexPrintObject,1); cout << " * Printing cell energy to file" << endl; energyPrintObject << cell1.totalKineticEnergy() + cell2.totalKineticEnergy() << " " << cell1.totalPotentialEnergy() + cell2.totalPotentialEnergy() << endl; cout << endl << endl; printCount++; } } vertexPrintObject << setw(12) << left << "STERM" << " " << endl; cout << "test code cellCollision.cpp is finished, returning 0" << endl; vertexPrintObject.close(); energyPrintObject.close(); return 0; }
[ "john.treado@yale.edu" ]
john.treado@yale.edu
56a330064fb116d02af0286e56c26faac5648268
546a7deec152e4ab8eea0a4dcd2b4901f4f7fba6
/GraphicLibrary/src/Vertex.cpp
200debb2fb1fad0cdbdff252924b6f3f39d99b09
[]
no_license
pqin/GraphicLibrary
f63a59f7edfb4d71972db3a4611a14cb2592d06f
8ab20f5783698c0e933a2dc05ec88523a00d6474
refs/heads/master
2022-08-19T02:51:01.935163
2020-05-21T20:32:03
2020-05-21T20:32:03
265,942,083
0
0
null
null
null
null
UTF-8
C++
false
false
649
cpp
#include "Vertex.h" VertexIndex::VertexIndex(){ p = 0; n = 0; t = 0; }; VertexIndex::VertexIndex(GLint p1, GLint n1, GLint t1){ p = p1; n = n1; t = t1; }; const VertexIndex VertexIndex::Zero = VertexIndex(0, 0, 0); bool VertexIndex::operator==(const VertexIndex &b){ if (p == b.p && n == b.n && t == b.t){ return true; } else { return false; } }; bool VertexIndex::operator!=(const VertexIndex &b){ if (*this == b){ return false; } else { return true; } }; void VertexIndex::set(GLint p1, GLint n1, GLint t1){ p = p1; n = n1; t = t1; };
[ "pqin@users.noreply.github.com" ]
pqin@users.noreply.github.com
e42d6ac6407af157ddb7d66517ee88635b6a2889
e9d4022afb1f45ca699cf0dda806f7d935e7a9b0
/include/odncrypto/group_arithmetics.hpp
a7c6f5f09e3405bb62efdccd62cc14c380d0ebae
[ "MIT" ]
permissive
adelapie/abe-fame
e4ae54f69c601333cb8b899a35bbf1b2400a063d
22eec20493306a87334b25aa7b6efcde25bc6bdb
refs/heads/master
2021-09-23T06:28:35.235759
2018-09-20T14:44:55
2018-09-20T14:44:55
null
0
0
null
null
null
null
UTF-8
C++
false
false
705
hpp
// // Created by abel walga on 02/05/2018. // #ifndef ODNCRYPTO_GROUP_ARITHMETICS_HPP #define ODNCRYPTO_GROUP_ARITHMETICS_HPP namespace odn { namespace crypto { class field_zr; class group_g; class group_h; class group_gt; class group_arithmetics { public: static void mod_div(field_zr &quotient, const field_zr &num, const field_zr &den); static void sum(group_g &, const group_g &, const field_zr &); static void sum(group_h &, const group_h &, const field_zr &); static void product(group_gt &, const group_gt &, const field_zr &); static void pair(group_gt &, const group_g &, const group_h &); }; }// end namespace crypto }// end namespace odn #endif //ODNCRYPTO_GROUP_ARITHMETICS_HPP
[ "awalga@users.noreply.github.com" ]
awalga@users.noreply.github.com
21a0a27d6b7bf5ca3694ed75ee1a1becf943b700
e40dcc2d47bfece44c3f48afec601c2a91eb3a70
/src/qt/miningpage.cpp
c40c71527dc18acf51ba331946ac21d3fa99d106
[ "MIT" ]
permissive
jujum4n/dv8coin
883dafd2fefecc40c22b87b999715be547c82809
e524b597646cf3f7a3144979c0cd7300ffa52955
refs/heads/master
2021-01-25T06:37:00.076304
2015-09-16T16:11:44
2015-09-16T16:11:44
22,267,702
1
1
null
null
null
null
UTF-8
C++
false
false
11,729
cpp
#include "miningpage.h" #include "ui_miningpage.h" MiningPage::MiningPage(QWidget *parent) : QWidget(parent), ui(new Ui::MiningPage) { ui->setupUi(this); setFixedSize(400, 420); minerActive = false; minerProcess = new QProcess(this); minerProcess->setProcessChannelMode(QProcess::MergedChannels); readTimer = new QTimer(this); acceptedShares = 0; rejectedShares = 0; roundAcceptedShares = 0; roundRejectedShares = 0; initThreads = 0; connect(readTimer, SIGNAL(timeout()), this, SLOT(readProcessOutput())); connect(ui->startButton, SIGNAL(pressed()), this, SLOT(startPressed())); connect(ui->typeBox, SIGNAL(currentIndexChanged(int)), this, SLOT(typeChanged(int))); connect(ui->debugCheckBox, SIGNAL(toggled(bool)), this, SLOT(debugToggled(bool))); connect(minerProcess, SIGNAL(started()), this, SLOT(minerStarted())); connect(minerProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(minerError(QProcess::ProcessError))); connect(minerProcess, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(minerFinished())); connect(minerProcess, SIGNAL(readyRead()), this, SLOT(readProcessOutput())); } MiningPage::~MiningPage() { minerProcess->kill(); delete ui; } void MiningPage::setModel(ClientModel *model) { this->model = model; loadSettings(); bool pool = model->getMiningType() == ClientModel::PoolMining; ui->threadsBox->setValue(model->getMiningThreads()); ui->typeBox->setCurrentIndex(pool ? 1 : 0); // if (model->getMiningStarted()) // startPressed(); } void MiningPage::startPressed() { initThreads = ui->threadsBox->value(); if (minerActive == false) { saveSettings(); if (getMiningType() == ClientModel::SoloMining) minerStarted(); else startPoolMining(); } else { if (getMiningType() == ClientModel::SoloMining) minerFinished(); else stopPoolMining(); } } void MiningPage::startPoolMining() { QStringList args; QString url = ui->serverLine->text(); if (!url.contains("http://")) url.prepend("http://"); QString urlLine = QString("%1:%2").arg(url, ui->portLine->text()); QString userpassLine = QString("%1:%2").arg(ui->usernameLine->text(), ui->passwordLine->text()); args << "--algo" << "scrypt"; args << "--scantime" << ui->scantimeBox->text().toAscii(); args << "--url" << urlLine.toAscii(); args << "--userpass" << userpassLine.toAscii(); args << "--threads" << ui->threadsBox->text().toAscii(); args << "--retries" << "-1"; // Retry forever. args << "-P"; // This is needed for this to work correctly on Windows. Extra protocol dump helps flush the buffer quicker. threadSpeed.clear(); acceptedShares = 0; rejectedShares = 0; roundAcceptedShares = 0; roundRejectedShares = 0; // If minerd is in current path, then use that. Otherwise, assume minerd is in the path somewhere. QString program = QDir::current().filePath("minerd"); if (!QFile::exists(program)) program = "minerd"; if (ui->debugCheckBox->isChecked()) ui->list->addItem(args.join(" ").prepend(" ").prepend(program)); ui->mineSpeedLabel->setText("Speed: N/A"); ui->shareCount->setText("Accepted: 0 - Rejected: 0"); minerProcess->start(program,args); minerProcess->waitForStarted(-1); readTimer->start(500); } void MiningPage::stopPoolMining() { ui->mineSpeedLabel->setText(""); minerProcess->kill(); readTimer->stop(); } void MiningPage::saveSettings() { model->setMiningDebug(ui->debugCheckBox->isChecked()); model->setMiningScanTime(ui->scantimeBox->value()); model->setMiningServer(ui->serverLine->text()); model->setMiningPort(ui->portLine->text()); model->setMiningUsername(ui->usernameLine->text()); model->setMiningPassword(ui->passwordLine->text()); } void MiningPage::loadSettings() { ui->debugCheckBox->setChecked(model->getMiningDebug()); ui->scantimeBox->setValue(model->getMiningScanTime()); ui->serverLine->setText(model->getMiningServer()); ui->portLine->setText(model->getMiningPort()); ui->usernameLine->setText(model->getMiningUsername()); ui->passwordLine->setText(model->getMiningPassword()); } void MiningPage::readProcessOutput() { QByteArray output; minerProcess->reset(); output = minerProcess->readAll(); QString outputString(output); if (!outputString.isEmpty()) { QStringList list = outputString.split("\n", QString::SkipEmptyParts); int i; for (i=0; i<list.size(); i++) { QString line = list.at(i); // Ignore protocol dump if (!line.startsWith("[") || line.contains("JSON protocol") || line.contains("HTTP hdr")) continue; if (ui->debugCheckBox->isChecked()) { ui->list->addItem(line.trimmed()); ui->list->scrollToBottom(); } if (line.contains("(yay!!!)")) reportToList("Share accepted", SHARE_SUCCESS, getTime(line)); else if (line.contains("(booooo)")) reportToList("Share rejected", SHARE_FAIL, getTime(line)); else if (line.contains("LONGPOLL detected new block")) reportToList("LONGPOLL detected a new block", LONGPOLL, getTime(line)); else if (line.contains("Supported options:")) reportToList("Miner didn't start properly. Try checking your settings.", ERROR, NULL); else if (line.contains("The requested URL returned error: 403")) reportToList("Couldn't connect. Please check your username and password.", ERROR, NULL); else if (line.contains("HTTP request failed")) reportToList("Couldn't connect. Please check pool server and port.", ERROR, NULL); else if (line.contains("JSON-RPC call failed")) reportToList("Couldn't communicate with server. Retrying in 30 seconds.", ERROR, NULL); else if (line.contains("thread ") && line.contains("khash/s")) { QString threadIDstr = line.at(line.indexOf("thread ")+7); int threadID = threadIDstr.toInt(); int threadSpeedindx = line.indexOf(","); QString threadSpeedstr = line.mid(threadSpeedindx); threadSpeedstr.chop(8); threadSpeedstr.remove(", "); threadSpeedstr.remove(" "); threadSpeedstr.remove('\n'); double speed=0; speed = threadSpeedstr.toDouble(); threadSpeed[threadID] = speed; updateSpeed(); } } } } void MiningPage::minerError(QProcess::ProcessError error) { if (error == QProcess::FailedToStart) { reportToList("Miner failed to start. Make sure you have the minerd executable and libraries in the same directory as dv8coin-qt.", ERROR, NULL); } } void MiningPage::minerFinished() { if (getMiningType() == ClientModel::SoloMining) reportToList("Solo mining stopped.", ERROR, NULL); else reportToList("Miner exited.", ERROR, NULL); ui->list->addItem(""); minerActive = false; resetMiningButton(); model->setMining(getMiningType(), false, initThreads, 0); } void MiningPage::minerStarted() { if (!minerActive) { if (getMiningType() == ClientModel::SoloMining) { reportToList("Solo mining started.", ERROR, NULL); } else { reportToList("Miner started. You might not see any output for a few minutes.", STARTED, NULL); } } minerActive = true; resetMiningButton(); model->setMining(getMiningType(), true, initThreads, 0); } void MiningPage::updateSpeed() { double totalSpeed=0; int totalThreads=0; QMapIterator<int, double> iter(threadSpeed); while(iter.hasNext()) { iter.next(); totalSpeed += iter.value(); totalThreads++; } // If all threads haven't reported the hash speed yet, make an assumption if (totalThreads != initThreads) { totalSpeed = (totalSpeed/totalThreads)*initThreads; } QString speedString = QString("%1").arg(totalSpeed); QString threadsString = QString("%1").arg(initThreads); QString acceptedString = QString("%1").arg(acceptedShares); QString rejectedString = QString("%1").arg(rejectedShares); QString roundAcceptedString = QString("%1").arg(roundAcceptedShares); QString roundRejectedString = QString("%1").arg(roundRejectedShares); if (totalThreads == initThreads) ui->mineSpeedLabel->setText(QString("Speed: %1 khash/sec - %2 thread(s)").arg(speedString, threadsString)); else ui->mineSpeedLabel->setText(QString("Speed: ~%1 khash/sec - %2 thread(s)").arg(speedString, threadsString)); ui->shareCount->setText(QString("Accepted: %1 (%3) - Rejected: %2 (%4)").arg(acceptedString, rejectedString, roundAcceptedString, roundRejectedString)); model->setMining(getMiningType(), true, initThreads, totalSpeed*1000); } void MiningPage::reportToList(QString msg, int type, QString time) { QString message; if (time == NULL) message = QString("[%1] - %2").arg(QTime::currentTime().toString(), msg); else message = QString("[%1] - %2").arg(time, msg); switch(type) { case SHARE_SUCCESS: acceptedShares++; roundAcceptedShares++; updateSpeed(); break; case SHARE_FAIL: rejectedShares++; roundRejectedShares++; updateSpeed(); break; case LONGPOLL: roundAcceptedShares = 0; roundRejectedShares = 0; break; default: break; } ui->list->addItem(message); ui->list->scrollToBottom(); } // Function for fetching the time QString MiningPage::getTime(QString time) { if (time.contains("[")) { time.resize(21); time.remove("["); time.remove("]"); time.remove(0,11); return time; } else return NULL; } void MiningPage::enableMiningControls(bool enable) { ui->typeBox->setEnabled(enable); ui->threadsBox->setEnabled(enable); ui->scantimeBox->setEnabled(enable); ui->serverLine->setEnabled(enable); ui->portLine->setEnabled(enable); ui->usernameLine->setEnabled(enable); ui->passwordLine->setEnabled(enable); } void MiningPage::enablePoolMiningControls(bool enable) { ui->scantimeBox->setEnabled(enable); ui->serverLine->setEnabled(enable); ui->portLine->setEnabled(enable); ui->usernameLine->setEnabled(enable); ui->passwordLine->setEnabled(enable); } ClientModel::MiningType MiningPage::getMiningType() { if (ui->typeBox->currentIndex() == 0) // Solo Mining { return ClientModel::SoloMining; } else if (ui->typeBox->currentIndex() == 1) // Pool Mining { return ClientModel::PoolMining; } return ClientModel::SoloMining; } void MiningPage::typeChanged(int index) { if (index == 0) // Solo Mining { enablePoolMiningControls(false); } else if (index == 1) // Pool Mining { enablePoolMiningControls(true); } } void MiningPage::debugToggled(bool checked) { model->setMiningDebug(checked); } void MiningPage::resetMiningButton() { ui->startButton->setText(minerActive ? "Stop Mining" : "Start Mining"); enableMiningControls(!minerActive); }
[ "jujowned@Gmail.com" ]
jujowned@Gmail.com
ca6de529f315260a57d3eb2c1f290b33fc49093e
4e8af8a23d62f93089d01398b22f6b7421d647c1
/LuaTool/runLuaComapre.cpp
5ad238ec3e6c4d1b31614bd5d865ea46f136f7c1
[]
no_license
mirufa1121/LuaTool
5e396bafa3ae49a85ee9247c2b3500d73daf629d
55e68fd1e65f8e7c3fa8eba8ecd8a00cea784158
refs/heads/master
2020-04-09T21:23:37.991444
2015-04-27T05:09:16
2015-04-27T05:09:16
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,903
cpp
#include "LuaTool.h" #include "LuaCompare.h" #include "LuaC.h" #include "LuaDec.h" #include "ManilaFile.h" #include <iostream> #include <iomanip> #include <map> #include <string> using namespace std; void LuaTool::printLuaCompareUsage(string message) { cout << endl; if (message != "") cout <<"*"<< message <<"*"<< endl << endl; cout << "LuaCompare " << LuaCompare::version << "\n" " Usage: LuaTool /compare [options] <original.luac> <newfile.lua(c)>\n" " Available Options:\n" " -o <filename> specify output file name\n" " -s side by side file comparison\n" " -du disable underline\n"; } void LuaTool::runLuaCompare() { bool underline = true; bool sideBySide = false; string outputName = ""; int numOptions = 0; // go through options for (unsigned i = 2; i < args.size(); i++) { if (args[i] == "-s") { // side by side sideBySide = true; numOptions++; } else if (args[i] == "-du") { // disable underline underline = false; numOptions++; } else if (args[i] == "-o") { // output name outputName = args[i+1]; numOptions +=2; i++; } } // check if options were valid if (numOptions != args.size() - 4) { printLuaCompareUsage("Invalid command line paramaters."); return; } // safe to create string string originalFile = args[args.size()-2]; string newFile = args[args.size()-1]; if (outputName == "") // default output outputName = removeExt(newFile) + ".cmp.lua"; // compare task LuaCompare lc(originalFile, newFile); lc.compare(0, underline, sideBySide); lc.writeTo(outputName); // errors? if (lc.errors.getLast() != "") { cout << lc.errors.getLast() << endl; lc.errors.clearAll(); } // output success rate cout << fixed << setprecision(0); cout << "Files match: " << lc.percent << "%" << endl; }
[ "viruscamp@gmail.com" ]
viruscamp@gmail.com
db60bbbc6d287c17ede75b1236988a7d2443c70a
9a2597400a1efebfda91f5235adabbd7d1bee2ef
/dataconnection.h
ebe39d3be107caa118173f4dbeedc3ebc1461b31
[]
no_license
ssguagua/QtFtpServer
ac8954ef40e25e310bc7e0085296dab321edd60f
e2cad1a1c675f560bd5f591082c056e5e43f6b0e
refs/heads/master
2020-04-13T01:51:05.135704
2019-01-08T05:39:57
2019-01-08T05:39:57
162,885,717
0
0
null
2018-12-23T11:41:01
2018-12-23T11:41:01
null
UTF-8
C++
false
false
873
h
#ifndef DATACONNECTION_H #define DATACONNECTION_H #include "sslserver.h" #include "QSslSocket" #include "ftpcommand.h" #include <QObject> #include <QPointer> class DataConnection:public QObject { Q_OBJECT public: explicit DataConnection(QObject *parent = 0); void scheduleConnectToHost(const QString &hostName, int port, bool encrypt); int listen(bool encrypt); bool setFtpCommand(FtpCommand *command); FtpCommand *ftpCommand(); private slots: void newConnection(); void encrypted(); void connected(); private: void startFtpCommand(); SslServer *server; QSslSocket *socket; QPointer<FtpCommand> command; bool isSocketReady; bool isWaitingForFtpCommand; bool encrypt; bool isActiveConnection; QString hostName; int port; }; #endif // DATACONNECTION_H
[ "z1908144712@163.com" ]
z1908144712@163.com
a2e1ac1a517ab17ba4f146b1dec7e667eca18a79
3635b08d7d69a200a950a07f8f977240847b6bd3
/directory.h
9304f9ed92768841ffb17795e7c1321a6765b0c2
[]
no_license
palwxc/Fabricated-Files-Folders
f91a504476aa312356f303d25135ff27dde30b6d
4a87dbcfce6e26f0f69bf3590ce3b62ebd135c1c
refs/heads/main
2023-02-07T07:14:03.297844
2021-01-01T06:33:28
2021-01-01T06:33:28
325,924,340
0
0
null
null
null
null
UTF-8
C++
false
false
1,195
h
#ifndef DIRECTORY_H #define DIRECTORY_H #include <iostream> #include <vector> #include <ctime> #include <time.h> #include "file.h" using namespace std; class Directory { private: string name; int numFiles; Directory * parent = NULL; Directory * previous = NULL; vector<File> content; string owner; string group; string publc; //public time_t result; public: Directory() :name("\\"), numFiles(0), owner("111"), group("111"), publc("111"){}; Directory(string n) :name(n), numFiles(0), owner("111"), group("111"), publc("111"){}; string getName(){ return name; }; void setName(string n){ name = n; }; int getNumFiles() { return numFiles; }; int vectSize() const { return content.size(); }; Directory& runCommand(string command, string & line); void addFile(string n); void removeFile(string n); void addDirectory(string n); void removeDirectory(string n); void conversion(string line); void printContents(); void longPrint(); string getDirectoryChain(); bool duplicateCheckDirc(string line); bool duplicateCheckFile(string line); int matchFindDirc(string line); int matchFindFile(string line); string printPath(Directory * d); ~Directory(); }; #endif
[ "palwxc@mst.edu" ]
palwxc@mst.edu
cb48ff101339c4ec8736c2f79cef4b32bbaedfb0
6b40e9dccf2edc767c44df3acd9b626fcd586b4d
/NT/ds/security/passport/common/tools/passportlock.hpp
379004e644c82e1b157d229d4947f2bb3f4bf1ca
[]
no_license
jjzhang166/WinNT5_src_20201004
712894fcf94fb82c49e5cd09d719da00740e0436
b2db264153b80fbb91ef5fc9f57b387e223dbfc2
refs/heads/Win2K3
2023-08-12T01:31:59.670176
2021-10-14T15:14:37
2021-10-14T15:14:37
586,134,273
1
0
null
2023-01-07T03:47:45
2023-01-07T03:47:44
null
UTF-8
C++
false
false
572
hpp
#ifndef PASSPORTLOCK_HPP #define PASSPORTLOCK_HPP #include <windows.h> #include <winbase.h> class PassportLock { public: PassportLock(DWORD dwSpinCount = 4000); void acquire(); void release(); ~PassportLock(); private: CRITICAL_SECTION mLock; }; class PassportLockGlobal { public: PassportLockGlobal(CRITICAL_SECTION &critSec) : mLock(critSec) { EnterCriticalSection(&mLock); } ~PassportLockGlobal() { LeaveCriticalSection(&mLock); } private: CRITICAL_SECTION &mLock; }; #endif // !PASSPORTLOCK_HPP
[ "seta7D5@protonmail.com" ]
seta7D5@protonmail.com
1c01180322467f2b5ec9fec980d3e8ba48472451
fb6251837c15a0ee0b28b15d214599165e11de83
/URI/1789-The Race of Slugs.cpp
32b5d726b1b641c37bf6076fe3a9ec4e176a4058
[]
no_license
CDPS/Competitive-Programming
de72288b8dc02ca2a45ed40491ce1839e983b765
24c046cbde7fea04a6c0f22518a688faf7521e2e
refs/heads/master
2023-08-09T09:57:15.368959
2023-08-05T00:44:41
2023-08-05T00:44:41
104,966,014
0
0
null
null
null
null
UTF-8
C++
false
false
451
cpp
#include <bits/stdc++.h> using namespace std; int main(){ int l; while(scanf("%d",&l)==1){ priority_queue<int> pq; int vi; for(int i=0;i<l;i++){ scanf("%d",&vi); pq.push(vi); } if(pq.top()<10){ printf("1\n"); }else if (pq.top()>=10 && pq.top() <20){ printf("2\n"); }else{ printf("3\n"); } } return 0; }
[ "crispale07@gmail.com" ]
crispale07@gmail.com
5e4daef80cf4c6c9e8745ceee80950f3c251ae53
51b7173200a84b0d51dfdf4320009c78ca549859
/EscapeVector/Escape_Vector/Intermediate/Build/Win64/Escape_VectorEditor/Development/Escape_Vector/PCH.Escape_Vector.Escape_Vector.h.cpp
055c97bb3df042373c83a041ab046cb793112603
[]
no_license
MartinSavard7/EscapeVec
eab61759e9ce2002c4c14f8a2731d5fb77d85cf8
f7423f4e0b917be24a3f2b18e4cd1a6498b1f96a
refs/heads/master
2021-01-25T09:00:10.072655
2015-01-15T23:02:16
2015-01-15T23:02:16
29,322,732
0
0
null
null
null
null
UTF-8
C++
false
false
86
cpp
#include "E:\Escape_Vector\Escape_Vector\Source\Escape_Vector\Public\Escape_Vector.h"
[ "classe56martin@hotmail.com" ]
classe56martin@hotmail.com
7487eb7042b9053d194b8f703465524c472ed87e
dbfb4c98511b6f8bfe926e407d539bbbc81ba0bf
/vendor/mediatek/proprietary/custom/mt6735/hal/D2/camera_3a/isp_tuning_custom.cpp
20bd52f339235b7c5f6c7f0b727cf610b25740e0
[]
no_license
Skyrimus/device_kernel_porridge
e8526b59333699b9a06fe1fda79a3b746152e9f1
62c434c1bede4ea2b7adaa714cae7bcb50bd780c
refs/heads/master
2023-04-22T08:12:13.386789
2021-04-28T09:09:46
2021-04-28T09:09:46
256,028,025
0
1
null
null
null
null
UTF-8
C++
false
false
67,476
cpp
/* Copyright Statement: * * This software/firmware and related documentation ("MediaTek Software") are * protected under relevant copyright laws. The information contained herein * is confidential and proprietary to MediaTek Inc. and/or its licensors. * Without the prior written permission of MediaTek inc. and/or its licensors, * any reproduction, modification, use or disclosure of MediaTek Software, * and information contained herein, in whole or in part, shall be strictly prohibited. */ /* MediaTek Inc. (C) 2010. All rights reserved. * * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. * * The following software/firmware and/or related documentation ("MediaTek Software") * have been modified by MediaTek Inc. All revisions are subject to any receiver's * applicable license agreements with MediaTek Inc. */ /******************************************************************************************** * LEGAL DISCLAIMER * * (Header of MediaTek Software/Firmware Release or Documentation) * * BY OPENING OR USING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") RECEIVED * FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON AN "AS-IS" BASIS * ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR * A PARTICULAR PURPOSE OR NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY * WHATSOEVER WITH RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, * INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK * ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S SPECIFICATION * OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. * * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE LIABILITY WITH * RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE * FEES OR SERVICE CHARGE PAID BY BUYER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. * * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE WITH THE LAWS * OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF LAWS PRINCIPLES. ************************************************************************************************/ #define LOG_TAG "isp_tuning_custom" #ifndef ENABLE_MY_LOG #define ENABLE_MY_LOG (1) #endif #include <aaa_types.h> #include <aaa_log.h> #include <camera_custom_nvram.h> #include <isp_tuning.h> #include <awb_param.h> #include <ae_param.h> #include <af_param.h> #include <flash_param.h> #include <isp_tuning_cam_info.h> #include <isp_tuning_idx.h> #include <isp_tuning_custom.h> #include <isp_tuning_custom_instance.h> #include <stdlib.h> // For atoi() #include <stdio.h> #include <cutils/properties.h> // For property_get(). //#include "camera_custom_3dnr.h" #include <mtkcam/algorithm/libgma/MTKGma.h> using namespace NSIspTuning; static MINT32 customRatioLog=0; static MTK_GMA_ENV_INFO_STRUCT gsGMAEnvParam_main = { { { { 0x2000, 0x2008, 0x2010, 0x2018, 0x2820, 0x282A, 0x2034, 0x203C, 0x2844, 0x284E, 0x2058, 0x2060, 0x2068, 0x2070, 0x2078, 0x2080, 0x1888, 0x188E, 0x2094, 0x209C, 0x18A4, 0x18AA, 0x18B0, 0x18B6, 0x20BC, 0x20C4, 0x18CC, 0x18D2, 0x18D8, 0x18DE, 0x18E4, 0x18EA, 0x18F0, 0x18F6, 0x18FC, 0x1902, 0x1908, 0x190E, 0x1114, 0x1118, 0x191C, 0x1922, 0x1928, 0x192E, 0x1134, 0x1138, 0x193C, 0x1942, 0x1148, 0x114C, 0x1950, 0x1956, 0x115C, 0x1160, 0x1164, 0x1168, 0x196C, 0x1972, 0x1178, 0x117C, 0x1180, 0x1184, 0x1188, 0x118C, 0x2190, 0x2198, 0x21A0, 0x21A8, 0x21B0, 0x21B8, 0x21C0, 0x11C8, 0x21CC, 0x21D4, 0x21DC, 0x11E4, 0x21E8, 0x21F0, 0x11F8, 0x21FC, 0x2204, 0x120C, 0x2210, 0x1218, 0x121C, 0x2220, 0x1228, 0x222C, 0x1234, 0x1238, 0x223C, 0x1244, 0x1248, 0x224C, 0x1254, 0x1258, 0x225C, 0x3264, 0x2270, 0x2278, 0x2280, 0x2288, 0x2290, 0x2298, 0x22A0, 0x22A8, 0x22B0, 0x22B8, 0x22C0, 0x12C8, 0x22CC, 0x22D4, 0x12DC, 0x22E0, 0x22E8, 0x12F0, 0x12F4, 0x22F8, 0x1300, 0x2304, 0x130C, 0x1310, 0x2314, 0x131C, 0x1320, 0x2324, 0x132C, 0x1330, 0x5334, 0x4348, 0x4358, 0x4368, 0x4378, 0x3388, 0x3394, 0x33A0, 0x33AC, 0x33B8, 0x33C4, 0x23D0, 0x33D8, 0x23E4, 0x23EC, 0x2BF4, 0xFFFF }, { 0x2000, 0x2008, 0x2010, 0x2018, 0x2820, 0x282A, 0x2034, 0x203C, 0x2844, 0x284E, 0x2058, 0x2060, 0x2068, 0x2070, 0x2078, 0x2080, 0x1888, 0x188E, 0x2094, 0x209C, 0x18A4, 0x18AA, 0x18B0, 0x18B6, 0x20BC, 0x20C4, 0x18CC, 0x18D2, 0x18D8, 0x18DE, 0x18E4, 0x18EA, 0x18F0, 0x18F6, 0x18FC, 0x1902, 0x1908, 0x190E, 0x1114, 0x1118, 0x191C, 0x1922, 0x1928, 0x192E, 0x1134, 0x1138, 0x193C, 0x1942, 0x1148, 0x114C, 0x1950, 0x1956, 0x115C, 0x1160, 0x1164, 0x1168, 0x196C, 0x1972, 0x1178, 0x117C, 0x1180, 0x1184, 0x1188, 0x118C, 0x2190, 0x2198, 0x21A0, 0x21A8, 0x21B0, 0x21B8, 0x21C0, 0x11C8, 0x21CC, 0x21D4, 0x21DC, 0x11E4, 0x21E8, 0x21F0, 0x11F8, 0x21FC, 0x2204, 0x120C, 0x2210, 0x1218, 0x121C, 0x2220, 0x1228, 0x222C, 0x1234, 0x1238, 0x223C, 0x1244, 0x1248, 0x224C, 0x1254, 0x1258, 0x225C, 0x3264, 0x2270, 0x2278, 0x2280, 0x2288, 0x2290, 0x2298, 0x22A0, 0x22A8, 0x22B0, 0x22B8, 0x22C0, 0x12C8, 0x22CC, 0x22D4, 0x12DC, 0x22E0, 0x22E8, 0x12F0, 0x12F4, 0x22F8, 0x1300, 0x2304, 0x130C, 0x1310, 0x2314, 0x131C, 0x1320, 0x2324, 0x132C, 0x1330, 0x5334, 0x4348, 0x4358, 0x4368, 0x4378, 0x3388, 0x3394, 0x33A0, 0x33AC, 0x33B8, 0x33C4, 0x23D0, 0x33D8, 0x23E4, 0x23EC, 0x2BF4, 0xFFFF }, { 0x2000, 0x2008, 0x2010, 0x2018, 0x2820, 0x282A, 0x2034, 0x203C, 0x2844, 0x284E, 0x2058, 0x2060, 0x2068, 0x2070, 0x2078, 0x2080, 0x1888, 0x188E, 0x2094, 0x209C, 0x18A4, 0x18AA, 0x18B0, 0x18B6, 0x20BC, 0x20C4, 0x18CC, 0x18D2, 0x18D8, 0x18DE, 0x18E4, 0x18EA, 0x18F0, 0x18F6, 0x18FC, 0x1902, 0x1908, 0x190E, 0x1114, 0x1118, 0x191C, 0x1922, 0x1928, 0x192E, 0x1134, 0x1138, 0x193C, 0x1942, 0x1148, 0x114C, 0x1950, 0x1956, 0x115C, 0x1160, 0x1164, 0x1168, 0x196C, 0x1972, 0x1178, 0x117C, 0x1180, 0x1184, 0x1188, 0x118C, 0x2190, 0x2198, 0x21A0, 0x21A8, 0x21B0, 0x21B8, 0x21C0, 0x11C8, 0x21CC, 0x21D4, 0x21DC, 0x11E4, 0x21E8, 0x21F0, 0x11F8, 0x21FC, 0x2204, 0x120C, 0x2210, 0x1218, 0x121C, 0x2220, 0x1228, 0x222C, 0x1234, 0x1238, 0x223C, 0x1244, 0x1248, 0x224C, 0x1254, 0x1258, 0x225C, 0x3264, 0x2270, 0x2278, 0x2280, 0x2288, 0x2290, 0x2298, 0x22A0, 0x22A8, 0x22B0, 0x22B8, 0x22C0, 0x12C8, 0x22CC, 0x22D4, 0x12DC, 0x22E0, 0x22E8, 0x12F0, 0x12F4, 0x22F8, 0x1300, 0x2304, 0x130C, 0x1310, 0x2314, 0x131C, 0x1320, 0x2324, 0x132C, 0x1330, 0x5334, 0x4348, 0x4358, 0x4368, 0x4378, 0x3388, 0x3394, 0x33A0, 0x33AC, 0x33B8, 0x33C4, 0x23D0, 0x33D8, 0x23E4, 0x23EC, 0x2BF4, 0xFFFF }, { 0x2000, 0x2008, 0x2010, 0x2018, 0x2820, 0x282A, 0x2034, 0x203C, 0x2844, 0x284E, 0x2058, 0x2060, 0x2068, 0x2070, 0x2078, 0x2080, 0x1888, 0x188E, 0x2094, 0x209C, 0x18A4, 0x18AA, 0x18B0, 0x18B6, 0x20BC, 0x20C4, 0x18CC, 0x18D2, 0x18D8, 0x18DE, 0x18E4, 0x18EA, 0x18F0, 0x18F6, 0x18FC, 0x1902, 0x1908, 0x190E, 0x1114, 0x1118, 0x191C, 0x1922, 0x1928, 0x192E, 0x1134, 0x1138, 0x193C, 0x1942, 0x1148, 0x114C, 0x1950, 0x1956, 0x115C, 0x1160, 0x1164, 0x1168, 0x196C, 0x1972, 0x1178, 0x117C, 0x1180, 0x1184, 0x1188, 0x118C, 0x2190, 0x2198, 0x21A0, 0x21A8, 0x21B0, 0x21B8, 0x21C0, 0x11C8, 0x21CC, 0x21D4, 0x21DC, 0x11E4, 0x21E8, 0x21F0, 0x11F8, 0x21FC, 0x2204, 0x120C, 0x2210, 0x1218, 0x121C, 0x2220, 0x1228, 0x222C, 0x1234, 0x1238, 0x223C, 0x1244, 0x1248, 0x224C, 0x1254, 0x1258, 0x225C, 0x3264, 0x2270, 0x2278, 0x2280, 0x2288, 0x2290, 0x2298, 0x22A0, 0x22A8, 0x22B0, 0x22B8, 0x22C0, 0x12C8, 0x22CC, 0x22D4, 0x12DC, 0x22E0, 0x22E8, 0x12F0, 0x12F4, 0x22F8, 0x1300, 0x2304, 0x130C, 0x1310, 0x2314, 0x131C, 0x1320, 0x2324, 0x132C, 0x1330, 0x5334, 0x4348, 0x4358, 0x4368, 0x4378, 0x3388, 0x3394, 0x33A0, 0x33AC, 0x33B8, 0x33C4, 0x23D0, 0x33D8, 0x23E4, 0x23EC, 0x2BF4, 0xFFFF }, { 0x2000, 0x2008, 0x2010, 0x2018, 0x2820, 0x282A, 0x2034, 0x203C, 0x2844, 0x284E, 0x2058, 0x2060, 0x2068, 0x2070, 0x2078, 0x2080, 0x1888, 0x188E, 0x2094, 0x209C, 0x18A4, 0x18AA, 0x18B0, 0x18B6, 0x20BC, 0x20C4, 0x18CC, 0x18D2, 0x18D8, 0x18DE, 0x18E4, 0x18EA, 0x18F0, 0x18F6, 0x18FC, 0x1902, 0x1908, 0x190E, 0x1114, 0x1118, 0x191C, 0x1922, 0x1928, 0x192E, 0x1134, 0x1138, 0x193C, 0x1942, 0x1148, 0x114C, 0x1950, 0x1956, 0x115C, 0x1160, 0x1164, 0x1168, 0x196C, 0x1972, 0x1178, 0x117C, 0x1180, 0x1184, 0x1188, 0x118C, 0x2190, 0x2198, 0x21A0, 0x21A8, 0x21B0, 0x21B8, 0x21C0, 0x11C8, 0x21CC, 0x21D4, 0x21DC, 0x11E4, 0x21E8, 0x21F0, 0x11F8, 0x21FC, 0x2204, 0x120C, 0x2210, 0x1218, 0x121C, 0x2220, 0x1228, 0x222C, 0x1234, 0x1238, 0x223C, 0x1244, 0x1248, 0x224C, 0x1254, 0x1258, 0x225C, 0x3264, 0x2270, 0x2278, 0x2280, 0x2288, 0x2290, 0x2298, 0x22A0, 0x22A8, 0x22B0, 0x22B8, 0x22C0, 0x12C8, 0x22CC, 0x22D4, 0x12DC, 0x22E0, 0x22E8, 0x12F0, 0x12F4, 0x22F8, 0x1300, 0x2304, 0x130C, 0x1310, 0x2314, 0x131C, 0x1320, 0x2324, 0x132C, 0x1330, 0x5334, 0x4348, 0x4358, 0x4368, 0x4378, 0x3388, 0x3394, 0x33A0, 0x33AC, 0x33B8, 0x33C4, 0x23D0, 0x33D8, 0x23E4, 0x23EC, 0x2BF4, 0xFFFF } } }, { eDYNAMIC_GMA_MODE, // eGMAMode 8, // i4LowContrastThr { { // i4ContrastWeightingTbl // 0 1 2 3 4 5 6 7 8 9 10 0, 0, 0, 33, 66, 100, 100, 100, 100, 100, 100 }, { // i4LVWeightingTbl //LV0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 66, 100, 100, 100, 100, 100, 100, 100, 100, 100 } }, { 1, // i4Enable 1, // i4WaitAEStable 4 // i4Speed }, { 0, // i4Enable 2047, // i4CenterPt 50, // i4LowPercent 100000, // i4LowCurve100 100000, // i4HighCurve100 50, // i4HighPercent 100, // i4SlopeH100 100 // i4SlopeL100 }, { 0 // rGMAFlare.i4Enable } } }; #define ISP_TUN_LOG_BIT (1<<0) #define ISP_TUN_EN_BIT1 (1<<1) #define ISP_TUN_EN_BIT2 (1<<2) static MTK_GMA_ENV_INFO_STRUCT gsGMAEnvParam_sub = { { { { 0x2000, 0x2008, 0x2010, 0x2018, 0x2820, 0x282A, 0x2034, 0x203C, 0x2844, 0x284E, 0x2058, 0x2060, 0x2068, 0x2070, 0x2078, 0x2080, 0x1888, 0x188E, 0x2094, 0x209C, 0x18A4, 0x18AA, 0x18B0, 0x18B6, 0x20BC, 0x20C4, 0x18CC, 0x18D2, 0x18D8, 0x18DE, 0x18E4, 0x18EA, 0x18F0, 0x18F6, 0x18FC, 0x1902, 0x1908, 0x190E, 0x1114, 0x1118, 0x191C, 0x1922, 0x1928, 0x192E, 0x1134, 0x1138, 0x193C, 0x1942, 0x1148, 0x114C, 0x1950, 0x1956, 0x115C, 0x1160, 0x1164, 0x1168, 0x196C, 0x1972, 0x1178, 0x117C, 0x1180, 0x1184, 0x1188, 0x118C, 0x2190, 0x2198, 0x21A0, 0x21A8, 0x21B0, 0x21B8, 0x21C0, 0x11C8, 0x21CC, 0x21D4, 0x21DC, 0x11E4, 0x21E8, 0x21F0, 0x11F8, 0x21FC, 0x2204, 0x120C, 0x2210, 0x1218, 0x121C, 0x2220, 0x1228, 0x222C, 0x1234, 0x1238, 0x223C, 0x1244, 0x1248, 0x224C, 0x1254, 0x1258, 0x225C, 0x3264, 0x2270, 0x2278, 0x2280, 0x2288, 0x2290, 0x2298, 0x22A0, 0x22A8, 0x22B0, 0x22B8, 0x22C0, 0x12C8, 0x22CC, 0x22D4, 0x12DC, 0x22E0, 0x22E8, 0x12F0, 0x12F4, 0x22F8, 0x1300, 0x2304, 0x130C, 0x1310, 0x2314, 0x131C, 0x1320, 0x2324, 0x132C, 0x1330, 0x5334, 0x4348, 0x4358, 0x4368, 0x4378, 0x3388, 0x3394, 0x33A0, 0x33AC, 0x33B8, 0x33C4, 0x23D0, 0x33D8, 0x23E4, 0x23EC, 0x2BF4, 0xFFFF }, { 0x2000, 0x2008, 0x2010, 0x2018, 0x2820, 0x282A, 0x2034, 0x203C, 0x2844, 0x284E, 0x2058, 0x2060, 0x2068, 0x2070, 0x2078, 0x2080, 0x1888, 0x188E, 0x2094, 0x209C, 0x18A4, 0x18AA, 0x18B0, 0x18B6, 0x20BC, 0x20C4, 0x18CC, 0x18D2, 0x18D8, 0x18DE, 0x18E4, 0x18EA, 0x18F0, 0x18F6, 0x18FC, 0x1902, 0x1908, 0x190E, 0x1114, 0x1118, 0x191C, 0x1922, 0x1928, 0x192E, 0x1134, 0x1138, 0x193C, 0x1942, 0x1148, 0x114C, 0x1950, 0x1956, 0x115C, 0x1160, 0x1164, 0x1168, 0x196C, 0x1972, 0x1178, 0x117C, 0x1180, 0x1184, 0x1188, 0x118C, 0x2190, 0x2198, 0x21A0, 0x21A8, 0x21B0, 0x21B8, 0x21C0, 0x11C8, 0x21CC, 0x21D4, 0x21DC, 0x11E4, 0x21E8, 0x21F0, 0x11F8, 0x21FC, 0x2204, 0x120C, 0x2210, 0x1218, 0x121C, 0x2220, 0x1228, 0x222C, 0x1234, 0x1238, 0x223C, 0x1244, 0x1248, 0x224C, 0x1254, 0x1258, 0x225C, 0x3264, 0x2270, 0x2278, 0x2280, 0x2288, 0x2290, 0x2298, 0x22A0, 0x22A8, 0x22B0, 0x22B8, 0x22C0, 0x12C8, 0x22CC, 0x22D4, 0x12DC, 0x22E0, 0x22E8, 0x12F0, 0x12F4, 0x22F8, 0x1300, 0x2304, 0x130C, 0x1310, 0x2314, 0x131C, 0x1320, 0x2324, 0x132C, 0x1330, 0x5334, 0x4348, 0x4358, 0x4368, 0x4378, 0x3388, 0x3394, 0x33A0, 0x33AC, 0x33B8, 0x33C4, 0x23D0, 0x33D8, 0x23E4, 0x23EC, 0x2BF4, 0xFFFF }, { 0x2000, 0x2008, 0x2010, 0x2018, 0x2820, 0x282A, 0x2034, 0x203C, 0x2844, 0x284E, 0x2058, 0x2060, 0x2068, 0x2070, 0x2078, 0x2080, 0x1888, 0x188E, 0x2094, 0x209C, 0x18A4, 0x18AA, 0x18B0, 0x18B6, 0x20BC, 0x20C4, 0x18CC, 0x18D2, 0x18D8, 0x18DE, 0x18E4, 0x18EA, 0x18F0, 0x18F6, 0x18FC, 0x1902, 0x1908, 0x190E, 0x1114, 0x1118, 0x191C, 0x1922, 0x1928, 0x192E, 0x1134, 0x1138, 0x193C, 0x1942, 0x1148, 0x114C, 0x1950, 0x1956, 0x115C, 0x1160, 0x1164, 0x1168, 0x196C, 0x1972, 0x1178, 0x117C, 0x1180, 0x1184, 0x1188, 0x118C, 0x2190, 0x2198, 0x21A0, 0x21A8, 0x21B0, 0x21B8, 0x21C0, 0x11C8, 0x21CC, 0x21D4, 0x21DC, 0x11E4, 0x21E8, 0x21F0, 0x11F8, 0x21FC, 0x2204, 0x120C, 0x2210, 0x1218, 0x121C, 0x2220, 0x1228, 0x222C, 0x1234, 0x1238, 0x223C, 0x1244, 0x1248, 0x224C, 0x1254, 0x1258, 0x225C, 0x3264, 0x2270, 0x2278, 0x2280, 0x2288, 0x2290, 0x2298, 0x22A0, 0x22A8, 0x22B0, 0x22B8, 0x22C0, 0x12C8, 0x22CC, 0x22D4, 0x12DC, 0x22E0, 0x22E8, 0x12F0, 0x12F4, 0x22F8, 0x1300, 0x2304, 0x130C, 0x1310, 0x2314, 0x131C, 0x1320, 0x2324, 0x132C, 0x1330, 0x5334, 0x4348, 0x4358, 0x4368, 0x4378, 0x3388, 0x3394, 0x33A0, 0x33AC, 0x33B8, 0x33C4, 0x23D0, 0x33D8, 0x23E4, 0x23EC, 0x2BF4, 0xFFFF }, { 0x2000, 0x2008, 0x2010, 0x2018, 0x2820, 0x282A, 0x2034, 0x203C, 0x2844, 0x284E, 0x2058, 0x2060, 0x2068, 0x2070, 0x2078, 0x2080, 0x1888, 0x188E, 0x2094, 0x209C, 0x18A4, 0x18AA, 0x18B0, 0x18B6, 0x20BC, 0x20C4, 0x18CC, 0x18D2, 0x18D8, 0x18DE, 0x18E4, 0x18EA, 0x18F0, 0x18F6, 0x18FC, 0x1902, 0x1908, 0x190E, 0x1114, 0x1118, 0x191C, 0x1922, 0x1928, 0x192E, 0x1134, 0x1138, 0x193C, 0x1942, 0x1148, 0x114C, 0x1950, 0x1956, 0x115C, 0x1160, 0x1164, 0x1168, 0x196C, 0x1972, 0x1178, 0x117C, 0x1180, 0x1184, 0x1188, 0x118C, 0x2190, 0x2198, 0x21A0, 0x21A8, 0x21B0, 0x21B8, 0x21C0, 0x11C8, 0x21CC, 0x21D4, 0x21DC, 0x11E4, 0x21E8, 0x21F0, 0x11F8, 0x21FC, 0x2204, 0x120C, 0x2210, 0x1218, 0x121C, 0x2220, 0x1228, 0x222C, 0x1234, 0x1238, 0x223C, 0x1244, 0x1248, 0x224C, 0x1254, 0x1258, 0x225C, 0x3264, 0x2270, 0x2278, 0x2280, 0x2288, 0x2290, 0x2298, 0x22A0, 0x22A8, 0x22B0, 0x22B8, 0x22C0, 0x12C8, 0x22CC, 0x22D4, 0x12DC, 0x22E0, 0x22E8, 0x12F0, 0x12F4, 0x22F8, 0x1300, 0x2304, 0x130C, 0x1310, 0x2314, 0x131C, 0x1320, 0x2324, 0x132C, 0x1330, 0x5334, 0x4348, 0x4358, 0x4368, 0x4378, 0x3388, 0x3394, 0x33A0, 0x33AC, 0x33B8, 0x33C4, 0x23D0, 0x33D8, 0x23E4, 0x23EC, 0x2BF4, 0xFFFF }, { 0x2000, 0x2008, 0x2010, 0x2018, 0x2820, 0x282A, 0x2034, 0x203C, 0x2844, 0x284E, 0x2058, 0x2060, 0x2068, 0x2070, 0x2078, 0x2080, 0x1888, 0x188E, 0x2094, 0x209C, 0x18A4, 0x18AA, 0x18B0, 0x18B6, 0x20BC, 0x20C4, 0x18CC, 0x18D2, 0x18D8, 0x18DE, 0x18E4, 0x18EA, 0x18F0, 0x18F6, 0x18FC, 0x1902, 0x1908, 0x190E, 0x1114, 0x1118, 0x191C, 0x1922, 0x1928, 0x192E, 0x1134, 0x1138, 0x193C, 0x1942, 0x1148, 0x114C, 0x1950, 0x1956, 0x115C, 0x1160, 0x1164, 0x1168, 0x196C, 0x1972, 0x1178, 0x117C, 0x1180, 0x1184, 0x1188, 0x118C, 0x2190, 0x2198, 0x21A0, 0x21A8, 0x21B0, 0x21B8, 0x21C0, 0x11C8, 0x21CC, 0x21D4, 0x21DC, 0x11E4, 0x21E8, 0x21F0, 0x11F8, 0x21FC, 0x2204, 0x120C, 0x2210, 0x1218, 0x121C, 0x2220, 0x1228, 0x222C, 0x1234, 0x1238, 0x223C, 0x1244, 0x1248, 0x224C, 0x1254, 0x1258, 0x225C, 0x3264, 0x2270, 0x2278, 0x2280, 0x2288, 0x2290, 0x2298, 0x22A0, 0x22A8, 0x22B0, 0x22B8, 0x22C0, 0x12C8, 0x22CC, 0x22D4, 0x12DC, 0x22E0, 0x22E8, 0x12F0, 0x12F4, 0x22F8, 0x1300, 0x2304, 0x130C, 0x1310, 0x2314, 0x131C, 0x1320, 0x2324, 0x132C, 0x1330, 0x5334, 0x4348, 0x4358, 0x4368, 0x4378, 0x3388, 0x3394, 0x33A0, 0x33AC, 0x33B8, 0x33C4, 0x23D0, 0x33D8, 0x23E4, 0x23EC, 0x2BF4, 0xFFFF } } }, { eDYNAMIC_GMA_MODE, // eGMAMode 8, // i4LowContrastThr { { // i4ContrastWeightingTbl // 0 1 2 3 4 5 6 7 8 9 10 0, 0, 0, 33, 66, 100, 100, 100, 100, 100, 100 }, { // i4LVWeightingTbl //LV0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 66, 100, 100, 100, 100, 100, 100, 100, 100, 100 } }, { 1, // i4Enable 1, // i4WaitAEStable 4 // i4Speed }, { 0, // i4Enable 2047, // i4CenterPt 50, // i4LowPercent 100000, // i4LowCurve100 100000, // i4HighCurve100 50, // i4HighPercent 100, // i4SlopeH100 100 // i4SlopeL100 }, { 0 // rGMAFlare.i4Enable } } }; static MTK_GMA_ENV_INFO_STRUCT gsGMAEnvParam_main2 = { { { { 0x2000, 0x2008, 0x2010, 0x2018, 0x2820, 0x282A, 0x2034, 0x203C, 0x2844, 0x284E, 0x2058, 0x2060, 0x2068, 0x2070, 0x2078, 0x2080, 0x1888, 0x188E, 0x2094, 0x209C, 0x18A4, 0x18AA, 0x18B0, 0x18B6, 0x20BC, 0x20C4, 0x18CC, 0x18D2, 0x18D8, 0x18DE, 0x18E4, 0x18EA, 0x18F0, 0x18F6, 0x18FC, 0x1902, 0x1908, 0x190E, 0x1114, 0x1118, 0x191C, 0x1922, 0x1928, 0x192E, 0x1134, 0x1138, 0x193C, 0x1942, 0x1148, 0x114C, 0x1950, 0x1956, 0x115C, 0x1160, 0x1164, 0x1168, 0x196C, 0x1972, 0x1178, 0x117C, 0x1180, 0x1184, 0x1188, 0x118C, 0x2190, 0x2198, 0x21A0, 0x21A8, 0x21B0, 0x21B8, 0x21C0, 0x11C8, 0x21CC, 0x21D4, 0x21DC, 0x11E4, 0x21E8, 0x21F0, 0x11F8, 0x21FC, 0x2204, 0x120C, 0x2210, 0x1218, 0x121C, 0x2220, 0x1228, 0x222C, 0x1234, 0x1238, 0x223C, 0x1244, 0x1248, 0x224C, 0x1254, 0x1258, 0x225C, 0x3264, 0x2270, 0x2278, 0x2280, 0x2288, 0x2290, 0x2298, 0x22A0, 0x22A8, 0x22B0, 0x22B8, 0x22C0, 0x12C8, 0x22CC, 0x22D4, 0x12DC, 0x22E0, 0x22E8, 0x12F0, 0x12F4, 0x22F8, 0x1300, 0x2304, 0x130C, 0x1310, 0x2314, 0x131C, 0x1320, 0x2324, 0x132C, 0x1330, 0x5334, 0x4348, 0x4358, 0x4368, 0x4378, 0x3388, 0x3394, 0x33A0, 0x33AC, 0x33B8, 0x33C4, 0x23D0, 0x33D8, 0x23E4, 0x23EC, 0x2BF4, 0xFFFF }, { 0x2000, 0x2008, 0x2010, 0x2018, 0x2820, 0x282A, 0x2034, 0x203C, 0x2844, 0x284E, 0x2058, 0x2060, 0x2068, 0x2070, 0x2078, 0x2080, 0x1888, 0x188E, 0x2094, 0x209C, 0x18A4, 0x18AA, 0x18B0, 0x18B6, 0x20BC, 0x20C4, 0x18CC, 0x18D2, 0x18D8, 0x18DE, 0x18E4, 0x18EA, 0x18F0, 0x18F6, 0x18FC, 0x1902, 0x1908, 0x190E, 0x1114, 0x1118, 0x191C, 0x1922, 0x1928, 0x192E, 0x1134, 0x1138, 0x193C, 0x1942, 0x1148, 0x114C, 0x1950, 0x1956, 0x115C, 0x1160, 0x1164, 0x1168, 0x196C, 0x1972, 0x1178, 0x117C, 0x1180, 0x1184, 0x1188, 0x118C, 0x2190, 0x2198, 0x21A0, 0x21A8, 0x21B0, 0x21B8, 0x21C0, 0x11C8, 0x21CC, 0x21D4, 0x21DC, 0x11E4, 0x21E8, 0x21F0, 0x11F8, 0x21FC, 0x2204, 0x120C, 0x2210, 0x1218, 0x121C, 0x2220, 0x1228, 0x222C, 0x1234, 0x1238, 0x223C, 0x1244, 0x1248, 0x224C, 0x1254, 0x1258, 0x225C, 0x3264, 0x2270, 0x2278, 0x2280, 0x2288, 0x2290, 0x2298, 0x22A0, 0x22A8, 0x22B0, 0x22B8, 0x22C0, 0x12C8, 0x22CC, 0x22D4, 0x12DC, 0x22E0, 0x22E8, 0x12F0, 0x12F4, 0x22F8, 0x1300, 0x2304, 0x130C, 0x1310, 0x2314, 0x131C, 0x1320, 0x2324, 0x132C, 0x1330, 0x5334, 0x4348, 0x4358, 0x4368, 0x4378, 0x3388, 0x3394, 0x33A0, 0x33AC, 0x33B8, 0x33C4, 0x23D0, 0x33D8, 0x23E4, 0x23EC, 0x2BF4, 0xFFFF }, { 0x2000, 0x2008, 0x2010, 0x2018, 0x2820, 0x282A, 0x2034, 0x203C, 0x2844, 0x284E, 0x2058, 0x2060, 0x2068, 0x2070, 0x2078, 0x2080, 0x1888, 0x188E, 0x2094, 0x209C, 0x18A4, 0x18AA, 0x18B0, 0x18B6, 0x20BC, 0x20C4, 0x18CC, 0x18D2, 0x18D8, 0x18DE, 0x18E4, 0x18EA, 0x18F0, 0x18F6, 0x18FC, 0x1902, 0x1908, 0x190E, 0x1114, 0x1118, 0x191C, 0x1922, 0x1928, 0x192E, 0x1134, 0x1138, 0x193C, 0x1942, 0x1148, 0x114C, 0x1950, 0x1956, 0x115C, 0x1160, 0x1164, 0x1168, 0x196C, 0x1972, 0x1178, 0x117C, 0x1180, 0x1184, 0x1188, 0x118C, 0x2190, 0x2198, 0x21A0, 0x21A8, 0x21B0, 0x21B8, 0x21C0, 0x11C8, 0x21CC, 0x21D4, 0x21DC, 0x11E4, 0x21E8, 0x21F0, 0x11F8, 0x21FC, 0x2204, 0x120C, 0x2210, 0x1218, 0x121C, 0x2220, 0x1228, 0x222C, 0x1234, 0x1238, 0x223C, 0x1244, 0x1248, 0x224C, 0x1254, 0x1258, 0x225C, 0x3264, 0x2270, 0x2278, 0x2280, 0x2288, 0x2290, 0x2298, 0x22A0, 0x22A8, 0x22B0, 0x22B8, 0x22C0, 0x12C8, 0x22CC, 0x22D4, 0x12DC, 0x22E0, 0x22E8, 0x12F0, 0x12F4, 0x22F8, 0x1300, 0x2304, 0x130C, 0x1310, 0x2314, 0x131C, 0x1320, 0x2324, 0x132C, 0x1330, 0x5334, 0x4348, 0x4358, 0x4368, 0x4378, 0x3388, 0x3394, 0x33A0, 0x33AC, 0x33B8, 0x33C4, 0x23D0, 0x33D8, 0x23E4, 0x23EC, 0x2BF4, 0xFFFF }, { 0x2000, 0x2008, 0x2010, 0x2018, 0x2820, 0x282A, 0x2034, 0x203C, 0x2844, 0x284E, 0x2058, 0x2060, 0x2068, 0x2070, 0x2078, 0x2080, 0x1888, 0x188E, 0x2094, 0x209C, 0x18A4, 0x18AA, 0x18B0, 0x18B6, 0x20BC, 0x20C4, 0x18CC, 0x18D2, 0x18D8, 0x18DE, 0x18E4, 0x18EA, 0x18F0, 0x18F6, 0x18FC, 0x1902, 0x1908, 0x190E, 0x1114, 0x1118, 0x191C, 0x1922, 0x1928, 0x192E, 0x1134, 0x1138, 0x193C, 0x1942, 0x1148, 0x114C, 0x1950, 0x1956, 0x115C, 0x1160, 0x1164, 0x1168, 0x196C, 0x1972, 0x1178, 0x117C, 0x1180, 0x1184, 0x1188, 0x118C, 0x2190, 0x2198, 0x21A0, 0x21A8, 0x21B0, 0x21B8, 0x21C0, 0x11C8, 0x21CC, 0x21D4, 0x21DC, 0x11E4, 0x21E8, 0x21F0, 0x11F8, 0x21FC, 0x2204, 0x120C, 0x2210, 0x1218, 0x121C, 0x2220, 0x1228, 0x222C, 0x1234, 0x1238, 0x223C, 0x1244, 0x1248, 0x224C, 0x1254, 0x1258, 0x225C, 0x3264, 0x2270, 0x2278, 0x2280, 0x2288, 0x2290, 0x2298, 0x22A0, 0x22A8, 0x22B0, 0x22B8, 0x22C0, 0x12C8, 0x22CC, 0x22D4, 0x12DC, 0x22E0, 0x22E8, 0x12F0, 0x12F4, 0x22F8, 0x1300, 0x2304, 0x130C, 0x1310, 0x2314, 0x131C, 0x1320, 0x2324, 0x132C, 0x1330, 0x5334, 0x4348, 0x4358, 0x4368, 0x4378, 0x3388, 0x3394, 0x33A0, 0x33AC, 0x33B8, 0x33C4, 0x23D0, 0x33D8, 0x23E4, 0x23EC, 0x2BF4, 0xFFFF }, { 0x2000, 0x2008, 0x2010, 0x2018, 0x2820, 0x282A, 0x2034, 0x203C, 0x2844, 0x284E, 0x2058, 0x2060, 0x2068, 0x2070, 0x2078, 0x2080, 0x1888, 0x188E, 0x2094, 0x209C, 0x18A4, 0x18AA, 0x18B0, 0x18B6, 0x20BC, 0x20C4, 0x18CC, 0x18D2, 0x18D8, 0x18DE, 0x18E4, 0x18EA, 0x18F0, 0x18F6, 0x18FC, 0x1902, 0x1908, 0x190E, 0x1114, 0x1118, 0x191C, 0x1922, 0x1928, 0x192E, 0x1134, 0x1138, 0x193C, 0x1942, 0x1148, 0x114C, 0x1950, 0x1956, 0x115C, 0x1160, 0x1164, 0x1168, 0x196C, 0x1972, 0x1178, 0x117C, 0x1180, 0x1184, 0x1188, 0x118C, 0x2190, 0x2198, 0x21A0, 0x21A8, 0x21B0, 0x21B8, 0x21C0, 0x11C8, 0x21CC, 0x21D4, 0x21DC, 0x11E4, 0x21E8, 0x21F0, 0x11F8, 0x21FC, 0x2204, 0x120C, 0x2210, 0x1218, 0x121C, 0x2220, 0x1228, 0x222C, 0x1234, 0x1238, 0x223C, 0x1244, 0x1248, 0x224C, 0x1254, 0x1258, 0x225C, 0x3264, 0x2270, 0x2278, 0x2280, 0x2288, 0x2290, 0x2298, 0x22A0, 0x22A8, 0x22B0, 0x22B8, 0x22C0, 0x12C8, 0x22CC, 0x22D4, 0x12DC, 0x22E0, 0x22E8, 0x12F0, 0x12F4, 0x22F8, 0x1300, 0x2304, 0x130C, 0x1310, 0x2314, 0x131C, 0x1320, 0x2324, 0x132C, 0x1330, 0x5334, 0x4348, 0x4358, 0x4368, 0x4378, 0x3388, 0x3394, 0x33A0, 0x33AC, 0x33B8, 0x33C4, 0x23D0, 0x33D8, 0x23E4, 0x23EC, 0x2BF4, 0xFFFF } } }, { eDYNAMIC_GMA_MODE, // eGMAMode 8, // i4LowContrastThr { { // i4ContrastWeightingTbl // 0 1 2 3 4 5 6 7 8 9 10 0, 0, 0, 33, 66, 100, 100, 100, 100, 100, 100 }, { // i4LVWeightingTbl //LV0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 66, 100, 100, 100, 100, 100, 100, 100, 100, 100 } }, { 1, // i4Enable 1, // i4WaitAEStable 4 // i4Speed }, { 0, // i4Enable 2047, // i4CenterPt 50, // i4LowPercent 100000, // i4LowCurve100 100000, // i4HighCurve100 50, // i4HighPercent 100, // i4SlopeH100 100 // i4SlopeL100 }, { 0 // rGMAFlare.i4Enable } } }; /******************************************************************************* * * rCamInfo * [in] ISP Camera Info for RAW sensor. Its members are as below: * * eCamMode: * ECamMode_Video = 0, * ECamMode_Online_Preview, * ECamMode_Online_Capture, * ECamMode_Online_Capture_ZSD, * ECamMode_Offline_Capture_Pass1, * ECamMode_Offline_Capture_Pass2, * ECamMode_HDR_Cap_Pass1_SF, // Pass1: Single Frame * ECamMode_HDR_Cap_Pass1_MF1, // Pass1: Multi Frame Stage1 * ECamMode_HDR_Cap_Pass1_MF2, // Pass1: Multi Frame Stage2 * ECamMode_HDR_Cap_Pass2, // Pass2 * * eIdx_Scene: * SCENE_MODE_OFF, // Disable scene mode equal Auto mode * SCENE_MODE_NORMAL, // Normal mode * SCENE_MODE_ACTION, // Action mode * SCENE_MODE_PORTRAIT, // Portrait mode * SCENE_MODE_LANDSCAPE, // Landscape * SCENE_MODE_NIGHTSCENE, // Night Scene * SCENE_MODE_NIGHTPORTRAIT, // Night Portrait * SCENE_MODE_THEATRE, // Theatre mode * SCENE_MODE_BEACH, // Beach mode * SCENE_MODE_SNOW, // Snow mode * SCENE_MODE_SUNSET, // Sunset mode * SCENE_MODE_STEADYPHOTO, // Steady photo mode * SCENE_MODE_FIREWORKS, // Fireworks mode * SCENE_MODE_SPORTS, // Sports mode * SCENE_MODE_PARTY, // Party mode * SCENE_MODE_CANDLELIGHT, // Candle light mode * SCENE_MODE_HDR, // HDR mode * * u4ISOValue: * ISO value to determine eISO. * * eIdx_ISO: * eIDX_ISO_100, * eIDX_ISO_200, * eIDX_ISO_400, * eIDX_ISO_800, * eIDX_ISO_1600 * * i4CCT: * Correlated color temperature * * eCCTIndex_CCM: * Correlated color temperature index for CCM * eIDX_CCM_TL84 * eIDX_CCM_CWF * eIDX_CCM_D65 * * u4ZoomRatio_x100: * zoom ratio (x100) * * i4LightValue_x10: * light value (x10) * * rIdxMgr: * [in] The default ISP tuning index manager. * [out] The ISP tuning index manager after customizing. * * *******************************************************************************/ MVOID IspTuningCustom:: refine_CamInfo(RAWIspCamInfo& /*rCamInfo*/) { } MVOID IspTuningCustom:: evaluate_nvram_index(RAWIspCamInfo const& rCamInfo, IndexMgr& /*rIdxMgr*/) { char value[PROPERTY_VALUE_MAX] = {'\0'}; property_get("vendor.debug.isptun_cust.ctrl", value, "-1"); MINT32 ctrl = atoi(value); MBOOL logEn = (ctrl == -1) ? MFALSE : ((ctrl & ISP_TUN_LOG_BIT) ? MTRUE : MFALSE); //.............................................................................. // (1) Dump info. before customizing. //#if ENABLE_MY_LOG #if 0 if (logEn) rCamInfo.dump(); #endif #if 0 LOGD("[+evaluate_nvram_index][before customizing]"); rIdxMgr.dump(); #endif //.............................................................................. // (2) Modify each index based on conditions. // // setIdx_XXX() returns: // MTURE: if successful // MFALSE: if the input index is out of range. // #if 0 fgRet = rIdxMgr.setIdx_OBC(XXX); fgRet = rIdxMgr.setIdx_BPC(XXX); fgRet = rIdxMgr.setIdx_NR1(XXX); fgRet = rIdxMgr.setIdx_CFA(XXX); fgRet = rIdxMgr.setIdx_GGM(XXX); fgRet = rIdxMgr.setIdx_ANR(XXX); fgRet = rIdxMgr.setIdx_CCR(XXX); fgRet = rIdxMgr.setIdx_EE(XXX); #endif //.............................................................................. // (3) Finally, dump info. after modifying. #if 0 LOGD("[-evaluate_nvram_index][after customizing]"); rIdxMgr.dump(); #endif } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MVOID IspTuningCustom:: refine_OBC(RAWIspCamInfo const& /*rCamInfo*/, IspNvramRegMgr & /*rIspRegMgr*/, ISP_NVRAM_OBC_T& /*rOBC*/) { #if 0 MY_LOG("%s()\n", __FUNCTION__); // TODO: Add your code below... MY_LOG("rOBC.offst0 = 0x%8x", rOBC.offst0); MY_LOG("rOBC.offst1 = 0x%8x", rOBC.offst1); MY_LOG("rOBC.offst2 = 0x%8x", rOBC.offst2); MY_LOG("rOBC.offst3 = 0x%8x", rOBC.offst3); MY_LOG("rOBC.gain0 = 0x%8x", rOBC.gain0); MY_LOG("rOBC.gain1 = 0x%8x", rOBC.gain1); MY_LOG("rOBC.gain2 = 0x%8x", rOBC.gain2); MY_LOG("rOBC.gain3 = 0x%8x", rOBC.gain3); #endif } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MVOID IspTuningCustom:: refine_BPC(RAWIspCamInfo const& /*rCamInfo*/, IspNvramRegMgr & /*rIspRegMgr*/, ISP_NVRAM_BPC_T& /*rBPC*/) { #if 0 MY_LOG("%s()\n", __FUNCTION__); // TODO: Add your code below... MY_LOG("rBPC.con = 0x%8x", rBPC.con); MY_LOG("rBPC.cd1_1 = 0x%8x", rBPC.cd1_1); MY_LOG("rBPC.cd1_2 = 0x%8x", rBPC.cd1_2); MY_LOG("rBPC.cd1_3 = 0x%8x", rBPC.cd1_3); MY_LOG("rBPC.cd1_4 = 0x%8x", rBPC.cd1_4); MY_LOG("rBPC.cd1_5 = 0x%8x", rBPC.cd1_5); MY_LOG("rBPC.cd1_6 = 0x%8x", rBPC.cd1_6); MY_LOG("rBPC.cd2_1 = 0x%8x", rBPC.cd2_1); MY_LOG("rBPC.cd2_2 = 0x%8x", rBPC.cd2_2); MY_LOG("rBPC.cd2_3 = 0x%8x", rBPC.cd2_3); MY_LOG("rBPC.cd0 = 0x%8x", rBPC.cd0); MY_LOG("rBPC.cor = 0x%8x", rBPC.cor); #endif } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MVOID IspTuningCustom:: refine_NR1(RAWIspCamInfo const& /*rCamInfo*/, IspNvramRegMgr & /*rIspRegMgr*/, ISP_NVRAM_NR1_T& /*rNR1*/) { #if 0 MY_LOG("%s()\n", __FUNCTION__); // TODO: Add your code below... MY_LOG("rNR1.con = 0x%8x", rNR1.con); MY_LOG("rNR1.ct_con = 0x%8x", rNR1.ct_con); #endif } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MVOID IspTuningCustom:: refine_SL2(RAWIspCamInfo const& /*rCamInfo*/, IspNvramRegMgr & /*rIspRegMgr*/, ISP_NVRAM_SL2_T& /*rSL2*/) { #if 0 MY_LOG("%s()\n", __FUNCTION__); // TODO: Add your code below... MY_LOG("rSL2.cen = 0x%8x", rSL2.cen); MY_LOG("rSL2.max0_rr = 0x%8x", rSL2.max0_rr); MY_LOG("rSL2.max1_rr = 0x%8x", rSL2.max1_rr); MY_LOG("rSL2.max2_rr = 0x%8x", rSL2.max2_rr); #endif } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MVOID IspTuningCustom:: refine_PGN(RAWIspCamInfo const& /*rCamInfo*/, IspNvramRegMgr & /*rIspRegMgr*/, ISP_NVRAM_PGN_T& /*rPGN*/) { #if 0 MY_LOG("%s()\n", __FUNCTION__); // TODO: Add your code below... MY_LOG("rPGN.satu01 = 0x%8x", rPGN.satu01); MY_LOG("rPGN.satu23 = 0x%8x", rPGN.satu23); MY_LOG("rPGN.gain01 = 0x%8x", rPGN.gain01); MY_LOG("rPGN.gain23 = 0x%8x", rPGN.gain23); MY_LOG("rPGN.offs01 = 0x%8x", rPGN.offs01); MY_LOG("rPGN.offs23 = 0x%8x", rPGN.offs23); #endif } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MVOID IspTuningCustom:: refine_CFA(RAWIspCamInfo const& /*rCamInfo*/, IspNvramRegMgr & /*rIspRegMgr*/, ISP_NVRAM_CFA_T& /*rCFA*/) { #if 0 MY_LOG("%s()\n", __FUNCTION__); // TODO: Add your code below... MY_LOG("rCFA.bypass = 0x%8x", rCFA.bypass); MY_LOG("rCFA.ed_f = 0x%8x", rCFA.ed_f); MY_LOG("rCFA.ed_nyq = 0x%8x", rCFA.ed_nyq); MY_LOG("rCFA.ed_step = 0x%8x", rCFA.ed_step); MY_LOG("rCFA.rgb_hf = 0x%8x", rCFA.rgb_hf); MY_LOG("rCFA.bw = 0x%8x", rCFA.bw); MY_LOG("rCFA.f1_act = 0x%8x", rCFA.f1_act); MY_LOG("rCFA.f2_act = 0x%8x", rCFA.f2_act); MY_LOG("rCFA.f3_act = 0x%8x", rCFA.f3_act); MY_LOG("rCFA.f4_act = 0x%8x", rCFA.f4_act); MY_LOG("rCFA.f1_l = 0x%8x", rCFA.f1_l); MY_LOG("rCFA.f2_l = 0x%8x", rCFA.f2_l); MY_LOG("rCFA.f3_l = 0x%8x", rCFA.f3_l); MY_LOG("rCFA.f4_l = 0x%8x", rCFA.f4_l); MY_LOG("rCFA.hf_rb = 0x%8x", rCFA.hf_rb); MY_LOG("rCFA.hf_gain = 0x%8x", rCFA.hf_gain); MY_LOG("rCFA.hf_comp = 0x%8x", rCFA.hf_comp); MY_LOG("rCFA.hf_coring_th = 0x%8x", rCFA.hf_coring_th); MY_LOG("rCFA.act_lut = 0x%8x", rCFA.act_lut); MY_LOG("rCFA.spare = 0x%8x", rCFA.spare); MY_LOG("rCFA.bb = 0x%8x", rCFA.bb); #endif } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #define CONV_2COMP_11(x) ( (x)<1024?(x):((int)(x)-2048) ) #define ICONV_2COMP_11(x) ( (x)<0?((x)+2048):(x) ) static MINT32 Complement2(MUINT32 value, MUINT32 digit) { MINT32 Result; if (((value >> (digit - 1)) & 0x1) == 1) // negative { Result = 0 - (MINT32)((~value + 1) & ((1 << digit) - 1)); } else { Result = (MINT32)(value & ((1 << digit) - 1)); } return Result; } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MVOID IspTuningCustom:: refine_CCM(RAWIspCamInfo const& rCamInfo, IspNvramRegMgr & /*rIspRegMgr*/, ISP_NVRAM_CCM_T& rCCM) { #if 0 MY_LOG("%s()\n", __FUNCTION__); // TODO: Add your code below... MY_LOG("rCCM.conv0a = 0x%8x", rCCM.conv0a); MY_LOG("rCCM.conv0b = 0x%8x", rCCM.conv0b); MY_LOG("rCCM.conv1a = 0x%8x", rCCM.conv1a); MY_LOG("rCCM.conv1b = 0x%8x", rCCM.conv1b); MY_LOG("rCCM.conv2a = 0x%8x", rCCM.conv2a); MY_LOG("rCCM.conv2b = 0x%8x", rCCM.conv2b); #endif // d65 //0x071701FB, 0x000007EE, 0x016B07BF, 0x000007D6, 0x0755001A, 0x00000191 /* rCCM.conv0a.val = 0x071701FB; rCCM.conv0b.val = 0x000007EE; rCCM.conv1a.val = 0x016B07BF; rCCM.conv1b.val = 0x000007D6; rCCM.conv2a.val = 0x0755001A; rCCM.conv2b.val = 0x00000191; */ MINT32 i4SensorID = getSensorID(); //MINT32 CCM_22 = CONV_2COMP_11(rCCM.conv2b.bits.G2G_CNV_22); //if (getSensorDev() == ESensorDev_Main) //Main if(i4SensorID == 0x5648) { MY_LOG("sensor ID = 0x%8x", i4SensorID); if(rCamInfo.rAWBInfo.rCurrentAWBGain.i4R > 765) { //0x0716022C, 0x000007BE, 0x017E07AB, 0x000007D7, 0x0767000A, 0x0000018F rCCM.set[0] = 0x0716022C; rCCM.set[1] = 0x000007BE; rCCM.set[2] = 0x017E07AB; rCCM.set[3] = 0x000007D7; rCCM.set[4] = 0x0767000A; rCCM.set[5] = 0x0000018F; } else if(rCamInfo.rAWBInfo.rCurrentAWBGain.i4R < 493) { // //0x07910190, 0x000007DF, 0x01320790, 0x000003E, 0x067507E1, 0x000002AA rCCM.set[0] = 0x07910190; rCCM.set[1] = 0x000007DF; rCCM.set[2] = 0x01320790; rCCM.set[3] = 0x0000003E; rCCM.set[4] = 0x067507E1; rCCM.set[5] = 0x000002AA; } } else if(i4SensorID == 0x2680) { MY_LOG("sensor ID = 0x%8x", i4SensorID); if(rCamInfo.rAWBInfo.rCurrentAWBGain.i4R > 780) { // sat 108 // 0x06E70208, 0x0000011, 0x019C07A5, 0x000007BF, 0x06C207D4, 0x0000026A rCCM.set[0] = 0x06E70208; rCCM.set[1] = 0x00000011; rCCM.set[2] = 0x019C07A5; rCCM.set[3] = 0x000007BF; rCCM.set[4] = 0x06C207D4; rCCM.set[5] = 0x0000026A; } else if(rCamInfo.rAWBInfo.rCurrentAWBGain.i4R < 473) { // sat 108 // 0x0BE015E, 0x000006E4, 0x02350767, 0x00000764, 0x06F2070E, 0x00000300 rCCM.set[0] = 0x0BE015E; rCCM.set[1] = 0x000006E4; rCCM.set[2] = 0x02350767; rCCM.set[3] = 0x00000764; rCCM.set[4] = 0x06F2070E; rCCM.set[5] = 0x00000300; } } if(i4SensorID == 0x2680) { // jason.jan, update CCM according to ISO MINT32 CCM_00 = CONV_2COMP_11(rCCM.conv0a.bits.G2G_CNV_00); MINT32 CCM_01 = CONV_2COMP_11(rCCM.conv0a.bits.G2G_CNV_01); MINT32 CCM_02 = CONV_2COMP_11(rCCM.conv0b.bits.G2G_CNV_02); MINT32 CCM_10 = CONV_2COMP_11(rCCM.conv1a.bits.G2G_CNV_10); MINT32 CCM_11 = CONV_2COMP_11(rCCM.conv1a.bits.G2G_CNV_11); MINT32 CCM_12 = CONV_2COMP_11(rCCM.conv1b.bits.G2G_CNV_12); MINT32 CCM_20 = CONV_2COMP_11(rCCM.conv2a.bits.G2G_CNV_20); MINT32 CCM_21 = CONV_2COMP_11(rCCM.conv2a.bits.G2G_CNV_21); MINT32 CCM_22 = CONV_2COMP_11(rCCM.conv2b.bits.G2G_CNV_22); // tuning parameter const MINT32 iso_l = 100; const MINT32 iso_h = 300; const int gain_l = (int)(0.9*128); //(0.7*128); const int gain_h = (int)(0.6*128); //(0.7*128); /* --------------+---------------------------------------------------+------------------------------- ISO < iso_l iso_l < ISO < iso_h ISO > iso_h gain = gain_l gain = linear interpolation(gain_l, gain_h) gain = gain_h */ //! tuning parameter MINT32 current_iso = rCamInfo.u4ISOValue; int current_gain = 128; if(current_iso<iso_l) current_gain = gain_l; else if(current_iso>iso_h) current_gain = gain_h; else current_gain = gain_l + (gain_h-gain_l)*(current_iso-iso_l)/(iso_h-iso_l); CCM_01 = (CCM_01)*current_gain/128; CCM_02 = (CCM_02)*current_gain/128; CCM_00 = 256 - (CCM_01+CCM_02); CCM_10 = (CCM_10)*current_gain/128; CCM_12 = (CCM_12)*current_gain/128; CCM_11 = 256 - (CCM_10+CCM_12); CCM_20 = (CCM_20)*current_gain/128; CCM_21 = (CCM_21)*current_gain/128; CCM_22 = 256 - (CCM_20+CCM_21); rCCM.conv0a.bits.G2G_CNV_00 = ICONV_2COMP_11(CCM_00); rCCM.conv0a.bits.G2G_CNV_01 = ICONV_2COMP_11(CCM_01); rCCM.conv0b.bits.G2G_CNV_02 = ICONV_2COMP_11(CCM_02); rCCM.conv1a.bits.G2G_CNV_10 = ICONV_2COMP_11(CCM_10); rCCM.conv1a.bits.G2G_CNV_11 = ICONV_2COMP_11(CCM_11); rCCM.conv1b.bits.G2G_CNV_12 = ICONV_2COMP_11(CCM_12); rCCM.conv2a.bits.G2G_CNV_20 = ICONV_2COMP_11(CCM_20); rCCM.conv2a.bits.G2G_CNV_21 = ICONV_2COMP_11(CCM_21); rCCM.conv2b.bits.G2G_CNV_22 = ICONV_2COMP_11(CCM_22); MY_LOG("After"); MY_LOG("Current ISO = %d", current_iso); MY_LOG("Current ISO = %d", current_gain); MY_LOG("rCCM.conv0a.bits.G2G_CNV_00 = %d", rCCM.conv0a.bits.G2G_CNV_00); MY_LOG("rCCM.conv0a.bits.G2G_CNV_01 = %d", rCCM.conv0a.bits.G2G_CNV_01); MY_LOG("rCCM.conv0b.bits.G2G_CNV_02 = %d", rCCM.conv0b.bits.G2G_CNV_02); MY_LOG("rCCM.conv1a.bits.G2G_CNV_10 = %d", rCCM.conv1a.bits.G2G_CNV_10); MY_LOG("rCCM.conv1a.bits.G2G_CNV_11 = %d", rCCM.conv1a.bits.G2G_CNV_11); MY_LOG("rCCM.conv1b.bits.G2G_CNV_12 = %d", rCCM.conv1b.bits.G2G_CNV_12); MY_LOG("rCCM.conv2a.bits.G2G_CNV_20 = %d", rCCM.conv2a.bits.G2G_CNV_20); MY_LOG("rCCM.conv2a.bits.G2G_CNV_21 = %d", rCCM.conv2a.bits.G2G_CNV_21); MY_LOG("rCCM.conv2b.bits.G2G_CNV_22 = %d", rCCM.conv2b.bits.G2G_CNV_22); //! jason.jan, update CCM according to ISO } } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MVOID IspTuningCustom:: refine_GGM(RAWIspCamInfo const& /*rCamInfo*/, IspNvramRegMgr & /*rIspRegMgr*/, ISP_NVRAM_GGM_T& /*rGGM*/) { #if 0 MY_LOG("%s()\n", __FUNCTION__); // TODO: Add your code below... MY_LOG("rGGM.lut_rb.lut[0] = 0x%8x", rGGM.lut_rb.lut[0]); MY_LOG("rGGM.lut_g.lut[0] = 0x%8x", rGGM.lut_g.lut[0]); #endif } MVOID* IspTuningCustom:: get_custom_GMA_env_info(ESensorDev_T eSensorDev) { /* enum { SENSOR_DEV_NONE = 0x00, SENSOR_DEV_MAIN = 0x01, SENSOR_DEV_SUB = 0x02, SENSOR_DEV_PIP = 0x03, SENSOR_DEV_MAIN_2 = 0x04, SENSOR_DEV_MAIN_3D = 0x05, }; */ switch (eSensorDev) { case ESensorDev_Main: //main return &gsGMAEnvParam_main; break; case ESensorDev_Sub: //sub return &gsGMAEnvParam_sub; break; case ESensorDev_MainSecond: //main2 return &gsGMAEnvParam_main2; break; default: return &gsGMAEnvParam_main; } } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MVOID IspTuningCustom:: refine_ANR(RAWIspCamInfo const& /*rCamInfo*/, IspNvramRegMgr & /*rIspRegMgr*/, ISP_NVRAM_ANR_T& /*rANR*/) { #if 0 MY_LOG("%s()\n", __FUNCTION__); // TODO: Add your code below... MY_LOG("rANR.con1 = 0x%8x", rANR.con1); MY_LOG("rANR.con2 = 0x%8x", rANR.con2); MY_LOG("rANR.con3 = 0x%8x", rANR.con3); MY_LOG("rANR.yad1 = 0x%8x", rANR.yad1); MY_LOG("rANR.yad2 = 0x%8x", rANR.yad2); MY_LOG("rANR.lut1 = 0x%8x", rANR.lut1); MY_LOG("rANR.lut2 = 0x%8x", rANR.lut2); MY_LOG("rANR.lut3 = 0x%8x", rANR.lut3); MY_LOG("rANR.pty = 0x%8x", rANR.pty); MY_LOG("rANR.cad = 0x%8x", rANR.cad); MY_LOG("rANR.ptc = 0x%8x", rANR.ptc); MY_LOG("rANR.lce1 = 0x%8x", rANR.lce1); MY_LOG("rANR.lce2 = 0x%8x", rANR.lce2); MY_LOG("rANR.hp1 = 0x%8x", rANR.hp1); MY_LOG("rANR.hp2 = 0x%8x", rANR.hp2); MY_LOG("rANR.hp3 = 0x%8x", rANR.hp3); MY_LOG("rANR.acty = 0x%8x", rANR.acty); MY_LOG("rANR.actc = 0x%8x", rANR.actc); #endif } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MVOID IspTuningCustom:: refine_CCR(RAWIspCamInfo const& /*rCamInfo*/, IspNvramRegMgr & /*rIspRegMgr*/, ISP_NVRAM_CCR_T& /*rCCR*/) { #if 0 MY_LOG("%s()\n", __FUNCTION__); // TODO: Add your code below... MY_LOG("rCCR.con = 0x%8x", rCCR.con); MY_LOG("rCCR.ylut = 0x%8x", rCCR.ylut); MY_LOG("rCCR.uvlut = 0x%8x", rCCR.uvlut); MY_LOG("rCCR.ylut2 = 0x%8x", rCCR.ylut2); #endif } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MVOID IspTuningCustom:: refine_EE(RAWIspCamInfo const& /*rCamInfo*/, IspNvramRegMgr & /*rIspRegMgr*/, ISP_NVRAM_EE_T& /*rEE*/) { #if 0 MY_LOG("%s()\n", __FUNCTION__); // TODO: Add your code below... MY_LOG("rEE.srk_ctrl = 0x%8x", rEE.srk_ctrl); MY_LOG("rEE.clip_ctrl = 0x%8x", rEE.clip_ctrl); MY_LOG("rEE.hp_ctrl1 = 0x%8x", rEE.hp_ctrl1); MY_LOG("rEE.hp_ctrl2 = 0x%8x", rEE.hp_ctrl2); MY_LOG("rEE.ed_ctrl1 = 0x%8x", rEE.ed_ctrl1); MY_LOG("rEE.ed_ctrl2 = 0x%8x", rEE.ed_ctrl2); MY_LOG("rEE.ed_ctrl3 = 0x%8x", rEE.ed_ctrl3); MY_LOG("rEE.ed_ctrl4 = 0x%8x", rEE.ed_ctrl4); MY_LOG("rEE.ed_ctrl5 = 0x%8x", rEE.ed_ctrl5); MY_LOG("rEE.ed_ctrl6 = 0x%8x", rEE.ed_ctrl6); MY_LOG("rEE.ed_ctrl7 = 0x%8x", rEE.ed_ctrl7); MY_LOG("rEE.ee_link1 = 0x%8x", rEE.ee_link1); MY_LOG("rEE.ee_link2 = 0x%8x", rEE.ee_link2); MY_LOG("rEE.ee_link3 = 0x%8x", rEE.ee_link3); MY_LOG("rEE.ee_link4 = 0x%8x", rEE.ee_link4); MY_LOG("rEE.ee_link5 = 0x%8x", rEE.ee_link5); #endif } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ EIndex_CCM_T IspTuningCustom:: evaluate_CCM_index(RAWIspCamInfo const& rCamInfo) { MY_LOG("%s()\n", __FUNCTION__); MY_LOG( "[+evaluate_CCM_index]" "(eIdx_CCM, i4CCT, i4FluorescentIndex)=(%d, %d, %d)" , rCamInfo.eIdx_CCM , rCamInfo.rAWBInfo.i4CCT , rCamInfo.rAWBInfo.i4FluorescentIndex); EIndex_CCM_T eIdx_CCM_new = rCamInfo.eIdx_CCM; // -----------------|---|---|--------------|---|---|------------------ // THA TH1 THB THC TH2 THD MINT32 const THA = 3318; MINT32 const TH1 = 3484; MINT32 const THB = 3667; MINT32 const THC = 4810; MINT32 const TH2 = 5050; MINT32 const THD = 5316; MINT32 const F_IDX_TH1 = 25; MINT32 const F_IDX_TH2 = -25; switch (rCamInfo.eIdx_CCM) { case eIDX_CCM_TL84: if ( rCamInfo.rAWBInfo.i4CCT < THB ) { eIdx_CCM_new = eIDX_CCM_TL84; } else if ( rCamInfo.rAWBInfo.i4CCT < THD ) { if ( rCamInfo.rAWBInfo.i4FluorescentIndex < F_IDX_TH2 ) eIdx_CCM_new = eIDX_CCM_CWF; else eIdx_CCM_new = eIDX_CCM_TL84; } else { eIdx_CCM_new = eIDX_CCM_D65; } break; case eIDX_CCM_CWF: if ( rCamInfo.rAWBInfo.i4CCT < THA ) { eIdx_CCM_new = eIDX_CCM_TL84; } else if ( rCamInfo.rAWBInfo.i4CCT < THD ) { if ( rCamInfo.rAWBInfo.i4FluorescentIndex > F_IDX_TH1 ) eIdx_CCM_new = eIDX_CCM_TL84; else eIdx_CCM_new = eIDX_CCM_CWF; } else { eIdx_CCM_new = eIDX_CCM_D65; } break; case eIDX_CCM_D65: if ( rCamInfo.rAWBInfo.i4CCT > THC ) { eIdx_CCM_new = eIDX_CCM_D65; } else if ( rCamInfo.rAWBInfo.i4CCT > TH1 ) { if(rCamInfo.rAWBInfo.i4FluorescentIndex > F_IDX_TH2) eIdx_CCM_new = eIDX_CCM_TL84; else eIdx_CCM_new = eIDX_CCM_CWF; } else { eIdx_CCM_new = eIDX_CCM_TL84; } break; default: break; } if ( rCamInfo.eIdx_CCM != eIdx_CCM_new ) { MY_LOG( "[-evaluate_CCM_index] CCM Idx(old,new)=(%d,%d)" , rCamInfo.eIdx_CCM, eIdx_CCM_new ); } return eIdx_CCM_new; } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MBOOL IspTuningCustom:: is_to_invoke_smooth_ccm_with_preference_gain(RAWIspCamInfo const& /*rCamInfo*/) { return MTRUE; } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MBOOL IspTuningCustom:: is_to_invoke_isp_interpolation(RAWIspCamInfo const& /*rCamInfo*/) { /* if(TUNING_FOR_AIS) { if(IS_AIS) { if(rCamInfo.eIspProfile == EIspProfile_MFB_Capture_EE_Off || rCamInfo.eIspProfile == EIspProfile_MFB_Capture_EE_Off_SWNR || rCamInfo.eIspProfile == EIspProfile_MFB_PostProc_EE_Off || rCamInfo.eIspProfile == EIspProfile_MFB_Blending_All_Off || rCamInfo.eIspProfile == EIspProfile_MFB_Blending_All_Off_SWNR || rCamInfo.eIspProfile == EIspProfile_MFB_PostProc_ANR_EE || rCamInfo.eIspProfile == EIspProfile_MFB_PostProc_ANR_EE_SWNR || rCamInfo.eIspProfile == EIspProfile_MFB_PostProc_Mixing || rCamInfo.eIspProfile == EIspProfile_MFB_PostProc_Mixing_SWNR ) { return MFALSE; } } } */ return MTRUE; } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MINT32 IspTuningCustom:: get_CCM_smooth_method(RAWIspCamInfo const& /*rCamInfo*/) { // 0: CCM (without flash info) // 1: enable flash CCM return 0; } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ EIndex_PCA_LUT_T IspTuningCustom:: evaluate_PCA_LUT_index(RAWIspCamInfo const& rCamInfo) { //MY_LOG("%s()\n", __FUNCTION__); // TODO: Add your code below... /* MY_LOG( "[+evaluate_PCA_LUT_index]" "(rCamInfo.eIdx_PCA_LUT, rCamInfo.rAWBInfo.i4CCT, rCamInfo.rAWBInfo.i4FluorescentIndex)=(%d, %d, %d)" , rCamInfo.eIdx_PCA_LUT, rCamInfo.rAWBInfo.i4CCT, rCamInfo.rAWBInfo.i4FluorescentIndex ); */ EIndex_PCA_LUT_T eIdx_PCA_LUT_new = rCamInfo.eIdx_PCA_LUT; // -----------------|-------|--------------|-------|------------------ // THA THB THC THD MINT32 const THA = 3318; MINT32 const THB = 3667; MINT32 const THC = 4810; MINT32 const THD = 5316; switch (rCamInfo.eIdx_PCA_LUT) { case eIDX_PCA_HIGH: if ( rCamInfo.rAWBInfo.i4CCT < THA ) { eIdx_PCA_LUT_new = eIDX_PCA_LOW; } else if ( rCamInfo.rAWBInfo.i4CCT < THC ) { eIdx_PCA_LUT_new = eIDX_PCA_MIDDLE; } else { eIdx_PCA_LUT_new = eIDX_PCA_HIGH; } break; case eIDX_PCA_MIDDLE: if ( rCamInfo.rAWBInfo.i4CCT > THD ) { eIdx_PCA_LUT_new = eIDX_PCA_HIGH; } else if ( rCamInfo.rAWBInfo.i4CCT < THA ) { eIdx_PCA_LUT_new = eIDX_PCA_LOW; } else { eIdx_PCA_LUT_new = eIDX_PCA_MIDDLE; } break; case eIDX_PCA_LOW: if ( rCamInfo.rAWBInfo.i4CCT > THD ) { eIdx_PCA_LUT_new = eIDX_PCA_HIGH; } else if ( rCamInfo.rAWBInfo.i4CCT > THB ) { eIdx_PCA_LUT_new = eIDX_PCA_MIDDLE; } else { eIdx_PCA_LUT_new = eIDX_PCA_LOW; } break; default: break; } if ( rCamInfo.eIdx_PCA_LUT != eIdx_PCA_LUT_new ) { MY_LOG( "[-evaluate_PCA_LUT_index] PCA_LUT_index(old,new)=(%d,%d)" , rCamInfo.eIdx_PCA_LUT, eIdx_PCA_LUT_new ); } return eIdx_PCA_LUT_new; } /******************************************************************************* * * eIdx_Shading_CCT_old: * [in] the previous color temperature index * eIDX_Shading_CCT_ALight * eIDX_Shading_CCT_CWF * eIDX_Shading_CCT_D65 * * i4CCT: * [in] the current color temperature from 3A. * * * return: * [out] the current color temperature index * eIDX_Shading_CCT_ALight * eIDX_Shading_CCT_CWF * eIDX_Shading_CCT_D65 * *******************************************************************************/ EIndex_Shading_CCT_T IspTuningCustom:: evaluate_Shading_CCT_index ( RAWIspCamInfo const& rCamInfo ) const { UINT32 i4CCT = rCamInfo.rAWBInfo.i4CCT; EIndex_Shading_CCT_T eIdx_Shading_CCT_new = rCamInfo.eIdx_Shading_CCT; // -----------------|----|----|--------------|----|----|------------------ // THH2 TH2 THL2 THH1 TH1 THL1 MINT32 const THL1 = 2500;//3257; MINT32 const THH1 = 2800;//3484; MINT32 const TH1 = (THL1+THH1)/2; //(THL1 +THH1)/2 MINT32 const THL2 = 4673; MINT32 const THH2 = 5155; MINT32 const TH2 = (THL2+THH2)/2;//(THL2 +THH2)/2 switch (rCamInfo.eIdx_Shading_CCT) { case eIDX_Shading_CCT_ALight: if ( i4CCT < THH1 ) { eIdx_Shading_CCT_new = eIDX_Shading_CCT_ALight; } else if ( i4CCT < TH2) { eIdx_Shading_CCT_new = eIDX_Shading_CCT_CWF; } else { eIdx_Shading_CCT_new = eIDX_Shading_CCT_D65; } break; case eIDX_Shading_CCT_CWF: if ( i4CCT < THL1 ) { eIdx_Shading_CCT_new = eIDX_Shading_CCT_ALight; } else if ( i4CCT < THH2 ) { eIdx_Shading_CCT_new = eIDX_Shading_CCT_CWF; } else { eIdx_Shading_CCT_new = eIDX_Shading_CCT_D65; } break; case eIDX_Shading_CCT_D65: if ( i4CCT < TH1 ) { eIdx_Shading_CCT_new = eIDX_Shading_CCT_ALight; } else if ( i4CCT < THL2 ) { eIdx_Shading_CCT_new = eIDX_Shading_CCT_CWF; } else { eIdx_Shading_CCT_new = eIDX_Shading_CCT_D65; } break; default: break; } //#if ENABLE_MY_LOG if ( rCamInfo.eIdx_Shading_CCT != eIdx_Shading_CCT_new ) { MY_LOG( "[-evaluate_Shading_CCT_index] Shading CCT Idx(old,new)=(%d,%d), i4CCT = %d\n" , rCamInfo.eIdx_Shading_CCT, eIdx_Shading_CCT_new,i4CCT ); } //#endif return eIdx_Shading_CCT_new; } MVOID IspTuningCustom:: reset_ISO_SmoothBuffer() { total_RA_num_frames_= 0; MY_LOG("reset_ISO total_RA_num_frames_=0"); memset(ISO_Buffer_, 6, sizeof(ISO_Buffer_)); MY_LOG("[%s] total_RA_num_frames_(%d)", __FUNCTION__, total_RA_num_frames_ ); MY_LOG("[%s] ISO_Buffer_[] = {%d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n}", __FUNCTION__, ISO_Buffer_[0], ISO_Buffer_[1], ISO_Buffer_[2], ISO_Buffer_[3], ISO_Buffer_[4], ISO_Buffer_[5], ISO_Buffer_[6], ISO_Buffer_[7], ISO_Buffer_[8], ISO_Buffer_[9] ); } static MINT32 ratioMapping(MINT32 i4Iso) { #define LERP(x, lo_x, lo_y, hi_x, hi_y)\ (((hi_x) - (x))*(lo_y) + ((x) - (lo_x))*(hi_y)) / ((hi_x) - (lo_x)) static const MINT32 iso[10] = {100, 200, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200}; static const MINT32 rto[10] = //{24, 22, 20, 18, 16, 14, 12, 10, 8, 6}; //Tower modify for iso1600 Noise 2014-12-26 {30, 28, 26, 24, 22, 20, 18, 16, 14, 12}; MINT32 i = 0; MINT32 i4Rto = 32; if (i4Iso < iso[0]) { i4Rto = rto[0]; } else if (i4Iso >= iso[9]) { i4Rto = rto[9]; } else { for (i = 1; i < 10; i++) { if (i4Iso < iso[i]) break; } i4Rto = LERP(i4Iso, iso[i-1], rto[i-1], iso[i], rto[i]); } return i4Rto; } MINT32 IspTuningCustom:: evaluate_Shading_Ratio ( RAWIspCamInfo const& rCamInfo ) { /* Sample code for evaluate shading ratio. The shading ratio is an integer ranging from 0(0%) to 32(100%). All informations can be obtained via rCamInfo. The following sample code shows a shading ratio evaluated by ISO value with temporal smoothness. */ MINT32 Avg_Frm_Cnt = 5; MINT32 i = 0; MINT32 i4Rto = 8; //32; MINT32 i4Iso = rCamInfo.rAEInfo.u4RealISOValue; customRatioLog = property_get_int32("vendor.debug.shading.custom.ratio.log", 0); int idx = total_RA_num_frames_ % Avg_Frm_Cnt; int *p_global_Ra = ISO_Buffer_; int n_frames, avgISO; ISO_Buffer_[idx] = i4Iso; // to prevent total frames overflow if (total_RA_num_frames_ >= 65535){ total_RA_num_frames_ = 0; } total_RA_num_frames_++; if (total_RA_num_frames_ < 20){ avgISO = 8; CAM_LOGD_IF(customRatioLog,"[%s] first avgISO = %d\n", __FUNCTION__, avgISO); } else { // smooth n_frames = ( total_RA_num_frames_ < Avg_Frm_Cnt) ? (total_RA_num_frames_) : (Avg_Frm_Cnt); avgISO = 0; for (int k = 0; k < n_frames; k++) { avgISO += ISO_Buffer_[k]; } avgISO /= n_frames; CAM_LOGD_IF(customRatioLog,"[%s] ISO_Buffer_[] = {%d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n}", __FUNCTION__, ISO_Buffer_[0], ISO_Buffer_[1], ISO_Buffer_[2], ISO_Buffer_[3], ISO_Buffer_[4], ISO_Buffer_[5], ISO_Buffer_[6], ISO_Buffer_[7], ISO_Buffer_[8], ISO_Buffer_[9] ); CAM_LOGD_IF(customRatioLog,"[%s] avgISO = %d", __FUNCTION__, avgISO); if (rCamInfo.rFlashInfo.isFlash == 2) { i4Rto = ratioMapping(i4Iso); MY_LOG("[%s] Main flash iso(%d), ratio(%d)", __FUNCTION__, i4Iso, i4Rto); } else { i4Rto = ratioMapping(avgISO); } } return i4Rto; } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ EIndex_ISO_T IspTuningCustom:: map_ISO_value_to_index(MUINT32 const u4Iso) const { //MY_LOG("%s()\n", __FUNCTION__); if ( u4Iso < 150 ) { return eIDX_ISO_100; } else if ( u4Iso < 300 ) { return eIDX_ISO_200; } else if ( u4Iso < 600 ) { return eIDX_ISO_400; } else if ( u4Iso < 1000 ) { return eIDX_ISO_800; } else if ( u4Iso < 1400 ) { return eIDX_ISO_1200; } else if ( u4Iso < 1800 ) { return eIDX_ISO_1600; } else if ( u4Iso < 2200 ) { return eIDX_ISO_2000; } else if ( u4Iso < 2600 ) { return eIDX_ISO_2400; } else if ( u4Iso < 3000 ) { return eIDX_ISO_2800; } return eIDX_ISO_3200; } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MUINT32 IspTuningCustom:: map_ISO_index_to_value(EIndex_ISO_T const u4IsoIdx) const { //MY_LOG("%s()\n", __FUNCTION__); if ( u4IsoIdx == eIDX_ISO_100 ) { return 100; } else if ( u4IsoIdx == eIDX_ISO_200 ) { return 200; } else if ( u4IsoIdx == eIDX_ISO_400 ) { return 400; } else if ( u4IsoIdx == eIDX_ISO_800 ) { return 800; } else if ( u4IsoIdx == eIDX_ISO_1200 ) { return 1200; } else if ( u4IsoIdx == eIDX_ISO_1600 ) { return 1600; } else if ( u4IsoIdx == eIDX_ISO_2000 ) { return 2000; } else if ( u4IsoIdx == eIDX_ISO_2400 ) { return 2400; } else if ( u4IsoIdx == eIDX_ISO_2800 ) { return 2800; } else if ( u4IsoIdx == eIDX_ISO_3200 ) { return 3200; } return 0; // If no ISO Index matched, return 0. } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MUINT32 IspTuningCustom:: remap_ISO_value(MUINT32 const u4Iso) const { MUINT32 remapIso = u4Iso; //add your remap ISO code here //MY_LOG("[%s] ISO: in(%d), out(%d)", __FUNCTION__, u4Iso, remapIso); return remapIso; } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ EIndex_ISO_T IspTuningCustom:: map_ISO_value_to_upper_index(MUINT32 const u4Iso) const { //MY_LOG("%s()\n", __FUNCTION__); if ( u4Iso <= 100 ) { return eIDX_ISO_100; } else if ( u4Iso <= 200 ) { return eIDX_ISO_200; } else if ( u4Iso <= 400 ) { return eIDX_ISO_400; } else if ( u4Iso <= 800 ) { return eIDX_ISO_800; } else if ( u4Iso <= 1200 ) { return eIDX_ISO_1200; } else if ( u4Iso <= 1600 ) { return eIDX_ISO_1600; } else if ( u4Iso <= 2000 ) { return eIDX_ISO_2000; } else if ( u4Iso <= 2400 ) { return eIDX_ISO_2400; } else if ( u4Iso <= 2800 ) { return eIDX_ISO_2800; } return eIDX_ISO_3200; } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ EIndex_ISO_T IspTuningCustom:: map_ISO_value_to_lower_index(MUINT32 const u4Iso) const { //MY_LOG("%s()\n", __FUNCTION__); if ( u4Iso < 200 ) { return eIDX_ISO_100; } else if ( u4Iso < 400 ) { return eIDX_ISO_200; } else if ( u4Iso < 800 ) { return eIDX_ISO_400; } else if ( u4Iso < 1200 ) { return eIDX_ISO_800; } else if ( u4Iso < 1600 ) { return eIDX_ISO_1200; } else if ( u4Iso < 2000 ) { return eIDX_ISO_1600; } else if ( u4Iso < 2400 ) { return eIDX_ISO_2000; } else if ( u4Iso < 2800 ) { return eIDX_ISO_2400; } else if ( u4Iso < 3200 ) { return eIDX_ISO_2800; } return eIDX_ISO_3200; } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MVOID IspTuningCustom:: refineLightSourceAWBGainforMultiCCM(AWB_GAIN_T& rD65, AWB_GAIN_T& rTL84, AWB_GAIN_T& rCWF, AWB_GAIN_T& rA) { MY_LOG("%s()\n", __FUNCTION__); MY_LOG("D65 AWB Gain = (%d, %d, %d)\n", rD65.i4R, rD65.i4G, rD65.i4B); MY_LOG("TL84 AWB Gain = (%d, %d, %d)\n", rTL84.i4R, rTL84.i4G, rTL84.i4B); MY_LOG("CWF AWB Gain = (%d, %d, %d)\n", rCWF.i4R, rCWF.i4G, rCWF.i4B); MY_LOG("A AWB Gain = (%d, %d, %d)\n", rA.i4R, rA.i4G, rA.i4B); }
[ "Skyrimus@yandex.ru" ]
Skyrimus@yandex.ru
faac9c570b0bf01a5b9bf5d540a6bfc245d5f98f
76896b75968defc6105525235b5657122ca4c744
/src/Supervision_SauvegardeKevin/f_Supervision.cpp
149d3ac1e49e8a259eaa8516de3984adb6cbe013
[]
no_license
NicoG60/OpenOrganigram
4580376f74e235f414c8b3fbe3cf81b293b1d2d3
3921fc6b3d2f9b3008e53cce69c1ebe6f18ad055
refs/heads/master
2021-01-15T10:47:09.008166
2015-03-15T17:43:17
2015-03-15T17:43:17
32,272,999
2
1
null
null
null
null
UTF-8
C++
false
false
48,690
cpp
//----------------------------------------------------------------------------------- /** @file f_Supervision.cpp * @brief IHM Principale * @author Kévin BATARD * @author STS IRIS, Lycée Nicolas Appert, ORVAULT (FRANCE) * @since 4 Février 2014 * @version 1.0 * @date 21 Février 2014 * * Classe de gestion de l'IHM principale de supervision, qui définit la zone MDI * * Fabrication * * @todo Il faut coder la classe * * @bug * */ //----------------------------------------------------------------------------------- //===== En-Têtes Personnels ===== #include "f_Supervision.h" #include "ui_f_Supervision.h" #include "f_CapteurN.h" #include "f_CapteurA.h" #include "f_ActionneurG.h" #include "f_ActionneurB.h" #include "f_FenetreDeBase.h" #include "f_Buzzer.h" #include "f_Telecommande.h" #include "f_Moteur.h" #include "f_lcd.h" //===== En-Têtes standards ===== #include <QDebug> /** Description détaillée de la méthode * @pre Constructeur par défaut * **/ f_Supervision::f_Supervision(Arduino *pControleur,QWidget *parent) : // Constructeur QWidget(parent), ui(new Ui::f_Supervision), pConnecterArduino(pControleur), pCompteurSup(0), nIndiceFenetre(0), Compteur(0), bAttenteReponse(false), bLCD(false) { this->ui->setupUi(this) ; pConnecterArduino->setSimulation(this); // Timer de l'arduino this->pCompteurSup= new QTimer (this) ; //Création du Timer this->pCompteurSup->setInterval(200); //On définit un intervalle pour le Timer connect(this->pCompteurSup,SIGNAL(timeout()),this, SLOT(on_TempsFinit())); //Lorsque le temps est atteint, on lance Detection this->ui->ZoneMDI->setWindowTitle("Fenetre") ; //Titre de la fenêtre //this->CreerLCD("LCD","LCD",15); this->connect(pConnecterArduino, SIGNAL(RetourCommandeSupervision(QByteArray)), this, SLOT(RetourCommande(QByteArray))); //On récupère le signal de retour de commande de supervsion au retour de commande de la classe } /** Destructeur * **/ f_Supervision::~f_Supervision() // Destructeur { for(register int i = 0; i < ListeFenetre.length(); i++) //On parcourt l'intégralité des fenêtres { delete this->ListeFenetre[i] ; //On les supprime } this->pConnecterArduino=0; this->nIndiceFenetre=0 ; this->Compteur=0; this->bAttenteReponse=false; delete ui ; } /** * @test Va afficher toute les fenêtres de la QList * **/ void f_Supervision::on_BtAfficher_clicked() // Permet de ré afficher toute les fenêtres { for(register int i = 0; i < ListeFenetre.length(); i++) //On parcourt l'intégralité des fenêtres { this->ListeFenetre[i]->setVisible(true) ; //On rend toutes les fenêtres visibles } } /** * @test Va rendre invisible toute les fenêtres de la QList * **/ void f_Supervision::on_BtMasquer_clicked() // Permet de masquer toute les fenêtres { for(register int i = 0; i < ListeFenetre.length(); i++) //On parcourt l'intégralité des fenêtres { this->ListeFenetre[i]->setVisible(false) ; //On rend toutes les fenêtres invisibles } } /** Création de fenêtre pour LED * @param sNom=Nom de l'actionneur, nNumBroche=Numéro de la broche, sCommande=Une commande d'action, sCheminImage * @test Création de d'une fenêtre ActionneurB * **/ void f_Supervision::CreerActionneurB(QString sNom, unsigned int nNumBroche, QString sCommande, QString sCheminImage) { f_SubWindow * NouvelleSubWindow (new f_SubWindow(this)) ; //On déclare un nouveau f_Subwindow this->ui->ZoneMDI->addSubWindow(NouvelleSubWindow) ; //On l'ajoute à la zone MDI this->ListeFenetre.append(NouvelleSubWindow); //On ajoute cette fenêtre à la liste de fenêtre f_ActionneurB* f_Actionneur = new f_ActionneurB ; //Création objet f_ActionneurB NouvelleSubWindow->setWidget(f_Actionneur); //On ajoute à la nouvelle subwindow l'actionneur NouvelleSubWindow->setWindowTitle("LED"); //On précise un titre f_Actionneur->Commande(sCommande); //On renvoie la commande à f_ActionneurB f_Actionneur->ImageLabel(sCheminImage); //On envoie le chemin de fichier image à f_ActionneurB QVariant vNumBroche(nNumBroche) ; //Variation d'un int en QString QString Texte =""; Texte += sNom ; //Texte se remplit du nom passé en paramètre Texte += " \nCONNECTÉ À LA BROCHE N° " ; //On ajoute un texte de liaison Texte += vNumBroche.toString() ; //On ajoute ensuite la broche NouvelleSubWindow->getWidget()->setTexteTitre(Texte) ; //On envoie le titre complet à la classe } /** Création de fenêtre pour Servo Moteur * @param sNom=Nom de l'actionneur, nNumBroche=Numéro de la broche, sCommande=Une commande d'action, Chemin image * @test Création de d'une fenêtre ActionneurG * **/ void f_Supervision::CreerActionneurG(QString sNom, unsigned int nNumBroche, QString sCommande) { f_SubWindow * NouvelleSubWindow (new f_SubWindow(this)) ; //On déclare un nouveau f_Subwindow this->ui->ZoneMDI->addSubWindow(NouvelleSubWindow) ; //On l'ajoute à la zone MDI this->ListeFenetre.append(NouvelleSubWindow); //On ajoute cette fenêtre à la liste de fenêtre f_ActionneurG * f_Actionneur = new f_ActionneurG ; //Création objet f_ActionneurG f_Actionneur->Commande(sCommande); //On renvoie la commande à f_ActionneurB NouvelleSubWindow->setWidget(f_Actionneur); //On ajoute à la nouvelle subwindow l'actionneur NouvelleSubWindow->setWindowTitle("Servo Moteur") ; //On précise un titre QVariant vNumBroche(nNumBroche) ; //Variation d'un int en QString QString Texte =""; Texte += sNom ; //Texte se remplit du nom passé en paramètre Texte += " \nCONNECTÉ À LA BROCHE N° " ; //On ajoute un texte de liaison Texte += vNumBroche.toString() ; //On ajoute ensuite la broche NouvelleSubWindow->getWidget()->setTexteTitre(Texte) ; //On envoie le titre complet à la classe } /** Création de fenêtre pour les moteurs * @param sNom=Nom du moteur, sNumBroche=Numéros de la broches, sTypeMoteur=le type, sCheminImage * @test Création de d'une fenêtre ActionneurB * **/ void f_Supervision::CreerMoteur(QString sNom, QString sNumBroche, QString sTypeMoteur, QString sCheminImage) { f_SubWindow * NouvelleSubWindow (new f_SubWindow(this)) ; //On déclare un nouveau f_Subwindow this->ui->ZoneMDI->addSubWindow(NouvelleSubWindow) ; //On l'ajoute à la zone MDI this->ListeFenetre.append(NouvelleSubWindow); //On ajoute cette fenêtre à la liste de fenêtre F_Moteur * F_Mot = new F_Moteur ; //Création objet f_Moteur F_Mot->ImageLabel(sCheminImage); //On envoie le chemin de fichier image à f_Moteur F_Mot->DefinirBroche(sNumBroche); //On renvoie les numéros de brochse du moteur F_Mot->DefinirTypeMoteur(sTypeMoteur); //On renvoie le type de moteur NouvelleSubWindow->setWidget(F_Mot); //On ajoute à la nouvelle subwindow le moteur NouvelleSubWindow->setWindowTitle("Moteur") ; //On précise un titre QVariant vNumBroche(sNumBroche) ; //Variation d'un int en QString QString Texte =""; Texte += sNom ; //Texte se remplit du nom passé en paramètre Texte += " \nCONNECTÉ À LA BROCHE N° " ; //On ajoute un texte de liaison Texte += vNumBroche.toString() ; //On ajoute ensuite la broche NouvelleSubWindow->getWidget()->setTexteTitre(Texte) ; //On envoie le titre complet à la classe } /** Création de fenêtre pour capteur analogique * @param sNom=Nom de l'actionneur, sType=IN/OUT, nNumBroche=Numéro de la broche, sCommande=Une commande d'action * @test Création de d'une fenêtre CapteurA * **/ void f_Supervision::CreerCapteurA(QString sNom, unsigned int nNumBroche, QString sCommande, QString sCheminImage, int nConversion) { f_SubWindow * NouvelleSubWindow (new f_SubWindow(this)) ; //On déclare un nouveau f_Subwindow this->ui->ZoneMDI->addSubWindow(NouvelleSubWindow) ; //On l'ajoute à la zone MDI this->ListeFenetre.append(NouvelleSubWindow); //On ajoute cette fenêtre à la liste de fenêtre f_CapteurA * f_Capteur = new f_CapteurA ; //Création objet f_CapteurA NouvelleSubWindow->setWidget(f_Capteur); //On ajoute à la nouvelle subwindow le capteur analogique NouvelleSubWindow->setWindowTitle(sNom) ; //On précise un titre f_Capteur->Commande(sCommande); //On renvoie la commande à f_CapteurA f_Capteur->Convertir(nConversion); //On renvoie le type de capteur pour savoir si il faut une conversion de la valeur f_Capteur->ImageLabel(sCheminImage); //On envoie le chemin de fichier image à f_CapteurA QVariant vNumBroche(nNumBroche) ; //Variation d'un int en QString QString Texte =""; Texte += sNom ; //Texte se remplit du nom passé en paramètre Texte += " \nCONNECTÉ À LA BROCHE N° " ; //On ajoute un texte de liaison Texte += vNumBroche.toString() ; //On ajoute ensuite la broche NouvelleSubWindow->getWidget()->setTexteTitre(Texte) ; //On envoie le titre complet à la classe } /** Création d'un bouton poussoir * @param sNom=Nom de l'actionneur, nNumBroche=Numéro des broche, sCommande=Une commande d'action,chemin image * @test Création de d'une fenêtre CapteurN * **/ void f_Supervision::CreerCapteurN(QString sNom, unsigned int nNumBroche, QString sCommande, QString sCheminImage) { f_SubWindow * NouvelleSubWindow (new f_SubWindow(this)) ; //On déclare un nouveau f_Subwindow this->ui->ZoneMDI->addSubWindow(NouvelleSubWindow) ; //On l'ajoute à la zone MDI this->ListeFenetre.append(NouvelleSubWindow); //On ajoute cette fenêtre à la liste de fenêtre f_CapteurN *f_Capteur = new f_CapteurN; //Création objet f_CapteurN f_Capteur->Commande(sCommande); //On renvoie la commande à f_CapteurN NouvelleSubWindow->setWidget(f_Capteur); //On ajoute à la nouvelle subwindow le capteur numérique NouvelleSubWindow->setWindowTitle("Bouton Poussoir") ; //On précise un titre f_Capteur->ImageLabel(sCheminImage); //On envoie le chemin de fichier image à f_CapteurN QVariant vNumBroche(nNumBroche) ; //Variation d'un int en QString QString Texte =""; Texte += sNom ; //Texte se remplit du nom passé en paramètre Texte += " \nCONNECTÉ À LA BROCHE N° " ; //On ajoute un texte de liaison Texte += vNumBroche.toString() ; //On ajoute ensuite la broche NouvelleSubWindow->getWidget()->setTexteTitre(Texte) ; //On envoie le titre complet à la classe } /** Création de fenêtre pour tous les capteurs non définis * @param sNom=Nom du moteur,sType=IN/OUT, nNumBroche=Numéro de la broche sCheminImage= chemin de l'image, sCommande1 et sCommande2 = 2 commandes, sTexte1 et sTexte2= 2 textes correspondant * **/ void f_Supervision::CreerFenetreDeBase (QString sNom, QString sType,unsigned int nNumBroche, QString sCommande1, QString sCheminImage,QString sTexte1, QString sCode1, QString sTexte2, QString sCode2) { f_SubWindow * NouvelleSubWindow (new f_SubWindow(this)) ; //On déclare un nouveau f_Subwindow this->ui->ZoneMDI->addSubWindow(NouvelleSubWindow) ; //On l'ajoute à la zone MDI this->ListeFenetre.append(NouvelleSubWindow); //On ajoute cette fenêtre à la liste de fenêtre f_FenetreDeBase* f_FenetreBase = new f_FenetreDeBase ; //Création objet f_FenetreDeBase f_FenetreBase->Commande(sCommande1); //On renvoie la commande à f_FenetreDeBase f_FenetreBase->Affichage(sTexte1,sCode1,sTexte2,sCode2); //On envoie les deux commandes possibles avec les actions correspondantes NouvelleSubWindow->setWidget(f_FenetreBase); //On ajoute à la nouvelle subwindow la fenêtre f_FenetreBase->ImageLabel(sCheminImage); //On envoie le chemin de fichier image à f_FenetreDeBase NouvelleSubWindow->setWindowTitle("Fenêtre"+sNom) ; //On précise un titre QVariant vNumBroche(nNumBroche) ; //Variation d'un int en QString QString Texte="" ; Texte += sNom ; //Texte se remplit du nom passé en paramètre if(sType=="AI") //Si c'est un capteur analogique { Texte += " \nCONNECTÉ À LA BROCHE N° A-" ; //On ajoute un texte de liaison précisant "A" Texte += vNumBroche.toString() ; //On ajoute ensuite la broche NouvelleSubWindow->getWidget()->setTexteTitre(Texte) ; //On envoie le titre complet à la classe } else if(sType=="SONAR") //Si c'est un capteur ultrason de distance { f_FenetreBase->TypeSONAR(sType); //On renvoie le type SONAR Texte += " \nCONNECTÉ À LA BROCHE N° " ; //On ajoute un texte de liaison QString sCom1 = sCommande1.mid(1) ; //On commence après le premier caractère QString sCom2 = sCom1.left(2) + " ET " ; //On récupère les deux premier caractères et on ajoute un texte de liaison QString sCom3 = sCom1.right(2) ; //On récupère les deux dernier caractères Texte += sCom2+sCom3; //On les assemble NouvelleSubWindow->getWidget()->setTexteTitre(Texte) ; //On envoie le titre complet à la classe } else { Texte += " \nCONNECTÉ À LA BROCHE N° " ; //On ajoute un texte de liaison Texte += vNumBroche.toString() ; //On ajoute ensuite la broche NouvelleSubWindow->getWidget()->setTexteTitre(Texte) ; //On envoie le titre complet à la classe } } /** Création d'un Buzzer * @param sNom=Nom, nNumBroche=Numéro des broche, sCommande=Une commande d'action, * **/ void f_Supervision::CreerBuzzer(QString sNom,unsigned int nNumBroche, QString sCommande) { f_SubWindow * NouvelleSubWindow (new f_SubWindow(this)) ; //On déclare un nouveau f_Subwindow this->ui->ZoneMDI->addSubWindow(NouvelleSubWindow) ; //On l'ajoute à la zone MDI this->ListeFenetre.append(NouvelleSubWindow); //On ajoute cette fenêtre à la liste de fenêtre f_Buzzer* f_Buzz = new f_Buzzer ; //Création objet f_Buzzer f_Buzz->Commande(sCommande); //On renvoie la commande à f_Buzzer NouvelleSubWindow->setWidget(f_Buzz); //On ajoute à la nouvelle subwindow la fenêtre buzzer NouvelleSubWindow->setWindowTitle("Fenêtre Buzzer") ; //On précise un titre QVariant vNumBroche(nNumBroche) ; //Variation d'un int en QString QString Texte =""; Texte += sNom ; //Texte se remplit du nom passé en paramètre Texte += " \nCONNECTÉ À LA BROCHE N° " ; //On ajoute un texte de liaison Texte += vNumBroche.toString() ; //On ajoute ensuite la broche NouvelleSubWindow->getWidget()->setTexteTitre(Texte) ; //On envoie le titre complet à la classe } /** Création d'une télécommande * @param sNom=Nom, nNumBroche=Numéro des broche, sCommande=Une commande d'action * **/ void f_Supervision::CreerTelecommande(QString sNom, unsigned int nNumBroche, QString sCommande) { f_SubWindow * NouvelleSubWindow (new f_SubWindow(this)) ; //On déclare un nouveau f_Subwindow this->ui->ZoneMDI->addSubWindow(NouvelleSubWindow) ; //On l'ajoute à la zone MDI this->ListeFenetre.append(NouvelleSubWindow); //On ajoute cette fenêtre à la liste de fenêtre f_Telecommande * f_Tele = new f_Telecommande ; //Création objet f_Telecommande NouvelleSubWindow->setWidget(f_Tele); //On ajoute à la nouvelle subwindow la fenêtre télécommande f_Tele->Commande(sCommande); //On renvoie la commande à f_Telecommande qDebug () << "Commane tele" << sCommande ; NouvelleSubWindow->setWindowTitle("Fenêtre Télécommande"); //On précise un titre QVariant vNumBroche(nNumBroche) ; //Variation d'un int en QString QString Texte =""; Texte += sNom ; //Texte se remplit du nom passé en paramètre Texte += " \nCONNECTÉ À LA BROCHE N° " ; //On ajoute un texte de liaison Texte += vNumBroche.toString() ; //On ajoute ensuite la broche NouvelleSubWindow->getWidget()->setTexteTitre(Texte) ; //On envoie le titre complet à la classe } /** Création du LCD * @param sNom=Nom de l'actionneur, nNumBroche=Numéro des broche, sCommande=Une commande d'action * **/ void f_Supervision::CreerLCD(QString sNom, QString /*sType*/,unsigned int /*nNumBroche*/) { f_SubWindow * NouvelleSubWindow (new f_SubWindow(this)) ; //On déclare un nouveau f_Subwindow this->ui->ZoneMDI->addSubWindow(NouvelleSubWindow) ; //On l'ajoute à la zone MDI this->ListeFenetre.append(NouvelleSubWindow); //On ajoute cette fenêtre à la liste de fenêtre f_LCD* pLCD = new f_LCD ; //Création objet f_LCD NouvelleSubWindow->setWidget(pLCD); //On ajoute à la nouvelle subwindow la fenêtre LCD NouvelleSubWindow->setWindowTitle("Fenêtre LCD") ; //On précise un titre //QVariant vNumBroche(nNumBroche) ; QString Texte="" ; Texte += sNom ; //Texte se remplit du nom passé en paramètre Texte += " \nCONNECTÉ AU BUS I2C " ; //On ajoute un texte de liaison // Texte += vNumBroche.toString() ; NouvelleSubWindow->getWidget()->setTexteTitre(Texte) ; //On envoie le titre complet à la classe } /** Permet d'envoyer les données à l'Arduino * @param sCommande= correspond à la commande * **/ void f_Supervision::EnvoyerDonneesSup(QString sCommande) { if(!sCommande.isEmpty()) //Si la commande n'est pas vide { if(!this->bAttenteReponse || this->bLCD==true) //Et si on n'est pas en attente de réponse { bool bReponse (false); //bRetour à false bReponse = this->pConnecterArduino->EnvoyerDonnees(sCommande, SUPV); //On récupère dans un bool l'état de l'envoi de commande pour voir si elle a réussi ou non if(bReponse) //Si elle a réussi { this->bAttenteReponse = true ; //On met à true l'attente this->FileCommande.enqueue(sCommande) ; //On ajoute la commande à la file de commande } } else { this->Compteur ++; //On incrémente un compteur if(this->Compteur > 5) //Si on dépasse 5 tours de boucle { this->Compteur = 0; qDebug() << "f_Supervision::EnvoyerDonneesSup => Timeout..."; //TIMEOUT this->bAttenteReponse = false ; //Attente repasse à false this->FileCommande.dequeue() ; //On enlève la dernière commande dans la file this->pConnecterArduino->AnnulerDerniereCommande(SUPV); //On annule aussi le dernier émetteur } } } } /** Slot public : Permet de gérer le retour de commande de l'Arduino * @param ValeurRetour= retour de commande renvoyé par l'Arduino * **/ void f_Supervision::RetourCommande(QByteArray ValeurRetour) { bool Redemarrer(false); //bool permettant la reconnexion de l'Arduino if(this->pCompteurSup != 0 && this->pCompteurSup->isActive()) //Si le compteur est lancé et actif { this->pCompteurSup->stop(); //On stop le timer Redemarrer = true; //On le passe à true } this->bAttenteReponse = false ; if(ValeurRetour.left(4) == "DONE") //Si le retour de commande commence par "DONE" on ne le gère pas { //qDebug() << "Done"; } //qDebug() << "f_Supervision::RetourCommande - ValeurRetour : " << ValeurRetour; QString CommandeCourante ="" ; //On définit un string de commande actuelle if(!this->FileCommande.isEmpty()) //Si la file de commande n'est pas vide { CommandeCourante = this->FileCommande.head(); //On prend la première commande de la file } if(!CommandeCourante.isEmpty()) //Si la commande n'est pas vide { f_WidgetInterne * FenetreRetour(0) ; //On déclare un pointeur nul for(register int i = 0; i < ListeFenetre.length(); i++) //On parcourt toutes les fenêtres { if(this->ListeFenetre[i]->getWidget()->getCommandeEtat() == CommandeCourante) //Et on vérifie quelle commande correspond à quelle fenêtre { FenetreRetour = this->ListeFenetre[i]->getWidget(); //On récupère le type de fenêtre } } this->FileCommande.dequeue(); //On supprime la dernière commande if(FenetreRetour != 0) //Si il n'est pas vide { switch (FenetreRetour->getType()) { //En fonction du type de fenêtre case CAP_N : qobject_cast<f_CapteurN *>(FenetreRetour)->ChangementEtat(ValeurRetour); //On retourne la valeur à la classe f_CapteurN break; case ACT_B : qobject_cast<f_ActionneurB *>(FenetreRetour)->ChangementImage(ValeurRetour); //On retourne la valeur à la classe f_ActionneurB break; case CAP_A : qobject_cast<f_CapteurA *>(FenetreRetour)->RetourValeurPotan(ValeurRetour); //On retourne la valeur à la classe f_CapteurA break; case TELECOMMANDE : qobject_cast<f_Telecommande*>(FenetreRetour)->ChangementBouton(ValeurRetour); //On retourne la valeur à la classe f_Telecommande break; case AUTRE : qobject_cast<f_FenetreDeBase*>(FenetreRetour)->RetourValeurFDB(ValeurRetour); //On retourne la valeur à la classe f_FenetreDeBase default: break; } } } if(Redemarrer) //Si on peut lancer la reconnexion { this->pCompteurSup->start(); //On relance le timer } } /** Se lance toute les 200ms pour envoyer les commanes * **/ void f_Supervision::on_TempsFinit() { if(!this->ListeFenetre.isEmpty()) //Si il existe au moins une fenêtre { int Indice (this->nIndiceFenetre); //On indique dans un int le numéro de fenêtre QString sCommande (this->ListeFenetre[Indice]->getWidget()->getCommandeEtat()) ; //On met dans un QString les commandes de chaque fenêtre if(!sCommande.isEmpty()) //Si la commande n'est pas vide { this->EnvoyerDonneesSup(sCommande); //On envoie la commande } this->nIndiceFenetre++; //On incrémente l'indice de fenêtre if(this->nIndiceFenetre == this->ListeFenetre.length()) //Si l'indice de fenêtre à fait le tour de toutes les fenêtres { this->nIndiceFenetre = 0; //On initialise l'indice de fenêtre } } } /** Permet de lancer le timer lorsque la supervision est ouverte * **/ void f_Supervision::showEvent(QShowEvent * e) { qDebug() << "Supervision Show"; if(this->pCompteurSup != 0) //Si le compteur est créé { this->pCompteurSup->start(); //On lance le timer } QWidget::showEvent(e); } /** Permet d'arrêter le timer lorsque la supervision est fermée * **/ void f_Supervision::hideEvent(QHideEvent * e) { qDebug() << "Supervision Hide"; if(this->pCompteurSup != 0) //Si le compteur est créé { this->pCompteurSup->stop(); //On arrête le timer } QWidget::hideEvent(e); } /** Slot Privé : Permet de réorgniser les fenêtres de façon horizontales lorsque l'on clique sur le bouton **/ void f_Supervision::on_BtHorizontal_clicked() { if (this->ui->ZoneMDI->subWindowList().isEmpty()) { return; } QPoint position(0, 0); foreach (QMdiSubWindow *window, this->ui->ZoneMDI->subWindowList()) { QRect rect(0, 0, this->ui->ZoneMDI->width() / this->ui->ZoneMDI->subWindowList().count(), this->ui->ZoneMDI->height()); window->setGeometry(rect); window->move(position); position.setX(position.x() + window->width()); } } /** Slot Privé : Permet de réorgniser les fenêtres de façon verticales lorsque l'on clique sur le bouton **/ void f_Supervision::on_BtVertical_clicked() { if (this->ui->ZoneMDI->subWindowList().isEmpty()) { return; } QPoint position(0, 0); foreach (QMdiSubWindow *window, this->ui->ZoneMDI->subWindowList()) { QRect rect(0, 0, this->ui->ZoneMDI->width() / this->ui->ZoneMDI->subWindowList().count(), this->ui->ZoneMDI->height()); window->setGeometry(rect); window->move(position); position.setY(position.y()+ window->width()); } } /** Slot Public : Permet de gérer l'affichage des fenêtres selon la position du dock de supervision * @param Loc= position de la supervision * **/ void f_Supervision::EmplacementSupervision(Qt::DockWidgetArea Loc) { switch (Loc) { case 0x1: this->on_BtVertical_clicked(); break; case 0x2: this->on_BtVertical_clicked(); break; case 0x4: this->on_BtHorizontal_clicked(); break; case 0x8: this->on_BtHorizontal_clicked(); break; default: break; } } /** Elle permet de lire les fichiers INI d'un plan de cablâge et de récupérer les informations dedanns pour pouvoir par la suite détecter les actionneurs ou * capteurs présents. Elle transmet les broches numériques, analogiques,le chemin d'image, la commande etc.. à chaque carte I/O * @param sChemin=le chemin du fichier INI * **/ void f_Supervision::OuvrirFichierINI(QString sChemin) { this->PurgerListeFenetre(); QSettings FichierIni(sChemin,QSettings::IniFormat) ; //On ouvre le fichier INI en fonction du chemin passé en paramètre //======================= FICHIERS INI ==========================// //== On parcourt l'intégralité du fichier INI, et si on détecte un "Groupe" commencant par "EASYCON" ==/ //== On récupère la broche numérique, analogique, le type, et le chemin image ==/ //== Chaque groupe est identifié à une carte I/O, et on transmet les informations nécessaires ==/ //== Je vais seulement détailler le premier cas, car c'est à chaque fois le même système ==/ QStringList ListeGroupe (FichierIni.childGroups()); bool bSonarPulse (false); bool bSonarEcho (false); QString sSonarPulse ="" ; QString sSonarEcho ="" ; QString sCommandeSONAR = "" ; QString sBrocheMoteur = ""; int nSonarPulse =0 ; int nSonarEcho =0 ; for(register int i = 0; i < ListeGroupe.length(); i++) { if(ListeGroupe[i].left(4) == "EASY" || ListeGroupe[i].left(7) == "ARDUINO") { QString Type=""; QString Image=""; int BrocheNum=0; int BrocheAna=0; QStringList debug (FichierIni.value(ListeGroupe[i] + "/Broche_Numerique").toString()); qDebug() << debug; BrocheNum = FichierIni.value(ListeGroupe[i] + "/Broche_Numerique").toString().split(',').at(0).toUInt(); BrocheAna = FichierIni.value(ListeGroupe[i] + "/Broche_Analogique").toUInt(); sBrocheMoteur = FichierIni.value(ListeGroupe[i] + "/Broche_Numerique").toString().split(',').join(','); Type = FichierIni.value(ListeGroupe[i] + "/Type").toString(); Image = FichierIni.value(ListeGroupe[i] + "/Iocard").toString(); QString GestionImage = Image.left(4); qDebug() << Type; if(Image=="IRF1") //Si c'est une télécommande { QSettings settings ("./IOCard/IRF1/config.ini", QSettings::IniFormat ); //On ouvre le fichier INI de la télécommande QString sNom = settings.value("TITRE/NOM").toString(); //Dedans on récupère le NOM //QString sCheminImage = "./IOCard/"+Image ; //On récupère le chemin de l'image for (register int i =0; i<sNom.length();i++) //On parcourt tous les caractères { sNom[i]=sNom[i].toUpper(); //On met le nom en majuscule } QString sCommande = "" ; QVariant vCommande(BrocheAna) ; //La broche analogique va être mise dans un QString QString Texte ="I"; //On met le caractère correspondant à la carte I/O (Ici : I pour la télécommande) sCommande += Texte ; //On met ce caractère dans un nouveau QString if(BrocheAna<10) //Si la broche est composé d'un seul caractère { sCommande += "0"; //On rajoute un "0" pour faire deux caractères } sCommande += vCommande.toString() ; //On forme la commande avec le "I" et la broche this->CreerTelecommande(sNom,BrocheAna,sCommande); //On appelle ensuite la méthode créant la carte en question (Ici : La télécommande) } else if (Image=="LCD1") { QSettings settings ("./IOCard/LCD1/config.ini", QSettings::IniFormat ); QString sNom = settings.value("TITRE/NOM").toString(); for (register int i =0; i<sNom.length();i++) { sNom[i]=sNom[i].toUpper(); } this->bLCD=true ; this->CreerLCD(sNom,Type,0); } else if (Image=="POTAR1" || Image=="CTN1" || Image=="LDR1") { QSettings settings ("./IOCard/"+Image+"/config.ini", QSettings::IniFormat ); QString sNom = settings.value("TITRE/NOM").toString(); QString sCheminImage = "./IOCard/"+Image ; for (register int i =0; i<sNom.length();i++) { sNom[i]=sNom[i].toUpper(); } QString sCommande = "" ; QVariant vCommande(BrocheAna) ; QString Texte ="A"; sCommande += Texte ; if(BrocheAna<10) { sCommande += "0"; } sCommande += vCommande.toString() ; int nConversion =0 ; if(Image=="CTN1") { nConversion=1; } else if (Image=="LDR1") { nConversion=2; } else { nConversion=0; } this->CreerCapteurA(sNom,BrocheAna,sCommande,sCheminImage,nConversion); } else if (Image=="SERVO1") { QSettings settings ("./IOCard/SERVO1/config.ini", QSettings::IniFormat ); QString sNom = settings.value("TITRE/NOM").toString(); for (register int i =0; i<sNom.length();i++) { sNom[i]=sNom[i].toUpper(); } QString sCommande = "" ; QVariant vCommande(BrocheNum) ; QString Texte ="S"; sCommande += Texte ; if(BrocheNum<10) { sCommande += "0"; } sCommande += vCommande.toString() ; this->CreerActionneurG(sNom,BrocheNum,sCommande); } else if (Image=="MOT1_DIR" || Image=="MOT2_DIR" || Image=="MOT1_PWM" || Image=="MOT2_PWM" || Image=="MOTEUR") { QSettings settings ("./IOCard/"+Image+"/config.ini", QSettings::IniFormat ); QString sNom = settings.value("TITRE/NOM").toString(); QString sCheminImage = "./IOCard/"+Image ; for (register int i =0; i<sNom.length();i++) { sNom[i]=sNom[i].toUpper(); } QString sCommande = "" ; QVariant vCommande(sBrocheMoteur) ; sCommande += vCommande.toString() ; this->CreerMoteur(sNom,sCommande,Image,sCheminImage); } else if (GestionImage=="BTN1") { QString sImage =""; if (Image=="BTN1_BLACK") { sImage=Image ; } else if (Image=="BTN1_GREEN") { sImage=Image ; } else if (Image=="BTN1_WHITE") { sImage=Image ; } else if (Image=="BTN1_RED") { sImage=Image ; } else { } QSettings settings ("./IOCard/"+sImage+"/config.ini", QSettings::IniFormat ); QString sCheminImage = "./IOCard/"+sImage ; QString sNom = settings.value("TITRE/NOM").toString(); for (register int i =0; i<sNom.length();i++) { sNom[i]=sNom[i].toUpper(); } QString sCommande = "" ; QVariant vCommande(BrocheNum) ; QString Texte ="R"; sCommande += Texte ; if(BrocheNum<10) { sCommande += "0"; } sCommande += vCommande.toString() ; this->CreerCapteurN(sNom,BrocheNum,sCommande,sCheminImage); } else if (Image=="BUZZER1") { QSettings settings ("./IOCard/BUZZER1/config.ini", QSettings::IniFormat ); QString sNom = settings.value("TITRE/NOM").toString(); for (register int i =0; i<sNom.length();i++) { sNom[i]=sNom[i].toUpper(); } QString sCommande = "" ; QVariant vCommande(BrocheNum) ; QString Texte ="O"; sCommande += Texte ; if(BrocheNum<10) { sCommande += "0"; } sCommande += vCommande.toString() ; this->CreerBuzzer(sNom,BrocheNum,sCommande); } else if (GestionImage=="LED1") { QString sImage =""; if (Image=="LED1_RED") { sImage=Image ; } else if (Image=="LED1_GREEN") { sImage=Image ; } else if (Image=="LED1_YELLOW") { sImage=Image ; } else { } QSettings settings ("./IOCard/"+sImage+"/config.ini", QSettings::IniFormat ); QString sCheminImage = "./IOCard/"+sImage ; QString sNom = settings.value("TITRE/NOM").toString(); for (register int i =0; i<sNom.length();i++) { sNom[i]=sNom[i].toUpper(); } QString sCommande = "" ; QVariant vCommande(BrocheNum) ; QString Texte ="R"; sCommande += Texte ; if(BrocheNum<10) { sCommande += "0"; } sCommande += vCommande.toString() ; this->CreerActionneurB(sNom,BrocheNum,sCommande,sCheminImage); } else if (Image=="SONAR1_PULSE") { QString sCommande = "" ; QVariant vCommande(BrocheNum) ; QString Texte ="Q"; sCommande += Texte ; if(BrocheNum<10) { sCommande += "0"; } sCommande += vCommande.toString() ; nSonarPulse=BrocheNum ; sSonarPulse=sCommande ; bSonarPulse=true ; } else if (Image=="SONAR1_ECHO") { QVariant vCommande(BrocheNum) ; QString sCommande =""; if(BrocheNum<10) { sCommande += "0"; } sCommande=vCommande.toString() ; nSonarEcho=BrocheNum; sSonarEcho=sCommande; bSonarEcho=true ; } else //if (Image=="SWITCH1" || Image=="ILS1" || Image=="BARI1") { QSettings settings ("./IOCard/"+Image+"/config.ini", QSettings::IniFormat ); QString sNom = settings.value("TITRE/NOM").toString(); QString sTexte1 = settings.value("TEST1/Nom").toString(); QString sCode1 = settings.value("TEST1/Code").toString(); QString sTexte2 = settings.value("TEST2/Nom").toString(); QString sCode2 = settings.value("TEST2/Code").toString(); sTexte1.chop(1); sTexte2.chop(1); sCode1=sCode1.mid(3); sCode2=sCode2.mid(3); QString sCheminImage = "./IOCard/"+Image ; for (register int i =0; i<sNom.length();i++) { sNom[i]=sNom[i].toUpper(); } QString sTexte = "" ; QVariant vCommande(BrocheNum) ; QString sCommande =""; if((Type=="NI" && GestionImage!="SONA") || (Type == "NO" && GestionImage!="SONA")) { sCommande="R"; if(BrocheNum<10) { sTexte += "0"; } sCommande += sTexte ; sCommande += vCommande.toString() ; this->CreerFenetreDeBase(sNom,Type,BrocheNum,sCommande,sCheminImage,sTexte1,sCode1,sTexte2,sCode2); } else if (Type=="AI") { sCommande="A" ; if(BrocheAna<10) { sTexte += "0"; } sCommande += sTexte ; sCommande += vCommande.toString() ; this->CreerFenetreDeBase(sNom,Type,BrocheAna,sCommande,sCheminImage,sTexte1,sCode1,sTexte2,sCode2); } } } } if(bSonarEcho==true && bSonarPulse==true) { sCommandeSONAR=sSonarPulse+QString::number(nSonarEcho) ; QString sType = "SONAR" ; this->CreerFenetreDeBase("SONAR ULTRASON",sType,nSonarPulse,sCommandeSONAR,"","","","",""); } this->on_BtAfficher_clicked(); this->on_BtHorizontal_clicked(); } QByteArray f_Supervision::SimulerEnvoiDonnees(QByteArray Commande) { qDebug() << "SIMULATION : " << Commande; QByteArray Retour=""; QChar CharCommande (Commande[0]); switch (CharCommande.toLatin1()) { case 'V': Retour = "SIMULATION"; break; case 'N': Retour = "MODEL NAME : SIMULATION\r\nVERSION : 1.0"; break; case 'M': for(register int i = 0; i < this->ListeFenetre.length(); i++) { if(this->ListeFenetre[i]->getType() == MOTEUR) { F_Moteur* pFenetreMoteur (qobject_cast<F_Moteur*>(this->ListeFenetre[i]->getWidget())); if(pFenetreMoteur->getsBrocheMoteur() == Commande.mid(1, 2)) { Retour = pFenetreMoteur->SimulerCommande(Commande); } } } break; case 'I': Retour = "VALUE=-1"; break; case 'W': for(register int i = 0; i < this->ListeFenetre.length(); i++) { if(this->ListeFenetre[i]->getType() == ACT_B) { f_ActionneurB* pFenetreAct (qobject_cast<f_ActionneurB*>(this->ListeFenetre[i]->getWidget())); if(pFenetreAct->getCommandeEtat().right(2) == Commande.mid(1, 2)) { Retour = pFenetreAct->SimulerCommande(Commande); } } } break; case 'R': for(register int i = 0; i < this->ListeFenetre.length(); i++) { if(this->ListeFenetre[i]->getType() == CAP_N) { f_CapteurN* pFenetreCap (qobject_cast<f_CapteurN*>(this->ListeFenetre[i]->getWidget())); if(pFenetreCap->getCommandeEtat().right(2) == Commande.mid(1, 2)) { Retour = pFenetreCap->SimulerCommande(Commande); } } } break; case 'A': case 'a': for(register int i = 0; i < this->ListeFenetre.length(); i++) { if(this->ListeFenetre[i]->getType() == CAP_A) { f_CapteurA* pFenetreCap (qobject_cast<f_CapteurA*>(this->ListeFenetre[i]->getWidget())); if(pFenetreCap->getCommandeEtat().right(2) == Commande.mid(1, 2)) { Retour = pFenetreCap->SimulerCommande(Commande); } } } break; case 'S': for(register int i = 0; i < this->ListeFenetre.length(); i++) { if(this->ListeFenetre[i]->getType() == ACT_G) { f_ActionneurG* pFenetreAct (qobject_cast<f_ActionneurG*>(this->ListeFenetre[i]->getWidget())); if(pFenetreAct->getCommandeEtat().right(2) == Commande.mid(1, 2)) { Retour = pFenetreAct->SimulerCommande(Commande); } } } break; case 'Q': Retour = "VALUE=0"; break; case 'E': case 'J': case 'P': case 'O': Retour = QString("DONE " + Commande).toStdString().c_str(); break; case 'L': break; default: break; } Retour += "\r\n"; return Retour; } void f_Supervision::PurgerListeFenetre() { for(register int i = 0; i < this->ListeFenetre.length(); i++) { delete this->ListeFenetre[i]; } this->ListeFenetre.clear(); }
[ "nicolas.jarnoux@wanadoo.fr" ]
nicolas.jarnoux@wanadoo.fr
e05c7fd640c2a4fdfeff27ab814b221a4fc880bb
6107c949bbb4b72b2ff14e976bbe20dd3f04cd49
/src/bubbles/scene/scene.cpp
2b3d2b1113ca617d1e6b7435d8bf35b0e78123a1
[]
no_license
buzzert/bubbles
7abd021d5bea4639d58b055c5c307c64153d6fc3
e68af1a3e78251b41fb1dc544f0cfb4b670036db
refs/heads/master
2021-06-30T21:04:10.659682
2020-09-08T09:52:25
2020-09-08T09:52:25
169,201,998
2
0
null
null
null
null
UTF-8
C++
false
false
3,564
cpp
/* * Created on Thu Dec 20 2018 * * Copyright (c) 2018 James Magahern <james@magahern.com> */ #include "scene.h" extern "C" { #include <bubbles/core/x11_support.h> } BUBBLES_NAMESPACE_BEGIN void MainScene::handle_pointer_callback(void *context, int x, int y, bool pressed) { static_cast<MainScene *>(context)->pointer_event(x, y, pressed); } void MainScene::handle_window_delete_callback(void *context) { static_cast<MainScene *>(context)->_running = false; } void MainScene::handle_window_expose_callback(void *context) { static_cast<MainScene *>(context)->_primary_actor.set_needs_display(); } MainScene::MainScene(Rect canvasRect, bool windowed, double scale) : _primary_actor(canvasRect), _canvasRect(canvasRect) { _scale = scale; _surface = x11_helper_acquire_cairo_surface(canvasRect.width * scale, canvasRect.height * scale); _cr = cairo_create(_surface); // TODO: Need to do this on window size change too cairo_xlib_surface_set_size(_surface, canvasRect.width * scale, canvasRect.height * scale); // Typically the rule is container actors have transparent backgrounds, while actual actors // have opaque backgrounds _primary_actor.set_background_color(Colors::transparent); _primary_actor._parent_scene = this; if (!windowed) { x11_helper_set_fullscreen(true); } x11_callbacks_t callbacks = { .context = this, .pointer_callback = &MainScene::handle_pointer_callback, .window_delete_callback = &MainScene::handle_window_delete_callback, .window_expose_callback = &MainScene::handle_window_expose_callback, }; x11_register_callbacks(callbacks); } MainScene::~MainScene() { cairo_destroy(_cr); cairo_surface_destroy(_surface); } void MainScene::update() { x11_poll_events(); _primary_actor.update(); } void MainScene::add_actor(ActorPtr a) { _primary_actor.add_subactor(a); } void MainScene::set_scale(float scale) { _scale = scale; } void MainScene::set_framerate(unsigned int fps) { _frames_per_sec = fps; } void MainScene::set_hides_cursor(bool hides_cursor) { x11_set_cursor_visible(!hides_cursor); } void MainScene::pointer_event(int x, int y, bool pressed) { x /= _scale; y /= _scale; if (pressed) { Actor *hit_actor = _primary_actor.hit_test(x, y); if (hit_actor != nullptr) { _tracked_actor = hit_actor; hit_actor->mouse_down(x, y); } } else { // TODO: unsafe keeping this pointer around if (_tracked_actor) { // Convert point Actor *test_actor = _tracked_actor->_super_actor; while (test_actor != nullptr) { x -= test_actor->rect.x; y -= test_actor->rect.y; test_actor = test_actor->_super_actor; } _tracked_actor->mouse_up(x, y); _tracked_actor = nullptr; } } } void MainScene::render() { cairo_push_group(_cr); if (_scale > 1.0) { cairo_scale(_cr, _scale, _scale); } _primary_actor.render(_cr, _canvasRect); cairo_pop_group_to_source(_cr); cairo_paint(_cr); cairo_surface_flush(_surface); } void MainScene::run() { _running = true; const int frames_per_sec = 60; const long sleep_nsec = (1.0 / frames_per_sec) * 1000000000; while (_running) { update(); render(); struct timespec sleep_time = { 0, sleep_nsec }; nanosleep(&sleep_time, NULL); } } BUBBLES_NAMESPACE_END
[ "james@magahern.com" ]
james@magahern.com
587bd6a5c434556cd755d6679f63c3ab2c656e64
eb2f8b3271e8ef9c9b092fcaeff3ff8307f7af86
/Grade 10-12/2018 autumn/NOIP/NOIP2018提高组Day1程序包/GD-Senior/answers/GD-0586/track/track.cpp
495cb1544ac65e2b95863965f46a3c2f0c19d980
[]
no_license
Orion545/OI-Record
0071ecde8f766c6db1f67b9c2adf07d98fd4634f
fa7d3a36c4a184fde889123d0a66d896232ef14c
refs/heads/master
2022-01-13T19:39:22.590840
2019-05-26T07:50:17
2019-05-26T07:50:17
188,645,194
4
2
null
null
null
null
WINDOWS-1252
C++
false
false
1,585
cpp
#include<cstdio> #include<cstring> #include<algorithm> #include<string> #include<iostream> #include<cmath> #include<cstdlib> #include<ctime> #include<set> using namespace std; namespace mine { typedef long long ll; const int MAX_N=51000; int hou[MAX_N]; struct Edge{int y,c,g;}e[MAX_N*2]; int ln=0;void ins(int x,int y,int c) {e[++ln]=(Edge){y,c,hou[x]};hou[x]=ln;} int f[MAX_N];//num ll g[MAX_N];//mxlen ll mid; multiset<ll> now[MAX_N];//O(n) void dp(int x,int fa) { now[x].clear(); f[x]=0; for(int k=hou[x];k>0;k=e[k].g) { int y=e[k].y;if(y==fa) continue; dp(y,x);f[x]+=f[y]; g[y]+=e[k].c; if(g[y]>=mid) f[x]++; else now[x].insert(g[y]); } ll mx=0; while(now[x].size()) { multiset<ll>::iterator tmp=now[x].begin(); //multiset<ll>::iterator tmp=--now[x].end(); error! make waste ll a=*tmp;now[x].erase(tmp); multiset<ll>::iterator it=now[x].lower_bound(mid-a); if(it==now[x].end()) mx=max(mx,a); else { f[x]++; now[x].erase(it); } } g[x]=mx; //if(mx>=mid) puts("error"); //printf("x=%d %d %I64d\n",x,f[x],g[x]); } //¿ÉÒÔ²»¿ªll void main() { freopen("track.in","r",stdin); freopen("track.out","w",stdout); memset(hou,0,sizeof hou); int n,m;scanf("%d%d",&n,&m); for(int i=1;i<=n-1;i++) { int x,y,c;scanf("%d%d%d",&x,&y,&c); ins(x,y,c);ins(y,x,c); } ll l=1,r=1ll<<40,ans=-1; while(l<=r) { mid=(l+r)/2; dp(1,0); if(f[1]>=m) ans=mid,l=mid+1; else r=mid-1; } cout<<ans; } } int main() { srand(time(0)); mine::main(); }
[ "orion545@qq.com" ]
orion545@qq.com
b6e80ed8175c517e7160c2a542333e8ee919e400
b64acbd868e5f91c2fee5cddbda96d6035401778
/Codeforces/282A/Bit++.cpp
5ee726bda403954b4ea878adb52e53e6ea39004a
[]
no_license
Anjalikamath/Programming_Solutions
6bf04f3fd491edcaf4ede48ebeda447d0d532c29
319b5e704ef678421e500dc9ece26a756a1b626a
refs/heads/master
2022-12-31T21:46:12.089061
2020-10-20T09:02:58
2020-10-20T09:02:58
299,634,560
1
1
null
2020-10-20T09:02:59
2020-09-29T14:00:02
C++
UTF-8
C++
false
false
198
cpp
#include<iostream> using namespace std; int main(){ int x=0,n; cin>>n; while(n--){ string s; cin>>s; if(s[1]=='+')++x; else --x; } cout<<x<<endl; return 0; }
[ "kamathanjali1999@gmail.com" ]
kamathanjali1999@gmail.com
ea7d30d2221dfa16b223812c5e6df31786911e9d
000546c22a1aa2e746a8499e605841a2ac4c60dd
/Codeforces/Rounds/69/A.cpp
543fea4954d5ef62ecd7125df823a9c44083b4a4
[]
no_license
leandrovianna/programming_contests
be19a11e0f9e84f519628e78f56df8035f7c7501
78e31f4e327be819dd310df4d346b7ac2934f7dd
refs/heads/master
2021-07-13T07:36:59.095154
2021-07-10T14:14:05
2021-07-10T14:14:05
77,759,229
1
0
null
null
null
null
UTF-8
C++
false
false
281
cpp
#include <iostream> using namespace std; int main() { int x = 0, y = 0, z = 0, n, k, l, m; cin >> n; for (int i = 0; i < n; i++) { cin >> k >> l >> m; x += k; y += l; z += m; } if (!(x || y || z)) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
[ "leandrovianna50@gmail.com" ]
leandrovianna50@gmail.com
583dbb05b085c6271d030858e8ead96e01afe1b4
c50f891ad4dcb06aeb3a814e1e1cc632dea06423
/vtkColor2Gray/vtkColor2Gray.cpp
706df92042a47ff0297d2736f5ba13aa09d4049f
[]
no_license
cgcodeboy/vtk
2898be29ebb266a48520296d08825c5c44d78c56
1531d4844aa35d31a24a958c81ac463a0f11e6a0
refs/heads/master
2020-07-04T02:13:43.252520
2018-04-21T10:10:20
2018-04-21T10:10:20
74,218,815
0
0
null
null
null
null
UTF-8
C++
false
false
1,945
cpp
#include <vtkSmartPointer.h> #include <vtkJPEGReader.h> #include <vtkPNGReader.h> #include <vtkBMPReader.h> #include <vtkBMPWriter.h> #include <vtkImageActor.h> #include <vtkImageLuminance.h> #include <vtkRenderer.h> #include <vtkRenderWindow.h> #include <vtkRenderWindowInteractor.h> #include <vtkInteractorStyleImage.h> int main() { vtkSmartPointer<vtkJPEGReader> reader = vtkSmartPointer<vtkJPEGReader>::New(); reader->SetFileName("test.jpg"); reader->Update(); vtkSmartPointer<vtkImageLuminance> luminance = vtkSmartPointer<vtkImageLuminance>::New(); luminance->SetInputConnection(reader->GetOutputPort()); luminance->Update(); vtkSmartPointer<vtkBMPWriter> writer = vtkSmartPointer<vtkBMPWriter>::New(); writer->SetFileName("002.bmp"); writer->SetInputConnection(luminance->GetOutputPort()); writer->Write(); vtkSmartPointer<vtkImageActor> actor1 = vtkSmartPointer<vtkImageActor>::New(); actor1->SetInputData(reader->GetOutput()); vtkSmartPointer<vtkImageActor> actor2 = vtkSmartPointer<vtkImageActor>::New(); actor2->SetInputData(luminance->GetOutput()); vtkSmartPointer<vtkRenderer> render1 = vtkSmartPointer<vtkRenderer>::New(); render1->AddActor(actor1); render1->SetBackground(0.7, 0.7, 0.7); render1->SetViewport(0, 0, 0.5, 1); vtkSmartPointer<vtkRenderer> render2 = vtkSmartPointer<vtkRenderer>::New(); render2->AddActor(actor2); render2->SetBackground(0.5, 0.6, 0.7); render2->SetViewport(0.5, 0, 1, 1); vtkSmartPointer<vtkRenderWindow> window = vtkSmartPointer<vtkRenderWindow>::New(); window->AddRenderer(render1); window->AddRenderer(render2); window->Render(); vtkSmartPointer<vtkRenderWindowInteractor> interactor = vtkSmartPointer<vtkRenderWindowInteractor>::New(); interactor->SetRenderWindow(window); vtkSmartPointer<vtkInteractorStyleImage> style = vtkSmartPointer<vtkInteractorStyleImage>::New(); interactor->SetInteractorStyle(style); interactor->Start(); return EXIT_SUCCESS; }
[ "1610737331@qq.com" ]
1610737331@qq.com
265ec5500e2de612c4f6e99e1859385ceda2a6d2
84e064c973c0cc0d23ce7d491d5b047314fa53e5
/latest9.7/hec/Saxon.C.API/XdmNode.cpp
81c0f5e171afd8d8725f633a2d65d8d2ba56c895
[]
no_license
orbeon/saxon-he
83fedc08151405b5226839115df609375a183446
250c5839e31eec97c90c5c942ee2753117d5aa02
refs/heads/master
2022-12-30T03:30:31.383330
2020-10-16T15:21:05
2020-10-16T15:21:05
304,712,257
1
1
null
null
null
null
UTF-8
C++
false
false
8,271
cpp
#include "XdmNode.h" XdmNode::XdmNode(jobject obj): XdmItem(obj), nodeKind(UNKNOWN), baseURI(NULL), nodeName(NULL), children(NULL), parent(NULL), attrValues(NULL){ childCount = -1; attrCount = -1; } XdmNode::XdmNode(XdmNode * p, jobject obj, XDM_NODE_KIND kind): XdmItem(obj), nodeKind(kind), baseURI(NULL), nodeName(NULL), children(NULL), parent(p), attrValues(NULL){ childCount = -1; attrCount = -1; } bool XdmNode::isAtomic() { return false; } XDM_NODE_KIND XdmNode::getNodeKind(){ if(nodeKind == UNKNOWN && proc != NULL) { nodeKind = static_cast<XDM_NODE_KIND>(proc->getNodeKind(value->xdmvalue)); } return nodeKind; } const char * XdmNode::getNodeName(){ if(nodeName != NULL) { return nodeName; } XDM_NODE_KIND kind = getNodeKind(); jclass xdmUtilsClass = lookForClass(SaxonProcessor::sxn_environ->env, "net/sf/saxon/option/cpp/XdmUtils"); jmethodID xmID = (jmethodID) SaxonProcessor::sxn_environ->env->GetStaticMethodID(xdmUtilsClass,"getNodeName", "(Lnet/sf/saxon/s9api/XdmNode;)Ljava/lang/String;"); switch (kind) { case DOCUMENT: case TEXT: case COMMENT: return NULL; case PROCESSING_INSTRUCTION: case NAMESPACE: case ELEMENT: case ATTRIBUTE: if (!xmID) { std::cerr << "Error: MyClassInDll." << "getNodeName"<< " not found\n" << std::endl; return NULL; } else { jstring result = (jstring)(SaxonProcessor::sxn_environ->env->CallStaticObjectMethod(xdmUtilsClass, xmID, value->xdmvalue)); if(!result) { return NULL; } else { nodeName = SaxonProcessor::sxn_environ->env->GetStringUTFChars(result, NULL); return nodeName; } } default: return NULL; } } const char* XdmNode::getBaseUri(){ if(baseURI != NULL) { return baseURI; } jclass xdmNodeClass = lookForClass(SaxonProcessor::sxn_environ->env, "net/sf/saxon/s9api/XdmNode"); jmethodID bmID = (jmethodID) SaxonProcessor::sxn_environ->env->GetMethodID(xdmNodeClass, "getBaseURI", "()Ljava/net/URI;"); if (!bmID) { std::cerr << "Error: MyClassInDll." << "getBaseURI" << " not found\n" << std::endl; return NULL; } else { jobject nodeURIObj = (SaxonProcessor::sxn_environ->env->CallObjectMethod(value->xdmvalue, bmID)); if(!nodeURIObj){ return NULL; } else { jclass URIClass = lookForClass(SaxonProcessor::sxn_environ->env, "java/net/URI"); jmethodID strMID = (jmethodID) SaxonProcessor::sxn_environ->env->GetMethodID(URIClass, "toString", "()Ljava/lang/String;"); if(strMID){ jstring result = (jstring)( SaxonProcessor::sxn_environ->env->CallObjectMethod(nodeURIObj, strMID)); baseURI = SaxonProcessor::sxn_environ->env->GetStringUTFChars(result, NULL); return baseURI; } } } return NULL; } XdmNode* XdmNode::getParent(){ if(parent == NULL && proc!= NULL) { jclass xdmNodeClass = lookForClass(SaxonProcessor::sxn_environ->env, "net/sf/saxon/s9api/XdmNode"); jmethodID bmID = (jmethodID) SaxonProcessor::sxn_environ->env->GetMethodID(xdmNodeClass, "getParent", "()Lnet/sf/saxon/s9api/XdmNode;"); if (!bmID) { std::cerr << "Error: MyClassInDll." << "getParent" << " not found\n" << std::endl; return NULL; } else { jobject nodeObj = (SaxonProcessor::sxn_environ->env->CallObjectMethod(value->xdmvalue, bmID)); if(nodeObj) { parent = new XdmNode(NULL, nodeObj, UNKNOWN); parent->setProcessor(proc); //parent->incrementRefCount(); return parent; } return NULL; } } else { return parent; } } const char* XdmNode::getAttributeValue(const char *str){ if(str == NULL) { return NULL;} jclass xdmUtilsClass = lookForClass(SaxonProcessor::sxn_environ->env, "net/sf/saxon/option/cpp/XdmUtils"); jmethodID xmID = (jmethodID) SaxonProcessor::sxn_environ->env->GetStaticMethodID(xdmUtilsClass,"getAttributeValue", "(Lnet/sf/saxon/s9api/XdmNode;Ljava/lang/String;)Ljava/lang/String;"); if (!xmID) { std::cerr << "Error: SaxonDll." << "getAttributeValue" << " not found\n" << std::endl; return NULL; } if(str == NULL) { return NULL; } jstring eqname = SaxonProcessor::sxn_environ->env->NewStringUTF(str); jstring result = (jstring)(SaxonProcessor::sxn_environ->env->CallStaticObjectMethod(xdmUtilsClass, xmID,value->xdmvalue, eqname)); SaxonProcessor::sxn_environ->env->DeleteLocalRef(eqname); checkForException(*(SaxonProcessor::sxn_environ), xdmUtilsClass, (jobject)result);//Remove code if(result) { const char * stri = SaxonProcessor::sxn_environ->env->GetStringUTFChars(result, NULL); //SaxonProcessor::sxn_environ->env->DeleteLocalRef(result); return stri; } else { return NULL; } } XdmNode** XdmNode::getAttributeNodes(){ if(attrValues == NULL) { jclass xdmUtilsClass = lookForClass(SaxonProcessor::sxn_environ->env, "net/sf/saxon/option/cpp/XdmUtils"); jmethodID xmID = (jmethodID) SaxonProcessor::sxn_environ->env->GetStaticMethodID(xdmUtilsClass,"getAttributeNodes", "(Lnet/sf/saxon/s9api/XdmNode;)[Lnet/sf/saxon/s9api/XdmNode;"); jobjectArray results = (jobjectArray)(SaxonProcessor::sxn_environ->env->CallStaticObjectMethod(xdmUtilsClass, xmID, value->xdmvalue)); if(results == NULL) { return NULL; } int sizex = SaxonProcessor::sxn_environ->env->GetArrayLength(results); attrCount = sizex; if(sizex>0) { attrValues = new XdmNode*[sizex]; XdmNode * tempNode =NULL; for (int p=0; p < sizex; ++p){ jobject resulti = SaxonProcessor::sxn_environ->env->GetObjectArrayElement(results, p); tempNode = new XdmNode(this, resulti, ATTRIBUTE); tempNode->setProcessor(proc); this->incrementRefCount(); attrValues[p] = tempNode; } } } return attrValues; } int XdmNode::getAttributeCount(){ if(attrCount == -1 && proc!= NULL) { jclass xdmUtilsClass = lookForClass(SaxonProcessor::sxn_environ->env, "net/sf/saxon/option/cpp/XdmUtils"); jmethodID xmID = (jmethodID) SaxonProcessor::sxn_environ->env->GetStaticMethodID(xdmUtilsClass,"getAttributeCount", "(Lnet/sf/saxon/s9api/XdmNode;)I"); if (!xmID) { std::cerr << "Error: SaxonDll." << "getAttributeCount" << " not found\n" << std::endl; return 0; } jint result = (jlong)(SaxonProcessor::sxn_environ->env->CallStaticObjectMethod(xdmUtilsClass, xmID, value->xdmvalue)); attrCount =(int)result; } return attrCount; } int XdmNode::getChildCount(){ if(childCount == -1 && proc!= NULL) { jclass xdmUtilsClass = lookForClass(SaxonProcessor::sxn_environ->env, "net/sf/saxon/option/cpp/XdmUtils"); jmethodID xmID = (jmethodID) SaxonProcessor::sxn_environ->env->GetStaticMethodID(xdmUtilsClass,"getChildCount", "(Lnet/sf/saxon/s9api/XdmNode;)I"); if (!xmID) { std::cerr << "Error: SaxonDll." << "getchildCount" << " not found\n" << std::endl; return 0; } jint result = (jlong)(SaxonProcessor::sxn_environ->env->CallStaticObjectMethod(xdmUtilsClass, xmID, value->xdmvalue)); childCount =(int)result; } return childCount; } XdmNode** XdmNode::getChildren(){ if(children == NULL && proc!= NULL) { jclass xdmUtilsClass = lookForClass(SaxonProcessor::sxn_environ->env, "net/sf/saxon/option/cpp/XdmUtils"); jmethodID xmID = (jmethodID) SaxonProcessor::sxn_environ->env->GetStaticMethodID(xdmUtilsClass,"getChildren", "(Lnet/sf/saxon/s9api/XdmNode;)[Lnet/sf/saxon/s9api/XdmNode;"); if (!xmID) { std::cerr << "Error: SaxonDll." << "getchildren" << " not found\n" << std::endl; return NULL; } jobjectArray results = (jobjectArray)(SaxonProcessor::sxn_environ->env->CallStaticObjectMethod(xdmUtilsClass, xmID, value->xdmvalue)); int sizex = SaxonProcessor::sxn_environ->env->GetArrayLength(results); childCount = sizex; children = new XdmNode*[sizex]; XdmNode * tempNode = NULL; for (int p=0; p < sizex; ++p){ jobject resulti = SaxonProcessor::sxn_environ->env->GetObjectArrayElement(results, p); tempNode = new XdmNode(this, resulti, UNKNOWN); tempNode->setProcessor(proc); //tempNode->incrementRefCount(); children[p] = tempNode; } } return children; }
[ "oneil@saxonica.com" ]
oneil@saxonica.com
5b8256e33a007634db3853016a27e695e9b2d45c
882aea02893bd2f4a1ee526d5c3691aa05d49e1d
/XBedit.cpp
d549d0b868db2cc32c1b4a24d911a205cce0c351
[]
no_license
bryanchadwick/Bedit
91e084eeddd15fdb5699207dcddf53195be089b7
ccef42042ab8e31b5e5e711fbb9094ff11d87eab
refs/heads/master
2021-01-24T06:23:14.437972
2015-05-20T01:25:27
2015-05-20T01:25:27
35,917,085
0
0
null
null
null
null
UTF-8
C++
false
false
4,590
cpp
#include <stdio.h> #include <X11/Xlib.h> #include <X11/keysym.h> #include <unistd.h> #include <sys/wait.h> #include <iostream> #include "Control.cpp" #include "BufferList.cpp" #include "Bedit.h" #include "XView.h" #include "Print.h" using namespace std; using namespace BEditor; void drawList(BufferList<XView>& b); void drawTab(BufferList<XView>::bufferStruct &t); const int tabWidth = 110; int main (int argc, char *argv[]) { Control<XView> controller(argc,argv); int comm = 0; Display *display = controller.currentView()->viewDisplay(); XEvent event; controller.drawView(); controller.updateView(); while(1){ XNextEvent(display, &event); switch(event.type) { case SelectionRequest: controller.buff.view->convertClipboard(event); break; case SelectionClear: break; case Expose: controller.updateView();break; case ConfigureNotify: controller.update();break; case ButtonPress: if(event.xbutton.button == Button1){ controller.touch(); if(event.xbutton.y < 25){ }else if(event.xbutton.y < 50){ int i = (event.xbutton.x-5)/tabWidth; if(i < controller.buffList.size()){ controller.buff = controller.buffList.current(i); controller.update(); } }else if(event.xbutton.x > controller.buff.view->scrollbarX()){ controller.buff.view->doScroll(event.xbutton.y); }else{ controller.buff.view->doSelect(event.xmotion.x,event.xbutton.y); } }else if(event.xbutton.button == Button4){ controller.touch(); controller.buff.view->scroll(-6); }else if(event.xbutton.button == Button5){ controller.touch(); controller.buff.view->scroll(6); } break; case KeyPress: comm = XKeycodeToKeysym(display, event.xkey.keycode,0); controller.touch(); if(event.xkey.state&ShiftMask) comm |= SHIFT_MASK; if(event.xkey.state&ControlMask) controller.commandKey(comm); else switch(comm & CHAR_MASK){ case XK_Return:controller.returnKey();break; case XK_BackSpace:controller.backspaceKey();break; case XK_Delete:controller.deleteKey();break; case XK_Up:controller.upKey(comm);break; case XK_Down:controller.downKey(comm);break; case XK_Left:controller.leftKey(comm);break; case XK_Right:controller.rightKey(comm);break; case XK_F1:controller.newBuffer();break; case XK_F2:controller.save(0);break; case XK_F3:controller.print();break; case XK_F4:controller.load();break; case XK_F5:break; case XK_F6:controller.toggleSyntax();break; case XK_F7:controller.prevBuffer();break; case XK_F8:controller.nextBuffer();break; case XK_F9:controller.compileBuffer();break; case XK_F10:controller.execCommand();break; case XK_F11:controller.configureView();break; case XK_F12:controller.clearMessages();break; case XK_Tab:controller.tabKey();break; case XK_Page_Down:controller.pagedownKey(comm);break; case XK_Page_Up:controller.pageupKey(comm);break; case XK_Home:controller.homeKey(comm);break; case XK_End:controller.endKey(comm);break; case XK_Shift_L: case XK_Shift_R: case XK_Control_L: case XK_Control_R:break; default: comm = XKeycodeToKeysym(display, event.xkey.keycode, event.xkey.state&ShiftMask); controller.generalKey((char)comm);break; }break; default:break; } if(controller.isDirty()){ controller.buff.view->clearAll(); controller.buff.view->redraw(); drawList(controller.buffList); controller.buff.view->update(); } controller.clean(); } } int tabX,tabY; BufferList<XView>::bufferStruct compBuff; void drawList(BufferList<XView>& b) { tabX = 5, tabY = 30; compBuff = b.current(); b.foreach(&drawTab); } void drawTab(BufferList<XView>::bufferStruct &t) { static string s; if(t != compBuff) XView::drawRectangle(tabX,tabY,tabWidth,17,1); else XView::drawRectangle(tabX,tabY-2,tabWidth,22,1); if(t.model->isDirty()) s = '*' + t.model->getTitle(); else s = t.model->getTitle(); XView::drawString(s,tabX+5,tabY,tabWidth-5); tabX += tabWidth+2; }
[ "bryan@bryanchadwick.com" ]
bryan@bryanchadwick.com
b3988dc1b19e27f72f5f6cc1bca87b37d05dd4b8
930eb8dfa32ae39b9fd31fec0f01fe3f8e0c057c
/src/ecs.h
431e9362b1789cc67f44873d3ef6054ea146349a
[]
no_license
Fe3000/D7045E-Lab
cafeafd1611e70463e57a282537c27fc3f9f779d
72892459decf9775b8fa14c5d76640e3e5482c34
refs/heads/main
2023-02-20T12:33:56.471202
2021-01-15T08:58:24
2021-01-15T08:58:24
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,782
h
/** * Entities handles are represented by an identifier that contains both index and generation. * 31 24 23 0 * +------------+----------------------------------------------+ * | generation | index | * +------------+----------------------------------------------+ * * Entities are stored in a contiguous array indexed by the first 24 bits * of the entity handle id. The upper 8 bits are used for generation which differentiate * between nodes that reuse the same (previously deleted nodes) index. */ struct Entity_Handle { u32 id; }; inline bool operator==(const Entity_Handle& a, const Entity_Handle& b) { return a.id == b.id; } namespace std { template <> struct hash<Entity_Handle> { std::size_t operator()(const Entity_Handle& k) const { return std::hash<u32>()(k.id); } }; } static u32 next_component_id = 0; #define REGISTER_COMPONENT(type) \ static const u32 type ## _ID = next_component_id++; \ static const u32 type ## _SIZE = sizeof(type) + sizeof(Entity_Handle) /*************************************************************************** * Common Components ***************************************************************************/ struct Local_To_World { glm::mat4 m; }; struct Local_To_Parent { glm::mat4 m; }; struct Parent { Entity_Handle handle; }; struct Child { Entity_Handle handle; }; struct Position { glm::vec3 v; }; struct Rotation { glm::quat q; }; struct Euler_Rotation { glm::vec3 v; }; struct Scale { glm::vec3 v; }; struct Camera { f32 fov; f32 left; f32 right; f32 bottom; f32 top; f32 near; f32 far; f32 aspect; glm::mat4 proj; glm::mat4 view; glm::mat4 view_proj; glm::vec4 viewport; Window* window; // target output (optional) bool is_orthographic; // perspective (false), orthographic (true) }; struct Mesh_Renderer { Mesh mesh; Material material; }; struct Debug_Name { std::string s; }; REGISTER_COMPONENT(Local_To_World); REGISTER_COMPONENT(Local_To_Parent); REGISTER_COMPONENT(Parent); REGISTER_COMPONENT(Child); REGISTER_COMPONENT(Position); REGISTER_COMPONENT(Euler_Rotation); REGISTER_COMPONENT(Rotation); REGISTER_COMPONENT(Scale); REGISTER_COMPONENT(Camera); REGISTER_COMPONENT(Mesh_Renderer); REGISTER_COMPONENT(Debug_Name); /** * Handle to a particular instance of a component. */ struct Component_Handle { u32 id; usize offset; // in bytes }; /** * An entity is just an array of components that is identified by its handle. */ struct Entity { Entity_Handle handle; std::vector<Component_Handle> components; }; struct World; /** * On update system function pointer type takes the * delta time, entity handle and list of component data as input. */ typedef void (*OnUpdateSystem)(World* world, f32 dt, Entity_Handle entity, void** components, void* data); #define DEF_SYSTEM(system_name) \ void system_name(World* world, f32 dt, Entity_Handle handle, void** components, void* data) /** * System is just a function that takes some number of components as input. * This is a helper structure that defines the function pointer to call and * its components to take in as argument (i.e. void** components argument). */ struct System { enum { Flag_Optional = 1, }; void* data; OnUpdateSystem on_update; std::vector<u32> component_ids; std::vector<u32> component_sizes; std::vector<u32> component_flags; }; /** * World is where everyting in the entity component system is defined. * Entities are managed here, component data is stored here and systems are defined here. */ struct World { std::vector<u8> generations; std::deque<u32> removed_entity_indices; std::vector<Entity> entities; // all the live entities std::vector<u32> handles; // lookup entity by handle, NOTE: only valid if the entity itself is alive!!! std::unordered_map<u32, std::vector<u8>> components; // where component data is stored Renderer renderer; }; inline bool is_alive(World* world, Entity_Handle entity); Entity_Handle spawn_entity(World* world); void despawn_entity(World* world, Entity_Handle entity); Entity_Handle copy_entity(World* world, Entity_Handle entity); void* _add_component(World* world, Entity* handle, u32 id, usize size); bool _remove_component(World* world, Entity* handle, u32 id, usize size); void* _get_component(World* world, Entity* handle, u32 id, usize size); void _use_component(System& system, u32 id, u32 size, u32 flags=0); void push_system(std::vector<System>& systems, System system); void update_systems(const std::vector<System>& systems, f32 dt);
[ "alexander.mennborg@gmail.com" ]
alexander.mennborg@gmail.com
206ec26a2e58d4cd7cd03afaf01492caaa8d9728
f97ef238f5cbc02e63a930979ed42de260b73678
/src/crow_test_node.cpp
889a37ec5dea75de317d960cced8d049f5a8d1a2
[]
no_license
jonbinney/crow_test
5adc6cb0d96ccb93e93ebd2cbccd92a59a0a9c2c
72365ebc75635daabfabdd32aa53370af973649c
refs/heads/master
2016-09-06T15:45:58.958050
2014-07-08T07:19:26
2014-07-08T07:19:26
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,083
cpp
#include "crow.h" #include "json.h" #include <sstream> int main() { crow::Crow app; CROW_ROUTE(app, "/") .name("hello") ([]{ return "Hello World!"; }); CROW_ROUTE(app, "/about") ([](){ return "About Crow example."; }); // simple json response CROW_ROUTE(app, "/json") ([]{ crow::json::wvalue x; x["message"] = "Hello, World!"; return x; }); CROW_ROUTE(app,"/hello/<int>") ([](int count){ if (count > 100) return crow::response(400); std::ostringstream os; os << count << " bottles of beer!"; return crow::response(os.str()); }); // more json example CROW_ROUTE(app, "/add_json") ([](const crow::request& req){ auto x = crow::json::load(req.body); if (!x) return crow::response(400); int sum = x["a"].i()+x["b"].i(); std::ostringstream os; os << sum; return crow::response{os.str()}; }); app.port(18080) .multithreaded() .run(); }
[ "jon.binney@gmail.com" ]
jon.binney@gmail.com
62584b599585f52f30ee8f4b9a8f289a95b60d76
4f12edafe62c86dff8f8c4557584b3c8eaf585e8
/C++_project1/C++_project1/StackClass.h
1ccede59cfdd6c64cf2af1031c2069367993cf24
[]
no_license
CanTinGit/C-
6add084597f899a0fdb1f90281ed0d3c25161ef1
8642fc5ac91465b23bd54f624446c6fcfdc9ed4c
refs/heads/master
2020-03-20T05:51:09.875573
2018-07-19T09:51:47
2018-07-19T09:51:47
137,068,432
0
0
null
null
null
null
UTF-8
C++
false
false
194
h
#pragma once #define Max_Size 50 class Stack { private: int data[Max_Size] ; int top; public: Stack(); bool IsEmpty(); bool Push(int); bool Pop(int &); bool GetTop(int &); int Size(); };
[ "ctxx61@gmail.com" ]
ctxx61@gmail.com
4a95594bf8e95e62c2f0fbefcaa671ecb684f1e1
1af49694004c6fbc31deada5618dae37255ce978
/chrome/browser/chromeos/ui/request_pin_view.cc
147e750fd08b7b2e54ef6c44d61a0ee4b0d1916d
[ "BSD-3-Clause" ]
permissive
sadrulhc/chromium
59682b173a00269ed036eee5ebfa317ba3a770cc
a4b950c23db47a0fdd63549cccf9ac8acd8e2c41
refs/heads/master
2023-02-02T07:59:20.295144
2020-12-01T21:32:32
2020-12-01T21:32:32
317,678,056
3
0
BSD-3-Clause
2020-12-01T21:56:26
2020-12-01T21:56:25
null
UTF-8
C++
false
false
8,092
cc
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chromeos/ui/request_pin_view.h" #include <stddef.h> #include <utility> #include "base/bind.h" #include "base/i18n/number_formatting.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "chrome/browser/chromeos/ui/passphrase_textfield.h" #include "chrome/browser/ui/browser_dialogs.h" #include "chrome/browser/ui/views/chrome_layout_provider.h" #include "chrome/grit/generated_resources.h" #include "chromeos/components/security_token_pin/error_generator.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" #include "ui/events/event.h" #include "ui/gfx/color_palette.h" #include "ui/views/controls/label.h" #include "ui/views/controls/textfield/textfield.h" #include "ui/views/layout/grid_layout.h" #include "ui/views/widget/widget.h" namespace chromeos { namespace { // Default width of the text field. constexpr int kDefaultTextWidth = 200; } // namespace RequestPinView::RequestPinView( const std::string& extension_name, security_token_pin::CodeType code_type, int attempts_left, const PinEnteredCallback& pin_entered_callback, ViewDestructionCallback view_destruction_callback) : pin_entered_callback_(pin_entered_callback), view_destruction_callback_(std::move(view_destruction_callback)) { Init(); SetExtensionName(extension_name); const bool accept_input = (attempts_left != 0); SetDialogParameters(code_type, security_token_pin::ErrorLabel::kNone, attempts_left, accept_input); chrome::RecordDialogCreation(chrome::DialogIdentifier::REQUEST_PIN); SetShowCloseButton(false); set_fixed_width(views::LayoutProvider::Get()->GetDistanceMetric( views::DISTANCE_MODAL_DIALOG_PREFERRED_WIDTH)); } RequestPinView::~RequestPinView() { std::move(view_destruction_callback_).Run(); } void RequestPinView::ContentsChanged(views::Textfield* sender, const base::string16& new_contents) { DialogModelChanged(); } bool RequestPinView::Accept() { if (!textfield_->GetEnabled()) return true; DCHECK(!textfield_->GetText().empty()); DCHECK(!locked_); error_label_->SetVisible(true); error_label_->SetText( l10n_util::GetStringUTF16(IDS_REQUEST_PIN_DIALOG_PROCESSING)); error_label_->SetTooltipText(error_label_->GetText()); error_label_->SetEnabledColor(SK_ColorGRAY); error_label_->SizeToPreferredSize(); // The |textfield_| and OK button become disabled, but the user still can // close the dialog. SetAcceptInput(false); pin_entered_callback_.Run(base::UTF16ToUTF8(textfield_->GetText())); locked_ = true; DialogModelChanged(); return false; } bool RequestPinView::IsDialogButtonEnabled(ui::DialogButton button) const { switch (button) { case ui::DialogButton::DIALOG_BUTTON_CANCEL: return true; case ui::DialogButton::DIALOG_BUTTON_OK: if (locked_) return false; // Not locked but the |textfield_| is not enabled. It's just a // notification to the user and [OK] button can be used to close the // dialog. if (!textfield_->GetEnabled()) return true; return textfield_->GetText().size() > 0; case ui::DialogButton::DIALOG_BUTTON_NONE: return true; } NOTREACHED(); return true; } views::View* RequestPinView::GetInitiallyFocusedView() { return textfield_; } base::string16 RequestPinView::GetWindowTitle() const { return window_title_; } void RequestPinView::SetDialogParameters( security_token_pin::CodeType code_type, security_token_pin::ErrorLabel error_label, int attempts_left, bool accept_input) { locked_ = false; SetErrorMessage(error_label, attempts_left, accept_input); SetAcceptInput(accept_input); switch (code_type) { case security_token_pin::CodeType::kPin: code_type_ = l10n_util::GetStringUTF16(IDS_REQUEST_PIN_DIALOG_PIN); break; case security_token_pin::CodeType::kPuk: code_type_ = l10n_util::GetStringUTF16(IDS_REQUEST_PIN_DIALOG_PUK); break; } UpdateHeaderText(); } void RequestPinView::SetExtensionName(const std::string& extension_name) { window_title_ = base::ASCIIToUTF16(extension_name); UpdateHeaderText(); } void RequestPinView::UpdateHeaderText() { int label_text_id = IDS_REQUEST_PIN_DIALOG_HEADER; base::string16 label_text = l10n_util::GetStringFUTF16(label_text_id, window_title_, code_type_); header_label_->SetText(label_text); header_label_->SizeToPreferredSize(); } void RequestPinView::Init() { const views::LayoutProvider* provider = views::LayoutProvider::Get(); SetBorder(views::CreateEmptyBorder( provider->GetDialogInsetsForContentType(views::TEXT, views::TEXT))); views::GridLayout* layout = SetLayoutManager(std::make_unique<views::GridLayout>()); int column_view_set_id = 0; views::ColumnSet* column_set = layout->AddColumnSet(column_view_set_id); column_set->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1, views::GridLayout::ColumnSize::kUsePreferred, 0, 0); layout->StartRow(0, column_view_set_id); // Information label. int label_text_id = IDS_REQUEST_PIN_DIALOG_HEADER; base::string16 label_text = l10n_util::GetStringUTF16(label_text_id); auto header_label = std::make_unique<views::Label>(label_text); header_label->SetEnabled(true); header_label_ = layout->AddView(std::move(header_label)); const int related_vertical_spacing = provider->GetDistanceMetric(views::DISTANCE_RELATED_CONTROL_VERTICAL); layout->AddPaddingRow(0, related_vertical_spacing); column_view_set_id++; column_set = layout->AddColumnSet(column_view_set_id); column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 100, views::GridLayout::ColumnSize::kUsePreferred, 0, 0); // Textfield to enter the PIN/PUK. layout->StartRow(0, column_view_set_id); auto textfield = std::make_unique<PassphraseTextfield>(); textfield->set_controller(this); textfield->SetEnabled(true); textfield->SetAssociatedLabel(header_label_); textfield_ = layout->AddView(std::move(textfield), 1, 1, views::GridLayout::LEADING, views::GridLayout::FILL, kDefaultTextWidth, 0); layout->AddPaddingRow(0, related_vertical_spacing); column_view_set_id++; column_set = layout->AddColumnSet(column_view_set_id); column_set->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1, views::GridLayout::ColumnSize::kUsePreferred, 0, 0); // Error label. layout->StartRow(0, column_view_set_id); auto error_label = std::make_unique<views::Label>(); error_label->SetVisible(false); error_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); error_label_ = layout->AddView(std::move(error_label)); } void RequestPinView::SetAcceptInput(bool accept_input) { if (accept_input) { textfield_->SetEnabled(true); textfield_->SetBackgroundColor(SK_ColorWHITE); textfield_->RequestFocus(); } else { textfield_->SetEnabled(false); textfield_->SetBackgroundColor(SK_ColorGRAY); } } void RequestPinView::SetErrorMessage(security_token_pin::ErrorLabel error_label, int attempts_left, bool accept_input) { if (error_label == security_token_pin::ErrorLabel::kNone && attempts_left < 0) { error_label_->SetVisible(false); textfield_->SetInvalid(false); return; } base::string16 error_message = security_token_pin::GenerateErrorMessage( error_label, attempts_left, accept_input); error_label_->SetVisible(true); error_label_->SetText(error_message); error_label_->SetTooltipText(error_message); error_label_->SetEnabledColor(gfx::kGoogleRed600); error_label_->SizeToPreferredSize(); textfield_->SetInvalid(true); } } // namespace chromeos
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
4d92144009d0bb73a84ec25179af14afcafb74aa
54a264778769ef51c712b966f82a92e64a175743
/DataFile/Block.h
4ba4e0d4f2df84771fe94bedd094811ffd19291a
[]
no_license
fy222fy/myDBS
dca24f0fbc3217993e7ae6ca73ddb15097cfc88a
68c204c6c0d8b648c163363e0ec8c0786bc1bc40
refs/heads/master
2022-12-04T16:13:47.635027
2020-08-14T13:00:06
2020-08-14T13:00:06
278,084,968
0
0
null
null
null
null
UTF-8
C++
false
false
2,771
h
/**************************************************** * 宏块模块 * 功能:定义 宏块块头结构,宏块句柄 *******************************************************/ #ifndef OB_BLOCK #define OB_BLOCK #include <stdint.h> #include<iostream> #include<fstream> #include "../include/env.h" #include "../Util/Util.h" /** * 宏块块头的结构,该结构与磁盘上的宏块结构对应。 * if_free:表示该块是否空闲 * used_space:该块中的数据占位多少 * block_size: 该块整体的大小,这部分是固定的 * in_offset:数据在宏块中的偏移,也就是块头的大小,这里目前也是固定的 * * MAX_SIZE:宏块的大小 * HEAD_SIZE:块头大小 * FREE_SPACE:数据块的最大大小 */ struct BlockHead{ bool if_free;//该块是否空闲 uint32_t used_space;//已经使用过的空间 uint32_t block_size;//块的整体大小,这个部分是固定的 uint32_t in_offset; //数据在该宏块中的偏移,最初这里设置是固定的。 const static uint32_t MAX_SIZE = 32768;//之前是320 const static uint32_t HEAD_SIZE = 16; const static uint32_t FREE_SPACE = MAX_SIZE - HEAD_SIZE; Status Deserialize(const uint8_t *result){ Status s; Convert convert; if_free = result[0] == 0x02 ? false:true; used_space = convert.int8_to_int32(result, 1); block_size = convert.int8_to_int32(result, 5); in_offset = convert.int8_to_int32(result,9); return s; } Status Serialize(uint8_t *data){ Status s; Convert convert; data[0] = if_free == true ? 0x01 : 0x02; uint8_t *temp = convert.int32_to_int8(used_space); data[1] = temp[0]; data[2] = temp[1]; data[3] = temp[2]; data[4] = temp[3]; temp = convert.int32_to_int8(block_size); data[5] = temp[0]; data[6] = temp[1]; data[7] = temp[2]; data[8] = temp[3]; temp = convert.int32_to_int8(in_offset); data[9] = temp[0]; data[10] = temp[1]; data[11] = temp[2]; data[12] = temp[3]; return s; } //构造函数创建一个还没有使用过的空块,参数是这个块是否使用过 BlockHead() :if_free(false), used_space(0), block_size(MAX_SIZE), in_offset(HEAD_SIZE){} ~BlockHead(){} void set_free(){if_free = true;} }; /** * 宏块的句柄,包含宏块的物理地址,用来对一个块进行操作 */ class BlockHandle{ public: /** * 用一个已有的地址来初始化这个handle */ BlockHandle(uint64_t addr):address(addr){} BlockHandle():address(0){} ~BlockHandle(){} uint64_t address; //物理地址 }; #endif /**/
[ "18811796269@163.com" ]
18811796269@163.com
c6017c4256aaf09a7976760e1f16cba05339be8d
c1626152963432aa221a4a9b0e4767a4608a51f7
/src/boost/concept_check.hpp
1ef7ef260744d7cad7a04108f5f6a81c58ea24fd
[ "MIT" ]
permissive
107-systems/107-Arduino-BoostUnits
d2bffefc2787e99173797c9a89d47961718f9b03
f1a4dfa7bf2af78c422bf10ba0c30e2a703cb69b
refs/heads/main
2023-09-06T03:46:02.903776
2023-09-05T09:32:35
2023-09-05T09:32:35
401,328,494
0
0
MIT
2023-09-05T09:32:37
2021-08-30T12:03:20
C++
UTF-8
C++
false
false
31,984
hpp
// // (C) Copyright Jeremy Siek 2000. // Copyright 2002 The Trustees of Indiana University. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Revision History: // 05 May 2001: Workarounds for HP aCC from Thomas Matelich. (Jeremy Siek) // 02 April 2001: Removed limits header altogether. (Jeremy Siek) // 01 April 2001: Modified to use new "boost/limits.hpp" header. (JMaddock) // // See http://www.boost.org/libs/concept_check for documentation. #ifndef BOOST_CONCEPT_CHECKS_HPP # define BOOST_CONCEPT_CHECKS_HPP # include "boost/concept/assert.hpp" # include <iterator> # include "boost/type_traits/conversion_traits.hpp" # include <utility> # include "boost/type_traits/is_same.hpp" # include "boost/type_traits/is_void.hpp" # include "boost/static_assert.hpp" # include "boost/type_traits/integral_constant.hpp" # include "boost/config/workaround.hpp" # include "boost/concept/usage.hpp" # include "boost/concept/detail/concept_def.hpp" #if (defined _MSC_VER) # pragma warning( push ) # pragma warning( disable : 4510 ) // default constructor could not be generated # pragma warning( disable : 4610 ) // object 'class' can never be instantiated - user-defined constructor required #endif namespace boost { // // Backward compatibility // template <class Model> inline void function_requires(Model* = 0) { BOOST_CONCEPT_ASSERT((Model)); } template <class T> inline void ignore_unused_variable_warning(T const&) {} # define BOOST_CLASS_REQUIRE(type_var, ns, concept) \ BOOST_CONCEPT_ASSERT((ns::concept<type_var>)) # define BOOST_CLASS_REQUIRE2(type_var1, type_var2, ns, concept) \ BOOST_CONCEPT_ASSERT((ns::concept<type_var1,type_var2>)) # define BOOST_CLASS_REQUIRE3(tv1, tv2, tv3, ns, concept) \ BOOST_CONCEPT_ASSERT((ns::concept<tv1,tv2,tv3>)) # define BOOST_CLASS_REQUIRE4(tv1, tv2, tv3, tv4, ns, concept) \ BOOST_CONCEPT_ASSERT((ns::concept<tv1,tv2,tv3,tv4>)) // // Begin concept definitions // BOOST_concept(Integer, (T)) { BOOST_CONCEPT_USAGE(Integer) { x.error_type_must_be_an_integer_type(); } private: T x; }; template <> struct Integer<char> {}; template <> struct Integer<signed char> {}; template <> struct Integer<unsigned char> {}; template <> struct Integer<short> {}; template <> struct Integer<unsigned short> {}; template <> struct Integer<int> {}; template <> struct Integer<unsigned int> {}; template <> struct Integer<long> {}; template <> struct Integer<unsigned long> {}; # if defined(BOOST_HAS_LONG_LONG) template <> struct Integer< ::boost::long_long_type> {}; template <> struct Integer< ::boost::ulong_long_type> {}; # elif defined(BOOST_HAS_MS_INT64) template <> struct Integer<__int64> {}; template <> struct Integer<unsigned __int64> {}; # endif BOOST_concept(SignedInteger,(T)) { BOOST_CONCEPT_USAGE(SignedInteger) { x.error_type_must_be_a_signed_integer_type(); } private: T x; }; template <> struct SignedInteger<signed char> { }; template <> struct SignedInteger<short> {}; template <> struct SignedInteger<int> {}; template <> struct SignedInteger<long> {}; # if defined(BOOST_HAS_LONG_LONG) template <> struct SignedInteger< ::boost::long_long_type> {}; # elif defined(BOOST_HAS_MS_INT64) template <> struct SignedInteger<__int64> {}; # endif BOOST_concept(UnsignedInteger,(T)) { BOOST_CONCEPT_USAGE(UnsignedInteger) { x.error_type_must_be_an_unsigned_integer_type(); } private: T x; }; template <> struct UnsignedInteger<unsigned char> {}; template <> struct UnsignedInteger<unsigned short> {}; template <> struct UnsignedInteger<unsigned int> {}; template <> struct UnsignedInteger<unsigned long> {}; # if defined(BOOST_HAS_LONG_LONG) template <> struct UnsignedInteger< ::boost::ulong_long_type> {}; # elif defined(BOOST_HAS_MS_INT64) template <> struct UnsignedInteger<unsigned __int64> {}; # endif //=========================================================================== // Basic Concepts BOOST_concept(DefaultConstructible,(TT)) { BOOST_CONCEPT_USAGE(DefaultConstructible) { TT a; // require default constructor ignore_unused_variable_warning(a); } }; BOOST_concept(Assignable,(TT)) { BOOST_CONCEPT_USAGE(Assignable) { #if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL a = b; // require assignment operator #endif const_constraints(b); } private: void const_constraints(const TT& x) { #if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL a = x; // const required for argument to assignment #else ignore_unused_variable_warning(x); #endif } private: TT a; TT b; }; BOOST_concept(CopyConstructible,(TT)) { BOOST_CONCEPT_USAGE(CopyConstructible) { TT a(b); // require copy constructor TT* ptr = &a; // require address of operator const_constraints(a); ignore_unused_variable_warning(ptr); } private: void const_constraints(const TT& a) { TT c(a); // require const copy constructor const TT* ptr = &a; // require const address of operator ignore_unused_variable_warning(c); ignore_unused_variable_warning(ptr); } TT b; }; // The SGI STL version of Assignable requires copy constructor and operator= BOOST_concept(SGIAssignable,(TT)) { BOOST_CONCEPT_USAGE(SGIAssignable) { TT c(a); #if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL a = b; // require assignment operator #endif const_constraints(b); ignore_unused_variable_warning(c); } private: void const_constraints(const TT& x) { TT c(x); #if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL a = x; // const required for argument to assignment #endif ignore_unused_variable_warning(c); } TT a; TT b; }; BOOST_concept(Convertible,(X)(Y)) { BOOST_CONCEPT_USAGE(Convertible) { Y y = x; ignore_unused_variable_warning(y); } private: X x; }; // The C++ standard requirements for many concepts talk about return // types that must be "convertible to bool". The problem with this // requirement is that it leaves the door open for evil proxies that // define things like operator|| with strange return types. Two // possible solutions are: // 1) require the return type to be exactly bool // 2) stay with convertible to bool, and also // specify stuff about all the logical operators. // For now we just test for convertible to bool. template <class TT> void require_boolean_expr(const TT& t) { bool x = t; ignore_unused_variable_warning(x); } BOOST_concept(EqualityComparable,(TT)) { BOOST_CONCEPT_USAGE(EqualityComparable) { require_boolean_expr(a == b); require_boolean_expr(a != b); } private: TT a, b; }; BOOST_concept(LessThanComparable,(TT)) { BOOST_CONCEPT_USAGE(LessThanComparable) { require_boolean_expr(a < b); } private: TT a, b; }; // This is equivalent to SGI STL's LessThanComparable. BOOST_concept(Comparable,(TT)) { BOOST_CONCEPT_USAGE(Comparable) { require_boolean_expr(a < b); require_boolean_expr(a > b); require_boolean_expr(a <= b); require_boolean_expr(a >= b); } private: TT a, b; }; #define BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(OP,NAME) \ BOOST_concept(NAME, (First)(Second)) \ { \ BOOST_CONCEPT_USAGE(NAME) { (void)constraints_(); } \ private: \ bool constraints_() { return a OP b; } \ First a; \ Second b; \ } #define BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(OP,NAME) \ BOOST_concept(NAME, (Ret)(First)(Second)) \ { \ BOOST_CONCEPT_USAGE(NAME) { (void)constraints_(); } \ private: \ Ret constraints_() { return a OP b; } \ First a; \ Second b; \ } BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(==, EqualOp); BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(!=, NotEqualOp); BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<, LessThanOp); BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<=, LessEqualOp); BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>, GreaterThanOp); BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>=, GreaterEqualOp); BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(+, PlusOp); BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(*, TimesOp); BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(/, DivideOp); BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, SubtractOp); BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, ModOp); //=========================================================================== // Function Object Concepts BOOST_concept(Generator,(Func)(Return)) { BOOST_CONCEPT_USAGE(Generator) { test(is_void<Return>()); } private: void test(boost::false_type) { // Do we really want a reference here? const Return& r = f(); ignore_unused_variable_warning(r); } void test(boost::true_type) { f(); } Func f; }; BOOST_concept(UnaryFunction,(Func)(Return)(Arg)) { BOOST_CONCEPT_USAGE(UnaryFunction) { test(is_void<Return>()); } private: void test(boost::false_type) { f(arg); // "priming the pump" this way keeps msvc6 happy (ICE) Return r = f(arg); ignore_unused_variable_warning(r); } void test(boost::true_type) { f(arg); } #if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ && BOOST_WORKAROUND(__GNUC__, > 3))) // Declare a dummy constructor to make gcc happy. // It seems the compiler can not generate a sensible constructor when this is instantiated with a reference type. // (warning: non-static reference "const double& boost::UnaryFunction<YourClassHere>::arg" // in class without a constructor [-Wuninitialized]) UnaryFunction(); #endif Func f; Arg arg; }; BOOST_concept(BinaryFunction,(Func)(Return)(First)(Second)) { BOOST_CONCEPT_USAGE(BinaryFunction) { test(is_void<Return>()); } private: void test(boost::false_type) { (void) f(first,second); Return r = f(first, second); // require operator() (void)r; } void test(boost::true_type) { f(first,second); } #if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ && BOOST_WORKAROUND(__GNUC__, > 3))) // Declare a dummy constructor to make gcc happy. // It seems the compiler can not generate a sensible constructor when this is instantiated with a reference type. // (warning: non-static reference "const double& boost::BinaryFunction<YourClassHere>::arg" // in class without a constructor [-Wuninitialized]) BinaryFunction(); #endif Func f; First first; Second second; }; BOOST_concept(UnaryPredicate,(Func)(Arg)) { BOOST_CONCEPT_USAGE(UnaryPredicate) { require_boolean_expr(f(arg)); // require operator() returning bool } private: #if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ && BOOST_WORKAROUND(__GNUC__, > 3))) // Declare a dummy constructor to make gcc happy. // It seems the compiler can not generate a sensible constructor when this is instantiated with a reference type. // (warning: non-static reference "const double& boost::UnaryPredicate<YourClassHere>::arg" // in class without a constructor [-Wuninitialized]) UnaryPredicate(); #endif Func f; Arg arg; }; BOOST_concept(BinaryPredicate,(Func)(First)(Second)) { BOOST_CONCEPT_USAGE(BinaryPredicate) { require_boolean_expr(f(a, b)); // require operator() returning bool } private: #if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ && BOOST_WORKAROUND(__GNUC__, > 3))) // Declare a dummy constructor to make gcc happy. // It seems the compiler can not generate a sensible constructor when this is instantiated with a reference type. // (warning: non-static reference "const double& boost::BinaryPredicate<YourClassHere>::arg" // in class without a constructor [-Wuninitialized]) BinaryPredicate(); #endif Func f; First a; Second b; }; // use this when functor is used inside a container class like std::set BOOST_concept(Const_BinaryPredicate,(Func)(First)(Second)) : BinaryPredicate<Func, First, Second> { BOOST_CONCEPT_USAGE(Const_BinaryPredicate) { const_constraints(f); } private: void const_constraints(const Func& fun) { // operator() must be a const member function require_boolean_expr(fun(a, b)); } #if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ && BOOST_WORKAROUND(__GNUC__, > 3))) // Declare a dummy constructor to make gcc happy. // It seems the compiler can not generate a sensible constructor when this is instantiated with a reference type. // (warning: non-static reference "const double& boost::Const_BinaryPredicate<YourClassHere>::arg" // in class without a constructor [-Wuninitialized]) Const_BinaryPredicate(); #endif Func f; First a; Second b; }; BOOST_concept(AdaptableGenerator,(Func)(Return)) : Generator<Func, typename Func::result_type> { typedef typename Func::result_type result_type; BOOST_CONCEPT_USAGE(AdaptableGenerator) { BOOST_CONCEPT_ASSERT((Convertible<result_type, Return>)); } }; BOOST_concept(AdaptableUnaryFunction,(Func)(Return)(Arg)) : UnaryFunction<Func, typename Func::result_type, typename Func::argument_type> { typedef typename Func::argument_type argument_type; typedef typename Func::result_type result_type; ~AdaptableUnaryFunction() { BOOST_CONCEPT_ASSERT((Convertible<result_type, Return>)); BOOST_CONCEPT_ASSERT((Convertible<Arg, argument_type>)); } }; BOOST_concept(AdaptableBinaryFunction,(Func)(Return)(First)(Second)) : BinaryFunction< Func , typename Func::result_type , typename Func::first_argument_type , typename Func::second_argument_type > { typedef typename Func::first_argument_type first_argument_type; typedef typename Func::second_argument_type second_argument_type; typedef typename Func::result_type result_type; ~AdaptableBinaryFunction() { BOOST_CONCEPT_ASSERT((Convertible<result_type, Return>)); BOOST_CONCEPT_ASSERT((Convertible<First, first_argument_type>)); BOOST_CONCEPT_ASSERT((Convertible<Second, second_argument_type>)); } }; BOOST_concept(AdaptablePredicate,(Func)(Arg)) : UnaryPredicate<Func, Arg> , AdaptableUnaryFunction<Func, bool, Arg> { }; BOOST_concept(AdaptableBinaryPredicate,(Func)(First)(Second)) : BinaryPredicate<Func, First, Second> , AdaptableBinaryFunction<Func, bool, First, Second> { }; //=========================================================================== // Iterator Concepts BOOST_concept(InputIterator,(TT)) : Assignable<TT> , EqualityComparable<TT> { typedef typename std::iterator_traits<TT>::value_type value_type; typedef typename std::iterator_traits<TT>::difference_type difference_type; typedef typename std::iterator_traits<TT>::reference reference; typedef typename std::iterator_traits<TT>::pointer pointer; typedef typename std::iterator_traits<TT>::iterator_category iterator_category; BOOST_CONCEPT_USAGE(InputIterator) { BOOST_CONCEPT_ASSERT((SignedInteger<difference_type>)); BOOST_CONCEPT_ASSERT((Convertible<iterator_category, std::input_iterator_tag>)); TT j(i); (void)*i; // require dereference operator ++j; // require preincrement operator i++; // require postincrement operator } private: TT i; }; BOOST_concept(OutputIterator,(TT)(ValueT)) : Assignable<TT> { BOOST_CONCEPT_USAGE(OutputIterator) { ++i; // require preincrement operator i++; // require postincrement operator *i++ = t; // require postincrement and assignment } private: TT i, j; ValueT t; }; BOOST_concept(ForwardIterator,(TT)) : InputIterator<TT> { BOOST_CONCEPT_USAGE(ForwardIterator) { BOOST_CONCEPT_ASSERT((Convertible< BOOST_DEDUCED_TYPENAME ForwardIterator::iterator_category , std::forward_iterator_tag >)); typename InputIterator<TT>::reference r = *i; ignore_unused_variable_warning(r); } private: TT i; }; BOOST_concept(Mutable_ForwardIterator,(TT)) : ForwardIterator<TT> { BOOST_CONCEPT_USAGE(Mutable_ForwardIterator) { *i++ = *j; // require postincrement and assignment } private: TT i, j; }; BOOST_concept(BidirectionalIterator,(TT)) : ForwardIterator<TT> { BOOST_CONCEPT_USAGE(BidirectionalIterator) { BOOST_CONCEPT_ASSERT((Convertible< BOOST_DEDUCED_TYPENAME BidirectionalIterator::iterator_category , std::bidirectional_iterator_tag >)); --i; // require predecrement operator i--; // require postdecrement operator } private: TT i; }; BOOST_concept(Mutable_BidirectionalIterator,(TT)) : BidirectionalIterator<TT> , Mutable_ForwardIterator<TT> { BOOST_CONCEPT_USAGE(Mutable_BidirectionalIterator) { *i-- = *j; // require postdecrement and assignment } private: TT i, j; }; BOOST_concept(RandomAccessIterator,(TT)) : BidirectionalIterator<TT> , Comparable<TT> { BOOST_CONCEPT_USAGE(RandomAccessIterator) { BOOST_CONCEPT_ASSERT((Convertible< BOOST_DEDUCED_TYPENAME BidirectionalIterator<TT>::iterator_category , std::random_access_iterator_tag >)); i += n; // require assignment addition operator i = i + n; i = n + i; // require addition with difference type i -= n; // require assignment subtraction operator i = i - n; // require subtraction with difference type n = i - j; // require difference operator (void)i[n]; // require element access operator } private: TT a, b; TT i, j; typename std::iterator_traits<TT>::difference_type n; }; BOOST_concept(Mutable_RandomAccessIterator,(TT)) : RandomAccessIterator<TT> , Mutable_BidirectionalIterator<TT> { BOOST_CONCEPT_USAGE(Mutable_RandomAccessIterator) { i[n] = *i; // require element access and assignment } private: TT i; typename std::iterator_traits<TT>::difference_type n; }; //=========================================================================== // Container s BOOST_concept(Container,(C)) : Assignable<C> { typedef typename C::value_type value_type; typedef typename C::difference_type difference_type; typedef typename C::size_type size_type; typedef typename C::const_reference const_reference; typedef typename C::const_pointer const_pointer; typedef typename C::const_iterator const_iterator; BOOST_CONCEPT_USAGE(Container) { BOOST_CONCEPT_ASSERT((InputIterator<const_iterator>)); const_constraints(c); } private: void const_constraints(const C& cc) { i = cc.begin(); i = cc.end(); n = cc.size(); n = cc.max_size(); b = cc.empty(); } C c; bool b; const_iterator i; size_type n; }; BOOST_concept(Mutable_Container,(C)) : Container<C> { typedef typename C::reference reference; typedef typename C::iterator iterator; typedef typename C::pointer pointer; BOOST_CONCEPT_USAGE(Mutable_Container) { BOOST_CONCEPT_ASSERT(( Assignable<typename Mutable_Container::value_type>)); BOOST_CONCEPT_ASSERT((InputIterator<iterator>)); i = c.begin(); i = c.end(); c.swap(c2); } private: iterator i; C c, c2; }; BOOST_concept(ForwardContainer,(C)) : Container<C> { BOOST_CONCEPT_USAGE(ForwardContainer) { BOOST_CONCEPT_ASSERT(( ForwardIterator< typename ForwardContainer::const_iterator >)); } }; BOOST_concept(Mutable_ForwardContainer,(C)) : ForwardContainer<C> , Mutable_Container<C> { BOOST_CONCEPT_USAGE(Mutable_ForwardContainer) { BOOST_CONCEPT_ASSERT(( Mutable_ForwardIterator< typename Mutable_ForwardContainer::iterator >)); } }; BOOST_concept(ReversibleContainer,(C)) : ForwardContainer<C> { typedef typename C::const_reverse_iterator const_reverse_iterator; BOOST_CONCEPT_USAGE(ReversibleContainer) { BOOST_CONCEPT_ASSERT(( BidirectionalIterator< typename ReversibleContainer::const_iterator>)); BOOST_CONCEPT_ASSERT((BidirectionalIterator<const_reverse_iterator>)); const_constraints(c); } private: void const_constraints(const C& cc) { const_reverse_iterator _i = cc.rbegin(); _i = cc.rend(); } C c; }; BOOST_concept(Mutable_ReversibleContainer,(C)) : Mutable_ForwardContainer<C> , ReversibleContainer<C> { typedef typename C::reverse_iterator reverse_iterator; BOOST_CONCEPT_USAGE(Mutable_ReversibleContainer) { typedef typename Mutable_ForwardContainer<C>::iterator iterator; BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator<iterator>)); BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator<reverse_iterator>)); reverse_iterator i = c.rbegin(); i = c.rend(); } private: C c; }; BOOST_concept(RandomAccessContainer,(C)) : ReversibleContainer<C> { typedef typename C::size_type size_type; typedef typename C::const_reference const_reference; BOOST_CONCEPT_USAGE(RandomAccessContainer) { BOOST_CONCEPT_ASSERT(( RandomAccessIterator< typename RandomAccessContainer::const_iterator >)); const_constraints(c); } private: void const_constraints(const C& cc) { const_reference r = cc[n]; ignore_unused_variable_warning(r); } C c; size_type n; }; BOOST_concept(Mutable_RandomAccessContainer,(C)) : Mutable_ReversibleContainer<C> , RandomAccessContainer<C> { private: typedef Mutable_RandomAccessContainer self; public: BOOST_CONCEPT_USAGE(Mutable_RandomAccessContainer) { BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator<typename self::iterator>)); BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator<typename self::reverse_iterator>)); typename self::reference r = c[i]; ignore_unused_variable_warning(r); } private: typename Mutable_ReversibleContainer<C>::size_type i; C c; }; // A Sequence is inherently mutable BOOST_concept(Sequence,(S)) : Mutable_ForwardContainer<S> // Matt Austern's book puts DefaultConstructible here, the C++ // standard places it in Container --JGS // ... so why aren't we following the standard? --DWA , DefaultConstructible<S> { BOOST_CONCEPT_USAGE(Sequence) { S c(n, t), c2(first, last); c.insert(p, t); c.insert(p, n, t); c.insert(p, first, last); c.erase(p); c.erase(p, q); typename Sequence::reference r = c.front(); ignore_unused_variable_warning(c); ignore_unused_variable_warning(c2); ignore_unused_variable_warning(r); const_constraints(c); } private: void const_constraints(const S& c) { typename Sequence::const_reference r = c.front(); ignore_unused_variable_warning(r); } typename S::value_type t; typename S::size_type n; typename S::value_type* first, *last; typename S::iterator p, q; }; BOOST_concept(FrontInsertionSequence,(S)) : Sequence<S> { BOOST_CONCEPT_USAGE(FrontInsertionSequence) { c.push_front(t); c.pop_front(); } private: S c; typename S::value_type t; }; BOOST_concept(BackInsertionSequence,(S)) : Sequence<S> { BOOST_CONCEPT_USAGE(BackInsertionSequence) { c.push_back(t); c.pop_back(); typename BackInsertionSequence::reference r = c.back(); ignore_unused_variable_warning(r); const_constraints(c); } private: void const_constraints(const S& cc) { typename BackInsertionSequence::const_reference r = cc.back(); ignore_unused_variable_warning(r); } S c; typename S::value_type t; }; BOOST_concept(AssociativeContainer,(C)) : ForwardContainer<C> , DefaultConstructible<C> { typedef typename C::key_type key_type; typedef typename C::key_compare key_compare; typedef typename C::value_compare value_compare; typedef typename C::iterator iterator; BOOST_CONCEPT_USAGE(AssociativeContainer) { i = c.find(k); r = c.equal_range(k); c.erase(k); c.erase(i); c.erase(r.first, r.second); const_constraints(c); BOOST_CONCEPT_ASSERT((BinaryPredicate<key_compare,key_type,key_type>)); typedef typename AssociativeContainer::value_type value_type_; BOOST_CONCEPT_ASSERT((BinaryPredicate<value_compare,value_type_,value_type_>)); } // Redundant with the base concept, but it helps below. typedef typename C::const_iterator const_iterator; private: void const_constraints(const C& cc) { ci = cc.find(k); n = cc.count(k); cr = cc.equal_range(k); } C c; iterator i; std::pair<iterator,iterator> r; const_iterator ci; std::pair<const_iterator,const_iterator> cr; typename C::key_type k; typename C::size_type n; }; BOOST_concept(UniqueAssociativeContainer,(C)) : AssociativeContainer<C> { BOOST_CONCEPT_USAGE(UniqueAssociativeContainer) { C c(first, last); pos_flag = c.insert(t); c.insert(first, last); ignore_unused_variable_warning(c); } private: std::pair<typename C::iterator, bool> pos_flag; typename C::value_type t; typename C::value_type* first, *last; }; BOOST_concept(MultipleAssociativeContainer,(C)) : AssociativeContainer<C> { BOOST_CONCEPT_USAGE(MultipleAssociativeContainer) { C c(first, last); pos = c.insert(t); c.insert(first, last); ignore_unused_variable_warning(c); ignore_unused_variable_warning(pos); } private: typename C::iterator pos; typename C::value_type t; typename C::value_type* first, *last; }; BOOST_concept(SimpleAssociativeContainer,(C)) : AssociativeContainer<C> { BOOST_CONCEPT_USAGE(SimpleAssociativeContainer) { typedef typename C::key_type key_type; typedef typename C::value_type value_type; BOOST_STATIC_ASSERT((boost::is_same<key_type,value_type>::value)); } }; BOOST_concept(PairAssociativeContainer,(C)) : AssociativeContainer<C> { BOOST_CONCEPT_USAGE(PairAssociativeContainer) { typedef typename C::key_type key_type; typedef typename C::value_type value_type; typedef typename C::mapped_type mapped_type; typedef std::pair<const key_type, mapped_type> required_value_type; BOOST_STATIC_ASSERT((boost::is_same<value_type,required_value_type>::value)); } }; BOOST_concept(SortedAssociativeContainer,(C)) : AssociativeContainer<C> , ReversibleContainer<C> { BOOST_CONCEPT_USAGE(SortedAssociativeContainer) { C c(kc), c2(first, last), c3(first, last, kc); p = c.upper_bound(k); p = c.lower_bound(k); r = c.equal_range(k); c.insert(p, t); ignore_unused_variable_warning(c); ignore_unused_variable_warning(c2); ignore_unused_variable_warning(c3); const_constraints(c); } void const_constraints(const C& c) { kc = c.key_comp(); vc = c.value_comp(); cp = c.upper_bound(k); cp = c.lower_bound(k); cr = c.equal_range(k); } private: typename C::key_compare kc; typename C::value_compare vc; typename C::value_type t; typename C::key_type k; typedef typename C::iterator iterator; typedef typename C::const_iterator const_iterator; typedef SortedAssociativeContainer self; iterator p; const_iterator cp; std::pair<typename self::iterator,typename self::iterator> r; std::pair<typename self::const_iterator,typename self::const_iterator> cr; typename C::value_type* first, *last; }; // HashedAssociativeContainer BOOST_concept(Collection,(C)) { BOOST_CONCEPT_USAGE(Collection) { boost::function_requires<boost::InputIteratorConcept<iterator> >(); boost::function_requires<boost::InputIteratorConcept<const_iterator> >(); boost::function_requires<boost::CopyConstructibleConcept<value_type> >(); const_constraints(c); i = c.begin(); i = c.end(); c.swap(c); } void const_constraints(const C& cc) { ci = cc.begin(); ci = cc.end(); n = cc.size(); b = cc.empty(); } private: typedef typename C::value_type value_type; typedef typename C::iterator iterator; typedef typename C::const_iterator const_iterator; typedef typename C::reference reference; typedef typename C::const_reference const_reference; // typedef typename C::pointer pointer; typedef typename C::difference_type difference_type; typedef typename C::size_type size_type; C c; bool b; iterator i; const_iterator ci; size_type n; }; } // namespace boost #if (defined _MSC_VER) # pragma warning( pop ) #endif # include "boost/concept/detail/concept_undef.hpp" #endif // BOOST_CONCEPT_CHECKS_HPP
[ "cto@lxrobotics.com" ]
cto@lxrobotics.com
30b00a7ad51c084c644f98b2d5eab4e2b24888e1
c35a958cd6988d0624c5c5249fb4252e123dcc8d
/综合实验三/5.19综合实验三/ADD_DLG.cpp
6e7f6350deae59ad18fb5eadc35c5971b78498a0
[]
no_license
mengwencong/-1111
ff8de852aaf92e2dfdaeb5d04ef07462811d7224
9dee1b1ada251f408bdc431b237559f211445855
refs/heads/master
2022-11-14T22:30:40.462869
2020-07-05T14:08:57
2020-07-05T14:08:57
277,313,851
0
0
null
null
null
null
GB18030
C++
false
false
476
cpp
// ADD_DLG.cpp : 实现文件 // #include "stdafx.h" #include "5.19综合实验三.h" #include "ADD_DLG.h" #include "afxdialogex.h" // ADD_DLG 对话框 IMPLEMENT_DYNAMIC(ADD_DLG, CDialogEx) ADD_DLG::ADD_DLG(CWnd* pParent /*=NULL*/) : CDialogEx(IDD_ADD, pParent) { } ADD_DLG::~ADD_DLG() { } void ADD_DLG::DoDataExchange(CDataExchange* pDX) { CDialogEx::DoDataExchange(pDX); } BEGIN_MESSAGE_MAP(ADD_DLG, CDialogEx) END_MESSAGE_MAP() // ADD_DLG 消息处理程序
[ "2417440970@qq.com" ]
2417440970@qq.com
f7037a897258c866d899e3b11f16997c667550b2
e9040d7f9142287d8dbe6e039402cb441f3acb15
/TAD8.cpp
95ce697d55c881bbddfb481252b1a88b8884db72
[]
no_license
StefanoMazzuka/Estructura_de_Datos_y_Algoritmos
a3536b63c7e25c3d08cc90af9b4f6f9ccbe37eda
a153d865a9e9c6968e4a287e1513c14697b1c0ef
refs/heads/master
2020-05-27T14:57:51.889452
2019-05-26T11:11:20
2019-05-26T11:11:20
188,671,478
2
0
null
null
null
null
UTF-8
C++
false
false
796
cpp
/* E36 Stefano Mazzuka */ #include <iostream> #include <fstream> #include <vector> #include <string> #include "queue.h" bool resuelveCaso() { int data; std::cin >> data; if (!std::cin) return false; queue<int> q; while (data != 0) { q.push(data); std::cin >> data; } int length = q.size(); if (length > 0) { q.duplicate(q.first()); for (int i = 0; i < length * 2; i++) { std::cout << q.front() << " "; q.pop(); } } std::cout << '\n'; return true; } int main() { #ifndef DOMJUDGE std::ifstream in("TAD8.txt"); auto cinbuf = std::cin.rdbuf(in.rdbuf()); //save old buf and redirect std::cin to casos.txt #endif while (resuelveCaso()) {} #ifndef DOMJUDGE // para dejar todo como estaba al principio std::cin.rdbuf(cinbuf); system("PAUSE"); #endif return 0; }
[ "stefano.mazzuka@gmail.com" ]
stefano.mazzuka@gmail.com
68c6e3b68e574446f80917d70ff762691929241e
e52561b4c3e0e83bc6fc24bddac34598218a0564
/SimpleEchoServer.h
5d45c6bf94c959003883e2c96bc78b74cd03584a
[]
no_license
BupTy03/FirstPocoProject
a25e5ba462d3a747f292a3245fd0582923273d2a
61c16aa17f70c553794185e4af3a00ec40f0cbd3
refs/heads/master
2023-04-25T06:13:26.375259
2021-05-14T11:47:19
2021-05-14T11:47:19
314,625,076
0
0
null
null
null
null
UTF-8
C++
false
false
552
h
#pragma once #include <Poco/Util/ServerApplication.h> #include <iostream> #include <string> #include <mutex> #include <vector> class SimpleEchoServer : public Poco::Util::ServerApplication { public: SimpleEchoServer(); static SimpleEchoServer& instance(); void viewText(std::ostream& os); void setText(const std::string& newText); protected: int main(const std::vector<std::string>&) override; private: bool textViewed_; std::string text_; mutable std::mutex textMutex_; static SimpleEchoServer* pInstance_; };
[ "anton.lagosha.99@mail.ru" ]
anton.lagosha.99@mail.ru
3b2c670bb1ad49780570a60c0b97a7a7bbd948fa
75e49b7e53cf60c99b7ab338127028a457e2721b
/sources/plug_osg/src/luna/bind_osg_Timer.cpp
d12f1f8d4d13c7510377e5a90a9505057b7e33f6
[]
no_license
roche-emmanuel/singularity
32f47813c90b9cd5655f3bead9997215cbf02d6a
e9165d68fc09d2767e8acb1e9e0493a014b87399
refs/heads/master
2021-01-12T01:21:39.961949
2012-10-05T10:48:21
2012-10-05T10:48:21
78,375,325
0
0
null
null
null
null
UTF-8
C++
false
false
15,929
cpp
#include <plug_common.h> class luna_wrapper_osg_Timer { public: typedef Luna< osg::Timer > luna_t; // Base class dynamic cast support: inline static bool _lg_typecheck_dynCast(lua_State *L) { if( lua_gettop(L)!=2 ) return false; if( lua_isstring(L,2)==0 ) return false; return true; } static int _bind_dynCast(lua_State *L) { if (!_lg_typecheck_dynCast(L)) { luna_printStack(L); luaL_error(L, "luna typecheck failed in dynCast function, expected prototype:\ndynCast(const std::string &)"); } std::string name(lua_tostring(L,2),lua_objlen(L,2)); osg::Timer* self=(Luna< osg::Timer >::check(L,1)); if(!self) { luaL_error(L, "Invalid object in function call dynCast(...)"); } static LunaConverterMap& converters = luna_getConverterMap("osg::Timer"); return luna_dynamicCast(L,converters,"osg::Timer",name); } // Constructor checkers: inline static bool _lg_typecheck_ctor(lua_State *L) { if( lua_gettop(L)!=0 ) return false; return true; } // Function checkers: inline static bool _lg_typecheck_tick(lua_State *L) { if( lua_gettop(L)!=1 ) return false; return true; } inline static bool _lg_typecheck_setStartTick_overload_1(lua_State *L) { if( lua_gettop(L)!=1 ) return false; return true; } inline static bool _lg_typecheck_setStartTick_overload_2(lua_State *L) { if( lua_gettop(L)!=2 ) return false; if( (lua_isnumber(L,2)==0 || lua_tointeger(L,2) != lua_tonumber(L,2)) ) return false; return true; } inline static bool _lg_typecheck_getStartTick(lua_State *L) { if( lua_gettop(L)!=1 ) return false; return true; } inline static bool _lg_typecheck_time_s(lua_State *L) { if( lua_gettop(L)!=1 ) return false; return true; } inline static bool _lg_typecheck_time_m(lua_State *L) { if( lua_gettop(L)!=1 ) return false; return true; } inline static bool _lg_typecheck_time_u(lua_State *L) { if( lua_gettop(L)!=1 ) return false; return true; } inline static bool _lg_typecheck_time_n(lua_State *L) { if( lua_gettop(L)!=1 ) return false; return true; } inline static bool _lg_typecheck_delta_s(lua_State *L) { if( lua_gettop(L)!=3 ) return false; if( (lua_isnumber(L,2)==0 || lua_tointeger(L,2) != lua_tonumber(L,2)) ) return false; if( (lua_isnumber(L,3)==0 || lua_tointeger(L,3) != lua_tonumber(L,3)) ) return false; return true; } inline static bool _lg_typecheck_delta_m(lua_State *L) { if( lua_gettop(L)!=3 ) return false; if( (lua_isnumber(L,2)==0 || lua_tointeger(L,2) != lua_tonumber(L,2)) ) return false; if( (lua_isnumber(L,3)==0 || lua_tointeger(L,3) != lua_tonumber(L,3)) ) return false; return true; } inline static bool _lg_typecheck_delta_u(lua_State *L) { if( lua_gettop(L)!=3 ) return false; if( (lua_isnumber(L,2)==0 || lua_tointeger(L,2) != lua_tonumber(L,2)) ) return false; if( (lua_isnumber(L,3)==0 || lua_tointeger(L,3) != lua_tonumber(L,3)) ) return false; return true; } inline static bool _lg_typecheck_delta_n(lua_State *L) { if( lua_gettop(L)!=3 ) return false; if( (lua_isnumber(L,2)==0 || lua_tointeger(L,2) != lua_tonumber(L,2)) ) return false; if( (lua_isnumber(L,3)==0 || lua_tointeger(L,3) != lua_tonumber(L,3)) ) return false; return true; } inline static bool _lg_typecheck_getSecondsPerTick(lua_State *L) { if( lua_gettop(L)!=1 ) return false; return true; } inline static bool _lg_typecheck_instance(lua_State *L) { if( lua_gettop(L)!=0 ) return false; return true; } // Operator checkers: // (found 0 valid operators) // Constructor binds: // osg::Timer::Timer() static osg::Timer* _bind_ctor(lua_State *L) { if (!_lg_typecheck_ctor(L)) { luna_printStack(L); luaL_error(L, "luna typecheck failed in osg::Timer::Timer() function, expected prototype:\nosg::Timer::Timer()\nClass arguments details:\n"); } return new osg::Timer(); } // Function binds: // unsigned long long osg::Timer::tick() const static int _bind_tick(lua_State *L) { if (!_lg_typecheck_tick(L)) { luna_printStack(L); luaL_error(L, "luna typecheck failed in unsigned long long osg::Timer::tick() const function, expected prototype:\nunsigned long long osg::Timer::tick() const\nClass arguments details:\n"); } osg::Timer* self=(Luna< osg::Timer >::check(L,1)); if(!self) { luna_printStack(L); luaL_error(L, "Invalid object in function call unsigned long long osg::Timer::tick() const"); } unsigned long long lret = self->tick(); lua_pushnumber(L,lret); return 1; } // void osg::Timer::setStartTick() static int _bind_setStartTick_overload_1(lua_State *L) { if (!_lg_typecheck_setStartTick_overload_1(L)) { luna_printStack(L); luaL_error(L, "luna typecheck failed in void osg::Timer::setStartTick() function, expected prototype:\nvoid osg::Timer::setStartTick()\nClass arguments details:\n"); } osg::Timer* self=(Luna< osg::Timer >::check(L,1)); if(!self) { luna_printStack(L); luaL_error(L, "Invalid object in function call void osg::Timer::setStartTick()"); } self->setStartTick(); return 0; } // void osg::Timer::setStartTick(unsigned long long t) static int _bind_setStartTick_overload_2(lua_State *L) { if (!_lg_typecheck_setStartTick_overload_2(L)) { luna_printStack(L); luaL_error(L, "luna typecheck failed in void osg::Timer::setStartTick(unsigned long long t) function, expected prototype:\nvoid osg::Timer::setStartTick(unsigned long long t)\nClass arguments details:\n"); } unsigned long long t=(unsigned long long)lua_tointeger(L,2); osg::Timer* self=(Luna< osg::Timer >::check(L,1)); if(!self) { luna_printStack(L); luaL_error(L, "Invalid object in function call void osg::Timer::setStartTick(unsigned long long)"); } self->setStartTick(t); return 0; } // Overload binder for osg::Timer::setStartTick static int _bind_setStartTick(lua_State *L) { if (_lg_typecheck_setStartTick_overload_1(L)) return _bind_setStartTick_overload_1(L); if (_lg_typecheck_setStartTick_overload_2(L)) return _bind_setStartTick_overload_2(L); luaL_error(L, "error in function setStartTick, cannot match any of the overloads for function setStartTick:\n setStartTick()\n setStartTick(unsigned long long)\n"); return 0; } // unsigned long long osg::Timer::getStartTick() const static int _bind_getStartTick(lua_State *L) { if (!_lg_typecheck_getStartTick(L)) { luna_printStack(L); luaL_error(L, "luna typecheck failed in unsigned long long osg::Timer::getStartTick() const function, expected prototype:\nunsigned long long osg::Timer::getStartTick() const\nClass arguments details:\n"); } osg::Timer* self=(Luna< osg::Timer >::check(L,1)); if(!self) { luna_printStack(L); luaL_error(L, "Invalid object in function call unsigned long long osg::Timer::getStartTick() const"); } unsigned long long lret = self->getStartTick(); lua_pushnumber(L,lret); return 1; } // double osg::Timer::time_s() const static int _bind_time_s(lua_State *L) { if (!_lg_typecheck_time_s(L)) { luna_printStack(L); luaL_error(L, "luna typecheck failed in double osg::Timer::time_s() const function, expected prototype:\ndouble osg::Timer::time_s() const\nClass arguments details:\n"); } osg::Timer* self=(Luna< osg::Timer >::check(L,1)); if(!self) { luna_printStack(L); luaL_error(L, "Invalid object in function call double osg::Timer::time_s() const"); } double lret = self->time_s(); lua_pushnumber(L,lret); return 1; } // double osg::Timer::time_m() const static int _bind_time_m(lua_State *L) { if (!_lg_typecheck_time_m(L)) { luna_printStack(L); luaL_error(L, "luna typecheck failed in double osg::Timer::time_m() const function, expected prototype:\ndouble osg::Timer::time_m() const\nClass arguments details:\n"); } osg::Timer* self=(Luna< osg::Timer >::check(L,1)); if(!self) { luna_printStack(L); luaL_error(L, "Invalid object in function call double osg::Timer::time_m() const"); } double lret = self->time_m(); lua_pushnumber(L,lret); return 1; } // double osg::Timer::time_u() const static int _bind_time_u(lua_State *L) { if (!_lg_typecheck_time_u(L)) { luna_printStack(L); luaL_error(L, "luna typecheck failed in double osg::Timer::time_u() const function, expected prototype:\ndouble osg::Timer::time_u() const\nClass arguments details:\n"); } osg::Timer* self=(Luna< osg::Timer >::check(L,1)); if(!self) { luna_printStack(L); luaL_error(L, "Invalid object in function call double osg::Timer::time_u() const"); } double lret = self->time_u(); lua_pushnumber(L,lret); return 1; } // double osg::Timer::time_n() const static int _bind_time_n(lua_State *L) { if (!_lg_typecheck_time_n(L)) { luna_printStack(L); luaL_error(L, "luna typecheck failed in double osg::Timer::time_n() const function, expected prototype:\ndouble osg::Timer::time_n() const\nClass arguments details:\n"); } osg::Timer* self=(Luna< osg::Timer >::check(L,1)); if(!self) { luna_printStack(L); luaL_error(L, "Invalid object in function call double osg::Timer::time_n() const"); } double lret = self->time_n(); lua_pushnumber(L,lret); return 1; } // double osg::Timer::delta_s(unsigned long long t1, unsigned long long t2) const static int _bind_delta_s(lua_State *L) { if (!_lg_typecheck_delta_s(L)) { luna_printStack(L); luaL_error(L, "luna typecheck failed in double osg::Timer::delta_s(unsigned long long t1, unsigned long long t2) const function, expected prototype:\ndouble osg::Timer::delta_s(unsigned long long t1, unsigned long long t2) const\nClass arguments details:\n"); } unsigned long long t1=(unsigned long long)lua_tointeger(L,2); unsigned long long t2=(unsigned long long)lua_tointeger(L,3); osg::Timer* self=(Luna< osg::Timer >::check(L,1)); if(!self) { luna_printStack(L); luaL_error(L, "Invalid object in function call double osg::Timer::delta_s(unsigned long long, unsigned long long) const"); } double lret = self->delta_s(t1, t2); lua_pushnumber(L,lret); return 1; } // double osg::Timer::delta_m(unsigned long long t1, unsigned long long t2) const static int _bind_delta_m(lua_State *L) { if (!_lg_typecheck_delta_m(L)) { luna_printStack(L); luaL_error(L, "luna typecheck failed in double osg::Timer::delta_m(unsigned long long t1, unsigned long long t2) const function, expected prototype:\ndouble osg::Timer::delta_m(unsigned long long t1, unsigned long long t2) const\nClass arguments details:\n"); } unsigned long long t1=(unsigned long long)lua_tointeger(L,2); unsigned long long t2=(unsigned long long)lua_tointeger(L,3); osg::Timer* self=(Luna< osg::Timer >::check(L,1)); if(!self) { luna_printStack(L); luaL_error(L, "Invalid object in function call double osg::Timer::delta_m(unsigned long long, unsigned long long) const"); } double lret = self->delta_m(t1, t2); lua_pushnumber(L,lret); return 1; } // double osg::Timer::delta_u(unsigned long long t1, unsigned long long t2) const static int _bind_delta_u(lua_State *L) { if (!_lg_typecheck_delta_u(L)) { luna_printStack(L); luaL_error(L, "luna typecheck failed in double osg::Timer::delta_u(unsigned long long t1, unsigned long long t2) const function, expected prototype:\ndouble osg::Timer::delta_u(unsigned long long t1, unsigned long long t2) const\nClass arguments details:\n"); } unsigned long long t1=(unsigned long long)lua_tointeger(L,2); unsigned long long t2=(unsigned long long)lua_tointeger(L,3); osg::Timer* self=(Luna< osg::Timer >::check(L,1)); if(!self) { luna_printStack(L); luaL_error(L, "Invalid object in function call double osg::Timer::delta_u(unsigned long long, unsigned long long) const"); } double lret = self->delta_u(t1, t2); lua_pushnumber(L,lret); return 1; } // double osg::Timer::delta_n(unsigned long long t1, unsigned long long t2) const static int _bind_delta_n(lua_State *L) { if (!_lg_typecheck_delta_n(L)) { luna_printStack(L); luaL_error(L, "luna typecheck failed in double osg::Timer::delta_n(unsigned long long t1, unsigned long long t2) const function, expected prototype:\ndouble osg::Timer::delta_n(unsigned long long t1, unsigned long long t2) const\nClass arguments details:\n"); } unsigned long long t1=(unsigned long long)lua_tointeger(L,2); unsigned long long t2=(unsigned long long)lua_tointeger(L,3); osg::Timer* self=(Luna< osg::Timer >::check(L,1)); if(!self) { luna_printStack(L); luaL_error(L, "Invalid object in function call double osg::Timer::delta_n(unsigned long long, unsigned long long) const"); } double lret = self->delta_n(t1, t2); lua_pushnumber(L,lret); return 1; } // double osg::Timer::getSecondsPerTick() const static int _bind_getSecondsPerTick(lua_State *L) { if (!_lg_typecheck_getSecondsPerTick(L)) { luna_printStack(L); luaL_error(L, "luna typecheck failed in double osg::Timer::getSecondsPerTick() const function, expected prototype:\ndouble osg::Timer::getSecondsPerTick() const\nClass arguments details:\n"); } osg::Timer* self=(Luna< osg::Timer >::check(L,1)); if(!self) { luna_printStack(L); luaL_error(L, "Invalid object in function call double osg::Timer::getSecondsPerTick() const"); } double lret = self->getSecondsPerTick(); lua_pushnumber(L,lret); return 1; } // static osg::Timer * osg::Timer::instance() static int _bind_instance(lua_State *L) { if (!_lg_typecheck_instance(L)) { luna_printStack(L); luaL_error(L, "luna typecheck failed in static osg::Timer * osg::Timer::instance() function, expected prototype:\nstatic osg::Timer * osg::Timer::instance()\nClass arguments details:\n"); } osg::Timer * lret = osg::Timer::instance(); if(!lret) return 0; // Do not write NULL pointers. Luna< osg::Timer >::push(L,lret,false); return 1; } // Operator binds: }; osg::Timer* LunaTraits< osg::Timer >::_bind_ctor(lua_State *L) { return luna_wrapper_osg_Timer::_bind_ctor(L); } void LunaTraits< osg::Timer >::_bind_dtor(osg::Timer* obj) { delete obj; } const char LunaTraits< osg::Timer >::className[] = "Timer"; const char LunaTraits< osg::Timer >::fullName[] = "osg::Timer"; const char LunaTraits< osg::Timer >::moduleName[] = "osg"; const char* LunaTraits< osg::Timer >::parents[] = {0}; const int LunaTraits< osg::Timer >::hash = 90586498; const int LunaTraits< osg::Timer >::uniqueIDs[] = {90586498,0}; luna_RegType LunaTraits< osg::Timer >::methods[] = { {"tick", &luna_wrapper_osg_Timer::_bind_tick}, {"setStartTick", &luna_wrapper_osg_Timer::_bind_setStartTick}, {"getStartTick", &luna_wrapper_osg_Timer::_bind_getStartTick}, {"time_s", &luna_wrapper_osg_Timer::_bind_time_s}, {"time_m", &luna_wrapper_osg_Timer::_bind_time_m}, {"time_u", &luna_wrapper_osg_Timer::_bind_time_u}, {"time_n", &luna_wrapper_osg_Timer::_bind_time_n}, {"delta_s", &luna_wrapper_osg_Timer::_bind_delta_s}, {"delta_m", &luna_wrapper_osg_Timer::_bind_delta_m}, {"delta_u", &luna_wrapper_osg_Timer::_bind_delta_u}, {"delta_n", &luna_wrapper_osg_Timer::_bind_delta_n}, {"getSecondsPerTick", &luna_wrapper_osg_Timer::_bind_getSecondsPerTick}, {"instance", &luna_wrapper_osg_Timer::_bind_instance}, {"dynCast", &luna_wrapper_osg_Timer::_bind_dynCast}, {0,0} }; luna_ConverterType LunaTraits< osg::Timer >::converters[] = { {0,0} }; luna_RegEnumType LunaTraits< osg::Timer >::enumValues[] = { {0,0} };
[ "roche.emmanuel@gmail.com" ]
roche.emmanuel@gmail.com
d4c0b76d79bb6423799c98724b87493d54cb1d00
4c39ed31fe1268302952bbe5c2cd456c8083281e
/SGU/297.cpp
91ae936b2c529e61cfac35b69e9c19f87b2385da
[]
no_license
Abhay4/Algorithm
37e3b8bd3c9990b896d862f1aa20ad8312f20e75
50b157e027c7f0c085a8a15929422e75851fafc4
refs/heads/master
2020-12-11T01:37:58.200719
2018-01-24T18:24:05
2018-01-24T18:24:05
38,934,843
0
0
null
2015-07-11T17:46:17
2015-07-11T17:46:17
null
UTF-8
C++
false
false
247
cpp
//ac #include <iostream> #include <cstdio> using namespace std; int main() { int n, m; cin >> n >> m; int sum = 0; for (int i = 0; i < m; ++i) { int a; cin >> a; sum += a; } sum %= n; cout << sum << endl; return 0; }
[ "wendai@wendai1026.redmond.corp.microsoft.com" ]
wendai@wendai1026.redmond.corp.microsoft.com
e7313e8ad5940bf97038451d7bf841bb92512dd2
8a83c68ec22341ef9a99ec5adb3c5150f0efd7a5
/examples/proxy/channels.hpp
3c0dac820dc795a2dd7adb6018664965291dc62c
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
apples/trellis
521c2aa2d5563d5c6ee62c48b64d8125a7f3d678
83f7a37e5098ba9133ebe0f5e8ecdfc0f4a63fbf
refs/heads/master
2023-02-26T08:59:50.158906
2021-01-25T11:01:48
2021-01-25T11:01:48
309,874,508
2
0
null
null
null
null
UTF-8
C++
false
false
216
hpp
#pragma once #include <trellis/trellis.hpp> using channel_numbers = trellis::channel_type_reliable_sequenced<struct numbers_t>; template <template <typename...> class T> using apply_channels = T<channel_numbers>;
[ "dbralir@gmail.com" ]
dbralir@gmail.com
f650e57d76d8fd1866c0164aa8a4ace4b18ad4eb
a137d0ccfcc428627b4d78b525e65f57688c2ae7
/src/main.cpp
75b0fa965bf697309c77f4b3324a5cff096e2e86
[]
no_license
terrywh/sfplayer
867cbd3a9ce1937b00b92d69495764761c6fbf40
5a28eb44a3406e49fb49b71d70d310a4d7028ccf
refs/heads/master
2023-03-16T05:36:10.729865
2021-03-03T14:08:33
2021-03-03T14:32:15
343,459,810
0
0
null
null
null
null
UTF-8
C++
false
false
307
cpp
#include "vendor.hpp" #include "application.h" #include <malloc.h> using buffer_t = wrapper<AVBufferRef, av_buffer_unref>; int main(int argc, char* argv[]) { mallopt(M_TRIM_THRESHOLD, 16 * 1024); std::unique_ptr<application> app = std::make_unique<application>(); app->run(); return 0; }
[ "terry.wuhao@gmail.com" ]
terry.wuhao@gmail.com
136472605ce77a7b946d2d703470a02923e42c08
44bb9d5b089fb3296958e8404c3eaec0acfe4082
/UVa/UVa_702_The_Vindictive_Coach.cpp
5fcca9017f946e53bbbd9e1a5ea66ecc9ff7e9a6
[]
no_license
wujysh/OJ_Code_Repositories
3a82aa685ffc238710d924657169d81a560bdea9
e4407421bb342d6b050950fc7e458fe8fd9b6ca5
refs/heads/master
2020-06-05T05:38:30.144070
2014-10-22T04:33:18
2014-10-22T04:33:18
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,073
cpp
#include <iostream> #include <cstring> using namespace std; const int MAXN = 30; long long dp[MAXN][MAXN][2]; int N, m; void init() { memset(dp, 0, sizeof(dp)); for (int k = 0; k < MAXN; k++) { for (int p = 0; p < 2; p++) { dp[0][k][p] = 1; } } } void work() { for (int n = 1; n < MAXN; n++) { // total number of colleagues for (int k = 0; k <= n; k++) { // current person for (int p = 0; p < 2; p++) { // low-high or high-low for (int i = 0; i < n; i++) { if (p == 0 && i >= k) continue; if (p == 1 && i < k) continue; dp[n][k][p] += dp[n-1][i][!p]; } } } } } void output() { if (N <= 2) { cout << 1 << endl; } else { if (m == 1) { cout << dp[N-2][1][0] << endl; } else { cout << dp[N-1][m-1][0] << endl; } } } int main() { init(); work(); while (cin >> N >> m) { output(); } return 0; }
[ "wujysh@gmail.com" ]
wujysh@gmail.com
6c2197cd1dff8427973e587ac61bdaddc7f6e590
d14b5d78b72711e4614808051c0364b7bd5d6d98
/third_party/llvm-16.0/llvm/include/llvm/CodeGen/MIRPrinter.h
45e30686b6426d05ee7417186e8a8f6023c709e5
[ "Apache-2.0" ]
permissive
google/swiftshader
76659addb1c12eb1477050fded1e7d067f2ed25b
5be49d4aef266ae6dcc95085e1e3011dad0e7eb7
refs/heads/master
2023-07-21T23:19:29.415159
2023-07-21T19:58:29
2023-07-21T20:50:19
62,297,898
1,981
306
Apache-2.0
2023-07-05T21:29:34
2016-06-30T09:25:24
C++
UTF-8
C++
false
false
1,760
h
//===- MIRPrinter.h - MIR serialization format printer ----------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file declares the functions that print out the LLVM IR and the machine // functions using the MIR serialization format. // //===----------------------------------------------------------------------===// #ifndef LLVM_CODEGEN_MIRPRINTER_H #define LLVM_CODEGEN_MIRPRINTER_H namespace llvm { class MachineBasicBlock; class MachineFunction; class Module; class raw_ostream; template <typename T> class SmallVectorImpl; /// Print LLVM IR using the MIR serialization format to the given output stream. void printMIR(raw_ostream &OS, const Module &M); /// Print a machine function using the MIR serialization format to the given /// output stream. void printMIR(raw_ostream &OS, const MachineFunction &MF); /// Determine a possible list of successors of a basic block based on the /// basic block machine operand being used inside the block. This should give /// you the correct list of successor blocks in most cases except for things /// like jump tables where the basic block references can't easily be found. /// The MIRPRinter will skip printing successors if they match the result of /// this funciton and the parser will use this function to construct a list if /// it is missing. void guessSuccessors(const MachineBasicBlock &MBB, SmallVectorImpl<MachineBasicBlock*> &Result, bool &IsFallthrough); } // end namespace llvm #endif
[ "swiftshader-scoped@luci-project-accounts.iam.gserviceaccount.com" ]
swiftshader-scoped@luci-project-accounts.iam.gserviceaccount.com
ba3cfb4891fefc04b182af94fbd016619af9500c
374295882c901ee5c6ced8d17ca2b578cd483dd4
/queue/intermediate/leetcode 994 rotten oranges.cpp
cad031a5e6c85fe9d6375279591e86d5d9d62284
[]
no_license
chinmay021/Interview-Preparation
232dba9d7d952fffa9475f8d8282f0edbf498726
c1b6f3e083025581f7157df887e1b87a9e153e98
refs/heads/master
2022-12-15T17:51:41.570297
2020-09-12T05:28:19
2020-09-12T05:28:19
279,581,708
0
0
null
null
null
null
UTF-8
C++
false
false
1,483
cpp
class Solution { public: int orangesRotting(vector<vector<int>> &grid) { int minTime = 0; int fresh = 0; queue<pair<int, int>> q; for (int i = 0; i < grid.size(); ++i) { for (int j = 0; j < grid[0].size(); ++j) { if (grid[i][j] == 2) { q.push({i, j}); } else if (grid[i][j] == 1) { fresh++; } } } vector<pair<int, int>> directions = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}}; while (!q.empty()) { int n = q.size(); bool rotten = false; for (int i = 0; i < n; ++i) { pair<int, int> curr = q.front(); q.pop(); for (auto direction : directions) { int i = curr.first + direction.first; int j = curr.second + direction.second; if (i >= 0 && i < grid.size() && j >= 0 && j < grid[0].size() && grid[i][j] == 1) { grid[i][j] = 2; q.push({i, j}); fresh--; rotten = true; } } } if (rotten) { minTime++; } } return fresh ? -1 : minTime; } };
[ "chinmaykumar021@gmail.com" ]
chinmaykumar021@gmail.com
5726148c01ca06ff6e1472ad8efd896ad8dfc8f3
d8a921546761f56e5d42406779ef5e3ad5e72863
/MCNode.h
afcc4d01c4f4facb93a2e347ba4dd6962206741d
[]
no_license
DerrickWanglf/Othello_MC
1800deb3523a5a955201d06fd18ae079155b3347
7a2e6ac3f8b703241e8c73eb8836a9168299b89c
refs/heads/master
2020-04-10T08:42:22.944971
2018-12-09T21:22:35
2018-12-09T21:22:35
160,912,293
2
0
null
null
null
null
UTF-8
C++
false
false
1,223
h
#pragma once #include<iostream> #include<math.h> #include<time.h> #include "constant.h" #include"board.h" class MCNode { public: MCNode(Board *othello); Board *othello; // current board int blackCount;//number of black int whiteCount;//number of white int UCT_v; int time_li; double visit_times; vector<MCNode*> children; MCNode *parent; MCNode* AIPlay(float n); MCNode* Play(int n); MCNode* Play(int x, int y); void BP(double val); void freetree(); //int fullexpanded; ~MCNode(); double getTimelimit(float n){ double base = n/2; double childrenfactor; double processfactor; int csize = children.size(); if(csize == 1) return 0; if (csize > 10) csize = 10; childrenfactor = csize / 2.0; int count = blackCount + whiteCount; if (count < 32) processfactor = 0; else { processfactor = (32.0 - count) / 32.0 * 15.0; } double res = base + childrenfactor + processfactor; if(res > 55) res = 55; if(res > n) res = n; return n; } int Policy(); int DefaultPolicy(); int Search(); };
[ "derrick.wanglf@gmail.com" ]
derrick.wanglf@gmail.com
a8015286a3647a59698d1225f4f30b8172763b7d
c8dbc0ef5b4efdcd54ef90b7eba5964a38afb009
/user.h
d1e1d13554ca79fccf809e4e35962e82c14565bc
[]
no_license
diomemilk/gestion-de-note
eb9dd4d11bc1681cff80e5fadd806573f9ee44b5
9a20b380f0d213cc5e23e1f72b387a77824e5510
refs/heads/main
2023-06-05T05:10:06.999637
2021-07-01T08:35:25
2021-07-01T08:35:25
369,332,773
0
0
null
null
null
null
UTF-8
C++
false
false
1,957
h
#ifndef USER_H #define USER_H #include <QString> enum TypeUser { ADMINISTRATEUR, FORMATEUR, ETUDIANT, RESPONSABLE }; class User { private: uint identifiant; QString nom; QString prenom; QString login; QString password; QString type; QString dates_Naiss; QString Tel; QString Sexe; QString Lieu_Nais; uint Numero_CNI; QString Matricule; public: User(); User(uint, QString, QString, QString, QString,QString,QString,QString,QString,uint,QString); User(QString, QString, QString, QString,QString, QString, QString, QString,uint,QString); uint getIdentifiant() { return identifiant; } QString getNom() { return nom; } QString getPrenom() { return prenom; } QString getLogin() { return login; } QString getPassword() { return password; } QString getType() { return type; } QString getDates_Naiss() { return dates_Naiss; } QString getTel() { return Tel; } QString getSexe() { return Sexe; } QString getLieu_Nais() { return Lieu_Nais; } uint getNumero_CNI() { return Numero_CNI; } QString getMatricule() { return Matricule; } void setIdentifiant(uint identifiant) { this->identifiant = identifiant; } void setNom(QString nom) { this->nom = nom; } void setPrenom(QString prenom) { this->prenom = prenom; } void setLogin(QString login) { this->login = login; } void setPassword(QString password) { this->password = password; } void setType(QString type) { this->type = type; } void setDates_Naiss(QString dates_Naiss) { this->dates_Naiss = dates_Naiss; } void setTel(QString Tel) { this->Tel = Tel; } void setSexe(QString Sexe) { this->Sexe = Sexe; } void setLieu_Nais(QString Lieu_Nais) { this->Lieu_Nais = Lieu_Nais; } void setMatricule(QString Matricule) { this->Matricule = Matricule; } void setNumero_CNI(uint Numero_CNI) { this->Numero_CNI = Numero_CNI; } }; #endif // USER_H
[ "ahmedhaidda95@gmail.com" ]
ahmedhaidda95@gmail.com
41bc7121e8cedc20d0620fab88ac555a5e761900
b5da36479947b153081790e6e7b224773a85a657
/CheckTemplate/SAM_TIOJ1306.cpp
0716dec29c93c60dd0b5789c75a6896cec80fe48
[]
no_license
NCTU-Kemono/CodeBook
d92db75f36343d8ec53c9012a7a55143566f7646
2d1ed621cd2086baeafc024e43591ef99ed4321c
refs/heads/master
2021-06-27T15:34:09.765291
2019-05-04T07:36:17
2019-05-04T07:36:17
137,721,707
0
0
null
null
null
null
UTF-8
C++
false
false
1,729
cpp
#include <bits/stdc++.h> using namespace std; const int SIGMA = 26; struct SAM { struct Node { Node *f, *ch[SIGMA]; int len; Node(int _len) { len = _len; f = 0; memset(ch, 0, sizeof(ch)); } }*rt, *la; char *s; inline int idx(char c) { return c - 'a'; } SAM(char *_s) { s = _s; rt = la = new Node(0); for (int i = 0 ; s[i] ; i++) extend(idx(s[i])); } ~SAM() { Node *u = rt; int i = 0; while (u) { Node *next = u->ch[idx(s[i++])]; delete u; u = next; } } void extend(int c) { Node *u = la; la = new Node(la->len + 1); for (; u && !u->ch[c] ; u = u->f) u->ch[c] = la; if (!u) la->f = rt; else { Node *pf = u->ch[c]; if (pf->len == u->len + 1) la->f = pf; else { Node *cn = new Node(u->len + 1); for (; u && u->ch[c] == pf; u = u->f) u->ch[c] = cn; for (int i = 0 ; i < SIGMA ; i++) cn->ch[i] = pf->ch[i]; cn->f = pf->f; pf->f = la->f = cn; } } } int search(char *s) { Node *u = rt; int ans = 0; for (int i = 0 ; s[i] ; i++) { u = u->ch[idx(s[i])]; if (u == rt) ans++; if (!u) return 0; } return ans; } }; const int MAXLEN = 1e4 + 5; int main() { int t; cin >> t; while (t--) { char s[MAXLEN]; cin >> s; SAM *sol = new SAM(s); int m; cin >> m; while (m--) { char target[MAXLEN]; cin >> target; cout << sol->search(target) << '\n'; } delete sol; } }
[ "yangzd0814@linux1.cs.nctu.edu.tw" ]
yangzd0814@linux1.cs.nctu.edu.tw
56f4839dac20041bffe333ea9a6ac2e9bb3cb072
8fe31ad60626b9bcd9ce2917c8458e8fdec0f1e8
/tensorflow/core/kernels/data/experimental/fastflow_offloading_fetch_op.cc
6c8b67e52d80be7373e812fe8a191bf1bdd72aa2
[ "CC-BY-4.0", "MIT", "Apache-2.0", "BSD-2-Clause" ]
permissive
SamsungLabs/fastflow-tensorflow
77736a2af75123cd7244ee38abdf05bfcaa6b4f8
8dc4caf647dc2df3c9fbe6c15bc7377baa8db1d6
refs/heads/main
2023-05-23T17:41:06.184676
2022-11-15T09:23:08
2022-11-15T09:23:08
565,690,266
4
3
CC-BY-4.0
2023-04-07T10:54:26
2022-11-14T05:36:08
C++
UTF-8
C++
false
false
57,491
cc
/* * Copyright 2022 Samsung Electronics Co., Ltd. All Rights Reserved * Copied from data_service_dataset_ops.cc */ /* Copyright 2020 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #include "tensorflow/core/kernels/data/experimental/fastflow_offloading_fetch_op.h" #include <algorithm> #include <limits> #include <map> #include <memory> #include <queue> #include <string> #include <vector> #include "absl/algorithm/container.h" #include "absl/container/flat_hash_map.h" #include "absl/container/flat_hash_set.h" #include "absl/strings/ascii.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/strings/substitute.h" #include "tensorflow/core/data/dataset.pb.h" #include "tensorflow/core/data/dataset_utils.h" #include "tensorflow/core/data/name_utils.h" #include "tensorflow/core/data/serialization_utils.h" #include "tensorflow/core/data/service/common.h" #include "tensorflow/core/data/service/common.pb.h" #include "tensorflow/core/data/service/dispatcher.pb.h" #include "tensorflow/core/data/service/dispatcher_client.h" #include "tensorflow/core/data/service/grpc_util.h" #include "tensorflow/core/data/service/worker.pb.h" #include "tensorflow/core/data/service/worker_client.h" #include "tensorflow/core/data/service/worker_impl.h" #include "tensorflow/core/distributed_runtime/rpc/grpc_util.h" #include "tensorflow/core/framework/dataset.h" #include "tensorflow/core/framework/model.h" #include "tensorflow/core/framework/partial_tensor_shape.h" #include "tensorflow/core/framework/tensor.h" #include "tensorflow/core/framework/types.pb.h" #include "tensorflow/core/lib/core/errors.h" #include "tensorflow/core/lib/gtl/cleanup.h" #include "tensorflow/core/platform/errors.h" #include "tensorflow/core/platform/mutex.h" #include "tensorflow/core/platform/snappy.h" #include "tensorflow/core/platform/status.h" #include "tensorflow/core/platform/statusor.h" #include "tensorflow/core/platform/thread_annotations.h" #include "tensorflow/core/platform/types.h" #include "tensorflow/core/profiler/lib/traceme.h" #include "tensorflow/core/profiler/lib/traceme_encode.h" #include "tensorflow/core/protobuf/data_service.pb.h" #include "tensorflow/core/protobuf/error_codes.pb.h" namespace tensorflow { namespace data { /* static */ constexpr const char* const FastflowOffloadingFetchOp::kDatasetType; /* static */ constexpr const char* const FastflowOffloadingFetchOp::kDatasetId; /* static */ constexpr const char* const FastflowOffloadingFetchOp::kProcessingMode; /* static */ constexpr const char* const FastflowOffloadingFetchOp::kAddress; /* static */ constexpr const char* const FastflowOffloadingFetchOp::kProtocol; /* static */ constexpr const char* const FastflowOffloadingFetchOp::kDataTransferProtocol; /* static */ constexpr const char* const FastflowOffloadingFetchOp::kJobName; /* static */ constexpr const char* const FastflowOffloadingFetchOp::kConsumerIndex; /* static */ constexpr const char* const FastflowOffloadingFetchOp::kNumConsumers; /* static */ constexpr const char* const FastflowOffloadingFetchOp::kMaxOutstandingRequests; /* static */ constexpr const char* const FastflowOffloadingFetchOp::kTaskRefreshIntervalHintMs; /* static */ constexpr const char* const FastflowOffloadingFetchOp::kTargetWorkers; /* static */ constexpr const char* const FastflowOffloadingFetchOp::kPartialOffloadEnabled; /* static */ constexpr const char* const FastflowOffloadingFetchOp::kRatioLocal; /* static */ constexpr const char* const FastflowOffloadingFetchOp::kMaxBandwidthBps; /* static */ constexpr const char* const FastflowOffloadingFetchOp::kIterationCounter; /* static */ constexpr const char* const FastflowOffloadingFetchOp::kOutputTypes; /* static */ constexpr const char* const FastflowOffloadingFetchOp::kOutputShapes; namespace { // Default interval between task list refreshes. const int64_t kDefaultTaskRefreshIntervalMs = 1000; // 1 second. constexpr char kDataServiceDatasetV1[] = "FastflowOffloadingFetch"; constexpr char kDataServiceDatasetV2[] = "FastflowOffloadingFetchV2"; constexpr const char kParallelEpochs[] = "parallel_epochs"; constexpr const char kDistributedEpoch[] = "distributed_epoch"; // Same timeout used by the RegisterDatasetOp. constexpr absl::Duration kGetMetadataRetryTimeout = absl::Hours(1); bool IsColocatedTask(const TaskInfo& task) { return absl::c_any_of(task.worker_tags(), [](absl::string_view worker_tag) { return absl::AsciiStrToUpper(worker_tag) == kColocatedWorkerTag; }); } } // namespace // Dataset for reading data from the tf.data service non-deterministically. // // This dataset interleaves dataset elements produced by multiple tf.data // workers. We periodically query the dispatcher to determine which workers // to read from (in case workers are added or removed). class FastflowOffloadingFetchOp::Dataset : public DatasetBase { public: Dataset(OpKernelContext* ctx, int op_version, int64_t dataset_id, const ProcessingModeDef& processing_mode, const std::string& address, const std::string& protocol, const std::string& data_transfer_protocol, const std::string& job_name, absl::optional<int64_t> consumer_index, absl::optional<int64_t> num_consumers, int64_t max_outstanding_requests, int64_t task_refresh_interval_ms, const TargetWorkers target_workers, bool partial_offload_enabled, float ratio_local, int64_t max_bandwidth_bps, IterationCounter* iteration_counter, bool owns_resource, ResourceHandle iteration_counter_handle, const DataTypeVector& output_types, const std::vector<PartialTensorShape>& output_shapes) : DatasetBase(DatasetContext(ctx)), op_version_(op_version), dataset_id_(dataset_id), processing_mode_(processing_mode), address_(address), protocol_(protocol), data_transfer_protocol_(data_transfer_protocol), job_name_(job_name), is_coordinated_read_(consumer_index.has_value()), consumer_index_(consumer_index), num_consumers_(num_consumers), max_outstanding_requests_(max_outstanding_requests), task_refresh_interval_ms_(task_refresh_interval_ms), target_workers_(target_workers), partial_offload_enabled_(partial_offload_enabled), ratio_local_(ratio_local), max_bandwidth_bps_(max_bandwidth_bps), iteration_counter_(iteration_counter), owns_resource_(owns_resource), iteration_counter_handle_(iteration_counter_handle), resource_mgr_(ctx->resource_manager()), output_types_(output_types), output_shapes_(output_shapes) {} ~Dataset() override { iteration_counter_->Unref(); if (owns_resource_) { Status s = resource_mgr_->Delete<IterationCounter>( iteration_counter_handle_.container(), iteration_counter_handle_.name()); if (!s.ok()) { LOG(WARNING) << "Failed to delete iteration counter resource: " << s; } } } std::unique_ptr<IteratorBase> MakeIteratorInternal( const string& prefix) const override { return absl::make_unique<Iterator>( Iterator::Params{this, name_utils::IteratorPrefix(kDatasetType, prefix)}, iteration_counter_->GetAndIncrement()); } const DataTypeVector& output_dtypes() const override { return output_types_; } const std::vector<PartialTensorShape>& output_shapes() const override { return output_shapes_; } string DebugString() const override { return name_utils::DatasetDebugString(kDatasetType); } int64_t Cardinality() const override { if (is_coordinated_read_) { // Coordinated reads require the dataset to be infinite. return kInfiniteCardinality; } return kUnknownCardinality; } Status CheckExternalState() const override { return Status( error::FAILED_PRECONDITION, strings::StrCat(DebugString(), " does not yet support serialization.")); } Status InputDatasets(std::vector<const DatasetBase*>* inputs) const override { inputs->clear(); return Status::OK(); } protected: Status AsGraphDefInternal(SerializationContext* ctx, DatasetGraphDefBuilder* b, Node** output) const override { std::vector<Node*> inputs; Node* dataset_id; TF_RETURN_IF_ERROR(b->AddScalar(dataset_id_, &dataset_id)); inputs.push_back(dataset_id); Node* processing_mode; tstring processing_mode_str = processing_mode_.SerializeAsString(); TF_RETURN_IF_ERROR(b->AddScalar(processing_mode_str, &processing_mode)); inputs.push_back(processing_mode); Node* address; TF_RETURN_IF_ERROR(b->AddScalar(address_, &address)); inputs.push_back(address); Node* protocol; TF_RETURN_IF_ERROR(b->AddScalar(protocol_, &protocol)); inputs.push_back(protocol); AttrValue data_transfer_protocol; b->BuildAttrValue(data_transfer_protocol_, &data_transfer_protocol); Node* job_name; TF_RETURN_IF_ERROR(b->AddScalar(job_name_, &job_name)); inputs.push_back(job_name); if (op_version_ == 2) { Node* consumer_index; TF_RETURN_IF_ERROR( b->AddScalar(consumer_index_.value_or(-1), &consumer_index)); inputs.push_back(consumer_index); Node* num_consumers; TF_RETURN_IF_ERROR( b->AddScalar(num_consumers_.value_or(-1), &num_consumers)); inputs.push_back(num_consumers); } Node* max_outstanding_requests; TF_RETURN_IF_ERROR( b->AddScalar(max_outstanding_requests_, &max_outstanding_requests)); inputs.push_back(max_outstanding_requests); Node* iteration_counter_handle = nullptr; Tensor handle(DT_RESOURCE, TensorShape({})); handle.scalar<ResourceHandle>()() = iteration_counter_handle_; TF_RETURN_IF_ERROR(b->AddTensor(handle, &iteration_counter_handle)); inputs.push_back(iteration_counter_handle); Node* max_bandwidth_bps; TF_RETURN_IF_ERROR( b->AddScalar(max_bandwidth_bps_, &max_bandwidth_bps)); inputs.push_back(max_bandwidth_bps); AttrValue partial_offload_enabled; b->BuildAttrValue(partial_offload_enabled_, &partial_offload_enabled); AttrValue ratio_local; b->BuildAttrValue(ratio_local_, &ratio_local); AttrValue task_refresh_interval_hint_ms; b->BuildAttrValue(task_refresh_interval_ms_, &task_refresh_interval_hint_ms); AttrValue target_workers; b->BuildAttrValue(TargetWorkersToString(target_workers_), &target_workers); TF_RETURN_IF_ERROR(b->AddDataset( this, inputs, {std::make_pair(kTaskRefreshIntervalHintMs, task_refresh_interval_hint_ms), std::make_pair(kDataTransferProtocol, data_transfer_protocol), std::make_pair(kTargetWorkers, target_workers), std::make_pair(kPartialOffloadEnabled, partial_offload_enabled), std::make_pair(kRatioLocal, ratio_local)}, output)); return Status::OK(); } private: class Iterator : public DatasetIterator<Dataset> { public: explicit Iterator(const Params& params, int64_t iterator_index) : DatasetIterator<Dataset>(params), iterator_index_(iterator_index), max_outstanding_requests_(params.dataset->max_outstanding_requests_) { VLOG(0) << "New iterator created " << iterator_index << " for job " << job_client_id_; } ~Iterator() override { VLOG(0) << "Destroying data service dataset iterator " << iterator_index_ << " for job id " << job_client_id_; CancelThreads(); if (deregister_fn_) deregister_fn_(); task_thread_manager_.reset(); if (initialized_) { Status s = dispatcher_->ReleaseJobClient(job_client_id_); if (!s.ok()) { LOG(WARNING) << "Failed to release job client id: " << s; } } for (auto& worker_thread : worker_threads_) { worker_thread.reset(); } DeleteLocalWorkerTasks(); VLOG(1) << "Destroyed data service dataset iterator for job id " << job_client_id_; } Status Initialize(IteratorContext* ctx) override { TF_RETURN_IF_ERROR(ValidateDataset()); VLOG(0) << "Connecting to " << dataset()->address_ << " in FastFlowOffloadingFetch op"; TF_RETURN_IF_ERROR(RegisterCancellationCallback( ctx->cancellation_manager(), [this]() { CancelThreads(); }, &deregister_fn_)); dispatcher_ = absl::make_unique<DataServiceDispatcherClient>( dataset()->address_, dataset()->protocol_); int64_t deadline_micros = kint64max; absl::optional<JobKey> key; if (!dataset()->job_name_.empty()) { key.emplace(); key.value().set_job_name(std::string(dataset()->job_name_)); key.value().set_job_name_index(iterator_index_); } TF_RETURN_IF_ERROR(grpc_util::Retry( [&]() { return dispatcher_->GetOrCreateJob( dataset()->dataset_id_, dataset()->processing_mode_, key, dataset()->num_consumers_, dataset()->target_workers_, job_client_id_); }, /*description=*/ strings::StrCat("get or create job with dispatcher at ", dataset()->address_), deadline_micros)); initialized_ = true; return Status::OK(); } Status GetNextInternal(IteratorContext* ctx, std::vector<Tensor>* out_tensors, bool* end_of_sequence) override { VLOG(1) << "Calling GetNext in data service dataset's iterator" << iterator_index_ << " ;" << job_client_id_; mutex_lock l(mu_); EnsureThreadsStarted(ctx); Result result; do { while (!ResultReady() && !Finished() && !cancelled_ && status_.ok()) { VLOG(3) << "Blocking in GetNext: " << DebugString(); get_next_cv_.wait(l); } if (cancelled_) { if (exception_partial_offload_) { VLOG(3) << "Returning from GetNext due to inconsistency of partial offloading configuration"; return errors::FailedPrecondition("Failed to partially offload. Need both local and remote workers."); } VLOG(3) << "Returning from GetNext due to cancellation"; return errors::Cancelled("Data service iterator was cancelled"); } if (!status_.ok()) { VLOG(3) << "Returning from GetNext with error " << status_; return status_; } if (results_.empty()) { *end_of_sequence = true; VLOG(3) << "Returning from GetNext with end_of_sequence"; return Status::OK(); } result = PopNextResult(); worker_thread_cv_.notify_one(); } while (result.skip); *end_of_sequence = result.end_of_sequence; if (!*end_of_sequence) { VLOG(1) << "Returning the next element from data service dataset's " << "Iterator: task " << result.task_id << ", element " << result.element_index; if (StrictRoundRobin()) { VLOG(1) << "Consumer " << dataset()->consumer_index_.value() << ": Result " << get_next_index_++; } out_tensors->swap(result.element); } return Status::OK(); } protected: std::shared_ptr<model::Node> CreateNode( IteratorContext* ctx, model::Node::Args args) const override { return model::MakeKnownRatioNode(std::move(args), /*ratio=*/1); } Status SaveInternal(SerializationContext* ctx, IteratorStateWriter* writer) override { return errors::Unimplemented("SaveInternal is not yet supported"); } Status RestoreInternal(IteratorContext* ctx, IteratorStateReader* reader) override { return errors::Unimplemented("RestoreInternal is not yet supported"); } data::TraceMeMetadata GetTraceMeMetadata() const override { data::TraceMeMetadata result; int64_t num_tasks = -1; if (mu_.try_lock()) { num_tasks = tasks_.size() - finished_tasks_; mu_.unlock(); } result.push_back(std::make_pair( "num_tasks", num_tasks == -1 ? kTraceInfoUnavailable : strings::Printf("%lld", static_cast<long long>(num_tasks)))); result.push_back(std::make_pair("job_name", dataset()->job_name_)); result.push_back(std::make_pair( "max_outstanding_requests", strings::Printf("%lld", static_cast<long long>( dataset()->max_outstanding_requests_)))); return result; } private: struct Task { Task(const TaskInfo& info, std::unique_ptr<DataServiceWorkerClient> worker) : info(info), worker(std::move(worker)), is_local_task(LocalWorkers::Get(info.worker_address()) != nullptr) {} const TaskInfo info; // Client for fetching task elements from the tf.data service worker. const std::unique_ptr<DataServiceWorkerClient> worker; // The next round to read from the task. int64_t round = 0; int64_t num_get_result = 0; bool is_local_task; // Whether the task has been removed. The task will eventually be // deleted from `tasks_` on the next dispatcher heartbeat. bool removed = false; bool skipped_previous_round = false; // Indicates whether a worker thread is currently processing the task. bool in_use TF_GUARDED_BY(&Iterator::mu_) = false; // Indicates whether the worker has returned end_of_sequence for the task. bool end_of_sequence TF_GUARDED_BY(&Iterator::mu_) = false; }; struct Result { Result() = default; Result(Result&&) = default; Result& operator=(Result&&) = default; Result(const Result&) = delete; Result& operator=(const Result&) = delete; // Whether the result has been computed yet. GetNext needs to block // until the next result is ready. bool ready TF_GUARDED_BY(&Iterator::mu_) = false; std::vector<Tensor> element TF_GUARDED_BY(&Iterator::mu_); // The element's index within the tf.data worker it came from. Used for // debugging. int64_t element_index TF_GUARDED_BY(&Iterator::mu_) = -1; // The id of the task that generated the result. int64_t task_id TF_GUARDED_BY(&Iterator::mu_) = -1; bool end_of_sequence TF_GUARDED_BY(&Iterator::mu_) = false; bool skip TF_GUARDED_BY(&Iterator::mu_) = false; }; Status ValidateDataset() const { if (dataset()->target_workers_ == TARGET_WORKERS_LOCAL && LocalWorkers::Empty()) { if (IsStaticShard(dataset()->processing_mode_)) { return errors::InvalidArgument( "Static sharding policy <", ProcessingModeDef::ShardingPolicy_Name( dataset()->processing_mode_.sharding_policy()), "> requires local tf.data workers, but no local worker is found. " "You need to run local tf.data service workers in your training " "workers. Static sharding also requires a fixed worker pool and " "a list of worker addresses in the DispatcherConfig. See the " "\"Processing Modes\" section in the module doc for details."); } return errors::InvalidArgument( "Local reads require local tf.data workers, but no local worker " "is found. You need to run local tf.data service workers in your " "training workers."); } if (dataset()->target_workers_ == TARGET_WORKERS_LOCAL && StrictRoundRobin()) { return errors::InvalidArgument( "Coordinated reads require non-local workers, but `target_workers` " "is \"LOCAL\"."); } if (IsStaticShard(dataset()->processing_mode_) && dataset()->target_workers_ != TARGET_WORKERS_LOCAL) { return errors::InvalidArgument( "Static sharding policy <", ProcessingModeDef::ShardingPolicy_Name( dataset()->processing_mode_.sharding_policy()), "> requires reading from local workers, but `target_workers` is ", TargetWorkersToString(dataset()->target_workers_), "."); } return Status::OK(); } // Returns whether the iterator has finished and should return. bool Finished() const TF_EXCLUSIVE_LOCKS_REQUIRED(mu_) { return num_running_worker_threads_ == 0 && !ShouldWaitForNext(); } // Returns whether the iterator has more data. bool ShouldWaitForNext() const TF_EXCLUSIVE_LOCKS_REQUIRED(mu_) { if (should_finish_job_) { return !job_finished_; } return tasks_.empty() || finished_tasks_ < tasks_.size(); } void EnsureThreadsStarted(IteratorContext* ctx) TF_EXCLUSIVE_LOCKS_REQUIRED(mu_) { if (!task_thread_manager_ && !cancelled_) { auto new_ctx = std::make_shared<IteratorContext>(*ctx); task_thread_manager_ = ctx->StartThread("task-thread-manager", [this, new_ctx]() { TaskThreadManager(new_ctx); }); } } void CancelThreads() TF_LOCKS_EXCLUDED(mu_) { mutex_lock l(mu_); for (const auto& task : tasks_) { task->worker->TryCancel(); } VLOG(0) << "Cancel threads iterator " << iterator_index_ << " for job " << job_client_id_; cancelled_ = true; worker_thread_cv_.notify_all(); manager_thread_cv_.notify_all(); get_next_cv_.notify_all(); } void DeleteLocalWorkerTasks() { std::vector<std::shared_ptr<Task>> tasks; { mutex_lock l(mu_); tasks = tasks_; } for (const std::shared_ptr<Task>& task : tasks) { std::shared_ptr<DataServiceWorkerImpl> worker = LocalWorkers::Get(task->info.worker_address()); if (worker && ShouldDeleteLocalTask(task->info)) { worker->DeleteLocalTask(task->info); } } } // Deletes the task if it is only read by the local client. bool ShouldDeleteLocalTask(const TaskInfo& task) const { if (StrictRoundRobin()) { return false; } if (dataset()->target_workers_ == TARGET_WORKERS_LOCAL) { return true; } return dataset()->target_workers_ == TARGET_WORKERS_AUTO && IsColocatedTask(task); } // Periodically refresh the task list. // Maintain one thread fetching elements for each task. // TODO(aaudibert): Instead of polling, have dispatcher send updates when // the list of tasks changes. void TaskThreadManager(std::shared_ptr<IteratorContext> ctx) { auto cleanup = gtl::MakeCleanup([] { VLOG(1) << "Task thread manager exiting"; }); VLOG(0) << "Starting FastFlowOp task thread manager"; uint64 next_check = Env::Default()->NowMicros(); while (true) { { mutex_lock l(mu_); // All units are microseconds. while (!cancelled_ && Env::Default()->NowMicros() < next_check) { int64_t remaining_time = next_check - Env::Default()->NowMicros(); VLOG(4) << "Task thread manager waiting for " << remaining_time << "us"; manager_thread_cv_.wait_for( l, std::chrono::microseconds(remaining_time)); } if (cancelled_) { VLOG(0) << "Task thread manager finished"; VLOG(0) << "Finished.. task size " << tasks_.size() << " finished_tasks: " << finished_tasks_ << " num_local_request: " << local_get_request << " num_remote_request: " << remote_get_request << " outstanding: " << outstanding_requests_ << " results: " << results_.size(); return; } } Heartbeat(); if (exception_partial_offload_) { CancelThreads(); } UpdateBufferSize(); UpdateWorkerThreads(ctx.get()); next_check = Env::Default()->NowMicros() + dataset()->task_refresh_interval_ms_ * 1000; } } void TryBlockRound(int64_t round) TF_EXCLUSIVE_LOCKS_REQUIRED(mu_) { if (round_robin_round_limit_.has_value() && round_robin_round_limit_.value() == round) { return; } if (current_round_ >= round) { // In the next heartbeat, notify the dispatcher that we failed to add // the task. VLOG(1) << "Rejecting request to block round " << round << ", because processing has already begun for round " << current_round_; return; } VLOG(1) << "Accepting request to block round " << round; round_robin_round_limit_ = round; } void UpdateJobFinished(bool job_finished) TF_EXCLUSIVE_LOCKS_REQUIRED(mu_) { if (!job_finished) { return; } job_finished_ = true; get_next_cv_.notify_all(); worker_thread_cv_.notify_all(); } Status AddTask(const TaskInfo& task_info) TF_EXCLUSIVE_LOCKS_REQUIRED(mu_) { TF_ASSIGN_OR_RETURN( std::unique_ptr<DataServiceWorkerClient> worker, CreateDataServiceWorkerClient(task_info.transfer_address(), dataset()->protocol_, dataset()->data_transfer_protocol_, dataset()->max_bandwidth_bps_)); auto task = std::make_shared<Task>(task_info, std::move(worker)); tasks_.push_back(task); if (tasks_.back()->is_local_task) { local_tasks_.push_back(task); if (!cnt_local_tasks) { local_task_created_ = true; } cnt_local_tasks++; } else { remote_tasks_.push_back(task); if (!cnt_remote_tasks) { remote_task_created_ = true; } cnt_remote_tasks++; } worker_thread_cv_.notify_one(); if (StrictRoundRobin()) { VLOG(1) << "Consumer " << dataset()->consumer_index_.value() << " adding task " << task_info.task_id() << " to read from worker " << task_info.worker_address() << ". Task starting round: " << task_info.starting_round(); DCHECK_LE(current_round_, task_info.starting_round()); if (current_round_ == task_info.starting_round()) { DCHECK_EQ(next_task_index_, 0); } } return Status::OK(); } void Heartbeat() TF_LOCKS_EXCLUDED(mu_) { ClientHeartbeatRequest req; req.set_job_client_id(job_client_id_); if (StrictRoundRobin()) { mutex_lock l(mu_); req.set_current_round(current_round_); if (round_robin_round_limit_.has_value()) { req.set_blocked_round(round_robin_round_limit_.value()); } } ClientHeartbeatResponse resp; Status s = dispatcher_->ClientHeartbeat(req, resp); if (!s.ok()) { if (errors::IsAborted(s) || errors::IsUnavailable(s) || errors::IsCancelled(s)) { LOG(WARNING) << "Failed to heartbeat to dispatcher from job client id " << job_client_id_ << ". Dispatcher address: " << dataset()->address_ << ". Error: " << s; return; } mutex_lock l(mu_); status_ = s; get_next_cv_.notify_all(); } mutex_lock l(mu_); UpdateJobFinished(resp.job_finished()); if (resp.optional_block_round_case() == ClientHeartbeatResponse::kBlockRound) { TryBlockRound(resp.block_round()); } else { round_robin_round_limit_ = absl::nullopt; worker_thread_cv_.notify_all(); } UpdateTasks(resp); if (dataset()->partial_offload_enabled_ && (!local_task_created_ || !remote_task_created_)) { exception_partial_offload_ = true; } } void RemoveTask(std::vector<std::shared_ptr<Task>>& tasks, std::shared_ptr<Task>& task) { int index = 0; while (index < tasks.size()) { std::shared_ptr<Task> t = tasks[index]; if (t->info.task_id() == task->info.task_id()) { tasks.erase(tasks.begin() + index); return; } else { ++index; } } } void UpdateTasks(const ClientHeartbeatResponse& resp) TF_EXCLUSIVE_LOCKS_REQUIRED(mu_) { absl::flat_hash_map<int64_t, TaskInfo> task_id_to_task; for (auto& task : resp.task_info()) { task_id_to_task[task.task_id()] = task; } if (job_finished_) { return; } int index = 0; while (index < tasks_.size()) { std::shared_ptr<Task> task = tasks_[index]; if (task_id_to_task.contains(task->info.task_id())) { // Remove already-known tasks from `task_id_to_task`, so that at the // end of the loop, only new tasks remain. task_id_to_task.erase(task->info.task_id()); ++index; } else { // Task has been removed. if (task->end_of_sequence) { finished_tasks_--; } // erase local or remote tasks if (task->is_local_task) { RemoveTask(local_tasks_, task); } else { RemoveTask(remote_tasks_, task); } tasks_.erase(tasks_.begin() + index); if (index < next_task_index_) { next_task_index_--; } if (!local_tasks_.empty() && next_local_task_index_ >= local_tasks_.size()) { AdvanceLocalTaskIndex(); } if (!remote_tasks_.empty() && next_remote_task_index_ >= remote_tasks_.size()) { AdvanceRemoteTaskIndex(); } if (!tasks_.empty() && next_task_index_ >= tasks_.size()) { AdvanceTaskIndex(); } } } for (auto& task : resp.task_info()) { auto it = task_id_to_task.find(task.task_id()); if (it == task_id_to_task.end()) { continue; } if (!ShouldReadFromTask(task)) { VLOG(3) << "Skipping untargeted worker task " << task.task_id(); should_finish_job_ = false; continue; } Status s = AddTask(it->second); if (!s.ok()) { status_ = s; get_next_cv_.notify_all(); break; } } } bool ShouldReadFromTask(const TaskInfo& task) const TF_EXCLUSIVE_LOCKS_REQUIRED(mu_) { if (StrictRoundRobin()) { return true; } const bool is_local_task = (LocalWorkers::Get(task.worker_address()) != nullptr); if (dataset()->target_workers_ == TARGET_WORKERS_LOCAL && !is_local_task) { return false; } // Cross-TF/TPU host reads may cause resource contention on the TF/TPU // hosts. tf.data service avoids reading from non-local TF-hosted workers. const bool is_cross_tf_host_read = !is_local_task && IsColocatedTask(task); if (dataset()->target_workers_ == TARGET_WORKERS_AUTO && is_cross_tf_host_read) { return false; } return true; } void UpdateBufferSize() TF_LOCKS_EXCLUDED(mu_) { if (dataset()->max_outstanding_requests_ == model::kAutotune) { // Adjust `max_outstanding_requests_` to account for newly added tasks. // `tasks_` includes the local tasks, so we subtract one from the // configured local task buffer size. mutex_lock l(mu_); int64_t max_outstanding_requests = tasks_.size(); if (max_outstanding_requests > max_outstanding_requests_) { worker_thread_cv_.notify_all(); } max_outstanding_requests_ = max_outstanding_requests; } } void UpdateWorkerThreads(IteratorContext* ctx) TF_LOCKS_EXCLUDED(mu_) { mutex_lock l(mu_); const int64_t max_num_threads = std::min<int64_t>(tasks_.size(), max_outstanding_requests_); while (num_running_worker_threads_ < max_num_threads && !cancelled_ && status_.ok()) { num_running_worker_threads_++; auto done = [this]() { mutex_lock l(mu_); num_running_worker_threads_--; get_next_cv_.notify_all(); }; worker_threads_.push_back(ctx->StartThread( "tf-data-service-task_thread", [this, done = std::move(done)]() { RunWorkerThread(std::move(done)); })); } } void RunWorkerThread(std::function<void()> done) { auto cleanup = gtl::MakeCleanup([done = std::move(done)]() { done(); VLOG(1) << "Worker thread exiting"; }); VLOG(1) << "Starting worker thread"; std::shared_ptr<Task> task_to_process; while (true) { Result* result; { mutex_lock l(mu_); if (task_to_process) { task_to_process->in_use = false; --outstanding_requests_; task_to_process = nullptr; worker_thread_cv_.notify_one(); } while (true) { if (cancelled_ || !ShouldWaitForNext()) { return; } task_to_process = GetTaskToProcess(); if (task_to_process) { VLOG(3) << "Selected a task to process: " << task_to_process->info.ShortDebugString(); break; } worker_thread_cv_.wait(l); } DCHECK(task_to_process != nullptr); task_to_process->in_use = true; ++outstanding_requests_; if (StrictRoundRobin()) { // Reserve a spot in the results_ queue. results_.emplace(); result = &results_.back(); } VLOG(3) << "Processing task " << task_to_process->info.task_id(); } int64_t deadline_micros = kint64max; Status s; if (StrictRoundRobin()) { s = GetElementTraced(task_to_process.get(), deadline_micros, /*enqueue_result=*/false, *result); } else { Result r; s = GetElementTraced(task_to_process.get(), deadline_micros, /*enqueue_result=*/true, r); } if (!s.ok()) { mutex_lock l(mu_); VLOG(1) << "Failed to get element from worker " << task_to_process->info.worker_address() << ": " << s; task_to_process->in_use = false; --outstanding_requests_; status_ = errors::CreateWithUpdatedMessage( s, absl::StrCat("Failed to get element from worker ", task_to_process->info.worker_address(), ": ", s.error_message())); get_next_cv_.notify_all(); return; } } } // Reports whether we can request another element without violating // `max_outstanding_requests_`. bool ShouldProcessTask() TF_EXCLUSIVE_LOCKS_REQUIRED(mu_) { // When doing round-robin reads, outstanding requests pre-allocate a // result in `results_`, so we only need to check the size of `results_`. if (StrictRoundRobin()) { return results_.size() < max_outstanding_requests_; } // Otherwise, results aren't added to `results_` until the data has been // successfully retrieved. We need to count requests already added to // `results_` as well as in-progress requests. return results_.size() + outstanding_requests_ < max_outstanding_requests_; } // Searches for a task to process, visiting tasks in-order and giving every // task a chance to proceed. std::shared_ptr<Task> GetTaskToProcess() TF_EXCLUSIVE_LOCKS_REQUIRED(mu_) { if (!ShouldProcessTask()) { return nullptr; } float ratio_local = dataset()->ratio_local_; bool is_local = (total_get_request * ratio_local > local_get_request || cnt_remote_tasks == 0) && cnt_local_tasks > 0; std::vector<std::shared_ptr<Task>>& tasks_select = is_local ? local_tasks_ : remote_tasks_; int64_t& task_index = is_local ? next_local_task_index_ : next_remote_task_index_; if (!(local_task_created_ && remote_task_created_)) { return nullptr; } for (int i = 0; i < tasks_select.size(); ++i) { std::shared_ptr<Task>& task = tasks_select[task_index]; if (StrictRoundRobin() && (task->in_use || current_round_ >= round_robin_round_limit_.value_or( std::numeric_limits<int64_t>::max()))) { VLOG(4) << "No round robin task found. in_use: " << task->in_use << ". current_round: " << current_round_ << ". round_robin_round_limit: " << round_robin_round_limit_.value_or(-1); return nullptr; } bool prevInUse = false; if (current_round_ < task->info.starting_round() || task->in_use || task->end_of_sequence || task->removed) { prevInUse = task->in_use; VLOG(1) << "Skipping task " << next_task_index_ << ". starting round: " << task->info.starting_round() << ". current round: " << current_round_ << ". task->in_use: " << task->in_use << ". task->islocal: " << task->is_local_task << ". end_of_sequence: " << task->end_of_sequence << ". task->removed: " << task->removed; if (is_local) { AdvanceLocalTaskIndex(); } else { AdvanceRemoteTaskIndex(); } continue; } int64_t &num_request = task->is_local_task ? local_get_request : remote_get_request; ++num_request; ++total_get_request; task->round = current_round_; if (is_local) { AdvanceLocalTaskIndex(); } else { AdvanceRemoteTaskIndex(); } return task; } return nullptr; } // Increments the next task index, starting over if all tasks have been // processed. void AdvanceTaskIndex() TF_EXCLUSIVE_LOCKS_REQUIRED(mu_) { next_task_index_++; if (next_task_index_ >= tasks_.size()) { current_round_++; next_task_index_ = 0; } } void AdvanceLocalTaskIndex() TF_EXCLUSIVE_LOCKS_REQUIRED(mu_) { next_local_task_index_++; if (next_local_task_index_ >= local_tasks_.size()) { next_local_task_index_ = 0; } } void AdvanceRemoteTaskIndex() TF_EXCLUSIVE_LOCKS_REQUIRED(mu_) { next_remote_task_index_++; if (next_remote_task_index_ >= remote_tasks_.size()) { next_remote_task_index_ = 0; } } Status TryGetElement(const Task& task, GetElementResult& result) { GetElementRequest req; req.set_task_id(task.info.task_id()); req.set_skipped_previous_round(task.skipped_previous_round); absl::optional<int64_t> round_index; if (StrictRoundRobin()) { round_index = task.round; req.set_consumer_index(dataset()->consumer_index_.value()); req.set_round_index(task.round); req.set_allow_skip(true); } return task.worker->GetElement(req, result); } void ProcessGetElementResponse(bool enqueue_result, GetElementResult& get_element_result, Result& result, Task& task) { mutex_lock l(mu_); result.ready = true; result.end_of_sequence = get_element_result.end_of_sequence; result.skip = get_element_result.skip; if (!get_element_result.end_of_sequence && !get_element_result.skip) { task.skipped_previous_round = false; result.element = std::move(get_element_result.components); result.element_index = get_element_result.element_index; result.task_id = task.info.task_id(); } else if (get_element_result.skip) { task.skipped_previous_round = true; } else { task.end_of_sequence = true; finished_tasks_++; if (task.is_local_task) { cnt_local_tasks--; } else { cnt_remote_tasks--; } } if (enqueue_result && !result.end_of_sequence) { results_.push(std::move(result)); } get_next_cv_.notify_all(); } Status GetElementTraced(Task* task, int64_t deadline_micros, bool enqueue_result, Result& result) TF_LOCKS_EXCLUDED(mu_) { VLOG(3) << "Getting an element for task id " << task->info.task_id(); tensorflow::profiler::TraceMe activity( "GetDataServiceElement", tensorflow::profiler::TraceMeLevel::kInfo); activity.AppendMetadata([&]() { return profiler::TraceMeEncode( {{"address", task->info.worker_address()}}); }); if (StrictRoundRobin()) { VLOG(3) << "Requesting element from consumer index " << dataset()->consumer_index_.value() << ", round " << task->round; activity.AppendMetadata([&]() { return profiler::TraceMeEncode( {{"consumer_index", dataset()->consumer_index_.value()}, {"round_index", task->round}}); }); } Status s = GetElement(task, deadline_micros, enqueue_result, result); mutex_lock l(mu_); VLOG(3) << "Got an element for task id " << task->info.task_id(); return s; } Status MaybeRemoveTask(Task& task, int64_t deadline_micros, Result& result) { bool removed; VLOG(1) << "Requesting task removal for worker " << task.info.worker_address() << " in round " << task.round; TF_RETURN_IF_ERROR(grpc_util::Retry( [&] { return dispatcher_->MaybeRemoveTask( task.info.task_id(), dataset()->consumer_index_.value(), task.round, removed); }, /*should_retry=*/ [&] { mutex_lock l(mu_); return !cancelled_; }, /*description=*/"request task removal ", deadline_micros)); if (removed) { mutex_lock l(mu_); task.removed = true; result.ready = true; result.skip = true; get_next_cv_.notify_all(); return Status::OK(); } VLOG(1) << "Failed to remove task for worker " << task.info.worker_address(); return Status::OK(); } Status GetElement(Task* task, int64_t deadline_micros, bool enqueue_result, Result& result) TF_LOCKS_EXCLUDED(mu_) { GetElementResult get_element_result; for (int num_retries = 0;; ++num_retries) { Status s = TryGetElement(*task, get_element_result); task->num_get_result += 1; if (s.ok()) break; // Retry all errors that could indicate preemption. if (!errors::IsUnavailable(s) && !errors::IsCancelled(s) && !errors::IsAborted(s)) { return s; } { mutex_lock l(mu_); if (cancelled_) { return errors::Cancelled("DataServiceDataset iterator cancelled"); } } int64_t now_micros = Env::Default()->NowMicros(); if (now_micros > deadline_micros) { return s; } if (StrictRoundRobin() && num_retries > 0) { TF_RETURN_IF_ERROR(MaybeRemoveTask(*task, deadline_micros, result)); mutex_lock l(mu_); if (result.skip) { return Status::OK(); } } int64_t backoff_until = std::min( deadline_micros, now_micros + ::tensorflow::ComputeBackoffMicroseconds(num_retries)); VLOG(1) << "Failed to get an element from worker " << task->info.worker_address() << ": " << s << ". Will retry in " << (backoff_until - now_micros) << " microseconds"; Env::Default()->SleepForMicroseconds(backoff_until - now_micros); } ProcessGetElementResponse(enqueue_result, get_element_result, result, *task); return Status::OK(); } bool ResultReady() const TF_EXCLUSIVE_LOCKS_REQUIRED(mu_) { return !results_.empty() && results_.front().ready; } Result PopNextResult() TF_EXCLUSIVE_LOCKS_REQUIRED(mu_) { Result result = std::move(results_.front()); results_.pop(); return result; } bool StrictRoundRobin() const { return dataset()->num_consumers_.has_value(); } std::string DebugString() const TF_EXCLUSIVE_LOCKS_REQUIRED(mu_) { return absl::Substitute( "results_ { size: $0 front.ready: $1 } job_finished_: $2 " "tasks { size: $3 } finished_tasks_: $4 " "num_running_worker_threads_: $5", results_.size(), !results_.empty() && results_.front().ready, job_finished_, tasks_.size(), finished_tasks_, num_running_worker_threads_); } const int64_t iterator_index_; mutable mutex mu_; condition_variable get_next_cv_ TF_GUARDED_BY(mu_); condition_variable worker_thread_cv_ TF_GUARDED_BY(mu_); condition_variable manager_thread_cv_ TF_GUARDED_BY(mu_); bool cancelled_ TF_GUARDED_BY(mu_) = false; // Method for deregistering the cancellation callback. std::function<void()> deregister_fn_; // Number of outstanding requests. int64_t outstanding_requests_ TF_GUARDED_BY(mu_) = 0; // max_outstanding_requests controls how many elements may be held in memory // at the same time. This count includes both in-progress requests for // elements as well as completed requests which haven't yet been produced. int64_t max_outstanding_requests_ TF_GUARDED_BY(mu_); // The number of threads in `worker_threads_` which are still running. int64_t num_running_worker_threads_ TF_GUARDED_BY(mu_) = 0; // The index of the next task in `tasks_` to read from. int64_t next_task_index_ TF_GUARDED_BY(mu_) = 0; int64_t next_local_task_index_ TF_GUARDED_BY(mu_) = 0; int64_t next_remote_task_index_ TF_GUARDED_BY(mu_) = 0; // The number tasks in the `tasks_` list that have reached end_of_sequence. int64_t finished_tasks_ TF_GUARDED_BY(mu_) = 0; // List of tasks to read from. std::vector<std::shared_ptr<Task>> tasks_ TF_GUARDED_BY(mu_); // List of remote tasks to read from. std::vector<std::shared_ptr<Task>> remote_tasks_ TF_GUARDED_BY(mu_); // Local tasks std::vector<std::shared_ptr<Task>> local_tasks_ TF_GUARDED_BY(mu_); // The current round robin round we are engaged in. A round involves reading // from each task once. int64_t current_round_ TF_GUARDED_BY(mu_) = 0; // The total number of data elements read from tasks. int64_t total_get_request TF_GUARDED_BY(mu_) = 0; // The number of data elements read from local tasks. int64_t local_get_request TF_GUARDED_BY(mu_) = 0; // The number of data elements read from remote tasks. int64_t remote_get_request TF_GUARDED_BY(mu_) = 0; // The number of local tasks int64_t cnt_local_tasks TF_GUARDED_BY(mu_) = 0; // The number of remote tasks int64_t cnt_remote_tasks TF_GUARDED_BY(mu_) = 0; // Whether at least one local task is created bool local_task_created_ TF_GUARDED_BY(mu_) = false; // Whether at least one remote task is created bool remote_task_created_ TF_GUARDED_BY(mu_) = false; // Exception indicating partial offload cannot start bool exception_partial_offload_ TF_GUARDED_BY(mu_) = false; // Maximum round robin round to read up to before blocking, not inclusive. // INVARIANT: current_round_ <= round_robin_round_limit_. // If current_round_ == round_robin_round_limit_, // next_task_index_ must be 0. absl::optional<int64_t> round_robin_round_limit_ TF_GUARDED_BY(mu_); // A status to be returned from the next call to `GetNext`. This is set by // asynchronous threads when they encounter errors. Status status_ TF_GUARDED_BY(mu_) = Status::OK(); // A queue of results for `GetElement` requests to read from. When doing // strict round robin reads, the queue will contain placeholder results with // their `Result::ready` field false until their data has been retrieved // from a worker. When not doing round-robin reads, results are only added // to the queue after they are ready, to avoid head-of-line blocking. std::queue<Result> results_ TF_GUARDED_BY(mu_); bool initialized_ = false; // Set once in Initialize(). int64_t job_client_id_; std::unique_ptr<DataServiceDispatcherClient> dispatcher_; int64_t get_next_index_ TF_GUARDED_BY(mu_) = 0; bool job_finished_ = false; bool should_finish_job_ TF_GUARDED_BY(mu_) = true; std::vector<std::unique_ptr<Thread>> worker_threads_ TF_GUARDED_BY(mu_); std::unique_ptr<Thread> task_thread_manager_ TF_GUARDED_BY(mu_); }; const int op_version_; const int64_t dataset_id_; const ProcessingModeDef processing_mode_; const tstring address_; const tstring protocol_; const tstring data_transfer_protocol_; const tstring job_name_; const bool is_coordinated_read_; const absl::optional<int64_t> consumer_index_; const absl::optional<int64_t> num_consumers_; const int64_t max_outstanding_requests_; const int64_t task_refresh_interval_ms_; const TargetWorkers target_workers_; const bool partial_offload_enabled_; const float ratio_local_; const int64_t max_bandwidth_bps_; IterationCounter* const iteration_counter_; // Owned const bool owns_resource_; const ResourceHandle iteration_counter_handle_; ResourceMgr* const resource_mgr_; // Not owned const DataTypeVector output_types_; const std::vector<PartialTensorShape> output_shapes_; }; FastflowOffloadingFetchOp::FastflowOffloadingFetchOp(OpKernelConstruction* ctx) : DatasetOpKernel(ctx) { OP_REQUIRES_OK(ctx, ctx->GetAttr(kTaskRefreshIntervalHintMs, &task_refresh_interval_hint_ms_)); if (task_refresh_interval_hint_ms_ == model::kAutotune) { task_refresh_interval_hint_ms_ = kDefaultTaskRefreshIntervalMs; } OP_REQUIRES_OK(ctx, ctx->GetAttr(kPartialOffloadEnabled, &partial_offload_enabled_)); OP_REQUIRES_OK(ctx, ctx->GetAttr(kRatioLocal, &ratio_local_)); OP_REQUIRES_OK(ctx, ctx->GetAttr(kOutputTypes, &output_types_)); OP_REQUIRES_OK(ctx, ctx->GetAttr(kOutputShapes, &output_shapes_)); if (ctx->HasAttr(kDataTransferProtocol)) { OP_REQUIRES_OK( ctx, ctx->GetAttr(kDataTransferProtocol, &data_transfer_protocol_)); } if (data_transfer_protocol_.empty()) { data_transfer_protocol_ = kGrpcTransferProtocol; } std::string target_workers_str = "AUTO"; if (ctx->HasAttr(kTargetWorkers)) { OP_REQUIRES_OK(ctx, ctx->GetAttr(kTargetWorkers, &target_workers_str)); } StatusOr<TargetWorkers> status_or_target_workers = ParseTargetWorkers(target_workers_str); OP_REQUIRES_OK(ctx, status_or_target_workers.status()); target_workers_ = *status_or_target_workers; auto& op_name = ctx->def().op(); if (op_name == kDataServiceDatasetV1) { op_version_ = 1; } else if (op_name == kDataServiceDatasetV2) { op_version_ = 2; } else { ctx->CtxFailure(errors::FailedPrecondition( "Unrecognized data service dataset op name: ", op_name)); return; } } void FastflowOffloadingFetchOp::MakeDataset(OpKernelContext* ctx, DatasetBase** output) { int64_t dataset_id; OP_REQUIRES_OK(ctx, ParseScalarArgument(ctx, kDatasetId, &dataset_id)); tstring processing_mode_str; OP_REQUIRES_OK( ctx, ParseScalarArgument(ctx, kProcessingMode, &processing_mode_str)); ProcessingModeDef processing_mode; if (processing_mode_str == kParallelEpochs) { processing_mode.set_sharding_policy(ProcessingModeDef::OFF); } else if (processing_mode_str == kDistributedEpoch) { processing_mode.set_sharding_policy(ProcessingModeDef::DYNAMIC); } else { OP_REQUIRES(ctx, processing_mode.ParseFromString(processing_mode_str), errors::InvalidArgument(absl::Substitute( "Failed to parse ProcessingModeDef from string: $0", std::string(processing_mode_str)))); } if (IsStaticShard(processing_mode) && target_workers_ == TARGET_WORKERS_AUTO) { VLOG(1) << "Using LOCAL target workers for static sharding mode: " << processing_mode.ShortDebugString(); target_workers_ = TARGET_WORKERS_LOCAL; } if (target_workers_ == TARGET_WORKERS_LOCAL) { data_transfer_protocol_ = kLocalTransferProtocol; } tstring address; OP_REQUIRES_OK(ctx, ParseScalarArgument(ctx, kAddress, &address)); OP_REQUIRES(ctx, !address.empty(), errors::InvalidArgument(kAddress, " must be non-empty.")); tstring protocol; OP_REQUIRES_OK(ctx, ParseScalarArgument(ctx, kProtocol, &protocol)); OP_REQUIRES(ctx, !protocol.empty(), errors::InvalidArgument(kProtocol, " must be non-empty.")); tstring job_name; OP_REQUIRES_OK(ctx, ParseScalarArgument(ctx, kJobName, &job_name)); absl::optional<int64_t> consumer_index; absl::optional<int64_t> num_consumers; if (op_version_ >= 2) { int64_t consumer_index_int; OP_REQUIRES_OK( ctx, ParseScalarArgument(ctx, kConsumerIndex, &consumer_index_int)); if (consumer_index_int >= 0) { consumer_index = consumer_index_int; } int64_t num_consumers_int; OP_REQUIRES_OK(ctx, ParseScalarArgument(ctx, kNumConsumers, &num_consumers_int)); if (num_consumers_int >= 0) { num_consumers = num_consumers_int; } } int64_t max_outstanding_requests; OP_REQUIRES_OK(ctx, ParseScalarArgument(ctx, kMaxOutstandingRequests, &max_outstanding_requests)); ResourceHandle iteration_counter_handle; OP_REQUIRES_OK( ctx, HandleFromInput(ctx, kIterationCounter, &iteration_counter_handle)); IterationCounter* iteration_counter = nullptr; Status s = ctx->resource_manager()->Lookup<IterationCounter>( iteration_counter_handle.container(), iteration_counter_handle.name(), &iteration_counter); bool owns_resource = false; if (errors::IsNotFound(s)) { owns_resource = true; static std::atomic<int64_t> resource_id_counter(0); const std::string& container = ctx->resource_manager()->default_container(); std::string name = strings::StrCat(ctx->op_kernel().name(), "/", kIterationCounter, "_", resource_id_counter.fetch_add(1)); OP_REQUIRES_OK(ctx, ctx->resource_manager()->LookupOrCreate<IterationCounter>( container, name, &iteration_counter, [](IterationCounter** counter) { *counter = new IterationCounter(); return Status::OK(); })); iteration_counter_handle = MakeResourceHandle<IterationCounter>(ctx, container, name); } else { OP_REQUIRES_OK(ctx, s); } int64_t max_bandwidth_bps; OP_REQUIRES_OK(ctx, ParseScalarArgument(ctx, kMaxBandwidthBps, &max_bandwidth_bps)); OP_REQUIRES( ctx, max_outstanding_requests == model::kAutotune || max_outstanding_requests > 0, errors::InvalidArgument(kMaxOutstandingRequests, " must be positive or ", model::kAutotune)); *output = new Dataset( ctx, op_version_, dataset_id, processing_mode, address, protocol, data_transfer_protocol_, job_name, consumer_index, num_consumers, max_outstanding_requests, task_refresh_interval_hint_ms_, target_workers_, partial_offload_enabled_, ratio_local_, max_bandwidth_bps, iteration_counter, owns_resource, iteration_counter_handle, output_types_, output_shapes_); } REGISTER_KERNEL_BUILDER(Name("FastflowOffloadingFetch").Device(DEVICE_CPU), FastflowOffloadingFetchOp); REGISTER_KERNEL_BUILDER(Name("FastflowOffloadingFetchV2").Device(DEVICE_CPU), FastflowOffloadingFetchOp); } // namespace data } // namespace tensorflow
[ "taegeon.um@samsung.com" ]
taegeon.um@samsung.com
338ea2220bb0f0edb2e80772a2b21854bea51cd8
5223a86aa0c2640d0191f4f76450ea710de145f0
/main.cpp
4c01e677bcf467b6c515e66751d9cf92bb35b823
[]
no_license
dupark3/LeetCode344ReverseString
cf9a492a636c497f475cb23bcdf24d53c26a74c1
86ca88772d813b871c27f32ce44491c2ed801868
refs/heads/master
2020-03-13T23:16:09.354497
2018-04-27T18:31:55
2018-04-27T18:31:55
131,332,045
0
0
null
null
null
null
UTF-8
C++
false
false
1,008
cpp
#include <algorithm> // reverse #include <cctype> // isalpha #include <iostream> #include <string> using namespace std; void reverseWords(string& line){ string::iterator left = line.begin(); string::iterator right; while (left != line.end()){ // ignore all leading non alpha while(!isalpha(*left) && left != line.end()) ++left; if (left == line.end()) break; // left points to the beginning of first word right = left + 1; // advance right iterator to the end of the word while(isalpha(*right) || *right == '-') ++right; // reverse elements using iterators reverse(left, right); // advance left to the end of previous word left = right; } } int main() { cout << "Input line to reverse all words: "; string line; getline(cin, line); reverseWords(line); cout << "All words reversed is : "; cout << line << endl; return 0; }
[ "dupark3@gmail.com" ]
dupark3@gmail.com
dcaf0e1168d69de2f9fb0de1e6c0f65dc1da77b0
37027d31595171b7fbdaeec33dab261719553001
/android/frameworks/av/media/libstagefright/MPEG4Extractor.cpp
a7fbd7f779aa7971fb7097bd25f4dd0875b77dfd
[ "Apache-2.0", "LicenseRef-scancode-unicode" ]
permissive
hqctfl/BPI-A20-Android-4.4
00aa341659dc0b3a07759e7808b0d5436b4810a1
8fe0d48d9ddc84b9821dc767f064edea403e1145
refs/heads/master
2022-06-02T15:10:33.870424
2018-06-25T03:06:04
2018-06-25T03:06:04
null
0
0
null
null
null
null
UTF-8
C++
false
false
117,295
cpp
/* * Copyright (C) 2009 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. */ //#define LOG_NDEBUG 0 #define LOG_TAG "MPEG4Extractor" #include <utils/Log.h> #include "include/MPEG4Extractor.h" #include "include/SampleTable.h" #include "include/ESDS.h" #include <ctype.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <media/stagefright/foundation/ABitReader.h> #include <media/stagefright/foundation/ABuffer.h> #include <media/stagefright/foundation/ADebug.h> #include <media/stagefright/foundation/AMessage.h> #include <media/stagefright/MediaBuffer.h> #include <media/stagefright/MediaBufferGroup.h> #include <media/stagefright/MediaDefs.h> #include <media/stagefright/MediaSource.h> #include <media/stagefright/MetaData.h> #include <utils/String8.h> namespace android { class MPEG4Source : public MediaSource { public: // Caller retains ownership of both "dataSource" and "sampleTable". MPEG4Source(const sp<MetaData> &format, const sp<DataSource> &dataSource, int32_t timeScale, const sp<SampleTable> &sampleTable, Vector<SidxEntry> &sidx, off64_t firstMoofOffset); virtual status_t start(MetaData *params = NULL); virtual status_t stop(); virtual sp<MetaData> getFormat(); virtual status_t read(MediaBuffer **buffer, const ReadOptions *options = NULL); virtual status_t fragmentedRead(MediaBuffer **buffer, const ReadOptions *options = NULL); protected: virtual ~MPEG4Source(); private: Mutex mLock; sp<MetaData> mFormat; sp<DataSource> mDataSource; int32_t mTimescale; sp<SampleTable> mSampleTable; uint32_t mCurrentSampleIndex; uint32_t mCurrentFragmentIndex; Vector<SidxEntry> &mSegments; off64_t mFirstMoofOffset; off64_t mCurrentMoofOffset; off64_t mNextMoofOffset; uint32_t mCurrentTime; int32_t mLastParsedTrackId; int32_t mTrackId; int32_t mCryptoMode; // passed in from extractor int32_t mDefaultIVSize; // passed in from extractor uint8_t mCryptoKey[16]; // passed in from extractor uint32_t mCurrentAuxInfoType; uint32_t mCurrentAuxInfoTypeParameter; int32_t mCurrentDefaultSampleInfoSize; uint32_t mCurrentSampleInfoCount; uint32_t mCurrentSampleInfoAllocSize; uint8_t* mCurrentSampleInfoSizes; uint32_t mCurrentSampleInfoOffsetCount; uint32_t mCurrentSampleInfoOffsetsAllocSize; uint64_t* mCurrentSampleInfoOffsets; bool mIsAVC; size_t mNALLengthSize; bool mStarted; MediaBufferGroup *mGroup; MediaBuffer *mBuffer; bool mWantsNALFragments; uint8_t *mSrcBuffer; size_t parseNALSize(const uint8_t *data) const; status_t parseChunk(off64_t *offset); status_t parseTrackFragmentHeader(off64_t offset, off64_t size); status_t parseTrackFragmentRun(off64_t offset, off64_t size); status_t parseSampleAuxiliaryInformationSizes(off64_t offset, off64_t size); status_t parseSampleAuxiliaryInformationOffsets(off64_t offset, off64_t size); struct TrackFragmentHeaderInfo { enum Flags { kBaseDataOffsetPresent = 0x01, kSampleDescriptionIndexPresent = 0x02, kDefaultSampleDurationPresent = 0x08, kDefaultSampleSizePresent = 0x10, kDefaultSampleFlagsPresent = 0x20, kDurationIsEmpty = 0x10000, }; uint32_t mTrackID; uint32_t mFlags; uint64_t mBaseDataOffset; uint32_t mSampleDescriptionIndex; uint32_t mDefaultSampleDuration; uint32_t mDefaultSampleSize; uint32_t mDefaultSampleFlags; uint64_t mDataOffset; }; TrackFragmentHeaderInfo mTrackFragmentHeaderInfo; struct Sample { off64_t offset; size_t size; uint32_t duration; uint8_t iv[16]; Vector<size_t> clearsizes; Vector<size_t> encryptedsizes; }; Vector<Sample> mCurrentSamples; MPEG4Source(const MPEG4Source &); MPEG4Source &operator=(const MPEG4Source &); }; // This custom data source wraps an existing one and satisfies requests // falling entirely within a cached range from the cache while forwarding // all remaining requests to the wrapped datasource. // This is used to cache the full sampletable metadata for a single track, // possibly wrapping multiple times to cover all tracks, i.e. // Each MPEG4DataSource caches the sampletable metadata for a single track. struct MPEG4DataSource : public DataSource { MPEG4DataSource(const sp<DataSource> &source); virtual status_t initCheck() const; virtual ssize_t readAt(off64_t offset, void *data, size_t size); virtual status_t getSize(off64_t *size); virtual uint32_t flags(); status_t setCachedRange(off64_t offset, size_t size); protected: virtual ~MPEG4DataSource(); private: Mutex mLock; sp<DataSource> mSource; off64_t mCachedOffset; size_t mCachedSize; uint8_t *mCache; void clearCache(); MPEG4DataSource(const MPEG4DataSource &); MPEG4DataSource &operator=(const MPEG4DataSource &); }; MPEG4DataSource::MPEG4DataSource(const sp<DataSource> &source) : mSource(source), mCachedOffset(0), mCachedSize(0), mCache(NULL) { } MPEG4DataSource::~MPEG4DataSource() { clearCache(); } void MPEG4DataSource::clearCache() { if (mCache) { free(mCache); mCache = NULL; } mCachedOffset = 0; mCachedSize = 0; } status_t MPEG4DataSource::initCheck() const { return mSource->initCheck(); } ssize_t MPEG4DataSource::readAt(off64_t offset, void *data, size_t size) { Mutex::Autolock autoLock(mLock); if (offset >= mCachedOffset && offset + size <= mCachedOffset + mCachedSize) { memcpy(data, &mCache[offset - mCachedOffset], size); return size; } return mSource->readAt(offset, data, size); } status_t MPEG4DataSource::getSize(off64_t *size) { return mSource->getSize(size); } uint32_t MPEG4DataSource::flags() { return mSource->flags(); } status_t MPEG4DataSource::setCachedRange(off64_t offset, size_t size) { Mutex::Autolock autoLock(mLock); clearCache(); mCache = (uint8_t *)malloc(size); if (mCache == NULL) { return -ENOMEM; } mCachedOffset = offset; mCachedSize = size; ssize_t err = mSource->readAt(mCachedOffset, mCache, mCachedSize); if (err < (ssize_t)size) { clearCache(); return ERROR_IO; } return OK; } //////////////////////////////////////////////////////////////////////////////// static void hexdump(const void *_data, size_t size) { const uint8_t *data = (const uint8_t *)_data; size_t offset = 0; while (offset < size) { printf("0x%04x ", offset); size_t n = size - offset; if (n > 16) { n = 16; } for (size_t i = 0; i < 16; ++i) { if (i == 8) { printf(" "); } if (offset + i < size) { printf("%02x ", data[offset + i]); } else { printf(" "); } } printf(" "); for (size_t i = 0; i < n; ++i) { if (isprint(data[offset + i])) { printf("%c", data[offset + i]); } else { printf("."); } } printf("\n"); offset += 16; } } static const char *FourCC2MIME(uint32_t fourcc) { switch (fourcc) { case FOURCC('m', 'p', '4', 'a'): return MEDIA_MIMETYPE_AUDIO_AAC; case FOURCC('s', 'a', 'm', 'r'): return MEDIA_MIMETYPE_AUDIO_AMR_NB; case FOURCC('s', 'a', 'w', 'b'): return MEDIA_MIMETYPE_AUDIO_AMR_WB; case FOURCC('m', 'p', '4', 'v'): return MEDIA_MIMETYPE_VIDEO_MPEG4; case FOURCC('s', '2', '6', '3'): case FOURCC('h', '2', '6', '3'): case FOURCC('H', '2', '6', '3'): return MEDIA_MIMETYPE_VIDEO_H263; case FOURCC('a', 'v', 'c', '1'): return MEDIA_MIMETYPE_VIDEO_AVC; default: CHECK(!"should not be here."); return NULL; } } static bool AdjustChannelsAndRate(uint32_t fourcc, uint32_t *channels, uint32_t *rate) { if (!strcasecmp(MEDIA_MIMETYPE_AUDIO_AMR_NB, FourCC2MIME(fourcc))) { // AMR NB audio is always mono, 8kHz *channels = 1; *rate = 8000; return true; } else if (!strcasecmp(MEDIA_MIMETYPE_AUDIO_AMR_WB, FourCC2MIME(fourcc))) { // AMR WB audio is always mono, 16kHz *channels = 1; *rate = 16000; return true; } return false; } MPEG4Extractor::MPEG4Extractor(const sp<DataSource> &source) : mSidxDuration(0), mMoofOffset(0), mDataSource(source), mInitCheck(NO_INIT), mHasVideo(false), mHeaderTimescale(0), mFirstTrack(NULL), mLastTrack(NULL), mFileMetaData(new MetaData), mFirstSINF(NULL), mIsDrm(false) { } MPEG4Extractor::~MPEG4Extractor() { Track *track = mFirstTrack; while (track) { Track *next = track->next; delete track; track = next; } mFirstTrack = mLastTrack = NULL; SINF *sinf = mFirstSINF; while (sinf) { SINF *next = sinf->next; delete sinf->IPMPData; delete sinf; sinf = next; } mFirstSINF = NULL; for (size_t i = 0; i < mPssh.size(); i++) { delete [] mPssh[i].data; } } uint32_t MPEG4Extractor::flags() const { return CAN_PAUSE | ((mMoofOffset == 0 || mSidxEntries.size() != 0) ? (CAN_SEEK_BACKWARD | CAN_SEEK_FORWARD | CAN_SEEK) : 0); } sp<MetaData> MPEG4Extractor::getMetaData() { status_t err; if ((err = readMetaData()) != OK) { return new MetaData; } return mFileMetaData; } size_t MPEG4Extractor::countTracks() { status_t err; if ((err = readMetaData()) != OK) { ALOGV("MPEG4Extractor::countTracks: no tracks"); return 0; } size_t n = 0; Track *track = mFirstTrack; while (track) { ++n; track = track->next; } ALOGV("MPEG4Extractor::countTracks: %d tracks", n); return n; } sp<MetaData> MPEG4Extractor::getTrackMetaData( size_t index, uint32_t flags) { status_t err; if ((err = readMetaData()) != OK) { return NULL; } Track *track = mFirstTrack; while (index > 0) { if (track == NULL) { return NULL; } track = track->next; --index; } if (track == NULL) { return NULL; } if ((flags & kIncludeExtensiveMetaData) && !track->includes_expensive_metadata) { track->includes_expensive_metadata = true; const char *mime; CHECK(track->meta->findCString(kKeyMIMEType, &mime)); if (!strncasecmp("video/", mime, 6)) { if (mMoofOffset > 0) { int64_t duration; if (track->meta->findInt64(kKeyDuration, &duration)) { // nothing fancy, just pick a frame near 1/4th of the duration track->meta->setInt64( kKeyThumbnailTime, duration / 4); } } else { uint32_t sampleIndex; uint64_t sampleTime; if (track->sampleTable->findThumbnailSample(&sampleIndex) == OK && track->sampleTable->getMetaDataForSample( sampleIndex, NULL /* offset */, NULL /* size */, &sampleTime) == OK) { track->meta->setInt64( kKeyThumbnailTime, ((int64_t)sampleTime * 1000000) / track->timescale); } } } } return track->meta; } static void MakeFourCCString(uint32_t x, char *s) { s[0] = x >> 24; s[1] = (x >> 16) & 0xff; s[2] = (x >> 8) & 0xff; s[3] = x & 0xff; s[4] = '\0'; } status_t MPEG4Extractor::readMetaData() { if (mInitCheck != NO_INIT) { return mInitCheck; } off64_t offset = 0; status_t err; while (true) { err = parseChunk(&offset, 0); if (err == OK) { continue; } uint32_t hdr[2]; if (mDataSource->readAt(offset, hdr, 8) < 8) { break; } uint32_t chunk_type = ntohl(hdr[1]); if (chunk_type == FOURCC('s', 'i', 'd', 'x')) { // parse the sidx box too continue; } else if (chunk_type == FOURCC('m', 'o', 'o', 'f')) { // store the offset of the first segment mMoofOffset = offset; } break; } if (mInitCheck == OK) { if (mHasVideo) { mFileMetaData->setCString( kKeyMIMEType, MEDIA_MIMETYPE_CONTAINER_MPEG4); } else { mFileMetaData->setCString(kKeyMIMEType, "audio/mp4"); } mInitCheck = OK; } else { mInitCheck = err; } CHECK_NE(err, (status_t)NO_INIT); // copy pssh data into file metadata int psshsize = 0; for (size_t i = 0; i < mPssh.size(); i++) { psshsize += 20 + mPssh[i].datalen; } if (psshsize) { char *buf = (char*)malloc(psshsize); char *ptr = buf; for (size_t i = 0; i < mPssh.size(); i++) { memcpy(ptr, mPssh[i].uuid, 20); // uuid + length memcpy(ptr + 20, mPssh[i].data, mPssh[i].datalen); ptr += (20 + mPssh[i].datalen); } mFileMetaData->setData(kKeyPssh, 'pssh', buf, psshsize); free(buf); } return mInitCheck; } char* MPEG4Extractor::getDrmTrackInfo(size_t trackID, int *len) { if (mFirstSINF == NULL) { return NULL; } SINF *sinf = mFirstSINF; while (sinf && (trackID != sinf->trackID)) { sinf = sinf->next; } if (sinf == NULL) { return NULL; } *len = sinf->len; return sinf->IPMPData; } // Reads an encoded integer 7 bits at a time until it encounters the high bit clear. static int32_t readSize(off64_t offset, const sp<DataSource> DataSource, uint8_t *numOfBytes) { uint32_t size = 0; uint8_t data; bool moreData = true; *numOfBytes = 0; while (moreData) { if (DataSource->readAt(offset, &data, 1) < 1) { return -1; } offset ++; moreData = (data >= 128) ? true : false; size = (size << 7) | (data & 0x7f); // Take last 7 bits (*numOfBytes) ++; } return size; } status_t MPEG4Extractor::parseDrmSINF(off64_t *offset, off64_t data_offset) { uint8_t updateIdTag; if (mDataSource->readAt(data_offset, &updateIdTag, 1) < 1) { return ERROR_IO; } data_offset ++; if (0x01/*OBJECT_DESCRIPTOR_UPDATE_ID_TAG*/ != updateIdTag) { return ERROR_MALFORMED; } uint8_t numOfBytes; int32_t size = readSize(data_offset, mDataSource, &numOfBytes); if (size < 0) { return ERROR_IO; } int32_t classSize = size; data_offset += numOfBytes; while(size >= 11 ) { uint8_t descriptorTag; if (mDataSource->readAt(data_offset, &descriptorTag, 1) < 1) { return ERROR_IO; } data_offset ++; if (0x11/*OBJECT_DESCRIPTOR_ID_TAG*/ != descriptorTag) { return ERROR_MALFORMED; } uint8_t buffer[8]; //ObjectDescriptorID and ObjectDescriptor url flag if (mDataSource->readAt(data_offset, buffer, 2) < 2) { return ERROR_IO; } data_offset += 2; if ((buffer[1] >> 5) & 0x0001) { //url flag is set return ERROR_MALFORMED; } if (mDataSource->readAt(data_offset, buffer, 8) < 8) { return ERROR_IO; } data_offset += 8; if ((0x0F/*ES_ID_REF_TAG*/ != buffer[1]) || ( 0x0A/*IPMP_DESCRIPTOR_POINTER_ID_TAG*/ != buffer[5])) { return ERROR_MALFORMED; } SINF *sinf = new SINF; sinf->trackID = U16_AT(&buffer[3]); sinf->IPMPDescriptorID = buffer[7]; sinf->next = mFirstSINF; mFirstSINF = sinf; size -= (8 + 2 + 1); } if (size != 0) { return ERROR_MALFORMED; } if (mDataSource->readAt(data_offset, &updateIdTag, 1) < 1) { return ERROR_IO; } data_offset ++; if(0x05/*IPMP_DESCRIPTOR_UPDATE_ID_TAG*/ != updateIdTag) { return ERROR_MALFORMED; } size = readSize(data_offset, mDataSource, &numOfBytes); if (size < 0) { return ERROR_IO; } classSize = size; data_offset += numOfBytes; while (size > 0) { uint8_t tag; int32_t dataLen; if (mDataSource->readAt(data_offset, &tag, 1) < 1) { return ERROR_IO; } data_offset ++; if (0x0B/*IPMP_DESCRIPTOR_ID_TAG*/ == tag) { uint8_t id; dataLen = readSize(data_offset, mDataSource, &numOfBytes); if (dataLen < 0) { return ERROR_IO; } else if (dataLen < 4) { return ERROR_MALFORMED; } data_offset += numOfBytes; if (mDataSource->readAt(data_offset, &id, 1) < 1) { return ERROR_IO; } data_offset ++; SINF *sinf = mFirstSINF; while (sinf && (sinf->IPMPDescriptorID != id)) { sinf = sinf->next; } if (sinf == NULL) { return ERROR_MALFORMED; } sinf->len = dataLen - 3; sinf->IPMPData = new char[sinf->len]; if (mDataSource->readAt(data_offset + 2, sinf->IPMPData, sinf->len) < sinf->len) { return ERROR_IO; } data_offset += sinf->len; size -= (dataLen + numOfBytes + 1); } } if (size != 0) { return ERROR_MALFORMED; } return UNKNOWN_ERROR; // Return a dummy error. } struct PathAdder { PathAdder(Vector<uint32_t> *path, uint32_t chunkType) : mPath(path) { mPath->push(chunkType); } ~PathAdder() { mPath->pop(); } private: Vector<uint32_t> *mPath; PathAdder(const PathAdder &); PathAdder &operator=(const PathAdder &); }; static bool underMetaDataPath(const Vector<uint32_t> &path) { return path.size() >= 5 && path[0] == FOURCC('m', 'o', 'o', 'v') && path[1] == FOURCC('u', 'd', 't', 'a') && path[2] == FOURCC('m', 'e', 't', 'a') && path[3] == FOURCC('i', 'l', 's', 't'); } // Given a time in seconds since Jan 1 1904, produce a human-readable string. static void convertTimeToDate(int64_t time_1904, String8 *s) { time_t time_1970 = time_1904 - (((66 * 365 + 17) * 24) * 3600); char tmp[32]; strftime(tmp, sizeof(tmp), "%Y%m%dT%H%M%S.000Z", gmtime(&time_1970)); s->setTo(tmp); } status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) { ALOGV("entering parseChunk %lld/%d", *offset, depth); uint32_t hdr[2]; if (mDataSource->readAt(*offset, hdr, 8) < 8) { return ERROR_IO; } uint64_t chunk_size = ntohl(hdr[0]); uint32_t chunk_type = ntohl(hdr[1]); off64_t data_offset = *offset + 8; if (chunk_size == 1) { if (mDataSource->readAt(*offset + 8, &chunk_size, 8) < 8) { return ERROR_IO; } chunk_size = ntoh64(chunk_size); data_offset += 8; if (chunk_size < 16) { // The smallest valid chunk is 16 bytes long in this case. return ERROR_MALFORMED; } } else if (chunk_size < 8) { // The smallest valid chunk is 8 bytes long. return ERROR_MALFORMED; } char chunk[5]; MakeFourCCString(chunk_type, chunk); ALOGV("chunk: %s @ %lld, %d", chunk, *offset, depth); #if 0 static const char kWhitespace[] = " "; const char *indent = &kWhitespace[sizeof(kWhitespace) - 1 - 2 * depth]; printf("%sfound chunk '%s' of size %lld\n", indent, chunk, chunk_size); char buffer[256]; size_t n = chunk_size; if (n > sizeof(buffer)) { n = sizeof(buffer); } if (mDataSource->readAt(*offset, buffer, n) < (ssize_t)n) { return ERROR_IO; } hexdump(buffer, n); #endif PathAdder autoAdder(&mPath, chunk_type); off64_t chunk_data_size = *offset + chunk_size - data_offset; if (chunk_type != FOURCC('c', 'p', 'r', 't') && chunk_type != FOURCC('c', 'o', 'v', 'r') && mPath.size() == 5 && underMetaDataPath(mPath)) { off64_t stop_offset = *offset + chunk_size; *offset = data_offset; while (*offset < stop_offset) { status_t err = parseChunk(offset, depth + 1); if (err != OK) { return err; } } if (*offset != stop_offset) { return ERROR_MALFORMED; } return OK; } switch(chunk_type) { case FOURCC('m', 'o', 'o', 'v'): case FOURCC('t', 'r', 'a', 'k'): case FOURCC('m', 'd', 'i', 'a'): case FOURCC('m', 'i', 'n', 'f'): case FOURCC('d', 'i', 'n', 'f'): case FOURCC('s', 't', 'b', 'l'): case FOURCC('m', 'v', 'e', 'x'): case FOURCC('m', 'o', 'o', 'f'): case FOURCC('t', 'r', 'a', 'f'): case FOURCC('m', 'f', 'r', 'a'): case FOURCC('u', 'd', 't', 'a'): case FOURCC('i', 'l', 's', 't'): case FOURCC('s', 'i', 'n', 'f'): case FOURCC('s', 'c', 'h', 'i'): case FOURCC('e', 'd', 't', 's'): { if (chunk_type == FOURCC('s', 't', 'b', 'l')) { ALOGV("sampleTable chunk is %d bytes long.", (size_t)chunk_size); if (mDataSource->flags() & (DataSource::kWantsPrefetching | DataSource::kIsCachingDataSource)) { sp<MPEG4DataSource> cachedSource = new MPEG4DataSource(mDataSource); if (cachedSource->setCachedRange(*offset, chunk_size) == OK) { mDataSource = cachedSource; } } mLastTrack->sampleTable = new SampleTable(mDataSource); } bool isTrack = false; if (chunk_type == FOURCC('t', 'r', 'a', 'k')) { isTrack = true; Track *track = new Track; track->next = NULL; if (mLastTrack) { mLastTrack->next = track; } else { mFirstTrack = track; } mLastTrack = track; track->meta = new MetaData; track->includes_expensive_metadata = false; track->skipTrack = false; track->timescale = 0; track->meta->setCString(kKeyMIMEType, "application/octet-stream"); } off64_t stop_offset = *offset + chunk_size; *offset = data_offset; while (*offset < stop_offset) { ALOGV("*offset=0x%llx, stop_offset=0x%llx", *offset, stop_offset); if (*offset < stop_offset-8) { status_t err = parseChunk(offset, depth + 1); if (err != OK) { return err; } }else { *offset = stop_offset; } } if (*offset != stop_offset) { return ERROR_MALFORMED; } if (isTrack) { if (mLastTrack->skipTrack) { Track *cur = mFirstTrack; if (cur == mLastTrack) { delete cur; mFirstTrack = mLastTrack = NULL; } else { while (cur && cur->next != mLastTrack) { cur = cur->next; } cur->next = NULL; delete mLastTrack; mLastTrack = cur; } return OK; } status_t err = verifyTrack(mLastTrack); if (err != OK) { return err; } } else if (chunk_type == FOURCC('m', 'o', 'o', 'v')) { mInitCheck = OK; if (!mIsDrm) { return UNKNOWN_ERROR; // Return a dummy error. } else { return OK; } } break; } case FOURCC('e', 'l', 's', 't'): { // See 14496-12 8.6.6 uint8_t version; if (mDataSource->readAt(data_offset, &version, 1) < 1) { return ERROR_IO; } uint32_t entry_count; if (!mDataSource->getUInt32(data_offset + 4, &entry_count)) { return ERROR_IO; } if (entry_count != 1) { // we only support a single entry at the moment, for gapless playback ALOGW("ignoring edit list with %d entries", entry_count); } else if (mHeaderTimescale == 0) { ALOGW("ignoring edit list because timescale is 0"); } else { off64_t entriesoffset = data_offset + 8; uint64_t segment_duration; int64_t media_time; if (version == 1) { if (!mDataSource->getUInt64(entriesoffset, &segment_duration) || !mDataSource->getUInt64(entriesoffset + 8, (uint64_t*)&media_time)) { return ERROR_IO; } } else if (version == 0) { uint32_t sd; int32_t mt; if (!mDataSource->getUInt32(entriesoffset, &sd) || !mDataSource->getUInt32(entriesoffset + 4, (uint32_t*)&mt)) { return ERROR_IO; } segment_duration = sd; media_time = mt; } else { return ERROR_IO; } uint64_t halfscale = mHeaderTimescale / 2; segment_duration = (segment_duration * 1000000 + halfscale)/ mHeaderTimescale; media_time = (media_time * 1000000 + halfscale) / mHeaderTimescale; int64_t duration; int32_t samplerate; if (mLastTrack->meta->findInt64(kKeyDuration, &duration) && mLastTrack->meta->findInt32(kKeySampleRate, &samplerate)) { int64_t delay = (media_time * samplerate + 500000) / 1000000; mLastTrack->meta->setInt32(kKeyEncoderDelay, delay); int64_t paddingus = duration - (segment_duration + media_time); int64_t paddingsamples = (paddingus * samplerate + 500000) / 1000000; mLastTrack->meta->setInt32(kKeyEncoderPadding, paddingsamples); } } *offset += chunk_size; break; } case FOURCC('f', 'r', 'm', 'a'): { uint32_t original_fourcc; if (mDataSource->readAt(data_offset, &original_fourcc, 4) < 4) { return ERROR_IO; } original_fourcc = ntohl(original_fourcc); ALOGV("read original format: %d", original_fourcc); mLastTrack->meta->setCString(kKeyMIMEType, FourCC2MIME(original_fourcc)); uint32_t num_channels = 0; uint32_t sample_rate = 0; if (AdjustChannelsAndRate(original_fourcc, &num_channels, &sample_rate)) { mLastTrack->meta->setInt32(kKeyChannelCount, num_channels); mLastTrack->meta->setInt32(kKeySampleRate, sample_rate); } *offset += chunk_size; break; } case FOURCC('t', 'e', 'n', 'c'): { if (chunk_size < 32) { return ERROR_MALFORMED; } // tenc box contains 1 byte version, 3 byte flags, 3 byte default algorithm id, one byte // default IV size, 16 bytes default KeyID // (ISO 23001-7) char buf[4]; memset(buf, 0, 4); if (mDataSource->readAt(data_offset + 4, buf + 1, 3) < 3) { return ERROR_IO; } uint32_t defaultAlgorithmId = ntohl(*((int32_t*)buf)); if (defaultAlgorithmId > 1) { // only 0 (clear) and 1 (AES-128) are valid return ERROR_MALFORMED; } memset(buf, 0, 4); if (mDataSource->readAt(data_offset + 7, buf + 3, 1) < 1) { return ERROR_IO; } uint32_t defaultIVSize = ntohl(*((int32_t*)buf)); if ((defaultAlgorithmId == 0 && defaultIVSize != 0) || (defaultAlgorithmId != 0 && defaultIVSize == 0)) { // only unencrypted data must have 0 IV size return ERROR_MALFORMED; } else if (defaultIVSize != 0 && defaultIVSize != 8 && defaultIVSize != 16) { // only supported sizes are 0, 8 and 16 return ERROR_MALFORMED; } uint8_t defaultKeyId[16]; if (mDataSource->readAt(data_offset + 8, &defaultKeyId, 16) < 16) { return ERROR_IO; } mLastTrack->meta->setInt32(kKeyCryptoMode, defaultAlgorithmId); mLastTrack->meta->setInt32(kKeyCryptoDefaultIVSize, defaultIVSize); mLastTrack->meta->setData(kKeyCryptoKey, 'tenc', defaultKeyId, 16); *offset += chunk_size; break; } case FOURCC('t', 'k', 'h', 'd'): { status_t err; if ((err = parseTrackHeader(data_offset, chunk_data_size)) != OK) { return err; } *offset += chunk_size; break; } case FOURCC('p', 's', 's', 'h'): { PsshInfo pssh; if (mDataSource->readAt(data_offset + 4, &pssh.uuid, 16) < 16) { return ERROR_IO; } uint32_t psshdatalen = 0; if (mDataSource->readAt(data_offset + 20, &psshdatalen, 4) < 4) { return ERROR_IO; } pssh.datalen = ntohl(psshdatalen); ALOGV("pssh data size: %d", pssh.datalen); if (pssh.datalen + 20 > chunk_size) { // pssh data length exceeds size of containing box return ERROR_MALFORMED; } pssh.data = new uint8_t[pssh.datalen]; ALOGV("allocated pssh @ %p", pssh.data); ssize_t requested = (ssize_t) pssh.datalen; if (mDataSource->readAt(data_offset + 24, pssh.data, requested) < requested) { return ERROR_IO; } mPssh.push_back(pssh); *offset += chunk_size; break; } case FOURCC('m', 'd', 'h', 'd'): { if (chunk_data_size < 4) { return ERROR_MALFORMED; } uint8_t version; if (mDataSource->readAt( data_offset, &version, sizeof(version)) < (ssize_t)sizeof(version)) { return ERROR_IO; } off64_t timescale_offset; if (version == 1) { timescale_offset = data_offset + 4 + 16; } else if (version == 0) { timescale_offset = data_offset + 4 + 8; } else { return ERROR_IO; } uint32_t timescale; if (mDataSource->readAt( timescale_offset, &timescale, sizeof(timescale)) < (ssize_t)sizeof(timescale)) { return ERROR_IO; } mLastTrack->timescale = ntohl(timescale); int64_t duration = 0; if (version == 1) { if (mDataSource->readAt( timescale_offset + 4, &duration, sizeof(duration)) < (ssize_t)sizeof(duration)) { return ERROR_IO; } duration = ntoh64(duration); } else { uint32_t duration32; if (mDataSource->readAt( timescale_offset + 4, &duration32, sizeof(duration32)) < (ssize_t)sizeof(duration32)) { return ERROR_IO; } // ffmpeg sets duration to -1, which is incorrect. if (duration32 != 0xffffffff) { duration = ntohl(duration32); } } mLastTrack->meta->setInt64( kKeyDuration, (duration * 1000000) / mLastTrack->timescale); uint8_t lang[2]; off64_t lang_offset; if (version == 1) { lang_offset = timescale_offset + 4 + 8; } else if (version == 0) { lang_offset = timescale_offset + 4 + 4; } else { return ERROR_IO; } if (mDataSource->readAt(lang_offset, &lang, sizeof(lang)) < (ssize_t)sizeof(lang)) { return ERROR_IO; } // To get the ISO-639-2/T three character language code // 1 bit pad followed by 3 5-bits characters. Each character // is packed as the difference between its ASCII value and 0x60. char lang_code[4]; lang_code[0] = ((lang[0] >> 2) & 0x1f) + 0x60; lang_code[1] = ((lang[0] & 0x3) << 3 | (lang[1] >> 5)) + 0x60; lang_code[2] = (lang[1] & 0x1f) + 0x60; lang_code[3] = '\0'; mLastTrack->meta->setCString( kKeyMediaLanguage, lang_code); *offset += chunk_size; break; } case FOURCC('s', 't', 's', 'd'): { if (chunk_data_size < 8) { return ERROR_MALFORMED; } uint8_t buffer[8]; if (chunk_data_size < (off64_t)sizeof(buffer)) { return ERROR_MALFORMED; } if (mDataSource->readAt( data_offset, buffer, 8) < 8) { return ERROR_IO; } if (U32_AT(buffer) != 0) { // Should be version 0, flags 0. return ERROR_MALFORMED; } uint32_t entry_count = U32_AT(&buffer[4]); if (entry_count > 1) { // For 3GPP timed text, there could be multiple tx3g boxes contain // multiple text display formats. These formats will be used to // display the timed text. // For encrypted files, there may also be more than one entry. const char *mime; CHECK(mLastTrack->meta->findCString(kKeyMIMEType, &mime)); if (strcasecmp(mime, MEDIA_MIMETYPE_TEXT_3GPP) && strcasecmp(mime, "application/octet-stream")) { // For now we only support a single type of media per track. mLastTrack->skipTrack = true; *offset += chunk_size; break; } } off64_t stop_offset = *offset + chunk_size; *offset = data_offset + 8; for (uint32_t i = 0; i < entry_count; ++i) { status_t err = parseChunk(offset, depth + 1); if (err != OK) { return err; } } if (*offset != stop_offset) { return ERROR_MALFORMED; } break; } case FOURCC('m', 'p', '4', 'a'): { if (chunk_data_size < 20 + 8) { *offset += chunk_size; break; } } case FOURCC('e', 'n', 'c', 'a'): case FOURCC('s', 'a', 'm', 'r'): case FOURCC('s', 'a', 'w', 'b'): { uint8_t buffer[8 + 20]; if (chunk_data_size < (ssize_t)sizeof(buffer)) { // Basic AudioSampleEntry size. return ERROR_MALFORMED; } if (mDataSource->readAt( data_offset, buffer, sizeof(buffer)) < (ssize_t)sizeof(buffer)) { return ERROR_IO; } uint16_t version = U16_AT(&buffer[8]); uint16_t data_ref_index = U16_AT(&buffer[6]); uint32_t num_channels = U16_AT(&buffer[16]); uint16_t sample_size = U16_AT(&buffer[18]); uint32_t sample_rate = U32_AT(&buffer[24]) >> 16; if (chunk_type != FOURCC('e', 'n', 'c', 'a')) { // if the chunk type is enca, we'll get the type from the sinf/frma box later mLastTrack->meta->setCString(kKeyMIMEType, FourCC2MIME(chunk_type)); AdjustChannelsAndRate(chunk_type, &num_channels, &sample_rate); } ALOGV("*** coding='%s' %d channels, size %d, rate %d\n", chunk, num_channels, sample_size, sample_rate); mLastTrack->meta->setInt32(kKeyChannelCount, num_channels); mLastTrack->meta->setInt32(kKeySampleRate, sample_rate); off64_t stop_offset = *offset + chunk_size; *offset = data_offset + sizeof(buffer); ALOGV("mIsQtff:%d version:%d", mIsQtff, version); if (mIsQtff) { if (version==1) { *offset += 4*4; } else if (version==2) { *offset += 4*9; } } while (*offset < stop_offset) { if (*offset < stop_offset-8) { status_t err = parseChunk(offset, depth + 1); if (err != OK) { return err; } }else { *offset = stop_offset; } } if (*offset != stop_offset) { return ERROR_MALFORMED; } break; } case FOURCC('m', 'p', '4', 'v'): case FOURCC('e', 'n', 'c', 'v'): case FOURCC('s', '2', '6', '3'): case FOURCC('H', '2', '6', '3'): case FOURCC('h', '2', '6', '3'): case FOURCC('a', 'v', 'c', '1'): { mHasVideo = true; uint8_t buffer[78]; if (chunk_data_size < (ssize_t)sizeof(buffer)) { // Basic VideoSampleEntry size. return ERROR_MALFORMED; } if (mDataSource->readAt( data_offset, buffer, sizeof(buffer)) < (ssize_t)sizeof(buffer)) { return ERROR_IO; } uint16_t data_ref_index = U16_AT(&buffer[6]); uint16_t width = U16_AT(&buffer[6 + 18]); uint16_t height = U16_AT(&buffer[6 + 20]); // The video sample is not standard-compliant if it has invalid dimension. // Use some default width and height value, and // let the decoder figure out the actual width and height (and thus // be prepared for INFO_FOMRAT_CHANGED event). if (width == 0) width = 352; if (height == 0) height = 288; // printf("*** coding='%s' width=%d height=%d\n", // chunk, width, height); if (chunk_type != FOURCC('e', 'n', 'c', 'v')) { // if the chunk type is encv, we'll get the type from the sinf/frma box later mLastTrack->meta->setCString(kKeyMIMEType, FourCC2MIME(chunk_type)); } mLastTrack->meta->setInt32(kKeyWidth, width); mLastTrack->meta->setInt32(kKeyHeight, height); off64_t stop_offset = *offset + chunk_size; *offset = data_offset + sizeof(buffer); while (*offset < stop_offset) { if (*offset < stop_offset-8) { status_t err = parseChunk(offset, depth + 1); if (err != OK) { return err; } }else { *offset = stop_offset; } } if (*offset != stop_offset) { return ERROR_MALFORMED; } break; } case FOURCC('s', 't', 'c', 'o'): case FOURCC('c', 'o', '6', '4'): { status_t err = mLastTrack->sampleTable->setChunkOffsetParams( chunk_type, data_offset, chunk_data_size); if (err != OK) { return err; } *offset += chunk_size; break; } case FOURCC('s', 't', 's', 'c'): { status_t err = mLastTrack->sampleTable->setSampleToChunkParams( data_offset, chunk_data_size); if (err != OK) { return err; } *offset += chunk_size; break; } case FOURCC('s', 't', 's', 'z'): case FOURCC('s', 't', 'z', '2'): { status_t err = mLastTrack->sampleTable->setSampleSizeParams( chunk_type, data_offset, chunk_data_size); if (err != OK) { return err; } size_t max_size; err = mLastTrack->sampleTable->getMaxSampleSize(&max_size); if (err != OK) { return err; } if (max_size != 0) { // Assume that a given buffer only contains at most 10 chunks, // each chunk originally prefixed with a 2 byte length will // have a 4 byte header (0x00 0x00 0x00 0x01) after conversion, // and thus will grow by 2 bytes per chunk. mLastTrack->meta->setInt32(kKeyMaxInputSize, max_size + 10 * 2); } else { // No size was specified. Pick a conservatively large size. int32_t width, height; if (mLastTrack->meta->findInt32(kKeyWidth, &width) && mLastTrack->meta->findInt32(kKeyHeight, &height)) { mLastTrack->meta->setInt32(kKeyMaxInputSize, width * height * 3 / 2); } else { ALOGE("No width or height, assuming worst case 1080p"); mLastTrack->meta->setInt32(kKeyMaxInputSize, 3110400); } } *offset += chunk_size; // Calculate average frame rate. const char *mime; CHECK(mLastTrack->meta->findCString(kKeyMIMEType, &mime)); if (!strncasecmp("video/", mime, 6)) { size_t nSamples = mLastTrack->sampleTable->countSamples(); int64_t durationUs; if (mLastTrack->meta->findInt64(kKeyDuration, &durationUs)) { if (durationUs > 0) { int32_t frameRate = (nSamples * 1000000LL + (durationUs >> 1)) / durationUs; mLastTrack->meta->setInt32(kKeyFrameRate, frameRate); } } } break; } case FOURCC('s', 't', 't', 's'): { status_t err = mLastTrack->sampleTable->setTimeToSampleParams( data_offset, chunk_data_size); if (err != OK) { return err; } *offset += chunk_size; break; } case FOURCC('c', 't', 't', 's'): { status_t err = mLastTrack->sampleTable->setCompositionTimeToSampleParams( data_offset, chunk_data_size); if (err != OK) { return err; } *offset += chunk_size; break; } case FOURCC('s', 't', 's', 's'): { status_t err = mLastTrack->sampleTable->setSyncSampleParams( data_offset, chunk_data_size); if (err != OK) { return err; } *offset += chunk_size; break; } // @xyz case FOURCC('\xA9', 'x', 'y', 'z'): { // Best case the total data length inside "@xyz" box // would be 8, for instance "@xyz" + "\x00\x04\x15\xc7" + "0+0/", // where "\x00\x04" is the text string length with value = 4, // "\0x15\xc7" is the language code = en, and "0+0" is a // location (string) value with longitude = 0 and latitude = 0. if (chunk_data_size < 8) { return ERROR_MALFORMED; } // Worst case the location string length would be 18, // for instance +90.0000-180.0000, without the trailing "/" and // the string length + language code. char buffer[30]; // Substracting 5 from the data size is because the text string length + // language code takes 4 bytes, and the trailing slash "/" takes 1 byte. off64_t location_length = chunk_data_size - 5; if (location_length >= (off64_t) sizeof(buffer)) { return ERROR_MALFORMED; } if (mDataSource->readAt( data_offset + 4, buffer, location_length) < location_length) { return ERROR_IO; } buffer[location_length] = '\0'; mFileMetaData->setCString(kKeyLocation, buffer); *offset += chunk_size; break; } case FOURCC('e', 's', 'd', 's'): { if (chunk_data_size < 4) { return ERROR_MALFORMED; } uint8_t buffer[256]; if (chunk_data_size > (off64_t)sizeof(buffer)) { return ERROR_BUFFER_TOO_SMALL; } if (mDataSource->readAt( data_offset, buffer, chunk_data_size) < chunk_data_size) { return ERROR_IO; } if (U32_AT(buffer) != 0) { // Should be version 0, flags 0. return ERROR_MALFORMED; } mLastTrack->meta->setData( kKeyESDS, kTypeESDS, &buffer[4], chunk_data_size - 4); if (mPath.size() >= 2 && mPath[mPath.size() - 2] == FOURCC('m', 'p', '4', 'a')) { // Information from the ESDS must be relied on for proper // setup of sample rate and channel count for MPEG4 Audio. // The generic header appears to only contain generic // information... status_t err = updateAudioTrackInfoFromESDS_MPEG4Audio( &buffer[4], chunk_data_size - 4); if (err != OK) { return err; } } *offset += chunk_size; break; } case FOURCC('a', 'v', 'c', 'C'): { sp<ABuffer> buffer = new ABuffer(chunk_data_size); if (mDataSource->readAt( data_offset, buffer->data(), chunk_data_size) < chunk_data_size) { return ERROR_IO; } mLastTrack->meta->setData( kKeyAVCC, kTypeAVCC, buffer->data(), chunk_data_size); *offset += chunk_size; break; } case FOURCC('d', '2', '6', '3'): { /* * d263 contains a fixed 7 bytes part: * vendor - 4 bytes * version - 1 byte * level - 1 byte * profile - 1 byte * optionally, "d263" box itself may contain a 16-byte * bit rate box (bitr) * average bit rate - 4 bytes * max bit rate - 4 bytes */ char buffer[23]; if (chunk_data_size != 7 && chunk_data_size != 23) { ALOGE("Incorrect D263 box size %lld", chunk_data_size); return ERROR_MALFORMED; } if (mDataSource->readAt( data_offset, buffer, chunk_data_size) < chunk_data_size) { return ERROR_IO; } mLastTrack->meta->setData(kKeyD263, kTypeD263, buffer, chunk_data_size); *offset += chunk_size; break; } case FOURCC('m', 'e', 't', 'a'): { uint8_t buffer[4]; if (chunk_data_size < (off64_t)sizeof(buffer)) { return ERROR_MALFORMED; } if (mDataSource->readAt( data_offset, buffer, 4) < 4) { return ERROR_IO; } if (U32_AT(buffer) != 0) { // Should be version 0, flags 0. // If it's not, let's assume this is one of those // apparently malformed chunks that don't have flags // and completely different semantics than what's // in the MPEG4 specs and skip it. *offset += chunk_size; return OK; } off64_t stop_offset = *offset + chunk_size; *offset = data_offset + sizeof(buffer); while (*offset < stop_offset) { status_t err = parseChunk(offset, depth + 1); if (err != OK) { return err; } } if (*offset != stop_offset) { return ERROR_MALFORMED; } break; } case FOURCC('m', 'e', 'a', 'n'): case FOURCC('n', 'a', 'm', 'e'): case FOURCC('d', 'a', 't', 'a'): { if (mPath.size() == 6 && underMetaDataPath(mPath)) { status_t err = parseMetaData(data_offset, chunk_data_size); if (err != OK) { return err; } } *offset += chunk_size; break; } case FOURCC('m', 'v', 'h', 'd'): { if (chunk_data_size < 24) { return ERROR_MALFORMED; } uint8_t header[24]; if (mDataSource->readAt( data_offset, header, sizeof(header)) < (ssize_t)sizeof(header)) { return ERROR_IO; } uint64_t creationTime; if (header[0] == 1) { creationTime = U64_AT(&header[4]); mHeaderTimescale = U32_AT(&header[20]); } else if (header[0] != 0) { return ERROR_MALFORMED; } else { creationTime = U32_AT(&header[4]); mHeaderTimescale = U32_AT(&header[12]); } String8 s; convertTimeToDate(creationTime, &s); mFileMetaData->setCString(kKeyDate, s.string()); *offset += chunk_size; break; } case FOURCC('m', 'd', 'a', 't'): { ALOGV("mdat chunk, drm: %d", mIsDrm); if (!mIsDrm) { *offset += chunk_size; break; } if (chunk_size < 8) { return ERROR_MALFORMED; } return parseDrmSINF(offset, data_offset); } case FOURCC('h', 'd', 'l', 'r'): { uint32_t buffer; if (mDataSource->readAt( data_offset + 8, &buffer, 4) < 4) { return ERROR_IO; } uint32_t type = ntohl(buffer); // For the 3GPP file format, the handler-type within the 'hdlr' box // shall be 'text'. We also want to support 'sbtl' handler type // for a practical reason as various MPEG4 containers use it. if (type == FOURCC('t', 'e', 'x', 't') || type == FOURCC('s', 'b', 't', 'l')) { mLastTrack->meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_TEXT_3GPP); } *offset += chunk_size; break; } case FOURCC('t', 'x', '3', 'g'): { uint32_t type; const void *data; size_t size = 0; if (!mLastTrack->meta->findData( kKeyTextFormatData, &type, &data, &size)) { size = 0; } uint8_t *buffer = new uint8_t[size + chunk_size]; if (size > 0) { memcpy(buffer, data, size); } if ((size_t)(mDataSource->readAt(*offset, buffer + size, chunk_size)) < chunk_size) { delete[] buffer; buffer = NULL; return ERROR_IO; } mLastTrack->meta->setData( kKeyTextFormatData, 0, buffer, size + chunk_size); delete[] buffer; *offset += chunk_size; break; } case FOURCC('c', 'o', 'v', 'r'): { if (mFileMetaData != NULL) { ALOGV("chunk_data_size = %lld and data_offset = %lld", chunk_data_size, data_offset); sp<ABuffer> buffer = new ABuffer(chunk_data_size + 1); if (mDataSource->readAt( data_offset, buffer->data(), chunk_data_size) != (ssize_t)chunk_data_size) { return ERROR_IO; } const int kSkipBytesOfDataBox = 16; mFileMetaData->setData( kKeyAlbumArt, MetaData::TYPE_NONE, buffer->data() + kSkipBytesOfDataBox, chunk_data_size - kSkipBytesOfDataBox); } *offset += chunk_size; break; } case FOURCC('w', 'a', 'v', 'e'): { off64_t stop_offset = *offset + chunk_size; *offset = data_offset; while (*offset < stop_offset) { status_t err = parseChunk(offset, depth + 1); if (err != OK) { if (err == INFO_VENDOR_LEAF_ATOM) { *offset = stop_offset; break; } return err; } } if (*offset != stop_offset) { return ERROR_MALFORMED; } break; } case FOURCC('f', 't', 'y', 'p'): { uint32_t brand; if (mDataSource->readAt(data_offset, &brand, 4) < 4) { return false; } brand = ntohl(brand); if (brand == FOURCC('q', 't', ' ', ' ')) { mIsQtff = true; } *offset += chunk_size; break; } case FOURCC('-', '-', '-', '-'): { mLastCommentMean.clear(); mLastCommentName.clear(); mLastCommentData.clear(); *offset += chunk_size; break; } case 0: //leaf atom { return INFO_VENDOR_LEAF_ATOM; } case FOURCC('s', 'i', 'd', 'x'): { parseSegmentIndex(data_offset, chunk_data_size); *offset += chunk_size; return UNKNOWN_ERROR; // stop parsing after sidx } default: { *offset += chunk_size; break; } } return OK; } status_t MPEG4Extractor::parseSegmentIndex(off64_t offset, size_t size) { ALOGV("MPEG4Extractor::parseSegmentIndex"); if (size < 12) { return -EINVAL; } uint32_t flags; if (!mDataSource->getUInt32(offset, &flags)) { return ERROR_MALFORMED; } uint32_t version = flags >> 24; flags &= 0xffffff; ALOGV("sidx version %d", version); uint32_t referenceId; if (!mDataSource->getUInt32(offset + 4, &referenceId)) { return ERROR_MALFORMED; } uint32_t timeScale; if (!mDataSource->getUInt32(offset + 8, &timeScale)) { return ERROR_MALFORMED; } ALOGV("sidx refid/timescale: %d/%d", referenceId, timeScale); uint64_t earliestPresentationTime; uint64_t firstOffset; offset += 12; size -= 12; if (version == 0) { if (size < 8) { return -EINVAL; } uint32_t tmp; if (!mDataSource->getUInt32(offset, &tmp)) { return ERROR_MALFORMED; } earliestPresentationTime = tmp; if (!mDataSource->getUInt32(offset + 4, &tmp)) { return ERROR_MALFORMED; } firstOffset = tmp; offset += 8; size -= 8; } else { if (size < 16) { return -EINVAL; } if (!mDataSource->getUInt64(offset, &earliestPresentationTime)) { return ERROR_MALFORMED; } if (!mDataSource->getUInt64(offset + 8, &firstOffset)) { return ERROR_MALFORMED; } offset += 16; size -= 16; } ALOGV("sidx pres/off: %Ld/%Ld", earliestPresentationTime, firstOffset); if (size < 4) { return -EINVAL; } uint16_t referenceCount; if (!mDataSource->getUInt16(offset + 2, &referenceCount)) { return ERROR_MALFORMED; } offset += 4; size -= 4; ALOGV("refcount: %d", referenceCount); if (size < referenceCount * 12) { return -EINVAL; } uint64_t total_duration = 0; for (unsigned int i = 0; i < referenceCount; i++) { uint32_t d1, d2, d3; if (!mDataSource->getUInt32(offset, &d1) || // size !mDataSource->getUInt32(offset + 4, &d2) || // duration !mDataSource->getUInt32(offset + 8, &d3)) { // flags return ERROR_MALFORMED; } if (d1 & 0x80000000) { ALOGW("sub-sidx boxes not supported yet"); } bool sap = d3 & 0x80000000; bool saptype = d3 >> 28; if (!sap || saptype > 2) { ALOGW("not a stream access point, or unsupported type"); } total_duration += d2; offset += 12; ALOGV(" item %d, %08x %08x %08x", i, d1, d2, d3); SidxEntry se; se.mSize = d1 & 0x7fffffff; se.mDurationUs = 1000000LL * d2 / timeScale; mSidxEntries.add(se); } mSidxDuration = total_duration * 1000000 / timeScale; ALOGV("duration: %lld", mSidxDuration); int64_t metaDuration; if (!mLastTrack->meta->findInt64(kKeyDuration, &metaDuration) || metaDuration == 0) { mLastTrack->meta->setInt64(kKeyDuration, mSidxDuration); } return OK; } status_t MPEG4Extractor::parseTrackHeader( off64_t data_offset, off64_t data_size) { if (data_size < 4) { return ERROR_MALFORMED; } uint8_t version; if (mDataSource->readAt(data_offset, &version, 1) < 1) { return ERROR_IO; } size_t dynSize = (version == 1) ? 36 : 24; uint8_t buffer[36 + 60]; if (data_size != (off64_t)dynSize + 60) { return ERROR_MALFORMED; } if (mDataSource->readAt( data_offset, buffer, data_size) < (ssize_t)data_size) { return ERROR_IO; } uint64_t ctime, mtime, duration; int32_t id; if (version == 1) { ctime = U64_AT(&buffer[4]); mtime = U64_AT(&buffer[12]); id = U32_AT(&buffer[20]); duration = U64_AT(&buffer[28]); } else if (version == 0) { ctime = U32_AT(&buffer[4]); mtime = U32_AT(&buffer[8]); id = U32_AT(&buffer[12]); duration = U32_AT(&buffer[20]); } else { return ERROR_UNSUPPORTED; } mLastTrack->meta->setInt32(kKeyTrackID, id); size_t matrixOffset = dynSize + 16; int32_t a00 = U32_AT(&buffer[matrixOffset]); int32_t a01 = U32_AT(&buffer[matrixOffset + 4]); int32_t dx = U32_AT(&buffer[matrixOffset + 8]); int32_t a10 = U32_AT(&buffer[matrixOffset + 12]); int32_t a11 = U32_AT(&buffer[matrixOffset + 16]); int32_t dy = U32_AT(&buffer[matrixOffset + 20]); #if 0 ALOGI("x' = %.2f * x + %.2f * y + %.2f", a00 / 65536.0f, a01 / 65536.0f, dx / 65536.0f); ALOGI("y' = %.2f * x + %.2f * y + %.2f", a10 / 65536.0f, a11 / 65536.0f, dy / 65536.0f); #endif uint32_t rotationDegrees; static const int32_t kFixedOne = 0x10000; if (a00 == kFixedOne && a01 == 0 && a10 == 0 && a11 == kFixedOne) { // Identity, no rotation rotationDegrees = 0; } else if (a00 == 0 && a01 == kFixedOne && a10 == -kFixedOne && a11 == 0) { rotationDegrees = 90; } else if (a00 == 0 && a01 == -kFixedOne && a10 == kFixedOne && a11 == 0) { rotationDegrees = 270; } else if (a00 == -kFixedOne && a01 == 0 && a10 == 0 && a11 == -kFixedOne) { rotationDegrees = 180; } else { ALOGW("We only support 0,90,180,270 degree rotation matrices"); rotationDegrees = 0; } if (rotationDegrees != 0) { mLastTrack->meta->setInt32(kKeyRotation, rotationDegrees); } // Handle presentation display size, which could be different // from the image size indicated by kKeyWidth and kKeyHeight. uint32_t width = U32_AT(&buffer[dynSize + 52]); uint32_t height = U32_AT(&buffer[dynSize + 56]); mLastTrack->meta->setInt32(kKeyDisplayWidth, width >> 16); mLastTrack->meta->setInt32(kKeyDisplayHeight, height >> 16); return OK; } status_t MPEG4Extractor::parseMetaData(off64_t offset, size_t size) { if (size < 4) { return ERROR_MALFORMED; } uint8_t *buffer = new uint8_t[size + 1]; if (mDataSource->readAt( offset, buffer, size) != (ssize_t)size) { delete[] buffer; buffer = NULL; return ERROR_IO; } uint32_t flags = U32_AT(buffer); uint32_t metadataKey = 0; char chunk[5]; MakeFourCCString(mPath[4], chunk); ALOGV("meta: %s @ %lld", chunk, offset); switch (mPath[4]) { case FOURCC(0xa9, 'a', 'l', 'b'): { metadataKey = kKeyAlbum; break; } case FOURCC(0xa9, 'A', 'R', 'T'): { metadataKey = kKeyArtist; break; } case FOURCC('a', 'A', 'R', 'T'): { metadataKey = kKeyAlbumArtist; break; } case FOURCC(0xa9, 'd', 'a', 'y'): { metadataKey = kKeyYear; break; } case FOURCC(0xa9, 'n', 'a', 'm'): { metadataKey = kKeyTitle; break; } case FOURCC(0xa9, 'w', 'r', 't'): { metadataKey = kKeyWriter; break; } case FOURCC('c', 'o', 'v', 'r'): { metadataKey = kKeyAlbumArt; break; } case FOURCC('g', 'n', 'r', 'e'): { metadataKey = kKeyGenre; break; } case FOURCC(0xa9, 'g', 'e', 'n'): { metadataKey = kKeyGenre; break; } case FOURCC('c', 'p', 'i', 'l'): { if (size == 9 && flags == 21) { char tmp[16]; sprintf(tmp, "%d", (int)buffer[size - 1]); mFileMetaData->setCString(kKeyCompilation, tmp); } break; } case FOURCC('t', 'r', 'k', 'n'): { if (size == 16 && flags == 0) { char tmp[16]; uint16_t* pTrack = (uint16_t*)&buffer[10]; uint16_t* pTotalTracks = (uint16_t*)&buffer[12]; sprintf(tmp, "%d/%d", ntohs(*pTrack), ntohs(*pTotalTracks)); mFileMetaData->setCString(kKeyCDTrackNumber, tmp); } break; } case FOURCC('d', 'i', 's', 'k'): { if ((size == 14 || size == 16) && flags == 0) { char tmp[16]; uint16_t* pDisc = (uint16_t*)&buffer[10]; uint16_t* pTotalDiscs = (uint16_t*)&buffer[12]; sprintf(tmp, "%d/%d", ntohs(*pDisc), ntohs(*pTotalDiscs)); mFileMetaData->setCString(kKeyDiscNumber, tmp); } break; } case FOURCC('-', '-', '-', '-'): { buffer[size] = '\0'; switch (mPath[5]) { case FOURCC('m', 'e', 'a', 'n'): mLastCommentMean.setTo((const char *)buffer + 4); break; case FOURCC('n', 'a', 'm', 'e'): mLastCommentName.setTo((const char *)buffer + 4); break; case FOURCC('d', 'a', 't', 'a'): mLastCommentData.setTo((const char *)buffer + 8); break; } // Once we have a set of mean/name/data info, go ahead and process // it to see if its something we are interested in. Whether or not // were are interested in the specific tag, make sure to clear out // the set so we can be ready to process another tuple should one // show up later in the file. if ((mLastCommentMean.length() != 0) && (mLastCommentName.length() != 0) && (mLastCommentData.length() != 0)) { if (mLastCommentMean == "com.apple.iTunes" && mLastCommentName == "iTunSMPB") { int32_t delay, padding; if (sscanf(mLastCommentData, " %*x %x %x %*x", &delay, &padding) == 2) { mLastTrack->meta->setInt32(kKeyEncoderDelay, delay); mLastTrack->meta->setInt32(kKeyEncoderPadding, padding); } } mLastCommentMean.clear(); mLastCommentName.clear(); mLastCommentData.clear(); } break; } default: break; } if (size >= 8 && metadataKey) { if (metadataKey == kKeyAlbumArt) { mFileMetaData->setData( kKeyAlbumArt, MetaData::TYPE_NONE, buffer + 8, size - 8); } else if (metadataKey == kKeyGenre) { if (flags == 0) { // uint8_t genre code, iTunes genre codes are // the standard id3 codes, except they start // at 1 instead of 0 (e.g. Pop is 14, not 13) // We use standard id3 numbering, so subtract 1. int genrecode = (int)buffer[size - 1]; genrecode--; if (genrecode < 0) { genrecode = 255; // reserved for 'unknown genre' } char genre[10]; sprintf(genre, "%d", genrecode); mFileMetaData->setCString(metadataKey, genre); } else if (flags == 1) { // custom genre string buffer[size] = '\0'; mFileMetaData->setCString( metadataKey, (const char *)buffer + 8); } } else { buffer[size] = '\0'; mFileMetaData->setCString( metadataKey, (const char *)buffer + 8); } } delete[] buffer; buffer = NULL; return OK; } sp<MediaSource> MPEG4Extractor::getTrack(size_t index) { status_t err; if ((err = readMetaData()) != OK) { return NULL; } Track *track = mFirstTrack; while (index > 0) { if (track == NULL) { return NULL; } track = track->next; --index; } if (track == NULL) { return NULL; } ALOGV("getTrack called, pssh: %d", mPssh.size()); return new MPEG4Source( track->meta, mDataSource, track->timescale, track->sampleTable, mSidxEntries, mMoofOffset); } // static status_t MPEG4Extractor::verifyTrack(Track *track) { const char *mime; CHECK(track->meta->findCString(kKeyMIMEType, &mime)); uint32_t type; const void *data; size_t size; if (!strcasecmp(mime, MEDIA_MIMETYPE_VIDEO_AVC)) { if (!track->meta->findData(kKeyAVCC, &type, &data, &size) || type != kTypeAVCC) { return ERROR_MALFORMED; } } else if (!strcasecmp(mime, MEDIA_MIMETYPE_VIDEO_MPEG4) || !strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AAC)) { if (!track->meta->findData(kKeyESDS, &type, &data, &size) || type != kTypeESDS) { return ERROR_MALFORMED; } } if (!track->sampleTable->isValid()) { // Make sure we have all the metadata we need. return ERROR_MALFORMED; } return OK; } status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio( const void *esds_data, size_t esds_size) { ESDS esds(esds_data, esds_size); uint8_t objectTypeIndication; if (esds.getObjectTypeIndication(&objectTypeIndication) != OK) { return ERROR_MALFORMED; } if (objectTypeIndication == 0xe1) { // This isn't MPEG4 audio at all, it's QCELP 14k... mLastTrack->meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_QCELP); return OK; } if (objectTypeIndication == 0x6b) { // The media subtype is MP3 audio // Our software MP3 audio decoder may not be able to handle // packetized MP3 audio; for now, lets just return ERROR_UNSUPPORTED ALOGE("MP3 track in MP4/3GPP file is not supported"); return ERROR_UNSUPPORTED; } const uint8_t *csd; size_t csd_size; if (esds.getCodecSpecificInfo( (const void **)&csd, &csd_size) != OK) { return ERROR_MALFORMED; } #if 0 printf("ESD of size %d\n", csd_size); hexdump(csd, csd_size); #endif if (csd_size == 0) { // There's no further information, i.e. no codec specific data // Let's assume that the information provided in the mpeg4 headers // is accurate and hope for the best. return OK; } if (csd_size < 2) { return ERROR_MALFORMED; } ABitReader br(csd, csd_size); uint32_t objectType = br.getBits(5); if (objectType == 31) { // AAC-ELD => additional 6 bits objectType = 32 + br.getBits(6); } uint32_t freqIndex = br.getBits(4); int32_t sampleRate = 0; int32_t numChannels = 0; if (freqIndex == 15) { if (csd_size < 5) { return ERROR_MALFORMED; } sampleRate = br.getBits(24); numChannels = br.getBits(4); } else { numChannels = br.getBits(4); if (objectType == 5) { // SBR specific config per 14496-3 table 1.13 freqIndex = br.getBits(4); if (freqIndex == 15) { if (csd_size < 8) { return ERROR_MALFORMED; } sampleRate = br.getBits(24); } } if (sampleRate == 0) { static uint32_t kSamplingRate[] = { 96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350 }; if (freqIndex == 13 || freqIndex == 14) { return ERROR_MALFORMED; } sampleRate = kSamplingRate[freqIndex]; } } if (numChannels == 0) { return ERROR_UNSUPPORTED; } int32_t prevSampleRate; CHECK(mLastTrack->meta->findInt32(kKeySampleRate, &prevSampleRate)); if (prevSampleRate != sampleRate) { ALOGV("mpeg4 audio sample rate different from previous setting. " "was: %d, now: %d", prevSampleRate, sampleRate); } mLastTrack->meta->setInt32(kKeySampleRate, sampleRate); int32_t prevChannelCount; CHECK(mLastTrack->meta->findInt32(kKeyChannelCount, &prevChannelCount)); if (prevChannelCount != numChannels) { ALOGV("mpeg4 audio channel count different from previous setting. " "was: %d, now: %d", prevChannelCount, numChannels); } mLastTrack->meta->setInt32(kKeyChannelCount, numChannels); return OK; } //////////////////////////////////////////////////////////////////////////////// MPEG4Source::MPEG4Source( const sp<MetaData> &format, const sp<DataSource> &dataSource, int32_t timeScale, const sp<SampleTable> &sampleTable, Vector<SidxEntry> &sidx, off64_t firstMoofOffset) : mFormat(format), mDataSource(dataSource), mTimescale(timeScale), mSampleTable(sampleTable), mCurrentSampleIndex(0), mCurrentFragmentIndex(0), mSegments(sidx), mFirstMoofOffset(firstMoofOffset), mCurrentMoofOffset(firstMoofOffset), mCurrentTime(0), mCurrentSampleInfoAllocSize(0), mCurrentSampleInfoSizes(NULL), mCurrentSampleInfoOffsetsAllocSize(0), mCurrentSampleInfoOffsets(NULL), mIsAVC(false), mNALLengthSize(0), mStarted(false), mGroup(NULL), mBuffer(NULL), mWantsNALFragments(false), mSrcBuffer(NULL) { mFormat->findInt32(kKeyCryptoMode, &mCryptoMode); mDefaultIVSize = 0; mFormat->findInt32(kKeyCryptoDefaultIVSize, &mDefaultIVSize); uint32_t keytype; const void *key; size_t keysize; if (mFormat->findData(kKeyCryptoKey, &keytype, &key, &keysize)) { CHECK(keysize <= 16); memset(mCryptoKey, 0, 16); memcpy(mCryptoKey, key, keysize); } const char *mime; bool success = mFormat->findCString(kKeyMIMEType, &mime); CHECK(success); mIsAVC = !strcasecmp(mime, MEDIA_MIMETYPE_VIDEO_AVC); if (mIsAVC) { uint32_t type; const void *data; size_t size; CHECK(format->findData(kKeyAVCC, &type, &data, &size)); const uint8_t *ptr = (const uint8_t *)data; CHECK(size >= 7); CHECK_EQ((unsigned)ptr[0], 1u); // configurationVersion == 1 // The number of bytes used to encode the length of a NAL unit. mNALLengthSize = 1 + (ptr[4] & 3); } CHECK(format->findInt32(kKeyTrackID, &mTrackId)); if (mFirstMoofOffset != 0) { off64_t offset = mFirstMoofOffset; parseChunk(&offset); } } MPEG4Source::~MPEG4Source() { if (mStarted) { stop(); } free(mCurrentSampleInfoSizes); free(mCurrentSampleInfoOffsets); } status_t MPEG4Source::start(MetaData *params) { Mutex::Autolock autoLock(mLock); CHECK(!mStarted); int32_t val; if (params && params->findInt32(kKeyWantsNALFragments, &val) && val != 0) { mWantsNALFragments = true; } else { mWantsNALFragments = false; } mGroup = new MediaBufferGroup; int32_t max_size; CHECK(mFormat->findInt32(kKeyMaxInputSize, &max_size)); mGroup->add_buffer(new MediaBuffer(max_size)); mSrcBuffer = new uint8_t[max_size]; mStarted = true; return OK; } status_t MPEG4Source::stop() { Mutex::Autolock autoLock(mLock); CHECK(mStarted); if (mBuffer != NULL) { mBuffer->release(); mBuffer = NULL; } delete[] mSrcBuffer; mSrcBuffer = NULL; delete mGroup; mGroup = NULL; mStarted = false; mCurrentSampleIndex = 0; return OK; } status_t MPEG4Source::parseChunk(off64_t *offset) { uint32_t hdr[2]; if (mDataSource->readAt(*offset, hdr, 8) < 8) { return ERROR_IO; } uint64_t chunk_size = ntohl(hdr[0]); uint32_t chunk_type = ntohl(hdr[1]); off64_t data_offset = *offset + 8; if (chunk_size == 1) { if (mDataSource->readAt(*offset + 8, &chunk_size, 8) < 8) { return ERROR_IO; } chunk_size = ntoh64(chunk_size); data_offset += 8; if (chunk_size < 16) { // The smallest valid chunk is 16 bytes long in this case. return ERROR_MALFORMED; } } else if (chunk_size < 8) { // The smallest valid chunk is 8 bytes long. return ERROR_MALFORMED; } char chunk[5]; MakeFourCCString(chunk_type, chunk); ALOGV("MPEG4Source chunk %s @ %llx", chunk, *offset); off64_t chunk_data_size = *offset + chunk_size - data_offset; switch(chunk_type) { case FOURCC('t', 'r', 'a', 'f'): case FOURCC('m', 'o', 'o', 'f'): { off64_t stop_offset = *offset + chunk_size; *offset = data_offset; while (*offset < stop_offset) { status_t err = parseChunk(offset); if (err != OK) { return err; } } if (chunk_type == FOURCC('m', 'o', 'o', 'f')) { // *offset points to the mdat box following this moof parseChunk(offset); // doesn't actually parse it, just updates offset mNextMoofOffset = *offset; } break; } case FOURCC('t', 'f', 'h', 'd'): { status_t err; if ((err = parseTrackFragmentHeader(data_offset, chunk_data_size)) != OK) { return err; } *offset += chunk_size; break; } case FOURCC('t', 'r', 'u', 'n'): { status_t err; if (mLastParsedTrackId == mTrackId) { if ((err = parseTrackFragmentRun(data_offset, chunk_data_size)) != OK) { return err; } } *offset += chunk_size; break; } case FOURCC('s', 'a', 'i', 'z'): { status_t err; if ((err = parseSampleAuxiliaryInformationSizes(data_offset, chunk_data_size)) != OK) { return err; } *offset += chunk_size; break; } case FOURCC('s', 'a', 'i', 'o'): { status_t err; if ((err = parseSampleAuxiliaryInformationOffsets(data_offset, chunk_data_size)) != OK) { return err; } *offset += chunk_size; break; } case FOURCC('m', 'd', 'a', 't'): { // parse DRM info if present ALOGV("MPEG4Source::parseChunk mdat"); // if saiz/saoi was previously observed, do something with the sampleinfos *offset += chunk_size; break; } default: { *offset += chunk_size; break; } } return OK; } status_t MPEG4Source::parseSampleAuxiliaryInformationSizes(off64_t offset, off64_t size) { ALOGV("parseSampleAuxiliaryInformationSizes"); // 14496-12 8.7.12 uint8_t version; if (mDataSource->readAt( offset, &version, sizeof(version)) < (ssize_t)sizeof(version)) { return ERROR_IO; } if (version != 0) { return ERROR_UNSUPPORTED; } offset++; uint32_t flags; if (!mDataSource->getUInt24(offset, &flags)) { return ERROR_IO; } offset += 3; if (flags & 1) { uint32_t tmp; if (!mDataSource->getUInt32(offset, &tmp)) { return ERROR_MALFORMED; } mCurrentAuxInfoType = tmp; offset += 4; if (!mDataSource->getUInt32(offset, &tmp)) { return ERROR_MALFORMED; } mCurrentAuxInfoTypeParameter = tmp; offset += 4; } uint8_t defsize; if (mDataSource->readAt(offset, &defsize, 1) != 1) { return ERROR_MALFORMED; } mCurrentDefaultSampleInfoSize = defsize; offset++; uint32_t smplcnt; if (!mDataSource->getUInt32(offset, &smplcnt)) { return ERROR_MALFORMED; } mCurrentSampleInfoCount = smplcnt; offset += 4; if (mCurrentDefaultSampleInfoSize != 0) { ALOGV("@@@@ using default sample info size of %d", mCurrentDefaultSampleInfoSize); return OK; } if (smplcnt > mCurrentSampleInfoAllocSize) { mCurrentSampleInfoSizes = (uint8_t*) realloc(mCurrentSampleInfoSizes, smplcnt); mCurrentSampleInfoAllocSize = smplcnt; } mDataSource->readAt(offset, mCurrentSampleInfoSizes, smplcnt); return OK; } status_t MPEG4Source::parseSampleAuxiliaryInformationOffsets(off64_t offset, off64_t size) { ALOGV("parseSampleAuxiliaryInformationOffsets"); // 14496-12 8.7.13 uint8_t version; if (mDataSource->readAt(offset, &version, sizeof(version)) != 1) { return ERROR_IO; } offset++; uint32_t flags; if (!mDataSource->getUInt24(offset, &flags)) { return ERROR_IO; } offset += 3; uint32_t entrycount; if (!mDataSource->getUInt32(offset, &entrycount)) { return ERROR_IO; } offset += 4; if (entrycount > mCurrentSampleInfoOffsetsAllocSize) { mCurrentSampleInfoOffsets = (uint64_t*) realloc(mCurrentSampleInfoOffsets, entrycount * 8); mCurrentSampleInfoOffsetsAllocSize = entrycount; } mCurrentSampleInfoOffsetCount = entrycount; for (size_t i = 0; i < entrycount; i++) { if (version == 0) { uint32_t tmp; if (!mDataSource->getUInt32(offset, &tmp)) { return ERROR_IO; } mCurrentSampleInfoOffsets[i] = tmp; offset += 4; } else { uint64_t tmp; if (!mDataSource->getUInt64(offset, &tmp)) { return ERROR_IO; } mCurrentSampleInfoOffsets[i] = tmp; offset += 8; } } // parse clear/encrypted data off64_t drmoffset = mCurrentSampleInfoOffsets[0]; // from moof drmoffset += mCurrentMoofOffset; int ivlength; CHECK(mFormat->findInt32(kKeyCryptoDefaultIVSize, &ivlength)); // read CencSampleAuxiliaryDataFormats for (size_t i = 0; i < mCurrentSampleInfoCount; i++) { Sample *smpl = &mCurrentSamples.editItemAt(i); memset(smpl->iv, 0, 16); if (mDataSource->readAt(drmoffset, smpl->iv, ivlength) != ivlength) { return ERROR_IO; } drmoffset += ivlength; int32_t smplinfosize = mCurrentDefaultSampleInfoSize; if (smplinfosize == 0) { smplinfosize = mCurrentSampleInfoSizes[i]; } if (smplinfosize > ivlength) { uint16_t numsubsamples; if (!mDataSource->getUInt16(drmoffset, &numsubsamples)) { return ERROR_IO; } drmoffset += 2; for (size_t j = 0; j < numsubsamples; j++) { uint16_t numclear; uint32_t numencrypted; if (!mDataSource->getUInt16(drmoffset, &numclear)) { return ERROR_IO; } drmoffset += 2; if (!mDataSource->getUInt32(drmoffset, &numencrypted)) { return ERROR_IO; } drmoffset += 4; smpl->clearsizes.add(numclear); smpl->encryptedsizes.add(numencrypted); } } else { smpl->clearsizes.add(0); smpl->encryptedsizes.add(smpl->size); } } return OK; } status_t MPEG4Source::parseTrackFragmentHeader(off64_t offset, off64_t size) { if (size < 8) { return -EINVAL; } uint32_t flags; if (!mDataSource->getUInt32(offset, &flags)) { // actually version + flags return ERROR_MALFORMED; } if (flags & 0xff000000) { return -EINVAL; } if (!mDataSource->getUInt32(offset + 4, (uint32_t*)&mLastParsedTrackId)) { return ERROR_MALFORMED; } if (mLastParsedTrackId != mTrackId) { // this is not the right track, skip it return OK; } mTrackFragmentHeaderInfo.mFlags = flags; mTrackFragmentHeaderInfo.mTrackID = mLastParsedTrackId; offset += 8; size -= 8; ALOGV("fragment header: %08x %08x", flags, mTrackFragmentHeaderInfo.mTrackID); if (flags & TrackFragmentHeaderInfo::kBaseDataOffsetPresent) { if (size < 8) { return -EINVAL; } if (!mDataSource->getUInt64(offset, &mTrackFragmentHeaderInfo.mBaseDataOffset)) { return ERROR_MALFORMED; } offset += 8; size -= 8; } if (flags & TrackFragmentHeaderInfo::kSampleDescriptionIndexPresent) { if (size < 4) { return -EINVAL; } if (!mDataSource->getUInt32(offset, &mTrackFragmentHeaderInfo.mSampleDescriptionIndex)) { return ERROR_MALFORMED; } offset += 4; size -= 4; } if (flags & TrackFragmentHeaderInfo::kDefaultSampleDurationPresent) { if (size < 4) { return -EINVAL; } if (!mDataSource->getUInt32(offset, &mTrackFragmentHeaderInfo.mDefaultSampleDuration)) { return ERROR_MALFORMED; } offset += 4; size -= 4; } if (flags & TrackFragmentHeaderInfo::kDefaultSampleSizePresent) { if (size < 4) { return -EINVAL; } if (!mDataSource->getUInt32(offset, &mTrackFragmentHeaderInfo.mDefaultSampleSize)) { return ERROR_MALFORMED; } offset += 4; size -= 4; } if (flags & TrackFragmentHeaderInfo::kDefaultSampleFlagsPresent) { if (size < 4) { return -EINVAL; } if (!mDataSource->getUInt32(offset, &mTrackFragmentHeaderInfo.mDefaultSampleFlags)) { return ERROR_MALFORMED; } offset += 4; size -= 4; } if (!(flags & TrackFragmentHeaderInfo::kBaseDataOffsetPresent)) { mTrackFragmentHeaderInfo.mBaseDataOffset = mCurrentMoofOffset; } mTrackFragmentHeaderInfo.mDataOffset = 0; return OK; } status_t MPEG4Source::parseTrackFragmentRun(off64_t offset, off64_t size) { ALOGV("MPEG4Extractor::parseTrackFragmentRun"); if (size < 8) { return -EINVAL; } enum { kDataOffsetPresent = 0x01, kFirstSampleFlagsPresent = 0x04, kSampleDurationPresent = 0x100, kSampleSizePresent = 0x200, kSampleFlagsPresent = 0x400, kSampleCompositionTimeOffsetPresent = 0x800, }; uint32_t flags; if (!mDataSource->getUInt32(offset, &flags)) { return ERROR_MALFORMED; } ALOGV("fragment run flags: %08x", flags); if (flags & 0xff000000) { return -EINVAL; } if ((flags & kFirstSampleFlagsPresent) && (flags & kSampleFlagsPresent)) { // These two shall not be used together. return -EINVAL; } uint32_t sampleCount; if (!mDataSource->getUInt32(offset + 4, &sampleCount)) { return ERROR_MALFORMED; } offset += 8; size -= 8; uint64_t dataOffset = mTrackFragmentHeaderInfo.mDataOffset; uint32_t firstSampleFlags = 0; if (flags & kDataOffsetPresent) { if (size < 4) { return -EINVAL; } int32_t dataOffsetDelta; if (!mDataSource->getUInt32(offset, (uint32_t*)&dataOffsetDelta)) { return ERROR_MALFORMED; } dataOffset = mTrackFragmentHeaderInfo.mBaseDataOffset + dataOffsetDelta; offset += 4; size -= 4; } if (flags & kFirstSampleFlagsPresent) { if (size < 4) { return -EINVAL; } if (!mDataSource->getUInt32(offset, &firstSampleFlags)) { return ERROR_MALFORMED; } offset += 4; size -= 4; } uint32_t sampleDuration = 0, sampleSize = 0, sampleFlags = 0, sampleCtsOffset = 0; size_t bytesPerSample = 0; if (flags & kSampleDurationPresent) { bytesPerSample += 4; } else if (mTrackFragmentHeaderInfo.mFlags & TrackFragmentHeaderInfo::kDefaultSampleDurationPresent) { sampleDuration = mTrackFragmentHeaderInfo.mDefaultSampleDuration; } else { sampleDuration = mTrackFragmentHeaderInfo.mDefaultSampleDuration; } if (flags & kSampleSizePresent) { bytesPerSample += 4; } else if (mTrackFragmentHeaderInfo.mFlags & TrackFragmentHeaderInfo::kDefaultSampleSizePresent) { sampleSize = mTrackFragmentHeaderInfo.mDefaultSampleSize; } else { sampleSize = mTrackFragmentHeaderInfo.mDefaultSampleSize; } if (flags & kSampleFlagsPresent) { bytesPerSample += 4; } else if (mTrackFragmentHeaderInfo.mFlags & TrackFragmentHeaderInfo::kDefaultSampleFlagsPresent) { sampleFlags = mTrackFragmentHeaderInfo.mDefaultSampleFlags; } else { sampleFlags = mTrackFragmentHeaderInfo.mDefaultSampleFlags; } if (flags & kSampleCompositionTimeOffsetPresent) { bytesPerSample += 4; } else { sampleCtsOffset = 0; } if (size < sampleCount * bytesPerSample) { return -EINVAL; } Sample tmp; for (uint32_t i = 0; i < sampleCount; ++i) { if (flags & kSampleDurationPresent) { if (!mDataSource->getUInt32(offset, &sampleDuration)) { return ERROR_MALFORMED; } offset += 4; } if (flags & kSampleSizePresent) { if (!mDataSource->getUInt32(offset, &sampleSize)) { return ERROR_MALFORMED; } offset += 4; } if (flags & kSampleFlagsPresent) { if (!mDataSource->getUInt32(offset, &sampleFlags)) { return ERROR_MALFORMED; } offset += 4; } if (flags & kSampleCompositionTimeOffsetPresent) { if (!mDataSource->getUInt32(offset, &sampleCtsOffset)) { return ERROR_MALFORMED; } offset += 4; } ALOGV("adding sample %d at offset 0x%08llx, size %u, duration %u, " " flags 0x%08x", i + 1, dataOffset, sampleSize, sampleDuration, (flags & kFirstSampleFlagsPresent) && i == 0 ? firstSampleFlags : sampleFlags); tmp.offset = dataOffset; tmp.size = sampleSize; tmp.duration = sampleDuration; mCurrentSamples.add(tmp); dataOffset += sampleSize; } mTrackFragmentHeaderInfo.mDataOffset = dataOffset; return OK; } sp<MetaData> MPEG4Source::getFormat() { Mutex::Autolock autoLock(mLock); return mFormat; } size_t MPEG4Source::parseNALSize(const uint8_t *data) const { switch (mNALLengthSize) { case 1: return *data; case 2: return U16_AT(data); case 3: return ((size_t)data[0] << 16) | U16_AT(&data[1]); case 4: return U32_AT(data); } // This cannot happen, mNALLengthSize springs to life by adding 1 to // a 2-bit integer. CHECK(!"Should not be here."); return 0; } status_t MPEG4Source::read( MediaBuffer **out, const ReadOptions *options) { Mutex::Autolock autoLock(mLock); bool isSeekMode = false; CHECK(mStarted); if (mFirstMoofOffset > 0) { return fragmentedRead(out, options); } *out = NULL; int64_t targetSampleTimeUs = -1; int64_t seekTimeUs; ReadOptions::SeekMode mode; if (options && options->getSeekTo(&seekTimeUs, &mode)) { uint32_t findFlags = 0; switch (mode) { case ReadOptions::SEEK_PREVIOUS_SYNC: findFlags = SampleTable::kFlagBefore; break; case ReadOptions::SEEK_NEXT_SYNC: case ReadOptions::SEEK_VENDOR_OPT: findFlags = SampleTable::kFlagAfter; break; case ReadOptions::SEEK_CLOSEST_SYNC: case ReadOptions::SEEK_CLOSEST: findFlags = SampleTable::kFlagClosest; break; default: CHECK(!"Should not be here."); break; } isSeekMode = true; uint32_t sampleIndex; status_t err = mSampleTable->findSampleAtTime( seekTimeUs * mTimescale / 1000000, &sampleIndex, findFlags); if (mode == ReadOptions::SEEK_CLOSEST) { // We found the closest sample already, now we want the sync // sample preceding it (or the sample itself of course), even // if the subsequent sync sample is closer. findFlags = SampleTable::kFlagBefore; } uint32_t syncSampleIndex; if (err == OK) { err = mSampleTable->findSyncSampleNear( sampleIndex, &syncSampleIndex, findFlags); } ALOGV("syncSampleIndex:%d",syncSampleIndex); if (mode == ReadOptions::SEEK_VENDOR_OPT) { off64_t offset; size_t size; uint64_t cts; status_t err; uint32_t currSampleIndex = syncSampleIndex; int64_t offsetBefind; uint32_t left; uint32_t right; offsetBefind = options->getLateBy(); mSampleTable->getMetaDataForSample(currSampleIndex, &offset, &size, &cts); if(offset < offsetBefind) { left = currSampleIndex; right = mSampleTable->countSamples() - 1; while (left < right) { uint32_t center = (left + right) / 2; mSampleTable->getMetaDataForSample(center, &offset, &size, &cts); ALOGV("offsetBefind:0x%llx offset:0x%llx center:%d left:%d right:%d",offsetBefind, offset, center, left, right); if (offsetBefind < offset) { right = center; } else if (offsetBefind > offset) { left = center + 1; } else { left = center; break; } } currSampleIndex = left; mSampleTable->getMetaDataForSample(currSampleIndex, &offset, &size, &cts); } syncSampleIndex = sampleIndex = currSampleIndex; } uint64_t sampleTime; if (err == OK) { err = mSampleTable->getMetaDataForSample( sampleIndex, NULL, NULL, &sampleTime); } if (err != OK) { if (err == ERROR_OUT_OF_RANGE) { // An attempt to seek past the end of the stream would // normally cause this ERROR_OUT_OF_RANGE error. Propagating // this all the way to the MediaPlayer would cause abnormal // termination. Legacy behaviour appears to be to behave as if // we had seeked to the end of stream, ending normally. err = ERROR_END_OF_STREAM; } ALOGV("end of stream"); return err; } if (mode == ReadOptions::SEEK_CLOSEST) { targetSampleTimeUs = (sampleTime * 1000000ll) / mTimescale; } #if 0 uint32_t syncSampleTime; CHECK_EQ(OK, mSampleTable->getMetaDataForSample( syncSampleIndex, NULL, NULL, &syncSampleTime)); ALOGI("seek to time %lld us => sample at time %lld us, " "sync sample at time %lld us", seekTimeUs, sampleTime * 1000000ll / mTimescale, syncSampleTime * 1000000ll / mTimescale); #endif mCurrentSampleIndex = syncSampleIndex; if (mBuffer != NULL) { mBuffer->release(); mBuffer = NULL; } // fall through } off64_t offset; size_t size; uint64_t cts; bool isSyncSample; bool newBuffer = false; if (mBuffer == NULL) { newBuffer = true; status_t err = mSampleTable->getMetaDataForSample( mCurrentSampleIndex, &offset, &size, &cts, &isSyncSample); if (err != OK) { return err; } err = mGroup->acquire_buffer(&mBuffer); if (err != OK) { CHECK(mBuffer == NULL); return err; } } if (!mIsAVC || mWantsNALFragments) { if (newBuffer) { ssize_t num_bytes_read = mDataSource->readAt(offset, (uint8_t *)mBuffer->data(), size); if (num_bytes_read < (ssize_t)size) { mBuffer->release(); mBuffer = NULL; return ERROR_IO; } CHECK(mBuffer != NULL); mBuffer->set_range(0, size); mBuffer->meta_data()->clear(); mBuffer->meta_data()->setInt64( kKeyTime, ((int64_t)cts * 1000000) / mTimescale); if (isSeekMode) { //set video offset mBuffer->meta_data()->setInt64(kKeyOffset, offset); } if (targetSampleTimeUs >= 0) { mBuffer->meta_data()->setInt64( kKeyTargetTime, targetSampleTimeUs); } if (isSyncSample) { mBuffer->meta_data()->setInt32(kKeyIsSyncFrame, 1); } ++mCurrentSampleIndex; } if (!mIsAVC) { *out = mBuffer; mBuffer = NULL; return OK; } // Each NAL unit is split up into its constituent fragments and // each one of them returned in its own buffer. CHECK(mBuffer->range_length() >= mNALLengthSize); const uint8_t *src = (const uint8_t *)mBuffer->data() + mBuffer->range_offset(); size_t nal_size = parseNALSize(src); if (mBuffer->range_length() < mNALLengthSize + nal_size) { ALOGE("incomplete NAL unit."); mBuffer->release(); mBuffer = NULL; return ERROR_MALFORMED; } MediaBuffer *clone = mBuffer->clone(); CHECK(clone != NULL); clone->set_range(mBuffer->range_offset() + mNALLengthSize, nal_size); CHECK(mBuffer != NULL); mBuffer->set_range( mBuffer->range_offset() + mNALLengthSize + nal_size, mBuffer->range_length() - mNALLengthSize - nal_size); if (mBuffer->range_length() == 0) { mBuffer->release(); mBuffer = NULL; } *out = clone; return OK; } else { // Whole NAL units are returned but each fragment is prefixed by // the start code (0x00 00 00 01). ssize_t num_bytes_read = 0; int32_t drm = 0; bool usesDRM = (mFormat->findInt32(kKeyIsDRM, &drm) && drm != 0); if (usesDRM) { num_bytes_read = mDataSource->readAt(offset, (uint8_t*)mBuffer->data(), size); } else { num_bytes_read = mDataSource->readAt(offset, mSrcBuffer, size); } if (num_bytes_read < (ssize_t)size) { mBuffer->release(); mBuffer = NULL; return ERROR_IO; } if (usesDRM) { CHECK(mBuffer != NULL); mBuffer->set_range(0, size); } else { uint8_t *dstData = (uint8_t *)mBuffer->data(); size_t srcOffset = 0; size_t dstOffset = 0; while (srcOffset < size) { bool isMalFormed = (srcOffset + mNALLengthSize > size); size_t nalLength = 0; if (!isMalFormed) { nalLength = parseNALSize(&mSrcBuffer[srcOffset]); srcOffset += mNALLengthSize; isMalFormed = srcOffset + nalLength > size; } if (isMalFormed) { ALOGE("Video is malformed"); mBuffer->release(); mBuffer = NULL; return ERROR_MALFORMED; } if (nalLength == 0) { continue; } CHECK(dstOffset + 4 <= mBuffer->size()); dstData[dstOffset++] = 0; dstData[dstOffset++] = 0; dstData[dstOffset++] = 0; dstData[dstOffset++] = 1; memcpy(&dstData[dstOffset], &mSrcBuffer[srcOffset], nalLength); srcOffset += nalLength; dstOffset += nalLength; } CHECK_EQ(srcOffset, size); CHECK(mBuffer != NULL); mBuffer->set_range(0, dstOffset); } mBuffer->meta_data()->clear(); mBuffer->meta_data()->setInt64( kKeyTime, ((int64_t)cts * 1000000) / mTimescale); if (isSeekMode) { //set video offset mBuffer->meta_data()->setInt64(kKeyOffset, offset); } if (targetSampleTimeUs >= 0) { mBuffer->meta_data()->setInt64( kKeyTargetTime, targetSampleTimeUs); } if (isSyncSample) { mBuffer->meta_data()->setInt32(kKeyIsSyncFrame, 1); } ++mCurrentSampleIndex; *out = mBuffer; mBuffer = NULL; return OK; } } status_t MPEG4Source::fragmentedRead( MediaBuffer **out, const ReadOptions *options) { ALOGV("MPEG4Source::fragmentedRead"); CHECK(mStarted); *out = NULL; int64_t targetSampleTimeUs = -1; int64_t seekTimeUs; ReadOptions::SeekMode mode; if (options && options->getSeekTo(&seekTimeUs, &mode)) { int numSidxEntries = mSegments.size(); if (numSidxEntries != 0) { int64_t totalTime = 0; off64_t totalOffset = mFirstMoofOffset; for (int i = 0; i < numSidxEntries; i++) { const SidxEntry *se = &mSegments[i]; if (totalTime + se->mDurationUs > seekTimeUs) { // The requested time is somewhere in this segment if ((mode == ReadOptions::SEEK_NEXT_SYNC) || (mode == ReadOptions::SEEK_CLOSEST_SYNC && (seekTimeUs - totalTime) > (totalTime + se->mDurationUs - seekTimeUs))) { // requested next sync, or closest sync and it was closer to the end of // this segment totalTime += se->mDurationUs; totalOffset += se->mSize; } break; } totalTime += se->mDurationUs; totalOffset += se->mSize; } mCurrentMoofOffset = totalOffset; mCurrentSamples.clear(); mCurrentSampleIndex = 0; parseChunk(&totalOffset); mCurrentTime = totalTime * mTimescale / 1000000ll; } if (mBuffer != NULL) { mBuffer->release(); mBuffer = NULL; } // fall through } off64_t offset = 0; size_t size; uint32_t cts = 0; bool isSyncSample = false; bool newBuffer = false; if (mBuffer == NULL) { newBuffer = true; if (mCurrentSampleIndex >= mCurrentSamples.size()) { // move to next fragment Sample lastSample = mCurrentSamples[mCurrentSamples.size() - 1]; off64_t nextMoof = mNextMoofOffset; // lastSample.offset + lastSample.size; mCurrentMoofOffset = nextMoof; mCurrentSamples.clear(); mCurrentSampleIndex = 0; parseChunk(&nextMoof); if (mCurrentSampleIndex >= mCurrentSamples.size()) { return ERROR_END_OF_STREAM; } } const Sample *smpl = &mCurrentSamples[mCurrentSampleIndex]; offset = smpl->offset; size = smpl->size; cts = mCurrentTime; mCurrentTime += smpl->duration; isSyncSample = (mCurrentSampleIndex == 0); // XXX status_t err = mGroup->acquire_buffer(&mBuffer); if (err != OK) { CHECK(mBuffer == NULL); ALOGV("acquire_buffer returned %d", err); return err; } } const Sample *smpl = &mCurrentSamples[mCurrentSampleIndex]; const sp<MetaData> bufmeta = mBuffer->meta_data(); bufmeta->clear(); if (smpl->encryptedsizes.size()) { // store clear/encrypted lengths in metadata bufmeta->setData(kKeyPlainSizes, 0, smpl->clearsizes.array(), smpl->clearsizes.size() * 4); bufmeta->setData(kKeyEncryptedSizes, 0, smpl->encryptedsizes.array(), smpl->encryptedsizes.size() * 4); bufmeta->setData(kKeyCryptoIV, 0, smpl->iv, 16); // use 16 or the actual size? bufmeta->setInt32(kKeyCryptoDefaultIVSize, mDefaultIVSize); bufmeta->setInt32(kKeyCryptoMode, mCryptoMode); bufmeta->setData(kKeyCryptoKey, 0, mCryptoKey, 16); } if (!mIsAVC || mWantsNALFragments) { if (newBuffer) { ssize_t num_bytes_read = mDataSource->readAt(offset, (uint8_t *)mBuffer->data(), size); if (num_bytes_read < (ssize_t)size) { mBuffer->release(); mBuffer = NULL; ALOGV("i/o error"); return ERROR_IO; } CHECK(mBuffer != NULL); mBuffer->set_range(0, size); mBuffer->meta_data()->setInt64( kKeyTime, ((int64_t)cts * 1000000) / mTimescale); if (targetSampleTimeUs >= 0) { mBuffer->meta_data()->setInt64( kKeyTargetTime, targetSampleTimeUs); } if (isSyncSample) { mBuffer->meta_data()->setInt32(kKeyIsSyncFrame, 1); } ++mCurrentSampleIndex; } if (!mIsAVC) { *out = mBuffer; mBuffer = NULL; return OK; } // Each NAL unit is split up into its constituent fragments and // each one of them returned in its own buffer. CHECK(mBuffer->range_length() >= mNALLengthSize); const uint8_t *src = (const uint8_t *)mBuffer->data() + mBuffer->range_offset(); size_t nal_size = parseNALSize(src); if (mBuffer->range_length() < mNALLengthSize + nal_size) { ALOGE("incomplete NAL unit."); mBuffer->release(); mBuffer = NULL; return ERROR_MALFORMED; } MediaBuffer *clone = mBuffer->clone(); CHECK(clone != NULL); clone->set_range(mBuffer->range_offset() + mNALLengthSize, nal_size); CHECK(mBuffer != NULL); mBuffer->set_range( mBuffer->range_offset() + mNALLengthSize + nal_size, mBuffer->range_length() - mNALLengthSize - nal_size); if (mBuffer->range_length() == 0) { mBuffer->release(); mBuffer = NULL; } *out = clone; return OK; } else { ALOGV("whole NAL"); // Whole NAL units are returned but each fragment is prefixed by // the start code (0x00 00 00 01). ssize_t num_bytes_read = 0; int32_t drm = 0; bool usesDRM = (mFormat->findInt32(kKeyIsDRM, &drm) && drm != 0); if (usesDRM) { num_bytes_read = mDataSource->readAt(offset, (uint8_t*)mBuffer->data(), size); } else { num_bytes_read = mDataSource->readAt(offset, mSrcBuffer, size); } if (num_bytes_read < (ssize_t)size) { mBuffer->release(); mBuffer = NULL; ALOGV("i/o error"); return ERROR_IO; } if (usesDRM) { CHECK(mBuffer != NULL); mBuffer->set_range(0, size); } else { uint8_t *dstData = (uint8_t *)mBuffer->data(); size_t srcOffset = 0; size_t dstOffset = 0; while (srcOffset < size) { bool isMalFormed = (srcOffset + mNALLengthSize > size); size_t nalLength = 0; if (!isMalFormed) { nalLength = parseNALSize(&mSrcBuffer[srcOffset]); srcOffset += mNALLengthSize; isMalFormed = srcOffset + nalLength > size; } if (isMalFormed) { ALOGE("Video is malformed"); mBuffer->release(); mBuffer = NULL; return ERROR_MALFORMED; } if (nalLength == 0) { continue; } CHECK(dstOffset + 4 <= mBuffer->size()); dstData[dstOffset++] = 0; dstData[dstOffset++] = 0; dstData[dstOffset++] = 0; dstData[dstOffset++] = 1; memcpy(&dstData[dstOffset], &mSrcBuffer[srcOffset], nalLength); srcOffset += nalLength; dstOffset += nalLength; } CHECK_EQ(srcOffset, size); CHECK(mBuffer != NULL); mBuffer->set_range(0, dstOffset); } mBuffer->meta_data()->setInt64( kKeyTime, ((int64_t)cts * 1000000) / mTimescale); if (targetSampleTimeUs >= 0) { mBuffer->meta_data()->setInt64( kKeyTargetTime, targetSampleTimeUs); } if (isSyncSample) { mBuffer->meta_data()->setInt32(kKeyIsSyncFrame, 1); } ++mCurrentSampleIndex; *out = mBuffer; mBuffer = NULL; return OK; } } MPEG4Extractor::Track *MPEG4Extractor::findTrackByMimePrefix( const char *mimePrefix) { for (Track *track = mFirstTrack; track != NULL; track = track->next) { const char *mime; if (track->meta != NULL && track->meta->findCString(kKeyMIMEType, &mime) && !strncasecmp(mime, mimePrefix, strlen(mimePrefix))) { return track; } } return NULL; } static bool LegacySniffMPEG4( const sp<DataSource> &source, String8 *mimeType, float *confidence) { uint8_t header[8]; ssize_t n = source->readAt(4, header, sizeof(header)); if (n < (ssize_t)sizeof(header)) { return false; } if (!memcmp(header, "ftyp3gp", 7) || !memcmp(header, "ftypmp42", 8) || !memcmp(header, "ftyp3gr6", 8) || !memcmp(header, "ftyp3gs6", 8) || !memcmp(header, "ftyp3ge6", 8) || !memcmp(header, "ftyp3gg6", 8) || !memcmp(header, "ftypisom", 8) || !memcmp(header, "ftypM4V ", 8) || !memcmp(header, "ftypM4A ", 8) || !memcmp(header, "ftypf4v ", 8) || !memcmp(header, "ftypkddi", 8) || !memcmp(header, "ftypM4VP", 8)) { *mimeType = MEDIA_MIMETYPE_CONTAINER_MPEG4; *confidence = 0.4; return true; } return false; } static bool isCompatibleBrand(uint32_t fourcc) { static const uint32_t kCompatibleBrands[] = { FOURCC('i', 's', 'o', 'm'), FOURCC('i', 's', 'o', '2'), FOURCC('a', 'v', 'c', '1'), FOURCC('3', 'g', 'p', '4'), FOURCC('m', 'p', '4', '1'), FOURCC('m', 'p', '4', '2'), // Won't promise that the following file types can be played. // Just give these file types a chance. FOURCC('q', 't', ' ', ' '), // Apple's QuickTime FOURCC('M', 'S', 'N', 'V'), // Sony's PSP FOURCC('3', 'g', '2', 'a'), // 3GPP2 FOURCC('3', 'g', '2', 'b'), }; for (size_t i = 0; i < sizeof(kCompatibleBrands) / sizeof(kCompatibleBrands[0]); ++i) { if (kCompatibleBrands[i] == fourcc) { return true; } } return false; } // Attempt to actually parse the 'ftyp' atom and determine if a suitable // compatible brand is present. // Also try to identify where this file's metadata ends // (end of the 'moov' atom) and report it to the caller as part of // the metadata. static bool BetterSniffMPEG4( const sp<DataSource> &source, String8 *mimeType, float *confidence, sp<AMessage> *meta) { // We scan up to 128 bytes to identify this file as an MP4. static const off64_t kMaxScanOffset = 128ll; off64_t offset = 0ll; bool foundGoodFileType = false; off64_t moovAtomEndOffset = -1ll; bool done = false; while (!done && offset < kMaxScanOffset) { uint32_t hdr[2]; if (source->readAt(offset, hdr, 8) < 8) { return false; } uint64_t chunkSize = ntohl(hdr[0]); uint32_t chunkType = ntohl(hdr[1]); off64_t chunkDataOffset = offset + 8; if (chunkSize == 1) { if (source->readAt(offset + 8, &chunkSize, 8) < 8) { return false; } chunkSize = ntoh64(chunkSize); chunkDataOffset += 8; if (chunkSize < 16) { // The smallest valid chunk is 16 bytes long in this case. return false; } } else if (chunkSize < 8) { // The smallest valid chunk is 8 bytes long. return false; } off64_t chunkDataSize = offset + chunkSize - chunkDataOffset; char chunkstring[5]; MakeFourCCString(chunkType, chunkstring); ALOGV("saw chunk type %s, size %lld @ %lld", chunkstring, chunkSize, offset); switch (chunkType) { case FOURCC('f', 't', 'y', 'p'): { if (chunkDataSize < 8) { return false; } uint32_t numCompatibleBrands = (chunkDataSize - 8) / 4; for (size_t i = 0; i < numCompatibleBrands + 2; ++i) { if (i == 1) { // Skip this index, it refers to the minorVersion, // not a brand. continue; } uint32_t brand; if (source->readAt( chunkDataOffset + 4 * i, &brand, 4) < 4) { return false; } brand = ntohl(brand); if (isCompatibleBrand(brand)) { foundGoodFileType = true; break; } } if (!foundGoodFileType) { return false; } break; } case FOURCC('m', 'o', 'o', 'v'): { moovAtomEndOffset = offset + chunkSize; done = true; break; } default: break; } offset += chunkSize; } if (!foundGoodFileType) { return false; } *mimeType = MEDIA_MIMETYPE_CONTAINER_MPEG4; *confidence = 0.4f; if (moovAtomEndOffset >= 0) { *meta = new AMessage; (*meta)->setInt64("meta-data-size", moovAtomEndOffset); ALOGV("found metadata size: %lld", moovAtomEndOffset); } return true; } bool SniffMPEG4( const sp<DataSource> &source, String8 *mimeType, float *confidence, sp<AMessage> *meta) { if (BetterSniffMPEG4(source, mimeType, confidence, meta)) { return true; } if (LegacySniffMPEG4(source, mimeType, confidence)) { ALOGW("Identified supported mpeg4 through LegacySniffMPEG4."); return true; } return false; } } // namespace android
[ "mingxin.android@gmail.com" ]
mingxin.android@gmail.com
da6e4ed1e372839336cce6e9bb72163d172dbc83
5a60d60fca2c2b8b44d602aca7016afb625bc628
/aws-cpp-sdk-iotwireless/include/aws/iotwireless/model/UpdateMulticastGroupResult.h
f85c482714cb83e0fa4b1546f76b8f8ad5f045a4
[ "Apache-2.0", "MIT", "JSON" ]
permissive
yuatpocketgems/aws-sdk-cpp
afaa0bb91b75082b63236cfc0126225c12771ed0
a0dcbc69c6000577ff0e8171de998ccdc2159c88
refs/heads/master
2023-01-23T10:03:50.077672
2023-01-04T22:42:53
2023-01-04T22:42:53
134,497,260
0
1
null
2018-05-23T01:47:14
2018-05-23T01:47:14
null
UTF-8
C++
false
false
836
h
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/iotwireless/IoTWireless_EXPORTS.h> namespace Aws { template<typename RESULT_TYPE> class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace IoTWireless { namespace Model { class UpdateMulticastGroupResult { public: AWS_IOTWIRELESS_API UpdateMulticastGroupResult(); AWS_IOTWIRELESS_API UpdateMulticastGroupResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); AWS_IOTWIRELESS_API UpdateMulticastGroupResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result); }; } // namespace Model } // namespace IoTWireless } // namespace Aws
[ "aws-sdk-cpp-automation@github.com" ]
aws-sdk-cpp-automation@github.com
8e4644d8ee8c7b2a9424b34b2237b25f72f86bfc
70d766a32d6ffda9884d019ecdc9689ee5410ff7
/main.cpp
f55c87a332bb9a3dec9a35b505dd79aad2b61602
[]
no_license
hG3n/glwarp-nocapture
458af28105aef9f33661316920f0a11c23400d6a
223f76102f09459d4b1eacc35df56cb2049161a6
refs/heads/master
2020-03-21T00:40:55.704260
2018-06-20T15:18:16
2018-06-20T15:18:16
125,246,694
0
0
null
null
null
null
UTF-8
C++
false
false
24,039
cpp
// Include standard headers #include <iostream> #include <vector> #include <map> #include <fstream> // GL stuff #include <GL/glew.h> #include <GLFW/glfw3.h> // Include GLM #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <sstream> // gl globals GLFWwindow *glfw_window; int SCREEN_WIDTH = (int) 1920; int SCREEN_HEIGHT = (int) 1080; bool paused = false; bool show_points = false; bool running = true; int triangle_count; GLuint vtx_buffer; GLuint tex_buffer; float move_factor = 0.0001f; float rotation_factor = 0.0001f; glm::vec3 model_position(0.0f, 0.0f, 1.0f); glm::vec3 model_rotation(0.0f, 0.0f, 0.00f); glm::mat4 MVP; // function callbacks void loadTransformationValues(); void calculateView(glm::vec3, glm::vec3); GLuint LoadShaders(const char *, const char *); bool loadFile(const char *, std::vector<glm::vec3> *); GLuint setup_vertices(const char *filepath, int *triangle_count); GLuint setup_tex_coords(const char *filepath); GLuint loadBMP_custom(const char *); float mapToRange(float value, float in_min, float in_max, float out_min, float out_max); bool initializeGLContext(bool show_polys, bool with_vsync); void key_callback(GLFWwindow *window, int key, int scancode, int action, int mods); void handle_framewise_key_input(); int main(int argc, char *argv[]) { // get system arguments const char *texture_file = argv[1]; bool show_polys = (bool) argv[2]; initializeGLContext(show_polys, false); GLuint vertex_array_id; glGenVertexArrays(1, &vertex_array_id); glBindVertexArray(vertex_array_id); // load shaders GLuint program_id = LoadShaders("simple.vert", "simple.frag"); GLint matrix_id = glGetUniformLocation(program_id, "MVP"); GLuint tex = loadBMP_custom(texture_file); GLint tex_id = glGetUniformLocation(program_id, "myTextureSampler"); calculateView(model_position, model_rotation); loadTransformationValues(); bool paused = false; while (running && glfwWindowShouldClose(glfw_window) == 0) { // Clear the screen glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); if (!paused) { // use shader glUseProgram(program_id); // send transformations to shader glUniformMatrix4fv(matrix_id, 1, GL_FALSE, &MVP[0][0]); /** * specify vertex arrays of vertices and uv's * draw finally */ glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, tex); glUniform1i(tex_id, 0); // specify vertex arrays of vertices and uv's glEnableVertexAttribArray(0); glBindBuffer(GL_ARRAY_BUFFER, vtx_buffer); glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, (void *) 0); glEnableVertexAttribArray(1); glBindBuffer(GL_ARRAY_BUFFER, tex_buffer); glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 0, (void *) 0); if (show_points) { glDrawArrays(GL_POINTS, 0, triangle_count * 3); } else if (!show_points) { glDrawArrays(GL_TRIANGLES, 0, triangle_count * 3); } // draw glDisableVertexAttribArray(0); glDisableVertexAttribArray(1); } // Swap buffers glfwSwapBuffers(glfw_window); glfwPollEvents(); handle_framewise_key_input(); // check for keyboard input if (glfwGetKey(glfw_window, GLFW_KEY_ESCAPE) == GLFW_PRESS || glfwGetKey(glfw_window, GLFW_KEY_Q) == GLFW_PRESS) { running = false; } } // Cleanup VBO and shader glDeleteBuffers(1, &vtx_buffer); glDeleteBuffers(1, &tex_buffer); glDeleteProgram(program_id); glDeleteTextures(1, &tex); glDeleteVertexArrays(1, &vertex_array_id); // Close OpenGL glfw_window and terminate GLFW glfwTerminate(); return 0; } void key_callback(GLFWwindow *window, int key, int scancode, int action, int mods) { if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) running = false; if (key == GLFW_KEY_R && action == GLFW_PRESS) { loadTransformationValues(); } if (key == GLFW_KEY_1 && action == GLFW_PRESS) { move_factor /= 10; } if (key == GLFW_KEY_2 && action == GLFW_PRESS) { move_factor *= 10; } if (key == GLFW_KEY_3 && action == GLFW_PRESS) { rotation_factor /= 10; } if (key == GLFW_KEY_4 && action == GLFW_PRESS) { rotation_factor *= 10; } if (key == GLFW_KEY_I && action == GLFW_PRESS) { std::cout << "model position: " << model_position.x << " " << model_position.y << " " << model_position.z << std::endl; } if (key == GLFW_KEY_X && action == GLFW_PRESS) { model_position = glm::vec3(0.0f, 0.0f, 0.0f); model_rotation = glm::vec3(0.0f, 0.0f, 0.0f); calculateView(model_position, model_rotation); } if (glfwGetKey(glfw_window, GLFW_KEY_SPACE) == GLFW_PRESS) { if (paused) { std::cout << "Stop pause" << std::endl; paused = false; } else { std::cout << "Start pause" << std::endl; paused = true; } } } void handle_framewise_key_input() { if (glfwGetKey(glfw_window, GLFW_KEY_W) == GLFW_PRESS) { model_position.z -= move_factor; calculateView(model_position, model_rotation); } if (glfwGetKey(glfw_window, GLFW_KEY_S) == GLFW_PRESS) { model_position.z += move_factor; calculateView(model_position, model_rotation); } if (glfwGetKey(glfw_window, GLFW_KEY_A) == GLFW_PRESS) { model_position.x -= move_factor; calculateView(model_position, model_rotation); } if (glfwGetKey(glfw_window, GLFW_KEY_D) == GLFW_PRESS) { model_position.x += move_factor; calculateView(model_position, model_rotation); } if (glfwGetKey(glfw_window, GLFW_KEY_J) == GLFW_PRESS) { model_position.y -= move_factor; calculateView(model_position, model_rotation); } if (glfwGetKey(glfw_window, GLFW_KEY_K) == GLFW_PRESS) { model_position.y += move_factor; calculateView(model_position, model_rotation); } if (glfwGetKey(glfw_window, GLFW_KEY_H) == GLFW_PRESS) { model_rotation.x += rotation_factor; calculateView(model_position, model_rotation); } if (glfwGetKey(glfw_window, GLFW_KEY_L) == GLFW_PRESS) { model_rotation.x -= rotation_factor; calculateView(model_position, model_rotation); } } void loadTransformationValues() { triangle_count = 0; vtx_buffer = setup_vertices("current.mesh", &triangle_count); tex_buffer = setup_tex_coords("current.tex"); } void calculateView(glm::vec3 model_pos, glm::vec3 model_rot) { // projection matrix glm::mat4 projection = glm::perspective(glm::radians(45.0f), 16.0f / 9.0f, 0.1f, 100.0f); // camera matrix glm::mat4 view = glm::lookAt( glm::vec3(0.0, 0.0, 0.0), // camera pos world space glm::vec3(0.0, 0.0, 100.0), // camera lookat glm::vec3(0, 1, 0) // up-vec ); // model glm::mat4 model = glm::mat4(1.0f); model = glm::translate(model, model_pos); model = glm::translate(model, glm::vec3(-model_pos)); model = glm::rotate(model, model_rot.x, glm::vec3(1, 0, 0)); model = glm::translate(model, glm::vec3(model_pos)); // build mvp MVP = projection * view * model; } /** * Initialize GL context * @param show_polys * @param with_vsync * @return */ bool initializeGLContext(bool show_polys, bool with_vsync) { // Initialise GLFW if (!glfwInit()) { fprintf(stderr, "Failed to initialize GLFW\n"); return -1; } glfwWindowHint(GLFW_SAMPLES, 4); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // To make MacOS happy; should not be needed glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); // Open a glfw_window and create its OpenGL context const GLFWvidmode *mode = glfwGetVideoMode(glfwGetPrimaryMonitor()); int width = mode->width; int height = mode->height; glfw_window = glfwCreateWindow(SCREEN_WIDTH, SCREEN_HEIGHT, "GLWarp", nullptr, nullptr); if (glfw_window == nullptr) { fprintf(stderr, "Failed to open GLFW glfw_window\n"); glfwTerminate(); return -1; } glfwMakeContextCurrent(glfw_window); // Initialize GLEW glewExperimental = GL_TRUE; // Needed for core profile if (glewInit() != GLEW_OK) { fprintf(stderr, "Failed to initialize GLEW\n"); return -1; } // input settings glfwSetInputMode(glfw_window, GLFW_STICKY_KEYS, GL_TRUE); glfwSetKeyCallback(glfw_window, key_callback); // init GL settings glEnable(GL_DEPTH_TEST); // enable depth test glDepthFunc(GL_LESS); // Accept fragment if it closer to the camera than the former one glEnable(GL_PROGRAM_POINT_SIZE); // set show polys flag to show vertice grid if (show_polys) { glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); } glfwSwapInterval(0); if (with_vsync) { glfwSwapInterval(1); } glClearColor(0.0f, 0.0f, 0.0f, 0.0f); } /** * load file from harddisk * @param filepath */ bool loadFile(const char *filepath, std::vector<glm::vec3> *to_fill) { std::ifstream f; std::string s; f.open(filepath, std::ios::in); if (f.is_open()) { std::cout << "Loading file: '" << filepath << "'!" << std::endl; while (!f.eof()) { getline(f, s); std::istringstream iss(s); float x, y, z; iss >> x >> y >> z; // append to input vector to_fill->push_back(glm::vec3(x, y, z)); } return true; } else { std::cout << "Error loading file: '" << filepath << "'!" << std::endl; return false; } } float mapToRange(float value, float in_min, float in_max, float out_min, float out_max) { return (value - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; } void mapVecToRange(std::vector<glm::vec3> *vec) { float min_val_x = 999999; float max_val_x = -999999; float min_val_y = 999999; float max_val_y = -999999; for (auto item : *vec) { if (item.x < min_val_x) { min_val_x = item.x; } if (item.x > max_val_x && item.x < 1000.0f) { max_val_x = item.x; } if (item.y < min_val_y) { min_val_y = item.y; } if (item.y > max_val_y) { max_val_y = item.y; } } // map to dome grid to -1.0 to 1.0 for (int i = 0; i < vec->size(); ++i) { float x, y, z; x = mapToRange(vec->at(i).x, min_val_x, max_val_x, -1.0f, 1.0f); y = mapToRange(vec->at(i).y, min_val_y, max_val_y, -1.0f, 1.0f); vec->at(i) = glm::vec3(x, y, vec->at(i).z); } } GLuint LoadShaders(const char *vertex_file_path, const char *fragment_file_path) { // Create the shaders GLuint VertexShaderID = glCreateShader(GL_VERTEX_SHADER); GLuint FragmentShaderID = glCreateShader(GL_FRAGMENT_SHADER); // Read the Vertex Shader code from the file std::string VertexShaderCode; std::ifstream VertexShaderStream(vertex_file_path, std::ios::in); if (VertexShaderStream.is_open()) { std::string Line = ""; while (getline(VertexShaderStream, Line)) VertexShaderCode += "\n" + Line; VertexShaderStream.close(); } else { printf("Impossible to open %s. Are you in the right directory ? Don't forget to read the FAQ !\n", vertex_file_path); getchar(); return 0; } // Read the Fragment Shader code from the file std::string FragmentShaderCode; std::ifstream FragmentShaderStream(fragment_file_path, std::ios::in); if (FragmentShaderStream.is_open()) { std::string Line = ""; while (getline(FragmentShaderStream, Line)) FragmentShaderCode += "\n" + Line; FragmentShaderStream.close(); } GLint Result = GL_FALSE; int InfoLogLength; // Compile Vertex Shader printf("Compiling shader : %s\n", vertex_file_path); char const *VertexSourcePointer = VertexShaderCode.c_str(); glShaderSource(VertexShaderID, 1, &VertexSourcePointer, NULL); glCompileShader(VertexShaderID); // Check Vertex Shader glGetShaderiv(VertexShaderID, GL_COMPILE_STATUS, &Result); glGetShaderiv(VertexShaderID, GL_INFO_LOG_LENGTH, &InfoLogLength); if (InfoLogLength > 0) { std::vector<char> VertexShaderErrorMessage(InfoLogLength + 1); glGetShaderInfoLog(VertexShaderID, InfoLogLength, NULL, &VertexShaderErrorMessage[0]); printf("%s\n", &VertexShaderErrorMessage[0]); } // Compile Fragment Shader printf("Compiling shader : %s\n", fragment_file_path); char const *FragmentSourcePointer = FragmentShaderCode.c_str(); glShaderSource(FragmentShaderID, 1, &FragmentSourcePointer, NULL); glCompileShader(FragmentShaderID); // Check Fragment Shader glGetShaderiv(FragmentShaderID, GL_COMPILE_STATUS, &Result); glGetShaderiv(FragmentShaderID, GL_INFO_LOG_LENGTH, &InfoLogLength); if (InfoLogLength > 0) { std::vector<char> FragmentShaderErrorMessage(InfoLogLength + 1); glGetShaderInfoLog(FragmentShaderID, InfoLogLength, NULL, &FragmentShaderErrorMessage[0]); printf("%s\n", &FragmentShaderErrorMessage[0]); } // Link the program printf("Linking program\n"); GLuint ProgramID = glCreateProgram(); glAttachShader(ProgramID, VertexShaderID); glAttachShader(ProgramID, FragmentShaderID); glLinkProgram(ProgramID); // Check the program glGetProgramiv(ProgramID, GL_LINK_STATUS, &Result); glGetProgramiv(ProgramID, GL_INFO_LOG_LENGTH, &InfoLogLength); if (InfoLogLength > 0) { std::vector<char> ProgramErrorMessage(InfoLogLength + 1); glGetProgramInfoLog(ProgramID, InfoLogLength, NULL, &ProgramErrorMessage[0]); printf("%s\n", &ProgramErrorMessage[0]); } glDetachShader(ProgramID, VertexShaderID); glDetachShader(ProgramID, FragmentShaderID); glDeleteShader(VertexShaderID); glDeleteShader(FragmentShaderID); return ProgramID; } GLuint loadBMP_custom(const char *imagepath) { printf("Reading image %s\n", imagepath); // Data read from the header of the BMP file unsigned char header[54]; unsigned int dataPos; unsigned int imageSize; unsigned int width, height; // Actual RGB data unsigned char *data; // Open the file FILE *file = fopen(imagepath, "rb"); if (!file) { printf("%s could not be opened. Are you in the right directory ? Don't forget to read the FAQ !\n", imagepath); getchar(); return 0; } // Read the header, i.e. the 54 first bytes // If less than 54 bytes are read, problem if (fread(header, 1, 54, file) != 54) { printf("Not a correct BMP file\n"); fclose(file); return 0; } // A BMP files always begins with "BM" if (header[0] != 'B' || header[1] != 'M') { printf("Not a correct BMP file\n"); fclose(file); return 0; } // Make sure this is a 24bpp file if (*(int *) &(header[0x1E]) != 0) { printf("Not a correct BMP file\n"); fclose(file); return 0; } if (*(int *) &(header[0x1C]) != 24) { printf("Not a correct BMP file\n"); fclose(file); return 0; } // Read the information about the image dataPos = *(int *) &(header[0x0A]); imageSize = *(int *) &(header[0x22]); width = *(int *) &(header[0x12]); height = *(int *) &(header[0x16]); // Some BMP files are misformatted, guess missing information if (imageSize == 0) imageSize = width * height * 3; // 3 : one byte for each Red, Green and Blue component if (dataPos == 0) dataPos = 54; // The BMP header is done that way // Create a buffer data = new unsigned char[imageSize]; // Read the actual data from the file into the buffer fread(data, 1, imageSize, file); // Everything is in memory now, the file can be closed. fclose(file); // Create one OpenGL texture GLuint textureID; glGenTextures(1, &textureID); // "Bind" the newly created texture : all future texture functions will modify this texture glBindTexture(GL_TEXTURE_2D, textureID); // Give the image to OpenGL glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_BGR, GL_UNSIGNED_BYTE, data); // OpenGL has now copied the data. Free our own version delete[] data; // Poor filtering, or ... glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); // ... nice trilinear filtering ... // glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); // glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); // glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); // ... which requires mipmaps. Generate them automatically. glGenerateMipmap(GL_TEXTURE_2D); // Return the ID of the texture we just created return textureID; } GLuint setup_vertices(const char *filepath, int *triangle_count) { std::vector<glm::vec3> mesh; // setup mesh loadFile(filepath, &mesh); // get meta information about calculated auto circle_count = (int) mesh.back().x; auto points_per_circle = (int) mesh.back().y; auto point_count = (int) mesh.back().z; std::cout << "circle count: " << circle_count << " points_per_circle: " << points_per_circle << std::endl; mesh.pop_back(); mesh.pop_back(); //mapVecToRange(&mesh); std::cout << "blue size: " << mesh.size() << " read point count: " << point_count << std::endl; if (mesh.size() != point_count) { std::cout << "Warp points do not match" << std::endl; return -1; } // IF HAGEN SWITCHES HIS ZERO COORDS AGAIN JUST SLAP HIM IN THE FACE // for (int i = 0; i < mesh.size(); ++i) { // mesh[i].y = mesh[i].z; // mesh[i].z = 0.0f; // } std::vector<glm::vec3> mesh_vec; // create mesh for (int circle_idx = 0; circle_idx < circle_count; ++circle_idx) { if (circle_idx == 0) { for (int t = 1; t < points_per_circle + 1; ++t) { // start triangles around center //std::cout << 0 << " " << t << " " << 1 + (t % points_per_circle) << std::endl; int i1 = 0; int i2 = t; int i3 = 1 + (t % points_per_circle); mesh_vec.push_back(mesh[i1]); mesh_vec.push_back(mesh[i2]); mesh_vec.push_back(mesh[i3]); *triangle_count += 1; } } else { int start_point = circle_idx * points_per_circle - (points_per_circle - 1); for (int idx = 0; idx < points_per_circle; ++idx) { int i1 = start_point + idx; int i2 = start_point + idx + points_per_circle; int i3 = start_point + (idx + 1) % points_per_circle; mesh_vec.push_back(mesh[i1]); mesh_vec.push_back(mesh[i2]); mesh_vec.push_back(mesh[i3]); //std::cout << i1<< " " << i2 << " " << i3 << std::endl; int i4 = start_point + (idx + 1) % points_per_circle; int i5 = start_point + idx + points_per_circle; int i6 = start_point + ((idx + 1) % points_per_circle) + points_per_circle; mesh_vec.push_back(mesh[i4]); mesh_vec.push_back(mesh[i5]); mesh_vec.push_back(mesh[i6]); //std::cout << i4 << " " << i5<< " " << i6 << std::endl; *triangle_count += 2; } } } // create buffers GLuint vertex_buffer; glGenBuffers(1, &vertex_buffer); glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer); glBufferData(GL_ARRAY_BUFFER, mesh_vec.size() * sizeof(glm::vec3), &mesh_vec[0], GL_STATIC_DRAW); return vertex_buffer; } GLuint setup_tex_coords(const char *filepath) { std::vector<glm::vec3> uv_coords; // setup mesh loadFile(filepath, &uv_coords); // get meta information about calculated auto circle_count = (int) uv_coords.back().x; auto points_per_circle = (int) uv_coords.back().y; auto point_count = (int) uv_coords.back().z; uv_coords.pop_back(); uv_coords.pop_back(); // IF HAGEN SWITCHES HIS ZERO COORDS AGAIN JUST SLAP HIM IN THE FACE // for (int i = 0; i < uv_coords.size(); ++i) { // uv_coords[i].y = uv_coords[i].z; // uv_coords[i].z = 0.0f; // } std::cout << "red size: " << uv_coords.size() << " read point count: " << point_count << std::endl; //mapVecToRange(&uv_coords); std::vector<glm::vec2> tex_vec; for (int circle_idx = 0; circle_idx < circle_count; ++circle_idx) { if (circle_idx == 0) { for (int t = 1; t < points_per_circle + 1; ++t) { // start triangles around center //std::cout << 0 << " " << t << " " << 1 + (t % points_per_circle) << std::endl; int i1 = 0; int i2 = t; int i3 = 1 + (t % points_per_circle); //float u = mapToRange(uv_coords[i1].x, min_pos_x, max_pos_x, 0.0f, 1.0f); float u = uv_coords[i1].x; float v = uv_coords[i1].y; tex_vec.emplace_back(glm::vec2(u, v)); u = uv_coords[i2].x; v = uv_coords[i2].y; tex_vec.emplace_back(glm::vec2(u, v)); u = uv_coords[i3].x; v = uv_coords[i3].y; tex_vec.emplace_back(glm::vec2(u, v)); } } else { int start_point = circle_idx * points_per_circle - (points_per_circle - 1); for (int idx = 0; idx < points_per_circle; ++idx) { int i1 = start_point + idx; int i2 = start_point + idx + points_per_circle; int i3 = start_point + (idx + 1) % points_per_circle; float u = uv_coords[i1].x; float v = uv_coords[i1].y; tex_vec.emplace_back(glm::vec2(u, v)); u = uv_coords[i2].x; v = uv_coords[i2].y; tex_vec.emplace_back(glm::vec2(u, v)); u = uv_coords[i3].x; v = uv_coords[i3].y; tex_vec.emplace_back(glm::vec2(u, v)); //std::cout << i1<< " " << i2 << " " << i3 << std::endl; int i4 = start_point + (idx + 1) % points_per_circle; int i5 = start_point + idx + points_per_circle; int i6 = start_point + ((idx + 1) % points_per_circle) + points_per_circle; u = uv_coords[i4].x; v = uv_coords[i4].y; tex_vec.emplace_back(glm::vec2(u, v)); u = uv_coords[i5].x; v = uv_coords[i5].y; tex_vec.emplace_back(glm::vec2(u, v)); u = uv_coords[i6].x; v = uv_coords[i6].y; tex_vec.emplace_back(glm::vec2(u, v)); //std::cout << i4 << " " << i5<< " " << i6 << std::endl; } } } GLuint uv_buffer; glGenBuffers(1, &uv_buffer); glBindBuffer(GL_ARRAY_BUFFER, uv_buffer); glBufferData(GL_ARRAY_BUFFER, tex_vec.size() * sizeof(glm::vec2), &tex_vec[0], GL_STATIC_DRAW); return uv_buffer; }
[ "haghiller@gmail.com" ]
haghiller@gmail.com
50fa37d0e92a84e60ef30d6769214626706f45d6
49282f9d9db0c4094e68bed7eeaf6ed2bf14f868
/hackerrank/corectness-invariant.cpp
f5aff233e369fe12d3341b2eca346559cc13f9d3
[ "LicenseRef-scancode-other-permissive", "MIT" ]
permissive
anuragaryan/Competitive-Programming
f5d323539e1a943b070b76ff67440bdbad8b2a9c
f135c68080fa24e9fc92e622652ec3329c435fdc
refs/heads/master
2016-09-15T09:53:19.511547
2016-03-17T01:12:09
2016-03-17T01:12:09
40,020,265
1
0
null
null
null
null
UTF-8
C++
false
false
363
cpp
#include<iostream> #include<cstdio> using namespace std; int main() { int s; scanf("%d",&s); int ar[s]; for(int i=0;i<s;i++) scanf("%d",&ar[i]); for(int i=1;i<s;i++){ int j=i; while(j>0 && ar[i]<ar[j-1]) j--; int tmp=ar[i]; for(int k=i;k>j;k--) ar[k]=ar[k-1]; ar[j]=tmp; } for(int j=0;j<s;j++) printf("%d ",ar[j]); printf("\n"); }
[ "anurag.aryan2011@gmail.com" ]
anurag.aryan2011@gmail.com
42454772497329acafd1bc32393e3fbcfdebc10f
ad330b95864c422097bd14edd70d998b4bf233b5
/common/GameObjects/Product.cpp
e2821e3a429b26181ad3161653d0a5228d7b021d
[]
no_license
eugeneus/sg
bfbfaf455f9a0b683be42c87f57b1b750bb49f77
c0cc614fb95dba43cfb6b490175c092a5071c7de
refs/heads/master
2021-06-04T00:43:30.986941
2019-07-22T20:26:02
2019-07-22T20:26:02
26,199,765
0
0
null
null
null
null
UTF-8
C++
false
false
536
cpp
#include "Product.h" USING_NS_CC; Product::Product(){} Product::~Product() {} Product* Product::create(const std::string aFileName, cocos2d::Point aRelativePos, float aRelativeSizeFactor) { Product* pRet = new Product(); if (!pRet->init(aFileName,aRelativePos,aRelativeSizeFactor)) { delete pRet; pRet = nullptr; } return pRet; } //bool Product::init() //{ // return true; //} void Product::setTypeID(int aTypeID) { _typeID = aTypeID; } int Product::getTypeID() { return _typeID; }
[ "yaugeny@yahoo.com" ]
yaugeny@yahoo.com
98ae1186514f777df10e50cadd5c9b75971c9680
3957b233b9c048cd294f620bf812d3254787605e
/build/JuceLibraryCode/include_juce_audio_plugin_client_Standalone.cpp
0a1509bf1abcd2908461f12c6175572898be00e7
[]
no_license
vincent-chenzhun-huang/Synthesizer
1a5207d58dc1b6bb5909652fcceda5bb6eb39876
555e02e1ec488d7ab9f88d5a10b517fc1e8a3bf9
refs/heads/master
2023-01-23T06:13:28.828887
2020-12-07T21:08:50
2020-12-07T21:08:50
null
0
0
null
null
null
null
UTF-8
C++
false
false
257
cpp
/* IMPORTANT! This file is auto-generated each time you run cmake on your project - if you alter its contents, your changes may be overwritten! */ #include "AppConfig.h" #include <juce_audio_plugin_client/juce_audio_plugin_client_Standalone.cpp>
[ "chenzhun.huang@mail.mcgill.ca" ]
chenzhun.huang@mail.mcgill.ca
76469e0c13a13f3ae3289715b66b7e0e9caed636
5c8a0d7752e7c37e207f28a7e03d96a5011f8d68
/MapTweet/iOS/Classes/Native/System_System_Net_Security_AuthenticatedStream1183414097.h
0b936eedc1c1f1e3c36817399a68a7215982d205
[]
no_license
anothercookiecrumbles/ar_storytelling
8119ed664c707790b58fbb0dcf75ccd8cf9a831b
002f9b8d36a6f6918f2d2c27c46b893591997c39
refs/heads/master
2021-01-18T20:00:46.547573
2017-03-10T05:39:49
2017-03-10T05:39:49
84,522,882
1
0
null
null
null
null
UTF-8
C++
false
false
1,675
h
#pragma once #include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <stdint.h> // System.IO.Stream struct Stream_t3255436806; #include "mscorlib_System_IO_Stream3255436806.h" #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Net.Security.AuthenticatedStream struct AuthenticatedStream_t1183414097 : public Stream_t3255436806 { public: // System.IO.Stream System.Net.Security.AuthenticatedStream::innerStream Stream_t3255436806 * ___innerStream_1; // System.Boolean System.Net.Security.AuthenticatedStream::leaveStreamOpen bool ___leaveStreamOpen_2; public: inline static int32_t get_offset_of_innerStream_1() { return static_cast<int32_t>(offsetof(AuthenticatedStream_t1183414097, ___innerStream_1)); } inline Stream_t3255436806 * get_innerStream_1() const { return ___innerStream_1; } inline Stream_t3255436806 ** get_address_of_innerStream_1() { return &___innerStream_1; } inline void set_innerStream_1(Stream_t3255436806 * value) { ___innerStream_1 = value; Il2CppCodeGenWriteBarrier(&___innerStream_1, value); } inline static int32_t get_offset_of_leaveStreamOpen_2() { return static_cast<int32_t>(offsetof(AuthenticatedStream_t1183414097, ___leaveStreamOpen_2)); } inline bool get_leaveStreamOpen_2() const { return ___leaveStreamOpen_2; } inline bool* get_address_of_leaveStreamOpen_2() { return &___leaveStreamOpen_2; } inline void set_leaveStreamOpen_2(bool value) { ___leaveStreamOpen_2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif
[ "priyanjana@mac.com" ]
priyanjana@mac.com
60a09b89ccc90402d716f6aaf974f8fb4a0e1596
4ddfa685523dc3a7b800454e4873661d02ea9062
/第5阶段-C++提高编程/04 vector容器/04 vector容器/03 vector容器-容量和大小.cpp
fb2d37302dbbe3cac270aa34eb84f40789ca0249
[]
no_license
yaoyaoz/c-Base
9314d8ad9d6c2740546289cbddbc4b97e4f96f12
c003c51266d68e21e8888732eb8412e4f92a8452
refs/heads/master
2022-04-05T05:16:31.248047
2020-01-04T14:57:58
2020-01-04T14:57:58
197,220,939
1
1
null
null
null
null
GB18030
C++
false
false
947
cpp
#include<iostream> using namespace std; #include<vector> void printVector(vector<int>& v) { for (vector<int>::iterator it = v.begin(); it != v.end(); it++) { cout << *it << " "; } cout << endl; } //vector容器的容量和大小操作 void test01() { vector<int> v1; for (int i = 0; i < 10; i++) { v1.push_back(i); } printVector(v1); if (v1.empty()) //为真 代表容器为空 { cout << "v1为空" << endl; } else { cout << "v1不为空" << endl; cout << "v1的容量为:" << v1.capacity() << endl; cout << "v1的大小为:" << v1.size() << endl; } //重新指定大小 v1.resize(15); //如果重新指定的比原来长了,默认用0来填充新的位置 printVector(v1); v1.resize(15, 100); //用100来填充新的位置 printVector(v1); v1.resize(5); //如果重新指定的比原来短,超出部分的元素会被删除 printVector(v1); } int main() { test01(); system("pause"); return 0; }
[ "905440208@qq.com" ]
905440208@qq.com
0641e179c811bbbd048d1d1389eaada345968e8e
7be8e3636bf08ebdc6662879dc5afec548705537
/ios/Pods/Folly/folly/detail/Demangle.h
b11ffc7d74eed8f4b59cae24b21f660aa3f7a8c0
[ "MIT", "Apache-2.0" ]
permissive
rdhox/react-native-smooth-picker
3c7384f1fed0e37f076361cce96071d01b70e209
ae9316c49512f7ed9824c5a3ad50cdf5e80fffa9
refs/heads/master
2023-01-08T16:59:40.709147
2021-07-03T14:13:21
2021-07-03T14:13:21
160,224,312
230
31
MIT
2023-01-06T01:46:04
2018-12-03T16:54:10
TypeScript
UTF-8
C++
false
false
1,001
h
/* * Copyright (c) Facebook, Inc. and its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #include <cstddef> #if __has_include(<demangle.h>) #define FOLLY_DETAIL_HAVE_DEMANGLE_H 1 #else #define FOLLY_DETAIL_HAVE_DEMANGLE_H 0 #endif namespace folly { namespace detail { extern int cplus_demangle_v3_callback_wrapper( char const* mangled, void (*cbref)(char const*, std::size_t, void*), void* opaque); } // namespace detail } // namespace folly
[ "admin@rdhox.io" ]
admin@rdhox.io
3d0dc0abc068277147ee50cd188da12fb8a9361f
d0313e78ac54083b8306d09b37853a63b77067a7
/include/myun2/bpack/parse.hpp
11224e5abf85d6369bf6ac5c5397dc1d82cb90e6
[]
no_license
myun2ext/bitpack
d94a798cd22d9d5c6e1b923c2bf7b4b51f43bec9
2177848396d45114e3587686232d200cee33651d
refs/heads/master
2021-01-23T00:06:15.089500
2013-10-28T10:34:32
2013-10-28T10:34:32
null
0
0
null
null
null
null
UTF-8
C++
false
false
246
hpp
#ifndef __github_com_myun2__bitpack__parse_HPP__ #define __github_com_myun2__bitpack__parse_HPP__ namespace myun2 { namespace bitpack { void parse(const void* p, const void *tail) { } } } #endif//__github_com_myun2__bitpack__parse_HPP__
[ "myun2@nwhite.info" ]
myun2@nwhite.info
3dba318e00b57c06077fa3dac59af65a72c0ba14
e1d6417b995823e507a1e53ff81504e4bc795c8f
/gbk/server/Server/Server/Packets/CGIssuePetPlacardHandler.cpp
ace12309e177738b35b79cee50d2c3a3c074e2b3
[]
no_license
cjmxp/pap_full
f05d9e3f9390c2820a1e51d9ad4b38fe044e05a6
1963a8a7bda5156a772ccb3c3e35219a644a1566
refs/heads/master
2020-12-02T22:50:41.786682
2013-11-15T08:02:30
2013-11-15T08:02:30
null
0
0
null
null
null
null
GB18030
C++
false
false
1,322
cpp
#include "stdafx.h" #include "Log.h" #include "Scene.h" #include "GamePlayer.h" #include "Obj_Human.h" #include "Obj_Monster.h" #include "PetPlacard.h" #include "PacketFactoryManager.h" #include "GCOperateResult.h" #include "CGIssuePetPlacard.h" uint CGIssuePetPlacardHandler::Execute( CGIssuePetPlacard* pPacket, Player* pPlayer ) { __ENTER_FUNCTION GamePlayer* pGamePlayer = (GamePlayer*)pPlayer ; Assert( pGamePlayer ) ; Obj_Human* pHuman = pGamePlayer->GetHuman() ; Assert( pHuman ) ; Scene* pScene = pHuman->getScene() ; if( pScene==NULL ) { Assert(FALSE) ; return PACKET_EXE_ERROR ; } //检查线程执行资源是否正确 Assert( MyGetCurrentThreadID()==pScene->m_ThreadID ) ; Obj_Monster *pNpc = (Obj_Monster*)(pScene->GetObjManager()->GetObj(pPacket->GetNpcID())); if(pNpc != NULL) { PetPlacardSystem *pPetPlacardSystem = pNpc->GetPetPlacardSystem(); if(pPetPlacardSystem == NULL) { pNpc->CreatePetPlacardSystem(); pPetPlacardSystem = pNpc->GetPetPlacardSystem(); } if(pPetPlacardSystem != NULL) { ORESULT oResult = pPetPlacardSystem->IssuePlacard(pHuman, pPacket->GetGUID(), pPacket->GetMessage()); if(OR_FAILED(oResult)) { pHuman->SendOperateResultMsg(oResult); } } } return PACKET_EXE_CONTINUE ; __LEAVE_FUNCTION return PACKET_EXE_ERROR ; }
[ "viticm@126.com" ]
viticm@126.com
3edce904cb55e17b803934bc0e9bc9414c4b4b09
627c1336d99f3a3bae67b9898b8206c0b9f8ae83
/src/sa/CostFunction.h
97346a54b9196a129826ba922aa4e681c14990a0
[ "MIT" ]
permissive
areong/CornerMacroPlacer
e5e80cdc3e97527f634310002659f614b8ab199e
da6841c110a829b33bd705cda13fb371ca369007
refs/heads/master
2021-01-21T04:39:05.934464
2019-10-16T10:53:57
2019-10-16T10:53:57
49,002,459
4
0
null
null
null
null
UTF-8
C++
false
false
191
h
#ifndef SA_COSTFUNCTION_H_ #define SA_COSTFUNCTION_H_ class State; class CostFunction { public: virtual ~CostFunction() {} virtual double calculateCost(State *state) = 0; }; #endif
[ "areong6378@gmail.com" ]
areong6378@gmail.com
d787287d02ce4ea18a8d56f337bfcac460ed3025
b367fe5f0c2c50846b002b59472c50453e1629bc
/xbox_leak_may_2020/xbox trunk/xbox/private/windows/directx/dmusic2/dmstyle/motiftrk.cpp
42982cd3276dbc5b67c5169955ab768f23adc4a8
[]
no_license
sgzwiz/xbox_leak_may_2020
11b441502a659c8da8a1aa199f89f6236dd59325
fd00b4b3b2abb1ea6ef9ac64b755419741a3af00
refs/heads/master
2022-12-23T16:14:54.706755
2020-09-27T18:24:48
2020-09-27T18:24:48
null
0
0
null
null
null
null
UTF-8
C++
false
false
22,182
cpp
//+------------------------------------------------------------------------- // // Microsoft Windows // // Copyright (c) 1998-1999 Microsoft Corporation // // File: motiftrk.cpp // //-------------------------------------------------------------------------- // READ THIS!!!!!!!!!!!!!!!!!!!!!!!!!!! // // 4530: C++ exception handler used, but unwind semantics are not enabled. Specify -GX // // We disable this because we use exceptions and do *not* specify -GX (USE_NATIVE_EH in // sources). // // The one place we use exceptions is around construction of objects that call // InitializeCriticalSection. We guarantee that it is safe to use in this case with // the restriction given by not using -GX (automatic objects in the call chain between // throw and handler are not destructed). Turning on -GX buys us nothing but +10% to code // size because of the unwind code. // // Any other use of exceptions must follow these restrictions or -GX must be turned on. // // READ THIS!!!!!!!!!!!!!!!!!!!!!!!!!!! // #pragma warning(disable:4530) // MotifTrk.cpp : Implementation of CMotifTrack //#include "stdafx.h" //#include "Section.h" #include "MotifTrk.h" #include <stdlib.h> // for random number generator #include <time.h> // to seed random number generator #include "debug.h" #include "dmusicip.h" #include "debug.h" #include "..\shared\Validate.h" #include "..\shared\miscutil.h" #include "..\shared\critsec.h" ///////////////////////////////////////////////////////////////////////////// // MotifTrackState MotifTrackState::MotifTrackState() : m_mtMotifStart(0) { } MotifTrackState::~MotifTrackState() { } HRESULT MotifTrackState::Play( MUSIC_TIME mtStart, MUSIC_TIME mtEnd, MUSIC_TIME mtOffset, REFERENCE_TIME rtOffset, IDirectMusicPerformance* pPerformance, DWORD dwFlags, BOOL fClockTime ) { m_mtPerformanceOffset = mtOffset; BOOL fStart = (dwFlags & DMUS_TRACKF_START) ? TRUE : FALSE; BOOL fSeek = (dwFlags & DMUS_TRACKF_SEEK) ? TRUE : FALSE; BOOL fLoop = (dwFlags & DMUS_TRACKF_LOOP) ? TRUE : FALSE; BOOL fControl = (dwFlags & DMUS_TRACKF_DIRTY) ? TRUE : FALSE; if (fControl) // We need to make sure we get chords on beat boundaries { GetNextChord(mtStart, mtOffset, pPerformance, fStart); } MUSIC_TIME mtNotify = mtStart ? PatternTimeSig().CeilingBeat(mtStart) : 0; if( m_fStateActive && m_pPatternTrack->m_fNotifyMeasureBeat && !fClockTime && ( mtNotify < mtEnd ) ) { mtNotify = NotifyMeasureBeat( mtNotify, mtEnd, mtOffset, pPerformance, dwFlags ); } bool fReLoop = false; DWORD dwPartFlags = PLAYPARTSF_FIRST_CALL; if (fStart || fLoop || fSeek) dwPartFlags |= PLAYPARTSF_START; if (fClockTime) dwPartFlags |= PLAYPARTSF_CLOCKTIME; if ( fLoop || (mtStart > 0 && (fStart || fSeek || fControl)) ) dwPartFlags |= PLAYPARTSF_FLUSH; PlayParts(mtStart, mtEnd, mtOffset, rtOffset, 0, pPerformance, dwPartFlags, dwFlags, fReLoop); if (fReLoop) { dwPartFlags = PLAYPARTSF_RELOOP; if (fClockTime) dwPartFlags |= PLAYPARTSF_CLOCKTIME; PlayParts(mtStart, mtEnd, mtOffset, rtOffset, 0, pPerformance, dwPartFlags, dwFlags, fReLoop); } if( m_fStateActive && m_pPatternTrack->m_fNotifyMeasureBeat && !fClockTime && ( mtNotify < mtEnd ) ) { NotifyMeasureBeat( mtNotify, mtEnd, mtOffset, pPerformance, dwFlags ); } return S_OK; } ///////////////////////////////////////////////////////////////////////////// // MotifTrackInfo MotifTrackInfo::MotifTrackInfo() : m_pPattern(NULL) { m_dwPatternTag = DMUS_PATTERN_MOTIF; } MotifTrackInfo::~MotifTrackInfo() { if (m_pPattern) m_pPattern->Release(); } HRESULT MotifTrackInfo::Init( /*[in]*/ IDirectMusicSegment* pSegment ) { return S_OK; } HRESULT MotifTrackInfo::InitPlay( /*[in]*/ IDirectMusicTrack* pParentrack, /*[in]*/ IDirectMusicSegmentState* pSegmentState, /*[in]*/ IDirectMusicPerformance* pPerformance, /*[out]*/ void** ppStateData, /*[in]*/ DWORD dwTrackID, /*[in]*/ DWORD dwFlags ) { IDirectMusicSegment* pSegment = NULL; MotifTrackState* pStateData = new MotifTrackState; if( NULL == pStateData ) { return E_OUTOFMEMORY; } *ppStateData = pStateData; StatePair SP(pSegmentState, pStateData); TListItem<StatePair>* pPair = new TListItem<StatePair>(SP); if (!pPair) return E_OUTOFMEMORY; m_StateList.AddHead(pPair); TListItem<StylePair>* pHead = m_pISList.GetHead(); if (!pHead || !pHead->GetItemValue().m_pStyle) return E_FAIL; pHead->GetItemValue().m_pStyle->GetStyleInfo((void **)&pStateData->m_pStyle); pStateData->m_pTrack = pParentrack; pStateData->m_pPatternTrack = this; pStateData->m_dwVirtualTrackID = dwTrackID; pStateData->m_pPattern = NULL; pStateData->InitPattern(m_pPattern, 0); pStateData->m_pSegState = pSegmentState; // weak reference, no addref. pStateData->m_pPerformance = pPerformance; // weak reference, no addref. pStateData->m_mtPerformanceOffset = 0; pStateData->m_mtCurrentChordTime = 0; pStateData->m_mtNextChordTime = 0; pStateData->m_mtMotifStart = 0; HRESULT hr = pStateData->ResetMappings(); if (FAILED(hr)) return hr; #ifdef DXAPI if (m_fStateSetBySetParam) { pStateData->m_fStateActive = m_fActive; } else #endif { pStateData->m_fStateActive = !(dwFlags & (DMUS_SEGF_CONTROL | DMUS_SEGF_SECONDARY)); } if (m_lRandomNumberSeed) { pStateData->InitVariationSeeds(m_lRandomNumberSeed); } if( SUCCEEDED( pSegmentState->GetSegment(&pSegment))) { if (FAILED(pSegment->GetTrackGroup(pStateData->m_pTrack, &pStateData->m_dwGroupID))) { pStateData->m_dwGroupID = 0xffffffff; } pSegment->Release(); } return S_OK; } ///////////////////////////////////////////////////////////////////////////// // CMotifTrack CMotifTrack::CMotifTrack() : m_bRequiresSave(0), m_cRef(1), m_fCSInitialized(FALSE) { IncrementDLLCount(); INITIALIZE_CRITICAL_SECTION( &m_CriticalSection ); m_fCSInitialized = TRUE; dm_srand((unsigned int)time(NULL)); m_pTrackInfo = new MotifTrackInfo; } CMotifTrack::CMotifTrack(const CMotifTrack& rTrack, MUSIC_TIME mtStart, MUSIC_TIME mtEnd) : m_bRequiresSave(0), m_cRef(1), m_fCSInitialized(FALSE) { IncrementDLLCount(); INITIALIZE_CRITICAL_SECTION( &m_CriticalSection ); m_fCSInitialized = TRUE; dm_srand((unsigned int)time(NULL)); m_pTrackInfo = new MotifTrackInfo((MotifTrackInfo*)rTrack.m_pTrackInfo, mtStart, mtEnd); } CMotifTrack::~CMotifTrack() { if (m_pTrackInfo) { delete m_pTrackInfo; } if (m_fCSInitialized) { DELETE_CRITICAL_SECTION( &m_CriticalSection ); } DecrementDLLCount(); } STDMETHODIMP CMotifTrack::QueryInterface( const IID &iid, void **ppv) { V_INAME(CMotifTrack::QueryInterface); V_REFGUID(iid); V_PTRPTR_WRITE(ppv); if (iid == IID_IUnknown || iid == IID_IDirectMusicTrack || iid == IID_IDirectMusicTrack8) { *ppv = static_cast<IDirectMusicTrack*>(this); } else if (iid == IID_IPersistStream) { *ppv = static_cast<IPersistStream*>(this); } else if (iid == IID_IMotifTrack) { *ppv = static_cast<IMotifTrack*>(this); } else { *ppv = NULL; return E_NOINTERFACE; } reinterpret_cast<IUnknown*>(this)->AddRef(); return S_OK; } STDMETHODIMP_(ULONG) CMotifTrack::AddRef() { return InterlockedIncrement(&m_cRef); } STDMETHODIMP_(ULONG) CMotifTrack::Release() { if (!InterlockedDecrement(&m_cRef)) { delete this; return 0; } return m_cRef; } ////////////////////////////////////////////////////////////////////// // IDirectMusicTrack::Init HRESULT CMotifTrack::Init( /* [in] */ IDirectMusicSegment __RPC_FAR *pSegment) { V_INAME(CMotifTrack::Init); V_INTERFACE(pSegment); HRESULT hr = S_OK; if (!m_pTrackInfo) return DMUS_E_NOT_INIT; ENTER_CRITICAL_SECTION( &m_CriticalSection ); hr = m_pTrackInfo->MergePChannels(); if (SUCCEEDED(hr)) { pSegment->SetPChannelsUsed(m_pTrackInfo->m_dwPChannels, m_pTrackInfo->m_pdwPChannels); hr = m_pTrackInfo->Init(pSegment); } LEAVE_CRITICAL_SECTION( &m_CriticalSection ); return hr; } HRESULT CMotifTrack::InitPlay( /*[in]*/ IDirectMusicSegmentState* pSegmentState, /*[in]*/ IDirectMusicPerformance* pPerformance, /*[out]*/ void** ppStateData, /*[in]*/ DWORD dwTrackID, /*[in]*/ DWORD dwFlags ) { V_INAME(CMotifTrack::InitPlay); V_PTRPTR_WRITE(ppStateData); V_INTERFACE(pSegmentState); V_INTERFACE(pPerformance); ENTER_CRITICAL_SECTION( &m_CriticalSection ); HRESULT hr = S_OK; if (!m_pTrackInfo) { LEAVE_CRITICAL_SECTION( &m_CriticalSection ); return DMUS_E_NOT_INIT; } hr = m_pTrackInfo->InitPlay(this, pSegmentState, pPerformance, ppStateData, dwTrackID, dwFlags); LEAVE_CRITICAL_SECTION( &m_CriticalSection ); return hr; } HRESULT CMotifTrack::EndPlay( /*[in]*/ void* pStateData ) { V_INAME(CMotifTrack::EndPlay); V_BUFPTR_WRITE(pStateData, sizeof(MotifTrackState)); HRESULT hr = DMUS_E_NOT_INIT; ENTER_CRITICAL_SECTION( &m_CriticalSection ); if (m_pTrackInfo) { hr = m_pTrackInfo->EndPlay((MotifTrackState*)pStateData); } LEAVE_CRITICAL_SECTION( &m_CriticalSection ); return hr; } HRESULT CMotifTrack::Play( /*[in]*/ void* pStateData, /*[in]*/ MUSIC_TIME mtStart, /*[in]*/ MUSIC_TIME mtEnd, /*[in]*/ MUSIC_TIME mtOffset, REFERENCE_TIME rtOffset, DWORD dwFlags, IDirectMusicPerformance* pPerf, IDirectMusicSegmentState* pSegState, DWORD dwVirtualID, BOOL fClockTime ) { V_INAME(CMotifTrack::Play); V_BUFPTR_WRITE( pStateData, sizeof(MotifTrackState)); V_INTERFACE(pPerf); V_INTERFACE(pSegState); HRESULT hr = DMUS_E_NOT_INIT; ENTER_CRITICAL_SECTION( &m_CriticalSection ); if (!m_pTrackInfo) { LEAVE_CRITICAL_SECTION( &m_CriticalSection ); return DMUS_E_NOT_INIT; } MotifTrackState* pSD = (MotifTrackState *)pStateData; if (pSD && pSD->m_pMappings) { BOOL fStart = (dwFlags & DMUS_TRACKF_START) ? TRUE : FALSE; BOOL fSeek = (dwFlags & DMUS_TRACKF_SEEK) ? TRUE : FALSE; BOOL fLoop = (dwFlags & DMUS_TRACKF_LOOP) ? TRUE : FALSE; BOOL fControl = (dwFlags & DMUS_TRACKF_DIRTY) ? TRUE : FALSE; if (fStart || fSeek || fLoop || fControl) { pSD->m_fNewPattern = TRUE; pSD->m_mtCurrentChordTime = 0; pSD->m_mtNextChordTime = 0; pSD->m_mtLaterChordTime = 0; // pSD->m_CurrentChord.bSubChordCount = 0; for (DWORD dw = 0; dw < m_pTrackInfo->m_dwPChannels; dw++) { pSD->m_pMappings[dw].m_mtTime = 0; pSD->m_pMappings[dw].m_dwPChannelMap = m_pTrackInfo->m_pdwPChannels[dw]; pSD->m_pMappings[dw].m_fMute = FALSE; } } hr = pSD->Play(mtStart, mtEnd, mtOffset, rtOffset, pPerf, dwFlags, fClockTime); } LEAVE_CRITICAL_SECTION( &m_CriticalSection ); return hr; } HRESULT CMotifTrack::GetPriority( /*[out]*/ DWORD* pPriority ) { return E_NOTIMPL; } HRESULT CMotifTrack::GetParam( REFGUID rCommandGuid, MUSIC_TIME mtTime, MUSIC_TIME* pmtNext, void *pData) { V_INAME(CMotifTrack::GetParam); V_PTR_WRITE_OPT(pmtNext,MUSIC_TIME); V_PTR_WRITE(pData,1); V_REFGUID(rCommandGuid); ENTER_CRITICAL_SECTION( &m_CriticalSection ); if (!m_pTrackInfo) { LEAVE_CRITICAL_SECTION( &m_CriticalSection ); return DMUS_E_NOT_INIT; } HRESULT hr = S_OK; if( GUID_Valid_Start_Time == rCommandGuid ) { if (m_pTrackInfo->m_dwPatternTag != DMUS_PATTERN_MOTIF) hr = E_FAIL; else { MotifTrackInfo* pTrackInfo = (MotifTrackInfo*)m_pTrackInfo; if (!pTrackInfo->m_pPattern) hr = E_POINTER; else { DMUS_VALID_START_PARAM* pValidStartData = (DMUS_VALID_START_PARAM*)pData; TListItem<MUSIC_TIME>* pScan = pTrackInfo->m_pPattern->m_StartTimeList.GetHead(); for (; pScan; pScan = pScan->GetNext()) { if (pScan->GetItemValue() >= mtTime) { pValidStartData->mtTime = pScan->GetItemValue() - mtTime; break; } } if (!pScan) hr = DMUS_E_NOT_FOUND; else { if (pmtNext) { if (pScan = pScan->GetNext()) { *pmtNext = pScan->GetItemValue() - mtTime; } else { *pmtNext = 0; } } hr = S_OK; } } } } else { hr = DMUS_E_GET_UNSUPPORTED; } LEAVE_CRITICAL_SECTION( &m_CriticalSection ); return hr; } HRESULT CMotifTrack::SetParam( REFGUID rguid, MUSIC_TIME mtTime, void __RPC_FAR *pData) { V_INAME(CMotifTrack::SetParam); V_PTR_WRITE_OPT(pData,1); V_REFGUID(rguid); ENTER_CRITICAL_SECTION( &m_CriticalSection ); if (!m_pTrackInfo) { LEAVE_CRITICAL_SECTION( &m_CriticalSection ); return DMUS_E_NOT_INIT; } HRESULT hr = DMUS_E_SET_UNSUPPORTED; #ifdef DXAPI if( rguid == GUID_EnableTimeSig ) { if( m_pTrackInfo->m_fStateSetBySetParam && m_pTrackInfo->m_fActive ) { hr = DMUS_E_TYPE_DISABLED; } else { m_pTrackInfo->m_fStateSetBySetParam = TRUE; m_pTrackInfo->m_fActive = TRUE; hr = S_OK; } } else if( rguid == GUID_DisableTimeSig ) { if( m_pTrackInfo->m_fStateSetBySetParam && !m_pTrackInfo->m_fActive ) { hr = DMUS_E_TYPE_DISABLED; } else { m_pTrackInfo->m_fStateSetBySetParam = TRUE; m_pTrackInfo->m_fActive = FALSE; hr = S_OK; } } else if ( rguid == GUID_SeedVariations ) { if (pData) { m_pTrackInfo->m_lRandomNumberSeed = *((long*) pData); hr = S_OK; } else hr = E_POINTER; } #endif LEAVE_CRITICAL_SECTION( &m_CriticalSection ); return hr; } // IPersist methods HRESULT CMotifTrack::GetClassID( LPCLSID pClassID ) { V_INAME(CMotifTrack::GetClassID); V_PTR_WRITE(pClassID, CLSID); *pClassID = CLSID_DirectMusicMotifTrack; return S_OK; } HRESULT CMotifTrack::IsParamSupported( /*[in]*/ REFGUID rGuid ) { V_INAME(CMotifTrack::IsParamSupported); V_REFGUID(rGuid); if (!m_pTrackInfo) { return DMUS_E_NOT_INIT; } if ( rGuid == GUID_Valid_Start_Time ) { return S_OK; } else if ( rGuid == GUID_SeedVariations ) { return S_OK; } #ifdef DXAPI else if (m_pTrackInfo->m_fStateSetBySetParam) { if( m_pTrackInfo->m_fActive ) { if( rGuid == GUID_DisableTimeSig ) return S_OK; if( rGuid == GUID_EnableTimeSig ) return DMUS_E_TYPE_DISABLED; } else { if( rGuid == GUID_EnableTimeSig ) return S_OK; if( rGuid == GUID_DisableTimeSig ) return DMUS_E_TYPE_DISABLED; } } else { if(( rGuid == GUID_DisableTimeSig ) || ( rGuid == GUID_EnableTimeSig ) ) { return S_OK; } } #endif return DMUS_E_TYPE_UNSUPPORTED; } // IPersistStream methods HRESULT CMotifTrack::IsDirty() { return m_bRequiresSave ? S_OK : S_FALSE; } HRESULT CMotifTrack::Save( LPSTREAM pStream, BOOL fClearDirty ) { return E_NOTIMPL; } HRESULT CMotifTrack::GetSizeMax( ULARGE_INTEGER* /*pcbSize*/ ) { return E_NOTIMPL; } HRESULT CMotifTrack::Load(LPSTREAM pStream ) { return E_NOTIMPL; } HRESULT CMotifTrack::SetTrack(IUnknown* pStyle, void* pPattern) { if (!pStyle) return E_POINTER; HRESULT hr = E_FAIL; ENTER_CRITICAL_SECTION( &m_CriticalSection ); if (!m_pTrackInfo) { LEAVE_CRITICAL_SECTION( &m_CriticalSection ); return DMUS_E_NOT_INIT; } MotifTrackInfo* pTrackInfo = (MotifTrackInfo*)m_pTrackInfo; if (m_pTrackInfo->m_dwPatternTag == DMUS_PATTERN_MOTIF) { IDMStyle* pIS = NULL; hr = pStyle->QueryInterface(IID_IDMStyle, (void**)&pIS); if (SUCCEEDED(hr)) { if (pTrackInfo->m_pPattern) pTrackInfo->m_pPattern->Release(); pTrackInfo->m_pPattern = (CDirectMusicPattern*) pPattern; if (pTrackInfo->m_pPattern) pTrackInfo->m_pPattern->AddRef(); pTrackInfo->InitTrackVariations(pTrackInfo->m_pPattern); TListItem<StylePair>* pNew = new TListItem<StylePair>; if (!pNew) hr = E_OUTOFMEMORY; else { pNew->GetItemValue().m_mtTime = 0; pNew->GetItemValue().m_pStyle = pIS; pTrackInfo->m_pISList.AddTail(pNew); hr = S_OK; } pIS->Release(); } } LEAVE_CRITICAL_SECTION( &m_CriticalSection ); return hr; } HRESULT STDMETHODCALLTYPE CMotifTrack::AddNotificationType( /* [in] */ REFGUID rGuidNotify) { V_INAME(CMotifTrack::AddNotificationType); V_REFGUID(rGuidNotify); HRESULT hr = S_OK; ENTER_CRITICAL_SECTION( &m_CriticalSection ); if (m_pTrackInfo) hr = m_pTrackInfo->AddNotificationType(rGuidNotify); else hr = DMUS_E_NOT_INIT; LEAVE_CRITICAL_SECTION( &m_CriticalSection ); return hr; } HRESULT STDMETHODCALLTYPE CMotifTrack::RemoveNotificationType( /* [in] */ REFGUID rGuidNotify) { V_INAME(CMotifTrack::RemoveNotificationType); V_REFGUID(rGuidNotify); HRESULT hr = S_OK; ENTER_CRITICAL_SECTION( &m_CriticalSection ); if (m_pTrackInfo) hr = m_pTrackInfo->RemoveNotificationType(rGuidNotify); else hr = DMUS_E_NOT_INIT; LEAVE_CRITICAL_SECTION( &m_CriticalSection ); return hr; } HRESULT STDMETHODCALLTYPE CMotifTrack::Clone( MUSIC_TIME mtStart, MUSIC_TIME mtEnd, IDirectMusicTrack** ppTrack) { V_INAME(CMotifTrack::Clone); V_PTRPTR_WRITE(ppTrack); HRESULT hr = S_OK; if(mtStart < 0 ) { return E_INVALIDARG; } if(mtStart > mtEnd) { return E_INVALIDARG; } ENTER_CRITICAL_SECTION( &m_CriticalSection ); CMotifTrack *pDM; try { pDM = new CMotifTrack(*this, mtStart, mtEnd); } catch( ... ) { pDM = NULL; } if (pDM == NULL) { LEAVE_CRITICAL_SECTION( &m_CriticalSection ); return E_OUTOFMEMORY; } hr = pDM->QueryInterface(IID_IDirectMusicTrack, (void**)ppTrack); pDM->Release(); LEAVE_CRITICAL_SECTION( &m_CriticalSection ); return hr; } STDMETHODIMP CMotifTrack::GetParamEx(REFGUID rguidType,REFERENCE_TIME rtTime, REFERENCE_TIME* prtNext,void* pParam,void * pStateData, DWORD dwFlags) { HRESULT hr; MUSIC_TIME mtNext; if (dwFlags & DMUS_TRACK_PARAMF_CLOCK) { hr = GetParam(rguidType,(MUSIC_TIME) (rtTime / REF_PER_MIL), &mtNext, pParam); if (prtNext) { *prtNext = mtNext * REF_PER_MIL; } } else { hr = GetParam(rguidType,(MUSIC_TIME) rtTime, &mtNext, pParam); if (prtNext) { *prtNext = mtNext; } } return hr; } STDMETHODIMP CMotifTrack::SetParamEx(REFGUID rguidType,REFERENCE_TIME rtTime, void* pParam, void * pStateData, DWORD dwFlags) { if (dwFlags & DMUS_TRACK_PARAMF_CLOCK) { rtTime /= REF_PER_MIL; } return SetParam(rguidType, (MUSIC_TIME) rtTime , pParam); } STDMETHODIMP CMotifTrack::PlayEx(void* pStateData,REFERENCE_TIME rtStart, REFERENCE_TIME rtEnd,REFERENCE_TIME rtOffset, DWORD dwFlags,IDirectMusicPerformance* pPerf, IDirectMusicSegmentState* pSegSt,DWORD dwVirtualID) { V_INAME(IDirectMusicTrack::PlayEx); V_INTERFACE(pPerf); V_INTERFACE(pSegSt); HRESULT hr; ENTER_CRITICAL_SECTION(&m_CriticalSection); if (dwFlags & DMUS_TRACKF_CLOCK) { // Convert all reference times to millisecond times. Then, just use same MUSIC_TIME // variables. hr = Play(pStateData,(MUSIC_TIME)(rtStart / REF_PER_MIL),(MUSIC_TIME)(rtEnd / REF_PER_MIL), (MUSIC_TIME)(rtOffset / REF_PER_MIL),rtOffset,dwFlags,pPerf,pSegSt,dwVirtualID,TRUE); } else { hr = Play(pStateData,(MUSIC_TIME)rtStart,(MUSIC_TIME)rtEnd, (MUSIC_TIME)rtOffset,0,dwFlags,pPerf,pSegSt,dwVirtualID,FALSE); } LEAVE_CRITICAL_SECTION(&m_CriticalSection); return hr; } STDMETHODIMP CMotifTrack::Play( void *pStateData, // @parm State data pointer, from <om .InitPlay>. MUSIC_TIME mtStart, // @parm The start time to play. MUSIC_TIME mtEnd, // @parm The end time to play. MUSIC_TIME mtOffset,// @parm The offset to add to all messages sent to // <om IDirectMusicPerformance.SendPMsg>. DWORD dwFlags, // @parm Flags that indicate the state of this call. // See <t DMUS_TRACKF_FLAGS>. If dwFlags == 0, this is a // normal Play call continuing playback from the previous // Play call. IDirectMusicPerformance* pPerf, // @parm The <i IDirectMusicPerformance>, used to // call <om IDirectMusicPerformance.AllocPMsg>, // <om IDirectMusicPerformance.SendPMsg>, etc. IDirectMusicSegmentState* pSegSt, // @parm The <i IDirectMusicSegmentState> this // track belongs to. QueryInterface() can be called on this to // obtain the SegmentState's <i IDirectMusicGraph> in order to // call <om IDirectMusicGraph.StampPMsg>, for instance. DWORD dwVirtualID // @parm This track's virtual track id, which must be set // on any <t DMUS_PMSG>'s m_dwVirtualTrackID member that // will be queued to <om IDirectMusicPerformance.SendPMsg>. ) { V_INAME(IDirectMusicTrack::Play); V_INTERFACE(pPerf); V_INTERFACE(pSegSt); ENTER_CRITICAL_SECTION(&m_CriticalSection); HRESULT hr = Play(pStateData,mtStart,mtEnd,mtOffset,0,dwFlags,pPerf,pSegSt,dwVirtualID,FALSE); LEAVE_CRITICAL_SECTION(&m_CriticalSection); return hr; } STDMETHODIMP CMotifTrack::Compose( IUnknown* pContext, DWORD dwTrackGroup, IDirectMusicTrack** ppResultTrack) { return E_NOTIMPL; } STDMETHODIMP CMotifTrack::Join( IDirectMusicTrack* pNewTrack, MUSIC_TIME mtJoin, IUnknown* pContext, DWORD dwTrackGroup, IDirectMusicTrack** ppResultTrack) { return E_NOTIMPL; }
[ "benjamin.barratt@icloud.com" ]
benjamin.barratt@icloud.com
f0bc1e72555210f28bb409f7d03cc66a7dc4c44e
b1b0ea718d15415be065885835a430cdaa51f3a4
/include/libm3d/libm3d.h
e3b6be402d927f936fa253e502edb29dd58714d4
[]
no_license
panjia1983/APDL
addae0db78a583240fc820d77ca885b39a64f63c
3f3c682d41de8c20688987066c7913887723e730
refs/heads/master
2016-09-05T13:31:29.789355
2013-03-01T21:41:41
2013-03-01T21:41:41
7,075,988
1
0
null
null
null
null
UTF-8
C++
false
false
666
h
#ifndef LIBM3D_H #define LIBM3D_H #include "model.h" #include "minkowski.h" namespace libm3d { struct LibM3dParam { bool bOctfilter; bool bCDfilter; bool bNormalfilter; float PmaxD; float QmaxD; int escaleP; int escaleQ; float perturb; int threadsize; LibM3dParam() { bOctfilter = false; bCDfilter = true; bNormalfilter = true; PmaxD = 1e10; QmaxD = 1e10; escaleP = 1; escaleQ = 1; perturb = 0; threadsize = 1; } }; void ComputePointMKSum(model& P, model& Q, double R[3][3], const LibM3dParam& param, std::vector<std::vector<float> >& points); } #endif
[ "panjia1983@gmail.com" ]
panjia1983@gmail.com
e6255e1be3849d48d3b1b91bd9d3ef8f2fbef4b3
26551769200eafa5bdd72ea5a51f87e61dbd8d6d
/hackerrank/august_infinitum_2014/5.cpp
e4777bacb56ef3c255ccaf2741ce466d7efdf640
[]
no_license
kalachand/codes
f894945a2cdc4c7868fd1f24c3b7727f32cf5ba1
ed45d7ffe380e4e5d52f95e9542a108e4ceeceb7
refs/heads/master
2021-01-15T12:44:29.552598
2015-11-03T21:02:36
2015-11-03T21:02:36
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,822
cpp
/******************* Akash Agrawall IIIT HYDERABAD akash.agrawall094@gmail.com ***********************/ #include<cstdio> #include<iostream> #include<cstdlib> #include<cmath> #include<cstring> #include<climits> #include<algorithm> #include<vector> #include<set> #include<map> #include<bitset> #include<stack> #include<queue> #include<stdio.h> #include<string.h> #include<math.h> #include<functional> #include<numeric> using namespace std; #define ll long long int #define FOR(i,a,b) for(i= (int )a ; i < (int )b ; ++i) #define rep(i,n) FOR(i,0,n) #define INF INT_MAX #define ALL(x) x.begin(),x.end() #define LET(x,a) __typeof(a) x(a) #define IFOR(i,a,b) for(LET(i,a);i!=(b);++i) #define EACH(it,v) IFOR(it,v.begin(),v.end()) #define pb push_back #define sz(x) int(x.size()) #define mp make_pair #define fill(x,v) memset(x,v,sizeof(x)) #define max(a,b) ((a)>(b)?(a):(b)) #define min(a,b) ((a)<(b)?(a):(b)) #define pi(n) printf("%d ",n) #define pd(n) printf("%lf ",n) #define pdl(n) printf("%lf\n",n) #define pin(n) printf("%d\n",n) #define pl(n) printf("%lld",n) #define pln(n) printf("%lld\n",n) #define si(n) scanf("%d",&n) #define sl(n) scanf("%lld",&n) #define sd(n) scanf("%lf",&n) #define ss(n) scanf("%s",n) #define scan(v,n) vector<int> v;rep(i,n){ int j;si(j);v.pb(j);} #define mod (int)(1e9 + 7) ll modpow(ll a,ll n,ll temp){ll res=1,y=a;while(n>0){if(n&1)res=(res*y)%temp;y=(y*y)%temp;n/=2;}return res%temp;} ll powit(ll a, ll b) { ll res=1,flagit=0,val; while(b!=0) { val=b%2; if(val==1) { res=res*a; if(res>=64 || res<0) { flagit=1; break; } } a=a*a; b>>=1; } if(flagit==1) return 65; else return res; } ll mult(ll a, ll b, ll c) { ll ret=0; while(b!=0) { if(b%2==1) { ret+=a; if(ret>=c) ret-=c; } a+=a; if(a>=c) a-=c; b>>=1; } return ret; } ll checkit(ll a, ll b, ll c) { ll i,val=1,flagit=0; rep(i,b) { val=mult(val,a,c); if(val%c==0) { flagit=1; break; } else if(val<0 || val>c) { break; } //printf("i=%lld val=%lld\n",i,val); } return flagit; } vector<ll> arr; int main() { ll n,q,a,b,x,lim,val,val1,i; sl(n); rep(i,n) { sl(val); arr.pb(val); } sl(q); while(q--) { sl(a); sl(b); sl(x); //printf("a=%lld b=%lld x=%lld\n",a,b,x); a--; b--; if(a==b) { val=arr[a]%x; if(val==0) printf("Yes\n"); else printf("No\n"); continue; } lim=b; for(i=b;i>a;i--) { if(arr[i]==1 || arr[i]==0) { lim=i; break; } } val=arr[lim]; for(i=lim-1;i>a;i--) { val=powit(arr[i],val); if(val>=64) break; } val=min(val,64); printf("a=%lld\n",a); val1=arr[a]; //printf("val1=%lld val=%lld x=%lld\n",val1,val,x); val1=checkit(val1,val,x); if(val1==1) printf("Yes\n"); else printf("No\n"); } return 0; }
[ "akash.wanted@gmail.com" ]
akash.wanted@gmail.com
949ac415323592939247ee8dc70152eb628c65e3
e5292428482181499e59886ad2ee50c83a504f6e
/URI/NumeroPequeno.cpp
90840864c681aff571c2bc1c011d59d2ba5650db
[]
no_license
pedrohenriqueos/maratona
fa01ebfe747d647cf4f88c486e1a798b3bcdbb3d
5c9bffa2ec6a321a35c854d4800b4fe7931c1baf
refs/heads/master
2020-03-22T06:35:23.879463
2020-02-27T20:15:53
2020-02-27T20:15:53
139,644,788
0
0
null
null
null
null
UTF-8
C++
false
false
611
cpp
#include<bits/stdc++.h> using namespace std; int V[10]; int main(){ string str; int K; while(cin >> str >> K){ memset(V,0,sizeof V); int cont=0; for(auto &c:str) V[(int)(c-'0')]++; for(int i=9;i>=0;i--){ if(V[i]){ for(int j=0;j<(int)str.size();j++) if(str[j]==(char)(i+'0')){ str.erase(str.begin()+j); j--; V[i]--; cont++; if(K==cont) break; } } if(K==cont) break; } if(str=="") cout << "0\n"; else{ bool z=false; for(auto &c:str){ if(!z and c=='0') continue; cout << c; z=true; } cout << '\n'; } } }
[ "pedro986@gmail.com" ]
pedro986@gmail.com
b61e423b5376e37b5eaeffa0707e355bfa856f4b
8dc84558f0058d90dfc4955e905dab1b22d12c08
/net/third_party/http2/decoder/decode_http2_structures.cc
1b439a54dd8966fb3c5d908f535f91582c256435
[ "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause" ]
permissive
meniossin/src
42a95cc6c4a9c71d43d62bc4311224ca1fd61e03
44f73f7e76119e5ab415d4593ac66485e65d700a
refs/heads/master
2022-12-16T20:17:03.747113
2020-09-03T10:43:12
2020-09-03T10:43:12
263,710,168
1
0
BSD-3-Clause
2020-05-13T18:20:09
2020-05-13T18:20:08
null
UTF-8
C++
false
false
3,470
cc
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "net/third_party/http2/decoder/decode_http2_structures.h" #include "base/logging.h" #include "net/third_party/http2/decoder/decode_buffer.h" #include "net/third_party/http2/http2_constants.h" namespace http2 { // Http2FrameHeader decoding: void DoDecode(Http2FrameHeader* out, DecodeBuffer* b) { DCHECK_NE(nullptr, out); DCHECK_NE(nullptr, b); DCHECK_LE(Http2FrameHeader::EncodedSize(), b->Remaining()); out->payload_length = b->DecodeUInt24(); out->type = static_cast<Http2FrameType>(b->DecodeUInt8()); out->flags = static_cast<Http2FrameFlag>(b->DecodeUInt8()); out->stream_id = b->DecodeUInt31(); } // Http2PriorityFields decoding: void DoDecode(Http2PriorityFields* out, DecodeBuffer* b) { DCHECK_NE(nullptr, out); DCHECK_NE(nullptr, b); DCHECK_LE(Http2PriorityFields::EncodedSize(), b->Remaining()); uint32_t stream_id_and_flag = b->DecodeUInt32(); out->stream_dependency = stream_id_and_flag & StreamIdMask(); if (out->stream_dependency == stream_id_and_flag) { out->is_exclusive = false; } else { out->is_exclusive = true; } // Note that chars are automatically promoted to ints during arithmetic, // so 255 + 1 doesn't end up as zero. out->weight = b->DecodeUInt8() + 1; } // Http2RstStreamFields decoding: void DoDecode(Http2RstStreamFields* out, DecodeBuffer* b) { DCHECK_NE(nullptr, out); DCHECK_NE(nullptr, b); DCHECK_LE(Http2RstStreamFields::EncodedSize(), b->Remaining()); out->error_code = static_cast<Http2ErrorCode>(b->DecodeUInt32()); } // Http2SettingFields decoding: void DoDecode(Http2SettingFields* out, DecodeBuffer* b) { DCHECK_NE(nullptr, out); DCHECK_NE(nullptr, b); DCHECK_LE(Http2SettingFields::EncodedSize(), b->Remaining()); out->parameter = static_cast<Http2SettingsParameter>(b->DecodeUInt16()); out->value = b->DecodeUInt32(); } // Http2PushPromiseFields decoding: void DoDecode(Http2PushPromiseFields* out, DecodeBuffer* b) { DCHECK_NE(nullptr, out); DCHECK_NE(nullptr, b); DCHECK_LE(Http2PushPromiseFields::EncodedSize(), b->Remaining()); out->promised_stream_id = b->DecodeUInt31(); } // Http2PingFields decoding: void DoDecode(Http2PingFields* out, DecodeBuffer* b) { DCHECK_NE(nullptr, out); DCHECK_NE(nullptr, b); DCHECK_LE(Http2PingFields::EncodedSize(), b->Remaining()); memcpy(out->opaque_bytes, b->cursor(), Http2PingFields::EncodedSize()); b->AdvanceCursor(Http2PingFields::EncodedSize()); } // Http2GoAwayFields decoding: void DoDecode(Http2GoAwayFields* out, DecodeBuffer* b) { DCHECK_NE(nullptr, out); DCHECK_NE(nullptr, b); DCHECK_LE(Http2GoAwayFields::EncodedSize(), b->Remaining()); out->last_stream_id = b->DecodeUInt31(); out->error_code = static_cast<Http2ErrorCode>(b->DecodeUInt32()); } // Http2WindowUpdateFields decoding: void DoDecode(Http2WindowUpdateFields* out, DecodeBuffer* b) { DCHECK_NE(nullptr, out); DCHECK_NE(nullptr, b); DCHECK_LE(Http2WindowUpdateFields::EncodedSize(), b->Remaining()); out->window_size_increment = b->DecodeUInt31(); } // Http2AltSvcFields decoding: void DoDecode(Http2AltSvcFields* out, DecodeBuffer* b) { DCHECK_NE(nullptr, out); DCHECK_NE(nullptr, b); DCHECK_LE(Http2AltSvcFields::EncodedSize(), b->Remaining()); out->origin_length = b->DecodeUInt16(); } } // namespace http2
[ "arnaud@geometry.ee" ]
arnaud@geometry.ee
d2513c60a780555df651eb7446d5883acf2099d4
b319692696eefea1d77e76a1817912717493999e
/Labs/Lab29/Questao02.cpp
aa32c15958995ccfff95b8650cb55cf8d5af780c
[]
no_license
JoaoCleiton12/ProgramacaoDeComputadores
761b7dc0a3af7b429166ddf74f60e1edb10b36bc
8b001abfed1c8c20456a993a62194a4b7545dfa7
refs/heads/master
2023-09-03T14:00:14.380099
2021-10-10T23:13:27
2021-10-10T23:13:27
415,393,424
0
0
null
null
null
null
UTF-8
C++
false
false
646
cpp
#include <iostream> #define black "\033[7;37;40m" #define yellow "\033[1;33;40m" #define green "\033[32m" #define red "\033[31;31m" #define blue "\033[34;5;154m" #define backg "\033[38;5;0;48;5;154m" #define default "\033[m" using namespace std; void print(int n); void print(double m); void print(const char * str); int main() { cout << "Inteiro: "; print(45); cout << "\nPonto-flutuante: "; print(3.9); cout << "\nString: "; print("Oi Mundo"); cout << "\n"; } void print(int n) { cout << yellow << n << default; } void print(double m) { cout << blue << m << default; } void print(const char * str) { cout << red << str << default; }
[ "joaocleiton60359@gmail.com" ]
joaocleiton60359@gmail.com
b3e839f50beead429a04cc2300d74e7175f33368
e3f08fc34b48c2093235307a5ea9447b9a4c6a25
/Message_Decowding.cpp
97816fca7691c1398dd407469c49fd6d0112051c
[]
no_license
pluralism/usaco
31992e442c7e405da673c3937b924969320df9f1
c692f1dce0434fa87d685690a5b846a982711bce
refs/heads/master
2016-09-06T01:35:04.802984
2013-02-07T14:35:07
2013-02-07T14:35:07
null
0
0
null
null
null
null
UTF-8
C++
false
false
576
cpp
#include <iostream> #include <map> #include <string> using std::cout; using std::cin; using std::string; using std::map; using std::endl; int main(int argc, char *argv[]) { map<char, char> associa_letra; string decryption_key; string message; int len; cin >> decryption_key >> message; len = decryption_key.length(); for(int i = 0; i < len; i++) { associa_letra[((int) 97 + i)] = decryption_key[i]; } for(int i = 0; i < message.length(); i++) { if(message[i] != ' ') message[i] = associa_letra[message[i]]; } cout << message << endl; return 0; }
[ "pluralism@AndrePinheiro.(none)" ]
pluralism@AndrePinheiro.(none)
a785e2a620ddce87b4ba49630b4b03bdfe73411d
024d697677d203a05cc6a2d7f3206a7d15e72416
/Robot Movements.cpp
7c71ab193fd1bc4b16a8dc06ee458e30bcc89be2
[]
no_license
pluralism/CodeEval
cedada6cec3408ca3f6f3db5420c23bd2a6ac3bf
4be97f6b9d1901bc7068d2d78c010c0892c516e0
refs/heads/master
2021-01-17T13:30:28.728775
2017-11-04T02:53:37
2017-11-04T02:53:37
17,156,561
0
0
null
null
null
null
UTF-8
C++
false
false
621
cpp
#include <iostream> using namespace std; int caminhos(bool board[4][4], int x, int y, int w, int h) { if (board[x][y]) return 0; if (x == w - 1 && y == h - 1) return 1; int contagem = 0; board[x][y] = 1; if (x > 0) contagem += caminhos(board, x - 1, y, w, h); if (x < w - 1) contagem += caminhos(board, x + 1, y, w, h); if (y > 0) contagem += caminhos(board, x, y - 1, w, h); if (y < h - 1) contagem += caminhos(board, x, y + 1, w, h); board[x][y] = 0; return contagem; } int main(int argc, char* argv[]) { bool board[4][4] = { 0 }; cout << caminhos(board, 0, 0, 4, 4); return 0; }
[ "andrepdpinheiro@gmail.com" ]
andrepdpinheiro@gmail.com
9842a52e85d9e40dd681e6eaceea8d6de44bf499
8ca4db4c61f2017f676750635f5916a56bea4263
/Nspectra/Example2.cc
80ba36db6ace771e763c4f9086bbf331f45c56c3
[]
no_license
Sam-Harper/RooStatsZPrime
948b28edf45de854c85ffbcbac83a2f8bf105b9f
0eb6a82ebb2b2cc0be94c6100adde4f5ddb0d8fe
refs/heads/master
2021-01-05T05:37:50.134022
2014-01-08T12:25:23
2014-01-08T12:25:23
15,710,035
0
1
null
null
null
null
UTF-8
C++
false
false
8,530
cc
#include <iostream> #include <iomanip> #include <string> #include <vector> #include <cmath> #include <map> #include "RooWorkspace.h" #include "TFile.h" #include "ModelConfiguratorZprime.hh" #include "Resultator.hh" #include "PoiRangeEstimator.hh" #include "DataPruner.hh" using namespace RooFit; using namespace std; int main(int argc, char* argv[]) { //read options bool run_channel1 = true; bool run_channel2 = true; bool run_channel3 = true; bool run_channel4 = true; double mass_low = static_cast<double>(atof(argv[5])); double mass_high = static_cast<double>(atof(argv[6])); double mass_step = static_cast<double>(atof(argv[7])); double fit_range_low = static_cast<double>(atof(argv[8])); double fit_range_high = static_cast<double>(atof(argv[9])); double width_factor = static_cast<double>(atof(argv[10])); unsigned int ntoys = atoi(argv[11]); string filesuffix = argv[12]; string mode = argv[13]; int help_run_channel = atoi(argv[1]); if(help_run_channel == 0){ run_channel1 = false; } else{ run_channel1 = true; } help_run_channel = atoi(argv[2]); if(help_run_channel == 0){ run_channel2 = false; } else{ run_channel2 = true; } help_run_channel = atoi(argv[3]); if(help_run_channel == 0){ run_channel3 = false; } else{ run_channel3 = true; } help_run_channel = atoi(argv[4]); if(help_run_channel == 0){ run_channel4 = false; } else{ run_channel4 = true; } cout << "do some testing ..." << endl; std::map<string, RooWorkspace*> WSvec; // maps channel names to workspaces // DEFINE WOKSPACES AND CHANNEL NAMES // CHANNEL: dimuon2011 //const std::string filename1 = "workspaces/ws_dimuon_ratio_full2011v1.root"; // the root file containing the workspace const std::string filename1 = "workspaces/ws_dimuon_ratio.root"; // the root file containing the workspace const std::string ws_name1 = "myWS"; // the name of the workspace TObject to be used const std::string channelname1 = "dimuon2011"; // name of the channel -> to be used in your daugther class of ModelConfigurator TFile file1(filename1.c_str(), "read"); // construct TFile object to load the workspace if(run_channel1){ RooWorkspace * ws1 = (RooWorkspace *)file1.Get( ws_name1.c_str() ); // load the workspace cout << "workspacename: " << ws1->GetName(); WSvec.insert( pair<string, RooWorkspace *>(channelname1, ws1) ); // insert channel info } // CHANNEL: dimuon2012 //const std::string filename3 = "workspaces/ws_dimuon_ratio_full2011v1.root"; // the root file containing the workspace const std::string filename3 = "workspaces/ws_dimuon_ratio.root"; // the root file containing the workspace const std::string ws_name3 = "myWS"; // the name of the workspace TObject to be used const std::string channelname3 = "dimuon2012"; // name of the channel -> to be used in your daugther class of ModelConfigurator TFile file3(filename3.c_str(), "read"); // construct TFile object to load the workspace if(run_channel3){ RooWorkspace * ws3 = (RooWorkspace *)file3.Get( ws_name3.c_str() ); // load the workspace cout << "workspacename: " << ws3->GetName(); WSvec.insert( pair<string, RooWorkspace *>(channelname3, ws3) ); // insert channel info } // CHANNEL: dielectron2011 //const std::string filename2 = "workspaces/ws_dielectron_ratio_full2011v1.root"; // the root file containing the workspace const std::string filename2 = "workspaces/ws_dielectron_ratio.root"; // the root file containing the workspace const std::string ws_name2 = "myWS"; // the name of the workspace TObject to be used const std::string channelname2 = "dielectron2011"; // name of the channel -> to be used in your daugther class of ModelConfigurator TFile file2(filename2.c_str(), "read"); // construct TFile object to load the workspace if(run_channel2){ RooWorkspace * ws2 = (RooWorkspace *)file2.Get( ws_name2.c_str() ); // load the workspace cout << "workspacename: " << ws2->GetName(); WSvec.insert( pair<string, RooWorkspace *>(channelname2, ws2) ); // insert channel info } // CHANNEL: dielectron2012 //const std::string filename4 = "workspaces/ws_dielectron_ratio_full2011v1.root"; // the root file containing the workspace const std::string filename4 = "workspaces/ws_dielectron_ratio.root"; // the root file containing the workspace const std::string ws_name4 = "myWS"; // the name of the workspace TObject to be used const std::string channelname4 = "dielectron2012"; // name of the channel -> to be used in your daugther class of ModelConfigurator TFile file4(filename4.c_str(), "read"); // construct TFile object to load the workspace if(run_channel4){ RooWorkspace * ws4 = (RooWorkspace *)file4.Get( ws_name4.c_str() ); // load the workspace cout << "workspacename: " << ws4->GetName(); WSvec.insert( pair<string, RooWorkspace *>(channelname4, ws4) ); // insert channel info } // CREATE MODELCONFIGURATOR ModelConfiguratorZprime * myConfigurator = new ModelConfiguratorZprime(WSvec); // construct ModelConfigurator // ADDITIONAL INFORMATION FOR COMBINING THE CHANNELS //define list with shared Vars std::string sharedVarsString = "peak,mass,ratio,width_p0,width_p1,width"; // set shared variables // COMMENT: this structure may not be sufficient myConfigurator->setSharedVars(sharedVarsString); // COMMENT: for combination of 2011 and 2012 data we will also need to handle correlated Variables -> think about best way to do this // define the parameter of interest // CONVENTION: poi needs to have the same name in all single channel workspaces std::string poiString = "ratio"; myConfigurator->setPoiString(poiString); // ASSOCIATE VARIABLES WITH STATISTICAL MEANING // CHANNEL: dimuon2011 if(run_channel1){ //see twobody.C line 1790 ff string nuisanceParamsString_channel1 = "beta_nsig,beta_nbkg"; string GlobalObsParamsString_channel1 = "glob_nsig,glob_nbkg"; string ObservableParamsString_channel1 = "mass"; myConfigurator->setNuisanceParams(channelname1, nuisanceParamsString_channel1); myConfigurator->setGlobalObs(channelname1, GlobalObsParamsString_channel1); myConfigurator->setObservables(channelname1, ObservableParamsString_channel1); } // CHANNEL: dimuon2012 if(run_channel3){ string nuisanceParamsString_channel3 = "beta_nsig,beta_nbkg"; string GlobalObsParamsString_channel3 = "glob_nsig,glob_nbkg"; string ObservableParamsString_channel3 = "mass"; myConfigurator->setNuisanceParams(channelname3, nuisanceParamsString_channel3); myConfigurator->setGlobalObs(channelname3, GlobalObsParamsString_channel3); myConfigurator->setObservables(channelname3, ObservableParamsString_channel3); } // CHANNEL: dielectron2011 if(run_channel2){ string nuisanceParamsString_channel2 = "beta_nsig,beta_nbkg,beta_mass"; string GlobalObsParamsString_channel2 = "glob_nsig,glob_nbkg,glob_mass"; string ObservableParamsString_channel2 = "mass"; myConfigurator->setNuisanceParams(channelname2, nuisanceParamsString_channel2); myConfigurator->setGlobalObs(channelname2, GlobalObsParamsString_channel2); myConfigurator->setObservables(channelname2, ObservableParamsString_channel2); } // CHANNEL: dielectron2012 if(run_channel4){ string nuisanceParamsString_channel4 = "beta_nsig,beta_nbkg,beta_mass"; string GlobalObsParamsString_channel4 = "glob_nsig,glob_nbkg,glob_mass"; string ObservableParamsString_channel4 = "mass"; myConfigurator->setNuisanceParams(channelname4, nuisanceParamsString_channel4); myConfigurator->setGlobalObs(channelname4, GlobalObsParamsString_channel4); myConfigurator->setObservables(channelname4, ObservableParamsString_channel4); } //setup combined RooWorkSpace and ModelConfig myConfigurator->Setup(); //safe combined WS //myConfigurator->WriteCombinedWS("CombinedWS2011x2.root"); //Setup DataPruner std::map<std::string , double> Rangemap; if(run_channel1){ Rangemap.insert( pair<std::string, double>("dimuon2011", 350.) );} if(run_channel2){ Rangemap.insert( pair<std::string, double>("dielectron2011", 350.) );} if(run_channel3){ Rangemap.insert( pair<std::string, double>("dimuon2012", 350.) );} if(run_channel4){ Rangemap.insert( pair<std::string, double>("dielectron2012", 350.) );} DataPruner * mydatapruner = new DataPruner(Rangemap); // RUN Significance results Resultator * myResultator = new Resultator(myConfigurator,mydatapruner); myResultator->calculateRatioSignificance( mode, mass_low, mass_high, mass_step, ntoys, filesuffix, fit_range_low, fit_range_high, width_factor, false) ; cout << ".. did some testing" << endl; }
[ "" ]
5c897c2340e2e940e1aad31ce36376327abf72a3
92f176bf2f388763f0b665d7162fa06c0fa731c8
/evaluatePostfix.cpp
46625778cbacdde3ae6ce42ff116cccf2562ea4a
[ "MIT" ]
permissive
mansiag/Lab-Programs
9446358ab42cad8983bfccccb1fcc03196075e3a
5662fd3e91a95a249e39e9542f9827f183e8ff47
refs/heads/master
2021-01-24T10:39:56.769575
2018-03-27T01:09:49
2018-03-27T01:09:49
123,059,934
0
0
null
null
null
null
UTF-8
C++
false
false
1,903
cpp
#include<iostream> #include<stdlib.h> using namespace std; class Node{ protected: int data; Node* next; public: Node() {} Node(int d) { data=d; next=NULL; } void setnext(Node* n) {next=n;} int getdata() {return data;} Node* getnext() {return next;} }; class stack : public Node{ private: Node* head; public: stack() {head=NULL;} void push(int d) { Node* newnode = new Node(d); newnode->setnext(head); head=newnode; } bool empty() {if(head==NULL) return true; else return false; } void pop() { Node* temp=head; head=head->getnext(); free(temp); } char top() {if(!empty()) return head->getdata(); else { cout<<"Stack is empty!"; return 'e'; } } bool isoperator(char a) {if(a=='*' || a=='/' || a=='%' || a=='+' || a=='-') return true; else return false; } int perform(char a ,int x,int y) {switch(a) {case '*': return x*y; case '/': return y/x; case '+': return x+y; case '-': return y-x; case '^': return y^x; case '%': return y%x;} } int evaluatepostfix(string exp) {int n=exp.length(); for(int i=0;i<n;i++) { if(!isoperator(exp[i])) { push(int(exp[i]-'0')); } else { int x = top(); pop(); int y = top(); pop(); int res = perform(exp[i],x,y); push(res); } } return top(); } }; int main(){ stack s; string exp,res; cout<<"Enter the postfix expression:\n"; cin>>exp; cout<<s.evaluatepostfix(exp); return 0; }
[ "mansi.29ag@gmail.com" ]
mansi.29ag@gmail.com
1324814b3daced6e978e123e7017fb14a37110ca
c80f604d0d8526d108bf7e5117588b710144f291
/src/matrix3d.hpp
e55ebe30d011039cce15026b17833de11a2a52ea
[]
no_license
dannluciano/datalib
a91130cec6059c28620f305ce136511c485410d3
c2c9bc242daa2947080c2628060671137dd0a1d3
refs/heads/master
2021-01-13T01:17:20.673914
2012-08-17T17:22:43
2012-08-17T17:22:43
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,999
hpp
#ifndef _MATRIX3D_HPP_ #define _MATRIX3D_HPP_ #include <ostream> #include <vector> namespace dl { // Three-dimensional rectangular matrix. template <typename T> class matrix3d { public: matrix3d() : rows_(0), cols_(0), pages_(0), matrix(0) { } matrix3d(unsigned num_rows, unsigned num_cols, unsigned num_pages) : rows_(num_rows), cols_(num_cols), pages_(num_pages), matrix(num_rows * num_cols * num_pages) { } matrix3d(unsigned num_rows, unsigned num_cols, unsigned num_pages, const T& init_value) : rows_(num_rows), cols_(num_cols), pages_(num_pages), matrix(num_rows * num_cols * num_pages, init_value) { } unsigned num_rows() const { return rows_; } unsigned num_cols() const { return cols_; } unsigned num_pages() const { return pages_; } // Accessors: return element by row and column. T& operator() ( unsigned row, unsigned col, unsigned page ) { return matrix[ index( row, col, page) ]; } const T& operator() ( unsigned row, unsigned col, unsigned page ) const { return matrix[ index( row, col, page ) ]; } T& at ( unsigned row, unsigned col, unsigned page ) { return matrix[ index( row, col, page) ]; } const T& at ( unsigned row, unsigned col, unsigned page ) const { return matrix[ index( row, col, page ) ]; } unsigned index(unsigned row, unsigned col, unsigned page) const { return (page * cols_ * rows_) + (col * rows_ + row); } private: unsigned rows_, cols_, pages_; std::vector<T> matrix; }; } // namespace dl template <typename T> inline std::ostream& operator << (std::ostream& os, const dl::matrix3d<T>& m) { for( unsigned r = 0; r < m.num_rows(); ++r ) { for( unsigned c = 0; c < m.num_cols(); ++c ) { for (unsigned p = 0; p < m.num_pages(); ++p) { os << m(r,c, p); } } os << std::endl; } return os; } #endif /* _MATRIX3D_HPP_ */
[ "dannluciano@gmail.com" ]
dannluciano@gmail.com
c7fc34453772b9d2453e573a2e8aefecd309780a
0a229dc4ecf9555325fb2c18a75b47a28114eeb9
/test/test.h
8b9f4b7efb7531f9f878714f37266429823da774
[ "Apache-2.0" ]
permissive
8secz-johndpope/PalmA-crossplatform
f63e93ab9da557f589841d9ea3c6b49f1f5176db
f60e86ba724935b45eb7c6044e433005206b3b15
refs/heads/master
2020-06-12T04:19:47.245942
2019-03-10T15:35:15
2019-03-10T15:35:15
null
0
0
null
null
null
null
UTF-8
C++
false
false
454
h
//---------------------------------------------------// // Apache License Version 2.0, January 2004 // // Copyright @ 2016-2019 Tony Su All Rights Reserved // // https://github.com/peitaosu/PalmA-crossplatform // //---------------------------------------------------// #ifndef PALMA_TEST_H #define PALMA_TEST_H class Test { public: Test(); void testAllClasses(); void testGoThrough(); }; #endif // PALMA_TEST_H
[ "peitaosu@163.com" ]
peitaosu@163.com
24b6dbb0a0afcf529cb053b300bc5b05708e3c2e
6f74a7991f4da24be99a67489e55402b33e75d62
/classes/game/item/BalloonItem.h
fe9a7f6f37560106e0d26af1182317d68acdefb7
[]
no_license
codemage128/unity-to-cocos2d-apk-clone
73a73514ae1029b6710b93aeb139cec5c01a126d
c81b5367dc8a8312a90a3a4b9c94c9437f89d15a
refs/heads/master
2023-08-03T06:26:41.345990
2020-07-23T12:57:18
2020-07-23T12:57:18
null
0
0
null
null
null
null
UTF-8
C++
false
false
833
h
#ifndef __ENGINE_BALLOONITEM_H__ #define __ENGINE_BALLOONITEM_H__ #include "../ItemImpl.h" enum class MatchType; enum class CollectAnimation; class BalloonItem : public SpriteBasedItem { public: BalloonItem(); virtual ~BalloonItem(); void SetupItem(); virtual void RemoveSelf() override; bool CanExplodeDueToExplodeInNeigbour(MatchType sourceType) override { return true; } void BringToFront() override; void SendToBack() override { this->OnCellChanged(); } ItemType GetItemType() override { return ItemType::Balloon; } int GetScore() override { return 500; } bool CanCastShadow() override { return true; } void ReactToUpperFall() override; void PlayExplodeAudio() override; CollectAnimation GetCollectItem() override; protected: void PlayOnExplodeStartedAnimation() override; }; #endif //__ENGINE_BALLOONITEM_H__
[ "futuredev1001@yandex.com" ]
futuredev1001@yandex.com
e57c88d8a8228b15d5807ff02de82eea9296de0c
786d74f7a59c2ded394bc653f559238e35414ef5
/src/net/awsupload/hmUdpClient.cpp
f0856c16d9a0b7651825d37b9f954094147de778
[]
no_license
akumrao/mediaserver
77f71c46e69cbcef9969bcf70867d140fdd0a806
046aad2106a859562cf9b6d56a1e56c589843fc2
refs/heads/master
2023-04-16T13:51:12.166666
2022-06-27T07:01:48
2022-06-27T07:01:48
214,117,984
15
12
null
null
null
null
UTF-8
C++
false
false
7,222
cpp
/* This file is part of mediaserver. A webrtc sfu server. * Copyright (C) 2018 Arvind Umrao <akumrao@yahoo.com> & Herman Umrao<hermanumrao@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. * */ #include "hmUdpClient.h" #include "base/logger.h" #include "base/application.h" #include "base/platform.h" #include "net/TcpConnection.h" #include <math.h> /* ceil */ //////////////////// #include <stdio.h> #include <sys/stat.h> #include <sys/mman.h> #include <fcntl.h> #include <unistd.h> #include <stdlib.h> ////////////////// //using std::endl; using namespace base; using namespace net; hmUdpClient::hmUdpClient():restartPacketNo(0), uploadedPacketNO(0),TcpConnection(this) { // for (int x = 0; x < clientCount; ++x) { // clinetstorage[x] = new char[UdpDataSize]; // } storage = nullptr; size_of_packet = sizeof (struct Packet); send_buffer = new char[size_of_packet]; //sendheader = true; // sendfile= true; //uv_sem_init(&sem, 0); // if (sem_init(&sem, 0, 0) == -1) // LTrace("handle_error sem_init") ; rem=0; } void hmUdpClient::start(std::string ip, int prt) { IP = ip; port = prt; Thread::start(); } hmUdpClient::~hmUdpClient() { // join(); delete []send_buffer; if(fd > 0 ) { munmap(storage, size); close(fd); } // delete udpClient; // udpClient = nullptr; // sem_destroy(&sem); LTrace("~hmUdpClient()" ) } static void async_cb_upload(uv_async_t* handle) { LTrace(" Upload::async_cb_upload") hmUdpClient *p = ( hmUdpClient *) handle->data; uv_close((uv_handle_t*)&p->async, nullptr); p->Close(); SInfo << "Upload::async_cb_upload over" ; } void hmUdpClient::on_connect() { STrace << "hmUdpClient::on_connect() "; while( !stopped() && rem < lastPacketNo ) { // // if (!rem) { //udpClient->connect(); sendHeader(m_fileName); } if (rem < lastPacketNo) sendFile(); ++rem; // udp_client_mutex.lock(); // if (restartPacketNo) { // rem = 0; // restartPacketNo = 0; // STrace << "restartPacketNo Frame " << rem << " Uploaded " << uploadedPacketNO << " Lastpacketno " << lastPacketNo ; // // } // udp_client_mutex.unlock(); // STrace << "Read Packet Frame " << rem; // if( ( (uploadedPacketNO < lastPacketNo) && (rem > lastPacketNo) )) // { // STrace << "Read Packet Frame " << rem << " Uploaded " << uploadedPacketNO << " Lastpacketno " << lastPacketNo ; // // ; /* should block */ // //udpClient->connect(); // } else { // clock_gettime(CLOCK_REALTIME, &tm); //tm.tv_nsec += 1000000000L; // tm.tv_sec += 1; // int x = sem_timedwait(&sem, &tm); // SInfo << x; //} usleep(100); //2900 // sem_wait(&sem); } // Close(); } void hmUdpClient::restartUPload(uint32_t uploaded) { // udp_client_mutex.lock(); // restUpload = true; udp_client_mutex.lock(); restartPacketNo = uploaded; udp_client_mutex.unlock(); //sem_post(&sem); //udp_client_mutex.unlock(); } void hmUdpClient::on_close() { SInfo<< "hmUdpClient::on_close" ;//<< connection->GetLocalIp() << " PeerIP" << connection->GetPeerIp() << std::endl << std::flush; } void hmUdpClient::on_read( const char* data, size_t len) { // std::cout << "data: " << data << "len: " << len << std::endl << std::flush; // std::string send = "12345"; // connection->send((const char*) send.c_str(), 5); } void hmUdpClient::on_writes() { LTrace("on_write") // sem_post(&sem); } void hmUdpClient::run() { Application app; Connect(IP, port); LTrace("run start") SInfo << "Send File start"; async.data = this; int r = uv_async_init(app.uvGetLoop(), &async, async_cb_upload); app.run(); LTrace("hmUdpClient::run() over") } //void hmUdpClient::send(char* data, unsigned int lent) { // std::cout << "sending data " << lent << std::endl; // udpClient->send(data, lent); //} void hmUdpClient::shutdown() { LInfo("hmUdpClient::shutdown()::stop"); stop(); if(async.data) { int r = uv_async_send(&async); assert(r == 0); } //restartUPload(lastPacketNo); join(); // if(udpClient) // { // // udpClient->Close(); // // // base::sleep(500); // // // LInfo("hmUdpClient::shutdown()::udpClient"); // // } LInfo("hmUdpClient::shutdown()::over"); } bool hmUdpClient::upload( std::string fileName, std::string driverId, std::string metaData) { struct stat st; fd = open(fileName.c_str(), O_RDONLY,1); int rc = fstat(fd, &st); size=st.st_size; m_fileName = fileName; m_driverId = driverId; m_metaData = metaData; if(fd > 0) { lastPacketNo = ceil((float)size / (float) (UdpDataSize)); SInfo << "fileSize: " << size ; SInfo << "Last packet no: " << lastPacketNo ; storage = (char *)mmap(0, size, PROT_READ ,MAP_SHARED , fd, 0); return true; } else { SError << "Cannot open file: " << fileName ; return false; } } void hmUdpClient::sendPacket(uint8_t type, uint32_t payloadNo, uint32_t payloadsize, char *payload) { // SInfo << "Sending " << (int) type << " payloadNo " << payloadNo << " payloadsize " << payloadsize; //if(type == 0) // { Packet packet; packet.type = type; packet.payload_number = payloadNo; packet.payloadlen = payloadsize; memcpy(packet.payload, payload, payloadsize); memset(send_buffer, 0, size_of_packet); memcpy(send_buffer, (char*) &packet, size_of_packet); send(send_buffer, size_of_packet); // } //else //send(payload, payloadsize); } char *hmUdpClient::storage_row(unsigned int n) { return storage + (n * UdpDataSize); } void hmUdpClient::sendHeader(const std::string fileName) { SInfo << "Send Header"; if (fd> 0 ) { if (!stopped()) { std::string mtTmp = m_driverId +";" + m_metaData; sendPacket(0, lastPacketNo, mtTmp.length()+1, (char*)mtTmp.c_str()); } } } void hmUdpClient::sendFile() { if (rem < lastPacketNo-1) { // char *output = str2md5(data_packet.data, data_size); //char *output1 = str2md5(buffer[send_count], data_size); sendPacket(1, rem, UdpDataSize , storage_row(rem)); } else if( rem < lastPacketNo) { uint32_t lastPacketLen = size - rem*UdpDataSize; sendPacket(1, rem, lastPacketLen, storage_row(rem)); } } // end_time = base::Application::GetTime(); // STrace << "time_s " << double(end_time - start_time) / 1000.00 ;
[ "arvind.umrao@sococo.com" ]
arvind.umrao@sococo.com
8ab8f61ef1923c569f56d934782514c8763d02db
c865e58d41a8dd3cfd5167044721fb52bf78c094
/src/Logging.cpp
1ac31c5b7329ada6176f97a4645b7ead033fbc91
[]
no_license
wertyuiopsdfghjklxcvbn/tree
332b5cf90c1a470361be3ddd8981c942fcdfe1f0
2a19b782c68d9b6a16df2fa19e2048aed0571769
refs/heads/master
2022-05-21T05:31:48.576383
2021-08-18T20:42:35
2021-08-18T20:42:35
249,285,295
0
0
null
null
null
null
UTF-8
C++
false
false
164
cpp
#include <iostream> #include "Logging.hpp" void printError( const std::string& errorMessage, const std::string& end ) { std::cout << errorMessage << end; }
[ "alexeypavlov.m@gmail.com" ]
alexeypavlov.m@gmail.com
b942f5457f72d70fba8cdff7dd7c17d13c0d85f4
87a972e42adedb5a5fc498b446a1da2ed41628e1
/homesys/tuner/TunerDevice.h
635ba4f6653af0ac0b77fc81e208771e66b0885d
[]
no_license
gabest11/homesys
4649f6eb697284dd445f2c8d557a4771e32c2d62
3645dd0d142d6332e5ece43ac2402058f2fb8198
refs/heads/main
2022-07-29T20:33:58.685388
2022-03-30T16:07:46
2022-03-30T16:07:46
467,268,398
1
0
null
null
null
null
UTF-8
C++
false
false
1,732
h
#pragma once using namespace System; using namespace System::ServiceModel; using namespace System::Runtime::Serialization; using namespace System::Collections::Generic; namespace Homesys { namespace Local { [DataContract] public enum class TunerDeviceType { [EnumMember] None = -1, [EnumMember] Analog = 0, [EnumMember] DVBS = 1, [EnumMember] DVBT = 2, [EnumMember] DVBC = 3, [EnumMember] DVBF = 4, }; [DataContract] public ref class TunerConnector { public: [DataMember] int id; [DataMember] int num; [DataMember] int type; [DataMember] String^ name; }; [DataContract] public ref class TunerDevice { public: [DataMember] String^ dispname; [DataMember] String^ name; [DataMember] TunerDeviceType type; }; [DataContract] public ref class TunerStat { public: [DataMember] int frequency; [DataMember] int present; [DataMember] int locked; [DataMember] int strength; [DataMember] int quality; [DataMember] __int64 received; [DataMember] bool scrambled; }; [DataContract] public ref class SmartCardSubscription { public: [DataMember] unsigned short id; [DataMember] String^ name; [DataMember] List<DateTime>^ date; }; [DataContract] public ref class SmartCardDevice { public: [DataMember] String^ name; [DataMember] bool inserted; [DataMember] String^ serial; [DataMember] unsigned short systemId; [DataMember] String^ systemName; [DataMember] List<SmartCardSubscription^>^ subscriptions; }; }}
[ "gabest11@gmail.com" ]
gabest11@gmail.com
a1a240d2b1aca1479551f20e9d7b3b0d6d968dc5
4677bc79b0a1131204f64d96972fc8e7ac9e7805
/Marlin/EventSource.h
f6b4db7637541f8e2d94c41d2e700703087b5940
[]
no_license
edwig/CXHibernate
6a2f18328a25b13d75b9a54f8c8d7230ef60ce3e
d2f30e21e98838bacf0772dc8d386c92a630b249
refs/heads/master
2022-08-11T18:46:45.086712
2022-07-31T16:46:05
2022-07-31T16:46:05
131,417,873
23
6
null
null
null
null
UTF-8
C++
false
false
6,984
h
///////////////////////////////////////////////////////////////////////////////// // // SourceFile: EventSource.h // // Marlin Server: Internet server/client // // Copyright (c) 2014-2022 ir. W.E. Huisman // All rights reserved // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files(the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions : // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // ////////////////////////////////////////////////////////////////////////// // // MANUAL FOR EventSource // // 1: Define your URL e.g. XString url("http://servermachine:1200/TestApp/Events"); // 2: Declare your HTTP Client e.g. HTTPClient client; // 3: Create your eventsource as e.g. EventSource* source = client.CreateEventSource(url); // 4: Set the OnOpen handler e.g. source->m_onopen = OnOpen; // 5: Set the OnMessage handler e.g. source->m_onmessage = OnMessage; // 6: Set the OnError handler e.g. source->m_onerror = OnError; // 7: Set the OnClose handler e.g. source->m_onclose = OnClose; // 8: Set other handlers as well e.g. source->AddEventListener("other",OnOther); // 9: Define your reconnect time e.g. source->SetReconnectionTime(2000); // 10: OPTIONALLY: connect pool e.g. source->SetThreadPool(p_myPool); // // Now turning the client into a listener // source->EventSourceInit(false); // // ... DO THE NORMAL LOGIC OF YOUR APPLICATION // ... NOTE: the OnMessage handler starts by way of the threadpool // all other handlers are executed in-place by the calling thread // // At closure time and cleaning up, stop your client // client.StopClient(); // #pragma once #include "ServerEvent.h" #include <wtypes.h> #include <map> // Forward declaration class HTTPClient; class ThreadPool; // Reconnection times are in milliseconds // DEFINE DEFAULT RECONNECTION TIME = 1 second #define HTTP_RECONNECTION_TIME 1000 #define HTTP_RECONNECTION_TIME_MINIMUM 50 #define HTTP_RECONNECTION_TIME_MAXIMUM 3000 typedef enum { CONNECTING = 0 ,OPEN ,CLOSED ,CLOSED_BY_SERVER } ReadyState; typedef void(* LPFN_EVENTHANDLER)(ServerEvent* p_event,void* p_data); typedef struct _eventListener { XString m_event; LPFN_EVENTHANDLER m_handler; bool m_capture; } EventListener; typedef std::map<XString,EventListener> ListenerMap; class EventSource { public: EventSource(HTTPClient* p_client,XString p_url); ~EventSource(); // Init the event source bool EventSourceInit(bool p_withCredentials = false); // Closing the event source. Stopping on next HTTP round trip void Close(); // Add event listener to the source bool AddEventListener(XString p_event,LPFN_EVENTHANDLER p_handler,bool p_useCapture = false); // Add application pointer void SetApplicationData(void* p_data); // Setters void SetSerialize(bool p_serialize); void SetReconnectionTime(ULONG p_time); void SetThreadPool(ThreadPool* p_pool); void SetDirectMessage(bool p_direct); void SetSecurity(XString p_cookie,XString p_secret); // Getters ReadyState GetReadyState(); bool GetWithCredentials(); ULONG GetReconnectionTime(); bool GetSerialize(); ULONG GetLastEventID(); XString GetCookieName(); XString GetCookieValue(); // Public standard listeners LPFN_EVENTHANDLER m_onopen; // OPTIONAL LPFN_EVENTHANDLER m_onmessage; // MANDATORY TO SET!! LPFN_EVENTHANDLER m_onerror; // OPTIONAL LPFN_EVENTHANDLER m_onclose; // OPTIONAL // Extra (not in the SSE standard) LPFN_EVENTHANDLER m_oncomment; // OPTIONAL handle the keepalive LPFN_EVENTHANDLER m_onretry; // OPTIONAL handle the retry-setting private: // HTTPClient will provide data for parser friend HTTPClient; // Reset eventsource for reconnect void Reset(); // Set to connection state void SetConnecting(); // Handle the last-event-id of a generic listener void HandleLastID(ServerEvent* p_event); // Parse incoming data void Parse(BYTE* p_buffer,unsigned& p_length); // Parse buffer in string form void Parse(XString& p_buffer); // Get one line from the incoming buffer bool GetLine(XString& p_buffer,XString& p_line); // Dispatch this event void DispatchEvent(XString* p_event,ULONG p_id,XString* p_data); // Standard handlers, if all else fails void OnOpen (ServerEvent* p_event); void OnMessage(ServerEvent* p_event); void OnError (ServerEvent* p_event); void OnClose (ServerEvent* p_event); void OnComment(ServerEvent* p_event); void OnRetry (ServerEvent* p_event); XString m_url; bool m_withCredentials; bool m_serialize; bool m_ownPool; XString m_cookie; XString m_secret; ReadyState m_readyState; ULONG m_reconnectionTime; // No getters ULONG m_lastEventID; // No getters ListenerMap m_listeners; // All listeners ThreadPool* m_pool { nullptr }; HTTPClient* m_client { nullptr }; void* m_appData { nullptr }; bool m_direct { false }; // Incoming event XString m_eventName; XString m_eventData; }; inline ReadyState EventSource::GetReadyState() { return m_readyState; } inline bool EventSource::GetWithCredentials() { return m_withCredentials; } inline ULONG EventSource::GetReconnectionTime() { return m_reconnectionTime; } inline void EventSource::SetReconnectionTime(ULONG p_time) { m_reconnectionTime = p_time; } inline void EventSource::SetSerialize(bool p_serialize) { m_serialize = p_serialize; } inline bool EventSource::GetSerialize() { return m_serialize; } inline ULONG EventSource::GetLastEventID() { return m_lastEventID; } inline void EventSource::SetDirectMessage(bool p_direct) { m_direct = p_direct; } inline XString EventSource::GetCookieName() { return m_cookie; } inline XString EventSource::GetCookieValue() { return m_secret; }
[ "edwig.huisman@hetnet.nl" ]
edwig.huisman@hetnet.nl
e715c271e321b596ae951866649460e40444b5d0
0e5cbdd139eb90f62247556e3aa5b6ccf89864a7
/MyICP/icp.h
41e3669bc6b54f435607fa2a33f7b49b905b5926
[]
no_license
whigg/IterativeClosestPoint-ICP
fd4120a5da40f175b6fc9803b23c5165ee52d51d
457024b8e06b3371a26d847a847dde548bffd3c1
refs/heads/master
2020-12-15T14:03:32.117733
2018-09-06T13:58:46
2018-09-06T13:58:46
null
0
0
null
null
null
null
UTF-8
C++
false
false
657
h
#pragma once #include <iostream> #include <ANN\ANN.h> #include <Eigen\Eigen> class Icp { public: Icp(double** M, int32_t const M_num, int32_t const dim); virtual ~Icp(); void fit(double** T, int32_t T_num, Eigen::MatrixXd& R, Eigen::VectorXd& t, double const indist); private: void fitIterate(double** T, int32_t T_num, Eigen::MatrixXd& R, Eigen::VectorXd& t, std::vector<int>& active); virtual double fitStep(double** T, int32_t T_num, Eigen::MatrixXd& R, Eigen::VectorXd& t, std::vector<int> const& active) = 0; protected: ANNpointArray dataPts; ANNkd_tree* kdTree; int32_t dim; int32_t numPts; int32_t max_iter; double min_delta; };
[ "jianhuyy@hotmail.com" ]
jianhuyy@hotmail.com
b7ed84e70d4ebb48a94190ac1b682609e0c542ec
2d1f82fe5c4818ef1da82d911d0ed81a0b41ec85
/codeforces/R569/CF1179C.cpp
937ac43a72f18a138f89bd419940124da48b0e6d
[]
no_license
OrigenesZhang/-1s
d12bad12dee37d4bb168647d7b888e2e198e8e56
08a88e4bb84b67a44eead1b034a42f5338aad592
refs/heads/master
2020-12-31T00:43:17.972520
2020-12-23T14:56:38
2020-12-23T14:56:38
80,637,191
4
1
null
null
null
null
UTF-8
C++
false
false
2,197
cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; #define FOR(i, a, b) for (int (i) = (a); (i) <= (b); (i)++) #define ROF(i, a, b) for (int (i) = (a); (i) >= (b); (i)--) #define REP(i, n) FOR(i, 0, (n)-1) #define sqr(x) ((x) * (x)) #define all(x) (x).begin(), (x).end() #define reset(x, y) memset(x, y, sizeof(x)) #define uni(x) (x).erase(unique(all(x)), (x).end()) #define BUG(x) cerr << #x << " = " << (x) << endl #define pb push_back #define eb emplace_back #define mp make_pair #define _1 first #define _2 second #define chkmin(a, b) a = min(a, b) #define chkmax(a, b) a = max(a, b) const int maxn = 312345; const int maxc = 1123456; struct Seg { int l, r, mx, lzy; } T[maxc << 2]; int n, m, q; int a[maxn], b[maxn]; void build(int o, int l, int r) { T[o].l = l, T[o].r = r; if (l < r) { int mi = l + r >> 1; build(o << 1, l, mi); build(o << 1 | 1, mi + 1, r); } } inline void push_down(int o) { T[o << 1].mx += T[o].lzy; T[o << 1 | 1].mx += T[o].lzy; T[o << 1].lzy += T[o].lzy; T[o << 1 | 1].lzy += T[o].lzy; T[o].lzy = T[o].mx = 0; } inline void push_up(int o) { T[o].mx = max(T[o << 1].mx, T[o << 1 | 1].mx); } void add(int o, int l, int r, int d) { if (l <= T[o].l && T[o].r <= r) { T[o].mx += d; T[o].lzy += d; return; } push_down(o); int mi = T[o].l + T[o].r >> 1; if (l <= mi) add(o << 1, l, r, d); if (r > mi) add(o << 1 | 1, l, r, d); push_up(o); } int query(int o) { if (T[o].mx <= 0) return -1; if (T[o].l == T[o].r) return T[o].l; push_down(o); int ret; if (T[o << 1 | 1].mx > 0) ret = query(o << 1 | 1); else ret = query(o << 1); push_up(o); return ret; } int main() { scanf("%d%d", &n, &m); FOR(i, 1, n) scanf("%d", a + i); FOR(i, 1, m) scanf("%d", b + i); build(1, 1, 1e6); FOR(i, 1, n) add(1, 1, a[i], 1); FOR(i, 1, m) add(1, 1, b[i], -1); scanf("%d", &q); while (q--) { int op, i, x; scanf("%d%d%d", &op, &i, &x); if (op == 1) { add(1, 1, a[i], -1); a[i] = x; add(1, 1, x, 1); } else { add(1, 1, b[i], 1); b[i] = x; add(1, 1, b[i], -1); } printf("%d\n", query(1)); } }
[ "zhangbin199807@gmail.com" ]
zhangbin199807@gmail.com
d6159530e6b0dae93bf33788f4b270f40595a91d
3864a5bcee717bdf9fbdcc8c6e839579f5d3971a
/src/vec3.hpp
40d38c312515a75cf7ad570f7057b1be26c1868c
[]
no_license
MattRickS/raytracer
77764fe5ecb955cf1488daa4f2afaaa2b2e944d9
d568a8e392e76eff34e39be5196594e47c5f0961
refs/heads/master
2022-11-18T20:38:10.522545
2020-07-13T13:51:07
2020-07-13T13:51:07
279,055,140
0
0
null
null
null
null
UTF-8
C++
false
false
2,798
hpp
#pragma once #include <cmath> #include <iostream> #include <utils.hpp> class vec3 { public: union { double data[3]; struct { double x; double y; double z; }; struct { double r; double g; double b; }; }; vec3() : data{0, 0, 0} {} vec3(double x) : data{x, x, x} {} vec3(double x, double y, double z) : data{x, y, z} {} vec3 operator-() const { return vec3(-x, -y, -z); } double operator[](int i) const { return data[i]; } double &operator[](int i) { return data[i]; } vec3 &operator+=(const vec3 &v) { x += v.x; y += v.y; z += v.z; return *this; } vec3 &operator*=(const double t) { x *= t; y *= t; z *= t; return *this; } vec3 &operator/=(const double t) { return *this *= 1 / t; } inline static vec3 random() { return vec3(randDouble(), randDouble(), randDouble()); } inline static vec3 random(double min, double max) { return vec3(randDouble(min, max), randDouble(min, max), randDouble(min, max)); } }; using point3 = vec3; using color3 = vec3; inline std::ostream &operator<<(std::ostream &out, const vec3 &v) { return out << v.x << ' ' << v.y << ' ' << v.z; } inline vec3 operator+(const vec3 &lhs, const vec3 &rhs) { return vec3(lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z); } inline vec3 operator-(const vec3 &lhs, const vec3 &rhs) { return vec3(lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z); } inline vec3 operator*(const vec3 &lhs, const vec3 &rhs) { return vec3(lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z); } inline vec3 operator*(const vec3 &lhs, const double rhs) { return vec3(lhs.x * rhs, lhs.y * rhs, lhs.z * rhs); } inline vec3 operator*(const double lhs, const vec3 &rhs) { return rhs * lhs; } inline vec3 operator/(const vec3 &lhs, const double rhs) { return lhs * (1 / rhs); } inline vec3 cross(const vec3 &lhs, const vec3 &rhs) { return vec3( lhs.y * rhs.z - lhs.z * rhs.y, lhs.z * rhs.x - lhs.x * rhs.z, lhs.x * rhs.y - lhs.y * rhs.x); } inline double dot(const vec3 &lhs, const vec3 &rhs) { return lhs.x * rhs.x + lhs.y * rhs.y + lhs.z * rhs.z; } inline double dot(const vec3 &v) { return dot(v, v); } inline double length(const vec3 &v) { return std::sqrt(dot(v)); } inline vec3 normalise(const vec3 &v) { return v / length(v); } vec3 randomUnitDisk(); vec3 randomUnitHemisphere(const vec3 &normal); vec3 randomUnitSphere(); vec3 randomUnitVector(); vec3 reflect(const vec3 &v, const vec3 &normal); vec3 refract(const vec3 &v, const vec3 &normal, double etai_over_etat);
[ "mattalexshaw@gmail.com" ]
mattalexshaw@gmail.com
e0c6d846b7418285cbbd0b54bb4d8f38b347d1e8
e8cb2170814443329a9c36ff414624b0a6b589ad
/EASY/563_Binary Tree Tilt.cpp
c44539ceb9e6ececa1f6df4dc9d4411aebae5f31
[]
no_license
alienxcn/LeetCodeAcceptedCode
acf64d1d53711290cc726bdaeb210b00dc82681c
aef033bccade2e64c34b7b72c1681da06576e8b1
refs/heads/master
2021-07-15T13:25:13.771472
2020-09-14T07:30:10
2020-09-14T07:30:10
207,759,718
0
0
null
null
null
null
UTF-8
C++
false
false
560
cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: int temp; int TreeTilt(TreeNode* root) { if(root == NULL) { return 0; } int L = TreeTilt(root->left); int R = TreeTilt(root->right); temp += abs(L-R); return L + R + root->val; } int findTilt(TreeNode* root) { TreeTilt(root); return temp; } };
[ "me@alienx.cn" ]
me@alienx.cn
1fd45a959830d68b96dfb37c99ab2ebd55f1f6f4
f5788ce2deadbbe930a5396a8debd19d4b46e1a1
/src/45_Permutations/Permutations_test.cc
a76639457f3522221e32c744347033db05c101bc
[]
no_license
feixia586/leetcode
3d8c0c8a6d826fa0ba6931f26c15e4c38471d14e
d29da59412a1ce2f164434d9d4b16489e26e1852
refs/heads/master
2021-01-17T13:11:01.075096
2017-06-05T01:16:24
2017-06-05T01:16:24
15,178,743
8
1
null
null
null
null
UTF-8
C++
false
false
297
cc
#include "gtest/gtest.h" #include "Permutations.cc" TEST(Permutation, TestA) { Solution sol; vector<int> num1; num1.push_back(3); num1.push_back(4); vector<vector<int> > res = sol.permute(num1); ASSERT_EQ(2, res.size()); ASSERT_EQ(2, res[0].size()); ASSERT_EQ(2, res[1].size()); }
[ "feixia@cs.cmu.edu" ]
feixia@cs.cmu.edu
9ff06edebc2c0e3d0fccff6bf1ed5b1519be151a
24f26275ffcd9324998d7570ea9fda82578eeb9e
/services/viz/public/cpp/gpu/gpu.h
33a0998394ee8a630d63ce34effb5901f57ea3d1
[ "BSD-3-Clause" ]
permissive
Vizionnation/chromenohistory
70a51193c8538d7b995000a1b2a654e70603040f
146feeb85985a6835f4b8826ad67be9195455402
refs/heads/master
2022-12-15T07:02:54.461083
2019-10-25T15:07:06
2019-10-25T15:07:06
217,557,501
2
1
BSD-3-Clause
2022-11-19T06:53:07
2019-10-25T14:58:54
null
UTF-8
C++
false
false
3,121
h
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef SERVICES_VIZ_PUBLIC_CPP_GPU_GPU_H_ #define SERVICES_VIZ_PUBLIC_CPP_GPU_GPU_H_ #include <stdint.h> #include <vector> #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/single_thread_task_runner.h" #include "components/viz/common/gpu/context_provider.h" #include "gpu/ipc/client/gpu_channel_host.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_remote.h" #include "services/viz/public/cpp/gpu/client_gpu_memory_buffer_manager.h" #include "services/viz/public/mojom/gpu.mojom.h" namespace service_manager { class Connector; } namespace viz { class Gpu : public gpu::GpuChannelEstablishFactory { public: // The Gpu has to be initialized in the main thread before establishing // the gpu channel. static std::unique_ptr<Gpu> Create( service_manager::Connector* connector, const std::string& service_name, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner); static std::unique_ptr<Gpu> Create( mojo::PendingRemote<mojom::Gpu> remote, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner); ~Gpu() override; gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() const { return gpu_memory_buffer_manager_.get(); } #if defined(OS_CHROMEOS) void CreateJpegDecodeAccelerator( mojo::PendingReceiver<chromeos_camera::mojom::MjpegDecodeAccelerator> jda_receiver); #endif // defined(OS_CHROMEOS) void CreateVideoEncodeAcceleratorProvider( mojo::PendingReceiver<media::mojom::VideoEncodeAcceleratorProvider> vea_provider_receiver); // gpu::GpuChannelEstablishFactory: void EstablishGpuChannel( gpu::GpuChannelEstablishedCallback callback) override; scoped_refptr<gpu::GpuChannelHost> EstablishGpuChannelSync() override; gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override; void LoseChannel(); scoped_refptr<gpu::GpuChannelHost> GetGpuChannel(); private: friend class GpuTest; class GpuPtrIO; class EstablishRequest; Gpu(mojom::GpuPtr gpu_ptr, scoped_refptr<base::SingleThreadTaskRunner> task_runner); // Sends a request to establish a gpu channel. If a request is currently // pending this will do nothing. void SendEstablishGpuChannelRequest(); // Handles results of request to establish a gpu channel in // |pending_request_|. void OnEstablishedGpuChannel(); scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; std::unique_ptr<ClientGpuMemoryBufferManager> gpu_memory_buffer_manager_; std::unique_ptr<GpuPtrIO, base::OnTaskRunnerDeleter> gpu_; scoped_refptr<EstablishRequest> pending_request_; scoped_refptr<gpu::GpuChannelHost> gpu_channel_; std::vector<gpu::GpuChannelEstablishedCallback> establish_callbacks_; DISALLOW_COPY_AND_ASSIGN(Gpu); }; } // namespace viz #endif // SERVICES_VIZ_PUBLIC_CPP_GPU_GPU_H_
[ "rjkroege@chromium.org" ]
rjkroege@chromium.org
2c63fa01cc36ecf0228680f53975c5f02115b032
df4a6153be9112431f90ce6b7be903c31a2f32af
/WinAPI_Template/WinAPI_Template/Player.h
d6fcac0add3b2e5c00e35134dfe1991620ab68d1
[]
no_license
haroa/SGA
5dd360049f8e904f0f3f4e8e829c19d352406b35
156c91b448dfc588a9abee595d2ce816aaa708aa
refs/heads/master
2021-09-04T07:56:50.587071
2018-01-17T06:59:59
2018-01-17T06:59:59
107,367,412
0
0
null
null
null
null
UTF-8
C++
false
false
390
h
#pragma once #include "SpritesObject.h" #define GRAVITY 0.3f class Player : public SpritesObject { // vars private: GameObject m_gameObj; int m_playerState; float m_fjumppower; float m_fGravity; bool m_isJumpping; public: Player(); ~Player(); virtual void Update() override; virtual void Render() override; void PlayerController(); };
[ "32758491+haroa@users.noreply.github.com" ]
32758491+haroa@users.noreply.github.com
17ccf205752fbfb3747a6c4c4383e6e7dfb77469
f5eab657e37cd61ba81f849eefb4aa3de8ed0e44
/C/mosquito.h
f2536b36a47bc20109965721f4d89a4fb89a6f4b
[]
no_license
slphyx/Indivaria
3cc31f91c6ac6c29510743f2f04388c72aa92365
b9382f7e12cea788c880e98fd802431dfba21003
refs/heads/master
2022-03-06T08:35:22.769029
2022-02-24T13:44:37
2022-02-24T13:44:37
231,531,012
0
0
null
null
null
null
UTF-8
C++
false
false
390
h
#ifndef _MOSQUITO_ #define _MOSQUITO_ class mosquito { public: double SporozoiteRate(double a,double x,double P,double n); double InoculationRate(double m,double a,double b,double S); double ReproductiveRate(double m,double a,double b,double x,double P,double n,double z); double ReproductiveRate0(double m,double a,double b,double P,double n,double z); }; #endif
[ "sakngoi@hotmail.com" ]
sakngoi@hotmail.com
5700a6abe0264be0c9850cf52e6bf5abdfa8162e
5a9a187cfbc5074d71bd4ac34217c2ff31adcfd2
/tests/square.cc
f643f5fe055e16f90154054fc010279d459490e7
[ "MIT", "NCSA", "LicenseRef-scancode-unknown-license-reference" ]
permissive
wingo/pictie
abcc2d535ffdb82ddb291f6baa738c97a91b6ca4
2d8747f91b0e29a99c583ba567c2f23b1d319abd
refs/heads/master
2020-05-07T19:28:37.388405
2019-04-23T12:40:23
2019-04-23T12:40:23
180,814,709
16
0
null
null
null
null
UTF-8
C++
false
false
542
cc
#include <stdio.h> #include "../pictie.h" int main (int argc, char* argv[]) { if (argc != 2) { fprintf(stderr, "usage: %s OUT\n", argv[0]); return 1; } DrawingContext cx(200); PainterPtr square = transform(color(Color(100, 100, 200)), Vector(0.1,0.1), Vector(0.9,0.1), Vector(0.1,0.9)); paint(cx, square); if (!cx.writePPM(argv[1])) { return 1; } fprintf(stdout, "wrote output to %s\n", argv[1]); return 0; }
[ "wingo@igalia.com" ]
wingo@igalia.com
021a3503e81d0cca468a46372ee5dc78aab12967
3635df8d74077ff1d51e468f545d21a7a73a584e
/Anima/include/AnimaMathVector4.h
672285ecbe4c0658a5d36a7ab6f4c5ecb4eaecc6
[]
no_license
edamiani/Anima-Engine
2615ee632b10e35dceb82b902661acd988aa9396
14b99b71bf5ea5c4b19d08037ca56298a36f6288
refs/heads/master
2021-12-14T10:38:18.883495
2021-12-02T20:08:08
2021-12-02T20:08:08
18,024,642
4
0
null
null
null
null
UTF-8
C++
false
false
768
h
#ifndef __ANIMA_MATH_VECTOR4__ #define __ANIMA_MATH_VECTOR4__ #include "AnimaTypes.h" namespace AE { namespace Math { class Vector4 { public: float x, y, z, w; Vector4() { } Vector4(const Vector4 &vec) : x(vec.x), y(vec.y), z(vec.z), w(vec.w) { } Vector4(float xValue, float yValue, float zValue, float wValue) : x(xValue), y(yValue), z(zValue), w(wValue) { } Vector4 &operator =(const Vector4 &vec) { x = vec.x; y = vec.y; z = vec.z; w = vec.w; return *this; } bool operator ==(const Vector4 &vec) const { return x == vec.x && y == vec.y && z == vec.z && w == vec.w; } bool operator !=(const Vector4 &vec) const { return x != vec.x || y != vec.y || z != vec.z || w != vec.w; } }; } } #endif
[ "edamiani@gmail.com" ]
edamiani@gmail.com
a446f23728463a44f9fafdabbbadee7e4df90652
2124d0b0d00c3038924f5d2ad3fe14b35a1b8644
/source/SEAL_Foundation/SealBase/tests/SaveErrno01.cpp
d1ce4782306c7efc715be1b615646f75fd646803
[]
no_license
arceciemat/GAMOS
2f3059e8b0992e217aaf98b8591ef725ad654763
7db8bd6d1846733387b6cc946945f0821567662b
refs/heads/master
2023-07-08T13:31:01.021905
2023-06-26T10:57:43
2023-06-26T10:57:43
21,818,258
1
0
null
null
null
null
UTF-8
C++
false
false
595
cpp
#include "SealTest/SealTest.h" #include "SealBase/SaveErrno.h" #include "SealBase/Signal.h" #include <iostream> #include <iomanip> #include <cerrno> using namespace seal; int seal_test::SaveErrno01(int, char **argv) { Signal::handleFatal (argv[0]); seal_test::out << "errno (default) = " << errno << std::endl; errno = EINVAL; seal_test::out << "errno (EINVAL) = " << errno << std::endl; { SaveErrno s; errno = EDOM; seal_test::out << "errno (EDOM) = " << errno << std::endl; } seal_test::out << "errno (EINVAL) = " << errno << std::endl; return 0; }
[ "pedro.arce@ciemat.es" ]
pedro.arce@ciemat.es
eaee5372d2292d71444156a9094cd2524a0a110a
80fda55e349f79ded19ab5176c90c99ec3e1c272
/contests/abc/11/115/a.cpp
afae8b2cb8bd710bc5e509238704997dfa5dd616
[]
no_license
naoto0804/atcoder_practice
6b161e36eb25ba26ac715caee99364c2bf9fc95f
0416b8f45bd36e4ea307a13e3860e40cd7b9f94b
refs/heads/master
2021-07-19T21:42:10.946063
2021-07-05T01:33:31
2021-07-05T01:33:31
250,864,437
0
0
null
null
null
null
UTF-8
C++
false
false
1,058
cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<ll, ll>; using Graph = vector<vector<ll>>; #define rep(i, n) for(ll i=0;i<(ll)(n);i++) #define rep2(i, m, n) for(ll i=m;i<(ll)(n);i++) #define rrep(i, n, m) for(ll i=n;i>=(ll)(m);i--) const int dx[4] = {1, 0, -1, 0}; const int dy[4] = {0, 1, 0, -1}; const int ddx[8] = {0, 1, 1, 1, 0, -1, -1, -1}; const int ddy[8] = {1, 1, 0, -1, -1, -1, 0, 1}; const ll MOD = 1000000007; const ll INF = 1000000000000000000L; #ifdef __DEBUG /** * For DEBUG * https://github.com/ta7uw/cpp-pyprint */ #include "cpp-pyprint/pyprint.h" #endif void Main() { ll D; cin >> D; string ans; if (D == 25){ ans = "Christmas"; } else if (D == 24){ ans = "Christmas Eve"; } else if (D == 23){ ans = "Christmas Eve Eve"; } else if (D == 22){ ans = "Christmas Eve Eve Eve"; } cout << ans << endl; } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(15); Main(); return 0; }
[ "kingfisher0804@gmail.com" ]
kingfisher0804@gmail.com
4d21e72b32271a6f8b24a8959e245b9fc3d1b320
dfc8edc3a1c832961bb9a7041bad55b25c5ea146
/games/catastrophe/impl/structure_impl.cpp
be657d1b77a166f8b03e3e52bbb218ab0d89f392
[ "MIT" ]
permissive
siggame/Joueur.cpp
5f7332e2d8bbd0daac078ed93ca697a74a847435
673fce574ca80fb8f02777e610884a1c9808501d
refs/heads/master
2022-06-05T16:32:09.667029
2022-05-04T15:43:48
2022-05-04T15:43:48
39,783,980
9
21
MIT
2020-11-08T17:06:08
2015-07-27T16:02:44
C++
UTF-8
C++
false
false
3,524
cpp
// DO NOT MODIFY THIS FILE // Never try to directly create an instance of this class, or modify its member variables. // This contains implementation details, written by code, and only useful to code #include "../structure.hpp" #include "../../../joueur/src/base_ai.hpp" #include "../../../joueur/src/any.hpp" #include "../../../joueur/src/exceptions.hpp" #include "../../../joueur/src/delta.hpp" #include "../game_object.hpp" #include "../job.hpp" #include "../player.hpp" #include "../structure.hpp" #include "../tile.hpp" #include "../unit.hpp" #include "catastrophe.hpp" #include <type_traits> namespace cpp_client { namespace catastrophe { Structure_::Structure_(std::initializer_list<std::pair<std::string, Any&&>> init) : Game_object_{ {"effectRadius", Any{std::decay<decltype(effect_radius)>::type{}}}, {"materials", Any{std::decay<decltype(materials)>::type{}}}, {"owner", Any{std::decay<decltype(owner)>::type{}}}, {"tile", Any{std::decay<decltype(tile)>::type{}}}, {"type", Any{std::decay<decltype(type)>::type{}}}, }, effect_radius(variables_["effectRadius"].as<std::decay<decltype(effect_radius)>::type>()), materials(variables_["materials"].as<std::decay<decltype(materials)>::type>()), owner(variables_["owner"].as<std::decay<decltype(owner)>::type>()), tile(variables_["tile"].as<std::decay<decltype(tile)>::type>()), type(variables_["type"].as<std::decay<decltype(type)>::type>()) { for(auto&& obj : init) { variables_.emplace(std::make_pair(std::move(obj.first), std::move(obj.second))); } } Structure_::~Structure_() = default; void Structure_::resize(const std::string& name, std::size_t size) { try { Game_object_::resize(name, size); return; } catch(...){} throw Bad_manipulation(name + " in Structure treated as a vector, but it is not a vector."); } void Structure_::change_vec_values(const std::string& name, std::vector<std::pair<std::size_t, Any>>& values) { try { Game_object_::change_vec_values(name, values); return; } catch(...){} throw Bad_manipulation(name + " in Structure treated as a vector, but it is not a vector."); } void Structure_::remove_key(const std::string& name, Any& key) { try { Game_object_::remove_key(name, key); return; } catch(...){} throw Bad_manipulation(name + " in Structure treated as a map, but it is not a map."); } std::unique_ptr<Any> Structure_::add_key_value(const std::string& name, Any& key, Any& value) { try { return Game_object_::add_key_value(name, key, value); } catch(...){} throw Bad_manipulation(name + " in Structure treated as a map, but it is not a map."); } bool Structure_::is_map(const std::string& name) { try { return Game_object_::is_map(name); } catch(...){} return false; } void Structure_::rebind_by_name(Any* to_change, const std::string& member, std::shared_ptr<Base_object> ref) { if(member == "owner") { to_change->as<Player>() = std::static_pointer_cast<Player_>(ref); return; } if(member == "tile") { to_change->as<Tile>() = std::static_pointer_cast<Tile_>(ref); return; } try { Game_object_::rebind_by_name(to_change, member, ref); return; } catch(...){} throw Bad_manipulation(member + " in Structure treated as a reference, but it is not a reference."); } } // catastrophe } // cpp_client
[ "admin@tehpers.com" ]
admin@tehpers.com
e5a18e32402a15336c4ad8833976eb099d134fd6
c5b14f66fb0767a6fa1d7c36e1adc520b01b273f
/Precompiled.h
855953c678ddb4685dbd8b7aa82f416a7c208723
[]
no_license
ValentinScorp/DirectX
0be19a14f9c60e2172ae936497151ceadd9d2871
8578bd88286327903a42b27d16218f72bb9472b9
refs/heads/master
2021-09-05T01:41:41.868139
2018-01-23T14:33:02
2018-01-23T14:33:02
116,135,026
1
0
null
null
null
null
UTF-8
C++
false
false
922
h
#ifndef SOURCE_PRECOMPILED_H_ #define SOURCE_PRECOMPILED_H_ #include <windows.h> #include <windowsx.h> #include <iostream> #include <sstream> #include <vector> #include <list> #include <string> #include <fstream> #include <iostream> #include <iterator> #include <d3d9.h> #include <d3dx9.h> #include <time.h> #include "Utility.h" #include "Clock.h" #include "Shader.h" #include "MessageManager.h" #include "UserInput.h" #include "Mesh.h" #include "AnimatedMesh.h" #include "TerrainBrush.h" #include "SmaLoader.h" #include "Camera.h" #include "RigidBody.h" #include "GameObject.h" #include "Scene.h" #include "TerrainTile.h" #include "TerrainRenderer.h" #include "Renderer.h" #include "Terrain.h" #include "TerrainPatch.h" #include "GuiComponent.h" #include "GuiText.h" #include "GuiButton.h" #include "GuiList.h" #include "GuiBitmap.h" #include "GuiSystem.h" #define SCREEN_WIDTH 1024 #define SCREEN_HEIGHT 768 #endif
[ "valentin.blo@gmail.com" ]
valentin.blo@gmail.com
d2407d59eb1cb3a72072a7d31fcadf53b6065f56
54dda1d09ce43869231b20736bf13fcf2e870ce3
/LC1340_jumpGame_V.cpp
69989a9ca93fc90e2f075408eb49e1ddfbcdc4b7
[]
no_license
byronrwth/sonar_static_code_analysis
084bd7c0559365e3bdc1a24a04a3f020da2e2659
2246ca588fa348e35bb5db1481529b2ee29f952a
refs/heads/main
2023-04-09T19:55:12.521398
2021-04-21T16:53:01
2021-04-21T16:53:01
359,955,501
0
0
null
null
null
null
UTF-8
C++
false
false
972
cpp
class Solution { public: void jump( vector<int>& arr, int d, unordered_map<int, vector<int>>& graph ) { deque<int> dq; for(int i=0;i < arr.size(); ++i) { while( dq.size() && arr[ dq.back() ] < arr[i] ) { int j = dq.back() ; dq.pop_back(); if ( abs(i-j) <= d ) {// can jump from j to i graph[j].push_back(i); // low to high: j -> i } } dq.push_back(i); } } int maxJumps(vector<int>& arr, int d) { int n = arr.size(); vector<int> dp(n, 1); unordered_map<int, vector<int>> graph; // 左 往 右 扫一次 jump( arr, d, graph ) ; // 右 往 左 扫一次 jump( reverse( begin(arr), end(arr) ), d, graph ) ; return *max_element( begin(dp), end(dp) ) ; } };
[ "byroneagle@gmail.com" ]
byroneagle@gmail.com
e7d4df98291983242995b5e144f2ca3a8c76faf7
7763ebabad16e792d41ba2753a9746bf7496a26e
/cocos2D/Lib/XFlatformCorePackage/IOS_CP/include/Platform/GeoLocator.h
f5537671a383f4d54b98dbf3bb4be98fbdd3ff0d
[]
no_license
flowerfx/ColorLockPuzzle
a4dc1ebf4ccfce74da5bb1f4472c71d2182351bc
2e17e6305a437a1e1c76093d82f63703ecfa3def
refs/heads/master
2021-01-10T23:31:44.419176
2020-05-06T14:04:09
2020-05-06T14:04:09
69,724,573
1
1
null
null
null
null
UTF-8
C++
false
false
1,568
h
#ifndef __GEOLOCATOR_H__ #define __GEOLOCATOR_H__ /// This define (PLATFORM_IMPL) must be defined here because is a protection that /// that does not let you to include PlatformBaseInterface/PlatformBase.h directly. #define PLATFORM_IMPL #include "PlatformBaseInterface/PlatformBase.h" #include <mutex> namespace platform { class NativeGeoLocatorAdapter; class GeoLocator : public GeoLocatorBase { // Do not remove this friend directive. I know that this is not an 'by the book' approach, but solves the encapsulation problems. // Without this line the shared_ptr of template class PlatformImpl cannot access the private constructor & destructor. // If you remove this line, you need to make public the constructor & destructor => break the initial design => expose unneded/untested behaviour. friend class GeoLocatorBase; friend class NativeGeoLocatorAdapter; public: void Enable() override; void Disable() override; bool IsEnabled() override; Location GetLocation() override; bool HasValidCoordinates() override; State GetState() override; private: void OnLocationChanged(double latitude, double longitude, double altitude, double accuracy); void OnAccessDenied(); void OnServiceDisabled(); void OnExpiredCoordinates(); private: NativeGeoLocatorAdapter* m_nativeGeoLocatorAdapter; Location m_location; std::mutex m_guard; GeoLocator(); ~GeoLocator(); /** This is used to store the current state */ std::atomic<State> m_state; }; } // namespace platform #endif //__GEOLOCATOR_H__
[ "qchien.gl@hotmail.com" ]
qchien.gl@hotmail.com
02342b01f7b1a721f47458b4470d730e509519b6
6c96f814e3d9702a1d122283f85974dcf832cf85
/ui/views/bubble/bubble_dialog_delegate_view.cc
e89cf97713d84e76a5331bd5203c31716e341586
[ "BSD-3-Clause" ]
permissive
TeamFirework/SapphireBrowser
bb3c37029d3563cecda6b385ecf3c2fe47b59822
700552d0b781685f25d6ffe66c7f25febd1f7ba9
refs/heads/master
2023-02-28T14:05:33.172360
2018-09-23T18:39:05
2018-09-23T18:39:05
149,320,091
1
0
null
null
null
null
UTF-8
C++
false
false
15,802
cc
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "base/metrics/histogram_macros.h" #include "build/build_config.h" #include "ui/accessibility/ax_node_data.h" #include "ui/base/default_style.h" #include "ui/base/material_design/material_design_controller.h" #include "ui/base/resource/resource_bundle.h" #include "ui/gfx/color_utils.h" #include "ui/gfx/geometry/rect.h" #include "ui/native_theme/native_theme.h" #include "ui/views/bubble/bubble_frame_view.h" #include "ui/views/layout/layout_manager.h" #include "ui/views/layout/layout_provider.h" #include "ui/views/view_properties.h" #include "ui/views/view_tracker.h" #include "ui/views/views_delegate.h" #include "ui/views/widget/widget.h" #include "ui/views/widget/widget_observer.h" #include "ui/views/window/dialog_client_view.h" #if defined(OS_WIN) #include "ui/base/win/shell.h" #endif #if defined(OS_MACOSX) #include "ui/views/widget/widget_utils_mac.h" #endif namespace views { namespace { // The frame view for bubble dialog widgets. These are not user-sizable so have // simplified logic for minimum and maximum sizes to avoid repeated calls to // CalculatePreferredSize(). class BubbleDialogFrameView : public BubbleFrameView { public: explicit BubbleDialogFrameView(const gfx::Insets& title_margins) : BubbleFrameView(title_margins, gfx::Insets()) {} // View: gfx::Size GetMinimumSize() const override { return gfx::Size(); } gfx::Size GetMaximumSize() const override { return gfx::Size(); } private: DISALLOW_COPY_AND_ASSIGN(BubbleDialogFrameView); }; bool CustomShadowsSupported() { #if defined(OS_WIN) return ui::win::IsAeroGlassEnabled(); #else return true; #endif } // Create a widget to host the bubble. Widget* CreateBubbleWidget(BubbleDialogDelegateView* bubble) { Widget* bubble_widget = new Widget(); Widget::InitParams bubble_params(Widget::InitParams::TYPE_BUBBLE); bubble_params.delegate = bubble; bubble_params.opacity = CustomShadowsSupported() ? Widget::InitParams::TRANSLUCENT_WINDOW : Widget::InitParams::OPAQUE_WINDOW; bubble_params.accept_events = bubble->accept_events(); // Use a window default shadow if the bubble doesn't provides its own. if (bubble->GetShadow() == BubbleBorder::NO_ASSETS) bubble_params.shadow_type = Widget::InitParams::SHADOW_TYPE_DEFAULT; else if (CustomShadowsSupported()) bubble_params.shadow_type = Widget::InitParams::SHADOW_TYPE_NONE; else bubble_params.shadow_type = Widget::InitParams::SHADOW_TYPE_DROP; if (bubble->parent_window()) bubble_params.parent = bubble->parent_window(); else if (bubble->anchor_widget()) bubble_params.parent = bubble->anchor_widget()->GetNativeView(); bubble_params.activatable = bubble->CanActivate() ? Widget::InitParams::ACTIVATABLE_YES : Widget::InitParams::ACTIVATABLE_NO; bubble->OnBeforeBubbleWidgetInit(&bubble_params, bubble_widget); bubble_widget->Init(bubble_params); #if !defined(OS_MACOSX) // On Mac, having a parent window creates a permanent stacking order, so // there's no need to do this. Also, calling StackAbove() on Mac shows the // bubble implicitly, for which the bubble is currently not ready. if (bubble_params.parent) bubble_widget->StackAbove(bubble_params.parent); #endif return bubble_widget; } } // namespace // static const char BubbleDialogDelegateView::kViewClassName[] = "BubbleDialogDelegateView"; BubbleDialogDelegateView::~BubbleDialogDelegateView() { if (GetWidget()) GetWidget()->RemoveObserver(this); SetLayoutManager(nullptr); SetAnchorView(nullptr); } // static Widget* BubbleDialogDelegateView::CreateBubble( BubbleDialogDelegateView* bubble_delegate) { bubble_delegate->Init(); // Get the latest anchor widget from the anchor view at bubble creation time. bubble_delegate->SetAnchorView(bubble_delegate->GetAnchorView()); Widget* bubble_widget = CreateBubbleWidget(bubble_delegate); #if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX) // Linux clips bubble windows that extend outside their parent window bounds. // Mac never adjusts. bubble_delegate->set_adjust_if_offscreen(false); #endif bubble_delegate->SizeToContents(); bubble_widget->AddObserver(bubble_delegate); return bubble_widget; } BubbleDialogDelegateView* BubbleDialogDelegateView::AsBubbleDialogDelegate() { return this; } bool BubbleDialogDelegateView::ShouldShowCloseButton() const { return false; } ClientView* BubbleDialogDelegateView::CreateClientView(Widget* widget) { DialogClientView* client = new DialogClientView(widget, GetContentsView()); widget->non_client_view()->set_mirror_client_in_rtl(mirror_arrow_in_rtl_); return client; } NonClientFrameView* BubbleDialogDelegateView::CreateNonClientFrameView( Widget* widget) { BubbleFrameView* frame = new BubbleDialogFrameView(title_margins_); LayoutProvider* provider = LayoutProvider::Get(); frame->set_footnote_margins( provider->GetInsetsMetric(INSETS_DIALOG_SUBSECTION)); frame->SetFootnoteView(CreateFootnoteView()); BubbleBorder::Arrow adjusted_arrow = arrow(); if (base::i18n::IsRTL() && mirror_arrow_in_rtl_) adjusted_arrow = BubbleBorder::horizontal_mirror(adjusted_arrow); std::unique_ptr<BubbleBorder> border = std::make_unique<BubbleBorder>(adjusted_arrow, GetShadow(), color()); // If custom shadows aren't supported we fall back to an OS provided square // shadow. if (!CustomShadowsSupported()) border->SetCornerRadius(0); frame->SetBubbleBorder(std::move(border)); return frame; } const char* BubbleDialogDelegateView::GetClassName() const { return kViewClassName; } void BubbleDialogDelegateView::OnWidgetDestroying(Widget* widget) { if (anchor_widget() == widget) SetAnchorView(NULL); } void BubbleDialogDelegateView::OnWidgetVisibilityChanging(Widget* widget, bool visible) { #if defined(OS_WIN) // On Windows we need to handle this before the bubble is visible or hidden. // Please see the comment on the OnWidgetVisibilityChanging function. On // other platforms it is fine to handle it after the bubble is shown/hidden. HandleVisibilityChanged(widget, visible); #endif } void BubbleDialogDelegateView::OnWidgetVisibilityChanged(Widget* widget, bool visible) { #if !defined(OS_WIN) HandleVisibilityChanged(widget, visible); #endif } void BubbleDialogDelegateView::OnWidgetActivationChanged(Widget* widget, bool active) { #if defined(OS_MACOSX) // Install |mac_bubble_closer_| the first time the widget becomes active. if (active && !mac_bubble_closer_ && GetWidget()) { mac_bubble_closer_ = std::make_unique<ui::BubbleCloser>( GetWidget()->GetNativeWindow(), base::BindRepeating(&BubbleDialogDelegateView::OnDeactivate, base::Unretained(this))); } #endif if (widget == GetWidget() && !active) OnDeactivate(); } void BubbleDialogDelegateView::OnWidgetBoundsChanged( Widget* widget, const gfx::Rect& new_bounds) { if (GetBubbleFrameView() && anchor_widget() == widget) SizeToContents(); } BubbleBorder::Shadow BubbleDialogDelegateView::GetShadow() const { if (CustomShadowsSupported() || shadow_ == BubbleBorder::NO_ASSETS) return shadow_; return BubbleBorder::NO_SHADOW; } View* BubbleDialogDelegateView::GetAnchorView() const { return anchor_view_tracker_->view(); } void BubbleDialogDelegateView::SetArrow(BubbleBorder::Arrow arrow) { if (arrow_ == arrow) return; arrow_ = arrow; // If SetArrow() is called before CreateWidget(), there's no need to update // the BubbleFrameView. if (GetBubbleFrameView()) { GetBubbleFrameView()->bubble_border()->set_arrow(arrow); SizeToContents(); } } gfx::Rect BubbleDialogDelegateView::GetAnchorRect() const { if (!GetAnchorView()) return anchor_rect_; anchor_rect_ = GetAnchorView()->GetAnchorBoundsInScreen(); anchor_rect_.Inset(anchor_view_insets_); return anchor_rect_; } void BubbleDialogDelegateView::OnBeforeBubbleWidgetInit( Widget::InitParams* params, Widget* widget) const {} void BubbleDialogDelegateView::UseCompactMargins() { const int kCompactMargin = 6; set_margins(gfx::Insets(kCompactMargin)); } void BubbleDialogDelegateView::OnAnchorBoundsChanged() { SizeToContents(); } void BubbleDialogDelegateView::EnableFocusTraversalFromAnchorView() { DCHECK(GetWidget()); DCHECK(GetAnchorView()); GetWidget()->SetFocusTraversableParent( anchor_widget()->GetFocusTraversable()); GetWidget()->SetFocusTraversableParentView(GetAnchorView()); GetAnchorView()->SetProperty(kAnchoredDialogKey, static_cast<BubbleDialogDelegateView*>(this)); } BubbleDialogDelegateView::BubbleDialogDelegateView() : BubbleDialogDelegateView(nullptr, BubbleBorder::TOP_LEFT) {} BubbleDialogDelegateView::BubbleDialogDelegateView(View* anchor_view, BubbleBorder::Arrow arrow, BubbleBorder::Shadow shadow) : close_on_deactivate_(true), anchor_view_tracker_(std::make_unique<ViewTracker>()), anchor_widget_(nullptr), arrow_(arrow), mirror_arrow_in_rtl_( ViewsDelegate::GetInstance()->ShouldMirrorArrowsInRTL()), shadow_(shadow), color_explicitly_set_(false), accept_events_(true), adjust_if_offscreen_(true), parent_window_(nullptr) { LayoutProvider* provider = LayoutProvider::Get(); // An individual bubble should override these margins if its layout differs // from the typical title/text/buttons. set_margins(provider->GetDialogInsetsForContentType(TEXT, TEXT)); title_margins_ = provider->GetInsetsMetric(INSETS_DIALOG_TITLE); if (anchor_view) SetAnchorView(anchor_view); UpdateColorsFromTheme(GetNativeTheme()); UMA_HISTOGRAM_BOOLEAN("Dialog.BubbleDialogDelegateView.Create", true); } gfx::Rect BubbleDialogDelegateView::GetBubbleBounds() { // The argument rect has its origin at the bubble's arrow anchor point; // its size is the preferred size of the bubble's client view (this view). bool anchor_minimized = anchor_widget() && anchor_widget()->IsMinimized(); // If GetAnchorView() returns nullptr or GetAnchorRect() returns an empty rect // at (0, 0), don't try and adjust arrow if off-screen. gfx::Rect anchor_rect = GetAnchorRect(); bool has_anchor = GetAnchorView() || anchor_rect != gfx::Rect(); return GetBubbleFrameView()->GetUpdatedWindowBounds( anchor_rect, GetWidget()->client_view()->GetPreferredSize(), adjust_if_offscreen_ && !anchor_minimized && has_anchor); } ax::mojom::Role BubbleDialogDelegateView::GetAccessibleWindowRole() const { // We return |ax::mojom::Role::kAlertDialog| which will make screen // readers announce the contents of the bubble dialog as soon as it appears, // as long as we also fire |ax::mojom::Event::kAlert|. return ax::mojom::Role::kAlertDialog; } gfx::Size BubbleDialogDelegateView::GetMinimumSize() const { // Note that although BubbleDialogFrameView will never invoke this, a subclass // may override CreateNonClientFrameView() to provide a NonClientFrameView // that does. See http://crbug.com/844359. return gfx::Size(); } gfx::Size BubbleDialogDelegateView::GetMaximumSize() const { return gfx::Size(); } void BubbleDialogDelegateView::OnNativeThemeChanged( const ui::NativeTheme* theme) { UpdateColorsFromTheme(theme); } void BubbleDialogDelegateView::Init() {} void BubbleDialogDelegateView::SetAnchorView(View* anchor_view) { if (GetAnchorView()) GetAnchorView()->ClearProperty(kAnchoredDialogKey); // When the anchor view gets set the associated anchor widget might // change as well. if (!anchor_view || anchor_widget() != anchor_view->GetWidget()) { if (anchor_widget()) { if (GetWidget() && GetWidget()->IsVisible()) UpdateAnchorWidgetRenderState(false); anchor_widget_->RemoveObserver(this); anchor_widget_ = NULL; } if (anchor_view) { anchor_widget_ = anchor_view->GetWidget(); if (anchor_widget_) { anchor_widget_->AddObserver(this); UpdateAnchorWidgetRenderState(GetWidget() && GetWidget()->IsVisible()); } } } anchor_view_tracker_->SetView(anchor_view); if (anchor_view && GetWidget()) { // Do not update anchoring for NULL views; this could indicate // that our NativeWindow is being destroyed, so it would be // dangerous for us to update our anchor bounds at that // point. (It's safe to skip this, since if we were to update the // bounds when |anchor_view| is NULL, the bubble won't move.) OnAnchorBoundsChanged(); EnableFocusTraversalFromAnchorView(); } } void BubbleDialogDelegateView::SetAnchorRect(const gfx::Rect& rect) { anchor_rect_ = rect; if (GetWidget()) OnAnchorBoundsChanged(); } void BubbleDialogDelegateView::SizeToContents() { gfx::Rect bubble_bounds = GetBubbleBounds(); #if defined(OS_MACOSX) // GetBubbleBounds() doesn't take the Mac NativeWindow's style mask into // account, so we need to adjust the size. gfx::Size actual_size = GetWindowSizeForClientSize(GetWidget(), bubble_bounds.size()); bubble_bounds.set_size(actual_size); #endif GetWidget()->SetBounds(bubble_bounds); } BubbleFrameView* BubbleDialogDelegateView::GetBubbleFrameView() const { const NonClientView* view = GetWidget() ? GetWidget()->non_client_view() : NULL; return view ? static_cast<BubbleFrameView*>(view->frame_view()) : NULL; } void BubbleDialogDelegateView::UpdateColorsFromTheme( const ui::NativeTheme* theme) { if (!color_explicitly_set_) color_ = theme->GetSystemColor(ui::NativeTheme::kColorId_BubbleBackground); BubbleFrameView* frame_view = GetBubbleFrameView(); if (frame_view) frame_view->bubble_border()->set_background_color(color()); // When there's an opaque layer, the bubble border background won't show // through, so explicitly paint a background color. SetBackground(layer() && layer()->fills_bounds_opaquely() ? CreateSolidBackground(color()) : nullptr); } void BubbleDialogDelegateView::HandleVisibilityChanged(Widget* widget, bool visible) { if (widget == GetWidget()) UpdateAnchorWidgetRenderState(visible); // Fire ax::mojom::Event::kAlert for bubbles marked as // ax::mojom::Role::kAlertDialog; this instructs accessibility tools to read // the bubble in its entirety rather than just its title and initially focused // view. See http://crbug.com/474622 for details. if (widget == GetWidget() && visible) { if (GetAccessibleWindowRole() == ax::mojom::Role::kAlert || GetAccessibleWindowRole() == ax::mojom::Role::kAlertDialog) { widget->GetRootView()->NotifyAccessibilityEvent(ax::mojom::Event::kAlert, true); } } } void BubbleDialogDelegateView::OnDeactivate() { if (close_on_deactivate() && GetWidget()) GetWidget()->Close(); } void BubbleDialogDelegateView::UpdateAnchorWidgetRenderState(bool visible) { if (!anchor_widget() || !anchor_widget()->GetTopLevelWidget()) return; anchor_widget()->GetTopLevelWidget()->SetAlwaysRenderAsActive(visible); } } // namespace views
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
8a547d4c9fb3d690b920c911246895430c92993b
5307d5d3d3760240358ad73529723fe9c7411b07
/src/wallet/test/init_test_fixture.h
2af1b2ac2a642105891d335f55cec2541c6d4cb5
[ "MIT" ]
permissive
cruro/cruro
b75d4900c760c40d9641c3355350e9ed56723f84
80aa93365db5e6653bb8235fb61914ee4aa087e8
refs/heads/master
2020-06-18T10:31:58.958195
2019-07-12T14:39:43
2019-07-12T14:39:43
196,270,857
0
0
null
null
null
null
UTF-8
C++
false
false
892
h
// Copyright (c) 2018-2019 The Cruro Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_WALLET_TEST_INIT_TEST_FIXTURE_H #define BITCOIN_WALLET_TEST_INIT_TEST_FIXTURE_H #include <interfaces/chain.h> #include <test/setup_common.h> struct InitWalletDirTestingSetup: public BasicTestingSetup { explicit InitWalletDirTestingSetup(const std::string& chainName = CBaseChainParams::MAIN); ~InitWalletDirTestingSetup(); void SetWalletDir(const fs::path& walletdir_path); fs::path m_datadir; fs::path m_cwd; std::map<std::string, fs::path> m_walletdir_path_cases; std::unique_ptr<interfaces::Chain> m_chain = interfaces::MakeChain(); std::unique_ptr<interfaces::ChainClient> m_chain_client; }; #endif // BITCOIN_WALLET_TEST_INIT_TEST_FIXTURE_H
[ "“doctordeep@protonmail.com”" ]
“doctordeep@protonmail.com”
b1b3df0858168c1f871e8bffad962a431f765298
4352b5c9e6719d762e6a80e7a7799630d819bca3
/tutorials/eulerVortex.twitch/eulerVortex.cyclic.twitch.test.test/1.65/e
75ce705e0b3ba7fe396ce8ad0e3ff5a90d2c3e28
[]
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
180,862
/*--------------------------------*- 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.65"; object e; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField nonuniform List<scalar> 22500 ( 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.27 1006.27 1006.27 1006.27 1006.27 1006.27 1006.27 1006.27 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.27 1006.27 1006.27 1006.26 1006.26 1006.26 1006.26 1006.26 1006.26 1006.26 1006.26 1006.27 1006.27 1006.27 1006.28 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.28 1006.28 1006.28 1006.27 1006.27 1006.26 1006.26 1006.25 1006.24 1006.24 1006.23 1006.23 1006.23 1006.23 1006.24 1006.24 1006.25 1006.26 1006.26 1006.27 1006.27 1006.28 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.28 1006.28 1006.28 1006.27 1006.26 1006.25 1006.24 1006.23 1006.22 1006.21 1006.2 1006.19 1006.19 1006.19 1006.19 1006.2 1006.21 1006.22 1006.23 1006.24 1006.25 1006.26 1006.27 1006.27 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.28 1006.28 1006.27 1006.27 1006.26 1006.24 1006.23 1006.21 1006.19 1006.17 1006.14 1006.13 1006.12 1006.11 1006.11 1006.12 1006.13 1006.15 1006.17 1006.19 1006.21 1006.23 1006.24 1006.25 1006.26 1006.27 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.28 1006.27 1006.26 1006.25 1006.23 1006.21 1006.18 1006.15 1006.11 1006.08 1006.04 1006.01 1005.99 1005.98 1005.98 1005.99 1006.02 1006.04 1006.08 1006.11 1006.15 1006.18 1006.21 1006.23 1006.25 1006.26 1006.27 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.27 1006.26 1006.25 1006.23 1006.2 1006.16 1006.11 1006.05 1005.99 1005.93 1005.87 1005.82 1005.79 1005.77 1005.77 1005.79 1005.83 1005.87 1005.93 1005.99 1006.05 1006.11 1006.15 1006.19 1006.22 1006.24 1006.26 1006.27 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.27 1006.26 1006.25 1006.22 1006.18 1006.14 1006.07 1005.99 1005.9 1005.8 1005.7 1005.6 1005.52 1005.46 1005.43 1005.43 1005.46 1005.52 1005.6 1005.7 1005.8 1005.9 1005.99 1006.06 1006.13 1006.18 1006.21 1006.24 1006.26 1006.27 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.28 1006.27 1006.25 1006.22 1006.18 1006.12 1006.04 1005.94 1005.81 1005.66 1005.5 1005.33 1005.18 1005.04 1004.94 1004.89 1004.89 1004.94 1005.04 1005.17 1005.33 1005.49 1005.65 1005.8 1005.92 1006.03 1006.11 1006.17 1006.21 1006.24 1006.26 1006.27 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.27 1006.25 1006.23 1006.18 1006.12 1006.02 1005.89 1005.73 1005.52 1005.29 1005.03 1004.77 1004.52 1004.3 1004.14 1004.06 1004.05 1004.13 1004.29 1004.5 1004.75 1005.01 1005.27 1005.5 1005.71 1005.87 1006 1006.09 1006.16 1006.21 1006.24 1006.26 1006.27 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.27 1006.26 1006.23 1006.19 1006.12 1006.02 1005.87 1005.67 1005.41 1005.1 1004.73 1004.33 1003.92 1003.53 1003.19 1002.94 1002.8 1002.79 1002.92 1003.16 1003.49 1003.88 1004.3 1004.7 1005.06 1005.38 1005.63 1005.83 1005.98 1006.09 1006.16 1006.21 1006.24 1006.26 1006.27 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.27 1006.24 1006.21 1006.14 1006.03 1005.87 1005.65 1005.34 1004.95 1004.47 1003.91 1003.3 1002.67 1002.07 1001.55 1001.17 1000.96 1000.94 1001.13 1001.5 1002.01 1002.6 1003.24 1003.85 1004.41 1004.89 1005.29 1005.59 1005.82 1005.98 1006.1 1006.17 1006.22 1006.25 1006.26 1006.27 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.27 1006.26 1006.22 1006.16 1006.06 1005.9 1005.66 1005.32 1004.86 1004.27 1003.56 1002.72 1001.81 1000.87 999.976 999.201 998.626 998.312 998.292 998.572 999.122 999.88 1000.77 1001.72 1002.64 1003.48 1004.2 1004.79 1005.25 1005.59 1005.83 1006 1006.11 1006.18 1006.23 1006.25 1006.27 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.27 1006.24 1006.19 1006.1 1005.95 1005.72 1005.36 1004.86 1004.19 1003.32 1002.27 1001.05 999.718 998.346 997.04 995.914 995.08 994.626 994.601 995.01 995.81 996.914 998.214 999.59 1000.93 1002.16 1003.22 1004.09 1004.76 1005.26 1005.62 1005.87 1006.03 1006.13 1006.2 1006.24 1006.26 1006.27 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.27 1006.26 1006.22 1006.15 1006.02 1005.8 1005.46 1004.95 1004.23 1003.25 1002.01 1000.5 998.758 996.851 994.896 993.04 991.447 990.272 989.638 989.611 990.196 991.331 992.897 994.741 996.697 998.613 1000.37 1001.88 1003.12 1004.09 1004.81 1005.33 1005.68 1005.92 1006.07 1006.16 1006.22 1006.25 1006.27 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.27 1006.24 1006.19 1006.08 1005.9 1005.59 1005.11 1004.38 1003.36 1001.99 1000.25 998.129 995.687 993.026 990.31 987.743 985.551 983.945 983.086 983.063 983.876 985.443 987.607 990.157 992.869 995.533 997.98 1000.1 1001.84 1003.2 1004.21 1004.94 1005.43 1005.77 1005.98 1006.11 1006.19 1006.23 1006.26 1006.27 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.26 1006.22 1006.15 1006 1005.75 1005.32 1004.64 1003.64 1002.22 1000.33 997.932 995.027 991.689 988.069 984.39 980.935 978.002 975.867 974.734 974.718 975.819 977.925 980.833 984.269 987.935 991.551 994.883 997.778 1000.16 1002.03 1003.42 1004.42 1005.11 1005.57 1005.86 1006.04 1006.15 1006.21 1006.25 1006.27 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.27 1006.25 1006.2 1006.09 1005.9 1005.55 1004.96 1004.04 1002.67 1000.75 998.205 994.975 991.083 986.631 981.827 976.974 972.445 968.625 965.856 964.399 964.39 965.831 968.586 972.394 976.909 981.746 986.534 990.967 994.834 998.028 1000.54 1002.42 1003.77 1004.7 1005.31 1005.71 1005.95 1006.1 1006.19 1006.23 1006.26 1006.27 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.27 1006.24 1006.17 1006.03 1005.76 1005.29 1004.51 1003.27 1001.45 998.915 995.549 991.305 986.212 980.416 974.199 967.961 962.175 957.318 953.812 951.969 951.959 953.788 957.293 962.157 967.947 974.18 980.378 986.143 991.193 995.382 998.683 1001.16 1002.95 1004.18 1005 1005.52 1005.85 1006.04 1006.15 1006.22 1006.25 1006.27 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.26 1006.22 1006.13 1005.95 1005.6 1004.98 1003.95 1002.34 999.966 996.673 992.331 986.879 980.369 973.006 965.158 957.336 950.121 944.087 939.734 937.437 937.406 939.658 944.005 950.07 957.326 965.174 973.019 980.351 986.805 992.18 996.433 999.639 1001.95 1003.55 1004.61 1005.29 1005.71 1005.97 1006.11 1006.19 1006.24 1006.26 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.25 1006.2 1006.09 1005.85 1005.4 1004.61 1003.28 1001.22 998.196 994.022 988.543 981.699 973.572 964.437 954.767 945.187 936.391 929.049 923.745 920.922 920.841 923.536 928.801 936.192 945.085 954.752 964.463 973.586 981.657 988.409 993.773 997.831 1000.77 1002.8 1004.15 1005.02 1005.56 1005.88 1006.06 1006.17 1006.23 1006.26 1006.27 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.27 1006.24 1006.18 1006.03 1005.74 1005.18 1004.17 1002.51 999.92 996.155 990.979 984.219 975.82 965.907 954.835 943.191 931.717 921.215 912.455 906.107 902.693 902.531 905.682 911.92 920.736 931.4 943.049 954.809 965.914 975.787 984.089 990.714 995.746 999.394 1001.93 1003.62 1004.7 1005.37 1005.78 1006.01 1006.14 1006.21 1006.25 1006.27 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.27 1006.23 1006.15 1005.98 1005.62 1004.92 1003.69 1001.63 998.465 993.875 987.595 979.438 969.357 957.534 944.411 930.693 917.235 904.947 894.694 887.237 883.184 882.919 886.53 893.774 904.081 916.601 930.338 944.269 957.487 969.302 979.288 987.296 993.406 997.852 1000.95 1003.01 1004.34 1005.17 1005.66 1005.95 1006.11 1006.19 1006.24 1006.26 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.26 1006.22 1006.12 1005.91 1005.48 1004.65 1003.16 1000.69 996.888 991.411 983.956 974.322 962.486 948.684 933.461 917.63 902.159 888.055 876.281 867.694 862.987 862.611 866.682 874.944 886.755 901.161 917.023 933.173 948.561 962.385 974.131 983.601 990.862 996.167 999.873 1002.35 1003.95 1004.94 1005.53 1005.88 1006.07 1006.18 1006.23 1006.26 1006.27 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.26 1006.21 1006.1 1005.85 1005.34 1004.36 1002.6 999.699 995.241 988.843 980.178 969.039 955.428 939.648 922.342 904.429 886.981 871.1 857.839 848.151 842.811 842.33 846.853 856.108 869.395 885.656 903.609 921.941 939.472 955.288 968.797 979.75 988.192 994.391 998.735 1001.65 1003.53 1004.7 1005.4 1005.8 1006.03 1006.16 1006.22 1006.26 1006.27 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.25 1006.2 1006.07 1005.78 1005.2 1004.08 1002.05 998.708 993.589 986.271 976.405 963.785 948.445 930.759 911.46 891.567 872.249 854.694 840.047 829.34 823.42 822.846 827.791 837.98 852.664 870.687 890.633 911.04 930.604 948.316 963.514 975.9 985.5 992.585 997.574 1000.93 1003.1 1004.45 1005.26 1005.73 1005.99 1006.14 1006.21 1006.25 1006.27 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.25 1006.19 1006.04 1005.73 1005.07 1003.81 1001.53 997.763 992.007 983.807 972.798 958.778 941.822 922.369 901.237 879.539 858.526 839.469 823.59 811.988 805.559 804.9 810.211 821.23 837.181 856.822 878.605 900.923 922.348 941.786 958.523 972.229 982.909 990.832 996.438 1000.23 1002.68 1004.21 1005.12 1005.66 1005.95 1006.12 1006.2 1006.25 1006.27 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.27 1006.25 1006.18 1006.02 1005.67 1004.96 1003.58 1001.07 996.917 990.58 981.573 969.522 954.241 935.842 914.826 892.088 868.821 846.348 826.015 809.104 796.758 789.901 789.156 794.752 806.456 823.493 844.556 867.971 891.99 915.055 935.999 954.071 968.921 980.549 989.22 995.384 999.567 1002.28 1003.98 1005 1005.59 1005.92 1006.1 1006.19 1006.24 1006.26 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.27 1006.24 1006.17 1006 1005.63 1004.87 1003.39 1000.7 996.222 989.387 979.685 966.741 950.388 930.774 908.456 884.396 859.844 836.195 814.849 797.131 784.209 777.012 776.174 781.959 794.177 812.077 834.315 859.112 884.572 909.018 931.208 950.368 966.147 978.546 987.835 994.469 998.99 1001.94 1003.78 1004.88 1005.52 1005.89 1006.08 1006.18 1006.24 1006.26 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.27 1006.24 1006.16 1005.98 1005.6 1004.81 1003.27 1000.44 995.722 988.501 978.251 964.601 947.406 926.85 903.539 878.478 852.972 828.463 806.39 788.107 774.783 767.339 766.41 772.288 784.838 803.352 826.475 852.348 878.945 904.47 927.613 947.582 964.042 977.007 986.755 993.746 998.528 1001.65 1003.61 1004.79 1005.48 1005.86 1006.07 1006.18 1006.23 1006.26 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.27 1006.24 1006.16 1005.97 1005.58 1004.79 1003.21 1000.32 995.455 987.98 977.357 963.22 945.447 924.259 900.293 874.588 848.482 823.445 800.945 782.34 768.792 761.204 760.198 766.09 778.796 797.663 821.353 847.951 875.327 901.586 925.357 945.838 962.71 976.014 986.042 993.257 998.21 1001.46 1003.5 1004.73 1005.44 1005.84 1006.06 1006.17 1006.23 1006.26 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.27 1006.24 1006.16 1005.97 1005.58 1004.79 1003.23 1000.34 995.443 987.868 977.065 962.681 944.619 923.127 898.866 872.891 846.55 821.327 798.698 780.016 766.425 758.8 757.747 763.592 776.293 795.258 819.178 846.118 873.879 900.489 924.532 945.204 962.209 975.616 985.735 993.033 998.057 1001.36 1003.44 1004.69 1005.42 1005.83 1006.05 1006.17 1006.23 1006.26 1006.27 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.27 1006.24 1006.16 1005.98 1005.6 1004.83 1003.32 1000.5 995.688 988.175 977.403 963.027 944.974 923.515 899.326 873.457 847.252 822.185 799.722 781.199 767.74 760.192 759.134 764.886 777.438 796.252 820.067 846.951 874.678 901.23 925.171 945.703 962.557 975.831 985.851 993.087 998.078 1001.37 1003.44 1004.69 1005.42 1005.83 1006.05 1006.17 1006.23 1006.26 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.27 1006.24 1006.16 1005.99 1005.62 1004.89 1003.46 1000.8 996.176 988.892 978.365 964.256 946.511 925.42 901.658 876.266 850.556 825.977 803.964 785.831 772.676 765.316 764.296 769.92 782.193 800.625 824.005 850.439 877.707 903.788 927.246 947.307 963.731 976.641 986.38 993.415 998.273 1001.48 1003.5 1004.73 1005.44 1005.84 1006.06 1006.17 1006.23 1006.26 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.27 1006.24 1006.17 1006.01 1005.66 1004.98 1003.66 1001.19 996.874 989.977 979.906 966.318 949.171 928.767 905.775 881.206 856.331 832.552 811.261 793.736 781.044 773.976 773.042 778.51 790.385 808.215 830.854 856.462 882.859 908.061 930.667 949.937 965.666 978.001 987.291 993.997 998.63 1001.69 1003.62 1004.79 1005.48 1005.86 1006.07 1006.18 1006.23 1006.26 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.27 1006.25 1006.18 1006.03 1005.71 1005.08 1003.89 1001.66 997.729 991.363 981.946 969.118 952.843 933.422 911.508 888.079 864.349 841.657 821.338 804.621 792.542 785.86 785.048 790.331 801.699 818.734 840.35 864.782 889.927 913.872 935.284 953.472 968.268 979.837 988.531 994.8 999.128 1001.99 1003.79 1004.89 1005.53 1005.89 1006.08 1006.19 1006.24 1006.26 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.25 1006.19 1006.06 1005.77 1005.2 1004.13 1002.16 998.681 992.959 984.367 972.519 957.363 939.191 918.634 896.62 874.304 852.95 833.824 818.094 806.758 800.544 799.88 804.944 815.703 831.768 852.114 875.063 898.617 920.974 940.891 957.747 971.408 982.055 990.035 995.778 999.738 1002.35 1004 1005.01 1005.59 1005.92 1006.1 1006.19 1006.24 1006.27 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.26 1006.2 1006.08 1005.83 1005.32 1004.38 1002.68 999.666 994.661 987.025 976.34 962.52 945.831 926.865 906.502 885.826 866.021 848.27 833.679 823.197 817.513 817.004 821.804 831.862 846.807 865.675 886.883 908.565 929.061 947.242 962.564 974.936 984.544 991.724 996.878 1000.43 1002.77 1004.24 1005.14 1005.66 1005.96 1006.12 1006.2 1006.25 1006.27 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.26 1006.21 1006.11 1005.89 1005.45 1004.64 1003.18 1000.63 996.364 989.761 980.374 968.064 953.049 935.872 917.351 898.494 880.401 864.173 850.839 841.292 836.175 835.811 840.294 849.566 863.268 880.494 899.765 919.361 937.79 954.061 967.715 978.694 987.189 993.516 998.045 1001.16 1003.21 1004.5 1005.28 1005.74 1006 1006.14 1006.21 1006.25 1006.27 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.26 1006.23 1006.14 1005.95 1005.58 1004.89 1003.66 1001.53 997.98 992.426 984.401 973.715 960.517 945.279 928.745 911.844 895.585 880.981 868.984 860.424 855.881 855.633 859.745 868.157 880.53 896 913.196 930.567 946.805 961.066 972.978 982.519 989.872 995.33 999.226 1001.9 1003.65 1004.76 1005.43 1005.82 1006.04 1006.16 1006.23 1006.26 1006.27 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.27 1006.24 1006.16 1006.01 1005.7 1005.12 1004.1 1002.35 999.45 994.892 988.22 979.194 967.885 954.679 940.23 925.372 911.025 898.105 887.489 879.932 875.95 875.776 879.468 886.977 897.969 911.618 926.669 941.753 955.754 967.982 978.149 986.259 992.488 997.093 1000.37 1002.61 1004.08 1005.01 1005.57 1005.9 1006.08 1006.18 1006.23 1006.26 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.27 1006.25 1006.19 1006.06 1005.81 1005.34 1004.5 1003.08 1000.75 997.085 991.677 984.26 974.83 963.674 951.342 938.562 926.154 914.938 905.71 899.147 895.696 895.559 898.806 905.395 914.992 926.808 939.708 952.519 964.321 974.568 983.049 989.787 994.944 998.745 1001.44 1003.28 1004.48 1005.24 1005.7 1005.97 1006.12 1006.2 1006.24 1006.27 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.26 1006.21 1006.11 1005.91 1005.53 1004.86 1003.72 1001.87 998.974 994.688 988.747 981.094 971.918 961.658 950.926 940.431 930.897 923.032 917.431 914.477 914.359 917.165 922.854 931.08 941.097 951.904 962.528 972.239 980.622 987.531 993.001 997.173 1000.24 1002.41 1003.88 1004.84 1005.45 1005.82 1006.03 1006.15 1006.22 1006.25 1006.27 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.26 1006.23 1006.15 1005.99 1005.7 1005.17 1004.27 1002.82 1000.57 997.233 992.582 986.525 979.175 970.86 962.073 953.407 945.487 938.931 934.245 931.761 931.666 934.065 938.9 945.809 954.105 962.936 971.525 979.316 986.005 991.497 995.832 999.129 1001.54 1003.25 1004.4 1005.16 1005.63 1005.92 1006.09 1006.18 1006.23 1006.26 1006.27 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.27 1006.24 1006.18 1006.06 1005.83 1005.43 1004.74 1003.62 1001.89 999.337 995.767 991.082 985.339 978.773 971.762 964.784 958.369 953.034 949.206 947.171 947.124 949.161 953.199 958.87 965.562 972.585 979.343 985.43 990.635 994.896 998.249 1000.79 1002.65 1003.96 1004.84 1005.42 1005.79 1006.01 1006.13 1006.21 1006.25 1006.27 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.27 1006.25 1006.21 1006.12 1005.95 1005.64 1005.12 1004.28 1002.97 1001.05 998.355 994.806 990.423 985.363 979.91 974.439 969.379 965.154 962.112 960.508 960.529 962.248 965.549 970.076 975.318 980.742 985.913 990.545 994.492 997.716 1000.25 1002.16 1003.56 1004.54 1005.21 1005.64 1005.91 1006.08 1006.17 1006.23 1006.26 1006.27 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.26 1006.23 1006.16 1006.04 1005.81 1005.43 1004.8 1003.84 1002.41 1000.42 997.786 994.513 990.708 986.574 982.398 978.518 975.266 972.927 971.725 971.82 973.249 975.87 979.371 983.347 987.41 991.257 994.688 997.606 999.986 1001.85 1003.26 1004.29 1005.01 1005.5 1005.81 1006.01 1006.13 1006.2 1006.24 1006.26 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.27 1006.25 1006.2 1006.11 1005.95 1005.67 1005.22 1004.52 1003.48 1002.04 1000.12 997.732 994.938 991.885 988.786 985.896 983.471 981.741 980.892 981.044 982.195 984.204 986.814 989.731 992.684 995.465 997.941 1000.04 1001.76 1003.1 1004.12 1004.86 1005.37 1005.72 1005.95 1006.09 1006.18 1006.23 1006.26 1006.27 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.26 1006.23 1006.16 1006.05 1005.85 1005.53 1005.03 1004.3 1003.28 1001.91 1000.21 998.211 996.017 993.782 991.696 989.949 988.722 988.158 988.332 989.218 990.692 992.567 994.638 996.721 998.679 1000.42 1001.9 1003.11 1004.05 1004.77 1005.28 1005.65 1005.89 1006.05 1006.15 1006.21 1006.25 1006.27 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.27 1006.25 1006.2 1006.12 1005.99 1005.77 1005.42 1004.91 1004.2 1003.26 1002.07 1000.68 999.148 997.586 996.127 994.914 994.08 993.723 993.883 994.53 995.567 996.865 998.289 999.717 1001.06 1002.26 1003.27 1004.1 1004.75 1005.24 1005.6 1005.85 1006.02 1006.12 1006.19 1006.23 1006.26 1006.27 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.26 1006.23 1006.18 1006.09 1005.94 1005.7 1005.36 1004.88 1004.24 1003.44 1002.49 1001.46 1000.4 999.411 998.598 998.051 997.831 997.957 998.404 999.103 999.972 1000.92 1001.88 1002.78 1003.58 1004.26 1004.82 1005.26 1005.59 1005.83 1005.99 1006.11 1006.18 1006.22 1006.25 1006.27 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.27 1006.25 1006.22 1006.16 1006.06 1005.9 1005.68 1005.36 1004.94 1004.41 1003.79 1003.1 1002.41 1001.77 1001.24 1000.89 1000.75 1000.84 1001.13 1001.59 1002.15 1002.77 1003.4 1003.98 1004.51 1004.96 1005.32 1005.61 1005.83 1005.98 1006.09 1006.17 1006.22 1006.25 1006.26 1006.27 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.26 1006.24 1006.2 1006.14 1006.04 1005.9 1005.69 1005.42 1005.08 1004.68 1004.25 1003.8 1003.39 1003.06 1002.84 1002.76 1002.81 1003 1003.28 1003.64 1004.04 1004.43 1004.81 1005.14 1005.43 1005.67 1005.85 1005.99 1006.09 1006.16 1006.21 1006.24 1006.26 1006.27 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.27 1006.26 1006.24 1006.2 1006.13 1006.04 1005.91 1005.74 1005.53 1005.29 1005.01 1004.74 1004.48 1004.28 1004.14 1004.09 1004.12 1004.23 1004.41 1004.63 1004.88 1005.12 1005.36 1005.57 1005.75 1005.9 1006.01 1006.1 1006.17 1006.21 1006.24 1006.26 1006.27 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.27 1006.26 1006.23 1006.19 1006.14 1006.06 1005.96 1005.83 1005.68 1005.51 1005.34 1005.19 1005.07 1004.98 1004.95 1004.97 1005.03 1005.14 1005.27 1005.42 1005.57 1005.72 1005.85 1005.96 1006.05 1006.12 1006.17 1006.21 1006.24 1006.26 1006.27 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.28 1006.27 1006.26 1006.23 1006.2 1006.15 1006.09 1006.01 1005.92 1005.83 1005.73 1005.64 1005.56 1005.51 1005.49 1005.5 1005.54 1005.6 1005.68 1005.77 1005.86 1005.95 1006.02 1006.09 1006.14 1006.19 1006.22 1006.24 1006.26 1006.27 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.28 1006.27 1006.26 1006.24 1006.21 1006.17 1006.13 1006.08 1006.02 1005.96 1005.91 1005.87 1005.84 1005.82 1005.83 1005.85 1005.89 1005.93 1005.98 1006.04 1006.09 1006.13 1006.17 1006.2 1006.23 1006.25 1006.26 1006.27 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.28 1006.27 1006.26 1006.24 1006.22 1006.2 1006.17 1006.14 1006.1 1006.07 1006.05 1006.03 1006.02 1006.03 1006.04 1006.06 1006.09 1006.11 1006.14 1006.17 1006.2 1006.22 1006.24 1006.25 1006.26 1006.27 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.28 1006.27 1006.26 1006.25 1006.24 1006.22 1006.21 1006.19 1006.17 1006.16 1006.15 1006.14 1006.14 1006.15 1006.16 1006.18 1006.19 1006.21 1006.22 1006.24 1006.25 1006.26 1006.27 1006.27 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.28 1006.28 1006.27 1006.26 1006.25 1006.24 1006.23 1006.22 1006.22 1006.21 1006.21 1006.21 1006.21 1006.22 1006.23 1006.24 1006.24 1006.25 1006.26 1006.27 1006.27 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.28 1006.28 1006.27 1006.27 1006.27 1006.26 1006.26 1006.25 1006.25 1006.25 1006.25 1006.25 1006.25 1006.26 1006.26 1006.26 1006.27 1006.27 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.28 1006.28 1006.28 1006.27 1006.27 1006.27 1006.27 1006.27 1006.27 1006.27 1006.27 1006.27 1006.27 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.28 1006.28 1006.29 1006.28 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 1006.29 ) ; boundaryField { emptyPatches_empt { type empty; } top_cyc { type cyclic; } bottom_cyc { type cyclic; } inlet_cyc { type cyclic; } outlet_cyc { type cyclic; } } // ************************************************************************* //
[ "tdg@debian" ]
tdg@debian
880c2ac0cb7e742daf5446315cf23f97a007ede3
6e1730911ab9077141213ad908f077b8061c2940
/joint_deformation/libNetwork/HNFileCommunicator.cpp
99921494a951016ff5ae43cd8607d9ba0baea6cc
[]
no_license
neurodiverseEsoteric/JointDeformation
9a5b8de7880b5764587d4b7243c24a3eeabab0c8
b2b34105f12db06ca9b8889ee1381b3163ea043f
refs/heads/master
2021-05-27T23:51:39.815264
2014-09-11T20:50:45
2014-09-11T20:50:45
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,253
cpp
#include "HNFileCommunicator.h" #include <fcntl.h> void HNFileCommunicator::run() { if(_info.isWritable) return; HNNetworkPacket packet; long oldTimestamp = 0, totalDuration = 0; bool repeating = false; while(_fd > 0){ try { readPacket(&packet); long duration = oldTimestamp == 0 ? 0 : (packet.getTimestamp() - oldTimestamp); oldTimestamp = packet.getTimestamp(); totalDuration += duration; if(totalDuration < _info.startAfter || (repeating && totalDuration < _info.repeatFrom)) continue; if((_info.endBefore != 0 && totalDuration > _info.endBefore) || eof(_fd)) { if(_info.repeat) { oldTimestamp = totalDuration = 0; repeating = true; lseek(_fd, 0, SEEK_SET); continue; } else { close(); } } HNLOG2("read packet " << packet.getPacketType() << " time " << packet.getTimestamp()) _packetQueueMutex.lockData(); _packetQueue.push(packet); _packetQueueMutex.unlockData(); } catch(...) { HNLOG4("file " << _info.name << " not properly termintated") } } } inline void HNFileCommunicator::readPacket( HNNetworkPacket *packet ) { long size; read(_fd, (char *)&size, sizeof(long)); packet->allocateFull(size); read(_fd, (char *)packet->getData(), size); } void HNFileCommunicator::addQueueFunctions() { if(_info.isWritable) addAction((void (HNThreadRunnable::*)())&HNFileCommunicator::processWriteQueue); else addAction((void (HNThreadRunnable::*)())&HNFileCommunicator::processReadQueue); } void HNFileCommunicator::processReadQueue() { long oldTimestamp = 0; HNLOG4("Started processing read data") while(true) { _packetQueueMutex.lockData(); if(!_packetQueue.empty()) { HNNetworkPacket packet = _packetQueue.front(); _packetQueue.pop(); HNLOG2("tried processing packet " << packet.getPacketType() << " time " << packet.getTimestamp()) if(oldTimestamp < packet.getTimestamp() && oldTimestamp!=0) { long duration = packet.getTimestamp() - oldTimestamp; Sleep(duration); } HNLOG2("processing packet " << packet.getPacketType() << " time " << packet.getTimestamp()) processReadPacket(packet); oldTimestamp = packet.getTimestamp(); } _packetQueueMutex.unlockData(); } } void HNFileCommunicator::processWriteQueue() { HNLOG4("Started writing packets") while(true) { _packetQueueMutex.lockData(); if(!_packetQueue.empty()) { writePacketToFile(_packetQueue.front()); _packetQueue.pop(); } _packetQueueMutex.unlockData(); } } void HNFileCommunicator::transmitPacket() { _packetQueueMutex.lockData(); _packetQueue.push(_writePacket); _packetQueueMutex.unlockData(); } void HNFileCommunicator::writePacketToFile( HNNetworkPacket &packet ) { if(_info.isWritable && _fd > 0) { long size = packet.size(); write(_fd, (char *)&size, sizeof(long)); write(_fd, (char *)packet.getData(), sizeof(char)*size); _commit(_fd); } } bool HNFileCommunicator::init() { if(HNCommunicator::init()) { _fd = open(_info.getFilePath(), (_info.isWritable ? (O_WRONLY | O_TRUNC | O_CREAT) : O_RDONLY) | O_BINARY); if(_fd > 0) HNLOGGER_RBLOG3("file " << _info.name << " openned successfully", true) HNLOGGER_ELOG4("unable to open file " << _info.name << " Error " << GetLastError()) } return false; }
[ "tianny007@gmail.com" ]
tianny007@gmail.com
aedae094b45ea23cb641ed9859444a19965e7988
0319fb18e7ba20030e7f950e97f7661cd7860596
/rva_servo_search/src/search.h
a34e0b7437a6470c3fcf4fb4ac8c0b0b64c89bd3
[]
no_license
NEU-TEAM/rva_package
01a862e400d2f4203f445c8037eb0984fb869996
a44d78f7d64608936ac50824cbf54b4d38a0abe9
refs/heads/master
2020-04-12T06:40:03.916339
2016-09-05T03:09:42
2016-09-05T03:09:42
63,749,524
1
2
null
null
null
null
UTF-8
C++
false
false
817
h
#ifndef SEARCH_H #define SEARCH_H #include <iostream> using namespace std; class Search { public: Search(); Search(int minpx, int maxpx, int xstep, int minpy, int maxpy, int ystep, int cx, int cy); bool getNextPosition(int & px, int & py); inline void getCenter(int & cx, int & cy) { cx = cX_; cy = cY_; } inline void setCurrentPosition(int px, int py) { pos_x = px; pos_y = py; } inline void resetSearch() { count_ = 0; noResult_ = false; } private: int pos_x; int pos_y; int minPX; int maxPX; int xStep; int minPY; int maxPY; int yStep; int cX_; int cY_; int count_; int rowNum_; int colNum_; int countMax_; bool noResult_; }; #endif // SEARCH_H
[ "damoninhit@qq.com" ]
damoninhit@qq.com
80b086449362f3af50cc99b2d9f17eb2a066d593
5b6eb98f4ad313110c3382e7a7658d57ed06c9a3
/131A.cAPS lOCK.cpp
753b70e0904a82443d9aef21067f61850e4919f2
[]
no_license
mhaseeb24/Code-Forces
17827bcdc2549fd16e8fae31b90460c49480bdf3
0402b01d22935e2822189e43be6a063e802f4101
refs/heads/main
2023-05-02T13:29:24.084435
2021-05-26T02:38:29
2021-05-26T02:38:29
327,549,667
0
0
null
null
null
null
UTF-8
C++
false
false
584
cpp
#include<bits/stdc++.h> using namespace std; int main() { string s; cin>>s; string st=s; st.at(0)=toupper(st.at(0)); int r=0; for(int i=0;i<st.length();i++) { if(st.at(i)>64&&st.at(i)<91) { r++; } } if(r==s.length()) { for(int i=0;i<s.length();i++) { if(s.at(i)>64&&s.at(i)<91) { s.at(i)=tolower(s.at(i)); } else { s.at(i)=toupper(s.at(i)); } } } cout<<s; return 0; }
[ "mhaseeb824@gmail.com" ]
mhaseeb824@gmail.com
1de978bf3be8cd508872a3f08103b2fec7c989a0
9ca71fef91671914e0152a9cc5039a18cb60d63b
/parallel/project3/hello.cpp
db5a8c4935c27e3721ded37efc738ae42fecdd53
[]
no_license
robertmaxwilliams/fall2020
42054f6ff720282b3be06e0321396a4292499dda
ddaab0d455e7cf1e37d9d294eda58ccbce33d750
refs/heads/master
2023-02-11T15:45:59.071578
2020-12-10T01:09:34
2020-12-10T01:09:34
299,367,535
0
0
null
null
null
null
UTF-8
C++
false
false
414
cpp
#include <iostream> #include <cstdint> #include <vector> #include <thread> void say_hello(uint64_t id) { std::cout << "Hello from thread: " << id << std::endl; } int main() { const uint64_t num_threads = 6; std::vector<std::thread> threads; for (uint64_t id = 0; id < num_threads; id++) { threads.emplace_back(say_hello, id); } for (auto& thread: threads) thread.join(); }
[ "robertmaxwilliams@gmail.com" ]
robertmaxwilliams@gmail.com
f58753de4238a48bf3012d64a0d3a2bcee3b6824
3fb7212f0abd775aa35ad15783f1ef15e5f1e4be
/HelloForm.h
e90d6680b8e4ba5f8047835027a943e44a41980c
[ "Unlicense" ]
permissive
cmckni3/qt-sqlite
2d8041dd80dafe2fe32639634b7beea5c5ae303e
aed157f49d080382d7b5d510f3fdc2fca11ddcc8
refs/heads/master
2020-04-05T05:12:20.805511
2018-09-05T20:31:30
2018-09-05T20:31:30
14,012,382
1
0
null
2018-09-05T20:31:31
2013-10-31T09:19:14
Makefile
UTF-8
C++
false
false
454
h
#ifndef _HELLOFORM_H #define _HELLOFORM_H #include "ui_HelloForm.h" #include <QtGui/QApplication> #include <QtGui/QMessageBox> #include <QtSql/QSqlDatabase> #include <QtSql/QSqlError> #include <QtSql/QSqlQuery> #include <iostream> class HelloForm : public QDialog { Q_OBJECT public: HelloForm(); virtual ~HelloForm(); public slots: void textChanged(const QString& text); private: Ui::HelloForm widget; }; #endif /* _HELLOFORM_H */
[ "cmckni3@gmail.com" ]
cmckni3@gmail.com