blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
2
247
content_id
stringlengths
40
40
detected_licenses
listlengths
0
57
license_type
stringclasses
2 values
repo_name
stringlengths
4
111
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
58
visit_date
timestamp[ns]date
2015-07-25 18:16:41
2023-09-06 10:45:08
revision_date
timestamp[ns]date
1970-01-14 14:03:36
2023-09-06 06:22:19
committer_date
timestamp[ns]date
1970-01-14 14:03:36
2023-09-06 06:22:19
github_id
int64
3.89k
689M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
25 values
gha_event_created_at
timestamp[ns]date
2012-06-07 00:51:45
2023-09-14 21:58:52
gha_created_at
timestamp[ns]date
2008-03-27 23:40:48
2023-08-24 19:49:39
gha_language
stringclasses
159 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
7
10.5M
extension
stringclasses
111 values
filename
stringlengths
1
195
text
stringlengths
7
10.5M
38c533ed257cdf1325d73f606a3107380f1b04a4
0d802f71dfeb703f3e20c4091cbcf583a48bc8c9
/main-14.cpp
c649ef8b135b7783e0df7342ddb2ad1287c4962a
[]
no_license
finaldestroyer/Cs1
4f6c67e5d5efffcaea8c4b8b279e9dfca92ec8db
0a2df61c7c99f0f06464a65a500f715a13fbe519
refs/heads/main
2023-02-09T14:00:41.397078
2020-12-29T15:04:41
2020-12-29T15:04:41
325,315,366
0
0
null
null
null
null
UTF-8
C++
false
false
4,142
cpp
main-14.cpp
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ #include <iostream> using namespace std; void RestaurantData() { int COLS = 3; int ROWS = 4; string restaurant[ROWS] = { "In-N-Out","McDonalds","Popeyes", "KFC"}; string category[COLS] = { "Rate the food", "Rate the service","Rate the decor"}; int rates[ROWS][COLS]; for (int r = 0; r < ROWS; r++) { cout << "Restaurant: " << restaurant[r] << endl; for (int c = 0; c < COLS; c++) { cout << category[c]<< ": "; cin >> rates[r][c]; } } cout << endl; cout << setw(25) << " "; for (int c = 0; c < COLS; c++) { cout << setw(20) << category[c]; } cout << endl; cout << fixed << setprecision(2); for (int r = 0; r < ROWS; r++) { cout << setw(25) << restaurant[r]; for (int c = 0; c < COLS; c++) { cout << setw(20) << rates[r][c]; } cout << endl; } return 0; } void Tictactoe() { int COLS = 3; int ROWS = 3; string TICTACTOE[ROWS][COLS]; for(int r = 0; r<ROWS;r++) { for(int c = 0; c<COLS;c++) { TICTACTOE[r][c] = "-"; } } cout << fixed << setprecision(2); for(int r = 0; r<ROWS;r++) { for(int c = 0; c<COLS;c++) { cout << setw(2)<<TICTACTOE[r][c]; } cout<<endl; } int ChoiceRow=0; int ChoiceColumn=0; bool pass= true; while(pass == true) { for(int r = 0; r<ROWS;r++) { for(int c = 0; c<COLS;c++) { if(TICTACTOE[r][c] == "-") { TICTACTOE[r][c] = "X"; pass= true; } else{ cout<<"**That Position has already been played"<<endl; cout<<"Pick a row and column (1-3)."<<endl; cout<<"Rows: "; cin>>ROWS; cout<<"Column: "; cin>>COLS; } } } } return 0; } bool Contains (string text, string target) { if(target.size() > text.size()) return false; for (int i = 0; i < text.size(); i++){ int j = 0; if(text[i] == target[j]){ while (text[i] == target[j] && j < target.size()){ j++; i++; } if (j == target.size()) return true; } } return false; } int CountWords(string text) { int Num=1; for(int i=1;i<text.size();i++){ if(x[i]==' ' && x[i-1] != ' ') { Num++; } } return Num; cout<<"Line contains "<< Num <<" words."<<endl; void ProcessFile() { cout<<"Please choose a file name to open. Only A, B, or C please."<<endl; cout<<"(A) Word counts"<<endl; cout<<"(B) Search"<<endl; cout<<"(C) Quit"<<endl; string filenamechoice = ""; cin>>filenamechoice; while(filenamechoice != "A" ||filenamechoice != "B"||filenamechoice != "C"||filenamechoice != "a"||filenamechoice != "b"||filenamechoice != "c") { cout<<"Please choose a valid choice." cin>>filenamechoice; } if(filenamechoice == "A"||filenamechoice == "a") { string text =""; cout<<"Please type a phrase and I will tell you the number of words in your phrase."<<endl; cin>>text; CountWords(string text); } if(filenamechoice == "B"||filenamechoice == "b") { string text =""; string target =""; cout<<"What string are you looking for in the a text?"<<endl; cout<<"Text: "; cin>>text; cout<<"Target: "; cin>>target; Contains (string text, string target); } if(filenamechoice == "C"||filenamechoice == "c") { return 0; } }
def379e3d06b38c3663af1c42bd0adc60c2f03a4
8e4958b3c503c88bdf854570f7d381c3fa4008dc
/online-test/leetcode/easy/intersectionOfTwoLinkedLists.cc
c5140ce7bce05d4c9ceb817194c56120107384e8
[]
no_license
qiansl127/cpp-studio
387a1bd83908dccb0f9d50f376042b7b72697f8b
57acd4232bb62aaa9065244c378d308605429444
refs/heads/master
2020-05-22T01:10:09.955026
2017-05-06T00:36:06
2017-05-06T00:36:33
23,223,850
1
0
null
null
null
null
UTF-8
C++
false
false
1,629
cc
intersectionOfTwoLinkedLists.cc
/* * # 160 * Intersection of Two Linked Lists */ #include<iostream> #include<vector> using namespace std; //Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: int getLength(ListNode* h) { int length(1); ListNode* p = h; while (p->next != NULL) { length++; p = p->next; } return length; } ListNode *shiftNode(ListNode* p, int l) { while (p != NULL && l > 0) { p = p->next; l--; } return p; } ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) { if (headA == NULL || headB == NULL) return NULL; int lengthA = getLength(headA), lengthB = getLength(headB); ListNode* a = headA; ListNode* b = headB; int delta = lengthA - lengthB; if (delta > 0) { a = shiftNode(a, delta); } else { b = shiftNode(b, -delta); } while (a != NULL && b != NULL) { if (a == b) return a; a = a->next; b = b->next; } return NULL; } }; int main() { Solution *s = new Solution(); ListNode a1(11), a2(12); ListNode b1(21), b2(22), b3(23); ListNode c1(31), c2(32), c3(33); c1.next = &c2; c2.next = &c3; a1.next = &a2; a2.next = &c1; b1.next = &b2; b2.next = &b3; b3.next = &c1; ListNode* res = s->getIntersectionNode(&a1, &b1); if (res) cout << res->val << endl; delete s; return 0; }
e1af7a2df324012dc70ba286bb0a8973e732fab2
dcc668891c58cd594234d49a209c4a5e788e2341
/include/lol/def/LolGameflowGameflowWatchPhase.hpp
c5c583ab8b01004621b1579b2b032d5dd8e71cc6
[ "BSD-3-Clause" ]
permissive
Arryboom/LeagueAPI
56d6832f125d1843d575330ae5b0c8172945cca8
be7cb5093aab3f27d95b3c0e1d5700aa50126c47
refs/heads/master
2021-09-28T01:05:12.713109
2018-11-13T03:05:31
2018-11-13T03:05:31
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,309
hpp
LolGameflowGameflowWatchPhase.hpp
#pragma once #include "../base_def.hpp" namespace lol { enum struct LolGameflowGameflowWatchPhase { None_e = 0, WatchFailedToLaunch_e = 3, WatchInProgress_e = 2, WatchStarted_e = 1, }; inline void to_json(json& j, const LolGameflowGameflowWatchPhase& v) { if(v == LolGameflowGameflowWatchPhase::None_e) { j = "None"; return; } if(v == LolGameflowGameflowWatchPhase::WatchFailedToLaunch_e) { j = "WatchFailedToLaunch"; return; } if(v == LolGameflowGameflowWatchPhase::WatchInProgress_e) { j = "WatchInProgress"; return; } if(v == LolGameflowGameflowWatchPhase::WatchStarted_e) { j = "WatchStarted"; return; } } inline void from_json(const json& j, LolGameflowGameflowWatchPhase& v) { if(j.get<std::string>() == "None") { v = LolGameflowGameflowWatchPhase::None_e; return; } if(j.get<std::string>() == "WatchFailedToLaunch") { v = LolGameflowGameflowWatchPhase::WatchFailedToLaunch_e; return; } if(j.get<std::string>() == "WatchInProgress") { v = LolGameflowGameflowWatchPhase::WatchInProgress_e; return; } if(j.get<std::string>() == "WatchStarted") { v = LolGameflowGameflowWatchPhase::WatchStarted_e; return; } } }
fd2403ab8428e6db503aa13e5aafa71cc6a10e13
83aa98403d2821f8bac217dfd53e71135b8a691f
/GetOffers/src/GetOfferQ3.cpp
dadf425bb3cb6c37d909b28ac6546962add0c6d3
[]
no_license
tla001/GetOffers
a01e62b480b2d45b478ac6a199e4b6c6f45f29df
bbed267de4f3b54700c77fcade9da86fce17b51b
refs/heads/master
2021-01-17T18:06:53.413689
2016-11-24T00:49:16
2016-11-24T00:49:16
71,026,196
0
0
null
null
null
null
GB18030
C++
false
false
1,880
cpp
GetOfferQ3.cpp
/* * GetOfferQ3.cpp * * Created on: 2016年10月17日 * Author: tla001 */ #include "GetOfferQ3.h" GetOfferQ3::GetOfferQ3() { // TODO Auto-generated constructor stub } GetOfferQ3::~GetOfferQ3() { // TODO Auto-generated destructor stub } void GetOfferQ3::create(struct ListNode *&head) { head = (struct ListNode *) malloc(sizeof(struct ListNode)); head->next = NULL; } void GetOfferQ3::insert(struct ListNode *head, int val) { struct ListNode *node = (struct ListNode *) malloc(sizeof(struct ListNode)); node->next = NULL; node->val = val; struct ListNode *root = head; while (root->next != NULL) { root = root->next; } root->next = node; } void GetOfferQ3::print(struct ListNode *head) { struct ListNode *root = head->next; while (root != NULL) { cout << root->val << "\t"; root = root->next; } cout << endl; } vector<int> GetOfferQ3::printListFromTailToHead(struct ListNode* head) { vector<int> *tem = new vector<int>(); struct ListNode *root = head->next; //注意头结点是否存东西 while (root != NULL) { //cout << root->val << "\t"; tem->push_back(root->val); root = root->next; } vector<int>::reverse_iterator item; for (item = tem->rbegin(); item != tem->rend(); item++) { cout << *item << "\t"; } cout << endl; //翻转 reverse(tem->begin(), tem->end()); return *tem; } void GetOfferQ3::print(vector<int> vec) { vector<int>::iterator item; for (item = vec.begin(); item != vec.end(); item++) { cout << *item << "\t"; } cout << endl; } void GetOfferQ3::test() { GetOfferQ3::ListNode *head; GetOfferQ3::create(head); GetOfferQ3::insert(head, 10); GetOfferQ3::insert(head, 3); GetOfferQ3::insert(head, 8); GetOfferQ3::print(head); vector<int> tem; tem = GetOfferQ3::printListFromTailToHead(head); GetOfferQ3::print(tem); }
85a0cf28e135d75ec8c9f3dfd000fa65aa8c3752
e08769a230de65d96cc3adb1cd69fb8b6a13ff17
/src/lib/fst/text_compose.cpp
35251786df4da0d571e6386b87692f51ef2fe63c
[]
no_license
yotarok/spin
6ff8fc96f2ee2d517ac4d7b7cad42af009f13d04
0365f7fd7d18c75c205ab7ff2b89a2617b27079d
refs/heads/master
2020-04-27T20:03:10.603844
2019-03-09T03:35:21
2019-03-09T03:35:21
174,644,096
1
0
null
null
null
null
UTF-8
C++
false
false
4,733
cpp
text_compose.cpp
#include <spin/fst/text_compose.hpp> #include <gear/io/logging.hpp> #include <fst/script/relabel.h> #include <fst/script/arcsort.h> #include <fst/script/compose.h> #include <fst/script/convert.h> #include <fst/script/relabel.h> #include <vector> #include <boost/algorithm/string.hpp> #include <boost/lexical_cast.hpp> namespace spin { fst::script::FstClass fst_textual_compose(fst::script::FstClass left, fst::script::FstClass right, bool lookahead) { if (left.ArcType() != right.ArcType()) { throw std::runtime_error("compostition failed: arc type mismatch"); } if (left.OutputSymbols() == 0 && right.InputSymbols() == 0) { // No symbol tables, do numeric match fst::script::VectorFstClass ret(left.ArcType()); fst::script::Compose(left, right, &ret, fst::AUTO_FILTER); return ret; } if (left.OutputSymbols()->LabeledCheckSum() == right.InputSymbols()->LabeledCheckSum()) { // Equivalent symbol tables, do numeric match fst::script::VectorFstClass ret(left.ArcType()); fst::script::Compose(left, right, &ret, fst::AUTO_FILTER); return ret; } if (left.OutputSymbols() == 0) { fst::script::VectorFstClass ret(left.ArcType()); fst::script::VectorFstClass vright(right); vright.SetInputSymbols(0); fst::script::Compose(left, vright, &ret, fst::AUTO_FILTER); return ret; } else if (right.InputSymbols() == 0) { fst::script::VectorFstClass ret(left.ArcType()); fst::script::VectorFstClass vleft(left); vleft.SetOutputSymbols(0); fst::script::Compose(vleft, right, &ret, fst::AUTO_FILTER); return ret; } fst::script::VectorFstClass vleft(left); fst::script::VectorFstClass vright(right); std::vector<std::pair<int64, int64> > ipairs; // keep empty std::vector<std::pair<int64, int64> > opairs; fst::SymbolTable target = *right.InputSymbols(); int64 null = target.AddSymbol("/dev/null"); for (fst::SymbolTableIterator stit(*vleft.OutputSymbols()); ! stit.Done(); stit.Next()) { int64 target_lab = right.InputSymbols()->Find(stit.Symbol()); if (target_lab == fst::SymbolTable::kNoSymbol) { opairs.push_back(std::make_pair(stit.Value(), null)); } else { opairs.push_back(std::make_pair(stit.Value(), target_lab)); } } // Relabel(MutableFstClass, const SymbolTable, ...) doesn't allow missing label fst::script::Relabel(&vleft, ipairs, opairs); vleft.SetOutputSymbols(0); vright.SetInputSymbols(0); fst::script::VectorFstClass ret(left.ArcType()); // if lookahead if (lookahead) { INFO("Converting to lookahead FST..."); // So far, so hacky ::FLAGS_save_relabel_opairs = std::tmpnam(0); fst::script::FstClass laleft = *fst::script::Convert(vleft, "olabel_lookahead"); INFO("Converted to lookahead FST. [relabel info = %s]", ::FLAGS_save_relabel_opairs.c_str()); std::vector<std::pair<int64, int64> > ipairs, opairs; std::ifstream ifs(::FLAGS_save_relabel_opairs.c_str()); while (1) { std::string line; std::getline(ifs, line); boost::trim(line); std::vector<std::string> vpair; boost::split(vpair, line, boost::is_any_of(" \t"), boost::token_compress_on); if (vpair.size() == 0 || vpair[0].size() == 0) { break; } else if (vpair.size() != 2) { INFO("Error: # column is not 2, %d. %s", vpair.size(), line.c_str()); throw std::runtime_error("relabeler format error: # column is not 2"); } std::pair<int64, int64> p; try { p = std::make_pair(boost::lexical_cast<int64>(vpair[0]), boost::lexical_cast<int64>(vpair[1])); } catch (...) { throw std::runtime_error("relabeler format error: Numeral parsing error"); } ipairs.push_back(p); } ::unlink(::FLAGS_save_relabel_opairs.c_str()); INFO("Read relabeling information..."); fst::script::Relabel(&vright, ipairs, opairs); INFO("Relabeled, start sorting..."); fst::script::ArcSort(&vright, fst::script::ILABEL_SORT); INFO("Sorted, start composition..."); fst::script::Compose(laleft, vright, &ret, fst::AUTO_FILTER); fst::SymbolTable nisymtab(*vleft.InputSymbols()); ret.SetInputSymbols(&nisymtab); } else { fst::script::ArcSort(&vleft, fst::script::OLABEL_SORT); fst::script::ArcSort(&vright, fst::script::ILABEL_SORT); fst::script::Compose(vleft, vright, &ret, fst::AUTO_FILTER); } return ret; } }
906d846a6f54cb0d335fc082fb7ac117bd55897b
06919c4595c775af746cf72afaf74c318c5ae0ce
/main.cpp
af1e397d14176092ffd916a56319ae66be2997b8
[]
no_license
IlyaCS/SWtest
2bde46e621539a2aa5e18bd8099c67b724bebd0d
33a9882351e816715172daa43d53eda999fb0b6d
refs/heads/main
2023-08-20T04:07:06.924360
2021-10-07T19:22:29
2021-10-07T19:22:29
null
0
0
null
null
null
null
UTF-8
C++
false
false
256
cpp
main.cpp
#include <iostream> #include <cstdlib> #include <string> using namespace std; int main() { string b; cout << "Hello, world!" << endl; cout << "Git Basics!" << endl; int a; cout << "Self-work: "; system("pause"); return 0; }
6b87572224a472de7f00fe414254344ebaf31aa0
6b49bf37e346b149cc4ad881ef650c183b4e5fc2
/src/kernels/clfr_printer.cc
922e0d2635ae3dce827f3f383a8aae422a0857e4
[]
no_license
olivermichel/starflow-analytics
7f0e401b9f3c38fae9d325889b28e009b3bade5f
c9e358d1f371312e8b2c841aecdbce5c94d5bf90
refs/heads/master
2021-03-27T09:32:59.470550
2018-02-15T00:27:38
2018-02-15T00:27:38
102,988,278
0
0
null
null
null
null
UTF-8
C++
false
false
449
cc
clfr_printer.cc
#include "clfr_printer.h" #include "../types/clfr.h" starflow::kernels::CLFRPrinter::CLFRPrinter(bool sink, std::ostream& os) : _sink(sink), _os(os) { input.add_port<types::CLFR>("in"); if (!_sink) output.add_port<types::CLFR>("out"); } raft::kstatus starflow::kernels::CLFRPrinter::run() { types::CLFR clfr; input["in"].pop(clfr); _os << clfr.str_desc() << std::endl; if(!_sink) output["out"].push(clfr); return raft::proceed; }
4f9a7bf791be11af0c3a37f46a25cfdfb7a31395
6b40e9dccf2edc767c44df3acd9b626fcd586b4d
/NT/ds/security/cryptoapi/test/capi20/tstgdir/tstgdir.cpp
a0be55c2aec34e176edaea06d045fc1f1a7b7067
[]
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
14,395
cpp
tstgdir.cpp
//+------------------------------------------------------------------------ // // Microsoft Windows // Copyright (C) Microsoft Corporation, 1993 - 1993 // // File: tstgdir.cpp // // Contents: Recursive directory display of a storage // document // // Functions: main // // History: 04 Nov 94 - Created by philh // //------------------------------------------------------------------------- #include <windows.h> #include <assert.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <memory.h> #include <time.h> static int indent = 0; static BOOL fVerbose = FALSE; static BOOL fDebug = FALSE; static BOOL fRead = FALSE; static BOOL fReadVerbose = FALSE; static BOOL fBrief = FALSE; #define READ_BUF_SIZE 10000 static BYTE readBuf[READ_BUF_SIZE]; static CLSID NullClsid; typedef struct { SCODE sc; char *text; } StatusCodeText; static StatusCodeText scodes[] = { S_OK, "S_OK", S_FALSE, "S_FALSE", STG_E_INVALIDFUNCTION, "STG_E_INVALIDFUNCTION", STG_E_FILENOTFOUND, "STG_E_FILENOTFOUND", STG_E_PATHNOTFOUND, "STG_E_PATHNOTFOUND", STG_E_TOOMANYOPENFILES, "STG_E_TOOMANYOPENFILES", STG_E_ACCESSDENIED, "STG_E_ACCESSDENIED", STG_E_INVALIDHANDLE, "STG_E_INVALIDHANDLE", STG_E_INSUFFICIENTMEMORY, "STG_E_INSUFFICIENTMEMORY", STG_E_INVALIDPOINTER, "STG_E_INVALIDPOINTER", STG_E_NOMOREFILES, "STG_E_NOMOREFILES", STG_E_DISKISWRITEPROTECTED, "STG_E_DISKISWRITEPROTECTED", STG_E_SEEKERROR, "STG_E_SEEKERROR", STG_E_WRITEFAULT, "STG_E_WRITEFAULT", STG_E_READFAULT, "STG_E_READFAULT", STG_E_SHAREVIOLATION, "STG_E_SHAREVIOLATION", STG_E_LOCKVIOLATION, "STG_E_LOCKVIOLATION", STG_E_FILEALREADYEXISTS, "STG_E_FILEALREADYEXISTS", STG_E_INVALIDPARAMETER, "STG_E_INVALIDPARAMETER", STG_E_MEDIUMFULL, "STG_E_MEDIUMFULL", STG_E_ABNORMALAPIEXIT, "STG_E_ABNORMALAPIEXIT", STG_E_INVALIDHEADER, "STG_E_INVALIDHEADER", STG_E_INVALIDNAME, "STG_E_INVALIDNAME", STG_E_UNKNOWN, "STG_E_UNKNOWN", STG_E_UNIMPLEMENTEDFUNCTION, "STG_E_UNIMPLEMENTEDFUNCTION", STG_E_INVALIDFLAG, "STG_E_INVALIDFLAG", STG_E_INUSE, "STG_E_INUSE", STG_E_NOTCURRENT, "STG_E_NOTCURRENT", STG_E_REVERTED, "STG_E_REVERTED", STG_E_CANTSAVE, "STG_E_CANTSAVE", STG_E_OLDFORMAT, "STG_E_OLDFORMAT", STG_E_OLDDLL, "STG_E_OLDDLL", STG_E_SHAREREQUIRED, "STG_E_SHAREREQUIRED", STG_E_NOTFILEBASEDSTORAGE, "STG_E_NOTFILEBASEDSTORAGE", STG_E_EXTANTMARSHALLINGS, "STG_E_EXTANTMARSHALLINGS", E_NOINTERFACE, "E_NOINTERFACE", STG_S_CONVERTED, "STG_S_CONVERTED" }; #define NSCODETEXT (sizeof(scodes)/sizeof(scodes[0])) // Convert a HRESULT to text static char *hResultText(HRESULT hResult) { static char buf[80]; int i; for (i = 0; i<NSCODETEXT; i++) if (scodes[i].sc == hResult) return scodes[i].text; sprintf(buf, "%lx", hResult); return buf; } static void DirPrintf(const char * Format, ...) { int i = indent; va_list pArgs; char aBuf[256]; while (i-- > 0) printf(" "); va_start( pArgs, Format ); vsprintf(aBuf, Format, pArgs); printf("%s", aBuf); } #pragma pack(1) struct SplitGuid { DWORD dw1; WORD w1; WORD w2; BYTE b[8]; }; #pragma pack() static char *GuidText(GUID *pguid) { static char buf[39]; SplitGuid *psg = (SplitGuid *)pguid; sprintf(buf, "{%08lX-%04hX-%04hX-%02X%02X-%02X%02X%02X%02X%02X%02X}", psg->dw1, psg->w1, psg->w2, psg->b[0], psg->b[1], psg->b[2], psg->b[3], psg->b[4], psg->b[5], psg->b[6], psg->b[7]); return buf; } static char *FileTimeText(FILETIME *pft) { static char buf[80]; FILETIME ftLocal; struct tm ctm; SYSTEMTIME st; FileTimeToLocalFileTime(pft, &ftLocal); if (FileTimeToSystemTime(&ftLocal, &st)) { ctm.tm_sec = st.wSecond; ctm.tm_min = st.wMinute; ctm.tm_hour = st.wHour; ctm.tm_mday = st.wDay; ctm.tm_mon = st.wMonth-1; ctm.tm_year = st.wYear-1900; ctm.tm_wday = st.wDayOfWeek; ctm.tm_yday = 0; ctm.tm_isdst = 0; strcpy(buf, asctime(&ctm)); buf[strlen(buf)-1] = 0; } else sprintf(buf, "<FILETIME %08lX:%08lX>", pft->dwHighDateTime, pft->dwLowDateTime); return buf; } static void DispStatStg(STATSTG *pStatStg) { char *szSTGTY; switch (pStatStg->type) { case STGTY_STORAGE: szSTGTY = "STGTY_STORAGE"; break; case STGTY_STREAM: szSTGTY = "STGTY_STREAM"; break; case STGTY_LOCKBYTES: szSTGTY = "STGTY_LOCKBYTES"; break; default: szSTGTY = "STGTY_???"; } if (pStatStg->type == STGTY_STREAM) DirPrintf("%S %s size:%ld\n", pStatStg->pwcsName, szSTGTY, pStatStg->cbSize.LowPart); else { DirPrintf("%S %s\n", pStatStg->pwcsName, szSTGTY); if (!fBrief && pStatStg->clsid != NullClsid) DirPrintf("CLSID: %s\n", GuidText(&pStatStg->clsid)); } if (fVerbose) { DirPrintf("size: %ld,%ld Mode: %lx StateBits: %lx Locks: %ld\n", pStatStg->cbSize.HighPart, pStatStg->cbSize.LowPart, pStatStg->grfMode, pStatStg->grfStateBits, pStatStg->grfLocksSupported); if ((pStatStg->mtime.dwHighDateTime != 0) || (pStatStg->mtime.dwLowDateTime != 0)) DirPrintf("mtime %s\n", FileTimeText(&pStatStg->mtime)); if ((pStatStg->ctime.dwHighDateTime != 0) || (pStatStg->ctime.dwLowDateTime != 0)) DirPrintf("ctime %s\n", FileTimeText(&pStatStg->ctime)); if ((pStatStg->atime.dwHighDateTime != 0) || (pStatStg->atime.dwLowDateTime != 0)) DirPrintf("atime %s\n", FileTimeText(&pStatStg->atime)); } } #define CROW 16 void BinText(ULONG cbSize, BYTE *pb) { ULONG cb, i; while (cbSize > 0) { cb = min(CROW, cbSize); cbSize -= cb; for (i = 0; i<cb; i++) printf(" %02X", pb[i]); for (i = cb; i<CROW; i++) printf(" "); printf(" '"); for (i = 0; i<cb; i++) if (pb[i] >= 0x20 && pb[i] <= 0x7f) printf("%c", pb[i]); else printf("."); pb += cb; printf("'\n"); } } void DispStream(IStream *pstm); void DispStorage(IStorage *pstg); void DispStream(IStream *pstm) { HRESULT hResult; STATSTG statStg; hResult = pstm->Stat(&statStg, STATFLAG_DEFAULT); if (SUCCEEDED(hResult)) { DispStatStg(&statStg); if (statStg.pwcsName != NULL) CoTaskMemFree(statStg.pwcsName); } else { DirPrintf("Stat => %lx\n", hResult); return; } if (fRead) { ULONG ulTotalRead = 0; ULONG ulBytesRead; int i = 0; while (TRUE) { ulBytesRead = 0; hResult = pstm->Read(readBuf, READ_BUF_SIZE, &ulBytesRead); if (FAILED(hResult)) { DirPrintf("IStream->Read => %lx\n", hResult); break; } if (fReadVerbose) { DirPrintf("%lu bytes starting at offset: 0x%08lX\n", ulBytesRead, ulTotalRead); BinText(ulBytesRead, readBuf); } ulTotalRead += ulBytesRead; if (ulBytesRead < READ_BUF_SIZE) break; i++; if (i % 10 == 0) { if (fReadVerbose) DirPrintf("Read %ld bytes\n", ulTotalRead); else DirPrintf("Read %ld bytes\r", ulTotalRead); } } DirPrintf("Read %ld bytes\n", ulTotalRead); } } void DispStorage(IStorage *pstg) { HRESULT hResult; DWORD grfMode; STATSTG statStg; CLSID readClsid; IStorage *pstgChild; IStream *pstmChild; IEnumSTATSTG *penumStatStg; hResult = pstg->Stat(&statStg, STATFLAG_DEFAULT); if (SUCCEEDED(hResult)) { DispStatStg(&statStg); if (statStg.pwcsName != NULL) CoTaskMemFree(statStg.pwcsName); } else { DirPrintf("Stat => %s\n", hResultText(hResult)); return; } hResult = ReadClassStg(pstg, &readClsid); if (SUCCEEDED(hResult)) { if (readClsid != statStg.clsid) DirPrintf("ReadClassStg CLSID: %s\n", GuidText(&readClsid)); } else DirPrintf("ReadClassStg => %s\n", hResultText(hResult)); indent += 2; hResult = pstg->EnumElements(0, NULL, 0, &penumStatStg); if (FAILED(hResult)) DirPrintf("EnumElements => %lx\n", hResult); else { while(TRUE) { hResult = penumStatStg->Next(1, &statStg, NULL); if (hResult == S_FALSE) break; if (FAILED(hResult)) { DirPrintf("EnumStatStg => %lx\n", hResult); break; } else { switch (statStg.type) { case STGTY_STORAGE: if ((statStg.pwcsName == NULL) || (statStg.pwcsName[0] == L'.')) DispStatStg(&statStg); else { grfMode = STGM_DIRECT | STGM_READ | STGM_SHARE_EXCLUSIVE; hResult = pstg->OpenStorage( statStg.pwcsName, NULL, // pstgPriority grfMode, NULL, // snbExclude 0, // dwReserved &pstgChild); if (FAILED(hResult)) { DispStatStg(&statStg); DirPrintf("OpenStorage => %lx\n", hResult); } else { if (fDebug) { DirPrintf("--- Enum ---\n"); DispStatStg(&statStg); DirPrintf("--- Enum ---\n"); } DispStorage(pstgChild); pstgChild->Release(); } } break; case STGTY_STREAM: if ((statStg.pwcsName == NULL) || (statStg.pwcsName[0] == L'.')) DispStatStg(&statStg); else { grfMode = STGM_DIRECT | STGM_READ | STGM_SHARE_EXCLUSIVE; hResult = pstg->OpenStream( statStg.pwcsName, NULL, // pReserved1 grfMode, 0, // dwReserved2 &pstmChild); if (FAILED(hResult)) { DispStatStg(&statStg); DirPrintf("OpenStream => %lx\n", hResult); } else { if (fDebug) { DirPrintf("--- Enum ---\n"); DispStatStg(&statStg); DirPrintf("--- Enum ---\n"); } DispStream(pstmChild); pstmChild->Release(); } } break; default: DispStatStg(&statStg); } if (statStg.pwcsName != NULL) CoTaskMemFree(statStg.pwcsName); } } // while loop penumStatStg->Release(); } indent -= 2; } static void Usage(void) { printf("Usage: tstgdir [options] <filename>\n"); printf("Options are:\n"); printf(" -h - This message\n"); printf(" -b - Brief\n"); printf(" -d - Debug\n"); printf(" -r - Read streams (don't display)\n"); printf(" -R - Read streams (display contents)\n"); printf(" -v - Verbose\n"); printf("\n"); } int _cdecl main(int argc, char * argv[]) { WCHAR wcsFile[_MAX_PATH]; HRESULT hResult; DWORD grfMode; IStorage *pstgRoot; wcscpy(wcsFile, L""); while (--argc>0) { if (**++argv == '-') { switch(argv[0][1]) { case 'b': fBrief = TRUE; break; case 'd': fDebug = TRUE; break; case 'R': fReadVerbose = TRUE; case 'r': fRead = TRUE; break; case 'v': fVerbose = TRUE; break; case 'h': default: Usage(); return -1; } } else mbstowcs(wcsFile, argv[0], strlen(argv[0]) + 1); } if (wcsFile[0] == L'\0') { printf("missing filename\n"); Usage(); return -1; } if (fVerbose) fBrief = FALSE; if (FAILED(hResult = CoInitialize(NULL))) { printf("CoInitialize => %s\n", hResultText(hResult)); return -1; } grfMode = STGM_DIRECT | STGM_READ | STGM_SHARE_DENY_WRITE; hResult = StgOpenStorage(wcsFile, NULL, //pstgPriority grfMode, NULL, // snbExclude 0, //dwReserved &pstgRoot); if (FAILED(hResult)) { CoUninitialize(); printf("StgOpenStorage => %s\n", hResultText(hResult)); return -1; } DispStorage(pstgRoot); pstgRoot->Release(); CoUninitialize(); return 0; }
6799884b08f1fe399cd0af81933595f1e86e3b62
5ac4af1856032d41cedcd83b481b247c9cd2ede0
/lib/Runtime/old/volren/hpgv/hpgv_socket.cpp
621494f28a621bc33acc592102e59bf00ee7560b
[ "BSD-3-Clause", "LicenseRef-scancode-other-permissive" ]
permissive
lineCode/scout
884bf2a6bf5c0e9963ef6af36f8559ec635929f3
a7b66c9bb6940625005c05bc350491a443a23866
refs/heads/master
2021-05-30T14:55:14.591760
2016-02-18T22:45:02
2016-02-18T22:45:02
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,256
cpp
hpgv_socket.cpp
/** * hpgv_socket.c * * Copyright (c) 2008 Hongfeng Yu * * Contact: * Hongfeng Yu * hfstudio@gmail.com * * * All rights reserved. May not be used, modified, or copied * without permission. * */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include "scout/Runtime/volren/hpgv/hpgv_socket.h" namespace scout { int theSocket = -1; int thePort = -1; int theMode = SOCKET_UNKNOW; /** * hpgv_socket_init * */ int hpgv_socket_init(int mode, int port) { theMode = mode; if (port == -1) { thePort = SOCKET_PORT; } else { thePort = port; } if (mode == SOCKET_SERVER) { theSocket = socket(AF_INET, SOCK_STREAM, 0); if (theSocket < 0) { perror("ERROR opening socket"); return MY_ERROR; } struct sockaddr_in serv_addr; bzero((char *) &serv_addr, sizeof(serv_addr)); serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = INADDR_ANY; serv_addr.sin_port = htons(thePort); if (bind(theSocket, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) { perror("ERROR on binding"); fprintf(stderr, "%d\n", thePort); return MY_ERROR; } listen(theSocket, 1); return MY_SUCCESS; } return MY_SUCCESS; } /** * hpgv_socket_get_port * */ int hpgv_socket_get_port() { return thePort; } /** * socket_open * */ int socket_open() { if (theMode == SOCKET_CLIENT) { int sockfd = socket(AF_INET, SOCK_STREAM, 0); if (sockfd < 0) { perror("ERROR opening socket"); return -1; } struct hostent * server = gethostbyname("localhost"); if (server == NULL) { perror("ERROR no such host\n"); return -1; } struct sockaddr_in serv_addr; bzero((char *) &serv_addr, sizeof(serv_addr)); bcopy((char *)server->h_addr, (char *)&serv_addr.sin_addr.s_addr, server->h_length); serv_addr.sin_family = AF_INET; serv_addr.sin_port = htons(thePort); if (connect(sockfd, (const struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0) { perror("ERROR connecting"); return -1; } return sockfd; } else if ( theMode == SOCKET_SERVER) { struct sockaddr_in cli_addr; int clilen = sizeof(cli_addr); int newsockfd = accept(theSocket, (struct sockaddr *) &cli_addr, (socklen_t*)&clilen); if (newsockfd < 0) { perror("ERROR on accept"); return -1; } return newsockfd; } return -1; } /** * socket_close * */ void socket_close(int sockfd) { if (sockfd >= 0) { close(sockfd); } } /** * hpgv_socket_send * */ int hpgv_socket_send(void *buffer, int size) { int n = 0; if (theMode == SOCKET_UNKNOW) { fprintf(stderr, "ERROR no initialization\n"); return MY_ERROR; } int sockfd = socket_open(); if (sockfd < 0) { fprintf(stderr, "ERROR no socket\n"); return MY_ERROR; } n = write(sockfd, buffer, size); if (n != size) { fprintf(stderr, "supposed %d; actual %d\n", size, n); perror("ERROR writing to socket"); return MY_ERROR; } char reply; n = read(sockfd, &reply, sizeof(char)); socket_close(sockfd); if (n != sizeof(char)) { fprintf(stderr, "supposed %d; actual %d\n", (int)sizeof(char), n); perror("ERROR writing to socket"); return MY_ERROR; } if (reply != SOCKET_TAG_SUCCESS) { perror("ERROR receiving the reply."); return MY_ERROR; } return MY_SUCCESS; } /** * hpgv_socket_recv * */ int hpgv_socket_recv(void *buffer, int size) { int n = 0; if (theMode == SOCKET_UNKNOW) { fprintf(stderr, "ERROR no initialization\n"); return MY_ERROR; } int sockfd = socket_open(); if (sockfd < 0) { fprintf(stderr, "ERROR no socket\n"); return MY_ERROR; } int count = 0; while (count < size) { n = read(sockfd, &(((char*)buffer)[count]), size - count); count += n; } if (count != size) { fprintf(stderr, "supposed %d; actual %d\n", size, count); perror("ERROR reading to socket"); return MY_ERROR; } char reply = SOCKET_TAG_SUCCESS; n = write(sockfd, &reply, sizeof(char)); socket_close(sockfd); if (n != sizeof(char)) { fprintf(stderr, "supposed %d; actual %d\n", (int)sizeof(char), n); perror("ERROR reading to socket"); return MY_ERROR; } return MY_SUCCESS; } }
3ebb1be289fb03be13ffd61fc1cc883f57a11c64
22c6d0b104b2051f9d641e706a1d38576ce7f746
/lesson6/pointArray.cpp
19ed1677582f977e4ecb28757cd05bc91301ce76
[]
no_license
simakovvv/NIIT-work-with-C
c21e4d5be52f72a8766f09351656e0cd735e7226
96141a8c1c6100dd90e3290b47a9611f2f241974
refs/heads/master
2020-03-26T12:45:49.309829
2018-08-15T21:49:36
2018-08-15T21:49:36
null
0
0
null
null
null
null
UTF-8
C++
false
false
374
cpp
pointArray.cpp
#include "Point.h" #include "pointArray.h" #include <time.h> #include <stdlib.h> #include <stdio.h> #define SIZE 50 POINT arr[SIZE]; void initArray() { srand(time(0)); for (int i = 0; i < SIZE; i++) { arr[i].x = rand() % 101 - 50; arr[i].x = rand() % 101 - 50; } } void printArray() { for (int i = 0; i < SIZE; i++) { printPoint(arr + i); printf(" \n"); } }
0acd28c48b9f6beb4b43b0893426fe2649635165
9f4390685064b06f8093ab221100b6d4a93b8519
/source/Globals/File/FileSystem.h
c961745c1365ad444c98e6614a7cce506e5acf17
[]
no_license
Darkyon0831/EndGine
316a302607961a6b6362e658aebc976cd98a0a78
46f4fbecb8ba843794765c875dce606afd51a79d
refs/heads/master
2020-08-29T04:33:25.031785
2020-07-22T13:47:29
2020-07-22T13:47:29
216,434,885
0
0
null
null
null
null
UTF-8
C++
false
false
1,144
h
FileSystem.h
#pragma once #include "Globals/Singleton.h" #include "Globals/String.h" #include "Graphics/Device.h" #include <wincodec.h> #include <d3d11.h> namespace EG { class FileSystem : public Singleton<FileSystem> { public: struct D3D11Texture { ID3D11ShaderResourceView* pShaderResourceView = nullptr; ID3D11Texture2D* pD311Texture = nullptr; }; struct Convert { GUID source; GUID target; }; struct FormatConverter { GUID source; DXGI_FORMAT format; }; struct BytesPerPixelConverter { GUID source; size_t bytesPerPixel; }; FileSystem(); ~FileSystem(); void SetErrorFileOutput(const String& errorFileOutput) { m_errorFileOutput = errorFileOutput; } void SetDataLocation(const String& dataLocation) { m_dataLocation = dataLocation; } String GetDataLocationForPath(const String& path) const; String GetErrorFileOutputForFile(const String& fileName) const; void WriteErrorFile(const String& filename, const String& extension, const String& errorMessage); private: IWICImagingFactory* m_pImageFactory; String m_errorFileOutput; String m_dataLocation; }; }
20c2124c299711404cae94298f868292578c27c7
6e0e1b705096397604ec9468f5f1f2c8ee975433
/SDLBasic/Game-Engineering--2-Lab4-main/AnimatedFSM/Player.h
e2b4afc161889345e4c206595f8184980e21d80a
[]
no_license
RobinMeyler/CppSnippets
abec12c6badfae99c8a38629af78856496da1681
9d991bd1c6e643401d283b621fea51f823c713cd
refs/heads/main
2023-05-07T19:20:24.399780
2021-06-02T14:31:21
2021-06-02T14:31:21
373,191,629
0
0
null
null
null
null
UTF-8
C++
false
false
604
h
Player.h
#pragma once #include "InputHandler.h" #include <Events.h> #include <PlayerState.h> #include <AnimatedSprite.h> class Player { private: PlayerState* m_state; AnimatedSprite m_animated_sprite; InputHandler m_commandPatternInput; public: Player(const AnimatedSprite&); virtual void handleInput(gpp::Events); virtual void update(); AnimatedSprite& getAnimatedSprite(); SDL_Rect& getSourceSDLRectAtFrame(); AnimatedSprite& getAnimatedSpriteFrame(); void setAnimatedSprite(AnimatedSprite&); PlayerState* getPlayerState(); void setPlayerState(PlayerState*); InputHandler* getHandler(); };
c725220ab2a7409e6177583647d8340786ac61ed
51a484c4885439799561dc5f6ab59e91d33d98fd
/src/jwt/JWTDecoder.h
57f072238e1eb979176ad1b41ba1eeec9e355ab0
[ "BSD-3-Clause" ]
permissive
BeeeOn/server
7b22a4c7cbd551542a2bde5a128f09c02d597a99
c705503f6bc033f2014aaa675d1e29bfeed9f5eb
refs/heads/master
2020-12-29T02:31:55.089160
2019-01-29T22:08:50
2019-01-29T22:08:57
47,968,600
4
1
null
null
null
null
UTF-8
C++
false
false
836
h
JWTDecoder.h
#pragma once #include <vector> #include <Poco/SharedPtr.h> #include <Poco/Timestamp.h> #include "jwt/JWToken.h" #include "util/Loggable.h" namespace BeeeOn { class TokenID; /** * @brief JWTDecoder is used to decode JSON Web Token string into * its internal representation (an instance of JWToken). */ class JWTDecoder : public Loggable { public: typedef Poco::SharedPtr<JWTDecoder> Ptr; JWTDecoder(); ~JWTDecoder(); /** * Set secret passphrase to be used while verifying the * JWT signatures. */ void setSecret(const std::string &secret); /** * Decode the given token, check its signature according to * the preset secret. Any algorithm could have been used for * signing the token, however, the secret must match. */ JWToken decode(const TokenID &tokenId) const; private: std::string m_secret; }; }
46a140794a4e3f0912d2988da9dd46ababdf5637
2da11190370a9de4acae40d0862d078fb68a9e57
/library/symlib-mutex.h
82d60201bff1883c8ef5ed6d64b607ac11250fb4
[]
no_license
mando/Symagent
6e06f8de9c9b2c814098fb31f5a5d829b11d85b4
e4af70d96972d750f368229185784d01c99a2f8f
refs/heads/master
2021-01-13T02:02:03.261624
2009-07-07T19:51:00
2009-07-07T19:51:00
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,133
h
symlib-mutex.h
/* ####################################################################### # SYMBIOT # # Real-time Network Threat Modeling # (C) 2002-2004 Symbiot, Inc. --- ALL RIGHTS RESERVED # # Symbiot Master Library # # http://www.symbiot.com # ####################################################################### # Author: Borrowed Time, Inc. # e-mail: libsymbiot@bti.net # # Adapted from a library authored by BTI and available # from http://www.bti.net # # Created: 20 Nov 2003 # Last Modified: 23 Apr 2004 # ####################################################################### */ #if !defined(SYMLIB_MUTEX) #define SYMLIB_MUTEX //--------------------------------------------------------------------- // Includes //--------------------------------------------------------------------- #include <pthread.h> //--------------------------------------------------------------------- // Begin Environment //--------------------------------------------------------------------- namespace symbiot { //--------------------------------------------------------------------- // Forward Class Declarations //--------------------------------------------------------------------- class TPthreadMutexObj; class TLockedPthreadMutexObj; class TLockedPthreadMutexTimeoutObj; //--------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------- //--------------------------------------------------------------------- // Class TPthreadMutexObj // // Simple wrapper class for pthread mutexes. Note that casting // operators are provided so instances of this class can be used as // pthread_mutex_t and pthread_mutex_t* arguments. This class is // mainly used to define a mutex, rather than manage it (see TLockedPthreadMutexObj // for easy management). //--------------------------------------------------------------------- class TPthreadMutexObj { public: TPthreadMutexObj (); // Constructor TPthreadMutexObj (const pthread_mutexattr_t& attributes); // Constructor private: TPthreadMutexObj (const TPthreadMutexObj& obj) {} // Copy constructor is illegal public: ~TPthreadMutexObj (); // Destructor void Lock (); // Method seizes the lock on the current mutex, blocking // until the lock is actually seized. bool TryLock (); // Attempts to seize a lock like a call to Lock() but does // not block if unable to actually seize the lock. Returns // a boolean indicating whether the seizure was successful. void Unlock (); // Method unlocks the previously-sized mutex, relinquishing // its hold. bool IsLocked () const { return fIsLocked; } inline pthread_mutex_t* MutexPtr () { return &fMutex; } inline const pthread_mutex_t* MutexPtr () const { return &fMutex; } // Public castings public: inline operator pthread_mutex_t () { return fMutex; } inline operator const pthread_mutex_t () const { return fMutex; } inline operator pthread_mutex_t* () { return &fMutex; } inline operator const pthread_mutex_t* () const { return &fMutex; } protected: pthread_mutex_t fMutex; bool fIsLocked; }; //--------------------------------------------------------------------- // Class TLockedPthreadMutexObj // // Simple class that seizes a mutex lock during construction and // releases it during destruction. Will accept either pthread_mutex_t // mutexes or TPthreadMutexObj instances. //--------------------------------------------------------------------- class TLockedPthreadMutexObj { public: TLockedPthreadMutexObj (pthread_mutex_t& mutex) : fMutexPtr(&mutex) { pthread_mutex_lock(fMutexPtr); } TLockedPthreadMutexObj (TPthreadMutexObj& mutexObj) : fMutexPtr(mutexObj.MutexPtr()) { pthread_mutex_lock(fMutexPtr); } ~TLockedPthreadMutexObj () { pthread_mutex_unlock(fMutexPtr); } private: pthread_mutex_t* fMutexPtr; }; //--------------------------------------------------------------------- // Class TLockedPthreadMutexTimeoutObj // // Simple class that seizes a mutex lock during construction and // releases it during destruction. Will accept either pthread_mutex_t // mutexes or TPthreadMutexObj instances. Second argument to // indicates the number of seconds to wait before giving up. //--------------------------------------------------------------------- class TLockedPthreadMutexTimeoutObj { public: TLockedPthreadMutexTimeoutObj (pthread_mutex_t& mutex, time_t seconds); TLockedPthreadMutexTimeoutObj (TPthreadMutexObj& mutexObj, time_t seconds); ~TLockedPthreadMutexTimeoutObj (); inline bool IsLocked () const { return fIsLocked; } private: pthread_mutex_t* fMutexPtr; bool fIsLocked; }; //--------------------------------------------------------------------- // End Environment //--------------------------------------------------------------------- } // namespace symbiot //********************************************************************* #endif // SYMLIB_MUTEX
aa301d52b017753a0197da1247b1c81086e64743
07d5313b6f7aa7fc421dd244a045e45962b23bf8
/Common_3/ThirdParty/OpenSource/BulletPhysics/2.77/UnitTests/BulletUnitTests/TestBulletOnly.h
b37ef5fde2b7ad966b33edb3c286249d8b678fea
[ "Apache-2.0", "Zlib", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-unknown" ]
permissive
daveansh/The-Forge
4bc91d1978f6f46ec746d4e690280fcdfe06efbd
29b377a64230be414eb84b632b8517646a1f9da4
refs/heads/master
2022-02-22T21:14:44.125736
2019-08-19T20:27:19
2019-08-19T20:27:19
192,270,664
1
0
Apache-2.0
2019-06-17T03:44:11
2019-06-17T03:44:11
null
UTF-8
C++
false
false
3,746
h
TestBulletOnly.h
#ifndef TESTBULLETONLY_HAS_BEEN_INCLUDED #define TESTBULLETONLY_HAS_BEEN_INCLUDED #include "cppunit/TestFixture.h" #include "cppunit/extensions/HelperMacros.h" #include "btBulletDynamicsCommon.h" #include "BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h" // --------------------------------------------------------------------------- class TestBulletOnly : public CppUnit::TestFixture { btCollisionConfiguration * mCollisionConfig; btCollisionDispatcher * mCollisionDispatch; btBroadphaseInterface * mBroadphase; btConstraintSolver * mConstraintSolver; btDiscreteDynamicsWorld * mWorld; btCollisionShape* mBodyShape; btRigidBody* mRigidBody; btDefaultMotionState* mMotionState; public: void setUp() { // Setup the world -- mCollisionConfig = new btDefaultCollisionConfiguration; mCollisionDispatch = new btCollisionDispatcher( mCollisionConfig ); mBroadphase = new btDbvtBroadphase(); mConstraintSolver = new btSequentialImpulseConstraintSolver(); mWorld = new btDiscreteDynamicsWorld( mCollisionDispatch, mBroadphase, mConstraintSolver, mCollisionConfig ); mWorld->setGravity( btVector3( 0, -9.81, 0 )); // Set up the rigid body -- mBodyShape = new btBoxShape( btVector3( 1, 1, 1 ) ); btScalar mass = 1; btVector3 localInertia(0,0,0); mBodyShape->calculateLocalInertia(mass,localInertia); btTransform bodyInitial; mMotionState = new btDefaultMotionState(); bodyInitial.setIdentity(); bodyInitial.setOrigin( btVector3( 0, 0, 0 ) ); mRigidBody = new btRigidBody( buildConstructionInfo(mass, 0.5, 0.5, 0, 0, *mMotionState, mBodyShape ) ); mWorld->addRigidBody( mRigidBody ); } void tearDown() { mWorld->removeRigidBody(mRigidBody); delete mRigidBody; delete mMotionState; delete mBodyShape; delete mWorld; delete mConstraintSolver; delete mBroadphase; delete mCollisionDispatch; delete mCollisionConfig; } btRigidBody::btRigidBodyConstructionInfo buildConstructionInfo( btScalar mass, btScalar friction, btScalar restitution, btScalar linearDamping, btScalar angularDamping, btDefaultMotionState & state, btCollisionShape * shape ) { btVector3 inertia(0,0,0); if (mass>0) shape->calculateLocalInertia( mass, inertia ); btRigidBody::btRigidBodyConstructionInfo info( mass, &state, shape, inertia ); info.m_friction = friction; info.m_restitution = restitution; info.m_linearDamping = linearDamping; info.m_angularDamping = angularDamping; return info; } void testKinematicVelocity0() { mRigidBody->setMassProps( 1, btVector3( 1, 1, 1 ) ); mRigidBody->updateInertiaTensor(); mRigidBody->setCollisionFlags( btCollisionObject::CF_KINEMATIC_OBJECT ); // -- . // Interpolate the velocity -- //btVector3 velocity( 1., 2., 3. ), spin( 0.1, 0.2, 0.3 ); btVector3 velocity( 1., 2., 3. ), spin( 0.1, 0.2, .3 ); btTransform interpolated; // TODO: This is inaccurate for small spins. btTransformUtil::integrateTransform( mRigidBody->getCenterOfMassTransform(), velocity, spin, 1.0f/60.f, interpolated ); mRigidBody->setInterpolationWorldTransform( interpolated ); mWorld->stepSimulation( 1.f/60.f, 60, 1.0f/60.f ); CPPUNIT_ASSERT_DOUBLES_EQUAL( mRigidBody->getLinearVelocity().length2(), velocity.length2(), 1e-8 ); #ifdef BT_USE_DOUBLE_PRECISION CPPUNIT_ASSERT_DOUBLES_EQUAL( mRigidBody.getAngularVelocity().length2(), spin.length2(), 1e-4 ); #else CPPUNIT_ASSERT_DOUBLES_EQUAL( mRigidBody->getAngularVelocity().length2(), spin.length2(), 5e-3 ); #endif //CPPUNIT_ASSERT_DOUBLES_EQUAL } CPPUNIT_TEST_SUITE(TestBulletOnly); CPPUNIT_TEST(testKinematicVelocity0); CPPUNIT_TEST_SUITE_END(); private: }; #endif
9394430533eefcfcbb6a916a16c2ec434cc831fb
71c1c86b30c1518e21728f7d5e0f09b5e602baac
/Algo_Engine/ROM_Handler/RDS/TPOSCLIENT/include/tpos/TposDefs.h
2b802d1c0537433db594f7daa0c288c806ab4b21
[]
no_license
ssh352/ronin
3ddf360fec5f106015c6902b5107aedefe934836
33301b6c5e68fa9d02c7d54bc86f6b7732985fc2
refs/heads/master
2023-05-03T11:00:39.368460
2021-05-17T18:41:08
2021-05-17T18:41:08
null
0
0
null
null
null
null
UTF-8
C++
false
false
14,334
h
TposDefs.h
#ifndef TPOS_DEFS_H #define TPOS_DEFS_H # include<stdlib.h> # include <string> # include <vector> # include <list> #define TCR_NONE 0 #define TCR_TRADE (1<<1) #define TCR_POSITION (1<<2) #define TCR_THEO (1<<3) #define TCR_ALL 0xFFFFFFFF //#define DEBUG_FILTER if ( getenv( "RTP_DEBUG" ) && atoi( getenv( "RTP_DEBUG" ) ) > 0 ) extern int s_debugFilter; #define DEBUG_FILTER if ( s_debugFilter ) #define STATUS_FILTER //#define SM_OPTION_CHAIN_TEXT OPTION_CHAIN_TEXT // "OPTION CHAIN" //#define SM_OPT_CHAIN_COUNT_TEXT OPT_CHAIN_COUNT_TEXT //"OPTION CHAIN COUNT" //#define SM_UNDRLYING_TEXT UNDRLYING_TEXT // "Underlying" //#define SM_UNDERLYING_COUNT_TEXT UNDERLYING_COUNT_TEXT // "Underlying Count" //#define SM_FUT_CHAIN_COUNT_TEXT FUT_CHAIN_COUNT_TEXT //"Future Chain Count" #define SM_OPTION_CHAIN_TEXT "OPTION CHAIN" #define SM_OPT_CHAIN_COUNT_TEXT "OPTION CHAIN COUNT" #define SM_UNDRLYING_TEXT "Underlying" #define SM_UNDERLYING_COUNT_TEXT "Underlying Count" #define SM_FUT_CHAIN_COUNT_TEXT "Future Chain Count" #define SM_INSTRUMENT_ID "Golden Copy Key" #define SM_POS_INSTRUMENT_ID "PARENT ID" #define SM_CUSIP "ID CUSIP/CINS/PPN" #define SM_ISIN "ID ISIN" #define SM_SEDOL "ID SEDOL" #define SM_PRIMARY_EXHANGE "PRIMARY TRADING ARENA" #define SM_EXP_DATE "MATURITY/EXPIRY/TENOR DATE" #define SM_EXCHANGE "EXCHANGE" #define SM_TICKER_SYMBOL "TICKER SYMBOL" #define SM_STRIKE "STRIKE PRICE" #define SM_CONTRACT_SIZE "CONTRACT SIZE" #define SM_PUT_CALL "CALL/PUT INDICATOR" #define SM_FUTURES_DEL_DATE "FUTURES DELIVERY FIRST DATE" #define SM_FUTURES_DEL_DATE "FUTURES DELIVERY FIRST DATE" #define TPOS_CMD "TposCommand" #define TPOS_CMD_USER "cmd_username" #define TPOS_CMD_PASSWORD "cmd_password" #define TPOS_CMD_HOST "cmd_host_and_pid" #define TPOS_CMD_APPLICATION "cmd_application" #define TPOS_CMD_VERSION "cmd_version" #define TPOS_CMD_VERSION_NUM "001.000.000" #define TPOS_BASKET_RETRIEVE_CMD "basket_retrieve" #define TPOS_TRADE_RETRIEVE_CMD "trade_retrieve" #define TPOS_EX_TRADE_RETRIEVE_CMD "ex_trade_retrieve" #define TPOS_TRADE_FORMAT_CMD "trade_format" #define TPOS_TRADE_REASON_RETRIEVE_CMD "trade_reason" #define TPOS_MARKET_FEED_RETRIEVE_CMD "market_feeds" #define TPOS_ACCOUNT_INFO_RETRIEVE_CMD "account_info" #define TPOS_SECURITY_ID_RETRIEVE_CMD "security_id_retrieve" #define TPOS_SECURITY_TICKER_RETRIEVE_CMD "security_ticker_retrieve" #define TPOS_OPTION_CHAIN_RETRIEVE_CMD "option_chain_info" #define TPOS_FUTURE_CHAIN_RETRIEVE_CMD "future_chain_info" #define TPOS_SSFUTURE_CHAIN_RETRIEVE_CMD "ssfuture_chain_info" #define TPOS_OPTION_RETRIEVE_CMD "option_info" #define TPOS_MAP_RETRIEVE_CMD "map_info" #define TPOS_SPECIAL_SETTLE_RETRIEVE_CMD "special_settle_rtrv" #define TPOS_THEORETICAL_COMMIT_CMD "theoretical_interface_commit" #define TPOS_THEORETICAL_RETRIEVE_CMD "theoretical_interface_rtrv" #define TPOS_WATCHLIST_RETRIEVE_CMD "watchlist_interface_rtrv" #define TPOS_WATCHLIST_ADD_CMD "watchlist_interface_add" #define TPOS_WATCHLIST_DEL_CMD "watchlist_interface_del" #define TPOS_DIVIDEND_RETRIEVE_CMD "dividend_rtrv" #define TPOS_ACCOUNTINGPRICES_RETRIEVE_CMD "accountingprices_rtrv" #define TPOS_MKTPRICES_RETRIEVE_CMD "mktprices_rtrv" #define TPOS_BULK_TRADE_RTRV_CMD "bulk_trade_retrieve" #define TPOS_BULK_POS_RTRV_CMD "bulk_pos_retrieve" #define TPOS_EXTID_RTRV_BY_INSTID_CMD "externalid_by_InstID_retrieve" #define TPOS_BULK_EXTID_RTRV_CMD "bulk_externalid_retrieve" #define TPOS_INSTID_RTRV_BY_EXTID_CMD "instID_by_extID_retrieve" // Fields for TPOS_BULK_TRADE_RTRV_CMD #define TPOS_BULK_TRADE_DATE "date" #define TPOS_BULK_TRADE_FILTER_TYPE "filter_type" #define TPOS_BULK_TRADE_FILTER "filter" #define TPOS_BULK_TRADE_SUBJECT "subject" #define TPOS_BULK_TRADE_TRADEGROUP "trade_group" #define TPOS_BULK_TRADE_PORTFOLIO "portfolio" // Fields for TPOS_BULK_POS_RTRV_CMD #define TPOS_BULK_POS_DATE "date" #define TPOS_BULK_POS_FILTER_TYPE "filter_type" #define TPOS_BULK_POS_FILTER "filter" #define TPOS_BULK_POS_SUBJECT "subject" #define TPOS_BULK_POS_TRADEGROUP "trade_group" #define TPOS_BULK_POS_PORTFOLIO "portfolio" #define TPOSFLD_RIC "tposfld_ric" #define TPOSFLD_RICGROUP "tposfld_ricgrp" #define TPOSFLD_INSTTYPE "tposfld_inst_type" #define TPOSFLD_INSTRUMENTID "tposfld_instrumentid" #define TPOSFLD_UNDINSTRUMENTID "tposfld_und_instrumentid" #define TPOSFLD_ITEM_SIZE "tposfld_size" #define TPOSFLD_THEO_DATE "tposfld_theo_date" #define TPOSFLD_THEO_GROUP "tposfld_theo_group" #define TPOSFLD_DIV_AMOUNT "tposfld_div_amount" #define TPOSFLD_DIV_STARTDATE "tposfld_div_sdate" #define TPOSFLD_DIV_ENDDATE "tposfld_div_edate" #define TPOSFLD_MKTSOURCE "tposfld_mktsrc" #define TPOSFLD_ITEMCOUNT "tposfld_itemcount" #define TPOSFLD_DATE "tposfld_date" #define TPOSFLD_TRDDATE "tposfld_trddate" #define TPOSFLD_CLEARINGFIRMID "tposfld_clearingfirmid" #define TPOSFLD_CLEARINGFIRM "tposfld_clearingfirm" #define TPOSFLD_PRICE "tposfld_price" #define TPOS_MANAGER_IP_NAME "ipAddress" #define TPOS_MANAGER_PROG_NUM_NAME "programNumber" #define TPOS_MANAGER_PROTO_TYPE "type" #define TPOS_MANAGER_IP_NAME2 "ipAddress2" #define TPOS_MANAGER_PROG_NUM_NAME2 "programNumber2" #define TPOS_MANAGER_PROTO_TYPE2 "type2" extern const char * TposSybaseServer_s; extern const char * TposSybaseUser_s; extern const char * TposSybasePassword_s; extern const char * TposSybaseDBname_s; extern int s_TposDBWrite; extern int s_TposDBLoad; #include <string> struct TposAccount { std::string m_validTraderID; std::string m_tradingGroupSymbol; std::string m_portfolioSymbol; std::string m_clearingFirmSymbol; std::string m_clearingAccount; std::string m_clearingSubAccount; std::string m_traderAcronym; std::string m_traderPassword; }; struct securityInfo { public: virtual ~securityInfo() {}; std::string securityType; std::string baseSymbol; std::string fullSymbol; std::string exchange; double strike; std::string expirationDate; double contractSize; std::string putCall; std::string spcStlFlag; double tickSize; std::string curCode; std::string exerType; std::string instrumentId; std::string undInstrumentId; std::string longName; std::string obsoleteDateTime; std::string undExpirationDate; std::string roninSymbol; }; struct exchangeInfo { int ID; std::string name; std::string mdSymbol; }; struct securityInfoX : public securityInfo { public: virtual ~securityInfoX() {}; std::string genericMDSymbol; std::string dataSourceInfo; std::vector<exchangeInfo> exchangeList; }; struct feedData { std::string feed; bool mpfFlag; }; struct optionInfo { std::string stockSymbol; std::string optionSymbol; std::string opraSymbol; std::string exchange; double strike; std::string expirationDate; double contractSize; std::string putCall; std::string spcStlFlag; double tickSize; std::string curCode; std::string exerType; std::string instrumentId; std::string undInstrumentId; std::string longName; std::string genericMDSymbol; std::string obsoleteDateTime; std::string undExpirationDate; std::string roninSymbol; }; struct futureInfo { std::string baseSymbol; std::string fullSymbol; std::string exchange; std::string expirationDate; std::string description; double contractSize; double tickSize; std::string curCode; std::string instrumentId; std::string undInstrumentId; std::string longName; std::string genericMDSymbol; std::string obsoleteDateTime; std::string undExpirationDate; std::string roninSymbol; }; // DB Record Field Names extern const char * TposBasketIdName_s; extern const char * TposTradeIdName_s; extern const char * TposTradeVersionName_s; extern const char * TposTraderPortfolioID_s; extern const char * TposTradingGroupSymbol_s; extern const char * TposTradingGroupPortfolio_s; extern const char * TposClearingFirmSymbol_s; extern const char * TposValidTraderKey_s; extern const char * TposClearingAccount_s; extern const char * TposClearingSubAccount_s; extern const char * TposTraderAcronym_s; extern const char * TposTradeQuantityName_s; extern const char * TposPosOpeningQty_s; extern const char * TposPosCurrentQty_s; extern const char * TposTradePrice_s; extern const char * TposBaseCurrency_s; extern const char * TposCrossCurrency_s; extern const char * TposContraBroker_s; extern const char * TposContraFirm_s; extern const char * TposTradeDate_s; extern const char * TposTradeTime_s; extern const char * TposBookingDate_s; extern const char * TposBookingTime_s; extern const char * TposTradeSource_s; extern const char * TposSpreadFlag_s; extern const char * TposShortSaleFlag_s; extern const char * TposLastModifiedReason_s; extern const char * TposLastModifiedReasonID_s; extern const char * TposLastModifiedBy_s; extern const char * TposLastModifiedDate_s; extern const char * TposLastModifiedTime_s; extern const char * TposTradeLockedFlag_s; extern const char * TposTradeSpcStlFlag_s; extern const char * TposInstrumentID_s; extern const char * TposInstrumentDesc_s; extern const char * TposSecurityType_s; extern const char * TposExchange_s; extern const char * TposSymbol_s; extern const char * TposExtendedSymbol_s; extern const char * TposExpDate_s; extern const char * TposExpTime_s; extern const char * TposStrike_s; extern const char * TposContractSize_s; extern const char * TposPutCall_s; extern const char * TposCUSIP_s; extern const char * TposISIN_s; extern const char * TposSEDOL_s; extern const char * TposFlexFlag_s; extern const char * TposNote_s; extern const char * TposPositionInstrumentID_s; extern const char * TposPositionInstrumentDesc_s; extern const char * TposPrimaryExchange_s; extern const char * TposUnderlyingInstrumentID_s; extern const char * TposUnderlyingInstrumentDesc_s; extern const char * TposUndSecurityType_s; extern const char * TposUndExchange_s; extern const char * TposUndSymbol_s; extern const char * TposUndExpDate_s; extern const char * TposUndExpTime_s; extern const char * TposUndStrike_s; extern const char * TposUndContractSize_s; extern const char * TposUndPutCall_s; extern const char * TposUndCUSIP_s; extern const char * TposUndISIN_s; extern const char * TposUndSEDOL_s; extern const char * TposExternalTradeID_s; extern const char * TposExternalTradeDesc_s; extern const char * TposExternalBasketID_s; extern const char * TposLastTradeDate_s; extern const char * TposLastTradeTime_s; class TposPubMessage; typedef int (*tposCallbackPtr)( TposPubMessage * msg, void *rock); // DB Record Field Names // Non DB Record Field Names extern const char * TposTradeStatusName_s; extern const char * TposBasketCountName_s; extern const char * TposExceptionError_s; extern const char * TposIVCcurrent_s; extern const char * TposIVCtotal_s; #define TPOS_ERROR(info) TposTime::stamp(cout); cout<<" - ERROR- "<<info<<", File: "<<__FILE__<<" Line: "<<__LINE__<<endl; #define TPOS_INFO(info) DEBUG_FILTER {TposTime::stamp(cout); cout<<" - INFO- "<<info<<", File: "<<__FILE__<<" Line: "<<__LINE__<<endl;} #define TPOS_STATUS(info) STATUS_FILTER {TposTime::stamp(cout); cout<<" - INFO- "<<info<<", File: "<<__FILE__<<" Line: "<<__LINE__<<endl;} #define DEBUG_DUMP 0 #define LOG_DUMP 0 struct TposErrorStruct { int errNumber; const char * errString; }; #define TPOS_MAX_STRING_LENGTH 512 //////////////////////////// // General Errors #define TPOS_SUCCESS 1 #define TPOS_GENERIC_ERROR -1 #define TPOS_INVALID_STRING -2 #define TPOS_FIELD_VALIDATION_FAILED -3 #define TPOS_FIELD_VALIDATION_BOGUS_CHAR -4 #define TPOS_CURENTLY_BLOCKING_TRADES -5 //////////////////////////// // Account Validation #define TPOS_MISSING_PORTFOLIO_VALUE -100 #define TPOS_MISSING_TRD_GROUP_VALUE -101 #define TPOS_MISSING_EXECUTION_TRADER -102 #define TPOS_MISSING_ENTRY_TRADER -103 #define TPOS_MISSING_CLEARING_FIRM -104 #define TPOS_MISSING_CLEARING_ACCOUNT -105 #define TPOS_MISSING_CLEARING_SUBACCOUNT -106 #define TPOS_INVALID_ACCOUNT_EX_TRADER -107 #define TPOS_INVALID_ACCOUNT_ENT_TRADER -108 #define TPOS_INVALID_PORTFOLIO_TRADEGROUP -109 #define TPOS_INVALID_TRADER_AND_USER_COMBO -110 //////////////////////////// // Client Errors #define TPOS_ID_NOT_FOUND -200 #define TPOS_EXTERNAL_ID_NOT_FOUND -201 #define TPOS_INVALID_USERID -202 //////////////////////////// // Trade Entry #define TPOS_VERSION_MISMATCH -300 #define TPOS_NON_EXISTENT_TRADE -301 #define TPOS_MISSING_EXT_ID -302 #define TPOS_FAILED_TRADE_UPDATE -303 #define TPOS_INVALID_REASON -304 #define TPOS_NEW_TRADE_SUCCESS 300 #define TPOS_EXISTING_TRADE_UPDATE 301 #define TPOS_TRADE_DATE_ERROR -305 #define TPOS_UNKNOWN_TG_OR_PORT -306 #define TPOS_ATTEMPT_TO_EDIT_VTK -307 #define TPOS_DELETED_TRADE_NOT_EDITABLE -308 //////////////////////////// // Security Validation #define TPOS_SECURITY_VALIDATION_FAILED -401 #define TPOS_SECURITY_VALIDATION_CHANGE -402 extern const TposErrorStruct TposErrorArray_s[]; const char * TposErrorString( int a_errno ); typedef std::list<std::string> StringList; // Cache mask for infoserver #define CACHE_ACCT_DATA 1<<0 // INFO #define CACHE_MAPPING 1<<1 // INFO #define CACHE_REASON 1<<2 // INFO #define CACHE_SPECIAL_SETTLE 1<<3 // INFO #define CACHE_THEOS 1<<4 // INFO #define CACHE_WATCHLIST 1<<5 // INFO #define CACHE_DIVIDEND 1<<6 // INFO #define CACHE_ACCTING_PRICE 1<<7 // INFO #define CACHE_POSITION 1<<8 #define CACHE_IMCLIENT 1<<9 // SM #define CACHE_MKT_PRICE 1<<10 // INFO typedef unsigned int ElvinStatus; #endif
4773ba8275a9201b93042acb5e720a4ea2cc94dd
3924cab3c018feb08223a559e912a55d487abc04
/arduino_final/arduino_final.ino
a052e021ccd987c8f44d9cb6c4975553e1e37252
[]
no_license
wvanderp/project78
e38aa5cca42e5e3619fee704f4e11ff9c24ddbff
82d85b29a25a32c72f7aa606444fd5ab35189f5f
refs/heads/master
2021-01-21T04:55:39.419850
2016-06-21T06:41:47
2016-06-21T06:41:47
54,377,716
0
0
null
null
null
null
UTF-8
C++
false
false
7,099
ino
arduino_final.ino
#include <TimerObject.h> #include <SoftwareSerial.h> #include <Servo.h> #include <NewPing.h> void checkEverything(); void check(int stepSize, int delayTime); void move(int degrees); boolean checkIfClearFront(); double checkClearPath(); boolean checkIfObjectGone(int deg); double lookLeftOrRight(int deg); double turnAfterDrive; TimerObject *driveTimer = new TimerObject(2000); TimerObject *QRTimer = new TimerObject(2000); // Calculate based on max input size expected for one command #define INPUT_SIZE 40 double hoeken[99]; int timings[99]; int hoekInd; int timingInd; int motorLeft = 10,motorRight = 11; Servo motorL, motorR, testServo; int servoPin = 9; int trigerPin = 5,echoPin = 4; int maxDistance = 250; NewPing sensor(trigerPin, echoPin, maxDistance); enum avoidObjectState{Driving, NoClearPathInFront, DrivingToClearPath,DrivingParralel}; enum avoidObjectState avoidState; const int deg = 2; const int steps = 180 / deg; double distanceArray[180/deg]; double degree; SoftwareSerial mySerial(6, 7); // RX, TX byte size; char input[INPUT_SIZE + 1]; void setup() { // Open serial communications and wait for port to open: Serial.begin(4800); motorL.attach(motorLeft); motorR.attach(motorRight); testServo.attach(servoPin); driveTimer -> setOnTimer(&motorIdle); QRTimer -> setOnTimer(&motorIdle); while (!Serial) { ; // wait for serial port to connect. Needed for native USB port only } Serial.println("Goodnight moon!"); // set the data rate for the SoftwareSerial port mySerial.begin(4800); mySerial.println("Hello, world?"); } void loop() { // run over and over /*if (mySerial.available()) { Serial.write(mySerial.read()); } if (Serial.available()) { mySerial.write(Serial.read()); }*/ driveTimer->Update(); QRTimer -> Update(); parseThis(); objectAvoidance(); } void parseThis() { // Get next command from Serial (add 1 for final 0) size = mySerial.readBytes(input, INPUT_SIZE); // Add the final 0 to end the C string input[size] = 0; // Read each command pair char* command = strtok(input, ":"); while (command != 0) { //driveTimer->Update(); // Split the command in two values char* separator = strchr(command, '&'); if (separator != 0) { // Actually split the string in 2: replace ':' with 0 *separator = 0; double servoId = atof(command); ++separator; int position = atoi(separator); Serial.print(servoId); Serial.print(" & "); Serial.println(position); // Do something with servoId and position hoeken[hoekInd] = servoId; timings[timingInd] = position; Serial.print("hoeken["); Serial.print(hoekInd); Serial.print("]: "); Serial.println(hoeken[hoekInd]); Serial.print("timings["); Serial.print(timingInd); Serial.print("]: "); Serial.println(timings[timingInd]); hoekInd++; timingInd++; driveTimer->setOnTimer(*motorIdle); turn(servoId); forwardQR(position); } // Find the next command in input string command = strtok(0, ":"); } } void objectAvoidance() { check(deg,steps); switch(avoidState) { case Driving: if (checkIfClearFront() == false) { avoidState = NoClearPathInFront; } break; case NoClearPathInFront: degree = checkClearPath(); motorIdle(); QRTimer->Pause(); turn(-1 * degree); avoidState = DrivingToClearPath; forward(2000); break; case DrivingToClearPath: if (checkIfObjectGone(degree) == true) { motorIdle(); delay(500); turn(degree*2 - 90); avoidState = DrivingParralel; driveTimer->setOnTimer(*motorIdle); forwardQR(3000); } break; case DrivingParralel: if (checkIfObjectGone(lookLeftOrRight(degree)) == true) { turn(degree*2 - 90); QRTimer->Pause(); //driveTimer->setOnTimer(*makeTurnAfterDrive); motorLF(); motorRF(); delay(2000); motorIdle(); motorLF(); motorRR(); delay(7* degree); motorIdle(); avoidState = Driving; forwardQR(3000); } break; } } void check(int stepSize, int delayTime) { move(-90); for (int i = -90; i < 91; i += stepSize){ move(i + stepSize); distanceArray[(i + 90)/2] = sensor.ping_cm(); //Serial.println((180 / (i + 90)) - 1 + ":" + distanceArray[i+90]); } for (int i = 90; i > -91; i -= stepSize) { move(i - stepSize); distanceArray[(i + 90)/2] = sensor.ping_cm(); //Serial.println((180 / (i + 90)) - 1 + ":" + distanceArray[i+90]); } } void move(int degrees) { if ((degrees >= - 91) && (degrees <= 91)) { testServo.write(degrees + 90); } } boolean checkIfClearFront() { if (((distanceArray[44] > 0) && (distanceArray[44] < 30)) || ((distanceArray[45] > 0) && (distanceArray[45] < 30)) || ((distanceArray[46] > 0) &&(distanceArray[46] < 30))) { return false; } else { return true; } } double checkClearPath() { if ((distanceArray[0] >= distanceArray[90]) && (distanceArray[0] != 0) && (distanceArray[90] != 0)) { return 0; } else if ((distanceArray[0] < distanceArray[90]) && (distanceArray[0] != 0) && (distanceArray[90] != 0)) { return 90; } else { return 0; } } boolean checkIfObjectGone(int deg) { if ((distanceArray[deg -1] > 30) || (distanceArray[deg] > 30) || (distanceArray[deg+1] > 30)) { return true; } } double lookLeftOrRight(int deg) { if (deg < 45) { return 0; } else { return 90; } } void motorLF() { motorL.write(180); } void motorLR() { motorL.write(0); } void motorRF() { motorR.write(0); } void motorRR() { motorR.write(180); } void motorIdle() { motorL.write(90); motorR.write(90); } void forward(int travelTime) { motorLF(); motorRF(); driveTimer->setInterval(travelTime); driveTimer->Start(); } void forwardQR(int travelTime) { motorLF(); motorRF(); QRTimer->setInterval(travelTime); QRTimer->Resume(); } void reverse(int travelTime) { motorLR(); motorRR(); driveTimer->setInterval(travelTime); driveTimer->Start(); } void left(double degree) { motorLR(); motorRF(); driveTimer->setInterval(degree * 7); driveTimer->Start(); } void right(double degree) { motorLF(); motorRR(); driveTimer->setInterval(degree * 7); driveTimer->Start(); } void turn(double degree) { if (degree < 0) { left(-1 * degree); } else if (degree > 0) { right(degree); } } void makeTurnAfterDrive() { if (turnAfterDrive < 0) { left(-1 * turnAfterDrive); } else if (turnAfterDrive > 0) { right(turnAfterDrive); } }
317b1e5724a0eba0c455218cd51673e0519cfb27
ebc3ea653f8f9a9c7df480e67dcc44e9826181f3
/inc/GetIMEI.h
d839ce544e061b2fd5cabec97108be948d1879ab
[]
no_license
jorezy/caca
1ecea64fcac57be79d9e68d943064589b127a56e
dc14d9be34486915c974be081cf33412898e99c0
refs/heads/master
2021-06-15T04:41:27.881180
2017-04-23T03:42:57
2017-04-23T03:42:57
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,059
h
GetIMEI.h
/* Copyright (c) 2006, Nokia Mobile Phones. All rights reserved */ #ifndef __GETIMEI_H__ #define __GETIMEI_H__ #include <e32base.h> #include <etel3rdparty.h> class CGetIMEI : public CActive { public: static CGetIMEI* NewL(/*TDes& aIMEI*/); // Cancel and destroy ~CGetIMEI(); public: // New functions // Function for making the initial request void StartL(); const TPtrC GetIMEI(); private: // C++ constructor CGetIMEI(/*TDes& aIMEI*/); // Second-phase constructor void ConstructL(); // From CActive // Handle completion void RunL(); // How to cancel me void DoCancel(); // Override to handle leaves from RunL(). Default implementation causes // the active scheduler to panic. //void RunError(TInt aError); private: enum TGetIMEIState { EStart = 1, EGetPhoneInfo, EDone }; private: TInt iState; // State of the active object CTelephony* iTelephony; CTelephony::TPhoneIdV1 iPhoneId; CActiveSchedulerWait iActiveSchedulerWait; TBuf<CTelephony::KPhoneSerialNumberSize> iIMEI; //CGetUNAppUi* iAppUi; }; #endif // __GETIMEI_H__
328804ff6d353ce62ba1470d818551c659d7dd2b
91eec30d4a0361da5e9493417ea8c5d391e78855
/pngui/grid/QTextFilter.cpp
0f02d1a6cd0c4484f7235d1949b4b626e0ac82ad
[]
no_license
chenchy/Praaline
d49f088fb8dd6e1861458de3354c8bcfb4c0a79f
58455554029c7ed31249b0d38f9e8cf038cfc187
refs/heads/master
2023-04-10T05:00:20.595290
2021-04-25T23:19:34
2021-04-25T23:19:34
null
0
0
null
null
null
null
UTF-8
C++
false
false
9,949
cpp
QTextFilter.cpp
/****************************************************************************** ** This file is part of qadvanceditemviews. ** ** Copyright (c) 2011-2012 Martin Hoppe martin@2x2hoppe.de ** ** qadvanceditemviews is free software: you can redistribute it ** and/or modify it under the terms of the GNU Lesser General ** Public License as published by the Free Software Foundation, ** either version 3 of the License, or (at your option) any ** later version. ** ** qadvanceditemviews is distributed in the hope that it will be ** useful, but WITHOUT ANY WARRANTY; without even the implied ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ** See the GNU General Public License for more details. ** ** You should have received a copy of the GNU Lesser General Public ** License along with qadvanceditemviews. ** If not, see <http://www.gnu.org/licenses/>. ******************************************************************************/ #include <QHBoxLayout> #include <QDebug> #include "QTextFilter.h" #include "QTextFilter_p.h" QTextFilterEditor::QTextFilterEditor(QWidget* parent) : QWidget(parent) { QHBoxLayout* mLayout = new QHBoxLayout(this); mLayout->setSpacing(0); mLayout->setContentsMargins(0, 0, 0, 0); cValueLineEdit = new QLineEdit(this); mLayout->addWidget(cValueLineEdit); cSensitivityLabel = new QClickableLabel(this); connect(cSensitivityLabel, SIGNAL(clicked(Qt::MouseButtons)), this, SLOT(sensitivityLabelClicked(Qt::MouseButtons))); mLayout->addWidget(cSensitivityLabel); cMatchFlagsLabel = new QClickableLabel(this); connect(cMatchFlagsLabel, SIGNAL(clicked(Qt::MouseButtons)), this, SLOT(matchFlagsLabelClicked(Qt::MouseButtons))); mLayout->addWidget(cMatchFlagsLabel); setFocusProxy(cValueLineEdit); setMatchFlag(Qt::MatchStartsWith); setCaseSensitivity(Qt::CaseInsensitive); setFocusPolicy(Qt::StrongFocus); setAutoFillBackground(true); } QTextFilterEditor::~QTextFilterEditor() { } Qt::CaseSensitivity QTextFilterEditor::caseSensitivity() const { return cSensitivity; } Qt::MatchFlag QTextFilterEditor::matchFlag() const { return cMatchFlag; } void QTextFilterEditor::matchFlagsLabelClicked(Qt::MouseButtons buttons) { if (buttons.testFlag(Qt::LeftButton)){ if (cMatchFlag == Qt::MatchStartsWith){ setMatchFlag(Qt::MatchEndsWith); } else if (cMatchFlag == Qt::MatchEndsWith){ setMatchFlag(Qt::MatchContains); } else if (cMatchFlag == Qt::MatchContains){ setMatchFlag(Qt::MatchStartsWith); } } } void QTextFilterEditor::sensitivityLabelClicked(Qt::MouseButtons buttons) { if (buttons.testFlag(Qt::LeftButton)){ if (cSensitivity == Qt::CaseInsensitive){ setCaseSensitivity(Qt::CaseSensitive); } else { setCaseSensitivity(Qt::CaseInsensitive); } } } void QTextFilterEditor::setCaseSensitivity(Qt::CaseSensitivity sensitivity) { if (sensitivity == Qt::CaseSensitive){ cSensitivityLabel->setPixmap(QPixmap(QString::fromUtf8(":/qaiv/filter/case_sensitive"))); cSensitivityLabel->setToolTip(tr("The filter is case sensitive")); } else { cSensitivityLabel->setPixmap(QPixmap(QString::fromUtf8(":/qaiv/filter/case_insensitive"))); cSensitivityLabel->setToolTip(tr("The filter is case insensitive")); } cSensitivity = sensitivity; } void QTextFilterEditor::setMatchFlag(Qt::MatchFlag flag) { if (flag == Qt::MatchEndsWith){ cMatchFlagsLabel->setPixmap(QPixmap(QString::fromUtf8(":/qaiv/filter/ends_with"))); cMatchFlagsLabel->setToolTip(tr("The filter value matches the end of the item")); } else if (flag == Qt::MatchContains){ cMatchFlagsLabel->setPixmap(QPixmap(QString::fromUtf8(":/qaiv/filter/contains"))); cMatchFlagsLabel->setToolTip(tr("The filter value is contained in the item")); } else if (flag == Qt::MatchStartsWith){ cMatchFlagsLabel->setPixmap(QPixmap(QString::fromUtf8(":/qaiv/filter/starts_with"))); cMatchFlagsLabel->setToolTip(tr("The filter value matches the start of the item")); } cMatchFlag = flag; } void QTextFilterEditor::setText(const QString & text) { cValueLineEdit->setText(text); } QString QTextFilterEditor::text() const { return cValueLineEdit->text(); } QTextFilter::QTextFilter(int row, int column) : QAbstractFilter(QTextFilter::Type, row, column) { setProperty("caseSensitivity", Qt::CaseInsensitive); setProperty("matchFlag", Qt::MatchContains); } QWidget* QTextFilter::createEditor(QFilterViewItemDelegate* delegate, QWidget* parent, const QStyleOptionViewItem & option, const QModelIndex & index ) const { Q_UNUSED(delegate) Q_UNUSED(option); Q_UNUSED(index); return new QTextFilterEditor(parent); } void QTextFilter::addContextMenuActions(QMenu* menu, QWidget* receiver) { QVariantMap mDefaultProperties; QVariantMap mPropertiesToChange; mDefaultProperties["row"] = property("row").toInt(); mDefaultProperties["column"] = property("column").toInt(); QAction* mAction = 0; mAction = menu->addAction(QIcon(":/qaiv/filter/case_insensitive"), QObject::tr("Case insensitive"), receiver, SLOT(changeProperties())); mAction->setCheckable(true); mAction->setChecked(property("caseSensitivity").toInt() == Qt::CaseInsensitive); mPropertiesToChange = QVariantMap(mDefaultProperties); mPropertiesToChange["caseSensitivity"] = Qt::CaseInsensitive; mAction->setData(mPropertiesToChange); mAction = menu->addAction(QIcon(":/qaiv/filter/case_sensitive"), QObject::tr("Case sensitive"), receiver, SLOT(changeProperties())); mAction->setCheckable(true); mAction->setChecked(property("caseSensitivity").toInt() == Qt::CaseSensitive); mPropertiesToChange = QVariantMap(mDefaultProperties); mPropertiesToChange["caseSensitivity"] = Qt::CaseSensitive; mAction->setData(mPropertiesToChange); menu->addSeparator(); mAction = menu->addAction(QIcon(":/qaiv/filter/starts_with"), QObject::tr("Match starts with"), receiver, SLOT(changeProperties())); mAction->setCheckable(true); mAction->setChecked(property("matchFlag").toInt() == Qt::MatchStartsWith); mPropertiesToChange = QVariantMap(mDefaultProperties); mPropertiesToChange["matchFlag"] = Qt::MatchStartsWith; mAction->setData(mPropertiesToChange); mAction = menu->addAction(QIcon(":/qaiv/filter/ends_with"), QObject::tr("Match ends with"), receiver, SLOT(changeProperties())); mAction->setCheckable(true); mAction->setChecked(property("matchFlag").toInt() == Qt::MatchEndsWith); mPropertiesToChange = QVariantMap(mDefaultProperties); mPropertiesToChange["matchFlag"] = Qt::MatchEndsWith; mAction->setData(mPropertiesToChange); mAction = menu->addAction(QIcon(":/qaiv/filter/contains"), QObject::tr("Match contains"), receiver, SLOT(changeProperties())); mAction->setCheckable(true); mAction->setChecked(property("matchFlag").toInt() == Qt::MatchContains); mPropertiesToChange = QVariantMap(mDefaultProperties); mPropertiesToChange["matchFlag"] = Qt::MatchContains; mAction->setData(mPropertiesToChange); } QVariant QTextFilter::data(int role) const { if (role == Qt::DisplayRole){ return QString("%1").arg(property("value").toString()); } return QVariant(); } bool QTextFilter::matches(const QVariant & value, int type) const { Q_UNUSED(type); Qt::CaseSensitivity mSensitivity; Qt::MatchFlag mFlag; mSensitivity = static_cast<Qt::CaseSensitivity>(property("caseSensitivity", Qt::CaseInsensitive).toInt()); mFlag = static_cast<Qt::MatchFlag>(property("matchFlag", Qt::MatchStartsWith).toInt()); if (mFlag == Qt::MatchContains){ return value.toString().contains(property("value").toString(), mSensitivity); } else if (mFlag == Qt::MatchEndsWith){ return QString::compare(value.toString().right(property("value").toString().length()), property("value").toString(), mSensitivity) == 0; } return QString::compare(value.toString().left(property("value").toString().length()), property("value").toString(), mSensitivity) == 0; } void QTextFilter::setEditorData(QWidget * editor, const QModelIndex & index) { QTextFilterEditor* e = qobject_cast<QTextFilterEditor*>(editor); if (e){ QVariantMap p = index.data(Qt::EditRole).toMap(); e->setText(p.value("value").toString()); e->setMatchFlag(static_cast<Qt::MatchFlag>(p.value("matchFlag").toInt())); e->setCaseSensitivity(static_cast<Qt::CaseSensitivity>(p.value("caseSensitivity").toInt())); } } void QTextFilter::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex & index) { QTextFilterEditor* e = qobject_cast<QTextFilterEditor*>(editor); if (e){ QVariantMap p(index.data(Qt::EditRole).toMap()); p["value"] = e->text(); p["caseSensitivity"] = e->caseSensitivity(); p["matchFlag"] = e->matchFlag(); if (property("enableOnCommit").toBool()){ p["enabled"] = true; } model->setData(index, p); } } void QTextFilter::updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem & option, const QModelIndex & index) { Q_UNUSED(index) editor->setGeometry(option.rect); } QDebug operator<<(QDebug d, const QTextFilter & f) { d << "(QValueFilter:" << "row:" << f.row() << "column:" << f.column() << "enabled:" << f.isEnabled() << "text:" << f.property("value").toString() << "matchFlag" << static_cast<Qt::MatchFlag>(f.property("matchFlag").toInt()) << ")"; return d.space(); }
0d159d29a52416bf94973e9743f3b4b36cdd859a
215111e92a3dfc535ce1c1ce25a35fb6003ab575
/cf/cf_715/cf_704/c.cpp
9c2d1a8671af5e4f224a96e3296c7c2f1099a4ff
[]
no_license
emanueljuliano/Competitive_Programming
6e65aa696fb2bb0e2251e5a68657f4c79cd8f803
86fefe4d0e3ee09b5766acddc8c78ed8b60402d6
refs/heads/master
2023-06-23T04:52:43.910062
2021-06-26T11:34:42
2021-06-26T11:34:42
299,115,304
0
0
null
null
null
null
UTF-8
C++
false
false
672
cpp
c.cpp
#include <bits/stdc++.h> using namespace std; #define _ ios_base::sync_with_stdio(0);cin.tie(0); #define endl '\n' typedef long long ll; const int INF = 0x3f3f3f3f; const ll LINF = 0x3f3f3f3f3f3f3f3f; int main(){ _ int n, m; cin >> n >> m; string s, t; cin >> s >> t; vector<int> pref; int it = 0; for (int i=0; i<n; i++) { if(it < m and s[i] == t[it]) pref.push_back(i), it++; } vector<int> suf; it = m-1; for (int i=n-1; i>=0; i--) { if(it >= 0 and s[i] == t[it]) suf.push_back(i), it--; } reverse(suf.begin(), suf.end()); int ans = 0; for (int i=0; i<m-1; i++) { ans = max(ans, suf[i+1]-pref[i]); } cout << ans << endl; exit(0); }
bf3ee2d476e14e0368369ff6989c372c0bb83713
0201a8340b2a3bddc8db3eba533bc35286a0cec6
/Practica2.2/ejercicio12.cc
3e8c3e0b166acf4a6e82c248461b36e36c889146
[]
no_license
Yisas12/asor_repo
b449e0562d5e23dbdf4089a2b2840aea61ab8908
a194d438e7432458fc11b10361f356137e04466c
refs/heads/main
2023-02-20T16:40:25.135110
2021-01-22T18:30:40
2021-01-22T18:30:40
317,844,281
0
0
null
null
null
null
UTF-8
C++
false
false
700
cc
ejercicio12.cc
GNU nano 2.3.1 File: ejercicio12.cc #include <fcntl.h> /* Obtain O_* constant definitions */ #include <unistd.h> #include <iostream> using namespace std; int main(int argc, char **argv){ int file = open(argv[1], O_CREAT | O_RDWR, 0777); if(file == -1){ cout << "No se ha podido abrir el archivo\n"; return -1; } int file2 = dup2(file, 1); cout << "Redirigido a "<< argv[1] << "\n"; dup2(file2, file); return 1; } [ Read 19 lines ] ^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos ^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text^T To Spell
795233e0016345667291b8f8db2ce00d7f0c18f0
bb1ca40029b349b4e6fdb8d8fd3a0a281b31aae3
/avr_rtc.cpp
dbb40d8528e4630403b92ac66dca0daf12783ce8
[]
no_license
burundiocibu/bling
1399399a86b545bfec71c0afc53c38911c67fce9
6093325ee9100a0c793862abcee873e22866272b
refs/heads/master
2021-01-13T02:08:32.783858
2014-11-08T18:36:30
2014-11-08T18:36:30
null
0
0
null
null
null
null
UTF-8
C++
false
false
678
cpp
avr_rtc.cpp
#include <inttypes.h> #include <avr/io.h> #include <avr/interrupt.h> #include "avr_rtc.hpp" namespace avr_rtc { uint32_t t_ms=0; ISR(TIMER2_COMPA_vect) { t_ms++; } // Sets up timer 2 to generate an interrupt every ms void setup(void) { t_ms = 0; TCCR2A = _BV(WGM21); // CTC mode, resets on OCR2A match TCCR2B = _BV(CS22) ; // prescaler = 64, f=8e6/64=125kHz TIMSK2 |= _BV(OCIE2A); // Interrupt on output compare on A OCR2A = 125; sei(); } void step(long dt_ms) { cli(); t_ms += dt_ms; sei(); } void set(uint32_t t) { cli(); t_ms = t; sei(); } }
842f1b638be843f827c122ff9069152f5c029c7e
e6be6f446d7a50eb62430059e66517b5f1612879
/P2/4 class/4 class/4.6.5 4.6.6 继承同名成员处理方式.cpp
901ff03677a424c29a7b5ecffc1d3e6f33afa612
[]
no_license
asurada404/heima-cpp
add457a715b8b01b41340e18b26357c890b4a347
ed02f632b36481b0a86cf8126bb4b17afefb0a2a
refs/heads/main
2023-03-23T16:34:22.964617
2021-03-16T03:12:00
2021-03-16T03:12:00
338,764,724
0
0
null
null
null
null
GB18030
C++
false
false
717
cpp
4.6.5 4.6.6 继承同名成员处理方式.cpp
#include <iostream> using namespace std; class Sport { public: int a; public: void func() { cout << "func in Sport" << endl; } void func(int a) { cout << "func in Sport, and arg a: " << a << endl; } static void func1() { cout << "static func in Sport " << endl; } }; class Ball : public Sport { public: void func() { cout << "func in Ball" << endl; } static void func1() { cout << "static func in Ball " << endl; } }; int main465() { Ball ball; ball.func(); ball.Sport::func(); // 子类和父类的成员函数名一致时,想要访问父类的,需要在函数前面加作用域,默认是隐藏的 ball.func1(); ball.Sport::func1(); Sport::func1(); Ball::func1(); return 0; }
f2898933367369f334e01392d127b6508e039dfa
1a2acba79fade4760faed12ef8f54d10146982a8
/test/Vector4Tests.cc
76fd4e024fc81ded0a9d116ce363b75630c5480f
[ "MIT" ]
permissive
theycallmecoach/cagey-math
6b117a6c5b936e433867f0c64a074d27b2c56ab4
e3a70d6e26abad90bbbaf6bc5f4e7da89651ab59
refs/heads/master
2021-08-17T08:56:00.900878
2020-12-31T03:49:25
2020-12-31T03:49:25
49,614,331
1
0
null
null
null
null
UTF-8
C++
false
false
10,776
cc
Vector4Tests.cc
#include "gtest/gtest.h" #include <cagey-math/Vector2.hh> #include <cagey-math/Vector4.hh> #include <cagey-math/VectorFunc.hh> #include <cstdint> using namespace cagey::math; TEST(Vector4Test, Vector4SizeTest) { ASSERT_EQ(sizeof(Vector4<short>), sizeof(short[4])); ASSERT_EQ(sizeof(Vector4f), sizeof(float[4])); ASSERT_EQ(sizeof(Vector4d), sizeof(double[4])); ASSERT_EQ(sizeof(Vector4i), sizeof(int[4])); ASSERT_EQ(sizeof(Vector4u), sizeof(unsigned int[4])); } TEST(Vector4Test, Vector4AlignTest) { ASSERT_EQ(alignof(Vector4<short>), alignof(short[4])); ASSERT_EQ(alignof(Vector4f), alignof(float[4])); ASSERT_EQ(alignof(Vector4d), alignof(double[4])); ASSERT_EQ(alignof(Vector4i), alignof(int[4])); ASSERT_EQ(alignof(Vector4u), alignof(unsigned int[4])); } TEST(Vector4Test, Vector4ComponentTypeTest) { ASSERT_EQ((std::is_same<typename Vector4<short>::ElementType, short>::value), true); ASSERT_EQ((std::is_same<typename Vector4<float>::ElementType, float>::value), true); ASSERT_EQ((std::is_same<typename Vector4<double>::ElementType, double>::value), true); ASSERT_EQ((std::is_same<typename Vector4<int>::ElementType, int>::value), true); ASSERT_EQ((std::is_same<typename Vector4<unsigned int>::ElementType, unsigned int>::value), true); } TEST(Vector4Test, Vector4ComponentCountTest) { constexpr auto v4s = Vector4<short>::Size; constexpr auto v4f = Vector4f::Size; constexpr auto v4d = Vector4d::Size; constexpr auto v4i = Vector4i::Size; constexpr auto v4u = Vector4u::Size; ASSERT_EQ(v4s, 4); ASSERT_EQ(v4f, 4); ASSERT_EQ(v4d, 4); ASSERT_EQ(v4i, 4); ASSERT_EQ(v4u, 4); } TEST(Vector4Test, DefaultConstructorTest) { Vector4f v; ASSERT_EQ(sizeof(v), sizeof(float[4])); } TEST(Vector4Test, ScalarConstructorTest) { constexpr Vector4d v{4.8}; ASSERT_DOUBLE_EQ(v[0], 4.8); ASSERT_DOUBLE_EQ(v[1], 4.8); ASSERT_DOUBLE_EQ(v[2], 4.8); } TEST(Vector4Test, ComponentConstructorTest) { constexpr Vector4d v{1.3, 4.8, 5.6, 6.7}; ASSERT_DOUBLE_EQ(v[0], 1.3); ASSERT_DOUBLE_EQ(v[1], 4.8); ASSERT_DOUBLE_EQ(v[2], 5.6); ASSERT_DOUBLE_EQ(v[3], 6.7); } TEST(Vector4Test, Vector2ConstructorTest) { constexpr Vector4d v{{1.2, 4.8, 5.6}, 6.7}; ASSERT_DOUBLE_EQ(v[0], 1.2); ASSERT_DOUBLE_EQ(v[1], 4.8); ASSERT_DOUBLE_EQ(v[2], 5.6); ASSERT_DOUBLE_EQ(v[3], 6.7); } // TEST(Vector4Test, TruncateConstructorTest) // { // constexpr Vec4d v{1.2, 4.8, 5.6, 6.7}; // ASSERT_DOUBLE_EQ(v[0], 1.2); // ASSERT_DOUBLE_EQ(v[1], 4.8); // ASSERT_DOUBLE_EQ(v[2], 5.6); // } TEST(Vector4Test, ExplicitConversionConstructorTest) { constexpr Vector4d vd{4.8f, 5.6f, 3.8f, 9.7f}; constexpr Vector4f vf{vd}; ASSERT_DOUBLE_EQ(vf[0], 4.8f); ASSERT_DOUBLE_EQ(vf[1], 5.6f); ASSERT_DOUBLE_EQ(vf[2], 3.8f); ASSERT_DOUBLE_EQ(vf[3], 9.7f); } // // TEST(Vector4Test, ImplicitConversionConstructorTest) { // // constexpr Vector4f vf{4.8f, 5.6f}; // // constexpr Vector4d vd = vf; // // ASSERT_DOUBLE_EQ(vd[0], 4.8f); // // ASSERT_DOUBLE_EQ(vd[1], 5.6f); // // } TEST(Vector4Test, BeginTest) { const Vector4d cvd{1.2}; using std::begin; const double *cdata = begin(cvd); ASSERT_EQ(cdata, static_cast<const void *>(&cvd)); } TEST(Vector4Test, EndTest) { using std::end; constexpr Vector4d v{4.8, 5.6, 3.8, 4.8}; ASSERT_EQ(end(v), (&v[3] + 1)); } TEST(Vector4Test, ZeroTest) { constexpr auto v = Vector4f::zero(); ASSERT_EQ(v, Vector4f{0.0f}); } TEST(Vector4Test, XAxisTest) { constexpr auto v = Vector4f::xAxis(); ASSERT_EQ(v, Vector4f(1.0f, 0.0f, 0.0f, 0.0f)); } TEST(Vector4Test, YAxisTest) { constexpr auto v = Vector4f::yAxis(); ASSERT_EQ(v, Vector4f(0.0f, 1.0f, 0.0f, 0.0f)); } TEST(Vector4Test, ArrayIndexOperatorTest) { using std::begin; constexpr Vector4d vd{1.3, 5.3, 2.8, 8.9}; auto vd0 = vd[0]; auto vd1 = vd[1]; auto vd2 = vd[2]; auto vd3 = vd[3]; ASSERT_DOUBLE_EQ(vd0, 1.3); ASSERT_DOUBLE_EQ(vd1, 5.3); ASSERT_DOUBLE_EQ(vd2, 2.8); ASSERT_DOUBLE_EQ(vd3, 8.9); const auto cvd = vd; const auto &cv0 = cvd[0]; const auto &cv1 = cvd[1]; const auto &cv2 = cvd[2]; const auto &cv3 = cvd[3]; ASSERT_EQ(&cv0, begin(cvd) + 0); ASSERT_EQ(&cv1, begin(cvd) + 1); ASSERT_EQ(&cv2, begin(cvd) + 2); ASSERT_EQ(&cv3, begin(cvd) + 3); auto v = vd; auto &v0 = v[0]; auto &v1 = v[1]; auto &v2 = v[2]; auto &v3 = v[3]; ASSERT_EQ(&v0, begin(v) + 0); ASSERT_EQ(&v1, begin(v) + 1); ASSERT_EQ(&v2, begin(v) + 2); ASSERT_EQ(&v3, begin(v) + 3); } TEST(Vector4Test, ReadFieldTest) { const Vector4d cvd{1.2, 8.9, 2.5, 8.9}; ASSERT_DOUBLE_EQ(cvd.x, 1.2); ASSERT_DOUBLE_EQ(cvd.r, 1.2); ASSERT_DOUBLE_EQ(cvd.y, 8.9); ASSERT_DOUBLE_EQ(cvd.g, 8.9); ASSERT_DOUBLE_EQ(cvd.z, 2.5); ASSERT_DOUBLE_EQ(cvd.b, 2.5); ASSERT_DOUBLE_EQ(cvd.w, 8.9); ASSERT_DOUBLE_EQ(cvd.a, 8.9); } TEST(Vector4Test, WriteFieldTest) { Vector4d cvd{1.2, 8.9, 2.5, 8.9}; cvd.x = 3.4; cvd.y = 2.3; cvd.z = 2.3; cvd.w = 2.5; ASSERT_DOUBLE_EQ(cvd.x, 3.4); ASSERT_DOUBLE_EQ(cvd.y, 2.3); ASSERT_DOUBLE_EQ(cvd.z, 2.3); ASSERT_DOUBLE_EQ(cvd.w, 2.5); ASSERT_DOUBLE_EQ(cvd.r, 3.4); ASSERT_DOUBLE_EQ(cvd.g, 2.3); ASSERT_DOUBLE_EQ(cvd.b, 2.3); ASSERT_DOUBLE_EQ(cvd.a, 2.5); } TEST(Vector4Test, CopyAssignmentOperator) { Vector4d cvd{1, 8, 7, 3}; Vector4d cvd2{4, 5, 9, 5}; cvd2 = cvd; ASSERT_TRUE(cvd == cvd2); } TEST(Vector4Test, xyTest) { Vector4d cvd{1.2, 8.9, 2.5, 7.8}; Vector2d v2 = cvd.xy(); ASSERT_DOUBLE_EQ(v2.x, 1.2); ASSERT_DOUBLE_EQ(v2.y, 8.9); } TEST(Vector4Test, xyzTest) { Vector4d cvd{1.2, 8.9, 2.5, 7.9}; Vector3d v3 = cvd.xyz(); ASSERT_DOUBLE_EQ(v3.x, cvd.x); ASSERT_DOUBLE_EQ(v3.y, cvd.y); ASSERT_DOUBLE_EQ(v3.z, cvd.z); } TEST(Vector4Test, rgTest) { Vector4d cvd{1.2, 8.9, 2.5, 8.9}; Vector2d v2 = cvd.rg(); ASSERT_DOUBLE_EQ(v2.r, 1.2); ASSERT_DOUBLE_EQ(v2.g, 8.9); } TEST(Vector4Test, rgbTest) { Vector4d cvd{1.2, 8.9, 2.5, 3.5}; Vector3d v3 = cvd.rgb(); ASSERT_DOUBLE_EQ(v3.r, cvd.r); ASSERT_DOUBLE_EQ(v3.g, cvd.g); ASSERT_DOUBLE_EQ(v3.b, cvd.b); } // // TEST(Vector4Test, PreIncrementOperatorTest) { // // Vector4i vi{1, 2}; // // ASSERT_EQ(&(++vi), &vi); // // ASSERT_EQ(vi[0], 2); // // ASSERT_EQ(vi[1], 3); // // } // // // // TEST(Vector4Test, PostIncrementOperatorTest) { // // Vector4i vi{1, 2}; // // ASSERT_EQ(vi++, Vector4i(1, 2)); // // ASSERT_EQ(vi[0], 2); // // ASSERT_EQ(vi[1], 3); // // } TEST(Vector4Test, AdditionAssignmentOperatorTest) { // Vector4d v1{1.2, 3.4}; // ASSERT_EQ(&(v1 += 5), &v1); // ASSERT_DOUBLE_EQ(v1[0], 1.2 + 5); // ASSERT_DOUBLE_EQ(v1[1], 3.4 + 5); Vector4d v4{1.2, 3.4, 2.5, 4.6}; ASSERT_EQ(&(v4 += Vector4d(5.0, 6.0, 2.5, 6.7)), &v4); ASSERT_DOUBLE_EQ(v4[0], 1.2 + 5.0); ASSERT_DOUBLE_EQ(v4[1], 3.4 + 6.0); } // // TEST(Vector4Test, SubtractionAssignmentOperatorTest) { // // // Vector4d v1{3.2, 3.7}; // // // ASSERT_EQ(&(v1 -= 1), &v1); // // // ASSERT_DOUBLE_EQ(v1[0], 3.2 - 1); // // // ASSERT_DOUBLE_EQ(v1[1], 3.7 - 1); // // // // Vector4d v3{8.9, 9.0}; // // ASSERT_EQ(&(v3 -= Vector4i(5, 6)), &v3); // // ASSERT_DOUBLE_EQ(v3[0], 8.9 - 5); // // ASSERT_DOUBLE_EQ(v3[1], 9.0 - 6); // // } // TEST(Vector4Test, MultiplicationAssignmentOperatorTest) { Vector4d v1{2.3, 2.4, 2.5, 3.5}; ASSERT_EQ(&(v1 *= 2), &v1); ASSERT_DOUBLE_EQ(v1[0], 2.3 * 2); ASSERT_DOUBLE_EQ(v1[1], 2.4 * 2); // Vector4d v3{8.9, 9.0}; // ASSERT_EQ(&(v3 *= Vector4i(5, 6)), &v3); // ASSERT_DOUBLE_EQ(v3[0], 8.9 * 5); // ASSERT_DOUBLE_EQ(v3[1], 9.0 * 6); } // TEST(Vector4Test, DivisionAssignmentOperatorTest) { Vector4d v1{2.3, 2.4, 2.5, 5.7}; ASSERT_EQ(&(v1 /= 2), &v1); ASSERT_DOUBLE_EQ(v1[0], 2.3 / 2); ASSERT_DOUBLE_EQ(v1[1], 2.4 / 2); // Vector4d v3{8.9, 9.0}; // ASSERT_EQ(&(v3 /= Vector4i(5, 6)), &v3); // ASSERT_DOUBLE_EQ(v3[0], 8.9 / 5); // ASSERT_DOUBLE_EQ(v3[1], 9.0 / 6); } TEST(Vector4Test, AdditionOperatorTest) { // constexpr auto v1 = 1 + Vector4d(2.3, 4.5); // ASSERT_DOUBLE_EQ(v1[0], 1 + 2.3); // ASSERT_DOUBLE_EQ(v1[1], 1 + 4.5); // // constexpr auto v3 = Vector4d(1.2, 3.4) + 5; // ASSERT_DOUBLE_EQ(v3[0], 1.2 + 5); // ASSERT_DOUBLE_EQ(v3[1], 3.4 + 5); constexpr auto v3 = Vector4d(1.2, 3.4, 2.5, 4.5) + Vector4d(5.0, 6.0, 2.5, 6.8); ASSERT_DOUBLE_EQ(v3[0], 1.2 + 5); ASSERT_DOUBLE_EQ(v3[1], 3.4 + 6); } TEST(Vector4Test, SubtractionOperatorTest) { // constexpr auto v1 = 1 - Vector4d(2.3, 4.5); // ASSERT_DOUBLE_EQ(v1[0], 1 - 2.3); // ASSERT_DOUBLE_EQ(v1[1], 1 - 4.5); // // constexpr auto v3 = Vector4d(1.2, 3.4) - 5; // ASSERT_DOUBLE_EQ(v3[0], 1.2 - 5); // ASSERT_DOUBLE_EQ(v3[1], 3.4 - 5); auto v3 = Vector4d(1.2, 3.4, 2.5, 6.8) - Vector4d(5.0, 6.0, 2.5, 7.0); ASSERT_DOUBLE_EQ(v3[0], 1.2 - 5.0); ASSERT_DOUBLE_EQ(v3[1], 3.4 - 6.0); } TEST(Vector4Test, MultiplicationOperatorTest) { constexpr auto v1 = 1.0 * Vector4d(2.3, 4.5, 2.5, 6.7); ASSERT_DOUBLE_EQ(v1[0], 1.0 * 2.3); ASSERT_DOUBLE_EQ(v1[1], 1.0 * 4.5); constexpr auto v3 = Vector4d(1.2, 3.4, 2.5, 8.0) * 5.0; ASSERT_DOUBLE_EQ(v3[0], 1.2 * 5.0); ASSERT_DOUBLE_EQ(v3[1], 3.4 * 5.0); // constexpr auto v3 = Vector4d(1.2, 3.4) * Vector4i(5, 6); // ASSERT_DOUBLE_EQ(v3[0], 1.2 * 5); // ASSERT_DOUBLE_EQ(v3[1], 3.4 * 6); } // TEST(Vector4Test, DivisionOperatorTest) { constexpr auto v1 = 1.0 / Vector4d{2.3, 4.5, 2.5, 6.7}; ASSERT_DOUBLE_EQ(v1[0], 1.0 / 2.3); ASSERT_DOUBLE_EQ(v1[1], 1.0 / 4.5); constexpr auto v3 = Vector4d{1.2, 3.4, 2.5, 6.8} / 5.0; ASSERT_DOUBLE_EQ(v3[0], 1.2 / 5.0); ASSERT_DOUBLE_EQ(v3[1], 3.4 / 5.0); // constexpr auto v3 = Vector4d(1.2, 3.4) / Vector4d(5.0, 6.0); // ASSERT_DOUBLE_EQ(v3[0], 1.2 / 5); // ASSERT_DOUBLE_EQ(v3[1], 3.4 / 6); } TEST(Vector4Test, EqualityTest) { auto v1 = Vector4d{1.2, 3.4, 2.5, 3.7}; auto v2 = Vector4d{1.2, 2.4, 2.5, 3.7}; auto v3 = Vector4d{1.2, 3.4, 2.5, 3.7}; ASSERT_TRUE(v1 == v3); ASSERT_TRUE(v2 != v3); } TEST(Vector4Test, VectorDotProductTest) { constexpr auto x = dot(Vector4d{1.2, 3.4, 2.5, 3.4}, Vector4d{7, 8, 9, 10}); ASSERT_DOUBLE_EQ(x, 1.2 * 7 + 3.4 * 8 + 2.5 * 9 + 3.4 * 10); } TEST(Vector4Test, LengthProductTest) { ASSERT_DOUBLE_EQ(length(Vector4d{1.2, 3.4, 2.5, 4.7}), std::sqrt(lengthSquared(Vector4d{1.2, 3.4, 2.5, 4.7}))); constexpr auto x = dot(Vector4d(1.2, 3.4, 2.5, 2.5), Vector4d(7, 8, 2.5, 2.5)); ASSERT_DOUBLE_EQ(x, 1.2 * 7 + 3.4 * 8 + 2.5 * 2.5 + 2.5 * 2.5); } TEST(Vector4Test, LengthSquaredProductTest) { constexpr auto x = lengthSquared(Vector4d(1.2, 3.4, 2.5, 2.6)); ASSERT_DOUBLE_EQ(x, 1.2 * 1.2 + 3.4 * 3.4 + 2.5 * 2.5 + 2.6 * 2.6); } TEST(Vector4Test, NormalizeTest) { const Vector4d v(1.2, 3.4, 2.5, 2.5); ASSERT_EQ(normalize(v), v * (1 / length(v))); }
2aefdbba41028faa570a3ee488375b485b64ba2c
4506cfa5d57fd4e66dd470fb0e2278383a551462
/lab1/include/str_match/all.hpp
46b21d4dc3b309610280493405cb8e22fcf5b065
[]
no_license
pazamelin/ORA_labs
647b6ca9868f0130c4d774629d250fd3b5ac4712
ca4a7c19ebf607a6dad5e7de8dd68c9ec5932f2c
refs/heads/main
2023-05-20T03:25:38.312477
2021-06-14T12:45:41
2021-06-14T12:45:41
360,643,354
0
0
null
null
null
null
UTF-8
C++
false
false
127
hpp
all.hpp
#pragma once #include "naive.hpp" #include "rabin_karp.hpp" #include "BoyerMooreHorspool.hpp" #include "KnuthMorrisPratt.hpp"
e760d734d344d41e360e4abb6078689352690082
59c47e1f8b2738fc2b824462e31c1c713b0bdcd7
/006-All_Test_Demo/000-vital/000-sodimas_notice/000-code/WindowsAPP-old/BST_IDE/global/devfun.cpp
fee2cf40c4410e62ff9c2f21b360ddeb0c4a1d62
[]
no_license
casterbn/Qt_project
8efcc46e75e2bbe03dc4aeaafeb9e175fb7b04ab
03115674eb3612e9dc65d4fd7bcbca9ba27f691c
refs/heads/master
2021-10-19T07:27:24.550519
2019-02-19T05:26:22
2019-02-19T05:26:22
null
0
0
null
null
null
null
GB18030
C++
false
false
29,818
cpp
devfun.cpp
#include "devfun.h" #ifdef IDE #include "projectmanager.h" #include "bstui.h" #include "tabpage.h" #include "mdppage.h" #endif #include "deviceinc.h" #if (defined(IDE) || defined(DISPLAY) || defined(SETTING)) #include "physicallcd.h" #endif void WaitInfo::SetTimeout(quint32 pValue) { mFreq = pValue; } bool WaitInfo::isValid(quint32 pCurCount, quint32 pFreq) { if(pFreq <= 0) return false; if(mNext != pCurCount) return false; update(pCurCount, pFreq); return true; } void WaitInfo::update(quint32 pCurCount, quint32 pFreq) { if(pFreq) mNext = (pCurCount + mFreq / pFreq) % D_MAXTIMEOUT; } IODeviceBase::IODeviceBase(QObject *parent) : QIODevice(parent) { mInitialized = false; mEnable = false; mDevMode = DM_NORMAL; m_SettingGroup = 0; SetDeviceManager(parent); } IODeviceBase::~IODeviceBase() { if(m_SettingGroup) { m_SettingGroup->deleteLater(); m_SettingGroup = 0; } #ifdef IDE DeleteDevItem(); #endif } bool IODeviceBase::SetDeviceManager(QObject *pManager) { m_DevManager = VAR_CAST<DeviceManager *>(pManager); #ifdef DISPLAY if(m_DevManager) { connect(this, SIGNAL(sSetDevices(bool,E_DEVMODE)), m_DevManager, SLOT(SetDevicesEnable(bool,E_DEVMODE)), Qt::QueuedConnection); connect(this, SIGNAL(sProgress(QString,quint32)), m_DevManager, SIGNAL(sProgress(QString,quint32)), Qt::QueuedConnection); connect(this, SIGNAL(sProgress(QString,quint32,quint32)), m_DevManager, SIGNAL(sProgress(QString,quint32,quint32)), Qt::QueuedConnection); connect(this, SIGNAL(sBeep(QString)), m_DevManager, SIGNAL(sBeep(QString)), Qt::QueuedConnection); connect(this, SIGNAL(sIcon(QString)), m_DevManager, SIGNAL(sIcon(QString)), Qt::QueuedConnection); connect(this, SIGNAL(sShowIcon(QString)), m_DevManager, SIGNAL(sShowIcon(QString)), Qt::QueuedConnection); connect(this, SIGNAL(sHideIcon(QString)), m_DevManager, SIGNAL(sHideIcon(QString)), Qt::QueuedConnection); } #endif } #ifdef IDE void IODeviceBase::DeleteDevItem() { if(m_DeviceItem) { m_DeviceItem = 0; } } #endif bool IODeviceBase::SetElementText(QDomElement pElement, QString pValue) { if(pElement.isNull()) return false; if(pElement.text().compare(pValue)) { if(m_DevManager && m_DevManager->mMdpManager) { return m_DevManager->mMdpManager->SetText(pElement, pValue); } } return true; } quint32 IODeviceBase::InitPara() { QDomNodeList tmpParaNodeList = m_ParaElement.childNodes(); if(tmpParaNodeList.isEmpty()) return 0; quint32 validcount = 0; QHBoxLayout* tmpHBoxLayout = 0; for(int i=0;i<tmpParaNodeList.count();i++) { QDomElement tmpElement = tmpParaNodeList.at(i).toElement(); if(tmpElement.isNull()) continue; QString tmpName = tmpElement.tagName(); UI_TYPE tmpType = getUiType(tmpElement.attribute("Para")); QStringList tmpList = tmpElement.attribute("List").split(';'); QString tmpValue = tmpElement.text(); if(tmpType == UI_CHECK) { tmpHBoxLayout = CreateCheck(tmpName, tmpList, tmpValue.split(';')); } else if(tmpType == UI_ENUM) { tmpHBoxLayout = CreateEnum(tmpName, tmpList, tmpValue); } else if(tmpType == UI_NUM) { if(tmpList.count() != 2) continue; tmpHBoxLayout = CreateNum(tmpName, tmpValue.toInt(), tmpList.at(0).toInt(), tmpList.at(1).toInt()); } else if(tmpType == UI_BOOL) { tmpHBoxLayout = CreateBool(tmpName, tmpValue); } else if(tmpType == UI_ENETADDR) { tmpHBoxLayout = CreateENetAddrEdit(tmpName, tmpValue); } else if(tmpType == UI_TIMEEDIT) { tmpHBoxLayout = CreateDateTimeEdit(tmpName, QDateTime::fromString(tmpValue)); } else if(tmpType == UI_BUTTON) { tmpHBoxLayout = CreateButton(tmpName, tmpList); } else { continue; } validcount++; m_SettingGroup->m_VLayout->addWidget(CreateLine()); m_SettingGroup->m_VLayout->addLayout(tmpHBoxLayout); } return validcount; } void IODeviceBase::UpdatePara(QObject* pObject) { QString tmpObjectName = pObject->objectName(); QDomElement tmpElement = m_ParaElement.firstChildElement(tmpObjectName); if(tmpElement.isNull()) return; QString tmpName = tmpElement.tagName(); UI_TYPE tmpType = getUiType(tmpElement.attribute("Para")); if(tmpType == UI_CHECK) { CheckList *tmpComponent = VAR_CAST<CheckList *>(pObject); if(tmpComponent) { QStringList tmpList; if(!ModifyCheck(tmpComponent, tmpElement, tmpList, tmpComponent->GetSelectList())) { emit sError(QString("")); } } } else if(tmpType == UI_ENUM) { ComboBox *tmpComponent = VAR_CAST<ComboBox *>(pObject); if(tmpComponent) { QString tmpValue; if(!ModifyEnum(tmpComponent, tmpElement, tmpValue, tmpComponent->currentText())) { emit sError(QString("")); } } } else if(tmpType == UI_NUM) { SpinEdit *tmpComponent = VAR_CAST<SpinEdit *>(pObject); if(tmpComponent) { int tmpValue; if(!ModifyNum(tmpComponent, tmpElement, tmpValue, tmpComponent->value())) { emit sError(QString("")); } } } else if(tmpType == UI_BOOL) { Switch *tmpComponent = VAR_CAST<Switch *>(pObject); if(tmpComponent) { bool tmpValue; if(!ModifyBool(tmpComponent, tmpElement, tmpValue, tmpComponent->isChecked())) { emit sError(QString("")); } } } else if(tmpType == UI_ENETADDR) { ENetAddrEdit *tmpComponent = VAR_CAST<ENetAddrEdit *>(pObject); if(tmpComponent) { ENET_ADDR tmpValue; if(!ModifyENetAddrEdit(tmpComponent, tmpElement, tmpValue, tmpComponent->GetIP())) { emit sError(QString("")); } } } else if(tmpType == UI_TIMEEDIT) { DateTimeEdit *tmpComponent = VAR_CAST<DateTimeEdit *>(pObject); if(tmpComponent) { QDateTime tmpValue; if(!ModifyDateTimeEdit(tmpComponent, tmpElement, tmpValue, tmpComponent->GetDateTime())) { emit sError(QString("")); } } } else if(tmpType == UI_BUTTON) { ButtonList *tmpComponent = VAR_CAST<ButtonList *>(pObject); if(tmpComponent) { } } } bool IODeviceBase::SetPara(QString pParaName, QString pParaValue, bool pSyncUI) { //>@获取控件类型 QDomElement tmpOldElement = m_ParaElement.firstChildElement(pParaName); return SetPara(tmpOldElement, pParaValue, pSyncUI); } bool IODeviceBase::SetPara(QDomElement pElement, QString pParaValue, bool pSyncUI) { if(pElement.isNull()) return false; if(!pSyncUI) { if(m_DevManager && m_DevManager->mMdpManager) return m_DevManager->mMdpManager->SetText(pElement, pParaValue); return false; } QString pParaName = pElement.tagName(); UI_TYPE tmpType = getUiType(pElement.attribute("Para")); switch(tmpType) { case UI_ENUM: { ComboBox *tmpComponent = m_SettingGroup->findChild<ComboBox *>(pParaName); if(tmpComponent) { tmpComponent->setCurrentText(pParaValue); } break; } case UI_BOOL: { Switch *tmpComponent = m_SettingGroup->findChild<Switch *>(pParaName); if(tmpComponent) { tmpComponent->setChecked((pParaValue.compare("TRUE", Qt::CaseInsensitive))?false:true); } break; } case UI_STRING: { TextEdit *tmpComponent = m_SettingGroup->findChild<TextEdit *>(pParaName); if(tmpComponent) { tmpComponent->setText(pParaValue); } break; } case UI_ENETADDR: { ENetAddrEdit *tmpComponent = m_SettingGroup->findChild<ENetAddrEdit *>(pParaName); if(tmpComponent) { tmpComponent->SetIP(pParaValue); } break; } case UI_TIMEEDIT: { DateTimeEdit *tmpComponent = m_SettingGroup->findChild<DateTimeEdit *>(pParaName); if(tmpComponent) { tmpComponent->SetDateTime(pParaValue); } break; } case UI_CHECK: { CheckList *tmpComponent = m_SettingGroup->findChild<CheckList *>(pParaName); if(tmpComponent) { tmpComponent->InitCheckList(pParaValue.split(';')); } break; } case UI_NUM: { SpinEdit *tmpComponent = m_SettingGroup->findChild<SpinEdit *>(pParaName); if(tmpComponent) { tmpComponent->setValue(pParaValue.toInt()); } break; } default:return false; } return true; } bool IODeviceBase::SetPara(QDomElement &pElement, xmlParse *pParse) { if(pElement.isNull() || pParse==0) return false; //>@设置参数部分 QDomNodeList tmpParaList = pElement.childNodes(); for(int i=0;i<tmpParaList.count();i++) { QDomElement tmpParaElement = tmpParaList.at(i).toElement(); if(!tmpParaElement.isNull()) { QString tmpParaName = tmpParaElement.tagName(); QDomElement tmpOldElement = m_ParaElement.firstChildElement(tmpParaName); if(tmpOldElement.isNull()) continue; //>@设置参数的属性部分 QList<QDomAttr> tmpList = pParse->GetItemElementAttrs(tmpParaElement); for(int j=0;j<tmpList.count();j++) { QDomAttr tmpDomAttr = tmpList.at(j); if(tmpDomAttr.isNull()) continue; tmpOldElement.setAttribute(tmpDomAttr.name(), tmpDomAttr.value()); } //>@设置此参数的值 SetPara(tmpOldElement, tmpParaElement.text()); } } //>@执行命令部分 return SetValue(pElement.text()); } QString IODeviceBase::GetPara(QString pParaName) { QDomElement tmpOldElement = m_ParaElement.firstChildElement(pParaName); return GetPara(tmpOldElement); } QString IODeviceBase::GetPara(QDomElement pElement) { if(pElement.isNull()) return QString(); return pElement.text(); } bool IODeviceBase::GetPara(QDomElement &pElement, xmlParse *pParse) { if(pElement.isNull() || pParse==0) return false; //>@获取参数部分 QDomNodeList tmpParaList = pElement.childNodes(); for(int i=0;i<tmpParaList.count();i++) { QDomElement tmpParaElement = tmpParaList.at(i).toElement(); if(!tmpParaElement.isNull()) { QString tmpParaName = tmpParaElement.tagName(); QDomElement tmpOldElement = m_ParaElement.firstChildElement(tmpParaName); if(tmpOldElement.isNull()) continue; //>@获取参数的属性部分 QList<QDomAttr> tmpList = pParse->GetItemElementAttrs(tmpParaElement); for(int j=0;j<tmpList.count();j++) { QDomAttr tmpDomAttr = tmpList.at(j); if(tmpDomAttr.isNull()) continue; tmpDomAttr.setValue(tmpOldElement.attribute(tmpDomAttr.name())); } //>@获取此参数的值 pParse->SetText(tmpParaElement, GetPara(tmpOldElement)); } } pParse->SetText(pElement, GetValue(pElement.text())); return true; } bool IODeviceBase::SaveMdp() { if(m_DevManager && m_DevManager->mMdpManager && m_DevManager->mMdpManager->m_IsChanged) return m_DevManager->mMdpManager->SaveMDP(); return false; } //>@pDevMode表示设置设备禁能的优先级,优先级低的无法执行成功,如果mDevMode = DM_NORMAL则表示任何优先级都可以操作 bool IODeviceBase::SetEnable(bool pFlag, E_DEVMODE pDevMode, bool pForce) { if(!pForce) { if(pDevMode < mDevMode) //>@离开禁能模式时需要判断是否是否可以离开,只有优先级高的DEV才可以使之离开禁能模式 { if(pFlag == mEnable) return false; IDE_DEBUG(QString("new devmode %1[%2] is smaller than %3[%4] ").arg(pDevMode).arg(pFlag).arg(mDevMode).arg(mEnable)); return false; } if(pFlag == mEnable) { bool diff = (pDevMode == mDevMode); if(pFlag) mDevMode = DM_NORMAL; else mDevMode = pDevMode; if(diff) return false; return true; } } if(pFlag) { mDevMode = DM_NORMAL; mEnable = true; } else { mDevMode = pDevMode; mEnable = false; } return true; } quint32 IODeviceBase::Monitor(quint32 pCount) { return 0; } #ifdef SUPPORT_SCENE GraphicsScene *IODeviceBase::GetThemeScene() { #ifdef IDE //>@主要用于模拟器 mdpPage *tmpPage = m_DevManager->m_MdpPage.data(); return (GraphicsScene *)GetTabThemeScene((TabPage*)(tmpPage)); #elif DISPLAY LogicThemeManager *tmpThemeLGDev = VAR_CAST<LogicThemeManager*>(m_DevManager->m_LGDevList.value(L_ThemeManager)); if(!tmpThemeLGDev) return (GraphicsScene*)0; return tmpThemeLGDev->m_UiContainer; #elif SETTING LogicThemeManager *tmpThemeLGDev = VAR_CAST<LogicThemeManager*>(m_DevManager->m_LGDevList.value(L_ThemeManager)); if(!tmpThemeLGDev) return (GraphicsScene*)0; return tmpThemeLGDev->m_UiContainer; #endif return (GraphicsScene*)0; } #elif SUPPORT_WIDGET UiWidget *IODeviceBase::GetThemeScene() { #ifdef IDE //>@主要用于模拟器 mdpPage *tmpPage = m_DevManager->m_MdpPage.data(); return (GraphicsScene *)GetTabThemeScene((TabPage*)(tmpPage)); #elif DISPLAY LogicThemeManager *tmpThemeLGDev = VAR_CAST<LogicThemeManager*>(m_DevManager->m_LGDevList.value(L_ThemeManager)); if(!tmpThemeLGDev) return (UiWidget*)0; return tmpThemeLGDev->m_UiContainer; #elif SETTING LogicThemeManager *tmpThemeLGDev = VAR_CAST<LogicThemeManager*>(m_DevManager->m_LGDevList.value(L_ThemeManager)); if(!tmpThemeLGDev) return (UiWidget*)0; return tmpThemeLGDev->m_UiContainer; #endif return (UiWidget*)0; } #endif void IODeviceBase::slot_Initialize() { mInitialized = true; disconnect(this, SIGNAL(sInfo(QString,int)), 0, 0); if(m_DevManager) { #ifdef IDE connect(this, SIGNAL(sInfo(QString,int)), m_DevManager, SIGNAL(sShowInfo(QString,int)), Qt::AutoConnection); #elif DISPLAY mThemeManager = VAR_CAST<LogicThemeManager*>(m_DevManager->m_LGDevList.value(L_ThemeManager)); if(mThemeManager && mThemeManager->m_UiContainer) { disconnect(this, SIGNAL(sOperateTheme(AREA_OPERATE, QVariant)), 0, 0); disconnect(this, SIGNAL(sInfo(QString,int,E_DEVMODE)), 0, 0); disconnect(this, SIGNAL(sWarn(QString,int,E_DEVMODE)), 0, 0); disconnect(this, SIGNAL(sError(QString,int,E_DEVMODE)), 0, 0); disconnect(this, SIGNAL(sProgress(quint32)), 0, 0); disconnect(this, SIGNAL(sProgress(quint32,quint32)), 0, 0); connect(this, SIGNAL(sOperateTheme(AREA_OPERATE, QVariant)), mThemeManager, SLOT(slot_OperateTheme(AREA_OPERATE, QVariant)), Qt::QueuedConnection); connect(this, SIGNAL(sInfo(QString,int,E_DEVMODE)), mThemeManager->m_UiContainer, SIGNAL(sInfo(QString,int,E_DEVMODE)), Qt::QueuedConnection); connect(this, SIGNAL(sWarn(QString,int,E_DEVMODE)), mThemeManager->m_UiContainer, SIGNAL(sWarn(QString,int,E_DEVMODE)), Qt::QueuedConnection); connect(this, SIGNAL(sError(QString,int,E_DEVMODE)), mThemeManager->m_UiContainer, SIGNAL(sError(QString,int,E_DEVMODE)), Qt::QueuedConnection); connect(this, SIGNAL(sProgress(quint32)), mThemeManager->m_UiContainer, SIGNAL(sProgress(quint32)), Qt::QueuedConnection); connect(this, SIGNAL(sProgress(quint32,quint32)), mThemeManager->m_UiContainer, SIGNAL(sProgress(quint32,quint32)), Qt::QueuedConnection); } #endif } #if (defined(IDE) || defined(DISPLAY) || defined(SETTING)) if(m_DevManager) m_LCD = VAR_CAST<PhysicalLCD*>(m_DevManager->m_PHDevList.value(P_LCD)); if(!m_LCD.isNull()) { disconnect(this, SIGNAL(sFeedLCD()), 0, 0); connect(this, SIGNAL(sFeedLCD()), m_LCD.data(), SLOT(slot_FeedLCD()), Qt::QueuedConnection); } #endif } QFrame* IODeviceBase::CreateLine() { QFrame *line = new QFrame; line->setFrameShape(QFrame::HLine); line->setFrameShadow(QFrame::Sunken); return line; } QHBoxLayout* IODeviceBase::CreateButton(QString pName, QStringList pBtnListTag) { QHBoxLayout *tmpHBoxLayout = new QHBoxLayout; Label *tmpLabel = new Label(pName); ButtonList *tmpButtonList = new ButtonList(pBtnListTag); tmpButtonList->setObjectName(pName); connect(tmpButtonList, SIGNAL(sChanged(QObject*)), this, SLOT(UpdatePara(QObject*))); //mParaItems.insert(pName, tmpButtonList); //>@ tmpHBoxLayout->addWidget(tmpLabel); tmpHBoxLayout->addItem(new QSpacerItem(20, 40, QSizePolicy::Expanding, QSizePolicy::Minimum)); tmpHBoxLayout->addLayout(tmpButtonList); return tmpHBoxLayout; } QHBoxLayout* IODeviceBase::CreateTextEdit(QString pName, QString pValue) { QHBoxLayout *tmpHBoxLayout = new QHBoxLayout; Label *tmpLabel = new Label(pName); TextEdit *tmpTextEdit = new TextEdit(pValue); tmpTextEdit->setObjectName(pName); connect(tmpTextEdit, SIGNAL(sChanged(QObject*)), this, SLOT(UpdatePara(QObject*))); //mParaItems.insert(pName, tmpTextEdit); //>@ tmpHBoxLayout->addWidget(tmpLabel); tmpHBoxLayout->addItem(new QSpacerItem(20, 40, QSizePolicy::Expanding, QSizePolicy::Minimum)); tmpHBoxLayout->addWidget(tmpTextEdit); return tmpHBoxLayout; } QHBoxLayout* IODeviceBase::CreateEnum(QString pName, QStringList pParaList, QString pSelectPara) { QHBoxLayout *tmpHBoxLayout = new QHBoxLayout; Label *tmpLabel = new Label(pName); ComboBox *tmpComboBox = new ComboBox(pParaList, pSelectPara); tmpComboBox->setObjectName(pName); connect(tmpComboBox, SIGNAL(sChanged(QObject*)), this, SLOT(UpdatePara(QObject*))); //mParaItems.insert(pName, tmpComboBox); //>@ tmpHBoxLayout->addWidget(tmpLabel); tmpHBoxLayout->addItem(new QSpacerItem(20, 40, QSizePolicy::Expanding, QSizePolicy::Minimum)); tmpHBoxLayout->addWidget(tmpComboBox); return tmpHBoxLayout; } QHBoxLayout* IODeviceBase::CreateBool(QString pName, QString pPara) { QHBoxLayout *tmpHBoxLayout = new QHBoxLayout; Label *tmpLabel = new Label(pName); Switch *tmpSwitch = new Switch(pPara, "TRUE", "FALSE"); tmpSwitch->setObjectName(pName); connect(tmpSwitch, SIGNAL(sChanged(QObject*)), this, SLOT(UpdatePara(QObject*))); //mParaItems.insert(pName, tmpSwitch); //>@ tmpHBoxLayout->addWidget(tmpLabel); tmpHBoxLayout->addItem(new QSpacerItem(20, 40, QSizePolicy::Expanding, QSizePolicy::Minimum)); tmpHBoxLayout->addWidget(tmpSwitch); return tmpHBoxLayout; } QHBoxLayout* IODeviceBase::CreateENetAddrEdit(QString pName, QString pIP) { QHBoxLayout *tmpHBoxLayout = new QHBoxLayout; Label *tmpLabel = new Label(pName); ENetAddrEdit *tmpNetAddrEdit = new ENetAddrEdit(pIP); tmpNetAddrEdit->setObjectName(pName); connect(tmpNetAddrEdit, SIGNAL(sChanged(QObject*)), this, SLOT(UpdatePara(QObject*))); //mParaItems.insert(pName, tmpNetAddrEdit); //>@ tmpHBoxLayout->addWidget(tmpLabel); tmpHBoxLayout->addItem(new QSpacerItem(20, 40, QSizePolicy::Expanding, QSizePolicy::Minimum)); tmpHBoxLayout->addWidget(tmpNetAddrEdit); return tmpHBoxLayout; } QHBoxLayout* IODeviceBase::CreateDateTimeEdit(QString pName, QDateTime pDateTime) { QHBoxLayout *tmpHBoxLayout = new QHBoxLayout; Label *tmpLabel = new Label(pName); DateTimeEdit *tmpDateTimeEdit = new DateTimeEdit(pDateTime); tmpDateTimeEdit->setObjectName(pName); connect(tmpDateTimeEdit, SIGNAL(sChanged(QObject*)), this, SLOT(UpdatePara(QObject*))); //mParaItems.insert(pName, tmpDateTimeEdit); //>@ tmpHBoxLayout->addWidget(tmpLabel); tmpHBoxLayout->addItem(new QSpacerItem(20, 40, QSizePolicy::Expanding, QSizePolicy::Minimum)); tmpHBoxLayout->addWidget(tmpDateTimeEdit); return tmpHBoxLayout; } QHBoxLayout* IODeviceBase::CreateCheck(QString pName, QStringList pParaList, QStringList pSelectParaList) { QHBoxLayout *tmpHBoxLayout = new QHBoxLayout; Label *tmpLabel = new Label(pName); CheckList *tmpCheckList = new CheckList(pParaList, pSelectParaList); tmpCheckList->setObjectName(pName); connect(tmpCheckList, SIGNAL(sChanged(QObject*)), this, SLOT(UpdatePara(QObject*))); //mParaItems.insert(pName, tmpCheckList); //>@ tmpHBoxLayout->addWidget(tmpLabel); tmpHBoxLayout->addItem(new QSpacerItem(20, 40, QSizePolicy::Expanding, QSizePolicy::Minimum)); tmpHBoxLayout->addLayout(tmpCheckList); return tmpHBoxLayout; } QHBoxLayout* IODeviceBase::CreateNum(QString pName, int pValue, int pMinValue, int pMaxValue) { QHBoxLayout *tmpHBoxLayout = new QHBoxLayout; Label *tmpLabel = new Label(pName); SpinEdit *tmpSpinEdit = new SpinEdit(pValue, pMinValue, pMaxValue); tmpSpinEdit->setObjectName(pName); connect(tmpSpinEdit, SIGNAL(sChanged(QObject*)), this, SLOT(UpdatePara(QObject*))); //mParaItems.insert(pName, tmpSpinEdit); //>@ tmpHBoxLayout->addWidget(tmpLabel); tmpHBoxLayout->addItem(new QSpacerItem(20, 40, QSizePolicy::Expanding, QSizePolicy::Minimum)); tmpHBoxLayout->addWidget(tmpSpinEdit); return tmpHBoxLayout; } bool IODeviceBase::ModifyButton(ButtonList *pComponent, QDomElement &pElement, QStringList &pDstValue, QStringList pNewValue) { if(pComponent && !pElement.isNull()) { return true; } return false; } bool IODeviceBase::ModifyTextEdit(TextEdit *pComponent, QDomElement &pElement, QString &pDstValue, QString pNewValue) { if(pComponent && !pElement.isNull()) { QString tmpOldValue = pElement.text(); if(tmpOldValue.compare(pNewValue)) { if(!SetElementText(pElement, pNewValue)) { pComponent->setText(tmpOldValue); return false; } pDstValue = pNewValue; } return true; } return false; } bool IODeviceBase::ModifyEnum(ComboBox *pComponent, QDomElement &pElement, QString &pDstValue, QString pNewValue) { if(pComponent && !pElement.isNull()) { QString tmpOldValue = pElement.text(); if(tmpOldValue.compare(pNewValue)) { if(!SetElementText(pElement, pNewValue)) { pComponent->setCurrentText(tmpOldValue); return false; } pDstValue = pNewValue; } return true; } return false; } bool IODeviceBase::ModifyBool(Switch *pComponent, QDomElement &pElement, bool &pDstValue, bool pNewValue) { if(pComponent && !pElement.isNull()) { bool tmpOldValue = (pElement.text().compare("TRUE", Qt::CaseInsensitive))?false:true; if(tmpOldValue != pNewValue) { if(!SetElementText(pElement, pNewValue?("TRUE"):("FALSE"))) { pComponent->setChecked(tmpOldValue); return false; } pDstValue = pNewValue; } return true; } return false; } bool IODeviceBase::ModifyENetAddrEdit(ENetAddrEdit *pComponent, QDomElement &pElement, ENET_ADDR &pDstValue, ENET_ADDR pNewValue) { if(pComponent && !pElement.isNull()) { QString tmpOldValue = pElement.text(); QString tmpNewValue = pNewValue.toQString(); if(tmpOldValue.compare(tmpNewValue)) { if(!SetElementText(pElement, tmpNewValue)) { pComponent->SetIP(tmpOldValue); return false; } pDstValue = pNewValue; } return true; } return false; } bool IODeviceBase::ModifyDateTimeEdit(DateTimeEdit *pComponent, QDomElement &pElement, QDateTime &pDstValue, QDateTime pNewValue) { if(pComponent && !pElement.isNull()) { QString tmpNewValue = pElement.text(); QString tmpOldValue = pNewValue.toString(Qt::LocalDate); if(tmpNewValue.compare(tmpOldValue)) { if(!SetElementText(pElement, pNewValue.toString(Qt::LocalDate))) { pComponent->SetDateTime(QDateTime::fromString(tmpOldValue, Qt::LocalDate)); return false; } pDstValue = pNewValue; } return true; } return false; } bool IODeviceBase::ModifyCheck(CheckList *pComponent, QDomElement &pElement, QStringList &pDstValue, QStringList pNewValue) { if(pComponent && !pElement.isNull()) { QString tmpOldValue = pElement.text(); QString tmpNewValue = pComponent->GetSelectText(pNewValue); if(tmpOldValue.compare(tmpNewValue)) { if(!SetElementText(pElement, tmpNewValue)) { pComponent->InitCheckList(tmpOldValue.split(';')); return false; } pDstValue = pNewValue; } return true; } return false; } //>@修改XML以及判断此值是否有效 bool IODeviceBase::ModifyNum(SpinEdit *pComponent, QDomElement &pElement, int &pDstValue, int pNewValue, int pMinValue, int pMaxValue) { if(pComponent && !pElement.isNull()) { int tmpOldValue = pElement.text().toInt(); if(tmpOldValue != pNewValue) { if(pMinValue == -1) pMinValue = pComponent->m_MinValue; if(pMaxValue == -1) pMaxValue = pComponent->m_MaxValue; if(pNewValue < pMinValue || pNewValue > pMaxValue) //>@判断值是否有效 { pComponent->setValue(tmpOldValue); return false; } if(!SetElementText(pElement,QString("%1").arg(pNewValue))) { pComponent->setValue(tmpOldValue); return false; } pDstValue = pNewValue; } return true; } return false; } DevManager::DevManager() : BstUiManager() { m_DevMonitor = 0; m_DevMonitorFreq = 100; #ifdef QT_V453 m_TranparentPix = QPixmap(D_FSRCPATH + D_BOOTDIR + QString("transparent.png")); #endif } DevManager::~DevManager() { SetMonitor(0); //>@ } bool DevManager::SetMonitor(quint32 pFreq) { if(pFreq == 0) //>@停止 { bool ret = true; if(m_DevMonitor) { m_DevMonitor->ForceQuit(); ret = m_DevMonitor->wait(1000); if(!ret) m_DevMonitor->terminate(); //>@使用run的thread使用quit没有用处,只有terminate有用处。 m_DevMonitor->deleteLater(); m_DevMonitor = 0; } return ret; } if(!m_DevMonitor) m_DevMonitor = new DeviceMonitor(this); if(pFreq > 10) { m_DevMonitorFreq = pFreq; } if(!m_DevMonitor->isRunning()) m_DevMonitor->start(); return true; } DeviceMonitor::DeviceMonitor(DevManager *qesp) : QThread() { m_DevManager = qesp; m_Quit = false; m_Count = 0; } DeviceMonitor::~DeviceMonitor() { m_Quit = true; } void DeviceMonitor::ForceQuit() { m_Quit = true; } void DeviceMonitor::run() { while(!m_Quit) { if(m_DevManager) { m_Count++; if(m_Count == D_MAXTIMEOUT) m_Count = 0; m_DevManager->Monitor(m_Count); Wait(m_DevManager->m_DevMonitorFreq); } else { Wait(50); } } } void DeviceMonitor::Wait(int pTimeout) { quint32 i=0; while(!m_Quit && ((i+=10) < pTimeout)) msleep(10); }
956a30cc71725edc28b5434c3abb47f76403af52
aaf28ddaf0314d5e0664bd6b1d8fbb784db74f18
/test/unit/prng.cpp
42a42ca697065d2c6214f2f76d90cecada0ab3d2
[]
no_license
QuarkCloud/jemalloc-windows
129677bc8a86fd1d49128da2da58d0e729d426f9
31631451e14b0bea4145ecf7f8007c1e5247839c
refs/heads/master
2020-03-20T04:15:35.939082
2019-03-22T05:17:32
2019-03-22T05:17:32
137,176,866
0
0
null
null
null
null
UTF-8
C++
false
false
3,822
cpp
prng.cpp
#include "test/jemalloc_test.h" #include "unit_test.h" static void test_prng_lg_range_u32(bool atomic) { atomic_u32_t sa, sb; uint32_t ra, rb; unsigned lg_range; atomic_store_u32(&sa, 42, ATOMIC_RELAXED); ra = prng_lg_range_u32(&sa, 32, atomic); atomic_store_u32(&sa, 42, ATOMIC_RELAXED); rb = prng_lg_range_u32(&sa, 32, atomic); assert_u32_eq(ra, rb, "Repeated generation should produce repeated results"); atomic_store_u32(&sb, 42, ATOMIC_RELAXED); rb = prng_lg_range_u32(&sb, 32, atomic); assert_u32_eq(ra, rb, "Equivalent generation should produce equivalent results"); atomic_store_u32(&sa, 42, ATOMIC_RELAXED); ra = prng_lg_range_u32(&sa, 32, atomic); rb = prng_lg_range_u32(&sa, 32, atomic); assert_u32_ne(ra, rb, "Full-width results must not immediately repeat"); atomic_store_u32(&sa, 42, ATOMIC_RELAXED); ra = prng_lg_range_u32(&sa, 32, atomic); for (lg_range = 31; lg_range > 0; lg_range--) { atomic_store_u32(&sb, 42, ATOMIC_RELAXED); rb = prng_lg_range_u32(&sb, lg_range, atomic); assert_u32_eq((rb & (UINT32_C(0xffffffff) << lg_range)), 0, "High order bits should be 0, lg_range=%u", lg_range); assert_u32_eq(rb, (ra >> (32 - lg_range)), "Expected high order bits of full-width result, " "lg_range=%u", lg_range); } } static void test_prng_lg_range_u64(void) { uint64_t sa, sb, ra, rb; unsigned lg_range; sa = 42; ra = prng_lg_range_u64(&sa, 64); sa = 42; rb = prng_lg_range_u64(&sa, 64); assert_u64_eq(ra, rb, "Repeated generation should produce repeated results"); sb = 42; rb = prng_lg_range_u64(&sb, 64); assert_u64_eq(ra, rb, "Equivalent generation should produce equivalent results"); sa = 42; ra = prng_lg_range_u64(&sa, 64); rb = prng_lg_range_u64(&sa, 64); assert_u64_ne(ra, rb, "Full-width results must not immediately repeat"); sa = 42; ra = prng_lg_range_u64(&sa, 64); for (lg_range = 63; lg_range > 0; lg_range--) { sb = 42; rb = prng_lg_range_u64(&sb, lg_range); assert_u64_eq((rb & (UINT64_C(0xffffffffffffffff) << lg_range)), 0, "High order bits should be 0, lg_range=%u", lg_range); assert_u64_eq(rb, (ra >> (64 - lg_range)), "Expected high order bits of full-width result, " "lg_range=%u", lg_range); } } TEST_BEGIN(test_prng_lg_range_u32_nonatomic) { test_prng_lg_range_u32(false); } TEST_END TEST_BEGIN(test_prng_lg_range_u32_atomic) { test_prng_lg_range_u32(true); } TEST_END TEST_BEGIN(test_prng_lg_range_u64_nonatomic) { test_prng_lg_range_u64(); } TEST_END static void test_prng_range_u32(bool atomic) { uint32_t range; #define MAX_RANGE 10000000 #define RANGE_STEP 97 #define NREPS 10 for (range = 2; range < MAX_RANGE; range += RANGE_STEP) { atomic_u32_t s; unsigned rep; atomic_store_u32(&s, range, ATOMIC_RELAXED); for (rep = 0; rep < NREPS; rep++) { uint32_t r = prng_range_u32(&s, range, atomic); assert_u32_lt(r, range, "Out of range"); } } } static void test_prng_range_u64(void) { uint64_t range; #define MAX_RANGE 10000000 #define RANGE_STEP 97 #define NREPS 10 for (range = 2; range < MAX_RANGE; range += RANGE_STEP) { uint64_t s; unsigned rep; s = range; for (rep = 0; rep < NREPS; rep++) { uint64_t r = prng_range_u64(&s, range); assert_u64_lt(r, range, "Out of range"); } } } TEST_BEGIN(test_prng_range_u32_nonatomic) { test_prng_range_u32(false); } TEST_END TEST_BEGIN(test_prng_range_u32_atomic) { test_prng_range_u32(true); } TEST_END TEST_BEGIN(test_prng_range_u64_nonatomic) { test_prng_range_u64(); } TEST_END int f_test_prng(void) { return test( test_prng_lg_range_u32_nonatomic, test_prng_lg_range_u32_atomic, test_prng_lg_range_u64_nonatomic, test_prng_range_u32_nonatomic, test_prng_range_u32_atomic, test_prng_range_u64_nonatomic); }
348391588e56b530c720fad676b1edecc3ec6f7f
44d212e4b92b39a24b3fc9356c28bddd513f1f54
/UVa Online Judge/10026. Shoemaker's Problem.cpp
58871837b37082997abf7c3abab929b5062adaaf
[ "MIT" ]
permissive
nicoelayda/competitive-programming
e946d4eeac5fadcae58d44dd3d9b6fb3d86983a4
5b5452d8d2865a1a5f1e3d2fece011749722e8c4
refs/heads/master
2020-04-23T09:42:46.697943
2019-02-18T16:29:27
2019-02-18T16:29:33
171,078,251
0
0
null
null
null
null
UTF-8
C++
false
false
857
cpp
10026. Shoemaker's Problem.cpp
#include <cstdio> #include <algorithm> #include <utility> #include <vector> using namespace std; bool comparator(pair<int, double> p1, pair<int, double> p2) { return p1.second > p2.second; } int main() { int T; scanf("%d", &T); while (T-- != 0) { int n; scanf("%d", &n); vector< pair<int, double> > jobs; for (int i = 1; i <= n; i++) { double t, f; scanf("%lf %lf", &t, &f); jobs.push_back(make_pair(i, f / t)); } stable_sort(jobs.begin(), jobs.end(), comparator); for (int i = 0; i < jobs.size(); i++) { if (i != 0) printf(" "); printf("%d", jobs[i].first); } printf("\n"); if (T != 0) printf("\n"); } return 0; }
bfc9aa270d5c7870b6f83b610921cef47be7c188
b33a9177edaaf6bf185ef20bf87d36eada719d4f
/qtbase/src/testlib/qtestcase.cpp
270f8b57ac48d60e586e8bbc2d9e2bbe73c7631f
[ "LicenseRef-scancode-proprietary-license", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-commercial-license", "LGPL-2.0-or-later", "LGPL-2.1-only", "GFDL-1.3-only", "LicenseRef-scancode-qt-commercial-1.1", "LGPL-3.0-only", "LicenseRef-scancode-qt-company-exception-lgpl-2.1", "GPL-1.0-or-later", "GPL-3.0-only", "BSD-3-Clause", "LGPL-2.1-or-later", "GPL-2.0-only", "Qt-LGPL-exception-1.1", "LicenseRef-scancode-digia-qt-preview", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-generic-exception" ]
permissive
wgnet/wds_qt
ab8c093b8c6eead9adf4057d843e00f04915d987
8db722fd367d2d0744decf99ac7bafaba8b8a3d3
refs/heads/master
2021-04-02T11:07:10.181067
2020-06-02T10:29:03
2020-06-02T10:34:19
248,267,925
1
0
Apache-2.0
2020-04-30T12:16:53
2020-03-18T15:20:38
null
UTF-8
C++
false
false
129,999
cpp
qtestcase.cpp
/**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the QtTest module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see http://www.qt.io/terms-conditions. For further ** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 or version 3 as published by the Free ** Software Foundation and appearing in the file LICENSE.LGPLv21 and ** LICENSE.LGPLv3 included in the packaging of this file. Please review the ** following information to ensure the GNU Lesser General Public License ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** As a special exception, The Qt Company gives you certain additional ** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include <QtTest/qtestcase.h> #include <QtTest/qtestassert.h> #include <QtCore/qbytearray.h> #include <QtCore/qmetaobject.h> #include <QtCore/qobject.h> #include <QtCore/qstringlist.h> #include <QtCore/qvector.h> #include <QtCore/qvarlengtharray.h> #include <QtCore/qcoreapplication.h> #include <QtCore/qfile.h> #include <QtCore/qfileinfo.h> #include <QtCore/qdir.h> #include <QtCore/qprocess.h> #include <QtCore/qdebug.h> #include <QtCore/qlibraryinfo.h> #include <QtCore/private/qtools_p.h> #include <QtCore/qdiriterator.h> #include <QtCore/qtemporarydir.h> #include <QtCore/qthread.h> #include <QtCore/qwaitcondition.h> #include <QtCore/qmutex.h> #include <QtTest/private/qtestlog_p.h> #include <QtTest/private/qtesttable_p.h> #include <QtTest/qtestdata.h> #include <QtTest/private/qtestresult_p.h> #include <QtTest/private/qsignaldumper_p.h> #include <QtTest/private/qbenchmark_p.h> #include <QtTest/private/cycle_p.h> #include <QtTest/private/qtestblacklist_p.h> #if defined(HAVE_XCTEST) #include <QtTest/private/qxctestlogger_p.h> #endif #if defined Q_OS_MACOS #include <QtTest/private/qtestutil_macos_p.h> #endif #include <numeric> #include <algorithm> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #if defined(Q_OS_LINUX) #include <sys/types.h> #include <unistd.h> #include <fcntl.h> #endif #ifdef Q_OS_WIN #ifndef Q_OS_WINCE # if !defined(Q_CC_MINGW) || (defined(Q_CC_MINGW) && defined(__MINGW64_VERSION_MAJOR)) # include <crtdbg.h> # endif #endif #include <windows.h> // for Sleep #endif #ifdef Q_OS_UNIX #include <errno.h> #include <signal.h> #include <time.h> #include <sys/resource.h> #endif #if defined(Q_OS_MACX) #include <IOKit/pwr_mgt/IOPMLib.h> #endif QT_BEGIN_NAMESPACE using QtMiscUtils::toHexUpper; using QtMiscUtils::fromHex; static void disableCoreDump() { bool ok = false; const int disableCoreDump = qEnvironmentVariableIntValue("QTEST_DISABLE_CORE_DUMP", &ok); if (ok && disableCoreDump == 1) { #if defined(Q_OS_UNIX) struct rlimit limit; limit.rlim_cur = 0; limit.rlim_max = 0; if (setrlimit(RLIMIT_CORE, &limit) != 0) qWarning("Failed to disable core dumps: %d", errno); #endif } } Q_CONSTRUCTOR_FUNCTION(disableCoreDump); static void stackTrace() { bool ok = false; const int disableStackDump = qEnvironmentVariableIntValue("QTEST_DISABLE_STACK_DUMP", &ok); if (ok && disableStackDump == 1) return; #ifdef Q_OS_LINUX fprintf(stderr, "\n========= Received signal, dumping stack ==============\n"); char cmd[512]; qsnprintf(cmd, 512, "gdb --pid %d 2>/dev/null <<EOF\n" "set prompt\n" "set height 0\n" "thread apply all where full\n" "detach\n" "quit\n" "EOF\n", (int)getpid()); if (system(cmd) == -1) fprintf(stderr, "calling gdb failed\n"); fprintf(stderr, "========= End of stack trace ==============\n"); #elif defined(Q_OS_OSX) fprintf(stderr, "\n========= Received signal, dumping stack ==============\n"); char cmd[512]; qsnprintf(cmd, 512, "lldb -p %d 2>/dev/null <<EOF\n" "bt all\n" "quit\n" "EOF\n", (int)getpid()); if (system(cmd) == -1) fprintf(stderr, "calling lldb failed\n"); fprintf(stderr, "========= End of stack trace ==============\n"); #endif } /*! \namespace QTest \inmodule QtTest \brief The QTest namespace contains all the functions and declarations that are related to Qt Test. See the \l{Qt Test Overview} for information about how to write unit tests. */ /*! \namespace QTest::Internal \internal */ /*! \macro QVERIFY(condition) \relates QTest The QVERIFY() macro checks whether the \a condition is true or not. If it is true, execution continues. If not, a failure is recorded in the test log and the test won't be executed further. \b {Note:} This macro can only be used in a test function that is invoked by the test framework. Example: \snippet code/src_qtestlib_qtestcase.cpp 0 \sa QCOMPARE(), QTRY_VERIFY() */ /*! \macro QVERIFY2(condition, message) \relates QTest The QVERIFY2() macro behaves exactly like QVERIFY(), except that it outputs a verbose \a message when \a condition is false. The \a message is a plain C string. Example: \snippet code/src_qtestlib_qtestcase.cpp 1 \sa QVERIFY(), QCOMPARE() */ /*! \macro QCOMPARE(actual, expected) \relates QTest The QCOMPARE macro compares an \a actual value to an \a expected value using the equals operator. If \a actual and \a expected are identical, execution continues. If not, a failure is recorded in the test log and the test won't be executed further. In the case of comparing floats and doubles, qFuzzyCompare() is used for comparing. This means that comparing to 0 will likely fail. One solution to this is to compare to 1, and add 1 to the produced output. QCOMPARE tries to output the contents of the values if the comparison fails, so it is visible from the test log why the comparison failed. QCOMPARE is very strict on the data types. Both \a actual and \a expected have to be of the same type, otherwise the test won't compile. This prohibits unspecified behavior from being introduced; that is behavior that usually occurs when the compiler implicitly casts the argument. For your own classes, you can use \l QTest::toString() to format values for outputting into the test log. \note This macro can only be used in a test function that is invoked by the test framework. Example: \snippet code/src_qtestlib_qtestcase.cpp 2 \sa QVERIFY(), QTRY_COMPARE(), QTest::toString() */ /*! \macro QVERIFY_EXCEPTION_THROWN(expression, exceptiontype) \since 5.3 \relates QTest The QVERIFY_EXCEPTION_THROWN macro executes an \a expression and tries to catch an exception thrown from the \a expression. If the \a expression throws an exception and its type is the same as \a exceptiontype or \a exceptiontype is substitutable with the type of thrown exception (i.e. usually the type of thrown exception is publically derived from \a exceptiontype) then execution will be continued. If not-substitutable type of exception is thrown or the \a expression doesn't throw an exception at all, then a failure will be recorded in the test log and the test won't be executed further. \note This macro can only be used in a test function that is invoked by the test framework. */ /*! \macro QTRY_VERIFY_WITH_TIMEOUT(condition, timeout) \since 5.0 \relates QTest The QTRY_VERIFY_WITH_TIMEOUT() macro is similar to QVERIFY(), but checks the \a condition repeatedly, until either the condition becomes true or the \a timeout (in milliseconds) is reached. Between each evaluation, events will be processed. If the timeout is reached, a failure is recorded in the test log and the test won't be executed further. \note This macro can only be used in a test function that is invoked by the test framework. \sa QTRY_VERIFY(), QTRY_VERIFY2_WITH_TIMEOUT(), QVERIFY(), QCOMPARE(), QTRY_COMPARE() */ /*! \macro QTRY_VERIFY(condition) \since 5.0 \relates QTest Checks the \a condition by invoking QTRY_VERIFY_WITH_TIMEOUT() with a timeout of five seconds. \note This macro can only be used in a test function that is invoked by the test framework. \sa QTRY_VERIFY_WITH_TIMEOUT(), QTRY_VERIFY2(), QVERIFY(), QCOMPARE(), QTRY_COMPARE() */ /*! \macro QTRY_VERIFY2_WITH_TIMEOUT(condition, message, timeout) \since 5.6 \relates QTest The QTRY_VERIFY2_WITH_TIMEOUT macro is similar to QTRY_VERIFY_WITH_TIMEOUT() except that it outputs a verbose \a message when \a condition is still false after the specified \a timeout (in milliseconds). The \a message is a plain C string. Example: \code QTRY_VERIFY2_WITH_TIMEOUT(list.size() > 2, QByteArray::number(list.size()).constData(), 10000); \endcode \note This macro can only be used in a test function that is invoked by the test framework. \sa QTRY_VERIFY(), QTRY_VERIFY_WITH_TIMEOUT(), QVERIFY(), QCOMPARE(), QTRY_COMPARE() */ /*! \macro QTRY_VERIFY2(condition, message) \since 5.6 \relates QTest Checks the \a condition by invoking QTRY_VERIFY2_WITH_TIMEOUT() with a timeout of five seconds. If \a condition is then still false, \a message is output. The \a message is a plain C string. Example: \code QTRY_VERIFY2_WITH_TIMEOUT(list.size() > 2, QByteArray::number(list.size()).constData()); \endcode \note This macro can only be used in a test function that is invoked by the test framework. \sa QTRY_VERIFY2_WITH_TIMEOUT(), QTRY_VERIFY2(), QVERIFY(), QCOMPARE(), QTRY_COMPARE() */ /*! \macro QTRY_COMPARE_WITH_TIMEOUT(actual, expected, timeout) \since 5.0 \relates QTest The QTRY_COMPARE_WITH_TIMEOUT() macro is similar to QCOMPARE(), but performs the comparison of the \a actual and \a expected values repeatedly, until either the two values are equal or the \a timeout (in milliseconds) is reached. Between each comparison, events will be processed. If the timeout is reached, a failure is recorded in the test log and the test won't be executed further. \note This macro can only be used in a test function that is invoked by the test framework. \sa QTRY_COMPARE(), QCOMPARE(), QVERIFY(), QTRY_VERIFY() */ /*! \macro QTRY_COMPARE(actual, expected) \since 5.0 \relates QTest Performs a comparison of the \a actual and \a expected values by invoking QTRY_COMPARE_WITH_TIMEOUT() with a timeout of five seconds. \note This macro can only be used in a test function that is invoked by the test framework. \sa QTRY_COMPARE_WITH_TIMEOUT(), QCOMPARE(), QVERIFY(), QTRY_VERIFY() */ /*! \macro QFETCH(type, name) \relates QTest The fetch macro creates a local variable named \a name with the type \a type on the stack. \a name has to match the element name from the test's data. If no such element exists, the test will assert. Assuming a test has the following data: \snippet code/src_qtestlib_qtestcase.cpp 3 The test data has two elements, a QString called \c aString and an integer called \c expected. To fetch these values in the actual test: \snippet code/src_qtestlib_qtestcase.cpp 4 \c aString and \c expected are variables on the stack that are initialized with the current test data. \b {Note:} This macro can only be used in a test function that is invoked by the test framework. The test function must have a _data function. */ /*! \macro QWARN(message) \relates QTest \threadsafe Appends \a message as a warning to the test log. This macro can be used anywhere in your tests. */ /*! \macro QFAIL(message) \relates QTest This macro can be used to force a test failure. The test stops executing and the failure \a message is appended to the test log. \b {Note:} This macro can only be used in a test function that is invoked by the test framework. Example: \snippet code/src_qtestlib_qtestcase.cpp 5 */ /*! \macro QTEST(actual, testElement) \relates QTest QTEST() is a convenience macro for \l QCOMPARE() that compares the value \a actual with the element \a testElement from the test's data. If there is no such element, the test asserts. Apart from that, QTEST() behaves exactly as \l QCOMPARE(). Instead of writing: \snippet code/src_qtestlib_qtestcase.cpp 6 you can write: \snippet code/src_qtestlib_qtestcase.cpp 7 \sa QCOMPARE() */ /*! \macro QSKIP(description) \relates QTest If called from a test function, the QSKIP() macro stops execution of the test without adding a failure to the test log. You can use it to skip tests that wouldn't make sense in the current configuration. The text \a description is appended to the test log and should contain an explanation of why the test couldn't be executed. If the test is data-driven, each call to QSKIP() will skip only the current row of test data, so an unconditional call to QSKIP will produce one skip message in the test log for each row of test data. If called from a _data function, the QSKIP() macro will stop execution of the _data function and will prevent execution of the associated test function. If called from initTestCase() or initTestCase_data(), the QSKIP() macro will skip all test and _data functions. \b {Note:} This macro can only be used in a test function or _data function that is invoked by the test framework. Example: \snippet code/src_qtestlib_qtestcase.cpp 8 */ /*! \macro QEXPECT_FAIL(dataIndex, comment, mode) \relates QTest The QEXPECT_FAIL() macro marks the next \l QCOMPARE() or \l QVERIFY() as an expected failure. Instead of adding a failure to the test log, an expected failure will be reported. If a \l QVERIFY() or \l QCOMPARE() is marked as an expected failure, but passes instead, an unexpected pass (XPASS) is written to the test log. The parameter \a dataIndex describes for which entry in the test data the failure is expected. Pass an empty string (\c{""}) if the failure is expected for all entries or if no test data exists. \a comment will be appended to the test log for the expected failure. \a mode is a \l QTest::TestFailMode and sets whether the test should continue to execute or not. \b {Note:} This macro can only be used in a test function that is invoked by the test framework. Example 1: \snippet code/src_qtestlib_qtestcase.cpp 9 In the example above, an expected fail will be written into the test output if the variable \c i is not 42. If the variable \c i is 42, an unexpected pass is written instead. The QEXPECT_FAIL() has no influence on the second QCOMPARE() statement in the example. Example 2: \snippet code/src_qtestlib_qtestcase.cpp 10 The above testfunction will not continue executing for the test data entry \c{data27}. \sa QTest::TestFailMode, QVERIFY(), QCOMPARE() */ /*! \macro QFINDTESTDATA(filename) \since 5.0 \relates QTest Returns a QString for the testdata file referred to by \a filename, or an empty QString if the testdata file could not be found. This macro allows the test to load data from an external file without hardcoding an absolute filename into the test, or using relative paths which may be error prone. The returned path will be the first path from the following list which resolves to an existing file or directory: \list \li \a filename relative to QCoreApplication::applicationDirPath() (only if a QCoreApplication or QApplication object has been created). \li \a filename relative to the test's standard install directory (QLibraryInfo::TestsPath with the lowercased testcase name appended). \li \a filename relative to the directory containing the source file from which QFINDTESTDATA is invoked. \endlist If the named file/directory does not exist at any of these locations, a warning is printed to the test log. For example, in this code: \snippet code/src_qtestlib_qtestcase.cpp 26 The testdata file will be resolved as the first existing file from: \list \li \c{/home/user/build/myxmlparser/tests/tst_myxmlparser/testxml/simple1.xml} \li \c{/usr/local/Qt-5.0.0/tests/tst_myxmlparser/testxml/simple1.xml} \li \c{/home/user/sources/myxmlparser/tests/tst_myxmlparser/testxml/simple1.xml} \endlist This allows the test to find its testdata regardless of whether the test has been installed, and regardless of whether the test's build tree is equal to the test's source tree. \b {Note:} reliable detection of testdata from the source directory requires either that qmake is used, or the \c{QT_TESTCASE_BUILDDIR} macro is defined to point to the working directory from which the compiler is invoked, or only absolute paths to the source files are passed to the compiler. Otherwise, the absolute path of the source directory cannot be determined. \b {Note:} For tests that use the \l QTEST_APPLESS_MAIN() macro to generate a \c{main()} function, \c{QFINDTESTDATA} will not attempt to find test data relative to QCoreApplication::applicationDirPath(). In practice, this means that tests using \c{QTEST_APPLESS_MAIN()} will fail to find their test data if run from a shadow build tree. */ /*! \macro QTEST_MAIN(TestClass) \relates QTest Implements a main() function that instantiates an application object and the \a TestClass, and executes all tests in the order they were defined. Use this macro to build stand-alone executables. If \c QT_WIDGETS_LIB is defined, the application object will be a QApplication, if \c QT_GUI_LIB is defined, the application object will be a QGuiApplication, otherwise it will be a QCoreApplication. If qmake is used and the configuration includes \c{QT += widgets}, then \c QT_WIDGETS_LIB will be defined automatically. Similarly, if qmake is used and the configuration includes \c{QT += gui}, then \c QT_GUI_LIB will be defined automatically. \b {Note:} On platforms that have keypad navigation enabled by default, this macro will forcefully disable it if \c QT_WIDGETS_LIB is defined. This is done to simplify the usage of key events when writing autotests. If you wish to write a test case that uses keypad navigation, you should enable it either in the \c {initTestCase()} or \c {init()} functions of your test case by calling \l {QApplication::setNavigationMode()}. Example: \snippet code/src_qtestlib_qtestcase.cpp 11 \sa QTEST_APPLESS_MAIN(), QTEST_GUILESS_MAIN(), QTest::qExec(), QApplication::setNavigationMode() */ /*! \macro QTEST_APPLESS_MAIN(TestClass) \relates QTest Implements a main() function that executes all tests in \a TestClass. Behaves like \l QTEST_MAIN(), but doesn't instantiate a QApplication object. Use this macro for really simple stand-alone non-GUI tests. \sa QTEST_MAIN() */ /*! \macro QTEST_GUILESS_MAIN(TestClass) \since 5.0 \relates QTest Implements a main() function that instantiates a QCoreApplication object and the \a TestClass, and executes all tests in the order they were defined. Use this macro to build stand-alone executables. Behaves like \l QTEST_MAIN(), but instantiates a QCoreApplication instead of the QApplication object. Use this macro if your test case doesn't need functionality offered by QApplication, but the event loop is still necessary. \sa QTEST_MAIN() */ /*! \macro QBENCHMARK \relates QTest This macro is used to measure the performance of code within a test. The code to be benchmarked is contained within a code block following this macro. For example: \snippet code/src_qtestlib_qtestcase.cpp 27 \sa {Qt Test Overview#Creating a Benchmark}{Creating a Benchmark}, {Chapter 5: Writing a Benchmark}{Writing a Benchmark} */ /*! \macro QBENCHMARK_ONCE \since 4.6 \relates QTest \brief The QBENCHMARK_ONCE macro is for measuring performance of a code block by running it once. This macro is used to measure the performance of code within a test. The code to be benchmarked is contained within a code block following this macro. Unlike QBENCHMARK, the contents of the contained code block is only run once. The elapsed time will be reported as "0" if it's to short to be measured by the selected backend. (Use) \sa {Qt Test Overview#Creating a Benchmark}{Creating a Benchmark}, {Chapter 5: Writing a Benchmark}{Writing a Benchmark} */ /*! \enum QTest::TestFailMode This enum describes the modes for handling an expected failure of the \l QVERIFY() or \l QCOMPARE() macros. \value Abort Aborts the execution of the test. Use this mode when it doesn't make sense to execute the test any further after the expected failure. \value Continue Continues execution of the test after the expected failure. \sa QEXPECT_FAIL() */ /*! \enum QTest::KeyAction This enum describes possible actions for key handling. \value Press The key is pressed. \value Release The key is released. \value Click The key is clicked (pressed and released). \value Shortcut A shortcut is activated. This value has been added in Qt 5.6. */ /*! \enum QTest::MouseAction This enum describes possible actions for mouse handling. \value MousePress A mouse button is pressed. \value MouseRelease A mouse button is released. \value MouseClick A mouse button is clicked (pressed and released). \value MouseDClick A mouse button is double clicked (pressed and released twice). \value MouseMove The mouse pointer has moved. */ /*! \fn void QTest::keyClick(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1) Simulates clicking of \a key with an optional \a modifier on a \a widget. If \a delay is larger than 0, the test will wait for \a delay milliseconds before clicking the key. Examples: \snippet code/src_qtestlib_qtestcase.cpp 14 The first example above simulates clicking the \c escape key on \c myWidget without any keyboard modifiers and without delay. The second example simulates clicking \c shift-escape on \c myWidget following a 200 ms delay of the test. \sa QTest::keyClicks() */ /*! \fn void QTest::keyClick(QWidget *widget, char key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1) \overload Simulates clicking of \a key with an optional \a modifier on a \a widget. If \a delay is larger than 0, the test will wait for \a delay milliseconds before clicking the key. Example: \snippet code/src_qtestlib_qtestcase.cpp 13 The example above simulates clicking \c a on \c myWidget without any keyboard modifiers and without delay of the test. \sa QTest::keyClicks() */ /*! \fn void QTest::keyClick(QWindow *window, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1) \overload \since 5.0 Simulates clicking of \a key with an optional \a modifier on a \a window. If \a delay is larger than 0, the test will wait for \a delay milliseconds before clicking the key. Examples: \snippet code/src_qtestlib_qtestcase.cpp 29 The first example above simulates clicking the \c escape key on \c myWindow without any keyboard modifiers and without delay. The second example simulates clicking \c shift-escape on \c myWindow following a 200 ms delay of the test. \sa QTest::keyClicks() */ /*! \fn void QTest::keyClick(QWindow *window, char key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1) \overload \since 5.0 Simulates clicking of \a key with an optional \a modifier on a \a window. If \a delay is larger than 0, the test will wait for \a delay milliseconds before clicking the key. Example: \snippet code/src_qtestlib_qtestcase.cpp 28 The example above simulates clicking \c a on \c myWindow without any keyboard modifiers and without delay of the test. \sa QTest::keyClicks() */ /*! \fn void QTest::keyEvent(KeyAction action, QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1) Sends a Qt key event to \a widget with the given \a key and an associated \a action. Optionally, a keyboard \a modifier can be specified, as well as a \a delay (in milliseconds) of the test before sending the event. */ /*! \fn void QTest::keyEvent(KeyAction action, QWidget *widget, char ascii, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1) \overload Sends a Qt key event to \a widget with the given key \a ascii and an associated \a action. Optionally, a keyboard \a modifier can be specified, as well as a \a delay (in milliseconds) of the test before sending the event. */ /*! \fn void QTest::keyEvent(KeyAction action, QWindow *window, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1) \overload \since 5.0 Sends a Qt key event to \a window with the given \a key and an associated \a action. Optionally, a keyboard \a modifier can be specified, as well as a \a delay (in milliseconds) of the test before sending the event. */ /*! \fn void QTest::keyEvent(KeyAction action, QWindow *window, char ascii, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1) \overload \since 5.0 Sends a Qt key event to \a window with the given key \a ascii and an associated \a action. Optionally, a keyboard \a modifier can be specified, as well as a \a delay (in milliseconds) of the test before sending the event. */ /*! \fn void QTest::keyPress(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1) Simulates pressing a \a key with an optional \a modifier on a \a widget. If \a delay is larger than 0, the test will wait for \a delay milliseconds before pressing the key. \b {Note:} At some point you should release the key using \l keyRelease(). \sa QTest::keyRelease(), QTest::keyClick() */ /*! \fn void QTest::keyPress(QWidget *widget, char key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1) \overload Simulates pressing a \a key with an optional \a modifier on a \a widget. If \a delay is larger than 0, the test will wait for \a delay milliseconds before pressing the key. \b {Note:} At some point you should release the key using \l keyRelease(). \sa QTest::keyRelease(), QTest::keyClick() */ /*! \fn void QTest::keyPress(QWindow *window, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1) \overload \since 5.0 Simulates pressing a \a key with an optional \a modifier on a \a window. If \a delay is larger than 0, the test will wait for \a delay milliseconds before pressing the key. \b {Note:} At some point you should release the key using \l keyRelease(). \sa QTest::keyRelease(), QTest::keyClick() */ /*! \fn void QTest::keyPress(QWindow *window, char key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1) \overload \since 5.0 Simulates pressing a \a key with an optional \a modifier on a \a window. If \a delay is larger than 0, the test will wait for \a delay milliseconds before pressing the key. \b {Note:} At some point you should release the key using \l keyRelease(). \sa QTest::keyRelease(), QTest::keyClick() */ /*! \fn void QTest::keyRelease(QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1) Simulates releasing a \a key with an optional \a modifier on a \a widget. If \a delay is larger than 0, the test will wait for \a delay milliseconds before releasing the key. \sa QTest::keyPress(), QTest::keyClick() */ /*! \fn void QTest::keyRelease(QWidget *widget, char key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1) \overload Simulates releasing a \a key with an optional \a modifier on a \a widget. If \a delay is larger than 0, the test will wait for \a delay milliseconds before releasing the key. \sa QTest::keyClick() */ /*! \fn void QTest::keyRelease(QWindow *window, Qt::Key key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1) \overload \since 5.0 Simulates releasing a \a key with an optional \a modifier on a \a window. If \a delay is larger than 0, the test will wait for \a delay milliseconds before releasing the key. \sa QTest::keyPress(), QTest::keyClick() */ /*! \fn void QTest::keyRelease(QWindow *window, char key, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1) \overload \since 5.0 Simulates releasing a \a key with an optional \a modifier on a \a window. If \a delay is larger than 0, the test will wait for \a delay milliseconds before releasing the key. \sa QTest::keyClick() */ /*! \fn void QTest::keyClicks(QWidget *widget, const QString &sequence, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay=-1) Simulates clicking a \a sequence of keys on a \a widget. Optionally, a keyboard \a modifier can be specified as well as a \a delay (in milliseconds) of the test before each key click. Example: \snippet code/src_qtestlib_qtestcase.cpp 15 The example above simulates clicking the sequence of keys representing "hello world" on \c myWidget without any keyboard modifiers and without delay of the test. \sa QTest::keyClick() */ /*! \fn void QTest::waitForEvents() \internal */ /*! \fn void QTest::mouseEvent(MouseAction action, QWidget *widget, Qt::MouseButton button, Qt::KeyboardModifiers stateKey, QPoint pos, int delay=-1) \internal */ /*! \fn void QTest::mouseEvent(MouseAction action, QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey, QPoint pos, int delay=-1) \internal */ /*! \fn void QTest::mousePress(QWidget *widget, Qt::MouseButton button, Qt::KeyboardModifiers modifier = 0, QPoint pos = QPoint(), int delay=-1) Simulates pressing a mouse \a button with an optional \a modifier on a \a widget. The position is defined by \a pos; the default position is the center of the widget. If \a delay is specified, the test will wait for the specified amount of milliseconds before the press. \sa QTest::mouseRelease(), QTest::mouseClick() */ /*! \fn void QTest::mousePress(QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey = 0, QPoint pos = QPoint(), int delay=-1) \overload \since 5.0 Simulates pressing a mouse \a button with an optional \a stateKey modifier on a \a window. The position is defined by \a pos; the default position is the center of the window. If \a delay is specified, the test will wait for the specified amount of milliseconds before the press. \sa QTest::mouseRelease(), QTest::mouseClick() */ /*! \fn void QTest::mouseRelease(QWidget *widget, Qt::MouseButton button, Qt::KeyboardModifiers modifier = 0, QPoint pos = QPoint(), int delay=-1) Simulates releasing a mouse \a button with an optional \a modifier on a \a widget. The position of the release is defined by \a pos; the default position is the center of the widget. If \a delay is specified, the test will wait for the specified amount of milliseconds before releasing the button. \sa QTest::mousePress(), QTest::mouseClick() */ /*! \fn void QTest::mouseRelease(QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey = 0, QPoint pos = QPoint(), int delay=-1) \overload \since 5.0 Simulates releasing a mouse \a button with an optional \a stateKey modifier on a \a window. The position of the release is defined by \a pos; the default position is the center of the window. If \a delay is specified, the test will wait for the specified amount of milliseconds before releasing the button. \sa QTest::mousePress(), QTest::mouseClick() */ /*! \fn void QTest::mouseClick(QWidget *widget, Qt::MouseButton button, Qt::KeyboardModifiers modifier = 0, QPoint pos = QPoint(), int delay=-1) Simulates clicking a mouse \a button with an optional \a modifier on a \a widget. The position of the click is defined by \a pos; the default position is the center of the widget. If \a delay is specified, the test will wait for the specified amount of milliseconds before pressing and before releasing the button. \sa QTest::mousePress(), QTest::mouseRelease() */ /*! \fn void QTest::mouseClick(QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey = 0, QPoint pos = QPoint(), int delay=-1) \overload \since 5.0 Simulates clicking a mouse \a button with an optional \a stateKey modifier on a \a window. The position of the click is defined by \a pos; the default position is the center of the window. If \a delay is specified, the test will wait for the specified amount of milliseconds before pressing and before releasing the button. \sa QTest::mousePress(), QTest::mouseRelease() */ /*! \fn void QTest::mouseDClick(QWidget *widget, Qt::MouseButton button, Qt::KeyboardModifiers modifier = 0, QPoint pos = QPoint(), int delay=-1) Simulates double clicking a mouse \a button with an optional \a modifier on a \a widget. The position of the click is defined by \a pos; the default position is the center of the widget. If \a delay is specified, the test will wait for the specified amount of milliseconds before each press and release. \sa QTest::mouseClick() */ /*! \fn void QTest::mouseDClick(QWindow *window, Qt::MouseButton button, Qt::KeyboardModifiers stateKey = 0, QPoint pos = QPoint(), int delay=-1) \overload \since 5.0 Simulates double clicking a mouse \a button with an optional \a stateKey modifier on a \a window. The position of the click is defined by \a pos; the default position is the center of the window. If \a delay is specified, the test will wait for the specified amount of milliseconds before each press and release. \sa QTest::mouseClick() */ /*! \fn void QTest::mouseMove(QWidget *widget, QPoint pos = QPoint(), int delay=-1) Moves the mouse pointer to a \a widget. If \a pos is not specified, the mouse pointer moves to the center of the widget. If a \a delay (in milliseconds) is given, the test will wait before moving the mouse pointer. */ /*! \fn void QTest::mouseMove(QWindow *window, QPoint pos = QPoint(), int delay=-1) \overload \since 5.0 Moves the mouse pointer to a \a window. If \a pos is not specified, the mouse pointer moves to the center of the window. If a \a delay (in milliseconds) is given, the test will wait before moving the mouse pointer. */ /*! \fn char *QTest::toString(const T &value) Returns a textual representation of \a value. This function is used by \l QCOMPARE() to output verbose information in case of a test failure. You can add specializations or overloads of this function to your test to enable verbose output. \b {Note:} Starting with Qt 5.5, you should prefer to provide a toString() function in the type's namespace instead of specializing this template. If your code needs to continue to work with the QTestLib from Qt 5.4 or earlier, you need to continue to use specialization. \b {Note:} The caller of toString() must delete the returned data using \c{delete[]}. Your implementation should return a string created with \c{new[]} or qstrdup(). The easiest way to do so is to create a QByteArray or QString and calling QTest::toString() on it (see second example below). Example for specializing (Qt ≤ 5.4): \snippet code/src_qtestlib_qtestcase.cpp 16 The example above defines a toString() specialization for a class called \c MyPoint. Whenever a comparison of two instances of \c MyPoint fails, \l QCOMPARE() will call this function to output the contents of \c MyPoint to the test log. Same example, but with overloading (Qt ≥ 5.5): \snippet code/src_qtestlib_qtestcase.cpp toString-overload \sa QCOMPARE() */ /*! \fn char *QTest::toString(const QLatin1String &string) \overload Returns a textual representation of the given \a string. */ /*! \fn char *QTest::toString(const QString &string) \overload Returns a textual representation of the given \a string. */ /*! \fn char *QTest::toString(const QByteArray &ba) \overload Returns a textual representation of the byte array \a ba. \sa QTest::toHexRepresentation() */ /*! \fn char *QTest::toString(const QTime &time) \overload Returns a textual representation of the given \a time. */ /*! \fn char *QTest::toString(const QDate &date) \overload Returns a textual representation of the given \a date. */ /*! \fn char *QTest::toString(const QDateTime &dateTime) \overload Returns a textual representation of the date and time specified by \a dateTime. */ /*! \fn char *QTest::toString(const QChar &character) \overload Returns a textual representation of the given \a character. */ /*! \fn char *QTest::toString(const QPoint &point) \overload Returns a textual representation of the given \a point. */ /*! \fn char *QTest::toString(const QSize &size) \overload Returns a textual representation of the given \a size. */ /*! \fn char *QTest::toString(const QRect &rectangle) \overload Returns a textual representation of the given \a rectangle. */ /*! \fn char *QTest::toString(const QUrl &url) \since 4.4 \overload Returns a textual representation of the given \a url. */ /*! \fn char *QTest::toString(const QPointF &point) \overload Returns a textual representation of the given \a point. */ /*! \fn char *QTest::toString(const QSizeF &size) \overload Returns a textual representation of the given \a size. */ /*! \fn char *QTest::toString(const QRectF &rectangle) \overload Returns a textual representation of the given \a rectangle. */ /*! \fn char *QTest::toString(const QVariant &variant) \overload Returns a textual representation of the given \a variant. */ /*! \fn char *QTest::toString(QSizePolicy::ControlType ct) \overload \since 5.5 Returns a textual representation of control type \a ct. */ /*! \fn char *QTest::toString(QSizePolicy::ControlTypes cts) \overload \since 5.5 Returns a textual representation of control types \a cts. */ /*! \fn char *QTest::toString(QSizePolicy::Policy p) \overload \since 5.5 Returns a textual representation of policy \a p. */ /*! \fn char *QTest::toString(QSizePolicy sp) \overload \since 5.5 Returns a textual representation of size policy \a sp. */ /*! \fn void QTest::qWait(int ms) Waits for \a ms milliseconds. While waiting, events will be processed and your test will stay responsive to user interface events or network communication. Example: \snippet code/src_qtestlib_qtestcase.cpp 17 The code above will wait until the network server is responding for a maximum of about 12.5 seconds. \sa QTest::qSleep(), QSignalSpy::wait() */ /*! \fn bool QTest::qWaitForWindowExposed(QWindow *window, int timeout) \since 5.0 Waits for \a timeout milliseconds or until the \a window is exposed. Returns \c true if \c window is exposed within \a timeout milliseconds, otherwise returns \c false. This is mainly useful for asynchronous systems like X11, where a window will be mapped to screen some time after being asked to show itself on the screen. \sa QTest::qWaitForWindowActive(), QWindow::isExposed() */ /*! \fn bool QTest::qWaitForWindowActive(QWindow *window, int timeout) \since 5.0 Waits for \a timeout milliseconds or until the \a window is active. Returns \c true if \c window is active within \a timeout milliseconds, otherwise returns \c false. \sa QTest::qWaitForWindowExposed(), QWindow::isActive() */ /*! \fn bool QTest::qWaitForWindowExposed(QWidget *widget, int timeout) \since 5.0 Waits for \a timeout milliseconds or until the \a widget's window is exposed. Returns \c true if \c widget's window is exposed within \a timeout milliseconds, otherwise returns \c false. This is mainly useful for asynchronous systems like X11, where a window will be mapped to screen some time after being asked to show itself on the screen. \sa QTest::qWaitForWindowActive() */ /*! \fn bool QTest::qWaitForWindowActive(QWidget *widget, int timeout) \since 5.0 Waits for \a timeout milliseconds or until the \a widget's window is active. Returns \c true if \c widget's window is active within \a timeout milliseconds, otherwise returns \c false. \sa QTest::qWaitForWindowExposed(), QWidget::isActiveWindow() */ /*! \fn bool QTest::qWaitForWindowShown(QWidget *widget, int timeout) \since 5.0 \deprecated Waits for \a timeout milliseconds or until the \a widget's window is exposed. Returns \c true if \c widget's window is exposed within \a timeout milliseconds, otherwise returns \c false. This function does the same as qWaitForWindowExposed(). Example: \snippet code/src_qtestlib_qtestcase.cpp 24 \sa QTest::qWaitForWindowActive(), QTest::qWaitForWindowExposed() */ /*! \class QTest::QTouchEventSequence \inmodule QtTest \since 4.6 \brief The QTouchEventSequence class is used to simulate a sequence of touch events. To simulate a sequence of touch events on a specific device for a window or widget, call QTest::touchEvent to create a QTouchEventSequence instance. Add touch events to the sequence by calling press(), move(), release() and stationary(), and let the instance run out of scope to commit the sequence to the event system. Example: \snippet code/src_qtestlib_qtestcase.cpp 25 */ /*! \fn QTest::QTouchEventSequence::~QTouchEventSequence() Commits this sequence of touch events, unless autoCommit was disabled, and frees allocated resources. */ /*! \fn void QTest::QTouchEventSequence::commit(bool processEvents) Commits this sequence of touch events to the event system. Normally there is no need to call this function because it is called from the destructor. However, if autoCommit is disabled, the events only get committed upon explicitly calling this function. In special cases tests may want to disable the processing of the events. This can be achieved by setting \a processEvents to false. This results in merely queuing the events, the event loop will not be forced to process them. */ /*! \fn QTouchEventSequence &QTest::QTouchEventSequence::press(int touchId, const QPoint &pt, QWindow *window) \since 5.0 Adds a press event for touchpoint \a touchId at position \a pt to this sequence and returns a reference to this QTouchEventSequence. The position \a pt is interpreted as relative to \a window. If \a window is the null pointer, then \a pt is interpreted as relative to the window provided when instantiating this QTouchEventSequence. Simulates that the user pressed the touch screen or pad with the finger identified by \a touchId. */ /*! \fn QTouchEventSequence &QTest::QTouchEventSequence::press(int touchId, const QPoint &pt, QWidget *widget) Adds a press event for touchpoint \a touchId at position \a pt to this sequence and returns a reference to this QTouchEventSequence. The position \a pt is interpreted as relative to \a widget. If \a widget is the null pointer, then \a pt is interpreted as relative to the widget provided when instantiating this QTouchEventSequence. Simulates that the user pressed the touch screen or pad with the finger identified by \a touchId. */ /*! \fn QTouchEventSequence &QTest::QTouchEventSequence::move(int touchId, const QPoint &pt, QWindow *window) \since 5.0 Adds a move event for touchpoint \a touchId at position \a pt to this sequence and returns a reference to this QTouchEventSequence. The position \a pt is interpreted as relative to \a window. If \a window is the null pointer, then \a pt is interpreted as relative to the window provided when instantiating this QTouchEventSequence. Simulates that the user moved the finger identified by \a touchId. */ /*! \fn QTouchEventSequence &QTest::QTouchEventSequence::move(int touchId, const QPoint &pt, QWidget *widget) Adds a move event for touchpoint \a touchId at position \a pt to this sequence and returns a reference to this QTouchEventSequence. The position \a pt is interpreted as relative to \a widget. If \a widget is the null pointer, then \a pt is interpreted as relative to the widget provided when instantiating this QTouchEventSequence. Simulates that the user moved the finger identified by \a touchId. */ /*! \fn QTouchEventSequence &QTest::QTouchEventSequence::release(int touchId, const QPoint &pt, QWindow *window) \since 5.0 Adds a release event for touchpoint \a touchId at position \a pt to this sequence and returns a reference to this QTouchEventSequence. The position \a pt is interpreted as relative to \a window. If \a window is the null pointer, then \a pt is interpreted as relative to the window provided when instantiating this QTouchEventSequence. Simulates that the user lifted the finger identified by \a touchId. */ /*! \fn QTouchEventSequence &QTest::QTouchEventSequence::release(int touchId, const QPoint &pt, QWidget *widget) Adds a release event for touchpoint \a touchId at position \a pt to this sequence and returns a reference to this QTouchEventSequence. The position \a pt is interpreted as relative to \a widget. If \a widget is the null pointer, then \a pt is interpreted as relative to the widget provided when instantiating this QTouchEventSequence. Simulates that the user lifted the finger identified by \a touchId. */ /*! \fn QTouchEventSequence &QTest::QTouchEventSequence::stationary(int touchId) Adds a stationary event for touchpoint \a touchId to this sequence and returns a reference to this QTouchEventSequence. Simulates that the user did not move the finger identified by \a touchId. */ /*! \fn QTouchEventSequence QTest::touchEvent(QWindow *window, QTouchDevice *device, bool autoCommit) \since 5.0 Creates and returns a QTouchEventSequence for the \a device to simulate events for \a window. When adding touch events to the sequence, \a window will also be used to translate the position provided to screen coordinates, unless another window is provided in the respective calls to press(), move() etc. The touch events are committed to the event system when the destructor of the QTouchEventSequence is called (ie when the object returned runs out of scope), unless \a autoCommit is set to false. When \a autoCommit is false, commit() has to be called manually. */ /*! \fn QTouchEventSequence QTest::touchEvent(QWidget *widget, QTouchDevice *device, bool autoCommit) Creates and returns a QTouchEventSequence for the \a device to simulate events for \a widget. When adding touch events to the sequence, \a widget will also be used to translate the position provided to screen coordinates, unless another widget is provided in the respective calls to press(), move() etc. The touch events are committed to the event system when the destructor of the QTouchEventSequence is called (ie when the object returned runs out of scope), unless \a autoCommit is set to false. When \a autoCommit is false, commit() has to be called manually. */ static bool installCoverageTool(const char * appname, const char * testname) { #ifdef __COVERAGESCANNER__ if (!qEnvironmentVariableIsEmpty("QT_TESTCOCOON_ACTIVE")) return false; // Set environment variable QT_TESTCOCOON_ACTIVE to prevent an eventual subtest from // being considered as a stand-alone test regarding the coverage analysis. qputenv("QT_TESTCOCOON_ACTIVE", "1"); // Install Coverage Tool __coveragescanner_install(appname); __coveragescanner_testname(testname); __coveragescanner_clear(); return true; #else Q_UNUSED(appname); Q_UNUSED(testname); return false; #endif } namespace QTest { static QObject *currentTestObject = 0; static QString mainSourcePath; class TestFunction { public: TestFunction() : function_(-1), data_(0) {} void set(int function, char *data) { function_ = function; data_ = data; } char *data() const { return data_; } int function() const { return function_; } ~TestFunction() { delete[] data_; } private: int function_; char *data_; }; /** * Contains the list of test functions that was supplied * on the command line, if any. Hence, if not empty, * those functions should be run instead of * all appearing in the test case. */ static TestFunction * testFuncs = 0; static int testFuncCount = 0; /** Don't leak testFuncs on exit even on error */ static struct TestFuncCleanup { void cleanup() { delete[] testFuncs; testFuncCount = 0; testFuncs = 0; } ~TestFuncCleanup() { cleanup(); } } testFuncCleaner; static int keyDelay = -1; static int mouseDelay = -1; static int eventDelay = -1; static int timeout = -1; static bool noCrashHandler = false; /*! \internal Invoke a method of the object without generating warning if the method does not exist */ static void invokeMethod(QObject *obj, const char *methodName) { const QMetaObject *metaObject = obj->metaObject(); int funcIndex = metaObject->indexOfMethod(methodName); if (funcIndex >= 0) { QMetaMethod method = metaObject->method(funcIndex); method.invoke(obj, Qt::DirectConnection); } } int defaultEventDelay() { if (eventDelay == -1) { const QByteArray env = qgetenv("QTEST_EVENT_DELAY"); if (!env.isEmpty()) eventDelay = atoi(env.constData()); else eventDelay = 0; } return eventDelay; } int Q_TESTLIB_EXPORT defaultMouseDelay() { if (mouseDelay == -1) { const QByteArray env = qgetenv("QTEST_MOUSEEVENT_DELAY"); if (!env.isEmpty()) mouseDelay = atoi(env.constData()); else mouseDelay = defaultEventDelay(); } return mouseDelay; } int Q_TESTLIB_EXPORT defaultKeyDelay() { if (keyDelay == -1) { const QByteArray env = qgetenv("QTEST_KEYEVENT_DELAY"); if (!env.isEmpty()) keyDelay = atoi(env.constData()); else keyDelay = defaultEventDelay(); } return keyDelay; } static int defaultTimeout() { if (timeout == -1) { bool ok = false; timeout = qEnvironmentVariableIntValue("QTEST_FUNCTION_TIMEOUT", &ok); if (!ok || timeout <= 0) timeout = 5*60*1000; } return timeout; } static bool isValidSlot(const QMetaMethod &sl) { if (sl.access() != QMetaMethod::Private || sl.parameterCount() != 0 || sl.returnType() != QMetaType::Void || sl.methodType() != QMetaMethod::Slot) return false; QByteArray name = sl.name(); if (name.isEmpty()) return false; if (name.endsWith("_data")) return false; if (name == "initTestCase" || name == "cleanupTestCase" || name == "cleanup" || name == "init") return false; return true; } Q_TESTLIB_EXPORT bool printAvailableFunctions = false; Q_TESTLIB_EXPORT QStringList testFunctions; Q_TESTLIB_EXPORT QStringList testTags; static void qPrintTestSlots(FILE *stream, const char *filter = 0) { for (int i = 0; i < QTest::currentTestObject->metaObject()->methodCount(); ++i) { QMetaMethod sl = QTest::currentTestObject->metaObject()->method(i); if (isValidSlot(sl)) { const QByteArray signature = sl.methodSignature(); if (!filter || QString::fromLatin1(signature).contains(QLatin1String(filter), Qt::CaseInsensitive)) fprintf(stream, "%s\n", signature.constData()); } } } static void qPrintDataTags(FILE *stream) { // Avoid invoking the actual test functions, and also avoid printing irrelevant output: QTestLog::setPrintAvailableTagsMode(); // Get global data tags: QTestTable::globalTestTable(); invokeMethod(QTest::currentTestObject, "initTestCase_data()"); const QTestTable *gTable = QTestTable::globalTestTable(); const QMetaObject *currTestMetaObj = QTest::currentTestObject->metaObject(); // Process test functions: for (int i = 0; i < currTestMetaObj->methodCount(); ++i) { QMetaMethod tf = currTestMetaObj->method(i); if (isValidSlot(tf)) { // Retrieve local tags: QStringList localTags; QTestTable table; char *slot = qstrdup(tf.methodSignature().constData()); slot[strlen(slot) - 2] = '\0'; QByteArray member; member.resize(qstrlen(slot) + qstrlen("_data()") + 1); qsnprintf(member.data(), member.size(), "%s_data()", slot); invokeMethod(QTest::currentTestObject, member.constData()); const int dataCount = table.dataCount(); localTags.reserve(dataCount); for (int j = 0; j < dataCount; ++j) localTags << QLatin1String(table.testData(j)->dataTag()); // Print all tag combinations: if (gTable->dataCount() == 0) { if (localTags.count() == 0) { // No tags at all, so just print the test function: fprintf(stream, "%s %s\n", currTestMetaObj->className(), slot); } else { // Only local tags, so print each of them: for (int k = 0; k < localTags.size(); ++k) fprintf( stream, "%s %s %s\n", currTestMetaObj->className(), slot, localTags.at(k).toLatin1().data()); } } else { for (int j = 0; j < gTable->dataCount(); ++j) { if (localTags.count() == 0) { // Only global tags, so print the current one: fprintf( stream, "%s %s __global__ %s\n", currTestMetaObj->className(), slot, gTable->testData(j)->dataTag()); } else { // Local and global tags, so print each of the local ones and // the current global one: for (int k = 0; k < localTags.size(); ++k) fprintf( stream, "%s %s %s __global__ %s\n", currTestMetaObj->className(), slot, localTags.at(k).toLatin1().data(), gTable->testData(j)->dataTag()); } } } delete[] slot; } } } static int qToInt(char *str) { char *pEnd; int l = (int)strtol(str, &pEnd, 10); if (*pEnd != 0) { fprintf(stderr, "Invalid numeric parameter: '%s'\n", str); exit(1); } return l; } Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml) { QTestLog::LogMode logFormat = QTestLog::Plain; const char *logFilename = 0; #if defined(Q_OS_MAC) && defined(HAVE_XCTEST) if (QXcodeTestLogger::canLogTestProgress()) logFormat = QTestLog::XCTest; #endif const char *testOptions = " New-style logging options:\n" " -o filename,format : Output results to file in the specified format\n" " Use - to output to stdout\n" " Valid formats are:\n" " txt : Plain text\n" " csv : CSV format (suitable for benchmarks)\n" " xunitxml : XML XUnit document\n" " xml : XML document\n" " lightxml : A stream of XML tags\n" "\n" " *** Multiple loggers can be specified, but at most one can log to stdout.\n" "\n" " Old-style logging options:\n" " -o filename : Write the output into file\n" " -txt : Output results in Plain Text\n" " -csv : Output results in a CSV format (suitable for benchmarks)\n" " -xunitxml : Output results as XML XUnit document\n" " -xml : Output results as XML document\n" " -lightxml : Output results as stream of XML tags\n" "\n" " *** If no output file is specified, stdout is assumed.\n" " *** If no output format is specified, -txt is assumed.\n" "\n" " Test log detail options:\n" " -silent : Log failures and fatal errors only\n" " -v1 : Log the start of each testfunction\n" " -v2 : Log each QVERIFY/QCOMPARE/QTEST (implies -v1)\n" " -vs : Log every signal emission and resulting slot invocations\n" "\n" " *** The -silent and -v1 options only affect plain text output.\n" "\n" " Testing options:\n" " -functions : Returns a list of current testfunctions\n" " -datatags : Returns a list of current data tags.\n" " A global data tag is preceded by ' __global__ '.\n" " -eventdelay ms : Set default delay for mouse and keyboard simulation to ms milliseconds\n" " -keydelay ms : Set default delay for keyboard simulation to ms milliseconds\n" " -mousedelay ms : Set default delay for mouse simulation to ms milliseconds\n" " -maxwarnings n : Sets the maximum amount of messages to output.\n" " 0 means unlimited, default: 2000\n" " -nocrashhandler : Disables the crash handler. Useful for debugging crashes.\n" "\n" " Benchmarking options:\n" #ifdef QTESTLIB_USE_VALGRIND " -callgrind : Use callgrind to time benchmarks\n" #endif #ifdef QTESTLIB_USE_PERF_EVENTS " -perf : Use Linux perf events to time benchmarks\n" " -perfcounter name : Use the counter named 'name'\n" " -perfcounterlist : Lists the counters available\n" #endif #ifdef HAVE_TICK_COUNTER " -tickcounter : Use CPU tick counters to time benchmarks\n" #endif " -eventcounter : Counts events received during benchmarks\n" " -minimumvalue n : Sets the minimum acceptable measurement value\n" " -minimumtotal n : Sets the minimum acceptable total for repeated executions of a test function\n" " -iterations n : Sets the number of accumulation iterations.\n" " -median n : Sets the number of median iterations.\n" " -vb : Print out verbose benchmarking information.\n"; for (int i = 1; i < argc; ++i) { if (strcmp(argv[i], "-help") == 0 || strcmp(argv[i], "--help") == 0 || strcmp(argv[i], "/?") == 0) { printf(" Usage: %s [options] [testfunction[:testdata]]...\n" " By default, all testfunctions will be run.\n\n" "%s", argv[0], testOptions); if (qml) { printf ("\n" " QmlTest options:\n" " -import dir : Specify an import directory.\n" " -plugins dir : Specify a directory where to search for plugins.\n" " -input dir/file : Specify the root directory for test cases or a single test case file.\n" " -qtquick1 : Run with QtQuick 1 rather than QtQuick 2.\n" " -translation file : Specify the translation file.\n" ); } printf("\n" " -help : This help\n"); exit(0); } else if (strcmp(argv[i], "-functions") == 0) { if (qml) { QTest::printAvailableFunctions = true; } else { qPrintTestSlots(stdout); exit(0); } } else if (strcmp(argv[i], "-datatags") == 0) { if (!qml) { qPrintDataTags(stdout); exit(0); } } else if (strcmp(argv[i], "-txt") == 0) { logFormat = QTestLog::Plain; } else if (strcmp(argv[i], "-csv") == 0) { logFormat = QTestLog::CSV; } else if (strcmp(argv[i], "-xunitxml") == 0) { logFormat = QTestLog::XunitXML; } else if (strcmp(argv[i], "-xml") == 0) { logFormat = QTestLog::XML; } else if (strcmp(argv[i], "-lightxml") == 0) { logFormat = QTestLog::LightXML; } else if (strcmp(argv[i], "-silent") == 0) { QTestLog::setVerboseLevel(-1); } else if (strcmp(argv[i], "-v1") == 0) { QTestLog::setVerboseLevel(1); } else if (strcmp(argv[i], "-v2") == 0) { QTestLog::setVerboseLevel(2); } else if (strcmp(argv[i], "-vs") == 0) { QSignalDumper::startDump(); } else if (strcmp(argv[i], "-o") == 0) { if (i + 1 >= argc) { fprintf(stderr, "-o needs an extra parameter specifying the filename and optional format\n"); exit(1); } ++i; // Do we have the old or new style -o option? char *filename = new char[strlen(argv[i])+1]; char *format = new char[strlen(argv[i])+1]; if (sscanf(argv[i], "%[^,],%s", filename, format) == 1) { // Old-style logFilename = argv[i]; } else { // New-style if (strcmp(format, "txt") == 0) logFormat = QTestLog::Plain; else if (strcmp(format, "csv") == 0) logFormat = QTestLog::CSV; else if (strcmp(format, "lightxml") == 0) logFormat = QTestLog::LightXML; else if (strcmp(format, "xml") == 0) logFormat = QTestLog::XML; else if (strcmp(format, "xunitxml") == 0) logFormat = QTestLog::XunitXML; else { fprintf(stderr, "output format must be one of txt, csv, lightxml, xml or xunitxml\n"); exit(1); } if (strcmp(filename, "-") == 0 && QTestLog::loggerUsingStdout()) { fprintf(stderr, "only one logger can log to stdout\n"); exit(1); } QTestLog::addLogger(logFormat, filename); } delete [] filename; delete [] format; } else if (strcmp(argv[i], "-eventdelay") == 0) { if (i + 1 >= argc) { fprintf(stderr, "-eventdelay needs an extra parameter to indicate the delay(ms)\n"); exit(1); } else { QTest::eventDelay = qToInt(argv[++i]); } } else if (strcmp(argv[i], "-keydelay") == 0) { if (i + 1 >= argc) { fprintf(stderr, "-keydelay needs an extra parameter to indicate the delay(ms)\n"); exit(1); } else { QTest::keyDelay = qToInt(argv[++i]); } } else if (strcmp(argv[i], "-mousedelay") == 0) { if (i + 1 >= argc) { fprintf(stderr, "-mousedelay needs an extra parameter to indicate the delay(ms)\n"); exit(1); } else { QTest::mouseDelay = qToInt(argv[++i]); } } else if (strcmp(argv[i], "-maxwarnings") == 0) { if (i + 1 >= argc) { fprintf(stderr, "-maxwarnings needs an extra parameter with the amount of warnings\n"); exit(1); } else { QTestLog::setMaxWarnings(qToInt(argv[++i])); } } else if (strcmp(argv[i], "-nocrashhandler") == 0) { QTest::noCrashHandler = true; #ifdef QTESTLIB_USE_VALGRIND } else if (strcmp(argv[i], "-callgrind") == 0) { if (QBenchmarkValgrindUtils::haveValgrind()) if (QFileInfo(QDir::currentPath()).isWritable()) { QBenchmarkGlobalData::current->setMode(QBenchmarkGlobalData::CallgrindParentProcess); } else { fprintf(stderr, "WARNING: Current directory not writable. Using the walltime measurer.\n"); } else { fprintf(stderr, "WARNING: Valgrind not found or too old. Make sure it is installed and in your path. " "Using the walltime measurer.\n"); } } else if (strcmp(argv[i], "-callgrindchild") == 0) { // "private" option QBenchmarkGlobalData::current->setMode(QBenchmarkGlobalData::CallgrindChildProcess); QBenchmarkGlobalData::current->callgrindOutFileBase = QBenchmarkValgrindUtils::outFileBase(); #endif #ifdef QTESTLIB_USE_PERF_EVENTS } else if (strcmp(argv[i], "-perf") == 0) { if (QBenchmarkPerfEventsMeasurer::isAvailable()) { // perf available QBenchmarkGlobalData::current->setMode(QBenchmarkGlobalData::PerfCounter); } else { fprintf(stderr, "WARNING: Linux perf events not available. Using the walltime measurer.\n"); } } else if (strcmp(argv[i], "-perfcounter") == 0) { if (i + 1 >= argc) { fprintf(stderr, "-perfcounter needs an extra parameter with the name of the counter\n"); exit(1); } else { QBenchmarkPerfEventsMeasurer::setCounter(argv[++i]); } } else if (strcmp(argv[i], "-perfcounterlist") == 0) { QBenchmarkPerfEventsMeasurer::listCounters(); exit(0); #endif #ifdef HAVE_TICK_COUNTER } else if (strcmp(argv[i], "-tickcounter") == 0) { QBenchmarkGlobalData::current->setMode(QBenchmarkGlobalData::TickCounter); #endif } else if (strcmp(argv[i], "-eventcounter") == 0) { QBenchmarkGlobalData::current->setMode(QBenchmarkGlobalData::EventCounter); } else if (strcmp(argv[i], "-minimumvalue") == 0) { if (i + 1 >= argc) { fprintf(stderr, "-minimumvalue needs an extra parameter to indicate the minimum time(ms)\n"); exit(1); } else { QBenchmarkGlobalData::current->walltimeMinimum = qToInt(argv[++i]); } } else if (strcmp(argv[i], "-minimumtotal") == 0) { if (i + 1 >= argc) { fprintf(stderr, "-minimumtotal needs an extra parameter to indicate the minimum total measurement\n"); exit(1); } else { QBenchmarkGlobalData::current->minimumTotal = qToInt(argv[++i]); } } else if (strcmp(argv[i], "-iterations") == 0) { if (i + 1 >= argc) { fprintf(stderr, "-iterations needs an extra parameter to indicate the number of iterations\n"); exit(1); } else { QBenchmarkGlobalData::current->iterationCount = qToInt(argv[++i]); } } else if (strcmp(argv[i], "-median") == 0) { if (i + 1 >= argc) { fprintf(stderr, "-median needs an extra parameter to indicate the number of median iterations\n"); exit(1); } else { QBenchmarkGlobalData::current->medianIterationCount = qToInt(argv[++i]); } } else if (strcmp(argv[i], "-vb") == 0) { QBenchmarkGlobalData::current->verboseOutput = true; #if defined(Q_OS_WINRT) } else if (strncmp(argv[i], "-ServerName:", 12) == 0 || strncmp(argv[i], "-qdevel", 7) == 0) { continue; #elif defined(Q_OS_MAC) && defined(HAVE_XCTEST) } else if (int skip = QXcodeTestLogger::parseCommandLineArgument(argv[i])) { i += (skip - 1); // Eating argv[i] with a continue counts towards skips continue; #endif } else if (argv[i][0] == '-') { fprintf(stderr, "Unknown option: '%s'\n\n%s", argv[i], testOptions); if (qml) { fprintf(stderr, "\nqmltest related options:\n" " -import : Specify an import directory.\n" " -plugins : Specify a directory where to search for plugins.\n" " -input : Specify the root directory for test cases.\n" " -qtquick1 : Run with QtQuick 1 rather than QtQuick 2.\n" ); } fprintf(stderr, "\n" " -help : This help\n"); exit(1); } else if (qml) { // We can't check the availability of test functions until // we load the QML files. So just store the data for now. int colon = -1; int offset; for (offset = 0; *(argv[i]+offset); ++offset) { if (*(argv[i]+offset) == ':') { if (*(argv[i]+offset+1) == ':') { // "::" is used as a test name separator. // e.g. "ClickTests::test_click:row1". ++offset; } else { colon = offset; break; } } } if (colon == -1) { QTest::testFunctions += QString::fromLatin1(argv[i]); QTest::testTags += QString(); } else { QTest::testFunctions += QString::fromLatin1(argv[i], colon); QTest::testTags += QString::fromLatin1(argv[i] + colon + 1); } } else { if (!QTest::testFuncs) { QTest::testFuncs = new QTest::TestFunction[512]; } int colon = -1; char buf[512], *data=0; int off; for (off = 0; *(argv[i]+off); ++off) { if (*(argv[i]+off) == ':') { colon = off; break; } } if (colon != -1) { data = qstrdup(argv[i]+colon+1); } qsnprintf(buf, qMin(512, off + 1), "%s", argv[i]); // copy text before the ':' into buf qsnprintf(buf + off, qMin(512 - off, 3), "()"); // append "()" int idx = QTest::currentTestObject->metaObject()->indexOfMethod(buf); if (idx < 0 || !isValidSlot(QTest::currentTestObject->metaObject()->method(idx))) { fprintf(stderr, "Unknown test function: '%s'. Possible matches:\n", buf); buf[off] = 0; qPrintTestSlots(stderr, buf); fprintf(stderr, "\n%s -functions\nlists all available test functions.\n", argv[0]); exit(1); } testFuncs[testFuncCount].set(idx, data); testFuncCount++; QTEST_ASSERT(QTest::testFuncCount < 512); } } bool installedTestCoverage = installCoverageTool(QTestResult::currentAppName(), QTestResult::currentTestObjectName()); QTestLog::setInstalledTestCoverage(installedTestCoverage); // If no loggers were created by the long version of the -o command-line // option, create a logger using whatever filename and format were // set using the old-style command-line options. if (QTestLog::loggerCount() == 0) QTestLog::addLogger(logFormat, logFilename); } QBenchmarkResult qMedian(const QVector<QBenchmarkResult> &container) { const int count = container.count(); if (count == 0) return QBenchmarkResult(); if (count == 1) return container.front(); QVector<QBenchmarkResult> containerCopy = container; std::sort(containerCopy.begin(), containerCopy.end()); const int middle = count / 2; // ### handle even-sized containers here by doing an aritmetic mean of the two middle items. return containerCopy.at(middle); } struct QTestDataSetter { QTestDataSetter(QTestData *data) { QTestResult::setCurrentTestData(data); } ~QTestDataSetter() { QTestResult::setCurrentTestData(0); } }; namespace { qreal addResult(qreal current, const QBenchmarkResult& r) { return current + r.value; } } static void qInvokeTestMethodDataEntry(char *slot) { /* Benchmarking: for each median iteration*/ bool isBenchmark = false; int i = (QBenchmarkGlobalData::current->measurer->needsWarmupIteration()) ? -1 : 0; QVector<QBenchmarkResult> results; bool minimumTotalReached = false; do { QBenchmarkTestMethodData::current->beginDataRun(); /* Benchmarking: for each accumulation iteration*/ bool invokeOk; do { invokeMethod(QTest::currentTestObject, "init()"); if (QTestResult::skipCurrentTest() || QTestResult::currentTestFailed()) break; QBenchmarkTestMethodData::current->result = QBenchmarkResult(); QBenchmarkTestMethodData::current->resultAccepted = false; QBenchmarkGlobalData::current->context.tag = QLatin1String( QTestResult::currentDataTag() ? QTestResult::currentDataTag() : ""); invokeOk = QMetaObject::invokeMethod(QTest::currentTestObject, slot, Qt::DirectConnection); if (!invokeOk) QTestResult::addFailure("Unable to execute slot", __FILE__, __LINE__); isBenchmark = QBenchmarkTestMethodData::current->isBenchmark(); QTestResult::finishedCurrentTestData(); invokeMethod(QTest::currentTestObject, "cleanup()"); // If the test isn't a benchmark, finalize the result after cleanup() has finished. if (!isBenchmark) QTestResult::finishedCurrentTestDataCleanup(); // If this test method has a benchmark, repeat until all measurements are // acceptable. // The QBENCHMARK macro increases the number of iterations for each run until // this happens. } while (invokeOk && isBenchmark && QBenchmarkTestMethodData::current->resultsAccepted() == false && !QTestResult::skipCurrentTest() && !QTestResult::currentTestFailed()); QBenchmarkTestMethodData::current->endDataRun(); if (!QTestResult::skipCurrentTest() && !QTestResult::currentTestFailed()) { if (i > -1) // iteration -1 is the warmup iteration. results.append(QBenchmarkTestMethodData::current->result); if (isBenchmark && QBenchmarkGlobalData::current->verboseOutput) { if (i == -1) { QTestLog::info(qPrintable( QString::fromLatin1("warmup stage result : %1") .arg(QBenchmarkTestMethodData::current->result.value)), 0, 0); } else { QTestLog::info(qPrintable( QString::fromLatin1("accumulation stage result: %1") .arg(QBenchmarkTestMethodData::current->result.value)), 0, 0); } } } // Verify if the minimum total measurement is reached, if it was specified: if (QBenchmarkGlobalData::current->minimumTotal == -1) { minimumTotalReached = true; } else { const qreal total = std::accumulate(results.begin(), results.end(), 0.0, addResult); minimumTotalReached = (total >= QBenchmarkGlobalData::current->minimumTotal); } } while (isBenchmark && ((++i < QBenchmarkGlobalData::current->adjustMedianIterationCount()) || !minimumTotalReached) && !QTestResult::skipCurrentTest() && !QTestResult::currentTestFailed()); // If the test is a benchmark, finalize the result after all iterations have finished. if (isBenchmark) { bool testPassed = !QTestResult::skipCurrentTest() && !QTestResult::currentTestFailed(); QTestResult::finishedCurrentTestDataCleanup(); // Only report benchmark figures if the test passed if (testPassed && QBenchmarkTestMethodData::current->resultsAccepted()) QTestLog::addBenchmarkResult(qMedian(results)); } } class WatchDog : public QThread { public: WatchDog() { QMutexLocker locker(&mutex); timeout.store(-1); start(); waitCondition.wait(&mutex); } ~WatchDog() { { QMutexLocker locker(&mutex); timeout.store(0); waitCondition.wakeAll(); } wait(); } void beginTest() { QMutexLocker locker(&mutex); timeout.store(defaultTimeout()); waitCondition.wakeAll(); } void testFinished() { QMutexLocker locker(&mutex); timeout.store(-1); waitCondition.wakeAll(); } void run() { QMutexLocker locker(&mutex); waitCondition.wakeAll(); while (1) { int t = timeout.load(); if (!t) break; if (!waitCondition.wait(&mutex, t)) { stackTrace(); qFatal("Test function timed out"); } } } private: QBasicAtomicInt timeout; QMutex mutex; QWaitCondition waitCondition; }; /*! \internal Call slot_data(), init(), slot(), cleanup(), init(), slot(), cleanup(), ... If data is set then it is the only test that is performed If the function was successfully called, true is returned, otherwise false. */ static bool qInvokeTestMethod(const char *slotName, const char *data, WatchDog *watchDog) { QTEST_ASSERT(slotName); QBenchmarkTestMethodData benchmarkData; QBenchmarkTestMethodData::current = &benchmarkData; QBenchmarkGlobalData::current->context.slotName = QLatin1String(slotName); char member[512]; QTestTable table; char *slot = qstrdup(slotName); slot[strlen(slot) - 2] = '\0'; QTestResult::setCurrentTestFunction(slot); const QTestTable *gTable = QTestTable::globalTestTable(); const int globalDataCount = gTable->dataCount(); int curGlobalDataIndex = 0; /* For each test function that has a *_data() table/function, do: */ do { if (!gTable->isEmpty()) QTestResult::setCurrentGlobalTestData(gTable->testData(curGlobalDataIndex)); if (curGlobalDataIndex == 0) { qsnprintf(member, 512, "%s_data()", slot); invokeMethod(QTest::currentTestObject, member); } bool foundFunction = false; if (!QTestResult::skipCurrentTest()) { int curDataIndex = 0; const int dataCount = table.dataCount(); // Data tag requested but none available? if (data && !dataCount) { // Let empty data tag through. if (!*data) data = 0; else { fprintf(stderr, "Unknown testdata for function %s: '%s'\n", slotName, data); fprintf(stderr, "Function has no testdata.\n"); return false; } } /* For each entry in the data table, do: */ do { QTestResult::setSkipCurrentTest(false); QTestResult::setBlacklistCurrentTest(false); if (!data || !qstrcmp(data, table.testData(curDataIndex)->dataTag())) { foundFunction = true; QTestPrivate::checkBlackLists(slot, dataCount ? table.testData(curDataIndex)->dataTag() : 0); QTestDataSetter s(curDataIndex >= dataCount ? static_cast<QTestData *>(0) : table.testData(curDataIndex)); if (watchDog) watchDog->beginTest(); qInvokeTestMethodDataEntry(slot); if (watchDog) watchDog->testFinished(); if (data) break; } ++curDataIndex; } while (curDataIndex < dataCount); } if (data && !foundFunction) { fprintf(stderr, "Unknown testdata for function %s: '%s'\n", slotName, data); fprintf(stderr, "Available testdata:\n"); for (int i = 0; i < table.dataCount(); ++i) fprintf(stderr, "%s\n", table.testData(i)->dataTag()); return false; } QTestResult::setCurrentGlobalTestData(0); ++curGlobalDataIndex; } while (curGlobalDataIndex < globalDataCount); QTestResult::finishedCurrentTestFunction(); QTestResult::setSkipCurrentTest(false); QTestResult::setBlacklistCurrentTest(false); QTestResult::setCurrentTestData(0); delete[] slot; return true; } void *fetchData(QTestData *data, const char *tagName, int typeId) { QTEST_ASSERT(typeId); QTEST_ASSERT_X(data, "QTest::fetchData()", "Test data requested, but no testdata available."); QTEST_ASSERT(data->parent()); int idx = data->parent()->indexOf(tagName); if (idx == -1 || idx >= data->dataCount()) { qFatal("QFETCH: Requested testdata '%s' not available, check your _data function.", tagName); } if (typeId != data->parent()->elementTypeId(idx)) { qFatal("Requested type '%s' does not match available type '%s'.", QMetaType::typeName(typeId), QMetaType::typeName(data->parent()->elementTypeId(idx))); } return data->data(idx); } /*! \fn char* QTest::toHexRepresentation(const char *ba, int length) Returns a pointer to a string that is the string \a ba represented as a space-separated sequence of hex characters. If the input is considered too long, it is truncated. A trucation is indicated in the returned string as an ellipsis at the end. \a length is the length of the string \a ba. */ char *toHexRepresentation(const char *ba, int length) { if (length == 0) return qstrdup(""); /* We output at maximum about maxLen characters in order to avoid * running out of memory and flooding things when the byte array * is large. * * maxLen can't be for example 200 because Qt Test is sprinkled with fixed * size char arrays. * */ const int maxLen = 50; const int len = qMin(maxLen, length); char *result = 0; if (length > maxLen) { const int size = len * 3 + 4; result = new char[size]; char *const forElipsis = result + size - 5; forElipsis[0] = ' '; forElipsis[1] = '.'; forElipsis[2] = '.'; forElipsis[3] = '.'; result[size - 1] = '\0'; } else { const int size = len * 3; result = new char[size]; result[size - 1] = '\0'; } int i = 0; int o = 0; while (true) { const char at = ba[i]; result[o] = toHexUpper(at >> 4); ++o; result[o] = toHexUpper(at); ++i; ++o; if (i == len) break; else { result[o] = ' '; ++o; } } return result; } /*! \internal Returns the same QByteArray but with only the ASCII characters still shown; everything else is replaced with \c {\xHH}. */ char *toPrettyCString(const char *p, int length) { bool trimmed = false; QScopedArrayPointer<char> buffer(new char[256]); const char *end = p + length; char *dst = buffer.data(); bool lastWasHexEscape = false; *dst++ = '"'; for ( ; p != end; ++p) { // we can add: // 1 byte: a single character // 2 bytes: a simple escape sequence (\n) // 3 bytes: "" and a character // 4 bytes: an hex escape sequence (\xHH) if (dst - buffer.data() > 246) { // plus the the quote, the three dots and NUL, it's 255 in the worst case trimmed = true; break; } // check if we need to insert "" to break an hex escape sequence if (Q_UNLIKELY(lastWasHexEscape)) { if (fromHex(*p) != -1) { // yes, insert it *dst++ = '"'; *dst++ = '"'; } lastWasHexEscape = false; } if (*p < 0x7f && *p >= 0x20 && *p != '\\' && *p != '"') { *dst++ = *p; continue; } // write as an escape sequence // this means we may advance dst to buffer.data() + 247 or 250 *dst++ = '\\'; switch (*p) { case 0x5c: case 0x22: *dst++ = uchar(*p); break; case 0x8: *dst++ = 'b'; break; case 0xc: *dst++ = 'f'; break; case 0xa: *dst++ = 'n'; break; case 0xd: *dst++ = 'r'; break; case 0x9: *dst++ = 't'; break; default: // print as hex escape *dst++ = 'x'; *dst++ = toHexUpper(uchar(*p) >> 4); *dst++ = toHexUpper(uchar(*p)); lastWasHexEscape = true; break; } } *dst++ = '"'; if (trimmed) { *dst++ = '.'; *dst++ = '.'; *dst++ = '.'; } *dst++ = '\0'; return buffer.take(); } /*! \internal Returns the same QString but with only the ASCII characters still shown; everything else is replaced with \c {\uXXXX}. Similar to QDebug::putString(). */ char *toPrettyUnicode(const ushort *p, int length) { // keep it simple for the vast majority of cases bool trimmed = false; QScopedArrayPointer<char> buffer(new char[256]); const ushort *end = p + length; char *dst = buffer.data(); *dst++ = '"'; for ( ; p != end; ++p) { if (dst - buffer.data() > 245) { // plus the the quote, the three dots and NUL, it's 250, 251 or 255 trimmed = true; break; } if (*p < 0x7f && *p >= 0x20 && *p != '\\' && *p != '"') { *dst++ = *p; continue; } // write as an escape sequence // this means we may advance dst to buffer.data() + 246 or 250 *dst++ = '\\'; switch (*p) { case 0x22: case 0x5c: *dst++ = uchar(*p); break; case 0x8: *dst++ = 'b'; break; case 0xc: *dst++ = 'f'; break; case 0xa: *dst++ = 'n'; break; case 0xd: *dst++ = 'r'; break; case 0x9: *dst++ = 't'; break; default: *dst++ = 'u'; *dst++ = toHexUpper(*p >> 12); *dst++ = toHexUpper(*p >> 8); *dst++ = toHexUpper(*p >> 4); *dst++ = toHexUpper(*p); } } *dst++ = '"'; if (trimmed) { *dst++ = '.'; *dst++ = '.'; *dst++ = '.'; } *dst++ = '\0'; return buffer.take(); } static bool debuggerPresent() { #if defined(Q_OS_LINUX) int fd = open("/proc/self/status", O_RDONLY); if (fd == -1) return false; char buffer[2048]; ssize_t size = read(fd, buffer, sizeof(buffer) - 1); if (size == -1) { close(fd); return false; } buffer[size] = 0; const char tracerPidToken[] = "\nTracerPid:"; char *tracerPid = strstr(buffer, tracerPidToken); if (!tracerPid) { close(fd); return false; } tracerPid += sizeof(tracerPidToken); long int pid = strtol(tracerPid, &tracerPid, 10); close(fd); return pid != 0; #elif defined(Q_OS_WIN) return IsDebuggerPresent(); #else // TODO return false; #endif } static void qInvokeTestMethods(QObject *testObject) { const QMetaObject *metaObject = testObject->metaObject(); QTEST_ASSERT(metaObject); QTestLog::startLogging(); QTestResult::setCurrentTestFunction("initTestCase"); QTestTable::globalTestTable(); invokeMethod(testObject, "initTestCase_data()"); QScopedPointer<WatchDog> watchDog; if (!debuggerPresent() #ifdef QTESTLIB_USE_VALGRIND && QBenchmarkGlobalData::current->mode() != QBenchmarkGlobalData::CallgrindChildProcess #endif ) { watchDog.reset(new WatchDog); } if (!QTestResult::skipCurrentTest() && !QTest::currentTestFailed()) { invokeMethod(testObject, "initTestCase()"); // finishedCurrentTestDataCleanup() resets QTestResult::currentTestFailed(), so use a local copy. const bool previousFailed = QTestResult::currentTestFailed(); QTestResult::finishedCurrentTestData(); QTestResult::finishedCurrentTestDataCleanup(); QTestResult::finishedCurrentTestFunction(); if (!QTestResult::skipCurrentTest() && !previousFailed) { if (QTest::testFuncs) { for (int i = 0; i != QTest::testFuncCount; i++) { if (!qInvokeTestMethod(metaObject->method(QTest::testFuncs[i].function()).methodSignature().constData(), QTest::testFuncs[i].data(), watchDog.data())) { break; } } testFuncCleaner.cleanup(); } else { int methodCount = metaObject->methodCount(); QMetaMethod *testMethods = new QMetaMethod[methodCount]; for (int i = 0; i != methodCount; i++) testMethods[i] = metaObject->method(i); for (int i = 0; i != methodCount; i++) { if (!isValidSlot(testMethods[i])) continue; if (!qInvokeTestMethod(testMethods[i].methodSignature().constData(), 0, watchDog.data())) break; } delete[] testMethods; testMethods = 0; } } QTestResult::setSkipCurrentTest(false); QTestResult::setBlacklistCurrentTest(false); QTestResult::setCurrentTestFunction("cleanupTestCase"); invokeMethod(testObject, "cleanupTestCase()"); QTestResult::finishedCurrentTestData(); QTestResult::finishedCurrentTestDataCleanup(); } QTestResult::finishedCurrentTestFunction(); QTestResult::setCurrentTestFunction(0); QTestTable::clearGlobalTestTable(); QTestLog::stopLogging(); } #if defined(Q_OS_UNIX) class FatalSignalHandler { public: FatalSignalHandler(); ~FatalSignalHandler(); private: static void signal(int); sigset_t handledSignals; }; void FatalSignalHandler::signal(int signum) { const int msecsFunctionTime = qRound(QTestLog::msecsFunctionTime()); const int msecsTotalTime = qRound(QTestLog::msecsTotalTime()); if (signum != SIGINT) stackTrace(); qFatal("Received signal %d\n" " Function time: %dms Total time: %dms", signum, msecsFunctionTime, msecsTotalTime); #if defined(Q_OS_INTEGRITY) { struct sigaction act; memset(&act, 0, sizeof(struct sigaction)); act.sa_handler = SIG_DFL; sigaction(signum, &act, NULL); } #endif } FatalSignalHandler::FatalSignalHandler() { sigemptyset(&handledSignals); const int fatalSignals[] = { SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGBUS, SIGFPE, SIGSEGV, SIGPIPE, SIGTERM, 0 }; struct sigaction act; memset(&act, 0, sizeof(act)); act.sa_handler = FatalSignalHandler::signal; // Remove the handler after it is invoked. #if !defined(Q_OS_INTEGRITY) act.sa_flags = SA_RESETHAND; #endif #ifdef SA_ONSTACK // Let the signal handlers use an alternate stack // This is necessary if SIGSEGV is to catch a stack overflow # if defined(Q_CC_GNU) && defined(Q_OF_ELF) // Put the alternate stack in the .lbss (large BSS) section so that it doesn't // interfere with normal .bss symbols __attribute__((section(".lbss.altstack"), aligned(4096))) # endif static char alternate_stack[16 * 1024]; stack_t stack; stack.ss_flags = 0; stack.ss_size = sizeof alternate_stack; stack.ss_sp = alternate_stack; sigaltstack(&stack, 0); act.sa_flags |= SA_ONSTACK; #endif // Block all fatal signals in our signal handler so we don't try to close // the testlog twice. sigemptyset(&act.sa_mask); for (int i = 0; fatalSignals[i]; ++i) sigaddset(&act.sa_mask, fatalSignals[i]); struct sigaction oldact; for (int i = 0; fatalSignals[i]; ++i) { sigaction(fatalSignals[i], &act, &oldact); if ( #ifdef SA_SIGINFO oldact.sa_flags & SA_SIGINFO || #endif oldact.sa_handler != SIG_DFL) { sigaction(fatalSignals[i], &oldact, 0); } else { sigaddset(&handledSignals, fatalSignals[i]); } } } FatalSignalHandler::~FatalSignalHandler() { // Unregister any of our remaining signal handlers struct sigaction act; memset(&act, 0, sizeof(act)); act.sa_handler = SIG_DFL; struct sigaction oldact; for (int i = 1; i < 32; ++i) { if (!sigismember(&handledSignals, i)) continue; sigaction(i, &act, &oldact); // If someone overwrote it in the mean time, put it back if (oldact.sa_handler != FatalSignalHandler::signal) sigaction(i, &oldact, 0); } } #endif } // namespace #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) && !defined(Q_OS_WINRT) // Helper class for resolving symbol names by dynamically loading "dbghelp.dll". class DebugSymbolResolver { Q_DISABLE_COPY(DebugSymbolResolver) public: struct Symbol { Symbol() : name(Q_NULLPTR), address(0) {} const char *name; // Must be freed by caller. DWORD64 address; }; explicit DebugSymbolResolver(HANDLE process); ~DebugSymbolResolver() { cleanup(); } bool isValid() const { return m_symFromAddr; } Symbol resolveSymbol(DWORD64 address) const; private: // typedefs from DbgHelp.h/.dll struct DBGHELP_SYMBOL_INFO { // SYMBOL_INFO ULONG SizeOfStruct; ULONG TypeIndex; // Type Index of symbol ULONG64 Reserved[2]; ULONG Index; ULONG Size; ULONG64 ModBase; // Base Address of module comtaining this symbol ULONG Flags; ULONG64 Value; // Value of symbol, ValuePresent should be 1 ULONG64 Address; // Address of symbol including base address of module ULONG Register; // register holding value or pointer to value ULONG Scope; // scope of the symbol ULONG Tag; // pdb classification ULONG NameLen; // Actual length of name ULONG MaxNameLen; CHAR Name[1]; // Name of symbol }; typedef BOOL (__stdcall *SymInitializeType)(HANDLE, PCSTR, BOOL); typedef BOOL (__stdcall *SymFromAddrType)(HANDLE, DWORD64, PDWORD64, DBGHELP_SYMBOL_INFO *); void cleanup(); const HANDLE m_process; HMODULE m_dbgHelpLib; SymFromAddrType m_symFromAddr; }; void DebugSymbolResolver::cleanup() { if (m_dbgHelpLib) FreeLibrary(m_dbgHelpLib); m_dbgHelpLib = 0; m_symFromAddr = Q_NULLPTR; } DebugSymbolResolver::DebugSymbolResolver(HANDLE process) : m_process(process), m_dbgHelpLib(0), m_symFromAddr(Q_NULLPTR) { bool success = false; m_dbgHelpLib = LoadLibraryW(L"dbghelp.dll"); if (m_dbgHelpLib) { SymInitializeType symInitialize = (SymInitializeType)(GetProcAddress(m_dbgHelpLib, "SymInitialize")); m_symFromAddr = (SymFromAddrType)(GetProcAddress(m_dbgHelpLib, "SymFromAddr")); success = symInitialize && m_symFromAddr && symInitialize(process, NULL, TRUE); } if (!success) cleanup(); } DebugSymbolResolver::Symbol DebugSymbolResolver::resolveSymbol(DWORD64 address) const { // reserve additional buffer where SymFromAddr() will store the name struct NamedSymbolInfo : public DBGHELP_SYMBOL_INFO { enum { symbolNameLength = 255 }; char name[symbolNameLength + 1]; }; Symbol result; if (!isValid()) return result; NamedSymbolInfo symbolBuffer; memset(&symbolBuffer, 0, sizeof(NamedSymbolInfo)); symbolBuffer.MaxNameLen = NamedSymbolInfo::symbolNameLength; symbolBuffer.SizeOfStruct = sizeof(DBGHELP_SYMBOL_INFO); if (!m_symFromAddr(m_process, address, 0, &symbolBuffer)) return result; result.name = qstrdup(symbolBuffer.Name); result.address = symbolBuffer.Address; return result; } static LONG WINAPI windowsFaultHandler(struct _EXCEPTION_POINTERS *exInfo) { enum { maxStackFrames = 100 }; char appName[MAX_PATH]; if (!GetModuleFileNameA(NULL, appName, MAX_PATH)) appName[0] = 0; const int msecsFunctionTime = qRound(QTestLog::msecsFunctionTime()); const int msecsTotalTime = qRound(QTestLog::msecsTotalTime()); const void *exceptionAddress = exInfo->ExceptionRecord->ExceptionAddress; printf("A crash occurred in %s.\n" "Function time: %dms Total time: %dms\n\n" "Exception address: 0x%p\n" "Exception code : 0x%lx\n", appName, msecsFunctionTime, msecsTotalTime, exceptionAddress, exInfo->ExceptionRecord->ExceptionCode); DebugSymbolResolver resolver(GetCurrentProcess()); if (resolver.isValid()) { DebugSymbolResolver::Symbol exceptionSymbol = resolver.resolveSymbol(DWORD64(exceptionAddress)); if (exceptionSymbol.name) { printf("Nearby symbol : %s\n", exceptionSymbol.name); delete [] exceptionSymbol.name; } void *stack[maxStackFrames]; fputs("\nStack:\n", stdout); const unsigned frameCount = CaptureStackBackTrace(0, DWORD(maxStackFrames), stack, NULL); for (unsigned f = 0; f < frameCount; ++f) { DebugSymbolResolver::Symbol symbol = resolver.resolveSymbol(DWORD64(stack[f])); if (symbol.name) { printf("#%3u: %s() - 0x%p\n", f + 1, symbol.name, (const void *)symbol.address); delete [] symbol.name; } else { printf("#%3u: Unable to obtain symbol\n", f + 1); } } } fputc('\n', stdout); fflush(stdout); return EXCEPTION_EXECUTE_HANDLER; } #endif // Q_OS_WIN) && !Q_OS_WINCE && !Q_OS_WINRT static void initEnvironment() { qputenv("QT_LOGGING_TO_CONSOLE", "1"); qputenv("QT_QTESTLIB_RUNNING", "1"); } /*! Executes tests declared in \a testObject. In addition, the private slots \c{initTestCase()}, \c{cleanupTestCase()}, \c{init()} and \c{cleanup()} are executed if they exist. See \l{Creating a Test} for more details. Optionally, the command line arguments \a argc and \a argv can be provided. For a list of recognized arguments, read \l {Qt Test Command Line Arguments}. The following example will run all tests in \c MyTestObject: \snippet code/src_qtestlib_qtestcase.cpp 18 This function returns 0 if no tests failed, or a value other than 0 if one or more tests failed or in case of unhandled exceptions. (Skipped tests do not influence the return value.) For stand-alone test applications, the convenience macro \l QTEST_MAIN() can be used to declare a main() function that parses the command line arguments and executes the tests, avoiding the need to call this function explicitly. The return value from this function is also the exit code of the test application when the \l QTEST_MAIN() macro is used. For stand-alone test applications, this function should not be called more than once, as command-line options for logging test output to files and executing individual test functions will not behave correctly. Note: This function is not reentrant, only one test can run at a time. A test that was executed with qExec() can't run another test via qExec() and threads are not allowed to call qExec() simultaneously. If you have programatically created the arguments, as opposed to getting them from the arguments in \c main(), it is likely of interest to use QTest::qExec(QObject *, const QStringList &) since it is Unicode safe. \sa QTEST_MAIN() */ int QTest::qExec(QObject *testObject, int argc, char **argv) { initEnvironment(); QBenchmarkGlobalData benchmarkData; QBenchmarkGlobalData::current = &benchmarkData; #ifdef QTESTLIB_USE_VALGRIND int callgrindChildExitCode = 0; #endif #if defined(Q_OS_MACX) bool macNeedsActivate = qApp && (qstrcmp(qApp->metaObject()->className(), "QApplication") == 0); IOPMAssertionID powerID; // Don't restore saved window state for auto tests. QTestPrivate::disableWindowRestore(); #endif #ifndef QT_NO_EXCEPTIONS try { #endif #if defined(Q_OS_MACX) if (macNeedsActivate) { CFStringRef reasonForActivity= CFSTR("No Display Sleep"); IOReturn ok = IOPMAssertionCreateWithName(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, reasonForActivity, &powerID); if (ok != kIOReturnSuccess) macNeedsActivate = false; // no need to release the assertion on exit. } #endif QTestPrivate::parseBlackList(); QTestPrivate::parseGpuBlackList(); QTestResult::reset(); QTEST_ASSERT(testObject); QTEST_ASSERT(!currentTestObject); currentTestObject = testObject; const QMetaObject *metaObject = testObject->metaObject(); QTEST_ASSERT(metaObject); QTestResult::setCurrentTestObject(metaObject->className()); if (argc > 0) QTestResult::setCurrentAppName(argv[0]); qtest_qParseArgs(argc, argv, false); #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) if (!noCrashHandler) { # ifndef Q_CC_MINGW _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG); # endif # ifndef Q_OS_WINRT SetErrorMode(SetErrorMode(0) | SEM_NOGPFAULTERRORBOX); SetUnhandledExceptionFilter(windowsFaultHandler); # endif } // !noCrashHandler #endif // Q_OS_WIN) && !Q_OS_WINCE && !Q_OS_WINRT #ifdef QTESTLIB_USE_VALGRIND if (QBenchmarkGlobalData::current->mode() == QBenchmarkGlobalData::CallgrindParentProcess) { if (!qApp) qFatal("QtTest: -callgrind option is not available with QTEST_APPLESS_MAIN"); const QStringList origAppArgs(QCoreApplication::arguments()); if (!QBenchmarkValgrindUtils::rerunThroughCallgrind(origAppArgs, callgrindChildExitCode)) return -1; QBenchmarkValgrindUtils::cleanup(); } else #endif { #if defined(Q_OS_UNIX) QScopedPointer<FatalSignalHandler> handler; if (!noCrashHandler) handler.reset(new FatalSignalHandler); #endif qInvokeTestMethods(testObject); } #ifndef QT_NO_EXCEPTIONS } catch (...) { QTestResult::addFailure("Caught unhandled exception", __FILE__, __LINE__); if (QTestResult::currentTestFunction()) { QTestResult::finishedCurrentTestFunction(); QTestResult::setCurrentTestFunction(0); } QTestLog::stopLogging(); #if defined(Q_OS_MACX) if (macNeedsActivate) { IOPMAssertionRelease(powerID); } #endif currentTestObject = 0; // Rethrow exception to make debugging easier. throw; return 1; } #endif currentTestObject = 0; QSignalDumper::endDump(); #if defined(Q_OS_MACX) if (macNeedsActivate) { IOPMAssertionRelease(powerID); } #endif #ifdef QTESTLIB_USE_VALGRIND if (QBenchmarkGlobalData::current->mode() == QBenchmarkGlobalData::CallgrindParentProcess) return callgrindChildExitCode; #endif // make sure our exit code is never going above 127 // since that could wrap and indicate 0 test fails return qMin(QTestLog::failCount(), 127); } /*! \overload \since 4.4 Behaves identically to qExec(QObject *, int, char**) but takes a QStringList of \a arguments instead of a \c char** list. */ int QTest::qExec(QObject *testObject, const QStringList &arguments) { const int argc = arguments.count(); QVarLengthArray<char *> argv(argc); QVector<QByteArray> args; args.reserve(argc); for (int i = 0; i < argc; ++i) { args.append(arguments.at(i).toLocal8Bit().constData()); argv[i] = args.last().data(); } return qExec(testObject, argc, argv.data()); } /*! \internal */ void QTest::qFail(const char *statementStr, const char *file, int line) { QTestResult::addFailure(statementStr, file, line); } /*! \internal */ bool QTest::qVerify(bool statement, const char *statementStr, const char *description, const char *file, int line) { return QTestResult::verify(statement, statementStr, description, file, line); } /*! \fn void QTest::qSkip(const char *message, const char *file, int line) \internal */ void QTest::qSkip(const char *message, const char *file, int line) { QTestResult::addSkip(message, file, line); QTestResult::setSkipCurrentTest(true); } /*! \fn bool QTest::qExpectFail(const char *dataIndex, const char *comment, TestFailMode mode, const char *file, int line) \internal */ bool QTest::qExpectFail(const char *dataIndex, const char *comment, QTest::TestFailMode mode, const char *file, int line) { return QTestResult::expectFail(dataIndex, qstrdup(comment), mode, file, line); } /*! \internal */ void QTest::qWarn(const char *message, const char *file, int line) { QTestLog::warn(message, file, line); } /*! Ignores messages created by qDebug(), qInfo() or qWarning(). If the \a message with the corresponding \a type is outputted, it will be removed from the test log. If the test finished and the \a message was not outputted, a test failure is appended to the test log. \b {Note:} Invoking this function will only ignore one message. If the message you want to ignore is outputted twice, you have to call ignoreMessage() twice, too. Example: \snippet code/src_qtestlib_qtestcase.cpp 19 The example above tests that QDir::mkdir() outputs the right warning when invoked with an invalid file name. */ void QTest::ignoreMessage(QtMsgType type, const char *message) { QTestLog::ignoreMessage(type, message); } #ifndef QT_NO_REGULAREXPRESSION /*! \overload Ignores messages created by qDebug(), qInfo() or qWarning(). If the message matching \a messagePattern with the corresponding \a type is outputted, it will be removed from the test log. If the test finished and the message was not outputted, a test failure is appended to the test log. \b {Note:} Invoking this function will only ignore one message. If the message you want to ignore is outputted twice, you have to call ignoreMessage() twice, too. \since 5.3 */ void QTest::ignoreMessage(QtMsgType type, const QRegularExpression &messagePattern) { QTestLog::ignoreMessage(type, messagePattern); } #endif // QT_NO_REGULAREXPRESSION /*! \internal */ #ifdef Q_OS_WIN static inline bool isWindowsBuildDirectory(const QString &dirName) { return dirName.compare(QLatin1String("Debug"), Qt::CaseInsensitive) == 0 || dirName.compare(QLatin1String("Release"), Qt::CaseInsensitive) == 0; } #endif /*! Extracts a directory from resources to disk. The content is extracted recursively to a temporary folder. The extracted content is removed automatically once the last reference to the return value goes out of scope. \a dirName is the name of the directory to extract from resources. Returns the temporary directory where the data was extracted or null in case of errors. */ QSharedPointer<QTemporaryDir> QTest::qExtractTestData(const QString &dirName) { QSharedPointer<QTemporaryDir> result; // null until success, then == tempDir QSharedPointer<QTemporaryDir> tempDir = QSharedPointer<QTemporaryDir>::create(); tempDir->setAutoRemove(true); if (!tempDir->isValid()) return result; const QString dataPath = tempDir->path(); const QString resourcePath = QLatin1Char(':') + dirName; const QFileInfo fileInfo(resourcePath); if (!fileInfo.isDir()) { qWarning("Resource path '%s' is not a directory.", qPrintable(resourcePath)); return result; } QDirIterator it(resourcePath, QDirIterator::Subdirectories); if (!it.hasNext()) { qWarning("Resource directory '%s' is empty.", qPrintable(resourcePath)); return result; } while (it.hasNext()) { it.next(); QFileInfo fileInfo = it.fileInfo(); if (!fileInfo.isDir()) { const QString destination = dataPath + QLatin1Char('/') + fileInfo.filePath().midRef(resourcePath.length()); QFileInfo destinationFileInfo(destination); QDir().mkpath(destinationFileInfo.path()); if (!QFile::copy(fileInfo.filePath(), destination)) { qWarning("Failed to copy '%s'.", qPrintable(fileInfo.filePath())); return result; } if (!QFile::setPermissions(destination, QFile::ReadUser | QFile::WriteUser | QFile::ReadGroup)) { qWarning("Failed to set permissions on '%s'.", qPrintable(destination)); return result; } } } result = qMove(tempDir); return result; } /*! \internal */ QString QTest::qFindTestData(const QString& base, const char *file, int line, const char *builddir) { QString found; // Testdata priorities: // 1. relative to test binary. if (qApp) { QDir binDirectory(QCoreApplication::applicationDirPath()); if (binDirectory.exists(base)) { found = binDirectory.absoluteFilePath(base); } #ifdef Q_OS_WIN // Windows: The executable is typically located in one of the // 'Release' or 'Debug' directories. else if (isWindowsBuildDirectory(binDirectory.dirName()) && binDirectory.cdUp() && binDirectory.exists(base)) { found = binDirectory.absoluteFilePath(base); } #endif // Q_OS_WIN else if (QTestLog::verboseLevel() >= 2) { const QString candidate = QDir::toNativeSeparators(QCoreApplication::applicationDirPath() + QLatin1Char('/') + base); QTestLog::info(qPrintable( QString::fromLatin1("testdata %1 not found relative to test binary [%2]; " "checking next location").arg(base, candidate)), file, line); } } // 2. installed path. if (found.isEmpty()) { const char *testObjectName = QTestResult::currentTestObjectName(); if (testObjectName) { QString testsPath = QLibraryInfo::location(QLibraryInfo::TestsPath); QString candidate = QString::fromLatin1("%1/%2/%3") .arg(testsPath, QFile::decodeName(testObjectName).toLower(), base); if (QFileInfo::exists(candidate)) { found = candidate; } else if (QTestLog::verboseLevel() >= 2) { QTestLog::info(qPrintable( QString::fromLatin1("testdata %1 not found in tests install path [%2]; " "checking next location") .arg(base, QDir::toNativeSeparators(candidate))), file, line); } } } // 3. relative to test source. if (found.isEmpty()) { // srcdir is the directory containing the calling source file. QFileInfo srcdir = QFileInfo(QFile::decodeName(file)).path(); // If the srcdir is relative, that means it is relative to the current working // directory of the compiler at compile time, which should be passed in as `builddir'. if (!srcdir.isAbsolute() && builddir) { srcdir.setFile(QFile::decodeName(builddir) + QLatin1String("/") + srcdir.filePath()); } QString candidate = QString::fromLatin1("%1/%2").arg(srcdir.canonicalFilePath(), base); if (QFileInfo::exists(candidate)) { found = candidate; } else if (QTestLog::verboseLevel() >= 2) { QTestLog::info(qPrintable( QString::fromLatin1("testdata %1 not found relative to source path [%2]") .arg(base, QDir::toNativeSeparators(candidate))), file, line); } } // 4. Try resources if (found.isEmpty()) { QString candidate = QString::fromLatin1(":/%1").arg(base); if (QFileInfo::exists(candidate)) found = candidate; } // 5. Try current directory if (found.isEmpty()) { QString candidate = QString::fromLatin1("%1/%2").arg(QDir::currentPath()).arg(base); if (QFileInfo::exists(candidate)) found = candidate; } // 6. Try main source directory if (found.isEmpty()) { QString candidate = QTest::mainSourcePath % QLatin1Char('/') % base; if (QFileInfo::exists(candidate)) found = candidate; } if (found.isEmpty()) { QTest::qWarn(qPrintable( QString::fromLatin1("testdata %1 could not be located!").arg(base)), file, line); } else if (QTestLog::verboseLevel() >= 1) { QTestLog::info(qPrintable( QString::fromLatin1("testdata %1 was located at %2").arg(base, QDir::toNativeSeparators(found))), file, line); } return found; } /*! \internal */ QString QTest::qFindTestData(const char *base, const char *file, int line, const char *builddir) { return qFindTestData(QFile::decodeName(base), file, line, builddir); } /*! \internal */ void *QTest::qData(const char *tagName, int typeId) { return fetchData(QTestResult::currentTestData(), tagName, typeId); } /*! \internal */ void *QTest::qGlobalData(const char *tagName, int typeId) { return fetchData(QTestResult::currentGlobalTestData(), tagName, typeId); } /*! \internal */ void *QTest::qElementData(const char *tagName, int metaTypeId) { QTEST_ASSERT(tagName); QTestData *data = QTestResult::currentTestData(); QTEST_ASSERT(data); QTEST_ASSERT(data->parent()); int idx = data->parent()->indexOf(tagName); QTEST_ASSERT(idx != -1); QTEST_ASSERT(data->parent()->elementTypeId(idx) == metaTypeId); return data->data(data->parent()->indexOf(tagName)); } /*! \internal */ void QTest::addColumnInternal(int id, const char *name) { QTestTable *tbl = QTestTable::currentTestTable(); QTEST_ASSERT_X(tbl, "QTest::addColumn()", "Cannot add testdata outside of a _data slot."); tbl->addColumn(id, name); } /*! Appends a new row to the current test data. \a dataTag is the name of the testdata that will appear in the test output. Returns a QTestData reference that can be used to stream in data. Example: \snippet code/src_qtestlib_qtestcase.cpp 20 \b {Note:} This macro can only be used in a test's data function that is invoked by the test framework. See \l {Chapter 2: Data Driven Testing}{Data Driven Testing} for a more extensive example. \sa addColumn(), QFETCH() */ QTestData &QTest::newRow(const char *dataTag) { QTEST_ASSERT_X(dataTag, "QTest::newRow()", "Data tag can not be null"); QTestTable *tbl = QTestTable::currentTestTable(); QTEST_ASSERT_X(tbl, "QTest::newRow()", "Cannot add testdata outside of a _data slot."); QTEST_ASSERT_X(tbl->elementCount(), "QTest::newRow()", "Must add columns before attempting to add rows."); return *tbl->newData(dataTag); } /*! \fn void QTest::addColumn(const char *name, T *dummy = 0) Adds a column with type \c{T} to the current test data. \a name is the name of the column. \a dummy is a workaround for buggy compilers and can be ignored. To populate the column with values, newRow() can be used. Use \l QFETCH() to fetch the data in the actual test. Example: \snippet code/src_qtestlib_qtestcase.cpp 21 To add custom types to the testdata, the type must be registered with QMetaType via \l Q_DECLARE_METATYPE(). \b {Note:} This macro can only be used in a test's data function that is invoked by the test framework. See \l {Chapter 2: Data Driven Testing}{Data Driven Testing} for a more extensive example. \sa QTest::newRow(), QFETCH(), QMetaType */ /*! Returns the name of the binary that is currently executed. */ const char *QTest::currentAppName() { return QTestResult::currentAppName(); } /*! Returns the name of the test function that is currently executed. Example: \snippet code/src_qtestlib_qtestcase.cpp 22 */ const char *QTest::currentTestFunction() { return QTestResult::currentTestFunction(); } /*! Returns the name of the current test data. If the test doesn't have any assigned testdata, the function returns 0. */ const char *QTest::currentDataTag() { return QTestResult::currentDataTag(); } /*! Returns \c true if the current test function failed, otherwise false. */ bool QTest::currentTestFailed() { return QTestResult::currentTestFailed(); } /*! Sleeps for \a ms milliseconds, blocking execution of the test. qSleep() will not do any event processing and leave your test unresponsive. Network communication might time out while sleeping. Use \l qWait() to do non-blocking sleeping. \a ms must be greater than 0. \b {Note:} The qSleep() function calls either \c nanosleep() on unix or \c Sleep() on windows, so the accuracy of time spent in qSleep() depends on the operating system. Example: \snippet code/src_qtestlib_qtestcase.cpp 23 \sa qWait() */ void QTest::qSleep(int ms) { QTEST_ASSERT(ms > 0); #if defined(Q_OS_WINRT) WaitForSingleObjectEx(GetCurrentThread(), ms, true); #elif defined(Q_OS_WIN) Sleep(uint(ms)); #else struct timespec ts = { ms / 1000, (ms % 1000) * 1000 * 1000 }; nanosleep(&ts, NULL); #endif } /*! \internal */ QObject *QTest::testObject() { return currentTestObject; } /*! \internal */ void QTest::setMainSourcePath(const char *file, const char *builddir) { QString mainSourceFile = QFile::decodeName(file); QFileInfo fi; if (builddir) fi.setFile(QDir(QFile::decodeName(builddir)), mainSourceFile); else fi.setFile(mainSourceFile); QTest::mainSourcePath = fi.absolutePath(); } /*! \internal This function is called by various specializations of QTest::qCompare to decide whether to report a failure and to produce verbose test output. The failureMsg parameter can be null, in which case a default message will be output if the compare fails. If the compare succeeds, failureMsg will not be output. If the caller has already passed a failure message showing the compared values, or if those values cannot be stringified, val1 and val2 can be null. */ bool QTest::compare_helper(bool success, const char *failureMsg, char *val1, char *val2, const char *actual, const char *expected, const char *file, int line) { return QTestResult::compare(success, failureMsg, val1, val2, actual, expected, file, line); } /*! \fn bool QTest::qCompare(float const &t1, float const &t2, const char *actual, const char *expected, const char *file, int line) \internal */ bool QTest::qCompare(float const &t1, float const &t2, const char *actual, const char *expected, const char *file, int line) { return compare_helper(qFuzzyCompare(t1, t2), "Compared floats are not the same (fuzzy compare)", toString(t1), toString(t2), actual, expected, file, line); } /*! \fn bool QTest::qCompare(double const &t1, double const &t2, const char *actual, const char *expected, const char *file, int line) \internal */ bool QTest::qCompare(double const &t1, double const &t2, const char *actual, const char *expected, const char *file, int line) { return compare_helper(qFuzzyCompare(t1, t2), "Compared doubles are not the same (fuzzy compare)", toString(t1), toString(t2), actual, expected, file, line); } /*! \fn bool QTest::qCompare(double const &t1, float const &t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(float const &t1, double const &t2, const char *actual, const char *expected, const char *file, int line) \internal */ #define TO_STRING_IMPL(TYPE, FORMAT) \ template <> Q_TESTLIB_EXPORT char *QTest::toString<TYPE >(const TYPE &t) \ { \ char *msg = new char[128]; \ qsnprintf(msg, 128, #FORMAT, t); \ return msg; \ } TO_STRING_IMPL(short, %hd) TO_STRING_IMPL(ushort, %hu) TO_STRING_IMPL(int, %d) TO_STRING_IMPL(uint, %u) TO_STRING_IMPL(long, %ld) TO_STRING_IMPL(ulong, %lu) #if defined(Q_OS_WIN) TO_STRING_IMPL(qint64, %I64d) TO_STRING_IMPL(quint64, %I64u) #else TO_STRING_IMPL(qint64, %lld) TO_STRING_IMPL(quint64, %llu) #endif TO_STRING_IMPL(bool, %d) TO_STRING_IMPL(char, %c) TO_STRING_IMPL(signed char, %hhd) TO_STRING_IMPL(unsigned char, %hhu) TO_STRING_IMPL(float, %g) TO_STRING_IMPL(double, %lg) /*! \internal */ char *QTest::toString(const char *str) { if (!str) return 0; char *msg = new char[strlen(str) + 1]; return qstrcpy(msg, str); } /*! \internal */ char *QTest::toString(const void *p) { char *msg = new char[128]; qsnprintf(msg, 128, "%p", p); return msg; } /*! \internal */ bool QTest::compare_string_helper(const char *t1, const char *t2, const char *actual, const char *expected, const char *file, int line) { return compare_helper(qstrcmp(t1, t2) == 0, "Compared strings are not the same", toString(t1), toString(t2), actual, expected, file, line); } /*! \fn bool QTest::compare_ptr_helper(const void *t1, const void *t2, const char *actual, const char *expected, const char *file, int line); \internal */ /*! \fn bool QTest::qCompare(T1 const &, T2 const &, const char *, const char *, const char *, int); \internal */ /*! \fn bool QTest::qCompare(QIcon const &t1, QIcon const &t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(QImage const &t1, QImage const &t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(QPixmap const &t1, QPixmap const &t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(T const &t1, T const &t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(const T *t1, const T *t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(T *t1, T *t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(const T1 *t1, const T2 *t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(T1 *t1, T2 *t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(const char *t1, const char *t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(char *t1, char *t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(char *t1, const char *t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(const char *t1, char *t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(QString const &t1, QLatin1String const &t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(QLatin1String const &t1, QString const &t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(QStringList const &t1, QStringList const &t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(QList<T> const &t1, QList<T> const &t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(QFlags<T> const &t1, T const &t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(QFlags<T> const &t1, int const &t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(qint64 const &t1, qint32 const &t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(qint64 const &t1, quint32 const &t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(quint64 const &t1, quint32 const &t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(qint32 const &t1, qint64 const &t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(quint32 const &t1, qint64 const &t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qCompare(quint32 const &t1, quint64 const &t2, const char *actual, const char *expected, const char *file, int line) \internal */ /*! \fn bool QTest::qTest(const T& actual, const char *elementName, const char *actualStr, const char *expected, const char *file, int line) \internal */ /*! \fn void QTest::sendKeyEvent(KeyAction action, QWidget *widget, Qt::Key code, QString text, Qt::KeyboardModifiers modifier, int delay=-1) \internal */ /*! \fn void QTest::sendKeyEvent(KeyAction action, QWindow *window, Qt::Key code, QString text, Qt::KeyboardModifiers modifier, int delay=-1) \internal */ /*! \fn void QTest::sendKeyEvent(KeyAction action, QWidget *widget, Qt::Key code, char ascii, Qt::KeyboardModifiers modifier, int delay=-1) \internal */ /*! \fn void QTest::sendKeyEvent(KeyAction action, QWindow *window, Qt::Key code, char ascii, Qt::KeyboardModifiers modifier, int delay=-1) \internal */ /*! \fn void QTest::simulateEvent(QWidget *widget, bool press, int code, Qt::KeyboardModifiers modifier, QString text, bool repeat, int delay=-1) \internal */ /*! \fn void QTest::simulateEvent(QWindow *window, bool press, int code, Qt::KeyboardModifiers modifier, QString text, bool repeat, int delay=-1) \internal */ QT_END_NAMESPACE
13890b2cc5140b1a798e1409bf0b222df5f71087
c29e9d984244dc7d1addaaa8c1fe061c743e3dbd
/cpp code/Problem/PAT A1074.cpp
0151e112c0216f8fc903e0bf549fef4a1b5e806a
[]
no_license
KaihongGo/PAT
b596519a74ff9e5ce508b95fe05070a551896fa1
3b9d80681694aedf33e7f355cb684576156811c4
refs/heads/master
2023-01-09T07:56:18.829829
2020-11-02T13:05:39
2020-11-02T13:05:39
304,880,027
1
0
null
null
null
null
GB18030
C++
false
false
1,088
cpp
PAT A1074.cpp
//PAT A1074.cpp 1074 Reversing Linked List (25 分) //two pointer二路推进策略 #include <iostream> #include <cstdio> #include <algorithm> #include <vector> using namespace std; const int MAXN = 100010; struct Node { int key, addr, next; } list[MAXN]; int main() { int head, n, k; cin >> head >> n >> k; for (int i = 0; i < n; i++) { Node temp; cin >> temp.addr >> temp.key >> temp.next; list[temp.addr] = temp; } vector<int> vi, temp; for (int p = head; p != -1; p = list[p].next) vi.push_back(p); //顺序存放 int i = 0, j = 0; // i pre; j after; while (j < vi.size()) { //二路推进原理, two pointer j = j + k;//j递增k单位 if (j > vi.size()) { //最后一组 while (i < vi.size()) temp.push_back(vi[i++]); } else { //反序添加 for (int pos = j - 1; pos >= i; pos--) temp.push_back(vi[pos]); } i = i + k; } for (int i = 0; i < temp.size(); i++) { printf("%05d %d", temp[i], list[temp[i]].key); if (i == temp.size() - 1) printf(" -1"); else printf(" %05d", temp[i + 1]); printf("\n"); } return 0; }
2272e45fc274dd2189452964a6660ba3657aef51
23f4810fa3adfc5835f6f4378213bf37688888bd
/ControlRobotViaSerialConnection/src/MainController.cpp
543c38f619ac12347af33b51b0b78acec5f356e8
[]
no_license
foreglance/ControlRobotViaSerialConnection
0b933f0cb8b995a3c07a87cc6a428d9659500a10
a5e399465b7c8b2f1936ae0b0e1140d518031a31
refs/heads/master
2021-01-21T02:36:31.366667
2014-03-15T07:11:28
2014-03-15T07:11:28
null
0
0
null
null
null
null
UTF-8
C++
false
false
807
cpp
MainController.cpp
/* * MainController.cpp * * Created on: Mar 12, 2014 * Author: foreglance.com */ #include "MainController.h" #include "ActionResult.h" #include "ConsoleLogger.h" MainController::MainController() { m_logger = new ConsoleLogger; m_conn = new SerialConnection(m_logger); } MainController::~MainController() { if(m_conn->isOpened()) m_conn->closeConnection(); delete(m_conn); delete(m_logger); } void MainController::run(){ m_logger->writeInfo("Control robot via serial connection."); ActionResult actionResult = m_conn->openConnection("/dev/ttyUSB0"); if(!actionResult.isSuccess() || !m_conn->isOpened()){ m_logger->writeError(actionResult.getErrors()); return; } int writtenBytes = m_conn->writeMessage("19 723test\n"); m_logger->writeInfo("Written: %d\n", writtenBytes); }
dd3c6946220584da0ecfdbac15efc71753f45ab9
8d86d4a327220f92e76723bbf655b0121fad9289
/TestApps/Rosetta/BNN/Sources/utils/DataIO.h
818f56ee22abd3c4daa46917dc31bd5be32672f0
[ "MIT" ]
permissive
HansGiesen/hls_tuner
3cd7d8143ddeb704091b62ef6640ccb75d16867b
9c8d03737d1115f4e5cfa03cabc2334ea8b3ca19
refs/heads/master
2023-07-15T09:50:13.636478
2021-08-26T16:49:00
2021-08-26T16:49:00
191,989,889
2
1
MIT
2019-09-19T18:16:39
2019-06-14T18:35:31
VHDL
UTF-8
C++
false
false
876
h
DataIO.h
//------------------------------------------------------------------------ // Class to read the image data //------------------------------------------------------------------------ #include <assert.h> #include "Debug.h" #ifndef RUN_STANDALONE #include "ZipIO.h" #endif #include "Common.h" #include "SArray.h" // This class will load N cifar10 test images struct Cifar10TestInputs { static const unsigned CHANNELS=3; static const unsigned ROWS=32; static const unsigned COLS=32; float* data; unsigned m_size; Cifar10TestInputs(const std::string & filename, unsigned n); ~Cifar10TestInputs() { delete[] data; } unsigned size() { return m_size; } }; struct Cifar10TestLabels { float* data; unsigned m_size; Cifar10TestLabels(const std::string & filename, unsigned n); ~Cifar10TestLabels() { delete[] data; } unsigned size() { return m_size; } };
2b5bf070f4a61cc0f6774e90d60dcb78308aa520
590f8a12ed8c667ded41ca8d3c36eb2de270b6d0
/Q2/arorachaitanya.Q2.cpp
35875b369ae3ee1c6a2226e4f7f0b1c621361566
[]
no_license
rajranjan0608/yourFirstPR
71bd45f0390732dbc1cbbf3702c9ca433ca9521b
74c7187a8821ea89765c956f46872265f7815a8e
refs/heads/master
2022-11-02T00:13:51.798880
2022-10-02T17:11:19
2022-10-02T17:11:19
212,445,108
8
70
null
2022-10-28T05:04:46
2019-10-02T21:30:38
C
UTF-8
C++
false
false
249
cpp
arorachaitanya.Q2.cpp
#include <iostream> using namespace std; int main() { int n1; cout << "enter a number to check even or odd ."; cin >> n1; if (n1 % 2 == 0) cout << n1 << " is even number."; else cout << n1 << " is odd number."; }
3639b1687542ce403038c10c5d36678333139ef4
a78cbb3413a46c8b75ed2d313b46fdd76fff091f
/src/mobius.atp/mobius.cvc3/cvc3-20090730/java/src/cvc3/ValidityChecker_impl.cpp
ee72d24b65cdef3c20ee5b99acaf60cdc935a592
[]
no_license
wellitongb/Mobius
806258d483bd9b893312d7565661dadbf3f92cda
4b16bae446ef5b91b65fd248a1d22ffd7db94771
refs/heads/master
2021-01-16T22:25:14.294886
2013-02-18T20:25:24
2013-02-18T20:25:24
null
0
0
null
null
null
null
UTF-8
C++
false
false
28,600
cpp
ValidityChecker_impl.cpp
INCLUDE: <sstream> INCLUDE: <theory_arith.h> DEFINITION: Java_cvc3_ValidityChecker_jniCreate1 jobject return embed_own<ValidityChecker>(env, VCL::create()); DEFINITION: Java_cvc3_ValidityChecker_jniCreate2 jobject c CLFlags flags return embed_own<ValidityChecker>(env, VCL::create(*flags)); DEFINITION: Java_cvc3_ValidityChecker_jniCreateFlags jobject return embed_copy(env, ValidityChecker::createFlags()); DEFINITION: Java_cvc3_ValidityChecker_jniGetFlags jobject c ValidityChecker vc return embed_mut_ref(env, &vc->getFlags()); DEFINITION: Java_cvc3_ValidityChecker_jniBoolType jobject m ValidityChecker vc return embed_copy(env, vc->boolType()); DEFINITION: Java_cvc3_ValidityChecker_jniRealType jobject m ValidityChecker vc return embed_copy(env, vc->realType()); DEFINITION: Java_cvc3_ValidityChecker_jniIntType jobject m ValidityChecker vc return embed_copy(env, vc->intType()); DEFINITION: Java_cvc3_ValidityChecker_jniSubrangeType jobject m ValidityChecker vc c Expr l c Expr r return embed_copy(env, vc->subrangeType(*l, *r)); DEFINITION: Java_cvc3_ValidityChecker_jniSubtypeType jobject m ValidityChecker vc c Expr pred c Expr witness return embed_copy(env, vc->subtypeType(*pred, *witness)); DEFINITION: Java_cvc3_ValidityChecker_jniTupleType1 jobject m ValidityChecker vc c Type type0 c Type type1 return embed_copy(env, vc->tupleType(*type0, *type1)); DEFINITION: Java_cvc3_ValidityChecker_jniTupleType2 jobject m ValidityChecker vc c Type type0 c Type type1 c Type type2 return embed_copy(env, vc->tupleType(*type0, *type1, *type2)); DEFINITION: Java_cvc3_ValidityChecker_jniTupleType3 jobject m ValidityChecker vc cv Type types return embed_copy(env, vc->tupleType(types)); DEFINITION: Java_cvc3_ValidityChecker_jniRecordType1 jobject m ValidityChecker vc n string field c Type type return embed_copy(env, vc->recordType(field, *type)); DEFINITION: Java_cvc3_ValidityChecker_jniRecordType2 jobject m ValidityChecker vc n string field0 c Type type0 n string field1 c Type type1 return embed_copy(env, vc->recordType(field0, *type0, field1, *type1)); DEFINITION: Java_cvc3_ValidityChecker_jniRecordType3 jobject m ValidityChecker vc n string field0 c Type type0 n string field1 c Type type1 n string field2 c Type type2 return embed_copy(env, vc->recordType(field0, *type0, field1, *type1, field2, *type2)); DEFINITION: Java_cvc3_ValidityChecker_jniRecordType4 jobject m ValidityChecker vc nv string fields cv Type types return embed_copy(env, vc->recordType(fields, types)); DEFINITION: Java_cvc3_ValidityChecker_jniDataType1 jobject m ValidityChecker vc n string name n string constructor nv string selectors cv Expr types return embed_copy(env, vc->dataType(name, constructor, selectors, types)); DEFINITION: Java_cvc3_ValidityChecker_jniDataType2 jobject m ValidityChecker vc n string name nv string constructors nvv string selectors cvv Expr types return embed_copy(env, vc->dataType(name, constructors, selectors, types)); DEFINITION: Java_cvc3_ValidityChecker_jniDataType3 jobjectArray m ValidityChecker vc nv string names nvv string constructors nvvv string selectors cvvv Expr types vector<Type> result; vc->dataType(names, constructors, selectors, types, result); return toJavaVCopy(env, result); DEFINITION: Java_cvc3_ValidityChecker_jniArrayType jobject m ValidityChecker vc c Type typeIndex c Type typeData return embed_copy(env, vc->arrayType(*typeIndex, *typeData)); DEFINITION: Java_cvc3_ValidityChecker_jniBitvecType jobject m ValidityChecker vc n int n return embed_copy(env, vc->bitvecType(n)); DEFINITION: Java_cvc3_ValidityChecker_jniFunType1 jobject m ValidityChecker vc c Type typeDom c Type typeRange return embed_copy(env, vc->funType(*typeDom, *typeRange)); DEFINITION: Java_cvc3_ValidityChecker_jniFunType2 jobject m ValidityChecker vc cv Type typeDom c Type typeRange return embed_copy(env, vc->funType(typeDom, *typeRange)); DEFINITION: Java_cvc3_ValidityChecker_jniCreateType1 jobject m ValidityChecker vc n string typeName return embed_copy(env, vc->createType(typeName)); DEFINITION: Java_cvc3_ValidityChecker_jniCreateType2 jobject m ValidityChecker vc n string typeName c Type typeDef return embed_copy(env, vc->createType(typeName, *typeDef)); DEFINITION: Java_cvc3_ValidityChecker_jniLookupType jobject m ValidityChecker vc n string typeName return embed_copy(env, vc->lookupType(typeName)); DEFINITION: Java_cvc3_ValidityChecker_jniGetExprManager jobject m ValidityChecker vc return embed_mut_ref(env, vc->getEM()); DEFINITION: Java_cvc3_ValidityChecker_jniNullExpr jobject m ValidityChecker vc return embed_copy(env, Expr()); DEFINITION: Java_cvc3_ValidityChecker_jniVarExpr1 jobject m ValidityChecker vc n string name c Type type return embed_copy(env, vc->varExpr(name, *type)); DEFINITION: Java_cvc3_ValidityChecker_jniVarExpr2 jobject m ValidityChecker vc n string name c Type type c Expr def return embed_copy(env, vc->varExpr(name, *type, *def)); DEFINITION: Java_cvc3_ValidityChecker_jniBoundVarExpr jobject m ValidityChecker vc n string name n string uid c Type type return embed_copy(env, vc->boundVarExpr(name, uid, *type)); DEFINITION: Java_cvc3_ValidityChecker_jniLookupVar jobject m ValidityChecker vc n string name m Type type return embed_copy(env, vc->lookupVar(name, type)); DEFINITION: Java_cvc3_ValidityChecker_jniGetType jobject m ValidityChecker vc c Expr expr return embed_copy(env, vc->getType(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniGetBaseType1 jobject m ValidityChecker vc c Expr expr return embed_copy(env, vc->getBaseType(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniGetBaseType2 jobject m ValidityChecker vc c Type type return embed_copy(env, vc->getBaseType(*type)); DEFINITION: Java_cvc3_ValidityChecker_jniGetTypePred jobject m ValidityChecker vc c Type type c Expr expr return embed_copy(env, vc->getTypePred(*type, *expr)); DEFINITION: Java_cvc3_ValidityChecker_jniStringExpr jobject m ValidityChecker vc n string str return embed_copy(env, vc->stringExpr(str)); DEFINITION: Java_cvc3_ValidityChecker_jniIdExpr jobject m ValidityChecker vc n string name return embed_copy(env, vc->idExpr(name)); DEFINITION: Java_cvc3_ValidityChecker_jniListExpr1 jobject m ValidityChecker vc cv Expr kids return embed_copy(env, vc->listExpr(kids)); DEFINITION: Java_cvc3_ValidityChecker_jniListExpr2 jobject m ValidityChecker vc c Expr expr1 return embed_copy(env, vc->listExpr(*expr1)); DEFINITION: Java_cvc3_ValidityChecker_jniListExpr3 jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->listExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniListExpr4 jobject m ValidityChecker vc c Expr expr1 c Expr expr2 c Expr expr3 return embed_copy(env, vc->listExpr(*expr1, *expr2, *expr3)); DEFINITION: Java_cvc3_ValidityChecker_jniListExpr5 jobject m ValidityChecker vc n string op cv Expr kids return embed_copy(env, vc->listExpr(op, kids)); DEFINITION: Java_cvc3_ValidityChecker_jniListExpr6 jobject m ValidityChecker vc n string op c Expr expr1 return embed_copy(env, vc->listExpr(op, *expr1)); DEFINITION: Java_cvc3_ValidityChecker_jniListExpr7 jobject m ValidityChecker vc n string op c Expr expr1 c Expr expr2 return embed_copy(env, vc->listExpr(op, *expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniListExpr8 jobject m ValidityChecker vc n string op c Expr expr1 c Expr expr2 c Expr expr3 return embed_copy(env, vc->listExpr(op, *expr1, *expr2, *expr3)); DEFINITION: Java_cvc3_ValidityChecker_jniParseExpr jobject m ValidityChecker vc c Expr expr return embed_copy(env, vc->parseExpr(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniParseType jobject m ValidityChecker vc c Expr expr return embed_copy(env, vc->parseType(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniImportExpr jobject m ValidityChecker vc c Expr expr return embed_copy(env, vc->importExpr(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniImportType jobject m ValidityChecker vc c Type type return embed_copy(env, vc->importType(*type)); DEFINITION: Java_cvc3_ValidityChecker_jniTrueExpr jobject m ValidityChecker vc return embed_copy<Expr>(env, vc->trueExpr()); DEFINITION: Java_cvc3_ValidityChecker_jniFalseExpr jobject m ValidityChecker vc return embed_copy<Expr>(env, vc->falseExpr()); DEFINITION: Java_cvc3_ValidityChecker_jniNotExpr jobject m ValidityChecker vc c Expr expr return embed_copy(env, vc->notExpr(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniAndExpr1 jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->andExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniAndExpr2 jobject m ValidityChecker vc cv Expr children return embed_copy(env, vc->andExpr(children)); DEFINITION: Java_cvc3_ValidityChecker_jniOrExpr1 jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->orExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniOrExpr2 jobject m ValidityChecker vc cv Expr children return embed_copy(env, vc->orExpr(children)); DEFINITION: Java_cvc3_ValidityChecker_jniImpliesExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->impliesExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniIffExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->iffExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniEqExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->eqExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniDistinctExpr jobject m ValidityChecker vc cv Expr children return embed_copy(env, vc->distinctExpr(children)); DEFINITION: Java_cvc3_ValidityChecker_jniIteExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 c Expr expr3 return embed_copy(env, vc->iteExpr(*expr1, *expr2, *expr3)); DEFINITION: Java_cvc3_ValidityChecker_jniCreateOp1 jobject m ValidityChecker vc n string name c Type type return embed_copy(env, vc->createOp(name, *type)); DEFINITION: Java_cvc3_ValidityChecker_jniCreateOp2 jobject m ValidityChecker vc n string name c Type type c Expr expr return embed_copy(env, vc->createOp(name, *type, *expr)); DEFINITION: Java_cvc3_ValidityChecker_jniEqOp jobject return embed_copy<Op>(env, Op(EQ)); DEFINITION: Java_cvc3_ValidityChecker_jniLtOp jobject return embed_copy<Op>(env, Op(LT)); DEFINITION: Java_cvc3_ValidityChecker_jniLeOp jobject return embed_copy<Op>(env, Op(LE)); DEFINITION: Java_cvc3_ValidityChecker_jniGtOp jobject return embed_copy<Op>(env, Op(GT)); DEFINITION: Java_cvc3_ValidityChecker_jniGeOp jobject return embed_copy<Op>(env, Op(GE)); DEFINITION: Java_cvc3_ValidityChecker_jniPlusOp jobject return embed_copy<Op>(env, Op(PLUS)); DEFINITION: Java_cvc3_ValidityChecker_jniMinusOp jobject return embed_copy<Op>(env, Op(MINUS)); DEFINITION: Java_cvc3_ValidityChecker_jniMultOp jobject return embed_copy<Op>(env, Op(MULT)); DEFINITION: Java_cvc3_ValidityChecker_jniDivideOp jobject return embed_copy<Op>(env, Op(DIVIDE)); DEFINITION: Java_cvc3_ValidityChecker_jniFunExpr1 jobject m ValidityChecker vc c Op op c Expr expr1 return embed_copy(env, vc->funExpr(*op, *expr1)); DEFINITION: Java_cvc3_ValidityChecker_jniFunExpr2 jobject m ValidityChecker vc c Op op c Expr expr1 c Expr expr2 return embed_copy(env, vc->funExpr(*op, *expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniFunExpr3 jobject m ValidityChecker vc c Op op c Expr expr1 c Expr expr2 c Expr expr3 return embed_copy(env, vc->funExpr(*op, *expr1, *expr2, *expr3)); DEFINITION: Java_cvc3_ValidityChecker_jniFunExpr4 jobject m ValidityChecker vc c Op op cv Expr children return embed_copy(env, vc->funExpr(*op, children)); DEFINITION: Java_cvc3_ValidityChecker_jniRatExpr1 jobject m ValidityChecker vc n int n n int d return embed_copy(env, vc->ratExpr(n, d)); DEFINITION: Java_cvc3_ValidityChecker_jniRatExpr2 jobject m ValidityChecker vc n string n n string d n int base return embed_copy(env, vc->ratExpr(n, d, base)); DEFINITION: Java_cvc3_ValidityChecker_jniRatExpr3 jobject m ValidityChecker vc n string n n int base return embed_copy(env, vc->ratExpr(n, base)); DEFINITION: Java_cvc3_ValidityChecker_jniUminusExpr jobject m ValidityChecker vc c Expr expr return embed_copy(env, vc->uminusExpr(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniPlusExpr1 jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->plusExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniPlusExpr2 jobject m ValidityChecker vc cv Expr kids return embed_copy(env, vc->plusExpr(kids)); DEFINITION: Java_cvc3_ValidityChecker_jniMinusExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->minusExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniMultExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->multExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniPowExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->powExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniDivideExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->divideExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniLtExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->ltExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniLeExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->leExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniGtExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->gtExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniGeExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->geExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniRecordExpr1 jobject m ValidityChecker vc n string field c Expr expr return embed_copy(env, vc->recordExpr(field, *expr)); DEFINITION: Java_cvc3_ValidityChecker_jniRecordExpr2 jobject m ValidityChecker vc n string field1 c Expr expr1 n string field2 c Expr expr2 return embed_copy(env, vc->recordExpr(field1, *expr1, field2, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniRecordExpr3 jobject m ValidityChecker vc n string field1 c Expr expr1 n string field2 c Expr expr2 n string field3 c Expr expr3 return embed_copy(env, vc->recordExpr(field1, *expr1, field2, *expr2, field2, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniRecordExpr4 jobject m ValidityChecker vc nv string fields cv Expr exprs return embed_copy(env, vc->recordExpr(fields, exprs)); DEFINITION: Java_cvc3_ValidityChecker_jniRecSelectExpr jobject m ValidityChecker vc c Expr record n string field return embed_copy(env, vc->recSelectExpr(*record, field)); DEFINITION: Java_cvc3_ValidityChecker_jniRecUpdateExpr jobject m ValidityChecker vc c Expr record n string field c Expr update return embed_copy(env, vc->recUpdateExpr(*record, field, *update)); DEFINITION: Java_cvc3_ValidityChecker_jniReadExpr jobject m ValidityChecker vc c Expr array c Expr index return embed_copy(env, vc->readExpr(*array, *index)); DEFINITION: Java_cvc3_ValidityChecker_jniWriteExpr jobject m ValidityChecker vc c Expr array c Expr index c Expr value return embed_copy(env, vc->writeExpr(*array, *index, *value)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVConstExpr1 jobject m ValidityChecker vc n string s n int base return embed_copy(env, vc->newBVConstExpr(s, jbase)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVConstExpr2 jobject m ValidityChecker vc nv bool bits return embed_copy(env, vc->newBVConstExpr(bits)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVConstExpr3 jobject m ValidityChecker vc c Rational rational n int len return embed_copy(env, vc->newBVConstExpr(*rational, len)); DEFINITION: Java_cvc3_ValidityChecker_jniNewConcatExpr1 jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newConcatExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewConcatExpr2 jobject m ValidityChecker vc cv Expr kids return embed_copy(env, vc->newConcatExpr(kids)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVExtractExpr jobject m ValidityChecker vc c Expr expr n int hi n int low return embed_copy(env, vc->newBVExtractExpr(*expr, hi, low)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVNegExpr jobject m ValidityChecker vc c Expr expr return embed_copy(env, vc->newBVNegExpr(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVAndExpr1 jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVAndExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVAndExpr2 jobject m ValidityChecker vc cv Expr kids return embed_copy(env, vc->newBVAndExpr(kids)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVOrExpr1 jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVOrExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVOrExpr2 jobject m ValidityChecker vc cv Expr kids return embed_copy(env, vc->newBVOrExpr(kids)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVXorExpr1 jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVXorExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVXorExpr2 jobject m ValidityChecker vc cv Expr kids return embed_copy(env, vc->newBVXorExpr(kids)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVXnorExpr1 jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVXnorExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVXnorExpr2 jobject m ValidityChecker vc cv Expr kids return embed_copy(env, vc->newBVXnorExpr(kids)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVNandExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVNandExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVNorExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVNorExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVLTExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVLTExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVLEExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVLEExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVSLTExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVSLTExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVSLEExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVSLEExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewSXExpr jobject m ValidityChecker vc c Expr expr n int len return embed_copy(env, vc->newSXExpr(*expr, len)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVUminusExpr jobject m ValidityChecker vc c Expr expr return embed_copy(env, vc->newBVUminusExpr(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVSubExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVSubExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVPlusExpr jobject m ValidityChecker vc n int numbits cv Expr exprs return embed_copy(env, vc->newBVPlusExpr(numbits, exprs)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVMultExpr jobject m ValidityChecker vc n int numbits c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVMultExpr(numbits, *expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVUDivExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVUDivExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVURemExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVURemExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVSDivExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVSDivExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVSRemExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVSRemExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewBVSModExpr jobject m ValidityChecker vc c Expr expr1 c Expr expr2 return embed_copy(env, vc->newBVSModExpr(*expr1, *expr2)); DEFINITION: Java_cvc3_ValidityChecker_jniNewFixedLeftShiftExpr jobject m ValidityChecker vc c Expr expr n int r return embed_copy(env, vc->newFixedLeftShiftExpr(*expr, r)); DEFINITION: Java_cvc3_ValidityChecker_jniNewFixedConstWidthLeftShiftExpr jobject m ValidityChecker vc c Expr expr n int r return embed_copy(env, vc->newFixedConstWidthLeftShiftExpr(*expr, r)); DEFINITION: Java_cvc3_ValidityChecker_jniNewFixedRightShiftExpr jobject m ValidityChecker vc c Expr expr n int r return embed_copy(env, vc->newFixedRightShiftExpr(*expr, r)); DEFINITION: Java_cvc3_ValidityChecker_jniTupleExpr jobject m ValidityChecker vc cv Expr exprs return embed_copy(env, vc->tupleExpr(exprs)); DEFINITION: Java_cvc3_ValidityChecker_jniTupleSelectExpr jobject m ValidityChecker vc c Expr tuple n int index return embed_copy(env, vc->tupleSelectExpr(*tuple, index)); DEFINITION: Java_cvc3_ValidityChecker_jniTupleUpdateExpr jobject m ValidityChecker vc c Expr tuple n int index c Expr value return embed_copy(env, vc->tupleUpdateExpr(*tuple, index, *value)); DEFINITION: Java_cvc3_ValidityChecker_jniDatatypeConsExpr jobject m ValidityChecker vc n string constructor cv Expr exprs return embed_copy(env, vc->datatypeConsExpr(constructor, exprs)); DEFINITION: Java_cvc3_ValidityChecker_jniDatatypeSelExpr jobject m ValidityChecker vc n string selector c Expr expr return embed_copy(env, vc->datatypeSelExpr(selector, *expr)); DEFINITION: Java_cvc3_ValidityChecker_jniDatatypeTestExpr jobject m ValidityChecker vc n string constructor c Expr expr return embed_copy(env, vc->datatypeTestExpr(constructor, *expr)); DEFINITION: Java_cvc3_ValidityChecker_jniForallExpr1 jobject m ValidityChecker vc cv Expr vars c Expr body return embed_copy(env, vc->forallExpr(vars, *body)); DEFINITION: Java_cvc3_ValidityChecker_jniForallExpr2 jobject m ValidityChecker vc cv Expr vars c Expr body cv Expr triggers return embed_copy(env, vc->forallExpr(vars, *body, triggers)); DEFINITION: Java_cvc3_ValidityChecker_jniSetTriggers void m ValidityChecker vc c Expr closure cv Expr triggers vc->setTriggers(*closure, triggers); DEFINITION: Java_cvc3_ValidityChecker_jniExistsExpr jobject m ValidityChecker vc cv Expr vars c Expr body return embed_copy(env, vc->existsExpr(vars, *body)); DEFINITION: Java_cvc3_ValidityChecker_jniLambdaExpr jobject m ValidityChecker vc cv Expr vars c Expr body return embed_copy(env, vc->lambdaExpr(vars, *body)); DEFINITION: Java_cvc3_ValidityChecker_jniTransClosure jobject m ValidityChecker vc c Op p return embed_copy(env, vc->transClosure(*p)); DEFINITION: Java_cvc3_ValidityChecker_jniSimulateExpr jobject m ValidityChecker vc c Expr f c Expr s cv Expr inputs c Expr n return embed_copy(env, vc->simulateExpr(*f, *s, inputs, *n)); DEFINITION: Java_cvc3_ValidityChecker_jniSetResourceLimit void m ValidityChecker vc n int limit vc->setResourceLimit(limit); DEFINITION: Java_cvc3_ValidityChecker_jniAssertFormula void m ValidityChecker vc c Expr expr vc->assertFormula(*expr); DEFINITION: Java_cvc3_ValidityChecker_jniRegisterAtom void m ValidityChecker vc c Expr expr vc->registerAtom(*expr); DEFINITION: Java_cvc3_ValidityChecker_jniGetImpliedLiteral jobject m ValidityChecker vc return embed_copy(env, vc->getImpliedLiteral()); DEFINITION: Java_cvc3_ValidityChecker_jniSimplify jobject m ValidityChecker vc c Expr expr return embed_copy(env, vc->simplify(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniQuery jstring m ValidityChecker vc c Expr expr return toJava(env, vc->query(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniCheckUnsat jstring m ValidityChecker vc c Expr expr return toJava(env, vc->checkUnsat(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniCheckContinue jstring m ValidityChecker vc return toJava(env, vc->checkContinue()); DEFINITION: Java_cvc3_ValidityChecker_jniRestart jstring m ValidityChecker vc c Expr expr return toJava(env, vc->restart(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniReturnFromCheck void m ValidityChecker vc vc->returnFromCheck(); DEFINITION: Java_cvc3_ValidityChecker_jniGetUserAssumptions jobjectArray m ValidityChecker vc vector<Expr> result; vc->getUserAssumptions(result); return toJavaVCopy(env, result); DEFINITION: Java_cvc3_ValidityChecker_jniGetInternalAssumptions jobjectArray m ValidityChecker vc vector<Expr> result; vc->getInternalAssumptions(result); return toJavaVCopy(env, result); DEFINITION: Java_cvc3_ValidityChecker_jniGetAssumptions jobjectArray m ValidityChecker vc vector<Expr> result; vc->getAssumptions(result); return toJavaVCopy(env, result); DEFINITION: Java_cvc3_ValidityChecker_jniGetAssumptionsUsed jobjectArray m ValidityChecker vc vector<Expr> result; vc->getAssumptionsUsed(result); return toJavaVCopy(env, result); DEFINITION: Java_cvc3_ValidityChecker_jniGetCounterExample jobjectArray m ValidityChecker vc n bool inOrder vector<Expr> result; vc->getCounterExample(result, inOrder); return toJavaVCopy(env, result); DEFINITION: Java_cvc3_ValidityChecker_jniGetValue jstring m ValidityChecker vc c Expr expr return toJava(env, vc->value(*expr)); DEFINITION: Java_cvc3_ValidityChecker_jniGetConcreteModel jobjectArray m ValidityChecker vc ExprMap<Expr> result; vc->getConcreteModel(result); return toJavaHCopy(env, result); DEFINITION: Java_cvc3_ValidityChecker_jniInconsistent1 jboolean m ValidityChecker vc return vc->inconsistent(); DEFINITION: Java_cvc3_ValidityChecker_jniInconsistent2 jobjectArray m ValidityChecker vc vector<Expr> result; bool inconsistent = vc->inconsistent(result); assert(inconsistent); return toJavaVCopy(env, result); DEFINITION: Java_cvc3_ValidityChecker_jniIncomplete1 jboolean m ValidityChecker vc return vc->incomplete(); DEFINITION: Java_cvc3_ValidityChecker_jniIncomplete2 jobjectArray m ValidityChecker vc vector<std::string> result; bool incomplete = vc->incomplete(result); assert(incomplete); return toJavaVCopy(env, result); DEFINITION: Java_cvc3_ValidityChecker_jniGetProof jobject m ValidityChecker vc return embed_copy(env, vc->getProof()); DEFINITION: Java_cvc3_ValidityChecker_jniGetTCC jobject m ValidityChecker vc return embed_copy(env, vc->getTCC()); DEFINITION: Java_cvc3_ValidityChecker_jniGetAssumptionsTCC jobjectArray m ValidityChecker vc vector<Expr> result; vc->getAssumptionsTCC(result); return toJavaVCopy(env, result); DEFINITION: Java_cvc3_ValidityChecker_jniGetProofTCC jobject m ValidityChecker vc return embed_copy(env, vc->getProofTCC()); DEFINITION: Java_cvc3_ValidityChecker_jniGetClosure jobject m ValidityChecker vc return embed_copy(env, vc->getClosure()); DEFINITION: Java_cvc3_ValidityChecker_jniGetProofClosure jobject m ValidityChecker vc return embed_copy(env, vc->getProofClosure()); DEFINITION: Java_cvc3_ValidityChecker_jniStackLevel jint m ValidityChecker vc return vc->stackLevel(); DEFINITION: Java_cvc3_ValidityChecker_jniPush void m ValidityChecker vc vc->push(); DEFINITION: Java_cvc3_ValidityChecker_jniPop void m ValidityChecker vc vc->pop(); DEFINITION: Java_cvc3_ValidityChecker_jniPopTo void m ValidityChecker vc n int stackLevel vc->popto(stackLevel); DEFINITION: Java_cvc3_ValidityChecker_jniScopeLevel jint m ValidityChecker vc return vc->scopeLevel(); DEFINITION: Java_cvc3_ValidityChecker_jniPushScope void m ValidityChecker vc vc->pushScope(); DEFINITION: Java_cvc3_ValidityChecker_jniPopScope void m ValidityChecker vc vc->popScope(); DEFINITION: Java_cvc3_ValidityChecker_jniPopToScope void m ValidityChecker vc n int stackLevel vc->poptoScope(stackLevel); DEFINITION: Java_cvc3_ValidityChecker_jniGetCurrentContext jobject m ValidityChecker vc return embed_mut_ref(env, vc->getCurrentContext()); DEFINITION: Java_cvc3_ValidityChecker_jniLoadFile1 void m ValidityChecker vc n string fileName n string lang vc->loadFile(fileName, toCppInputLanguage(env, lang), false); DEFINITION: Java_cvc3_ValidityChecker_jniGetStatistics jobject m ValidityChecker vc return embed_mut_ref(env, &vc->getStatistics()); DEFINITION: Java_cvc3_ValidityChecker_jniPrintStatistics void m ValidityChecker vc vc->printStatistics(); DEFINITION: Java_cvc3_ValidityChecker_jniSetTimeLimit void m ValidityChecker vc n int n vc->setTimeLimit((uint)n);
0bf660cc8edec7b8d5a115b06a163bc17f0af4a1
eef9f643eb82bc50028012a170edd154a05b5989
/Hackerrank/DesinerPDFViewer.cpp
49cf3de59350061e2c5f02c5170f69ade3e56e04
[]
no_license
KhanhMachinLearning/Coding-Inteview
035d27839ac9656c3023be9a8d0a2ee9629da423
2a95da5a3b0afa8aa2d53a27ac6d214a4da37ede
refs/heads/master
2020-03-31T23:58:18.770792
2018-10-14T02:10:56
2018-10-14T02:10:56
152,676,380
0
0
null
null
null
null
UTF-8
C++
false
false
463
cpp
DesinerPDFViewer.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; while(t--){ int length_[26]; for(int i=0;i<26;i++) cin>>length_[i]; string s; cin>>s; int max = length_[s[0]-'a']; for(int i=1;i<s.length();i++){ if(max < length_[s[i]-'a']){ max = length_[s[i]-'a']; } } // int result = s.length() * max; cout<<result<<endl; } }
6edf4bb7aa072b9f9e27bc410167c97ae4ec262a
bd0a55c760a3a92e51c807d79f495a23564abeff
/week12/newtiles/newtiles_1.cpp
2bd3759a3d4b39fd015b83d83dd834269c04773c
[]
no_license
miqueljubert/AlgoLab17
4d595cf9d5d176a786cc268098e300a19d72316a
ff0c3b6a184db1a5645b6ffccd2a9965e65fd987
refs/heads/master
2021-04-30T13:16:41.717730
2018-02-13T12:58:45
2018-02-13T12:58:45
121,290,363
0
0
null
null
null
null
UTF-8
C++
false
false
1,854
cpp
newtiles_1.cpp
#include <iostream> #include <vector> using namespace std; int max_tiles( int row, int column, int h, int w, int prev_mask, int mask, const vector<int> &states, vector<vector<int>> &table ) { if( row == h ) return 0; if( column >= w-1 ) return max_tiles( row+1, 0, h, w, mask, 0, states, table ); int row_state = states[row] & ~prev_mask & ~mask; if( table[row][row_state] != -1 ) return table[row][row_state]; int n_row_state = states[row+1] & ~mask; bool b1 = (bool)(row_state & (0x01<<(w-column-1))); bool b2 = (bool)(row_state & (0x01<<(w-column-2))); bool b3 = (bool)(n_row_state & (0x01<<(w-column-1))); bool b4 = (bool)(n_row_state & (0x01<<(w-column-2))); bool can_place = b1 and b2 and b3 and b4; if( not can_place ) return max_tiles( row, column+1, h, w, prev_mask, mask, states, table ); //If we can place int n_mask = mask | (0x01<<(w-column-1)); n_mask = n_mask | (0x01<<(w-column-2)); return table[row][row_state] = std::max( max_tiles(row, column+2, h, w, prev_mask, n_mask, states, table)+1, max_tiles(row, column+1, h, w, prev_mask, mask, states, table) ); } void run() { int h,w; cin>>h>>w; vector<int> states(h,0); for( int i = 0; i < h; i++ ) { for( int j = 0; j < w; j++ ) { bool b; cin>>b; if( b ) states[i] |= 0x01<<(w-j-1); } } //for( int i = 0; i < h; i++ ) { // for( int j = 0; j < w; j++ ) { // cout<<(bool)(states[i] & (0x01<<(w-j-1)))<<" "; // } // cout<<endl; //} vector<vector<int>> table(h,vector<int>(0x01<<w,-1)); std::cout<<max_tiles(1,1,h,w,0,0,states,table)<<std::endl; } int main() { int t; std::cin>>t; for( int i = 0; i < t; i++ ) run(); }
a613130b09830b74a83e0d9e3bca9b5c4e7f2cd5
f959849552c83bcccdfdb3ec7f200348fda2309b
/cmdnet/multicast/commander/src/DeviceManager.h
9de9e9678e789a2d278ab604c7c2ee240c6a2a31
[]
no_license
sujeet-banerjee/radio
a907b93c50f0929e1e3dd7161d4f1939515fee1b
b63e5ed37c5581c3aab23d8bf8c41f37cc1765a0
refs/heads/master
2020-06-28T11:46:46.297312
2017-01-06T09:00:30
2017-01-06T09:00:30
67,323,791
1
0
null
null
null
null
UTF-8
C++
false
false
592
h
DeviceManager.h
/* * DeviceManager.h * * Created on: Oct 6, 2016 * Author: banerjees */ #ifndef SRC_DEVICEMANAGER_H_ #define SRC_DEVICEMANAGER_H_ class DeviceManager { public: DeviceManager(); virtual ~DeviceManager(); void interrupt(); void setup(); /** * Obsolete, please remove it * The device manager will either * 1. receive interrupt and thereby doing a callback on device-state-change listeners, OR, * 2. receive direct call to update the device status from its callers/clients. * Thus no regular looping needed. */ void loop(); }; #endif /* SRC_DEVICEMANAGER_H_ */
d876a762b1b00741430f4dcbae7a56bc2b97e3c2
2277375bd4a554d23da334dddd091a36138f5cae
/ThirdParty/Havok/Source/Common/Compat/Patches/2011_2/hkpPatches_2011_2.cpp
e59c9605ced232abf8d5adffeb76ff2610c48190
[]
no_license
kevinmore/Project-Nebula
9a0553ccf8bdc1b4bb5e2588fc94516d9e3532bc
f6d284d4879ae1ea1bd30c5775ef8733cfafa71d
refs/heads/master
2022-10-22T03:55:42.596618
2020-06-19T09:07:07
2020-06-19T09:07:07
25,372,691
6
5
null
null
null
null
UTF-8
C++
false
false
2,592
cpp
hkpPatches_2011_2.cpp
/* * * Confidential Information of Telekinesys Research Limited (t/a Havok). Not for disclosure or distribution without Havok's * prior written consent. This software contains code, techniques and know-how which is confidential and proprietary to Havok. * Product and Trade Secret source code contains trade secrets of Havok. Havok Software (C) Copyright 1999-2013 Telekinesys Research Limited t/a Havok. All Rights Reserved. Use of this software is subject to the terms of an end user license agreement. * */ #include <Common/Compat/hkCompat.h> #include <Common/Serialize/Data/hkDataObject.h> #include <Common/Serialize/Version/hkVersionPatchManager.h> #include <Common/Base/KeyCode.h> // Registration function is at the end of the file static void hkpBreakableShape_0_to_1(hkDataObject& obj) { obj["physicsShape"] = obj["oldPhysicsShape"]; } static void hkpWorldCinfo_16_to_17(hkDataObject& obj) { // Convert (removed) BROADPHASE_TYPE_SAP_AND_KD_TREE_DEPRECATED to BROADPHASE_TYPE_TREE if( obj["broadPhaseType"].asInt() == 3 ) // BROADPHASE_TYPE_SAP_AND_KD_TREE_DEPRECATED { obj["broadPhaseType"] = 2; // BROADPHASE_TYPE_HYBRID } } static void hkpConvexTransformShape_1_to_2(hkDataObject& obj) { // As it is not possible to obtain the child shapes's aabb here to compute the extra scale we will set both // extra scale and cached aabb center (stored in W components) to zero. This will make the loaded shape behave // as in version 1, that is with no convex radius scaling. hkQsTransform transform = obj["transform"].asQsTransform(); transform.m_translation.zeroComponent<3>(); transform.m_scale.zeroComponent<3>(); obj["transform"] = transform; obj["extraScale"] = hkVector4::getZero(); } void HK_CALL registerPhysicsPatches_2011_2(hkVersionPatchManager& man) { # define HK_PATCHES_FILE <Common/Compat/Patches/2011_2/hkpPatches_2011_2.cxx> # include <Common/Serialize/Version/hkVersionPatchManager.cxx> # undef HK_PATCHES_FILE } /* * Havok SDK - Base file, BUILD(#20130912) * * Confidential Information of Havok. (C) Copyright 1999-2013 * Telekinesys Research Limited t/a Havok. All Rights Reserved. The Havok * Logo, and the Havok buzzsaw logo are trademarks of Havok. Title, ownership * rights, and intellectual property rights in the Havok software remain in * Havok and/or its suppliers. * * Use of this software for evaluation purposes is subject to and indicates * acceptance of the End User licence Agreement for this product. A copy of * the license is included with this software and is also available from salesteam@havok.com. * */
29b1338266f1ebd579f02154d346ee4af0001103
a67bdf04c1b783ce3e71d11751cea5b2d20a8576
/net/client/dev_message/transmmiter/harristransmmit.cpp
ef3e31349d8ad333552a80230fbda750ea2a55fa
[]
no_license
piaoliushi/SmartServer
f24ab5508822804da530f36eee4bc7092063dc57
ad3777c8ee82d215d168724cc3f6294dcf88d56a
refs/heads/master
2021-04-06T00:53:13.086324
2021-03-12T09:38:04
2021-03-12T09:38:04
52,346,788
0
1
null
null
null
null
UTF-8
C++
false
false
11,987
cpp
harristransmmit.cpp
#include "harristransmmit.h" namespace hx_net{ CHarrisTransmmit::CHarrisTransmmit(Tsmt_message_ptr ptsmessage,int subprotocol,int addresscode) :Transmmiter() ,m_subprotocol(subprotocol) ,m_addresscode(addresscode) ,m_pmessage(ptsmessage) { initOid(); } void CHarrisTransmmit::GetSignalCommand(devCommdMsgPtr lpParam,CommandUnit &cmdUnit) { } int CHarrisTransmmit::check_msg_header(unsigned char *data, int nDataLen, CmdType cmdType, int number) { switch(m_subprotocol) { case HARRIS_AM50:{ if(data[0]==0x48 && data[1]==0x42) return RE_SUCCESS; else { unsigned char cDes[2]={0}; cDes[0]=0x48; cDes[1]=0x42; return kmp(data,nDataLen,cDes,2); } } break; } return RE_NOPROTOCOL; } int CHarrisTransmmit::decode_msg_body(unsigned char *data, DevMonitorDataPtr data_ptr, int nDataLen, int &runstate) { switch(m_subprotocol) { case HARRIS_AM50: return OnHarrisAm50(data,data_ptr,nDataLen,runstate); } return RE_UNKNOWDEV; } int CHarrisTransmmit::decode_msg_body(Snmp *snmp,DevMonitorDataPtr data_ptr,CTarget *target,int& runstate) { switch(m_subprotocol) { case HARRIS_SNMP: return get_snmp(snmp,data_ptr,target); } return RE_UNKNOWDEV; } bool CHarrisTransmmit::IsStandardCommand() { return false; } void CHarrisTransmmit::GetAllCmd(CommandAttribute &cmdAll) { switch(m_subprotocol) { case HARRIS_AM50: { CommandUnit tmUnit; tmUnit.commandLen = 11; tmUnit.ackLen = 396; tmUnit.commandId[0] = 0x48; tmUnit.commandId[1] = 0x42; tmUnit.commandId[2] = 0x00; tmUnit.commandId[3] = 0x09; tmUnit.commandId[4] = 0x00; tmUnit.commandId[5] = 0x00; tmUnit.commandId[6] = 0x46; tmUnit.commandId[7] = 0x00; tmUnit.commandId[8] = 0x00; tmUnit.commandId[9] = 0xDB; tmUnit.commandId[10] = 0x75; cmdAll.mapCommand[MSG_DEVICE_QUERY].push_back(tmUnit); tmUnit.commandLen = 14; tmUnit.commandId[3] = 0x0C; tmUnit.commandId[6] = 0x03; tmUnit.commandId[7] = 0x0A; tmUnit.commandId[9] = 0x71; tmUnit.commandId[10] = 0x00; tmUnit.commandId[11] = 0x00; tmUnit.commandId[12] = 0x60; tmUnit.commandId[13] = 0xC0; cmdAll.mapCommand[MSG_TRANSMITTER_TURNON_OPR].push_back(tmUnit); tmUnit.commandId[9] = 0x70; tmUnit.commandId[12] = 0x70; tmUnit.commandId[13] = 0xE1; cmdAll.mapCommand[MSG_TRANSMITTER_TURNOFF_OPR].push_back(tmUnit); tmUnit.commandId[9] = 0x77; tmUnit.commandId[12] = 0x00; tmUnit.commandId[13] = 0x06; cmdAll.mapCommand[MSG_TRANSMITTER_RISE_POWER_OPR].push_back(tmUnit); tmUnit.commandId[9] = 0x78; tmUnit.commandId[12] = 0xF1; tmUnit.commandId[13] = 0xE9; cmdAll.mapCommand[MSG_TRANSMITTER_REDUCE_POWER_OPR].push_back(tmUnit); } break; default: break; } } void CHarrisTransmmit::harris_Callback(int reason, Snmp *session, Pdu &pdu, SnmpTarget &target) { switch(m_subprotocol) { case HARRIS_SNMP: { harris_decode(reason,session,pdu,target); } break; default: break; } } bool CHarrisTransmmit::exec_cmd(Snmp *snmp, int cmdtype, CTarget *target) { switch(m_subprotocol) { case HARRIS_SNMP: { Vb vbl; Pdu cmdpdu; vbl.set_oid(Oid("1.3.6.1.4.1.290.9.2.1.1.5.3.2.0")); switch(cmdtype) { case MSG_TRANSMITTER_TURNON_OPR:{ vbl.set_value(1); } break; case MSG_TRANSMITTER_TURNOFF_OPR:{ vbl.set_value(2); } break; case MSG_TRANSMITTER_RISE_POWER_OPR:{ vbl.set_value(3); } break; case MSG_TRANSMITTER_REDUCE_POWER_OPR:{ vbl.set_value(4); } break; default: return false; } cmdpdu+=vbl; OctetStr community("public"); target->set_writecommunity(community); int iresult =snmp->set(cmdpdu,*target); if(iresult!=SNMP_CLASS_SUCCESS) return false; } break; default: break; } return true; } void CHarrisTransmmit::initOid() { switch(m_subprotocol) { case HARRIS_SNMP:{ map_Oid["1.3.6.1.4.1.290.9.2.1.1.4.3.1.0"] = 0; Vb vbl; vbl.set_oid(Oid("1.3.6.1.4.1.290.9.2.1.1.4.3.1.0")); query_pdu += vbl; map_Oid["1.3.6.1.4.1.290.9.2.1.1.4.3.2.0"] = 1; vbl.set_oid(Oid("1.3.6.1.4.1.290.9.2.1.1.4.3.2.0")); query_pdu += vbl; map_Oid["1.3.6.1.4.1.290.9.2.1.1.4.3.3.0"] = 2; vbl.set_oid(Oid("1.3.6.1.4.1.290.9.2.1.1.4.3.3.0")); query_pdu += vbl; map_Oid["1.3.6.1.4.1.290.9.2.1.1.4.3.4.0"] = 3; vbl.set_oid(Oid("1.3.6.1.4.1.290.9.2.1.1.4.3.4.0")); query_pdu += vbl; map_Oid["1.3.6.1.4.1.290.9.2.1.1.4.2.1.0"] = 4; vbl.set_oid(Oid("1.3.6.1.4.1.290.9.2.1.1.4.2.1.0")); query_pdu += vbl; map_Oid["1.3.6.1.4.1.290.9.2.1.1.3.1.1.0"] = 5; vbl.set_oid(Oid("1.3.6.1.4.1.290.9.2.1.1.3.1.1.0")); query_pdu += vbl; } break; default: break; } } int CHarrisTransmmit::OnHarrisAm50(unsigned char *data, DevMonitorDataPtr data_ptr, int nDataLen, int &runstate) { int HiByte; //高字节 int LoByte; //低字节 int tmp; float ftmp; int indexpos = 0; DataInfo dtinfo; dtinfo.bType = false; HiByte = data[9]; LoByte = data[10]; dtinfo.fValue = (HiByte*256+LoByte)*0.001; data_ptr->mValues[indexpos++] = dtinfo; HiByte = data[11]; LoByte = data[12]; dtinfo.fValue = (HiByte*256+LoByte); data_ptr->mValues[indexpos++] = dtinfo; *(((char*)(&ftmp) + 0)) = data[13]; *(((char*)(&ftmp) + 1)) = data[14]; *(((char*)(&ftmp) + 2)) = data[15]; *(((char*)(&ftmp) + 3)) = data[16]; if(data_ptr->mValues[0].fValue==0 || data_ptr->mValues[1].fValue==0) dtinfo.fValue = 1.0; else dtinfo.fValue = ftmp; data_ptr->mValues[indexpos++] = dtinfo; for(int i=0;i<4;++i) { dtinfo.fValue = data[17+2*i]*256+data[18+2*i]; data_ptr->mValues[indexpos++] = dtinfo; } dtinfo.fValue = data[73]*256+data[74]; data_ptr->mValues[indexpos++] = dtinfo; dtinfo.fValue = data[85]*256+data[86]; data_ptr->mValues[indexpos++] = dtinfo; dtinfo.fValue = data[97]*256+data[98]; data_ptr->mValues[indexpos++] = dtinfo; dtinfo.fValue = data[109]*256+data[110]; data_ptr->mValues[indexpos++] = dtinfo; dtinfo.fValue = data[121]*256+data[122]; data_ptr->mValues[indexpos++] = dtinfo; for(int i=0;i<4;++i) { dtinfo.fValue = data[251+2*i]*256+data[252+2*i]; data_ptr->mValues[indexpos++] = dtinfo; } dtinfo.fValue = data[267]*256+data[268]; data_ptr->mValues[indexpos++] = dtinfo; dtinfo.bType = true; for(int i=0;i<2;++i) { dtinfo.fValue = (data[269+2*i]*256+data[270+2*i]+1)%2; data_ptr->mValues[indexpos++] = dtinfo; } return 0; } void harris_aysnc_callback(int reason, Snmp *session, Pdu &pdu, SnmpTarget &target, void *cd) { /* if(reason != SNMP_CLASS_ASYNC_RESPONSE && reason != SNMP_CLASS_NOTIFICATION){ cout << "Failed to issue SNMP aysnc_callback: (" << reason << ") " << session->error_msg(reason) << endl; return; }*/ if (cd) ((CHarrisTransmmit*)cd)->harris_Callback(reason, session, pdu, target); } int CHarrisTransmmit::get_snmp(Snmp *snmp, DevMonitorDataPtr data_ptr, CTarget *target) { { boost::recursive_mutex::scoped_lock lock(data_mutex); if(data_ptr) curdata_ptr = data_ptr; } int status = snmp->get(query_pdu,*target,harris_aysnc_callback,this); if(status) return -1; return 0; } void CHarrisTransmmit::harris_decode(int reason, Snmp *session, Pdu &pdu, SnmpTarget &target) { int pdu_error = pdu.get_error_status(); std::cout<<"harris_decode"<<endl; if (pdu_error) { std::cout<<"ERROR"<<endl; return; } if (pdu.get_vb_count() == 0) { std::cout<<"COUNT==0"<<endl; return; } int vbcount = pdu.get_vb_count(); boost::recursive_mutex::scoped_lock lock(data_mutex); for(int i=0;i<vbcount;++i) { DataInfo dainfo; Vb nextVb; pdu.get_vb(nextVb, i); string cur_oid = nextVb.get_printable_oid(); string cur_value =nextVb.get_printable_value(); dainfo.bType = true; dainfo.fValue = atof(cur_value.c_str()); map<string,int>::iterator iter = map_Oid.find(cur_oid); std::cout<<cur_oid<<endl; if(iter!=map_Oid.end()) { if((*iter).second<4) { dainfo.bType = false; dainfo.fValue = dainfo.fValue*0.001; } curdata_ptr->mValues[(*iter).second] = dainfo; } } m_pmessage->aysnc_data(curdata_ptr); } }
bb5dd3803b0cb356592784c92cfd7e146dbd1d83
f54ac34a820e516629f578a12cd352c332e3570c
/src/main1.cpp
793174bc1f68bc05eedfbc988a755484ca75b183
[]
no_license
wx6boy/tp-lab-3
a3c2ebbf7abeab60b86dbfc7e0fb9b7d8a8b7ff7
6927017ff2c3cd3a31fd03ffa99eb51c8b0a4218
refs/heads/master
2020-09-04T23:05:10.571520
2019-12-10T18:50:08
2019-12-10T18:50:08
219,918,685
0
0
null
2019-11-06T05:27:49
2019-11-06T05:27:48
null
UTF-8
C++
false
false
333
cpp
main1.cpp
// // Created by aklen on 10.11.2019. // #include <iostream> #include "task1.h" #include "Circle.h" using namespace std; int main(){ double delta=calcDelta(); cout<<"The gap between Earth and the rope is "<<delta<<" meters \n"; double cost=calcCost(); cout<<"Full cost is "<<cost<<" roubles "<<"\n"; return 0; }
6a3e758551810a6ea5e3e7fb566ba78997a8b530
406bf7effeff72b793f9302e4c72485ff805e5e4
/src/Entity.h
7277b295e94933f259e2a6cb9464b3e311b8dd9a
[ "MIT" ]
permissive
nicoaw/netroids-prototype
a00af53a8a5e6e510189c1d94cbe116778882b74
ac8b4c75efc136fbd04f27bdb7cc028d5a02f06c
refs/heads/master
2021-01-10T07:07:24.262285
2015-10-14T02:01:22
2015-10-14T02:01:22
44,215,428
0
0
null
null
null
null
UTF-8
C++
false
false
335
h
Entity.h
#pragma once #include "Rendering.h" #include "AABB.h" template<typename T, typename U> class Entity { public: typedef T State; Entity(); virtual void update(const AABB& bounds, float dt); virtual void render(const Camera& camera, float alpha); protected: typedef U Derivative; State current, previous; };
2be205d46b797caad8ddc0a43cbd0a94da0b065a
ef94267c9e9f9be67a68e107e978c42c812965cb
/Source/FPSSimulator/PS_Domination.h
2aa119f0bcaaf2abfd2a65772b6a7183ac4dd853
[]
no_license
stevenlwk/LAGCOM
3df1f0940584877033096c97b271bb4540549bc4
f82e8183abafb1d512a1d28face7d986d67d05ec
refs/heads/master
2021-01-20T02:33:59.495835
2017-08-24T22:04:38
2017-08-24T22:04:38
101,326,126
8
0
null
null
null
null
UTF-8
C++
false
false
939
h
PS_Domination.h
#pragma once #include "FPSSimulatorPlayerState.h" #include "CapturePoint.h" #include "GS_Domination.h" #include "PS_Domination.generated.h" UCLASS() class FPSSIMULATOR_API APS_Domination : public AFPSSimulatorPlayerState { GENERATED_BODY() public: void BeginPlay() override; void OnKilled(AFPSSimulatorPlayerState* PlayerState) override; void OnEnterCapturePoint(ACapturePoint* CapturePoint); void OnLeaveCapturePoint(); void ScoreCapture(); protected: UFUNCTION() void OnCapturePointStateChanged(ECapturePointState OldState, ECapturePointState NewState); UFUNCTION(BlueprintImplementableEvent) void OnStartCapture(); UFUNCTION(Client, Unreliable) void CallOnStartCapture(); UFUNCTION(BlueprintImplementableEvent) void OnEndCapture(); UFUNCTION(Client, Unreliable) void CallOnEndCapture(); void ScoreCapturing(); FTimerHandle ScoreCaptureTimer; private: AGS_Domination* GameState; ACapturePoint* CapturePoint; };
f737384967e13c2694a93f7f8c29cef8a72379be
9f2819f90aaaf11966a35b60d198850a54736c75
/Lab14.3/Lab14.3/Lab14.3.cpp
3eb531ed47e06d73977e250c47ff25a62ea063ac
[]
no_license
nastyakrul/VVP_
b22fdc9f6b9059433e07a2bce74f48d5baddb128
2be3733d9901bd2e88f14c9202a59673b1d347ae
refs/heads/master
2023-02-02T18:12:42.762180
2020-12-21T23:42:55
2020-12-21T23:42:55
297,173,338
0
0
null
null
null
null
UTF-8
C++
false
false
2,368
cpp
Lab14.3.cpp
// Lab14.3.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы. // #include <iostream> #include <locale.h> #include <stdio.h> int main() { setlocale(LC_ALL, "Russian"); //установка русского языка int n,k,i;//ввод переменных printf("Введите целое число N: "); //ввод значения с клавиатуры scanf_s("%d", &n); if (n > 1) //ввод условия { k = 0; //начальные значения i = 0; while (i < n) //ввод цикла { k = k + 1; //увеличение числа i = i + k; //сумма } printf("Наименьшее k = %d\nСумма будет равна %d\n", k, i); //вывод на экран значений } else printf("N должно быть больше 1\n"); //подсказка return(0); } // Запуск программы: CTRL+F5 или меню "Отладка" > "Запуск без отладки" // Отладка программы: F5 или меню "Отладка" > "Запустить отладку" // Советы по началу работы // 1. В окне обозревателя решений можно добавлять файлы и управлять ими. // 2. В окне Team Explorer можно подключиться к системе управления версиями. // 3. В окне "Выходные данные" можно просматривать выходные данные сборки и другие сообщения. // 4. В окне "Список ошибок" можно просматривать ошибки. // 5. Последовательно выберите пункты меню "Проект" > "Добавить новый элемент", чтобы создать файлы кода, или "Проект" > "Добавить существующий элемент", чтобы добавить в проект существующие файлы кода. // 6. Чтобы снова открыть этот проект позже, выберите пункты меню "Файл" > "Открыть" > "Проект" и выберите SLN-файл.
f8052b466676911940bf374474d5a4095cfd42b1
18a108c80c5355e6fe7ff3a19b637d8900cf3c6a
/AD5292.h
68709fb310c75fa2612e18e79f3e4ddfd749a4b2
[ "MIT" ]
permissive
That8BitMan/AD5292
4b905e691d55a1d2a80226c45018cce22f48c954
629ecd8dfbcd9ed495c6e38ad916e91103dbafb8
refs/heads/master
2021-01-19T16:40:29.407528
2017-09-18T23:52:15
2017-09-18T23:52:15
101,015,375
0
1
null
null
null
null
UTF-8
C++
false
false
6,187
h
AD5292.h
/******************************************************************************/ /*! @file Systronix_ModulatorShield.h @author B Boyes (Systronix Inc) @license BSD (see license.txt) @section HISTORY v1.0 2015 Jul 01 bboyes Start based on working Arduino .ino program */ /******************************************************************************/ /** TODO LIST Wow. Nothing right now. Cool. **/ /** -------- Description ------------------------------------------------------ * * AD5292 is a digital potentiometer with 10-bits of resolution * * Full scale resistance is 10K, 20K, or 100K When new and nothing has been programmed into eeprom, it is set at 50% = 10K . Since we have resistors above and below it to set the min and max range, the set point is not just a linear function of the pot value. For example with R1 = 75K and R7 = 120 ohms, the Rpot of zero gives 5 mA drive, 50% Rpot gives 196 mA, and 100% gives 349 mA. This makes things more complicated than a simple DAC, but also lets us scale the output range in ways that would be harder with a DAC. With the ADDR input grounded our device 7-bit address is B0101111 and since Arduino Wire library expects a 7-bit address it should be happy with that. Commands are sent msb first, upper two bits are 00 then a 4-bit command, then 10 bits of data; 16 bits total. For the 8-bit AD5292 the two lsb of data are don't care. Commands: 00 0001 [10-bit data] writes the data to the RDAC. This can be done unlimited times. The AD527[2|4] has one address pin which controls the two lsb of the address. ADDR I2C base GND 0x2F Vdd 0x2C N/C 0x2E (unipolar power only) ------------------------------------------------------------------------------*/ /** * Has anyone already written a driver" * Yes, for Linux: https://code.google.com/p/android-source-browsing/source/browse/drivers/misc/ * ad525x_dpot-i2c.c?repo=kernel--samsung&name=android-samsung-3.0-ics-mr1&r=a4bd394956f20d0bfc0ca6ecfac2af4150da274a */ /** -------- Arduino Device and Version Testing and Issues --------------------- This library assumes Arduino 1.6.5-r2 but should work with older versions and 1.06 Should also work with Teensy ------------------------------------------------------------------------------*/ #include <Arduino.h> #include "Wire.h" // Preprocessor guard against multiple inclusion #ifndef THAT8BITMAN_AD5292_H #define THAT8BITMAN_AD5292_H /** * I2C ADDRESS CONSTANTS * I2C base addresses of AD5292 dependent on ADDR pin connection */ #define AD5292_BASE_ADDR_GND 0x2F /**< Default I2C address iff ADDR=GND, see notes above */ #define AD5292_BASE_ADDR_VDD 0x2C /**< I2C address iff ADDR=VDD, see notes above */ #define AD5292_BASE_ADDR_FLOAT 0x2E /**< I2C address iff ADDR=floating, see notes above */ /** * COMMAND CONSTANTS * See Table 12, page 21, in the Rev D datasheet * Commands are 16-bit writes: bits 15:14 are 0s * Bits 13:10 are the command value below * Bits 9:0 are data for the command, but not all bits are used with all commands */ // The NOP command is included for completeness. It is a valid I2C operation. #define AD5292_COMMAND_NOP 0x00 // Do nothing. Why you would want to do this I don't know // write the 10 or 8 data bits to the RDAC wiper register (it must be unlocked first) #define AD5292_RDAC_WRITE 0x01 #define AD5292_RDAC_READ 0x02 // read the RDAC wiper register #define AD5292_50TP_WRITE 0x03 // store RDAC setting to 50-TP // SW reset: refresh RDAC with last 50-TP stored value // If not 50-TP value, reset to 50% I think??? // data bits are all dont cares #define AD5292_RDAC_REFRESH 0x04 // TODO refactor this to AD5292_SOFT_RESET // read contents of 50-TP in next frame, at location in data bits 5:0, // see Table 16 page 22 Rev D datasheet // location 0x0 is reserved, 0x01 is first programmed wiper location, 0x32 is 50th programmed wiper location #define AD5292_50TP_WIPER_READ 0x05 /** * Read contents of last-programmed 50-TP location * This is the location used in SW Reset command 4 or on POR */ #define AD5292_50TP_LAST_USED 0x06 #define AD5292_CONTROL_WRITE 0x07// data bits 2:0 are the control bits #define AD5292_CONTROL_READ 0x08 // data bits all dont cares #define AD5292_SHUTDOWN 0x09 // data bit 0 set = shutdown, cleared = normal mode /** * Control bits are three bits written with command 7 */ // enable writing to the 50-TP memory by setting this control bit C0 // default is cleared so 50-TP writing is disabled // only 50 total writes are possible! #define AD5292_50TP_WRITE_ENABLE 0x01 // enable writing to volatile RADC wiper by setting this control bit C1 // otherwise it is frozen to the value in the 50-TP memory // default is cleared, can't write to the wiper #define AD5292_RDAC_WIPER_WRITE_ENABLE 0x02 // enable high precision calibration by clearing this control bit C2 // set this bit to disable high accuracy mode (dunno why you would want to) // default is 0 = emabled #define AD5292_RDAC_CALIB_DISABLE 0x04 // 50TP memory has been successfully programmed if this bit is set #define AD5292_50TP_WRITE_SUCCESS 0x08 class That8BitMan_AD5292 { protected: // Instance-specific properties // Instance-specific properties uint8_t _base; // I2C base address, see notes above uint8_t _bits; // 8 or 10 bit device public: That8BitMan_AD5292(uint8_t base); // constructor: base address int8_t begin(void); int8_t command_write(uint8_t command, uint16_t data); int16_t command_read(uint8_t command, uint8_t data); int8_t control_write_verified(uint8_t control); // write 3 ls data bits to control reg boolean is_available(uint8_t *i2c_status); // not implemented yet: int8_t unlock(boolean rdac, boolean fiftyTP); // true to unlock, false to lock, default = locked int8_t fiftytp_unlock(boolean unlock); // true unlocks, false locks, default = locked int8_t rdac_calib(boolean enable); // true enables, default = enabled int8_t wiper_write(uint16_t wiper); // writer 'wiper' to rdac wiper register int8_t wiper_read(uint16_t wiper); // read rdac wiper into 'wiper' uint8_t BaseAddr; private: }; #endif /* THAT8BITMAN_AD5292_H */
b690db19bfe912c99a891c6b80de5448ecf00248
38b9daafe39f937b39eefc30501939fd47f7e668
/tutorials/2WayCouplingOceanWave3D/EvalResults180628-Eta/68.8/alpha.water
0981a397f5ac7f17fdf49082a6064265546de8ae
[]
no_license
rubynuaa/2-way-coupling
3a292840d9f56255f38c5e31c6b30fcb52d9e1cf
a820b57dd2cac1170b937f8411bc861392d8fbaa
refs/heads/master
2020-04-08T18:49:53.047796
2018-08-29T14:22:18
2018-08-29T14:22:18
null
0
0
null
null
null
null
UTF-8
C++
false
false
158,791
water
alpha.water
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 3.0.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "68.8"; object alpha.water; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField nonuniform List<scalar> 21420 ( 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00004 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00003 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00002 1.00002 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999998 0.999997 0.999994 0.999991 0.999987 0.999985 0.999991 0.999993 0.999997 0.999997 0.999997 0.999997 0.999997 0.999996 0.999996 0.999996 0.999996 0.999998 0.999998 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999998 0.999998 0.999997 0.999996 0.999995 0.999995 0.999995 0.999995 0.999996 0.999996 0.999997 0.999998 0.999999 0.999998 0.999998 0.999998 0.999998 0.999998 0.999999 0.999999 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999998 0.999997 0.999997 0.999998 0.999999 0.999999 0.999999 0.999999 0.999998 0.999997 0.999997 0.999997 0.999998 0.999998 0.999999 0.999999 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999998 0.999999 0.999998 0.999997 0.999997 0.999997 0.999997 0.999998 0.999998 0.999998 0.999998 0.999998 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999997 0.999988 0.999959 0.999877 0.999675 0.999226 0.998353 0.996864 0.994556 0.991289 0.987183 0.982635 0.980209 0.980569 0.983231 0.987952 0.993692 0.998483 0.999869 0.999868 0.999866 0.999879 0.999906 0.999942 0.999967 0.999973 0.999981 0.999989 0.999995 0.999996 0.999998 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999995 0.999984 0.999958 0.999902 0.99979 0.999586 0.999245 0.998713 0.997911 0.996802 0.995332 0.993514 0.991399 0.989297 0.987304 0.985719 0.98496 0.984854 0.985728 0.987114 0.989442 0.992515 0.995778 0.998471 0.999894 0.999951 0.999946 0.999945 0.999948 0.999955 0.999966 0.999979 0.999987 0.999989 0.99999 0.999992 0.999995 0.999997 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 0.999998 0.999994 0.999983 0.999958 0.999912 0.999828 0.999676 0.999432 0.999092 0.998705 0.998257 0.997644 0.996733 0.995537 0.994112 0.993381 0.993314 0.993786 0.994248 0.994582 0.994814 0.995225 0.996205 0.997757 0.999359 0.999965 0.99996 0.999957 0.999956 0.999958 0.999963 0.999971 0.999979 0.999986 0.999989 0.999991 0.999993 0.999996 0.999998 0.999998 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999998 0.999995 0.999986 0.999964 0.999919 0.99983 0.999667 0.999389 0.998946 0.998315 0.997532 0.996718 0.995915 0.995324 0.994787 0.994329 0.993777 0.993662 0.993954 0.994289 0.994673 0.994963 0.995875 0.997349 0.998934 0.999909 0.999958 0.999951 0.999942 0.999938 0.999938 0.999946 0.999959 0.999974 0.999979 0.999983 0.999985 0.999989 0.999993 0.999996 0.999996 0.999998 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999994 0.99995 0.999448 0.998472 0.998108 0.998053 0.998533 0.999431 0.999954 0.999973 0.99999 0.999992 0.999995 0.999997 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999994 0.999949 0.99964 0.998034 0.991626 0.970898 0.913937 0.82308 0.736195 0.659528 0.593887 0.539121 0.495391 0.462899 0.442022 0.432562 0.434716 0.447747 0.470248 0.501837 0.542558 0.591371 0.648534 0.714312 0.78352 0.844784 0.885002 0.919712 0.954455 0.98294 0.998301 0.999497 0.999661 0.999823 0.999917 0.999947 0.999974 0.999989 0.999994 0.999998 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999996 0.999984 0.999949 0.99985 0.999592 0.998972 0.997567 0.994501 0.988194 0.976514 0.957112 0.928365 0.890059 0.843572 0.792533 0.745284 0.705921 0.674826 0.651775 0.637008 0.63002 0.630435 0.638399 0.654143 0.677311 0.707263 0.742374 0.781223 0.818772 0.852758 0.885698 0.917138 0.945873 0.970201 0.988278 0.99808 0.999714 0.999768 0.999836 0.999905 0.999952 0.999964 0.999977 0.999989 0.999994 0.999997 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1 1 1 1 1 1 1 1 1 1 0.999997 0.999991 0.99997 0.999915 0.999779 0.999461 0.998774 0.997404 0.994617 0.989247 0.980001 0.965469 0.944472 0.915877 0.879082 0.836277 0.792785 0.75644 0.731495 0.714715 0.703346 0.695301 0.690831 0.691497 0.698468 0.711931 0.732789 0.761645 0.79701 0.829618 0.858531 0.88841 0.919007 0.947084 0.971535 0.989932 0.999036 0.999729 0.999791 0.999859 0.999918 0.999958 0.999971 0.999983 0.999993 0.999996 0.999998 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999995 0.999986 0.999963 0.99991 0.999804 0.999549 0.998956 0.99765 0.994905 0.989544 0.979711 0.963986 0.94179 0.91351 0.879709 0.841912 0.802909 0.766489 0.737128 0.714796 0.700679 0.693327 0.690663 0.69252 0.696718 0.70697 0.725551 0.750845 0.781017 0.812386 0.841424 0.869236 0.897274 0.92489 0.951327 0.974285 0.991235 0.999212 0.999649 0.999721 0.99981 0.999894 0.999933 0.99995 0.99997 0.999986 0.999991 0.999996 0.999998 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999998 0.999992 0.999968 0.999864 0.999404 0.99718 0.984713 0.922336 0.821121 0.726298 0.642478 0.571911 0.515774 0.475085 0.450988 0.443671 0.454428 0.482745 0.528002 0.59112 0.672369 0.770367 0.886798 0.984746 0.995523 0.997887 0.99932 0.999983 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999997 0.999946 0.999258 0.992248 0.944715 0.783617 0.600938 0.435516 0.284786 0.157894 0.084818 0.0597533 0.0451853 0.0341289 0.0251771 0.0180262 0.0124251 0.00803129 0.00462823 0.00231433 0.00127533 0.00190254 0.00303832 0.00490578 0.00828232 0.0135844 0.0222153 0.0385667 0.0671431 0.120535 0.2117 0.322273 0.449712 0.58934 0.731789 0.850555 0.921542 0.974224 0.998384 0.99926 0.999657 0.999859 0.999928 0.999973 0.999988 0.999995 0.999998 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999994 0.999975 0.999913 0.999713 0.999095 0.997219 0.991331 0.97368 0.929053 0.836559 0.701448 0.569521 0.449426 0.346148 0.263344 0.201077 0.158794 0.128902 0.106393 0.0895701 0.0776842 0.0695436 0.0650633 0.0637831 0.06633 0.0721597 0.0815476 0.0956604 0.116456 0.146487 0.188179 0.242624 0.306213 0.378935 0.461075 0.551874 0.647374 0.741344 0.823933 0.88567 0.937506 0.976359 0.996929 0.999399 0.999647 0.999844 0.999919 0.999958 0.999983 0.999992 0.999997 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999996 0.999982 0.99994 0.999809 0.999436 0.998404 0.995589 0.987867 0.967873 0.923651 0.840612 0.721355 0.602882 0.493123 0.39454 0.30936 0.239889 0.187913 0.154384 0.132202 0.116415 0.104741 0.0953414 0.0883351 0.0846743 0.0853808 0.0903879 0.0994979 0.113182 0.132793 0.15895 0.19673 0.247555 0.308043 0.379941 0.462906 0.556309 0.658584 0.761085 0.844949 0.908025 0.957997 0.990091 0.999287 0.999542 0.999717 0.999891 0.999943 0.999967 0.99999 0.999996 0.999998 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999994 0.999974 0.999921 0.999786 0.999385 0.998414 0.996002 0.989003 0.970313 0.928185 0.846405 0.724403 0.601736 0.490272 0.394589 0.315656 0.251413 0.200968 0.163829 0.136165 0.114939 0.100535 0.0913433 0.0861835 0.0842226 0.0847404 0.0874085 0.0928381 0.103894 0.121476 0.145714 0.178167 0.220656 0.272187 0.332293 0.401529 0.482176 0.572543 0.670746 0.76788 0.84587 0.905748 0.953568 0.986302 0.999016 0.999307 0.999618 0.999828 0.999897 0.999957 0.999982 0.999993 0.999997 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999998 0.999993 0.999974 0.999905 0.999601 0.998216 0.991898 0.962504 0.849177 0.688011 0.529959 0.377777 0.23362 0.105228 0.0386851 0.0240261 0.015459 0.00994254 0.00611051 0.00345247 0.00173661 0.000602649 5.88455e-13 7.44088e-15 1.04169e-11 4.37333e-11 2.80182e-10 4.08053e-14 4.85481e-14 0.000341334 0.0365486 0.178819 0.346141 0.531488 0.734813 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999998 0.999964 0.999151 0.984177 0.84748 0.582745 0.334605 0.128496 0.0571729 0.0306199 0.0112961 0.000721525 0.000190471 0.000109891 5.86451e-05 3.77621e-05 2.19923e-05 1.21423e-05 6.22919e-06 2.85658e-06 1.10884e-06 7.32592e-07 1.76536e-06 3.82404e-06 7.7638e-06 1.52331e-05 2.62658e-05 5.82553e-05 0.000106835 0.000180208 0.00036799 0.00069062 0.00136086 0.00283801 0.00600504 0.013746 0.032016 0.0750474 0.180043 0.352197 0.549229 0.751575 0.887389 0.965806 0.998188 0.999134 0.999687 0.999862 0.999948 0.999981 0.999993 0.999998 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999998 0.999993 0.999972 0.999896 0.999624 0.998661 0.995023 0.97977 0.92307 0.766167 0.554681 0.357112 0.20752 0.122397 0.0674709 0.0321873 0.0118505 0.00271855 0.000961989 0.00122381 0.00138051 0.0014672 0.00152691 0.00158536 0.00165044 0.00172245 0.00179989 0.00188779 0.002059 0.00232526 0.00273313 0.0033687 0.00431287 0.0057151 0.00785683 0.0112521 0.0167026 0.0257731 0.041386 0.0675199 0.112307 0.190143 0.301163 0.431952 0.579747 0.732708 0.85263 0.934058 0.985083 0.998898 0.999449 0.999788 0.999907 0.999964 0.999987 0.999995 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999996 0.999981 0.999929 0.999739 0.999094 0.996991 0.989079 0.960708 0.877697 0.707707 0.517751 0.345542 0.214474 0.13517 0.0816361 0.0447822 0.0210075 0.00766244 0.00238912 0.00204011 0.00221662 0.00231309 0.00235424 0.00234628 0.00231564 0.00225129 0.00222277 0.00229948 0.00253683 0.00292089 0.00340624 0.00382715 0.00377048 0.00429449 0.00636219 0.00984072 0.01515 0.0244919 0.0405668 0.0696179 0.124578 0.221958 0.351444 0.502044 0.664918 0.810835 0.905236 0.969721 0.997709 0.999259 0.999561 0.999873 0.999934 0.999975 0.999993 0.999998 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999996 0.99998 0.999918 0.999702 0.999025 0.996921 0.989811 0.964502 0.888132 0.722489 0.528014 0.352561 0.216856 0.134045 0.0803765 0.0440081 0.0213784 0.0088486 0.00324711 0.00222305 0.00238882 0.00231281 0.00217695 0.0020079 0.00189705 0.00188313 0.00195655 0.00195838 0.00204324 0.00224369 0.002551 0.00309716 0.0039016 0.0049349 0.00623396 0.00843694 0.0120982 0.0178957 0.0276763 0.0441307 0.0739336 0.127472 0.221749 0.34613 0.484362 0.634617 0.782423 0.884877 0.957383 0.995475 0.998843 0.999534 0.999806 0.999925 0.999973 0.999991 0.999998 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999994 0.999972 0.999875 0.999414 0.996935 0.983364 0.916876 0.730291 0.522865 0.323662 0.144021 0.0592246 0.0345347 0.0165362 0.00436142 0.000259265 9.27648e-05 2.66155e-05 2.11612e-05 1.08411e-05 5.074e-06 1.95353e-06 4.68088e-07 1.07422e-07 2.04909e-11 1.24417e-13 3.80037e-14 3.03282e-16 1.15521e-18 2.91123e-15 6.12937e-17 1.15276e-14 1.65094e-09 8.81755e-12 1.33684e-14 1.81478e-16 4.11524e-09 1.75284e-09 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999997 0.999869 0.995478 0.904914 0.5892 0.26764 0.0704189 0.0277512 0.00319229 0.000449644 0.000201051 9.83844e-05 3.86869e-05 1.55219e-05 6.94708e-06 3.85544e-06 1.76608e-06 1.0215e-06 5.19222e-07 2.45788e-07 1.05891e-07 3.95587e-08 1.20002e-08 6.04127e-09 1.77646e-08 3.71376e-08 8.23751e-08 2.12426e-07 3.02224e-07 8.02711e-07 1.6041e-06 2.22676e-06 5.44899e-06 1.01299e-05 1.95513e-05 4.34787e-05 8.67429e-05 0.000199104 0.000468599 0.0011034 0.00308324 0.00943587 0.0301239 0.0943051 0.271211 0.513152 0.758838 0.90983 0.98478 0.998479 0.999431 0.999795 0.999924 0.999976 0.999992 0.999998 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999998 0.999993 0.999972 0.999895 0.999601 0.998446 0.99326 0.967284 0.855928 0.603464 0.339048 0.15689 0.0633007 0.0150914 0.000796337 0.000374385 0.000175533 7.7585e-05 5.87972e-05 5.89181e-05 5.68232e-05 5.68035e-05 5.71066e-05 5.61971e-05 5.6032e-05 5.64865e-05 5.77829e-05 5.88572e-05 6.08213e-05 6.33136e-05 6.87027e-05 7.72113e-05 9.03076e-05 0.000110967 0.000141974 0.000186402 0.000250506 0.000349559 0.000499698 0.000741284 0.00115646 0.00182196 0.00302024 0.00539683 0.0102742 0.0210115 0.0456019 0.103289 0.231105 0.41804 0.631024 0.822317 0.932817 0.99078 0.998906 0.99959 0.999848 0.999943 0.999982 0.999995 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999996 0.999983 0.999934 0.99975 0.999026 0.99599 0.982123 0.918322 0.726292 0.47622 0.258668 0.127626 0.0533833 0.0139104 0.000962786 0.000381925 0.000344875 0.000248368 0.00016573 0.000113502 8.72312e-05 8.00361e-05 8.0765e-05 8.64114e-05 8.74903e-05 8.61409e-05 8.17071e-05 7.34974e-05 6.84645e-05 7.01601e-05 7.79708e-05 9.1378e-05 0.000106503 0.000109706 8.43105e-05 6.36902e-05 7.90454e-05 0.000155481 0.00029268 0.000535913 0.000928826 0.00156035 0.00290831 0.00580479 0.0124126 0.0289725 0.0697581 0.166285 0.340253 0.551434 0.762027 0.899396 0.976441 0.998528 0.999245 0.999681 0.999905 0.999963 0.999992 0.999998 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999995 0.999982 0.999937 0.999739 0.998927 0.995683 0.981522 0.924391 0.753003 0.502456 0.276015 0.136335 0.0568087 0.0152564 0.00132582 0.000889236 0.000692066 0.000446041 0.000236993 9.97557e-05 5.90566e-05 7.49993e-05 8.83739e-05 8.61218e-05 7.1608e-05 5.89769e-05 5.00235e-05 4.44669e-05 4.34681e-05 4.32384e-05 4.69811e-05 5.6982e-05 6.82351e-05 8.453e-05 0.000114971 0.00015591 0.000191178 0.000241742 0.000342945 0.000502741 0.00074768 0.00111914 0.00183665 0.00323176 0.00619993 0.0128106 0.0266612 0.057851 0.131445 0.284543 0.488178 0.714213 0.883572 0.972799 0.99801 0.999247 0.999737 0.999913 0.999974 0.999993 0.999999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999995 0.999977 0.999879 0.999346 0.995966 0.973411 0.849256 0.595201 0.339988 0.128184 0.0562435 0.0219568 0.00244679 0.0003391 0.000150129 9.44486e-05 3.97378e-05 1.49356e-05 9.69853e-06 3.05089e-06 6.72554e-07 5.61494e-07 2.46719e-07 9.53157e-08 2.77087e-08 4.60299e-09 2.38639e-11 1.30597e-13 6.13635e-14 1.72178e-16 5.5677e-19 1.89816e-21 6.18655e-24 1.77064e-26 1.14036e-14 1.45411e-12 1.12225e-14 6.21971e-17 2.34723e-19 5.45445e-22 4.09805e-25 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999997 0.999832 0.99092 0.804346 0.417322 0.0987873 0.0274049 0.00137841 0.00049912 0.000190163 8.38968e-05 2.80693e-05 1.08061e-05 4.74783e-06 1.67942e-06 6.25659e-07 2.5554e-07 1.3507e-07 5.38522e-08 2.78351e-08 1.23784e-08 5.03702e-09 1.82903e-09 5.60432e-10 1.34632e-10 5.93395e-11 2.41364e-10 5.32064e-10 1.29544e-09 3.62464e-09 5.32339e-09 1.55925e-08 3.15122e-08 4.589e-08 1.24559e-07 2.28908e-07 4.42193e-07 9.31389e-07 1.86412e-06 4.41653e-06 9.64019e-06 2.27728e-05 6.30986e-05 0.000173207 0.00051726 0.00165932 0.00642614 0.026593 0.103362 0.329077 0.618576 0.85412 0.964026 0.997855 0.99919 0.999747 0.999909 0.999974 0.999992 0.999998 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999997 0.999992 0.999971 0.999897 0.999611 0.998432 0.992532 0.959035 0.803134 0.503201 0.223963 0.0794785 0.0135903 0.00111875 0.000438084 0.000156568 5.09866e-05 2.02354e-05 1.0888e-05 6.37061e-06 3.75063e-06 2.59145e-06 1.99895e-06 1.79341e-06 1.72999e-06 1.6726e-06 1.63377e-06 1.6435e-06 1.70755e-06 1.74831e-06 1.80082e-06 1.90308e-06 2.09161e-06 2.36002e-06 2.73635e-06 3.29978e-06 4.17364e-06 5.41517e-06 7.17087e-06 1.00383e-05 1.45606e-05 2.23033e-05 3.63331e-05 5.79766e-05 9.58756e-05 0.000166531 0.000299576 0.000566104 0.00113902 0.00250458 0.00632342 0.0182673 0.0570264 0.178072 0.412766 0.682208 0.87873 0.973559 0.998333 0.999404 0.999804 0.999934 0.999982 0.999995 0.999999 1 1 1 1 1 1 1 1 1 1 0.999999 0.999996 0.999986 0.999947 0.999793 0.999143 0.996044 0.978099 0.887924 0.627274 0.32992 0.136646 0.0427763 0.00489802 0.000940542 0.000672074 0.000243341 8.1872e-05 4.88349e-05 3.37849e-05 1.84597e-05 9.48765e-06 5.23995e-06 3.39481e-06 2.63176e-06 2.29456e-06 2.28133e-06 2.26423e-06 2.31598e-06 2.2975e-06 1.98632e-06 1.72626e-06 1.75502e-06 1.98899e-06 2.30395e-06 2.72722e-06 2.62077e-06 1.94259e-06 1.00645e-06 9.9917e-07 1.63175e-06 4.7814e-06 1.43367e-05 2.78037e-05 4.48463e-05 7.80039e-05 0.000147272 0.000300643 0.00063532 0.00142604 0.00365149 0.0108981 0.0359795 0.119206 0.323999 0.588415 0.821531 0.944358 0.995755 0.999084 0.99952 0.999881 0.999969 0.999993 0.999998 1 1 1 1 1 1 1 1 0.999999 0.999998 0.999994 0.999981 0.999933 0.999768 0.99913 0.996025 0.978807 0.882165 0.622979 0.347344 0.154845 0.0524657 0.00758431 0.00157659 0.00118203 0.000393319 0.000117402 6.54559e-05 4.00235e-05 1.6648e-05 4.77704e-06 1.45782e-06 4.81751e-07 1.5545e-06 2.56276e-06 2.97674e-06 2.20512e-06 1.43488e-06 9.88028e-07 7.4003e-07 7.1187e-07 7.58069e-07 9.54457e-07 1.36708e-06 1.93695e-06 3.01811e-06 4.77426e-06 6.46488e-06 7.54705e-06 9.28074e-06 1.42523e-05 2.16277e-05 3.01165e-05 4.2316e-05 6.86733e-05 0.000118137 0.000216302 0.00040716 0.000735179 0.00144586 0.00319708 0.00830987 0.0251121 0.0829182 0.269968 0.548618 0.825472 0.957803 0.997484 0.999161 0.999751 0.999933 0.999984 0.999997 0.999999 1 1 1 1 1 1 1 1 1 1 0.999998 0.999991 0.999956 0.999748 0.998472 0.987942 0.910193 0.639056 0.33193 0.107305 0.0391696 0.00444571 0.000595074 0.00028389 0.000111442 5.14636e-05 1.77926e-05 6.98971e-06 4.29199e-06 1.56638e-06 5.36097e-07 3.5588e-07 9.9181e-08 1.73346e-08 1.45953e-08 5.50697e-09 1.75059e-09 3.82431e-10 2.38236e-11 1.61916e-13 4.26744e-14 2.7702e-16 8.0642e-19 2.59053e-21 8.60798e-24 2.7353e-26 7.88074e-29 2.43151e-31 1.291e-33 7.03172e-36 2.43233e-38 7.33958e-41 3.794e-39 4.07222e-42 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.999999 0.999893 0.990436 0.768296 0.335146 0.0551734 0.00859948 0.000888947 0.000338597 0.00011878 3.89669e-05 1.30555e-05 5.78278e-06 1.75424e-06 5.89437e-07 2.31123e-07 7.42533e-08 2.54845e-08 9.48496e-09 4.73324e-09 1.66046e-09 7.6464e-10 2.98328e-10 1.0474e-10 3.2362e-11 8.39225e-12 1.84548e-12 7.32559e-13 3.93632e-12 8.86125e-12 2.66059e-11 6.47686e-11 1.11933e-10 3.72567e-10 6.51474e-10 1.16774e-09 3.38469e-09 5.6538e-09 1.31606e-08 2.34338e-08 5.06888e-08 1.33634e-07 2.44185e-07 6.47252e-07 1.77381e-06 4.3929e-06 1.37392e-05 3.89316e-05 0.000140351 0.00053349 0.00201743 0.00978466 0.0477457 0.21004 0.51111 0.802683 0.943752 0.99653 0.999021 0.999714 0.999903 0.999972 0.999993 0.999998 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999999 0.999997 0.999995 0.999987 0.999963 0.999884 0.999596 0.998415 0.992393 0.955201 0.776233 0.45142 0.176048 0.0482867 0.00324252 0.000893322 0.000298826 9.55421e-05 3.33433e-05 1.10996e-05 3.19894e-06 1.33538e-06 6.5757e-07 3.01946e-07 1.37298e-07 7.93641e-08 5.56884e-08 4.66243e-08 4.33012e-08 4.21696e-08 4.10139e-08 4.18284e-08 4.4365e-08 4.6534e-08 4.80224e-08 5.1652e-08 5.82355e-08 6.73631e-08 7.81517e-08 9.28808e-08 1.16701e-07 1.53159e-07 2.01307e-07 2.85586e-07 4.14242e-07 6.29247e-07 1.03506e-06 1.64043e-06 2.65527e-06 4.58292e-06 8.37639e-06 1.64159e-05 3.38933e-05 7.51221e-05 0.000180127 0.000463145 0.00130659 0.00427854 0.0170526 0.0739342 0.274679 0.572428 0.835787 0.960783 0.997956 0.99931 0.999777 0.999929 0.999984 0.999997 0.999999 1 1 1 1 0.999999 0.999999 0.999998 0.999995 0.999984 0.99995 0.999812 0.999263 0.99678 0.982085 0.887991 0.587186 0.269595 0.091123 0.0149239 0.00159157 0.000986078 0.000295889 0.000109307 5.73492e-05 1.9685e-05 6.1943e-06 3.29194e-06 1.92223e-06 8.49931e-07 3.4031e-07 1.63622e-07 9.99216e-08 7.4396e-08 5.99976e-08 5.02422e-08 4.43107e-08 4.87067e-08 5.35191e-08 4.76112e-08 3.83665e-08 3.75154e-08 4.27623e-08 4.86365e-08 7.19709e-08 6.65191e-08 4.20979e-08 1.73754e-08 1.58712e-08 2.62273e-08 9.91303e-08 4.14001e-07 7.9138e-07 1.28426e-06 2.33528e-06 5.05329e-06 1.21223e-05 2.32924e-05 4.74229e-05 0.000118179 0.000312059 0.000833384 0.00258676 0.00992355 0.0428264 0.175323 0.453914 0.752056 0.922808 0.992317 0.998876 0.999508 0.999885 0.999968 0.999995 0.999998 0.999999 0.999998 0.999998 0.999998 0.999997 0.999995 0.999989 0.999975 0.999928 0.999771 0.999199 0.99689 0.981882 0.889445 0.601264 0.27092 0.0924448 0.0184327 0.00261466 0.00194695 0.00060346 0.000181643 9.27588e-05 2.77442e-05 6.80011e-06 2.96415e-06 1.30711e-06 2.76224e-07 4.77478e-08 1.25127e-08 1.243e-08 5.24468e-08 1.07545e-07 1.14505e-07 6.3703e-08 2.49982e-08 1.32568e-08 9.96438e-09 1.01279e-08 1.22242e-08 2.07527e-08 3.52411e-08 5.80561e-08 1.28669e-07 2.42775e-07 3.18646e-07 3.51101e-07 4.19593e-07 6.95468e-07 1.1102e-06 1.35667e-06 1.61944e-06 2.47439e-06 4.48189e-06 9.6587e-06 2.09495e-05 3.96504e-05 7.5779e-05 0.000142335 0.00029724 0.000700599 0.00198255 0.00723036 0.0317858 0.157683 0.480163 0.806671 0.958604 0.997651 0.99934 0.99983 0.999962 0.999992 0.999999 1 1 1 1 1 1 0.999999 0.999996 0.999987 0.999936 0.999659 0.997781 0.980496 0.847571 0.50719 0.181023 0.0536784 0.00536399 0.000850475 0.000314926 0.000125253 4.17615e-05 1.80601e-05 6.43106e-06 2.99866e-06 9.3173e-07 3.2771e-07 1.93719e-07 6.19002e-08 1.94119e-08 1.28564e-08 3.1909e-09 4.53768e-10 3.72686e-10 1.20843e-10 3.16216e-11 5.27722e-12 2.45317e-13 5.44982e-14 6.29194e-16 1.92152e-18 5.40602e-21 1.63435e-23 5.08102e-26 1.5254e-28 4.28403e-31 1.30583e-33 6.3207e-36 3.11379e-38 1.02724e-40 2.83648e-43 5.14361e-46 3.02032e-49 0.999999 0.999999 1 1 1 1 1 1 1 1 1 1 1 0.999954 0.993855 0.787381 0.323049 0.0444491 0.00341276 0.000726827 0.000289949 8.71233e-05 3.01603e-05 1.01902e-05 3.0536e-06 9.14307e-07 3.95853e-07 1.09781e-07 3.25586e-08 1.13641e-08 3.33462e-09 1.04897e-09 3.55585e-10 1.66445e-10 5.19534e-11 2.145e-11 7.62203e-12 2.44937e-12 7.96796e-13 3.8218e-13 1.80799e-13 2.75356e-13 5.12517e-13 5.5177e-13 1.03689e-12 1.48375e-12 3.27885e-12 1.02002e-11 1.34017e-11 3.36645e-11 9.54546e-11 1.58493e-10 4.17655e-10 6.0553e-10 1.50972e-09 4.32145e-09 6.53354e-09 2.1392e-08 5.82515e-08 1.37612e-07 4.5726e-07 1.15736e-06 4.21347e-06 1.59168e-05 5.10572e-05 0.000232508 0.00102964 0.00477367 0.0268812 0.141365 0.434613 0.751246 0.922362 0.991051 0.998877 0.999654 0.999893 0.99995 0.999977 0.999987 0.999989 0.999989 0.999989 0.999986 0.99998 0.999965 0.999925 0.999812 0.999441 0.998037 0.991398 0.953729 0.772751 0.433369 0.159536 0.0362022 0.0021793 0.000825513 0.000258101 8.99623e-05 2.86488e-05 8.18451e-06 2.5289e-06 7.74664e-07 1.98707e-07 6.35387e-08 2.29628e-08 9.30707e-09 3.58642e-09 1.91574e-09 1.35401e-09 1.07249e-09 1.04134e-09 1.03648e-09 1.03086e-09 1.09833e-09 1.18826e-09 1.28574e-09 1.31135e-09 1.43754e-09 1.62737e-09 1.89636e-09 2.14744e-09 2.46755e-09 3.09841e-09 4.13825e-09 5.30626e-09 7.5535e-09 1.09906e-08 1.66689e-08 2.79833e-08 4.40336e-08 6.90273e-08 1.15127e-07 2.0994e-07 4.16312e-07 8.89337e-07 2.0017e-06 4.86238e-06 1.29154e-05 3.74508e-05 0.000119189 0.000417846 0.00162065 0.00750358 0.0397864 0.198218 0.515371 0.811865 0.954168 0.997859 0.99917 0.999695 0.999909 0.999972 0.999986 0.999989 0.99999 0.999989 0.999988 0.999983 0.999968 0.999925 0.999793 0.999316 0.997164 0.985546 0.909634 0.623292 0.272551 0.0793035 0.00891184 0.00199765 0.000867245 0.0002198 8.00091e-05 2.60912e-05 8.86826e-06 4.20194e-06 1.32479e-06 3.78403e-07 1.68166e-07 7.97558e-08 2.82463e-08 8.87913e-09 4.02517e-09 2.41649e-09 1.69951e-09 1.23534e-09 9.64462e-10 9.82102e-10 1.21591e-09 1.29769e-09 1.06366e-09 8.18495e-10 8.13114e-10 1.06405e-09 1.2276e-09 1.89026e-09 1.67548e-09 8.24522e-10 3.2049e-10 3.35577e-10 6.6279e-10 3.30703e-09 1.18038e-08 1.86452e-08 3.12477e-08 5.75056e-08 1.32429e-07 3.65848e-07 6.46691e-07 1.3446e-06 3.86443e-06 1.10238e-05 2.82623e-05 9.19461e-05 0.000292783 0.000933976 0.00387277 0.0203432 0.110701 0.387401 0.719238 0.917026 0.991264 0.998677 0.999419 0.999835 0.999944 0.999976 0.999978 0.999973 0.999971 0.999963 0.999941 0.999882 0.99971 0.999071 0.996125 0.985271 0.923449 0.637343 0.286551 0.0874287 0.0121191 0.00272538 0.00118852 0.000367662 0.000176218 6.14008e-05 1.63831e-05 6.84506e-06 1.75063e-06 3.24723e-07 9.54503e-08 2.78677e-08 3.00247e-09 5.72338e-10 1.03682e-09 2.33115e-09 3.5288e-09 4.08853e-09 2.85429e-09 8.12961e-10 3.63977e-10 3.11502e-10 2.56591e-10 2.66909e-10 4.36358e-10 7.69931e-10 1.23822e-09 2.86364e-09 9.12957e-09 1.70117e-08 1.61076e-08 1.56116e-08 1.88347e-08 3.82897e-08 6.26159e-08 5.95576e-08 5.94249e-08 7.72142e-08 1.47759e-07 3.88313e-07 1.03082e-06 2.17936e-06 4.39738e-06 7.97044e-06 1.7418e-05 3.80605e-05 9.66207e-05 0.000269887 0.000757373 0.00336545 0.0216637 0.134686 0.478988 0.835342 0.97148 0.998279 0.999576 0.999902 0.999977 0.999995 0.999997 0.999997 0.999997 0.999995 0.99999 0.999972 0.9999 0.999568 0.997356 0.978296 0.824198 0.453397 0.134413 0.0297905 0.00178387 0.000632407 0.000233627 7.36711e-05 2.43195e-05 9.72693e-06 2.92641e-06 1.15069e-06 3.75921e-07 1.72677e-07 4.87131e-08 1.5448e-08 8.69314e-09 2.45357e-09 7.07323e-10 4.58592e-10 1.01914e-10 1.21788e-11 9.52272e-12 2.75477e-12 6.82908e-13 1.75986e-13 6.70295e-14 1.53957e-15 5.30823e-18 1.51376e-20 4.01666e-23 1.12847e-25 3.2586e-28 9.19365e-31 2.49109e-33 7.3952e-36 3.26371e-38 1.45549e-40 4.54732e-43 1.16024e-45 1.9249e-48 1.01333e-51 0.999992 0.99999 0.999997 1 1 1 1 1 1 1 1 0.999975 0.99637 0.817471 0.349201 0.0446083 0.0026045 0.000713151 0.000283694 7.64735e-05 3.02676e-05 8.52032e-06 2.71259e-06 8.71522e-07 2.40078e-07 6.50435e-08 2.69811e-08 6.88338e-09 1.81782e-09 5.64848e-10 1.521e-10 4.38149e-11 1.37995e-11 6.22774e-12 1.89322e-12 8.28441e-13 4.75922e-13 2.32494e-13 1.44473e-13 1.50842e-13 5.28159e-14 2.27403e-14 2.89257e-14 3.17185e-14 7.89146e-14 9.69228e-14 2.65275e-13 6.93734e-13 6.55081e-13 1.92522e-12 3.68991e-12 5.42459e-12 1.49414e-11 1.68125e-11 4.70638e-11 1.36956e-10 1.69996e-10 6.61244e-10 1.77272e-09 4.09181e-09 1.45861e-08 3.49622e-08 1.38572e-07 5.13553e-07 1.48504e-06 7.23875e-06 3.17662e-05 0.000125105 0.000602782 0.00303567 0.0178836 0.103353 0.369813 0.682232 0.885963 0.97406 0.998706 0.999385 0.999589 0.9998 0.999831 0.999834 0.999831 0.999802 0.999699 0.999457 0.998794 0.996559 0.98743 0.942281 0.750048 0.427074 0.159044 0.0337416 0.00220872 0.000828912 0.000261459 9.4119e-05 2.8068e-05 9.11955e-06 2.71848e-06 6.99549e-07 1.91764e-07 5.39323e-08 1.25145e-08 3.16379e-09 9.2882e-10 3.2168e-10 1.54235e-10 1.06642e-10 8.94466e-11 8.5139e-11 8.38966e-11 8.34148e-11 8.39128e-11 8.51149e-11 8.9183e-11 9.43264e-11 9.38471e-11 9.83454e-11 1.03975e-10 1.11214e-10 1.15028e-10 1.20224e-10 1.38095e-10 1.67336e-10 1.91917e-10 2.56684e-10 3.54004e-10 4.92624e-10 8.15174e-10 1.23895e-09 1.85109e-09 2.9207e-09 5.12925e-09 9.97669e-09 2.13715e-08 4.92755e-08 1.24671e-07 3.43096e-07 1.00423e-06 3.14055e-06 1.1248e-05 4.47135e-05 0.000191209 0.000898926 0.00477348 0.0289527 0.16403 0.491495 0.79572 0.943771 0.995634 0.998704 0.99946 0.999768 0.999845 0.999863 0.999862 0.999849 0.999781 0.999583 0.998983 0.996866 0.985988 0.925729 0.677612 0.317102 0.0948364 0.011859 0.00249176 0.000913996 0.000235237 7.16465e-05 1.97526e-05 6.74994e-06 2.16652e-06 6.72632e-07 2.56157e-07 7.01622e-08 1.76234e-08 6.17676e-09 2.17615e-09 6.27844e-10 2.44984e-10 1.70831e-10 1.51003e-10 1.43967e-10 1.41674e-10 1.40717e-10 1.40183e-10 1.38391e-10 1.29376e-10 1.25825e-10 1.25638e-10 1.2556e-10 1.256e-10 1.26623e-10 1.38618e-10 1.26052e-10 1.19475e-10 1.18534e-10 1.1822e-10 1.1806e-10 1.92673e-10 3.92836e-10 5.16995e-10 8.75633e-10 1.56323e-09 3.42898e-09 8.97704e-09 1.52425e-08 3.30092e-08 1.01569e-07 3.02781e-07 8.21035e-07 2.97093e-06 9.23391e-06 2.74153e-05 0.000116292 0.000540489 0.00251237 0.0144504 0.0926648 0.374302 0.709879 0.908535 0.985265 0.997611 0.999049 0.99964 0.999706 0.999679 0.99965 0.999575 0.99932 0.998592 0.99626 0.984534 0.90548 0.678919 0.348227 0.109712 0.0171218 0.00367935 0.00128051 0.000339545 0.000107204 3.53104e-05 1.60307e-05 5.97792e-06 1.47527e-06 4.80138e-07 8.91139e-08 1.40384e-08 3.25242e-09 6.57793e-10 2.17604e-10 2.48846e-10 2.88012e-10 3.11162e-10 3.23746e-10 2.37949e-10 1.73653e-10 1.39662e-10 1.37482e-10 1.35017e-10 1.29451e-10 1.23483e-10 1.20183e-10 1.18505e-10 1.40291e-10 3.0684e-10 8.37738e-10 8.52163e-10 6.20433e-10 6.08701e-10 1.12785e-09 2.93905e-09 2.98606e-09 2.32837e-09 1.98304e-09 2.57498e-09 5.69097e-09 1.70801e-08 5.07588e-08 1.21032e-07 2.48393e-07 4.46489e-07 1.00161e-06 2.1897e-06 6.02618e-06 1.68547e-05 3.28934e-05 0.000111129 0.000529975 0.00249615 0.0197455 0.165583 0.537949 0.864184 0.977349 0.998788 0.999611 0.999869 0.999935 0.999943 0.999931 0.999887 0.999745 0.999168 0.996224 0.976284 0.822065 0.452428 0.130341 0.022717 0.0017694 0.000643889 0.000188643 6.1251e-05 2.25534e-05 6.38411e-06 1.90559e-06 7.48303e-07 2.04726e-07 7.34631e-08 2.218e-08 9.85468e-09 2.54343e-09 7.31576e-10 3.88358e-10 9.77681e-11 2.60506e-11 1.63513e-11 3.41779e-12 4.67861e-13 3.65763e-13 1.7843e-13 9.4512e-14 5.51384e-14 3.60014e-15 1.50585e-17 4.72813e-20 1.26314e-22 3.16675e-25 8.30872e-28 2.23873e-30 5.9505e-33 1.54964e-35 4.4453e-38 1.7945e-40 7.27257e-43 2.14054e-45 5.04468e-48 7.65064e-51 3.61704e-54 0.999133 0.999521 0.999958 0.999989 0.999996 1 1 1 1 0.999981 0.995955 0.798053 0.356829 0.0439568 0.00342691 0.000796015 0.000295954 8.02302e-05 3.23388e-05 8.09623e-06 3.14376e-06 8.31089e-07 2.45579e-07 7.44067e-08 1.89341e-08 4.68497e-09 1.83504e-09 4.32813e-10 1.02718e-10 2.85667e-11 7.35765e-12 2.10048e-12 7.59243e-13 5.38076e-13 2.62285e-13 1.69764e-13 1.79741e-13 1.23537e-13 3.1365e-14 8.47463e-15 1.71851e-15 1.09967e-15 1.97044e-15 2.87622e-15 8.96185e-15 1.05525e-14 3.38819e-14 8.49225e-14 7.60252e-14 2.54771e-13 4.35816e-13 5.99417e-13 1.37282e-12 1.42148e-12 2.69762e-12 5.51111e-12 5.57088e-12 1.8924e-11 4.77402e-11 9.90348e-11 3.71554e-10 8.56904e-10 3.57101e-09 1.33982e-08 3.75928e-08 1.94876e-07 8.87243e-07 3.4957e-06 1.76405e-05 8.65246e-05 0.000427491 0.0022528 0.0125709 0.0702328 0.284403 0.569276 0.80626 0.921062 0.978205 0.996609 0.997059 0.997021 0.996889 0.996543 0.994467 0.987985 0.967455 0.893536 0.684894 0.389018 0.148496 0.0330029 0.00215596 0.00110254 0.000306851 9.95835e-05 2.96115e-05 1.07881e-05 3.06184e-06 9.23519e-07 2.56298e-07 6.01709e-08 1.47927e-08 3.84656e-09 8.65543e-10 2.52587e-10 1.21499e-10 9.25309e-11 8.89917e-11 8.90387e-11 8.5104e-11 8.3854e-11 8.33445e-11 8.32936e-11 8.34559e-11 8.48107e-11 8.56154e-11 8.6088e-11 8.67178e-11 8.70325e-11 8.72751e-11 8.73384e-11 8.73699e-11 8.74572e-11 8.75951e-11 8.77786e-11 8.80121e-11 8.83104e-11 8.86708e-11 8.90936e-11 9.15984e-11 1.00462e-10 1.12739e-10 1.36044e-10 1.87108e-10 3.05671e-10 5.95776e-10 1.30561e-09 3.22066e-09 8.83513e-09 2.55458e-08 7.79388e-08 2.84578e-07 1.14124e-06 4.98114e-06 2.5141e-05 0.000131997 0.000674333 0.00380572 0.025615 0.149744 0.454709 0.752742 0.916842 0.982547 0.996741 0.997509 0.99791 0.998099 0.997932 0.996887 0.99321 0.980843 0.922686 0.689183 0.357202 0.122011 0.0211366 0.00371211 0.00128679 0.000320537 8.69392e-05 2.25768e-05 6.50372e-06 1.8282e-06 5.51454e-07 1.49287e-07 4.0225e-08 1.13702e-08 2.72537e-09 7.34068e-10 2.98604e-10 1.80724e-10 1.53153e-10 1.49469e-10 1.48295e-10 1.43935e-10 1.41629e-10 1.40688e-10 1.40159e-10 1.39765e-10 1.38745e-10 1.38165e-10 1.38073e-10 1.38221e-10 1.38799e-10 1.3739e-10 1.34673e-10 1.32176e-10 1.31913e-10 1.33145e-10 1.30484e-10 1.23322e-10 1.17791e-10 1.17236e-10 1.17028e-10 1.17222e-10 1.17584e-10 1.27619e-10 1.7296e-10 2.94084e-10 4.42351e-10 9.09357e-10 2.75911e-09 8.17995e-09 2.30159e-08 8.83248e-08 2.7512e-07 7.80978e-07 3.5748e-06 1.73044e-05 7.54059e-05 0.000372374 0.00208666 0.0134955 0.0878802 0.351894 0.663134 0.876757 0.967401 0.993121 0.995217 0.995499 0.995036 0.994147 0.989754 0.973604 0.913336 0.687074 0.344046 0.128058 0.0294289 0.00635152 0.00216899 0.000597611 0.000135097 3.57389e-05 1.02835e-05 3.45957e-06 1.42522e-06 5.15641e-07 1.15076e-07 2.96794e-08 4.51002e-09 7.80043e-10 2.50257e-10 1.6306e-10 1.90319e-10 2.46796e-10 2.87117e-10 3.25192e-10 3.18648e-10 2.94503e-10 2.19926e-10 1.6828e-10 1.64973e-10 1.6033e-10 1.55366e-10 1.43188e-10 1.22232e-10 1.1251e-10 1.08588e-10 1.06918e-10 1.06715e-10 1.06651e-10 1.06617e-10 1.06905e-10 1.57324e-10 2.20602e-10 2.03005e-10 2.12949e-10 2.4424e-10 2.98071e-10 4.31406e-10 1.00797e-09 2.80296e-09 6.67224e-09 1.3242e-08 2.37824e-08 5.377e-08 1.1788e-07 3.31418e-07 1.00561e-06 1.7816e-06 5.45071e-06 2.05753e-05 6.52476e-05 0.000386636 0.00311568 0.0268177 0.210379 0.562787 0.84694 0.954732 0.994335 0.998347 0.998428 0.99795 0.996159 0.989317 0.953604 0.772764 0.444726 0.136056 0.0244497 0.00181005 0.000679403 0.000204426 7.34183e-05 2.0003e-05 6.00526e-06 2.15238e-06 5.52294e-07 1.50793e-07 5.71487e-08 1.43022e-08 4.6996e-09 1.31803e-09 5.58747e-10 1.32914e-10 3.49411e-11 1.74653e-11 4.13397e-12 1.12901e-12 7.28702e-13 2.97126e-13 9.97649e-14 8.57592e-14 9.98611e-14 1.72182e-14 1.84669e-15 3.90643e-17 1.50515e-19 4.34917e-22 1.09297e-24 2.5946e-27 6.38356e-30 1.61053e-32 4.03829e-35 1.00713e-37 2.77346e-40 1.0263e-42 3.78912e-45 1.04566e-47 2.27373e-50 3.14818e-53 1.33788e-56 0.245853 0.629001 0.932884 0.995378 0.997592 0.999541 1 0.999452 0.925478 0.631452 0.275145 0.0283796 0.00282587 0.000587439 0.000254082 9.43022e-05 3.5593e-05 9.09267e-06 3.65291e-06 8.59413e-07 3.24909e-07 8.08946e-08 2.23347e-08 6.34889e-09 1.49778e-09 3.4106e-10 1.24963e-10 2.76801e-11 6.15824e-12 1.67446e-12 6.89165e-13 3.06576e-13 1.73721e-13 1.95134e-13 1.57457e-13 6.1744e-14 2.50217e-14 6.32039e-15 1.34216e-15 2.6883e-16 6.08838e-17 8.0162e-17 1.77863e-16 2.90652e-16 1.11487e-15 1.52472e-15 4.76176e-15 1.25799e-14 1.39288e-14 4.16057e-14 7.94173e-14 1.14831e-13 2.66393e-13 3.7893e-13 6.42178e-13 1.04216e-12 1.29672e-12 2.17589e-12 3.22542e-12 4.71067e-12 1.03107e-11 1.98284e-11 7.30889e-11 2.6525e-10 7.52692e-10 4.07059e-09 1.96348e-08 8.19708e-08 4.2834e-07 2.21932e-06 1.17668e-05 6.21358e-05 0.000298444 0.00149733 0.00782718 0.0384389 0.155169 0.375786 0.593032 0.763573 0.858721 0.900673 0.914255 0.893183 0.832649 0.707257 0.50799 0.279321 0.116532 0.0268097 0.00247129 0.00131415 0.000376634 0.000102498 3.30272e-05 1.23331e-05 3.51933e-06 1.23372e-06 3.33042e-07 9.38307e-08 2.42316e-08 5.25303e-09 1.20897e-09 3.34493e-10 1.29767e-10 9.29219e-11 8.27206e-11 8.17215e-11 8.62432e-11 8.84072e-11 9.08515e-11 9.38268e-11 9.68064e-11 9.95341e-11 1.01754e-10 1.02306e-10 1.03249e-10 1.03053e-10 1.02612e-10 1.0089e-10 1.01052e-10 1.00645e-10 9.7699e-11 9.82933e-11 9.87952e-11 9.96895e-11 1.00561e-10 1.01452e-10 1.02169e-10 1.02077e-10 1.0156e-10 1.01774e-10 1.0203e-10 1.02274e-10 1.02414e-10 1.02579e-10 1.02685e-10 1.02682e-10 1.48472e-10 2.90711e-10 7.13076e-10 1.98673e-09 7.14335e-09 2.85003e-08 1.24245e-07 6.78797e-07 3.71329e-06 1.9096e-05 0.000105914 0.000613354 0.00348803 0.0213335 0.116466 0.381793 0.642208 0.817288 0.901452 0.943206 0.956936 0.953722 0.925475 0.82169 0.633456 0.357854 0.136442 0.0307297 0.00511582 0.00223179 0.00057243 0.00013312 3.21658e-05 8.74586e-06 2.48215e-06 7.14632e-07 1.83647e-07 5.1186e-08 1.19216e-08 3.03496e-09 9.02934e-10 2.96886e-10 1.72388e-10 1.45004e-10 1.40577e-10 1.42005e-10 1.4644e-10 1.47476e-10 1.48944e-10 1.53885e-10 1.57844e-10 1.59078e-10 1.54589e-10 1.47949e-10 1.42338e-10 1.39294e-10 1.3951e-10 1.42842e-10 1.46305e-10 1.46486e-10 1.46625e-10 1.46578e-10 1.46457e-10 1.37418e-10 1.26486e-10 1.20391e-10 1.1859e-10 1.17121e-10 1.20273e-10 1.22547e-10 1.23865e-10 1.24827e-10 1.2667e-10 1.28646e-10 1.30602e-10 1.69044e-10 3.08744e-10 7.21431e-10 2.64918e-09 8.04378e-09 2.19049e-08 1.00491e-07 4.85767e-07 2.08531e-06 1.04483e-05 5.90641e-05 0.000353192 0.00200476 0.011854 0.0671543 0.291555 0.565882 0.747718 0.855716 0.894855 0.885693 0.866763 0.763928 0.575848 0.343495 0.14363 0.039001 0.0069609 0.00351838 0.00114965 0.0002643 6.83001e-05 1.46547e-05 3.83197e-06 1.09292e-06 3.29697e-07 1.09754e-07 3.3546e-08 7.78221e-09 2.09752e-09 4.94624e-10 1.39743e-10 1.26265e-10 1.51912e-10 1.89637e-10 3.35756e-10 4.71165e-10 4.71051e-10 4.46715e-10 3.33017e-10 2.0553e-10 1.70861e-10 1.69466e-10 1.67802e-10 1.62066e-10 1.51776e-10 1.36799e-10 1.19888e-10 1.1076e-10 1.07879e-10 1.06893e-10 1.0666e-10 1.07475e-10 1.09653e-10 1.15596e-10 1.25472e-10 1.44266e-10 2.45396e-10 3.22331e-10 2.92206e-10 2.12976e-10 1.56519e-10 2.07804e-10 3.68281e-10 6.51121e-10 1.13931e-09 2.54388e-09 5.58131e-09 1.55561e-08 4.44496e-08 8.45936e-08 2.8523e-07 9.80446e-07 2.14186e-06 1.04128e-05 7.2929e-05 0.000465203 0.00378097 0.0279455 0.163476 0.441207 0.676786 0.837521 0.888431 0.854244 0.745382 0.57543 0.325778 0.113913 0.0255192 0.00168493 0.000686161 0.000216815 8.4422e-05 2.37965e-05 8.36122e-06 2.11265e-06 5.92099e-07 2.03408e-07 4.7702e-08 1.20165e-08 4.34105e-09 9.9847e-10 3.0158e-10 7.90498e-11 3.16749e-11 7.22715e-12 1.9034e-12 9.58186e-13 4.04121e-13 1.64348e-13 1.29109e-13 1.1058e-13 2.26625e-14 1.35896e-14 3.56217e-15 4.64658e-16 3.22397e-17 4.40134e-19 1.56511e-21 4.18363e-24 9.89442e-27 2.22141e-29 5.12652e-32 1.211e-34 2.8597e-37 6.79377e-40 1.78289e-42 6.04611e-45 2.03383e-47 5.23294e-50 1.04725e-52 1.32104e-55 5.04568e-59 2.52729e-15 1.40195e-14 0.0168239 0.184559 0.330115 0.377942 0.330112 0.191278 0.031938 0.0108959 0.00116811 0.000325583 0.000138063 6.36843e-05 2.93881e-05 1.11032e-05 4.22629e-06 1.03289e-06 4.09217e-07 9.13432e-08 3.34299e-08 7.86287e-09 2.03774e-09 5.4184e-10 1.19024e-10 2.55711e-11 8.79389e-12 2.25103e-12 6.81368e-13 2.63265e-13 1.57619e-13 2.0662e-13 6.92192e-14 4.02852e-14 1.34751e-14 5.03318e-15 1.54299e-15 3.1137e-16 5.36298e-17 9.09001e-18 2.68614e-18 7.56929e-18 2.01074e-17 4.10406e-17 1.68189e-16 3.65226e-16 1.04899e-15 2.8768e-15 5.39834e-15 1.38238e-14 2.92643e-14 4.87203e-14 1.01373e-13 1.96041e-13 3.24559e-13 5.15324e-13 8.13919e-13 1.28093e-12 2.01599e-12 2.97013e-12 4.02412e-12 5.54372e-12 7.08111e-12 1.00706e-11 1.72443e-11 5.80906e-11 2.65851e-10 1.18784e-09 6.3039e-09 3.51856e-08 2.10628e-07 1.19548e-06 6.28569e-06 3.32176e-05 0.000163505 0.000720084 0.00307878 0.0124326 0.0414771 0.106973 0.20246 0.280006 0.315517 0.279911 0.204775 0.128812 0.0556222 0.010216 0.00213506 0.00141136 0.000365501 9.6015e-05 3.31636e-05 1.3017e-05 4.14777e-06 1.52754e-06 4.18839e-07 1.40953e-07 3.62304e-08 9.57687e-09 2.33053e-09 5.02969e-10 1.57702e-10 8.79462e-11 8.17882e-11 8.41896e-11 8.11246e-11 7.9852e-11 8.11077e-11 8.25198e-11 8.23423e-11 8.11902e-11 8.23555e-11 8.00304e-11 8.16724e-11 7.80701e-11 8.71344e-11 8.47713e-11 8.93734e-11 9.07107e-11 8.3585e-11 7.54429e-11 6.60365e-11 7.59577e-11 7.93135e-11 8.83923e-11 9.54478e-11 9.95464e-11 1.03883e-10 1.04945e-10 1.0528e-10 1.05635e-10 1.05564e-10 1.0561e-10 1.04666e-10 1.03122e-10 1.02577e-10 1.01896e-10 1.00445e-10 9.93311e-11 9.8524e-11 1.11665e-10 2.35192e-10 7.93349e-10 3.20452e-09 1.80515e-08 1.02023e-07 5.29972e-07 3.0843e-06 1.84331e-05 0.00010386 0.000563298 0.00291459 0.015625 0.0657037 0.177769 0.333941 0.443592 0.469929 0.456659 0.362137 0.217023 0.109284 0.0347155 0.00810118 0.00323027 0.00105864 0.000250114 5.92021e-05 1.39896e-05 3.84462e-06 1.14749e-06 3.15184e-07 8.53808e-08 2.0498e-08 5.32664e-09 1.19342e-09 3.62824e-10 1.87595e-10 1.34201e-10 1.36524e-10 1.37056e-10 1.38986e-10 1.3935e-10 1.39442e-10 1.34829e-10 1.3596e-10 1.3675e-10 1.48509e-10 1.4449e-10 1.17035e-10 1.04267e-10 9.34112e-11 8.85427e-11 9.06315e-11 9.87016e-11 1.0735e-10 1.1957e-10 1.29819e-10 1.34138e-10 1.12666e-10 8.93816e-11 8.30762e-11 8.21611e-11 9.73187e-11 1.12491e-10 1.26713e-10 1.40629e-10 1.54053e-10 1.67188e-10 1.68208e-10 1.65563e-10 1.5087e-10 1.25909e-10 1.19094e-10 1.1872e-10 1.4246e-10 2.78801e-10 6.20227e-10 2.52928e-09 1.16463e-08 4.87778e-08 2.47566e-07 1.49841e-06 9.61221e-06 5.70609e-05 0.000320139 0.00166264 0.00914842 0.0416384 0.104403 0.22954 0.301105 0.292922 0.265918 0.179928 0.0942389 0.0341016 0.0114572 0.00509527 0.00174373 0.000567125 0.000134811 2.99509e-05 7.91784e-06 1.69117e-06 4.06424e-07 1.08973e-07 2.8857e-08 8.76707e-09 2.76012e-09 9.15492e-10 3.46472e-10 1.5316e-10 8.5569e-11 8.66399e-11 9.67789e-11 1.32123e-10 1.98798e-10 4.23896e-10 4.34469e-10 3.38317e-10 1.83402e-10 1.1847e-10 1.12085e-10 1.14057e-10 1.28344e-10 1.20356e-10 1.18008e-10 1.16678e-10 1.11071e-10 1.07669e-10 1.05196e-10 1.05945e-10 1.05602e-10 1.11932e-10 1.33375e-10 1.75071e-10 2.11283e-10 2.5434e-10 4.45483e-10 4.69237e-10 4.11324e-10 2.38164e-10 1.10102e-10 1.07097e-10 1.07106e-10 1.08316e-10 1.51359e-10 2.5152e-10 5.30786e-10 1.51932e-09 3.49711e-09 5.9256e-09 1.43486e-08 4.17381e-08 9.29602e-08 3.33368e-07 1.50794e-06 7.06997e-06 4.21055e-05 0.000238234 0.00139234 0.00770408 0.0279616 0.0646924 0.1052 0.11914 0.0969153 0.0550758 0.0112726 0.00100894 0.000557056 0.000194496 8.56573e-05 2.6401e-05 1.04946e-05 2.76227e-06 9.4727e-07 2.2215e-07 5.85391e-08 1.90779e-08 4.11531e-09 9.6319e-10 3.28911e-10 7.01885e-11 1.9885e-11 5.08764e-12 2.01057e-12 6.51378e-13 2.96949e-13 1.71106e-13 1.58581e-13 7.75262e-14 4.54252e-14 1.25938e-14 1.39489e-15 6.35281e-16 1.21997e-16 1.19428e-17 5.44988e-19 5.24548e-21 1.71524e-23 4.24184e-26 9.40935e-29 1.98872e-31 4.29128e-34 9.46132e-37 2.09516e-39 4.70886e-42 1.16801e-44 3.62183e-47 1.10801e-49 2.64126e-52 4.84711e-55 5.5539e-58 1.90433e-61 1.9623e-17 5.17217e-15 1.80069e-14 6.13094e-13 4.12125e-08 1.72595e-06 0.00014972 5.60424e-05 6.84654e-05 9.57133e-05 0.000122554 3.21093e-05 1.36564e-05 6.88499e-06 3.36161e-06 1.297e-06 4.95999e-07 1.17348e-07 4.55176e-08 9.71435e-09 3.42701e-09 7.6344e-10 1.86505e-10 4.67461e-11 9.76013e-12 2.71919e-12 9.09306e-13 3.34691e-13 1.53766e-13 1.67167e-13 5.90774e-14 2.17135e-14 7.81271e-15 3.76061e-15 1.12752e-15 3.77584e-16 8.89142e-17 1.46848e-17 2.03436e-18 3.88128e-19 2.93928e-19 1.31916e-18 4.71466e-18 1.4891e-17 5.59831e-17 1.69142e-16 4.84503e-16 1.33358e-15 3.00404e-15 7.53314e-15 1.65638e-14 2.9882e-14 6.12824e-14 1.24443e-13 2.13503e-13 3.55587e-13 5.78071e-13 9.36353e-13 1.52372e-12 2.38699e-12 3.49004e-12 5.39779e-12 7.54835e-12 9.66859e-12 1.1785e-11 1.25667e-11 1.52598e-11 2.45747e-11 6.75715e-11 3.3133e-10 2.05311e-09 1.25651e-08 7.4652e-08 4.17588e-07 2.11006e-06 9.70542e-06 3.92973e-05 0.000154741 0.000470776 0.00137123 0.00297534 0.00451205 0.00612396 0.00409053 0.00121581 0.00140007 0.00154932 0.000693261 0.000202396 9.30936e-05 2.75264e-05 1.10421e-05 3.9173e-06 1.65739e-06 5.21657e-07 1.88847e-07 4.98786e-08 1.61082e-08 3.96818e-09 1.0042e-09 2.64282e-10 9.02051e-11 7.52203e-11 7.1302e-11 6.67093e-11 6.54861e-11 6.17888e-11 5.56896e-11 5.20486e-11 4.83993e-11 4.19219e-11 3.63124e-11 3.4854e-11 3.08926e-11 3.12002e-11 2.79256e-11 3.58667e-11 3.30267e-11 3.92148e-11 3.98307e-11 3.43617e-11 2.89471e-11 2.24026e-11 2.8968e-11 3.14501e-11 3.99935e-11 4.70083e-11 5.33324e-11 6.66709e-11 8.15453e-11 8.48772e-11 8.72956e-11 9.89857e-11 9.53259e-11 1.01791e-10 1.00785e-10 1.03314e-10 1.03909e-10 1.03832e-10 1.01114e-10 9.80137e-11 9.70403e-11 9.80123e-11 9.86122e-11 1.39908e-10 4.58814e-10 2.45116e-09 1.23135e-08 7.43005e-08 4.78963e-07 2.95422e-06 1.81194e-05 0.000100989 0.000488955 0.00224147 0.00605573 0.0169656 0.0315571 0.0374813 0.0366376 0.0243719 0.00968116 0.00494603 0.00369491 0.00145447 0.000415125 0.000114727 2.73603e-05 6.49807e-06 1.79917e-06 5.43256e-07 1.55328e-07 4.04683e-08 1.03375e-08 2.36227e-09 6.22283e-10 1.92597e-10 1.33197e-10 1.32559e-10 1.19109e-10 1.04918e-10 1.03213e-10 1.05747e-10 1.02361e-10 9.85763e-11 8.24747e-11 8.10289e-11 7.2677e-11 8.93772e-11 7.65556e-11 4.78463e-11 4.39646e-11 3.66714e-11 3.41049e-11 3.47759e-11 3.82445e-11 4.23781e-11 4.76068e-11 6.06054e-11 6.48897e-11 4.64383e-11 3.234e-11 3.2274e-11 3.37844e-11 4.54649e-11 5.91662e-11 8.33454e-11 1.14731e-10 1.46605e-10 1.72554e-10 1.80209e-10 1.80135e-10 1.77658e-10 1.56547e-10 1.29441e-10 1.17939e-10 1.17615e-10 1.1756e-10 1.1799e-10 1.26743e-10 2.89089e-10 9.69941e-10 4.4388e-09 2.86582e-08 1.95658e-07 1.28593e-06 8.23961e-06 4.95228e-05 0.000253537 0.000987738 0.00231143 0.00587197 0.00897081 0.00880339 0.00571195 0.006346 0.00609747 0.00393387 0.00199205 0.0007457 0.000220195 6.92913e-05 1.72683e-05 3.71431e-06 9.4111e-07 2.1542e-07 5.35856e-08 1.36027e-08 3.45373e-09 1.0787e-09 4.62926e-10 2.49537e-10 1.72087e-10 8.77675e-11 4.0099e-11 4.48684e-11 4.29961e-11 5.23492e-11 6.20715e-11 1.52051e-10 1.62416e-10 1.0744e-10 5.9214e-11 5.40917e-11 5.09676e-11 5.15016e-11 6.32763e-11 5.48232e-11 5.62518e-11 5.67401e-11 5.88613e-11 6.56629e-11 7.01011e-11 7.83425e-11 9.62152e-11 1.11856e-10 1.38983e-10 1.86218e-10 2.18136e-10 2.56575e-10 4.38971e-10 4.46474e-10 3.20508e-10 1.87264e-10 1.07717e-10 1.07076e-10 1.10472e-10 1.30812e-10 1.72177e-10 2.40621e-10 4.70027e-10 1.25732e-09 2.40693e-09 3.40831e-09 3.85727e-09 6.29287e-09 2.0622e-08 1.12127e-07 2.31275e-07 3.62148e-07 1.11359e-06 3.84529e-06 8.16701e-06 1.20403e-05 1.32242e-05 1.37301e-05 1.36011e-05 1.34657e-05 0.00024448 0.000233926 0.000303435 0.000106148 6.46859e-05 2.29995e-05 1.07051e-05 3.22558e-06 1.29053e-06 3.1923e-07 1.06574e-07 2.3279e-08 5.79562e-09 1.78044e-09 3.55524e-10 7.89384e-11 2.55752e-11 5.27663e-12 1.81525e-12 6.59959e-13 3.06403e-13 1.51491e-13 2.04885e-13 8.11966e-14 2.62069e-14 5.94799e-15 3.03447e-15 7.33831e-16 8.50407e-17 2.85463e-17 4.02881e-18 2.94063e-19 9.03773e-21 6.62041e-23 1.98068e-25 4.51456e-28 9.33442e-31 1.84456e-33 3.70119e-36 7.57679e-39 1.56407e-41 3.29983e-44 7.67032e-47 2.16688e-49 6.00942e-52 1.31824e-54 2.20808e-57 2.28939e-60 7.03116e-64 6.48127e-20 2.40845e-17 5.35503e-15 2.62422e-14 1.41518e-12 4.34953e-09 7.40702e-07 1.1634e-06 3.73429e-06 7.02272e-06 1.23684e-05 3.13359e-06 1.35154e-06 7.41491e-07 3.80577e-07 1.50331e-07 5.76164e-08 1.33184e-08 5.03493e-09 1.03286e-09 3.50236e-10 7.45471e-11 1.75331e-11 4.36365e-12 1.14391e-12 3.55339e-13 1.82228e-13 1.32012e-13 6.39085e-14 1.94939e-14 7.40752e-15 2.31027e-15 8.50832e-16 3.36919e-16 9.09203e-17 2.61091e-17 4.86405e-18 6.62079e-19 7.78239e-20 3.87994e-20 1.0518e-19 5.12641e-19 2.07122e-18 7.44015e-18 2.75291e-17 8.6747e-17 2.54358e-16 7.00868e-16 1.61665e-15 4.05129e-15 9.08226e-15 1.73921e-14 3.59063e-14 7.05502e-14 1.26141e-13 2.23601e-13 3.54732e-13 5.85932e-13 9.41426e-13 1.49015e-12 2.34225e-12 3.84671e-12 6.27793e-12 1.00291e-11 1.42969e-11 1.79789e-11 2.09106e-11 2.34867e-11 2.88933e-11 4.97038e-11 1.21568e-10 4.56915e-10 2.52034e-09 1.12294e-08 3.95965e-08 1.27925e-07 2.81623e-07 4.83649e-07 8.23167e-07 1.01031e-06 5.30985e-06 2.75057e-06 1.71627e-06 6.02068e-05 6.33587e-05 6.40178e-05 6.29831e-05 3.32459e-05 1.2469e-05 6.18487e-06 2.65628e-06 1.36125e-06 4.92143e-07 2.1066e-07 6.55777e-08 2.33224e-08 5.96096e-09 1.85816e-09 4.66439e-10 1.35214e-10 6.66444e-11 5.60954e-11 4.61182e-11 4.57959e-11 4.30521e-11 3.85784e-11 3.08385e-11 2.30409e-11 1.82578e-11 1.47734e-11 1.14043e-11 9.70011e-12 9.45916e-12 9.04259e-12 9.49592e-12 9.17704e-12 1.03515e-11 9.48475e-12 1.0628e-11 1.03187e-11 9.44115e-12 8.57883e-12 7.63994e-12 8.72621e-12 9.01666e-12 1.06227e-11 1.25426e-11 1.49788e-11 1.99316e-11 2.75905e-11 3.08178e-11 3.47258e-11 5.11942e-11 4.82554e-11 6.61942e-11 6.07539e-11 7.74312e-11 8.86175e-11 1.00127e-10 9.75049e-11 9.85268e-11 9.81392e-11 9.89594e-11 9.81489e-11 1.00963e-10 1.04441e-10 1.09008e-10 1.8745e-10 3.89573e-10 2.05378e-09 6.61397e-09 2.86726e-08 1.68353e-07 6.883e-07 8.34466e-07 9.48011e-06 9.31567e-06 2.20578e-05 0.000115161 0.000114593 0.000614845 0.000659336 0.000472879 0.000341188 0.000135469 3.8924e-05 1.23212e-05 3.36662e-06 9.00856e-07 2.64999e-07 7.74312e-08 2.12235e-08 5.26826e-09 1.29591e-09 3.30404e-10 1.26368e-10 9.92017e-11 1.01997e-10 9.55695e-11 7.91852e-11 6.52633e-11 5.83491e-11 5.45049e-11 4.8059e-11 4.27539e-11 3.09285e-11 3.04253e-11 2.40078e-11 2.83254e-11 2.13537e-11 1.45293e-11 1.45081e-11 1.20972e-11 1.10863e-11 1.07874e-11 1.12835e-11 1.21232e-11 1.3404e-11 1.48778e-11 1.47484e-11 1.05834e-11 8.77397e-12 9.02906e-12 9.40824e-12 1.24146e-11 1.65671e-11 2.81369e-11 4.47505e-11 7.04835e-11 1.01914e-10 1.48798e-10 1.69083e-10 1.67059e-10 1.60024e-10 1.40957e-10 1.23481e-10 1.18857e-10 1.1761e-10 1.1792e-10 1.18755e-10 1.21117e-10 1.42209e-10 3.09012e-10 6.15802e-10 1.45584e-09 5.36162e-09 2.57558e-08 1.92043e-07 3.19362e-06 6.03015e-06 1.83645e-05 1.19036e-05 4.96952e-05 0.000200065 0.000135947 0.000369888 0.000382188 0.000334787 0.000208002 7.98491e-05 2.48612e-05 8.93493e-06 2.40961e-06 4.79526e-07 1.34502e-07 3.15236e-08 7.37811e-09 1.82517e-09 5.14699e-10 2.4168e-10 2.1246e-10 1.81675e-10 9.0377e-11 3.49345e-11 1.52616e-11 1.77801e-11 1.38054e-11 2.07985e-11 2.76203e-11 3.33615e-11 3.02942e-11 2.91731e-11 2.39793e-11 2.25462e-11 1.77102e-11 1.62544e-11 1.79942e-11 1.71433e-11 1.96023e-11 1.8854e-11 2.08789e-11 2.52124e-11 2.89556e-11 3.83187e-11 5.27989e-11 6.69518e-11 8.33088e-11 1.00251e-10 1.06008e-10 1.09953e-10 2.27431e-10 2.14276e-10 1.08572e-10 8.38149e-11 9.12921e-11 1.06346e-10 1.20017e-10 1.63618e-10 2.24695e-10 3.42271e-10 7.73053e-10 2.55969e-09 5.80855e-09 1.12821e-08 1.92365e-08 3.90045e-08 1.26738e-07 1.33594e-07 1.44312e-07 1.49877e-07 3.05592e-07 1.19348e-06 3.43549e-06 7.01742e-06 1.00188e-05 1.35767e-05 1.42795e-05 1.79543e-05 1.89998e-05 1.60154e-05 1.58988e-05 1.00533e-05 7.49297e-06 2.72838e-06 1.32448e-06 3.92462e-07 1.56832e-07 3.67238e-08 1.19128e-08 2.43573e-09 5.75737e-10 1.67215e-10 3.20277e-11 8.09016e-12 2.90945e-12 7.68102e-13 2.96792e-13 1.59356e-13 2.11953e-13 6.20779e-14 2.32087e-14 7.93123e-15 2.3456e-15 4.67531e-16 1.96226e-16 4.20498e-17 5.00243e-18 1.23027e-18 1.28744e-19 6.98084e-21 1.48768e-22 8.76586e-25 2.38702e-27 4.9849e-30 9.53284e-33 1.7471e-35 3.23778e-38 6.11456e-41 1.16836e-43 2.29449e-46 4.95342e-49 1.26889e-51 3.17656e-54 6.36635e-57 9.67939e-60 9.03798e-63 2.47759e-66 9.95332e-22 4.72633e-19 1.2191e-16 1.17385e-14 4.88726e-14 1.90326e-11 1.78984e-08 4.52488e-08 2.00275e-07 5.07974e-07 1.20279e-06 3.02464e-07 1.3355e-07 7.95697e-08 4.26888e-08 1.73012e-08 6.6362e-09 1.50848e-09 5.54092e-10 1.09897e-10 3.62184e-11 7.42786e-12 2.43592e-12 5.72511e-13 2.15118e-13 1.24422e-13 9.46835e-14 3.08983e-14 8.91026e-15 2.42079e-15 8.84962e-16 2.45962e-16 8.7365e-17 2.89825e-17 6.98275e-18 1.68086e-18 2.53949e-19 2.88037e-20 4.51488e-21 1.1385e-20 4.76217e-20 2.29122e-19 9.54407e-19 3.55176e-18 1.28011e-17 4.09057e-17 1.23413e-16 3.40911e-16 8.01774e-16 1.9664e-15 4.54139e-15 9.3157e-15 1.91998e-14 3.65302e-14 6.77036e-14 1.25552e-13 1.96325e-13 3.22842e-13 4.94268e-13 7.53674e-13 1.13772e-12 1.63913e-12 2.41768e-12 3.63462e-12 6.50993e-12 1.18502e-11 1.84211e-11 2.40204e-11 2.90782e-11 4.00822e-11 5.78698e-11 1.06536e-10 3.73666e-10 1.58927e-09 6.22505e-09 2.46266e-08 6.88143e-08 1.56579e-07 3.67151e-07 5.57872e-07 1.14334e-06 1.65067e-06 1.6588e-06 3.06295e-06 2.73545e-06 2.85418e-06 2.80883e-06 2.02669e-06 1.01977e-06 6.86119e-07 3.11497e-07 1.67615e-07 6.18722e-08 2.67449e-08 8.25736e-09 2.90432e-09 7.30919e-10 2.3718e-10 8.02569e-11 4.9125e-11 3.17048e-11 2.5548e-11 2.29026e-11 2.3708e-11 1.85144e-11 1.30669e-11 8.25483e-12 5.67703e-12 5.16935e-12 5.03014e-12 5.15223e-12 5.01916e-12 4.7781e-12 4.45242e-12 4.39767e-12 4.18274e-12 4.38479e-12 4.15488e-12 4.39732e-12 4.23882e-12 4.06115e-12 3.88388e-12 3.63894e-12 3.94732e-12 4.04693e-12 4.66525e-12 5.00293e-12 5.51535e-12 6.03058e-12 6.55994e-12 7.38949e-12 8.3246e-12 1.19225e-11 1.16758e-11 1.90892e-11 1.90719e-11 2.94187e-11 3.85766e-11 5.94983e-11 5.98359e-11 7.12332e-11 7.56833e-11 8.79871e-11 1.02104e-10 1.3804e-10 1.37338e-10 1.33131e-10 1.53095e-10 1.93952e-10 3.50278e-10 1.1615e-09 3.62486e-09 1.47719e-08 7.62769e-08 1.42411e-07 6.36665e-07 7.52174e-07 3.67625e-07 2.47702e-06 1.66189e-06 1.7486e-05 2.94832e-05 2.24587e-05 2.22065e-05 1.07993e-05 3.83841e-06 1.41911e-06 4.24352e-07 1.36576e-07 3.93379e-08 1.11278e-08 2.95198e-09 7.30559e-10 2.05723e-10 1.00265e-10 7.19612e-11 4.92912e-11 5.83769e-11 5.61554e-11 3.92401e-11 2.6167e-11 1.94024e-11 1.57541e-11 1.23792e-11 1.03676e-11 7.65626e-12 8.48901e-12 7.91843e-12 8.01113e-12 7.60256e-12 6.65079e-12 6.21604e-12 5.15827e-12 4.82629e-12 4.61881e-12 4.6014e-12 4.87415e-12 5.35027e-12 5.81051e-12 5.62383e-12 4.63395e-12 4.24384e-12 4.17984e-12 4.11097e-12 4.48839e-12 4.92374e-12 6.91677e-12 1.04138e-11 1.92308e-11 3.51444e-11 6.60745e-11 9.01029e-11 1.0502e-10 1.00102e-10 1.02792e-10 9.96464e-11 1.04991e-10 1.16487e-10 1.25357e-10 1.38342e-10 1.83597e-10 2.59221e-10 4.68826e-10 5.06141e-10 7.93607e-10 2.11675e-09 7.48325e-09 3.29189e-08 2.25272e-07 4.86308e-07 1.56813e-06 1.48187e-06 2.01155e-06 7.95367e-06 3.4842e-06 9.47145e-06 1.44884e-05 1.59825e-05 1.58863e-05 8.4762e-06 2.96016e-06 1.11846e-06 3.31976e-07 7.61208e-08 2.09067e-08 4.75763e-09 1.11098e-09 3.45135e-10 1.61349e-10 1.50614e-10 1.40631e-10 1.02083e-10 3.55589e-11 1.03912e-11 5.17155e-12 6.0657e-12 7.05508e-12 1.13635e-11 1.50123e-11 1.53232e-11 1.46324e-11 1.26995e-11 1.0155e-11 8.98534e-12 7.47755e-12 6.91143e-12 7.11447e-12 7.28198e-12 8.44328e-12 8.19381e-12 8.97278e-12 9.60616e-12 1.04737e-11 1.36967e-11 1.73216e-11 2.03312e-11 2.43462e-11 3.10737e-11 3.97653e-11 4.50775e-11 5.36547e-11 5.29656e-11 5.02731e-11 5.55477e-11 7.25775e-11 9.12021e-11 1.04923e-10 1.23944e-10 1.49399e-10 2.10877e-10 4.38533e-10 1.33484e-09 3.373e-09 9.50462e-09 3.37682e-08 1.05588e-07 1.96145e-07 1.86845e-07 3.95014e-08 3.06722e-08 4.47288e-08 1.04992e-07 2.66597e-07 6.92115e-07 1.20658e-06 1.74632e-06 2.22664e-06 2.08744e-06 2.10912e-06 1.72556e-06 1.38838e-06 1.02766e-06 8.56434e-07 3.2186e-07 1.62027e-07 4.74983e-08 1.88738e-08 4.20879e-09 1.32663e-09 2.56975e-10 6.0145e-11 1.63487e-11 4.66052e-12 1.25714e-12 4.44471e-13 1.88901e-13 2.00823e-13 6.88089e-14 2.49925e-14 8.56094e-15 2.6088e-15 7.97938e-16 2.1376e-16 3.70068e-17 1.25235e-17 2.38674e-18 2.80818e-19 5.09265e-20 3.9927e-21 1.60812e-22 2.45398e-24 1.20359e-26 2.96735e-29 5.6376e-32 9.88712e-35 1.66617e-37 2.83024e-40 4.89464e-43 8.58915e-46 1.55579e-48 3.08982e-51 7.13559e-54 1.60377e-56 2.91367e-59 3.99432e-62 3.33885e-65 8.12929e-69 2.4807e-23 1.46479e-20 4.00791e-18 4.38138e-16 3.08824e-14 6.90756e-14 3.61395e-10 1.83476e-09 1.05829e-08 3.62823e-08 1.13075e-07 2.89168e-08 1.31598e-08 8.51164e-09 4.75189e-09 1.9785e-09 7.58592e-10 1.70598e-10 6.11899e-11 1.20162e-11 4.50913e-12 9.97023e-13 3.205e-13 1.4828e-13 1.31144e-13 4.11748e-14 1.36656e-14 4.17152e-15 1.19915e-15 3.04793e-16 1.01506e-16 2.57695e-17 8.44143e-18 2.3856e-18 5.08658e-19 1.01809e-19 1.27075e-20 1.30199e-21 8.67208e-22 4.39949e-21 2.05863e-20 9.76491e-20 4.147e-19 1.57296e-18 5.55359e-18 1.83134e-17 5.6848e-17 1.58228e-16 3.83416e-16 9.29868e-16 2.20992e-15 4.74898e-15 9.79226e-15 1.8658e-14 3.53832e-14 6.64099e-14 1.05552e-13 1.72974e-13 2.70136e-13 4.2455e-13 6.3316e-13 9.25376e-13 1.39729e-12 1.88388e-12 2.52791e-12 3.86311e-12 6.53775e-12 1.03677e-11 1.63405e-11 2.60083e-11 4.0061e-11 5.8578e-11 9.90304e-11 2.20127e-10 6.20728e-10 2.03709e-09 5.70174e-09 1.2979e-08 3.63931e-08 6.73736e-08 1.50627e-07 2.26356e-07 2.64224e-07 2.7937e-07 2.47923e-07 2.49493e-07 2.36867e-07 1.81215e-07 1.04387e-07 7.63377e-08 3.66588e-08 2.06442e-08 7.8105e-09 3.43173e-09 1.06797e-09 3.95862e-10 1.10373e-10 5.36477e-11 2.30755e-11 1.01506e-11 8.51252e-12 9.74054e-12 8.84286e-12 7.21195e-12 4.70161e-12 3.98717e-12 3.93885e-12 3.78247e-12 3.41518e-12 3.07026e-12 2.80209e-12 2.54138e-12 2.42203e-12 2.27342e-12 2.21503e-12 2.13186e-12 2.22797e-12 2.12701e-12 2.21686e-12 2.12839e-12 2.05756e-12 1.99957e-12 1.94979e-12 2.05344e-12 2.09643e-12 2.41988e-12 2.54491e-12 2.8147e-12 3.04929e-12 3.18275e-12 3.44179e-12 3.61483e-12 3.97865e-12 3.93856e-12 4.68982e-12 5.00497e-12 7.40501e-12 9.46087e-12 1.63712e-11 2.00911e-11 2.83143e-11 3.24801e-11 4.17474e-11 5.17866e-11 1.08742e-10 1.31715e-10 1.45201e-10 2.41173e-10 2.81698e-10 2.91026e-10 6.70389e-10 1.31253e-09 4.04796e-09 1.58045e-08 3.26397e-08 8.02511e-08 1.08904e-07 7.06444e-08 1.60379e-07 1.71838e-07 6.31348e-07 1.38196e-06 1.29527e-06 1.41175e-06 9.64816e-07 4.1369e-07 1.66853e-07 6.44654e-08 2.08599e-08 5.90896e-09 1.63699e-09 4.55932e-10 1.2985e-10 7.65271e-11 4.34314e-11 2.81737e-11 2.00162e-11 2.7238e-11 2.09046e-11 1.01443e-11 6.07141e-12 5.0061e-12 5.00368e-12 5.10931e-12 4.98524e-12 4.88913e-12 5.21336e-12 4.62738e-12 4.49599e-12 3.95099e-12 3.15558e-12 2.94493e-12 2.53101e-12 2.39206e-12 2.31555e-12 2.27032e-12 2.41046e-12 2.64183e-12 2.96151e-12 2.8502e-12 2.46431e-12 2.25514e-12 2.22146e-12 2.17743e-12 2.34428e-12 2.54607e-12 3.21193e-12 3.77028e-12 5.32293e-12 9.41944e-12 1.73606e-11 2.64384e-11 4.04802e-11 4.34335e-11 4.84606e-11 5.24924e-11 6.22108e-11 7.78387e-11 9.64053e-11 1.28194e-10 1.9405e-10 3.10802e-10 7.53636e-10 1.04052e-09 1.44379e-09 2.26954e-09 5.07473e-09 1.64555e-08 5.01403e-08 1.08723e-07 2.48823e-07 3.43353e-07 2.83912e-07 4.5723e-07 1.10576e-07 1.18738e-08 2.93568e-07 7.95657e-07 1.13933e-06 8.83801e-07 3.48558e-07 1.36368e-07 4.2757e-08 1.2164e-08 3.34154e-09 8.07833e-10 2.52601e-10 1.5576e-10 1.02081e-10 8.49204e-11 7.64814e-11 4.94306e-11 1.02899e-11 4.18991e-12 4.28541e-12 4.49689e-12 4.48381e-12 5.92627e-12 6.51122e-12 7.74148e-12 7.22081e-12 6.38774e-12 4.80109e-12 4.05864e-12 3.48092e-12 3.41819e-12 3.57812e-12 3.6873e-12 4.10884e-12 4.00624e-12 4.44968e-12 4.68656e-12 4.71596e-12 5.40285e-12 6.00271e-12 6.71713e-12 8.65821e-12 1.31052e-11 2.05115e-11 2.64605e-11 2.29805e-11 2.80047e-11 3.44828e-11 3.9001e-11 4.98961e-11 6.16328e-11 6.794e-11 6.99477e-11 9.5715e-11 1.15687e-10 1.31303e-10 1.44692e-10 1.87221e-10 4.45847e-10 4.63195e-09 3.1805e-08 1.74704e-08 1.753e-08 4.88882e-09 6.0596e-09 7.4225e-09 1.59044e-08 3.45148e-08 7.92103e-08 1.39104e-07 2.03457e-07 2.46912e-07 2.08286e-07 2.22545e-07 2.0411e-07 1.25456e-07 1.04141e-07 9.65285e-08 3.77319e-08 1.96327e-08 5.72724e-09 2.25806e-09 4.84773e-10 1.52028e-10 2.91848e-11 1.0485e-11 2.77759e-12 6.65484e-13 2.56901e-13 2.0149e-13 9.1599e-14 3.07178e-14 1.1105e-14 3.15719e-15 1.14181e-15 2.89173e-16 8.08002e-17 1.9269e-17 2.89752e-18 7.95147e-19 1.3425e-19 1.50015e-20 2.02979e-21 1.20468e-22 3.61703e-24 4.08261e-26 1.6971e-28 3.76229e-31 6.4485e-34 1.02719e-36 1.57586e-39 2.43103e-42 3.81548e-45 6.09076e-48 1.00701e-50 1.8205e-53 3.7618e-56 7.537e-59 1.22998e-61 1.50792e-64 1.11986e-67 2.40515e-71 6.34107e-25 4.62336e-22 1.39038e-19 1.8138e-17 1.6385e-15 3.02885e-14 9.23501e-12 6.04701e-11 5.52386e-10 2.56292e-09 1.03305e-08 2.7388e-09 1.293e-09 9.07287e-10 5.25368e-10 2.25002e-10 8.62499e-11 1.97554e-11 6.85029e-12 1.94712e-12 5.53386e-13 2.06857e-13 1.15329e-13 7.01858e-14 2.08586e-14 6.70175e-15 2.0057e-15 5.70857e-16 1.5623e-16 3.75834e-17 1.12104e-17 2.62221e-18 7.70807e-19 1.87729e-19 3.51836e-20 5.85409e-21 6.1549e-22 9.29722e-23 3.02289e-22 1.71041e-21 8.43561e-21 3.9917e-20 1.71902e-19 6.56399e-19 2.2987e-18 7.86701e-18 2.50157e-17 7.00701e-17 1.74665e-16 4.2575e-16 1.03195e-15 2.25823e-15 4.68612e-15 9.11082e-15 1.74917e-14 3.25226e-14 5.22492e-14 8.5818e-14 1.36499e-13 2.16465e-13 3.22958e-13 4.88566e-13 7.53484e-13 1.0505e-12 1.47182e-12 1.92789e-12 2.79539e-12 4.48142e-12 8.08477e-12 1.41814e-11 2.37072e-11 3.73208e-11 5.30393e-11 8.4733e-11 1.48017e-10 3.12385e-10 6.93186e-10 1.45853e-09 3.32733e-09 7.31147e-09 1.63571e-08 2.56669e-08 3.05889e-08 3.07467e-08 2.78407e-08 2.70976e-08 2.55349e-08 2.09393e-08 1.20087e-08 8.60274e-09 4.38738e-09 2.60331e-09 1.03035e-09 4.89042e-10 1.736e-10 8.5825e-11 4.03771e-11 1.6576e-11 7.23489e-12 4.29548e-12 3.71879e-12 3.6373e-12 3.49824e-12 3.48992e-12 3.42709e-12 2.97142e-12 2.53339e-12 2.12775e-12 1.85042e-12 1.61908e-12 1.44926e-12 1.32049e-12 1.25758e-12 1.18711e-12 1.14816e-12 1.10219e-12 1.16105e-12 1.11143e-12 1.15738e-12 1.10068e-12 1.07311e-12 1.05021e-12 1.04289e-12 1.08763e-12 1.11139e-12 1.26696e-12 1.34673e-12 1.49471e-12 1.59688e-12 1.64701e-12 1.80364e-12 1.89537e-12 2.03627e-12 2.09892e-12 2.44356e-12 2.49702e-12 2.88905e-12 3.16436e-12 4.02107e-12 5.21765e-12 8.15068e-12 1.00564e-11 1.33564e-11 1.59602e-11 2.46105e-11 4.09799e-11 6.21411e-11 1.04146e-10 1.58392e-10 2.20794e-10 4.00206e-10 5.89947e-10 1.19159e-09 2.98248e-09 7.74215e-09 1.55836e-08 2.61975e-08 3.55365e-08 4.8795e-08 5.25813e-08 6.95685e-08 1.09414e-07 1.13032e-07 1.31535e-07 1.0016e-07 4.92325e-08 2.4266e-08 9.8936e-09 3.25266e-09 9.31386e-10 2.80942e-10 1.1067e-10 4.38151e-11 1.81929e-11 8.93081e-12 7.61945e-12 6.41179e-12 6.94824e-12 4.34647e-12 4.05655e-12 4.07631e-12 3.88026e-12 3.59056e-12 3.31186e-12 3.00149e-12 2.59433e-12 2.66888e-12 2.31717e-12 2.26951e-12 1.93277e-12 1.54954e-12 1.45982e-12 1.2831e-12 1.20912e-12 1.1826e-12 1.15151e-12 1.24975e-12 1.36475e-12 1.52725e-12 1.47618e-12 1.30189e-12 1.19851e-12 1.19125e-12 1.16033e-12 1.23162e-12 1.33068e-12 1.7008e-12 2.0145e-12 2.64024e-12 3.40129e-12 4.8025e-12 7.01532e-12 1.14184e-11 1.42822e-11 1.71521e-11 1.92998e-11 2.4191e-11 3.2195e-11 4.20146e-11 6.01604e-11 8.85181e-11 1.29167e-10 2.56027e-10 5.55381e-10 1.17221e-09 1.49322e-09 2.33877e-09 5.53719e-09 1.0194e-08 2.30649e-08 4.28104e-08 5.15016e-08 3.78898e-08 4.09254e-08 1.48878e-08 2.76809e-09 1.03707e-08 5.29241e-08 9.90856e-08 8.6731e-08 3.99769e-08 1.6077e-08 6.01478e-09 2.01852e-09 6.18107e-10 2.06686e-10 1.37533e-10 8.56659e-11 5.13099e-11 4.21434e-11 3.44253e-11 1.48776e-11 3.57044e-12 3.65523e-12 2.75245e-12 2.66166e-12 2.40408e-12 2.78489e-12 2.76768e-12 3.24831e-12 3.06406e-12 2.77814e-12 2.18782e-12 1.91981e-12 1.71001e-12 1.73202e-12 1.83681e-12 1.87729e-12 2.03777e-12 2.0075e-12 2.2609e-12 2.3691e-12 2.31323e-12 2.50079e-12 2.70326e-12 3.08996e-12 4.19508e-12 6.41014e-12 8.31548e-12 1.0082e-11 1.17166e-11 1.44312e-11 1.56658e-11 1.63913e-11 2.15541e-11 3.00933e-11 3.98046e-11 5.11879e-11 8.36226e-11 1.12247e-10 1.24723e-10 1.24225e-10 1.21797e-10 1.1906e-10 2.19498e-10 9.9162e-10 8.06492e-10 6.96789e-10 1.0845e-09 1.24024e-09 1.27964e-09 2.33137e-09 4.5099e-09 9.60533e-09 1.60902e-08 2.24086e-08 2.70506e-08 2.20838e-08 2.48147e-08 2.42596e-08 1.75306e-08 1.05072e-08 1.07626e-08 4.41088e-09 2.37065e-09 6.97505e-10 2.76808e-10 6.18418e-11 2.23297e-11 6.49987e-12 1.51405e-12 4.54731e-13 2.2703e-13 1.61152e-13 5.83864e-14 1.63419e-14 4.93606e-15 1.70279e-15 4.16078e-16 1.44415e-16 3.13823e-17 8.05115e-18 1.69183e-18 2.21786e-19 5.02021e-20 7.45547e-21 7.63456e-22 7.81022e-23 3.54401e-24 7.98661e-26 6.86991e-28 2.43842e-30 4.81787e-33 7.3718e-36 1.05434e-38 1.45521e-41 2.01594e-44 2.83973e-47 4.07651e-50 6.0769e-53 9.87815e-56 1.80889e-58 3.20088e-61 4.64107e-64 5.03629e-67 3.29058e-70 6.17639e-74 1.56859e-26 1.41125e-23 4.78713e-21 7.3796e-19 7.76535e-17 6.03753e-15 2.31301e-13 2.31221e-12 2.86105e-11 1.79323e-10 9.21065e-10 2.57022e-10 1.2686e-10 9.65326e-11 5.7905e-11 2.59074e-11 9.95164e-12 3.31168e-12 9.72687e-13 2.83067e-13 1.49076e-13 1.30175e-13 4.18894e-14 1.16116e-14 3.42657e-15 1.06799e-15 2.93644e-16 7.7749e-17 1.97299e-17 4.46794e-18 1.19347e-18 2.57328e-19 6.68959e-20 1.4144e-20 2.31905e-21 3.21968e-22 3.03106e-23 1.82423e-23 1.1166e-22 6.46156e-22 3.26632e-21 1.54293e-20 6.66709e-20 2.539e-19 8.87887e-19 3.12236e-18 1.01143e-17 2.84144e-17 7.21739e-17 1.77293e-16 4.36864e-16 9.68355e-16 2.0214e-15 4.0186e-15 7.78943e-15 1.4237e-14 2.32299e-14 3.87095e-14 6.27063e-14 9.97577e-14 1.50236e-13 2.30123e-13 3.60009e-13 5.12621e-13 7.1901e-13 1.01181e-12 1.43894e-12 1.91792e-12 2.58213e-12 5.16122e-12 1.14216e-11 2.29436e-11 3.6354e-11 5.47179e-11 7.85051e-11 1.16697e-10 1.70731e-10 2.54164e-10 4.58725e-10 9.16157e-10 1.783e-09 3.02048e-09 3.64314e-09 3.63895e-09 3.34592e-09 3.18375e-09 2.99712e-09 2.64328e-09 1.627e-09 1.04676e-09 6.0159e-10 3.99139e-10 1.88046e-10 1.15009e-10 6.65722e-11 2.92953e-11 1.14149e-11 4.47052e-12 3.35792e-12 3.7018e-12 3.44987e-12 3.17414e-12 2.78752e-12 2.50106e-12 2.07633e-12 1.73719e-12 1.38972e-12 1.13565e-12 9.64265e-13 8.36091e-13 7.40146e-13 6.74023e-13 6.36341e-13 5.96353e-13 5.77346e-13 5.49792e-13 5.77434e-13 5.55622e-13 5.78756e-13 5.48065e-13 5.36315e-13 5.29368e-13 5.33074e-13 5.55234e-13 5.64806e-13 6.37816e-13 6.82551e-13 7.60155e-13 8.08115e-13 8.44951e-13 9.23789e-13 9.88447e-13 1.06008e-12 1.09258e-12 1.27861e-12 1.32031e-12 1.52627e-12 1.77804e-12 1.99734e-12 2.30832e-12 2.73213e-12 3.25191e-12 4.65504e-12 6.91055e-12 1.02387e-11 1.88498e-11 3.43203e-11 5.44693e-11 7.99626e-11 1.12022e-10 1.50862e-10 2.17707e-10 3.82971e-10 6.61923e-10 1.49863e-09 2.74176e-09 4.76249e-09 7.73427e-09 1.03138e-08 1.08409e-08 1.20708e-08 1.38545e-08 1.52448e-08 1.66608e-08 1.23543e-08 6.51499e-09 3.72269e-09 1.58722e-09 5.72812e-10 1.83637e-10 9.04906e-11 3.48726e-11 1.19694e-11 5.15425e-12 3.75688e-12 3.53768e-12 3.6847e-12 3.53298e-12 3.32136e-12 3.03595e-12 2.64491e-12 2.27976e-12 2.00578e-12 1.75498e-12 1.53603e-12 1.3082e-12 1.29402e-12 1.11785e-12 1.10214e-12 9.17718e-13 7.48378e-13 7.14491e-13 6.35889e-13 5.96304e-13 5.86851e-13 5.75243e-13 6.24535e-13 6.83469e-13 7.52094e-13 7.24362e-13 6.48787e-13 6.09846e-13 6.08972e-13 5.882e-13 6.1954e-13 6.78352e-13 8.8588e-13 1.04884e-12 1.3678e-12 1.7784e-12 2.32005e-12 2.64581e-12 3.1733e-12 3.54595e-12 4.17789e-12 4.75785e-12 5.90061e-12 7.98776e-12 1.21478e-11 2.33747e-11 4.19863e-11 7.22874e-11 1.12957e-10 1.64937e-10 2.29258e-10 3.03033e-10 4.47359e-10 9.8353e-10 1.77465e-09 4.16211e-09 6.47554e-09 6.82025e-09 5.40518e-09 4.83128e-09 2.83716e-09 2.02633e-09 4.09497e-09 8.58911e-09 1.2047e-08 9.80145e-09 4.78104e-09 2.50728e-09 1.04818e-09 4.20041e-10 1.91425e-10 1.20392e-10 6.88035e-11 4.23589e-11 2.45897e-11 1.62008e-11 8.29883e-12 3.43633e-12 3.20342e-12 2.40756e-12 1.59908e-12 1.4402e-12 1.2114e-12 1.30307e-12 1.24363e-12 1.41273e-12 1.3496e-12 1.25641e-12 1.03535e-12 9.23308e-13 8.51003e-13 8.61697e-13 8.97734e-13 9.28009e-13 1.0111e-12 1.00968e-12 1.16262e-12 1.23757e-12 1.19993e-12 1.22958e-12 1.32391e-12 1.5155e-12 1.98603e-12 2.49956e-12 3.00743e-12 3.42883e-12 4.13955e-12 4.59748e-12 4.73184e-12 4.89908e-12 5.55089e-12 9.09925e-12 1.72835e-11 2.87674e-11 5.90621e-11 1.06984e-10 1.30953e-10 1.30699e-10 1.27777e-10 1.19161e-10 1.18851e-10 1.34558e-10 1.6404e-10 2.36055e-10 3.48773e-10 3.3143e-10 2.92264e-10 3.99058e-10 6.41818e-10 1.19515e-09 1.92782e-09 2.70102e-09 3.25212e-09 2.77868e-09 3.07544e-09 2.84742e-09 2.35958e-09 1.10067e-09 1.21552e-09 5.31266e-10 3.01579e-10 9.78817e-11 3.80304e-11 1.55789e-11 4.40453e-12 9.36733e-13 3.29992e-13 2.15807e-13 1.07381e-13 3.58174e-14 1.06236e-14 2.84707e-15 7.98569e-16 2.49641e-16 5.51271e-17 1.73151e-17 3.31473e-18 7.78127e-19 1.43777e-19 1.65024e-20 3.13716e-21 4.06794e-22 3.71178e-23 2.90844e-24 1.01848e-25 1.73863e-27 1.16848e-29 3.54368e-32 6.16945e-35 8.3149e-38 1.05265e-40 1.28826e-43 1.58025e-46 1.97025e-49 2.50733e-52 3.32023e-55 4.78174e-58 7.66354e-61 1.1832e-63 1.50374e-66 1.42552e-69 8.08999e-73 1.31031e-76 3.9932e-28 4.44457e-25 1.7421e-22 3.24026e-20 4.18221e-18 3.98237e-16 1.53906e-14 1.16743e-13 1.53619e-12 1.25899e-11 8.04934e-11 2.41082e-11 1.2749e-11 1.05766e-11 6.46553e-12 3.76146e-12 1.52127e-12 3.86465e-13 2.09007e-13 1.03964e-13 7.79784e-14 2.23556e-14 7.38452e-15 1.92856e-15 5.68681e-16 1.67611e-16 4.23247e-17 1.03967e-17 2.41542e-18 5.09971e-19 1.22614e-19 2.42972e-20 5.54818e-21 1.02296e-21 1.46279e-22 1.70759e-23 1.95806e-24 5.73021e-24 3.98147e-23 2.30745e-22 1.17417e-21 5.49048e-21 2.35798e-20 8.89163e-20 3.12501e-19 1.11643e-18 3.67272e-18 1.03268e-17 2.66485e-17 6.60038e-17 1.65195e-16 3.70405e-16 7.79824e-16 1.5851e-15 3.10959e-15 5.6357e-15 9.43358e-15 1.63865e-14 2.70774e-14 4.3813e-14 6.76773e-14 1.06235e-13 1.67649e-13 2.52122e-13 3.6633e-13 5.29392e-13 7.65054e-13 1.05495e-12 1.42894e-12 1.97166e-12 3.26905e-12 8.78782e-12 1.90074e-11 3.37539e-11 5.16224e-11 7.37468e-11 9.46382e-11 1.1705e-10 1.49591e-10 1.96974e-10 2.80475e-10 4.22685e-10 4.97689e-10 4.94039e-10 4.65385e-10 4.45685e-10 4.3052e-10 4.05295e-10 2.86465e-10 2.14629e-10 1.55684e-10 1.31394e-10 8.88408e-11 4.49348e-11 1.87211e-11 7.50801e-12 3.41523e-12 3.21055e-12 3.18901e-12 2.8575e-12 2.45497e-12 2.15133e-12 1.76425e-12 1.48803e-12 1.17148e-12 9.46225e-13 7.27359e-13 5.83167e-13 4.85079e-13 4.15785e-13 3.61441e-13 3.26069e-13 3.0203e-13 2.79586e-13 2.70558e-13 2.55918e-13 2.66874e-13 2.58487e-13 2.6849e-13 2.52924e-13 2.48997e-13 2.48533e-13 2.53009e-13 2.61437e-13 2.66518e-13 2.99152e-13 3.2229e-13 3.60911e-13 3.83546e-13 4.08883e-13 4.46916e-13 4.84821e-13 5.28582e-13 5.43979e-13 6.43641e-13 6.70315e-13 7.82047e-13 9.25614e-13 1.09034e-12 1.28344e-12 1.47153e-12 1.71175e-12 1.97615e-12 2.35464e-12 3.70345e-12 7.11663e-12 1.43069e-11 3.19157e-11 5.26328e-11 7.95632e-11 1.07873e-10 1.45065e-10 2.0007e-10 2.6621e-10 3.90932e-10 5.62321e-10 8.40431e-10 1.3646e-09 1.83449e-09 1.97136e-09 2.12548e-09 2.18251e-09 2.38227e-09 2.50378e-09 1.79359e-09 9.93858e-10 6.74602e-10 3.30563e-10 1.64605e-10 7.96258e-11 2.77008e-11 9.43754e-12 4.02676e-12 3.56413e-12 3.48784e-12 3.21153e-12 2.93826e-12 2.66071e-12 2.16583e-12 1.78936e-12 1.47258e-12 1.22143e-12 1.03466e-12 8.76051e-13 7.49526e-13 6.35196e-13 6.0345e-13 5.22469e-13 5.09181e-13 4.18816e-13 3.44804e-13 3.29284e-13 2.94593e-13 2.75826e-13 2.72124e-13 2.66116e-13 2.90522e-13 3.14637e-13 3.46348e-13 3.27962e-13 2.98696e-13 2.88875e-13 2.89406e-13 2.78427e-13 2.93063e-13 3.22271e-13 4.2906e-13 5.11491e-13 6.61785e-13 8.72541e-13 1.15863e-12 1.34994e-12 1.61104e-12 1.70171e-12 1.82913e-12 1.95147e-12 2.17038e-12 2.34399e-12 3.14521e-12 6.44721e-12 1.88204e-11 4.56746e-11 8.65101e-11 1.23206e-10 1.61231e-10 1.93538e-10 2.28774e-10 3.19589e-10 4.45015e-10 8.33407e-10 1.02996e-09 9.13491e-10 7.58123e-10 6.66913e-10 5.63476e-10 7.1236e-10 1.14378e-09 1.63876e-09 1.87658e-09 1.33674e-09 7.55181e-10 4.82114e-10 2.66894e-10 1.73255e-10 9.82693e-11 5.44912e-11 3.30795e-11 2.01113e-11 8.49634e-12 4.12181e-12 2.92151e-12 2.81056e-12 2.13814e-12 1.42219e-12 8.62835e-13 7.29559e-13 5.80453e-13 6.02856e-13 5.67567e-13 6.3743e-13 6.08409e-13 5.71954e-13 4.77282e-13 4.29521e-13 4.00518e-13 4.03519e-13 4.17429e-13 4.3431e-13 4.76742e-13 4.89448e-13 5.79342e-13 6.37774e-13 6.08618e-13 5.90996e-13 6.27153e-13 7.11893e-13 8.80841e-13 1.06597e-12 1.28484e-12 1.46114e-12 1.68186e-12 1.9367e-12 2.18032e-12 2.24745e-12 2.48613e-12 3.33743e-12 4.93572e-12 9.56898e-12 2.76297e-11 7.1871e-11 1.15942e-10 1.28969e-10 1.19006e-10 1.13888e-10 1.20508e-10 1.1394e-10 1.26503e-10 1.48575e-10 1.48273e-10 1.31379e-10 1.09086e-10 1.07923e-10 1.35642e-10 1.88723e-10 2.71561e-10 3.65393e-10 4.28473e-10 3.85168e-10 3.97695e-10 3.81901e-10 3.2959e-10 1.69838e-10 1.69885e-10 8.58538e-11 5.28103e-11 2.93349e-11 1.08702e-11 2.23741e-12 7.01039e-13 2.90234e-13 2.324e-13 7.71359e-14 2.43612e-14 7.5871e-15 1.96997e-15 4.83485e-16 1.26214e-16 3.51257e-17 7.15025e-18 1.97863e-18 3.39566e-19 7.24731e-20 1.18105e-20 1.19165e-21 1.93009e-22 2.17179e-23 1.72982e-24 1.05058e-25 2.86353e-27 3.7418e-29 2.00136e-31 5.164e-34 7.80566e-37 9.10621e-40 1.00203e-42 1.06755e-45 1.13886e-48 1.2345e-51 1.36761e-54 1.57898e-57 1.97793e-60 2.72916e-63 3.61759e-66 3.9606e-69 3.22404e-72 1.56222e-75 2.14531e-79 1.25046e-29 1.71087e-26 7.56916e-24 1.62061e-21 2.40787e-19 2.85711e-17 2.47625e-15 3.10672e-14 1.24665e-13 1.18856e-12 6.9945e-12 2.30533e-12 1.64329e-12 1.72327e-12 9.02377e-13 4.51866e-13 2.4445e-13 1.21678e-13 1.39416e-13 3.99198e-14 1.40649e-14 3.98675e-15 1.28651e-15 3.21396e-16 9.3552e-17 2.57729e-17 5.95758e-18 1.35437e-18 2.86679e-19 5.59495e-20 1.21733e-20 2.20828e-21 4.41824e-22 7.12291e-23 8.8669e-24 8.91289e-25 2.76178e-25 1.86294e-24 1.3333e-23 7.63162e-23 3.87467e-22 1.78186e-21 7.56548e-21 2.82005e-20 1.00369e-19 3.58916e-19 1.19993e-18 3.37816e-18 8.87171e-18 2.21299e-17 5.60983e-17 1.27331e-16 2.71522e-16 5.62161e-16 1.12263e-15 2.0458e-15 3.53793e-15 6.44054e-15 1.07881e-14 1.7868e-14 2.83178e-14 4.55183e-14 7.34054e-14 1.15996e-13 1.7557e-13 2.58259e-13 3.97656e-13 5.59653e-13 7.89279e-13 1.13809e-12 1.67282e-12 2.57277e-12 5.82154e-12 1.47918e-11 3.01346e-11 5.13607e-11 7.17927e-11 9.28748e-11 1.0706e-10 1.19864e-10 1.30677e-10 1.43174e-10 1.4777e-10 1.48424e-10 1.52347e-10 1.56397e-10 1.60607e-10 1.59827e-10 1.50988e-10 1.29086e-10 9.01148e-11 5.38633e-11 2.55202e-11 1.11103e-11 5.07236e-12 2.8031e-12 2.71686e-12 2.71494e-12 2.28308e-12 1.9308e-12 1.59657e-12 1.33726e-12 1.03396e-12 8.30762e-13 6.25648e-13 4.89361e-13 3.64014e-13 2.84633e-13 2.30363e-13 1.93073e-13 1.63593e-13 1.45087e-13 1.3096e-13 1.19046e-13 1.14847e-13 1.07735e-13 1.11058e-13 1.08355e-13 1.11721e-13 1.05197e-13 1.04e-13 1.04842e-13 1.08564e-13 1.10993e-13 1.13353e-13 1.27485e-13 1.3776e-13 1.55748e-13 1.66807e-13 1.78999e-13 1.97859e-13 2.17449e-13 2.38162e-13 2.50994e-13 3.00883e-13 3.21688e-13 3.71878e-13 4.57583e-13 5.52853e-13 6.72674e-13 7.95676e-13 9.82979e-13 1.1744e-12 1.43246e-12 1.7241e-12 2.16723e-12 3.23313e-12 8.4069e-12 1.96128e-11 4.05639e-11 7.16765e-11 1.11225e-10 1.50484e-10 1.91926e-10 2.32163e-10 2.49433e-10 2.72957e-10 3.30009e-10 3.70446e-10 3.88442e-10 4.17398e-10 4.20931e-10 4.64598e-10 4.8661e-10 3.66912e-10 2.65252e-10 2.2286e-10 1.47744e-10 6.72959e-11 2.27536e-11 7.95178e-12 3.28228e-12 2.91239e-12 3.12332e-12 2.61743e-12 2.22916e-12 1.88902e-12 1.62575e-12 1.23946e-12 9.64209e-13 7.61314e-13 6.13716e-13 5.04255e-13 4.16371e-13 3.47894e-13 2.9174e-13 2.65742e-13 2.29825e-13 2.19678e-13 1.77209e-13 1.45352e-13 1.37871e-13 1.23352e-13 1.14511e-13 1.13067e-13 1.09973e-13 1.20721e-13 1.29432e-13 1.44645e-13 1.37114e-13 1.25635e-13 1.23229e-13 1.24009e-13 1.1952e-13 1.24664e-13 1.3712e-13 1.86336e-13 2.26187e-13 2.99017e-13 3.99651e-13 5.39058e-13 6.49349e-13 7.81477e-13 8.1781e-13 8.95599e-13 9.90837e-13 1.1259e-12 1.22618e-12 1.44574e-12 1.86774e-12 3.49411e-12 1.34383e-11 4.79569e-11 9.05613e-11 1.41818e-10 1.70122e-10 1.91762e-10 2.16628e-10 2.46983e-10 2.9066e-10 2.86185e-10 2.09206e-10 1.5645e-10 1.5658e-10 1.47951e-10 2.13029e-10 3.03386e-10 3.75845e-10 3.93982e-10 2.84214e-10 2.31538e-10 1.85368e-10 1.30207e-10 7.53774e-11 3.8079e-11 2.43022e-11 1.5381e-11 6.43746e-12 3.1202e-12 2.9808e-12 2.62086e-12 2.05048e-12 1.28813e-12 7.72238e-13 4.36995e-13 3.46307e-13 2.61158e-13 2.65705e-13 2.46032e-13 2.76245e-13 2.60939e-13 2.44781e-13 2.03687e-13 1.82703e-13 1.69799e-13 1.71473e-13 1.75651e-13 1.8416e-13 2.04337e-13 2.17017e-13 2.66423e-13 3.07506e-13 2.87304e-13 2.62242e-13 2.74335e-13 3.08756e-13 3.76544e-13 4.57475e-13 5.58261e-13 6.42495e-13 7.48835e-13 9.05103e-13 1.0377e-12 1.06856e-12 1.14646e-12 1.47691e-12 2.03824e-12 2.76415e-12 6.84836e-12 2.9912e-11 5.82907e-11 8.81463e-11 7.4196e-11 7.06524e-11 1.03338e-10 1.01691e-10 1.01999e-10 9.19852e-11 8.17662e-11 6.9937e-11 6.16216e-11 5.19972e-11 5.67457e-11 6.26111e-11 6.87668e-11 7.54951e-11 8.13518e-11 7.74209e-11 8.09054e-11 8.09215e-11 7.66902e-11 6.61707e-11 5.93298e-11 3.83854e-11 1.82353e-11 5.6488e-12 1.41372e-12 4.55278e-13 2.73813e-13 1.84427e-13 6.31393e-14 1.82304e-14 5.40463e-15 1.52941e-15 3.60765e-16 7.96565e-17 1.92294e-17 4.75602e-18 8.96195e-19 2.16835e-19 3.36963e-20 6.49613e-21 9.38627e-22 8.35455e-23 1.16418e-23 1.13145e-24 7.75422e-26 3.68849e-27 7.88505e-29 7.96827e-31 3.4301e-33 7.46331e-36 9.60566e-39 9.47608e-42 8.84852e-45 8.01131e-48 7.25805e-51 6.68029e-54 6.28986e-57 6.17963e-60 6.57337e-63 7.63727e-66 8.50238e-69 7.83537e-72 5.35082e-75 2.1619e-78 2.45467e-82 4.1756e-31 7.20298e-28 3.75625e-25 9.47446e-23 1.58943e-20 1.99462e-18 1.91782e-16 9.00432e-15 4.29131e-14 1.26587e-13 6.91893e-13 2.93431e-13 2.11311e-13 2.15315e-13 1.89496e-13 1.26826e-13 8.57747e-14 6.03817e-14 2.46653e-14 7.72331e-15 2.58709e-15 7.29857e-16 2.23746e-16 5.34859e-17 1.50736e-17 3.86119e-18 8.15526e-19 1.71296e-19 3.30032e-20 5.91735e-21 1.16982e-21 1.93506e-22 3.39143e-23 4.78823e-24 5.18709e-25 5.02775e-26 6.97001e-26 5.75332e-25 4.13914e-24 2.32386e-23 1.17476e-22 5.32414e-22 2.24051e-21 8.30003e-21 3.01793e-20 1.06042e-19 3.61806e-19 1.02045e-18 2.72923e-18 6.84288e-18 1.74931e-17 4.0127e-17 8.67962e-17 1.81698e-16 3.68974e-16 6.83564e-16 1.21841e-15 2.30659e-15 3.94694e-15 6.70903e-15 1.09415e-14 1.79463e-14 3.00138e-14 4.93923e-14 7.75219e-14 1.19511e-13 1.9339e-13 2.83692e-13 4.05833e-13 6.31212e-13 9.59685e-13 1.53174e-12 2.31021e-12 3.65283e-12 9.25178e-12 2.25148e-11 4.12643e-11 6.41987e-11 7.90674e-11 9.80997e-11 1.08901e-10 1.14248e-10 1.17654e-10 1.15178e-10 1.13313e-10 1.09908e-10 1.01243e-10 8.96124e-11 7.13352e-11 4.76767e-11 2.60163e-11 1.32524e-11 6.6838e-12 3.19558e-12 2.31334e-12 2.53339e-12 2.21805e-12 1.88334e-12 1.52165e-12 1.22012e-12 9.6886e-13 7.8033e-13 5.72931e-13 4.40659e-13 3.16983e-13 2.39065e-13 1.71537e-13 1.29244e-13 1.00656e-13 8.12613e-14 6.65505e-14 5.74386e-14 5.01009e-14 4.44206e-14 4.23469e-14 3.92913e-14 3.98238e-14 3.89842e-14 3.98804e-14 3.76943e-14 3.74891e-14 3.80176e-14 4.04133e-14 4.08426e-14 4.15878e-14 4.70545e-14 5.12479e-14 5.82337e-14 6.29671e-14 6.76299e-14 7.6081e-14 8.43411e-14 9.32122e-14 1.00985e-13 1.24705e-13 1.36816e-13 1.56405e-13 1.99981e-13 2.49299e-13 3.17586e-13 3.89899e-13 5.1307e-13 6.55706e-13 8.15292e-13 1.03533e-12 1.32295e-12 1.70479e-12 2.06313e-12 3.95875e-12 1.04025e-11 2.8e-11 6.31694e-11 1.10574e-10 1.56455e-10 1.98262e-10 2.12743e-10 2.24392e-10 2.32083e-10 2.42504e-10 2.42986e-10 2.46972e-10 2.51072e-10 2.50003e-10 2.42466e-10 2.24221e-10 1.76388e-10 1.1323e-10 5.34735e-11 1.92199e-11 6.40312e-12 2.86318e-12 2.5546e-12 2.48584e-12 2.20103e-12 1.73634e-12 1.39763e-12 1.10454e-12 9.10708e-13 6.56106e-13 4.85031e-13 3.6961e-13 2.90058e-13 2.30567e-13 1.85193e-13 1.49868e-13 1.22734e-13 1.06598e-13 9.09361e-14 8.44296e-14 6.61702e-14 5.38608e-14 5.01214e-14 4.45829e-14 4.09578e-14 4.00248e-14 3.87939e-14 4.28838e-14 4.56418e-14 5.19168e-14 4.93981e-14 4.58803e-14 4.4998e-14 4.58696e-14 4.41372e-14 4.55769e-14 5.04569e-14 6.97035e-14 8.70923e-14 1.17266e-13 1.57339e-13 2.2079e-13 2.78007e-13 3.37523e-13 3.62736e-13 4.05405e-13 4.66813e-13 5.44903e-13 6.1565e-13 7.31321e-13 9.20041e-13 1.2826e-12 2.48798e-12 1.19737e-11 3.6159e-11 8.5243e-11 1.23952e-10 1.62044e-10 1.94813e-10 2.09118e-10 2.06968e-10 2.19092e-10 1.89802e-10 1.51064e-10 1.33862e-10 1.4614e-10 2.10345e-10 2.48046e-10 2.58611e-10 2.43973e-10 1.91584e-10 1.25382e-10 7.50688e-11 4.04914e-11 2.09808e-11 1.36065e-11 1.07367e-11 4.88927e-12 2.60793e-12 2.83814e-12 2.35515e-12 1.75382e-12 1.26563e-12 7.12738e-13 3.91073e-13 2.07384e-13 1.52327e-13 1.07705e-13 1.06387e-13 9.59176e-14 1.06926e-13 1.00485e-13 9.3015e-14 7.68042e-14 6.79567e-14 6.23606e-14 6.31699e-14 6.40325e-14 6.80548e-14 7.66762e-14 8.40474e-14 1.08731e-13 1.31466e-13 1.20073e-13 1.01451e-13 1.05117e-13 1.18098e-13 1.44142e-13 1.79746e-13 2.22582e-13 2.63784e-13 3.17606e-13 4.04027e-13 4.64071e-13 4.7203e-13 4.9044e-13 6.25248e-13 8.30794e-13 1.13562e-12 2.0411e-12 6.27748e-12 1.71754e-11 2.94407e-11 3.39909e-11 3.64495e-11 6.39125e-11 7.23173e-11 7.39225e-11 7.08825e-11 5.57597e-11 4.62972e-11 4.60125e-11 3.85891e-11 3.77689e-11 4.13754e-11 4.4416e-11 4.68688e-11 5.0143e-11 5.03914e-11 5.01095e-11 5.10083e-11 4.5115e-11 3.20384e-11 2.04434e-11 8.96632e-12 2.82271e-12 8.84612e-13 3.9199e-13 3.5572e-13 1.51634e-13 5.45031e-14 1.6454e-14 4.34518e-15 1.16083e-15 2.94516e-16 6.41087e-17 1.26959e-17 2.81591e-18 6.21251e-19 1.08121e-19 2.29163e-20 3.24028e-21 5.61148e-22 7.23024e-23 5.69431e-24 6.86635e-25 5.74456e-26 3.35426e-27 1.26081e-28 2.12738e-30 1.67699e-32 5.83137e-35 1.05458e-37 1.12542e-40 9.08729e-44 6.96618e-47 5.18501e-50 3.86044e-53 2.91979e-56 2.26068e-59 1.82819e-62 1.59789e-65 1.51507e-68 1.37311e-71 1.03111e-74 5.71488e-78 1.86029e-81 1.68182e-85 1.00784e-32 2.32219e-29 1.52455e-26 4.84765e-24 9.98159e-22 1.43266e-19 1.46433e-17 9.64753e-16 1.05826e-14 4.11863e-14 1.30402e-13 8.16926e-14 6.88253e-14 7.39625e-14 7.25005e-14 6.8171e-14 3.20585e-14 1.20061e-14 4.47484e-15 1.48124e-15 4.82521e-16 1.34877e-16 3.87598e-17 8.82613e-18 2.36483e-18 5.61784e-19 1.084e-19 2.10185e-20 3.68851e-21 6.05205e-22 1.08985e-22 1.6381e-23 2.51697e-24 3.11494e-25 2.94723e-26 4.24966e-27 1.95545e-26 1.65773e-25 1.18169e-24 6.49414e-24 3.26163e-23 1.46493e-22 6.14682e-22 2.27467e-21 8.48154e-21 2.89686e-20 1.01029e-19 2.84486e-19 7.71297e-19 1.94229e-18 5.00126e-18 1.15316e-17 2.52276e-17 5.32792e-17 1.09403e-16 2.0695e-16 3.78404e-16 7.4167e-16 1.29838e-15 2.27937e-15 3.80892e-15 6.42487e-15 1.11335e-14 1.91184e-14 3.11263e-14 5.01931e-14 8.60406e-14 1.30197e-13 1.92896e-13 3.22025e-13 5.04586e-13 8.53352e-13 1.39019e-12 1.72449e-12 2.28531e-12 4.42578e-12 9.47691e-12 2.00471e-11 3.11636e-11 4.41134e-11 5.33505e-11 5.67802e-11 6.04504e-11 5.92025e-11 5.55065e-11 5.07407e-11 4.09666e-11 2.89529e-11 1.881e-11 1.07535e-11 6.24704e-12 3.43961e-12 2.4535e-12 2.49328e-12 2.20065e-12 1.91267e-12 1.53148e-12 1.2296e-12 9.52192e-13 7.28534e-13 5.56046e-13 4.31913e-13 3.01392e-13 2.21455e-13 1.5102e-13 1.08779e-13 7.46393e-14 5.34042e-14 3.9476e-14 3.01997e-14 2.3597e-14 1.95511e-14 1.62781e-14 1.39124e-14 1.29729e-14 1.18419e-14 1.16402e-14 1.14238e-14 1.15791e-14 1.10616e-14 1.10414e-14 1.12615e-14 1.23911e-14 1.22906e-14 1.25326e-14 1.42335e-14 1.56965e-14 1.78444e-14 1.94932e-14 2.08318e-14 2.39684e-14 2.69238e-14 3.01126e-14 3.38187e-14 4.27658e-14 4.84656e-14 5.49532e-14 7.34396e-14 9.44906e-14 1.29623e-13 1.64715e-13 2.32839e-13 3.19546e-13 4.0919e-13 5.46888e-13 7.40011e-13 9.89732e-13 1.20654e-12 1.50065e-12 2.25875e-12 5.97403e-12 2.11054e-11 5.67102e-11 9.48861e-11 1.2992e-10 1.46877e-10 1.53627e-10 1.55155e-10 1.57641e-10 1.60841e-10 1.65521e-10 1.64891e-10 1.58184e-10 1.42676e-10 1.08405e-10 6.9052e-11 3.63202e-11 1.46002e-11 5.37618e-12 2.57911e-12 2.37685e-12 2.12793e-12 1.72894e-12 1.4315e-12 1.06196e-12 8.06388e-13 5.99485e-13 4.7432e-13 3.24502e-13 2.28902e-13 1.67921e-13 1.27617e-13 9.71798e-14 7.52794e-14 5.83017e-14 4.58621e-14 3.75472e-14 3.10823e-14 2.7561e-14 2.08575e-14 1.67102e-14 1.50524e-14 1.31745e-14 1.19763e-14 1.14745e-14 1.10152e-14 1.24028e-14 1.31248e-14 1.51872e-14 1.44503e-14 1.37153e-14 1.33788e-14 1.38133e-14 1.32921e-14 1.34733e-14 1.50499e-14 2.11399e-14 2.72739e-14 3.782e-14 5.07766e-14 7.55663e-14 9.88737e-14 1.21199e-13 1.33889e-13 1.54683e-13 1.85267e-13 2.21432e-13 2.58834e-13 3.16159e-13 4.0336e-13 5.80579e-13 9.47487e-13 2.1576e-12 7.22164e-12 2.73967e-11 5.81685e-11 9.95876e-11 1.51883e-10 1.64493e-10 1.77604e-10 1.42172e-10 1.06658e-10 7.978e-11 6.65833e-11 8.36251e-11 1.34503e-10 1.53685e-10 1.42677e-10 1.2054e-10 7.78545e-11 4.1858e-11 2.23952e-11 1.22544e-11 6.2462e-12 4.21438e-12 3.53719e-12 2.34159e-12 2.32823e-12 1.95649e-12 1.5514e-12 1.07525e-12 7.17533e-13 3.66866e-13 1.85539e-13 9.14455e-14 6.11194e-14 3.96686e-14 3.70726e-14 3.20406e-14 3.49844e-14 3.29855e-14 2.99871e-14 2.4329e-14 2.10078e-14 1.88344e-14 1.91388e-14 1.89847e-14 2.06661e-14 2.38e-14 2.6831e-14 3.73184e-14 4.69554e-14 4.18679e-14 3.23506e-14 3.31544e-14 3.70924e-14 4.58028e-14 5.87039e-14 7.39208e-14 9.06367e-14 1.13322e-13 1.51165e-13 1.7348e-13 1.75015e-13 1.7884e-13 2.25991e-13 3.00827e-13 4.23249e-13 7.54757e-13 1.71842e-12 3.23678e-12 6.18928e-12 8.92907e-12 1.28101e-11 3.16011e-11 4.37788e-11 5.11472e-11 5.05637e-11 3.80709e-11 3.02118e-11 3.08538e-11 2.83006e-11 2.35344e-11 2.07376e-11 2.10102e-11 2.11297e-11 2.29336e-11 2.31572e-11 2.1107e-11 1.85102e-11 1.21782e-11 5.87084e-12 3.32807e-12 1.37344e-12 5.88059e-13 3.99869e-13 2.93659e-13 1.15581e-13 4.57271e-14 1.5214e-14 4.09653e-15 1.00917e-15 2.39722e-16 5.44285e-17 1.09807e-17 1.95634e-18 3.97001e-19 7.84791e-20 1.25629e-20 2.34617e-21 3.0229e-22 4.68279e-23 5.40862e-24 3.77837e-25 3.95478e-26 2.84136e-27 1.40411e-28 4.20115e-30 5.62126e-32 3.47527e-34 9.71843e-37 1.42847e-39 1.21646e-42 7.65835e-46 4.59031e-49 2.67551e-52 1.55986e-55 9.23807e-59 5.60188e-62 3.55102e-65 2.42973e-68 1.79372e-71 1.26244e-74 7.35667e-78 3.14646e-81 7.81738e-85 5.25561e-89 1.59638e-34 5.26994e-31 4.70563e-28 2.03231e-25 5.5841e-23 1.01516e-20 1.1796e-18 1.01557e-16 1.16142e-15 9.25567e-15 8.19579e-14 3.51705e-14 2.48422e-14 2.81898e-14 2.14897e-14 1.25189e-14 6.03838e-15 2.38686e-15 8.36053e-16 2.8394e-16 9.04913e-17 2.47814e-17 6.64493e-18 1.43414e-18 3.60382e-19 7.92704e-20 1.39845e-20 2.50264e-21 4.00463e-22 6.00008e-23 9.85516e-24 1.34185e-24 1.80985e-25 1.96447e-26 1.65798e-27 7.03867e-28 5.2307e-27 4.35752e-26 3.02825e-25 1.61758e-24 7.96326e-24 3.52088e-23 1.46333e-22 5.36426e-22 2.032e-21 6.77437e-21 2.40551e-20 6.74316e-20 1.84248e-19 4.67399e-19 1.22009e-18 2.82225e-18 6.25098e-18 1.3365e-17 2.77922e-17 5.37569e-17 9.99527e-17 2.01836e-16 3.61925e-16 6.54905e-16 1.12284e-15 1.9561e-15 3.52522e-15 6.26914e-15 1.06473e-14 1.79599e-14 3.26142e-14 5.13877e-14 7.97219e-14 1.43312e-13 2.35468e-13 4.20844e-13 7.33538e-13 9.00186e-13 1.24295e-12 1.81523e-12 2.36053e-12 4.29336e-12 6.91151e-12 1.00979e-11 1.314e-11 1.41556e-11 1.59153e-11 1.60339e-11 1.40102e-11 1.24478e-11 9.28698e-12 5.88091e-12 4.42292e-12 3.00838e-12 2.47048e-12 2.54608e-12 2.34153e-12 2.05678e-12 1.60869e-12 1.30201e-12 9.93734e-13 7.6011e-13 5.64272e-13 4.1325e-13 3.0319e-13 2.26796e-13 1.49766e-13 1.04444e-13 6.68146e-14 4.54109e-14 2.94356e-14 1.96886e-14 1.3586e-14 9.67259e-15 7.0742e-15 5.52523e-15 4.30927e-15 3.4759e-15 3.11471e-15 2.76637e-15 2.5813e-15 2.53796e-15 2.51879e-15 2.47409e-15 2.45825e-15 2.53922e-15 2.90389e-15 2.81219e-15 2.87168e-15 3.26211e-15 3.63561e-15 4.12765e-15 4.61862e-15 4.87819e-15 5.73377e-15 6.48756e-15 7.38831e-15 8.64294e-15 1.11902e-14 1.32328e-14 1.49479e-14 2.10603e-14 2.81229e-14 4.21127e-14 5.46241e-14 8.44178e-14 1.23854e-13 1.64944e-13 2.33184e-13 3.39236e-13 4.90625e-13 6.13308e-13 7.90879e-13 1.01055e-12 1.43946e-12 4.00264e-12 1.54839e-11 3.85767e-11 6.61226e-11 8.20321e-11 8.60508e-11 8.71385e-11 8.91316e-11 9.36453e-11 9.8244e-11 9.44414e-11 8.35663e-11 6.48976e-11 3.95602e-11 2.04742e-11 9.92246e-12 4.05483e-12 2.28999e-12 2.29927e-12 1.91943e-12 1.47373e-12 1.11443e-12 8.66729e-13 6.05166e-13 4.33895e-13 3.0511e-13 2.31038e-13 1.50349e-13 1.00943e-13 7.06681e-14 5.15145e-14 3.70754e-14 2.73603e-14 1.99866e-14 1.48178e-14 1.12548e-14 8.82693e-15 7.32199e-15 5.26989e-15 4.09533e-15 3.48165e-15 2.96494e-15 2.63691e-15 2.47596e-15 2.3193e-15 2.68863e-15 2.83167e-15 3.32718e-15 3.18043e-15 3.09181e-15 3.01088e-15 3.14362e-15 3.0341e-15 2.98826e-15 3.33881e-15 4.78792e-15 6.33118e-15 9.01733e-15 1.24071e-14 1.98129e-14 2.65881e-14 3.30744e-14 3.76606e-14 4.59752e-14 5.78725e-14 7.07781e-14 8.55527e-14 1.11502e-13 1.39488e-13 2.15146e-13 3.79676e-13 7.40269e-13 1.23018e-12 4.31648e-12 1.22996e-11 3.02561e-11 6.47509e-11 8.93827e-11 1.08929e-10 7.48616e-11 4.10594e-11 2.48347e-11 1.81681e-11 2.83071e-11 5.94019e-11 7.46017e-11 6.98246e-11 4.97019e-11 2.46728e-11 1.10357e-11 6.61059e-12 4.06914e-12 2.89038e-12 2.49315e-12 2.187e-12 2.02405e-12 1.59224e-12 1.24748e-12 9.38932e-13 6.10288e-13 3.78168e-13 1.76795e-13 8.23132e-14 3.70792e-14 2.20269e-14 1.27319e-14 1.07899e-14 8.74921e-15 9.23866e-15 8.7579e-15 7.79234e-15 6.11913e-15 5.05803e-15 4.35827e-15 4.38608e-15 4.23705e-15 4.73521e-15 5.65522e-15 6.51092e-15 9.98213e-15 1.30045e-14 1.12793e-14 7.88604e-15 7.86373e-15 8.77419e-15 1.11094e-14 1.41683e-14 1.86016e-14 2.32406e-14 3.03978e-14 4.29551e-14 4.99841e-14 4.8542e-14 5.07535e-14 6.35904e-14 8.47076e-14 1.26141e-13 2.33791e-13 5.21708e-13 9.83281e-13 1.51079e-12 1.86195e-12 2.49592e-12 6.7668e-12 1.64311e-11 2.21219e-11 2.2461e-11 1.75873e-11 1.34878e-11 1.17249e-11 1.15327e-11 9.64208e-12 7.13706e-12 6.62336e-12 6.19919e-12 6.26605e-12 5.76043e-12 4.55393e-12 3.30609e-12 1.92413e-12 9.83295e-13 6.65379e-13 3.94991e-13 4.8696e-13 2.65447e-13 1.08631e-13 3.76944e-14 1.34151e-14 4.04006e-15 9.76037e-16 2.25026e-16 4.75484e-17 9.69637e-18 1.81206e-18 2.91811e-19 5.4068e-20 9.61161e-21 1.40949e-21 2.33532e-22 2.74065e-23 3.7861e-24 3.9369e-25 2.44437e-26 2.22377e-27 1.36952e-28 5.70088e-30 1.36539e-31 1.45224e-33 7.04722e-36 1.56417e-38 1.8065e-41 1.1578e-44 5.25248e-48 2.26979e-51 9.52879e-55 3.99491e-58 1.69985e-61 7.42495e-65 3.40312e-68 1.68327e-71 8.94585e-75 4.51843e-78 1.88307e-81 5.70562e-85 9.86089e-89 4.39719e-93 1.21666e-36 6.81783e-33 9.54998e-30 6.37515e-27 2.6473e-24 6.89479e-22 9.91653e-20 1.11382e-17 1.35084e-16 1.15161e-15 1.05298e-14 5.61032e-15 4.46797e-15 5.31895e-15 3.8532e-15 2.34328e-15 1.15887e-15 4.75222e-16 1.60297e-16 5.44206e-17 1.69246e-17 4.48375e-18 1.12156e-18 2.28509e-19 5.33698e-20 1.08575e-20 1.75333e-21 2.8963e-22 4.23007e-23 5.7811e-24 8.66323e-25 1.0657e-25 1.26339e-26 1.20363e-27 9.9424e-29 1.57038e-28 1.25223e-27 9.96493e-27 6.58883e-26 3.34611e-25 1.56462e-24 6.60276e-24 2.63268e-23 9.28754e-23 3.4783e-22 1.13581e-21 4.10233e-21 1.15245e-20 3.18283e-20 8.15855e-20 2.1758e-19 5.06577e-19 1.13806e-18 2.47737e-18 5.22935e-18 1.03244e-17 1.94224e-17 4.03084e-17 7.39948e-17 1.37743e-16 2.43009e-16 4.37969e-16 8.21581e-16 1.5146e-15 2.68687e-15 4.77082e-15 9.13048e-15 1.51896e-14 2.50665e-14 4.85633e-14 8.51208e-14 1.61509e-13 3.00458e-13 3.6179e-13 5.42638e-13 8.59344e-13 1.24202e-12 1.77545e-12 2.27535e-12 2.57426e-12 2.73782e-12 2.96201e-12 3.04086e-12 2.80853e-12 2.87103e-12 2.79576e-12 2.67592e-12 2.57603e-12 2.44413e-12 2.89397e-12 2.35788e-12 2.16456e-12 1.71815e-12 1.43795e-12 1.09807e-12 8.37882e-13 6.11081e-13 4.46948e-13 3.18106e-13 2.22956e-13 1.5686e-13 1.124e-13 6.97174e-14 4.5731e-14 2.7124e-14 1.71683e-14 1.03594e-14 6.36938e-15 4.024e-15 2.61025e-15 1.73869e-15 1.24803e-15 8.84067e-16 6.4657e-16 5.39217e-16 4.53397e-16 3.89457e-16 3.7586e-16 3.60027e-16 3.69549e-16 3.63476e-16 3.85233e-16 4.59009e-16 4.30211e-16 4.40001e-16 4.95581e-16 5.59834e-16 6.33637e-16 7.32102e-16 7.6073e-16 9.16982e-16 1.03333e-15 1.21551e-15 1.47948e-15 1.95341e-15 2.42452e-15 2.73169e-15 4.09945e-15 5.69686e-15 9.49676e-15 1.2367e-14 2.14705e-14 3.34689e-14 4.65863e-14 6.93998e-14 1.0923e-13 1.747e-13 2.24527e-13 2.9195e-13 3.74539e-13 5.26946e-13 9.00851e-13 2.13781e-12 6.87341e-12 1.87625e-11 2.92169e-11 3.25006e-11 3.05417e-11 2.99946e-11 3.25639e-11 3.55414e-11 3.2821e-11 2.81101e-11 1.88075e-11 9.12943e-12 4.85365e-12 2.99982e-12 2.23376e-12 2.18136e-12 1.77237e-12 1.32876e-12 9.53184e-13 6.72753e-13 4.92519e-13 3.24057e-13 2.19471e-13 1.46207e-13 1.05355e-13 6.50773e-14 4.1286e-14 2.72558e-14 1.88292e-14 1.26165e-14 8.74129e-15 5.92034e-15 4.04595e-15 2.78883e-15 2.0057e-15 1.51144e-15 1.00346e-15 7.35594e-16 5.61572e-16 4.51343e-16 3.82929e-16 3.53099e-16 3.1386e-16 3.85614e-16 3.98886e-16 4.70578e-16 4.62374e-16 4.61508e-16 4.4688e-16 4.78276e-16 4.62576e-16 4.36073e-16 4.78341e-16 7.05335e-16 9.49441e-16 1.3578e-15 1.96554e-15 3.35004e-15 4.66284e-15 5.95093e-15 7.10503e-15 9.02894e-15 1.22157e-14 1.53822e-14 1.93143e-14 2.63103e-14 3.36713e-14 5.53423e-14 1.00922e-13 1.93448e-13 3.9816e-13 7.28387e-13 1.48116e-12 4.34062e-12 1.35242e-11 2.67027e-11 4.17477e-11 2.67678e-11 9.80205e-12 4.76393e-12 3.92854e-12 4.37543e-12 1.451e-11 2.19712e-11 2.08612e-11 1.13999e-11 4.33626e-12 2.93427e-12 2.78526e-12 2.65097e-12 2.62365e-12 2.31851e-12 1.83494e-12 1.37501e-12 1.01293e-12 7.40366e-13 5.28685e-13 3.23805e-13 1.86788e-13 7.99813e-14 3.40194e-14 1.37079e-14 7.04709e-15 3.4875e-15 2.53861e-15 1.86504e-15 1.86828e-15 1.78052e-15 1.53659e-15 1.14118e-15 8.72687e-16 6.89836e-16 6.67522e-16 6.28006e-16 7.17737e-16 9.00445e-16 1.05824e-15 1.82751e-15 2.47311e-15 2.06893e-15 1.28472e-15 1.22408e-15 1.3546e-15 1.73993e-15 2.14696e-15 2.98747e-15 3.76055e-15 5.35398e-15 7.85751e-15 9.2324e-15 8.69756e-15 9.33747e-15 1.17905e-14 1.59768e-14 2.44438e-14 4.77998e-14 1.11832e-13 2.24195e-13 3.64968e-13 4.83581e-13 6.78409e-13 1.11121e-12 2.17703e-12 3.41386e-12 3.49256e-12 2.97973e-12 2.50427e-12 2.22517e-12 2.30525e-12 1.99306e-12 1.94769e-12 1.06845e-12 7.86154e-13 8.3671e-13 8.23966e-13 5.96142e-13 5.63559e-13 4.85556e-13 8.77708e-13 5.6193e-13 2.97726e-13 2.03632e-13 1.04098e-13 3.85578e-14 1.19352e-14 3.79414e-15 1.02507e-15 2.23332e-16 4.80268e-17 9.07817e-18 1.67141e-18 2.88706e-19 4.22141e-20 7.13701e-21 1.14383e-21 1.53152e-22 2.26608e-23 2.41873e-24 2.97378e-25 2.79299e-26 1.54346e-27 1.22107e-28 6.4366e-30 2.24911e-31 4.32768e-33 3.6541e-35 1.38086e-37 2.36262e-40 2.01982e-43 8.71584e-47 2.41277e-50 6.4184e-54 1.67016e-57 4.35791e-61 1.15679e-64 3.14426e-68 8.90535e-72 2.71335e-75 8.84545e-79 2.7205e-82 6.81415e-86 1.21075e-89 1.16786e-93 2.50324e-98 4.4478e-40 1.08427e-35 4.80567e-32 8.79895e-29 8.6151e-26 4.31772e-23 8.42104e-21 1.29608e-18 1.74935e-17 1.48319e-16 1.36063e-15 9.39104e-16 8.46079e-16 1.01067e-15 7.23022e-16 4.50533e-16 2.27605e-16 9.47133e-17 3.12316e-17 1.0389e-17 3.13415e-18 7.94498e-19 1.85683e-19 3.56092e-20 7.68936e-21 1.44546e-21 2.13929e-22 3.26304e-23 4.35277e-24 5.42406e-25 7.41318e-26 8.2205e-27 8.57653e-28 7.18755e-29 7.69195e-30 3.35516e-29 2.54244e-28 1.86752e-27 1.13009e-26 5.21417e-26 2.1875e-25 8.23844e-25 2.92665e-24 9.23674e-24 3.21104e-23 1.00659e-22 3.68747e-22 1.03948e-21 2.89529e-21 7.48354e-21 2.02616e-20 4.75014e-20 1.08068e-19 2.38047e-19 5.10265e-19 1.02547e-18 1.95687e-18 4.17523e-18 7.84445e-18 1.50121e-17 2.72545e-17 5.07779e-17 9.92261e-17 1.903e-16 3.53825e-16 6.63317e-16 1.34285e-15 2.37351e-15 4.17198e-15 8.69103e-15 1.63245e-14 3.34607e-14 6.81666e-14 9.50851e-14 1.64478e-13 2.99258e-13 4.96487e-13 8.13958e-13 1.18917e-12 1.66665e-12 2.05681e-12 2.48033e-12 2.72152e-12 2.68348e-12 2.74835e-12 2.67528e-12 2.55773e-12 2.46051e-12 2.29289e-12 2.10755e-12 1.77481e-12 1.54355e-12 1.20001e-12 9.53768e-13 7.04964e-13 5.11998e-13 3.57723e-13 2.50364e-13 1.70605e-13 1.14115e-13 7.66264e-14 5.22014e-14 3.01361e-14 1.84174e-14 1.00104e-14 5.82517e-15 3.22048e-15 1.78872e-15 1.01277e-15 5.83925e-16 3.42382e-16 2.1717e-16 1.32892e-16 8.21097e-17 5.9654e-17 4.37891e-17 3.19069e-17 2.7966e-17 2.48976e-17 2.74284e-17 2.63821e-17 2.93867e-17 3.63287e-17 3.2542e-17 3.33804e-17 3.6382e-17 4.28285e-17 4.75742e-17 5.70813e-17 5.84262e-17 7.30339e-17 8.06158e-17 9.82239e-17 1.27349e-16 1.71361e-16 2.19691e-16 2.48411e-16 3.99843e-16 5.74793e-16 1.10093e-15 1.44e-15 2.84365e-15 4.7301e-15 6.79292e-15 1.08188e-14 1.86664e-14 3.29334e-14 4.43301e-14 5.76134e-14 7.3653e-14 9.34419e-14 1.53645e-13 2.64057e-13 4.32406e-13 8.27466e-13 2.15313e-12 3.51954e-12 6.03132e-12 7.65737e-12 8.10547e-12 8.08177e-12 7.03102e-12 5.52738e-12 4.07399e-12 3.1409e-12 2.53759e-12 2.21454e-12 2.11666e-12 1.59654e-12 1.22363e-12 8.63355e-13 5.79698e-13 3.82831e-13 2.64036e-13 1.63715e-13 1.04649e-13 6.59248e-14 4.48904e-14 2.61772e-14 1.55468e-14 9.55768e-15 6.17688e-15 3.79532e-15 2.43011e-15 1.49781e-15 9.20011e-16 5.59869e-16 3.53857e-16 2.31614e-16 1.34048e-16 8.66004e-17 5.33858e-17 3.77782e-17 2.73295e-17 2.458e-17 1.9926e-17 2.63282e-17 2.65702e-17 3.16388e-17 3.27775e-17 3.31904e-17 3.1971e-17 3.60396e-17 3.5032e-17 3.01308e-17 3.30413e-17 4.97119e-17 6.62595e-17 9.13398e-17 1.37428e-16 2.49269e-16 3.64629e-16 4.91177e-16 6.49262e-16 8.7432e-16 1.23397e-15 1.64974e-15 2.23482e-15 2.97729e-15 4.0305e-15 6.49673e-15 1.06589e-14 2.18324e-14 4.64136e-14 8.67811e-14 1.49634e-13 2.61517e-13 4.21026e-13 1.13462e-12 3.23812e-12 2.72014e-12 3.86876e-12 4.05267e-12 3.5311e-12 3.72352e-12 3.86885e-12 4.31725e-12 4.31593e-12 3.33285e-12 2.90105e-12 2.71809e-12 2.57431e-12 2.48623e-12 2.10724e-12 1.70528e-12 1.26304e-12 8.71166e-13 6.02455e-13 4.11533e-13 2.79055e-13 1.61436e-13 8.67157e-14 3.38615e-14 1.30086e-14 4.58122e-15 1.98484e-15 8.0373e-16 4.7388e-16 2.98202e-16 2.75828e-16 2.61473e-16 2.1752e-16 1.44819e-16 9.53997e-17 6.19533e-17 5.16027e-17 4.53691e-17 5.21121e-17 7.18321e-17 8.56279e-17 1.70554e-16 2.40709e-16 1.93707e-16 1.05553e-16 9.03144e-17 9.99687e-17 1.23994e-16 1.40267e-16 2.23657e-16 2.75903e-16 4.40186e-16 6.63755e-16 7.74498e-16 7.34057e-16 7.43024e-16 9.05563e-16 1.27662e-15 1.96319e-15 3.17277e-15 8.00172e-15 1.78045e-14 2.73732e-14 4.56918e-14 6.76074e-14 9.41668e-14 1.72209e-13 2.35287e-13 2.49749e-13 2.53615e-13 2.44156e-13 2.59987e-13 3.33994e-13 4.33758e-13 5.10539e-13 5.54951e-13 5.65056e-13 5.78735e-13 5.51884e-13 4.87446e-13 4.57848e-13 3.84143e-13 4.52109e-13 2.73708e-13 1.42918e-13 8.24354e-14 3.78026e-14 1.287e-14 3.61467e-15 1.02855e-15 2.49584e-16 4.92642e-17 9.83334e-18 1.67412e-18 2.79659e-19 4.45451e-20 5.93599e-21 9.15947e-22 1.32558e-22 1.61677e-23 2.14852e-24 2.08198e-25 2.2754e-26 1.93482e-27 9.52802e-29 6.55445e-30 2.9541e-31 8.64301e-33 1.33952e-34 8.95424e-37 2.60411e-39 3.30866e-42 1.92778e-45 4.65579e-49 5.56372e-53 6.20871e-57 6.59289e-61 6.81763e-65 6.95893e-69 7.08979e-73 7.33971e-77 7.95594e-81 8.91089e-85 8.91358e-89 6.67819e-93 3.09809e-97 5.72994e-102 1.8741e-115 ) ; boundaryField { inlet { type zeroGradient; } bottom { type zeroGradient; } outlet { type zeroGradient; } atmosphere { type inletOutlet; inletValue uniform 0; value nonuniform List<scalar> 357 ( 0 0 0 0 0 0 8.42104e-21 1.29608e-18 1.74935e-17 1.48319e-16 1.36063e-15 9.39104e-16 8.46079e-16 1.01067e-15 7.23022e-16 4.50533e-16 2.27605e-16 9.47133e-17 3.12316e-17 1.0389e-17 3.13415e-18 7.94498e-19 1.85683e-19 3.56092e-20 7.68936e-21 1.44546e-21 2.13929e-22 3.26304e-23 4.35277e-24 5.42406e-25 7.41318e-26 8.2205e-27 8.57653e-28 7.18755e-29 7.69195e-30 3.35516e-29 2.54244e-28 1.86752e-27 1.13009e-26 5.21417e-26 2.1875e-25 8.23844e-25 2.92665e-24 9.23674e-24 3.21104e-23 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2.68348e-12 2.74835e-12 2.67528e-12 2.55773e-12 2.46051e-12 2.29289e-12 2.10755e-12 1.77481e-12 1.54355e-12 1.20001e-12 9.53768e-13 7.04964e-13 5.11998e-13 3.57723e-13 2.50364e-13 1.70605e-13 1.14115e-13 7.66264e-14 5.22014e-14 3.01361e-14 1.84174e-14 1.00104e-14 5.82517e-15 3.22048e-15 1.78872e-15 1.01277e-15 5.83925e-16 3.42382e-16 2.1717e-16 1.32892e-16 8.21097e-17 5.9654e-17 4.37891e-17 3.19069e-17 2.7966e-17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8.10547e-12 8.08177e-12 7.03102e-12 5.52738e-12 4.07399e-12 3.1409e-12 2.53759e-12 2.21454e-12 2.11666e-12 1.59654e-12 1.22363e-12 8.63355e-13 5.79698e-13 3.82831e-13 2.64036e-13 1.63715e-13 1.04649e-13 6.59248e-14 4.48904e-14 2.61772e-14 1.55468e-14 9.55768e-15 6.17688e-15 3.79532e-15 2.43011e-15 1.49781e-15 9.20011e-16 5.59869e-16 3.53857e-16 2.31614e-16 1.34048e-16 8.66004e-17 5.33858e-17 3.77782e-17 2.73295e-17 2.458e-17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3.86885e-12 4.31725e-12 4.31593e-12 3.33285e-12 2.90105e-12 2.71809e-12 2.57431e-12 2.48623e-12 2.10724e-12 1.70528e-12 1.26304e-12 8.71166e-13 6.02455e-13 4.11533e-13 2.79055e-13 1.61436e-13 8.67157e-14 3.38615e-14 1.30086e-14 4.58122e-15 1.98484e-15 8.0373e-16 4.7388e-16 2.98202e-16 2.75828e-16 2.61473e-16 2.1752e-16 1.44819e-16 9.53997e-17 6.19533e-17 5.16027e-17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5.51884e-13 4.87446e-13 4.57848e-13 3.84143e-13 4.52109e-13 2.73708e-13 1.42918e-13 8.24354e-14 3.78026e-14 1.287e-14 3.61467e-15 1.02855e-15 2.49584e-16 4.92642e-17 9.83334e-18 1.67412e-18 2.79659e-19 4.45451e-20 5.93599e-21 9.15947e-22 1.32558e-22 1.61677e-23 2.14852e-24 2.08198e-25 2.2754e-26 1.93482e-27 9.52802e-29 6.55445e-30 2.9541e-31 8.64301e-33 1.33952e-34 8.95424e-37 2.60411e-39 3.30866e-42 1.92778e-45 4.65579e-49 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ) ; } frontBack { type empty; } } // ************************************************************************* //
f2cbf5f1dc3db3626e7284e13bdc4cef9188c1e3
3f105c95c2a34f914140a3a15377ed0e808eb75a
/example/addon.cc
51edf441040a021ab0e3a5c2b17718863358611d
[ "Apache-2.0" ]
permissive
dgkimfirm/node-async-event-emitter
99a8b15f6e52a2f42e048a7c097f44354a542cfc
7e2db7d4e68bec98e9e66b1d2e39f216305f8e6f
refs/heads/master
2020-06-18T09:15:12.974126
2017-04-18T12:24:25
2017-04-18T12:24:25
null
0
0
null
null
null
null
UTF-8
C++
false
false
228
cc
addon.cc
#include "Event.h" #include <async/EventEmitterObjectWrap.h> using namespace v8; void InitAll(Local<Object> exports) { async::EventEmitterObjectWrap::Init(exports); Event::Init(exports); } NODE_MODULE(addon, InitAll)
a89601becb65935bc2417590c444eafba367a4a7
6685a35f0d01a63ae8abba7c52a0a6eaa4bcf35d
/src/cplug_str.cpp
0eec3bdca9cd0d3e8293f0e5c73549d4a08d749b
[]
no_license
lchen-c/cplug
31ffc9b2a39988c21299cdb5578a7a90c30213d0
7d14a0b38651ad89f481f7e8970b52f59b5ba966
refs/heads/main
2023-02-23T10:55:12.074740
2021-01-29T01:25:24
2021-01-29T01:25:24
333,705,818
1
0
null
null
null
null
UTF-8
C++
false
false
1,307
cpp
cplug_str.cpp
#include "cplug_str.h" #include <boost/lexical_cast.hpp> using namespace std; using namespace boost; #ifdef _WIN32 #include <Windows.h> #endif #if defined (_WIN32) || defined(_WIN64) wstring Cplug_Str_StrToWstr(const std::string& str) { int num = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, NULL, 0); wchar_t* wide = new wchar_t[num]; auto_ptr<wchar_t> ptr(wide); MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, wide, num); std::wstring w_str(wide); return w_str; } #else wstring Cplug_Str_StrToWstr(const std::string& str) { const int MAX_PATH = 1024; wchar_t wstrBuf[MAX_PATH]; setlocale(LC_CTYPE, "en_US.UTF-8"); mbstowcs(wstrBuf, str.c_str(), MAX_PATH - 1); wstrBuf[MAX_PATH - 1] = 0; return std::wstring(wstrBuf); } #endif string Cplug_Str_ToUpper(string& src) { transform(src.begin(), src.end(), src.begin(), ::toupper); return src; } string Cplug_Str_ToLower(string& str) { transform(str.begin(), str.end(), str.begin(), ::tolower); return str; } int Cplug_Str_ToInt(const string& str) { return lexical_cast<int>(str); } double Cplug_Str_ToDouble(const string& str) { return lexical_cast<double>(str); } string Cplug_Str_FromInt(int nNum) { return lexical_cast<string>(nNum); } string Cplug_Str_FromDouble(double dNum) { return lexical_cast<string>(dNum); }
e746a6315541b0dfb5d17ee62473829cb0020700
8a9e53a77ae7ac846a5a067cb2e987e63bbd532c
/macro_keyboard/macro_keyboard.ino
1b7298bb65c9dae54979501af48583350906a74a
[]
no_license
umbe073/Arduino-Sketches
5e83938d555762467735f7befbb301344a4523e6
7fc263add976705b16e384213d02348c67bf2b95
refs/heads/master
2021-01-18T00:50:14.879946
2014-11-03T22:00:00
2014-11-03T22:00:00
39,171,199
1
0
null
2015-07-16T02:04:11
2015-07-16T02:04:10
null
UTF-8
C++
false
false
3,383
ino
macro_keyboard.ino
/* Custom Macro Keyboard Requires Arduino Leonardo or compatible Written by Gareth Halfacree, http://freelance.halfacree.co.uk Based on work by Tom Igoe, http://arduino.cc/en/Tutorial/KeyboardButton Parts list: 4x momentary push-buttons: http://www.oomlout.co.uk/pushbuttons-x5-p-196.html Jumper wires: http://www.oomlout.co.uk/breadboard-jumper-wires-70-pieces-p-181.html Breadboard (optional): http://www.oomlout.co.uk/breadboard-400-point-p-180.html Written for PC Pro Magazine, January 2013 */ // Definitions const int button1Pin = 2; // Change pin numbers here, if required const int button2Pin = 3; const int button3Pin = 4; const int button4Pin = 5; // Initial button states int previousButton1State = HIGH; int previousButton2State = HIGH; int previousButton3State = HIGH; int previousButton4State = HIGH; // Set up the sketch - this only runs once per power-on void setup() { pinMode(button1Pin, INPUT_PULLUP); // All button pins are inputs pinMode(button2Pin, INPUT_PULLUP); // 'PULLUP' tells the Arduino to use its internal pull-up resistors pinMode(button3Pin, INPUT_PULLUP); // This means there's no need to wire in external resistors pinMode(button4Pin, INPUT_PULLUP); Keyboard.begin(); // Sets the Arduino up in keyboard (USB HID) emulation mode } // Program loop - this runs continuously so long as the Arduino is kept powered on void loop() { int button1State = digitalRead(button1Pin); // Check the status of the first button if ((button1State != previousButton1State) && (button1State == LOW)) { // This code runs once each time the button is pressed // In this example, the keys Left-GUI ('Windows key' or 'Super') and D are held for 250 milliseconds, // displaying the desktop on a Windows machine Keyboard.press(KEY_LEFT_GUI); Keyboard.press('d'); delay(250); Keyboard.releaseAll(); } previousButton1State = button1State; int button2State = digitalRead(button2Pin); // Check the status of the second button if ((button2State != previousButton2State) && (button2State == LOW)) { // This code runs once each time the button is pressed // In this example, a two-line message is typed out Keyboard.println("Visit the PC Pro website:"); Keyboard.println("http://www.pcpro.co.uk"); } previousButton2State = button2State; int button3State = digitalRead(button3Pin); // Check the status of the third button if ((button3State != previousButton3State) && (button3State == LOW)) { // This code runs once each time the button is pressed // In this example, a complex password is typed without the enter key being pressed Keyboard.print("5F5B9*0Pl#nsgBLYKn8O9XwB&*xo$0g6"); } previousButton3State = button3State; int button4State = digitalRead(button4Pin); // Check the status of the fourth button if ((button4State != previousButton4State) && (button4State == LOW)) { // This code runs once each time the button is pressed // In this example, the player's coordinates in the game World of Warcraft are displayed // Based on the 'Useful Macro' page at: http://www.wowwiki.com/Useful_macros Keyboard.println("/run px,py=GetPlayerMapPosition(\"player\"); DEFAULT_CHAT_FRAME:AddMessage(format(\"You are at location: %s (%0.1f, %0.1f)\",GetZoneText(),px*100,py*100));"); } previousButton4State = button4State; }
78731de3018d240f567802382b9d45e207f0def1
ed5f0333845f73bb3865bdf5cd63a1b77b50c9f3
/fuzzer/src/flags.cpp
a901d68cfc60c193ed5842fe5c75cfabc8c0237b
[ "MIT" ]
permissive
ucsb-seclab/regulator-dynamic
c2b260cd14ebb30ecb93d3e7a4e6b5bcd0d16538
9b40c0dcb89f102dd0814728fb7da938b62bab68
refs/heads/master
2023-09-03T07:41:47.446073
2021-11-17T19:55:13
2021-11-17T19:55:13
369,074,668
4
0
null
null
null
null
UTF-8
C++
false
false
117
cpp
flags.cpp
#include "flags.hpp" namespace regulator { namespace flags { uint64_t FLAG_timeout = 0; bool FLAG_debug = false; } }
fa273eba00f88d018c46b60b65bb5368c0c22d21
7c857119fe1505b1d80d6e62969661c06dc1a2f4
/rEFIt_UEFI/libeg/image.cpp
d5972272e4b909101839f6d99ce2c50b561c92ef
[ "BSD-2-Clause" ]
permissive
CloverHackyColor/CloverBootloader
7042ca7dd6b513d22be591a295e49071ae1482ee
2711170df4f60b2ae5aa20add3e00f35cf57b7e5
refs/heads/master
2023-08-30T22:14:34.590134
2023-08-27T19:14:02
2023-08-27T19:14:02
205,810,121
4,734
770
BSD-2-Clause
2023-09-03T12:41:33
2019-09-02T08:22:14
C
UTF-8
C++
false
false
8,725
cpp
image.cpp
/* * libeg/image.c * Image handling functions * * Copyright (c) 2006 Christoph Pfisterer * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the * distribution. * * * Neither the name of Christoph Pfisterer nor the names of the * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <Platform.h> // Only use angled for Platform, else, xcode project won't compile #include <Efi.h> #include "libegint.h" #include "lodepng.h" #define MAX_FILE_SIZE (1024*1024*1024) #ifndef DEBUG_ALL #define DEBUG_IMG 1 #else #define DEBUG_IMG DEBUG_ALL #endif #if DEBUG_IMG == 0 #define DBG(...) #else #define DBG(...) DebugLog(DEBUG_IMG, __VA_ARGS__) #endif // // Basic file operations should be separated into separate file // EFI_STATUS egLoadFile(const EFI_FILE* BaseDir, IN CONST CHAR16 *FileName, OUT UINT8 **FileData, OUT UINTN *FileDataLength) { EFI_STATUS Status = EFI_NOT_FOUND; EFI_FILE* FileHandle = 0; EFI_FILE_INFO *FileInfo; UINT64 ReadSize; UINTN BufferSize; UINT8 *Buffer; if (!BaseDir) { goto Error; } Status = BaseDir->Open(BaseDir, &FileHandle, (CHAR16*)FileName, EFI_FILE_MODE_READ, 0); // const missing const EFI_FILE*->Open if (EFI_ERROR(Status) || !FileHandle) { goto Error; } FileInfo = EfiLibFileInfo(FileHandle); if (FileInfo == NULL) { FileHandle->Close(FileHandle); Status = EFI_NOT_READY; goto Error; } ReadSize = FileInfo->FileSize; if (ReadSize > MAX_FILE_SIZE) ReadSize = MAX_FILE_SIZE; FreePool(FileInfo); BufferSize = (UINTN)ReadSize; // was limited to 1 GB above, so this is safe Buffer = (UINT8 *) AllocatePool (BufferSize); if (Buffer == NULL) { FileHandle->Close(FileHandle); Status = EFI_OUT_OF_RESOURCES; goto Error; } Status = FileHandle->Read(FileHandle, &BufferSize, Buffer); FileHandle->Close(FileHandle); if (EFI_ERROR(Status)) { FreePool(Buffer); goto Error; } if(FileData) { *FileData = Buffer; } if (FileDataLength) { *FileDataLength = BufferSize; } // be 100% sure that we don't return EFI_SUCCESS with *FileData == NULL if ( !EFI_ERROR(Status) && *FileData == NULL ) { log_technical_bug("%s : EFI_ERROR(Status) && ConfigPtr", __PRETTY_FUNCTION__); return EFI_COMPROMISED_DATA; } return Status; Error: if (FileData) { *FileData = NULL; } if (FileDataLength) { *FileDataLength = 0; } // be 100% sure that we don't return EFI_SUCCESS with *FileData == NULL if ( !EFI_ERROR(Status) && *FileData == NULL ) { log_technical_bug("%s : EFI_ERROR(Status) && ConfigPtr", __PRETTY_FUNCTION__); return EFI_COMPROMISED_DATA; } return Status; } //Slice - this is gEfiPartTypeSystemPartGuid //constexpr const EFI_GUID ESPGuid = { 0xc12a7328, 0xf81f, 0x11d2, { 0xba, 0x4b, 0x00, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b } }; //there is assumed only one ESP partition. What if there are two HDD gpt formatted? EFI_STATUS egFindESP(OUT EFI_FILE** RootDir) { EFI_STATUS Status; UINTN HandleCount = 0; EFI_HANDLE *Handles; Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiPartTypeSystemPartGuid, NULL, &HandleCount, &Handles); if (!EFI_ERROR(Status) && HandleCount > 0) { *RootDir = EfiLibOpenRoot(Handles[0]); if (*RootDir == NULL) Status = EFI_NOT_FOUND; FreePool(Handles); } return Status; } //if (NULL, ...) then save to EFI partition EFI_STATUS egSaveFile(const EFI_FILE* BaseDir OPTIONAL, IN CONST CHAR16 *FileName, IN CONST void *FileData, IN UINTN FileDataLength) { EFI_STATUS Status; EFI_FILE* FileHandle; UINTN BufferSize; XBool CreateNew = true; CONST CHAR16 *p = FileName + StrLen(FileName); CHAR16 DirName[256]; UINTN dirNameLen; EFI_FILE* espDir; if (BaseDir == NULL) { Status = egFindESP(&espDir); if (EFI_ERROR(Status)) { DBG("no ESP %s\n", efiStrError(Status)); return Status; } BaseDir = espDir; } // syscl - make directory if not exist while (*p != L'\\' && p >= FileName) { // find the first '\\' traverse from the end to head of FileName p -= 1; } dirNameLen = p - FileName; StrnCpyS(DirName, 256, FileName, dirNameLen); DirName[dirNameLen] = L'\0'; Status = BaseDir->Open(BaseDir, &FileHandle, DirName, EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE, EFI_FILE_DIRECTORY); if (EFI_ERROR(Status)) { // make dir // DBG("no dir %s\n", efiStrError(Status)); Status = BaseDir->Open(BaseDir, &FileHandle, DirName, EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE | EFI_FILE_MODE_CREATE, EFI_FILE_DIRECTORY); // DBG("cant make dir %s\n", efiStrError(Status)); } // end of folder checking // Delete existing file if it exists Status = BaseDir->Open(BaseDir, &FileHandle, FileName, EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE, 0); if (!EFI_ERROR(Status)) { Status = FileHandle->Delete(FileHandle); if (Status == EFI_WARN_DELETE_FAILURE) { //This is READ_ONLY file system CreateNew = false; // will write into existing file (Slice - ???) // DBG("RO FS %s\n", efiStrError(Status)); } } if (CreateNew) { // Write new file Status = BaseDir->Open(BaseDir, &FileHandle, FileName, EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE | EFI_FILE_MODE_CREATE, 0); if (EFI_ERROR(Status)) { // DBG("no write %s\n", efiStrError(Status)); return Status; } } else { //to write into existing file we must sure it size larger then our data // EFI_FILE_INFO *Info = EfiLibFileInfo(FileHandle); // if (Info) { // if (Info->FileSize < FileDataLength) { // DBG("no old file %s\n", efiStrError(Status)); // return EFI_NOT_FOUND; // } // FreePool(Info); // } Status = FileHandle->Delete(FileHandle); //don't write into existing file. Delete it! } if (!FileHandle) { // DBG("no FileHandle %s\n", efiStrError(Status)); return EFI_DEVICE_ERROR; } BufferSize = FileDataLength; Status = FileHandle->Write(FileHandle, &BufferSize, (void*)FileData); // CONST missing const EFI_FILE*->write FileHandle->Close(FileHandle); // DBG("not written %s\n", efiStrError(Status)); return Status; } EFI_STATUS egMkDir(const EFI_FILE* BaseDir OPTIONAL, const CHAR16 *DirName) { EFI_STATUS Status; EFI_FILE* FileHandle; //DBG("Looking up dir assets (%ls):", DirName); if (BaseDir == NULL) { EFI_FILE* espDir; Status = egFindESP(&espDir); if (EFI_ERROR(Status)) { //DBG(" %s\n", efiStrError(Status)); return Status; } BaseDir = espDir; } Status = BaseDir->Open(BaseDir, &FileHandle, DirName, EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE, EFI_FILE_DIRECTORY); if (EFI_ERROR(Status)) { // Write new dir //DBG("%s, attempt to create one:", efiStrError(Status)); Status = BaseDir->Open(BaseDir, &FileHandle, DirName, EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE | EFI_FILE_MODE_CREATE, EFI_FILE_DIRECTORY); } //DBG(" %s\n", efiStrError(Status)); return Status; } /* EOF */
4e887702bd0cb91f6afac7604cac17c9ea8e35f1
332cb0837f091491ce97d3f1467a9f4f19272fb2
/Clases/Blink_v-1-1-0/Blink_v-1-1-0.ino
eed3db6bcce5265e7ebc7a7098a295d31cb7b16b
[ "MIT" ]
permissive
dannycuichan/Ejemplos_Cpp
0a3555f35bdd0aa2a2037ec20fcdc5ddd7e0bdc1
e5b46484844420c5e8e7a81fc34d26a8ad09b481
refs/heads/master
2021-03-16T17:25:38.381775
2020-03-12T21:01:32
2020-03-12T21:01:32
246,926,591
0
0
null
null
null
null
UTF-8
C++
false
false
806
ino
Blink_v-1-1-0.ino
//Poling y clases #define BOTON 0 #define ACTIVO 2 #include "blink_class.h" blink_class blink1(1000, 1000, 5, 5); //blink_class blink1; blink_class blink2(500, 500, 10, 4); blink_class blink3(1000, 500, 7, 1); void setup() { pinMode(BOTON, INPUT); pinMode(ACTIVO, OUTPUT); blink1.begin(); blink2.begin(); blink3.begin(); digitalWrite(ACTIVO, 0); } void loop() { if (digitalRead(ACTIVO) == 0) { blink1.reset(); blink2.reset(); blink3.reset(); if (digitalRead(BOTON) == 0) { digitalWrite(ACTIVO, 1); } } else { bool ind1 = blink1.blinkear_p(); bool ind2 = blink2.blinkear_p(); bool ind3 = blink3.blinkear_p(); digitalWrite(ACTIVO, !(ind1 && ind2 && ind3)); } }
68e437e3d2a03a2b263a62eb8ba716fcfb1bb729
a27eef822309928227850f4ade896a248bccd42a
/Sources/DrawableTex2D.cpp
080b5e9ebb6eb4b80b2923cc11206c85563c166d
[ "MIT" ]
permissive
GTVolk/DX10House
f25fc2630f05a4cfd9c48ac3dee0986301176c64
ac44447cb13a09bbd0ef28838ddd081d38a327d4
refs/heads/master
2021-04-27T10:55:53.371945
2020-02-20T22:00:38
2020-02-20T22:00:38
122,548,955
0
0
null
null
null
null
UTF-8
C++
false
false
4,161
cpp
DrawableTex2D.cpp
#include "..\Headers\DrawableTex2D.h" DrawableTex2D::DrawableTex2D() : mWidth(0), mHeight(0), mColorMapFormat(DXGI_FORMAT_UNKNOWN), md3dDevice(0), mColorMapSRV(0), mColorMapRTV(0), mDepthMapSRV(0), mDepthMapDSV(0) { ZeroMemory(&mViewport, sizeof(D3D10_VIEWPORT)); } DrawableTex2D::~DrawableTex2D() { ReleaseCOM(mColorMapSRV); ReleaseCOM(mColorMapRTV); ReleaseCOM(mDepthMapSRV); ReleaseCOM(mDepthMapDSV); } void DrawableTex2D::init(ID3D10Device* device, UINT width, UINT height, bool hasColorMap, DXGI_FORMAT colorFormat) { mWidth = width; mHeight = height; mColorMapFormat = colorFormat; md3dDevice = device; buildDepthMap(); // shadow maps don't need color maps, for example if( hasColorMap ) buildColorMap(); mViewport.TopLeftX = 0; mViewport.TopLeftY = 0; mViewport.Width = width; mViewport.Height = height; mViewport.MinDepth = 0.0f; mViewport.MaxDepth = 1.0f; } ID3D10ShaderResourceView* DrawableTex2D::colorMap() { return mColorMapSRV; } ID3D10ShaderResourceView* DrawableTex2D::depthMap() { return mDepthMapSRV; } void DrawableTex2D::begin() { ID3D10RenderTargetView* renderTargets[1] = {mColorMapRTV}; md3dDevice->OMSetRenderTargets(1, renderTargets, mDepthMapDSV); md3dDevice->RSSetViewports(1, &mViewport); // only clear is we actually created a color map. if( mColorMapRTV ) md3dDevice->ClearRenderTargetView(mColorMapRTV, BLACK); md3dDevice->ClearDepthStencilView(mDepthMapDSV, D3D10_CLEAR_DEPTH, 1.0f, 0); } void DrawableTex2D::end() { // After we have drawn to the color map, have the hardware generate // the lower mipmap levels. if( mColorMapSRV ) md3dDevice->GenerateMips(mColorMapSRV); } void DrawableTex2D::buildDepthMap() { ID3D10Texture2D* depthMap = 0; D3D10_TEXTURE2D_DESC texDesc; texDesc.Width = mWidth; texDesc.Height = mHeight; texDesc.MipLevels = 1; texDesc.ArraySize = 1; texDesc.Format = DXGI_FORMAT_R32_TYPELESS; texDesc.SampleDesc.Count = 1; texDesc.SampleDesc.Quality = 0; texDesc.Usage = D3D10_USAGE_DEFAULT; texDesc.BindFlags = D3D10_BIND_DEPTH_STENCIL | D3D10_BIND_SHADER_RESOURCE; texDesc.CPUAccessFlags = 0; texDesc.MiscFlags = 0; HR(md3dDevice->CreateTexture2D(&texDesc, 0, &depthMap)); D3D10_DEPTH_STENCIL_VIEW_DESC dsvDesc; dsvDesc.Format = DXGI_FORMAT_D32_FLOAT; dsvDesc.ViewDimension = D3D10_DSV_DIMENSION_TEXTURE2D; dsvDesc.Texture2D.MipSlice = 0; HR(md3dDevice->CreateDepthStencilView(depthMap, &dsvDesc, &mDepthMapDSV)); D3D10_SHADER_RESOURCE_VIEW_DESC srvDesc; srvDesc.Format = DXGI_FORMAT_R32_FLOAT; srvDesc.ViewDimension = D3D10_SRV_DIMENSION_TEXTURE2D; srvDesc.Texture2D.MipLevels = texDesc.MipLevels; srvDesc.Texture2D.MostDetailedMip = 0; HR(md3dDevice->CreateShaderResourceView(depthMap, &srvDesc, &mDepthMapSRV)); // View saves a reference to the texture so we can release our reference. ReleaseCOM(depthMap); } void DrawableTex2D::buildColorMap() { ID3D10Texture2D* colorMap = 0; D3D10_TEXTURE2D_DESC texDesc; texDesc.Width = mWidth; texDesc.Height = mHeight; texDesc.MipLevels = 0; texDesc.ArraySize = 1; texDesc.Format = mColorMapFormat; texDesc.SampleDesc.Count = 1; texDesc.SampleDesc.Quality = 0; texDesc.Usage = D3D10_USAGE_DEFAULT; texDesc.BindFlags = D3D10_BIND_RENDER_TARGET | D3D10_BIND_SHADER_RESOURCE; texDesc.CPUAccessFlags = 0; texDesc.MiscFlags = D3D10_RESOURCE_MISC_GENERATE_MIPS; HR(md3dDevice->CreateTexture2D(&texDesc, 0, &colorMap)); D3D10_RENDER_TARGET_VIEW_DESC rtvDesc; rtvDesc.Format = texDesc.Format; rtvDesc.ViewDimension = D3D10_RTV_DIMENSION_TEXTURE2D; rtvDesc.Texture2D.MipSlice = 0; HR(md3dDevice->CreateRenderTargetView(colorMap, &rtvDesc, &mColorMapRTV)); D3D10_SHADER_RESOURCE_VIEW_DESC srvDesc; srvDesc.Format = texDesc.Format; srvDesc.ViewDimension = D3D10_SRV_DIMENSION_TEXTURE2D; srvDesc.Texture2D.MipLevels = texDesc.MipLevels; srvDesc.Texture2D.MostDetailedMip = 0; HR(md3dDevice->CreateShaderResourceView(colorMap, &srvDesc, &mColorMapSRV)); // View saves a reference to the texture so we can release our reference. ReleaseCOM(colorMap); }
a4a5288af55254d11b2fb6ebbd1a623036e03c12
d17cc08f721f6e457c19ba685c5c041291cf73a8
/04Kochmar/04Kochmar/Main.cpp
f0f5575cd0cb764081b9dc9059a14de775a2f5df
[]
no_license
vvadymk/pp
8b70b98ef71ee024307a4bcd7d4e916d2e494f36
ba0eb09697a1b4650f4d0e820ce5f790a596f0d4
refs/heads/master
2020-07-19T03:30:35.821631
2019-09-04T16:48:55
2019-09-04T16:48:55
null
0
0
null
null
null
null
UTF-8
C++
false
false
298
cpp
Main.cpp
#include<iostream> using namespace std; #include"Function.h" int main(void) { cout << agm(1, 10) << endl; cout << agm(5, 10) << endl; cout << agm(4, 6) << endl; cout << agm(5, 11) << endl; cout << agm(20, 40) << endl; cout << agm(100, 175) << endl; cout << agm(2, 3) << endl; return 0; }
235de16b770171e6f2be17ee7377ff4f69f01b5b
406c4973cfc226536452bb3b7f46d9ce2722ba6d
/algorithms/src/graph_cost.h
788a6a6b15f072ff5b67e7f10d02487337d675fd
[]
no_license
kwatts/interview_practice
d3e5ac1ec20b95a6d33d38bb31bd63fd437756ec
d1d5707260e94f65737f97c5e9f14e3d3797983c
refs/heads/main
2023-04-29T03:39:47.279208
2023-04-22T22:53:08
2023-04-22T22:53:08
315,455,639
0
0
null
null
null
null
UTF-8
C++
false
false
227
h
graph_cost.h
#include <string> #include <vector> #include <functional> #include "query_helper.h" // Find cost of a query in a graph. double findCost(QueryHelper const& get_connections, std::string start, std::string end);
4f1d4c48f4d80cff365ef8cc4bea576a0e4d6994
ac75558b13b1eb5a220ea7b84739c87ad50f6da5
/Graph/Topological Sort.cpp
5720b0b482ba35868c71b104b7f150459fc42506
[]
no_license
Anik-Modak/CompetitiveProgramming
670a53f323292b16484ca28f340e123e8da8fcff
3fa0b9712f6bb4879d53a066fa16274e480b31a4
refs/heads/master
2022-03-22T06:21:30.654964
2019-12-10T12:58:35
2019-12-10T12:58:35
184,308,402
1
0
null
null
null
null
MacCentralEurope
C++
false
false
3,814
cpp
Topological Sort.cpp
// A C++ program to print topological sorting of a DAG #include<iostream> #include <list> #include <stack> using namespace std; // Class to represent a graph class Graph { int V; // No. of vertices' // Pointer to an array containing adjacency listsList list<int> *adj; // A function used by topologicalSort void topologicalSortUtil(int v, bool visited[], stack<int> &Stack); public: Graph(int V); // Constructor // function to add an edge to graph void addEdge(int v, int w); // prints a Topological Sort of the complete graph void topologicalSort(); }; Graph::Graph(int V) { this->V = V; adj = new list<int>[V]; } void Graph::addEdge(int v, int w) { adj[v].push_back(w); // Add w to vís list. } // A recursive function used by topologicalSort void Graph::topologicalSortUtil(int v, bool visited[], stack<int> &Stack) { // Mark the current node as visited. visited[v] = true; // Recur for all the vertices adjacent to this vertex list<int>::iterator i; for (i = adj[v].begin(); i != adj[v].end(); ++i) if (!visited[*i]) topologicalSortUtil(*i, visited, Stack); // Push current vertex to stack which stores result Stack.push(v); } // The function to do Topological Sort. It uses recursive // topologicalSortUtil() void Graph::topologicalSort() { stack<int> Stack; // Mark all the vertices as not visited bool *visited = new bool[V]; for (int i = 0; i < V; i++) visited[i] = false; // Call the recursive helper function to store Topological // Sort starting from all vertices one by one for (int i = 0; i < V; i++) if (visited[i] == false) topologicalSortUtil(i, visited, Stack); // Print contents of stack while (Stack.empty() == false) { cout << Stack.top() << " "; Stack.pop(); } } void Graph::topologicalSort() { // Create a vector to store indegrees of all // vertices. Initialize all indegrees as 0. vector<int> in_degree(V, 0); // Traverse adjacency lists to fill indegrees of // vertices. This step takes O(V+E) time for (int u=0; u<V; u++) { list<int>::iterator itr; for (itr = adj[u].begin(); itr != adj[u].end(); itr++) in_degree[*itr]++; } // Create an queue and enqueue all vertices with // indegree 0 queue<int> q; for (int i = 0; i < V; i++) if (in_degree[i] == 0) q.push(i); // Initialize count of visited vertices int cnt = 0; // Create a vector to store result (A topological // ordering of the vertices) vector <int> top_order; // One by one dequeue vertices from queue and enqueue // adjacents if indegree of adjacent becomes 0 while (!q.empty()) { // Extract front of queue (or perform dequeue) // and add it to topological order int u = q.front(); q.pop(); top_order.push_back(u); // Iterate through all its neighbouring nodes // of dequeued node u and decrease their in-degree // by 1 list<int>::iterator itr; for (itr = adj[u].begin(); itr != adj[u].end(); itr++) // If in-degree becomes zero, add it to queue if (--in_degree[*itr] == 0) q.push(*itr); cnt++; } // Check if there was a cycle if (cnt != V) { cout << "There exists a cycle in the graph\n"; return; } // Print topological order for (int i=0; i<top_order.size(); i++) cout << top_order[i] << " "; cout << endl; } void dfs(int v) { vis[v]=1; for(int i=0; i<adj[v].size(); i++) { int u=adj[v][i]; if(vis[u]==0) dfs(u); } st.push(v); }
b402ad567e1b2c00056a63421322dc84ce9d09c5
9151dbb877ad81650d85460a3aa34f3b74de6dae
/Oving1/arduino_kode_morse/arduino_kode_morse.ino
786cfe510bc19bab6428078b7cfe3e0b33f5dcaf
[]
no_license
wQuole/TDT4113
443447bbaaa85b3f261ed624b6b0d03912ec0fc3
496a84bd61fac64abf9011740968092d92580d2c
refs/heads/master
2021-09-21T02:15:45.944884
2018-08-19T16:49:20
2018-08-19T16:49:20
104,644,942
0
0
null
null
null
null
UTF-8
C++
false
false
2,150
ino
arduino_kode_morse.ino
// this constant won't change: const int buttonPin = 3; // the pin that the pushbutton is attached to const int ledpin_green = 12; // the pin that the LED is attached to const int ledpin_red = 13; //OG // Variables will change: int buttonPushCounter = 0; // counter for the number of button presses int buttonState = 0; // current state of the button int lastButtonState = 0; // previous state of the button // Timevariables long prev_millis = 0; long pressedTime = 0; long pausedTime = 0; long releaseTime = 0; void setup() { // initialize the button pin as a input: pinMode(buttonPin, INPUT); // initialize the LED as an output: pinMode(ledpin_green, OUTPUT); // initialize the LED as an output: pinMode(ledpin_red, OUTPUT); // initialize serial communication: Serial.begin(9600); } void howLongPause(long pausedTime){ if(pausedTime != 0){ if(pausedTime >= 600 && pausedTime < 1200){ Serial.print('2'); } else if(pausedTime >= 1200){ Serial.print('3'); } } } void howLongPressed(long pressedTime){ if(pressedTime != 0){ if(pressedTime <= 400){ Serial.print('0'); digitalWrite(ledpin_green, HIGH); // turn the LED on (HIGH is the voltage level) delay(400); // wait for a second digitalWrite(ledpin_green, LOW); // turn the LED off by making the voltage LOW } else{ Serial.print('1'); digitalWrite(ledpin_red, HIGH); // turn the LED on (HIGH is the voltage level) delay(400); // wait for a second digitalWrite(ledpin_red, LOW); // turn the LED off by making the voltage LOW } } } void loop() { // read the pushbutton input pin: //buttonState = digitalRead(buttonPin); pausedTime = millis() - releaseTime; prev_millis = millis(); while(digitalRead(buttonPin) == LOW){ if(pausedTime > 0){ howLongPause(pausedTime); pausedTime = 0; } pressedTime = millis() - prev_millis; releaseTime = millis(); } if(pressedTime > 50){ howLongPressed(pressedTime); pressedTime = 0; } }
8dbffb08631779b0250fae9ff033b4bc893400e7
df430be8407bd7eff51cd060e83074a6e67ea816
/PROBLEM SOLVING - UVA/P-352.cpp
650293e380d610727c5cf3f25ac52d0ff3a7c293
[]
no_license
sohag-aust/Problem-Solving---UVA
445b9d02b93764b7a20ca7da090f0c9f61ed54bf
d7b396efcfd314a96236f8eb94c6bd27339e11f4
refs/heads/master
2021-07-20T06:34:10.794244
2021-07-10T04:48:58
2021-07-10T04:48:58
160,833,208
0
0
null
null
null
null
UTF-8
C++
false
false
1,169
cpp
P-352.cpp
#include<bits/stdc++.h> using namespace std; const int maxi=30; char grid[maxi][maxi]; int r,c; int flag[maxi][maxi]; void init() { for(int i=0; i<r; i++) for(int j=0; j<c; j++) flag[i][j]=0; } void floodfill(int i,int j) { if(i<0 || j<0 || i>r-1 || j>c-1) return ; if(grid[i][j]=='1' && flag[i][j]==0) { flag[i][j]=1; floodfill(i,j-1); floodfill(i,j+1); floodfill(i-1,j); floodfill(i+1,j); floodfill(i-1,j-1); floodfill(i-1,j+1); floodfill(i+1,j-1); floodfill(i+1,j+1); } } int main() { int cs=0; while(cin>>r) { int cnt=0; c=r; init(); for(int i=0; i<r; i++) for(int j=0; j<c; j++) cin>>grid[i][j]; for(int i=0; i<r; i++) { for(int j=0; j<c; j++) { if(grid[i][j]=='1' && flag[i][j]==0) { cnt++; floodfill(i,j); } } } cout<<"Image number "<<++cs<<" contains "<<cnt<<" war eagles."<<endl; } return 0; }
6b777fb016a7514798d36c75baaed3a98d273265
0841c948188711d194835bb19cf0b4dae04a5695
/p2pserver_v2/track/sources.bak.20141029/livetrack/src/flashp2pdb.cpp
f8aa290fc79d002e01a821fda116a20be0a5776e
[]
no_license
gjhbus/sh_project
0cfd311b7c0e167e098bc4ec010822f1af2d0289
1d4d7df4e92cff93aba9d28226d3dbce71639ed6
refs/heads/master
2020-06-15T16:11:33.335499
2016-06-15T03:41:22
2016-06-15T03:41:22
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,532
cpp
flashp2pdb.cpp
#include "flashp2pdb.h" #include "versiondb.h" #include "spdb.h" #include "provincedb.h" #include "citydb.h" #include "filedb.h" extern IPTranslator IPTRANSLATOR; FlashP2PDb::FlashP2PDb() : FP2PDb() { } FlashP2PDb::~FlashP2PDb() { VersionDBMap::iterator i = versions_.begin(); while( i != versions_.end() ) { VersionDB* tmp = MAP_VAL(i); i = versions_.erase(i); delete tmp; } versions_.clear(); } bool FlashP2PDb::AddUser(const P2PString& file, const User& user) { FlashUser* flash_user = (FlashUser *)user.get(); VersionDB* tmp_version = NULL; VersionDBMap::iterator iter = versions_.find(flash_user->ex_version_); if ( versions_.end() == iter ) { tmp_version = new VersionDB(IPTRANSLATOR.GetMaxSPNum(), IPTRANSLATOR.GetMaxRegionNum()); versions_[flash_user->ex_version_] = tmp_version; } else { tmp_version = MAP_VAL(iter); } if ( tmp_version->sp_num_ <= flash_user->sp_ ) { WARN("sp %u is not between 0 and %d", flash_user->sp_, tmp_version->sp_num_); return false; } ProvinceDB *tmp_province = tmp_version->sps_[flash_user->sp_]->Insert(flash_user->province_); if ( !tmp_province ) { return false; } CityDB *tmp_city = tmp_province->Insert(flash_user->city_); if ( !tmp_city ) { return false; } FileDB *tmp_file = tmp_city->Insert(file); if ( !tmp_file ) { return false; } tmp_file->Insert(flash_user->track_id_, user); return true; } bool FlashP2PDb::DelUser(const P2PString& file, const User& user) { FlashUser* flash_user = (FlashUser *)user.get(); VersionDB* tmp_version = NULL; ProvinceDB *tmp_province = NULL; CityDB *tmp_city = NULL; FileDB *tmp_file = NULL; VersionDBMap::iterator iter = versions_.find(flash_user->ex_version_); if ( versions_.end() == iter ) { return true; } else { tmp_version = MAP_VAL(iter); } if ( tmp_version->sp_num_ <= flash_user->sp_ ) { WARN("sp %u is not between 0 and %d", flash_user->sp_, tmp_version->sp_num_); return false; } tmp_province = tmp_version->sps_[flash_user->sp_]->Find(flash_user->province_); if ( !tmp_province ) { return true; } tmp_city = tmp_province->Find(flash_user->city_); if ( !tmp_city ) { goto FP2PDB_PROVINCE_CLEAR; } tmp_file = tmp_city->Find(file); if ( !tmp_file ) { goto FP2PDB_CITY_CLEAR; } tmp_file->Del(flash_user->track_id_); FP2PDB_FILE_CLEAR: if ( 0 != tmp_file->db_user_map_.size() ) { return true; } tmp_city->Del(file); FP2PDB_CITY_CLEAR: if ( 0 != tmp_city->db_file_map_.size() ) { return true; } tmp_province->Del(flash_user->city_); FP2PDB_PROVINCE_CLEAR: if ( 0 != tmp_province->db_city_map_.size() ) { return true; } tmp_version->sps_[flash_user->sp_]->Del(flash_user->province_); return true; } uint16_t FlashP2PDb::GetUser(const P2PString& file, const User& user, ChainUser **res, uint16_t num, int &public_peer_index) { FlashUser* flash_user = (FlashUser *)user.get(); VersionDB* tmp_version = NULL; VersionDBMap::iterator iter = versions_.find(flash_user->ex_version_); if ( versions_.end() == iter ) { WARN("flash_user(%s) version(%u) does not exist", STR(flash_user->ToString()), flash_user->ex_version_); return 0; } else { tmp_version = MAP_VAL(iter); } return tmp_version->SearchItself(file, user, 0, res, num, public_peer_index); }
9028f7b1c8be91ad346ee21015005bc7e62f6a0e
27cf09462dc9e20f2de5d0e8586abe6ed6392687
/configobject.hpp
0eeb82528bb3972082bf2f63e397f213bee509bf
[]
no_license
julam5/clibconfig
6cadfac31e318851ad83a40ed267e824e4006915
21be91848bf43ee7dc9f0a76dba4b6bd6923ceff
refs/heads/master
2020-12-09T01:54:20.726356
2020-03-03T19:28:06
2020-03-03T19:28:06
233,157,172
0
0
null
null
null
null
UTF-8
C++
false
false
2,323
hpp
configobject.hpp
#ifndef CONFIGOBJECTS_H #define CONFIGOBJECTS_H #include <iostream> #include <stdio.h> #include <stdlib.h> #include <libconfig.h++> namespace Airspace { typedef enum { CFG_TYPE_INVALID = 0, CFG_TYPE_INT = 1, CFG_TYPE_INT64, CFG_TYPE_DOUBLE, CFG_TYPE_BOOL, CFG_TYPE_STRING, } cfg_type_e; typedef struct { std::string key; cfg_type_e type; void *val; const char *desc; } cfg_entry_t; class ConfigObject { private: libconfig::Setting* pSetting; public: ConfigObject(libconfig::Setting& setting); ~ConfigObject(); void test1(); bool init(std::string path, const char **argv, int argc); void cfg_term(); void cfg_err(const char **file, int *line, const char **msg); void cfg_err_print_msg(); std::string cfg_parse_arg(std::string str, std::string key); std::string cfg_lookup_arg(std::string key); bool cfg_get_value(std::string key, void *val, cfg_type_e type); bool cfg_get_value(cfg_entry_t *entry); bool cfg_get_value( std::string key, int &value); bool cfg_get_value( std::string key, long long &value); bool cfg_get_value( std::string key, double &value); bool cfg_get_value( std::string key, bool &value); bool cfg_get_value( std::string key, const char *&value); bool cfg_get_value( std::string key, const char *&value, int index); bool cfg_get_value( std::string key, unsigned int &value); bool cfg_get_value( std::string key, float &value); bool cfg_get_value( std::string key, std::string &value); //get value from array bool cfg_get_value( std::string key, int index, int &value); bool cfg_get_value( std::string key, int index, long long &value); bool cfg_get_value( std::string key, int index, double &value); bool cfg_get_value( std::string key, int index, bool &value); bool cfg_get_value( std::string key, int index, const char *&value); bool cfg_get_value( std::string key, int index, unsigned int &value); bool cfg_get_value( std::string key, int index, float &value); bool cfg_get_value( std::string key, int index, std::string &value); };// ConfigObject class }// namespace Airspace #endif
e7a017e0aa205f66f474dd7cc0b2c468462268ee
8e068eede9730e6ce3773f1e7232c34dd03ef29d
/Engine/Platform/Platform.WinPC/OpenGL/EGLView.cpp
eccc9f0ce179833bfd9ce941ab355279c1808331
[ "MIT" ]
permissive
leec0m3t/Leggiero
2e228fa23f723132883577c8018e7f6a47879f61
8fe13d86454a08ba8a3a8cebe1ce92343090c1be
refs/heads/main
2023-04-09T19:17:06.555139
2021-04-19T06:54:00
2021-04-19T06:54:00
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,837
cpp
EGLView.cpp
//////////////////////////////////////////////////////////////////////////////// // OpenGL/EGLView.cpp (Leggiero - Platform.WinPC) // // EGLView Implementation //////////////////////////////////////////////////////////////////////////////// // My Header #include "EGLView.h" // Leggiero.Platform.WinPC #include "WinPCGLException.h" #include "WinPCGLThreadContext.h" namespace Leggiero { namespace Platform { namespace Windows { namespace Graphics { //////////////////////////////////////////////////////////////////////////////// EGLView //------------------------------------------------------------------------------ EGLView::EGLView(const HWND &windowHWnd) { // get egl display handle m_eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY); if (m_eglDisplay == EGL_NO_DISPLAY) { throw EGLViewCreateFailException(EGLViewCreateErrorType::kNoEGLDisplay, eglGetError()); } // Initialize the display EGLint major = 0; EGLint minor = 0; if (eglInitialize(m_eglDisplay, &major, &minor) == EGL_FALSE) { throw EGLViewCreateFailException(EGLViewCreateErrorType::kDisplayInitializeFail, eglGetError()); } // Check Supported Version if (major < 1 || (major == 1 && minor < 5)) { // Does not support EGL 1.5 eglTerminate(m_eglDisplay); throw EGLViewCreateFailException(EGLViewCreateErrorType::kEGLVersionNotSupport, eglGetError()); } // Obtain the first configuration match EGLint attrs[] = { EGL_RENDERABLE_TYPE, EGL_OPENGL_ES3_BIT, EGL_CONFORMANT, EGL_OPENGL_ES3_BIT, EGL_RED_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_BLUE_SIZE, 8, EGL_ALPHA_SIZE, 8, EGL_DEPTH_SIZE, 24, EGL_STENCIL_SIZE, 8, EGL_NONE }; EGLint numConfig = 0; EGLConfig eglConfig = 0; if (eglChooseConfig(m_eglDisplay, attrs, &eglConfig, 1, &numConfig) == EGL_FALSE) { eglTerminate(m_eglDisplay); throw EGLViewCreateFailException(EGLViewCreateErrorType::kEGLConfigNotExists, eglGetError()); } // Create a surface for the main window m_eglSurface = eglCreateWindowSurface(m_eglDisplay, eglConfig, windowHWnd, NULL); if (m_eglSurface == EGL_NO_SURFACE) { throw EGLViewCreateFailException(EGLViewCreateErrorType::kSurfaceCreateFail, eglGetError()); } // Create an OpenGL ES context EGLint contextAttrs[] = { EGL_CONTEXT_CLIENT_VERSION, 3, EGL_NONE }; m_eglContext = eglCreateContext(m_eglDisplay, eglConfig, EGL_NO_CONTEXT, contextAttrs); if (m_eglContext == EGL_NO_CONTEXT) { eglDestroySurface(m_eglDisplay, m_eglSurface); eglTerminate(m_eglDisplay); throw EGLViewCreateFailException(EGLViewCreateErrorType::kContextCreateFail, eglGetError()); } // Make the context and surface current if (!eglMakeCurrent(m_eglDisplay, m_eglSurface, m_eglSurface, m_eglContext)) { eglDestroyContext(m_eglDisplay, m_eglContext); eglDestroySurface(m_eglDisplay, m_eglSurface); eglTerminate(m_eglDisplay); throw EGLViewCreateFailException(EGLViewCreateErrorType::kCurrentMakeFail, eglGetError()); } FillMainEGLContextInformation(m_eglDisplay, m_eglSurface, m_eglContext); } //------------------------------------------------------------------------------ EGLView::~EGLView() { eglMakeCurrent(m_eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); eglDestroyContext(m_eglDisplay, m_eglContext); eglDestroySurface(m_eglDisplay, m_eglSurface); eglTerminate(m_eglDisplay); } //------------------------------------------------------------------------------ void EGLView::SwapBuffers() { eglSwapBuffers(m_eglDisplay, m_eglSurface); } } } } }
e97e45b8a8166a50be958cc12b54f4a43b380a31
d44fe46073bcee3b42d84f43170614dc2249687d
/GameJam_v3.2/GameEngineBase/externals/Havok/includes/Source/Common/Internal/MeshSimplifier/hkMeshSimplifier.h
b8aa61c2e2ad83e3de0d846227124efc9147871f
[ "MIT" ]
permissive
aditgoyal19/Tropical-Go-Kart-Bananas
1b162a3c994f90d3e5f432bd68251411a369812c
ed3c0489402f8a559c77b56545bd8ebc79c4c563
refs/heads/master
2021-01-11T15:21:24.709156
2017-07-06T21:07:36
2017-07-06T21:07:36
80,340,694
0
0
null
null
null
null
UTF-8
C++
false
false
13,521
h
hkMeshSimplifier.h
/* * Confidential Information of Telekinesys Research Limited (t/a Havok). Not for disclosure or distribution without Havok's * prior written consent. This software contains code, techniques and know-how which is confidential and proprietary to Havok. * Product and Trade Secret source code contains trade secrets of Havok. Havok Software (C) Copyright 1999-2013 Telekinesys Research Limited t/a Havok. All Rights Reserved. Use of this software is subject to the terms of an end user license agreement. * */ #ifndef HK_MESH_SIMPLIFIER_H #define HK_MESH_SIMPLIFIER_H #include <Common/Base/Types/Geometry/Aabb/hkAabb.h> struct hkQemPairContraction; struct hkQemVertexPair; /// A mesh representation that allows vertices to be remapped to each other class hkQemMutableMesh { public: HK_DECLARE_NONVIRTUAL_CLASS_ALLOCATOR(HK_MEMORY_CLASS_BASE,hkQemMutableMesh); typedef int FaceIndex; typedef int VertexIndex; typedef hkArray<VertexIndex> VertexList; typedef hkArray<FaceIndex> FaceList; friend class hkQemMeshSimplifier; struct Face { VertexIndex m_vertexIndices[3]; /// Material ID that is preserved during merges. Defaults to hkUlong(-1) hkUlong m_materialId; hkBool m_isValid; Face( VertexIndex i, VertexIndex j, VertexIndex k); Face() {} // Replaces instances of "from" with "to" and return the # of changed values int remapVertices(VertexIndex from, VertexIndex to); }; struct Vertex { hkVector4 m_position; hkBool m_isConstrained; }; /// Append the array of vertices to the mesh's vertices. May be called multiple times. void addVertices( const hkArray<hkVector4>& verts ); /// Add a triangle with the specified vertex indices. The material for the face defaults to hkUlong(-1) void addTriangle( VertexIndex i, VertexIndex j, VertexIndex k); /// Add a triangle with the specified vertex indices and material index void addTriangleWithMaterial( VertexIndex i, VertexIndex j, VertexIndex k, hkUlong mat); void validate() const; /// Get the position of the vertex for the specified index const hkVector4& getVertexPosition( int index ) const { return m_vertices[index].m_position; } hkVector4& getVertexPosition( int index ) { return m_vertices[index].m_position; } /// Approximates the vertex normal based on the surrounding faces. void calcVertexNormal( VertexIndex vIdx, hkVector4& normalOut) const; /// Computes all the vertex normals using calcVertexNormal void getVertexNormals(hkArray<hkVector4>& normals) const; /// Approximates the vertex normal based on the surrounding faces. void calcFaceCentroid( FaceIndex fIdx, hkVector4& centroidOut) const; /// Accessor methods const hkArray<Vertex>& getVertices() const { return m_vertices; } const hkArray<Face>& getFaces() const { return m_faces; } /// Vertex constraints hkBool isVertexConstrained( int i ) const { return m_vertices[i].m_isConstrained; } void setVertexConstrained( int i, hkBool constrained ) { m_vertices[i].m_isConstrained = constrained; } void debugDisplay() const; void debugDisplay(hkVector4Parameter scale, hkVector4Parameter offset) const; const hkArray<int>& getVertexMap() const { return m_vertexMap; } protected: void collectEdgeNeighbors(VertexIndex i, VertexIndex j, FaceList& neighbors) const; void collectDistanceNeighbors(hkArray<hkQemVertexPair>& neighbors, hkReal tolerance); void collectDistanceNeighbors1AxisSweep(hkArray<hkQemVertexPair>& neighbors, hkReal tolerance); void collectNormalAndBoundaryEdges(hkArray<hkQemVertexPair>& normal, hkArray<hkQemVertexPair>& boundary) const; void pruneDuplicateEdges(hkArray<hkQemVertexPair>& pairs); FaceList& getNeighbors(VertexIndex i) { return m_neighorhoods[i]; } const FaceList& getNeighbors(VertexIndex i) const { return m_neighorhoods[i]; } void computeContraction(VertexIndex v1, VertexIndex v2, hkQemPairContraction& conx, hkVector4Parameter vNew, hkBool checkIfNormalsFlip) const; hkBool checkNormalFlip(VertexIndex v1, VertexIndex v2, hkVector4Parameter vNew, const FaceList& deltaFaces ) const; int applyContraction(const hkQemPairContraction& conx); int unlinkFace(FaceIndex fid); // Removes vertices that don't belong to any neighborhoods void compact(); void calcPlaneNormalForFace( FaceIndex fix, hkVector4& planeOut ) const; protected: void getNeighborhoodUnion(VertexIndex i, VertexIndex j, FaceList& un) const; void getNeighborhoodIntersection(VertexIndex i, VertexIndex j, FaceList& intersect) const; // Returns the "pivot" point - everything from 0..pivot is in neighborhood of vertex i int getNeighborhoodSymDifference(VertexIndex i, VertexIndex j, FaceList& symdiff) const; static hkBool isSorted(const FaceList& list); // Each neighborhood is sorted to make set operations faster hkArray< hkArray<FaceIndex> > m_neighorhoods; hkArray<Vertex> m_vertices; hkArray<Face> m_faces; hkArray<int> m_vertexMap; // old index = m_vertexMap[new index] }; struct hkQemPairContraction { HK_DECLARE_NONVIRTUAL_CLASS_ALLOCATOR(HK_MEMORY_CLASS_BASE,hkQemPairContraction); typedef int FaceIndex; typedef int VertexIndex; typedef hkArray<VertexIndex> VertexList; typedef hkArray<FaceIndex> FaceList; VertexIndex m_v1; VertexIndex m_v2; hkVector4 m_delta1; hkVector4 m_delta2; FaceList m_deadFaces; FaceList m_deltaFaces; int m_deltaFacesPivot; hkBool m_flipsNormals; }; // Candidates for merging. Not strictly edges in the mesh, can be "close" vertices too struct hkQemVertexPair { enum PairType { BOUNDARY_PAIR, // Special case of an edge pair; an edge only associated with one face EDGE_PAIR, // Edge that existed in the original mesh PROXIMITY_PAIR, // Artificial edge based on vertex proximity }; hkQemMutableMesh::VertexIndex m_v1; hkQemMutableMesh::VertexIndex m_v2; hkQemMutableMesh::FaceIndex m_faceIndex; // Only used for constraining boundaries int m_heapIndex; // index into heap array hkEnum<PairType, hkUint8> m_pairType; hkVector4 m_target; hkSimdReal m_errorCost; // Used for heap // Assumes that v1 < v2 // This is true initially, but may be violated as vertices are remapped static hkBool PairIndexLess(const hkQemVertexPair& pairA, const hkQemVertexPair& pairB) { const hkBool v1LessThan = (pairA.m_v1 < pairB.m_v1); const hkBool v1Equals = (pairA.m_v1 == pairB.m_v1); const hkBool v2LessThan = (pairA.m_v2 < pairB.m_v2); const hkBool v2Equals = (pairA.m_v2 == pairB.m_v2); const hkBool typeLessThan = (pairA.m_pairType) < (pairB.m_pairType); return v1LessThan || ( v1Equals && v2LessThan ) || (v2Equals && typeLessThan); } static hkBool ErrorLess(const hkQemVertexPair& pairA, const hkQemVertexPair& pairB) { return pairA.m_errorCost < pairB.m_errorCost; } hkBool operator==(const hkQemVertexPair& other) { return ((m_v1 == other.m_v1) && (m_v2 == other.m_v2)) || ((m_v1 == other.m_v2) && (m_v2 == other.m_v1)); } void remap(hkQemMutableMesh::VertexIndex to, hkQemMutableMesh::VertexIndex from) { HK_ASSERT(0x268f06a3, m_v1 == from || m_v2 == from); if (m_v1 == from) { m_v1 = to;} if (m_v2 == from) { m_v2 = to;} } void invalidate() { m_v1 = -1; m_v2 = -1; } }; struct hkQemQuadric { public: hkMatrix4 m_matrix; void initFromPlaneEquation( hkVector4Parameter plane ); void combineQuadrics( const hkQemQuadric& other, hkQemVertexPair::PairType ); hkSimdReal calcErrorForVector(hkVector4Parameter v) const; }; /// A utility for simplifying meshes. /// After the hkQemMeshSimplifier is initialized with an hkQemMutableMesh, edges from the mesh are collapsed, /// and then edges and faces are patched up. /// The edges to be collapsed are selected based on a heuristic that attempts to minimize the error introduced to the mesh. /// Thus, small details like thin triangles or coincident vertices are removed first. /// This can be a useful tool for generating reduced-complexity physics representations from render meshes /// /// NOTES /// -# The algorithm used may end up removing edges that a human might think it shouldn't. /// You should inspect the output meshes to make sure that no large errors are introduced. /// -# The algorithm is CPU and memory intensive. A large mesh may take several seconds to process. /// Thus it should NOT be used at runtime. /// -# Materials in the mesh are tracked during simplification, but no attempt is made to avoid merging triangles with /// different materials. Support for this will be improved in the future. /// /// See MeshSimplificationDemo.cpp for more examples on the usage. class hkQemMeshSimplifier { public: HK_DECLARE_NONVIRTUAL_CLASS_ALLOCATOR(HK_MEMORY_CLASS_BASE,hkQemMeshSimplifier); enum SimplificationStatus { STATUS_INVALID, /// vertices and triangles being passed in STATUS_SETUP, /// simplification started STATUS_PROCESSING, // simplification ended, vertices and triangles are read-only STATUS_DONE }; hkQemMeshSimplifier(); ~hkQemMeshSimplifier(); typedef int FaceIndex; typedef int VertexIndex; typedef hkArray<VertexIndex> VertexList; typedef hkArray<FaceIndex> FaceList; /// Set up the simplifier. /// This maps the mesh to a fixed-size AABB void initialize( hkQemMutableMesh* mesh ); /// Remove one edge from the mesh. hkResult doSingleContraction(); /// Removes redundant vertices from the mesh, and remaps the vertices to their original space void finalize(); // Driver routines - removes the specified fraction of vertices or edges from the mesh void removeFractionOfVertices(hkReal fract); void removeFractionOfFaces(hkReal fract); void debugDisplay() const; struct Parameters { /// Vertices closer than distance will be considered as candidates for merging. Set negative to disable. hkReal m_vertexMergeDistance; /// Weighting applied to boundary edges, making them less likely to be contracted hkReal m_boundaryPenalty; /// Epsilon value for matrix inversion hkReal m_inversionEpsilon; /// New vertices are constrained to be within this distance of the segment containing the original vertices hkReal m_newVertexMaxDistance; /// All vertices are remapped to a cube with extents this size hkReal m_remapExtentSize; /// Extra padding added to the remap AABB in order to handle all vertices in the same plane hkReal m_remapAabbPadding; /// Whether to allow contractions that flip triangle normals hkBool m_allowTriangleFlips; /// Only contracts edges less than this length, if < 0, will contract edges of any length hkReal m_maxEdgeContractionLength; Parameters() : m_vertexMergeDistance(.1f), m_boundaryPenalty(10000.0f), m_inversionEpsilon(1e-3f), m_newVertexMaxDistance(.1f), m_remapExtentSize(500.0f), m_remapAabbPadding(.1f), m_allowTriangleFlips(true), m_maxEdgeContractionLength(-1.0f) { } }; struct Contraction { VertexIndex m_v1; ///< Vertex index 1 VertexIndex m_v2; ///< Vertex index 2 VertexIndex m_vNew; ///< The new vertex index (may reuse v1, or v2). hkVector4 m_newPosition; ///< The new position }; /// The history of contractions which got to the current simplification state const hkArray<Contraction>& getContractionHistory() const { return m_contractionHistory; } Parameters m_params; protected: void constrainBoundaries( hkArray<hkQemVertexPair>& edges, hkReal penalty); void processEdges( hkArray<hkQemVertexPair>& edges ); void computeEdgeInfo( hkQemVertexPair& pair ); // Removes the pair with lowest cost from the heap, and copies it to pairOut void popBestPair(hkQemVertexPair& pairOut); void applyContraction(const hkQemPairContraction& contraction, hkQemVertexPair::PairType pairType); void remapVerticesInPairs(VertexIndex v1, VertexIndex v2, hkArray<int>& remappedPairs); void collectQuadrics(); void verifyEdges(); void removeEdgeAt(int removeIndex); void cleanupInvalidEdges(); // Map and unmap vertices to a cube specified by Parameters::m_remapExtentSize void mapVertices(); void unmapVertices(); struct HeapEntry { int m_index; // index into pair array hkSimdReal m_cost; }; hkArray<HeapEntry> m_heap; void heapSwapEntries(int i, int j); int heapGetParent(int i) {return (i-1) / 2;} int heapGetLeftChild(int i) {return (2*i + 1);} int heapGetRightChild(int i) {return (2*i + 2);} int heapGetSmallerChild(int i); void heapDeleteEntry(int i); void upHeap(int i); void downHeap(int i); void verifyHeap(); public: hkQemMutableMesh* m_mesh; // These decrease as we contract vertex pairs int m_numFaces; int m_numVertices; protected: hkArray<hkQemQuadric> m_quadrics; hkArray< hkArray<int> > m_edgeMapping; hkEnum<SimplificationStatus, hkUint8> m_status; hkAabb m_originalAabb; hkArray<hkQemVertexPair> m_pairs; hkArray<Contraction> m_contractionHistory; ///< History of contractions that have taken place }; #endif // HK_MESH_SIMPLIFIER_H /* * Havok SDK - NO SOURCE PC DOWNLOAD, BUILD(#20130718) * * Confidential Information of Havok. (C) Copyright 1999-2013 * Telekinesys Research Limited t/a Havok. All Rights Reserved. The Havok * Logo, and the Havok buzzsaw logo are trademarks of Havok. Title, ownership * rights, and intellectual property rights in the Havok software remain in * Havok and/or its suppliers. * * Use of this software for evaluation purposes is subject to and indicates * acceptance of the End User licence Agreement for this product. A copy of * the license is included with this software and is also available at www.havok.com/tryhavok. * */
59ee922f5a4ed976cca525f6056b7b3882cc390b
78edd8ed9c5209717db710c602c2b655daa1c13e
/test1011-2.h
a8ff9eaabd3551ef4a69d0e6a73d5744a2d9e09e
[]
no_license
shinsoyeon16/18-2lesson
97ac25e1b785feb029694e2a764749f88be09764
b56c70e0b61f4bf3eb75a01e170aabd60a710e55
refs/heads/master
2020-03-28T13:35:37.166916
2018-10-31T20:23:32
2018-10-31T20:23:32
147,277,321
0
0
null
null
null
null
UTF-8
C++
false
false
915
h
test1011-2.h
#pragma once #define _CRT_SECURE_NO_WARNINGS #include<iostream> #include <string> #include "ArrayStack.h" using namespace std; bool CheckMatching(const char* filename) { FILE *fp = fopen(filename, "r"); if (fp == NULL) error("Error: 파일 존재하지 않습니다.\n"); int nLine = 1, nChar = 0; ArrayStack stack; char ch; while ((ch = getc(fp)) != EOF) { if (ch == '\n') nLine++; nChar++; if (ch == '[' || ch == '(' || ch == '{') stack.push(ch); else if (ch == ']' || ch == ')' || ch == '}') { int prev = stack.pop(); if ((ch == ']' && prev != '[') || (ch == ')' && prev != '(') || (ch == '}' && prev != '{')) break; } } fclose(fp); printf("[%s] 파일 검사결과:\n", filename); if (!stack.isEmpty()) printf("Error! (라인수=%d, 문자수=%d)\n\n", nLine, nChar); else printf(" OK: (라인수=%d, 문자수=%d)\n\n", nLine, nChar); return stack.isEmpty(); }
f1e14accce31a942755fe38383b9e13e3d4b05fa
c59ec5f46f8681d83f7d2a22c85b3b7dc0e24bf9
/лаб 1 задание 3/лаб 1 задание 3/лаб 1 задание 3.cpp
43f7db65b8013e9907aa71a7d9a04bbe8207f365
[]
no_license
olyalashkina/GLAZKOV
b12c187cfa275859b318c49d7e0f103e4f43a8d1
7f996930dca5bbd3b3ee8420898a12b0cc5b98e5
refs/heads/main
2023-06-15T10:15:49.479267
2021-06-28T10:19:51
2021-06-28T10:19:51
380,981,315
0
0
null
null
null
null
UTF-8
C++
false
false
893
cpp
лаб 1 задание 3.cpp
#include <iostream> using namespace std; int main() { setlocale(LC_ALL, "Ru"); int m[3][3]; cout << "Введите значения матрицы: " << endl; for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { cout << "m[" << i << "][" << j << "] = "; cin >> m[i][j]; } } cout << endl << "Готовый массив:" << endl; for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { //вывод матрицы cout << m[i][j] << " "; } cout << endl; } int d; d = m[0][0] * m[1][1] * m[2][2] + m[0][1] * m[1][2] * m[2][0] + m[0][2] * m[1][0] * m[2][1] - m[0][2] * m[1][1] * m[2][0] - m[0][0] * m[1][2] * m[2][1] - m[0][1] * m[1][0] * m[2][2]; //считаем определитель матрицы cout << endl << endl << "Определитель матрицы = " << d; }
14af7596e79602f36e179008ffdf09dc3afed3e8
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_2652486_1/C++/ichyo/1C_2.cpp
6f41b3c1ab1fa37d28614904167a9b92a196bdda
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
C++
false
false
2,057
cpp
1C_2.cpp
#include <iostream> #include <sstream> #include <string> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <set> #include <map> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <cassert> using namespace std; #define FOR(i,k,n) for(int i=(k); i<(int)(n); ++i) #define REP(i,n) FOR(i,0,n) #define FORIT(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i) template<class T> void debug(T begin, T end){ for(T i = begin; i != end; ++i) cerr<<*i<<" "; cerr<<endl; } inline bool valid(int x, int y, int W, int H){ return (x >= 0 && y >= 0 && x < W && y < H); } typedef long long ll; const int INF = 100000000; const double EPS = 1e-8; const int MOD = 1000000007; int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1}; int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1}; vector< vector<int> > cards; int T, R, N, M, K; int tmp[12]; void dfs(int k, int last){ if(k == N){ vector<int> c; REP(i, N) c.push_back(tmp[i]); cards.push_back(c); return; } for(int i = last; i <= M; i++){ tmp[k] = i; dfs(k + 1, i); } } double pos[20000]; map<ll, double> pos2[20000]; void init(){ dfs(0, 2); double fact[15]; fact[1] = 1.0; for(int i = 2; i < 15; i++) fact[i] = fact[i - 1] * i; REP(i, cards.size()){ vector<int> c = cards[i]; map<int, int> cnt; REP(j, c.size()) cnt[c[j]]++; pos[i] = fact[c.size()]; FORIT(it, cnt) pos[i] /= fact[it->second]; } REP(i, cards.size()){ vector<int> c = cards[i]; REP(S, 1 << c.size()){ ll mul = 1; REP(j, c.size()) if(S >> j & 1) mul *= c[j]; pos2[i][mul] += 1.0; } } } int main(){ cin >> T >> R >> N >> M >> K; init(); printf("Case #1:\n"); REP(iter, R){ vector<ll> v(K); REP(i, K) cin >> v[i]; double max_p = 0; vector<int> ans; REP(i, cards.size()){ double p = pos[i]; REP(j, K) p *= pos2[i][v[j]]; if(p > max_p){ p = max_p; ans = cards[i]; } } REP(i, ans.size()) cout << ans[i]; cout << endl; } return 0; }
d7f3f89684ea0e7d43c4d0423e6ad96de9ff39ed
a61e4651b938bc61184fc3e0e2b033d63d405535
/tests/uptestserviceregistry_unittest.cpp
6db17de2021cc3145ee61c701dd74e9233f32b26
[]
no_license
ha2ne2/peercast-yt
8a8615fcfdb4c65dbfb9ac337771d0fc41a90ebe
d12715cb6d2afcc00502ec14a5522730b2a4720b
refs/heads/master
2021-01-19T19:02:54.850095
2017-10-23T14:06:14
2017-10-23T14:06:14
88,395,471
0
1
null
2017-04-16T06:25:24
2017-04-16T06:25:24
null
UTF-8
C++
false
false
2,238
cpp
uptestserviceregistry_unittest.cpp
#include <gtest/gtest.h> #include "uptest.h" class UptestServiceRegistryFixture : public ::testing::Test { public: UptestServiceRegistryFixture() { } void SetUp() { } void TearDown() { } ~UptestServiceRegistryFixture() { } UptestServiceRegistry r; }; TEST_F(UptestServiceRegistryFixture, initialState) { ASSERT_EQ(0, r.m_providers.size()); } TEST_F(UptestServiceRegistryFixture, addURL) { ASSERT_EQ(0, r.m_providers.size()); r.addURL("http://example.com"); ASSERT_EQ(1, r.m_providers.size()); } TEST_F(UptestServiceRegistryFixture, getURLs) { r.addURL("http://example.com/1"); r.addURL("http://example.com/2"); auto vec = r.getURLs(); ASSERT_EQ("http://example.com/1", vec[0]); ASSERT_EQ("http://example.com/2", vec[1]); } TEST_F(UptestServiceRegistryFixture, clear) { r.addURL("http://example.com"); ASSERT_EQ(1, r.m_providers.size()); r.clear(); ASSERT_EQ(0, r.m_providers.size()); } TEST_F(UptestServiceRegistryFixture, isIndexValid) { ASSERT_FALSE(r.isIndexValid(0)); ASSERT_FALSE(r.isIndexValid(1)); r.addURL("http://example.com"); ASSERT_TRUE(r.isIndexValid(0)); ASSERT_FALSE(r.isIndexValid(1)); } TEST_F(UptestServiceRegistryFixture, writeVariable) { ASSERT_EQ("0", r.getVariable("numURLs")); } TEST_F(UptestServiceRegistryFixture, writeVariable_loop) { r.addURL("http://example.com/1"); ASSERT_EQ("http://example.com/1", r.getVariable("url", 0)); ASSERT_EQ("Untried", r.getVariable("status", 0)); ASSERT_EQ("", r.getVariable("speed", 0)); ASSERT_EQ("", r.getVariable("over", 0)); ASSERT_EQ("", r.getVariable("checkable", 0)); r.m_providers[0].m_info.speed = "100"; r.m_providers[0].m_info.over = "0"; r.m_providers[0].m_info.checkable = "1"; ASSERT_EQ("100", r.getVariable("speed", 0)); ASSERT_EQ("0", r.getVariable("over", 0)); ASSERT_EQ("1", r.getVariable("checkable", 0)); } TEST_F(UptestServiceRegistryFixture, deleteByIndex) { r.addURL("http://example.com/1"); r.addURL("http://example.com/2"); r.deleteByIndex(0); ASSERT_EQ(1, r.m_providers.size()); ASSERT_EQ("http://example.com/2", r.m_providers[0].url); }
dea27b36e10da9e6fc122d19e198cc4b05a2e51a
54f85829cda7ae8322aae14f5e60fe5fe1234d12
/Syl3D/gui/guimanager.h
d0d1f80ab7bd259efe29f8c2b9a920b16dac0d27
[ "MIT" ]
permissive
Jedi18/Syl3D
128f00a1c292727c2df4be56292976f213348ec4
8f62a3cd5349eaff83c36e9366003da61888ec73
refs/heads/master
2023-02-27T15:31:30.673352
2021-02-03T07:40:47
2021-02-03T07:40:47
290,950,828
2
2
MIT
2021-01-13T17:21:36
2020-08-28T04:29:56
C++
UTF-8
C++
false
false
458
h
guimanager.h
#pragma once #include <glad/glad.h> #include <GLFW/glfw3.h> #include "../vendor/imgui/imgui.h" #include "../vendor/imgui/imgui_impl_glfw.h" #include "../vendor/imgui/imgui_impl_opengl3.h" namespace gui { class GUIManager { public: void initialize(GLFWwindow* window); void render(); void cleanUp(); void toolsMenu(); bool mouseOnGUI() const; private: const char* glsl_version = "#version 330"; bool show_demo_window = true; }; }
83d4834ab881c3659270c71742dd46b007337bae
9a0f56f6c1e33d26449f9cfa2c4dcc70635a5d22
/Labs/lab4/Node.cpp
a66984506eb2a99d43cb393ca43eeec66e267a54
[]
no_license
JayOfferdahl/eecs560-DataStructures
85871cdb082a5dcbe21f9ba0ca75583dd383fcf7
95e716988a4a7649b75c0fd230c531553814b49b
refs/heads/master
2021-06-01T08:43:15.829482
2016-05-17T01:10:36
2016-05-17T01:10:36
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,353
cpp
Node.cpp
//***************************************************************************** // // Author: Jay Offerdahl // Class: EECS 560 (Data Structures) // Lab: Tues. 11a - 12:50p // Lab #: 4 // //***************************************************************************** #include "Node.h" #include <iostream> #include <exception> // Construct a Node with the input name, x, and y coordinates Node::Node(std::string name, int x, int y) { // Initialize stored information setName(name); setX(x); setY(y); // Initialize Pointers parent = nullptr; left = nullptr; right = nullptr; } // Return the city stored in this Node std::string Node::getName() { return m_name; } // Return the x coordinate of this Node int Node::getX() { return m_x; } // Return the y coordinate of this Node int Node::getY() { return m_y; } // Set the citry name stored in this Node to the input string void Node::setName(std::string name) { m_name = name; } // Set the x coordinate of this Node void Node::setX(int x) { m_x = x; } // Set the y coordinate of this Node void Node::setY(int y) { m_y = y; } // Return the balance factor of this Node int Node::getHeight() { return m_height; } // Set the balance factor of this Node void Node::setHeight(int height) { m_height = height; } // Prints out the Node void Node::print() { std::cout << getName(); }
2f4c12b3d1a7344dff55a1ce50a73b23c84bbc49
4c958d966495f7886c89b101f65cf968712139ef
/Server_v1.1/test/server/inc/DBManager.h
4ee051613f1f0ccc78863b1375758188282fbd95
[]
no_license
van76007/SecureDNS
94ca27e1aa37f7b6537961ee6293138e8879af51
db8df79c85aa8d5cec94e8c48cfe201ee49f4e33
refs/heads/master
2016-09-06T10:21:21.873168
2015-01-25T08:34:26
2015-01-25T08:34:26
29,673,454
0
1
null
null
null
null
UTF-8
C++
false
false
1,729
h
DBManager.h
#ifndef __DBMANAGER_H__ #define __DBMANAGER__ #include <boost/thread.hpp> #include <boost/thread/mutex.hpp> // For posix::time #include <boost/date_time/gregorian/gregorian.hpp> #include <boost/date_time/posix_time/posix_time.hpp> #include <boost/date_time/posix_time/posix_time_types.hpp> // For cdb #include <cdb.h> #include <fcntl.h> #include "Config.h" using namespace std; // +DOMAIN ?? typedef enum { IP = 0, MALWARE = 1, CHILDPORN = 2, WHITELIST = 3 } DB_t; namespace screenDNS { // Implement 1_Writer, N_Readers using shared_mutex. // See later if we need to implement Singleton class DBManager { public: // Constructor DBManager(); void setupDB(string cdbDirPath, DB_t dbType); // log_content will give hint from which physical file we populate pointer to CDB in memory void writeDB(string log_content); // Pass structure using a structure reference bool readDB(struct cdb &cdb); // Reader and Monitor classes need to know database type DB_t getDBType() { return m_dbType; }; string getcdbDirPath() { return m_cdbDirPath; }; private: // Construct full path to cdb file, e.g.: "/usr/home/dvv/" + "Malware" + "1/2" + ".cdb" string m_cdbDirPath; // e.g. "/usr/home/dvv/" DB_t m_dbType; // Share mutex to synchronize access Read/Write to DB mutable boost::shared_mutex rw_mutex; // DB here is conceptually modelled as a string, which is supposed to be the content of LOG struct cdb c; // Pointer to content of DB in memory bool initialized; // To signal if c is already populated or not }; } #endif /* __DBMANAGER_H__ */
91934706a94372bdfd5c161b55ae04231d99c60c
d4ef6fd80e242ae4c85660b51ba5a4680e7661eb
/v3d_main/vrrenderer/V3dR_Communicator.h
da2f22e751445690f8ef69512e77e67c68882bd8
[ "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
JaneliaSciComp/v3d_external
30f5253699ba8c710df8549245fa2ff50b37f64b
d515fefcf06cba346601b62e3652ab0b09860038
refs/heads/master
2021-01-25T04:22:21.301915
2019-02-15T14:21:36
2019-02-15T14:21:36
93,433,792
0
1
null
2017-06-05T18:19:17
2017-06-05T18:19:17
null
UTF-8
C++
false
false
1,103
h
V3dR_Communicator.h
#ifndef V3DR_COMMUNICATOR_H #define V3DR_COMMUNICATOR_H #include <QWidget> #include <QtGui> //#include <QtCore/QCoreApplication> #include <QTcpSocket> //#include <QRegExpValidator> //#ifdef _WIN32 // #include <windows.h> //#endif #include "../basic_c_fun/v3d_interface.h" //class CMainApplication; class My4DImage; class MainWindow; class V3dR_Communicator : public QWidget { Q_OBJECT public: explicit V3dR_Communicator(bool *client_flag = 0, QList<NeuronTree>* ntlist=0); ~V3dR_Communicator(); void onReadySend(QString &send_MSG); bool SendLoginRequest(); //void StartVRScene(QList<NeuronTree>* ntlist, My4DImage *i4d, MainWindow *pmain,bool isLinkSuccess); void Update3DViewNTList(QString &msg, int type); public slots: //void RunVRMainloop(); //void SendHMDPosition(); private slots: void onReadyRead(); void onConnected(); void onDisconnected(); private: QTcpSocket* socket; QString userName; QString vr_Port; bool CURRENT_DATA_IS_SENT; bool * clienton; QList<NeuronTree> *NTList_3Dview; int NTNumReceieved; }; #endif // V3DR_COMMUNICATOR_H
98d066387050c278a52a6440cebfddcdb47e4efd
b9b966952e88619c9c5d754fea0f0e25fdb1a219
/libcaf_net/caf/net/http/arg_parser.hpp
46aa6b36059f29e78b5a0f49554f24ed93cbbb41
[]
permissive
actor-framework/actor-framework
7b152504b95b051db292696a803b2add6dbb484d
dd16d703c91e359ef421f04a848729f4fd652d08
refs/heads/master
2023-08-23T18:22:34.479331
2023-08-23T09:31:36
2023-08-23T09:31:36
1,439,738
2,842
630
BSD-3-Clause
2023-09-14T17:33:55
2011-03-04T14:59:50
C++
UTF-8
C++
false
false
1,157
hpp
arg_parser.hpp
// This file is part of CAF, the C++ Actor Framework. See the file LICENSE in // the main distribution directory for license terms and copyright or visit // https://github.com/actor-framework/actor-framework/blob/master/LICENSE. #pragma once #include "caf/detail/parse.hpp" #include <optional> namespace caf::net::http { /// Customization point for adding custom types to the `<arg>` parsing of the /// @ref router. template <class> struct arg_parser; template <> struct arg_parser<std::string> { std::optional<std::string> parse(std::string_view str) { return std::string{str}; } }; template <class T> struct builtin_arg_parser { std::optional<T> parse(std::string_view str) { auto tmp = T{}; if (auto err = detail::parse(str, tmp); !err) return tmp; else return std::nullopt; } }; template <class T, bool IsArithmetic = std::is_arithmetic_v<T>> struct arg_parser_oracle { using type = arg_parser<T>; }; template <class T> struct arg_parser_oracle<T, true> { using type = builtin_arg_parser<T>; }; template <class T> using arg_parser_t = typename arg_parser_oracle<T>::type; } // namespace caf::net::http
b488bc609c19ca8261b22e25dcae72435408a0a5
e6e435005251f101e7b458d6bdf5fef0453b5902
/src/worker.cpp
4850dc647807c095d5e62e47edc61d9616a6f211
[]
no_license
kushalbabel/Socket-Programming
2dfb8ec445d9ca3c5f46e1172e6eeeeab7805ee3
9448a54b4fce4d3c47b1e647ab5bae7c41ebb552
refs/heads/master
2021-05-03T21:47:53.380015
2016-10-21T07:20:07
2016-10-21T07:20:07
71,539,947
0
0
null
null
null
null
UTF-8
C++
false
false
5,717
cpp
worker.cpp
#include <iostream> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include <arpa/inet.h> using namespace std; #define numeric "0123456789" #define small "abcdefghijklmnopqrstuvwxyz" #define big "ABCDEFGHIJKLMNOPQRSTUVWXYZ" char* dest_ip; int dest_port; string salt = ""; string searchspace = "" ; int spacelen; string encode (bool found, string cracked){ string result; if (found){ result = '1'; } else{ result = '0'; } result = result + ',' + cracked+";"; return result; } void decode(string received, string& type, string& target, int& pwd_length, string& start, string& end){ int i = 0; int j = 0; for (;;j++){ if (received[j] == ','){ break; } } type = received.substr(i,j-i); j++; i = j; for (;;j++){ if (received[j] == ','){ break; } } target = received.substr(i,j-i); j++; pwd_length = received[j]-'0'; j+=2; start = received.substr(j,2*pwd_length); j = j+2*pwd_length+1; end = received.substr(j,2*pwd_length); salt = target.substr(0,2); return; } void next (int* curr, int pwd_length){ for (int i = pwd_length-1; i >= 0; i--){ if (curr[i]==spacelen-1){ curr[i] = 0; } else{ curr[i] = curr[i] + 1; break; } } } bool match(int* curr, string target, int pwd_length){ string currstr = ""; for (int i=0; i<pwd_length;i++){ currstr = currstr + searchspace[curr[i]]; } char *temp1 = new char[currstr.size()]; char temp2[2]; temp2[0] = salt[0]; temp2[1] = salt[1]; for (int i=0;i<currstr.size();i++){ temp1[i] = currstr[i]; } //char* temp3 = new char[target.size()]; /*for (int i=0;i<target.size();i++){ temp3[i] = target[i]; }*/ string hash = crypt(temp1,temp2); if (hash == target) { return true; } else { return false; } } void setspace(string type){ searchspace=""; if (type[0]=='1'){ searchspace += numeric; } if (type[1]=='1'){ searchspace += small; } if (type[2]=='1'){ searchspace += big; } spacelen = searchspace.size(); } bool equality (int* curr, int* final, int pwd_length){ for (int i=0;i<pwd_length;i++){ if (curr[i]!=final[i]){ return false; } } return true; } void print (int* curr, int pwd_length){ for (int i=0;i<pwd_length;i++){ cout<<curr[i]; } cout<<endl; return; } void error(const char *msg) { perror(msg); exit(0); } int main(int argc, char* argv[]) { dest_ip = argv[1]; dest_port = stoi(argv[2]); int sockfd; struct sockaddr_in serv_addr; struct hostent *server; char buffer[256]; sockfd = socket(AF_INET, SOCK_STREAM, 0); if (sockfd < 0) { cout<<"ERROR opening socket"<<endl; return -1; } bzero((char *) &serv_addr, sizeof(serv_addr)); serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = inet_addr(dest_ip); serv_addr.sin_port = htons(dest_port); if (connect(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) { cout<<"ERROR connecting"<<endl; return -1; } cout<<"Connected to Server"; string greeting = ",w"; strcpy(buffer, greeting.c_str()); // greeting the server to let it know that the client is a worker send(sockfd, buffer, sizeof(buffer), 0); string type,target,start,end; int pwd_length; while(true) { bzero(buffer,256); recv(sockfd, buffer, sizeof(buffer), 0); cout<<"Received from Server : "<<endl; printf("%s\n", buffer); string received; int k = 0; while(k<256 && buffer[k]!=';') { received = received + buffer[k]; k++; } //extract type, target, pwd_length, start, end from received message decode(received,type,target,pwd_length,start,end); setspace(type); bool found = false; string result; string cracked = ""; int* curr = new int[pwd_length]; int* final = new int[pwd_length]; //convert start and end to curr and final encoding in decimals for(int i=0;i<pwd_length;i++){ curr[i] = start[2*i+1] - '0'; curr[i] = curr[i] + 10*(start[2*i]-'0'); final[i] = end[2*i+1] - '0'; final[i] = final[i] + 10*(end[2*i]-'0'); } //ready to start iterating over all combinations cout<<searchspace<<endl; for (;!equality(curr,final,pwd_length);){ if (match(curr,target,pwd_length)){ found = true; break; } else{ next(curr,pwd_length); } } if (match(curr,target,pwd_length)){ found = true; } if (found){ for (int i=0;i<pwd_length;i++){ cracked = cracked+searchspace[curr[i]]; } } string result_final = encode(found, cracked); // result_final contains the results. If no password was found, result_final = "0," // else result_final = "1,password" cout<<"Final Result : "<<result_final<<endl; strcpy(buffer, result_final.c_str()); printf("Sending to Server : %s\n", buffer); send(sockfd, buffer, sizeof(buffer), 0); } close(sockfd); return 0; }
31fcda1c82a00e3a15f0398df5508acdb108dc4e
ab24243914c96f1c04ba41cdf1c27effe5a56741
/implementation/testFile/testFile.cc
21b57c6fc6074f979640a2acc572bfa3281cb739
[]
no_license
d3bird/RevolutionHackathon
fb169aef4687c75737fe92260c2c9bf283c4ac27
c9a3613b7dca7b4190861c9482735fb201437840
refs/heads/master
2020-04-26T10:20:33.440945
2019-03-18T14:01:23
2019-03-18T14:01:23
173,483,476
1
0
null
null
null
null
UTF-8
C++
false
false
105
cc
testFile.cc
#include <iostream> using namespace std; int main() { cout << "\n\nThis is the child program!\n\n"; }
991d5c840e959c0bf1160b915a67506a59f8de6c
8be023f90d9a18f4917af4bba8fb31230df3df2a
/SigLog_MibLib/agent/extend.cpp
f65d9fe4d278266f4248e32178ded31ddb09573b
[]
no_license
duniansampa/SigLog
d6dba1c0e851e1c8d3aef3af4bb85b4d038ab9c9
3dae0e42a36ebc5dca46fb044d3b1d40152ec786
refs/heads/master
2021-01-10T12:25:17.511236
2016-03-12T18:38:19
2016-03-12T18:38:19
44,571,851
0
0
null
null
null
null
UTF-8
C++
false
false
59,394
cpp
extend.cpp
#include <siglog/net-snmp-config.h> #include <siglog/net-snmp-features.h> #include <siglog/net-snmp-includes.h> #include <siglog/agent/net-snmp-agent-includes.h> #include <siglog/agent/watcher.h> #include <siglog/agent/agent_callbacks.h> #include "agent/extend.h" #include "utilities/execute.h" #include "struct.h" #ifndef USING_UCD_SNMP_EXTENSIBLE_MODULE #include "util_funcs/header_simple_table.h" #include "mibdefs.h" #define SHELLCOMMAND 3 #endif netsnmp_feature_require(extract_table_row_data) netsnmp_feature_require(table_data_delete_table) #ifndef NETSNMP_NO_WRITE_SUPPORT netsnmp_feature_require(insert_table_row) #endif /* NETSNMP_NO_WRITE_SUPPORT */ oid ns_extend_oid[] = { 1, 3, 6, 1, 4, 1, 8072, 1, 3, 2 }; oid extend_count_oid[] = { 1, 3, 6, 1, 4, 1, 8072, 1, 3, 2, 1 }; oid extend_config_oid[] = { 1, 3, 6, 1, 4, 1, 8072, 1, 3, 2, 2 }; oid extend_out1_oid[] = { 1, 3, 6, 1, 4, 1, 8072, 1, 3, 2, 3 }; oid extend_out2_oid[] = { 1, 3, 6, 1, 4, 1, 8072, 1, 3, 2, 4 }; typedef struct extend_registration_block_s { netsnmp_table_data *dinfo; oid *root_oid; size_t oid_len; long num_entries; netsnmp_extend *ehead; netsnmp_handler_registration *reg[4]; struct extend_registration_block_s *next; } extend_registration_block; extend_registration_block *ereg_head = NULL; #ifndef USING_UCD_SNMP_EXTENSIBLE_MODULE typedef struct netsnmp_old_extend_s { unsigned int idx; netsnmp_extend *exec_entry; netsnmp_extend *efix_entry; } netsnmp_old_extend; unsigned int num_compatability_entries = 0; unsigned int max_compatability_entries = 50; netsnmp_old_extend *compatability_entries; char *cmdlinebuf; size_t cmdlinesize; WriteMethod fixExec2Error; FindVarMethod var_extensible_old; oid old_extensible_variables_oid[] = { NETSNMP_UCDAVIS_MIB, NETSNMP_SHELLMIBNUM, 1 }; #ifndef NETSNMP_NO_WRITE_SUPPORT struct variable2 old_extensible_variables[] = { {MIBINDEX, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, var_extensible_old, 1, {MIBINDEX}}, {ERRORNAME, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, var_extensible_old, 1, {ERRORNAME}}, {SHELLCOMMAND, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, var_extensible_old, 1, {SHELLCOMMAND}}, {ERRORFLAG, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, var_extensible_old, 1, {ERRORFLAG}}, {ERRORMSG, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, var_extensible_old, 1, {ERRORMSG}}, {ERRORFIX, ASN_INTEGER, NETSNMP_OLDAPI_RWRITE, var_extensible_old, 1, {ERRORFIX}}, {ERRORFIXCMD, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, var_extensible_old, 1, {ERRORFIXCMD}} }; #else /* !NETSNMP_NO_WRITE_SUPPORT */ struct variable2 old_extensible_variables[] = { {MIBINDEX, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, var_extensible_old, 1, {MIBINDEX}}, {ERRORNAME, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, var_extensible_old, 1, {ERRORNAME}}, {SHELLCOMMAND, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, var_extensible_old, 1, {SHELLCOMMAND}}, {ERRORFLAG, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, var_extensible_old, 1, {ERRORFLAG}}, {ERRORMSG, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, var_extensible_old, 1, {ERRORMSG}}, {ERRORFIX, ASN_INTEGER, NETSNMP_OLDAPI_RONLY, var_extensible_old, 1, {ERRORFIX}}, {ERRORFIXCMD, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, var_extensible_old, 1, {ERRORFIXCMD}} }; #endif /* !NETSNMP_NO_WRITE_SUPPORT */ #endif /************************* * * Main initialisation routine * *************************/ extend_registration_block * _find_extension_block( oid *name, size_t name_len ) { extend_registration_block *eptr; size_t len; for ( eptr=ereg_head; eptr; eptr=eptr->next ) { len = SNMP_MIN(name_len, eptr->oid_len); if (!snmp_oid_compare( name, len, eptr->root_oid, eptr->oid_len)) return eptr; } return NULL; } extend_registration_block * _register_extend( oid *base, size_t len ) { extend_registration_block *eptr; oid oid_buf[MAX_OID_LEN]; netsnmp_table_data *dinfo; netsnmp_table_registration_info *tinfo; netsnmp_watcher_info *winfo; netsnmp_handler_registration *reg = NULL; int rc; for ( eptr=ereg_head; eptr; eptr=eptr->next ) { if (!snmp_oid_compare( base, len, eptr->root_oid, eptr->oid_len)) return eptr; } if (!eptr) { eptr = SNMP_MALLOC_TYPEDEF( extend_registration_block ); if (!eptr) return NULL; eptr->root_oid = snmp_duplicate_objid( base, len ); eptr->oid_len = len; eptr->num_entries = 0; eptr->ehead = NULL; eptr->dinfo = netsnmp_create_table_data( "nsExtendTable" ); eptr->next = ereg_head; ereg_head = eptr; } dinfo = eptr->dinfo; memcpy( oid_buf, base, len*sizeof(oid) ); /* * Register the configuration table */ tinfo = SNMP_MALLOC_TYPEDEF( netsnmp_table_registration_info ); netsnmp_table_helper_add_indexes( tinfo, ASN_OCTET_STR, 0 ); tinfo->min_column = COLUMN_EXTCFG_FIRST_COLUMN; tinfo->max_column = COLUMN_EXTCFG_LAST_COLUMN; oid_buf[len] = 2; #ifndef NETSNMP_NO_WRITE_SUPPORT reg = netsnmp_create_handler_registration( "nsExtendConfigTable", handle_nsExtendConfigTable, oid_buf, len+1, HANDLER_CAN_RWRITE); #else /* !NETSNMP_NO_WRITE_SUPPORT */ reg = netsnmp_create_handler_registration( "nsExtendConfigTable", handle_nsExtendConfigTable, oid_buf, len+1, HANDLER_CAN_RONLY); #endif /* !NETSNMP_NO_WRITE_SUPPORT */ rc = netsnmp_register_table_data( reg, dinfo, tinfo ); if (rc != SNMPERR_SUCCESS) { goto bail; } netsnmp_handler_owns_table_info(reg->handler->next); eptr->reg[0] = reg; /* * Register the main output table * using the same table_data handle. * This is sufficient to link the two tables, * and implement the AUGMENTS behaviour */ tinfo = SNMP_MALLOC_TYPEDEF( netsnmp_table_registration_info ); netsnmp_table_helper_add_indexes( tinfo, ASN_OCTET_STR, 0 ); tinfo->min_column = COLUMN_EXTOUT1_FIRST_COLUMN; tinfo->max_column = COLUMN_EXTOUT1_LAST_COLUMN; oid_buf[len] = 3; reg = netsnmp_create_handler_registration( "nsExtendOut1Table", handle_nsExtendOutput1Table, oid_buf, len+1, HANDLER_CAN_RONLY); rc = netsnmp_register_table_data( reg, dinfo, tinfo ); if (rc != SNMPERR_SUCCESS) goto bail; netsnmp_handler_owns_table_info(reg->handler->next); eptr->reg[1] = reg; /* * Register the multi-line output table * using a simple table helper. * This handles extracting the indexes from * the request OID, but leaves most of * the work to our handler routine. * Still, it was nice while it lasted... */ tinfo = SNMP_MALLOC_TYPEDEF( netsnmp_table_registration_info ); netsnmp_table_helper_add_indexes( tinfo, ASN_OCTET_STR, ASN_INTEGER, 0 ); tinfo->min_column = COLUMN_EXTOUT2_FIRST_COLUMN; tinfo->max_column = COLUMN_EXTOUT2_LAST_COLUMN; oid_buf[len] = 4; reg = netsnmp_create_handler_registration( "nsExtendOut2Table", handle_nsExtendOutput2Table, oid_buf, len+1, HANDLER_CAN_RONLY); rc = netsnmp_register_table( reg, tinfo ); if (rc != SNMPERR_SUCCESS) goto bail; netsnmp_handler_owns_table_info(reg->handler->next); eptr->reg[2] = reg; /* * Register a watched scalar to keep track of the number of entries */ oid_buf[len] = 1; reg = netsnmp_create_handler_registration( "nsExtendNumEntries", NULL, oid_buf, len+1, HANDLER_CAN_RONLY); winfo = netsnmp_create_watcher_info( &(eptr->num_entries), sizeof(eptr->num_entries), ASN_INTEGER, WATCHER_FIXED_SIZE); rc = netsnmp_register_watched_scalar2( reg, winfo ); if (rc != SNMPERR_SUCCESS) goto bail; eptr->reg[3] = reg; return eptr; bail: if (eptr->reg[3]) netsnmp_unregister_handler(eptr->reg[3]); if (eptr->reg[2]) netsnmp_unregister_handler(eptr->reg[2]); if (eptr->reg[1]) netsnmp_unregister_handler(eptr->reg[1]); if (eptr->reg[0]) netsnmp_unregister_handler(eptr->reg[0]); return NULL; } static void _unregister_extend(extend_registration_block *eptr) { extend_registration_block *prev; netsnmp_assert(eptr); for (prev = ereg_head; prev && prev->next != eptr; prev = prev->next) ; if (prev) { netsnmp_assert(eptr == prev->next); prev->next = eptr->next; } else { netsnmp_assert(eptr == ereg_head); ereg_head = eptr->next; } netsnmp_table_data_delete_table(eptr->dinfo); free(eptr->root_oid); free(eptr); } int extend_clear_callback(int majorID, int minorID, void *serverarg, void *clientarg) { extend_registration_block *eptr, *enext = NULL; for ( eptr=ereg_head; eptr; eptr=enext ) { enext=eptr->next; netsnmp_unregister_handler( eptr->reg[0] ); netsnmp_unregister_handler( eptr->reg[1] ); netsnmp_unregister_handler( eptr->reg[2] ); netsnmp_unregister_handler( eptr->reg[3] ); SNMP_FREE(eptr); } ereg_head = NULL; return 0; } void init_extend( void ) { snmpd_register_config_handler("extend", extend_parse_config, NULL, NULL); snmpd_register_config_handler("extend-sh", extend_parse_config, NULL, NULL); snmpd_register_config_handler("extendfix", extend_parse_config, NULL, NULL); snmpd_register_config_handler("exec2", extend_parse_config, NULL, NULL); snmpd_register_config_handler("sh2", extend_parse_config, NULL, NULL); snmpd_register_config_handler("execFix2", extend_parse_config, NULL, NULL); (void)_register_extend( ns_extend_oid, OID_LENGTH(ns_extend_oid)); #ifndef USING_UCD_SNMP_EXTENSIBLE_MODULE snmpd_register_config_handler("exec", extend_parse_config, NULL, NULL); snmpd_register_config_handler("sh", extend_parse_config, NULL, NULL); snmpd_register_config_handler("execFix", extend_parse_config, NULL, NULL); compatability_entries = (netsnmp_old_extend *) calloc( max_compatability_entries, sizeof(netsnmp_old_extend)); REGISTER_MIB("ucd-extensible", old_extensible_variables, variable2, old_extensible_variables_oid); #endif snmp_register_callback(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_PRE_UPDATE_CONFIG, extend_clear_callback, NULL); } void shutdown_extend(void) { #ifndef USING_UCD_SNMP_EXTENSIBLE_MODULE free(compatability_entries); compatability_entries = NULL; #endif while (ereg_head) _unregister_extend(ereg_head); } /************************* * * Cached-data hooks * see 'cache_handler' helper * *************************/ int extend_load_cache(netsnmp_cache *cache, void *magic) { #ifndef USING_UTILITIES_EXECUTE_MODULE NETSNMP_LOGONCE((LOG_WARNING,"support for run_exec_command not available\n")); return -1; #else int out_len = 1024*100; char out_buf[ 1024*100 ]; int cmd_len = 255*2 + 2; /* 2 * DisplayStrings */ char cmd_buf[ 255*2 + 2 ]; int ret; char *cp; char *line_buf[ 1024 ]; netsnmp_extend *extension = (netsnmp_extend *)magic; if (!magic) return -1; DEBUGMSGTL(( "nsExtendTable:cache", "load %s", extension->token )); if ( extension->args ) snprintf( cmd_buf, cmd_len, "%s %s", extension->command, extension->args ); else snprintf( cmd_buf, cmd_len, "%s", extension->command ); if ( extension->flags & NS_EXTEND_FLAGS_SHELL ) ret = run_shell_command( cmd_buf, extension->input, out_buf, &out_len); else ret = run_exec_command( cmd_buf, extension->input, out_buf, &out_len); DEBUGMSG(( "nsExtendTable:cache", ": %s : %d\n", cmd_buf, ret)); if (ret >= 0) { if (out_buf[ out_len-1 ] == '\n') out_buf[ --out_len ] = '\0'; /* Stomp on trailing newline */ extension->output = strdup( out_buf ); extension->out_len = out_len; /* * Now we need to pick the output apart into separate lines. * Start by counting how many lines we've got, and keeping * track of where each line starts in a static buffer */ extension->numlines = 1; line_buf[ 0 ] = extension->output; for (cp=extension->output; *cp; cp++) { if (*cp == '\n') { line_buf[ extension->numlines++ ] = cp+1; } } if ( extension->numlines > 1 ) { extension->lines = (char**)calloc( sizeof(char *), extension->numlines ); memcpy( extension->lines, line_buf, sizeof(char *) * extension->numlines ); } else { extension->lines = &extension->output; } } extension->result = ret; return ret; #endif /* !defined(USING_UTILITIES_EXECUTE_MODULE) */ } void extend_free_cache(netsnmp_cache *cache, void *magic) { netsnmp_extend *extension = (netsnmp_extend *)magic; if (!magic) return; DEBUGMSGTL(( "nsExtendTable:cache", "free %s\n", extension->token )); if (extension->output) { SNMP_FREE(extension->output); extension->output = NULL; } if ( extension->numlines > 1 ) { SNMP_FREE(extension->lines); } extension->lines = NULL; extension->out_len = 0; extension->numlines = 0; } /************************* * * Utility routines for setting up a new entry * (either via SET requests, or the config file) * *************************/ void _free_extension( netsnmp_extend *extension, extend_registration_block *ereg ) { netsnmp_extend *eptr = NULL; netsnmp_extend *eprev = NULL; if (!extension) return; if (ereg) { /* Unlink from 'ehead' list */ for (eptr=ereg->ehead; eptr; eptr=eptr->next) { if (eptr == extension) break; eprev = eptr; } if (!eptr) { snmp_log(LOG_ERR, "extend: fell off end of list before finding extension\n"); return; } if (eprev) eprev->next = eptr->next; else ereg->ehead = eptr->next; netsnmp_table_data_remove_and_delete_row( ereg->dinfo, extension->row); } SNMP_FREE( extension->token ); SNMP_FREE( extension->cache ); SNMP_FREE( extension->command ); SNMP_FREE( extension->args ); SNMP_FREE( extension->input ); SNMP_FREE( extension ); return; } netsnmp_extend * _new_extension( char *exec_name, int exec_flags, extend_registration_block *ereg ) { netsnmp_extend *extension; netsnmp_table_row *row; netsnmp_extend *eptr1, *eptr2; netsnmp_table_data *dinfo = ereg->dinfo; if (!exec_name) return NULL; extension = SNMP_MALLOC_TYPEDEF( netsnmp_extend ); if (!extension) return NULL; extension->token = strdup( exec_name ); extension->flags = exec_flags; extension->cache = netsnmp_cache_create( 0, extend_load_cache, extend_free_cache, NULL, 0 ); if (extension->cache) extension->cache->magic = extension; row = netsnmp_create_table_data_row(); if (!row || !extension->cache) { _free_extension( extension, ereg ); SNMP_FREE( row ); return NULL; } row->data = (void *)extension; extension->row = row; netsnmp_table_row_add_index( row, ASN_OCTET_STR, exec_name, strlen(exec_name)); if ( netsnmp_table_data_add_row( dinfo, row) != SNMPERR_SUCCESS ) { /* _free_extension( extension, ereg ); */ SNMP_FREE( extension ); /* Probably not sufficient */ SNMP_FREE( row ); return NULL; } ereg->num_entries++; /* * Now add this structure to a private linked list. * We don't need this for the main tables - the * 'table_data' helper will take care of those. * But it's probably easier to handle the multi-line * output table ourselves, for which we need access * to the underlying data. * So we'll keep a list internally as well. */ for ( eptr1 = ereg->ehead, eptr2 = NULL; eptr1; eptr2 = eptr1, eptr1 = eptr1->next ) { if (strlen( eptr1->token ) > strlen( exec_name )) break; if (strlen( eptr1->token ) == strlen( exec_name ) && strcmp( eptr1->token, exec_name ) > 0 ) break; } if ( eptr2 ) eptr2->next = extension; else ereg->ehead = extension; extension->next = eptr1; return extension; } void extend_parse_config(const char *token, char *cptr) { netsnmp_extend *extension; char exec_name[STRMAX]; char exec_name2[STRMAX]; /* For use with UCD execFix directive */ char exec_command[STRMAX]; oid oid_buf[MAX_OID_LEN]; size_t oid_len; extend_registration_block *eptr; int flags; cptr = copy_nword(cptr, exec_name, sizeof(exec_name)); if ( *exec_name == '.' ) { oid_len = MAX_OID_LEN - 2; if (0 == read_objid( exec_name, oid_buf, &oid_len )) { config_perror("ERROR: Unrecognised OID" ); return; } cptr = copy_nword(cptr, exec_name, sizeof(exec_name)); if (!strcmp( token, "sh" ) || !strcmp( token, "exec" )) { config_perror("ERROR: This output format has been deprecated - Please use the 'extend' directive instead" ); return; } } else { memcpy( oid_buf, ns_extend_oid, sizeof(ns_extend_oid)); oid_len = OID_LENGTH(ns_extend_oid); } cptr = copy_nword(cptr, exec_command, sizeof(exec_command)); /* XXX - check 'exec_command' exists & is executable */ flags = (NS_EXTEND_FLAGS_ACTIVE | NS_EXTEND_FLAGS_CONFIG); if (!strcmp( token, "sh" ) || !strcmp( token, "extend-sh" ) || !strcmp( token, "sh2" )) flags |= NS_EXTEND_FLAGS_SHELL; if (!strcmp( token, "execFix" ) || !strcmp( token, "extendfix" ) || !strcmp( token, "execFix2" )) { strcpy( exec_name2, exec_name ); strcat( exec_name, "Fix" ); flags |= NS_EXTEND_FLAGS_WRITEABLE; /* XXX - Check for shell... */ } eptr = _register_extend( oid_buf, oid_len ); if (!eptr) { snmp_log(LOG_ERR, "Failed to register extend entry '%s' - possibly duplicate name.\n", exec_name ); return; } extension = _new_extension( exec_name, flags, eptr ); if (extension) { extension->command = strdup( exec_command ); if (cptr) extension->args = strdup( cptr ); } else { snmp_log(LOG_ERR, "Failed to register extend entry '%s' - possibly duplicate name.\n", exec_name ); return; } #ifndef USING_UCD_SNMP_EXTENSIBLE_MODULE /* * Compatability with the UCD extTable */ if (!strcmp( token, "execFix" )) { int i; for ( i=0; i < num_compatability_entries; i++ ) { if (!strcmp( exec_name2, compatability_entries[i].exec_entry->token)) break; } if ( i == num_compatability_entries ) config_perror("No matching exec entry" ); else compatability_entries[ i ].efix_entry = extension; } else if (!strcmp( token, "sh" ) || !strcmp( token, "exec" )) { if ( num_compatability_entries == max_compatability_entries ) { /* XXX - should really use dynamic allocation */ netsnmp_old_extend *new_compatability_entries; new_compatability_entries = (netsnmp_old_extend*)realloc(compatability_entries, max_compatability_entries*2*sizeof(netsnmp_old_extend)); if (!new_compatability_entries) config_perror("No further UCD-compatible entries" ); else { memset(new_compatability_entries+num_compatability_entries, 0, sizeof(netsnmp_old_extend)*max_compatability_entries); max_compatability_entries *= 2; compatability_entries = new_compatability_entries; } } if (num_compatability_entries != max_compatability_entries) compatability_entries[ num_compatability_entries++ ].exec_entry = extension; } #endif } /************************* * * Main table handlers * Most of the work is handled * by the 'table_data' helper. * *************************/ int handle_nsExtendConfigTable(netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests) { netsnmp_request_info *request; netsnmp_table_request_info *table_info; netsnmp_extend *extension; extend_registration_block *eptr; int i; int need_to_validate = 0; for ( request=requests; request; request=request->next ) { if (request->processed) continue; table_info = netsnmp_extract_table_info( request ); extension = (netsnmp_extend*)netsnmp_extract_table_row_data( request ); DEBUGMSGTL(( "nsExtendTable:config", "varbind: ")); DEBUGMSGOID(("nsExtendTable:config", request->requestvb->name, request->requestvb->name_length)); DEBUGMSG(( "nsExtendTable:config", " (%s)\n", se_find_label_in_slist("agent_mode", reqinfo->mode))); switch (reqinfo->mode) { case MODE_GET: switch (table_info->colnum) { case COLUMN_EXTCFG_COMMAND: snmp_set_var_typed_value( request->requestvb, ASN_OCTET_STR, extension->command, (extension->command)?strlen(extension->command):0); break; case COLUMN_EXTCFG_ARGS: snmp_set_var_typed_value( request->requestvb, ASN_OCTET_STR, extension->args, (extension->args)?strlen(extension->args):0); break; case COLUMN_EXTCFG_INPUT: snmp_set_var_typed_value( request->requestvb, ASN_OCTET_STR, extension->input, (extension->input)?strlen(extension->input):0); break; case COLUMN_EXTCFG_CACHETIME: snmp_set_var_typed_value( request->requestvb, ASN_INTEGER, (u_char*)&extension->cache->timeout, sizeof(int)); break; case COLUMN_EXTCFG_EXECTYPE: i = ((extension->flags & NS_EXTEND_FLAGS_SHELL) ? NS_EXTEND_ETYPE_SHELL : NS_EXTEND_ETYPE_EXEC); snmp_set_var_typed_value( request->requestvb, ASN_INTEGER, (u_char*)&i, sizeof(i)); break; case COLUMN_EXTCFG_RUNTYPE: i = ((extension->flags & NS_EXTEND_FLAGS_WRITEABLE) ? NS_EXTEND_RTYPE_RWRITE : NS_EXTEND_RTYPE_RONLY); snmp_set_var_typed_value( request->requestvb, ASN_INTEGER, (u_char*)&i, sizeof(i)); break; case COLUMN_EXTCFG_STORAGE: i = ((extension->flags & NS_EXTEND_FLAGS_CONFIG) ? ST_PERMANENT : ST_VOLATILE); snmp_set_var_typed_value( request->requestvb, ASN_INTEGER, (u_char*)&i, sizeof(i)); break; case COLUMN_EXTCFG_STATUS: i = ((extension->flags & NS_EXTEND_FLAGS_ACTIVE) ? RS_ACTIVE : RS_NOTINSERVICE); snmp_set_var_typed_value( request->requestvb, ASN_INTEGER, (u_char*)&i, sizeof(i)); break; default: netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHOBJECT); continue; } break; /********** * * Start of SET handling * * All config objects are potentially writable except * nsExtendStorage which is fixed as either 'permanent' * (if read from a config file) or 'volatile' (if set via SNMP) * The string-based settings of a 'permanent' entry cannot * be changed - neither can the execution or run type. * Such entries can be (temporarily) marked as inactive, * and the cache timeout adjusted, but these changes are * not persistent. * **********/ #ifndef NETSNMP_NO_WRITE_SUPPORT case MODE_SET_RESERVE1: /* * Validate the new assignments */ switch (table_info->colnum) { case COLUMN_EXTCFG_COMMAND: if (request->requestvb->type != ASN_OCTET_STR) { netsnmp_set_request_error(reqinfo, request, SNMP_ERR_WRONGTYPE); return SNMP_ERR_WRONGTYPE; } /* * Must have a full path to the command * XXX - Assumes Unix-style paths */ if (request->requestvb->val_len == 0 || request->requestvb->val.string[0] != '/') { netsnmp_set_request_error(reqinfo, request, SNMP_ERR_WRONGVALUE); return SNMP_ERR_WRONGVALUE; } /* * XXX - need to check this file exists * (and is executable) */ if (extension && extension->flags & NS_EXTEND_FLAGS_CONFIG) { /* * config entries are "permanent" so can't be changed */ netsnmp_set_request_error(reqinfo, request, SNMP_ERR_NOTWRITABLE); return SNMP_ERR_NOTWRITABLE; } break; case COLUMN_EXTCFG_ARGS: case COLUMN_EXTCFG_INPUT: if (request->requestvb->type != ASN_OCTET_STR) { netsnmp_set_request_error(reqinfo, request, SNMP_ERR_WRONGTYPE); return SNMP_ERR_WRONGTYPE; } if (extension && extension->flags & NS_EXTEND_FLAGS_CONFIG) { /* * config entries are "permanent" so can't be changed */ netsnmp_set_request_error(reqinfo, request, SNMP_ERR_NOTWRITABLE); return SNMP_ERR_NOTWRITABLE; } break; case COLUMN_EXTCFG_CACHETIME: if (request->requestvb->type != ASN_INTEGER) { netsnmp_set_request_error(reqinfo, request, SNMP_ERR_WRONGTYPE); return SNMP_ERR_WRONGTYPE; } i = *request->requestvb->val.integer; /* * -1 is a special value indicating "don't cache" * [[ XXX - should this be 0 ?? ]] * Otherwise, cache times must be non-negative */ if (i < -1 ) { netsnmp_set_request_error(reqinfo, request, SNMP_ERR_WRONGVALUE); return SNMP_ERR_WRONGVALUE; } break; case COLUMN_EXTCFG_EXECTYPE: if (request->requestvb->type != ASN_INTEGER) { netsnmp_set_request_error(reqinfo, request, SNMP_ERR_WRONGTYPE); return SNMP_ERR_WRONGTYPE; } i = *request->requestvb->val.integer; if (i<1 || i>2) { /* 'exec(1)' or 'shell(2)' only */ netsnmp_set_request_error(reqinfo, request, SNMP_ERR_WRONGVALUE); return SNMP_ERR_WRONGVALUE; } if (extension && extension->flags & NS_EXTEND_FLAGS_CONFIG) { /* * config entries are "permanent" so can't be changed */ netsnmp_set_request_error(reqinfo, request, SNMP_ERR_NOTWRITABLE); return SNMP_ERR_NOTWRITABLE; } break; case COLUMN_EXTCFG_RUNTYPE: if (request->requestvb->type != ASN_INTEGER) { netsnmp_set_request_error(reqinfo, request, SNMP_ERR_WRONGTYPE); return SNMP_ERR_WRONGTYPE; } /* * 'run-on-read(1)', 'run-on-set(2)' * or 'run-command(3)' only */ i = *request->requestvb->val.integer; if (i<1 || i>3) { netsnmp_set_request_error(reqinfo, request, SNMP_ERR_WRONGVALUE); return SNMP_ERR_WRONGVALUE; } /* * 'run-command(3)' can only be used with * a pre-existing 'run-on-set(2)' entry. */ if (i==3 && !(extension && (extension->flags & NS_EXTEND_FLAGS_WRITEABLE))) { netsnmp_set_request_error(reqinfo, request, SNMP_ERR_INCONSISTENTVALUE); return SNMP_ERR_INCONSISTENTVALUE; } /* * 'run-command(3)' is the only valid assignment * for permanent (i.e. config) entries */ if ((extension && extension->flags & NS_EXTEND_FLAGS_CONFIG) && i!=3 ) { netsnmp_set_request_error(reqinfo, request, SNMP_ERR_INCONSISTENTVALUE); return SNMP_ERR_INCONSISTENTVALUE; } break; case COLUMN_EXTCFG_STATUS: if (request->requestvb->type != ASN_INTEGER) { netsnmp_set_request_error(reqinfo, request, SNMP_ERR_WRONGTYPE); return SNMP_ERR_WRONGTYPE; } i = *request->requestvb->val.integer; switch (i) { case RS_ACTIVE: case RS_NOTINSERVICE: if (!extension) { /* Must be used with existing rows */ netsnmp_set_request_error(reqinfo, request, SNMP_ERR_INCONSISTENTVALUE); return SNMP_ERR_INCONSISTENTVALUE; } break; /* OK */ case RS_CREATEANDGO: case RS_CREATEANDWAIT: if (extension) { /* Can only be used to create new rows */ netsnmp_set_request_error(reqinfo, request, SNMP_ERR_INCONSISTENTVALUE); return SNMP_ERR_INCONSISTENTVALUE; } break; case RS_DESTROY: break; default: netsnmp_set_request_error(reqinfo, request, SNMP_ERR_WRONGVALUE); return SNMP_ERR_WRONGVALUE; } break; default: netsnmp_set_request_error(reqinfo, request, SNMP_ERR_NOTWRITABLE); return SNMP_ERR_NOTWRITABLE; } break; case MODE_SET_RESERVE2: switch (table_info->colnum) { case COLUMN_EXTCFG_STATUS: i = *request->requestvb->val.integer; switch (i) { case RS_CREATEANDGO: case RS_CREATEANDWAIT: eptr = _find_extension_block( request->requestvb->name, request->requestvb->name_length ); extension = _new_extension( (char *) table_info->indexes->val.string, 0, eptr ); if (!extension) { /* failed */ netsnmp_set_request_error(reqinfo, request, SNMP_ERR_RESOURCEUNAVAILABLE); return SNMP_ERR_RESOURCEUNAVAILABLE; } netsnmp_insert_table_row( request, extension->row ); } } break; case MODE_SET_FREE: switch (table_info->colnum) { case COLUMN_EXTCFG_STATUS: i = *request->requestvb->val.integer; switch (i) { case RS_CREATEANDGO: case RS_CREATEANDWAIT: eptr = _find_extension_block( request->requestvb->name, request->requestvb->name_length ); _free_extension( extension, eptr ); } } break; case MODE_SET_ACTION: switch (table_info->colnum) { case COLUMN_EXTCFG_COMMAND: extension->old_command = extension->command; extension->command = netsnmp_strdup_and_null( request->requestvb->val.string, request->requestvb->val_len); break; case COLUMN_EXTCFG_ARGS: extension->old_args = extension->args; extension->args = netsnmp_strdup_and_null( request->requestvb->val.string, request->requestvb->val_len); break; case COLUMN_EXTCFG_INPUT: extension->old_input = extension->input; extension->input = netsnmp_strdup_and_null( request->requestvb->val.string, request->requestvb->val_len); break; case COLUMN_EXTCFG_STATUS: i = *request->requestvb->val.integer; switch (i) { case RS_ACTIVE: case RS_CREATEANDGO: need_to_validate = 1; } break; } break; case MODE_SET_UNDO: switch (table_info->colnum) { case COLUMN_EXTCFG_COMMAND: if ( extension && extension->old_command ) { SNMP_FREE(extension->command); extension->command = extension->old_command; extension->old_command = NULL; } break; case COLUMN_EXTCFG_ARGS: if ( extension && extension->old_args ) { SNMP_FREE(extension->args); extension->args = extension->old_args; extension->old_args = NULL; } break; case COLUMN_EXTCFG_INPUT: if ( extension && extension->old_input ) { SNMP_FREE(extension->input); extension->input = extension->old_input; extension->old_input = NULL; } break; case COLUMN_EXTCFG_STATUS: i = *request->requestvb->val.integer; switch (i) { case RS_CREATEANDGO: case RS_CREATEANDWAIT: eptr = _find_extension_block( request->requestvb->name, request->requestvb->name_length ); _free_extension( extension, eptr ); } break; } break; case MODE_SET_COMMIT: switch (table_info->colnum) { case COLUMN_EXTCFG_CACHETIME: i = *request->requestvb->val.integer; extension->cache->timeout = i; break; case COLUMN_EXTCFG_RUNTYPE: i = *request->requestvb->val.integer; switch (i) { case 1: extension->flags &= ~NS_EXTEND_FLAGS_WRITEABLE; break; case 2: extension->flags |= NS_EXTEND_FLAGS_WRITEABLE; break; case 3: (void)netsnmp_cache_check_and_reload( extension->cache ); break; } break; case COLUMN_EXTCFG_EXECTYPE: i = *request->requestvb->val.integer; if ( i == NS_EXTEND_ETYPE_SHELL ) extension->flags |= NS_EXTEND_FLAGS_SHELL; else extension->flags &= ~NS_EXTEND_FLAGS_SHELL; break; case COLUMN_EXTCFG_STATUS: i = *request->requestvb->val.integer; switch (i) { case RS_ACTIVE: case RS_CREATEANDGO: extension->flags |= NS_EXTEND_FLAGS_ACTIVE; break; case RS_NOTINSERVICE: case RS_CREATEANDWAIT: extension->flags &= ~NS_EXTEND_FLAGS_ACTIVE; break; case RS_DESTROY: eptr = _find_extension_block( request->requestvb->name, request->requestvb->name_length ); _free_extension( extension, eptr ); break; } } break; #endif /* !NETSNMP_NO_WRITE_SUPPORT */ default: netsnmp_set_request_error(reqinfo, request, SNMP_ERR_GENERR); return SNMP_ERR_GENERR; } } #ifndef NETSNMP_NO_WRITE_SUPPORT /* * If we're marking a given row as active, * then we need to check that it's ready. */ if (need_to_validate) { for ( request=requests; request; request=request->next ) { if (request->processed) continue; table_info = netsnmp_extract_table_info( request ); extension = (netsnmp_extend*)netsnmp_extract_table_row_data( request ); switch (table_info->colnum) { case COLUMN_EXTCFG_STATUS: i = *request->requestvb->val.integer; if (( i == RS_ACTIVE || i == RS_CREATEANDGO ) && !(extension && extension->command && extension->command[0] == '/' /* && is_executable(extension->command) */)) { netsnmp_set_request_error(reqinfo, request, SNMP_ERR_INCONSISTENTVALUE); return SNMP_ERR_INCONSISTENTVALUE; } } } } #endif /* !NETSNMP_NO_WRITE_SUPPORT */ return SNMP_ERR_NOERROR; } int handle_nsExtendOutput1Table(netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests) { netsnmp_request_info *request; netsnmp_table_request_info *table_info; netsnmp_extend *extension; int len; for ( request=requests; request; request=request->next ) { if (request->processed) continue; table_info = netsnmp_extract_table_info( request ); extension = (netsnmp_extend*)netsnmp_extract_table_row_data( request ); DEBUGMSGTL(( "nsExtendTable:output1", "varbind: ")); DEBUGMSGOID(("nsExtendTable:output1", request->requestvb->name, request->requestvb->name_length)); DEBUGMSG(( "nsExtendTable:output1", "\n")); switch (reqinfo->mode) { case MODE_GET: if (!extension || !(extension->flags & NS_EXTEND_FLAGS_ACTIVE)) { /* * If this row is inactive, then skip it. */ netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE); continue; } if (!(extension->flags & NS_EXTEND_FLAGS_WRITEABLE) && (netsnmp_cache_check_and_reload( extension->cache ) < 0 )) { /* * If reloading the output cache of a 'run-on-read' * entry fails, then skip it. */ netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE); continue; } if ((extension->flags & NS_EXTEND_FLAGS_WRITEABLE) && (netsnmp_cache_check_expired( extension->cache ) == 1 )) { /* * If the output cache of a 'run-on-write' * entry has expired, then skip it. */ netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE); continue; } switch (table_info->colnum) { case COLUMN_EXTOUT1_OUTLEN: snmp_set_var_typed_value( request->requestvb, ASN_INTEGER, (u_char*)&extension->out_len, sizeof(int)); break; case COLUMN_EXTOUT1_OUTPUT1: /* * If we've got more than one line, * find the length of the first one. * Otherwise find the length of the whole string. */ if (extension->numlines > 1) { len = (extension->lines[1])-(extension->output) -1; } else if (extension->output) { len = strlen(extension->output); } else { len = 0; } snmp_set_var_typed_value( request->requestvb, ASN_OCTET_STR, extension->output, len); break; case COLUMN_EXTOUT1_OUTPUT2: snmp_set_var_typed_value( request->requestvb, ASN_OCTET_STR, extension->output, (extension->output)?extension->out_len:0); break; case COLUMN_EXTOUT1_NUMLINES: snmp_set_var_typed_value( request->requestvb, ASN_INTEGER, (u_char*)&extension->numlines, sizeof(int)); break; case COLUMN_EXTOUT1_RESULT: snmp_set_var_typed_value( request->requestvb, ASN_INTEGER, (u_char*)&extension->result, sizeof(int)); break; default: netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHOBJECT); continue; } break; default: netsnmp_set_request_error(reqinfo, request, SNMP_ERR_GENERR); return SNMP_ERR_GENERR; } } return SNMP_ERR_NOERROR; } /************************* * * Multi-line output table handler * Most of the work is handled here. * *************************/ /* * Locate the appropriate entry for a given request */ netsnmp_extend * _extend_find_entry( netsnmp_request_info *request, netsnmp_table_request_info *table_info, int mode ) { netsnmp_extend *eptr; extend_registration_block *ereg; unsigned int line_idx; oid oid_buf[MAX_OID_LEN]; int oid_len; int i; char *token; size_t token_len; if (!request || !table_info || !table_info->indexes || !table_info->indexes->next_variable) { DEBUGMSGTL(( "nsExtendTable:output2", "invalid invocation\n")); return NULL; } ereg = _find_extension_block( request->requestvb->name, request->requestvb->name_length ); /*** * GET handling - find the exact entry being requested ***/ if ( mode == MODE_GET ) { DEBUGMSGTL(( "nsExtendTable:output2", "GET: %s / %ld\n ", table_info->indexes->val.string, *table_info->indexes->next_variable->val.integer)); for ( eptr = ereg->ehead; eptr; eptr = eptr->next ) { if ( !strcmp( eptr->token, (char *) table_info->indexes->val.string )) break; } if ( eptr ) { /* * Ensure the output is available... */ if (!(eptr->flags & NS_EXTEND_FLAGS_ACTIVE) || (netsnmp_cache_check_and_reload( eptr->cache ) < 0 )) return NULL; /* * ...and check the line requested is valid */ line_idx = *table_info->indexes->next_variable->val.integer; if (line_idx < 1 || line_idx > eptr->numlines) return NULL; } } /*** * GETNEXT handling - find the first suitable entry ***/ else { if (!table_info->indexes->val_len ) { DEBUGMSGTL(( "nsExtendTable:output2", "GETNEXT: first entry\n")); /* * Beginning of the table - find the first active * (and successful) entry, and use the first line of it */ for (eptr = ereg->ehead; eptr; eptr = eptr->next ) { if ((eptr->flags & NS_EXTEND_FLAGS_ACTIVE) && (netsnmp_cache_check_and_reload( eptr->cache ) >= 0 )) { line_idx = 1; break; } } } else { token = (char *) table_info->indexes->val.string; token_len = table_info->indexes->val_len; line_idx = *table_info->indexes->next_variable->val.integer; DEBUGMSGTL(( "nsExtendTable:output2", "GETNEXT: %s / %d\n ", token, line_idx )); /* * Otherwise, find the first entry not earlier * than the requested token... */ for (eptr = ereg->ehead; eptr; eptr = eptr->next ) { if ( strlen(eptr->token) > token_len ) break; if ( strlen(eptr->token) == token_len && strcmp(eptr->token, token) >= 0 ) break; } if (!eptr) return NULL; /* (assuming there is one) */ /* * ... and make sure it's active & the output is available * (or use the first following entry that is) */ for ( ; eptr; eptr = eptr->next ) { if ((eptr->flags & NS_EXTEND_FLAGS_ACTIVE) && (netsnmp_cache_check_and_reload( eptr->cache ) >= 0 )) { break; } line_idx = 1; } if (!eptr) return NULL; /* (assuming there is one) */ /* * If we're working with the same entry that was requested, * see whether we've reached the end of the output... */ if (!strcmp( eptr->token, token )) { if ( eptr->numlines <= line_idx ) { /* * ... and if so, move on to the first line * of the next (active and successful) entry. */ line_idx = 1; for (eptr = eptr->next ; eptr; eptr = eptr->next ) { if ((eptr->flags & NS_EXTEND_FLAGS_ACTIVE) && (netsnmp_cache_check_and_reload( eptr->cache ) >= 0 )) { break; } } } else { /* * Otherwise just use the next line of this entry. */ line_idx++; } } else { /* * If this is not the same entry that was requested, * then we should return the first line. */ line_idx = 1; } } if (eptr) { DEBUGMSGTL(( "nsExtendTable:output2", "GETNEXT -> %s / %d\n ", eptr->token, line_idx)); /* * Since we're processing a GETNEXT request, * now we've found the appropriate entry (and line), * we need to update the varbind OID ... */ memset(oid_buf, 0, sizeof(oid_buf)); oid_len = ereg->oid_len; memcpy( oid_buf, ereg->root_oid, oid_len*sizeof(oid)); oid_buf[ oid_len++ ] = 4; /* nsExtendOutput2Table */ oid_buf[ oid_len++ ] = 1; /* nsExtendOutput2Entry */ oid_buf[ oid_len++ ] = COLUMN_EXTOUT2_OUTLINE; /* string token index */ oid_buf[ oid_len++ ] = strlen(eptr->token); for ( i=0; i < (int)strlen(eptr->token); i++ ) oid_buf[ oid_len+i ] = eptr->token[i]; oid_len += strlen( eptr->token ); /* plus line number */ oid_buf[ oid_len++ ] = line_idx; snmp_set_var_objid( request->requestvb, oid_buf, oid_len ); /* * ... and index values to match. */ snmp_set_var_value( table_info->indexes, eptr->token, strlen(eptr->token)); snmp_set_var_value( table_info->indexes->next_variable, (const u_char*)&line_idx, sizeof(line_idx)); } } return eptr; /* Finally, signal success */ } /* * Multi-line output handler * Locate the appropriate entry (using _extend_find_entry) * and return the appropriate output line */ int handle_nsExtendOutput2Table(netsnmp_mib_handler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests) { netsnmp_request_info *request; netsnmp_table_request_info *table_info; netsnmp_extend *extension; char *cp; unsigned int line_idx; int len; for ( request=requests; request; request=request->next ) { if (request->processed) continue; table_info = netsnmp_extract_table_info( request ); extension = _extend_find_entry( request, table_info, reqinfo->mode ); DEBUGMSGTL(( "nsExtendTable:output2", "varbind: ")); DEBUGMSGOID(("nsExtendTable:output2", request->requestvb->name, request->requestvb->name_length)); DEBUGMSG(( "nsExtendTable:output2", " (%s)\n", (extension) ? extension->token : "[none]")); if (!extension) { if (reqinfo->mode == MODE_GET) netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE); else netsnmp_set_request_error(reqinfo, request, SNMP_ENDOFMIBVIEW); continue; } switch (reqinfo->mode) { case MODE_GET: case MODE_GETNEXT: switch (table_info->colnum) { case COLUMN_EXTOUT2_OUTLINE: /* * Determine which line we've been asked for.... */ line_idx = *table_info->indexes->next_variable->val.integer; if (line_idx < 1 || line_idx > extension->numlines) { netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE); continue; } cp = extension->lines[line_idx-1]; /* * ... and how long it is. */ if ( extension->numlines > line_idx ) len = (extension->lines[line_idx])-cp -1; else if (cp) len = strlen(cp); else len = 0; snmp_set_var_typed_value( request->requestvb, ASN_OCTET_STR, cp, len ); break; default: netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHOBJECT); continue; } break; default: netsnmp_set_request_error(reqinfo, request, SNMP_ERR_GENERR); return SNMP_ERR_GENERR; } } return SNMP_ERR_NOERROR; } #ifndef USING_UCD_SNMP_EXTENSIBLE_MODULE /************************* * * Compatability with the UCD extTable * *************************/ char * _get_cmdline(netsnmp_extend *extend) { size_t size; char *newbuf; const char *args = extend->args; if (args == NULL) /* Use empty string for processes without arguments. */ args = ""; size = strlen(extend->command) + strlen(args) + 2; if (size > cmdlinesize) { newbuf = (char *)realloc(cmdlinebuf, size); if (!newbuf) { free(cmdlinebuf); cmdlinebuf = NULL; cmdlinesize = 0; return NULL; } cmdlinebuf = newbuf; cmdlinesize = size; } sprintf(cmdlinebuf, "%s %s", extend->command, args); return cmdlinebuf; } u_char * var_extensible_old(struct variable * vp, oid * name, size_t * length, int exact, size_t * var_len, WriteMethod ** write_method) { netsnmp_old_extend *exten = NULL; static long long_ret; unsigned int idx; char *cmdline; if (header_simple_table (vp, name, length, exact, var_len, write_method, num_compatability_entries)) return (NULL); idx = name[*length-1] -1; if (idx > max_compatability_entries) return NULL; exten = &compatability_entries[ idx ]; if (exten) { switch (vp->magic) { case MIBINDEX: long_ret = name[*length - 1]; return ((u_char *) (&long_ret)); case ERRORNAME: /* name defined in config file */ *var_len = strlen(exten->exec_entry->token); return ((u_char *) (exten->exec_entry->token)); case SHELLCOMMAND: cmdline = _get_cmdline(exten->exec_entry); if (cmdline) *var_len = strlen(cmdline); return ((u_char *) cmdline); case ERRORFLAG: /* return code from the process */ netsnmp_cache_check_and_reload( exten->exec_entry->cache ); long_ret = exten->exec_entry->result; return ((u_char *) (&long_ret)); case ERRORMSG: /* first line of text returned from the process */ netsnmp_cache_check_and_reload( exten->exec_entry->cache ); if (exten->exec_entry->numlines > 1) { *var_len = (exten->exec_entry->lines[1])- (exten->exec_entry->output) -1; } else if (exten->exec_entry->output) { *var_len = strlen(exten->exec_entry->output); } else { *var_len = 0; } return ((u_char *) (exten->exec_entry->output)); case ERRORFIX: *write_method = fixExec2Error; long_return = 0; return ((u_char *) &long_return); case ERRORFIXCMD: if (exten->efix_entry) { cmdline = _get_cmdline(exten->efix_entry); if (cmdline) *var_len = strlen(cmdline); return ((u_char *) cmdline); } else { *var_len = 0; return ((u_char *) &long_return); /* Just needs to be non-null! */ } } return NULL; } return NULL; } int fixExec2Error(int action, u_char * var_val, u_char var_val_type, size_t var_val_len, u_char * statP, oid * name, size_t name_len) { netsnmp_old_extend *exten = NULL; unsigned int idx; idx = name[name_len-1] -1; exten = &compatability_entries[ idx ]; #ifndef NETSNMP_NO_WRITE_SUPPORT switch (action) { case MODE_SET_RESERVE1: if (var_val_type != ASN_INTEGER) { snmp_log(LOG_ERR, "Wrong type != int\n"); return SNMP_ERR_WRONGTYPE; } idx = *((long *) var_val); if (idx != 1) { snmp_log(LOG_ERR, "Wrong value != 1\n"); return SNMP_ERR_WRONGVALUE; } if (!exten || !exten->efix_entry) { snmp_log(LOG_ERR, "No command to run\n"); return SNMP_ERR_GENERR; } return SNMP_ERR_NOERROR; case MODE_SET_COMMIT: netsnmp_cache_check_and_reload( exten->efix_entry->cache ); } #endif /* !NETSNMP_NO_WRITE_SUPPORT */ return SNMP_ERR_NOERROR; } #endif /* USING_UCD_SNMP_EXTENSIBLE_MODULE */
b0ce8d3eeed89969227fb98d256610d7cf468ccb
46abb55fbd239db6865903cb371779c8048edcee
/GameTemplate/Game/Light.cpp
4c2b91e33e1f53730ff7c70c58722a87b456ba08
[]
no_license
yokoyamasota/Syuukatu
b3fd1d1b5ab8b560fc90f0a473afdb54745c9208
9f8187333743195693f07b10bc026b66c0ebb6f4
refs/heads/master
2023-09-03T09:44:39.101536
2021-11-05T02:21:54
2021-11-05T02:21:54
390,931,628
0
0
null
null
null
null
SHIFT_JIS
C++
false
false
2,968
cpp
Light.cpp
#include "stdafx.h" namespace { const Vector3 DIRLIG_DIR = { 1.0f, 1.0f ,-1.0f }; //ディレクションライトの初期方向 const Vector3 DIRLIG_COL = { 1.0f, 1.0f ,1.0f }; //ディレクションライトの初期色 const Vector3 SPOLIG_POS = { 0.0f, 0.0f ,0.0f }; //スポットライトの初期位置 const Vector3 SPOLIG_COL = { 1.0f, 1.0f ,1.0f }; //スポットライトの初期色 const Vector3 SPOLIG_DIR = { 1.0f, -1.0f ,-1.0f }; //スポットライトの初期方向 const float SPOLIG_RAN = 100.0f; //スポットライトの初期影響範囲 const float SPOLIG_ANG = 75.0f; //スポットライトの初期射出角度 } bool Light::Start() { //視点の位置を設定する m_ligData.eyePos = g_camera3D->GetPosition(); //Start関数のreturn文 return true; } Light::~Light() { } void Light::Update() { // ライトの強さを変更する m_ligData.dirLigData.ligColor.x += g_pad[0]->IsPress(enButtonA) * 0.05f; m_ligData.dirLigData.ligColor.y += g_pad[0]->IsPress(enButtonA) * 0.05f; m_ligData.dirLigData.ligColor.z += g_pad[0]->IsPress(enButtonA) * 0.05f; m_ligData.dirLigData.ligColor.x -= g_pad[0]->IsPress(enButtonB) * 0.05f; m_ligData.dirLigData.ligColor.y -= g_pad[0]->IsPress(enButtonB) * 0.05f; m_ligData.dirLigData.ligColor.z -= g_pad[0]->IsPress(enButtonB) * 0.05f; } //ディレクションライトの方向,色を設定する関数 void Light::SetDirectionLightData() { //ディレクションライトの方向を設定 m_ligData.dirLigData.ligDirection = DIRLIG_DIR; //ディレクションライトを正規化して大きさ1のベクトルにする m_ligData.dirLigData.ligDirection.Normalize(); //ディレクションライトの色を設定 m_ligData.dirLigData.ligColor = DIRLIG_COL; } //ポイントライトの座標,色,影響範囲を設定する関数 void Light::SetPointLightData(Vector3 x, Vector3 y, float z) { //ポイントライトの座標を設定 m_ligData.poiLigData.ptPosition = x; //ポイントライトの色を設定 m_ligData.poiLigData.ptColor = y; //ポイントライトの影響範囲を設定 m_ligData.poiLigData.ptRange = z; } //スポットライトの座標,色,方向,射出範囲,射出角度を設定する関数 void Light::SetSpotLightData() { //スポットライトの座標を設定 m_ligData.spotLigData.spPosition = SPOLIG_POS; //スポットライトの色を設定 m_ligData.spotLigData.spColor = SPOLIG_COL; //スポットライトの方向を設定 m_ligData.spotLigData.spDirection = SPOLIG_DIR; //方向データだから大きさを1にするために正規化をする m_ligData.spotLigData.spDirection.Normalize(); //スポットライトの射出範囲を設定 m_ligData.spotLigData.spRange = SPOLIG_RAN; //スポットライトの射出角度を設定 //(デグリー単位(75度)からラジアン単位に変換した値を代入) m_ligData.spotLigData.spAngle = Math::DegToRad(SPOLIG_ANG); }
1c94b13fd38b3b2336d29fb93ec609e5faa9d1cb
52cd559a55c31a4e7f903382b6e99182ecff87a7
/src/MiniFileSystem/MiniFileSystem/miniFSCommand/src/command/FdCommand.cpp
d8a79ea802845e6cfbb9daf872aa68e2be86cccd
[ "MIT" ]
permissive
LLFKirito/Mini-File-System---BIT1120161918
a2684164a532fd65a994be606ace8cab86627375
f0484538ec77b6c33014eafa64b83837ddd67468
refs/heads/master
2020-04-27T18:04:56.151244
2019-03-09T08:31:04
2019-03-09T08:31:04
174,553,290
2
0
null
null
null
null
GB18030
C++
false
false
1,286
cpp
FdCommand.cpp
/** * * Mini File System Project * * Copyright (c) 2018 Linfeng Li. All rights reserved. * **/ #include "../../include/command/FdCommand.h" bool FdCommand::Accept(const std::string & str) const { if (str == "fd") return true; else return false; } bool FdCommand::Action(MiniFileSystem * mfs, const std::vector<std::string>& argv) const { MFSConsole * point = MFSConsole::getInstance(); if (!mfs->isLoadSpace()) { point->LogLine("当前未挂载空间!"); return true; } if (mfs->isLoadFile()) { point->LogLine("当前已经打开某数据文件, 请使用close指令关闭该文件再做操作!"); return true; } if (argv.size() == 2) { int exe_res = mfs->findFile(argv[1].data()); if (exe_res != 1) { point->LogLine(argv[1], "不存在!"); return true; } } else { point->LogLine(argv[0], " 指令参数错误!"); return true; } return true; } void FdCommand::OutlineHelp() const { MFSConsole * point = MFSConsole::getInstance(); point->LogOutLineInfo(" fd ", " 查找文件(夹)", "fd <name>"); } void FdCommand::DetailHelp() const { MFSConsole * point = MFSConsole::getInstance(); point->LogDetailInfo("fd", "fd <name>", "用 fd 命令查找文件(夹)", "fd name 查找 name 文件(夹)"); } FdCommand::FdCommand() { }
5f153a1718b8b220464a18312ed6029c3a5ffdb2
b18adf09556fa66a9db188684c69ea48849bb01b
/Elsov/SkyFrame/HardwareTest/Tranceiver.cpp
42dc18a4f4aadbdc2093914196d845c5312d0c5e
[]
no_license
zzfd97/projects
d78e3fa6418db1a5a2580edcaef1f2e197d5bf8c
f8e7ceae143317d9e8461f3de8cfccdd7627c3ee
refs/heads/master
2022-01-12T19:56:48.014510
2019-04-05T05:30:31
2019-04-05T05:30:31
null
0
0
null
null
null
null
UTF-8
C++
false
false
131
cpp
Tranceiver.cpp
#include "stdafx.h" #include "Tranceiver.h" CTranceiver::CTranceiver() { } // virtual CTranceiver::~CTranceiver() { }
310bbf800e06d1315f505a04f2b43f694f947ecf
efc39e68b3e7f588cebe247a485013c84624ff55
/plugins/mmstd/include/mmstd/light/CallLight.h
607fec1f3171fd6111def7dcfb7b8ed50c9ecf2f
[ "BSD-3-Clause" ]
permissive
invor/megamol
5d913a6ed5f8315f15c938f6494da84ac5093ece
36f1061d34e930927cb18ae6b79690fe79d6c0ba
refs/heads/master
2023-08-04T22:10:56.033868
2023-03-20T15:33:49
2023-03-20T15:33:49
204,038,195
2
0
BSD-3-Clause
2022-10-10T16:59:40
2019-08-23T16:58:27
C++
UTF-8
C++
false
false
726
h
CallLight.h
/** * MegaMol * Copyright (c) 2017, MegaMol Dev Team * All rights reserved. */ #pragma once #include "mmcore/factories/CallAutoDescription.h" #include "mmstd/generic/CallGeneric.h" #include "LightCollection.h" namespace megamol::core::view::light { class CallLight : public core::GenericVersionedCall<LightCollection, core::EmptyMetaData> { public: CallLight() = default; ~CallLight() override = default; static const char* ClassName() { return "CallLight"; } static const char* Description() { return "Call that transports a collection of lights"; } }; typedef core::factories::CallAutoDescription<CallLight> CallLightDescription; } // namespace megamol::core::view::light
f7b0bfd0bc2dbb646e72567ca381d1839400b917
1d47ac9e74008601804ba050bfca4a8a36d596d1
/IP_Documentation/IPtask/GoalTrack.cpp
e78a2d1ae698639109b3ff0e4da2496942e7f35b
[ "BSD-3-Clause" ]
permissive
g4gekkouga/AUV_Summer_2019
4d1a21b54def008f0792fe80337e2e8f6939ea84
558cc3337a8c369c245dcaa551b02d81e5a4bfd3
refs/heads/master
2020-05-18T22:53:59.307377
2019-11-15T22:51:56
2019-11-15T22:51:56
184,700,012
1
2
null
null
null
null
UTF-8
C++
false
false
8,140
cpp
GoalTrack.cpp
#include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/video/video.hpp> #include <opencv2/video/tracking.hpp> #include <iostream> #include <vector> using namespace std; using namespace cv; #define Max_H_Black 60 int main() { Mat frame; // Kalman Filter int stateSize = 6; // 2-d position and velocity and width and height of the goapl post int measSize = 4; // 2-d position and width and height int contrSize = 0; KalmanFilter kf(stateSize, measSize, contrSize, CV_32F); Mat state(stateSize, 1, CV_32F); // [x,y,v_x,v_y,w,h] Mat meas(measSize, 1, CV_32F); // [x,y,w,h] // Transition State Matrix A // T is time between the measurements / updates // [ 1 0 T 0 0 0 ] x = x + v_x*T // [ 0 1 0 T 0 0 ] y = y + v_y*T setIdentity(kf.transitionMatrix); // A is set to I (Identity Matrix ) .... T is updated later // No Matrix B as acceleration is assumed to be 0 // Nosie in State Determination is also excluded // Measure Matrix H kf.measurementMatrix = Mat::zeros(measSize, stateSize, CV_32F); kf.measurementMatrix.at<float>(0) = 1.0f; // [ 1 0 0 0 0 0 ] kf.measurementMatrix.at<float>(7) = 1.0f; // [ 0 1 0 0 0 0 ] kf.measurementMatrix.at<float>(16) = 1.0f; // [ 0 0 0 0 1 0 ] kf.measurementMatrix.at<float>(23) = 1.0f; // [ 0 0 0 0 0 1 ] // Process Noise Covariance Matrix Q setIdentity(kf.processNoiseCov, cv::Scalar(1e-2)); // Default for Error in x y width and height kf.processNoiseCov.at<float>(14) = 5.0f; // Updating error for velocity kf.processNoiseCov.at<float>(21) = 5.0f; // Measures Noise Covariance Matrix R setIdentity(kf.measurementNoiseCov,Scalar(1e-1)); //Default Settings // Loading Video VideoCapture cap("3.avi"); cap >> frame; VideoWriter video("output_temp.avi",CV_FOURCC('M','J','P','G'),60, Size(frame.cols,frame.rows)); // Error in File Loading if (!cap.isOpened()) { cout << "Error in loading the video\n"; return -1; } cout << "\nHit 'x' to exit...\n"; char ch = 'a'; double ticks = 0; int found = 0; int notFoundCount = 0; // Video loop while (ch != 'x') { double precTick = ticks; ticks = (double) cv::getTickCount(); double T = (ticks - precTick) / cv::getTickFrequency(); //Current Ticks count - Precious Ticks Count Divided by Frequency cap >> frame; Mat res; frame.copyTo( res ); if (found) { // Matrix A // Updating the time from measurement to measurement kf.transitionMatrix.at<float>(2) = T; kf.transitionMatrix.at<float>(9) = T; cout << "T:" << endl << T << endl; state = kf.predict(); cout << "State post:" << endl << state << endl; Rect predRect; predRect.width = state.at<float>(4); predRect.height = state.at<float>(5); predRect.x = state.at<float>(0) - predRect.width / 2; predRect.y = state.at<float>(1) - predRect.height / 2; Point center; center.x = state.at<float>(0); center.y = state.at<float>(1); circle(res, center, 2, CV_RGB(255,255,255), -1); rectangle(res, predRect, CV_RGB(255,255,255), 2); stringstream sstr; // Display Estimated KF goal center sstr << "(" << center.x << "," << center.y << ")"; putText(res, sstr.str(), Point(center.x + 3, center.y - 3), FONT_HERSHEY_SIMPLEX, 0.5, CV_RGB(255,255,255), 2); } // Smoothening the Image Mat blur; GaussianBlur(frame, blur, cv::Size(5, 5), 3.0, 3.0); // HSV conversion // Required colours can be easily filtered from HSV format Mat frmHsv; cvtColor(blur, frmHsv, CV_BGR2HSV); // Color Thresholding Mat rangeRes = Mat::zeros(frame.size(), CV_8UC1); inRange(frmHsv, cv::Scalar(0,0,0), cv::Scalar(180, 255, Max_H_Black), rangeRes); // Improving the result erode(rangeRes, rangeRes, Mat(), Point(-1, -1), 2); dilate(rangeRes, rangeRes, Mat(), Point(-1, -1), 2); // Thresholding viewing imshow("Threshold", rangeRes); // Contours detection vector<vector<cv::Point> > contours; findContours(rangeRes, contours, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_NONE); // Filtering vector<vector<cv::Point> > Goals; vector<cv::Rect> Goals_Box; for (size_t i = 0; i < contours.size(); i++) { Rect gBox; gBox = boundingRect(contours[i]); // To get the Bounding Rectangle for the detected contours float ratio = (float) gBox.width / (float) gBox.height; // Searching for a goal Box almost square , shape of the goal post if (ratio >= 0.8 && ratio <= 1.25 && gBox.area() >= 10000) // the squar should be sufficiently large { Goals.push_back(contours[i]); Goals_Box.push_back(gBox); } } cout << "Goals found:" << Goals_Box.size() << endl; // Detection result for (size_t i = 0; i < Goals.size(); i++) { drawContours(res, Goals, i, CV_RGB(255,0,0), 1); rectangle(res, Goals_Box[i], CV_RGB(0,255,0), 2); Point center; center.x = Goals_Box[i].x + Goals_Box[i].width / 2; center.y = Goals_Box[i].y + Goals_Box[i].height / 2; circle(res, center, 2, CV_RGB(0,150,0), -1); stringstream sstr; sstr << "(" << center.x << "," << center.y << ")"; // putText(res, sstr.str(), Point(center.x + 3, center.y - 3),FONT_HERSHEY_SIMPLEX, 0.5, CV_RGB(0,150,0), 2); // Uncomment the above line to print center of Measured Goal on output } // Kalman Update if (Goals.size() == 0) { notFoundCount++; if( notFoundCount >= 100 ) { found = 0; cout << "Goal not Found for 100 continuous frames " << endl ; } } else { notFoundCount = 0; meas.at<float>(0) = Goals_Box[0].x + Goals_Box[0].width / 2; meas.at<float>(1) = Goals_Box[0].y + Goals_Box[0].height / 2; meas.at<float>(2) = (float)Goals_Box[0].width; meas.at<float>(3) = (float)Goals_Box[0].height; if (!found) // First detection { // Initialization kf.errorCovPre.at<float>(0) = 1; // px kf.errorCovPre.at<float>(7) = 1; // px kf.errorCovPre.at<float>(14) = 1; kf.errorCovPre.at<float>(21) = 1; kf.errorCovPre.at<float>(28) = 1; // px kf.errorCovPre.at<float>(35) = 1; // px state.at<float>(0) = meas.at<float>(0); state.at<float>(1) = meas.at<float>(1); state.at<float>(2) = 0; state.at<float>(3) = 0; state.at<float>(4) = meas.at<float>(2); state.at<float>(5) = meas.at<float>(3); kf.statePost = state; found = 1; } else kf.correct(meas); // Kalman Correction cout << "Measure matrix:" << endl << meas << endl; } imshow("Tracking", res); video.write(res); ch = waitKey(25); } cap.release(); video.release(); destroyAllWindows(); return 0; }
296a8f4b4d9131f947264c7a1edba0b477308075
6e90b0e4b74be26c3f196227b803d6daff57805f
/etude/memory/construct.hpp
04e034c09ade64bb4a7ce06ed645f58dd1b7fb11
[ "LicenseRef-scancode-unknown-license-reference", "BSL-1.0" ]
permissive
gintenlabo/etude
52472b652004383c76089f5145a7cab350b6eb05
c9e9db5cce72d560a50b1ab27a0ee675a725aefa
refs/heads/master
2016-09-07T19:08:57.455833
2013-08-09T09:54:51
2013-08-09T09:54:51
1,121,611
14
1
null
null
null
null
UTF-8
C++
false
false
5,488
hpp
construct.hpp
// // construct: // オブジェクトを構築します。 // // ::new(p) T(...) のスマートポインタ版です。 // 生ポインタを直接扱うよりは少しはマシになります。 // // Copyright (C) 2010-11 Takaya Saito (SubaruG) // Distributed under the Boost Software License, Version 1.0. // http://www.boost.org/LICENSE_1_0.txt // #ifndef ETUDE_MEMORY_INCLUDED_CONSTRUCT_HPP_ #define ETUDE_MEMORY_INCLUDED_CONSTRUCT_HPP_ #include <memory> #include "pseudo_destructor_call.hpp" #include "default_deallocate.hpp" #include "../utility/holder.hpp" #include "../unpacked_tuple.hpp" #include "apply_in_place.hpp" namespace etude { // void* 版 construct template< class T, class... Args, class Result = std::unique_ptr< T, pseudo_destructor_call<T> > > inline Result construct( void* p, Args&&... args ) { return Result( ::new(p) T( std::forward<Args>(args)... ) ); } // in_place_factory 版 template<class T, class InPlace, class Result = std::unique_ptr< T, pseudo_destructor_call<T> >, class = typename std::enable_if< is_in_place_applyable<InPlace, T>::value >::type > inline Result construct( InPlace && x, void* p ) { return Result( apply_in_place<T>( std::forward<InPlace>(x), p ) ); } // typed in place factory 版 template<class TypedInPlace, class T = typename typed_in_place_associated<TypedInPlace>::type, class Result = std::unique_ptr< T, pseudo_destructor_call<T> > > inline Result construct( TypedInPlace && x, void* p ) { return Result( apply_typed_in_place( std::forward<TypedInPlace>(x), p ) ); } // unpack 対応 template<class T, class Tuple, std::size_t... Indices, class Result = std::unique_ptr< T, pseudo_destructor_call<T> > > inline Result construct( void* p, unpacked_tuple<Tuple, Indices...> t ) { (void)t; // Indices... が空の場合の警告避け return Result( ::new(p) T( etude::move<Indices>(t)... ) ); } // unique_ptr 版 construct // 破棄してからメモリを解放するファンクタ template<class T, class Dealloc> class dispose_and_deallocate_ : private etude::holder<Dealloc> { typedef etude::holder<Dealloc> dealloc_; public: // holder<T>::pointer を隠すために必要 typedef T* pointer; dispose_and_deallocate_() = default; dispose_and_deallocate_( dispose_and_deallocate_ const& ) = default; dispose_and_deallocate_( dispose_and_deallocate_ && ) = default; template<class D/*, class = typename std::enable_if< std::is_convertible<D, Dealloc>::value >::type */> explicit dispose_and_deallocate_( D && d ) : dealloc_( std::forward<D>(d) ) {} Dealloc & get_deallocator() { return dealloc_::get(); } Dealloc const& get_deallocator() const { return dealloc_::get(); } void operator()( T* p ) { auto& dealloc = get_deallocator(); p->~T(); dealloc(p); } void operator()( T* p ) const { auto& dealloc = get_deallocator(); p->~T(); dealloc(p); } }; // 特殊版 // construct<T>( operator_new<T>(), ... ) の結果を std::unique_ptr<T> に入れられるよう template<class T> struct dispose_and_deallocate_< T, default_deallocate<T> > : std::default_delete<T> { dispose_and_deallocate_() = default; explicit dispose_and_deallocate_( default_deallocate<T> ) {} default_deallocate<T> get_deallocator() const { return default_deallocate<T>(); } }; // 通常版 template<class T, class D, class... Args, class Del = dispose_and_deallocate_<T, D>, class Result = std::unique_ptr<T, Del> > inline Result construct( std::unique_ptr<void, D> && p, Args&&... args ) { T* const pt = ::new( p.get() ) T( std::forward<Args>(args)... ); p.release(); return Result( pt, Del( std::forward<D>( p.get_deleter() ) ) ); } // in_place_factory 版 template<class T, class D, class InPlace, class Del = dispose_and_deallocate_<T, D>, class Result = std::unique_ptr<T, Del>, class = typename std::enable_if< is_in_place_applyable<InPlace, T>::value >::type > inline Result construct( InPlace && x, std::unique_ptr<void, D> && p ) { T* const pt = apply_in_place<T>( std::forward<InPlace>(x), p.get() ); p.release(); return Result( pt, Del( std::forward<D>( p.get_deleter() ) ) ); } // typed in place factory 版 template<class TypedInPlace, class D, class T = typename typed_in_place_associated<TypedInPlace>::type, class Del = dispose_and_deallocate_<T, D>, class Result = std::unique_ptr<T, Del> > inline Result construct( TypedInPlace && x, std::unique_ptr<void, D> && p ) { T* const pt = apply_typed_in_place( std::forward<TypedInPlace>(x), p.get() ); p.release(); return Result( pt, Del( std::forward<D>( p.get_deleter() ) ) ); } // unpack 対応 template<class T, class D, class Tuple, std::size_t... Indices, class Result = std::unique_ptr< T, dispose_and_deallocate_<T, D> > > inline Result construct( std::unique_ptr<void, D> && p, unpacked_tuple<Tuple, Indices...> t ){ (void)t; // Indices... が空の場合の警告避け return etude::construct<T>( std::move(p), etude::move<Indices>(t)... ); } } #endif // #ifndef ETUDE_MEMORY_INCLUDED_CONSTRUCT_HPP_
4d86d97e9af4a7dbecb99b72f836a70d6f2ca088
093010dd152dafcc3abe72acb54f7180554951bf
/ceng213/hw3/hw3.h
fb9e666601fdf9b726b995b7310cb2f1a3338edf
[]
no_license
scnepate/homeworks
612ce563ebe5ea32dd02932806ecdf44527246da
e597f07db7e2e0c7b85024db70df716e471a4b24
refs/heads/master
2020-05-27T17:04:37.979629
2019-05-26T17:59:34
2019-05-26T17:59:34
188,711,239
0
0
null
2019-05-26T17:39:55
2019-05-26T17:14:12
null
UTF-8
C++
false
false
1,880
h
hw3.h
#ifndef _HW3_H #define _HW3_H #include <iostream> #include <string> #include <vector> #include <utility> // use just for std::pair< > #include <fstream> #define MAX_LOAD_FACTOR 0.65 #define EMPTY (std::string("EMPTY")) #define DELETED (std::string("DELETED")) #define which_table (a) (a) class AccessControl { public: AccessControl(int table1Size, int table2Size); ~AccessControl(); int addUser(std::string username, std::string pass); int addUsers(std::string filePath); int delUser(std::string username, std::vector<std::string>& oldPasswords); int changePass(std::string username, std::string oldpass, std::string newpass); int login(std::string username, std::string pass); int logout(std::string username); float printActiveUsers(); float printPasswords(); // void printOldPasswords (); private: std::vector <std::pair <std::string, std::string> > regUsers; int n_regUsers; std::vector <std::string> activeUsers; int n_activeUsers; std::vector <std::pair <std::string, std::vector <std::string> > > oldPasswords; int n_oldPasswords; int updateSize (); int addOldPassword (std::string username, std::string password); std::string getPassword (std::string username); int hashFunction (std::string key, int tableSize, int index) { int length = key.length(); int newK = 0; for (int i = 0; i < length; i++) newK += (int) key[i]; // hash function 1 -> (newK % tableSize) // hash function 2 -> (newK * tableSize - 1) % tableSize) return ((newK % tableSize) + index * ((newK * tableSize - 1) % tableSize)) % tableSize; } int prime (int n) { if (!(n&1)) return 0; for (int i = 3; i*i <= n; i += 2) if (!(n%i)) return 0; return 1; } int findNextPrimeSize (int n) { for (n = 2*n+1; !prime (n); n += 2); return n; } }; #endif
926fc5e04fbb2469b91f5b27d80ec882a20838da
eeddea04cc4a615a4e75f52f638c5f47621dc100
/foundations/cpp/4/bmimetric.cpp
d7cdcd69eb0d8ecbabb7209295ade62cbb4ce1ce
[]
no_license
pernilongo/NYU
27abd08772fb7c9642b330ac5c00b487aa0163a7
704373c5007f75939c4dd4067e250a1e917934cd
refs/heads/main
2023-06-14T17:57:35.540866
2021-07-14T01:06:14
2021-07-14T01:06:14
328,179,029
0
0
null
null
null
null
UTF-8
C++
false
false
351
cpp
bmimetric.cpp
#include <iostream> #include <iomanip> using namespace std; int main() { double weight, height; cout << "Please enter weight in kilograms: "; cin >> weight; cout << "Please enter height in meters: "; cin >> height; double bmi = weight / (height * height); cout << std::fixed << std::setprecision(2) << "BMI is: " << bmi << endl; return 0; }
af96bcc8b5be2e095aed3c345e281a0abf94cca2
8ec9319e221bcf4b46d3f23e48c78158c6150a18
/C++/Searching/linear_search.cpp
c41932983140a12b0bf5f6272411d8459b9a5404
[ "MIT" ]
permissive
coding-freak456/algorithmsUse
40cf901e217cd45412f06b29b4c37a5f1e2fb27a
a98b7f8fa763ddfc51e43da89364be2f0a70fbd7
refs/heads/master
2023-01-04T19:21:14.722036
2020-11-01T11:45:16
2020-11-01T11:45:16
305,447,173
0
1
MIT
2020-11-01T11:45:17
2020-10-19T16:31:26
C++
UTF-8
C++
false
false
557
cpp
linear_search.cpp
#include <bits/stdc++.h> using namespace std; int linearSearch(int arr[], int n, int key) { for (int i = 0;i < n;i++) if (arr[i] == key)return i; return -1; } int main() { int n;cin >> n;//size of the array int arr[100005]; for (int i = 0;i < n;i++)cin >> arr[i];//taking input inside the array int key;cin >> key;//the value which is to be find int ans = linearSearch(arr, n, key); if (ans == -1) cout << "Element is not present in array" << endl; else cout << "Element is present at index " << ans << endl; return 0; }
afa70cc73d8987cf69ae2d820889d4c087c34198
e796cc676bc725a952aa6e0b2c2f22547035d2a3
/CListTest/ChildView.h
1be298569de1694681138c368a398dd46299a238
[]
no_license
pivant/MFC-PAINT-ETC-WIP2
56db016e4f3af33150312902841766fb4cb67f42
a0bde116637b55d450a3b429f1ddc90fb5f884b5
refs/heads/master
2021-01-21T10:25:14.159962
2017-05-18T12:06:52
2017-05-18T12:06:52
91,688,326
0
0
null
null
null
null
UHC
C++
false
false
1,181
h
ChildView.h
// ChildView.h : CChildView 클래스의 인터페이스 // #pragma once // CChildView 창 class CChildView : public CWnd { // 생성입니다. public: CChildView(); // 특성입니다. public: CList <CPoint> m_pt; CPoint m_st; CPoint m_ed; bool m_RButton; COLORREF colorchange; int elre; // 작업입니다. public: // 재정의입니다. protected: virtual BOOL PreCreateWindow(CREATESTRUCT& cs); // 구현입니다. public: virtual ~CChildView(); // 생성된 메시지 맵 함수 protected: afx_msg void OnPaint(); DECLARE_MESSAGE_MAP() public: afx_msg void OnMouseMove(UINT nFlags, CPoint point); afx_msg void OnRButtonDown(UINT nFlags, CPoint point); afx_msg void OnRButtonUp(UINT nFlags, CPoint point); afx_msg void OnColorchangeBlue(); afx_msg void OnUpdateColorchangeBlue(CCmdUI *pCmdUI); afx_msg void OnColorchangeRed(); afx_msg void OnUpdateColorchangeRed(CCmdUI *pCmdUI); afx_msg void OnColorchangeGreen(); afx_msg void OnUpdateColorchangeGreen(CCmdUI *pCmdUI); afx_msg void OnTbBlue(); afx_msg void OnTbGreen(); afx_msg void OnTbRed(); afx_msg void OnTbElli(); afx_msg void OnTbRect(); afx_msg BOOL OnEraseBkgnd(CDC* pDC); };
ab674a7535f5fe16e541d9e0e3e89588c1120880
d77eb9e88e5402d7e4dcf1d5bbd3df8f222bdf13
/P2_2_Contoh2(Soal 2).cpp
de5b558b947ae1cf753ff6a4710f813591c4c52c
[]
no_license
sanhaji182/ap1
3f9a3c78a09a7d55634cc8673e05b94d7f416b37
760835dcebf692a3cd0b95f9ff222063df4b900a
refs/heads/master
2021-01-10T03:57:42.002285
2016-03-22T08:04:36
2016-03-22T08:04:36
53,387,992
0
0
null
null
null
null
UTF-8
C++
false
false
425
cpp
P2_2_Contoh2(Soal 2).cpp
#include <iostream> using namespace std; int main() { int a,b,c,d; int r=10; int s; a=5; b=600; c=5; d=b*b-4*a*c; s=10+r++; cout << "d = "<<d<<'\n'; cout << "r = "<<r<<'\n'; cout << "s = "<<s<<'\n'; r=10; s=10 + ++r; cout << "r = "<<r<<'\n'; cout << "s = "<<s<<'\n'; cout << "Hasil dari 5 % 7 adalah "<<5%7<<'\n'; return 0; }
785d72ec66e2a631ad05e6b56f7911d6394a9f8b
193cacbe89f5b2ef2208ef075dedc1871464f5f4
/src/api/common/include/exchangepublicapi.hpp
848034e234e419e186bd517e7245ea9445fe3ff7
[ "MIT" ]
permissive
sssong81/coincenter
6c867fc39d9b096bafb71a9cb41295ed76dd29f5
5f46b89af3a10c4a85a1fe6d3cbda950b7b3c949
refs/heads/master
2023-04-22T21:43:08.753950
2021-05-05T06:53:20
2021-05-06T13:40:57
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,271
hpp
exchangepublicapi.hpp
#pragma once #include <optional> #include <string> #include <string_view> #include <unordered_map> #include "cachedresultvault.hpp" #include "cct_flatset.hpp" #include "cct_vector.hpp" #include "coincenterinfo.hpp" #include "currencyexchangeflatset.hpp" #include "exchangebase.hpp" #include "market.hpp" #include "marketorderbook.hpp" #include "monetaryamount.hpp" namespace cct { class FiatConverter; namespace api { class CryptowatchAPI; class ExchangePublic : public ExchangeBase { public: using MarketSet = FlatSet<Market>; using MarketOrderBookMap = std::unordered_map<Market, MarketOrderBook>; using MarketPriceMap = std::unordered_map<Market, MonetaryAmount>; using WithdrawalFeeMap = std::unordered_map<CurrencyCode, MonetaryAmount>; static constexpr std::string_view kSupportedExchanges[] = {"kraken", "binance", "bithumb", "upbit"}; ExchangePublic(const ExchangePublic &) = delete; ExchangePublic &operator=(const ExchangePublic &) = delete; ExchangePublic(ExchangePublic &&) = default; ExchangePublic &operator=(ExchangePublic &&) = default; virtual ~ExchangePublic() {} /// Retrieve the possible currencies known by current exchange. /// If some information is not known without any private key, information can be returned partially. virtual CurrencyExchangeFlatSet queryTradableCurrencies() = 0; virtual CurrencyExchange convertStdCurrencyToCurrencyExchange(CurrencyCode currencyCode) = 0; /// Retrieve all the markets proposed by the exchange. virtual MarketSet queryTradableMarkets() = 0; /// Retrieve all approximated prices per market. /// Data will not be necessarily up to date, but it's handy to get a lot of prices at once. virtual MarketPriceMap queryAllPrices() = 0; /// Attempts to convert amount into a target currency. /// Conversion is made with the 'average' price, which is the average of the lowest ask price and /// the highest bid price of a market order book if available. std::optional<MonetaryAmount> convertAtAveragePrice(MonetaryAmount a, CurrencyCode toCurrencyCode); /// Retrieve the fixed withdrawal fees per currency. /// Depending on the exchange, this could be retrieved dynamically, /// or, if not possible, should be retrieved from a static source updated regularly. virtual WithdrawalFeeMap queryWithdrawalFees() = 0; /// Retrieve the withdrawal fee of a Currency only virtual MonetaryAmount queryWithdrawalFees(CurrencyCode currencyCode) = 0; /// Get all the MarketOrderBooks of this exchange as fast as possible. /// Exchanges which do not support retrieval of all of them at once may used heuristics methods. virtual MarketOrderBookMap queryAllApproximatedOrderBooks(int depth = 10) = 0; /// Retrieve the order book of given market. /// It should be more precise that previous version with possibility to go deeper. virtual MarketOrderBook queryOrderBook(Market m, int depth = 10) = 0; /// Get the name of the exchange in lower case. std::string_view name() const { return _name; } protected: ExchangePublic(std::string_view name, FiatConverter &fiatConverter, CryptowatchAPI &cryptowatchApi) : _name(name), _fiatConverter(fiatConverter), _cryptowatchApi(cryptowatchApi) {} MonetaryAmount computeWorstOrderPrice(Market m, MonetaryAmount from, bool isTakerStrategy); MonetaryAmount computeLimitOrderPrice(Market m, MonetaryAmount from); MonetaryAmount computeAvgOrderPrice(Market m, MonetaryAmount from, bool isTakerStrategy, int depth = 10); MonetaryAmount computeEquivalentInMainCurrency(MonetaryAmount a, CurrencyCode equiCurrency); /// Retrieve the market in the correct order proposed by the exchange for given couple of currencies. Market retrieveMarket(CurrencyCode c1, CurrencyCode c2); using Currencies = cct::SmallVector<CurrencyCode, 6>; /// Retrieve the fastest conversion path (fastest in terms of number of conversions) /// of 'from' towards 'to' currency code Currencies findFastestConversionPath(CurrencyCode from, CurrencyCode to); MarketPriceMap marketPriceMapFromMarketOrderBookMap(const MarketOrderBookMap &marketOrderBookMap) const; std::string _name; FiatConverter &_fiatConverter; CryptowatchAPI &_cryptowatchApi; }; } // namespace api } // namespace cct
a68184289f3d33c59bdddbf67b4f578a7b2689ae
0ad1e75df68fb14976c79c8921249dcd6e74f967
/malloc functions.cpp
90d212c275464bead6abbb32542f1d52cc9b9733
[]
no_license
variablemayank/competetive-programming-codes
9010d215832f4937735d6b35b1df35df0f8a59e6
71bbc70049089fcc24444471dd4504b1d29c371f
refs/heads/master
2021-09-06T04:17:29.052221
2018-02-02T08:57:56
2018-02-02T08:57:56
119,955,414
1
1
null
null
null
null
UTF-8
C++
false
false
209
cpp
malloc functions.cpp
#include<stdio.h> #include<stdlib.h> int main() { int a; int *p; p=(int* )malloc(sizeof(int)); *p=10; printf("%d\n",*p); free(p); p=(int* )calloc(10,sizeof(int)); printf("%d%d\n",p,*p); return 0; }
08aa8aa0cfbd42439293e56ae2001d977eef8d18
b5a3fd74b37d2c021eaa0229ddb721151a6527ba
/Code/projet_lo21/gardien.h
8c634f45b6fc525a3722d44b1be6af5ba823eea4
[]
no_license
nleleu/LO21-Calculatrice
7f276c419273fd144ba0ce14349ec35cc9a0e6b3
6a3e34be881956cb68be8b11054f257a3fb970fe
refs/heads/master
2019-01-02T06:32:58.049646
2012-06-18T13:49:47
2012-06-18T13:49:47
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,145
h
gardien.h
#ifndef GARDIEN_H #define GARDIEN_H #include <QVector> #include <QStack> #include "type.h" /*! * \file gardien.h * \author Le Feurmou/Leleu */ /*! \class gardien * \brief Classe representant un gardien * * La classe permet de sauvegarder les etats d'une pile, dans le but de pouvoir les restaurer * Partie du design pattern "Memento" * * */ class Pile; class gardien { int currentStack;/*!< Position de la Pile actuelle*/ QVector <Pile*> tabPile;/*!< Vector de pile*/ public: /*! * \brief Constructeur * * Construit un gardien * */ gardien(); /*! * \brief Undo * Permet de restaurer l'etat precedent * \return Pile a restaurer * */ Pile* undo(); /*! * \brief Destructeur * * */ ~gardien(); /*! * \brief Redo * Permet de restaurer l'etat suivant * \return Pile a restaurer * */ Pile* redo(); /*! * \brief addMemento * Permet d'ajouter un etat dans le vecteur de pile * \param pile: pile a ajouter */ void addMemento(Pile* pile); }; #endif // GARDIEN_H
138059a3005dce0fbc8e76d58a364cc6092bef3e
dd3564f348bf84fd341a7845d419fde6c98dcb1e
/Codility/C++/Lesson07-Stacks and Queues/StoneWall.cpp
eabdb497021e5a14130a2c1f908774bce5a3a3f2
[]
no_license
YebinKim/Algorithm-Study
af01526b9ad866c573eae194767d11e163d9f329
63f994fdf3bc549c5ed159f2fd6a47de4b849442
refs/heads/main
2023-05-25T19:22:44.139820
2023-05-11T12:03:08
2023-05-11T12:03:08
204,962,764
3
0
null
null
null
null
UTF-8
C++
false
false
603
cpp
StoneWall.cpp
// // StoneWall.cpp // Lesson07-Stacks and Queues // // Created by Yebin Kim on 2019/11/14. // Copyright © 2019 김예빈. All rights reserved. // #include <iostream> #include <vector> #include <stack> using namespace std; // Time Complexity O(N) int solution(vector<int> &H) { int answer = 0; stack<int> stone; for(int i = 0; i < H.size(); i++) { while(!stone.empty() && stone.top() > H[i]) stone.pop(); if(stone.empty() || stone.top() < H[i]) { stone.push(H[i]); answer++; } } return answer; }
9ee339bcd89c3b6303ef2871157eb34c788cabf6
fdc73b80d530105308ecfe61691aa3640c14482c
/number_of_unique_bst.cc
6b9ec7779f10bac3f566760fa9c606f56eb6848d
[]
no_license
aakash1104/leetcode_solutions
d7938d562c29a658fe7e0402c7ef5a6156a4bbb7
b111dffc8647a32288f76c3369c36ae0f38e7a8f
refs/heads/master
2023-02-02T14:49:11.295855
2020-12-20T23:08:58
2020-12-20T23:08:58
279,177,873
0
0
null
2020-12-20T22:08:53
2020-07-13T01:12:54
C++
UTF-8
C++
false
false
318
cc
number_of_unique_bst.cc
class Solution { public: int numTrees(int n) { vector<int> OPT(n + 1); // Base case OPT[0] = OPT[1] = 1; for (int i = 2; i <= n; i++) for (int j = 1; j <= i; j++) OPT[i] += OPT[j - 1] * OPT[i - j]; return OPT[n]; } };
ea7685f46dd7b7b33ef838818e2f930cbfb6cee7
585bc2eda0af2b17ed587d416f6e472aa64f9134
/G1213SHUO/Intermediate/Build/Win64/UE4Editor/Inc/G1213SHUO/G1213SHUOCharacter.generated.h
7928307c6af81c90de80a680ee1e6aea0809857f
[]
no_license
zSomnus/G1213SHUO
500d0ffd9005a4f2e980f7b9b4d5a99acc713032
b31af17c9e745ac891bde85dcec4b879268e4f82
refs/heads/master
2020-11-23T22:11:38.068486
2019-12-13T15:47:43
2019-12-13T15:47:43
227,841,420
0
0
null
null
null
null
UTF-8
C++
false
false
4,938
h
G1213SHUOCharacter.generated.h
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved. /*=========================================================================== Generated code exported from UnrealHeaderTool. DO NOT modify this manually! Edit the corresponding .h files instead! ===========================================================================*/ #include "UObject/ObjectMacros.h" #include "UObject/ScriptMacros.h" PRAGMA_DISABLE_DEPRECATION_WARNINGS #ifdef G1213SHUO_G1213SHUOCharacter_generated_h #error "G1213SHUOCharacter.generated.h already included, missing '#pragma once' in G1213SHUOCharacter.h" #endif #define G1213SHUO_G1213SHUOCharacter_generated_h #define G1213SHUO_Source_G1213SHUO_G1213SHUOCharacter_h_14_RPC_WRAPPERS #define G1213SHUO_Source_G1213SHUO_G1213SHUOCharacter_h_14_RPC_WRAPPERS_NO_PURE_DECLS #define G1213SHUO_Source_G1213SHUO_G1213SHUOCharacter_h_14_INCLASS_NO_PURE_DECLS \ private: \ static void StaticRegisterNativesAG1213SHUOCharacter(); \ friend struct Z_Construct_UClass_AG1213SHUOCharacter_Statics; \ public: \ DECLARE_CLASS(AG1213SHUOCharacter, ACharacter, COMPILED_IN_FLAGS(0), CASTCLASS_None, TEXT("/Script/G1213SHUO"), NO_API) \ DECLARE_SERIALIZER(AG1213SHUOCharacter) #define G1213SHUO_Source_G1213SHUO_G1213SHUOCharacter_h_14_INCLASS \ private: \ static void StaticRegisterNativesAG1213SHUOCharacter(); \ friend struct Z_Construct_UClass_AG1213SHUOCharacter_Statics; \ public: \ DECLARE_CLASS(AG1213SHUOCharacter, ACharacter, COMPILED_IN_FLAGS(0), CASTCLASS_None, TEXT("/Script/G1213SHUO"), NO_API) \ DECLARE_SERIALIZER(AG1213SHUOCharacter) #define G1213SHUO_Source_G1213SHUO_G1213SHUOCharacter_h_14_STANDARD_CONSTRUCTORS \ /** Standard constructor, called after all reflected properties have been initialized */ \ NO_API AG1213SHUOCharacter(const FObjectInitializer& ObjectInitializer); \ DEFINE_DEFAULT_OBJECT_INITIALIZER_CONSTRUCTOR_CALL(AG1213SHUOCharacter) \ DECLARE_VTABLE_PTR_HELPER_CTOR(NO_API, AG1213SHUOCharacter); \ DEFINE_VTABLE_PTR_HELPER_CTOR_CALLER(AG1213SHUOCharacter); \ private: \ /** Private move- and copy-constructors, should never be used */ \ NO_API AG1213SHUOCharacter(AG1213SHUOCharacter&&); \ NO_API AG1213SHUOCharacter(const AG1213SHUOCharacter&); \ public: #define G1213SHUO_Source_G1213SHUO_G1213SHUOCharacter_h_14_ENHANCED_CONSTRUCTORS \ private: \ /** Private move- and copy-constructors, should never be used */ \ NO_API AG1213SHUOCharacter(AG1213SHUOCharacter&&); \ NO_API AG1213SHUOCharacter(const AG1213SHUOCharacter&); \ public: \ DECLARE_VTABLE_PTR_HELPER_CTOR(NO_API, AG1213SHUOCharacter); \ DEFINE_VTABLE_PTR_HELPER_CTOR_CALLER(AG1213SHUOCharacter); \ DEFINE_DEFAULT_CONSTRUCTOR_CALL(AG1213SHUOCharacter) #define G1213SHUO_Source_G1213SHUO_G1213SHUOCharacter_h_14_PRIVATE_PROPERTY_OFFSET \ FORCEINLINE static uint32 __PPO__Mesh1P() { return STRUCT_OFFSET(AG1213SHUOCharacter, Mesh1P); } \ FORCEINLINE static uint32 __PPO__FP_Gun() { return STRUCT_OFFSET(AG1213SHUOCharacter, FP_Gun); } \ FORCEINLINE static uint32 __PPO__FP_MuzzleLocation() { return STRUCT_OFFSET(AG1213SHUOCharacter, FP_MuzzleLocation); } \ FORCEINLINE static uint32 __PPO__VR_Gun() { return STRUCT_OFFSET(AG1213SHUOCharacter, VR_Gun); } \ FORCEINLINE static uint32 __PPO__VR_MuzzleLocation() { return STRUCT_OFFSET(AG1213SHUOCharacter, VR_MuzzleLocation); } \ FORCEINLINE static uint32 __PPO__FirstPersonCameraComponent() { return STRUCT_OFFSET(AG1213SHUOCharacter, FirstPersonCameraComponent); } \ FORCEINLINE static uint32 __PPO__R_MotionController() { return STRUCT_OFFSET(AG1213SHUOCharacter, R_MotionController); } \ FORCEINLINE static uint32 __PPO__L_MotionController() { return STRUCT_OFFSET(AG1213SHUOCharacter, L_MotionController); } #define G1213SHUO_Source_G1213SHUO_G1213SHUOCharacter_h_11_PROLOG #define G1213SHUO_Source_G1213SHUO_G1213SHUOCharacter_h_14_GENERATED_BODY_LEGACY \ PRAGMA_DISABLE_DEPRECATION_WARNINGS \ public: \ G1213SHUO_Source_G1213SHUO_G1213SHUOCharacter_h_14_PRIVATE_PROPERTY_OFFSET \ G1213SHUO_Source_G1213SHUO_G1213SHUOCharacter_h_14_RPC_WRAPPERS \ G1213SHUO_Source_G1213SHUO_G1213SHUOCharacter_h_14_INCLASS \ G1213SHUO_Source_G1213SHUO_G1213SHUOCharacter_h_14_STANDARD_CONSTRUCTORS \ public: \ PRAGMA_ENABLE_DEPRECATION_WARNINGS #define G1213SHUO_Source_G1213SHUO_G1213SHUOCharacter_h_14_GENERATED_BODY \ PRAGMA_DISABLE_DEPRECATION_WARNINGS \ public: \ G1213SHUO_Source_G1213SHUO_G1213SHUOCharacter_h_14_PRIVATE_PROPERTY_OFFSET \ G1213SHUO_Source_G1213SHUO_G1213SHUOCharacter_h_14_RPC_WRAPPERS_NO_PURE_DECLS \ G1213SHUO_Source_G1213SHUO_G1213SHUOCharacter_h_14_INCLASS_NO_PURE_DECLS \ G1213SHUO_Source_G1213SHUO_G1213SHUOCharacter_h_14_ENHANCED_CONSTRUCTORS \ private: \ PRAGMA_ENABLE_DEPRECATION_WARNINGS template<> G1213SHUO_API UClass* StaticClass<class AG1213SHUOCharacter>(); #undef CURRENT_FILE_ID #define CURRENT_FILE_ID G1213SHUO_Source_G1213SHUO_G1213SHUOCharacter_h PRAGMA_ENABLE_DEPRECATION_WARNINGS
8bff2e2d2d7a173ce8889288ca5f5fe410304b9f
dd80a584130ef1a0333429ba76c1cee0eb40df73
/external/chromium_org/chrome/browser/automation/testing_automation_provider_aura.cc
95e02c68004aa163c33ca5903e673183acd04d58
[ "BSD-3-Clause", "MIT" ]
permissive
karunmatharu/Android-4.4-Pay-by-Data
466f4e169ede13c5835424c78e8c30ce58f885c1
fcb778e92d4aad525ef7a995660580f948d40bc9
refs/heads/master
2021-03-24T13:33:01.721868
2017-02-18T17:48:49
2017-02-18T17:48:49
81,847,777
0
2
MIT
2020-03-09T00:02:12
2017-02-13T16:47:00
null
UTF-8
C++
false
false
966
cc
testing_automation_provider_aura.cc
// Copyright (c) 2012 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/automation/testing_automation_provider.h" #include "base/logging.h" #include "chrome/browser/automation/automation_window_tracker.h" #include "ui/aura/client/aura_constants.h" #include "ui/aura/window.h" #include "ui/base/ui_base_types.h" #if defined(USE_ASH) #include "ash/wm/window_util.h" #endif void TestingAutomationProvider::TerminateSession(int handle, bool* success) { *success = false; } void TestingAutomationProvider::SetWindowBounds(int handle, const gfx::Rect& bounds, bool* success) { aura::Window* window = window_tracker_->GetResource(handle); if (window) { window->SetBounds(bounds); *success = true; } else { *success = false; } }
ece03b3345a859d9e5ca2b649d33757f3a5d43d1
ac0642759c121158cbf00e2c8b08530b03337260
/src/PdnPinDumper/src/db/obj/frTrackPattern.h
8ce50f5bc863ff234010ac8774291a9caa14287b
[ "BSD-3-Clause", "Apache-2.0", "LicenseRef-scancode-unknown", "CC-BY-3.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
ax3ghazy/pdn
6dc1c594bc47be701b51cde24c812050586cfac0
a53aaf9620654fc799227f2f48d61eceb0322b36
refs/heads/master
2020-11-27T03:21:44.720248
2019-10-24T13:11:53
2019-10-24T13:11:53
229,285,794
0
0
BSD-3-Clause
2019-12-20T15:06:52
2019-12-20T15:06:51
null
UTF-8
C++
false
false
3,410
h
frTrackPattern.h
/* Authors: Lutong Wang and Bangqi Xu */ /* * Copyright (c) 2019, The Regents of the University of California * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the University nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE REGENTS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _FR_TRACKPATTERN_H_ #define _FR_TRACKPATTERN_H_ #include "frBaseTypes.h" #include "db/obj/frBlockObject.h" namespace fr { class frTrackPattern: public frBlockObject { public: // constructors frTrackPattern() = default; frTrackPattern(const frTrackPattern& tmpTrackPattern) : horizontal(tmpTrackPattern.horizontal), startCoord(tmpTrackPattern.startCoord), numTracks(tmpTrackPattern.numTracks), trackSpacing(tmpTrackPattern.trackSpacing), layerNum(tmpTrackPattern.layerNum) {} frTrackPattern(bool tmpIsH, frCoord tmpSC, frUInt4 tmpNT, frUInt4 tmpTS, frLayerNum tmpLN) : horizontal(tmpIsH), startCoord(tmpSC), numTracks(tmpNT), trackSpacing(tmpTS), layerNum(tmpLN) {} // getters // vertical track has horizontal = true; bool isHorizontal() const { return horizontal; } frCoord getStartCoord() const { return startCoord; } frUInt4 getNumTracks() const { return numTracks; } frUInt4 getTrackSpacing() const { return trackSpacing; } frLayerNum getLayerNum() const { return layerNum; } // setters // vertical track has horizontal = true; void setHorizontal(bool tmpIsHorizontal) { horizontal = tmpIsHorizontal; } void setStartCoord(frCoord tmpStartCoord) { startCoord = tmpStartCoord; } void setNumTracks(frUInt4 tmpNumTracks) { numTracks = tmpNumTracks; } void setTrackSpacing(frUInt4 tmpTrackSpacing) { trackSpacing = tmpTrackSpacing; } void setLayerNum(frLayerNum tmpLayerNum) { layerNum = tmpLayerNum; } protected: bool horizontal; frCoord startCoord; frUInt4 numTracks; frUInt4 trackSpacing; frLayerNum layerNum; }; } #endif
874f68a2b455ac723192898c2256575e620a6a08
ff13c255737ff4df265d84177ff110e9a3888b9a
/SEC/svrctrlpage.cpp
18469009ecae53873bae64d296e690ffc5704b4d
[]
no_license
liuyufeng509/SecCenter
ef651ba85c10841faeede83bf357c823ce266231
84e11cc3a13d256880ca0ac52f39fc85aa4c146e
refs/heads/master
2021-01-19T20:27:14.402515
2017-07-27T01:23:05
2017-07-27T01:23:05
83,753,899
0
0
null
null
null
null
UTF-8
C++
false
false
7,972
cpp
svrctrlpage.cpp
#include "svrctrlpage.h" #include "ui_svrctrlpage.h" SvrCtrlPage::SvrCtrlPage(QWidget *parent) : QWidget(parent), ui(new Ui::SvrCtrlPage) { ui->setupUi(this); isRmOpen = false; isBibaOpen = false; updateUI(); } void SvrCtrlPage::getHtmlStr(QString labelStr, QString color, QString status) { htmlStr="<html><head/><body><p>"+ labelStr+" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style=\"font-weight:600; color:"+ color+";\">"+status+"</span></p></body></html>"; } void SvrCtrlPage::updateUI() { //安全策略状态 try { SecFunClass::getInstance()->getSecStatus(secStatus); }catch(Exception exp) { secStatus.clear(); errMsgBox(exp.getErroWhat(), this); } QString color = GreenColor; if(secStatus.curr_mode == tr("enforcing")) { ui->open_closeSecPolButton->setText(tr("关闭安全策略")); color = GreenColor; } else if(secStatus.curr_mode == tr("permissive")) { ui->open_closeSecPolButton->setText(tr("开启安全策略")); color = BlueColor; }else color = RedColor; getHtmlStr(tr("当前状态:"), color,secStatus.curr_mode); //ui->cur_status_label->setText(tr("当前状态: ")+secStatus.curr_mode); ui->cur_status_label->setText(htmlStr); //sak开关状态 try { SecFunClass::getInstance()->GetSakInfo(sakinfo); if(sakinfo.current_mode=="enable") { color = GreenColor; getHtmlStr(tr("当前sak状态:"), color, tr("开启")); //ui->cur_sakstatus_label->setText(tr("当前sak状态: 开启")); ui->cur_sakstatus_label->setText(htmlStr); ui->open_close_sak_Button->setText(tr("关闭当前SAK功能")); }else { color = BlueColor; //ui->cur_sakstatus_label->setText(tr("当前sak状态: 未开启")); getHtmlStr(tr("当前sak状态:"), color, tr("未开启")); ui->cur_sakstatus_label->setText(htmlStr); ui->open_close_sak_Button->setText(tr("开启当前SAK功能")); } if(sakinfo.default_mode=="enable") { color = GreenColor; getHtmlStr(tr("sak开机启动:"), color, tr("开启")); ui->def_sakstatus_label->setText(htmlStr); ui->open_close_def_sak_Button->setText(tr("关闭SAK开机启动")); }else { color = BlueColor; getHtmlStr(tr("sak开机启动:"), color, tr("未开启")); ui->def_sakstatus_label->setText(htmlStr); ui->open_close_def_sak_Button->setText(tr("开启SAK开机启动")); } }catch(Exception exp) { errMsgBox(exp.getErroWhat(), this); sakinfo.current_mode="disable"; sakinfo.default_mode="disable"; color = RedColor; getHtmlStr(tr("获取当前sak状态失败!"), RedColor,""); ui->cur_sakstatus_label->setText(htmlStr); getHtmlStr(tr("获取sak开机启动状态失败!"), RedColor,""); ui->def_sakstatus_label->setText(htmlStr); ui->open_close_sak_Button->setText(tr("开启当前SAK功能")); ui->open_close_def_sak_Button->setText(tr("开启SAK开机启动")); } //客体重用 try { SecFunClass::getInstance()->isRmOpened(isRmOpen); if(isRmOpen) { ui->close_client_reuse_Button->setText(tr("关闭客体重用")); getHtmlStr(tr("当前状态:"), GreenColor, tr("正在运行")); ui->cur_audstatus_label_2->setText(htmlStr); }else { ui->close_client_reuse_Button->setText(tr("开启客体重用")); getHtmlStr(tr("当前状态:"), BlueColor, tr("尚未运行")); ui->cur_audstatus_label_2->setText(htmlStr); } }catch(Exception exp) { errMsgBox(exp.getErroWhat(), this); } //BiBa try { SecFunClass::getInstance()->isBiBaOpened(isBibaOpen); if(isBibaOpen) { ui->bibaCtrlButton->setText(tr("关闭BiBa")); getHtmlStr(tr("当前状态:"), GreenColor, tr("已开启")); ui->cur_audstatus_label_3->setText(htmlStr); }else { ui->bibaCtrlButton->setText(tr("开启BiBa")); getHtmlStr(tr("当前状态:"), BlueColor, tr("未开启")); ui->cur_audstatus_label_3->setText(htmlStr); } }catch(Exception exp) { errMsgBox(exp.getErroWhat(), this); } } SvrCtrlPage::~SvrCtrlPage() { delete ui; } void SvrCtrlPage::on_openAllButton_clicked() { try { SecFunClass::getInstance()->setEnforce(true); }catch(Exception exp) { errMsgBox(exp.getErroWhat(), this); } try { SecFunClass::getInstance()->SetSakInfo("enable"); SecFunClass::getInstance()->SetDefaultSakInfo("enable"); }catch(Exception exp) { errMsgBox(exp.getErroWhat(), this); } try { SecFunClass::getInstance()->setRmOpened(true); infoMsgBox(tr("客体重用设置后,仅在新的终端中起效, \n或者在终端中运行bash命令生效"), this); }catch(Exception exp) { errMsgBox(exp.getErroWhat(), this); } updateUI(); } void SvrCtrlPage::on_open_closeSecPolButton_clicked() { try { if(ui->open_closeSecPolButton->text() == tr("关闭安全策略")) { if(warnMsgBox(tr("关闭安全策略会使系统安全性降低,确定要进行该项操作?"), this)==QMessageBox::Cancel) return; SecFunClass::getInstance()->setEnforce(false); ui->open_closeSecPolButton->setText(tr("开启安全策略")); } else { SecFunClass::getInstance()->setEnforce(true); ui->open_closeSecPolButton->setText(tr("关闭安全策略")); } }catch(Exception exp) { errMsgBox(exp.getErroWhat(), this); } updateUI(); } //void SvrCtrlPage::freshPolCtl(SecStatus secStatus) //{ // if(secStatus.curr_mode == tr("enforcing")) // ui->open_closeSecPolButton->setText(tr("关闭安全策略")); // else if(secStatus.curr_mode == tr("permissive")) // ui->open_closeSecPolButton->setText(tr("开启安全策略")); // ui->cur_status_label->setText(tr("当前状态: ")+secStatus.curr_mode); //} void SvrCtrlPage::on_open_close_sak_Button_clicked() { try { if(sakinfo.current_mode=="enable") { SecFunClass::getInstance()->SetSakInfo("disable"); }else SecFunClass::getInstance()->SetSakInfo("enable"); }catch(Exception exp) { errMsgBox(exp.getErroWhat(), this); } updateUI(); } void SvrCtrlPage::on_open_close_def_sak_Button_clicked() { try { if(sakinfo.default_mode=="enable") { SecFunClass::getInstance()->SetDefaultSakInfo("disable"); }else SecFunClass::getInstance()->SetDefaultSakInfo("enable"); }catch(Exception exp) { errMsgBox(exp.getErroWhat(), this); } updateUI(); } void SvrCtrlPage::on_close_client_reuse_Button_clicked() { try { SecFunClass::getInstance()->setRmOpened(!isRmOpen); updateUI(); infoMsgBox(tr("客体重用设置后,仅在新的终端中起效, \n或者在终端中运行bash命令生效"), this); }catch(Exception exp) { errMsgBox(exp.getErroWhat(), this); } } void SvrCtrlPage::on_bibaCtrlButton_clicked() { try { try { SecFunClass::getInstance()->setBiBaOpen(!isBibaOpen); updateUI(); }catch(Exception exp) { errMsgBox(exp.getErroWhat(), this); } }catch(Exception exp) { throw exp; } }
077f8c8894816c30b9c2497767ce6de3d2b69569
2c7d32507822cb8fb38377f36476ccb3f25db0ab
/P/acmp/Решение олимпиадных задач/5. C++ STL/Коммерческий калькулятор.cpp
97f292592edd0a7e8eb435d87b08d29885a4e590
[]
no_license
heavenlybilly/olympiad
00bdfb46b1ac462e6cf188ae1421edba3242b065
7014ef1d4e8942e9db92a5f8a4c7582ce9f79678
refs/heads/master
2023-07-07T11:21:31.505516
2021-08-11T18:12:50
2021-08-11T18:12:50
395,076,879
1
0
null
null
null
null
UTF-8
C++
false
false
1,535
cpp
Коммерческий калькулятор.cpp
/* * ------------ КОММЕРЧЕСКИЙ КАЛЬКУЛЯТОР ------------ & структуры данных ~ prioity_queue ? нужно перебирать все пары чисел так, чтобы текущие два числа были самыми маленькми из имеющихся. Результат их суммы нужно добавлять в очередь с приоритетом, куда ранее добавили числа из исходных данных. ? нельзя использовать дек по причине того, что на стыке исходных данных и полученных результатов (в очереди с приоритетом) может нарушиться порядок неубывания. ? кроме того, можно не вычислять процент каждый раз, а найти его в самом конце. */ #include <iostream> #include <algorithm> #include <queue> #include <iomanip> using namespace std; using T = double; int main() { // ... ios::sync_with_stdio(false); int n; cin >> n; priority_queue <int, vector <int>, greater_equal<int>> q; for (int i(0); i < n; i++) { int t; cin >> t; q.push(t); } // refr T sum(0); while (q.size() > 1) { T a = q.top(); q.pop(); T b = q.top(); q.pop(); sum += a + b; q.push(a + b); } cout << fixed << setprecision(2) << sum * 0.05; return 0; }
6d8fe06483f6883cb80cff65b125bcd10b92160a
f381783123883376065bfbfdf46cf28e7dadaf3d
/April Long Contest 2020/SQRDSUB.cpp
dab305acda5b57b410ad626dab541c3d2e7ced77
[]
no_license
Bomma-Pranay/My-CodeChef-Solutions
c29d5e6fb5a9843f905bccdc1b5b340afa6a0a1f
2f7b95ea2ffed5d7b50253feb11de09fe9b68aa3
refs/heads/master
2022-12-07T16:56:03.908261
2020-08-09T11:02:05
2020-08-09T11:02:05
255,638,168
0
1
null
2020-08-28T06:54:00
2020-04-14T14:50:30
Python
UTF-8
C++
false
false
2,213
cpp
SQRDSUB.cpp
Problem link : https://www.codechef.com/APRIL20B/problems/SQRDSUB /* Let's call a sequence of integers good if the product of its elements can be represented as a difference of squares of two integers. More formally, a sequence S1,S2,…,SK is good if it is possible to find two integers p and q such that S1⋅S2⋅…⋅SK=p2−q2. Chef has a sequence A1,A2,…,AN. He wants to find the number of contiguous subsequences of A which are good. Can you help him? Input The first line of the input contains a single integer T denoting the number of test cases. The description of T test cases follows. The first line of each test case contains a single integer N. The second line contains N space-separated integers A1,A2,…,AN. Output For each test case, print a single line containing one integer ― the number of good contiguous subsequences of A. Constraints 1≤T≤103 1≤N≤105 |Ai|≤109 for each valid i the sum of N over all test cases does not exceed 106 Subtasks Subtask #1 (20 points): N≤103 Subtask #2 (80 points): original constraints Example Input 2 3 1 2 3 3 2 5 6 Example Output 2 2 Explanation Example case 1: For the subsequences [1] and [3], their products can be represented as differences of two squared integers: 1=12−02 and 3=22−12 respectively. Example case 2: The two good subsequences are [5] and [2,5,6]. Their products can be represented as differences of two squared integers: 5=32−22 and 2⋅5⋅6=60=82−22 respectively. */ My solution : #include <iostream> using namespace std; int main() { int tc; cin>>tc; for(int idus=0;idus<tc;idus++) { long long int n; cin>>n; long long int a[n]; for (long long int i=0;i<n;i++) cin>>a[i]; long long int cnt=0,ans; for(long long int i=0;i<n;i++) { long long int prod=1; for (long long int j=i;j<n;j++) { prod=prod*a[j]; prod=abs(prod); ans=(prod%4)!=2; //cout<<"prod"<<prod<<endl; if (prod%4!=2) cnt=cnt+1; } } cout<<cnt<<endl; } return 0; }
8e0c14c7f2d6992b819335dcec26b5c0ba5878d2
265f2c427126a18f6fe7a72e3ffc4683888e4330
/AUPinkNoise/PublicUtility/CAHostTimeBase.h
d456f8bb07e3ab026bcd6ca726d7407d5d865da0
[]
no_license
ocrickard/CocoaSampleCode
39d05f36c58918d89958df4f2b1c8116c141a7d5
f81bc9e391368dc8c34e762dd45e59f329a4d4f7
refs/heads/master
2021-01-15T17:56:17.895338
2013-04-16T09:57:24
2013-04-16T09:57:24
11,711,657
1
0
null
null
null
null
UTF-8
C++
false
false
4,912
h
CAHostTimeBase.h
/* <codex> <abstract>Part of CoreAudio Utility Classes</abstract> <\codex> */ #if !defined(__CAHostTimeBase_h__) #define __CAHostTimeBase_h__ //============================================================================= // Includes //============================================================================= #if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) #include <CoreAudio/CoreAudioTypes.h> #else #include <CoreAudioTypes.h> #endif #if TARGET_OS_MAC #include <mach/mach_time.h> #elif TARGET_OS_WIN32 #include <windows.h> #else #error Unsupported operating system #endif #include "CADebugMacros.h" //============================================================================= // CAHostTimeBase // // This class provides platform independent access to the host's time base. //============================================================================= #if CoreAudio_Debug // #define Log_Host_Time_Base_Parameters 1 // #define Track_Host_TimeBase 1 #endif class CAHostTimeBase { public: static UInt64 ConvertToNanos(UInt64 inHostTime); static UInt64 ConvertFromNanos(UInt64 inNanos); static UInt64 GetTheCurrentTime(); #if TARGET_OS_MAC static UInt64 GetCurrentTime() { return GetTheCurrentTime(); } #endif static UInt64 GetCurrentTimeInNanos(); static Float64 GetFrequency() { if(!sIsInited) { Initialize(); } return sFrequency; } static Float64 GetInverseFrequency() { if(!sIsInited) { Initialize(); } return sInverseFrequency; } static UInt32 GetMinimumDelta() { if(!sIsInited) { Initialize(); } return sMinDelta; } static UInt64 AbsoluteHostDeltaToNanos(UInt64 inStartTime, UInt64 inEndTime); static SInt64 HostDeltaToNanos(UInt64 inStartTime, UInt64 inEndTime); private: static void Initialize(); static bool sIsInited; static Float64 sFrequency; static Float64 sInverseFrequency; static UInt32 sMinDelta; static UInt32 sToNanosNumerator; static UInt32 sToNanosDenominator; static UInt32 sFromNanosNumerator; static UInt32 sFromNanosDenominator; static bool sUseMicroseconds; #if Track_Host_TimeBase static UInt64 sLastTime; #endif }; inline UInt64 CAHostTimeBase::GetTheCurrentTime() { UInt64 theTime = 0; #if TARGET_OS_MAC theTime = mach_absolute_time(); #elif TARGET_OS_WIN32 LARGE_INTEGER theValue; QueryPerformanceCounter(&theValue); theTime = *((UInt64*)&theValue); #endif #if Track_Host_TimeBase if(sLastTime != 0) { if(theTime <= sLastTime) { DebugMessageN2("CAHostTimeBase::GetTheCurrentTime: the current time is earlier than the last time, now: %qd, then: %qd", theTime, sLastTime); } sLastTime = theTime; } else { sLastTime = theTime; } #endif return theTime; } inline UInt64 CAHostTimeBase::ConvertToNanos(UInt64 inHostTime) { if(!sIsInited) { Initialize(); } Float64 theNumerator = static_cast<Float64>(sToNanosNumerator); Float64 theDenominator = static_cast<Float64>(sToNanosDenominator); Float64 theHostTime = static_cast<Float64>(inHostTime); Float64 thePartialAnswer = theHostTime / theDenominator; Float64 theFloatAnswer = thePartialAnswer * theNumerator; UInt64 theAnswer = static_cast<UInt64>(theFloatAnswer); //Assert(!((theNumerator > theDenominator) && (theAnswer < inHostTime)), "CAHostTimeBase::ConvertToNanos: The conversion wrapped"); //Assert(!((theDenominator > theNumerator) && (theAnswer > inHostTime)), "CAHostTimeBase::ConvertToNanos: The conversion wrapped"); return theAnswer; } inline UInt64 CAHostTimeBase::ConvertFromNanos(UInt64 inNanos) { if(!sIsInited) { Initialize(); } Float64 theNumerator = static_cast<Float64>(sToNanosNumerator); Float64 theDenominator = static_cast<Float64>(sToNanosDenominator); Float64 theNanos = static_cast<Float64>(inNanos); Float64 thePartialAnswer = theNanos / theNumerator; Float64 theFloatAnswer = thePartialAnswer * theDenominator; UInt64 theAnswer = static_cast<UInt64>(theFloatAnswer); //Assert(!((theDenominator > theNumerator) && (theAnswer < inNanos)), "CAHostTimeBase::ConvertToNanos: The conversion wrapped"); //Assert(!((theNumerator > theDenominator) && (theAnswer > inNanos)), "CAHostTimeBase::ConvertToNanos: The conversion wrapped"); return theAnswer; } inline UInt64 CAHostTimeBase::GetCurrentTimeInNanos() { return ConvertToNanos(GetTheCurrentTime()); } inline UInt64 CAHostTimeBase::AbsoluteHostDeltaToNanos(UInt64 inStartTime, UInt64 inEndTime) { UInt64 theAnswer; if(inStartTime <= inEndTime) { theAnswer = inEndTime - inStartTime; } else { theAnswer = inStartTime - inEndTime; } return ConvertToNanos(theAnswer); } inline SInt64 CAHostTimeBase::HostDeltaToNanos(UInt64 inStartTime, UInt64 inEndTime) { SInt64 theAnswer; SInt64 theSign = 1; if(inStartTime <= inEndTime) { theAnswer = inEndTime - inStartTime; } else { theAnswer = inStartTime - inEndTime; theSign = -1; } return theSign * ConvertToNanos(theAnswer); } #endif
4945cd065bb950461d9891729813b4b7846cf3ca
ef5741834d960cd3930b42f32e187dece4fbf71f
/include/o3d/gui/guitype.h
12d75705c37549621d781b25f2ed88692ec12d97
[]
no_license
dream-overflow/o3d
d893db752166c6e96f0886646643ae696b8a2af1
988956aae32a3956b314e1488385bb51c4409387
refs/heads/master
2023-06-22T03:12:20.291006
2023-06-08T20:56:08
2023-06-08T20:56:08
174,154,406
3
0
null
null
null
null
UTF-8
C++
false
false
3,836
h
guitype.h
/** * @file guitype.h * @brief Enumerations for GUI. * @author Frederic SCHERMA (frederic.scherma@dreamoverflow.org) * @date 2012-12-15 * @copyright Copyright (c) 2001-2017 Dream Overflow. All rights reserved. * @details */ #ifndef _O3D_GUI_TYPE_H #define _O3D_GUI_TYPE_H namespace o3d { enum GuiObjectType { GUI_GUI = 0x05000000, //!< GUI GUI_CONSOLE, //!< Consol with command mecanim GUI_MESSAGE_BOX, //!< Predefined window for common modal message/alert box GUI_FONT_MANAGER = 0x05010000, //!< a list of fonts to load GUI_FONT_ABC, //!< base class for font GUI_FONT_TEXTURE, //!< tag for a texture based font GUI_FONT_TRUE_TYPE, //!< tag for a true type font based font (TTF) GUI_FONT_MATERIAL, //!< a default material for font rendering GUI_THEME_MANAGER = 0x05020000, //!< manager to have multiple themes GUI_THEME, //!< theme container for widgets GUI_WIDGET = 0x05030000, //!< base widget object GUI_WIDGET_MANAGER, //!< widget controller and manager GUI_WIDGET_ROOT_WINDOW, //!< root window GUI_WIDGET_PROPERTIES, //!< base class for widget GUI_WIDGET_STATICTEXT, //!< a static text widget GUI_WIDGET_EDITBOX, //!< an edit box for text input widget GUI_WIDGET_BUTTON, //!< a button (standard & base button class) widget GUI_WIDGET_TOOLBUTTON, //!< a tool button (icon & toolbar button) widget GUI_WIDGET_CHECKBOX, //!< a check box (from button) widget GUI_WIDGET_LISTBOX, //!< a list box of objects items widget GUI_WIDGET_PROGRESSBAR, //!< a progress bar GUI_WIDGET_RADIOBUTTON, //!< a radio button (from button) widget GUI_WIDGET_TABBED, //!< a tabbed widget GUI_WIDGET_WINDOW, //!< a window widget GUI_WIDGET_FRAME, //!< a frame widget GUI_WIDGET_COMBOBOX, //!< a combo box (unrolling list of objects) GUI_WIDGET_STATICBITMAP, //!< a static bitmap widget GUI_WIDGET_SCROLLBAR, //!< a scrollbar control widget GUI_WIDGET_MESSAGEBOX, //!< dialog based message box (helper class) GUI_WIDGET_ICON, //!< icon widget GUI_WIDGET_STATICIMAGE, //!< static image widget GUI_WIDGET_TOOLBAR, //!< toolbar widget GUI_WIDGET_PANE, //!< labelizable and borderable pane widget GUI_WIDGET_TABBED_PANE, //!< labelizable and borderable pane widget, with a tab component GUI_WIDGET_GLASS_PANE, //!< invisible glass pane GUI_WIDGET_MENU, //!< menu widget GUI_WIDGET_MENU_BAR, //!< menu bar managing menu widgets or any others widgets GUI_WIDGET_MENU_LABEL, //!< menu item with a simple label GUI_WIDGET_TOOL_TIP, //!< a tooltip frame GUI_WIDGET_DRAW_MATERIAL, GUI_CURSOR = 0x05040000, //!< tag for a cursor object GUI_CURSOR_MANAGER, GUI_CARET, //!< tag for a caret object GUI_ICON, //!< tag for an icon object GUI_PICTURE, //!< tag for picture object GUI_LAYOUT = 0x05050000, //!< tag for an undefined layout widget GUI_LAYOUT_FREE, //!< tag for a free layout widget GUI_LAYOUT_BOX, //!< tag for a box layout widget GUI_LAYOUT_GRID, //!< tag for a grid box layout widget GUI_LAYOUT_FLEXGRID, //!< tag for a flex grid layout widget GUI_LAYOUT_GRIDBAG, //!< tag for a grid bag layout widget GUI_LAYOUT_WRAP, //!< tag for a wrap layout widget GUI_LAYOUT_SPACER //!< tag for a spacer layout widget }; } // namespace o3d #endif // _O3D_GUI_TYPE_H
0b65a3b9848de286a0c06ea5c35ba5a604e294b5
8eee08d3ea5f41ed1443c298c37085d17a50f5a2
/main/main.ino
1701d23ae907d77152061610f26eba8c074698e3
[]
no_license
jmancillavalenzuela/IotGoogleMqtt-Test
d0b7026d9f06028f26774a7c431001b2691a3363
a6289d4146e04527c2e604923c38951136ee2271
refs/heads/master
2023-04-20T14:06:16.848853
2021-05-11T14:10:24
2021-05-11T14:10:24
357,344,169
0
1
null
2021-04-14T13:31:09
2021-04-12T21:28:53
HTML
UTF-8
C++
false
false
1,301
ino
main.ino
#include "esp32-mqtt.h" String device_name; double temp_shower; double temp_hot_shower; double temp_out_shower; double temp_pump; double flux_hot_pump; double flux_out_pump; double flux_pump; double battery_shower; int state_shower; int state_pump; double latitude; double longitude; void setup() { // put your setup code here, to run once: Serial.begin(115200); pinMode(LED_BUILTIN, OUTPUT); setupCloudIoT(); randomSeed(analogRead(0)); } unsigned long lastMillis = 0; void loop() { mqtt->loop(); delay(10000); // <- fixes some issues with WiFi stability if (!mqttClient->connected()) { connect(); } // publish a message roughly every 15 second. if (millis() - lastMillis > 15000) { lastMillis = millis(); device_name = "HSC001"; temp_shower = random(0, 50); temp_hot_shower = random(0, 50); temp_out_shower = random(0, 50); temp_pump = random(0, 50); flux_hot_pump = random(0, 500); flux_out_pump = random(0, 500); flux_pump = random(0, 500); battery_shower = random(0, 100); state_shower = random(0, 1); state_pump = random(0, 1); latitude = random(0, 250); longitude = random(250, 500); pushData(); Serial.println("Publishing Data!..."); Serial.println("tempShower: " + (String)temp_shower); } }
441403e76180e7430fc8fbe4482a9d6fc37c480b
4c626c943b6af56524c6599b64451722ee2e9629
/aep_model/model/checkers/checkers_builders/aep_model_ovl_always_checker_builder.hpp
e6b2ed4797861f8ba452cce4a7f4c72fe2d62bb9
[]
no_license
kirillPshenychnyi/AEP
96cec51a4c579b2430b8c93cace5e25003c64219
07d9f3deb47514043a8a1cb0c5ff6091737c3d47
refs/heads/master
2018-08-31T16:59:08.415648
2018-06-10T22:21:04
2018-06-10T22:21:04
117,731,321
0
0
null
null
null
null
UTF-8
C++
false
false
1,715
hpp
aep_model_ovl_always_checker_builder.hpp
#ifndef __AEP_MODEL_OVL_ALWAYS_CHECKER_BUILDER_IMPL_HPP__ #define __AEP_MODEL_OVL_ALWAYS_CHECKER_BUILDER_IMPL_HPP__ /***************************************************************************/ #include "aep_model\api\checkers\ovl\checker_builders\aep_model_always_checker_builder.hpp" #include "aep_model\model\checkers\checkers_builders\aep_model_base_checker_builder_impl.hpp" /***************************************************************************/ namespace AepModel { /***************************************************************************/ struct OvlAlwaysCheckerBuilderImpl : public BaseOvlCheckerBuilderImpl< OvlAlwaysCheckerBuilder > { /***************************************************************************/ typedef BaseOvlCheckerBuilderImpl< OvlAlwaysCheckerBuilder > BaseClass; /***************************************************************************/ public: /***************************************************************************/ OvlAlwaysCheckerBuilderImpl( std::unique_ptr< OvlChecker > _checker ) : BaseClass( std::move( _checker ) ) { } /***************************************************************************/ void setTestExpression( std::string const & _lhs , std::string const & _rhs , int _width ) final { m_checker->setPortAsWire( OvlCheckerPortKind::Kind::TestExpression , _lhs , _rhs , _width ); } /***************************************************************************/ }; /***************************************************************************/ } /***************************************************************************/ #endif // !__AEP_MODEL_OVL_ALWAYS_CHECKER_BUILDER_IMPL_HPP__
e5a55f62ad0d027bc323284ce7071ccf08920278
addf0c6ff509bdf89174a9dbebcd2f1b256ac50d
/lesson4/6p3e_shared_pointer3.cpp
b18fa520f0a9a7958be7f7a643e6784a64d27e96
[]
no_license
fabdonati/cppUdacityND
c004dd9701a058e9da277d09378444362fb70aa8
6c481a2cdb98e22e66740438ecdc57adc0243b27
refs/heads/master
2022-04-24T11:22:12.766542
2020-04-26T16:42:55
2020-04-26T16:42:55
null
0
0
null
null
null
null
UTF-8
C++
false
false
475
cpp
6p3e_shared_pointer3.cpp
// this is a case of circular reference (the counter never goes to 0) #include <iostream> #include <string> #include <memory> class MyClass { std::string _text; public: std::shared_ptr<MyClass> _member; ~MyClass() {std::cout << "destructor called" << std::endl;} }; int main() { std::shared_ptr<MyClass> shared1(new MyClass); std::shared_ptr<MyClass> shared2(new MyClass); shared1->_member = shared2; shared2->_member = shared1; return 0; }