blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
201
content_id
stringlengths
40
40
detected_licenses
listlengths
0
85
license_type
stringclasses
2 values
repo_name
stringlengths
7
100
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
260 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
11.4k
681M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
17 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
80 values
src_encoding
stringclasses
28 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
8
9.86M
extension
stringclasses
52 values
content
stringlengths
8
9.86M
authors
listlengths
1
1
author
stringlengths
0
119
b2642107d316d2eb84cd0622ad83d7a3c2d2cbce
da3209e8b6698f7190801e2fef80e0e7762e5e83
/deps/v8/src/regexp/x64/regexp-macro-assembler-x64.cc
1e21182c35c21c8c71d0347f3bb9d9653360667a
[ "NAIST-2003", "Artistic-2.0", "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-openssl", "NTP", "ICU", "Zlib", "LicenseRef-scancode-unicode", "MIT", "ISC", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "SunPro", "bzip2-1.0.6" ]
permissive
theanarkh/read-nodejs-code
69ed88ba4186eecc8a4c9c07ca7bfe663a321f0b
0a9ef6117fedb96a331fa1b4894e7ed249a52c89
refs/heads/master
2023-04-07T07:00:30.427988
2023-03-23T15:51:33
2023-03-23T15:51:33
174,857,307
122
24
NOASSERTION
2022-01-15T01:24:13
2019-03-10T17:31:26
JavaScript
UTF-8
C++
false
false
46,354
cc
// Copyright 2012 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #if V8_TARGET_ARCH_X64 #include "src/regexp/x64/regexp-macro-assembler-x64.h" #include "src/factory.h" #include "src/log.h" #include "src/macro-assembler.h" #include "src/objects-inl.h" #include "src/regexp/regexp-macro-assembler.h" #include "src/regexp/regexp-stack.h" #include "src/unicode.h" namespace v8 { namespace internal { #ifndef V8_INTERPRETED_REGEXP /* * This assembler uses the following register assignment convention * - rdx : Currently loaded character(s) as Latin1 or UC16. Must be loaded * using LoadCurrentCharacter before using any of the dispatch methods. * Temporarily stores the index of capture start after a matching pass * for a global regexp. * - rdi : Current position in input, as negative offset from end of string. * Please notice that this is the byte offset, not the character * offset! Is always a 32-bit signed (negative) offset, but must be * maintained sign-extended to 64 bits, since it is used as index. * - rsi : End of input (points to byte after last character in input), * so that rsi+rdi points to the current character. * - rbp : Frame pointer. Used to access arguments, local variables and * RegExp registers. * - rsp : Points to tip of C stack. * - rcx : Points to tip of backtrack stack. The backtrack stack contains * only 32-bit values. Most are offsets from some base (e.g., character * positions from end of string or code location from Code* pointer). * - r8 : Code object pointer. Used to convert between absolute and * code-object-relative addresses. * * The registers rax, rbx, r9 and r11 are free to use for computations. * If changed to use r12+, they should be saved as callee-save registers. * The macro assembler special register r13 (kRootRegister) isn't special * during execution of RegExp code (it doesn't hold the value assumed when * creating JS code), so Root related macro operations can be used. * * Each call to a C++ method should retain these registers. * * The stack will have the following content, in some order, indexable from the * frame pointer (see, e.g., kStackHighEnd): * - Isolate* isolate (address of the current isolate) * - direct_call (if 1, direct call from JavaScript code, if 0 call * through the runtime system) * - stack_area_base (high end of the memory area to use as * backtracking stack) * - capture array size (may fit multiple sets of matches) * - int* capture_array (int[num_saved_registers_], for output). * - end of input (address of end of string) * - start of input (address of first character in string) * - start index (character index of start) * - String* input_string (input string) * - return address * - backup of callee save registers (rbx, possibly rsi and rdi). * - success counter (only useful for global regexp to count matches) * - Offset of location before start of input (effectively character * string start - 1). Used to initialize capture registers to a * non-position. * - At start of string (if 1, we are starting at the start of the * string, otherwise 0) * - register 0 rbp[-n] (Only positions must be stored in the first * - register 1 rbp[-n-8] num_saved_registers_ registers) * - ... * * The first num_saved_registers_ registers are initialized to point to * "character -1" in the string (i.e., char_size() bytes before the first * character of the string). The remaining registers starts out uninitialized. * * The first seven values must be provided by the calling code by * calling the code's entry address cast to a function pointer with the * following signature: * int (*match)(String* input_string, * int start_index, * Address start, * Address end, * int* capture_output_array, * int num_capture_registers, * byte* stack_area_base, * bool direct_call = false, * Isolate* isolate); */ #define __ ACCESS_MASM((&masm_)) RegExpMacroAssemblerX64::RegExpMacroAssemblerX64(Isolate* isolate, Zone* zone, Mode mode, int registers_to_save) : NativeRegExpMacroAssembler(isolate, zone), masm_(isolate, nullptr, kRegExpCodeSize, CodeObjectRequired::kYes), no_root_array_scope_(&masm_), code_relative_fixup_positions_(4, zone), mode_(mode), num_registers_(registers_to_save), num_saved_registers_(registers_to_save), entry_label_(), start_label_(), success_label_(), backtrack_label_(), exit_label_() { DCHECK_EQ(0, registers_to_save % 2); __ jmp(&entry_label_); // We'll write the entry code when we know more. __ bind(&start_label_); // And then continue from here. } RegExpMacroAssemblerX64::~RegExpMacroAssemblerX64() { // Unuse labels in case we throw away the assembler without calling GetCode. entry_label_.Unuse(); start_label_.Unuse(); success_label_.Unuse(); backtrack_label_.Unuse(); exit_label_.Unuse(); check_preempt_label_.Unuse(); stack_overflow_label_.Unuse(); } int RegExpMacroAssemblerX64::stack_limit_slack() { return RegExpStack::kStackLimitSlack; } void RegExpMacroAssemblerX64::AdvanceCurrentPosition(int by) { if (by != 0) { __ addq(rdi, Immediate(by * char_size())); } } void RegExpMacroAssemblerX64::AdvanceRegister(int reg, int by) { DCHECK_LE(0, reg); DCHECK_GT(num_registers_, reg); if (by != 0) { __ addp(register_location(reg), Immediate(by)); } } void RegExpMacroAssemblerX64::Backtrack() { CheckPreemption(); // Pop Code* offset from backtrack stack, add Code* and jump to location. Pop(rbx); __ addp(rbx, code_object_pointer()); __ jmp(rbx); } void RegExpMacroAssemblerX64::Bind(Label* label) { __ bind(label); } void RegExpMacroAssemblerX64::CheckCharacter(uint32_t c, Label* on_equal) { __ cmpl(current_character(), Immediate(c)); BranchOrBacktrack(equal, on_equal); } void RegExpMacroAssemblerX64::CheckCharacterGT(uc16 limit, Label* on_greater) { __ cmpl(current_character(), Immediate(limit)); BranchOrBacktrack(greater, on_greater); } void RegExpMacroAssemblerX64::CheckAtStart(Label* on_at_start) { __ leap(rax, Operand(rdi, -char_size())); __ cmpp(rax, Operand(rbp, kStringStartMinusOne)); BranchOrBacktrack(equal, on_at_start); } void RegExpMacroAssemblerX64::CheckNotAtStart(int cp_offset, Label* on_not_at_start) { __ leap(rax, Operand(rdi, -char_size() + cp_offset * char_size())); __ cmpp(rax, Operand(rbp, kStringStartMinusOne)); BranchOrBacktrack(not_equal, on_not_at_start); } void RegExpMacroAssemblerX64::CheckCharacterLT(uc16 limit, Label* on_less) { __ cmpl(current_character(), Immediate(limit)); BranchOrBacktrack(less, on_less); } void RegExpMacroAssemblerX64::CheckGreedyLoop(Label* on_equal) { Label fallthrough; __ cmpl(rdi, Operand(backtrack_stackpointer(), 0)); __ j(not_equal, &fallthrough); Drop(); BranchOrBacktrack(no_condition, on_equal); __ bind(&fallthrough); } void RegExpMacroAssemblerX64::CheckNotBackReferenceIgnoreCase( int start_reg, bool read_backward, bool unicode, Label* on_no_match) { Label fallthrough; ReadPositionFromRegister(rdx, start_reg); // Offset of start of capture ReadPositionFromRegister(rbx, start_reg + 1); // Offset of end of capture __ subp(rbx, rdx); // Length of capture. // ----------------------- // rdx = Start offset of capture. // rbx = Length of capture // At this point, the capture registers are either both set or both cleared. // If the capture length is zero, then the capture is either empty or cleared. // Fall through in both cases. __ j(equal, &fallthrough); // ----------------------- // rdx - Start of capture // rbx - length of capture // Check that there are sufficient characters left in the input. if (read_backward) { __ movl(rax, Operand(rbp, kStringStartMinusOne)); __ addl(rax, rbx); __ cmpl(rdi, rax); BranchOrBacktrack(less_equal, on_no_match); } else { __ movl(rax, rdi); __ addl(rax, rbx); BranchOrBacktrack(greater, on_no_match); } if (mode_ == LATIN1) { Label loop_increment; if (on_no_match == nullptr) { on_no_match = &backtrack_label_; } __ leap(r9, Operand(rsi, rdx, times_1, 0)); __ leap(r11, Operand(rsi, rdi, times_1, 0)); if (read_backward) { __ subp(r11, rbx); // Offset by length when matching backwards. } __ addp(rbx, r9); // End of capture // --------------------- // r11 - current input character address // r9 - current capture character address // rbx - end of capture Label loop; __ bind(&loop); __ movzxbl(rdx, Operand(r9, 0)); __ movzxbl(rax, Operand(r11, 0)); // al - input character // dl - capture character __ cmpb(rax, rdx); __ j(equal, &loop_increment); // Mismatch, try case-insensitive match (converting letters to lower-case). // I.e., if or-ing with 0x20 makes values equal and in range 'a'-'z', it's // a match. __ orp(rax, Immediate(0x20)); // Convert match character to lower-case. __ orp(rdx, Immediate(0x20)); // Convert capture character to lower-case. __ cmpb(rax, rdx); __ j(not_equal, on_no_match); // Definitely not equal. __ subb(rax, Immediate('a')); __ cmpb(rax, Immediate('z' - 'a')); __ j(below_equal, &loop_increment); // In range 'a'-'z'. // Latin-1: Check for values in range [224,254] but not 247. __ subb(rax, Immediate(224 - 'a')); __ cmpb(rax, Immediate(254 - 224)); __ j(above, on_no_match); // Weren't Latin-1 letters. __ cmpb(rax, Immediate(247 - 224)); // Check for 247. __ j(equal, on_no_match); __ bind(&loop_increment); // Increment pointers into match and capture strings. __ addp(r11, Immediate(1)); __ addp(r9, Immediate(1)); // Compare to end of capture, and loop if not done. __ cmpp(r9, rbx); __ j(below, &loop); // Compute new value of character position after the matched part. __ movp(rdi, r11); __ subq(rdi, rsi); if (read_backward) { // Subtract match length if we matched backward. __ addq(rdi, register_location(start_reg)); __ subq(rdi, register_location(start_reg + 1)); } } else { DCHECK(mode_ == UC16); // Save important/volatile registers before calling C function. #ifndef _WIN64 // Caller save on Linux and callee save in Windows. __ pushq(rsi); __ pushq(rdi); #endif __ pushq(backtrack_stackpointer()); static const int num_arguments = 4; __ PrepareCallCFunction(num_arguments); // Put arguments into parameter registers. Parameters are // Address byte_offset1 - Address captured substring's start. // Address byte_offset2 - Address of current character position. // size_t byte_length - length of capture in bytes(!) // Isolate* isolate or 0 if unicode flag. #ifdef _WIN64 DCHECK(rcx == arg_reg_1); DCHECK(rdx == arg_reg_2); // Compute and set byte_offset1 (start of capture). __ leap(rcx, Operand(rsi, rdx, times_1, 0)); // Set byte_offset2. __ leap(rdx, Operand(rsi, rdi, times_1, 0)); if (read_backward) { __ subq(rdx, rbx); } #else // AMD64 calling convention DCHECK(rdi == arg_reg_1); DCHECK(rsi == arg_reg_2); // Compute byte_offset2 (current position = rsi+rdi). __ leap(rax, Operand(rsi, rdi, times_1, 0)); // Compute and set byte_offset1 (start of capture). __ leap(rdi, Operand(rsi, rdx, times_1, 0)); // Set byte_offset2. __ movp(rsi, rax); if (read_backward) { __ subq(rsi, rbx); } #endif // _WIN64 // Set byte_length. __ movp(arg_reg_3, rbx); // Isolate. #ifdef V8_INTL_SUPPORT if (unicode) { __ movp(arg_reg_4, Immediate(0)); } else // NOLINT #endif // V8_INTL_SUPPORT { __ LoadAddress(arg_reg_4, ExternalReference::isolate_address(isolate())); } { // NOLINT: Can't find a way to open this scope without confusing the // linter. AllowExternalCallThatCantCauseGC scope(&masm_); ExternalReference compare = ExternalReference::re_case_insensitive_compare_uc16(isolate()); __ CallCFunction(compare, num_arguments); } // Restore original values before reacting on result value. __ Move(code_object_pointer(), masm_.CodeObject()); __ popq(backtrack_stackpointer()); #ifndef _WIN64 __ popq(rdi); __ popq(rsi); #endif // Check if function returned non-zero for success or zero for failure. __ testp(rax, rax); BranchOrBacktrack(zero, on_no_match); // On success, advance position by length of capture. // Requires that rbx is callee save (true for both Win64 and AMD64 ABIs). if (read_backward) { __ subq(rdi, rbx); } else { __ addq(rdi, rbx); } } __ bind(&fallthrough); } void RegExpMacroAssemblerX64::CheckNotBackReference(int start_reg, bool read_backward, Label* on_no_match) { Label fallthrough; // Find length of back-referenced capture. ReadPositionFromRegister(rdx, start_reg); // Offset of start of capture ReadPositionFromRegister(rax, start_reg + 1); // Offset of end of capture __ subp(rax, rdx); // Length to check. // At this point, the capture registers are either both set or both cleared. // If the capture length is zero, then the capture is either empty or cleared. // Fall through in both cases. __ j(equal, &fallthrough); // ----------------------- // rdx - Start of capture // rax - length of capture // Check that there are sufficient characters left in the input. if (read_backward) { __ movl(rbx, Operand(rbp, kStringStartMinusOne)); __ addl(rbx, rax); __ cmpl(rdi, rbx); BranchOrBacktrack(less_equal, on_no_match); } else { __ movl(rbx, rdi); __ addl(rbx, rax); BranchOrBacktrack(greater, on_no_match); } // Compute pointers to match string and capture string __ leap(rbx, Operand(rsi, rdi, times_1, 0)); // Start of match. if (read_backward) { __ subq(rbx, rax); // Offset by length when matching backwards. } __ addp(rdx, rsi); // Start of capture. __ leap(r9, Operand(rdx, rax, times_1, 0)); // End of capture // ----------------------- // rbx - current capture character address. // rbx - current input character address . // r9 - end of input to match (capture length after rbx). Label loop; __ bind(&loop); if (mode_ == LATIN1) { __ movzxbl(rax, Operand(rdx, 0)); __ cmpb(rax, Operand(rbx, 0)); } else { DCHECK(mode_ == UC16); __ movzxwl(rax, Operand(rdx, 0)); __ cmpw(rax, Operand(rbx, 0)); } BranchOrBacktrack(not_equal, on_no_match); // Increment pointers into capture and match string. __ addp(rbx, Immediate(char_size())); __ addp(rdx, Immediate(char_size())); // Check if we have reached end of match area. __ cmpp(rdx, r9); __ j(below, &loop); // Success. // Set current character position to position after match. __ movp(rdi, rbx); __ subq(rdi, rsi); if (read_backward) { // Subtract match length if we matched backward. __ addq(rdi, register_location(start_reg)); __ subq(rdi, register_location(start_reg + 1)); } __ bind(&fallthrough); } void RegExpMacroAssemblerX64::CheckNotCharacter(uint32_t c, Label* on_not_equal) { __ cmpl(current_character(), Immediate(c)); BranchOrBacktrack(not_equal, on_not_equal); } void RegExpMacroAssemblerX64::CheckCharacterAfterAnd(uint32_t c, uint32_t mask, Label* on_equal) { if (c == 0) { __ testl(current_character(), Immediate(mask)); } else { __ movl(rax, Immediate(mask)); __ andp(rax, current_character()); __ cmpl(rax, Immediate(c)); } BranchOrBacktrack(equal, on_equal); } void RegExpMacroAssemblerX64::CheckNotCharacterAfterAnd(uint32_t c, uint32_t mask, Label* on_not_equal) { if (c == 0) { __ testl(current_character(), Immediate(mask)); } else { __ movl(rax, Immediate(mask)); __ andp(rax, current_character()); __ cmpl(rax, Immediate(c)); } BranchOrBacktrack(not_equal, on_not_equal); } void RegExpMacroAssemblerX64::CheckNotCharacterAfterMinusAnd( uc16 c, uc16 minus, uc16 mask, Label* on_not_equal) { DCHECK_GT(String::kMaxUtf16CodeUnit, minus); __ leap(rax, Operand(current_character(), -minus)); __ andp(rax, Immediate(mask)); __ cmpl(rax, Immediate(c)); BranchOrBacktrack(not_equal, on_not_equal); } void RegExpMacroAssemblerX64::CheckCharacterInRange( uc16 from, uc16 to, Label* on_in_range) { __ leal(rax, Operand(current_character(), -from)); __ cmpl(rax, Immediate(to - from)); BranchOrBacktrack(below_equal, on_in_range); } void RegExpMacroAssemblerX64::CheckCharacterNotInRange( uc16 from, uc16 to, Label* on_not_in_range) { __ leal(rax, Operand(current_character(), -from)); __ cmpl(rax, Immediate(to - from)); BranchOrBacktrack(above, on_not_in_range); } void RegExpMacroAssemblerX64::CheckBitInTable( Handle<ByteArray> table, Label* on_bit_set) { __ Move(rax, table); Register index = current_character(); if (mode_ != LATIN1 || kTableMask != String::kMaxOneByteCharCode) { __ movp(rbx, current_character()); __ andp(rbx, Immediate(kTableMask)); index = rbx; } __ cmpb(FieldOperand(rax, index, times_1, ByteArray::kHeaderSize), Immediate(0)); BranchOrBacktrack(not_equal, on_bit_set); } bool RegExpMacroAssemblerX64::CheckSpecialCharacterClass(uc16 type, Label* on_no_match) { // Range checks (c in min..max) are generally implemented by an unsigned // (c - min) <= (max - min) check, using the sequence: // leap(rax, Operand(current_character(), -min)) or sub(rax, Immediate(min)) // cmp(rax, Immediate(max - min)) switch (type) { case 's': // Match space-characters if (mode_ == LATIN1) { // One byte space characters are '\t'..'\r', ' ' and \u00a0. Label success; __ cmpl(current_character(), Immediate(' ')); __ j(equal, &success, Label::kNear); // Check range 0x09..0x0d __ leap(rax, Operand(current_character(), -'\t')); __ cmpl(rax, Immediate('\r' - '\t')); __ j(below_equal, &success, Label::kNear); // \u00a0 (NBSP). __ cmpl(rax, Immediate(0x00a0 - '\t')); BranchOrBacktrack(not_equal, on_no_match); __ bind(&success); return true; } return false; case 'S': // The emitted code for generic character classes is good enough. return false; case 'd': // Match ASCII digits ('0'..'9') __ leap(rax, Operand(current_character(), -'0')); __ cmpl(rax, Immediate('9' - '0')); BranchOrBacktrack(above, on_no_match); return true; case 'D': // Match non ASCII-digits __ leap(rax, Operand(current_character(), -'0')); __ cmpl(rax, Immediate('9' - '0')); BranchOrBacktrack(below_equal, on_no_match); return true; case '.': { // Match non-newlines (not 0x0a('\n'), 0x0d('\r'), 0x2028 and 0x2029) __ movl(rax, current_character()); __ xorp(rax, Immediate(0x01)); // See if current character is '\n'^1 or '\r'^1, i.e., 0x0b or 0x0c __ subl(rax, Immediate(0x0b)); __ cmpl(rax, Immediate(0x0c - 0x0b)); BranchOrBacktrack(below_equal, on_no_match); if (mode_ == UC16) { // Compare original value to 0x2028 and 0x2029, using the already // computed (current_char ^ 0x01 - 0x0b). I.e., check for // 0x201d (0x2028 - 0x0b) or 0x201e. __ subl(rax, Immediate(0x2028 - 0x0b)); __ cmpl(rax, Immediate(0x2029 - 0x2028)); BranchOrBacktrack(below_equal, on_no_match); } return true; } case 'n': { // Match newlines (0x0a('\n'), 0x0d('\r'), 0x2028 and 0x2029) __ movl(rax, current_character()); __ xorp(rax, Immediate(0x01)); // See if current character is '\n'^1 or '\r'^1, i.e., 0x0b or 0x0c __ subl(rax, Immediate(0x0b)); __ cmpl(rax, Immediate(0x0c - 0x0b)); if (mode_ == LATIN1) { BranchOrBacktrack(above, on_no_match); } else { Label done; BranchOrBacktrack(below_equal, &done); // Compare original value to 0x2028 and 0x2029, using the already // computed (current_char ^ 0x01 - 0x0b). I.e., check for // 0x201d (0x2028 - 0x0b) or 0x201e. __ subl(rax, Immediate(0x2028 - 0x0b)); __ cmpl(rax, Immediate(0x2029 - 0x2028)); BranchOrBacktrack(above, on_no_match); __ bind(&done); } return true; } case 'w': { if (mode_ != LATIN1) { // Table is 256 entries, so all Latin1 characters can be tested. __ cmpl(current_character(), Immediate('z')); BranchOrBacktrack(above, on_no_match); } __ Move(rbx, ExternalReference::re_word_character_map()); DCHECK_EQ(0, word_character_map[0]); // Character '\0' is not a word char. __ testb(Operand(rbx, current_character(), times_1, 0), current_character()); BranchOrBacktrack(zero, on_no_match); return true; } case 'W': { Label done; if (mode_ != LATIN1) { // Table is 256 entries, so all Latin1 characters can be tested. __ cmpl(current_character(), Immediate('z')); __ j(above, &done); } __ Move(rbx, ExternalReference::re_word_character_map()); DCHECK_EQ(0, word_character_map[0]); // Character '\0' is not a word char. __ testb(Operand(rbx, current_character(), times_1, 0), current_character()); BranchOrBacktrack(not_zero, on_no_match); if (mode_ != LATIN1) { __ bind(&done); } return true; } case '*': // Match any character. return true; // No custom implementation (yet): s(UC16), S(UC16). default: return false; } } void RegExpMacroAssemblerX64::Fail() { STATIC_ASSERT(FAILURE == 0); // Return value for failure is zero. if (!global()) { __ Set(rax, FAILURE); } __ jmp(&exit_label_); } Handle<HeapObject> RegExpMacroAssemblerX64::GetCode(Handle<String> source) { Label return_rax; // Finalize code - write the entry point code now we know how many // registers we need. // Entry code: __ bind(&entry_label_); // Tell the system that we have a stack frame. Because the type is MANUAL, no // is generated. FrameScope scope(&masm_, StackFrame::MANUAL); // Actually emit code to start a new stack frame. __ pushq(rbp); __ movp(rbp, rsp); // Save parameters and callee-save registers. Order here should correspond // to order of kBackup_ebx etc. #ifdef _WIN64 // MSVC passes arguments in rcx, rdx, r8, r9, with backing stack slots. // Store register parameters in pre-allocated stack slots, __ movq(Operand(rbp, kInputString), rcx); __ movq(Operand(rbp, kStartIndex), rdx); // Passed as int32 in edx. __ movq(Operand(rbp, kInputStart), r8); __ movq(Operand(rbp, kInputEnd), r9); // Callee-save on Win64. __ pushq(rsi); __ pushq(rdi); __ pushq(rbx); #else // GCC passes arguments in rdi, rsi, rdx, rcx, r8, r9 (and then on stack). // Push register parameters on stack for reference. DCHECK_EQ(kInputString, -1 * kRegisterSize); DCHECK_EQ(kStartIndex, -2 * kRegisterSize); DCHECK_EQ(kInputStart, -3 * kRegisterSize); DCHECK_EQ(kInputEnd, -4 * kRegisterSize); DCHECK_EQ(kRegisterOutput, -5 * kRegisterSize); DCHECK_EQ(kNumOutputRegisters, -6 * kRegisterSize); __ pushq(rdi); __ pushq(rsi); __ pushq(rdx); __ pushq(rcx); __ pushq(r8); __ pushq(r9); __ pushq(rbx); // Callee-save #endif __ Push(Immediate(0)); // Number of successful matches in a global regexp. __ Push(Immediate(0)); // Make room for "string start - 1" constant. // Check if we have space on the stack for registers. Label stack_limit_hit; Label stack_ok; ExternalReference stack_limit = ExternalReference::address_of_stack_limit(isolate()); __ movp(rcx, rsp); __ Move(kScratchRegister, stack_limit); __ subp(rcx, Operand(kScratchRegister, 0)); // Handle it if the stack pointer is already below the stack limit. __ j(below_equal, &stack_limit_hit); // Check if there is room for the variable number of registers above // the stack limit. __ cmpp(rcx, Immediate(num_registers_ * kPointerSize)); __ j(above_equal, &stack_ok); // Exit with OutOfMemory exception. There is not enough space on the stack // for our working registers. __ Set(rax, EXCEPTION); __ jmp(&return_rax); __ bind(&stack_limit_hit); __ Move(code_object_pointer(), masm_.CodeObject()); CallCheckStackGuardState(); // Preserves no registers beside rbp and rsp. __ testp(rax, rax); // If returned value is non-zero, we exit with the returned value as result. __ j(not_zero, &return_rax); __ bind(&stack_ok); // Allocate space on stack for registers. __ subp(rsp, Immediate(num_registers_ * kPointerSize)); // Load string length. __ movp(rsi, Operand(rbp, kInputEnd)); // Load input position. __ movp(rdi, Operand(rbp, kInputStart)); // Set up rdi to be negative offset from string end. __ subq(rdi, rsi); // Set rax to address of char before start of the string // (effectively string position -1). __ movp(rbx, Operand(rbp, kStartIndex)); __ negq(rbx); if (mode_ == UC16) { __ leap(rax, Operand(rdi, rbx, times_2, -char_size())); } else { __ leap(rax, Operand(rdi, rbx, times_1, -char_size())); } // Store this value in a local variable, for use when clearing // position registers. __ movp(Operand(rbp, kStringStartMinusOne), rax); #if V8_OS_WIN // Ensure that we have written to each stack page, in order. Skipping a page // on Windows can cause segmentation faults. Assuming page size is 4k. const int kPageSize = 4096; const int kRegistersPerPage = kPageSize / kPointerSize; for (int i = num_saved_registers_ + kRegistersPerPage - 1; i < num_registers_; i += kRegistersPerPage) { __ movp(register_location(i), rax); // One write every page. } #endif // V8_OS_WIN // Initialize code object pointer. __ Move(code_object_pointer(), masm_.CodeObject()); Label load_char_start_regexp, start_regexp; // Load newline if index is at start, previous character otherwise. __ cmpl(Operand(rbp, kStartIndex), Immediate(0)); __ j(not_equal, &load_char_start_regexp, Label::kNear); __ Set(current_character(), '\n'); __ jmp(&start_regexp, Label::kNear); // Global regexp restarts matching here. __ bind(&load_char_start_regexp); // Load previous char as initial value of current character register. LoadCurrentCharacterUnchecked(-1, 1); __ bind(&start_regexp); // Initialize on-stack registers. if (num_saved_registers_ > 0) { // Fill saved registers with initial value = start offset - 1 // Fill in stack push order, to avoid accessing across an unwritten // page (a problem on Windows). if (num_saved_registers_ > 8) { __ Set(rcx, kRegisterZero); Label init_loop; __ bind(&init_loop); __ movp(Operand(rbp, rcx, times_1, 0), rax); __ subq(rcx, Immediate(kPointerSize)); __ cmpq(rcx, Immediate(kRegisterZero - num_saved_registers_ * kPointerSize)); __ j(greater, &init_loop); } else { // Unroll the loop. for (int i = 0; i < num_saved_registers_; i++) { __ movp(register_location(i), rax); } } } // Initialize backtrack stack pointer. __ movp(backtrack_stackpointer(), Operand(rbp, kStackHighEnd)); __ jmp(&start_label_); // Exit code: if (success_label_.is_linked()) { // Save captures when successful. __ bind(&success_label_); if (num_saved_registers_ > 0) { // copy captures to output __ movp(rdx, Operand(rbp, kStartIndex)); __ movp(rbx, Operand(rbp, kRegisterOutput)); __ movp(rcx, Operand(rbp, kInputEnd)); __ subp(rcx, Operand(rbp, kInputStart)); if (mode_ == UC16) { __ leap(rcx, Operand(rcx, rdx, times_2, 0)); } else { __ addp(rcx, rdx); } for (int i = 0; i < num_saved_registers_; i++) { __ movp(rax, register_location(i)); if (i == 0 && global_with_zero_length_check()) { // Keep capture start in rdx for the zero-length check later. __ movp(rdx, rax); } __ addp(rax, rcx); // Convert to index from start, not end. if (mode_ == UC16) { __ sarp(rax, Immediate(1)); // Convert byte index to character index. } __ movl(Operand(rbx, i * kIntSize), rax); } } if (global()) { // Restart matching if the regular expression is flagged as global. // Increment success counter. __ incp(Operand(rbp, kSuccessfulCaptures)); // Capture results have been stored, so the number of remaining global // output registers is reduced by the number of stored captures. __ movsxlq(rcx, Operand(rbp, kNumOutputRegisters)); __ subp(rcx, Immediate(num_saved_registers_)); // Check whether we have enough room for another set of capture results. __ cmpp(rcx, Immediate(num_saved_registers_)); __ j(less, &exit_label_); __ movp(Operand(rbp, kNumOutputRegisters), rcx); // Advance the location for output. __ addp(Operand(rbp, kRegisterOutput), Immediate(num_saved_registers_ * kIntSize)); // Prepare rax to initialize registers with its value in the next run. __ movp(rax, Operand(rbp, kStringStartMinusOne)); if (global_with_zero_length_check()) { // Special case for zero-length matches. // rdx: capture start index __ cmpp(rdi, rdx); // Not a zero-length match, restart. __ j(not_equal, &load_char_start_regexp); // rdi (offset from the end) is zero if we already reached the end. __ testp(rdi, rdi); __ j(zero, &exit_label_, Label::kNear); // Advance current position after a zero-length match. Label advance; __ bind(&advance); if (mode_ == UC16) { __ addq(rdi, Immediate(2)); } else { __ incq(rdi); } if (global_unicode()) CheckNotInSurrogatePair(0, &advance); } __ jmp(&load_char_start_regexp); } else { __ movp(rax, Immediate(SUCCESS)); } } __ bind(&exit_label_); if (global()) { // Return the number of successful captures. __ movp(rax, Operand(rbp, kSuccessfulCaptures)); } __ bind(&return_rax); #ifdef _WIN64 // Restore callee save registers. __ leap(rsp, Operand(rbp, kLastCalleeSaveRegister)); __ popq(rbx); __ popq(rdi); __ popq(rsi); // Stack now at rbp. #else // Restore callee save register. __ movp(rbx, Operand(rbp, kBackup_rbx)); // Skip rsp to rbp. __ movp(rsp, rbp); #endif // Exit function frame, restore previous one. __ popq(rbp); __ ret(0); // Backtrack code (branch target for conditional backtracks). if (backtrack_label_.is_linked()) { __ bind(&backtrack_label_); Backtrack(); } Label exit_with_exception; // Preempt-code if (check_preempt_label_.is_linked()) { SafeCallTarget(&check_preempt_label_); __ pushq(backtrack_stackpointer()); __ pushq(rdi); CallCheckStackGuardState(); __ testp(rax, rax); // If returning non-zero, we should end execution with the given // result as return value. __ j(not_zero, &return_rax); // Restore registers. __ Move(code_object_pointer(), masm_.CodeObject()); __ popq(rdi); __ popq(backtrack_stackpointer()); // String might have moved: Reload esi from frame. __ movp(rsi, Operand(rbp, kInputEnd)); SafeReturn(); } // Backtrack stack overflow code. if (stack_overflow_label_.is_linked()) { SafeCallTarget(&stack_overflow_label_); // Reached if the backtrack-stack limit has been hit. Label grow_failed; // Save registers before calling C function #ifndef _WIN64 // Callee-save in Microsoft 64-bit ABI, but not in AMD64 ABI. __ pushq(rsi); __ pushq(rdi); #endif // Call GrowStack(backtrack_stackpointer()) static const int num_arguments = 3; __ PrepareCallCFunction(num_arguments); #ifdef _WIN64 // Microsoft passes parameters in rcx, rdx, r8. // First argument, backtrack stackpointer, is already in rcx. __ leap(rdx, Operand(rbp, kStackHighEnd)); // Second argument __ LoadAddress(r8, ExternalReference::isolate_address(isolate())); #else // AMD64 ABI passes parameters in rdi, rsi, rdx. __ movp(rdi, backtrack_stackpointer()); // First argument. __ leap(rsi, Operand(rbp, kStackHighEnd)); // Second argument. __ LoadAddress(rdx, ExternalReference::isolate_address(isolate())); #endif ExternalReference grow_stack = ExternalReference::re_grow_stack(isolate()); __ CallCFunction(grow_stack, num_arguments); // If return nullptr, we have failed to grow the stack, and // must exit with a stack-overflow exception. __ testp(rax, rax); __ j(equal, &exit_with_exception); // Otherwise use return value as new stack pointer. __ movp(backtrack_stackpointer(), rax); // Restore saved registers and continue. __ Move(code_object_pointer(), masm_.CodeObject()); #ifndef _WIN64 __ popq(rdi); __ popq(rsi); #endif SafeReturn(); } if (exit_with_exception.is_linked()) { // If any of the code above needed to exit with an exception. __ bind(&exit_with_exception); // Exit with Result EXCEPTION(-1) to signal thrown exception. __ Set(rax, EXCEPTION); __ jmp(&return_rax); } FixupCodeRelativePositions(); CodeDesc code_desc; Isolate* isolate = this->isolate(); masm_.GetCode(isolate, &code_desc); Handle<Code> code = isolate->factory()->NewCode(code_desc, Code::REGEXP, masm_.CodeObject()); PROFILE(isolate, RegExpCodeCreateEvent(AbstractCode::cast(*code), *source)); return Handle<HeapObject>::cast(code); } void RegExpMacroAssemblerX64::GoTo(Label* to) { BranchOrBacktrack(no_condition, to); } void RegExpMacroAssemblerX64::IfRegisterGE(int reg, int comparand, Label* if_ge) { __ cmpp(register_location(reg), Immediate(comparand)); BranchOrBacktrack(greater_equal, if_ge); } void RegExpMacroAssemblerX64::IfRegisterLT(int reg, int comparand, Label* if_lt) { __ cmpp(register_location(reg), Immediate(comparand)); BranchOrBacktrack(less, if_lt); } void RegExpMacroAssemblerX64::IfRegisterEqPos(int reg, Label* if_eq) { __ cmpp(rdi, register_location(reg)); BranchOrBacktrack(equal, if_eq); } RegExpMacroAssembler::IrregexpImplementation RegExpMacroAssemblerX64::Implementation() { return kX64Implementation; } void RegExpMacroAssemblerX64::LoadCurrentCharacter(int cp_offset, Label* on_end_of_input, bool check_bounds, int characters) { DCHECK(cp_offset < (1<<30)); // Be sane! (And ensure negation works) if (check_bounds) { if (cp_offset >= 0) { CheckPosition(cp_offset + characters - 1, on_end_of_input); } else { CheckPosition(cp_offset, on_end_of_input); } } LoadCurrentCharacterUnchecked(cp_offset, characters); } void RegExpMacroAssemblerX64::PopCurrentPosition() { Pop(rdi); } void RegExpMacroAssemblerX64::PopRegister(int register_index) { Pop(rax); __ movp(register_location(register_index), rax); } void RegExpMacroAssemblerX64::PushBacktrack(Label* label) { Push(label); CheckStackLimit(); } void RegExpMacroAssemblerX64::PushCurrentPosition() { Push(rdi); } void RegExpMacroAssemblerX64::PushRegister(int register_index, StackCheckFlag check_stack_limit) { __ movp(rax, register_location(register_index)); Push(rax); if (check_stack_limit) CheckStackLimit(); } STATIC_ASSERT(kPointerSize == kInt64Size || kPointerSize == kInt32Size); void RegExpMacroAssemblerX64::ReadCurrentPositionFromRegister(int reg) { if (kPointerSize == kInt64Size) { __ movq(rdi, register_location(reg)); } else { // Need sign extension for x32 as rdi might be used as an index register. __ movsxlq(rdi, register_location(reg)); } } void RegExpMacroAssemblerX64::ReadPositionFromRegister(Register dst, int reg) { if (kPointerSize == kInt64Size) { __ movq(dst, register_location(reg)); } else { // Need sign extension for x32 as dst might be used as an index register. __ movsxlq(dst, register_location(reg)); } } void RegExpMacroAssemblerX64::ReadStackPointerFromRegister(int reg) { __ movp(backtrack_stackpointer(), register_location(reg)); __ addp(backtrack_stackpointer(), Operand(rbp, kStackHighEnd)); } void RegExpMacroAssemblerX64::SetCurrentPositionFromEnd(int by) { Label after_position; __ cmpp(rdi, Immediate(-by * char_size())); __ j(greater_equal, &after_position, Label::kNear); __ movq(rdi, Immediate(-by * char_size())); // On RegExp code entry (where this operation is used), the character before // the current position is expected to be already loaded. // We have advanced the position, so it's safe to read backwards. LoadCurrentCharacterUnchecked(-1, 1); __ bind(&after_position); } void RegExpMacroAssemblerX64::SetRegister(int register_index, int to) { DCHECK(register_index >= num_saved_registers_); // Reserved for positions! __ movp(register_location(register_index), Immediate(to)); } bool RegExpMacroAssemblerX64::Succeed() { __ jmp(&success_label_); return global(); } void RegExpMacroAssemblerX64::WriteCurrentPositionToRegister(int reg, int cp_offset) { if (cp_offset == 0) { __ movp(register_location(reg), rdi); } else { __ leap(rax, Operand(rdi, cp_offset * char_size())); __ movp(register_location(reg), rax); } } void RegExpMacroAssemblerX64::ClearRegisters(int reg_from, int reg_to) { DCHECK(reg_from <= reg_to); __ movp(rax, Operand(rbp, kStringStartMinusOne)); for (int reg = reg_from; reg <= reg_to; reg++) { __ movp(register_location(reg), rax); } } void RegExpMacroAssemblerX64::WriteStackPointerToRegister(int reg) { __ movp(rax, backtrack_stackpointer()); __ subp(rax, Operand(rbp, kStackHighEnd)); __ movp(register_location(reg), rax); } // Private methods: void RegExpMacroAssemblerX64::CallCheckStackGuardState() { // This function call preserves no register values. Caller should // store anything volatile in a C call or overwritten by this function. static const int num_arguments = 3; __ PrepareCallCFunction(num_arguments); #ifdef _WIN64 // Second argument: Code* of self. (Do this before overwriting r8). __ movp(rdx, code_object_pointer()); // Third argument: RegExp code frame pointer. __ movp(r8, rbp); // First argument: Next address on the stack (will be address of // return address). __ leap(rcx, Operand(rsp, -kPointerSize)); #else // Third argument: RegExp code frame pointer. __ movp(rdx, rbp); // Second argument: Code* of self. __ movp(rsi, code_object_pointer()); // First argument: Next address on the stack (will be address of // return address). __ leap(rdi, Operand(rsp, -kRegisterSize)); #endif ExternalReference stack_check = ExternalReference::re_check_stack_guard_state(isolate()); __ CallCFunction(stack_check, num_arguments); } // Helper function for reading a value out of a stack frame. template <typename T> static T& frame_entry(Address re_frame, int frame_offset) { return reinterpret_cast<T&>(Memory::int32_at(re_frame + frame_offset)); } template <typename T> static T* frame_entry_address(Address re_frame, int frame_offset) { return reinterpret_cast<T*>(re_frame + frame_offset); } int RegExpMacroAssemblerX64::CheckStackGuardState(Address* return_address, Code* re_code, Address re_frame) { return NativeRegExpMacroAssembler::CheckStackGuardState( frame_entry<Isolate*>(re_frame, kIsolate), frame_entry<int>(re_frame, kStartIndex), frame_entry<int>(re_frame, kDirectCall) == 1, return_address, re_code, frame_entry_address<String*>(re_frame, kInputString), frame_entry_address<const byte*>(re_frame, kInputStart), frame_entry_address<const byte*>(re_frame, kInputEnd)); } Operand RegExpMacroAssemblerX64::register_location(int register_index) { DCHECK(register_index < (1<<30)); if (num_registers_ <= register_index) { num_registers_ = register_index + 1; } return Operand(rbp, kRegisterZero - register_index * kPointerSize); } void RegExpMacroAssemblerX64::CheckPosition(int cp_offset, Label* on_outside_input) { if (cp_offset >= 0) { __ cmpl(rdi, Immediate(-cp_offset * char_size())); BranchOrBacktrack(greater_equal, on_outside_input); } else { __ leap(rax, Operand(rdi, cp_offset * char_size())); __ cmpp(rax, Operand(rbp, kStringStartMinusOne)); BranchOrBacktrack(less_equal, on_outside_input); } } void RegExpMacroAssemblerX64::BranchOrBacktrack(Condition condition, Label* to) { if (condition < 0) { // No condition if (to == nullptr) { Backtrack(); return; } __ jmp(to); return; } if (to == nullptr) { __ j(condition, &backtrack_label_); return; } __ j(condition, to); } void RegExpMacroAssemblerX64::SafeCall(Label* to) { __ call(to); } void RegExpMacroAssemblerX64::SafeCallTarget(Label* label) { __ bind(label); __ subp(Operand(rsp, 0), code_object_pointer()); } void RegExpMacroAssemblerX64::SafeReturn() { __ addp(Operand(rsp, 0), code_object_pointer()); __ ret(0); } void RegExpMacroAssemblerX64::Push(Register source) { DCHECK(source != backtrack_stackpointer()); // Notice: This updates flags, unlike normal Push. __ subp(backtrack_stackpointer(), Immediate(kIntSize)); __ movl(Operand(backtrack_stackpointer(), 0), source); } void RegExpMacroAssemblerX64::Push(Immediate value) { // Notice: This updates flags, unlike normal Push. __ subp(backtrack_stackpointer(), Immediate(kIntSize)); __ movl(Operand(backtrack_stackpointer(), 0), value); } void RegExpMacroAssemblerX64::FixupCodeRelativePositions() { for (int i = 0, n = code_relative_fixup_positions_.length(); i < n; i++) { int position = code_relative_fixup_positions_[i]; // The position succeeds a relative label offset from position. // Patch the relative offset to be relative to the Code object pointer // instead. int patch_position = position - kIntSize; int offset = masm_.long_at(patch_position); masm_.long_at_put(patch_position, offset + position + Code::kHeaderSize - kHeapObjectTag); } code_relative_fixup_positions_.Clear(); } void RegExpMacroAssemblerX64::Push(Label* backtrack_target) { __ subp(backtrack_stackpointer(), Immediate(kIntSize)); __ movl(Operand(backtrack_stackpointer(), 0), backtrack_target); MarkPositionForCodeRelativeFixup(); } void RegExpMacroAssemblerX64::Pop(Register target) { DCHECK(target != backtrack_stackpointer()); __ movsxlq(target, Operand(backtrack_stackpointer(), 0)); // Notice: This updates flags, unlike normal Pop. __ addp(backtrack_stackpointer(), Immediate(kIntSize)); } void RegExpMacroAssemblerX64::Drop() { __ addp(backtrack_stackpointer(), Immediate(kIntSize)); } void RegExpMacroAssemblerX64::CheckPreemption() { // Check for preemption. Label no_preempt; ExternalReference stack_limit = ExternalReference::address_of_stack_limit(isolate()); __ load_rax(stack_limit); __ cmpp(rsp, rax); __ j(above, &no_preempt); SafeCall(&check_preempt_label_); __ bind(&no_preempt); } void RegExpMacroAssemblerX64::CheckStackLimit() { Label no_stack_overflow; ExternalReference stack_limit = ExternalReference::address_of_regexp_stack_limit(isolate()); __ load_rax(stack_limit); __ cmpp(backtrack_stackpointer(), rax); __ j(above, &no_stack_overflow); SafeCall(&stack_overflow_label_); __ bind(&no_stack_overflow); } void RegExpMacroAssemblerX64::LoadCurrentCharacterUnchecked(int cp_offset, int characters) { if (mode_ == LATIN1) { if (characters == 4) { __ movl(current_character(), Operand(rsi, rdi, times_1, cp_offset)); } else if (characters == 2) { __ movzxwl(current_character(), Operand(rsi, rdi, times_1, cp_offset)); } else { DCHECK_EQ(1, characters); __ movzxbl(current_character(), Operand(rsi, rdi, times_1, cp_offset)); } } else { DCHECK(mode_ == UC16); if (characters == 2) { __ movl(current_character(), Operand(rsi, rdi, times_1, cp_offset * sizeof(uc16))); } else { DCHECK_EQ(1, characters); __ movzxwl(current_character(), Operand(rsi, rdi, times_1, cp_offset * sizeof(uc16))); } } } #undef __ #endif // V8_INTERPRETED_REGEXP } // namespace internal } // namespace v8 #endif // V8_TARGET_ARCH_X64
[ "2923878201@qq.com" ]
2923878201@qq.com
7832c25611eaf7f2afe07897823884101f7ed32f
8b8cfce27f883053d0c869777b6f5db3d6fcc159
/Ideas/DuelParticles_initialTest/src/Particle.cpp
b84081efdb3098af469ed71fd2db0d090fe3bde3
[]
no_license
xcode2010/NWS_violins
2088ad09d4401b9e04bb888327a8caba1b5d9a29
0c62bd3ab7612473772ea614265345bde3df403b
refs/heads/master
2021-05-26T16:40:36.311329
2013-11-10T03:40:39
2013-11-10T03:40:39
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,192
cpp
// // Particle.cpp // violinParticleTest // // Created by Owen Herterich on 10/6/13. // // #include "Particle.h" Particle::Particle( ofVec2f _pos, ofVec2f _vel, ofColor _c ) { pos = _pos; vel = _vel; c = _c; age = 0; life = ofRandom(100,200); size = 4; trans = 150; damping = 0.03; } void Particle::addForce( ofVec2f force ) { acc += force; } void Particle::attractionForce( float strength ) { ofVec2f loc; loc.set(ofGetWindowWidth() / 2, ofGetWindowHeight() / 2); ofVec2f diff; diff = pos - loc; diff.normalize(); acc.x -= diff.x * strength; acc.y -= diff.y * strength; } void Particle::addDamping() { acc.x = acc.x - vel.x * damping; acc.y = acc.y - vel.y * damping; } void Particle::update() { vel += acc; pos += vel; float pct = 1 - age / life; trans = 255.0 * pct; age += 1.0; size = 4 * pct; acc.set(0.0); } void Particle::draw() { ofSetRectMode(OF_RECTMODE_CENTER); ofSetColor( c, trans ); ofRect( pos, size, size ); } bool Particle::kill() { if (age >= life) { return true; } else return false; }
[ "oherterich@gmail.com" ]
oherterich@gmail.com
d4ab20735b2441d5d88a768cf48d9df3d9cc0a51
b9f17af8066d6a37b407cdf4d374869b00fd5aaf
/UdpServer/main.cpp
9ab6ec3d0ddc5bfcdd2d36ce7d3a843980c417fc
[]
no_license
ulkiorra1992/UdpChat
5cbb7a00c8e2d54b8ea04a220182b0f7badfaab7
9386d41a3c16e91b9921dbacc9a878fbb619e6f8
refs/heads/master
2021-04-30T04:18:03.788411
2018-02-23T07:01:39
2018-02-23T07:01:39
121,533,069
0
0
null
null
null
null
UTF-8
C++
false
false
742
cpp
#include "server.h" #include <QApplication> #include <QTextCodec> void initCodec(); int main(int argc, char *argv[]) { QApplication app(argc, argv); initCodec(); Server server; server.show(); return app.exec(); } // ==================== Oтображение русских букв =============================// void initCodec() { const char *codecName = "UTF-8"; #ifdef Q_WS_WIN const char *codecForLocaleName = "CP866"; #else const char *codecForLocaleName = "UTF-8"; #endif QTextCodec::setCodecForCStrings(QTextCodec::codecForName(codecName)); QTextCodec::setCodecForLocale(QTextCodec::codecForName(codecForLocaleName)); QTextCodec::setCodecForTr(QTextCodec::codecForName(codecName)); }
[ "stepanov12@bk.ru" ]
stepanov12@bk.ru
35cdec16e94474f9e9c7a0c89ab0913b221aa5e5
e969e081ecb312b1c778cd6f8d04face96fad5cd
/Combination/BinUtils.h
9f14c9518ba561113df2328329d9dae86eb7746f
[]
no_license
roshan-chandekar/Combination
1d87fd15fdc726b4406456106781e01d37360172
60ee95510620ae9dbbbbdafba9ba1e91a8f01785
refs/heads/master
2023-03-16T04:41:36.780272
2017-12-23T12:32:54
2017-12-23T12:32:54
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,842
h
/// /// BinUtils.h /// /// Some utilities to deal with bins /// #ifndef __BTagCombination__BinUtils__ #define __BTagCombination__BinUtils__ #include "Combination/Parser.h" #include <set> #include <vector> namespace BTagCombination { // Get the list of bins from a single analysis std::set<std::set<CalibrationBinBoundary> > listAnalysisBins(const CalibrationAnalysis &ana); // Get a list of all bins in an analysis. std::set<std::set<CalibrationBinBoundary> > listAllBins (const std::vector<CalibrationAnalysis> &analyses); // Remove a bin from all analyses... std::vector<CalibrationAnalysis> removeBin (const std::vector<CalibrationAnalysis> &analyses, const std::set<CalibrationBinBoundary> &binToRemove); // Remove all but this bin std::vector<CalibrationAnalysis> removeAllBinsButBin (const std::vector<CalibrationAnalysis> &analyses, const std::set<CalibrationBinBoundary> &binToNotRemove); // Get a list of all systematic errors std::set<std::string> listAllSysErrors(const std::vector<CalibrationAnalysis> &analyses); // Remove a sys error from all analyses... std::vector<CalibrationAnalysis> removeSysError(const std::vector<CalibrationAnalysis> &analyses, const std::string &sysErrorName); // Alter a sys error to be correlated std::vector<CalibrationAnalysis> makeSysErrorUncorrelated(const std::vector<CalibrationAnalysis> &analyses, const std::string &sysErrorName); // Find all bins in the list that contain a specified low edge value std::vector<CalibrationBin> find_bins_with_low_edge(const std::string &axis_name, const double axis_low_val, const std::vector<CalibrationBin> allbins); // Return the total systematic error (added in quad) that this bin has. double bin_sys (const CalibrationBin &bin); double bin_sys(const std::vector<SystematicError> &errors); } #endif
[ "gwatts@47dd0619-b7a8-462c-89d8-56395fd97e59" ]
gwatts@47dd0619-b7a8-462c-89d8-56395fd97e59
5fd46bf7b18a601b2135f44653c9d9cc3b30348a
03a033adeb5bff3166cc6069f0032570c53d21d1
/archive/tmpl_test.hpp
63dab0d614fc59841269c28a206e0f25c1c8ed16
[]
no_license
mdeilman/cpptut
2c6217ef8eeb82bc6779feebfeff7a5f2dfb1e11
f78f64e6702f450393ac1cccaf78016e6cfd7398
refs/heads/master
2021-01-17T12:51:35.360761
2017-09-06T07:37:09
2017-09-06T07:37:09
59,654,864
0
0
null
null
null
null
UTF-8
C++
false
false
140
hpp
#ifndef TMPL_TEST_HPP_ #define TMPL_TEST_HPP_ #include "gtest/gtest.h" #include "tmpl.hpp" TEST(Name, name){ } #endif // TMPL_TEST_HPP_
[ "mario.deilmann@googlemail.com" ]
mario.deilmann@googlemail.com
589faebc6ca852fdcc2824c8408e4a100353286c
b5a6bcac54314b8f0e0140fb1b962bafd7757fbf
/bitmap.h
bf7141989f95ec7580fa6f2e1d17f83f5beeb9ef
[]
no_license
DantasVD/GraphPatternMatching
9c5d65d53d9e08d751d63e29b76dcaaa54f40afb
d41ae87338a7bfd5663dab5700c35a1c4ddfa9e9
refs/heads/master
2020-04-18T09:39:10.796184
2019-02-07T03:07:38
2019-02-07T03:07:38
167,441,737
0
0
null
null
null
null
UTF-8
C++
false
false
494
h
#include <bits/stdc++.h> using namespace std; class Bitmap { private: Vertex* vertice; bool bit; public: //Construtor Bitmap(Vertex* ver, bool value); //gets e sets void setBool(bool value); bool getBool(); Vertex* getVertex(); }; Bitmap::Bitmap(Vertex* ver, bool value){ vertice = ver; bit = value; } void Bitmap::setBool(bool value){ bit = value; } bool Bitmap::getBool(){ return bit; } Vertex* Bitmap::getVertex(){ return vertice; }
[ "dantas.victor94@gmail.com" ]
dantas.victor94@gmail.com
dadc2bd336e148fdbfa6a76cd9796db83cd437a6
65025edce8120ec0c601bd5e6485553697c5c132
/Engine/rendersystem/gles/GLESTypes.cc
2387678d431536206ab573e5e6e4363da48cea15
[ "MIT" ]
permissive
stonejiang/genesis-3d
babfc99cfc9085527dff35c7c8662d931fbb1780
df5741e7003ba8e21d21557d42f637cfe0f6133c
refs/heads/master
2020-12-25T18:22:32.752912
2013-12-13T07:45:17
2013-12-13T07:45:17
15,157,071
4
4
null
null
null
null
UTF-8
C++
false
false
10,515
cc
/**************************************************************************** Copyright (c) 2011-2013,WebJet Business Division,CYOU http://www.genesis-3d.com.cn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "stdneb.h" #include "GLESTypes.h" namespace GLES { using namespace RenderBase; GLenum GLESTypes::AsGLESUsage(RenderBase::RenderResource::Usage usage, RenderBase::RenderResource::Access access) { switch (usage) { case RenderResource::UsageImmutable: return GL_STATIC_DRAW; case RenderResource::UsageDynamic: return GL_DYNAMIC_DRAW; break; default: return GL_STATIC_DRAW; } } GLenum GLESTypes::AsGLESUsage(RenderBase::BufferData::Usage usage) { switch (usage) { case BufferData::Static: return GL_STATIC_DRAW; case BufferData::Dynamic: return GL_DYNAMIC_DRAW; default: return GL_STATIC_DRAW; } } GLenum GLESTypes::IndexTypeAsGLESFormat(RenderBase::IndexBufferData::IndexType indexType) { switch(indexType) { case RenderBase::IndexBufferData::Int16: return GL_UNSIGNED_SHORT; case RenderBase::IndexBufferData::Int32: return GL_UNSIGNED_INT; default: n_warning("GLESTypes::IndexTypeAsGLESFormat: Unknown Index Format"); return GL_UNSIGNED_SHORT; } } GLenum GLESTypes::AsGLESInternalPixelFormat(RenderBase::PixelFormat::Code p) { switch (p) { case PixelFormat::X8R8G8B8: case PixelFormat::A8R8G8B8: return GL_RGBA; case PixelFormat::R8G8B8: return GL_RGB; case PixelFormat::A8: return GL_ALPHA; case PixelFormat::L8A8: return GL_LUMINANCE_ALPHA; case PixelFormat::ETC1_RGB8: #ifdef __OSX__ n_warning( "Unspported pixel format\n" ); return GL_UNSIGNED_BYTE; #else return GL_ETC1_RGB8_OES; #endif #ifdef GL_IMG_texture_compression_pvrtc case PixelFormat::PVRTC_RGB2: return GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG; case PixelFormat::PVRTC_RGBA2: return GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG; case PixelFormat::PVRTC_RGB4: return GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG; case PixelFormat::PVRTC_RGBA4: return GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG; #else case PixelFormat::PVRTC_RGB2: case PixelFormat::PVRTC_RGBA2: case PixelFormat::PVRTC_RGB4: case PixelFormat::PVRTC_RGBA4: n_warning(" GLESTypes::AsGLESPixelFormat: PVRTC texture is not supported on this GLES"); return GL_RGBA; #endif default: n_warning(" GLESTypes::AsGLESPixelFormat: Unknown Pixel Format"); return GL_RGBA; } } GLenum GLESTypes::AsGLESPixelDataType(RenderBase::PixelFormat::Code p) { switch (p) { case PixelFormat::L8A8: case PixelFormat::A8: case PixelFormat::X8R8G8B8: case PixelFormat::A8R8G8B8: case PixelFormat::R8G8B8: return GL_UNSIGNED_BYTE; case PixelFormat::ETC1_RGB8: #ifdef __OSX__ n_warning( "Unspported pixel format\n" ); return GL_UNSIGNED_BYTE; #else return GL_ETC1_RGB8_OES; #endif #ifdef GL_IMG_texture_compression_pvrtc case PixelFormat::PVRTC_RGB2: return GL_UNSIGNED_BYTE; case PixelFormat::PVRTC_RGBA2: return GL_UNSIGNED_BYTE; case PixelFormat::PVRTC_RGB4: return GL_UNSIGNED_BYTE; case PixelFormat::PVRTC_RGBA4: return GL_UNSIGNED_BYTE; #else case PixelFormat::PVRTC_RGB2: case PixelFormat::PVRTC_RGBA2: case PixelFormat::PVRTC_RGB4: case PixelFormat::PVRTC_RGBA4: n_warning(" GLESTypes::AsGLESPixelFormat: PVRTC texture is not supported on this GLES"); return GL_UNSIGNED_BYTE; #endif default: n_warning(" GLESTypes::AsGLESPixelFormat: Unknown Pixel Format"); return GL_UNSIGNED_BYTE; } } GLenum GLESTypes::AsGLESOriginPixelFormat(RenderBase::PixelFormat::Code p) { switch (p) { case PixelFormat::X8R8G8B8: case PixelFormat::A8R8G8B8: return GL_RGBA; case PixelFormat::R8G8B8: return GL_RGB; case PixelFormat::A8: return GL_ALPHA; case PixelFormat::L8A8: return GL_LUMINANCE_ALPHA; case PixelFormat::ETC1_RGB8: #ifdef __OSX__ n_warning( "Unspported pixel format\n" ); return GL_UNSIGNED_BYTE; #else return GL_ETC1_RGB8_OES; #endif #ifdef GL_IMG_texture_compression_pvrtc case PixelFormat::PVRTC_RGB2: return GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG; case PixelFormat::PVRTC_RGBA2: return GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG; case PixelFormat::PVRTC_RGB4: return GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG; case PixelFormat::PVRTC_RGBA4: return GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG; #else case PixelFormat::PVRTC_RGB2: case PixelFormat::PVRTC_RGBA2: case PixelFormat::PVRTC_RGB4: case PixelFormat::PVRTC_RGBA4: n_warning(" GLESTypes::AsGLESPixelFormat: PVRTC texture is not supported on this GLES"); return GL_RGBA; #endif default: n_warning(" GLESTypes::AsGLESPixelFormat: Unknown Pixel Format"); return GL_RGBA; } } GLenum GLESTypes::AsGLESTextureType(RenderBase::Texture::Type t) { switch(t) { case Texture::Texture2D: return GL_TEXTURE_2D; case Texture::TextureCube: return GL_TEXTURE_CUBE_MAP; default: n_warning("GLESTypes::AsGLESTextureType: Invalid Type\n"); return GL_TEXTURE_2D; } } GLenum GLESTypes::AsGLESTextureType(const Util::String& type) { if (type == "Texture2D") { return GL_TEXTURE_2D; } else if (type == "TextureCUBE") { return GL_TEXTURE_CUBE_MAP; } else { n_warning("GLESTypes::AsGLESTextureType: Invalid Type\n"); return GL_TEXTURE_2D; } } GLenum GLESTypes::AsGLESBasicType(RenderBase::VertexComponent::Format format) { switch (format) { case VertexComponent::Float: case VertexComponent::Float2: case VertexComponent::Float3: case VertexComponent::Float4: return GL_FLOAT; case VertexComponent::Short2: case VertexComponent::Short4: case VertexComponent::Short2N: case VertexComponent::Short4N: return GL_SHORT; case VertexComponent::ColorBGRA: case VertexComponent::ColorRGBA: case VertexComponent::UByte4: case VertexComponent::UByte4N: return GL_UNSIGNED_BYTE; default: return 0; } } GLenum GLESTypes::AsGLESPrimitiveType(RenderBase::PrimitiveTopology::Code t) { switch (t) { case PrimitiveTopology::PointList: return GL_POINTS; case PrimitiveTopology::LineList: return GL_LINES; case PrimitiveTopology::LineStrip: return GL_LINE_STRIP; case PrimitiveTopology::TriangleList: return GL_TRIANGLES; case PrimitiveTopology::TriangleStrip: return GL_TRIANGLE_STRIP; default: n_warning("GLTypes::AsGLPrimitiveType(): unsupported topology '%s'!", PrimitiveTopology::ToString(t).AsCharPtr()); return GL_TRIANGLES; } } GLint GLESTypes::AsGLESSTextureAddress(RenderBase::TextureAddressMode mode) { switch (mode) { case eTAMCLAMP: return GL_CLAMP_TO_EDGE; case eTAMWRAP: return GL_REPEAT; case eTAMMIRROR: return GL_MIRRORED_REPEAT; case eTAMBORDER: n_warning("GLES does not support GL_BORDER Address mode!"); return GL_REPEAT; default: n_assert(false); return GL_REPEAT; } } GLenum GLESTypes::AsGLESBlendFactor(RenderBase::BlendFactor factor) { switch (factor) { case eBFZERO: return GL_ZERO; case eBFONE: return GL_ONE; case eBFSRCALPHA: return GL_SRC_ALPHA; case eBFDSTALPHA: return GL_DST_ALPHA; case eBFINVSRCALPHA: return GL_ONE_MINUS_SRC_ALPHA; case eBFINVDESTALPHA: return GL_ONE_MINUS_DST_ALPHA; case eBFSRCCOLOR: return GL_SRC_COLOR; case eBFDESTCOLOR: return GL_DST_COLOR; case eBFINVSRCCOLOR: return GL_ONE_MINUS_SRC_COLOR; case eBFINVDESTCOLOR: return GL_ONE_MINUS_DST_COLOR; case eBFSRCALPHASAT: return GL_SRC_ALPHA_SATURATE; default: n_assert(false); return GL_ZERO; } } GLenum GLESTypes::AsGLESBlendOperation(RenderBase::BlendOperation blendop) { switch (blendop) { case eBOADD: return GL_FUNC_ADD; case eBOSUBSTRACT: return GL_FUNC_SUBTRACT; case eBOREVSUBTRACT: return GL_FUNC_REVERSE_SUBTRACT; case eBOMIN: case eBOMAX: n_warning("GLES does not support GL_MIN and GL_MAX!"); default: return GL_FUNC_ADD; } } GLenum GLESTypes::AsGLESCompareFunction(RenderBase::CompareFunction func) { switch (func) { case eCFNEVER: return GL_NEVER; case eCFALWAYS: return GL_ALWAYS; case eCFLESS: return GL_LESS; case eCFLESSEQUAL: return GL_LEQUAL; case eCFEQUAL: return GL_EQUAL; case eCFNOTEQUAL: return GL_NOTEQUAL; case eCFGREATEREQUAL: return GL_GEQUAL; case eCFGREATER: return GL_GREATER; default: return GL_NEVER; }; } GLenum GLESTypes::AsGLESStencilOperation(RenderBase::StencilOperation so) { switch (so) { case eSOKEEP: return GL_KEEP; case eSOZERO: return GL_ZERO; case eSOREPLACE: return GL_REPLACE; case eSOINCR: return GL_INCR; case eSODECR: return GL_DECR; case eSOINVERT: return GL_INVERT; case eSOINCRWRAP: return GL_INCR_WRAP; case eSODECRSAT: return GL_DECR_WRAP; default: return GL_KEEP; }; } Util::String GLESTypes::AsGlesAttributeName(const RenderBase::VertexComponent::SemanticName& sem) { switch (sem) { case VertexComponent::Position: return "gles_Vertex"; case VertexComponent::TexCoord: return "gles_MultiTexCoord"; case VertexComponent::Color: return "gles_Color"; case VertexComponent::Normal: return "gles_Normal"; case VertexComponent::Tangent: return "gles_TANGENT"; case VertexComponent::SkinWeights: return "xlat_attrib_blendweights"; case VertexComponent::SkinJIndices: return "xlat_attrib_blendindices"; default: n_error("No Matched GLES Attribute Name!"); return "Error!"; } } }
[ "jiangtao@tao-studio.net" ]
jiangtao@tao-studio.net
80f62e275b1d9d84084b54e89fd45e91917a1311
009a28ea1222e2655bd66c58f1a26606561ddd64
/testing faster cin in loop/main.cpp
10de9e4ca7be9b4637cab7423f1c4186334bbec7
[]
no_license
naveenyadav15/Hackerrank
3aaa812febd769ca99dd803c07c37c458f9d425e
f47eaad3b33db2169f71e5c77253c3724d712174
refs/heads/master
2020-05-29T14:36:28.910189
2016-09-13T11:56:04
2016-09-13T11:56:04
65,710,807
2
0
null
null
null
null
UTF-8
C++
false
false
554
cpp
#include <iostream> using namespace std; int main() {int n,i=0; cin>>n; int a[n]; while(i!=n) /*it makes it faster then normal linear search *as it checks only one operation* as compared to the * for * loop*/ { cin>>a[i]; i++; }i=0; if(a[n-1]!=10) {a[n-1]=10; while(a[i]!=10) i++; if(i<n-1&&a[i]==10) cout<<i; else cout<<"Not found"; }else cout<<n-1; cout << endl << "Hello world!" << endl; return 0; }
[ "naveenyadav4116@gmail.com" ]
naveenyadav4116@gmail.com
21485e3197abbdb2a38ccee68d344f65b2bf7c0d
9cd5292363ba856ec75b71e90b4129dea515889a
/tests/tst_test.cpp
39f39dad0a668c04b0df1600bf25e4146b04e17e
[]
no_license
operasfantom/dirdemo
baa98a68a5804d0c4d574931a27f9930cc41ab9c
b1bedd12fcd07b2d7e54b90219edcd6be0223ac1
refs/heads/master
2020-04-14T09:42:10.431362
2019-01-26T13:21:40
2019-01-26T13:21:40
163,766,607
1
0
null
2019-01-01T21:07:44
2019-01-01T21:07:44
null
UTF-8
C++
false
false
2,574
cpp
#include "tst_test.h" test::test() { } test::~test() { } void test::create_file(QString data, int quantity) { static int id; for (int i = 0; i < quantity; ++i) { QFile file(GENERATE_PATH.filePath(QString::number(++id))); // qDebug(QFileInfo(file).absoluteFilePath().toUtf8()); if (file.open(QFile::ReadWrite)) { file.write(data.toUtf8()); file.close(); } } } void test::create_file_subdirectory(QString data, int quantity) { static int subdirectory_id; static int id; QString relative_folder = "dir" + QString::number(++subdirectory_id); QDir relative_path = GENERATE_PATH.filePath(relative_folder); GENERATE_PATH.mkdir(relative_folder); for (int i = 0; i < quantity; ++i) { QFile file(relative_path.filePath(QString::number(++id))); // qDebug(QFileInfo(file).absoluteFilePath().toUtf8()); if (file.open(QFile::ReadWrite)) { file.write(data.toUtf8()); file.close(); } } } void test::init() { CURRENT_PATH.mkdir(GENERATE_FOLDER); controller.set_directory(GENERATE_PATH.path()); connect(&controller, &directory_controller::send_duplicates_group, [&](QFileInfoList list) { group_sizes.insert(list.size()); }); } void test::cleanup() { GENERATE_PATH.removeRecursively(); group_sizes.clear(); } void test::test_case_empty_folder() { controller.scan_directory(true); QCOMPARE((QSet<int>{}), group_sizes); } void test::test_case1() { create_file("text", 3); create_file("unique"); create_file("", 2); controller.scan_directory(true); QCOMPARE((QSet<int>{2, 3}), group_sizes); } void test::test_case2() { create_file(QString('-', 4 * 1024 * 1024), 3); controller.scan_directory(true); QCOMPARE((QSet<int>{3}).toList(), group_sizes.toList()); } void test::test_large_group() { const int N = 5'000; create_file(QString('0', 4 * 1024 * 1024), N); { QTime myTimer; myTimer.start(); controller.scan_directory(true); int millis = myTimer.elapsed(); qDebug(QString::number(millis).toUtf8() + " ms"); } QCOMPARE((QSet<int>{N}).toList(), group_sizes.toList()); } void test::test_sub_directory() { QString data(8*1024*1024 + 1); create_file(data, 1); create_file_subdirectory(data, 2); create_file_subdirectory(data, 3); controller.scan_directory(true); QCOMPARE((QSet<int>{6}).toList(), group_sizes.toList()); } QTEST_MAIN(test) //#include "tst_test.moc"
[ "operasfantom@gmail.com" ]
operasfantom@gmail.com
dd39e86989864b9167fafbdedd0e35026fc3f1c0
11c7699d4d37958fb78d08be2049b508e271869a
/Player+img.cpp
5f5fbe67026f067fdd48c2f240b3ab0923699496
[]
no_license
young0915/Kg-StartdewValley
3d0ebe9171263c21b9176f6979824b422e325979
7a6c2befd8daa424b0d2e62e25679be24705a83c
refs/heads/master
2021-01-26T03:59:36.052030
2020-04-04T13:51:20
2020-04-04T13:51:20
243,297,266
0
0
null
null
null
null
UHC
C++
false
false
1,431
cpp
#include "stdafx.h" #include "Player.h" /* 이곳은 플레이어 이미지만 있는 곳 */ void Player::playerimg() { //플레이어 정보 IMAGEMANAGER->addFrameImage("플레이어몸통", "images/player/player_body.bmp", 96 * 3, 512 * 3, 6, 16, true, RGB(255, 0, 255)); IMAGEMANAGER->addFrameImage("팔", "images/player/player_arm.bmp", 96 * 3, 640 * 3, 6, 20, true, RGB(255, 0, 255)); //플레이어 옷 IMAGEMANAGER->addFrameImage("바지", "images/cloth/바지.bmp", 96 * 3, 510 *3, 6, 16, true, RGB(255, 0, 255)); //플레이어 프로그래스바 IMAGEMANAGER->addImage("에너지바", "images/UI/progressbar/Ui_hp_energy_bar.bmp", 40, 180, true, RGB(255, 0, 255)); IMAGEMANAGER->addImage("에너지", "images/UI/progressbar/Ui_hp_energy_bar_front.bmp", 20, 132, true, RGB(255, 0, 255)); //무기 IMAGEMANAGER->addFrameImage("칼", "images/기구/weapon_glaxysward.bmp", 160 * 3, 160 * 3, 5, 5, true, RGB(255, 0, 255)); IMAGEMANAGER->addFrameImage("물뿌리개", "images/기구/tool_wateringcan.bmp", 96*3, 160*3, 3,5,true, RGB(255, 0, 255)); IMAGEMANAGER->addFrameImage("도끼", "images/기구/tool_axe.bmp", 110*3, 110*3, 5, 5, true, RGB(255, 0, 255)); IMAGEMANAGER->addFrameImage("곡괭이", "images/기구/tool_pickaxe.bmp", 110 * 3, 110 * 3, 5, 5, true, RGB(255, 0, 255)); IMAGEMANAGER->addFrameImage("호미", "images/기구/tool_hoe.bmp", 100 * 3, 110 * 3, 5, 5, true, RGB(255, 0, 255)); }
[ "38437784+young0915@users.noreply.github.com" ]
38437784+young0915@users.noreply.github.com
27d682d5aaaf5c9387632cfa416c7030da88ca6f
daeec99966405da47825e7b2d124be43129049b4
/src/resources/Chewy.hpp
17a2c8aa344cb79ac42e093774f428e5a99e9861
[ "MIT" ]
permissive
aapeliv/blox
f1a21cfcf24448d0b53d381d63421e95303c89e7
d4d7cc85270368a02823ba2703ced054a0357778
refs/heads/master
2021-09-05T01:36:23.684387
2018-01-23T13:28:16
2018-01-23T13:28:16
114,073,256
0
0
null
null
null
null
UTF-8
C++
false
false
254,086
hpp
unsigned char Chewy_ttf[] = { 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x80, 0x00, 0x03, 0x00, 0x70, 0x4f, 0x53, 0x2f, 0x32, 0x62, 0x9f, 0x27, 0xfa, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x60, 0x63, 0x6d, 0x61, 0x70, 0x14, 0x83, 0x9b, 0x26, 0x00, 0x00, 0x01, 0x5c, 0x00, 0x00, 0x02, 0xc6, 0x63, 0x76, 0x74, 0x20, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x04, 0x24, 0x00, 0x00, 0x00, 0x02, 0x66, 0x70, 0x67, 0x6d, 0x92, 0x41, 0xda, 0xfa, 0x00, 0x00, 0x04, 0x28, 0x00, 0x00, 0x01, 0x61, 0x67, 0x61, 0x73, 0x70, 0x00, 0x17, 0x00, 0x09, 0x00, 0x00, 0x05, 0x8c, 0x00, 0x00, 0x00, 0x10, 0x67, 0x6c, 0x79, 0x66, 0x70, 0xed, 0xae, 0x14, 0x00, 0x00, 0x05, 0x9c, 0x00, 0x00, 0x84, 0x62, 0x68, 0x65, 0x61, 0x64, 0xf6, 0xa2, 0x5f, 0xb1, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x36, 0x68, 0x68, 0x65, 0x61, 0x07, 0xd5, 0x03, 0xe9, 0x00, 0x00, 0x8a, 0x38, 0x00, 0x00, 0x00, 0x24, 0x68, 0x6d, 0x74, 0x78, 0x96, 0x00, 0x0d, 0xf0, 0x00, 0x00, 0x8a, 0x5c, 0x00, 0x00, 0x03, 0x94, 0x6b, 0x65, 0x72, 0x6e, 0xaa, 0xed, 0xaa, 0x23, 0x00, 0x00, 0x8d, 0xf0, 0x00, 0x00, 0x09, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x0f, 0xb7, 0x31, 0xb0, 0x00, 0x00, 0x97, 0x5c, 0x00, 0x00, 0x01, 0xcc, 0x6d, 0x61, 0x78, 0x70, 0x02, 0xfd, 0x02, 0x7a, 0x00, 0x00, 0x99, 0x28, 0x00, 0x00, 0x00, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x0b, 0xa8, 0x9d, 0x9b, 0x00, 0x00, 0x99, 0x48, 0x00, 0x00, 0x05, 0x94, 0x70, 0x6f, 0x73, 0x74, 0xbe, 0x66, 0xb7, 0xbd, 0x00, 0x00, 0x9e, 0xdc, 0x00, 0x00, 0x02, 0x03, 0x70, 0x72, 0x65, 0x70, 0x68, 0x06, 0x8c, 0x85, 0x00, 0x00, 0xa0, 0xe0, 0x00, 0x00, 0x00, 0x07, 0x00, 0x03, 0x01, 0xc7, 0x01, 0x90, 0x00, 0x05, 0x00, 0x00, 0x02, 0xbc, 0x02, 0x8a, 0x00, 0x00, 0x00, 0x8c, 0x02, 0xbc, 0x02, 0x8a, 0x00, 0x00, 0x01, 0xdd, 0x00, 0x33, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x27, 0x48, 0x00, 0x00, 0x4a, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x49, 0x4e, 0x52, 0x00, 0x40, 0x00, 0x20, 0xfb, 0x02, 0x03, 0x21, 0xfe, 0xcc, 0x00, 0x31, 0x03, 0xeb, 0x01, 0x36, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x41, 0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x01, 0xa4, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x20, 0x00, 0x04, 0x00, 0x0e, 0x00, 0x7e, 0x00, 0xff, 0x01, 0x31, 0x01, 0x42, 0x01, 0x53, 0x01, 0x61, 0x01, 0x78, 0x01, 0x7e, 0x02, 0xc7, 0x02, 0xdd, 0x20, 0x14, 0x20, 0x1a, 0x20, 0x1e, 0x20, 0x22, 0x20, 0x26, 0x20, 0x30, 0x20, 0x3a, 0x20, 0x44, 0x20, 0xac, 0x21, 0x22, 0x22, 0x12, 0xfb, 0x02, 0xff, 0xff, 0x00, 0x00, 0x00, 0x20, 0x00, 0xa0, 0x01, 0x31, 0x01, 0x41, 0x01, 0x52, 0x01, 0x60, 0x01, 0x78, 0x01, 0x7d, 0x02, 0xc6, 0x02, 0xd8, 0x20, 0x13, 0x20, 0x18, 0x20, 0x1c, 0x20, 0x22, 0x20, 0x26, 0x20, 0x30, 0x20, 0x39, 0x20, 0x44, 0x20, 0xac, 0x21, 0x22, 0x22, 0x12, 0xfb, 0x01, 0xff, 0xff, 0xff, 0xf5, 0x00, 0x00, 0xff, 0xa5, 0xfe, 0xc1, 0xff, 0x60, 0xfe, 0xa4, 0xff, 0x44, 0xfe, 0x8d, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xa1, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x76, 0xe0, 0x87, 0xe0, 0x96, 0xe0, 0x86, 0xe0, 0x79, 0xe0, 0x12, 0xdf, 0x7b, 0xde, 0x01, 0x05, 0xc0, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xe8, 0x00, 0xec, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xae, 0x00, 0xa9, 0x00, 0x95, 0x00, 0x96, 0x00, 0xe1, 0x00, 0xa2, 0x00, 0x12, 0x00, 0x97, 0x00, 0x9f, 0x00, 0x9c, 0x00, 0xa4, 0x00, 0xab, 0x00, 0xaa, 0x00, 0xe0, 0x00, 0x9b, 0x00, 0xd9, 0x00, 0x94, 0x00, 0xe3, 0x00, 0x11, 0x00, 0x10, 0x00, 0x9e, 0x00, 0xa3, 0x00, 0x99, 0x00, 0xc3, 0x00, 0xdd, 0x00, 0x0e, 0x00, 0xa5, 0x00, 0xac, 0x00, 0x0d, 0x00, 0x0c, 0x00, 0x0f, 0x00, 0xa8, 0x00, 0xaf, 0x00, 0xc9, 0x00, 0xc7, 0x00, 0xb0, 0x00, 0x74, 0x00, 0x75, 0x00, 0xa0, 0x00, 0x76, 0x00, 0xcb, 0x00, 0x77, 0x00, 0xc8, 0x00, 0xca, 0x00, 0xcf, 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xe2, 0x00, 0x78, 0x00, 0xd2, 0x00, 0xd0, 0x00, 0xd1, 0x00, 0xb1, 0x00, 0x79, 0x00, 0x14, 0x00, 0xa1, 0x00, 0xd5, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0x7a, 0x00, 0x06, 0x00, 0x08, 0x00, 0x9a, 0x00, 0x7c, 0x00, 0x7b, 0x00, 0x7d, 0x00, 0x7f, 0x00, 0x7e, 0x00, 0x80, 0x00, 0xa6, 0x00, 0x81, 0x00, 0x83, 0x00, 0x82, 0x00, 0x84, 0x00, 0x85, 0x00, 0x87, 0x00, 0x86, 0x00, 0x88, 0x00, 0x89, 0x00, 0x01, 0x00, 0x8a, 0x00, 0x8c, 0x00, 0x8b, 0x00, 0x8d, 0x00, 0x8f, 0x00, 0x8e, 0x00, 0xba, 0x00, 0xa7, 0x00, 0x91, 0x00, 0x90, 0x00, 0x92, 0x00, 0x93, 0x00, 0x07, 0x00, 0x09, 0x00, 0xbb, 0x00, 0xd7, 0x00, 0xdf, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0xe4, 0x00, 0xd8, 0x00, 0xde, 0x00, 0xb8, 0x00, 0xb9, 0x00, 0xc4, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xc5, 0x00, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x00, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x00, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0x00, 0xa0, 0xa1, 0x00, 0xe3, 0x00, 0x00, 0xa2, 0xa3, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa4, 0xa5, 0x00, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0x00, 0x00, 0x00, 0x00, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0x00, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0x00, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0x00, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xe4, 0xdf, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0xb0, 0x00, 0x2c, 0x4b, 0xb0, 0x09, 0x50, 0x58, 0xb1, 0x01, 0x01, 0x8e, 0x59, 0xb8, 0x01, 0xff, 0x85, 0xb0, 0x44, 0x1d, 0xb1, 0x09, 0x03, 0x5f, 0x5e, 0x2d, 0xb0, 0x01, 0x2c, 0x20, 0x20, 0x45, 0x69, 0x44, 0xb0, 0x01, 0x60, 0x2d, 0xb0, 0x02, 0x2c, 0xb0, 0x01, 0x2a, 0x21, 0x2d, 0xb0, 0x03, 0x2c, 0x20, 0x46, 0xb0, 0x03, 0x25, 0x46, 0x52, 0x58, 0x23, 0x59, 0x20, 0x8a, 0x20, 0x8a, 0x49, 0x64, 0x8a, 0x20, 0x46, 0x20, 0x68, 0x61, 0x64, 0xb0, 0x04, 0x25, 0x46, 0x20, 0x68, 0x61, 0x64, 0x52, 0x58, 0x23, 0x65, 0x8a, 0x59, 0x2f, 0x20, 0xb0, 0x00, 0x53, 0x58, 0x69, 0x20, 0xb0, 0x00, 0x54, 0x58, 0x21, 0xb0, 0x40, 0x59, 0x1b, 0x69, 0x20, 0xb0, 0x00, 0x54, 0x58, 0x21, 0xb0, 0x40, 0x65, 0x59, 0x59, 0x3a, 0x2d, 0xb0, 0x04, 0x2c, 0x20, 0x46, 0xb0, 0x04, 0x25, 0x46, 0x52, 0x58, 0x23, 0x8a, 0x59, 0x20, 0x46, 0x20, 0x6a, 0x61, 0x64, 0xb0, 0x04, 0x25, 0x46, 0x20, 0x6a, 0x61, 0x64, 0x52, 0x58, 0x23, 0x8a, 0x59, 0x2f, 0xfd, 0x2d, 0xb0, 0x05, 0x2c, 0x4b, 0x20, 0xb0, 0x03, 0x26, 0x50, 0x58, 0x51, 0x58, 0xb0, 0x80, 0x44, 0x1b, 0xb0, 0x40, 0x44, 0x59, 0x1b, 0x21, 0x21, 0x20, 0x45, 0xb0, 0xc0, 0x50, 0x58, 0xb0, 0xc0, 0x44, 0x1b, 0x21, 0x59, 0x59, 0x2d, 0xb0, 0x06, 0x2c, 0x20, 0x20, 0x45, 0x69, 0x44, 0xb0, 0x01, 0x60, 0x20, 0x20, 0x45, 0x7d, 0x69, 0x18, 0x44, 0xb0, 0x01, 0x60, 0x2d, 0xb0, 0x07, 0x2c, 0xb0, 0x06, 0x2a, 0x2d, 0xb0, 0x08, 0x2c, 0x4b, 0x20, 0xb0, 0x03, 0x26, 0x53, 0x58, 0xb0, 0x40, 0x1b, 0xb0, 0x00, 0x59, 0x8a, 0x8a, 0x20, 0xb0, 0x03, 0x26, 0x53, 0x58, 0x23, 0x21, 0xb0, 0x80, 0x8a, 0x8a, 0x1b, 0x8a, 0x23, 0x59, 0x20, 0xb0, 0x03, 0x26, 0x53, 0x58, 0x23, 0x21, 0xb0, 0xc0, 0x8a, 0x8a, 0x1b, 0x8a, 0x23, 0x59, 0x20, 0xb0, 0x03, 0x26, 0x53, 0x58, 0x23, 0x21, 0xb8, 0x01, 0x00, 0x8a, 0x8a, 0x1b, 0x8a, 0x23, 0x59, 0x20, 0xb0, 0x03, 0x26, 0x53, 0x58, 0x23, 0x21, 0xb8, 0x01, 0x40, 0x8a, 0x8a, 0x1b, 0x8a, 0x23, 0x59, 0x20, 0xb0, 0x03, 0x26, 0x53, 0x58, 0xb0, 0x03, 0x25, 0x45, 0xb8, 0x01, 0x80, 0x50, 0x58, 0x23, 0x21, 0xb8, 0x01, 0x80, 0x23, 0x21, 0x1b, 0xb0, 0x03, 0x25, 0x45, 0x23, 0x21, 0x23, 0x21, 0x59, 0x1b, 0x21, 0x59, 0x44, 0x2d, 0xb0, 0x09, 0x2c, 0x4b, 0x53, 0x58, 0x45, 0x44, 0x1b, 0x21, 0x21, 0x59, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x08, 0x00, 0x02, 0x00, 0x10, 0x00, 0x01, 0xff, 0xff, 0x00, 0x03, 0x00, 0x02, 0x00, 0x0f, 0xff, 0xf4, 0x02, 0x0f, 0x03, 0x21, 0x00, 0x13, 0x00, 0x45, 0x00, 0x2a, 0x40, 0x12, 0x14, 0x47, 0x05, 0x23, 0x34, 0x0f, 0x39, 0x2f, 0x43, 0x17, 0x17, 0x2f, 0x39, 0x3e, 0x00, 0x2a, 0x0a, 0x1e, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0xc4, 0x2f, 0xdd, 0xc5, 0x01, 0x2f, 0xc5, 0xdd, 0xc5, 0xd5, 0xc4, 0x2f, 0xcd, 0x10, 0xc4, 0x31, 0x30, 0x13, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x34, 0x2e, 0x02, 0x25, 0x14, 0x06, 0x07, 0x1c, 0x01, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x16, 0x17, 0x36, 0x37, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x1e, 0x01, 0xd0, 0x13, 0x15, 0x0b, 0x02, 0x04, 0x0b, 0x14, 0x11, 0x18, 0x24, 0x17, 0x0b, 0x0b, 0x17, 0x23, 0x01, 0x27, 0x26, 0x1b, 0x0e, 0x1e, 0x3b, 0x5c, 0x43, 0x2d, 0x45, 0x2f, 0x18, 0x06, 0x0f, 0x18, 0x25, 0x33, 0x21, 0x24, 0x42, 0x11, 0x03, 0x03, 0x12, 0x2b, 0x27, 0x1a, 0x19, 0x27, 0x2e, 0x15, 0x01, 0x08, 0x0f, 0x1a, 0x15, 0x19, 0x1f, 0x11, 0x06, 0x1b, 0x27, 0x01, 0x89, 0x16, 0x1f, 0x24, 0x0d, 0x0c, 0x30, 0x2f, 0x24, 0x15, 0x21, 0x2a, 0x16, 0x15, 0x2d, 0x25, 0x18, 0xfb, 0x0b, 0x0d, 0x05, 0x37, 0x88, 0x8b, 0x84, 0x67, 0x3e, 0x3e, 0x58, 0x60, 0x23, 0x19, 0x40, 0x42, 0x3f, 0x32, 0x1e, 0x2a, 0x1f, 0x37, 0x3b, 0x04, 0x07, 0x0e, 0x0b, 0x0c, 0x11, 0x0b, 0x06, 0x01, 0x13, 0x27, 0x20, 0x14, 0x16, 0x23, 0x2b, 0x14, 0x06, 0x11, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xdf, 0xff, 0xe9, 0x02, 0x03, 0x02, 0xe6, 0x00, 0x3e, 0x00, 0x1e, 0x40, 0x0c, 0x24, 0x3f, 0x3a, 0x05, 0x28, 0x20, 0x00, 0x11, 0x30, 0x40, 0x09, 0x18, 0x00, 0x2f, 0xcd, 0x10, 0xc4, 0x01, 0x2f, 0xc4, 0x2f, 0xc0, 0xdd, 0xc5, 0x10, 0xc6, 0x31, 0x30, 0x01, 0x16, 0x0e, 0x02, 0x07, 0x0e, 0x01, 0x1d, 0x01, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x04, 0x23, 0x22, 0x26, 0x27, 0x2e, 0x03, 0x27, 0x0e, 0x01, 0x27, 0x26, 0x3e, 0x02, 0x37, 0x3e, 0x03, 0x37, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x03, 0x14, 0x15, 0x14, 0x06, 0x15, 0x3e, 0x02, 0x16, 0x01, 0x4e, 0x04, 0x12, 0x21, 0x2b, 0x15, 0x02, 0x02, 0x2e, 0x69, 0x30, 0x11, 0x23, 0x1c, 0x11, 0x29, 0x41, 0x50, 0x4f, 0x45, 0x14, 0x13, 0x2b, 0x0e, 0x09, 0x10, 0x0c, 0x08, 0x01, 0x18, 0x25, 0x07, 0x04, 0x08, 0x13, 0x1d, 0x10, 0x01, 0x09, 0x0e, 0x16, 0x0f, 0x09, 0x17, 0x11, 0x14, 0x1b, 0x12, 0x08, 0x04, 0x01, 0x12, 0x24, 0x1e, 0x16, 0x01, 0xd8, 0x07, 0x18, 0x1d, 0x1e, 0x0d, 0x2a, 0x54, 0x2a, 0x27, 0x0e, 0x19, 0x04, 0x0d, 0x19, 0x15, 0x19, 0x2c, 0x24, 0x1b, 0x13, 0x0a, 0x06, 0x0d, 0x08, 0x3f, 0x52, 0x57, 0x20, 0x0a, 0x05, 0x09, 0x08, 0x14, 0x17, 0x18, 0x0c, 0x2b, 0x6d, 0x69, 0x57, 0x16, 0x0d, 0x0e, 0x1b, 0x2b, 0x35, 0x34, 0x2c, 0x0d, 0x0e, 0x1b, 0x0e, 0x07, 0x0c, 0x06, 0x02, 0x00, 0x01, 0xff, 0xe4, 0xff, 0xe8, 0x01, 0x57, 0x02, 0xe1, 0x00, 0x2e, 0x00, 0x1a, 0x40, 0x0a, 0x00, 0x30, 0x16, 0x2f, 0x2a, 0x05, 0x1a, 0x12, 0x22, 0x0d, 0x00, 0x2f, 0xcd, 0x01, 0x2f, 0xc5, 0xdd, 0xc5, 0x10, 0xc6, 0x10, 0xc4, 0x31, 0x30, 0x01, 0x16, 0x0e, 0x02, 0x07, 0x1e, 0x01, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x0e, 0x01, 0x27, 0x26, 0x3e, 0x02, 0x37, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x06, 0x07, 0x3e, 0x02, 0x32, 0x01, 0x53, 0x04, 0x15, 0x25, 0x30, 0x16, 0x02, 0x07, 0x04, 0x0f, 0x1d, 0x19, 0x1b, 0x25, 0x19, 0x0d, 0x03, 0x19, 0x27, 0x05, 0x05, 0x08, 0x13, 0x1c, 0x10, 0x04, 0x09, 0x12, 0x1b, 0x27, 0x1b, 0x16, 0x17, 0x0a, 0x02, 0x05, 0x02, 0x13, 0x28, 0x23, 0x18, 0x01, 0xd8, 0x08, 0x1a, 0x20, 0x20, 0x0e, 0x41, 0x7f, 0x41, 0x12, 0x2d, 0x26, 0x1a, 0x3b, 0x58, 0x66, 0x2c, 0x0a, 0x07, 0x0a, 0x07, 0x15, 0x16, 0x19, 0x0c, 0x0a, 0x13, 0x48, 0x54, 0x57, 0x47, 0x2d, 0x1d, 0x29, 0x2d, 0x10, 0x27, 0x4e, 0x28, 0x08, 0x0f, 0x07, 0x00, 0xff, 0xff, 0x00, 0x05, 0xff, 0xd9, 0x01, 0x65, 0x03, 0xeb, 0x02, 0x26, 0x00, 0x48, 0x00, 0x00, 0x00, 0x07, 0x00, 0xdf, 0x00, 0x29, 0x00, 0xf6, 0xff, 0xff, 0xff, 0xec, 0xff, 0xf8, 0x01, 0x43, 0x03, 0x51, 0x02, 0x26, 0x00, 0x68, 0x00, 0x00, 0x00, 0x06, 0x00, 0xdf, 0x29, 0x5c, 0x00, 0x00, 0xff, 0xff, 0x00, 0x0a, 0xff, 0xcb, 0x01, 0xe1, 0x03, 0xbf, 0x02, 0x26, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x07, 0x00, 0x9e, 0x00, 0xc3, 0x00, 0xb8, 0xff, 0xff, 0x00, 0x0e, 0xfe, 0xdd, 0x01, 0xef, 0x02, 0xf4, 0x02, 0x26, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x07, 0x00, 0x9e, 0x00, 0xc3, 0xff, 0xed, 0x00, 0x02, 0x00, 0x1f, 0xff, 0xe0, 0x01, 0xfa, 0x02, 0xf8, 0x00, 0x27, 0x00, 0x36, 0x00, 0x22, 0x40, 0x0e, 0x1e, 0x05, 0x32, 0x31, 0x0f, 0x28, 0x00, 0x0a, 0x38, 0x2b, 0x19, 0x23, 0x31, 0x05, 0x00, 0x2f, 0xcd, 0x2f, 0xc4, 0xcd, 0x10, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xc5, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x03, 0x34, 0x3d, 0x01, 0x3c, 0x01, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x32, 0x36, 0x37, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x07, 0x36, 0x26, 0x23, 0x22, 0x06, 0x07, 0x06, 0x16, 0x07, 0x33, 0x32, 0x3e, 0x02, 0x01, 0xfa, 0x37, 0x57, 0x6d, 0x36, 0x02, 0x0b, 0x15, 0x1f, 0x16, 0x16, 0x1d, 0x12, 0x0a, 0x04, 0x04, 0x09, 0x12, 0x1d, 0x16, 0x19, 0x21, 0x12, 0x08, 0x08, 0x13, 0x09, 0x1c, 0x1d, 0x30, 0x4f, 0x39, 0x20, 0x9e, 0x01, 0x28, 0x26, 0x11, 0x22, 0x10, 0x02, 0x01, 0x02, 0x03, 0x19, 0x32, 0x2a, 0x1a, 0x01, 0x8c, 0x3e, 0x5f, 0x42, 0x25, 0x04, 0x0e, 0x37, 0x36, 0x29, 0x29, 0x41, 0x4e, 0x4a, 0x3b, 0x0e, 0x59, 0x0f, 0x42, 0x53, 0x58, 0x49, 0x2f, 0x2a, 0x39, 0x3c, 0x12, 0x03, 0x01, 0x03, 0x16, 0x2e, 0x4a, 0x4b, 0x24, 0x2e, 0x08, 0x06, 0x2d, 0x59, 0x2d, 0x0e, 0x1c, 0x29, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x1f, 0xfe, 0xe2, 0x01, 0xe8, 0x02, 0xf8, 0x00, 0x2b, 0x00, 0x44, 0x00, 0x20, 0x40, 0x0d, 0x24, 0x37, 0x08, 0x13, 0x44, 0x00, 0x0f, 0x46, 0x31, 0x1e, 0x27, 0x41, 0x05, 0x00, 0x2f, 0xcd, 0x2f, 0xc4, 0xcd, 0x10, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xdd, 0xd5, 0xc5, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x27, 0x0e, 0x05, 0x23, 0x22, 0x2e, 0x03, 0x34, 0x3d, 0x01, 0x3c, 0x01, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x1d, 0x01, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x07, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x17, 0x1e, 0x03, 0x33, 0x32, 0x3e, 0x02, 0x01, 0xe8, 0x13, 0x2d, 0x4a, 0x37, 0x1c, 0x3a, 0x0d, 0x01, 0x01, 0x05, 0x09, 0x12, 0x1e, 0x16, 0x16, 0x1c, 0x12, 0x08, 0x03, 0x04, 0x0a, 0x12, 0x1e, 0x15, 0x1d, 0x1e, 0x0c, 0x01, 0x1c, 0x48, 0x26, 0x31, 0x40, 0x25, 0x0e, 0x90, 0x05, 0x0d, 0x17, 0x12, 0x19, 0x25, 0x18, 0x0b, 0x01, 0x02, 0x03, 0x02, 0x03, 0x14, 0x18, 0x19, 0x09, 0x15, 0x1a, 0x0f, 0x05, 0x01, 0x2a, 0x2c, 0x69, 0x5a, 0x3c, 0x11, 0x1c, 0x11, 0x3f, 0x49, 0x4c, 0x3e, 0x27, 0x44, 0x69, 0x7e, 0x75, 0x5b, 0x12, 0x04, 0x14, 0x5c, 0x73, 0x7b, 0x66, 0x41, 0x3c, 0x51, 0x51, 0x15, 0x0e, 0x19, 0x21, 0x35, 0x4f, 0x5c, 0x1f, 0x0f, 0x1f, 0x1b, 0x11, 0x10, 0x1c, 0x26, 0x16, 0x07, 0x17, 0x18, 0x16, 0x06, 0x09, 0x0f, 0x0c, 0x06, 0x20, 0x2c, 0x2f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x05, 0xff, 0xf2, 0x01, 0xc2, 0x03, 0xd6, 0x02, 0x26, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x07, 0x00, 0xdf, 0x00, 0x5c, 0x00, 0xe1, 0xff, 0xff, 0x00, 0x00, 0xff, 0xf5, 0x01, 0xdf, 0x03, 0x14, 0x02, 0x26, 0x00, 0x6f, 0x00, 0x00, 0x00, 0x06, 0x00, 0xdf, 0x5c, 0x1f, 0x00, 0x00, 0x00, 0x03, 0x00, 0x29, 0xff, 0xf5, 0x02, 0x88, 0x02, 0xf7, 0x00, 0x33, 0x00, 0x55, 0x00, 0x6e, 0x00, 0x2a, 0x40, 0x12, 0x59, 0x46, 0x67, 0x34, 0x18, 0x00, 0x29, 0x2e, 0x21, 0x0b, 0x53, 0x6a, 0x5d, 0x1b, 0x26, 0x42, 0x30, 0x07, 0x00, 0x2f, 0xcd, 0xc4, 0x2f, 0xdd, 0xc4, 0x2f, 0xc4, 0x01, 0x2f, 0xc4, 0xcd, 0x2f, 0xc4, 0xcd, 0xc4, 0x2f, 0xc4, 0xcd, 0x31, 0x30, 0x25, 0x14, 0x06, 0x07, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x27, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x01, 0x37, 0x3e, 0x03, 0x35, 0x34, 0x26, 0x23, 0x22, 0x0e, 0x02, 0x23, 0x22, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x07, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x03, 0x14, 0x0e, 0x04, 0x07, 0x0e, 0x05, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x04, 0x37, 0x3e, 0x05, 0x33, 0x32, 0x16, 0x05, 0x14, 0x16, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x01, 0x36, 0x35, 0x34, 0x36, 0x35, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x02, 0x88, 0x16, 0x11, 0x28, 0x5e, 0x29, 0x0b, 0x2a, 0x08, 0x0a, 0x09, 0x04, 0x07, 0x07, 0x0f, 0x07, 0x0d, 0x30, 0x2f, 0x23, 0x0e, 0x0b, 0x0d, 0x15, 0x15, 0x18, 0x10, 0x28, 0x17, 0x26, 0x31, 0x19, 0x35, 0x44, 0x20, 0x2f, 0x34, 0x15, 0x1e, 0x3f, 0x1f, 0x11, 0x1a, 0x9c, 0x12, 0x1d, 0x24, 0x24, 0x1f, 0x0a, 0x07, 0x23, 0x2d, 0x33, 0x31, 0x28, 0x0c, 0x0a, 0x06, 0x13, 0x1e, 0x25, 0x26, 0x20, 0x0b, 0x07, 0x20, 0x2b, 0x31, 0x2f, 0x29, 0x0d, 0x09, 0x07, 0xfe, 0xb2, 0x01, 0x04, 0x0a, 0x13, 0x0e, 0x16, 0x14, 0x06, 0x02, 0x01, 0x1a, 0x1e, 0x19, 0x17, 0x19, 0x0c, 0x02, 0x36, 0x11, 0x16, 0x04, 0x08, 0x09, 0x02, 0x07, 0x07, 0x21, 0x0b, 0x09, 0x0d, 0x06, 0x08, 0x0f, 0x08, 0x0d, 0x34, 0x3b, 0x38, 0x12, 0x0c, 0x0f, 0x12, 0x15, 0x12, 0x28, 0x1a, 0x2d, 0x20, 0x12, 0x30, 0x37, 0x20, 0x49, 0x47, 0x3d, 0x15, 0x03, 0x07, 0x13, 0x02, 0x8e, 0x13, 0x3b, 0x46, 0x4b, 0x46, 0x3b, 0x13, 0x0d, 0x41, 0x51, 0x58, 0x48, 0x2f, 0x14, 0x08, 0x14, 0x3e, 0x49, 0x4f, 0x49, 0x3e, 0x15, 0x0d, 0x3e, 0x4c, 0x52, 0x43, 0x2c, 0x12, 0x77, 0x10, 0x38, 0x42, 0x45, 0x37, 0x24, 0x29, 0x38, 0x36, 0x0e, 0x2a, 0x50, 0x29, 0x17, 0x20, 0x19, 0x23, 0x22, 0x2e, 0x32, 0x00, 0x00, 0x00, 0x03, 0x00, 0x29, 0xff, 0xf5, 0x02, 0xe7, 0x02, 0xf7, 0x00, 0x46, 0x00, 0x68, 0x00, 0x81, 0x00, 0x30, 0x40, 0x15, 0x00, 0x83, 0x6b, 0x59, 0x7a, 0x48, 0x34, 0x06, 0x40, 0x2b, 0x24, 0x55, 0x0d, 0x83, 0x66, 0x7d, 0x3a, 0x27, 0x70, 0x31, 0x16, 0x00, 0x2f, 0xcd, 0xc4, 0x2f, 0xc4, 0x2f, 0xc4, 0x10, 0xd4, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xc4, 0xdd, 0xc6, 0x2f, 0xc4, 0xcd, 0x10, 0xc6, 0x31, 0x30, 0x25, 0x14, 0x07, 0x0e, 0x01, 0x07, 0x0e, 0x01, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x37, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x2e, 0x02, 0x34, 0x35, 0x3c, 0x01, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x06, 0x07, 0x3e, 0x01, 0x37, 0x34, 0x3e, 0x02, 0x37, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x01, 0x06, 0x15, 0x14, 0x06, 0x07, 0x1e, 0x03, 0x03, 0x14, 0x0e, 0x04, 0x07, 0x0e, 0x05, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x04, 0x37, 0x3e, 0x05, 0x33, 0x32, 0x16, 0x05, 0x14, 0x16, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x01, 0x36, 0x35, 0x34, 0x36, 0x35, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x02, 0xe7, 0x1f, 0x0e, 0x1c, 0x0f, 0x02, 0x03, 0x02, 0x01, 0x02, 0x09, 0x12, 0x0f, 0x0e, 0x11, 0x08, 0x02, 0x03, 0x01, 0x10, 0x1f, 0x0f, 0x08, 0x15, 0x15, 0x13, 0x04, 0x03, 0x03, 0x02, 0x08, 0x16, 0x16, 0x0c, 0x0d, 0x08, 0x02, 0x03, 0x02, 0x11, 0x22, 0x11, 0x03, 0x05, 0x05, 0x03, 0x05, 0x14, 0x0e, 0x0f, 0x0f, 0x06, 0x01, 0x01, 0x02, 0x0c, 0x1c, 0x1a, 0x11, 0xfb, 0x12, 0x1d, 0x24, 0x24, 0x1f, 0x0a, 0x07, 0x23, 0x2d, 0x33, 0x31, 0x28, 0x0c, 0x0a, 0x06, 0x13, 0x1e, 0x25, 0x26, 0x20, 0x0b, 0x07, 0x20, 0x2b, 0x31, 0x2f, 0x29, 0x0d, 0x09, 0x07, 0xfe, 0xb2, 0x01, 0x04, 0x0a, 0x13, 0x0e, 0x16, 0x14, 0x06, 0x02, 0x01, 0x1a, 0x1e, 0x19, 0x17, 0x19, 0x0c, 0x02, 0xf1, 0x1e, 0x07, 0x03, 0x04, 0x02, 0x17, 0x2f, 0x17, 0x0b, 0x25, 0x24, 0x1b, 0x19, 0x21, 0x23, 0x09, 0x19, 0x30, 0x17, 0x01, 0x01, 0x01, 0x03, 0x07, 0x06, 0x04, 0x15, 0x19, 0x16, 0x06, 0x10, 0x37, 0x34, 0x26, 0x16, 0x1d, 0x1e, 0x07, 0x11, 0x24, 0x11, 0x01, 0x01, 0x02, 0x06, 0x24, 0x29, 0x24, 0x06, 0x0b, 0x0f, 0x18, 0x21, 0x23, 0x0a, 0x0d, 0x1a, 0x0c, 0x01, 0x03, 0x09, 0x11, 0x01, 0xd5, 0x13, 0x3b, 0x46, 0x4b, 0x46, 0x3b, 0x13, 0x0d, 0x41, 0x51, 0x58, 0x48, 0x2f, 0x14, 0x08, 0x14, 0x3e, 0x49, 0x4f, 0x49, 0x3e, 0x15, 0x0d, 0x3e, 0x4c, 0x52, 0x43, 0x2c, 0x12, 0x77, 0x10, 0x38, 0x42, 0x45, 0x37, 0x24, 0x29, 0x38, 0x36, 0x0e, 0x2a, 0x50, 0x29, 0x17, 0x20, 0x19, 0x23, 0x22, 0x2e, 0x32, 0x00, 0x01, 0x00, 0x29, 0x01, 0x3d, 0x00, 0x9f, 0x02, 0xf8, 0x00, 0x18, 0x00, 0x0d, 0xb3, 0x02, 0x11, 0x07, 0x14, 0x00, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x31, 0x30, 0x13, 0x14, 0x16, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x01, 0x36, 0x35, 0x34, 0x36, 0x35, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x9e, 0x01, 0x04, 0x0a, 0x13, 0x0e, 0x16, 0x14, 0x06, 0x02, 0x01, 0x1a, 0x1e, 0x19, 0x17, 0x19, 0x0c, 0x02, 0x02, 0x66, 0x10, 0x38, 0x42, 0x44, 0x38, 0x23, 0x29, 0x37, 0x37, 0x0d, 0x2a, 0x50, 0x2a, 0x15, 0x22, 0x18, 0x24, 0x22, 0x2f, 0x32, 0x00, 0x00, 0x00, 0x03, 0x00, 0x1f, 0xff, 0xf5, 0x03, 0x5a, 0x02, 0xfd, 0x00, 0x43, 0x00, 0x65, 0x00, 0xa5, 0x00, 0x3c, 0x40, 0x1b, 0x00, 0xa7, 0x8c, 0xa0, 0x97, 0x85, 0x57, 0x70, 0x7a, 0x66, 0x46, 0x31, 0x06, 0x3d, 0x2b, 0x21, 0x8f, 0x62, 0x9d, 0x74, 0x6c, 0x37, 0x25, 0x2e, 0x14, 0x51, 0x0b, 0x00, 0x2f, 0xc6, 0x2f, 0xcd, 0x2f, 0xc4, 0x2f, 0xcd, 0x2f, 0xc4, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xc4, 0xdd, 0xc6, 0x2f, 0xcd, 0x2f, 0xc4, 0xd4, 0xc4, 0x2f, 0xcd, 0x10, 0xc6, 0x31, 0x30, 0x25, 0x14, 0x07, 0x06, 0x07, 0x0e, 0x05, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x37, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x2e, 0x02, 0x34, 0x35, 0x3c, 0x01, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x07, 0x3e, 0x01, 0x37, 0x3e, 0x03, 0x37, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x01, 0x06, 0x15, 0x14, 0x06, 0x07, 0x1e, 0x03, 0x03, 0x14, 0x0e, 0x04, 0x07, 0x0e, 0x05, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x04, 0x37, 0x3e, 0x05, 0x33, 0x32, 0x16, 0x01, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x33, 0x32, 0x16, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x37, 0x3e, 0x03, 0x35, 0x34, 0x26, 0x23, 0x22, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x3b, 0x01, 0x32, 0x16, 0x15, 0x14, 0x06, 0x07, 0x1e, 0x01, 0x03, 0x5a, 0x1f, 0x1b, 0x1d, 0x01, 0x02, 0x03, 0x06, 0x0b, 0x11, 0x0c, 0x0e, 0x11, 0x09, 0x02, 0x03, 0x02, 0x11, 0x1e, 0x11, 0x07, 0x15, 0x15, 0x13, 0x04, 0x03, 0x03, 0x02, 0x08, 0x16, 0x16, 0x0c, 0x0e, 0x08, 0x02, 0x06, 0x11, 0x22, 0x11, 0x01, 0x04, 0x04, 0x06, 0x02, 0x05, 0x14, 0x0c, 0x10, 0x0f, 0x06, 0x01, 0x01, 0x01, 0x0c, 0x1c, 0x19, 0x11, 0xfc, 0x12, 0x1c, 0x24, 0x23, 0x20, 0x0a, 0x07, 0x22, 0x2d, 0x34, 0x30, 0x28, 0x0c, 0x0a, 0x06, 0x13, 0x1e, 0x25, 0x25, 0x21, 0x0a, 0x07, 0x20, 0x2b, 0x32, 0x2f, 0x29, 0x0d, 0x09, 0x05, 0xfe, 0xca, 0x1a, 0x2d, 0x3b, 0x20, 0x0c, 0x23, 0x20, 0x17, 0x25, 0x11, 0x21, 0x11, 0x0d, 0x1b, 0x15, 0x0d, 0x06, 0x0b, 0x0f, 0x0a, 0x14, 0x23, 0x14, 0x0d, 0x0c, 0x16, 0x0c, 0x25, 0x24, 0x19, 0x14, 0x0d, 0x0d, 0x17, 0x16, 0x18, 0x0d, 0x0e, 0x1b, 0x1d, 0x2a, 0x2f, 0x12, 0x03, 0x36, 0x40, 0x1c, 0x20, 0x23, 0x21, 0xf1, 0x1e, 0x07, 0x06, 0x03, 0x0a, 0x26, 0x2d, 0x30, 0x26, 0x19, 0x19, 0x21, 0x23, 0x09, 0x19, 0x30, 0x17, 0x01, 0x01, 0x01, 0x03, 0x07, 0x06, 0x04, 0x15, 0x19, 0x16, 0x06, 0x10, 0x37, 0x34, 0x26, 0x16, 0x1d, 0x1e, 0x07, 0x24, 0x22, 0x01, 0x01, 0x02, 0x06, 0x24, 0x29, 0x24, 0x06, 0x0b, 0x0f, 0x18, 0x21, 0x23, 0x0a, 0x0d, 0x1a, 0x0c, 0x01, 0x03, 0x09, 0x11, 0x01, 0xd5, 0x13, 0x3b, 0x46, 0x4b, 0x46, 0x3b, 0x13, 0x0d, 0x41, 0x51, 0x58, 0x48, 0x2f, 0x14, 0x08, 0x14, 0x3e, 0x49, 0x4e, 0x49, 0x3f, 0x15, 0x0d, 0x3e, 0x4c, 0x52, 0x43, 0x2c, 0x12, 0xfe, 0xed, 0x21, 0x39, 0x29, 0x17, 0x04, 0x0b, 0x14, 0x11, 0x25, 0x07, 0x09, 0x10, 0x16, 0x0e, 0x08, 0x17, 0x14, 0x0e, 0x12, 0x16, 0x0b, 0x19, 0x09, 0x05, 0x10, 0x15, 0x1b, 0x0f, 0x0e, 0x16, 0x0e, 0x12, 0x0e, 0x13, 0x0f, 0x16, 0x23, 0x19, 0x0e, 0x3d, 0x36, 0x20, 0x31, 0x0b, 0x08, 0x3b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1f, 0x01, 0x30, 0x01, 0x28, 0x02, 0xfd, 0x00, 0x3f, 0x00, 0x1c, 0x40, 0x0b, 0x26, 0x3a, 0x31, 0x1f, 0x0a, 0x14, 0x00, 0x2a, 0x37, 0x0f, 0x05, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xd4, 0xc4, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x33, 0x32, 0x16, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x37, 0x3e, 0x03, 0x35, 0x34, 0x26, 0x23, 0x22, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x3b, 0x01, 0x32, 0x16, 0x15, 0x14, 0x06, 0x07, 0x1e, 0x01, 0x01, 0x28, 0x1a, 0x2d, 0x3b, 0x20, 0x0c, 0x23, 0x20, 0x17, 0x25, 0x11, 0x21, 0x11, 0x0d, 0x1b, 0x15, 0x0d, 0x06, 0x0b, 0x0f, 0x0a, 0x14, 0x23, 0x14, 0x0d, 0x0c, 0x16, 0x0c, 0x25, 0x24, 0x19, 0x14, 0x0d, 0x0d, 0x17, 0x16, 0x18, 0x0d, 0x0e, 0x1b, 0x1d, 0x2a, 0x2f, 0x12, 0x03, 0x36, 0x40, 0x1c, 0x20, 0x23, 0x21, 0x01, 0xca, 0x21, 0x39, 0x29, 0x17, 0x04, 0x0b, 0x14, 0x11, 0x25, 0x07, 0x09, 0x10, 0x16, 0x0e, 0x08, 0x17, 0x14, 0x0e, 0x12, 0x16, 0x0b, 0x19, 0x09, 0x05, 0x10, 0x15, 0x1b, 0x0f, 0x0e, 0x16, 0x0e, 0x12, 0x0e, 0x13, 0x0f, 0x16, 0x23, 0x19, 0x0e, 0x3d, 0x36, 0x20, 0x31, 0x0b, 0x08, 0x3b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1f, 0x01, 0x3e, 0x01, 0x44, 0x03, 0x00, 0x00, 0x36, 0x00, 0x1a, 0x40, 0x0a, 0x18, 0x00, 0x2c, 0x31, 0x24, 0x0f, 0x1c, 0x29, 0x34, 0x07, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xc6, 0xcd, 0x2f, 0xc4, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x06, 0x07, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x01, 0x37, 0x3e, 0x03, 0x35, 0x34, 0x26, 0x23, 0x22, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x07, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x01, 0x44, 0x17, 0x0f, 0x28, 0x5f, 0x29, 0x05, 0x12, 0x12, 0x11, 0x04, 0x08, 0x09, 0x04, 0x06, 0x07, 0x0f, 0x08, 0x0d, 0x2f, 0x2f, 0x23, 0x0d, 0x0c, 0x0c, 0x16, 0x16, 0x18, 0x10, 0x12, 0x15, 0x18, 0x26, 0x30, 0x19, 0x34, 0x45, 0x20, 0x2f, 0x34, 0x15, 0x1f, 0x3e, 0x1f, 0x11, 0x1a, 0x01, 0x7b, 0x11, 0x16, 0x03, 0x09, 0x0a, 0x01, 0x02, 0x04, 0x03, 0x07, 0x22, 0x0a, 0x08, 0x0e, 0x07, 0x08, 0x0e, 0x08, 0x0d, 0x34, 0x3c, 0x38, 0x12, 0x0b, 0x0f, 0x12, 0x15, 0x12, 0x16, 0x11, 0x1b, 0x2d, 0x21, 0x12, 0x31, 0x37, 0x20, 0x49, 0x46, 0x3e, 0x15, 0x04, 0x06, 0x13, 0x00, 0x00, 0x00, 0x02, 0x00, 0x33, 0xff, 0xe1, 0x00, 0xa4, 0x03, 0x02, 0x00, 0x1f, 0x00, 0x41, 0x00, 0x15, 0xb7, 0x20, 0x32, 0x00, 0x11, 0x39, 0x2b, 0x07, 0x19, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x13, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x27, 0x2e, 0x03, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x17, 0x1e, 0x03, 0x13, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x26, 0x27, 0x2e, 0x03, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x17, 0x1e, 0x03, 0xa3, 0x02, 0x03, 0x04, 0x02, 0x04, 0x21, 0x07, 0x09, 0x16, 0x04, 0x04, 0x08, 0x06, 0x04, 0x02, 0x03, 0x04, 0x02, 0x04, 0x1d, 0x08, 0x09, 0x1c, 0x04, 0x02, 0x07, 0x06, 0x04, 0x01, 0x02, 0x03, 0x04, 0x02, 0x02, 0x0b, 0x0e, 0x0e, 0x04, 0x08, 0x16, 0x04, 0x04, 0x08, 0x06, 0x04, 0x02, 0x03, 0x04, 0x02, 0x03, 0x1d, 0x09, 0x09, 0x1c, 0x04, 0x02, 0x07, 0x06, 0x04, 0x02, 0x49, 0x08, 0x25, 0x28, 0x23, 0x06, 0x08, 0x06, 0x04, 0x09, 0x07, 0x2d, 0x33, 0x2e, 0x09, 0x09, 0x28, 0x2c, 0x26, 0x08, 0x0a, 0x05, 0x05, 0x08, 0x05, 0x31, 0x3a, 0x34, 0xfe, 0x28, 0x08, 0x28, 0x2d, 0x26, 0x06, 0x05, 0x05, 0x04, 0x01, 0x05, 0x09, 0x07, 0x31, 0x37, 0x33, 0x0a, 0x0a, 0x2b, 0x2e, 0x2a, 0x08, 0x0b, 0x04, 0x05, 0x09, 0x05, 0x34, 0x3f, 0x38, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1f, 0x00, 0xdb, 0x01, 0xc2, 0x01, 0x2f, 0x00, 0x19, 0x00, 0x11, 0xb5, 0x00, 0x1b, 0x0d, 0x1a, 0x06, 0x15, 0x00, 0x2f, 0xcd, 0x01, 0x10, 0xc6, 0x10, 0xc6, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x04, 0x23, 0x2a, 0x01, 0x2e, 0x03, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x02, 0x01, 0xc2, 0x1e, 0x2d, 0x37, 0x33, 0x28, 0x08, 0x07, 0x21, 0x2a, 0x2e, 0x25, 0x19, 0x1b, 0x29, 0x34, 0x31, 0x29, 0x0b, 0x0f, 0x41, 0x43, 0x33, 0xff, 0x09, 0x0b, 0x08, 0x05, 0x02, 0x01, 0x02, 0x04, 0x08, 0x0d, 0x09, 0x0b, 0x11, 0x0a, 0x06, 0x03, 0x01, 0x05, 0x0c, 0x12, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1f, 0x00, 0x51, 0x01, 0x83, 0x01, 0xc7, 0x00, 0x31, 0x00, 0x15, 0xb7, 0x0a, 0x31, 0x18, 0x21, 0x2f, 0x26, 0x0c, 0x16, 0x00, 0x2f, 0xc4, 0x2f, 0xc0, 0x01, 0x2f, 0xc4, 0x2f, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x07, 0x1e, 0x03, 0x15, 0x14, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x0e, 0x03, 0x23, 0x22, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x2e, 0x03, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x3e, 0x03, 0x33, 0x32, 0x16, 0x01, 0x83, 0x1f, 0x29, 0x28, 0x09, 0x0a, 0x24, 0x21, 0x19, 0x13, 0x12, 0x2a, 0x28, 0x23, 0x0b, 0x0c, 0x26, 0x2b, 0x2d, 0x13, 0x11, 0x1e, 0x28, 0x29, 0x0b, 0x08, 0x21, 0x22, 0x1a, 0x09, 0x0a, 0x0e, 0x2a, 0x2a, 0x24, 0x08, 0x0a, 0x28, 0x2d, 0x2c, 0x0f, 0x08, 0x0c, 0x01, 0xb4, 0x0e, 0x32, 0x37, 0x31, 0x0b, 0x0b, 0x26, 0x2b, 0x2c, 0x12, 0x14, 0x1a, 0x25, 0x26, 0x0c, 0x0e, 0x27, 0x24, 0x1a, 0x11, 0x10, 0x31, 0x30, 0x2a, 0x0a, 0x0a, 0x2e, 0x33, 0x31, 0x0e, 0x08, 0x0e, 0x20, 0x2a, 0x2a, 0x0a, 0x0b, 0x2a, 0x2a, 0x1f, 0x09, 0x00, 0x02, 0x00, 0x1f, 0xff, 0xe4, 0x00, 0xda, 0x02, 0xff, 0x00, 0x1b, 0x00, 0x2b, 0x00, 0x15, 0xb7, 0x1c, 0x25, 0x00, 0x0f, 0x29, 0x21, 0x07, 0x15, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x13, 0x14, 0x0e, 0x04, 0x23, 0x22, 0x2e, 0x04, 0x35, 0x3c, 0x01, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x03, 0x06, 0x03, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0xd9, 0x04, 0x08, 0x0f, 0x14, 0x1c, 0x12, 0x16, 0x1f, 0x15, 0x0c, 0x06, 0x01, 0x05, 0x0b, 0x16, 0x24, 0x1b, 0x18, 0x1f, 0x13, 0x09, 0x03, 0x01, 0x13, 0x10, 0x1a, 0x1e, 0x0f, 0x16, 0x28, 0x11, 0x1a, 0x1f, 0x0e, 0x17, 0x26, 0x01, 0xa3, 0x10, 0x37, 0x3f, 0x41, 0x35, 0x21, 0x2b, 0x43, 0x52, 0x4f, 0x43, 0x12, 0x12, 0x37, 0x3e, 0x3d, 0x32, 0x1f, 0x29, 0x41, 0x50, 0x4d, 0x42, 0xfe, 0x71, 0x11, 0x19, 0x11, 0x08, 0x17, 0x19, 0x0f, 0x19, 0x12, 0x0a, 0x17, 0x00, 0x02, 0x00, 0x1f, 0x01, 0xcb, 0x01, 0x04, 0x02, 0xea, 0x00, 0x15, 0x00, 0x2b, 0x00, 0x15, 0xb7, 0x22, 0x16, 0x00, 0x0d, 0x11, 0x27, 0x05, 0x1c, 0x00, 0x2f, 0xc0, 0x2f, 0xc0, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x04, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x07, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x04, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x01, 0x04, 0x04, 0x0a, 0x14, 0x0f, 0x09, 0x0e, 0x0b, 0x08, 0x05, 0x02, 0x02, 0x09, 0x11, 0x10, 0x12, 0x15, 0x0c, 0x03, 0x83, 0x04, 0x0a, 0x14, 0x0f, 0x09, 0x0e, 0x0b, 0x08, 0x05, 0x02, 0x02, 0x09, 0x11, 0x10, 0x12, 0x15, 0x0c, 0x03, 0x02, 0x87, 0x0f, 0x3f, 0x3f, 0x2f, 0x18, 0x24, 0x2c, 0x2a, 0x21, 0x08, 0x0a, 0x22, 0x21, 0x17, 0x15, 0x1f, 0x22, 0x0d, 0x0f, 0x3f, 0x3f, 0x2f, 0x18, 0x24, 0x2c, 0x2a, 0x21, 0x08, 0x0a, 0x22, 0x21, 0x17, 0x15, 0x1f, 0x22, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2a, 0x02, 0x12, 0x02, 0xca, 0x00, 0x69, 0x00, 0x75, 0x00, 0x15, 0xb7, 0x40, 0x35, 0x00, 0x0d, 0x5d, 0x4e, 0x17, 0x28, 0x00, 0x2f, 0xc0, 0x2f, 0xc0, 0x01, 0x2f, 0xc4, 0x2f, 0xc6, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x01, 0x07, 0x1e, 0x03, 0x15, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x37, 0x06, 0x22, 0x23, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x37, 0x2e, 0x03, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x3e, 0x01, 0x37, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x3e, 0x05, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x06, 0x07, 0x36, 0x16, 0x17, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x06, 0x07, 0x1e, 0x03, 0x07, 0x06, 0x26, 0x23, 0x0e, 0x01, 0x07, 0x3a, 0x01, 0x17, 0x3e, 0x01, 0x02, 0x12, 0x1e, 0x27, 0x23, 0x06, 0x08, 0x12, 0x08, 0x05, 0x1e, 0x20, 0x19, 0x1e, 0x27, 0x24, 0x06, 0x03, 0x12, 0x18, 0x1b, 0x0d, 0x09, 0x0a, 0x06, 0x01, 0x09, 0x05, 0x10, 0x20, 0x10, 0x03, 0x11, 0x18, 0x1b, 0x0d, 0x09, 0x0a, 0x06, 0x01, 0x09, 0x07, 0x07, 0x25, 0x26, 0x1e, 0x21, 0x2b, 0x2a, 0x0a, 0x08, 0x0e, 0x09, 0x07, 0x23, 0x25, 0x1c, 0x21, 0x2b, 0x2b, 0x09, 0x02, 0x09, 0x0d, 0x11, 0x11, 0x13, 0x09, 0x09, 0x09, 0x05, 0x01, 0x08, 0x06, 0x11, 0x1f, 0x11, 0x03, 0x11, 0x18, 0x1c, 0x0d, 0x09, 0x09, 0x05, 0x01, 0x0a, 0x06, 0x06, 0x1f, 0x21, 0x1a, 0xd5, 0x0e, 0x1d, 0x0f, 0x08, 0x0f, 0x08, 0x10, 0x1e, 0x0f, 0x07, 0x0d, 0x01, 0xe9, 0x08, 0x0c, 0x08, 0x04, 0x01, 0x24, 0x49, 0x24, 0x01, 0x07, 0x0a, 0x0e, 0x08, 0x08, 0x0c, 0x08, 0x04, 0x01, 0x0b, 0x3f, 0x45, 0x35, 0x0f, 0x15, 0x15, 0x06, 0x20, 0x3f, 0x20, 0x01, 0x0a, 0x3d, 0x42, 0x34, 0x0f, 0x15, 0x15, 0x06, 0x22, 0x40, 0x1f, 0x01, 0x04, 0x08, 0x0d, 0x0b, 0x0e, 0x11, 0x0a, 0x03, 0x01, 0x23, 0x45, 0x22, 0x04, 0x08, 0x0d, 0x0a, 0x0e, 0x11, 0x0a, 0x04, 0x01, 0x07, 0x20, 0x28, 0x2a, 0x23, 0x17, 0x0e, 0x14, 0x13, 0x06, 0x1d, 0x38, 0x1d, 0x01, 0x01, 0x01, 0x0a, 0x39, 0x3c, 0x2f, 0x0e, 0x14, 0x13, 0x06, 0x20, 0x3e, 0x20, 0x01, 0x06, 0x0b, 0x0e, 0x2e, 0x01, 0x01, 0x20, 0x40, 0x20, 0x01, 0x20, 0x41, 0x00, 0x00, 0x01, 0x00, 0x1a, 0xff, 0xdc, 0x01, 0xcd, 0x03, 0x10, 0x00, 0x60, 0x00, 0x2c, 0x40, 0x13, 0x59, 0x4e, 0x32, 0x0e, 0x49, 0x2c, 0x1c, 0x3e, 0x00, 0x16, 0x53, 0x62, 0x22, 0x61, 0x0a, 0x59, 0x3a, 0x1c, 0x2d, 0x00, 0x2f, 0xc5, 0xcd, 0x2f, 0xcd, 0x10, 0xc4, 0x10, 0xc4, 0x01, 0x2f, 0xc4, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0xc4, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x04, 0x15, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x01, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x35, 0x3c, 0x01, 0x2e, 0x01, 0x27, 0x2e, 0x03, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x34, 0x2e, 0x02, 0x27, 0x2e, 0x03, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x3e, 0x01, 0x37, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x07, 0x1e, 0x03, 0x17, 0x1e, 0x01, 0x01, 0xcd, 0x0f, 0x17, 0x1a, 0x0b, 0x11, 0x20, 0x21, 0x26, 0x17, 0x09, 0x19, 0x16, 0x0f, 0x2a, 0x40, 0x49, 0x40, 0x2a, 0x1a, 0x2a, 0x36, 0x1b, 0x05, 0x01, 0x01, 0x0a, 0x16, 0x15, 0x13, 0x21, 0x01, 0x02, 0x04, 0x03, 0x13, 0x38, 0x33, 0x24, 0x23, 0x16, 0x13, 0x25, 0x27, 0x29, 0x16, 0x08, 0x18, 0x16, 0x10, 0x14, 0x1b, 0x1c, 0x08, 0x20, 0x46, 0x3b, 0x27, 0x1d, 0x31, 0x3f, 0x23, 0x04, 0x06, 0x06, 0x09, 0x23, 0x0e, 0x1a, 0x06, 0x02, 0x15, 0x2e, 0x2b, 0x25, 0x0b, 0x03, 0x04, 0x02, 0x2a, 0x0e, 0x13, 0x0d, 0x06, 0x0b, 0x0c, 0x0b, 0x04, 0x0a, 0x10, 0x0c, 0x12, 0x1d, 0x1f, 0x25, 0x30, 0x3f, 0x2b, 0x25, 0x2c, 0x1b, 0x0f, 0x07, 0x01, 0x15, 0x1d, 0x21, 0x1c, 0x13, 0x19, 0x14, 0x08, 0x0f, 0x08, 0x03, 0x10, 0x12, 0x0e, 0x01, 0x05, 0x0c, 0x15, 0x20, 0x19, 0x17, 0x1e, 0x0c, 0x0e, 0x0c, 0x03, 0x09, 0x0f, 0x0c, 0x0b, 0x12, 0x0e, 0x0b, 0x03, 0x0d, 0x23, 0x2f, 0x3e, 0x29, 0x24, 0x3b, 0x2a, 0x19, 0x02, 0x17, 0x2f, 0x17, 0x1f, 0x0f, 0x0f, 0x14, 0x2e, 0x14, 0x05, 0x0f, 0x15, 0x1e, 0x14, 0x06, 0x0b, 0x00, 0x00, 0x00, 0x05, 0x00, 0x14, 0xff, 0xf5, 0x03, 0x1b, 0x02, 0xef, 0x00, 0x13, 0x00, 0x3b, 0x00, 0x4f, 0x00, 0x63, 0x00, 0x77, 0x00, 0x2e, 0x40, 0x14, 0x74, 0x4b, 0x68, 0x27, 0x41, 0x38, 0x60, 0x0f, 0x55, 0x06, 0x64, 0x34, 0x46, 0x6e, 0x3c, 0x50, 0x0a, 0x5a, 0x23, 0x00, 0x00, 0x2f, 0xc4, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xc4, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xdd, 0xc4, 0x2f, 0xc4, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x05, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x03, 0x0e, 0x03, 0x07, 0x0e, 0x03, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x04, 0x37, 0x3e, 0x05, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x01, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x25, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x34, 0x2e, 0x02, 0x01, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x34, 0x2e, 0x02, 0x02, 0x72, 0x27, 0x39, 0x25, 0x12, 0x17, 0x2c, 0x3f, 0x28, 0x2d, 0x3a, 0x22, 0x0d, 0x13, 0x29, 0x40, 0x56, 0x12, 0x25, 0x21, 0x1b, 0x08, 0x07, 0x1c, 0x25, 0x2d, 0x17, 0x17, 0x2d, 0x2a, 0x22, 0x0a, 0x0e, 0x07, 0x1b, 0x29, 0x34, 0x31, 0x2b, 0x0c, 0x08, 0x29, 0x36, 0x3d, 0x3a, 0x30, 0x0e, 0x0d, 0x07, 0x0f, 0x19, 0x21, 0xfe, 0x52, 0x27, 0x39, 0x25, 0x13, 0x17, 0x2d, 0x3f, 0x29, 0x2d, 0x39, 0x22, 0x0d, 0x13, 0x29, 0x40, 0x01, 0xb2, 0x12, 0x1d, 0x14, 0x0a, 0x06, 0x0e, 0x15, 0x0e, 0x12, 0x1c, 0x14, 0x0a, 0x07, 0x0d, 0x15, 0xfe, 0x2d, 0x12, 0x1d, 0x14, 0x0a, 0x07, 0x0d, 0x15, 0x0f, 0x12, 0x1c, 0x13, 0x0a, 0x06, 0x0e, 0x14, 0x03, 0x2d, 0x43, 0x4b, 0x1e, 0x1f, 0x54, 0x4a, 0x34, 0x2d, 0x44, 0x4e, 0x21, 0x23, 0x52, 0x46, 0x2f, 0x02, 0x1c, 0x1d, 0x38, 0x32, 0x27, 0x0c, 0x0a, 0x29, 0x36, 0x3f, 0x1f, 0x1e, 0x3b, 0x2e, 0x1c, 0x15, 0x05, 0x13, 0x3f, 0x4b, 0x52, 0x4b, 0x3f, 0x12, 0x0c, 0x3c, 0x4c, 0x52, 0x43, 0x2c, 0x12, 0x06, 0x0d, 0x29, 0x33, 0x39, 0xfe, 0xed, 0x2e, 0x42, 0x4b, 0x1e, 0x20, 0x53, 0x4b, 0x33, 0x2d, 0x43, 0x4f, 0x21, 0x23, 0x52, 0x46, 0x2f, 0x32, 0x1c, 0x28, 0x2d, 0x12, 0x0e, 0x24, 0x20, 0x17, 0x1c, 0x28, 0x2d, 0x11, 0x0d, 0x25, 0x21, 0x17, 0x01, 0x26, 0x1c, 0x28, 0x2d, 0x12, 0x0e, 0x24, 0x21, 0x17, 0x1c, 0x28, 0x2d, 0x11, 0x0e, 0x25, 0x21, 0x17, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x1f, 0xff, 0xcb, 0x02, 0xa9, 0x03, 0x0a, 0x00, 0x3d, 0x00, 0x49, 0x00, 0x56, 0x00, 0x26, 0x40, 0x10, 0x47, 0x29, 0x41, 0x1f, 0x4d, 0x15, 0x39, 0x05, 0x44, 0x36, 0x4a, 0x3e, 0x24, 0x4f, 0x08, 0x10, 0x00, 0x2f, 0xc4, 0xcd, 0x2f, 0xcd, 0x2f, 0xc4, 0xcd, 0x01, 0x2f, 0xc4, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x25, 0x1e, 0x03, 0x15, 0x14, 0x06, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x2e, 0x03, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x07, 0x1e, 0x01, 0x17, 0x3e, 0x03, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x01, 0x22, 0x06, 0x15, 0x14, 0x16, 0x17, 0x3e, 0x01, 0x35, 0x34, 0x26, 0x03, 0x0e, 0x01, 0x15, 0x14, 0x33, 0x32, 0x36, 0x37, 0x2e, 0x03, 0x02, 0x48, 0x09, 0x1a, 0x18, 0x11, 0x22, 0x15, 0x0f, 0x28, 0x28, 0x25, 0x0a, 0x2e, 0x78, 0x36, 0x2f, 0x4d, 0x39, 0x1f, 0x1f, 0x30, 0x3a, 0x1c, 0x0e, 0x16, 0x0f, 0x08, 0x1a, 0x2d, 0x3f, 0x25, 0x22, 0x40, 0x32, 0x1f, 0x13, 0x1f, 0x25, 0x12, 0x1d, 0x3d, 0x1f, 0x0c, 0x1e, 0x22, 0x24, 0x12, 0x19, 0x17, 0x14, 0x1d, 0x22, 0xfe, 0xd7, 0x14, 0x10, 0x15, 0x13, 0x14, 0x1f, 0x25, 0x33, 0x20, 0x25, 0x44, 0x1c, 0x3d, 0x19, 0x10, 0x1c, 0x1a, 0x1b, 0x8d, 0x0c, 0x24, 0x29, 0x27, 0x0d, 0x18, 0x1d, 0x19, 0x22, 0x23, 0x0b, 0x1e, 0x20, 0x1c, 0x35, 0x4d, 0x30, 0x26, 0x45, 0x3b, 0x31, 0x14, 0x12, 0x2b, 0x2e, 0x2f, 0x15, 0x24, 0x3f, 0x2f, 0x1a, 0x1c, 0x2f, 0x3f, 0x24, 0x1c, 0x31, 0x2c, 0x28, 0x12, 0x2c, 0x54, 0x2b, 0x0c, 0x1b, 0x17, 0x0f, 0x1b, 0x17, 0x15, 0x29, 0x24, 0x1f, 0x01, 0xea, 0x1a, 0x16, 0x19, 0x29, 0x10, 0x11, 0x2e, 0x19, 0x11, 0x19, 0xfe, 0xc1, 0x17, 0x3f, 0x27, 0x42, 0x15, 0x10, 0x15, 0x24, 0x24, 0x26, 0x00, 0x00, 0x01, 0x00, 0x1f, 0x01, 0xcb, 0x00, 0x81, 0x02, 0xea, 0x00, 0x15, 0x00, 0x0d, 0xb3, 0x00, 0x0d, 0x05, 0x11, 0x00, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x31, 0x30, 0x13, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x04, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x81, 0x04, 0x0a, 0x14, 0x0f, 0x09, 0x0e, 0x0b, 0x08, 0x05, 0x02, 0x02, 0x09, 0x11, 0x10, 0x12, 0x15, 0x0c, 0x03, 0x02, 0x87, 0x0f, 0x3f, 0x3f, 0x2f, 0x18, 0x24, 0x2c, 0x2a, 0x21, 0x08, 0x0a, 0x22, 0x21, 0x17, 0x15, 0x1f, 0x22, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x29, 0xff, 0xc4, 0x00, 0xfc, 0x03, 0x07, 0x00, 0x23, 0x00, 0x11, 0xb5, 0x0c, 0x23, 0x06, 0x17, 0x21, 0x0f, 0x00, 0x2f, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xc0, 0x31, 0x30, 0x13, 0x14, 0x06, 0x07, 0x0e, 0x01, 0x15, 0x14, 0x16, 0x17, 0x1e, 0x01, 0x15, 0x14, 0x06, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x2e, 0x01, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x3e, 0x03, 0x33, 0x32, 0x16, 0xfc, 0x16, 0x06, 0x20, 0x2e, 0x2f, 0x23, 0x07, 0x11, 0x13, 0x0e, 0x12, 0x1f, 0x1a, 0x15, 0x07, 0x25, 0x26, 0x0e, 0x18, 0x1f, 0x12, 0x06, 0x12, 0x18, 0x1c, 0x10, 0x0d, 0x13, 0x02, 0xea, 0x0e, 0x27, 0x0e, 0x4b, 0xa5, 0x53, 0x53, 0xac, 0x4b, 0x0e, 0x1b, 0x0f, 0x0e, 0x10, 0x14, 0x1e, 0x22, 0x0e, 0x48, 0xa4, 0x51, 0x28, 0x54, 0x53, 0x4e, 0x24, 0x0c, 0x22, 0x1f, 0x16, 0x10, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x14, 0xff, 0xc6, 0x00, 0xea, 0x03, 0x09, 0x00, 0x24, 0x00, 0x11, 0xb5, 0x0d, 0x1b, 0x14, 0x01, 0x1d, 0x0c, 0x00, 0x2f, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xc4, 0x31, 0x30, 0x13, 0x15, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x01, 0x35, 0x34, 0x26, 0x27, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x1e, 0x01, 0xea, 0x0e, 0x19, 0x20, 0x12, 0x06, 0x13, 0x18, 0x1c, 0x10, 0x0b, 0x15, 0x16, 0x06, 0x20, 0x31, 0x2c, 0x23, 0x06, 0x11, 0x13, 0x0d, 0x12, 0x20, 0x1a, 0x14, 0x07, 0x23, 0x25, 0x01, 0x6d, 0x06, 0x27, 0x54, 0x52, 0x50, 0x22, 0x0c, 0x22, 0x1e, 0x16, 0x10, 0x0c, 0x0f, 0x26, 0x0f, 0x4b, 0xa7, 0x54, 0x53, 0xa8, 0x4c, 0x0e, 0x1b, 0x0e, 0x0e, 0x11, 0x14, 0x1e, 0x22, 0x0e, 0x48, 0xa2, 0x00, 0x00, 0x01, 0x00, 0x1f, 0x01, 0x23, 0x01, 0xb7, 0x02, 0xf6, 0x00, 0x47, 0x00, 0x1a, 0x40, 0x0a, 0x2e, 0x24, 0x00, 0x0b, 0x45, 0x30, 0x3c, 0x22, 0x0c, 0x17, 0x00, 0x2f, 0xc4, 0xc4, 0x2f, 0xc4, 0xc6, 0x01, 0x2f, 0xc0, 0x2f, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x07, 0x1e, 0x03, 0x15, 0x14, 0x06, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x0e, 0x03, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x2e, 0x03, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x3e, 0x03, 0x33, 0x32, 0x16, 0x01, 0xb7, 0x1e, 0x28, 0x26, 0x08, 0x09, 0x26, 0x27, 0x1e, 0x0a, 0x06, 0x0d, 0x28, 0x29, 0x26, 0x0c, 0x03, 0x08, 0x0f, 0x0d, 0x10, 0x13, 0x0a, 0x04, 0x01, 0x0c, 0x23, 0x26, 0x25, 0x0e, 0x09, 0x0e, 0x1d, 0x26, 0x26, 0x0a, 0x09, 0x26, 0x25, 0x1d, 0x11, 0x09, 0x0d, 0x24, 0x24, 0x21, 0x0c, 0x01, 0x07, 0x0d, 0x12, 0x0c, 0x0a, 0x0e, 0x08, 0x05, 0x01, 0x0d, 0x23, 0x27, 0x25, 0x0f, 0x05, 0x11, 0x02, 0x77, 0x0b, 0x1f, 0x20, 0x1a, 0x06, 0x06, 0x1e, 0x23, 0x23, 0x0c, 0x08, 0x04, 0x0c, 0x12, 0x12, 0x06, 0x09, 0x33, 0x37, 0x2b, 0x29, 0x35, 0x33, 0x0b, 0x06, 0x13, 0x10, 0x0c, 0x09, 0x0b, 0x0d, 0x21, 0x1f, 0x1a, 0x06, 0x06, 0x19, 0x1e, 0x1f, 0x0c, 0x0b, 0x08, 0x0a, 0x0e, 0x10, 0x06, 0x08, 0x34, 0x37, 0x2b, 0x2b, 0x38, 0x33, 0x08, 0x06, 0x0f, 0x0c, 0x09, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x14, 0x00, 0x3d, 0x01, 0xcd, 0x01, 0xd5, 0x00, 0x30, 0x00, 0x1c, 0x40, 0x0b, 0x19, 0x15, 0x00, 0x09, 0x14, 0x08, 0x24, 0x08, 0x29, 0x0f, 0x09, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xc4, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x23, 0x0e, 0x01, 0x23, 0x0e, 0x05, 0x07, 0x06, 0x2e, 0x02, 0x27, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x01, 0x16, 0x33, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x1e, 0x01, 0x17, 0x32, 0x1e, 0x02, 0x01, 0xcd, 0x18, 0x20, 0x20, 0x07, 0x14, 0x27, 0x13, 0x01, 0x01, 0x03, 0x05, 0x0a, 0x0d, 0x0a, 0x0e, 0x13, 0x0c, 0x06, 0x01, 0x0b, 0x38, 0x3c, 0x2e, 0x30, 0x3e, 0x3b, 0x0b, 0x03, 0x0b, 0x13, 0x11, 0x0e, 0x10, 0x07, 0x01, 0x13, 0x26, 0x13, 0x07, 0x20, 0x21, 0x19, 0x01, 0x09, 0x0c, 0x0d, 0x07, 0x02, 0x01, 0x01, 0x07, 0x1d, 0x25, 0x27, 0x20, 0x16, 0x01, 0x01, 0x2c, 0x39, 0x36, 0x09, 0x01, 0x05, 0x0d, 0x0d, 0x12, 0x12, 0x07, 0x01, 0x13, 0x0a, 0x32, 0x34, 0x27, 0x2e, 0x3a, 0x37, 0x09, 0x01, 0x01, 0x01, 0x02, 0x07, 0x0d, 0x00, 0x01, 0x00, 0x0a, 0xff, 0xa1, 0x00, 0xae, 0x00, 0x82, 0x00, 0x16, 0x00, 0x0d, 0xb3, 0x00, 0x11, 0x14, 0x05, 0x00, 0x2f, 0xc4, 0x01, 0x2f, 0xcd, 0x31, 0x30, 0x37, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x35, 0x34, 0x3e, 0x02, 0x35, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0xae, 0x11, 0x19, 0x20, 0x0f, 0x14, 0x0a, 0x0c, 0x0a, 0x0f, 0x11, 0x17, 0x20, 0x2a, 0x20, 0x24, 0x36, 0x35, 0x10, 0x32, 0x30, 0x22, 0x14, 0x0c, 0x16, 0x15, 0x15, 0x0a, 0x0a, 0x24, 0x16, 0x20, 0x27, 0x26, 0x00, 0x00, 0x00, 0x01, 0x00, 0x14, 0x00, 0xdb, 0x01, 0xb7, 0x01, 0x2f, 0x00, 0x17, 0x00, 0x11, 0xb5, 0x00, 0x19, 0x0c, 0x18, 0x07, 0x11, 0x00, 0x2f, 0xcd, 0x01, 0x10, 0xc6, 0x10, 0xc6, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x04, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x04, 0x01, 0xb7, 0x1d, 0x2e, 0x37, 0x32, 0x28, 0x08, 0x0a, 0x3e, 0x43, 0x34, 0x39, 0x4b, 0x49, 0x11, 0x0a, 0x25, 0x2b, 0x2e, 0x25, 0x18, 0xff, 0x09, 0x0b, 0x08, 0x05, 0x02, 0x01, 0x01, 0x06, 0x0f, 0x0e, 0x11, 0x14, 0x09, 0x02, 0x02, 0x05, 0x08, 0x0a, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xff, 0xf8, 0x00, 0xaf, 0x00, 0x79, 0x00, 0x11, 0x00, 0x0d, 0xb3, 0x00, 0x0a, 0x0d, 0x05, 0x00, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x31, 0x30, 0x37, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0xaf, 0x0c, 0x13, 0x17, 0x0c, 0x0f, 0x23, 0x1d, 0x14, 0x2e, 0x18, 0x0f, 0x21, 0x1d, 0x12, 0x30, 0x0d, 0x15, 0x0e, 0x08, 0x0b, 0x14, 0x1b, 0x11, 0x1b, 0x1b, 0x0a, 0x13, 0x1b, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x09, 0x01, 0x7d, 0x02, 0xee, 0x00, 0x1d, 0x00, 0x0d, 0xb3, 0x10, 0x1d, 0x0c, 0x1b, 0x00, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x05, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x3e, 0x05, 0x33, 0x32, 0x16, 0x01, 0x7d, 0x1e, 0x2a, 0x2c, 0x0e, 0x07, 0x1e, 0x28, 0x2d, 0x2c, 0x27, 0x0d, 0x0e, 0x09, 0x20, 0x2c, 0x2e, 0x0e, 0x06, 0x1d, 0x26, 0x2c, 0x2b, 0x28, 0x0e, 0x0e, 0x07, 0x02, 0xcc, 0x1e, 0x5f, 0x66, 0x5e, 0x1d, 0x0e, 0x3f, 0x50, 0x55, 0x46, 0x2d, 0x1e, 0x0a, 0x20, 0x62, 0x6a, 0x63, 0x20, 0x0e, 0x3c, 0x4a, 0x4f, 0x41, 0x2a, 0x19, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0xff, 0xda, 0x02, 0x63, 0x02, 0xcb, 0x00, 0x15, 0x00, 0x29, 0x00, 0x15, 0xb7, 0x20, 0x0a, 0x17, 0x00, 0x1b, 0x11, 0x25, 0x05, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x02, 0x07, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x02, 0x63, 0x29, 0x4f, 0x76, 0x4d, 0x41, 0x68, 0x49, 0x27, 0x16, 0x29, 0x39, 0x47, 0x53, 0x2d, 0x4d, 0x6a, 0x41, 0x1d, 0x91, 0x0e, 0x1d, 0x2e, 0x20, 0x27, 0x3d, 0x2a, 0x17, 0x0e, 0x1e, 0x2f, 0x20, 0x27, 0x3d, 0x29, 0x16, 0x01, 0x5b, 0x44, 0x89, 0x6f, 0x45, 0x44, 0x69, 0x7d, 0x3a, 0x29, 0x5a, 0x58, 0x51, 0x3d, 0x24, 0x42, 0x69, 0x83, 0x3d, 0x19, 0x44, 0x3c, 0x2a, 0x31, 0x48, 0x52, 0x21, 0x1a, 0x42, 0x3b, 0x29, 0x31, 0x47, 0x51, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1a, 0xff, 0xfc, 0x00, 0xdc, 0x02, 0xdd, 0x00, 0x1f, 0x00, 0x0d, 0xb3, 0x01, 0x15, 0x1b, 0x0b, 0x00, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x31, 0x30, 0x13, 0x14, 0x06, 0x07, 0x06, 0x14, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x03, 0x36, 0x35, 0x34, 0x36, 0x37, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0xdc, 0x02, 0x01, 0x02, 0x03, 0x01, 0x02, 0x0d, 0x1c, 0x19, 0x18, 0x1e, 0x11, 0x06, 0x01, 0x02, 0x01, 0x01, 0x14, 0x17, 0x31, 0x2b, 0x25, 0x2a, 0x13, 0x04, 0x01, 0xed, 0x1f, 0x3e, 0x1f, 0x33, 0x65, 0x33, 0x11, 0x39, 0x37, 0x29, 0x21, 0x33, 0x3f, 0x3d, 0x34, 0x0e, 0x44, 0x88, 0x44, 0x11, 0x31, 0x1a, 0x29, 0x3a, 0x38, 0x4e, 0x51, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xff, 0xf8, 0x01, 0xf3, 0x02, 0xe4, 0x00, 0x40, 0x00, 0x18, 0x40, 0x09, 0x1f, 0x00, 0x34, 0x2a, 0x12, 0x22, 0x2f, 0x3b, 0x09, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xc4, 0x2f, 0xc4, 0xcd, 0x31, 0x30, 0x25, 0x14, 0x06, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x2e, 0x03, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x01, 0x37, 0x3e, 0x05, 0x35, 0x34, 0x26, 0x23, 0x22, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x04, 0x07, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x01, 0xf3, 0x26, 0x1b, 0x1e, 0x4c, 0x4f, 0x4c, 0x1f, 0x08, 0x1d, 0x1f, 0x1b, 0x07, 0x07, 0x0b, 0x08, 0x04, 0x07, 0x0a, 0x0c, 0x1a, 0x0c, 0x0e, 0x2e, 0x35, 0x35, 0x2c, 0x1b, 0x16, 0x13, 0x15, 0x24, 0x24, 0x29, 0x1a, 0x1f, 0x23, 0x27, 0x40, 0x50, 0x2a, 0x2b, 0x4a, 0x36, 0x1f, 0x19, 0x29, 0x35, 0x38, 0x38, 0x17, 0x31, 0x6c, 0x32, 0x1d, 0x2b, 0x5c, 0x1d, 0x24, 0x05, 0x07, 0x0b, 0x08, 0x04, 0x01, 0x03, 0x06, 0x05, 0x06, 0x15, 0x19, 0x18, 0x09, 0x0e, 0x17, 0x0a, 0x0d, 0x19, 0x0c, 0x0f, 0x31, 0x3d, 0x43, 0x40, 0x38, 0x14, 0x13, 0x19, 0x1e, 0x23, 0x1e, 0x24, 0x1e, 0x2c, 0x4b, 0x36, 0x1f, 0x14, 0x2a, 0x41, 0x2e, 0x24, 0x4f, 0x50, 0x4f, 0x48, 0x3e, 0x17, 0x06, 0x0c, 0x1f, 0x00, 0x01, 0x00, 0x1a, 0xff, 0xe6, 0x01, 0xd4, 0x02, 0xe7, 0x00, 0x46, 0x00, 0x20, 0x40, 0x0d, 0x2a, 0x3f, 0x36, 0x22, 0x0a, 0x14, 0x00, 0x2c, 0x3c, 0x24, 0x1a, 0x10, 0x06, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xd4, 0xc4, 0x2f, 0xcd, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x37, 0x3e, 0x03, 0x35, 0x34, 0x26, 0x23, 0x22, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x07, 0x1e, 0x03, 0x01, 0xd4, 0x2c, 0x4a, 0x62, 0x35, 0x14, 0x3b, 0x36, 0x26, 0x1f, 0x1d, 0x1d, 0x37, 0x1d, 0x16, 0x2c, 0x23, 0x16, 0x0a, 0x12, 0x1a, 0x10, 0x0f, 0x1d, 0x1f, 0x20, 0x11, 0x16, 0x15, 0x26, 0x14, 0x3d, 0x3a, 0x2a, 0x20, 0x16, 0x16, 0x26, 0x25, 0x27, 0x16, 0x0b, 0x18, 0x14, 0x0d, 0x0c, 0x08, 0x22, 0x71, 0x3c, 0x5c, 0x6d, 0x2d, 0x36, 0x1d, 0x2b, 0x1c, 0x0d, 0xe8, 0x38, 0x5e, 0x45, 0x27, 0x07, 0x14, 0x22, 0x1b, 0x1d, 0x20, 0x0b, 0x0e, 0x1b, 0x25, 0x18, 0x0d, 0x26, 0x21, 0x18, 0x0a, 0x0b, 0x0a, 0x25, 0x12, 0x2a, 0x0f, 0x08, 0x1b, 0x24, 0x2d, 0x1a, 0x14, 0x26, 0x18, 0x1d, 0x18, 0x09, 0x0f, 0x16, 0x0c, 0x0e, 0x1e, 0x0b, 0x34, 0x34, 0x64, 0x5b, 0x36, 0x52, 0x12, 0x06, 0x21, 0x2e, 0x36, 0x00, 0x01, 0x00, 0x1f, 0xff, 0xf3, 0x02, 0x34, 0x02, 0xe5, 0x00, 0x4a, 0x00, 0x20, 0x40, 0x0d, 0x35, 0x05, 0x45, 0x30, 0x23, 0x0d, 0x4c, 0x05, 0x17, 0x45, 0x34, 0x3d, 0x2a, 0x00, 0x2f, 0xc4, 0x2f, 0xc5, 0xdd, 0xcd, 0x10, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xc5, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x06, 0x07, 0x06, 0x07, 0x0e, 0x01, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x37, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x2e, 0x02, 0x34, 0x35, 0x3c, 0x01, 0x37, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x06, 0x07, 0x3e, 0x01, 0x37, 0x3e, 0x03, 0x37, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x17, 0x1e, 0x01, 0x15, 0x14, 0x07, 0x1e, 0x01, 0x17, 0x1e, 0x01, 0x02, 0x34, 0x1c, 0x18, 0x2f, 0x2d, 0x04, 0x06, 0x03, 0x02, 0x04, 0x0f, 0x1d, 0x19, 0x18, 0x1b, 0x0e, 0x04, 0x05, 0x02, 0x1a, 0x34, 0x1a, 0x0c, 0x24, 0x24, 0x1f, 0x07, 0x05, 0x05, 0x03, 0x02, 0x01, 0x03, 0x11, 0x21, 0x1f, 0x13, 0x17, 0x0d, 0x04, 0x05, 0x05, 0x1d, 0x39, 0x1d, 0x01, 0x05, 0x08, 0x08, 0x04, 0x08, 0x22, 0x16, 0x1a, 0x16, 0x04, 0x05, 0x02, 0x03, 0x16, 0x2a, 0x16, 0x18, 0x1a, 0x01, 0x93, 0x1a, 0x1e, 0x05, 0x0b, 0x04, 0x27, 0x4d, 0x26, 0x12, 0x3f, 0x3c, 0x2d, 0x2a, 0x38, 0x39, 0x10, 0x29, 0x4f, 0x28, 0x02, 0x01, 0x01, 0x04, 0x0b, 0x0b, 0x07, 0x23, 0x29, 0x26, 0x09, 0x17, 0x2c, 0x17, 0x16, 0x3d, 0x38, 0x28, 0x24, 0x30, 0x31, 0x0d, 0x1e, 0x3c, 0x1d, 0x02, 0x03, 0x02, 0x0a, 0x3d, 0x45, 0x3c, 0x09, 0x13, 0x19, 0x20, 0x16, 0x1c, 0x3c, 0x1d, 0x2b, 0x2b, 0x02, 0x06, 0x05, 0x05, 0x22, 0x00, 0x01, 0x00, 0x24, 0xff, 0xf1, 0x01, 0xfa, 0x02, 0xe6, 0x00, 0x46, 0x00, 0x1e, 0x40, 0x0c, 0x41, 0x0a, 0x24, 0x38, 0x15, 0x00, 0x1d, 0x44, 0x40, 0x32, 0x12, 0x05, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0xc4, 0x2f, 0xc4, 0xcd, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x0e, 0x02, 0x07, 0x06, 0x2e, 0x02, 0x27, 0x2e, 0x03, 0x35, 0x3c, 0x01, 0x3e, 0x01, 0x37, 0x3e, 0x05, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x06, 0x07, 0x0e, 0x03, 0x07, 0x17, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x01, 0xfa, 0x25, 0x43, 0x5d, 0x39, 0x1f, 0x4b, 0x42, 0x2c, 0x20, 0x1a, 0x19, 0x22, 0x21, 0x2a, 0x21, 0x28, 0x32, 0x22, 0x27, 0x12, 0x1d, 0x1b, 0x1b, 0x0e, 0x0b, 0x22, 0x23, 0x1c, 0x04, 0x03, 0x05, 0x03, 0x01, 0x03, 0x04, 0x05, 0x06, 0x2f, 0x3f, 0x4a, 0x43, 0x37, 0x0c, 0x0e, 0x1f, 0x19, 0x10, 0x26, 0x17, 0x12, 0x34, 0x36, 0x33, 0x13, 0x02, 0x14, 0x28, 0x15, 0x6a, 0x6f, 0xea, 0x3b, 0x5c, 0x40, 0x22, 0x16, 0x2a, 0x3b, 0x24, 0x1a, 0x20, 0x14, 0x19, 0x14, 0x38, 0x27, 0x25, 0x36, 0x08, 0x0a, 0x09, 0x02, 0x02, 0x07, 0x0e, 0x13, 0x0b, 0x09, 0x3c, 0x46, 0x3f, 0x0c, 0x08, 0x24, 0x27, 0x22, 0x06, 0x09, 0x10, 0x0e, 0x0b, 0x08, 0x04, 0x07, 0x0f, 0x18, 0x11, 0x1b, 0x20, 0x08, 0x06, 0x08, 0x07, 0x04, 0x01, 0x91, 0x04, 0x05, 0x6e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0xff, 0xf0, 0x02, 0x03, 0x02, 0xe4, 0x00, 0x23, 0x00, 0x34, 0x00, 0x1e, 0x40, 0x0c, 0x1c, 0x2d, 0x2c, 0x0a, 0x24, 0x14, 0x00, 0x27, 0x11, 0x1f, 0x32, 0x05, 0x00, 0x2f, 0xcd, 0x2f, 0xc4, 0xcd, 0x01, 0x2f, 0xc4, 0xcd, 0x2f, 0xcd, 0x2f, 0xc4, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x01, 0x07, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x07, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x0e, 0x01, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x36, 0x02, 0x03, 0x29, 0x46, 0x5f, 0x37, 0x3e, 0x5b, 0x3a, 0x1c, 0x1c, 0x32, 0x42, 0x4c, 0x53, 0x28, 0x17, 0x25, 0x18, 0x21, 0x23, 0x0a, 0x17, 0x27, 0x0e, 0x0f, 0x20, 0x10, 0x33, 0x4f, 0x36, 0x1c, 0x8c, 0x41, 0x33, 0x11, 0x2c, 0x10, 0x06, 0x02, 0x0d, 0x1a, 0x28, 0x1b, 0x29, 0x36, 0xda, 0x3a, 0x58, 0x3a, 0x1e, 0x32, 0x53, 0x69, 0x38, 0x28, 0x64, 0x67, 0x61, 0x4c, 0x2e, 0x19, 0x19, 0x0e, 0x20, 0x1f, 0x1d, 0x0c, 0x1a, 0x3b, 0x20, 0x05, 0x05, 0x2a, 0x45, 0x59, 0x30, 0x35, 0x39, 0x0a, 0x0a, 0x04, 0x16, 0x07, 0x17, 0x33, 0x2c, 0x1c, 0x2e, 0x00, 0x01, 0x00, 0x0f, 0xff, 0xf3, 0x02, 0x0c, 0x02, 0xde, 0x00, 0x32, 0x00, 0x15, 0xb7, 0x19, 0x32, 0x11, 0x24, 0x0e, 0x34, 0x1e, 0x2b, 0x00, 0x2f, 0xcd, 0x10, 0xc4, 0x01, 0x2f, 0xc4, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x04, 0x07, 0x0e, 0x03, 0x07, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x3e, 0x01, 0x37, 0x2e, 0x01, 0x23, 0x22, 0x06, 0x07, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x1e, 0x01, 0x02, 0x0c, 0x0f, 0x17, 0x1d, 0x1c, 0x18, 0x07, 0x0d, 0x28, 0x2e, 0x31, 0x15, 0x15, 0x1d, 0x16, 0x1e, 0x1b, 0x25, 0x28, 0x0e, 0x1a, 0x34, 0x1a, 0x0e, 0x1f, 0x0e, 0x33, 0x6b, 0x32, 0x05, 0x0a, 0x17, 0x1d, 0x21, 0x35, 0x41, 0x3f, 0x36, 0x10, 0x11, 0x41, 0x45, 0x3a, 0x0a, 0x05, 0x01, 0x02, 0x94, 0x0e, 0x32, 0x3f, 0x45, 0x3f, 0x36, 0x0f, 0x1e, 0x5b, 0x5f, 0x53, 0x17, 0x17, 0x1c, 0x17, 0x1f, 0x56, 0x59, 0x54, 0x1e, 0x3b, 0x73, 0x3b, 0x02, 0x02, 0x0f, 0x0a, 0x01, 0x1c, 0x17, 0x18, 0x24, 0x19, 0x10, 0x0a, 0x03, 0x05, 0x0b, 0x13, 0x0f, 0x06, 0x0b, 0x00, 0x00, 0x03, 0x00, 0x0a, 0xff, 0xcb, 0x02, 0x4a, 0x02, 0xe0, 0x00, 0x25, 0x00, 0x39, 0x00, 0x4d, 0x00, 0x22, 0x40, 0x0e, 0x27, 0x1e, 0x30, 0x14, 0x44, 0x0a, 0x3a, 0x00, 0x35, 0x3f, 0x2a, 0x19, 0x49, 0x05, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x2e, 0x03, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x06, 0x07, 0x1e, 0x03, 0x03, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x17, 0x3e, 0x03, 0x13, 0x34, 0x2e, 0x02, 0x27, 0x0e, 0x03, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x02, 0x4a, 0x3c, 0x5d, 0x71, 0x36, 0x28, 0x5a, 0x4c, 0x32, 0x1a, 0x2d, 0x3b, 0x21, 0x19, 0x2f, 0x24, 0x16, 0x3b, 0x5a, 0x69, 0x2e, 0x23, 0x48, 0x3b, 0x26, 0x49, 0x36, 0x23, 0x3d, 0x2d, 0x19, 0xbf, 0x0f, 0x15, 0x17, 0x08, 0x0c, 0x26, 0x24, 0x1a, 0x12, 0x1b, 0x1f, 0x0e, 0x0a, 0x1e, 0x1d, 0x14, 0x1b, 0x16, 0x23, 0x2b, 0x15, 0x14, 0x2c, 0x25, 0x18, 0x1a, 0x24, 0x27, 0x0d, 0x14, 0x2f, 0x27, 0x1a, 0xb9, 0x3e, 0x5a, 0x3a, 0x1c, 0x17, 0x2f, 0x48, 0x30, 0x27, 0x45, 0x3b, 0x2e, 0x11, 0x08, 0x1e, 0x28, 0x32, 0x1c, 0x37, 0x51, 0x34, 0x19, 0x10, 0x24, 0x3a, 0x29, 0x40, 0x61, 0x1e, 0x09, 0x28, 0x37, 0x44, 0x01, 0x54, 0x0c, 0x0e, 0x09, 0x03, 0x06, 0x0e, 0x17, 0x10, 0x11, 0x19, 0x12, 0x09, 0x01, 0x06, 0x13, 0x19, 0x1b, 0xfe, 0x8f, 0x18, 0x27, 0x1c, 0x13, 0x04, 0x09, 0x1b, 0x24, 0x2b, 0x19, 0x12, 0x18, 0x0e, 0x06, 0x09, 0x15, 0x22, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x1a, 0xff, 0xe6, 0x02, 0x05, 0x02, 0xe0, 0x00, 0x22, 0x00, 0x30, 0x00, 0x1e, 0x40, 0x0c, 0x2b, 0x0a, 0x19, 0x12, 0x23, 0x00, 0x07, 0x32, 0x28, 0x1e, 0x2e, 0x14, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x10, 0xc4, 0x01, 0x2f, 0xdd, 0xc4, 0x2f, 0xc4, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x04, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x03, 0x37, 0x06, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x07, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0x02, 0x05, 0x1b, 0x2f, 0x3f, 0x4b, 0x51, 0x29, 0x16, 0x23, 0x07, 0x06, 0x16, 0x2e, 0x2d, 0x2a, 0x11, 0x21, 0x23, 0x32, 0x51, 0x38, 0x1e, 0x23, 0x41, 0x5b, 0x39, 0x3c, 0x5b, 0x3d, 0x1f, 0x85, 0x0d, 0x1a, 0x27, 0x1b, 0x36, 0x3f, 0x39, 0x33, 0x35, 0x3d, 0x01, 0xce, 0x28, 0x68, 0x6c, 0x68, 0x52, 0x32, 0x1b, 0x18, 0x0b, 0x0f, 0x08, 0x1c, 0x2f, 0x2f, 0x34, 0x22, 0x09, 0x1f, 0x3a, 0x51, 0x32, 0x38, 0x5e, 0x45, 0x27, 0x2b, 0x4b, 0x64, 0x26, 0x18, 0x2e, 0x24, 0x16, 0x43, 0x36, 0x34, 0x37, 0x2e, 0x00, 0x02, 0x00, 0x0a, 0xff, 0xf8, 0x00, 0xaf, 0x01, 0x6e, 0x00, 0x11, 0x00, 0x23, 0x00, 0x15, 0xb7, 0x12, 0x1c, 0x00, 0x0a, 0x1f, 0x17, 0x05, 0x0d, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x13, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x11, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0xaf, 0x0c, 0x13, 0x17, 0x0c, 0x0f, 0x23, 0x1d, 0x14, 0x2e, 0x18, 0x0f, 0x21, 0x1d, 0x12, 0x0c, 0x13, 0x17, 0x0c, 0x0f, 0x23, 0x1d, 0x14, 0x2e, 0x18, 0x0f, 0x21, 0x1d, 0x12, 0x01, 0x25, 0x0d, 0x15, 0x0e, 0x08, 0x0b, 0x13, 0x1b, 0x11, 0x1c, 0x1b, 0x0a, 0x13, 0x1b, 0xfe, 0xfa, 0x0d, 0x15, 0x0e, 0x08, 0x0b, 0x14, 0x1b, 0x11, 0x1b, 0x1b, 0x0a, 0x13, 0x1b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0xff, 0xa1, 0x00, 0xaf, 0x01, 0x6e, 0x00, 0x11, 0x00, 0x29, 0x00, 0x15, 0xb7, 0x12, 0x24, 0x00, 0x0a, 0x27, 0x17, 0x05, 0x0e, 0x00, 0x2f, 0xcd, 0x2f, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x13, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x11, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x35, 0x34, 0x3e, 0x02, 0x27, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0xaf, 0x0c, 0x13, 0x17, 0x0c, 0x0f, 0x23, 0x1d, 0x14, 0x2e, 0x18, 0x0f, 0x21, 0x1d, 0x12, 0x10, 0x1a, 0x1f, 0x0f, 0x14, 0x0a, 0x0c, 0x0a, 0x01, 0x06, 0x11, 0x08, 0x17, 0x20, 0x2a, 0x1f, 0x24, 0x36, 0x01, 0x25, 0x0d, 0x15, 0x0e, 0x08, 0x0b, 0x13, 0x1b, 0x11, 0x1c, 0x1b, 0x0a, 0x13, 0x1b, 0xfe, 0xff, 0x10, 0x32, 0x30, 0x22, 0x14, 0x0c, 0x16, 0x15, 0x15, 0x0a, 0x05, 0x05, 0x24, 0x16, 0x20, 0x27, 0x26, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x1f, 0x01, 0x2d, 0x01, 0xe1, 0x00, 0x21, 0x00, 0x11, 0xb5, 0x00, 0x14, 0x1b, 0x0a, 0x11, 0x03, 0x00, 0x2f, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xc4, 0x31, 0x30, 0x25, 0x14, 0x06, 0x23, 0x22, 0x2e, 0x04, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x04, 0x07, 0x1e, 0x05, 0x01, 0x2d, 0x08, 0x0e, 0x10, 0x34, 0x3c, 0x3d, 0x31, 0x1f, 0x1f, 0x31, 0x3c, 0x3a, 0x32, 0x0e, 0x0e, 0x0d, 0x17, 0x25, 0x2d, 0x2c, 0x25, 0x0a, 0x0c, 0x27, 0x2c, 0x2d, 0x23, 0x17, 0x3b, 0x0b, 0x11, 0x16, 0x25, 0x2e, 0x30, 0x2d, 0x11, 0x0e, 0x2e, 0x34, 0x35, 0x2b, 0x1b, 0x12, 0x0b, 0x0c, 0x24, 0x28, 0x2b, 0x27, 0x20, 0x09, 0x08, 0x1a, 0x1f, 0x22, 0x23, 0x22, 0x00, 0x02, 0x00, 0x1f, 0x00, 0x94, 0x01, 0xcd, 0x01, 0x79, 0x00, 0x19, 0x00, 0x33, 0x00, 0x15, 0xb7, 0x00, 0x33, 0x0e, 0x29, 0x20, 0x2f, 0x07, 0x15, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xc4, 0x2f, 0xc6, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x04, 0x23, 0x2a, 0x01, 0x2e, 0x03, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x14, 0x0e, 0x04, 0x23, 0x2a, 0x01, 0x2e, 0x03, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x02, 0x01, 0xc2, 0x1e, 0x2d, 0x37, 0x33, 0x28, 0x08, 0x07, 0x21, 0x2a, 0x2e, 0x25, 0x19, 0x1b, 0x29, 0x34, 0x31, 0x29, 0x0b, 0x0f, 0x41, 0x43, 0x33, 0x0b, 0x1e, 0x2d, 0x37, 0x33, 0x28, 0x08, 0x07, 0x21, 0x2a, 0x2e, 0x25, 0x19, 0x1b, 0x29, 0x34, 0x31, 0x29, 0x0b, 0x0f, 0x41, 0x43, 0x33, 0x01, 0x4a, 0x09, 0x0b, 0x08, 0x05, 0x02, 0x01, 0x02, 0x04, 0x08, 0x0c, 0x0a, 0x0b, 0x10, 0x0a, 0x06, 0x03, 0x01, 0x05, 0x0b, 0x12, 0x9f, 0x08, 0x0c, 0x08, 0x05, 0x02, 0x01, 0x02, 0x04, 0x08, 0x0d, 0x09, 0x0b, 0x10, 0x0a, 0x06, 0x03, 0x01, 0x05, 0x0b, 0x12, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x14, 0x00, 0x17, 0x01, 0x38, 0x01, 0xda, 0x00, 0x1d, 0x00, 0x11, 0xb5, 0x14, 0x0a, 0x0f, 0x00, 0x17, 0x07, 0x00, 0x2f, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x04, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x2e, 0x03, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x04, 0x01, 0x38, 0x1f, 0x30, 0x3c, 0x3a, 0x33, 0x0e, 0x0d, 0x0c, 0x31, 0x41, 0x40, 0x10, 0x12, 0x43, 0x41, 0x31, 0x09, 0x0e, 0x10, 0x34, 0x3c, 0x3d, 0x31, 0x1f, 0x01, 0x03, 0x0e, 0x2e, 0x35, 0x35, 0x2b, 0x1b, 0x12, 0x0b, 0x12, 0x3c, 0x3f, 0x38, 0x0e, 0x0c, 0x2d, 0x33, 0x34, 0x15, 0x0c, 0x12, 0x16, 0x25, 0x2e, 0x30, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x14, 0xff, 0xf3, 0x01, 0xdf, 0x02, 0xef, 0x00, 0x31, 0x00, 0x41, 0x00, 0x20, 0x40, 0x0d, 0x28, 0x42, 0x3a, 0x32, 0x13, 0x07, 0x1b, 0x00, 0x0c, 0x3f, 0x37, 0x20, 0x2d, 0x00, 0x2f, 0xcd, 0x2f, 0xdd, 0xc6, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x10, 0xc6, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x07, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x27, 0x2e, 0x02, 0x34, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x03, 0x35, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x03, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x01, 0xdf, 0x21, 0x31, 0x3b, 0x19, 0x06, 0x01, 0x0b, 0x19, 0x17, 0x28, 0x0e, 0x05, 0x06, 0x03, 0x03, 0x08, 0x09, 0x2a, 0x2d, 0x22, 0x10, 0x19, 0x1f, 0x10, 0x26, 0x2c, 0x1f, 0x1b, 0x15, 0x18, 0x27, 0x2e, 0x44, 0x4c, 0x1e, 0x28, 0x55, 0x45, 0x2d, 0x94, 0x11, 0x19, 0x1f, 0x0e, 0x17, 0x27, 0x11, 0x1a, 0x1f, 0x0e, 0x17, 0x26, 0x02, 0x1a, 0x20, 0x37, 0x2f, 0x23, 0x0a, 0x30, 0x33, 0x11, 0x2a, 0x25, 0x1a, 0x28, 0x0f, 0x33, 0x37, 0x34, 0x11, 0x0e, 0x26, 0x0c, 0x0d, 0x19, 0x1c, 0x22, 0x17, 0x11, 0x1c, 0x13, 0x0b, 0x19, 0x1d, 0x19, 0x22, 0x18, 0x27, 0x37, 0x21, 0x0f, 0x23, 0x3a, 0x4e, 0xfd, 0xf0, 0x11, 0x18, 0x10, 0x08, 0x16, 0x19, 0x10, 0x19, 0x12, 0x09, 0x18, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0xff, 0xfe, 0x02, 0xc5, 0x02, 0xe4, 0x00, 0x5a, 0x00, 0x72, 0x00, 0x2c, 0x40, 0x13, 0x35, 0x51, 0x70, 0x1d, 0x66, 0x12, 0x42, 0x2b, 0x00, 0x30, 0x56, 0x3a, 0x49, 0x5e, 0x17, 0x6b, 0x0d, 0x26, 0x05, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0xc4, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x27, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x17, 0x1e, 0x01, 0x15, 0x14, 0x06, 0x07, 0x0e, 0x01, 0x15, 0x14, 0x16, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x04, 0x23, 0x22, 0x26, 0x27, 0x2e, 0x03, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x05, 0x26, 0x22, 0x23, 0x22, 0x0e, 0x02, 0x07, 0x0e, 0x01, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x37, 0x3e, 0x01, 0x02, 0xc5, 0x18, 0x30, 0x4a, 0x32, 0x26, 0x37, 0x05, 0x01, 0x13, 0x1d, 0x24, 0x12, 0x20, 0x33, 0x24, 0x14, 0x24, 0x3d, 0x52, 0x2f, 0x15, 0x33, 0x12, 0x0e, 0x05, 0x0a, 0x06, 0x05, 0x09, 0x0c, 0x14, 0x19, 0x26, 0x19, 0x0c, 0x26, 0x40, 0x55, 0x30, 0x3c, 0x5f, 0x42, 0x24, 0x24, 0x43, 0x60, 0x3c, 0x1f, 0x39, 0x35, 0x31, 0x18, 0x0d, 0x21, 0x22, 0x34, 0x40, 0x3e, 0x32, 0x0d, 0x1e, 0x45, 0x1d, 0x38, 0x52, 0x36, 0x1b, 0x37, 0x62, 0x86, 0x4f, 0x48, 0x78, 0x57, 0x31, 0xfe, 0xe7, 0x05, 0x0b, 0x05, 0x12, 0x26, 0x22, 0x1c, 0x08, 0x09, 0x0c, 0x08, 0x0f, 0x15, 0x0e, 0x0c, 0x1c, 0x19, 0x12, 0x02, 0x08, 0x0b, 0x01, 0xa1, 0x2c, 0x5b, 0x49, 0x2f, 0x36, 0x25, 0x14, 0x1e, 0x13, 0x0a, 0x1c, 0x2e, 0x3a, 0x1d, 0x2e, 0x54, 0x41, 0x27, 0x09, 0x09, 0x07, 0x23, 0x0c, 0x1d, 0x3c, 0x1d, 0x15, 0x29, 0x15, 0x11, 0x1b, 0x29, 0x3a, 0x3e, 0x15, 0x32, 0x4b, 0x31, 0x19, 0x2b, 0x4a, 0x65, 0x39, 0x3b, 0x62, 0x47, 0x28, 0x0c, 0x0f, 0x0c, 0x0c, 0x11, 0x13, 0x1e, 0x17, 0x0f, 0x0a, 0x05, 0x07, 0x0b, 0x15, 0x47, 0x5b, 0x6c, 0x3a, 0x4c, 0x88, 0x67, 0x3c, 0x2e, 0x55, 0x77, 0x10, 0x01, 0x08, 0x10, 0x18, 0x10, 0x12, 0x26, 0x13, 0x0c, 0x1b, 0x16, 0x0e, 0x10, 0x16, 0x1a, 0x0a, 0x23, 0x45, 0x00, 0x02, 0x00, 0x1a, 0xff, 0xf2, 0x02, 0x17, 0x02, 0xe8, 0x00, 0x29, 0x00, 0x38, 0x00, 0x1e, 0x40, 0x0c, 0x36, 0x0c, 0x16, 0x38, 0x0a, 0x00, 0x2f, 0x20, 0x05, 0x11, 0x37, 0x0b, 0x00, 0x2f, 0xcd, 0x2f, 0xc4, 0x2f, 0xcd, 0x01, 0x2f, 0xdd, 0xc5, 0x2f, 0xdd, 0xc5, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x06, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x05, 0x33, 0x32, 0x1e, 0x04, 0x17, 0x16, 0x16, 0x27, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x04, 0x07, 0x36, 0x37, 0x02, 0x17, 0x07, 0x14, 0x22, 0x1c, 0x25, 0x25, 0x10, 0x03, 0x01, 0x48, 0x46, 0x02, 0x0d, 0x1b, 0x2b, 0x1f, 0x18, 0x1b, 0x0e, 0x03, 0x12, 0x0c, 0x06, 0x14, 0x1d, 0x27, 0x32, 0x40, 0x27, 0x26, 0x38, 0x2a, 0x1c, 0x13, 0x0d, 0x05, 0x0d, 0x12, 0xc1, 0x03, 0x0a, 0x15, 0x12, 0x0a, 0x12, 0x0e, 0x0b, 0x08, 0x04, 0x01, 0x3c, 0x3a, 0x94, 0x14, 0x38, 0x33, 0x23, 0x36, 0x4b, 0x4e, 0x17, 0x0c, 0x09, 0x17, 0x44, 0x3f, 0x2e, 0x23, 0x30, 0x33, 0x11, 0x39, 0x6f, 0x37, 0x1d, 0x4e, 0x53, 0x51, 0x40, 0x28, 0x22, 0x38, 0x47, 0x49, 0x46, 0x1b, 0x41, 0x85, 0xb0, 0x0c, 0x37, 0x37, 0x2b, 0x1b, 0x29, 0x32, 0x2e, 0x25, 0x08, 0x05, 0x0a, 0x00, 0x03, 0x00, 0x1f, 0xff, 0xf4, 0x01, 0xd8, 0x02, 0xf2, 0x00, 0x2a, 0x00, 0x3f, 0x00, 0x54, 0x00, 0x20, 0x40, 0x0d, 0x38, 0x4a, 0x15, 0x40, 0x08, 0x2b, 0x00, 0x43, 0x3c, 0x2f, 0x26, 0x51, 0x0d, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xdd, 0xc0, 0x31, 0x30, 0x01, 0x14, 0x06, 0x07, 0x1e, 0x03, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x27, 0x2e, 0x04, 0x34, 0x35, 0x3c, 0x01, 0x37, 0x34, 0x3e, 0x04, 0x37, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x07, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x0e, 0x03, 0x15, 0x1c, 0x01, 0x1e, 0x01, 0x33, 0x32, 0x3e, 0x02, 0x03, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x0e, 0x03, 0x15, 0x1c, 0x01, 0x1e, 0x01, 0x33, 0x32, 0x3e, 0x02, 0x01, 0xd8, 0x44, 0x39, 0x1e, 0x2c, 0x1d, 0x0f, 0x35, 0x54, 0x67, 0x33, 0x1c, 0x38, 0x19, 0x09, 0x0c, 0x07, 0x04, 0x02, 0x02, 0x01, 0x01, 0x03, 0x05, 0x09, 0x06, 0x17, 0x38, 0x3c, 0x3c, 0x1b, 0x25, 0x45, 0x33, 0x1f, 0xa6, 0x15, 0x11, 0x0e, 0x1f, 0x0b, 0x03, 0x05, 0x03, 0x01, 0x01, 0x02, 0x02, 0x11, 0x24, 0x1d, 0x13, 0x04, 0x18, 0x0f, 0x0e, 0x1f, 0x0a, 0x03, 0x03, 0x01, 0x01, 0x01, 0x03, 0x02, 0x0e, 0x22, 0x1d, 0x13, 0x02, 0x4f, 0x45, 0x71, 0x26, 0x06, 0x1d, 0x2a, 0x35, 0x1d, 0x39, 0x55, 0x37, 0x1b, 0x08, 0x0a, 0x03, 0x2b, 0x3e, 0x48, 0x42, 0x32, 0x0a, 0x23, 0x47, 0x23, 0x09, 0x26, 0x2f, 0x34, 0x2d, 0x20, 0x04, 0x0f, 0x1b, 0x14, 0x0c, 0x15, 0x2a, 0x3d, 0x5c, 0x11, 0x10, 0x0c, 0x0a, 0x03, 0x1c, 0x23, 0x1f, 0x05, 0x02, 0x09, 0x0a, 0x08, 0x19, 0x25, 0x2a, 0xfe, 0xef, 0x11, 0x0e, 0x0d, 0x09, 0x02, 0x10, 0x13, 0x11, 0x03, 0x02, 0x0c, 0x0d, 0x0b, 0x10, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0xff, 0xcf, 0x01, 0xd8, 0x02, 0xfa, 0x00, 0x35, 0x00, 0x1c, 0x40, 0x0b, 0x11, 0x2a, 0x09, 0x00, 0x20, 0x0c, 0x31, 0x18, 0x25, 0x1d, 0x05, 0x00, 0x2f, 0xc6, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xd4, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x04, 0x23, 0x22, 0x0e, 0x04, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x02, 0x01, 0xd8, 0x09, 0x14, 0x20, 0x17, 0x23, 0x22, 0x0e, 0x01, 0x02, 0x0b, 0x12, 0x14, 0x1e, 0x16, 0x0f, 0x09, 0x04, 0x03, 0x10, 0x20, 0x1e, 0x14, 0x26, 0x26, 0x27, 0x14, 0x17, 0x1e, 0x28, 0x3b, 0x45, 0x1c, 0x48, 0x64, 0x3e, 0x1b, 0x10, 0x20, 0x31, 0x42, 0x53, 0x32, 0x31, 0x42, 0x28, 0x10, 0x01, 0xfd, 0x13, 0x2a, 0x24, 0x18, 0x19, 0x26, 0x2b, 0x26, 0x19, 0x1d, 0x2e, 0x3a, 0x39, 0x33, 0x10, 0x15, 0x3a, 0x35, 0x25, 0x0a, 0x0d, 0x0a, 0x25, 0x17, 0x20, 0x37, 0x2a, 0x18, 0x41, 0x67, 0x7f, 0x3f, 0x2a, 0x64, 0x65, 0x5e, 0x48, 0x2c, 0x31, 0x4b, 0x59, 0x00, 0x02, 0x00, 0x1f, 0xff, 0xfe, 0x02, 0x21, 0x02, 0xed, 0x00, 0x20, 0x00, 0x38, 0x00, 0x15, 0xb7, 0x2a, 0x0e, 0x22, 0x00, 0x26, 0x1c, 0x33, 0x06, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x2b, 0x01, 0x22, 0x2e, 0x03, 0x34, 0x35, 0x34, 0x36, 0x37, 0x34, 0x3e, 0x04, 0x37, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x07, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x07, 0x0e, 0x05, 0x15, 0x1c, 0x01, 0x1e, 0x01, 0x33, 0x32, 0x3e, 0x02, 0x02, 0x21, 0x48, 0x79, 0xa1, 0x59, 0x02, 0x12, 0x17, 0x10, 0x08, 0x04, 0x02, 0x02, 0x03, 0x04, 0x06, 0x07, 0x07, 0x05, 0x0d, 0x36, 0x3f, 0x41, 0x18, 0x42, 0x61, 0x41, 0x1f, 0xa8, 0x10, 0x1d, 0x29, 0x19, 0x15, 0x16, 0x05, 0x08, 0x05, 0x04, 0x01, 0x01, 0x03, 0x04, 0x05, 0x1e, 0x3b, 0x30, 0x1d, 0x01, 0xc2, 0x58, 0xa3, 0x7e, 0x4b, 0x21, 0x32, 0x3e, 0x3b, 0x2f, 0x0c, 0x22, 0x43, 0x22, 0x0b, 0x2b, 0x36, 0x3b, 0x33, 0x27, 0x07, 0x16, 0x22, 0x16, 0x0b, 0x31, 0x53, 0x6c, 0x58, 0x16, 0x2e, 0x26, 0x17, 0x0a, 0x03, 0x1f, 0x2c, 0x34, 0x2f, 0x24, 0x06, 0x0a, 0x27, 0x26, 0x1c, 0x2f, 0x44, 0x4a, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1a, 0xff, 0xf3, 0x01, 0xd2, 0x03, 0x00, 0x00, 0x4b, 0x00, 0x1e, 0x40, 0x0c, 0x23, 0x34, 0x4b, 0x2d, 0x3e, 0x13, 0x3b, 0x32, 0x2a, 0x1f, 0x47, 0x08, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xdd, 0xc4, 0x2f, 0xd6, 0xc4, 0x31, 0x30, 0x25, 0x14, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x2e, 0x05, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x3e, 0x05, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x06, 0x07, 0x0e, 0x03, 0x07, 0x0e, 0x01, 0x07, 0x3e, 0x01, 0x33, 0x32, 0x15, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x01, 0x07, 0x0e, 0x01, 0x15, 0x14, 0x16, 0x17, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x01, 0xd2, 0x0a, 0x0a, 0x4a, 0x5a, 0x54, 0x14, 0x0e, 0x26, 0x26, 0x1f, 0x07, 0x04, 0x07, 0x05, 0x04, 0x03, 0x01, 0x05, 0x0e, 0x1b, 0x17, 0x07, 0x2a, 0x39, 0x42, 0x3d, 0x32, 0x0d, 0x0f, 0x1b, 0x13, 0x0b, 0x07, 0x07, 0x0a, 0x40, 0x4b, 0x45, 0x0e, 0x04, 0x09, 0x02, 0x1f, 0x4e, 0x23, 0x47, 0x0d, 0x15, 0x1b, 0x0d, 0x20, 0x46, 0x23, 0x02, 0x04, 0x04, 0x02, 0x0c, 0x35, 0x3a, 0x36, 0x0d, 0x0f, 0x1a, 0x12, 0x0b, 0x9d, 0x13, 0x12, 0x11, 0x2e, 0x29, 0x1d, 0x0d, 0x14, 0x1a, 0x0c, 0x07, 0x2a, 0x38, 0x3f, 0x39, 0x2c, 0x0a, 0x25, 0x60, 0x61, 0x59, 0x1f, 0x09, 0x14, 0x12, 0x10, 0x0b, 0x07, 0x0d, 0x16, 0x1b, 0x0f, 0x0d, 0x12, 0x0b, 0x0d, 0x24, 0x23, 0x1c, 0x06, 0x17, 0x2f, 0x18, 0x10, 0x1c, 0x46, 0x11, 0x1a, 0x14, 0x0f, 0x07, 0x11, 0x19, 0x0c, 0x08, 0x13, 0x09, 0x0e, 0x1c, 0x0e, 0x04, 0x12, 0x12, 0x0d, 0x0d, 0x15, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1f, 0xff, 0xfb, 0x01, 0xb6, 0x03, 0x00, 0x00, 0x32, 0x00, 0x1c, 0x40, 0x0b, 0x0e, 0x32, 0x08, 0x13, 0x20, 0x1b, 0x34, 0x05, 0x2e, 0x13, 0x0b, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x10, 0xc4, 0x01, 0x2f, 0xdd, 0xc5, 0x2f, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x07, 0x14, 0x06, 0x07, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x07, 0x14, 0x06, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x04, 0x35, 0x34, 0x3e, 0x04, 0x37, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x01, 0xb6, 0x34, 0x4b, 0x52, 0x1e, 0x02, 0x02, 0x20, 0x50, 0x24, 0x1d, 0x25, 0x2f, 0x42, 0x48, 0x19, 0x02, 0x02, 0x01, 0x05, 0x0f, 0x1c, 0x16, 0x15, 0x1e, 0x15, 0x0d, 0x07, 0x01, 0x01, 0x01, 0x03, 0x04, 0x07, 0x05, 0x0b, 0x53, 0x66, 0x61, 0x1a, 0x0c, 0x17, 0x14, 0x0c, 0x02, 0xd2, 0x26, 0x3e, 0x31, 0x24, 0x0c, 0x15, 0x2c, 0x16, 0x10, 0x1c, 0x18, 0x1e, 0x21, 0x34, 0x28, 0x1c, 0x08, 0x21, 0x41, 0x20, 0x10, 0x30, 0x2d, 0x21, 0x29, 0x40, 0x4f, 0x4c, 0x40, 0x11, 0x0d, 0x33, 0x3e, 0x44, 0x3d, 0x2f, 0x0b, 0x16, 0x2b, 0x21, 0x15, 0x03, 0x0a, 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0xff, 0xdf, 0x02, 0x2f, 0x02, 0xf8, 0x00, 0x47, 0x00, 0x22, 0x40, 0x0e, 0x21, 0x19, 0x2c, 0x0c, 0x3b, 0x36, 0x45, 0x00, 0x40, 0x1e, 0x27, 0x13, 0x33, 0x05, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xc6, 0x01, 0x2f, 0xcd, 0xdd, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x25, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x04, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x02, 0x1d, 0x01, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x0e, 0x04, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x36, 0x37, 0x2e, 0x03, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x06, 0x01, 0xde, 0x09, 0x27, 0x3d, 0x54, 0x36, 0x28, 0x40, 0x34, 0x26, 0x19, 0x0c, 0x11, 0x22, 0x34, 0x47, 0x59, 0x37, 0x23, 0x3c, 0x2c, 0x19, 0x03, 0x10, 0x20, 0x1d, 0x23, 0x24, 0x02, 0x0e, 0x16, 0x19, 0x28, 0x1e, 0x16, 0x0e, 0x06, 0x04, 0x0d, 0x1a, 0x15, 0x24, 0x2c, 0x08, 0x0e, 0x1b, 0x17, 0x0e, 0x2a, 0x39, 0x3c, 0x12, 0x0d, 0x32, 0x31, 0x24, 0x29, 0xf0, 0x2d, 0x61, 0x50, 0x33, 0x20, 0x36, 0x46, 0x4b, 0x4a, 0x20, 0x2d, 0x67, 0x65, 0x5d, 0x47, 0x2b, 0x1b, 0x2d, 0x3e, 0x22, 0x09, 0x12, 0x35, 0x30, 0x23, 0x20, 0x25, 0x0e, 0x1c, 0x0e, 0x15, 0x17, 0x20, 0x34, 0x42, 0x43, 0x3e, 0x16, 0x12, 0x2f, 0x2b, 0x1e, 0x2d, 0x23, 0x02, 0x09, 0x11, 0x19, 0x11, 0x1f, 0x23, 0x12, 0x05, 0x04, 0x0d, 0x18, 0x13, 0x26, 0x37, 0x00, 0x01, 0x00, 0x1f, 0xff, 0xe6, 0x01, 0xfe, 0x02, 0xf0, 0x00, 0x3e, 0x00, 0x1e, 0x40, 0x0c, 0x2f, 0x13, 0x1d, 0x12, 0x32, 0x00, 0x13, 0x30, 0x39, 0x28, 0x0a, 0x18, 0x00, 0x2f, 0xc4, 0x2f, 0xc4, 0x2f, 0xcd, 0x01, 0x2f, 0xdd, 0xc4, 0x2f, 0xdd, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x06, 0x07, 0x0e, 0x05, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x37, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x37, 0x36, 0x26, 0x37, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x01, 0x14, 0x15, 0x14, 0x06, 0x07, 0x37, 0x3e, 0x01, 0x37, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x01, 0xfe, 0x08, 0x06, 0x01, 0x02, 0x06, 0x0a, 0x15, 0x21, 0x18, 0x15, 0x21, 0x16, 0x0c, 0x04, 0x04, 0x63, 0x03, 0x07, 0x15, 0x2a, 0x25, 0x17, 0x1e, 0x12, 0x08, 0x0a, 0x02, 0x02, 0x01, 0x02, 0x01, 0x01, 0x0d, 0x1f, 0x1f, 0x2b, 0x2c, 0x12, 0x04, 0x02, 0x6b, 0x01, 0x02, 0x03, 0x01, 0x02, 0x0e, 0x21, 0x21, 0x1c, 0x23, 0x15, 0x08, 0x02, 0x3c, 0x53, 0xa7, 0x53, 0x0f, 0x33, 0x3b, 0x3c, 0x31, 0x1f, 0x12, 0x1d, 0x25, 0x14, 0x21, 0x43, 0x21, 0x0a, 0x1a, 0x49, 0x43, 0x30, 0x15, 0x21, 0x28, 0x12, 0x3c, 0x77, 0x3c, 0x3f, 0x7f, 0x40, 0x15, 0x38, 0x31, 0x22, 0x2d, 0x43, 0x4b, 0x1e, 0x28, 0x4d, 0x27, 0x10, 0x31, 0x60, 0x30, 0x17, 0x34, 0x2c, 0x1d, 0x20, 0x2e, 0x34, 0x15, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xf1, 0xff, 0xec, 0x01, 0x78, 0x02, 0xe6, 0x00, 0x36, 0x00, 0x15, 0xb7, 0x2d, 0x1a, 0x00, 0x0e, 0x25, 0x05, 0x32, 0x16, 0x00, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xc4, 0x2f, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x01, 0x07, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x04, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x3e, 0x01, 0x37, 0x3e, 0x01, 0x37, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x01, 0x78, 0x11, 0x1c, 0x22, 0x10, 0x02, 0x0d, 0x0e, 0x06, 0x10, 0x1f, 0x19, 0x0f, 0x1d, 0x2f, 0x3a, 0x3a, 0x34, 0x10, 0x0c, 0x23, 0x1f, 0x16, 0x11, 0x1c, 0x23, 0x12, 0x07, 0x0c, 0x02, 0x02, 0x04, 0x02, 0x07, 0x0c, 0x05, 0x0e, 0x20, 0x1c, 0x13, 0x39, 0x4f, 0x52, 0x19, 0x0e, 0x2e, 0x2d, 0x21, 0x02, 0xa7, 0x13, 0x1e, 0x15, 0x0e, 0x03, 0x71, 0xd2, 0x70, 0x07, 0x11, 0x19, 0x12, 0x17, 0x22, 0x18, 0x10, 0x09, 0x04, 0x02, 0x0a, 0x14, 0x11, 0x15, 0x21, 0x1a, 0x10, 0x04, 0x37, 0x6d, 0x38, 0x39, 0x6f, 0x38, 0x01, 0x01, 0x06, 0x0f, 0x16, 0x11, 0x22, 0x2c, 0x18, 0x09, 0x04, 0x0e, 0x18, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xe6, 0xff, 0xe9, 0x01, 0x96, 0x02, 0xde, 0x00, 0x2e, 0x00, 0x15, 0xb7, 0x16, 0x0c, 0x1f, 0x00, 0x12, 0x27, 0x19, 0x08, 0x00, 0x2f, 0xcd, 0x2f, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x15, 0x0e, 0x05, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x04, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x34, 0x26, 0x27, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x17, 0x1e, 0x03, 0x01, 0x96, 0x01, 0x06, 0x0e, 0x1c, 0x30, 0x46, 0x32, 0x36, 0x51, 0x36, 0x1a, 0x09, 0x16, 0x23, 0x1b, 0x1d, 0x1d, 0x0d, 0x04, 0x06, 0x0f, 0x12, 0x15, 0x18, 0x0b, 0x03, 0x13, 0x0e, 0x07, 0x10, 0x24, 0x23, 0x1a, 0x1e, 0x0f, 0x17, 0x1f, 0x12, 0x08, 0x01, 0x74, 0x19, 0x25, 0x54, 0x52, 0x4b, 0x3a, 0x22, 0x2e, 0x4b, 0x5d, 0x30, 0x15, 0x34, 0x2d, 0x1f, 0x20, 0x2f, 0x37, 0x2f, 0x20, 0x24, 0x31, 0x32, 0x0e, 0x38, 0x6b, 0x37, 0x1c, 0x3a, 0x1d, 0x22, 0x2b, 0x15, 0x14, 0x1f, 0x50, 0x56, 0x57, 0x00, 0x00, 0x01, 0x00, 0x1a, 0xff, 0xed, 0x02, 0x14, 0x02, 0xf5, 0x00, 0x43, 0x00, 0x1c, 0x40, 0x0b, 0x00, 0x37, 0x2c, 0x0c, 0x1a, 0x0c, 0x2c, 0x34, 0x25, 0x03, 0x14, 0x00, 0x2f, 0xc4, 0x2f, 0xc4, 0x2f, 0xcd, 0x01, 0x2f, 0xdd, 0xc5, 0x2f, 0xc4, 0x31, 0x30, 0x25, 0x14, 0x06, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x2e, 0x01, 0x27, 0x07, 0x16, 0x06, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x02, 0x3d, 0x01, 0x34, 0x36, 0x37, 0x3e, 0x01, 0x37, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x01, 0x06, 0x15, 0x14, 0x07, 0x3e, 0x01, 0x37, 0x3e, 0x03, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x07, 0x1e, 0x01, 0x17, 0x1e, 0x03, 0x02, 0x14, 0x1c, 0x1d, 0x17, 0x27, 0x21, 0x19, 0x08, 0x15, 0x29, 0x14, 0x3c, 0x01, 0x08, 0x02, 0x02, 0x09, 0x14, 0x22, 0x19, 0x17, 0x1e, 0x13, 0x08, 0x0d, 0x02, 0x02, 0x06, 0x05, 0x01, 0x0a, 0x14, 0x1d, 0x14, 0x1f, 0x1f, 0x0c, 0x01, 0x03, 0x1d, 0x37, 0x15, 0x0d, 0x22, 0x28, 0x30, 0x1b, 0x1d, 0x1b, 0x19, 0x2a, 0x35, 0x1b, 0x1c, 0x32, 0x19, 0x09, 0x11, 0x0e, 0x09, 0x2c, 0x1c, 0x23, 0x1c, 0x29, 0x2e, 0x11, 0x2a, 0x54, 0x2b, 0x25, 0x1d, 0x3a, 0x1d, 0x14, 0x2f, 0x29, 0x1c, 0x13, 0x1e, 0x26, 0x14, 0x08, 0x3b, 0x77, 0x3c, 0x4f, 0x9e, 0x4f, 0x12, 0x22, 0x1b, 0x10, 0x2c, 0x3e, 0x42, 0x16, 0x3f, 0x3f, 0x18, 0x3e, 0x20, 0x13, 0x43, 0x3f, 0x2f, 0x21, 0x1b, 0x28, 0x54, 0x51, 0x49, 0x1b, 0x2f, 0x5f, 0x30, 0x10, 0x26, 0x28, 0x28, 0x00, 0x01, 0x00, 0x1f, 0xff, 0xe9, 0x01, 0xfb, 0x02, 0xe6, 0x00, 0x2c, 0x00, 0x15, 0xb7, 0x00, 0x2e, 0x24, 0x10, 0x1a, 0x2d, 0x28, 0x08, 0x00, 0x2f, 0xcd, 0x10, 0xc4, 0x01, 0x2f, 0xcd, 0x10, 0xc4, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x04, 0x23, 0x22, 0x26, 0x27, 0x2e, 0x05, 0x35, 0x34, 0x3e, 0x04, 0x37, 0x36, 0x33, 0x32, 0x1e, 0x03, 0x14, 0x15, 0x14, 0x06, 0x1d, 0x01, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x01, 0xfb, 0x29, 0x41, 0x50, 0x4e, 0x45, 0x14, 0x13, 0x2b, 0x0e, 0x08, 0x0c, 0x0b, 0x08, 0x05, 0x03, 0x03, 0x06, 0x0a, 0x0d, 0x13, 0x0b, 0x13, 0x1d, 0x14, 0x1c, 0x11, 0x09, 0x04, 0x07, 0x2d, 0x6a, 0x30, 0x11, 0x23, 0x1b, 0x11, 0x8a, 0x19, 0x2c, 0x24, 0x1b, 0x13, 0x0a, 0x07, 0x0c, 0x06, 0x2a, 0x3a, 0x43, 0x40, 0x36, 0x0f, 0x19, 0x47, 0x51, 0x54, 0x4b, 0x3c, 0x11, 0x1b, 0x1b, 0x2b, 0x35, 0x34, 0x2c, 0x0d, 0x4e, 0x99, 0x4e, 0x27, 0x0e, 0x19, 0x04, 0x0d, 0x19, 0x00, 0x01, 0x00, 0x24, 0xff, 0xe3, 0x02, 0xd2, 0x02, 0xe6, 0x00, 0x4b, 0x00, 0x22, 0x40, 0x0e, 0x0a, 0x48, 0x1f, 0x2b, 0x17, 0x0f, 0x0c, 0x40, 0x1a, 0x32, 0x05, 0x24, 0x39, 0x13, 0x00, 0x2f, 0xcd, 0x2f, 0xc4, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x25, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x04, 0x27, 0x0e, 0x05, 0x23, 0x22, 0x2e, 0x04, 0x27, 0x14, 0x06, 0x15, 0x14, 0x0e, 0x04, 0x07, 0x2e, 0x05, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x04, 0x17, 0x3e, 0x05, 0x33, 0x32, 0x1e, 0x04, 0x15, 0x1c, 0x01, 0x0e, 0x01, 0x02, 0xca, 0x03, 0x0b, 0x10, 0x19, 0x10, 0x10, 0x1a, 0x17, 0x13, 0x0f, 0x0a, 0x03, 0x06, 0x10, 0x16, 0x1a, 0x1e, 0x22, 0x13, 0x11, 0x22, 0x20, 0x1c, 0x18, 0x12, 0x05, 0x01, 0x01, 0x06, 0x0c, 0x17, 0x22, 0x19, 0x14, 0x1b, 0x12, 0x0a, 0x06, 0x01, 0x07, 0x10, 0x1a, 0x25, 0x31, 0x20, 0x0f, 0x22, 0x22, 0x20, 0x1d, 0x16, 0x07, 0x08, 0x18, 0x1d, 0x23, 0x26, 0x27, 0x14, 0x23, 0x32, 0x22, 0x14, 0x0b, 0x03, 0x01, 0x04, 0x6d, 0x1a, 0x32, 0x27, 0x17, 0x31, 0x51, 0x66, 0x69, 0x64, 0x25, 0x26, 0x5e, 0x61, 0x5d, 0x49, 0x2c, 0x2e, 0x4b, 0x5c, 0x5d, 0x53, 0x1c, 0x15, 0x33, 0x0b, 0x05, 0x38, 0x4e, 0x59, 0x4c, 0x34, 0x02, 0x09, 0x2b, 0x3a, 0x42, 0x3f, 0x36, 0x11, 0x1e, 0x5b, 0x64, 0x64, 0x4f, 0x32, 0x22, 0x37, 0x44, 0x45, 0x3f, 0x16, 0x18, 0x40, 0x45, 0x43, 0x35, 0x21, 0x34, 0x53, 0x67, 0x65, 0x58, 0x1b, 0x0b, 0x26, 0x30, 0x36, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1f, 0xff, 0xf9, 0x02, 0x64, 0x02, 0xf1, 0x00, 0x4c, 0x00, 0x15, 0xb7, 0x3f, 0x4c, 0x12, 0x23, 0x46, 0x2a, 0x07, 0x1c, 0x00, 0x2f, 0xc4, 0x2f, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x04, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x2e, 0x01, 0x27, 0x15, 0x14, 0x06, 0x07, 0x0e, 0x03, 0x07, 0x0e, 0x01, 0x07, 0x23, 0x22, 0x2e, 0x04, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x1e, 0x01, 0x17, 0x1e, 0x01, 0x17, 0x16, 0x17, 0x34, 0x26, 0x3c, 0x01, 0x35, 0x2e, 0x01, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x04, 0x02, 0x64, 0x04, 0x0b, 0x14, 0x20, 0x2e, 0x20, 0x1e, 0x32, 0x28, 0x1e, 0x0a, 0x15, 0x2a, 0x13, 0x01, 0x06, 0x02, 0x05, 0x0a, 0x13, 0x10, 0x09, 0x0f, 0x09, 0x03, 0x17, 0x20, 0x16, 0x0d, 0x07, 0x02, 0x04, 0x0d, 0x15, 0x22, 0x30, 0x20, 0x1f, 0x31, 0x26, 0x1a, 0x09, 0x11, 0x20, 0x0f, 0x01, 0x06, 0x04, 0x04, 0x06, 0x01, 0x01, 0x01, 0x01, 0x05, 0x0a, 0x13, 0x1d, 0x15, 0x19, 0x24, 0x18, 0x0e, 0x08, 0x02, 0x01, 0xad, 0x16, 0x51, 0x61, 0x65, 0x52, 0x35, 0x23, 0x33, 0x3a, 0x18, 0x33, 0x63, 0x33, 0x1c, 0x2b, 0x55, 0x2a, 0x11, 0x2d, 0x2c, 0x26, 0x09, 0x05, 0x02, 0x02, 0x1f, 0x31, 0x3d, 0x3b, 0x32, 0x0f, 0x17, 0x59, 0x6c, 0x72, 0x5d, 0x3b, 0x30, 0x42, 0x48, 0x18, 0x2f, 0x5d, 0x30, 0x02, 0x12, 0x0b, 0x0c, 0x0f, 0x0d, 0x0b, 0x09, 0x0e, 0x0f, 0x21, 0x42, 0x20, 0x0e, 0x32, 0x39, 0x3a, 0x2f, 0x1e, 0x26, 0x3b, 0x49, 0x46, 0x3c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x14, 0xff, 0xdf, 0x02, 0x00, 0x02, 0xea, 0x00, 0x13, 0x00, 0x27, 0x00, 0x15, 0xb7, 0x23, 0x0f, 0x19, 0x05, 0x14, 0x0a, 0x1e, 0x00, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x05, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x03, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x34, 0x2e, 0x02, 0x01, 0x03, 0x3d, 0x5a, 0x3b, 0x1d, 0x1f, 0x40, 0x62, 0x44, 0x42, 0x59, 0x35, 0x17, 0x1f, 0x3f, 0x5f, 0x34, 0x13, 0x1b, 0x12, 0x08, 0x09, 0x12, 0x1b, 0x13, 0x16, 0x1a, 0x0f, 0x05, 0x07, 0x10, 0x1a, 0x21, 0x3d, 0x67, 0x88, 0x4b, 0x46, 0x90, 0x74, 0x4a, 0x47, 0x71, 0x8c, 0x46, 0x4e, 0x8b, 0x6a, 0x3e, 0x02, 0x2e, 0x1e, 0x31, 0x3d, 0x1f, 0x23, 0x46, 0x38, 0x22, 0x2c, 0x3e, 0x42, 0x16, 0x1b, 0x3c, 0x33, 0x22, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x1f, 0xff, 0xe0, 0x01, 0xee, 0x02, 0xf6, 0x00, 0x27, 0x00, 0x35, 0x00, 0x1c, 0x40, 0x0b, 0x31, 0x05, 0x15, 0x29, 0x00, 0x0c, 0x37, 0x2d, 0x23, 0x31, 0x05, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x10, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xdd, 0xc5, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x05, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x2e, 0x01, 0x35, 0x3c, 0x01, 0x3e, 0x03, 0x37, 0x3e, 0x03, 0x37, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x07, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x1e, 0x01, 0x07, 0x3e, 0x03, 0x01, 0xee, 0x2f, 0x4e, 0x64, 0x35, 0x01, 0x01, 0x06, 0x0b, 0x15, 0x21, 0x18, 0x1c, 0x21, 0x11, 0x06, 0x01, 0x02, 0x01, 0x01, 0x02, 0x04, 0x05, 0x04, 0x01, 0x0a, 0x0c, 0x0a, 0x02, 0x2e, 0x6e, 0x36, 0x2e, 0x4b, 0x35, 0x1c, 0xad, 0x13, 0x16, 0x13, 0x26, 0x10, 0x03, 0x05, 0x02, 0x10, 0x26, 0x20, 0x16, 0x02, 0x18, 0x36, 0x68, 0x53, 0x35, 0x03, 0x12, 0x37, 0x3c, 0x3c, 0x30, 0x1e, 0x25, 0x34, 0x39, 0x14, 0x1d, 0x38, 0x1d, 0x0d, 0x47, 0x5b, 0x63, 0x55, 0x3c, 0x05, 0x01, 0x07, 0x07, 0x06, 0x01, 0x1a, 0x26, 0x25, 0x3d, 0x51, 0x42, 0x14, 0x1e, 0x0f, 0x08, 0x23, 0x42, 0x23, 0x08, 0x15, 0x1a, 0x21, 0x00, 0x02, 0x00, 0x14, 0xff, 0xd6, 0x02, 0x0d, 0x02, 0xea, 0x00, 0x1b, 0x00, 0x3b, 0x00, 0x1c, 0x40, 0x0b, 0x1f, 0x0b, 0x38, 0x03, 0x15, 0x2e, 0x10, 0x33, 0x22, 0x1a, 0x29, 0x00, 0x2f, 0xcd, 0xc6, 0x2f, 0xcd, 0x01, 0x2f, 0xdd, 0xc6, 0x2f, 0xcd, 0xc6, 0x31, 0x30, 0x25, 0x2e, 0x02, 0x36, 0x37, 0x36, 0x16, 0x17, 0x3e, 0x01, 0x35, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x17, 0x1e, 0x02, 0x06, 0x07, 0x06, 0x2e, 0x02, 0x27, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x06, 0x07, 0x01, 0x1e, 0x0a, 0x0e, 0x04, 0x09, 0x0e, 0x0b, 0x1c, 0x10, 0x02, 0x02, 0x07, 0x10, 0x1a, 0x14, 0x13, 0x1b, 0x12, 0x08, 0x09, 0x12, 0x1b, 0x13, 0x08, 0xc6, 0x0a, 0x18, 0x0d, 0x02, 0x10, 0x0c, 0x1c, 0x1d, 0x1e, 0x0e, 0x1b, 0x43, 0x29, 0x3d, 0x5a, 0x3b, 0x1d, 0x1f, 0x40, 0x62, 0x44, 0x42, 0x59, 0x35, 0x17, 0x14, 0x14, 0xa2, 0x11, 0x24, 0x21, 0x1d, 0x0a, 0x08, 0x04, 0x0a, 0x14, 0x26, 0x0e, 0x1b, 0x3c, 0x33, 0x22, 0x1e, 0x31, 0x3d, 0x1f, 0x23, 0x46, 0x38, 0x22, 0x26, 0x0e, 0x2b, 0x2d, 0x28, 0x0c, 0x09, 0x03, 0x0f, 0x19, 0x0f, 0x17, 0x1a, 0x3d, 0x67, 0x88, 0x4b, 0x46, 0x90, 0x74, 0x4a, 0x47, 0x71, 0x8c, 0x46, 0x3e, 0x71, 0x30, 0x00, 0x02, 0x00, 0x1f, 0xff, 0xd6, 0x02, 0x06, 0x02, 0xf9, 0x00, 0x31, 0x00, 0x3e, 0x00, 0x1e, 0x40, 0x0c, 0x32, 0x08, 0x31, 0x3a, 0x13, 0x1d, 0x38, 0x2d, 0x0b, 0x18, 0x3a, 0x13, 0x00, 0x2f, 0xcd, 0x2f, 0xc4, 0x2f, 0xcd, 0x01, 0x2f, 0xdd, 0xc5, 0x2f, 0xc4, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x06, 0x07, 0x1e, 0x03, 0x15, 0x14, 0x06, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x0e, 0x01, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x35, 0x34, 0x26, 0x35, 0x3c, 0x01, 0x3e, 0x01, 0x37, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x07, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x16, 0x07, 0x3e, 0x03, 0x02, 0x06, 0x40, 0x35, 0x10, 0x22, 0x1b, 0x11, 0x1f, 0x25, 0x1f, 0x2d, 0x23, 0x1d, 0x0d, 0x12, 0x22, 0x12, 0x01, 0x05, 0x11, 0x22, 0x1e, 0x21, 0x24, 0x0f, 0x02, 0x04, 0x03, 0x03, 0x04, 0x05, 0x0a, 0x47, 0x55, 0x51, 0x14, 0x33, 0x4e, 0x34, 0x1a, 0xb9, 0x18, 0x1b, 0x14, 0x29, 0x11, 0x04, 0x01, 0x15, 0x2c, 0x25, 0x18, 0x02, 0x0e, 0x45, 0x6e, 0x2a, 0x18, 0x40, 0x47, 0x47, 0x1e, 0x20, 0x33, 0x3c, 0x53, 0x56, 0x1a, 0x06, 0x0f, 0x07, 0x16, 0x4d, 0x4c, 0x38, 0x36, 0x4a, 0x4d, 0x16, 0x2f, 0x5b, 0x2f, 0x2b, 0x56, 0x2c, 0x0a, 0x1f, 0x21, 0x1e, 0x09, 0x15, 0x26, 0x1d, 0x11, 0x26, 0x41, 0x55, 0x3d, 0x1a, 0x1b, 0x0e, 0x09, 0x4f, 0x4e, 0x07, 0x16, 0x20, 0x28, 0x00, 0x00, 0x01, 0x00, 0x05, 0xff, 0xd9, 0x01, 0x65, 0x03, 0x0c, 0x00, 0x2c, 0x00, 0x1a, 0x40, 0x0a, 0x19, 0x08, 0x25, 0x20, 0x00, 0x0f, 0x2a, 0x2e, 0x16, 0x2d, 0x00, 0x10, 0xc4, 0x10, 0xc4, 0x01, 0x2f, 0xc4, 0xcd, 0x2f, 0xcd, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x06, 0x07, 0x0e, 0x03, 0x15, 0x14, 0x1e, 0x04, 0x15, 0x14, 0x0e, 0x04, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x04, 0x35, 0x34, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x01, 0x65, 0x1d, 0x14, 0x12, 0x26, 0x20, 0x14, 0x14, 0x1d, 0x23, 0x1d, 0x14, 0x15, 0x24, 0x31, 0x37, 0x3c, 0x1c, 0x1f, 0x30, 0x16, 0x20, 0x27, 0x20, 0x16, 0x29, 0x32, 0x29, 0x2e, 0x48, 0x5a, 0x2c, 0x23, 0x32, 0x02, 0xbe, 0x17, 0x22, 0x0b, 0x0b, 0x19, 0x1f, 0x26, 0x18, 0x15, 0x22, 0x21, 0x23, 0x2b, 0x36, 0x24, 0x19, 0x3f, 0x40, 0x3c, 0x2f, 0x1d, 0x22, 0x22, 0x17, 0x27, 0x24, 0x22, 0x22, 0x25, 0x15, 0x1d, 0x3d, 0x41, 0x44, 0x23, 0x2b, 0x5f, 0x4f, 0x34, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xcd, 0xff, 0xe1, 0x01, 0xcf, 0x02, 0xf1, 0x00, 0x2e, 0x00, 0x18, 0x40, 0x09, 0x00, 0x0b, 0x22, 0x17, 0x11, 0x30, 0x1b, 0x05, 0x29, 0x00, 0x2f, 0xdd, 0xcd, 0x10, 0xc4, 0x01, 0x2f, 0xc6, 0xdd, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x01, 0x15, 0x14, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x35, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x02, 0x01, 0xcf, 0x27, 0x37, 0x3a, 0x13, 0x08, 0x09, 0x04, 0x07, 0x11, 0x1e, 0x16, 0x1a, 0x1f, 0x11, 0x06, 0x02, 0x02, 0x01, 0x0e, 0x1d, 0x0f, 0x0c, 0x27, 0x24, 0x1a, 0x2f, 0x49, 0x59, 0x57, 0x49, 0x14, 0x13, 0x2b, 0x26, 0x19, 0x02, 0xab, 0x19, 0x29, 0x1f, 0x14, 0x04, 0x4d, 0x99, 0x4d, 0x29, 0x50, 0x28, 0x12, 0x2b, 0x26, 0x1a, 0x1d, 0x2a, 0x2f, 0x13, 0x3c, 0x79, 0x3d, 0x33, 0x62, 0x33, 0x02, 0x02, 0x05, 0x0d, 0x17, 0x12, 0x1e, 0x2d, 0x21, 0x17, 0x0d, 0x06, 0x03, 0x0e, 0x1c, 0x00, 0x01, 0x00, 0x1a, 0xff, 0xed, 0x02, 0x36, 0x02, 0xf6, 0x00, 0x3d, 0x00, 0x15, 0xb7, 0x30, 0x3d, 0x1a, 0x0d, 0x34, 0x16, 0x26, 0x07, 0x00, 0x2f, 0xcd, 0x2f, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x04, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x3c, 0x01, 0x37, 0x3e, 0x05, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x06, 0x07, 0x0e, 0x01, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x34, 0x26, 0x27, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x04, 0x17, 0x16, 0x14, 0x02, 0x36, 0x08, 0x14, 0x23, 0x36, 0x4c, 0x33, 0x4b, 0x6f, 0x4a, 0x24, 0x01, 0x01, 0x05, 0x0c, 0x13, 0x1f, 0x2c, 0x1e, 0x16, 0x1e, 0x13, 0x08, 0x0b, 0x05, 0x08, 0x0a, 0x05, 0x14, 0x25, 0x20, 0x1f, 0x25, 0x12, 0x05, 0x16, 0x12, 0x05, 0x07, 0x21, 0x1e, 0x19, 0x2b, 0x22, 0x19, 0x12, 0x09, 0x01, 0x01, 0x01, 0x5f, 0x29, 0x57, 0x52, 0x49, 0x37, 0x20, 0x46, 0x6d, 0x87, 0x42, 0x07, 0x0c, 0x05, 0x15, 0x48, 0x52, 0x56, 0x44, 0x2c, 0x1a, 0x27, 0x2b, 0x12, 0x1b, 0x37, 0x1b, 0x2b, 0x56, 0x2d, 0x17, 0x42, 0x3d, 0x2b, 0x2a, 0x3a, 0x40, 0x17, 0x42, 0x81, 0x40, 0x11, 0x22, 0x11, 0x1c, 0x2a, 0x27, 0x3f, 0x4e, 0x4d, 0x46, 0x16, 0x0a, 0x13, 0x00, 0x01, 0x00, 0x0a, 0xff, 0xff, 0x02, 0x00, 0x02, 0xf2, 0x00, 0x2d, 0x00, 0x15, 0xb7, 0x25, 0x2d, 0x1f, 0x17, 0x29, 0x1b, 0x22, 0x0c, 0x00, 0x2f, 0xcd, 0x2f, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x05, 0x23, 0x22, 0x2e, 0x04, 0x27, 0x2e, 0x01, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x04, 0x17, 0x3e, 0x05, 0x33, 0x32, 0x1e, 0x02, 0x02, 0x00, 0x12, 0x1b, 0x1f, 0x0c, 0x08, 0x13, 0x19, 0x1e, 0x24, 0x2b, 0x19, 0x15, 0x27, 0x23, 0x1f, 0x19, 0x11, 0x04, 0x14, 0x24, 0x04, 0x10, 0x1d, 0x1a, 0x16, 0x25, 0x1e, 0x19, 0x16, 0x14, 0x0a, 0x06, 0x17, 0x1f, 0x25, 0x29, 0x2c, 0x17, 0x11, 0x16, 0x0c, 0x05, 0x02, 0x96, 0x24, 0x59, 0x5c, 0x57, 0x23, 0x16, 0x41, 0x48, 0x48, 0x39, 0x24, 0x26, 0x3b, 0x49, 0x46, 0x3c, 0x10, 0x4e, 0x9f, 0x50, 0x14, 0x2b, 0x24, 0x17, 0x31, 0x4e, 0x60, 0x5d, 0x51, 0x18, 0x14, 0x4d, 0x5c, 0x61, 0x4f, 0x32, 0x10, 0x1a, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1a, 0xff, 0xee, 0x02, 0x85, 0x02, 0xdf, 0x00, 0x48, 0x00, 0x1a, 0x40, 0x0a, 0x3f, 0x48, 0x2c, 0x23, 0x11, 0x36, 0x44, 0x27, 0x0a, 0x18, 0x00, 0x2f, 0xc4, 0x2f, 0xc4, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x06, 0x07, 0x0e, 0x05, 0x23, 0x22, 0x2e, 0x04, 0x27, 0x0e, 0x05, 0x23, 0x22, 0x2e, 0x04, 0x27, 0x2e, 0x01, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x36, 0x1e, 0x04, 0x0f, 0x01, 0x3e, 0x05, 0x37, 0x36, 0x1e, 0x04, 0x17, 0x3e, 0x05, 0x33, 0x32, 0x1e, 0x02, 0x02, 0x85, 0x10, 0x0b, 0x03, 0x0c, 0x11, 0x18, 0x1d, 0x23, 0x14, 0x14, 0x25, 0x1f, 0x1a, 0x13, 0x0d, 0x03, 0x04, 0x11, 0x1a, 0x20, 0x23, 0x26, 0x13, 0x19, 0x26, 0x1a, 0x12, 0x0a, 0x06, 0x01, 0x03, 0x05, 0x02, 0x0d, 0x1b, 0x1a, 0x16, 0x20, 0x16, 0x0d, 0x07, 0x02, 0x01, 0x01, 0x03, 0x0f, 0x16, 0x19, 0x1c, 0x1c, 0x0d, 0x11, 0x1f, 0x19, 0x14, 0x0f, 0x08, 0x02, 0x01, 0x08, 0x0e, 0x15, 0x1c, 0x24, 0x16, 0x19, 0x1e, 0x0e, 0x04, 0x02, 0x4b, 0x3c, 0x75, 0x39, 0x0f, 0x43, 0x52, 0x58, 0x48, 0x2f, 0x28, 0x3d, 0x4c, 0x47, 0x3b, 0x0f, 0x0d, 0x39, 0x47, 0x4a, 0x3e, 0x28, 0x2c, 0x45, 0x55, 0x53, 0x48, 0x15, 0x30, 0x5c, 0x30, 0x11, 0x3b, 0x39, 0x2b, 0x02, 0x01, 0x26, 0x3f, 0x4d, 0x48, 0x3c, 0x0e, 0x1a, 0x0d, 0x38, 0x47, 0x4b, 0x3e, 0x29, 0x01, 0x01, 0x2a, 0x43, 0x52, 0x4d, 0x3e, 0x0d, 0x10, 0x45, 0x55, 0x59, 0x4a, 0x2f, 0x21, 0x2f, 0x33, 0x00, 0x00, 0x00, 0x01, 0xff, 0xf6, 0xff, 0xf2, 0x02, 0x09, 0x02, 0xf9, 0x00, 0x40, 0x00, 0x15, 0xb7, 0x2c, 0x22, 0x00, 0x0d, 0x3e, 0x2f, 0x10, 0x1d, 0x00, 0x2f, 0xc4, 0x2f, 0xc4, 0x01, 0x2f, 0xc4, 0x2f, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x01, 0x07, 0x1e, 0x03, 0x15, 0x14, 0x06, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x0e, 0x01, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x37, 0x36, 0x37, 0x2e, 0x03, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x1e, 0x01, 0x17, 0x3e, 0x05, 0x33, 0x32, 0x16, 0x02, 0x09, 0x10, 0x18, 0x1b, 0x0b, 0x17, 0x2e, 0x1a, 0x0d, 0x29, 0x27, 0x1d, 0x16, 0x17, 0x1b, 0x37, 0x31, 0x29, 0x0c, 0x11, 0x23, 0x11, 0x0b, 0x1f, 0x25, 0x27, 0x12, 0x0d, 0x11, 0x0b, 0x05, 0x15, 0x0e, 0x31, 0x36, 0x0b, 0x21, 0x20, 0x17, 0x1c, 0x20, 0x12, 0x1f, 0x1a, 0x14, 0x06, 0x11, 0x22, 0x0f, 0x08, 0x1c, 0x24, 0x2a, 0x2c, 0x2d, 0x14, 0x16, 0x14, 0x02, 0xbf, 0x16, 0x32, 0x33, 0x30, 0x13, 0x2b, 0x57, 0x2b, 0x16, 0x4c, 0x54, 0x50, 0x1a, 0x14, 0x23, 0x2d, 0x3e, 0x41, 0x14, 0x16, 0x2a, 0x16, 0x0e, 0x27, 0x26, 0x1a, 0x0b, 0x12, 0x16, 0x0b, 0x1f, 0x3f, 0x1b, 0x68, 0x66, 0x17, 0x52, 0x5a, 0x55, 0x1a, 0x1d, 0x2d, 0x13, 0x1d, 0x21, 0x0e, 0x24, 0x47, 0x26, 0x0e, 0x30, 0x36, 0x38, 0x2d, 0x1d, 0x28, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xff, 0xcb, 0x01, 0xe1, 0x03, 0x0f, 0x00, 0x33, 0x00, 0x18, 0x40, 0x09, 0x14, 0x2b, 0x33, 0x0f, 0x1c, 0x0c, 0x35, 0x2f, 0x21, 0x00, 0x2f, 0xc4, 0x10, 0xc4, 0x01, 0x2f, 0xc4, 0x2f, 0xdd, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x05, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x2e, 0x01, 0x27, 0x2e, 0x03, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x04, 0x17, 0x3e, 0x05, 0x33, 0x32, 0x1e, 0x02, 0x01, 0xe1, 0x17, 0x24, 0x2a, 0x12, 0x0a, 0x1d, 0x24, 0x29, 0x2c, 0x2e, 0x17, 0x20, 0x1b, 0x13, 0x1d, 0x23, 0x0f, 0x14, 0x26, 0x09, 0x10, 0x22, 0x1b, 0x12, 0x08, 0x13, 0x1f, 0x17, 0x1a, 0x28, 0x1f, 0x16, 0x10, 0x0a, 0x04, 0x04, 0x13, 0x1b, 0x23, 0x27, 0x2c, 0x17, 0x0f, 0x14, 0x0b, 0x04, 0x02, 0xb0, 0x2c, 0x6a, 0x6c, 0x66, 0x27, 0x16, 0x43, 0x4c, 0x4d, 0x3d, 0x27, 0x2f, 0x1d, 0x1c, 0x3f, 0x3e, 0x3a, 0x17, 0x05, 0x1a, 0x12, 0x23, 0x58, 0x5b, 0x5b, 0x26, 0x12, 0x2b, 0x25, 0x19, 0x27, 0x3c, 0x4a, 0x48, 0x3c, 0x11, 0x0f, 0x3d, 0x4a, 0x4e, 0x40, 0x29, 0x16, 0x1e, 0x20, 0x00, 0x01, 0x00, 0x05, 0xff, 0xf2, 0x01, 0xc2, 0x03, 0x01, 0x00, 0x36, 0x00, 0x1a, 0x40, 0x0a, 0x1d, 0x2d, 0x11, 0x01, 0x25, 0x00, 0x25, 0x34, 0x0c, 0x18, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xc6, 0x2f, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x06, 0x07, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x04, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x3e, 0x01, 0x37, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x16, 0x01, 0xc2, 0x13, 0x20, 0x29, 0x2c, 0x2a, 0x23, 0x18, 0x03, 0x1f, 0x41, 0x21, 0x10, 0x24, 0x1f, 0x15, 0x1e, 0x2f, 0x3c, 0x3c, 0x36, 0x12, 0x17, 0x37, 0x32, 0x21, 0x19, 0x22, 0x25, 0x0b, 0x22, 0x45, 0x21, 0x23, 0x5a, 0x28, 0x0e, 0x1f, 0x19, 0x10, 0x22, 0x37, 0x45, 0x46, 0x3f, 0x16, 0x3a, 0x4a, 0x02, 0x96, 0x05, 0x30, 0x46, 0x57, 0x5b, 0x58, 0x47, 0x31, 0x06, 0x0a, 0x0d, 0x05, 0x0f, 0x19, 0x15, 0x16, 0x23, 0x1a, 0x12, 0x0c, 0x05, 0x04, 0x12, 0x23, 0x20, 0x16, 0x4b, 0x4f, 0x49, 0x15, 0x3f, 0x7d, 0x40, 0x14, 0x21, 0x08, 0x0f, 0x18, 0x10, 0x1a, 0x2c, 0x24, 0x1c, 0x12, 0x0a, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x29, 0xff, 0xcd, 0x01, 0x07, 0x03, 0x1a, 0x00, 0x32, 0x00, 0x15, 0xb7, 0x00, 0x21, 0x2d, 0x15, 0x26, 0x1b, 0x2d, 0x06, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xc4, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x2e, 0x05, 0x35, 0x3c, 0x01, 0x3e, 0x03, 0x37, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x27, 0x1e, 0x01, 0x15, 0x14, 0x16, 0x17, 0x1e, 0x01, 0x17, 0x1e, 0x01, 0x01, 0x07, 0x1c, 0x27, 0x27, 0x0c, 0x08, 0x15, 0x13, 0x11, 0x04, 0x06, 0x09, 0x08, 0x06, 0x04, 0x02, 0x01, 0x03, 0x05, 0x07, 0x05, 0x0c, 0x27, 0x0e, 0x0d, 0x27, 0x24, 0x19, 0x0e, 0x15, 0x1a, 0x0c, 0x08, 0x04, 0x01, 0x02, 0x07, 0x03, 0x1b, 0x31, 0x0d, 0x02, 0x04, 0x05, 0x11, 0x15, 0x0d, 0x05, 0x02, 0x05, 0x0a, 0x08, 0x0a, 0x4f, 0x70, 0x81, 0x77, 0x60, 0x16, 0x07, 0x28, 0x32, 0x38, 0x30, 0x22, 0x04, 0x08, 0x06, 0x05, 0x0d, 0x18, 0x12, 0x0e, 0x15, 0x0e, 0x07, 0x01, 0x4c, 0x98, 0x4b, 0x4d, 0x97, 0x4b, 0x01, 0x15, 0x18, 0x04, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xff, 0xe9, 0x01, 0x50, 0x02, 0xe2, 0x00, 0x1f, 0x00, 0x0d, 0xb3, 0x1f, 0x0e, 0x03, 0x14, 0x00, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x31, 0x30, 0x25, 0x14, 0x06, 0x23, 0x22, 0x2e, 0x04, 0x27, 0x2e, 0x03, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x04, 0x17, 0x1e, 0x03, 0x01, 0x50, 0x08, 0x0e, 0x0f, 0x24, 0x28, 0x27, 0x21, 0x18, 0x05, 0x0d, 0x26, 0x24, 0x19, 0x02, 0x05, 0x0a, 0x08, 0x0d, 0x24, 0x27, 0x28, 0x23, 0x1a, 0x05, 0x0d, 0x24, 0x22, 0x18, 0x11, 0x0a, 0x1e, 0x2c, 0x44, 0x52, 0x4e, 0x3e, 0x0e, 0x22, 0x62, 0x67, 0x61, 0x22, 0x06, 0x10, 0x0f, 0x0a, 0x2f, 0x49, 0x59, 0x52, 0x41, 0x0e, 0x20, 0x5d, 0x64, 0x5e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xff, 0xd1, 0x00, 0xd9, 0x03, 0x22, 0x00, 0x2d, 0x00, 0x15, 0xb7, 0x0f, 0x20, 0x19, 0x03, 0x1a, 0x24, 0x15, 0x0a, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xc4, 0x31, 0x30, 0x37, 0x1c, 0x01, 0x0e, 0x03, 0x07, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x3b, 0x01, 0x2e, 0x01, 0x35, 0x34, 0x37, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x17, 0x1e, 0x05, 0xd9, 0x01, 0x03, 0x05, 0x07, 0x05, 0x0c, 0x27, 0x0e, 0x0e, 0x26, 0x24, 0x19, 0x0e, 0x15, 0x1a, 0x0c, 0x0c, 0x02, 0x02, 0x03, 0x0f, 0x21, 0x1b, 0x11, 0x16, 0x1f, 0x22, 0x0c, 0x12, 0x2e, 0x09, 0x05, 0x0a, 0x08, 0x06, 0x04, 0x02, 0xd0, 0x08, 0x27, 0x34, 0x38, 0x30, 0x23, 0x04, 0x08, 0x05, 0x05, 0x0d, 0x17, 0x13, 0x0e, 0x15, 0x0e, 0x07, 0x4c, 0x97, 0x4c, 0x9b, 0x9b, 0x06, 0x0d, 0x18, 0x12, 0x10, 0x17, 0x0e, 0x06, 0x0b, 0x12, 0x0b, 0x4f, 0x6e, 0x7f, 0x76, 0x61, 0x00, 0x01, 0x00, 0x0f, 0x01, 0xdf, 0x01, 0xbc, 0x02, 0xf6, 0x00, 0x1d, 0x00, 0x15, 0xb7, 0x00, 0x1f, 0x10, 0x1e, 0x08, 0x17, 0x03, 0x0d, 0x00, 0x2f, 0xc4, 0x2f, 0xcd, 0x01, 0x10, 0xc6, 0x10, 0xc6, 0x31, 0x30, 0x01, 0x14, 0x06, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x0e, 0x03, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x04, 0x01, 0xbc, 0x11, 0x0b, 0x11, 0x39, 0x3c, 0x36, 0x0d, 0x0c, 0x2a, 0x30, 0x32, 0x14, 0x0b, 0x11, 0x15, 0x23, 0x2b, 0x2d, 0x2b, 0x10, 0x0e, 0x2c, 0x32, 0x33, 0x29, 0x1a, 0x01, 0xfd, 0x0c, 0x0d, 0x2f, 0x3e, 0x3d, 0x0f, 0x11, 0x3f, 0x3f, 0x2f, 0x08, 0x0e, 0x0f, 0x31, 0x39, 0x3b, 0x2f, 0x1e, 0x1d, 0x2e, 0x39, 0x38, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xff, 0xee, 0x01, 0xf5, 0x00, 0x44, 0x00, 0x20, 0x00, 0x0d, 0xb3, 0x00, 0x0f, 0x07, 0x19, 0x00, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x31, 0x30, 0x25, 0x14, 0x07, 0x0e, 0x02, 0x22, 0x23, 0x2a, 0x01, 0x2e, 0x01, 0x27, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x05, 0x33, 0x3a, 0x01, 0x1e, 0x01, 0x17, 0x1e, 0x01, 0x01, 0xf5, 0x13, 0x18, 0x3f, 0x43, 0x42, 0x1a, 0x15, 0x39, 0x3b, 0x38, 0x14, 0x0d, 0x0a, 0x09, 0x0b, 0x05, 0x27, 0x35, 0x3d, 0x37, 0x2c, 0x09, 0x10, 0x36, 0x38, 0x34, 0x0f, 0x0c, 0x0a, 0x19, 0x14, 0x06, 0x07, 0x07, 0x03, 0x01, 0x04, 0x04, 0x02, 0x11, 0x0c, 0x0b, 0x11, 0x03, 0x02, 0x03, 0x04, 0x03, 0x02, 0x01, 0x02, 0x04, 0x04, 0x03, 0x13, 0x00, 0x01, 0x00, 0x1f, 0x02, 0x75, 0x00, 0xb9, 0x03, 0x00, 0x00, 0x12, 0x00, 0x0d, 0xb3, 0x00, 0x0b, 0x03, 0x0e, 0x00, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x31, 0x30, 0x13, 0x14, 0x06, 0x23, 0x22, 0x26, 0x27, 0x2e, 0x03, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0xb9, 0x0d, 0x08, 0x12, 0x27, 0x0e, 0x09, 0x15, 0x13, 0x0d, 0x16, 0x0f, 0x0f, 0x28, 0x25, 0x19, 0x02, 0x86, 0x08, 0x09, 0x17, 0x08, 0x06, 0x0e, 0x12, 0x15, 0x0b, 0x0f, 0x17, 0x1b, 0x26, 0x2a, 0x00, 0x00, 0x02, 0x00, 0x05, 0xff, 0xe2, 0x01, 0xc7, 0x02, 0x45, 0x00, 0x31, 0x00, 0x40, 0x00, 0x22, 0x40, 0x0e, 0x15, 0x08, 0x32, 0x31, 0x3b, 0x23, 0x10, 0x1b, 0x28, 0x33, 0x16, 0x3e, 0x05, 0x0b, 0x00, 0x2f, 0xc4, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xc4, 0xcd, 0x2f, 0xdd, 0xc5, 0xc4, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x37, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x34, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x1e, 0x03, 0x07, 0x27, 0x22, 0x26, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0x01, 0xc7, 0x03, 0x0e, 0x1e, 0x1b, 0x25, 0x28, 0x01, 0x20, 0x51, 0x2a, 0x1d, 0x34, 0x28, 0x18, 0x3b, 0x56, 0x61, 0x26, 0x01, 0x22, 0x1f, 0x19, 0x24, 0x20, 0x20, 0x14, 0x16, 0x1f, 0x27, 0x3b, 0x45, 0x1d, 0x1b, 0x36, 0x30, 0x27, 0x0c, 0x12, 0x16, 0x0c, 0x04, 0xa0, 0x03, 0x02, 0x04, 0x02, 0x0d, 0x27, 0x24, 0x19, 0x14, 0x0d, 0x16, 0x32, 0x8d, 0x12, 0x3a, 0x37, 0x28, 0x30, 0x24, 0x1c, 0x20, 0x1c, 0x2c, 0x37, 0x1b, 0x30, 0x48, 0x33, 0x1e, 0x05, 0x05, 0x08, 0x05, 0x1f, 0x26, 0x11, 0x15, 0x11, 0x1c, 0x16, 0x21, 0x36, 0x25, 0x15, 0x0d, 0x1b, 0x27, 0x1a, 0x25, 0x53, 0x57, 0x57, 0x09, 0x44, 0x01, 0x0d, 0x17, 0x1c, 0x0f, 0x0e, 0x0a, 0x17, 0x00, 0x02, 0x00, 0x24, 0xff, 0xf5, 0x01, 0xf7, 0x03, 0x04, 0x00, 0x33, 0x00, 0x46, 0x00, 0x1c, 0x40, 0x0b, 0x29, 0x3e, 0x12, 0x46, 0x00, 0x39, 0x1e, 0x2f, 0x42, 0x0d, 0x07, 0x00, 0x2f, 0xc4, 0xcd, 0x2f, 0xc4, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xdd, 0xc5, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x04, 0x23, 0x22, 0x26, 0x27, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x03, 0x34, 0x35, 0x34, 0x36, 0x37, 0x34, 0x26, 0x3e, 0x03, 0x37, 0x32, 0x1e, 0x04, 0x15, 0x14, 0x06, 0x1c, 0x01, 0x15, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x07, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x0f, 0x01, 0x1e, 0x01, 0x33, 0x32, 0x3e, 0x02, 0x01, 0xf7, 0x09, 0x13, 0x1f, 0x2d, 0x3b, 0x27, 0x29, 0x43, 0x18, 0x03, 0x26, 0x1d, 0x11, 0x17, 0x0e, 0x07, 0x02, 0x01, 0x01, 0x01, 0x02, 0x07, 0x12, 0x20, 0x19, 0x14, 0x1c, 0x13, 0x0b, 0x05, 0x01, 0x01, 0x09, 0x22, 0x2a, 0x2e, 0x15, 0x2a, 0x39, 0x22, 0x0e, 0x93, 0x03, 0x0b, 0x13, 0x0f, 0x10, 0x1f, 0x1c, 0x18, 0x09, 0x0a, 0x10, 0x2e, 0x1d, 0x16, 0x1d, 0x11, 0x07, 0x01, 0x4a, 0x1d, 0x49, 0x4c, 0x48, 0x39, 0x22, 0x26, 0x21, 0x1b, 0x29, 0x22, 0x35, 0x40, 0x3c, 0x30, 0x0a, 0x22, 0x44, 0x23, 0x11, 0x44, 0x53, 0x57, 0x48, 0x2e, 0x01, 0x1c, 0x2e, 0x39, 0x39, 0x33, 0x10, 0x03, 0x15, 0x18, 0x13, 0x01, 0x13, 0x24, 0x1c, 0x12, 0x2b, 0x42, 0x4d, 0x40, 0x0c, 0x1c, 0x18, 0x10, 0x0e, 0x16, 0x19, 0x0c, 0x59, 0x17, 0x1b, 0x1c, 0x29, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xff, 0xe7, 0x01, 0x92, 0x02, 0x52, 0x00, 0x38, 0x00, 0x18, 0x40, 0x09, 0x22, 0x0c, 0x37, 0x14, 0x2c, 0x0f, 0x31, 0x19, 0x27, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x06, 0x07, 0x0e, 0x01, 0x23, 0x22, 0x27, 0x26, 0x34, 0x27, 0x35, 0x2e, 0x01, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x36, 0x37, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x1c, 0x01, 0x01, 0x91, 0x02, 0x02, 0x09, 0x26, 0x1a, 0x27, 0x0e, 0x02, 0x01, 0x02, 0x0a, 0x0c, 0x11, 0x1f, 0x17, 0x0e, 0x04, 0x0c, 0x15, 0x11, 0x11, 0x1d, 0x0e, 0x0d, 0x1f, 0x14, 0x19, 0x1d, 0x24, 0x36, 0x42, 0x1e, 0x36, 0x4b, 0x2e, 0x14, 0x1c, 0x3a, 0x5b, 0x3f, 0x27, 0x39, 0x25, 0x13, 0x01, 0x80, 0x05, 0x0b, 0x05, 0x17, 0x1f, 0x27, 0x05, 0x0d, 0x07, 0x1d, 0x0e, 0x10, 0x2b, 0x3b, 0x3e, 0x13, 0x0f, 0x2b, 0x28, 0x1d, 0x15, 0x0e, 0x0c, 0x1a, 0x24, 0x17, 0x22, 0x3b, 0x2b, 0x19, 0x36, 0x53, 0x62, 0x2c, 0x33, 0x77, 0x66, 0x44, 0x22, 0x37, 0x44, 0x21, 0x05, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0xff, 0xf4, 0x01, 0xcd, 0x03, 0x21, 0x00, 0x2a, 0x00, 0x42, 0x00, 0x1e, 0x40, 0x0c, 0x3a, 0x16, 0x20, 0x0e, 0x2c, 0x06, 0x33, 0x26, 0x1d, 0x3d, 0x0b, 0x11, 0x00, 0x2f, 0xc4, 0xcd, 0x2f, 0xc4, 0xcd, 0x01, 0x2f, 0xdd, 0xcd, 0xc5, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x06, 0x15, 0x14, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x27, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x16, 0x17, 0x37, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x03, 0x34, 0x26, 0x37, 0x2e, 0x03, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x37, 0x01, 0xcd, 0x0b, 0x07, 0x02, 0x0b, 0x19, 0x17, 0x1e, 0x27, 0x05, 0x13, 0x48, 0x2a, 0x2d, 0x41, 0x2b, 0x15, 0x06, 0x0f, 0x18, 0x25, 0x33, 0x21, 0x24, 0x42, 0x11, 0x09, 0x01, 0x04, 0x0d, 0x1c, 0x1b, 0x1d, 0x20, 0x0f, 0x03, 0xa3, 0x02, 0x01, 0x06, 0x10, 0x17, 0x1c, 0x10, 0x12, 0x16, 0x0a, 0x03, 0x04, 0x0b, 0x14, 0x11, 0x0d, 0x1a, 0x17, 0x15, 0x08, 0x02, 0x92, 0x49, 0x90, 0x49, 0x3b, 0x74, 0x3b, 0x10, 0x2d, 0x2a, 0x1e, 0x2d, 0x1c, 0x24, 0x32, 0x3e, 0x58, 0x60, 0x23, 0x19, 0x40, 0x42, 0x3f, 0x32, 0x1e, 0x2a, 0x1f, 0x9f, 0x13, 0x33, 0x2e, 0x20, 0x1c, 0x2b, 0x32, 0xfe, 0x2e, 0x17, 0x2c, 0x17, 0x0d, 0x1f, 0x1b, 0x12, 0x16, 0x1f, 0x24, 0x0d, 0x0c, 0x2f, 0x30, 0x24, 0x0b, 0x11, 0x15, 0x09, 0x00, 0x00, 0x02, 0x00, 0x0f, 0xff, 0xfd, 0x01, 0xc1, 0x02, 0x5a, 0x00, 0x23, 0x00, 0x30, 0x00, 0x1e, 0x40, 0x0c, 0x25, 0x00, 0x14, 0x2c, 0x19, 0x0a, 0x2c, 0x19, 0x27, 0x0f, 0x1c, 0x05, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xdd, 0xc5, 0x2f, 0xc4, 0xcd, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x07, 0x1e, 0x01, 0x33, 0x32, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x27, 0x34, 0x26, 0x23, 0x22, 0x0e, 0x02, 0x07, 0x3e, 0x03, 0x01, 0xc1, 0x2b, 0x41, 0x4a, 0x1f, 0x35, 0x53, 0x38, 0x1d, 0x1c, 0x39, 0x57, 0x3c, 0x22, 0x3e, 0x2e, 0x1c, 0x28, 0x42, 0x56, 0x2d, 0x04, 0x27, 0x1b, 0x14, 0x26, 0x24, 0x23, 0x12, 0x14, 0x20, 0xa2, 0x0e, 0x0f, 0x16, 0x1e, 0x14, 0x0b, 0x01, 0x0e, 0x27, 0x23, 0x19, 0xb2, 0x22, 0x41, 0x33, 0x1f, 0x35, 0x52, 0x63, 0x2f, 0x32, 0x72, 0x60, 0x40, 0x17, 0x2a, 0x3a, 0x24, 0x2f, 0x52, 0x3c, 0x25, 0x02, 0x1d, 0x1a, 0x14, 0x19, 0x14, 0x1a, 0xe0, 0x0d, 0x1c, 0x17, 0x23, 0x28, 0x11, 0x03, 0x0a, 0x11, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xdc, 0xff, 0xf5, 0x01, 0xc1, 0x03, 0x11, 0x00, 0x44, 0x00, 0x2c, 0x40, 0x13, 0x19, 0x46, 0x35, 0x45, 0x09, 0x44, 0x11, 0x20, 0x3c, 0x2e, 0x25, 0x46, 0x0c, 0x40, 0x2d, 0x1e, 0x3a, 0x05, 0x11, 0x00, 0x2f, 0xc6, 0xcd, 0xdd, 0xcd, 0x2f, 0xcd, 0x10, 0xc4, 0x01, 0x2f, 0xc4, 0xd4, 0xc5, 0x2f, 0xcd, 0x10, 0xc4, 0x10, 0xc6, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x01, 0x34, 0x2e, 0x01, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x07, 0x16, 0x15, 0x14, 0x07, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x2e, 0x01, 0x37, 0x06, 0x22, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x01, 0xc1, 0x07, 0x12, 0x1e, 0x16, 0x19, 0x18, 0x09, 0x03, 0x0c, 0x10, 0x0f, 0x13, 0x0c, 0x04, 0x0d, 0x18, 0x0e, 0x0e, 0x1e, 0x1a, 0x10, 0x1f, 0x2b, 0x2c, 0x0d, 0x03, 0x03, 0x02, 0x27, 0x1f, 0x11, 0x18, 0x10, 0x09, 0x01, 0x05, 0x06, 0x01, 0x07, 0x0d, 0x07, 0x0c, 0x22, 0x1f, 0x16, 0x1d, 0x29, 0x2d, 0x11, 0x12, 0x2e, 0x50, 0x3e, 0x27, 0x38, 0x24, 0x10, 0x02, 0x56, 0x13, 0x23, 0x1a, 0x0f, 0x14, 0x1d, 0x22, 0x1d, 0x14, 0x2e, 0x3c, 0x39, 0x0a, 0x02, 0x03, 0x06, 0x0d, 0x17, 0x11, 0x12, 0x1c, 0x13, 0x0c, 0x02, 0x45, 0x46, 0x42, 0x40, 0x1f, 0x28, 0x0d, 0x16, 0x1c, 0x0f, 0x3c, 0x79, 0x3d, 0x01, 0x06, 0x0f, 0x16, 0x11, 0x16, 0x1e, 0x13, 0x08, 0x02, 0x10, 0x31, 0x70, 0x60, 0x3f, 0x21, 0x35, 0x43, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0xfe, 0xcb, 0x01, 0xe3, 0x02, 0x50, 0x00, 0x37, 0x00, 0x4b, 0x00, 0x20, 0x40, 0x0d, 0x1c, 0x39, 0x36, 0x43, 0x0f, 0x24, 0x3d, 0x31, 0x2b, 0x47, 0x1f, 0x17, 0x0a, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xc4, 0xcd, 0x01, 0x2f, 0xc4, 0xcd, 0x2f, 0xdd, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x06, 0x07, 0x0e, 0x05, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x37, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x16, 0x17, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x03, 0x14, 0x07, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x01, 0xe3, 0x03, 0x04, 0x03, 0x0a, 0x16, 0x24, 0x3b, 0x54, 0x3a, 0x1b, 0x43, 0x3b, 0x29, 0x21, 0x1a, 0x10, 0x1d, 0x1d, 0x1b, 0x0e, 0x25, 0x32, 0x1e, 0x0f, 0x03, 0x14, 0x35, 0x1d, 0x35, 0x4a, 0x2e, 0x16, 0x0d, 0x1a, 0x27, 0x34, 0x41, 0x27, 0x26, 0x3b, 0x05, 0x0b, 0x24, 0x1a, 0x0e, 0x13, 0x0b, 0x06, 0x02, 0x98, 0x09, 0x11, 0x1a, 0x12, 0x17, 0x23, 0x18, 0x0d, 0x04, 0x0d, 0x16, 0x12, 0x1b, 0x28, 0x1b, 0x0e, 0x01, 0x55, 0x33, 0x66, 0x33, 0x2c, 0x64, 0x63, 0x5b, 0x46, 0x2a, 0x11, 0x20, 0x2f, 0x1f, 0x17, 0x27, 0x0b, 0x0e, 0x0b, 0x25, 0x39, 0x43, 0x1e, 0x17, 0x11, 0x25, 0x41, 0x56, 0x32, 0x1f, 0x4e, 0x50, 0x4c, 0x3a, 0x24, 0x2c, 0x28, 0x15, 0x29, 0x1c, 0x2d, 0x35, 0x33, 0x2a, 0x4b, 0x0f, 0x30, 0x2c, 0x20, 0x20, 0x2d, 0x33, 0x12, 0x0d, 0x2c, 0x2a, 0x1e, 0x1a, 0x28, 0x30, 0x00, 0x01, 0x00, 0x24, 0xff, 0xe7, 0x01, 0xe4, 0x03, 0x02, 0x00, 0x38, 0x00, 0x18, 0x40, 0x09, 0x0d, 0x38, 0x2f, 0x1e, 0x27, 0x0f, 0x34, 0x19, 0x08, 0x00, 0x2f, 0xc4, 0x2f, 0xcd, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x01, 0x36, 0x2e, 0x01, 0x23, 0x22, 0x0e, 0x02, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x03, 0x36, 0x35, 0x34, 0x3e, 0x04, 0x17, 0x1e, 0x05, 0x15, 0x14, 0x06, 0x07, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x01, 0xe4, 0x01, 0x05, 0x08, 0x06, 0x08, 0x1a, 0x16, 0x22, 0x1e, 0x0a, 0x02, 0x04, 0x12, 0x18, 0x21, 0x23, 0x0f, 0x03, 0x02, 0x02, 0x02, 0x10, 0x25, 0x24, 0x16, 0x1b, 0x10, 0x07, 0x01, 0x01, 0x03, 0x0a, 0x10, 0x1a, 0x25, 0x19, 0x10, 0x17, 0x0f, 0x0a, 0x05, 0x01, 0x02, 0x02, 0x17, 0x4d, 0x27, 0x32, 0x33, 0x16, 0x02, 0x01, 0x03, 0x11, 0x43, 0x49, 0x41, 0x0f, 0x13, 0x1c, 0x36, 0x50, 0x5e, 0x50, 0x36, 0x15, 0x22, 0x2c, 0x18, 0x17, 0x4e, 0x4c, 0x37, 0x22, 0x36, 0x42, 0x3f, 0x34, 0x0d, 0x14, 0x5c, 0x71, 0x78, 0x63, 0x3e, 0x01, 0x01, 0x1a, 0x29, 0x30, 0x2f, 0x28, 0x0b, 0x1a, 0x34, 0x1a, 0x1f, 0x28, 0x37, 0x51, 0x5b, 0x00, 0x02, 0x00, 0x24, 0xff, 0xfe, 0x00, 0xcb, 0x02, 0xe2, 0x00, 0x0f, 0x00, 0x2c, 0x00, 0x18, 0x40, 0x09, 0x10, 0x20, 0x00, 0x08, 0x1a, 0x2e, 0x28, 0x05, 0x0d, 0x00, 0x2f, 0xdd, 0xc6, 0x10, 0xc6, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x13, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x13, 0x1c, 0x01, 0x07, 0x06, 0x14, 0x0e, 0x03, 0x07, 0x06, 0x2e, 0x03, 0x34, 0x35, 0x3c, 0x01, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0xc3, 0x0f, 0x18, 0x1c, 0x0c, 0x14, 0x1e, 0x0f, 0x16, 0x1c, 0x0d, 0x13, 0x20, 0x08, 0x01, 0x01, 0x04, 0x09, 0x14, 0x21, 0x19, 0x13, 0x1a, 0x11, 0x08, 0x04, 0x04, 0x0b, 0x15, 0x22, 0x1a, 0x1b, 0x1c, 0x0e, 0x02, 0x02, 0xba, 0x0e, 0x16, 0x11, 0x09, 0x14, 0x15, 0x0f, 0x17, 0x0f, 0x08, 0x12, 0xfe, 0x96, 0x0e, 0x1f, 0x0e, 0x11, 0x39, 0x42, 0x44, 0x38, 0x23, 0x01, 0x01, 0x20, 0x33, 0x3f, 0x3b, 0x32, 0x0c, 0x10, 0x3b, 0x44, 0x46, 0x3a, 0x24, 0x36, 0x48, 0x47, 0x00, 0x02, 0xff, 0x57, 0xfe, 0xe5, 0x00, 0xdb, 0x02, 0xd8, 0x00, 0x0f, 0x00, 0x35, 0x00, 0x1c, 0x40, 0x0b, 0x1d, 0x36, 0x2a, 0x10, 0x00, 0x08, 0x1a, 0x37, 0x2f, 0x05, 0x0d, 0x00, 0x2f, 0xdd, 0xc6, 0x10, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x10, 0xc4, 0x31, 0x30, 0x13, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x13, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x04, 0x35, 0x34, 0x26, 0x27, 0x2e, 0x01, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x03, 0x14, 0xc8, 0x10, 0x18, 0x1c, 0x0c, 0x14, 0x1e, 0x0f, 0x17, 0x1b, 0x0d, 0x13, 0x21, 0x13, 0x05, 0x13, 0x28, 0x24, 0x14, 0x36, 0x3d, 0x3e, 0x1c, 0x20, 0x1f, 0x22, 0x32, 0x3b, 0x32, 0x22, 0x04, 0x04, 0x02, 0x04, 0x0a, 0x14, 0x1f, 0x16, 0x19, 0x21, 0x15, 0x09, 0x04, 0x02, 0xb0, 0x0e, 0x17, 0x10, 0x09, 0x14, 0x15, 0x0f, 0x17, 0x0f, 0x08, 0x13, 0xfe, 0x39, 0x2f, 0x73, 0x74, 0x68, 0x23, 0x13, 0x2a, 0x24, 0x17, 0x23, 0x1f, 0x20, 0x20, 0x18, 0x1d, 0x3a, 0x63, 0x51, 0x33, 0x62, 0x33, 0x1d, 0x3b, 0x1d, 0x12, 0x28, 0x21, 0x15, 0x26, 0x3b, 0x49, 0x45, 0x3a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1f, 0xff, 0xe5, 0x01, 0xda, 0x02, 0xed, 0x00, 0x40, 0x00, 0x1a, 0x40, 0x0a, 0x17, 0x38, 0x36, 0x21, 0x0a, 0x00, 0x3e, 0x2b, 0x0d, 0x1c, 0x00, 0x2f, 0xc4, 0x2f, 0xc4, 0x01, 0x2f, 0xc4, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x07, 0x1e, 0x03, 0x15, 0x14, 0x06, 0x23, 0x22, 0x2e, 0x04, 0x27, 0x0e, 0x01, 0x07, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x37, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x03, 0x14, 0x15, 0x14, 0x0e, 0x01, 0x14, 0x17, 0x32, 0x3e, 0x04, 0x33, 0x32, 0x16, 0x01, 0xda, 0x1d, 0x29, 0x2d, 0x11, 0x0e, 0x2a, 0x26, 0x1b, 0x1a, 0x17, 0x11, 0x23, 0x23, 0x20, 0x1b, 0x15, 0x06, 0x0d, 0x1d, 0x0e, 0x03, 0x0f, 0x22, 0x21, 0x1a, 0x1c, 0x0d, 0x02, 0x08, 0x01, 0x01, 0x06, 0x0c, 0x16, 0x23, 0x19, 0x12, 0x19, 0x0f, 0x07, 0x03, 0x01, 0x01, 0x02, 0x07, 0x1c, 0x25, 0x2b, 0x2d, 0x2c, 0x13, 0x14, 0x16, 0x02, 0x1a, 0x1c, 0x3a, 0x39, 0x33, 0x15, 0x16, 0x49, 0x52, 0x4e, 0x1a, 0x15, 0x23, 0x1d, 0x2f, 0x3a, 0x38, 0x31, 0x0f, 0x0d, 0x11, 0x0b, 0x15, 0x4c, 0x4a, 0x37, 0x2f, 0x3f, 0x41, 0x11, 0x4a, 0x94, 0x4a, 0x11, 0x37, 0x40, 0x42, 0x35, 0x21, 0x1b, 0x2a, 0x34, 0x33, 0x2c, 0x0d, 0x09, 0x23, 0x26, 0x20, 0x07, 0x1b, 0x2a, 0x2f, 0x2a, 0x1b, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x24, 0xff, 0xe8, 0x00, 0xd9, 0x02, 0xe1, 0x00, 0x1d, 0x00, 0x0d, 0xb3, 0x11, 0x1d, 0x19, 0x0b, 0x00, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x31, 0x30, 0x13, 0x14, 0x06, 0x15, 0x14, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x04, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x02, 0xd9, 0x09, 0x09, 0x04, 0x0f, 0x1e, 0x19, 0x18, 0x23, 0x17, 0x0f, 0x07, 0x03, 0x03, 0x0a, 0x11, 0x1c, 0x27, 0x1b, 0x16, 0x17, 0x0a, 0x02, 0x02, 0x5e, 0x36, 0x6d, 0x37, 0x47, 0x8e, 0x48, 0x12, 0x2d, 0x26, 0x1a, 0x2f, 0x49, 0x5a, 0x55, 0x47, 0x11, 0x13, 0x48, 0x54, 0x57, 0x47, 0x2d, 0x1d, 0x29, 0x2d, 0x00, 0x00, 0x01, 0x00, 0x1e, 0xff, 0xe3, 0x02, 0x7d, 0x02, 0x53, 0x00, 0x64, 0x00, 0x1e, 0x40, 0x0c, 0x32, 0x40, 0x17, 0x2b, 0x01, 0x0b, 0x5e, 0x54, 0x49, 0x07, 0x20, 0x3b, 0x00, 0x2f, 0xd4, 0xc4, 0x2f, 0xd4, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x1c, 0x01, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x35, 0x3c, 0x01, 0x2e, 0x01, 0x23, 0x22, 0x0e, 0x02, 0x07, 0x0e, 0x05, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x35, 0x3c, 0x01, 0x2e, 0x03, 0x23, 0x22, 0x0e, 0x02, 0x1d, 0x01, 0x14, 0x16, 0x15, 0x14, 0x06, 0x23, 0x22, 0x2e, 0x04, 0x35, 0x34, 0x26, 0x3e, 0x03, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x07, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x04, 0x02, 0x7d, 0x03, 0x0a, 0x15, 0x20, 0x19, 0x16, 0x17, 0x0a, 0x01, 0x06, 0x04, 0x09, 0x09, 0x12, 0x16, 0x0e, 0x06, 0x01, 0x02, 0x03, 0x05, 0x0b, 0x11, 0x1a, 0x13, 0x18, 0x1a, 0x0c, 0x03, 0x01, 0x01, 0x03, 0x06, 0x0c, 0x08, 0x0d, 0x16, 0x10, 0x09, 0x0c, 0x24, 0x20, 0x17, 0x1e, 0x14, 0x0b, 0x04, 0x01, 0x01, 0x03, 0x08, 0x12, 0x1d, 0x17, 0x1a, 0x21, 0x01, 0x01, 0x0b, 0x20, 0x25, 0x2a, 0x15, 0x14, 0x20, 0x18, 0x10, 0x03, 0x0a, 0x1d, 0x22, 0x29, 0x16, 0x15, 0x1e, 0x16, 0x0c, 0x08, 0x02, 0x01, 0x4a, 0x13, 0x41, 0x4c, 0x4d, 0x3e, 0x28, 0x25, 0x32, 0x34, 0x0f, 0x2d, 0x56, 0x2d, 0x05, 0x1a, 0x1a, 0x14, 0x25, 0x32, 0x31, 0x0c, 0x0d, 0x34, 0x3e, 0x41, 0x35, 0x22, 0x2a, 0x38, 0x3a, 0x10, 0x11, 0x20, 0x11, 0x07, 0x20, 0x27, 0x2a, 0x23, 0x16, 0x21, 0x2d, 0x2c, 0x0a, 0x06, 0x30, 0x5c, 0x30, 0x1c, 0x2f, 0x23, 0x38, 0x43, 0x41, 0x35, 0x0d, 0x0f, 0x3a, 0x44, 0x47, 0x3a, 0x25, 0x1c, 0x1c, 0x06, 0x0c, 0x05, 0x10, 0x21, 0x1b, 0x11, 0x16, 0x21, 0x26, 0x11, 0x12, 0x25, 0x1c, 0x12, 0x1e, 0x2f, 0x3b, 0x39, 0x31, 0x00, 0x00, 0x01, 0x00, 0x1a, 0xff, 0xe4, 0x01, 0xc4, 0x02, 0x4d, 0x00, 0x45, 0x00, 0x18, 0x40, 0x09, 0x04, 0x3e, 0x16, 0x2b, 0x30, 0x0f, 0x3a, 0x00, 0x20, 0x00, 0x2f, 0xc4, 0x2f, 0xcd, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x05, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x35, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x16, 0x1d, 0x01, 0x0e, 0x01, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x03, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x04, 0x01, 0x3a, 0x11, 0x14, 0x0a, 0x03, 0x07, 0x09, 0x07, 0x02, 0x07, 0x10, 0x0d, 0x09, 0x16, 0x13, 0x0d, 0x01, 0x01, 0x04, 0x04, 0x03, 0x0c, 0x13, 0x1a, 0x12, 0x14, 0x1a, 0x10, 0x07, 0x03, 0x01, 0x03, 0x01, 0x0e, 0x20, 0x1f, 0x0e, 0x16, 0x11, 0x0b, 0x03, 0x0a, 0x1b, 0x22, 0x2a, 0x1b, 0x33, 0x39, 0x1b, 0x06, 0x06, 0x0d, 0x16, 0x1e, 0x29, 0x1c, 0x1f, 0x28, 0x29, 0x0b, 0x1e, 0x3c, 0x3c, 0x3c, 0x1e, 0x0c, 0x1c, 0x19, 0x10, 0x1d, 0x25, 0x25, 0x09, 0x16, 0x2d, 0x17, 0x3a, 0x12, 0x26, 0x12, 0x12, 0x21, 0x19, 0x10, 0x1a, 0x29, 0x33, 0x31, 0x29, 0x0c, 0x2f, 0x26, 0x4a, 0x25, 0x14, 0x3e, 0x3b, 0x2a, 0x12, 0x1a, 0x1e, 0x0b, 0x0e, 0x1a, 0x14, 0x0c, 0x31, 0x49, 0x54, 0x22, 0x11, 0x43, 0x51, 0x55, 0x46, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0xff, 0xe3, 0x01, 0xb8, 0x02, 0x44, 0x00, 0x13, 0x00, 0x27, 0x00, 0x15, 0xb7, 0x22, 0x0e, 0x1a, 0x05, 0x14, 0x0a, 0x1e, 0x00, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x17, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x07, 0x0e, 0x03, 0x03, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x34, 0x2e, 0x02, 0xdc, 0x33, 0x4c, 0x34, 0x1a, 0x1a, 0x36, 0x54, 0x3a, 0x38, 0x4f, 0x30, 0x14, 0x03, 0x03, 0x1b, 0x34, 0x50, 0x2d, 0x0f, 0x17, 0x0f, 0x08, 0x09, 0x10, 0x17, 0x0f, 0x10, 0x17, 0x0e, 0x06, 0x08, 0x0f, 0x17, 0x1d, 0x36, 0x54, 0x67, 0x32, 0x35, 0x71, 0x5d, 0x3b, 0x3d, 0x5b, 0x6c, 0x30, 0x35, 0x6c, 0x56, 0x36, 0x01, 0xc4, 0x20, 0x2e, 0x33, 0x13, 0x18, 0x38, 0x2f, 0x1f, 0x1e, 0x2e, 0x37, 0x18, 0x16, 0x35, 0x2e, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x1f, 0xfe, 0xe2, 0x01, 0xe8, 0x02, 0x34, 0x00, 0x2d, 0x00, 0x47, 0x00, 0x1e, 0x40, 0x0c, 0x39, 0x0a, 0x18, 0x47, 0x00, 0x10, 0x49, 0x33, 0x21, 0x29, 0x43, 0x05, 0x00, 0x2f, 0xcd, 0x2f, 0xc4, 0xcd, 0x10, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xdd, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x03, 0x34, 0x35, 0x34, 0x26, 0x35, 0x3c, 0x01, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x07, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x06, 0x07, 0x0e, 0x01, 0x15, 0x14, 0x1e, 0x02, 0x17, 0x1e, 0x03, 0x33, 0x32, 0x3e, 0x02, 0x01, 0xe8, 0x13, 0x2d, 0x49, 0x37, 0x0e, 0x1e, 0x1b, 0x16, 0x06, 0x09, 0x01, 0x01, 0x0f, 0x23, 0x21, 0x13, 0x1a, 0x0f, 0x08, 0x02, 0x02, 0x04, 0x09, 0x12, 0x1c, 0x14, 0x0d, 0x15, 0x0f, 0x0a, 0x03, 0x1f, 0x51, 0x2e, 0x30, 0x3d, 0x23, 0x0e, 0x8f, 0x05, 0x0d, 0x18, 0x12, 0x18, 0x35, 0x0d, 0x05, 0x02, 0x01, 0x02, 0x03, 0x03, 0x03, 0x14, 0x18, 0x19, 0x09, 0x15, 0x1a, 0x0f, 0x05, 0x01, 0x2a, 0x2c, 0x69, 0x5a, 0x3c, 0x04, 0x0a, 0x11, 0x0e, 0x90, 0x17, 0x40, 0x3a, 0x29, 0x27, 0x3c, 0x4a, 0x44, 0x38, 0x0d, 0x43, 0x85, 0x43, 0x0c, 0x33, 0x3c, 0x40, 0x35, 0x21, 0x0f, 0x17, 0x1a, 0x0b, 0x23, 0x24, 0x36, 0x50, 0x5b, 0x1d, 0x0f, 0x1f, 0x1b, 0x11, 0x1f, 0x14, 0x08, 0x24, 0x09, 0x07, 0x17, 0x18, 0x16, 0x06, 0x09, 0x0f, 0x0c, 0x06, 0x20, 0x2c, 0x2f, 0x00, 0x00, 0x02, 0x00, 0x0f, 0xfe, 0xcc, 0x01, 0xf2, 0x02, 0x45, 0x00, 0x2e, 0x00, 0x47, 0x00, 0x22, 0x40, 0x0e, 0x2c, 0x49, 0x34, 0x1e, 0x41, 0x15, 0x05, 0x0b, 0x48, 0x2f, 0x29, 0x23, 0x39, 0x18, 0x00, 0x2f, 0xcd, 0x2f, 0xc4, 0xcd, 0x10, 0xc4, 0x01, 0x2f, 0xdd, 0xc5, 0x2f, 0xcd, 0x10, 0xc6, 0x31, 0x30, 0x01, 0x0e, 0x01, 0x07, 0x06, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x2e, 0x01, 0x3d, 0x02, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x3d, 0x01, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x17, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x07, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x37, 0x3e, 0x03, 0x35, 0x34, 0x2e, 0x02, 0x01, 0xef, 0x08, 0x10, 0x03, 0x05, 0x02, 0x01, 0x0e, 0x1f, 0x1f, 0x0f, 0x15, 0x0f, 0x09, 0x03, 0x05, 0x01, 0x17, 0x49, 0x24, 0x2d, 0x41, 0x2a, 0x14, 0x20, 0x3f, 0x5f, 0x3f, 0x22, 0x39, 0x0c, 0x08, 0x21, 0x1a, 0x21, 0x1b, 0x02, 0xe7, 0x17, 0x28, 0x1e, 0x11, 0x05, 0x0b, 0x13, 0x0f, 0x0d, 0x23, 0x22, 0x1a, 0x05, 0x03, 0x04, 0x03, 0x02, 0x0b, 0x12, 0x18, 0x01, 0xd1, 0x49, 0x90, 0x48, 0x53, 0x94, 0x53, 0x14, 0x3a, 0x36, 0x26, 0x12, 0x1d, 0x24, 0x13, 0x27, 0x4d, 0x12, 0x4e, 0x38, 0x1e, 0x1f, 0x2b, 0x43, 0x50, 0x26, 0x06, 0x34, 0x79, 0x68, 0x45, 0x1c, 0x20, 0x17, 0x1d, 0x2b, 0x1a, 0x0b, 0x12, 0x22, 0x25, 0x35, 0x3c, 0x17, 0x0e, 0x20, 0x1d, 0x13, 0x0d, 0x15, 0x1a, 0x0c, 0x07, 0x1c, 0x1f, 0x1e, 0x08, 0x0c, 0x1f, 0x1d, 0x13, 0x00, 0x01, 0x00, 0x1a, 0xff, 0xec, 0x01, 0xc1, 0x02, 0x2e, 0x00, 0x37, 0x00, 0x18, 0x40, 0x09, 0x35, 0x39, 0x0b, 0x20, 0x16, 0x38, 0x28, 0x00, 0x30, 0x00, 0x2f, 0xcd, 0xc4, 0x10, 0xc4, 0x01, 0x2f, 0xcd, 0x10, 0xc4, 0x31, 0x30, 0x01, 0x06, 0x26, 0x27, 0x2e, 0x01, 0x07, 0x0e, 0x03, 0x07, 0x0e, 0x01, 0x15, 0x06, 0x14, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x2e, 0x02, 0x36, 0x35, 0x2e, 0x01, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x3e, 0x01, 0x37, 0x36, 0x1e, 0x02, 0x17, 0x16, 0x06, 0x01, 0x79, 0x0e, 0x14, 0x0a, 0x09, 0x12, 0x0b, 0x14, 0x1f, 0x19, 0x12, 0x05, 0x03, 0x03, 0x01, 0x02, 0x01, 0x08, 0x11, 0x1c, 0x16, 0x11, 0x19, 0x11, 0x0b, 0x03, 0x03, 0x03, 0x01, 0x01, 0x01, 0x05, 0x04, 0x12, 0x23, 0x1f, 0x11, 0x18, 0x0f, 0x08, 0x01, 0x18, 0x3c, 0x30, 0x18, 0x2f, 0x27, 0x19, 0x01, 0x02, 0x2a, 0x01, 0x76, 0x01, 0x07, 0x04, 0x04, 0x07, 0x01, 0x01, 0x14, 0x1e, 0x25, 0x12, 0x0c, 0x31, 0x1c, 0x1d, 0x34, 0x0f, 0x10, 0x2b, 0x26, 0x1a, 0x14, 0x21, 0x2c, 0x17, 0x18, 0x30, 0x2b, 0x24, 0x0b, 0x23, 0x47, 0x23, 0x16, 0x36, 0x2f, 0x20, 0x16, 0x20, 0x24, 0x0f, 0x27, 0x31, 0x02, 0x01, 0x0b, 0x19, 0x28, 0x1b, 0x20, 0x22, 0x00, 0x00, 0x00, 0x01, 0xff, 0xec, 0xff, 0xf8, 0x01, 0x43, 0x02, 0x67, 0x00, 0x2b, 0x00, 0x15, 0xb7, 0x16, 0x05, 0x22, 0x1d, 0x00, 0x0c, 0x27, 0x11, 0x00, 0x2f, 0xc4, 0x01, 0x2f, 0xc4, 0xcd, 0x2f, 0xcd, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x04, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x04, 0x35, 0x34, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x01, 0x43, 0x27, 0x30, 0x27, 0x11, 0x19, 0x1e, 0x19, 0x11, 0x2b, 0x43, 0x54, 0x29, 0x11, 0x22, 0x1b, 0x12, 0x16, 0x22, 0x27, 0x22, 0x16, 0x21, 0x28, 0x21, 0x23, 0x3b, 0x4c, 0x2a, 0x10, 0x1f, 0x18, 0x0f, 0x02, 0x26, 0x1d, 0x1c, 0x19, 0x22, 0x22, 0x12, 0x1a, 0x15, 0x16, 0x1c, 0x28, 0x1d, 0x2a, 0x51, 0x3f, 0x26, 0x05, 0x0e, 0x19, 0x14, 0x1c, 0x1f, 0x12, 0x0a, 0x0f, 0x18, 0x16, 0x15, 0x2d, 0x33, 0x3a, 0x23, 0x2b, 0x49, 0x36, 0x1f, 0x06, 0x0f, 0x19, 0x00, 0x00, 0x00, 0x01, 0xff, 0xdc, 0xff, 0xdc, 0x01, 0x8a, 0x02, 0xef, 0x00, 0x42, 0x00, 0x22, 0x40, 0x0e, 0x3e, 0x28, 0x20, 0x2d, 0x0e, 0x05, 0x18, 0x43, 0x08, 0x13, 0x2d, 0x20, 0x37, 0x01, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0xd5, 0xcd, 0x10, 0xc4, 0x01, 0x2f, 0xc4, 0xdd, 0xc5, 0xdd, 0xc4, 0x31, 0x30, 0x05, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x37, 0x22, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x06, 0x07, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x01, 0x07, 0x0e, 0x01, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x01, 0x07, 0x47, 0x4f, 0x27, 0x08, 0x06, 0x06, 0x0e, 0x10, 0x05, 0x20, 0x2f, 0x1b, 0x2a, 0x31, 0x16, 0x08, 0x15, 0x24, 0x1c, 0x10, 0x19, 0x10, 0x08, 0x06, 0x08, 0x11, 0x0c, 0x05, 0x11, 0x25, 0x1f, 0x14, 0x1d, 0x2c, 0x32, 0x16, 0x06, 0x05, 0x03, 0x02, 0x03, 0x02, 0x0c, 0x1a, 0x17, 0x0e, 0x1e, 0x0f, 0x1a, 0x17, 0x19, 0x26, 0x2f, 0x24, 0x25, 0x44, 0x60, 0x3b, 0x2f, 0x5f, 0x36, 0x01, 0x1c, 0x1d, 0x12, 0x1c, 0x14, 0x0c, 0x02, 0x1c, 0x44, 0x3b, 0x28, 0x13, 0x1d, 0x24, 0x11, 0x14, 0x2a, 0x1f, 0x02, 0x01, 0x06, 0x0e, 0x17, 0x10, 0x12, 0x1c, 0x14, 0x0b, 0x02, 0x29, 0x45, 0x23, 0x11, 0x23, 0x12, 0x0d, 0x23, 0x20, 0x17, 0x05, 0x24, 0x1c, 0x15, 0x1f, 0x13, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x14, 0xff, 0xf2, 0x01, 0xd4, 0x02, 0x39, 0x00, 0x36, 0x00, 0x15, 0xb7, 0x16, 0x09, 0x2b, 0x00, 0x30, 0x11, 0x21, 0x05, 0x00, 0x2f, 0xcd, 0x2f, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x37, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x06, 0x07, 0x0e, 0x01, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x34, 0x26, 0x27, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x04, 0x01, 0xd4, 0x16, 0x34, 0x57, 0x41, 0x40, 0x56, 0x33, 0x15, 0x0e, 0x03, 0x11, 0x1b, 0x23, 0x15, 0x14, 0x18, 0x0e, 0x04, 0x07, 0x04, 0x04, 0x07, 0x03, 0x0c, 0x16, 0x14, 0x1a, 0x1f, 0x0f, 0x04, 0x0c, 0x05, 0x01, 0x0a, 0x12, 0x1a, 0x10, 0x16, 0x22, 0x17, 0x0f, 0x09, 0x03, 0x01, 0x1e, 0x37, 0x6c, 0x55, 0x34, 0x33, 0x54, 0x6a, 0x37, 0x3c, 0x3b, 0x10, 0x39, 0x37, 0x28, 0x16, 0x21, 0x25, 0x0f, 0x17, 0x2c, 0x16, 0x1e, 0x3c, 0x1e, 0x0f, 0x25, 0x22, 0x17, 0x1c, 0x2a, 0x30, 0x14, 0x2c, 0x55, 0x2c, 0x05, 0x09, 0x0f, 0x1e, 0x18, 0x0f, 0x1f, 0x31, 0x3d, 0x3b, 0x34, 0x00, 0x01, 0x00, 0x05, 0xff, 0xed, 0x01, 0xed, 0x02, 0x2b, 0x00, 0x2c, 0x00, 0x15, 0xb7, 0x2a, 0x2e, 0x11, 0x2d, 0x27, 0x14, 0x1f, 0x06, 0x00, 0x2f, 0xcd, 0x2f, 0xc4, 0x01, 0x10, 0xc6, 0x10, 0xc6, 0x31, 0x30, 0x01, 0x0e, 0x01, 0x07, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x2e, 0x01, 0x27, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x1e, 0x01, 0x17, 0x1e, 0x01, 0x17, 0x3e, 0x03, 0x37, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x01, 0xcd, 0x1a, 0x3e, 0x24, 0x16, 0x36, 0x23, 0x1c, 0x35, 0x2d, 0x21, 0x08, 0x08, 0x14, 0x08, 0x08, 0x0a, 0x1c, 0x29, 0x10, 0x1a, 0x16, 0x14, 0x09, 0x09, 0x10, 0x08, 0x08, 0x11, 0x0e, 0x07, 0x12, 0x15, 0x18, 0x0e, 0x1b, 0x3d, 0x1e, 0x1c, 0x18, 0x12, 0x01, 0x66, 0x45, 0x96, 0x41, 0x28, 0x35, 0x39, 0x4f, 0x51, 0x18, 0x1b, 0x3e, 0x20, 0x20, 0x3f, 0x1c, 0x27, 0x32, 0x13, 0x22, 0x2d, 0x1b, 0x1a, 0x38, 0x1a, 0x1a, 0x31, 0x18, 0x12, 0x2e, 0x34, 0x37, 0x1a, 0x36, 0x4c, 0x22, 0x1b, 0x1b, 0x44, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1f, 0xff, 0xf3, 0x02, 0xcb, 0x02, 0x41, 0x00, 0x3e, 0x00, 0x1e, 0x40, 0x0c, 0x31, 0x39, 0x1c, 0x11, 0x05, 0x27, 0x35, 0x18, 0x1f, 0x0c, 0x2e, 0x00, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xc4, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x05, 0x22, 0x2e, 0x02, 0x27, 0x0e, 0x05, 0x23, 0x22, 0x2e, 0x04, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x04, 0x17, 0x3e, 0x05, 0x3b, 0x01, 0x32, 0x1e, 0x04, 0x17, 0x3e, 0x05, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x04, 0x02, 0x10, 0x20, 0x33, 0x26, 0x19, 0x06, 0x08, 0x1b, 0x23, 0x28, 0x2b, 0x2b, 0x14, 0x1b, 0x29, 0x1c, 0x13, 0x0a, 0x04, 0x05, 0x0f, 0x1d, 0x18, 0x17, 0x21, 0x16, 0x0e, 0x08, 0x03, 0x01, 0x06, 0x16, 0x1a, 0x1f, 0x1f, 0x1e, 0x0e, 0x01, 0x12, 0x22, 0x20, 0x1c, 0x18, 0x12, 0x06, 0x01, 0x04, 0x0b, 0x13, 0x1c, 0x29, 0x1b, 0x1c, 0x1b, 0x0f, 0x1a, 0x23, 0x2a, 0x2e, 0x0d, 0x44, 0x5f, 0x64, 0x21, 0x14, 0x3a, 0x40, 0x41, 0x34, 0x20, 0x34, 0x54, 0x66, 0x66, 0x58, 0x1b, 0x19, 0x2e, 0x24, 0x15, 0x22, 0x37, 0x45, 0x47, 0x43, 0x18, 0x15, 0x3d, 0x45, 0x44, 0x36, 0x22, 0x22, 0x36, 0x45, 0x47, 0x43, 0x18, 0x1d, 0x49, 0x4a, 0x46, 0x37, 0x21, 0x27, 0x1c, 0x1e, 0x64, 0x75, 0x77, 0x60, 0x3d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xff, 0xfe, 0x01, 0xc4, 0x02, 0x32, 0x00, 0x36, 0x00, 0x15, 0xb7, 0x1c, 0x27, 0x0d, 0x00, 0x34, 0x2a, 0x10, 0x1a, 0x00, 0x2f, 0xc4, 0x2f, 0xc4, 0x01, 0x2f, 0xc4, 0x2f, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x01, 0x07, 0x1e, 0x03, 0x15, 0x14, 0x06, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x0e, 0x03, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x2e, 0x03, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x3e, 0x03, 0x33, 0x32, 0x16, 0x01, 0xc4, 0x0c, 0x12, 0x14, 0x08, 0x14, 0x27, 0x14, 0x09, 0x20, 0x1f, 0x16, 0x1c, 0x14, 0x15, 0x2b, 0x29, 0x22, 0x0c, 0x0d, 0x29, 0x2f, 0x2e, 0x12, 0x15, 0x18, 0x1b, 0x25, 0x25, 0x0a, 0x0a, 0x1e, 0x1b, 0x13, 0x1c, 0x17, 0x19, 0x2c, 0x26, 0x1d, 0x09, 0x0c, 0x2b, 0x36, 0x3a, 0x1a, 0x11, 0x15, 0x02, 0x04, 0x10, 0x23, 0x24, 0x21, 0x0e, 0x20, 0x42, 0x20, 0x0e, 0x32, 0x37, 0x36, 0x13, 0x12, 0x22, 0x1e, 0x29, 0x2d, 0x0f, 0x0e, 0x30, 0x2e, 0x21, 0x1e, 0x14, 0x14, 0x3e, 0x42, 0x3c, 0x11, 0x12, 0x3b, 0x41, 0x3f, 0x15, 0x17, 0x1c, 0x27, 0x37, 0x3b, 0x13, 0x12, 0x3e, 0x3c, 0x2c, 0x1d, 0x00, 0x00, 0x01, 0x00, 0x0e, 0xfe, 0xdd, 0x01, 0xef, 0x02, 0x34, 0x00, 0x4b, 0x00, 0x1e, 0x40, 0x0c, 0x17, 0x35, 0x45, 0x2f, 0x05, 0x20, 0x3e, 0x26, 0x32, 0x1a, 0x0a, 0x00, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xc6, 0x01, 0x2f, 0xc4, 0xcd, 0x2f, 0xdd, 0xcd, 0x31, 0x30, 0x13, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x17, 0x1e, 0x01, 0x33, 0x32, 0x3e, 0x04, 0x37, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x04, 0x37, 0x3e, 0x03, 0x17, 0x1e, 0x04, 0x06, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x3c, 0x01, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x04, 0x15, 0x14, 0x0e, 0x04, 0xf7, 0x18, 0x3d, 0x36, 0x25, 0x0a, 0x11, 0x14, 0x0b, 0x0c, 0x17, 0x0c, 0x0d, 0x19, 0x0e, 0x19, 0x25, 0x1a, 0x10, 0x09, 0x04, 0x01, 0x23, 0x45, 0x32, 0x26, 0x39, 0x28, 0x1a, 0x0d, 0x04, 0x02, 0x01, 0x09, 0x14, 0x24, 0x1d, 0x13, 0x18, 0x0f, 0x07, 0x02, 0x01, 0x02, 0x0c, 0x19, 0x17, 0x1a, 0x1f, 0x0f, 0x04, 0x01, 0x07, 0x0f, 0x19, 0x14, 0x19, 0x24, 0x19, 0x0f, 0x08, 0x03, 0x06, 0x11, 0x22, 0x37, 0x50, 0xfe, 0xdd, 0x0f, 0x1c, 0x28, 0x1a, 0x0a, 0x14, 0x0f, 0x09, 0x07, 0x05, 0x05, 0x08, 0x22, 0x37, 0x43, 0x42, 0x3a, 0x12, 0x35, 0x39, 0x20, 0x34, 0x43, 0x48, 0x45, 0x1d, 0x16, 0x47, 0x44, 0x2f, 0x02, 0x01, 0x1f, 0x2e, 0x37, 0x36, 0x2d, 0x0c, 0x11, 0x22, 0x1b, 0x10, 0x1a, 0x27, 0x2d, 0x14, 0x0e, 0x28, 0x2c, 0x2b, 0x23, 0x16, 0x27, 0x3f, 0x4c, 0x4b, 0x3f, 0x12, 0x2a, 0x6b, 0x71, 0x6d, 0x56, 0x34, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xff, 0xf5, 0x01, 0xdf, 0x02, 0x2d, 0x00, 0x3a, 0x00, 0x1a, 0x40, 0x0a, 0x00, 0x2a, 0x13, 0x29, 0x1d, 0x0c, 0x13, 0x24, 0x36, 0x08, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xc4, 0x2f, 0xcd, 0x2f, 0xc4, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x04, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x04, 0x37, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x06, 0x07, 0x0e, 0x05, 0x07, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x01, 0xdf, 0x21, 0x33, 0x41, 0x3f, 0x38, 0x11, 0x11, 0x3d, 0x3c, 0x2c, 0x1c, 0x2c, 0x36, 0x34, 0x2e, 0x0d, 0x0e, 0x2b, 0x2e, 0x2b, 0x0f, 0x0c, 0x1e, 0x1b, 0x13, 0x20, 0x34, 0x40, 0x3e, 0x38, 0x11, 0x13, 0x36, 0x33, 0x24, 0x03, 0x02, 0x02, 0x1f, 0x2d, 0x35, 0x30, 0x24, 0x06, 0x29, 0x55, 0x2a, 0x0a, 0x20, 0x1e, 0x16, 0x5e, 0x14, 0x1e, 0x18, 0x10, 0x0a, 0x05, 0x02, 0x0d, 0x1d, 0x1a, 0x14, 0x3a, 0x44, 0x47, 0x42, 0x37, 0x12, 0x03, 0x0b, 0x0a, 0x07, 0x09, 0x10, 0x16, 0x0e, 0x12, 0x1f, 0x19, 0x13, 0x0d, 0x06, 0x08, 0x14, 0x22, 0x1a, 0x08, 0x0d, 0x08, 0x07, 0x31, 0x43, 0x4d, 0x44, 0x34, 0x09, 0x0b, 0x0f, 0x02, 0x09, 0x11, 0x00, 0x01, 0x00, 0x1f, 0xff, 0xc5, 0x01, 0x2a, 0x03, 0x26, 0x00, 0x40, 0x00, 0x15, 0xb7, 0x00, 0x23, 0x31, 0x10, 0x27, 0x20, 0x3d, 0x05, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xc4, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x35, 0x34, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x03, 0x35, 0x34, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x07, 0x0e, 0x01, 0x15, 0x14, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x07, 0x1e, 0x03, 0x15, 0x14, 0x0e, 0x02, 0x15, 0x14, 0x16, 0x33, 0x32, 0x16, 0x01, 0x2a, 0x11, 0x1b, 0x21, 0x10, 0x40, 0x36, 0x13, 0x17, 0x1d, 0x17, 0x0c, 0x10, 0x09, 0x11, 0x0c, 0x08, 0x11, 0x10, 0x20, 0x2d, 0x1e, 0x1f, 0x2a, 0x21, 0x18, 0x0e, 0x07, 0x0c, 0x06, 0x0e, 0x15, 0x10, 0x0e, 0x1d, 0x17, 0x0e, 0x09, 0x0c, 0x09, 0x14, 0x17, 0x12, 0x1a, 0x08, 0x13, 0x1a, 0x0f, 0x07, 0x49, 0x3c, 0x25, 0x40, 0x21, 0x26, 0x24, 0x18, 0x1b, 0x1d, 0x11, 0x1b, 0x08, 0x04, 0x1a, 0x1e, 0x1e, 0x09, 0x26, 0x4b, 0x26, 0x1b, 0x34, 0x27, 0x18, 0x1d, 0x22, 0x1a, 0x23, 0x09, 0x05, 0x19, 0x0e, 0x1a, 0x35, 0x1a, 0x0f, 0x2e, 0x2f, 0x26, 0x08, 0x05, 0x15, 0x1c, 0x21, 0x0f, 0x12, 0x27, 0x27, 0x2a, 0x15, 0x14, 0x1f, 0x21, 0x00, 0x00, 0x01, 0x00, 0x33, 0xff, 0xcc, 0x00, 0xaa, 0x02, 0xfc, 0x00, 0x21, 0x00, 0x0d, 0xb3, 0x02, 0x12, 0x18, 0x07, 0x00, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x31, 0x30, 0x13, 0x14, 0x0e, 0x04, 0x23, 0x22, 0x2e, 0x03, 0x34, 0x35, 0x34, 0x26, 0x35, 0x3c, 0x01, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x04, 0x15, 0x16, 0x14, 0xaa, 0x01, 0x03, 0x07, 0x0d, 0x14, 0x0f, 0x0f, 0x14, 0x0d, 0x07, 0x03, 0x02, 0x02, 0x07, 0x0c, 0x15, 0x0f, 0x0d, 0x13, 0x0e, 0x08, 0x05, 0x02, 0x01, 0x01, 0x10, 0x0b, 0x38, 0x48, 0x4e, 0x41, 0x2a, 0x33, 0x50, 0x5f, 0x59, 0x45, 0x0e, 0x26, 0x4b, 0x26, 0x09, 0x2f, 0x3c, 0x40, 0x35, 0x22, 0x35, 0x52, 0x63, 0x5c, 0x4a, 0x0f, 0x13, 0x26, 0x00, 0x00, 0x01, 0x00, 0x00, 0xff, 0xbd, 0x01, 0x06, 0x03, 0x1f, 0x00, 0x41, 0x00, 0x15, 0xb7, 0x13, 0x31, 0x21, 0x00, 0x2d, 0x35, 0x17, 0x0f, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x06, 0x07, 0x0e, 0x03, 0x15, 0x14, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x01, 0x35, 0x34, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x2e, 0x03, 0x35, 0x34, 0x3e, 0x02, 0x35, 0x34, 0x26, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x15, 0x14, 0x16, 0x17, 0x1e, 0x01, 0x01, 0x06, 0x0c, 0x11, 0x09, 0x0f, 0x0b, 0x07, 0x12, 0x10, 0x1f, 0x2d, 0x1e, 0x1f, 0x2a, 0x20, 0x18, 0x0e, 0x08, 0x0d, 0x05, 0x0c, 0x15, 0x0f, 0x0e, 0x1a, 0x16, 0x0d, 0x09, 0x0c, 0x09, 0x14, 0x17, 0x12, 0x1a, 0x11, 0x1b, 0x21, 0x10, 0x3f, 0x36, 0x13, 0x1a, 0x1a, 0x0a, 0x09, 0x01, 0x6e, 0x11, 0x1b, 0x08, 0x05, 0x15, 0x1a, 0x1b, 0x09, 0x26, 0x4b, 0x26, 0x1b, 0x34, 0x27, 0x18, 0x1d, 0x22, 0x1b, 0x22, 0x0a, 0x05, 0x19, 0x0e, 0x1a, 0x35, 0x1b, 0x0f, 0x2a, 0x2a, 0x22, 0x08, 0x04, 0x1a, 0x21, 0x24, 0x0e, 0x12, 0x27, 0x28, 0x29, 0x16, 0x13, 0x1f, 0x21, 0x11, 0x13, 0x1a, 0x10, 0x07, 0x4a, 0x3b, 0x26, 0x40, 0x21, 0x26, 0x31, 0x19, 0x0a, 0x1d, 0x00, 0x01, 0x00, 0x0f, 0x00, 0xcc, 0x01, 0xfc, 0x01, 0x5a, 0x00, 0x26, 0x00, 0x15, 0xb7, 0x00, 0x28, 0x15, 0x27, 0x0e, 0x19, 0x1f, 0x08, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x10, 0xc6, 0x10, 0xc6, 0x31, 0x30, 0x01, 0x14, 0x06, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x01, 0xfc, 0x09, 0x07, 0x0b, 0x27, 0x2d, 0x2b, 0x0d, 0x1c, 0x30, 0x2b, 0x28, 0x13, 0x12, 0x1d, 0x19, 0x16, 0x0b, 0x10, 0x1b, 0x20, 0x2c, 0x30, 0x0f, 0x17, 0x2e, 0x30, 0x33, 0x1d, 0x17, 0x25, 0x1e, 0x16, 0x08, 0x0e, 0x17, 0x01, 0x1f, 0x0a, 0x0e, 0x05, 0x08, 0x13, 0x10, 0x0b, 0x14, 0x18, 0x14, 0x0d, 0x10, 0x0d, 0x16, 0x11, 0x13, 0x1f, 0x14, 0x0b, 0x13, 0x17, 0x13, 0x0c, 0x0f, 0x0c, 0x17, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xf2, 0x02, 0x17, 0x03, 0xba, 0x02, 0x26, 0x00, 0x36, 0x00, 0x00, 0x00, 0x07, 0x00, 0x9f, 0x00, 0x71, 0x00, 0xe1, 0x00, 0x03, 0x00, 0x1a, 0xff, 0xf2, 0x02, 0x17, 0x03, 0x89, 0x00, 0x0e, 0x00, 0x44, 0x00, 0x50, 0x00, 0x2a, 0x40, 0x12, 0x4b, 0x3b, 0x0c, 0x26, 0x30, 0x0e, 0x24, 0x19, 0x45, 0x0f, 0x48, 0x40, 0x1f, 0x2b, 0x25, 0x0d, 0x4e, 0x05, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xc4, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xdd, 0xc5, 0x2f, 0xdd, 0xc5, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x04, 0x07, 0x36, 0x37, 0x13, 0x14, 0x06, 0x07, 0x1e, 0x03, 0x17, 0x1e, 0x01, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x06, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x03, 0x37, 0x2e, 0x01, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x07, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0x01, 0x56, 0x03, 0x0a, 0x15, 0x12, 0x0a, 0x12, 0x0e, 0x0b, 0x08, 0x04, 0x01, 0x3c, 0x3a, 0x31, 0x1b, 0x15, 0x2c, 0x38, 0x23, 0x13, 0x07, 0x0d, 0x12, 0x07, 0x14, 0x22, 0x1c, 0x25, 0x25, 0x10, 0x03, 0x01, 0x48, 0x46, 0x02, 0x0d, 0x1b, 0x2b, 0x1f, 0x18, 0x1b, 0x0e, 0x03, 0x12, 0x0c, 0x09, 0x1e, 0x30, 0x43, 0x2f, 0x17, 0x1d, 0x0f, 0x19, 0x22, 0x13, 0x12, 0x22, 0x1a, 0x0f, 0x29, 0x1e, 0x14, 0x14, 0x1e, 0x1e, 0x14, 0x14, 0x1e, 0x01, 0x87, 0x0c, 0x37, 0x37, 0x2b, 0x1b, 0x29, 0x32, 0x2e, 0x25, 0x08, 0x05, 0x0a, 0x01, 0xc6, 0x1a, 0x28, 0x0b, 0x0e, 0x4d, 0x62, 0x65, 0x24, 0x41, 0x85, 0x43, 0x14, 0x38, 0x33, 0x23, 0x36, 0x4b, 0x4e, 0x17, 0x0c, 0x09, 0x17, 0x44, 0x3f, 0x2e, 0x23, 0x30, 0x33, 0x11, 0x39, 0x6f, 0x37, 0x27, 0x6f, 0x6e, 0x5a, 0x11, 0x0b, 0x2b, 0x1a, 0x13, 0x21, 0x18, 0x0d, 0x0d, 0x18, 0x21, 0x14, 0x15, 0x1b, 0x1b, 0x15, 0x14, 0x1b, 0x1b, 0x00, 0x01, 0x00, 0x05, 0xfe, 0xca, 0x01, 0xd8, 0x02, 0xfa, 0x00, 0x5b, 0x00, 0x26, 0x40, 0x10, 0x51, 0x3b, 0x31, 0x43, 0x0b, 0x25, 0x17, 0x00, 0x4e, 0x36, 0x3d, 0x2c, 0x49, 0x20, 0x14, 0x05, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xc6, 0x01, 0x2f, 0xcd, 0x2f, 0xc4, 0xcd, 0x2f, 0xcd, 0xc4, 0x31, 0x30, 0x05, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x33, 0x32, 0x36, 0x35, 0x34, 0x2e, 0x02, 0x27, 0x26, 0x36, 0x3d, 0x01, 0x2e, 0x03, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x04, 0x23, 0x22, 0x0e, 0x04, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x0f, 0x01, 0x1e, 0x03, 0x01, 0x79, 0x1c, 0x2c, 0x38, 0x1b, 0x14, 0x29, 0x23, 0x1c, 0x07, 0x03, 0x19, 0x0e, 0x0d, 0x11, 0x14, 0x1c, 0x17, 0x14, 0x25, 0x15, 0x1c, 0x1c, 0x07, 0x09, 0x01, 0x34, 0x47, 0x2d, 0x14, 0x10, 0x20, 0x31, 0x42, 0x53, 0x32, 0x31, 0x42, 0x28, 0x10, 0x09, 0x14, 0x20, 0x17, 0x23, 0x22, 0x0e, 0x01, 0x02, 0x0b, 0x12, 0x14, 0x1e, 0x16, 0x0f, 0x09, 0x04, 0x03, 0x10, 0x20, 0x1e, 0x14, 0x26, 0x26, 0x27, 0x14, 0x17, 0x1e, 0x26, 0x39, 0x43, 0x1c, 0x03, 0x10, 0x26, 0x20, 0x16, 0xac, 0x1d, 0x32, 0x25, 0x16, 0x07, 0x11, 0x1c, 0x15, 0x07, 0x07, 0x0f, 0x17, 0x0f, 0x12, 0x0f, 0x19, 0x17, 0x0f, 0x14, 0x10, 0x0e, 0x0a, 0x0c, 0x29, 0x0e, 0x05, 0x10, 0x48, 0x5f, 0x6e, 0x36, 0x2a, 0x64, 0x65, 0x5e, 0x48, 0x2c, 0x31, 0x4b, 0x59, 0x28, 0x13, 0x2a, 0x24, 0x18, 0x19, 0x26, 0x2b, 0x26, 0x19, 0x1d, 0x2e, 0x3a, 0x39, 0x33, 0x10, 0x15, 0x3a, 0x35, 0x25, 0x0a, 0x0d, 0x0a, 0x25, 0x17, 0x1e, 0x37, 0x29, 0x1a, 0x01, 0x0c, 0x06, 0x16, 0x1d, 0x23, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xf3, 0x01, 0xd2, 0x03, 0xbf, 0x02, 0x26, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x9e, 0x00, 0xb8, 0x00, 0xb8, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xf9, 0x02, 0x64, 0x03, 0xb2, 0x02, 0x26, 0x00, 0x43, 0x00, 0x00, 0x00, 0x07, 0x00, 0xd8, 0x00, 0x9a, 0x00, 0xc3, 0xff, 0xff, 0x00, 0x14, 0xff, 0xdf, 0x02, 0x00, 0x03, 0xba, 0x02, 0x26, 0x00, 0x44, 0x00, 0x00, 0x00, 0x07, 0x00, 0x9f, 0x00, 0x5c, 0x00, 0xe1, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xed, 0x02, 0x36, 0x03, 0xba, 0x02, 0x26, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x9f, 0x00, 0x66, 0x00, 0xe1, 0xff, 0xff, 0x00, 0x05, 0xff, 0xe2, 0x01, 0xc7, 0x03, 0x1b, 0x02, 0x26, 0x00, 0x56, 0x00, 0x00, 0x00, 0x07, 0x00, 0x9e, 0x00, 0xa4, 0x00, 0x14, 0xff, 0xff, 0x00, 0x05, 0xff, 0xe2, 0x01, 0xc7, 0x03, 0x14, 0x02, 0x26, 0x00, 0x56, 0x00, 0x00, 0x00, 0x07, 0x00, 0x55, 0x00, 0x85, 0x00, 0x14, 0xff, 0xff, 0x00, 0x05, 0xff, 0xe2, 0x01, 0xc7, 0x03, 0x14, 0x02, 0x26, 0x00, 0x56, 0x00, 0x00, 0x00, 0x06, 0x00, 0xd7, 0x52, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x05, 0xff, 0xe2, 0x01, 0xc7, 0x03, 0x16, 0x02, 0x26, 0x00, 0x56, 0x00, 0x00, 0x00, 0x06, 0x00, 0x9f, 0x33, 0x3d, 0x00, 0x00, 0xff, 0xff, 0x00, 0x05, 0xff, 0xe2, 0x01, 0xc7, 0x03, 0x0e, 0x02, 0x26, 0x00, 0x56, 0x00, 0x00, 0x00, 0x06, 0x00, 0xd8, 0x29, 0x1f, 0x00, 0x00, 0x00, 0x03, 0x00, 0x05, 0xff, 0xe2, 0x01, 0xc7, 0x02, 0xe5, 0x00, 0x0e, 0x00, 0x4e, 0x00, 0x5a, 0x00, 0x2e, 0x40, 0x14, 0x55, 0x45, 0x3d, 0x09, 0x2a, 0x2f, 0x22, 0x00, 0x1a, 0x4f, 0x0f, 0x52, 0x4a, 0x58, 0x35, 0x05, 0x2f, 0x1f, 0x0c, 0x25, 0x00, 0x2f, 0xcd, 0xc4, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xdd, 0xc5, 0xc4, 0x2f, 0xcd, 0xc4, 0x2f, 0xcd, 0x31, 0x30, 0x25, 0x27, 0x22, 0x26, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0x13, 0x14, 0x06, 0x07, 0x1e, 0x01, 0x17, 0x1e, 0x03, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x37, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x34, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x2e, 0x01, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x07, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0x01, 0x27, 0x03, 0x02, 0x04, 0x02, 0x0d, 0x27, 0x24, 0x19, 0x14, 0x0d, 0x16, 0x32, 0x36, 0x1d, 0x17, 0x26, 0x41, 0x12, 0x12, 0x16, 0x0c, 0x04, 0x03, 0x0e, 0x1e, 0x1b, 0x25, 0x28, 0x01, 0x20, 0x51, 0x2a, 0x1d, 0x34, 0x28, 0x18, 0x3b, 0x56, 0x61, 0x26, 0x01, 0x22, 0x1f, 0x19, 0x24, 0x20, 0x20, 0x14, 0x16, 0x1f, 0x1e, 0x2f, 0x3a, 0x1c, 0x13, 0x18, 0x0f, 0x1a, 0x22, 0x13, 0x12, 0x22, 0x1a, 0x0f, 0x29, 0x1e, 0x14, 0x14, 0x1f, 0x1f, 0x14, 0x14, 0x1e, 0xad, 0x44, 0x01, 0x0d, 0x17, 0x1c, 0x0f, 0x0e, 0x0a, 0x17, 0x01, 0xea, 0x1a, 0x2a, 0x0b, 0x0b, 0x30, 0x26, 0x25, 0x53, 0x57, 0x57, 0x29, 0x12, 0x3a, 0x37, 0x28, 0x30, 0x24, 0x1c, 0x20, 0x1c, 0x2c, 0x37, 0x1b, 0x30, 0x48, 0x33, 0x1e, 0x05, 0x05, 0x08, 0x05, 0x1f, 0x26, 0x11, 0x15, 0x11, 0x1c, 0x16, 0x1c, 0x30, 0x25, 0x18, 0x05, 0x0b, 0x28, 0x17, 0x13, 0x21, 0x18, 0x0d, 0x0d, 0x18, 0x21, 0x14, 0x15, 0x1b, 0x1b, 0x15, 0x14, 0x1b, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xfe, 0xe2, 0x01, 0x7f, 0x02, 0x44, 0x00, 0x5d, 0x00, 0x26, 0x40, 0x10, 0x50, 0x3c, 0x31, 0x42, 0x0c, 0x26, 0x18, 0x00, 0x4d, 0x37, 0x3e, 0x2c, 0x48, 0x20, 0x14, 0x05, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xc6, 0x01, 0x2f, 0xcd, 0x2f, 0xc4, 0xcd, 0x2f, 0xcd, 0xc4, 0x31, 0x30, 0x05, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x33, 0x32, 0x36, 0x35, 0x34, 0x2e, 0x02, 0x27, 0x26, 0x34, 0x3d, 0x01, 0x2e, 0x03, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x06, 0x07, 0x0e, 0x01, 0x23, 0x22, 0x27, 0x26, 0x36, 0x2e, 0x01, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x07, 0x15, 0x14, 0x06, 0x07, 0x1e, 0x03, 0x01, 0x55, 0x1c, 0x2c, 0x38, 0x1b, 0x14, 0x29, 0x23, 0x1c, 0x07, 0x03, 0x19, 0x0e, 0x0d, 0x11, 0x14, 0x1c, 0x18, 0x14, 0x24, 0x15, 0x1c, 0x1c, 0x07, 0x08, 0x29, 0x38, 0x22, 0x10, 0x0c, 0x18, 0x26, 0x33, 0x41, 0x28, 0x24, 0x36, 0x23, 0x12, 0x01, 0x03, 0x08, 0x24, 0x17, 0x22, 0x0d, 0x03, 0x01, 0x03, 0x0c, 0x0f, 0x12, 0x20, 0x18, 0x0e, 0x05, 0x0d, 0x17, 0x12, 0x12, 0x1e, 0x1c, 0x1c, 0x11, 0x15, 0x1b, 0x18, 0x26, 0x31, 0x19, 0x01, 0x03, 0x10, 0x26, 0x20, 0x16, 0x93, 0x1d, 0x32, 0x26, 0x16, 0x07, 0x12, 0x1c, 0x15, 0x06, 0x07, 0x10, 0x16, 0x0f, 0x12, 0x0f, 0x1a, 0x16, 0x0f, 0x14, 0x10, 0x0f, 0x0a, 0x0b, 0x2a, 0x0e, 0x0d, 0x09, 0x37, 0x4a, 0x54, 0x26, 0x21, 0x4a, 0x48, 0x42, 0x32, 0x1e, 0x20, 0x34, 0x40, 0x20, 0x08, 0x16, 0x08, 0x14, 0x1d, 0x22, 0x09, 0x1d, 0x1b, 0x14, 0x2b, 0x3c, 0x3d, 0x12, 0x0d, 0x2b, 0x2a, 0x1e, 0x16, 0x1b, 0x16, 0x20, 0x15, 0x1a, 0x2f, 0x26, 0x1c, 0x06, 0x06, 0x06, 0x0f, 0x05, 0x06, 0x15, 0x1d, 0x23, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xfd, 0x01, 0xc1, 0x03, 0x30, 0x02, 0x26, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x9e, 0x00, 0xa4, 0x00, 0x29, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xfd, 0x01, 0xc1, 0x03, 0x1f, 0x02, 0x26, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x55, 0x7b, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xfd, 0x01, 0xc1, 0x03, 0x1e, 0x02, 0x26, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x06, 0x00, 0xd7, 0x66, 0x29, 0x00, 0x00, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xfd, 0x01, 0xc1, 0x03, 0x21, 0x02, 0x26, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x9f, 0x33, 0x48, 0x00, 0x00, 0xff, 0xff, 0x00, 0x24, 0xff, 0xfe, 0x00, 0xf0, 0x03, 0x1b, 0x02, 0x26, 0x00, 0xd6, 0x00, 0x00, 0x00, 0x06, 0x00, 0x9e, 0x3d, 0x14, 0x00, 0x00, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xfe, 0x00, 0xcb, 0x03, 0x14, 0x02, 0x26, 0x00, 0xd6, 0x00, 0x00, 0x00, 0x06, 0x00, 0x55, 0x00, 0x14, 0x00, 0x00, 0xff, 0xff, 0x00, 0x01, 0xff, 0xfe, 0x00, 0xf4, 0x03, 0x14, 0x02, 0x26, 0x00, 0xd6, 0x00, 0x00, 0x00, 0x06, 0x00, 0xd7, 0xe2, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xfe, 0x01, 0x2c, 0x03, 0x16, 0x02, 0x26, 0x00, 0xd6, 0x00, 0x00, 0x00, 0x06, 0x00, 0x9f, 0xc4, 0x3d, 0x00, 0x00, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xe4, 0x01, 0xc4, 0x03, 0x0e, 0x02, 0x26, 0x00, 0x63, 0x00, 0x00, 0x00, 0x06, 0x00, 0xd8, 0x33, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xe3, 0x01, 0xb8, 0x03, 0x11, 0x02, 0x26, 0x00, 0x64, 0x00, 0x00, 0x00, 0x07, 0x00, 0x9e, 0x00, 0xa4, 0x00, 0x0a, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xe3, 0x01, 0xb8, 0x03, 0x14, 0x02, 0x26, 0x00, 0x64, 0x00, 0x00, 0x00, 0x06, 0x00, 0x55, 0x7b, 0x14, 0x00, 0x00, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xe3, 0x01, 0xb8, 0x03, 0x14, 0x02, 0x26, 0x00, 0x64, 0x00, 0x00, 0x00, 0x06, 0x00, 0xd7, 0x52, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xe3, 0x01, 0xb8, 0x03, 0x16, 0x02, 0x26, 0x00, 0x64, 0x00, 0x00, 0x00, 0x06, 0x00, 0x9f, 0x33, 0x3d, 0x00, 0x00, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xe3, 0x01, 0xb8, 0x03, 0x0e, 0x02, 0x26, 0x00, 0x64, 0x00, 0x00, 0x00, 0x06, 0x00, 0xd8, 0x33, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x00, 0x14, 0xff, 0xf2, 0x01, 0xd4, 0x03, 0x07, 0x02, 0x26, 0x00, 0x6a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x9e, 0x00, 0xc3, 0x00, 0x00, 0xff, 0xff, 0x00, 0x14, 0xff, 0xf2, 0x01, 0xd4, 0x03, 0x00, 0x02, 0x26, 0x00, 0x6a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x55, 0x00, 0x85, 0x00, 0x00, 0xff, 0xff, 0x00, 0x14, 0xff, 0xf2, 0x01, 0xd4, 0x03, 0x09, 0x02, 0x26, 0x00, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0xd7, 0x71, 0x14, 0x00, 0x00, 0xff, 0xff, 0x00, 0x14, 0xff, 0xf2, 0x01, 0xd4, 0x03, 0x0c, 0x02, 0x26, 0x00, 0x6a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x9f, 0x3d, 0x33, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x01, 0xec, 0x00, 0xc5, 0x02, 0x9e, 0x00, 0x13, 0x00, 0x1f, 0x00, 0x15, 0xb7, 0x1a, 0x0a, 0x14, 0x00, 0x17, 0x0f, 0x1d, 0x05, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x13, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x07, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0xc5, 0x0f, 0x1a, 0x22, 0x13, 0x13, 0x22, 0x19, 0x0f, 0x0f, 0x19, 0x22, 0x13, 0x13, 0x22, 0x1a, 0x0f, 0x29, 0x1f, 0x14, 0x14, 0x1e, 0x1e, 0x14, 0x14, 0x1f, 0x02, 0x45, 0x13, 0x21, 0x18, 0x0d, 0x0d, 0x18, 0x21, 0x13, 0x13, 0x21, 0x18, 0x0d, 0x0d, 0x18, 0x21, 0x14, 0x14, 0x1c, 0x1c, 0x14, 0x14, 0x1c, 0x1c, 0x00, 0x01, 0x00, 0x0f, 0xff, 0xef, 0x01, 0x99, 0x02, 0xd6, 0x00, 0x4c, 0x00, 0x24, 0x40, 0x0f, 0x1d, 0x08, 0x4c, 0x3a, 0x48, 0x10, 0x37, 0x33, 0x23, 0x0b, 0x42, 0x15, 0x2b, 0x1a, 0x03, 0x00, 0x2f, 0xc6, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x06, 0x23, 0x22, 0x26, 0x27, 0x26, 0x36, 0x2e, 0x01, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x06, 0x15, 0x0e, 0x01, 0x07, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x35, 0x3c, 0x01, 0x27, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x03, 0x37, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x1d, 0x01, 0x1e, 0x03, 0x01, 0x99, 0x28, 0x1d, 0x11, 0x1a, 0x05, 0x03, 0x01, 0x03, 0x0d, 0x12, 0x1a, 0x2b, 0x1e, 0x11, 0x0b, 0x17, 0x22, 0x18, 0x12, 0x1e, 0x1b, 0x1c, 0x11, 0x16, 0x19, 0x1f, 0x30, 0x39, 0x1a, 0x02, 0x02, 0x01, 0x01, 0x04, 0x05, 0x17, 0x0c, 0x0b, 0x18, 0x04, 0x02, 0x46, 0x45, 0x66, 0x61, 0x01, 0x04, 0x05, 0x04, 0x01, 0x0d, 0x1e, 0x0d, 0x15, 0x09, 0x1e, 0x2a, 0x1b, 0x0d, 0x01, 0xc1, 0x1c, 0x2a, 0x11, 0x11, 0x0a, 0x1d, 0x1b, 0x13, 0x24, 0x35, 0x3a, 0x15, 0x13, 0x32, 0x2c, 0x1f, 0x16, 0x1b, 0x17, 0x21, 0x14, 0x1b, 0x37, 0x2c, 0x1b, 0x0b, 0x01, 0x08, 0x15, 0x08, 0x0b, 0x09, 0x0c, 0x0e, 0x0c, 0x18, 0x0d, 0x02, 0x09, 0x02, 0x2e, 0x73, 0x59, 0x6c, 0x9a, 0x31, 0x01, 0x11, 0x15, 0x14, 0x03, 0x20, 0x0d, 0x0e, 0x0e, 0x21, 0x0a, 0x01, 0x06, 0x2a, 0x37, 0x3e, 0x00, 0x01, 0xff, 0xf6, 0x00, 0x31, 0x02, 0x03, 0x02, 0xa0, 0x00, 0x5f, 0x00, 0x30, 0x40, 0x15, 0x16, 0x61, 0x42, 0x51, 0x12, 0x25, 0x56, 0x48, 0x00, 0x30, 0x0b, 0x5b, 0x47, 0x3f, 0x05, 0x2c, 0x35, 0x4c, 0x1d, 0x56, 0x11, 0x00, 0x2f, 0xc5, 0xdd, 0xc5, 0x2f, 0xdd, 0xc6, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xc4, 0x2f, 0xc4, 0xdd, 0xc4, 0x2f, 0xc4, 0x10, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x27, 0x2e, 0x01, 0x23, 0x22, 0x0e, 0x02, 0x1d, 0x01, 0x1e, 0x03, 0x15, 0x14, 0x0e, 0x02, 0x07, 0x06, 0x27, 0x16, 0x17, 0x1e, 0x01, 0x17, 0x1e, 0x01, 0x17, 0x1e, 0x03, 0x33, 0x32, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x3e, 0x01, 0x35, 0x34, 0x27, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x02, 0x03, 0x0a, 0x11, 0x14, 0x0a, 0x13, 0x14, 0x0b, 0x14, 0x34, 0x20, 0x17, 0x1f, 0x13, 0x09, 0x0d, 0x39, 0x39, 0x2b, 0x0e, 0x16, 0x1c, 0x0f, 0x23, 0x2c, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x0e, 0x24, 0x26, 0x24, 0x0e, 0x14, 0x27, 0x14, 0x14, 0x22, 0x26, 0x33, 0x35, 0x0e, 0x12, 0x1f, 0x1d, 0x1d, 0x11, 0x14, 0x25, 0x23, 0x21, 0x0e, 0x1d, 0x20, 0x10, 0x18, 0x1b, 0x0a, 0x06, 0x02, 0x08, 0x0c, 0x29, 0x27, 0x1d, 0x16, 0x20, 0x24, 0x0e, 0x01, 0x17, 0x33, 0x52, 0x3c, 0x1e, 0x48, 0x3d, 0x29, 0x02, 0x08, 0x0a, 0x13, 0x0f, 0x09, 0x14, 0x0e, 0x18, 0x22, 0x17, 0x24, 0x2a, 0x13, 0x10, 0x01, 0x04, 0x0b, 0x15, 0x12, 0x0c, 0x12, 0x0d, 0x07, 0x02, 0x05, 0x02, 0x0f, 0x0d, 0x0b, 0x19, 0x07, 0x11, 0x20, 0x11, 0x03, 0x06, 0x06, 0x04, 0x08, 0x17, 0x18, 0x13, 0x1a, 0x0f, 0x06, 0x08, 0x09, 0x08, 0x09, 0x0a, 0x09, 0x2a, 0x1c, 0x0c, 0x14, 0x0e, 0x09, 0x03, 0x12, 0x20, 0x12, 0x22, 0x23, 0x05, 0x0d, 0x15, 0x11, 0x14, 0x14, 0x09, 0x02, 0x38, 0x5c, 0x42, 0x25, 0x15, 0x27, 0x38, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x14, 0xff, 0xc4, 0x01, 0x8a, 0x03, 0x23, 0x00, 0x45, 0x00, 0x53, 0x00, 0x2a, 0x40, 0x12, 0x3f, 0x2a, 0x4e, 0x15, 0x24, 0x1d, 0x0a, 0x47, 0x35, 0x00, 0x3a, 0x2f, 0x49, 0x27, 0x51, 0x20, 0x18, 0x10, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xc4, 0xcd, 0x2f, 0xcd, 0x2f, 0xc4, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x07, 0x1e, 0x03, 0x15, 0x14, 0x0e, 0x02, 0x2b, 0x01, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x03, 0x35, 0x34, 0x2e, 0x04, 0x35, 0x34, 0x36, 0x37, 0x2e, 0x01, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x3a, 0x01, 0x17, 0x1e, 0x01, 0x15, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x03, 0x15, 0x14, 0x1e, 0x04, 0x07, 0x34, 0x26, 0x27, 0x0e, 0x03, 0x15, 0x14, 0x16, 0x17, 0x3e, 0x01, 0x01, 0x8a, 0x16, 0x24, 0x2e, 0x18, 0x15, 0x22, 0x18, 0x0d, 0x38, 0x50, 0x58, 0x20, 0x08, 0x08, 0x14, 0x12, 0x0d, 0x1b, 0x0e, 0x0d, 0x33, 0x33, 0x25, 0x1f, 0x2e, 0x36, 0x2e, 0x1f, 0x40, 0x36, 0x2d, 0x38, 0x2f, 0x45, 0x51, 0x22, 0x10, 0x22, 0x10, 0x0d, 0x14, 0x0c, 0x12, 0x15, 0x09, 0x0d, 0x2b, 0x2a, 0x1e, 0x20, 0x30, 0x37, 0x30, 0x20, 0x82, 0x24, 0x13, 0x0b, 0x18, 0x13, 0x0c, 0x22, 0x16, 0x16, 0x2b, 0x01, 0xa4, 0x1d, 0x38, 0x30, 0x28, 0x0d, 0x0b, 0x23, 0x2b, 0x2f, 0x17, 0x2c, 0x35, 0x1c, 0x0a, 0x03, 0x08, 0x0d, 0x0b, 0x11, 0x14, 0x05, 0x05, 0x0c, 0x12, 0x1b, 0x13, 0x18, 0x23, 0x1e, 0x20, 0x29, 0x39, 0x28, 0x38, 0x53, 0x0d, 0x16, 0x54, 0x33, 0x2c, 0x36, 0x1d, 0x0a, 0x02, 0x02, 0x0c, 0x10, 0x0b, 0x0d, 0x08, 0x03, 0x02, 0x03, 0x0a, 0x12, 0x1b, 0x13, 0x0e, 0x20, 0x24, 0x27, 0x2b, 0x2f, 0x40, 0x17, 0x26, 0x06, 0x05, 0x0e, 0x13, 0x18, 0x0d, 0x19, 0x2f, 0x0a, 0x0e, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x14, 0x01, 0x23, 0x00, 0xbb, 0x01, 0xd0, 0x00, 0x0b, 0x00, 0x0d, 0xb3, 0x00, 0x06, 0x03, 0x09, 0x00, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x31, 0x30, 0x13, 0x14, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0xbb, 0x2d, 0x25, 0x24, 0x31, 0x2c, 0x27, 0x26, 0x2e, 0x01, 0x75, 0x25, 0x2d, 0x2c, 0x25, 0x24, 0x38, 0x36, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0f, 0xff, 0xe0, 0x02, 0x33, 0x02, 0xe6, 0x00, 0x39, 0x00, 0x44, 0x00, 0x4c, 0x00, 0x2a, 0x40, 0x12, 0x48, 0x29, 0x3f, 0x15, 0x4a, 0x24, 0x42, 0x12, 0x01, 0x45, 0x3a, 0x31, 0x08, 0x1d, 0x4a, 0x42, 0x24, 0x12, 0x00, 0x2f, 0xc0, 0xdd, 0xc4, 0x2f, 0xc0, 0x2f, 0xdd, 0xc4, 0x01, 0x2f, 0xdd, 0xc5, 0x2f, 0xc5, 0xdd, 0xc5, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x15, 0x1c, 0x01, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x04, 0x35, 0x3c, 0x01, 0x37, 0x22, 0x06, 0x07, 0x0e, 0x01, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x03, 0x34, 0x35, 0x2e, 0x03, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x3a, 0x01, 0x1e, 0x01, 0x17, 0x1e, 0x03, 0x27, 0x22, 0x07, 0x16, 0x14, 0x17, 0x3e, 0x01, 0x37, 0x36, 0x34, 0x27, 0x0e, 0x01, 0x15, 0x14, 0x17, 0x3e, 0x01, 0x02, 0x33, 0x04, 0x09, 0x12, 0x1d, 0x16, 0x11, 0x17, 0x10, 0x0a, 0x05, 0x02, 0x01, 0x0c, 0x17, 0x0c, 0x01, 0x02, 0x05, 0x02, 0x05, 0x0f, 0x19, 0x15, 0x16, 0x1d, 0x12, 0x09, 0x03, 0x29, 0x45, 0x33, 0x1d, 0x27, 0x41, 0x54, 0x5b, 0x5a, 0x27, 0x0a, 0x19, 0x1a, 0x16, 0x07, 0x13, 0x15, 0x09, 0x01, 0x9f, 0x1a, 0x1c, 0x08, 0x02, 0x0b, 0x13, 0x0a, 0x02, 0xbc, 0x13, 0x16, 0x21, 0x01, 0x03, 0x01, 0xae, 0x5a, 0x0f, 0x42, 0x53, 0x58, 0x49, 0x2f, 0x24, 0x38, 0x44, 0x40, 0x33, 0x0b, 0x09, 0x13, 0x09, 0x03, 0x01, 0x2a, 0x52, 0x29, 0x0f, 0x34, 0x32, 0x25, 0x28, 0x3e, 0x4c, 0x47, 0x3c, 0x0e, 0x06, 0x1b, 0x2e, 0x41, 0x2d, 0x32, 0x4d, 0x3a, 0x29, 0x19, 0x0b, 0x03, 0x08, 0x07, 0x13, 0x4d, 0x58, 0x54, 0x9b, 0x03, 0x2d, 0x5c, 0x2d, 0x02, 0x03, 0x02, 0x2d, 0x58, 0x02, 0x0d, 0x22, 0x17, 0x26, 0x15, 0x20, 0x41, 0x00, 0x00, 0x00, 0x01, 0xff, 0xdc, 0xff, 0xf5, 0x02, 0x55, 0x03, 0x11, 0x00, 0x59, 0x00, 0x22, 0x40, 0x0e, 0x3e, 0x5a, 0x1d, 0x4e, 0x2a, 0x37, 0x53, 0x16, 0x11, 0x00, 0x20, 0x49, 0x05, 0x2e, 0x00, 0x2f, 0xc4, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xc4, 0x2f, 0xcd, 0x10, 0xc4, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x04, 0x35, 0x34, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x35, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x16, 0x17, 0x1e, 0x01, 0x07, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x2e, 0x01, 0x37, 0x06, 0x22, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x04, 0x02, 0x55, 0x2b, 0x44, 0x54, 0x29, 0x11, 0x22, 0x1c, 0x11, 0x16, 0x22, 0x27, 0x22, 0x16, 0x21, 0x28, 0x21, 0x0e, 0x12, 0x0e, 0x07, 0x0e, 0x15, 0x0d, 0x17, 0x1b, 0x0e, 0x04, 0x02, 0x02, 0x02, 0x05, 0x05, 0x03, 0x29, 0x1e, 0x11, 0x18, 0x0f, 0x08, 0x01, 0x05, 0x06, 0x01, 0x07, 0x0c, 0x08, 0x0e, 0x22, 0x1e, 0x15, 0x1d, 0x2a, 0x2d, 0x10, 0x13, 0x2f, 0x51, 0x3f, 0x29, 0x45, 0x33, 0x1d, 0x09, 0x0b, 0x09, 0x13, 0x1d, 0x22, 0x1d, 0x13, 0xd8, 0x2a, 0x51, 0x3f, 0x26, 0x05, 0x0e, 0x19, 0x14, 0x1c, 0x1f, 0x12, 0x0a, 0x0f, 0x18, 0x16, 0x15, 0x2d, 0x33, 0x3b, 0x23, 0x18, 0x2d, 0x27, 0x21, 0x0d, 0x0c, 0x18, 0x15, 0x0d, 0x2d, 0x3d, 0x3d, 0x10, 0x1b, 0x37, 0x1c, 0x46, 0x91, 0x47, 0x1d, 0x2a, 0x0d, 0x16, 0x1c, 0x0f, 0x3c, 0x79, 0x3d, 0x01, 0x06, 0x0f, 0x19, 0x12, 0x14, 0x1c, 0x12, 0x09, 0x02, 0x12, 0x33, 0x70, 0x5e, 0x3d, 0x1e, 0x33, 0x46, 0x28, 0x15, 0x29, 0x29, 0x28, 0x15, 0x15, 0x1f, 0x1c, 0x1b, 0x22, 0x2c, 0x00, 0x00, 0x04, 0x00, 0x14, 0x00, 0xab, 0x02, 0x35, 0x02, 0xfe, 0x00, 0x13, 0x00, 0x27, 0x00, 0x54, 0x00, 0x62, 0x00, 0x2e, 0x40, 0x14, 0x5e, 0x3c, 0x44, 0x55, 0x30, 0x28, 0x1e, 0x0a, 0x14, 0x00, 0x3c, 0x5f, 0x58, 0x52, 0x32, 0x41, 0x19, 0x0f, 0x23, 0x05, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xc4, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xc4, 0xcd, 0x2f, 0xdd, 0xc5, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x07, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x27, 0x14, 0x06, 0x07, 0x1e, 0x03, 0x15, 0x14, 0x06, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x2e, 0x01, 0x27, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x35, 0x34, 0x26, 0x35, 0x3c, 0x01, 0x37, 0x3e, 0x03, 0x33, 0x32, 0x16, 0x07, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x1e, 0x01, 0x07, 0x3e, 0x03, 0x02, 0x35, 0x2b, 0x4d, 0x69, 0x3e, 0x3a, 0x5f, 0x44, 0x25, 0x2b, 0x4d, 0x6a, 0x3e, 0x3a, 0x5e, 0x44, 0x25, 0x44, 0x1b, 0x33, 0x47, 0x2b, 0x2f, 0x50, 0x39, 0x20, 0x1c, 0x32, 0x47, 0x2c, 0x2f, 0x4f, 0x39, 0x20, 0x46, 0x25, 0x17, 0x07, 0x10, 0x0e, 0x0a, 0x18, 0x11, 0x0b, 0x11, 0x0c, 0x08, 0x03, 0x05, 0x0a, 0x07, 0x24, 0x01, 0x03, 0x0a, 0x14, 0x10, 0x1b, 0x0d, 0x08, 0x03, 0x02, 0x04, 0x27, 0x2e, 0x2c, 0x08, 0x2b, 0x3e, 0x60, 0x0e, 0x0d, 0x0a, 0x15, 0x09, 0x01, 0x01, 0x01, 0x09, 0x16, 0x15, 0x0e, 0x01, 0xe6, 0x3b, 0x72, 0x58, 0x36, 0x2e, 0x4e, 0x65, 0x37, 0x3b, 0x71, 0x59, 0x36, 0x2e, 0x4e, 0x65, 0x3a, 0x29, 0x4d, 0x3b, 0x23, 0x29, 0x43, 0x56, 0x2c, 0x29, 0x4d, 0x3b, 0x23, 0x29, 0x43, 0x56, 0x64, 0x1e, 0x2d, 0x0e, 0x09, 0x18, 0x1b, 0x1c, 0x0c, 0x11, 0x12, 0x0b, 0x12, 0x14, 0x09, 0x0b, 0x14, 0x0a, 0x0c, 0x0c, 0x1f, 0x1b, 0x13, 0x26, 0x15, 0x1a, 0x32, 0x1a, 0x17, 0x2f, 0x17, 0x05, 0x0f, 0x05, 0x07, 0x0f, 0x0c, 0x07, 0x30, 0x33, 0x0c, 0x09, 0x06, 0x04, 0x10, 0x1f, 0x11, 0x02, 0x09, 0x0d, 0x12, 0x00, 0x00, 0x03, 0x00, 0x14, 0x00, 0xa6, 0x02, 0x35, 0x02, 0xfa, 0x00, 0x13, 0x00, 0x27, 0x00, 0x4f, 0x00, 0x2c, 0x40, 0x13, 0x34, 0x48, 0x40, 0x2e, 0x28, 0x1e, 0x0a, 0x14, 0x00, 0x30, 0x4d, 0x3a, 0x45, 0x3d, 0x2b, 0x19, 0x0f, 0x23, 0x05, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xc6, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0xc4, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x07, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x27, 0x14, 0x06, 0x23, 0x22, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x02, 0x35, 0x2b, 0x4d, 0x69, 0x3e, 0x3a, 0x5f, 0x44, 0x25, 0x2b, 0x4d, 0x6a, 0x3e, 0x3a, 0x5e, 0x44, 0x25, 0x44, 0x1b, 0x33, 0x47, 0x2b, 0x2f, 0x50, 0x39, 0x20, 0x1c, 0x32, 0x47, 0x2c, 0x2f, 0x4f, 0x39, 0x20, 0x54, 0x1b, 0x16, 0x1e, 0x11, 0x02, 0x02, 0x0f, 0x11, 0x16, 0x0e, 0x05, 0x03, 0x09, 0x13, 0x0f, 0x17, 0x2b, 0x17, 0x0b, 0x15, 0x1a, 0x24, 0x27, 0x0c, 0x48, 0x50, 0x19, 0x2d, 0x3f, 0x26, 0x32, 0x32, 0x01, 0xe1, 0x3b, 0x72, 0x58, 0x36, 0x2e, 0x4e, 0x65, 0x37, 0x3c, 0x71, 0x59, 0x36, 0x2e, 0x4e, 0x66, 0x39, 0x29, 0x4c, 0x3b, 0x23, 0x29, 0x43, 0x55, 0x2c, 0x29, 0x4d, 0x3b, 0x23, 0x29, 0x42, 0x56, 0x6a, 0x16, 0x20, 0x17, 0x1d, 0x17, 0x1a, 0x24, 0x26, 0x0c, 0x0d, 0x1a, 0x16, 0x0e, 0x0e, 0x0d, 0x0d, 0x0f, 0x19, 0x12, 0x09, 0x56, 0x47, 0x23, 0x47, 0x39, 0x23, 0x40, 0x00, 0x00, 0x00, 0x02, 0xff, 0xf6, 0x00, 0x26, 0x01, 0xc7, 0x02, 0x08, 0x00, 0x38, 0x00, 0x4c, 0x00, 0x26, 0x40, 0x10, 0x1d, 0x28, 0x3e, 0x23, 0x48, 0x06, 0x0b, 0x00, 0x39, 0x30, 0x36, 0x2b, 0x0e, 0x1a, 0x43, 0x14, 0x00, 0x2f, 0xcd, 0x2f, 0xc4, 0x2f, 0xc4, 0x2f, 0xcd, 0x01, 0x2f, 0xc4, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x06, 0x0f, 0x01, 0x16, 0x07, 0x06, 0x07, 0x1e, 0x01, 0x15, 0x14, 0x06, 0x23, 0x22, 0x26, 0x27, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x27, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x37, 0x2e, 0x01, 0x35, 0x34, 0x37, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x17, 0x36, 0x33, 0x32, 0x16, 0x17, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x07, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x34, 0x2e, 0x02, 0x01, 0xc7, 0x1d, 0x13, 0x13, 0x08, 0x03, 0x01, 0x10, 0x13, 0x1c, 0x1d, 0x17, 0x14, 0x28, 0x14, 0x10, 0x24, 0x15, 0x1a, 0x2d, 0x13, 0x1b, 0x28, 0x16, 0x17, 0x1a, 0x26, 0x1c, 0x02, 0x02, 0x07, 0x16, 0x24, 0x1e, 0x1a, 0x18, 0x2c, 0x13, 0x25, 0x32, 0x1a, 0x29, 0x11, 0x1c, 0x2b, 0x1b, 0x14, 0x16, 0xe6, 0x0f, 0x17, 0x0f, 0x08, 0x09, 0x10, 0x17, 0x0f, 0x10, 0x16, 0x0e, 0x06, 0x08, 0x0f, 0x16, 0x01, 0xdd, 0x1c, 0x36, 0x18, 0x1a, 0x27, 0x20, 0x2d, 0x2f, 0x1a, 0x36, 0x12, 0x11, 0x1d, 0x14, 0x0e, 0x08, 0x0a, 0x11, 0x0f, 0x17, 0x13, 0x1b, 0x12, 0x19, 0x45, 0x26, 0x0b, 0x18, 0x0b, 0x22, 0x1f, 0x25, 0x50, 0x1a, 0x15, 0x18, 0x1b, 0x15, 0x1a, 0x0e, 0x0c, 0x19, 0x15, 0x1b, 0x72, 0x16, 0x1f, 0x24, 0x0d, 0x11, 0x25, 0x20, 0x15, 0x14, 0x20, 0x24, 0x11, 0x10, 0x24, 0x1f, 0x15, 0x00, 0x00, 0x01, 0x00, 0x1f, 0x02, 0x75, 0x00, 0xb3, 0x03, 0x07, 0x00, 0x14, 0x00, 0x0d, 0xb3, 0x0d, 0x00, 0x0a, 0x12, 0x00, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x31, 0x30, 0x13, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0xb3, 0x0c, 0x11, 0x14, 0x08, 0x07, 0x11, 0x13, 0x13, 0x09, 0x08, 0x0c, 0x17, 0x22, 0x26, 0x10, 0x0e, 0x17, 0x02, 0xe1, 0x0b, 0x15, 0x12, 0x0f, 0x06, 0x05, 0x0d, 0x0b, 0x08, 0x09, 0x09, 0x0f, 0x2b, 0x29, 0x1d, 0x17, 0x00, 0x02, 0x00, 0x1f, 0x02, 0x4e, 0x01, 0x68, 0x02, 0xd9, 0x00, 0x0b, 0x00, 0x17, 0x00, 0x15, 0xb7, 0x12, 0x0c, 0x00, 0x06, 0x0f, 0x15, 0x03, 0x09, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x07, 0x14, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x01, 0x68, 0x26, 0x1d, 0x1c, 0x29, 0x25, 0x1f, 0x1e, 0x26, 0xc1, 0x27, 0x1d, 0x1c, 0x28, 0x24, 0x1f, 0x1e, 0x27, 0x02, 0x92, 0x1d, 0x22, 0x21, 0x1d, 0x1e, 0x2a, 0x29, 0x23, 0x1d, 0x22, 0x21, 0x1d, 0x1e, 0x2a, 0x29, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x1a, 0x00, 0x06, 0x03, 0x3e, 0x02, 0xf3, 0x00, 0x6e, 0x00, 0x7f, 0x00, 0x32, 0x40, 0x16, 0x00, 0x81, 0x7d, 0x12, 0x47, 0x67, 0x39, 0x52, 0x7a, 0x17, 0x24, 0x16, 0x7c, 0x5e, 0x47, 0x3f, 0x30, 0x74, 0x2b, 0x68, 0x1f, 0x0a, 0x00, 0x2f, 0xc4, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xdd, 0xc4, 0x2f, 0xc4, 0x2f, 0xc4, 0xdd, 0xc4, 0x10, 0xc6, 0x31, 0x30, 0x25, 0x14, 0x06, 0x07, 0x0e, 0x05, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x2e, 0x01, 0x34, 0x36, 0x35, 0x0e, 0x01, 0x07, 0x0e, 0x03, 0x07, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x17, 0x1e, 0x02, 0x36, 0x33, 0x3a, 0x01, 0x1e, 0x03, 0x15, 0x14, 0x06, 0x07, 0x0e, 0x01, 0x07, 0x1e, 0x01, 0x17, 0x14, 0x16, 0x15, 0x14, 0x17, 0x16, 0x17, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x17, 0x1e, 0x01, 0x15, 0x14, 0x06, 0x07, 0x0e, 0x03, 0x07, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x16, 0x15, 0x14, 0x06, 0x15, 0x14, 0x16, 0x33, 0x16, 0x36, 0x3b, 0x01, 0x1e, 0x01, 0x01, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x04, 0x07, 0x36, 0x37, 0x36, 0x34, 0x03, 0x3e, 0x1b, 0x15, 0x08, 0x2f, 0x3f, 0x49, 0x43, 0x37, 0x0d, 0x0e, 0x1a, 0x17, 0x11, 0x04, 0x05, 0x03, 0x01, 0x27, 0x4e, 0x26, 0x02, 0x07, 0x0c, 0x11, 0x0a, 0x0e, 0x21, 0x15, 0x18, 0x1b, 0x0e, 0x03, 0x0e, 0x1d, 0x2e, 0x3f, 0x52, 0x34, 0x52, 0x35, 0x04, 0x1b, 0x21, 0x1e, 0x08, 0x0d, 0x32, 0x3a, 0x3c, 0x31, 0x1f, 0x25, 0x17, 0x3a, 0x81, 0x3b, 0x05, 0x09, 0x02, 0x01, 0x01, 0x19, 0x15, 0x12, 0x22, 0x06, 0x16, 0x2e, 0x17, 0x18, 0x1b, 0x0d, 0x0f, 0x0e, 0x29, 0x2b, 0x2a, 0x10, 0x02, 0x10, 0x12, 0x0e, 0x01, 0x01, 0x04, 0x08, 0x36, 0x6b, 0x36, 0x12, 0x17, 0x1c, 0xfe, 0x2e, 0x03, 0x0b, 0x15, 0x12, 0x0a, 0x14, 0x13, 0x10, 0x0c, 0x09, 0x01, 0x45, 0x45, 0x02, 0x76, 0x18, 0x1e, 0x08, 0x03, 0x09, 0x0a, 0x0a, 0x08, 0x05, 0x04, 0x0a, 0x12, 0x0e, 0x10, 0x2c, 0x2f, 0x2d, 0x11, 0x05, 0x0a, 0x05, 0x0f, 0x2d, 0x2f, 0x29, 0x0c, 0x0e, 0x1a, 0x23, 0x30, 0x34, 0x11, 0x2b, 0x79, 0x85, 0x83, 0x68, 0x41, 0x38, 0x04, 0x03, 0x01, 0x01, 0x03, 0x09, 0x12, 0x1d, 0x16, 0x1a, 0x1c, 0x05, 0x0d, 0x02, 0x03, 0x17, 0x2f, 0x17, 0x05, 0x0f, 0x06, 0x08, 0x07, 0x01, 0x01, 0x01, 0x01, 0x01, 0x05, 0x05, 0x23, 0x18, 0x0f, 0x18, 0x04, 0x04, 0x06, 0x04, 0x04, 0x01, 0x02, 0x03, 0x04, 0x03, 0x08, 0x13, 0x09, 0x0b, 0x19, 0x0b, 0x01, 0x01, 0x02, 0x06, 0x02, 0x1e, 0x01, 0x04, 0x0c, 0x37, 0x39, 0x2c, 0x1b, 0x29, 0x32, 0x2f, 0x26, 0x08, 0x06, 0x09, 0x07, 0x0d, 0x00, 0x00, 0x02, 0x00, 0x14, 0xff, 0xa1, 0x02, 0x00, 0x03, 0x21, 0x00, 0x28, 0x00, 0x3c, 0x00, 0x1e, 0x40, 0x0c, 0x2d, 0x14, 0x1a, 0x39, 0x00, 0x07, 0x29, 0x25, 0x20, 0x33, 0x0f, 0x0b, 0x00, 0x2f, 0xc6, 0xcd, 0x2f, 0xc6, 0xcd, 0x01, 0x2f, 0xc4, 0xcd, 0x2f, 0xc6, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x06, 0x07, 0x1e, 0x01, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x27, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x37, 0x2e, 0x01, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x17, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x07, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x34, 0x2e, 0x02, 0x01, 0xf2, 0x13, 0x10, 0x1a, 0x17, 0x1f, 0x3f, 0x5f, 0x40, 0x37, 0x2b, 0x1a, 0x2b, 0x10, 0x08, 0x0b, 0x06, 0x02, 0x10, 0x0d, 0x1d, 0x1d, 0x1f, 0x40, 0x62, 0x44, 0x1f, 0x33, 0x16, 0x1a, 0x2d, 0x11, 0x10, 0x09, 0xe3, 0x13, 0x1b, 0x12, 0x08, 0x09, 0x12, 0x1b, 0x13, 0x16, 0x1a, 0x0f, 0x05, 0x07, 0x10, 0x1a, 0x02, 0xf8, 0x1a, 0x4a, 0x2b, 0x39, 0x8b, 0x45, 0x4e, 0x8b, 0x6a, 0x3e, 0x1a, 0x27, 0x31, 0x0a, 0x0f, 0x11, 0x06, 0x18, 0x41, 0x26, 0x34, 0x87, 0x4b, 0x46, 0x90, 0x74, 0x4a, 0x10, 0x0e, 0x26, 0x2f, 0x1e, 0xf6, 0x1e, 0x31, 0x3d, 0x1f, 0x23, 0x46, 0x38, 0x22, 0x2c, 0x3e, 0x42, 0x16, 0x1b, 0x3c, 0x33, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x02, 0x1f, 0x02, 0xb7, 0x00, 0x57, 0x00, 0x3c, 0x40, 0x1b, 0x00, 0x59, 0x48, 0x58, 0x3c, 0x2f, 0x42, 0x35, 0x2a, 0x08, 0x13, 0x1e, 0x2a, 0x0d, 0x18, 0x23, 0x59, 0x54, 0x4b, 0x35, 0x13, 0x2a, 0x1e, 0x36, 0x12, 0x42, 0x08, 0x00, 0x2f, 0xc5, 0xdd, 0xc0, 0x2f, 0xc5, 0xdd, 0xc5, 0x2f, 0xc6, 0x10, 0xc6, 0x01, 0x2f, 0xc4, 0x2f, 0xdd, 0xd0, 0xc0, 0x10, 0xd5, 0xc4, 0x2f, 0xc4, 0x10, 0xc0, 0x10, 0xc0, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x04, 0x07, 0x15, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x06, 0x07, 0x06, 0x0f, 0x01, 0x1e, 0x01, 0x17, 0x16, 0x15, 0x14, 0x06, 0x07, 0x0e, 0x01, 0x07, 0x06, 0x14, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x37, 0x2e, 0x01, 0x27, 0x26, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x01, 0x33, 0x37, 0x2e, 0x01, 0x27, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x01, 0x3f, 0x01, 0x2e, 0x03, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x3e, 0x03, 0x33, 0x32, 0x16, 0x02, 0x1f, 0x18, 0x26, 0x2f, 0x2e, 0x29, 0x0c, 0x08, 0x20, 0x20, 0x18, 0x10, 0x0b, 0x22, 0x21, 0x02, 0x0d, 0x2b, 0x0d, 0x14, 0x0f, 0x0c, 0x0f, 0x20, 0x0f, 0x01, 0x0d, 0x20, 0x1f, 0x17, 0x1c, 0x0f, 0x05, 0x03, 0x10, 0x29, 0x0f, 0x16, 0x10, 0x0c, 0x10, 0x23, 0x10, 0x04, 0x12, 0x2d, 0x11, 0x0a, 0x0c, 0x14, 0x0b, 0x11, 0x27, 0x13, 0x02, 0x18, 0x45, 0x3f, 0x2d, 0x17, 0x13, 0x17, 0x3f, 0x41, 0x3a, 0x12, 0x11, 0x40, 0x46, 0x41, 0x12, 0x11, 0x17, 0x02, 0x8d, 0x12, 0x2b, 0x2f, 0x2f, 0x29, 0x22, 0x09, 0x37, 0x01, 0x06, 0x0f, 0x0d, 0x0b, 0x0a, 0x02, 0x07, 0x01, 0x2d, 0x02, 0x03, 0x05, 0x07, 0x11, 0x0c, 0x0f, 0x02, 0x03, 0x02, 0x01, 0x16, 0x36, 0x2f, 0x20, 0x16, 0x21, 0x28, 0x12, 0x15, 0x14, 0x01, 0x04, 0x05, 0x08, 0x14, 0x0c, 0x0c, 0x02, 0x02, 0x01, 0x30, 0x02, 0x05, 0x05, 0x03, 0x0c, 0x0b, 0x0d, 0x0a, 0x02, 0x02, 0x01, 0x01, 0x2b, 0x14, 0x38, 0x41, 0x46, 0x21, 0x13, 0x15, 0x26, 0x35, 0x35, 0x0f, 0x0e, 0x38, 0x37, 0x2a, 0x19, 0x00, 0x00, 0x01, 0x00, 0x15, 0xff, 0x83, 0x01, 0x4e, 0x01, 0x84, 0x00, 0x37, 0x00, 0x1a, 0x40, 0x0a, 0x2b, 0x36, 0x25, 0x0a, 0x14, 0x33, 0x1d, 0x29, 0x0f, 0x07, 0x00, 0x2f, 0xc4, 0xcd, 0x2f, 0xc4, 0x01, 0x2f, 0xdd, 0xc5, 0x2f, 0xcd, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x04, 0x23, 0x22, 0x26, 0x27, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x03, 0x34, 0x35, 0x3c, 0x01, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x03, 0x14, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x3c, 0x01, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x01, 0x14, 0x01, 0x4e, 0x02, 0x09, 0x0f, 0x1b, 0x27, 0x1c, 0x1d, 0x38, 0x08, 0x03, 0x0a, 0x13, 0x12, 0x0d, 0x11, 0x0b, 0x06, 0x03, 0x02, 0x07, 0x0e, 0x17, 0x11, 0x0b, 0x0f, 0x09, 0x03, 0x02, 0x07, 0x0f, 0x1b, 0x15, 0x16, 0x18, 0x0c, 0x03, 0x06, 0x10, 0x11, 0x10, 0x11, 0x07, 0xf8, 0x14, 0x37, 0x39, 0x38, 0x2d, 0x1b, 0x1f, 0x1d, 0x09, 0x39, 0x3c, 0x2f, 0x1b, 0x2a, 0x34, 0x30, 0x28, 0x09, 0x0f, 0x38, 0x42, 0x44, 0x37, 0x23, 0x14, 0x20, 0x26, 0x24, 0x1e, 0x07, 0x0f, 0x2b, 0x27, 0x1c, 0x32, 0x43, 0x41, 0x0f, 0x0b, 0x1e, 0x1c, 0x13, 0x22, 0x2e, 0x2e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0f, 0x00, 0xd8, 0x01, 0x8d, 0x02, 0xdf, 0x00, 0x31, 0x00, 0x3e, 0x00, 0x22, 0x40, 0x0e, 0x39, 0x23, 0x10, 0x18, 0x08, 0x32, 0x00, 0x1b, 0x28, 0x33, 0x15, 0x3c, 0x05, 0x0b, 0x00, 0x2f, 0xc4, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xdd, 0xc5, 0xc4, 0x2f, 0xc4, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x37, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x34, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x1e, 0x03, 0x07, 0x27, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0x01, 0x8d, 0x02, 0x0c, 0x19, 0x17, 0x20, 0x22, 0x01, 0x1b, 0x45, 0x24, 0x18, 0x2c, 0x23, 0x14, 0x32, 0x49, 0x53, 0x20, 0x01, 0x1d, 0x1a, 0x15, 0x20, 0x1b, 0x1b, 0x10, 0x14, 0x19, 0x21, 0x32, 0x3a, 0x19, 0x17, 0x2e, 0x29, 0x21, 0x0a, 0x0f, 0x12, 0x0b, 0x03, 0x88, 0x02, 0x07, 0x0b, 0x20, 0x1e, 0x16, 0x11, 0x0a, 0x13, 0x2b, 0x01, 0x6a, 0x0f, 0x32, 0x2f, 0x22, 0x29, 0x1f, 0x18, 0x1b, 0x17, 0x26, 0x2e, 0x18, 0x28, 0x3e, 0x2b, 0x19, 0x05, 0x04, 0x07, 0x04, 0x1a, 0x20, 0x0e, 0x12, 0x0e, 0x17, 0x13, 0x1c, 0x2e, 0x20, 0x11, 0x0c, 0x16, 0x21, 0x16, 0x20, 0x46, 0x4a, 0x4a, 0x07, 0x39, 0x0b, 0x12, 0x18, 0x0d, 0x0b, 0x09, 0x13, 0x00, 0x02, 0x00, 0x14, 0x00, 0xcb, 0x01, 0x7c, 0x02, 0xec, 0x00, 0x13, 0x00, 0x27, 0x00, 0x15, 0xb7, 0x1f, 0x0a, 0x16, 0x00, 0x19, 0x0f, 0x23, 0x05, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x07, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x01, 0x7c, 0x16, 0x2d, 0x44, 0x2e, 0x2a, 0x43, 0x2e, 0x18, 0x16, 0x2d, 0x46, 0x30, 0x2f, 0x43, 0x2a, 0x13, 0x75, 0x07, 0x0f, 0x17, 0x11, 0x10, 0x17, 0x0e, 0x06, 0x08, 0x11, 0x18, 0x11, 0x11, 0x16, 0x0c, 0x04, 0x01, 0xd3, 0x26, 0x5b, 0x51, 0x36, 0x38, 0x52, 0x5b, 0x23, 0x27, 0x62, 0x56, 0x3a, 0x3c, 0x57, 0x61, 0x24, 0x0c, 0x32, 0x32, 0x25, 0x23, 0x2f, 0x2e, 0x0b, 0x0d, 0x33, 0x33, 0x26, 0x24, 0x2f, 0x30, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x05, 0xff, 0xee, 0x03, 0x3b, 0x02, 0x60, 0x00, 0x54, 0x00, 0x64, 0x00, 0x72, 0x00, 0x38, 0x40, 0x19, 0x4a, 0x60, 0x20, 0x13, 0x65, 0x5f, 0x55, 0x00, 0x45, 0x6e, 0x2e, 0x1b, 0x5f, 0x4a, 0x58, 0x40, 0x27, 0x33, 0x68, 0x21, 0x70, 0x10, 0x16, 0x4d, 0x08, 0x00, 0x2f, 0xcd, 0x2f, 0xc4, 0xcd, 0x2f, 0xc4, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xc4, 0xcd, 0x2f, 0xc4, 0xcd, 0x2f, 0xdd, 0xc5, 0xc4, 0x2f, 0xc5, 0x31, 0x30, 0x25, 0x14, 0x06, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x26, 0x27, 0x0e, 0x03, 0x23, 0x22, 0x26, 0x37, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x34, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x1e, 0x01, 0x17, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x07, 0x1e, 0x01, 0x33, 0x32, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x27, 0x34, 0x26, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x16, 0x33, 0x32, 0x3e, 0x02, 0x05, 0x27, 0x26, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0x03, 0x3b, 0x0e, 0x09, 0x0f, 0x29, 0x32, 0x37, 0x1d, 0x35, 0x54, 0x1c, 0x03, 0x0d, 0x12, 0x16, 0x0c, 0x25, 0x28, 0x01, 0x20, 0x51, 0x2a, 0x1d, 0x34, 0x28, 0x18, 0x3b, 0x56, 0x61, 0x26, 0x01, 0x22, 0x1f, 0x19, 0x24, 0x20, 0x20, 0x14, 0x16, 0x1f, 0x29, 0x3c, 0x47, 0x1e, 0x1b, 0x37, 0x2f, 0x24, 0x09, 0x09, 0x0b, 0x09, 0x0e, 0x28, 0x34, 0x43, 0x29, 0x21, 0x39, 0x29, 0x18, 0x28, 0x42, 0x56, 0x2e, 0x04, 0x27, 0x1b, 0x14, 0x26, 0x24, 0x23, 0x12, 0x14, 0x1f, 0x96, 0x13, 0x14, 0x19, 0x23, 0x17, 0x0b, 0x01, 0x04, 0x15, 0x2d, 0x25, 0x19, 0xfe, 0x82, 0x03, 0x03, 0x05, 0x0d, 0x27, 0x24, 0x19, 0x14, 0x0d, 0x16, 0x32, 0xa4, 0x11, 0x23, 0x0e, 0x18, 0x2a, 0x1f, 0x13, 0x37, 0x2b, 0x09, 0x1c, 0x1b, 0x13, 0x30, 0x24, 0x1c, 0x21, 0x1c, 0x2c, 0x37, 0x1c, 0x30, 0x48, 0x33, 0x1e, 0x05, 0x05, 0x08, 0x04, 0x1f, 0x27, 0x11, 0x14, 0x11, 0x1b, 0x17, 0x22, 0x36, 0x25, 0x13, 0x0c, 0x19, 0x28, 0x1b, 0x1b, 0x38, 0x1b, 0x22, 0x43, 0x33, 0x20, 0x14, 0x26, 0x37, 0x22, 0x30, 0x52, 0x3d, 0x25, 0x02, 0x1d, 0x1b, 0x14, 0x19, 0x14, 0x1a, 0xdc, 0x12, 0x1c, 0x1a, 0x27, 0x2f, 0x14, 0x02, 0x0c, 0x0e, 0x1a, 0x25, 0xb4, 0x42, 0x01, 0x0d, 0x17, 0x1c, 0x0f, 0x0d, 0x0a, 0x17, 0x00, 0x00, 0x02, 0x00, 0x0f, 0xff, 0x99, 0x01, 0xb8, 0x02, 0x7d, 0x00, 0x25, 0x00, 0x39, 0x00, 0x1e, 0x40, 0x0c, 0x2a, 0x12, 0x19, 0x36, 0x00, 0x06, 0x26, 0x23, 0x1e, 0x30, 0x10, 0x0b, 0x00, 0x2f, 0xc4, 0xcd, 0x2f, 0xc4, 0xcd, 0x01, 0x2f, 0xc4, 0xcd, 0x2f, 0xc4, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x06, 0x07, 0x1e, 0x01, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x27, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x37, 0x2e, 0x01, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x17, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x07, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x34, 0x2e, 0x02, 0x01, 0xa5, 0x10, 0x0e, 0x1b, 0x16, 0x03, 0x03, 0x1b, 0x34, 0x50, 0x37, 0x25, 0x1e, 0x18, 0x2a, 0x0e, 0x0e, 0x09, 0x0f, 0x0c, 0x1f, 0x1f, 0x1a, 0x36, 0x54, 0x3a, 0x2f, 0x25, 0x17, 0x29, 0x0f, 0x0e, 0x07, 0xbf, 0x0f, 0x17, 0x0f, 0x08, 0x09, 0x10, 0x17, 0x0f, 0x10, 0x17, 0x0e, 0x06, 0x08, 0x0f, 0x17, 0x02, 0x5b, 0x16, 0x3f, 0x24, 0x2f, 0x71, 0x32, 0x35, 0x6c, 0x56, 0x36, 0x0f, 0x27, 0x32, 0x1d, 0x0b, 0x15, 0x3b, 0x22, 0x2c, 0x71, 0x36, 0x35, 0x71, 0x5d, 0x3b, 0x17, 0x23, 0x2d, 0x19, 0xbd, 0x20, 0x2e, 0x33, 0x13, 0x18, 0x38, 0x2f, 0x1f, 0x1e, 0x2e, 0x37, 0x18, 0x16, 0x35, 0x2e, 0x1e, 0x00, 0x00, 0x02, 0x00, 0x14, 0xff, 0xf3, 0x01, 0xdd, 0x02, 0xef, 0x00, 0x0f, 0x00, 0x42, 0x00, 0x22, 0x40, 0x0e, 0x10, 0x44, 0x2c, 0x20, 0x35, 0x1a, 0x00, 0x08, 0x40, 0x3b, 0x15, 0x27, 0x05, 0x0d, 0x00, 0x2f, 0xdd, 0xc6, 0x2f, 0xdd, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x10, 0xc6, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x13, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x2e, 0x01, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x17, 0x1e, 0x01, 0x15, 0x14, 0x16, 0x0e, 0x01, 0x07, 0x0e, 0x03, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x01, 0x49, 0x11, 0x1a, 0x1f, 0x0e, 0x17, 0x27, 0x10, 0x1a, 0x1e, 0x0f, 0x16, 0x29, 0x94, 0x2d, 0x42, 0x4b, 0x1d, 0x2a, 0x56, 0x46, 0x2c, 0x23, 0x33, 0x3b, 0x19, 0x03, 0x01, 0x02, 0x0b, 0x19, 0x17, 0x2b, 0x0c, 0x08, 0x02, 0x01, 0x01, 0x06, 0x06, 0x0a, 0x2c, 0x2d, 0x22, 0x10, 0x19, 0x20, 0x10, 0x25, 0x2c, 0x1f, 0x1b, 0x14, 0x17, 0x27, 0x02, 0xbf, 0x0f, 0x19, 0x12, 0x09, 0x18, 0x1a, 0x10, 0x19, 0x10, 0x08, 0x17, 0xfd, 0xa4, 0x26, 0x34, 0x21, 0x0e, 0x23, 0x3c, 0x4f, 0x2c, 0x1f, 0x37, 0x2d, 0x22, 0x0a, 0x17, 0x2e, 0x18, 0x10, 0x2c, 0x27, 0x1b, 0x29, 0x1a, 0x3d, 0x1a, 0x0b, 0x29, 0x2b, 0x25, 0x09, 0x0e, 0x17, 0x1b, 0x22, 0x17, 0x11, 0x1c, 0x14, 0x0a, 0x17, 0x1d, 0x17, 0x22, 0x00, 0x02, 0x00, 0x1e, 0xff, 0xde, 0x00, 0xdb, 0x02, 0xf9, 0x00, 0x0f, 0x00, 0x2b, 0x00, 0x18, 0x40, 0x09, 0x11, 0x1c, 0x00, 0x08, 0x17, 0x2d, 0x25, 0x05, 0x0d, 0x00, 0x2f, 0xdd, 0xc6, 0x10, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x13, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x13, 0x14, 0x16, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x03, 0x36, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x04, 0xcb, 0x11, 0x1a, 0x1f, 0x0e, 0x16, 0x26, 0x10, 0x19, 0x1f, 0x0e, 0x17, 0x27, 0x0f, 0x01, 0x04, 0x0a, 0x17, 0x27, 0x1e, 0x18, 0x1e, 0x12, 0x08, 0x03, 0x01, 0x04, 0x09, 0x0f, 0x16, 0x1d, 0x12, 0x14, 0x1c, 0x14, 0x0d, 0x07, 0x02, 0x02, 0xc9, 0x10, 0x19, 0x12, 0x09, 0x17, 0x1a, 0x11, 0x19, 0x11, 0x08, 0x17, 0xfe, 0x48, 0x13, 0x40, 0x4a, 0x4c, 0x3d, 0x26, 0x28, 0x3e, 0x4d, 0x4c, 0x40, 0x13, 0x11, 0x38, 0x42, 0x43, 0x37, 0x22, 0x25, 0x39, 0x46, 0x43, 0x38, 0x00, 0x01, 0x00, 0x0f, 0x00, 0x23, 0x01, 0xff, 0x01, 0x2f, 0x00, 0x30, 0x00, 0x15, 0xb7, 0x1c, 0x31, 0x10, 0x30, 0x07, 0x32, 0x16, 0x24, 0x00, 0x2f, 0xcd, 0x10, 0xc6, 0x01, 0x2f, 0xcd, 0x10, 0xc6, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x27, 0x2e, 0x03, 0x35, 0x34, 0x36, 0x37, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x27, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x02, 0x32, 0x33, 0x3a, 0x01, 0x1e, 0x01, 0x17, 0x1e, 0x01, 0x17, 0x1e, 0x03, 0x01, 0xff, 0x01, 0x03, 0x03, 0x01, 0x04, 0x16, 0x06, 0x06, 0x0e, 0x05, 0x02, 0x06, 0x04, 0x03, 0x02, 0x02, 0x30, 0x60, 0x30, 0x31, 0x6c, 0x30, 0x0c, 0x0b, 0x09, 0x0b, 0x14, 0x43, 0x49, 0x48, 0x19, 0x10, 0x33, 0x36, 0x32, 0x10, 0x0b, 0x08, 0x02, 0x02, 0x04, 0x03, 0x02, 0x8d, 0x05, 0x1c, 0x21, 0x1b, 0x03, 0x07, 0x03, 0x03, 0x06, 0x05, 0x22, 0x28, 0x24, 0x07, 0x11, 0x20, 0x10, 0x05, 0x06, 0x01, 0x08, 0x02, 0x11, 0x0b, 0x0a, 0x12, 0x03, 0x06, 0x05, 0x02, 0x01, 0x03, 0x04, 0x02, 0x12, 0x09, 0x0b, 0x21, 0x24, 0x22, 0x00, 0x02, 0x00, 0x0a, 0xff, 0xf3, 0x01, 0x67, 0x01, 0x59, 0x00, 0x1d, 0x00, 0x3b, 0x00, 0x1e, 0x40, 0x0c, 0x23, 0x32, 0x28, 0x1e, 0x14, 0x05, 0x0a, 0x00, 0x1b, 0x39, 0x0c, 0x2b, 0x00, 0x2f, 0xc4, 0x2f, 0xc4, 0x01, 0x2f, 0xc4, 0x2f, 0xcd, 0x2f, 0xc4, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x07, 0x1e, 0x03, 0x15, 0x14, 0x06, 0x23, 0x22, 0x2e, 0x04, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x16, 0x07, 0x14, 0x0e, 0x02, 0x07, 0x1e, 0x03, 0x15, 0x14, 0x06, 0x23, 0x22, 0x2e, 0x04, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x16, 0x01, 0x67, 0x17, 0x1f, 0x23, 0x0c, 0x0b, 0x20, 0x1d, 0x15, 0x04, 0x08, 0x09, 0x21, 0x27, 0x29, 0x21, 0x15, 0x15, 0x21, 0x29, 0x28, 0x23, 0x0b, 0x09, 0x06, 0x98, 0x17, 0x20, 0x23, 0x0c, 0x0b, 0x20, 0x1e, 0x15, 0x05, 0x08, 0x09, 0x21, 0x27, 0x29, 0x21, 0x15, 0x15, 0x21, 0x29, 0x28, 0x23, 0x0b, 0x0a, 0x06, 0x01, 0x41, 0x12, 0x2f, 0x2e, 0x2a, 0x0d, 0x0c, 0x25, 0x2a, 0x2a, 0x10, 0x06, 0x0d, 0x14, 0x20, 0x26, 0x26, 0x1f, 0x09, 0x0b, 0x24, 0x29, 0x2a, 0x22, 0x15, 0x0b, 0x02, 0x12, 0x2f, 0x2e, 0x2b, 0x0d, 0x0c, 0x25, 0x2a, 0x2a, 0x10, 0x06, 0x0d, 0x14, 0x20, 0x26, 0x26, 0x20, 0x09, 0x0a, 0x24, 0x29, 0x2a, 0x22, 0x15, 0x0a, 0x00, 0x02, 0x00, 0x14, 0xff, 0xfb, 0x01, 0x6f, 0x01, 0x5d, 0x00, 0x1b, 0x00, 0x39, 0x00, 0x1e, 0x40, 0x0c, 0x26, 0x30, 0x2b, 0x1c, 0x08, 0x13, 0x00, 0x0d, 0x15, 0x33, 0x05, 0x24, 0x00, 0x2f, 0xc4, 0x2f, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xc4, 0x2f, 0xcd, 0x2f, 0xc4, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x2e, 0x03, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x04, 0x07, 0x14, 0x0e, 0x04, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x2e, 0x03, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x04, 0x01, 0x6f, 0x2f, 0x3d, 0x3c, 0x0d, 0x08, 0x05, 0x16, 0x1f, 0x21, 0x0b, 0x0b, 0x20, 0x1e, 0x16, 0x06, 0x09, 0x0b, 0x22, 0x28, 0x28, 0x20, 0x14, 0x99, 0x16, 0x22, 0x2a, 0x28, 0x21, 0x09, 0x08, 0x06, 0x16, 0x1f, 0x22, 0x0b, 0x0b, 0x21, 0x1e, 0x15, 0x05, 0x0a, 0x0b, 0x22, 0x27, 0x28, 0x20, 0x14, 0x9f, 0x0d, 0x36, 0x37, 0x29, 0x0c, 0x06, 0x10, 0x2a, 0x29, 0x24, 0x0c, 0x0e, 0x2b, 0x2f, 0x2e, 0x12, 0x08, 0x0c, 0x16, 0x23, 0x2c, 0x2a, 0x24, 0x0c, 0x09, 0x1f, 0x24, 0x25, 0x1f, 0x13, 0x0c, 0x06, 0x10, 0x2a, 0x29, 0x24, 0x0c, 0x0e, 0x2b, 0x2f, 0x2e, 0x12, 0x08, 0x0c, 0x16, 0x23, 0x2c, 0x2a, 0x24, 0x00, 0x00, 0x03, 0x00, 0x0a, 0xff, 0xf8, 0x02, 0x72, 0x00, 0x79, 0x00, 0x11, 0x00, 0x21, 0x00, 0x33, 0x00, 0x1e, 0x40, 0x0c, 0x2a, 0x22, 0x12, 0x1a, 0x00, 0x0a, 0x2f, 0x25, 0x1d, 0x15, 0x0d, 0x06, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x37, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x14, 0x06, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x14, 0x06, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0xaf, 0x0c, 0x13, 0x17, 0x0c, 0x0f, 0x23, 0x1d, 0x14, 0x2e, 0x18, 0x0f, 0x21, 0x1d, 0x12, 0xe1, 0x2a, 0x18, 0x0f, 0x22, 0x1e, 0x13, 0x2d, 0x18, 0x0f, 0x21, 0x1d, 0x12, 0xe2, 0x2b, 0x18, 0x0f, 0x22, 0x1e, 0x13, 0x0d, 0x14, 0x18, 0x0c, 0x0f, 0x22, 0x1c, 0x13, 0x30, 0x0d, 0x15, 0x0e, 0x08, 0x0b, 0x14, 0x1b, 0x11, 0x1b, 0x1b, 0x0a, 0x13, 0x1b, 0x11, 0x1a, 0x1e, 0x0b, 0x14, 0x1b, 0x11, 0x1b, 0x1b, 0x0a, 0x13, 0x1b, 0x11, 0x1a, 0x1e, 0x0b, 0x14, 0x1b, 0x11, 0x0d, 0x15, 0x0d, 0x07, 0x0a, 0x13, 0x1b, 0x00, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xf2, 0x02, 0x17, 0x03, 0xae, 0x02, 0x26, 0x00, 0x36, 0x00, 0x00, 0x00, 0x07, 0x00, 0x55, 0x00, 0xb8, 0x00, 0xae, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xf2, 0x02, 0x17, 0x03, 0xa7, 0x02, 0x26, 0x00, 0x36, 0x00, 0x00, 0x00, 0x07, 0x00, 0xd8, 0x00, 0x71, 0x00, 0xb8, 0xff, 0xff, 0x00, 0x14, 0xff, 0xdf, 0x02, 0x00, 0x03, 0xa7, 0x02, 0x26, 0x00, 0x44, 0x00, 0x00, 0x00, 0x07, 0x00, 0xd8, 0x00, 0x48, 0x00, 0xb8, 0x00, 0x02, 0x00, 0x14, 0xff, 0xe4, 0x03, 0x47, 0x03, 0x1c, 0x00, 0x54, 0x00, 0x6a, 0x00, 0x2a, 0x40, 0x12, 0x69, 0x3b, 0x4d, 0x61, 0x15, 0x31, 0x42, 0x00, 0x3f, 0x48, 0x39, 0x2a, 0x5a, 0x1d, 0x66, 0x0f, 0x50, 0x07, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xd4, 0xc4, 0x2f, 0xcd, 0x2f, 0xc4, 0xcd, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x04, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x04, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x3e, 0x01, 0x37, 0x3e, 0x04, 0x32, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x06, 0x07, 0x0e, 0x03, 0x07, 0x0e, 0x01, 0x07, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x07, 0x0e, 0x01, 0x07, 0x06, 0x15, 0x14, 0x16, 0x17, 0x3e, 0x01, 0x37, 0x36, 0x1e, 0x02, 0x25, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x04, 0x33, 0x32, 0x3e, 0x02, 0x03, 0x47, 0x23, 0x36, 0x44, 0x41, 0x39, 0x10, 0x12, 0x25, 0x20, 0x1a, 0x09, 0x16, 0x63, 0x39, 0x29, 0x40, 0x32, 0x24, 0x16, 0x0b, 0x0f, 0x1d, 0x2b, 0x38, 0x45, 0x28, 0x1a, 0x33, 0x2b, 0x23, 0x09, 0x05, 0x0a, 0x0a, 0x07, 0x23, 0x2f, 0x36, 0x32, 0x29, 0x0b, 0x15, 0x2c, 0x26, 0x18, 0x12, 0x11, 0x15, 0x39, 0x3d, 0x3b, 0x17, 0x08, 0x04, 0x02, 0x1f, 0x44, 0x21, 0x2d, 0x2f, 0x28, 0x1f, 0x25, 0x4a, 0x25, 0x07, 0x07, 0x03, 0x31, 0x5f, 0x31, 0x0f, 0x1c, 0x14, 0x0c, 0xfe, 0x21, 0x06, 0x13, 0x22, 0x1c, 0x18, 0x22, 0x15, 0x09, 0x04, 0x09, 0x0e, 0x14, 0x19, 0x10, 0x1c, 0x23, 0x12, 0x06, 0x68, 0x17, 0x23, 0x18, 0x10, 0x09, 0x03, 0x11, 0x1b, 0x20, 0x0e, 0x37, 0x39, 0x2c, 0x46, 0x59, 0x5b, 0x55, 0x1f, 0x20, 0x56, 0x5c, 0x59, 0x47, 0x2c, 0x0f, 0x1c, 0x28, 0x18, 0x0f, 0x16, 0x0b, 0x08, 0x0b, 0x07, 0x04, 0x02, 0x02, 0x0f, 0x1f, 0x1e, 0x14, 0x1a, 0x09, 0x0b, 0x10, 0x0b, 0x06, 0x01, 0x1d, 0x3a, 0x1d, 0x0b, 0x11, 0x24, 0x2d, 0x23, 0x23, 0x08, 0x09, 0x10, 0x09, 0x15, 0x1a, 0x18, 0x30, 0x18, 0x03, 0x08, 0x02, 0x01, 0x0d, 0x15, 0x1c, 0xee, 0x14, 0x47, 0x46, 0x34, 0x2e, 0x3e, 0x40, 0x12, 0x0c, 0x2a, 0x31, 0x32, 0x28, 0x1a, 0x2e, 0x40, 0x42, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0a, 0xff, 0xfe, 0x03, 0x05, 0x02, 0x75, 0x00, 0x33, 0x00, 0x40, 0x00, 0x54, 0x00, 0x2c, 0x40, 0x13, 0x53, 0x3c, 0x29, 0x35, 0x00, 0x24, 0x4b, 0x13, 0x3c, 0x29, 0x36, 0x1f, 0x46, 0x19, 0x50, 0x0f, 0x31, 0x2c, 0x05, 0x00, 0x2f, 0xdd, 0xc4, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xc4, 0xcd, 0x2f, 0xc5, 0xcd, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x17, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x07, 0x1e, 0x01, 0x33, 0x32, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x27, 0x34, 0x26, 0x23, 0x22, 0x0e, 0x02, 0x07, 0x3e, 0x03, 0x05, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x03, 0x05, 0x2b, 0x40, 0x4a, 0x1f, 0x2d, 0x3f, 0x2a, 0x1b, 0x0a, 0x11, 0x26, 0x2f, 0x39, 0x23, 0x33, 0x41, 0x27, 0x0f, 0x1e, 0x3d, 0x5f, 0x41, 0x3a, 0x4b, 0x10, 0x21, 0x57, 0x36, 0x21, 0x39, 0x2b, 0x18, 0x28, 0x42, 0x55, 0x2d, 0x04, 0x27, 0x1a, 0x15, 0x26, 0x24, 0x23, 0x12, 0x14, 0x1f, 0xa1, 0x0e, 0x0f, 0x16, 0x1f, 0x13, 0x0a, 0x02, 0x0e, 0x27, 0x23, 0x19, 0xfe, 0xb5, 0x03, 0x09, 0x11, 0x0e, 0x13, 0x1d, 0x13, 0x09, 0x03, 0x0b, 0x12, 0x0f, 0x12, 0x1b, 0x12, 0x09, 0xc1, 0x23, 0x41, 0x33, 0x1f, 0x17, 0x25, 0x2d, 0x17, 0x1b, 0x33, 0x27, 0x18, 0x37, 0x53, 0x5f, 0x28, 0x36, 0x7d, 0x6c, 0x47, 0x3b, 0x38, 0x28, 0x39, 0x17, 0x28, 0x38, 0x22, 0x2f, 0x52, 0x3d, 0x24, 0x03, 0x1d, 0x1a, 0x15, 0x18, 0x15, 0x1b, 0xe0, 0x0e, 0x1b, 0x17, 0x22, 0x28, 0x11, 0x03, 0x09, 0x11, 0x1a, 0x4b, 0x09, 0x25, 0x25, 0x1b, 0x27, 0x34, 0x37, 0x10, 0x0a, 0x26, 0x26, 0x1c, 0x29, 0x37, 0x38, 0x00, 0x01, 0x00, 0x1f, 0x00, 0xdb, 0x01, 0xea, 0x01, 0x2f, 0x00, 0x1b, 0x00, 0x11, 0xb5, 0x00, 0x1d, 0x0e, 0x1c, 0x09, 0x17, 0x00, 0x2f, 0xcd, 0x01, 0x10, 0xc6, 0x10, 0xc6, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x04, 0x23, 0x2a, 0x01, 0x2e, 0x03, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x04, 0x01, 0xea, 0x1d, 0x2e, 0x37, 0x32, 0x28, 0x08, 0x07, 0x27, 0x33, 0x38, 0x2f, 0x1f, 0x21, 0x33, 0x3d, 0x3b, 0x2f, 0x0b, 0x0a, 0x25, 0x2b, 0x2e, 0x25, 0x18, 0xff, 0x09, 0x0b, 0x08, 0x05, 0x02, 0x01, 0x02, 0x04, 0x08, 0x0d, 0x09, 0x0b, 0x11, 0x0a, 0x06, 0x03, 0x01, 0x02, 0x05, 0x08, 0x0a, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1f, 0x00, 0xdb, 0x02, 0x28, 0x01, 0x2f, 0x00, 0x1b, 0x00, 0x11, 0xb5, 0x00, 0x1d, 0x0e, 0x1c, 0x05, 0x16, 0x00, 0x2f, 0xcd, 0x01, 0x10, 0xc6, 0x10, 0xc6, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x04, 0x23, 0x2a, 0x01, 0x2e, 0x03, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x04, 0x02, 0x28, 0x25, 0x39, 0x45, 0x3e, 0x2f, 0x08, 0x07, 0x28, 0x36, 0x3b, 0x31, 0x20, 0x22, 0x35, 0x41, 0x3c, 0x31, 0x0b, 0x0a, 0x2c, 0x38, 0x3b, 0x31, 0x1f, 0xff, 0x09, 0x0b, 0x08, 0x05, 0x02, 0x01, 0x02, 0x04, 0x08, 0x0d, 0x09, 0x0b, 0x11, 0x0a, 0x06, 0x03, 0x01, 0x02, 0x05, 0x08, 0x0a, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x1f, 0x01, 0xfc, 0x01, 0x77, 0x02, 0xde, 0x00, 0x17, 0x00, 0x2f, 0x00, 0x15, 0xb7, 0x18, 0x1e, 0x06, 0x00, 0x0b, 0x23, 0x03, 0x1b, 0x00, 0x2f, 0xc0, 0x2f, 0xc0, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x15, 0x36, 0x33, 0x32, 0x16, 0x07, 0x14, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x17, 0x36, 0x33, 0x32, 0x16, 0x01, 0x77, 0x2a, 0x1f, 0x24, 0x36, 0x11, 0x1a, 0x20, 0x10, 0x08, 0x0c, 0x0b, 0x0d, 0x0a, 0x0f, 0x11, 0x16, 0x20, 0xb5, 0x29, 0x20, 0x23, 0x37, 0x11, 0x1a, 0x20, 0x10, 0x09, 0x0b, 0x0b, 0x0d, 0x0b, 0x01, 0x0f, 0x11, 0x17, 0x1f, 0x02, 0x44, 0x20, 0x28, 0x27, 0x26, 0x10, 0x33, 0x30, 0x22, 0x0c, 0x08, 0x0c, 0x16, 0x15, 0x15, 0x0a, 0x0a, 0x25, 0x15, 0x20, 0x28, 0x27, 0x27, 0x10, 0x32, 0x30, 0x22, 0x0c, 0x08, 0x0c, 0x16, 0x15, 0x15, 0x0a, 0x0a, 0x25, 0x00, 0x02, 0x00, 0x0a, 0x02, 0x00, 0x01, 0x62, 0x02, 0xe4, 0x00, 0x16, 0x00, 0x2d, 0x00, 0x15, 0xb7, 0x17, 0x28, 0x11, 0x00, 0x14, 0x2b, 0x05, 0x1c, 0x00, 0x2f, 0xc4, 0x2f, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x35, 0x34, 0x3e, 0x02, 0x27, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x07, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x35, 0x34, 0x3e, 0x02, 0x35, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x01, 0x62, 0x10, 0x1a, 0x1f, 0x0f, 0x14, 0x0b, 0x0c, 0x0a, 0x01, 0x0e, 0x12, 0x17, 0x20, 0x2a, 0x20, 0x24, 0x35, 0xb4, 0x11, 0x19, 0x20, 0x0f, 0x14, 0x0a, 0x0c, 0x0a, 0x0f, 0x11, 0x17, 0x20, 0x2a, 0x20, 0x24, 0x36, 0x02, 0x98, 0x10, 0x33, 0x30, 0x22, 0x15, 0x0c, 0x16, 0x15, 0x14, 0x0b, 0x0b, 0x25, 0x16, 0x20, 0x26, 0x25, 0x29, 0x11, 0x33, 0x30, 0x22, 0x16, 0x0b, 0x16, 0x15, 0x14, 0x0a, 0x0a, 0x25, 0x16, 0x20, 0x27, 0x25, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1f, 0x01, 0xfc, 0x00, 0xc2, 0x02, 0xde, 0x00, 0x17, 0x00, 0x0d, 0xb3, 0x00, 0x06, 0x0b, 0x03, 0x00, 0x2f, 0xc4, 0x01, 0x2f, 0xcd, 0x31, 0x30, 0x13, 0x14, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x17, 0x36, 0x33, 0x32, 0x16, 0xc2, 0x29, 0x20, 0x23, 0x37, 0x11, 0x1a, 0x20, 0x10, 0x09, 0x0b, 0x0b, 0x0d, 0x0b, 0x01, 0x0f, 0x11, 0x17, 0x1f, 0x02, 0x44, 0x20, 0x28, 0x27, 0x27, 0x10, 0x32, 0x30, 0x22, 0x0c, 0x08, 0x0c, 0x16, 0x15, 0x15, 0x0a, 0x0a, 0x25, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x02, 0x08, 0x00, 0xae, 0x02, 0xe9, 0x00, 0x17, 0x00, 0x0d, 0xb3, 0x12, 0x00, 0x15, 0x05, 0x00, 0x2f, 0xc4, 0x01, 0x2f, 0xcd, 0x31, 0x30, 0x13, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x35, 0x34, 0x3e, 0x02, 0x35, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0xae, 0x11, 0x19, 0x20, 0x0f, 0x14, 0x0a, 0x0c, 0x0a, 0x07, 0x11, 0x08, 0x17, 0x20, 0x2a, 0x20, 0x24, 0x36, 0x02, 0x9d, 0x10, 0x33, 0x30, 0x22, 0x15, 0x0c, 0x16, 0x15, 0x14, 0x0b, 0x05, 0x06, 0x24, 0x17, 0x20, 0x26, 0x25, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0f, 0x00, 0x41, 0x01, 0xb2, 0x01, 0xee, 0x00, 0x0b, 0x00, 0x23, 0x00, 0x2f, 0x00, 0x1e, 0x40, 0x0c, 0x0c, 0x24, 0x18, 0x2a, 0x00, 0x06, 0x2d, 0x27, 0x15, 0x1f, 0x03, 0x09, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xc4, 0xdd, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x17, 0x14, 0x0e, 0x04, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x02, 0x07, 0x14, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x01, 0x17, 0x20, 0x18, 0x17, 0x21, 0x1d, 0x1a, 0x19, 0x20, 0x9b, 0x1d, 0x2e, 0x37, 0x32, 0x28, 0x08, 0x0a, 0x3e, 0x43, 0x34, 0x18, 0x26, 0x2e, 0x2b, 0x23, 0x08, 0x0f, 0x4a, 0x4d, 0x3b, 0x98, 0x20, 0x18, 0x16, 0x22, 0x1d, 0x1a, 0x19, 0x20, 0x01, 0xb4, 0x19, 0x1b, 0x1a, 0x19, 0x19, 0x22, 0x21, 0xc3, 0x09, 0x0b, 0x08, 0x05, 0x02, 0x01, 0x01, 0x06, 0x0f, 0x0e, 0x0b, 0x10, 0x0a, 0x06, 0x03, 0x01, 0x03, 0x0b, 0x12, 0xa4, 0x19, 0x1b, 0x1a, 0x19, 0x17, 0x23, 0x20, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x0e, 0xfe, 0xdd, 0x01, 0xef, 0x03, 0x0c, 0x02, 0x26, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x06, 0x00, 0x9f, 0x3d, 0x33, 0x00, 0x00, 0xff, 0xff, 0x00, 0x0a, 0xff, 0xcb, 0x01, 0xe1, 0x03, 0xc5, 0x02, 0x26, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x07, 0x00, 0x9f, 0x00, 0x48, 0x00, 0xec, 0x00, 0x01, 0x00, 0x1f, 0xff, 0xf5, 0x01, 0xbc, 0x02, 0xef, 0x00, 0x21, 0x00, 0x0d, 0xb3, 0x11, 0x01, 0x0e, 0x20, 0x00, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x04, 0x07, 0x0e, 0x05, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x04, 0x37, 0x3e, 0x05, 0x33, 0x32, 0x16, 0x01, 0xbc, 0x12, 0x1c, 0x24, 0x23, 0x1f, 0x0a, 0x07, 0x23, 0x2d, 0x33, 0x31, 0x28, 0x0c, 0x0a, 0x06, 0x13, 0x1e, 0x26, 0x25, 0x21, 0x0a, 0x06, 0x21, 0x2b, 0x31, 0x2f, 0x29, 0x0d, 0x09, 0x05, 0x02, 0xd6, 0x13, 0x3b, 0x46, 0x4b, 0x46, 0x3b, 0x13, 0x0d, 0x41, 0x51, 0x58, 0x48, 0x2f, 0x14, 0x08, 0x14, 0x3e, 0x49, 0x4f, 0x49, 0x3e, 0x15, 0x0d, 0x3e, 0x4c, 0x52, 0x43, 0x2c, 0x12, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x34, 0x02, 0x61, 0x02, 0x87, 0x00, 0x65, 0x00, 0x2a, 0x40, 0x12, 0x54, 0x48, 0x00, 0x36, 0x15, 0x24, 0x09, 0x60, 0x1d, 0x4e, 0x2b, 0x42, 0x2e, 0x3e, 0x4f, 0x1c, 0x5a, 0x0d, 0x00, 0x2f, 0xc0, 0xdd, 0xc5, 0x2f, 0xcd, 0x2f, 0xc5, 0xdd, 0xc5, 0x2f, 0xcd, 0x01, 0x2f, 0xc4, 0x2f, 0xc4, 0x2f, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x06, 0x23, 0x22, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x07, 0x3e, 0x01, 0x33, 0x32, 0x36, 0x1e, 0x01, 0x15, 0x14, 0x0e, 0x03, 0x26, 0x23, 0x15, 0x36, 0x33, 0x32, 0x36, 0x1e, 0x01, 0x15, 0x14, 0x0e, 0x03, 0x26, 0x23, 0x1e, 0x01, 0x33, 0x32, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x04, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x22, 0x26, 0x27, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x01, 0x3f, 0x01, 0x2e, 0x01, 0x27, 0x26, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x01, 0x37, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x04, 0x02, 0x61, 0x1c, 0x15, 0x11, 0x21, 0x27, 0x31, 0x21, 0x17, 0x33, 0x2b, 0x1f, 0x02, 0x26, 0x49, 0x26, 0x0a, 0x25, 0x25, 0x1b, 0x21, 0x33, 0x3d, 0x39, 0x2d, 0x09, 0x39, 0x39, 0x09, 0x26, 0x26, 0x1d, 0x1c, 0x2c, 0x34, 0x31, 0x27, 0x08, 0x08, 0x47, 0x2d, 0x2a, 0x3b, 0x28, 0x1d, 0x0c, 0x12, 0x1e, 0x1c, 0x2b, 0x36, 0x35, 0x2c, 0x0d, 0x2b, 0x4f, 0x41, 0x2f, 0x09, 0x13, 0x36, 0x11, 0x0e, 0x11, 0x0c, 0x0b, 0x14, 0x2e, 0x15, 0x03, 0x14, 0x33, 0x13, 0x1d, 0x17, 0x11, 0x13, 0x26, 0x13, 0x0a, 0x2e, 0x40, 0x4f, 0x2c, 0x0e, 0x30, 0x38, 0x39, 0x2e, 0x1d, 0x02, 0x19, 0x14, 0x20, 0x13, 0x16, 0x13, 0x0b, 0x18, 0x25, 0x1b, 0x01, 0x02, 0x02, 0x05, 0x10, 0x11, 0x0e, 0x11, 0x0b, 0x04, 0x01, 0x01, 0x25, 0x03, 0x01, 0x04, 0x0e, 0x10, 0x0d, 0x0f, 0x09, 0x03, 0x01, 0x01, 0x2d, 0x34, 0x10, 0x13, 0x10, 0x1b, 0x13, 0x11, 0x1e, 0x1a, 0x15, 0x0e, 0x08, 0x20, 0x36, 0x49, 0x29, 0x03, 0x05, 0x04, 0x13, 0x0e, 0x0c, 0x0b, 0x03, 0x05, 0x02, 0x01, 0x1c, 0x02, 0x02, 0x04, 0x05, 0x1c, 0x14, 0x11, 0x02, 0x04, 0x02, 0x01, 0x2a, 0x4a, 0x36, 0x1f, 0x06, 0x0b, 0x12, 0x18, 0x20, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0a, 0xff, 0xf8, 0x00, 0xcf, 0x01, 0x59, 0x00, 0x1d, 0x00, 0x11, 0xb5, 0x05, 0x14, 0x0a, 0x00, 0x1b, 0x0d, 0x00, 0x2f, 0xc4, 0x01, 0x2f, 0xc4, 0x2f, 0xcd, 0x31, 0x30, 0x13, 0x14, 0x0e, 0x02, 0x07, 0x1e, 0x03, 0x15, 0x14, 0x06, 0x23, 0x22, 0x2e, 0x04, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x16, 0xcf, 0x17, 0x20, 0x23, 0x0c, 0x0b, 0x20, 0x1e, 0x15, 0x05, 0x08, 0x09, 0x21, 0x27, 0x29, 0x21, 0x15, 0x15, 0x21, 0x29, 0x28, 0x23, 0x0b, 0x0a, 0x06, 0x01, 0x47, 0x12, 0x2f, 0x2e, 0x2b, 0x0d, 0x0c, 0x25, 0x2a, 0x2a, 0x10, 0x06, 0x0d, 0x14, 0x20, 0x26, 0x26, 0x20, 0x09, 0x0a, 0x24, 0x29, 0x2a, 0x22, 0x15, 0x0a, 0x00, 0x01, 0x00, 0x14, 0xff, 0xfb, 0x00, 0xd6, 0x01, 0x5c, 0x00, 0x1d, 0x00, 0x11, 0xb5, 0x0a, 0x15, 0x0f, 0x00, 0x17, 0x07, 0x00, 0x2f, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xc4, 0x31, 0x30, 0x37, 0x14, 0x0e, 0x04, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x2e, 0x03, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x04, 0xd6, 0x16, 0x22, 0x2a, 0x28, 0x21, 0x09, 0x08, 0x06, 0x16, 0x1f, 0x22, 0x0b, 0x0b, 0x21, 0x1e, 0x15, 0x05, 0x0a, 0x0b, 0x22, 0x27, 0x28, 0x20, 0x14, 0x9e, 0x09, 0x1f, 0x24, 0x25, 0x1f, 0x13, 0x0c, 0x06, 0x10, 0x2a, 0x29, 0x24, 0x0c, 0x0e, 0x2b, 0x2f, 0x2e, 0x12, 0x08, 0x0c, 0x16, 0x23, 0x2c, 0x2a, 0x24, 0x00, 0x00, 0x01, 0xff, 0xdc, 0xff, 0xf5, 0x02, 0x01, 0x03, 0x11, 0x00, 0x55, 0x00, 0x2a, 0x40, 0x12, 0x28, 0x56, 0x0c, 0x54, 0x42, 0x37, 0x48, 0x12, 0x21, 0x20, 0x10, 0x2d, 0x4a, 0x3d, 0x44, 0x33, 0x05, 0x18, 0x00, 0x2f, 0xc4, 0x2f, 0xdd, 0xc4, 0x2f, 0xc4, 0xdd, 0xc4, 0x01, 0x2f, 0xd4, 0xc4, 0x2f, 0xcd, 0x2f, 0xcd, 0x10, 0xc4, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x04, 0x35, 0x34, 0x37, 0x0e, 0x01, 0x07, 0x16, 0x15, 0x14, 0x07, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x2e, 0x01, 0x37, 0x06, 0x22, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x04, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x1e, 0x02, 0x14, 0x02, 0x01, 0x01, 0x0c, 0x1e, 0x1d, 0x15, 0x1c, 0x13, 0x0a, 0x05, 0x01, 0x03, 0x1d, 0x3d, 0x1f, 0x03, 0x03, 0x02, 0x27, 0x1f, 0x11, 0x19, 0x10, 0x08, 0x01, 0x05, 0x06, 0x01, 0x07, 0x0c, 0x08, 0x0e, 0x22, 0x1e, 0x15, 0x1d, 0x2a, 0x2d, 0x10, 0x12, 0x2f, 0x4f, 0x3e, 0x27, 0x38, 0x24, 0x10, 0x07, 0x12, 0x1d, 0x16, 0x19, 0x18, 0x09, 0x01, 0x03, 0x0c, 0x10, 0x0f, 0x13, 0x0b, 0x05, 0x14, 0x29, 0x14, 0x16, 0x36, 0x32, 0x29, 0x0b, 0x09, 0x08, 0x04, 0xae, 0x13, 0x3c, 0x38, 0x28, 0x23, 0x37, 0x43, 0x40, 0x36, 0x0e, 0x1d, 0x1d, 0x06, 0x08, 0x03, 0x45, 0x46, 0x42, 0x40, 0x1f, 0x28, 0x0d, 0x16, 0x1c, 0x0f, 0x3c, 0x79, 0x3d, 0x01, 0x06, 0x0f, 0x19, 0x12, 0x14, 0x1c, 0x12, 0x09, 0x02, 0x12, 0x31, 0x6f, 0x5f, 0x3f, 0x21, 0x35, 0x43, 0x22, 0x13, 0x23, 0x1a, 0x0f, 0x14, 0x1d, 0x22, 0x1d, 0x14, 0x2e, 0x3c, 0x39, 0x0a, 0x02, 0x02, 0x01, 0x0c, 0x1b, 0x19, 0x15, 0x3b, 0x3f, 0x3d, 0x00, 0x00, 0x02, 0xff, 0xdc, 0xff, 0xe8, 0x01, 0xdf, 0x03, 0x11, 0x00, 0x3d, 0x00, 0x4f, 0x00, 0x24, 0x40, 0x0f, 0x2c, 0x50, 0x48, 0x15, 0x31, 0x24, 0x4d, 0x00, 0x0c, 0x42, 0x37, 0x24, 0x31, 0x07, 0x1c, 0x00, 0x2f, 0xc4, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0xc5, 0x2f, 0xc5, 0xdd, 0xc5, 0x10, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x16, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x03, 0x34, 0x35, 0x34, 0x36, 0x37, 0x0e, 0x01, 0x07, 0x16, 0x15, 0x14, 0x06, 0x07, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x2e, 0x01, 0x37, 0x06, 0x22, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x04, 0x27, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x3e, 0x01, 0x33, 0x32, 0x17, 0x3e, 0x01, 0x01, 0xde, 0x01, 0x02, 0x08, 0x13, 0x1f, 0x18, 0x13, 0x19, 0x10, 0x07, 0x02, 0x01, 0x01, 0x15, 0x2e, 0x16, 0x03, 0x01, 0x02, 0x02, 0x26, 0x20, 0x11, 0x18, 0x10, 0x09, 0x01, 0x05, 0x06, 0x01, 0x07, 0x0c, 0x08, 0x0e, 0x22, 0x1e, 0x15, 0x1d, 0x2a, 0x2d, 0x10, 0x12, 0x2e, 0x4e, 0x3c, 0x27, 0x39, 0x28, 0x19, 0x0e, 0x05, 0x8c, 0x05, 0x0c, 0x15, 0x11, 0x0f, 0x13, 0x0b, 0x05, 0x0f, 0x1e, 0x10, 0x16, 0x14, 0x01, 0x01, 0x01, 0x9d, 0x13, 0x4f, 0x61, 0x67, 0x55, 0x36, 0x23, 0x38, 0x43, 0x40, 0x36, 0x0d, 0x15, 0x2a, 0x14, 0x08, 0x09, 0x02, 0x45, 0x46, 0x20, 0x42, 0x20, 0x1f, 0x28, 0x0d, 0x16, 0x1c, 0x0f, 0x3c, 0x79, 0x3d, 0x01, 0x06, 0x0f, 0x19, 0x12, 0x14, 0x1c, 0x12, 0x09, 0x02, 0x12, 0x2f, 0x6f, 0x60, 0x40, 0x28, 0x40, 0x52, 0x52, 0x4d, 0x37, 0x0b, 0x2f, 0x2f, 0x23, 0x2e, 0x3c, 0x39, 0x0a, 0x02, 0x02, 0x03, 0x08, 0x10, 0x00, 0x01, 0x00, 0x1f, 0x01, 0x2b, 0x00, 0xc4, 0x01, 0xac, 0x00, 0x11, 0x00, 0x0d, 0xb3, 0x00, 0x08, 0x0d, 0x03, 0x00, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x31, 0x30, 0x13, 0x14, 0x06, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0xc4, 0x2b, 0x18, 0x0f, 0x22, 0x1e, 0x13, 0x0d, 0x14, 0x18, 0x0c, 0x0f, 0x22, 0x1c, 0x13, 0x01, 0x63, 0x1a, 0x1e, 0x0b, 0x14, 0x1b, 0x11, 0x0e, 0x14, 0x0e, 0x06, 0x0a, 0x13, 0x1b, 0x00, 0x01, 0x00, 0x0a, 0xff, 0xa2, 0x00, 0xae, 0x00, 0x83, 0x00, 0x16, 0x00, 0x0d, 0xb3, 0x00, 0x11, 0x14, 0x05, 0x00, 0x2f, 0xc4, 0x01, 0x2f, 0xcd, 0x31, 0x30, 0x37, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x35, 0x34, 0x3e, 0x02, 0x35, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0xae, 0x11, 0x19, 0x20, 0x0f, 0x14, 0x0a, 0x0c, 0x0a, 0x0f, 0x11, 0x17, 0x20, 0x2a, 0x20, 0x24, 0x36, 0x36, 0x10, 0x32, 0x30, 0x22, 0x14, 0x0c, 0x16, 0x15, 0x15, 0x0a, 0x0a, 0x24, 0x16, 0x20, 0x27, 0x26, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0xff, 0x9a, 0x01, 0x62, 0x00, 0x7e, 0x00, 0x16, 0x00, 0x2d, 0x00, 0x15, 0xb7, 0x17, 0x28, 0x11, 0x00, 0x14, 0x2b, 0x05, 0x1c, 0x00, 0x2f, 0xc4, 0x2f, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x35, 0x34, 0x3e, 0x02, 0x27, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x07, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x35, 0x34, 0x3e, 0x02, 0x35, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x01, 0x62, 0x10, 0x1a, 0x1f, 0x0f, 0x14, 0x0b, 0x0c, 0x0a, 0x01, 0x0f, 0x11, 0x17, 0x20, 0x2a, 0x20, 0x24, 0x35, 0xb4, 0x11, 0x19, 0x20, 0x0f, 0x14, 0x0a, 0x0c, 0x0a, 0x0f, 0x11, 0x17, 0x20, 0x2a, 0x20, 0x24, 0x36, 0x31, 0x10, 0x32, 0x30, 0x22, 0x14, 0x0c, 0x16, 0x15, 0x15, 0x0a, 0x0a, 0x25, 0x15, 0x20, 0x27, 0x26, 0x29, 0x11, 0x32, 0x30, 0x22, 0x15, 0x0c, 0x15, 0x15, 0x15, 0x0a, 0x0a, 0x25, 0x15, 0x20, 0x28, 0x26, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x14, 0xff, 0xf5, 0x04, 0x77, 0x02, 0xef, 0x00, 0x13, 0x00, 0x3b, 0x00, 0x4f, 0x00, 0x63, 0x00, 0x77, 0x00, 0x8b, 0x00, 0x9f, 0x00, 0x3e, 0x40, 0x1c, 0x9c, 0x87, 0x90, 0x7d, 0x74, 0x4b, 0x68, 0x26, 0x40, 0x37, 0x60, 0x0f, 0x54, 0x05, 0x8c, 0x82, 0x96, 0x78, 0x64, 0x34, 0x46, 0x6e, 0x3c, 0x50, 0x0a, 0x5a, 0x23, 0x00, 0x00, 0x2f, 0xc4, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xc4, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xdd, 0xc4, 0x2f, 0xc4, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x05, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x03, 0x0e, 0x03, 0x07, 0x0e, 0x03, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x04, 0x37, 0x3e, 0x05, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x01, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x25, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x34, 0x2e, 0x02, 0x01, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x34, 0x2e, 0x02, 0x01, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x03, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x34, 0x2e, 0x02, 0x02, 0x72, 0x27, 0x39, 0x25, 0x12, 0x17, 0x2c, 0x3f, 0x28, 0x2d, 0x3a, 0x22, 0x0d, 0x13, 0x29, 0x40, 0x56, 0x12, 0x25, 0x21, 0x1b, 0x08, 0x07, 0x1c, 0x25, 0x2d, 0x17, 0x17, 0x2d, 0x2a, 0x22, 0x0a, 0x0e, 0x07, 0x1b, 0x29, 0x34, 0x31, 0x2b, 0x0c, 0x08, 0x29, 0x36, 0x3d, 0x3a, 0x30, 0x0e, 0x0d, 0x07, 0x0f, 0x19, 0x21, 0xfe, 0x52, 0x27, 0x39, 0x25, 0x13, 0x17, 0x2d, 0x3f, 0x29, 0x2d, 0x39, 0x22, 0x0d, 0x13, 0x29, 0x40, 0x01, 0xb2, 0x12, 0x1d, 0x14, 0x0a, 0x06, 0x0e, 0x15, 0x0e, 0x12, 0x1c, 0x14, 0x0a, 0x07, 0x0d, 0x15, 0xfe, 0x2d, 0x12, 0x1d, 0x14, 0x0a, 0x07, 0x0d, 0x15, 0x0f, 0x12, 0x1c, 0x13, 0x0a, 0x06, 0x0e, 0x14, 0x02, 0xfb, 0x27, 0x39, 0x25, 0x12, 0x17, 0x2c, 0x3f, 0x28, 0x2d, 0x3a, 0x22, 0x0d, 0x13, 0x29, 0x40, 0x14, 0x12, 0x1d, 0x14, 0x0a, 0x06, 0x0e, 0x15, 0x0e, 0x12, 0x1c, 0x14, 0x0a, 0x07, 0x0d, 0x15, 0x03, 0x2d, 0x43, 0x4b, 0x1e, 0x1f, 0x54, 0x4a, 0x34, 0x2d, 0x44, 0x4e, 0x21, 0x23, 0x52, 0x46, 0x2f, 0x02, 0x1c, 0x1d, 0x38, 0x32, 0x27, 0x0c, 0x0a, 0x29, 0x36, 0x3f, 0x1f, 0x1e, 0x3b, 0x2e, 0x1c, 0x15, 0x05, 0x13, 0x3f, 0x4b, 0x52, 0x4b, 0x3f, 0x12, 0x0c, 0x3c, 0x4c, 0x52, 0x43, 0x2c, 0x12, 0x06, 0x0d, 0x29, 0x33, 0x39, 0xfe, 0xed, 0x2e, 0x42, 0x4b, 0x1e, 0x20, 0x53, 0x4b, 0x33, 0x2d, 0x43, 0x4f, 0x21, 0x23, 0x52, 0x46, 0x2f, 0x32, 0x1c, 0x28, 0x2d, 0x12, 0x0e, 0x24, 0x20, 0x17, 0x1c, 0x28, 0x2d, 0x11, 0x0d, 0x25, 0x21, 0x17, 0x01, 0x26, 0x1c, 0x28, 0x2d, 0x12, 0x0e, 0x24, 0x21, 0x17, 0x1c, 0x28, 0x2d, 0x11, 0x0e, 0x25, 0x21, 0x17, 0xfd, 0x83, 0x2d, 0x43, 0x4b, 0x1e, 0x1f, 0x54, 0x4a, 0x34, 0x2d, 0x44, 0x4e, 0x21, 0x23, 0x52, 0x46, 0x2f, 0x01, 0x57, 0x1c, 0x28, 0x2d, 0x12, 0x0e, 0x24, 0x20, 0x17, 0x1c, 0x28, 0x2d, 0x11, 0x0d, 0x25, 0x21, 0x17, 0x00, 0x00, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xf2, 0x02, 0x17, 0x03, 0xad, 0x02, 0x26, 0x00, 0x36, 0x00, 0x00, 0x00, 0x07, 0x00, 0xd7, 0x00, 0x8f, 0x00, 0xb8, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xf3, 0x01, 0xd2, 0x03, 0xad, 0x02, 0x26, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x07, 0x00, 0xd7, 0x00, 0x71, 0x00, 0xb8, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xf2, 0x02, 0x17, 0x03, 0xb5, 0x02, 0x26, 0x00, 0x36, 0x00, 0x00, 0x00, 0x07, 0x00, 0x9e, 0x00, 0xd7, 0x00, 0xae, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xf3, 0x01, 0xd2, 0x03, 0xba, 0x02, 0x26, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x9f, 0x00, 0x48, 0x00, 0xe1, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xf3, 0x01, 0xd2, 0x03, 0xae, 0x02, 0x26, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x55, 0x00, 0x71, 0x00, 0xae, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xec, 0x01, 0x78, 0x03, 0xbf, 0x02, 0x26, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x07, 0x00, 0x9e, 0x00, 0x9a, 0x00, 0xb8, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xec, 0x01, 0x78, 0x03, 0xad, 0x02, 0x26, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x07, 0x00, 0xd7, 0x00, 0x29, 0x00, 0xb8, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xec, 0x01, 0x78, 0x03, 0xb0, 0x02, 0x26, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x07, 0x00, 0x9f, 0x00, 0x00, 0x00, 0xd7, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xec, 0x01, 0x78, 0x03, 0xae, 0x02, 0x26, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x07, 0x00, 0x55, 0x00, 0x52, 0x00, 0xae, 0xff, 0xff, 0x00, 0x14, 0xff, 0xdf, 0x02, 0x00, 0x03, 0xb5, 0x02, 0x26, 0x00, 0x44, 0x00, 0x00, 0x00, 0x07, 0x00, 0x9e, 0x00, 0xcd, 0x00, 0xae, 0xff, 0xff, 0x00, 0x14, 0xff, 0xdf, 0x02, 0x00, 0x03, 0xad, 0x02, 0x26, 0x00, 0x44, 0x00, 0x00, 0x00, 0x07, 0x00, 0xd7, 0x00, 0x85, 0x00, 0xb8, 0xff, 0xff, 0x00, 0x14, 0xff, 0xdf, 0x02, 0x00, 0x03, 0xa4, 0x02, 0x26, 0x00, 0x44, 0x00, 0x00, 0x00, 0x07, 0x00, 0x55, 0x00, 0x9a, 0x00, 0xa4, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xed, 0x02, 0x36, 0x03, 0xb5, 0x02, 0x26, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x9e, 0x00, 0xec, 0x00, 0xae, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xed, 0x02, 0x36, 0x03, 0xb8, 0x02, 0x26, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x07, 0x00, 0xd7, 0x00, 0x9a, 0x00, 0xc3, 0xff, 0xff, 0x00, 0x1a, 0xff, 0xed, 0x02, 0x36, 0x03, 0xae, 0x02, 0x26, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x07, 0x00, 0x55, 0x00, 0xc3, 0x00, 0xae, 0x00, 0x01, 0x00, 0x24, 0xff, 0xfe, 0x00, 0xcb, 0x02, 0x3c, 0x00, 0x1c, 0x00, 0x0d, 0xb3, 0x00, 0x0f, 0x18, 0x0a, 0x00, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x31, 0x30, 0x13, 0x1c, 0x01, 0x07, 0x06, 0x14, 0x0e, 0x03, 0x07, 0x06, 0x2e, 0x03, 0x34, 0x35, 0x3c, 0x01, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0xcb, 0x01, 0x01, 0x04, 0x09, 0x14, 0x21, 0x19, 0x13, 0x1a, 0x11, 0x08, 0x04, 0x04, 0x0b, 0x15, 0x22, 0x1a, 0x1b, 0x1c, 0x0e, 0x02, 0x01, 0x66, 0x0e, 0x1f, 0x0e, 0x11, 0x39, 0x42, 0x44, 0x38, 0x23, 0x01, 0x01, 0x20, 0x33, 0x3f, 0x3b, 0x32, 0x0c, 0x10, 0x3b, 0x44, 0x46, 0x3a, 0x24, 0x36, 0x48, 0x47, 0x00, 0x00, 0x01, 0x00, 0x1f, 0x02, 0x64, 0x01, 0x12, 0x02, 0xf5, 0x00, 0x19, 0x00, 0x11, 0xb5, 0x19, 0x10, 0x08, 0x15, 0x03, 0x0d, 0x00, 0x2f, 0xc4, 0x2f, 0xcd, 0x01, 0x2f, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x06, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x0e, 0x03, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x01, 0x12, 0x06, 0x07, 0x0c, 0x1d, 0x1d, 0x1b, 0x09, 0x0a, 0x1b, 0x1e, 0x1e, 0x0d, 0x05, 0x09, 0x1a, 0x26, 0x2a, 0x10, 0x10, 0x2a, 0x25, 0x1a, 0x02, 0x74, 0x08, 0x04, 0x0c, 0x12, 0x14, 0x08, 0x08, 0x16, 0x13, 0x0d, 0x04, 0x08, 0x0f, 0x2e, 0x2a, 0x1e, 0x1d, 0x28, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1f, 0x02, 0x6a, 0x01, 0x77, 0x02, 0xef, 0x00, 0x23, 0x00, 0x0d, 0xb3, 0x00, 0x12, 0x0a, 0x17, 0x00, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x01, 0x77, 0x14, 0x1e, 0x22, 0x0f, 0x0f, 0x1d, 0x1d, 0x1c, 0x0e, 0x0b, 0x16, 0x18, 0x19, 0x0c, 0x10, 0x14, 0x18, 0x24, 0x27, 0x0f, 0x11, 0x19, 0x16, 0x17, 0x10, 0x0d, 0x17, 0x17, 0x15, 0x0c, 0x0e, 0x15, 0x02, 0xca, 0x0f, 0x21, 0x1b, 0x11, 0x0b, 0x0e, 0x0b, 0x0d, 0x0f, 0x0c, 0x1b, 0x0e, 0x11, 0x20, 0x19, 0x0f, 0x0e, 0x12, 0x0e, 0x0f, 0x13, 0x0f, 0x18, 0x00, 0x01, 0x00, 0x1f, 0x02, 0x93, 0x01, 0x75, 0x02, 0xe7, 0x00, 0x15, 0x00, 0x11, 0xb5, 0x00, 0x17, 0x0c, 0x16, 0x07, 0x12, 0x00, 0x2f, 0xcd, 0x01, 0x10, 0xc6, 0x10, 0xc6, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x04, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x01, 0x75, 0x18, 0x26, 0x2d, 0x29, 0x21, 0x06, 0x08, 0x32, 0x36, 0x2b, 0x2e, 0x3d, 0x3c, 0x0e, 0x0c, 0x35, 0x36, 0x2a, 0x02, 0xb7, 0x08, 0x0c, 0x08, 0x05, 0x02, 0x01, 0x01, 0x06, 0x0f, 0x0e, 0x11, 0x14, 0x09, 0x02, 0x05, 0x0c, 0x12, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1f, 0x02, 0x63, 0x01, 0x16, 0x02, 0xf5, 0x00, 0x1a, 0x00, 0x11, 0xb5, 0x00, 0x0c, 0x19, 0x0f, 0x14, 0x06, 0x00, 0x2f, 0xcd, 0x2f, 0xc4, 0x01, 0x2f, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x06, 0x07, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x27, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x33, 0x32, 0x01, 0x16, 0x06, 0x05, 0x0f, 0x3b, 0x26, 0x26, 0x3c, 0x0f, 0x05, 0x06, 0x06, 0x08, 0x0a, 0x1a, 0x1d, 0x1d, 0x0e, 0x0d, 0x1e, 0x1d, 0x1b, 0x0b, 0x0f, 0x02, 0xe3, 0x0b, 0x15, 0x0a, 0x22, 0x34, 0x31, 0x20, 0x0a, 0x15, 0x0b, 0x07, 0x0d, 0x13, 0x16, 0x13, 0x14, 0x17, 0x14, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1f, 0x02, 0x4e, 0x00, 0xa7, 0x02, 0xd4, 0x00, 0x0b, 0x00, 0x0d, 0xb3, 0x00, 0x06, 0x09, 0x03, 0x00, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x31, 0x30, 0x13, 0x14, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0xa7, 0x27, 0x1d, 0x1c, 0x28, 0x24, 0x1f, 0x1e, 0x27, 0x02, 0x8d, 0x1d, 0x22, 0x21, 0x1d, 0x1e, 0x2a, 0x29, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x02, 0x29, 0x00, 0xc5, 0x02, 0xdb, 0x00, 0x0f, 0x00, 0x1b, 0x00, 0x15, 0xb7, 0x16, 0x06, 0x10, 0x00, 0x13, 0x0b, 0x19, 0x03, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x13, 0x14, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x07, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0xc5, 0x38, 0x26, 0x26, 0x37, 0x0f, 0x19, 0x22, 0x13, 0x13, 0x22, 0x1a, 0x0f, 0x29, 0x1f, 0x14, 0x14, 0x1e, 0x1e, 0x14, 0x14, 0x1f, 0x02, 0x82, 0x26, 0x33, 0x33, 0x26, 0x13, 0x21, 0x18, 0x0d, 0x0d, 0x18, 0x21, 0x14, 0x15, 0x1b, 0x1b, 0x15, 0x14, 0x1b, 0x1b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1f, 0xfe, 0xe2, 0x01, 0x3f, 0x00, 0x47, 0x00, 0x31, 0x00, 0x1a, 0x40, 0x0a, 0x0b, 0x32, 0x1e, 0x2d, 0x17, 0x00, 0x24, 0x33, 0x14, 0x05, 0x00, 0x2f, 0xcd, 0x10, 0xc4, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x10, 0xc6, 0x31, 0x30, 0x05, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x33, 0x32, 0x36, 0x35, 0x34, 0x2e, 0x02, 0x27, 0x26, 0x34, 0x35, 0x3c, 0x01, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x17, 0x1e, 0x01, 0x15, 0x14, 0x06, 0x07, 0x1e, 0x03, 0x01, 0x3f, 0x1c, 0x2c, 0x37, 0x1b, 0x14, 0x29, 0x23, 0x1c, 0x07, 0x03, 0x18, 0x0f, 0x0c, 0x12, 0x14, 0x1c, 0x17, 0x14, 0x24, 0x15, 0x1b, 0x1d, 0x07, 0x08, 0x08, 0x10, 0x11, 0x0a, 0x11, 0x03, 0x05, 0x04, 0x01, 0x02, 0x10, 0x26, 0x20, 0x15, 0x93, 0x1d, 0x32, 0x26, 0x16, 0x07, 0x12, 0x1c, 0x15, 0x06, 0x07, 0x10, 0x16, 0x0f, 0x12, 0x0f, 0x1a, 0x16, 0x0f, 0x14, 0x10, 0x0f, 0x0a, 0x0b, 0x2a, 0x0e, 0x0b, 0x1f, 0x1c, 0x13, 0x09, 0x09, 0x0f, 0x22, 0x0f, 0x06, 0x0f, 0x05, 0x06, 0x15, 0x1d, 0x23, 0x00, 0x00, 0x00, 0x02, 0x00, 0x1f, 0x02, 0x75, 0x01, 0x38, 0x03, 0x07, 0x00, 0x14, 0x00, 0x29, 0x00, 0x15, 0xb7, 0x15, 0x22, 0x0d, 0x00, 0x1f, 0x27, 0x0a, 0x12, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xcd, 0x31, 0x30, 0x13, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x17, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0xb3, 0x0c, 0x11, 0x14, 0x08, 0x07, 0x11, 0x13, 0x13, 0x09, 0x08, 0x0c, 0x17, 0x22, 0x26, 0x10, 0x0e, 0x17, 0x85, 0x0c, 0x11, 0x14, 0x08, 0x07, 0x11, 0x13, 0x13, 0x09, 0x08, 0x0c, 0x17, 0x22, 0x26, 0x10, 0x0e, 0x17, 0x02, 0xe1, 0x0b, 0x15, 0x12, 0x0f, 0x06, 0x05, 0x0d, 0x0b, 0x08, 0x09, 0x09, 0x0f, 0x2b, 0x29, 0x1d, 0x17, 0x0f, 0x0b, 0x15, 0x12, 0x0f, 0x06, 0x05, 0x0d, 0x0b, 0x08, 0x09, 0x09, 0x0f, 0x2b, 0x29, 0x1d, 0x17, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1f, 0x02, 0x64, 0x01, 0x12, 0x02, 0xf5, 0x00, 0x19, 0x00, 0x11, 0xb5, 0x10, 0x01, 0x08, 0x15, 0x0d, 0x03, 0x00, 0x2f, 0xc4, 0x2f, 0xcd, 0x01, 0x2f, 0xc4, 0x31, 0x30, 0x13, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x3e, 0x03, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x1f, 0x06, 0x07, 0x0c, 0x1d, 0x1e, 0x1b, 0x09, 0x09, 0x1b, 0x1e, 0x1e, 0x0d, 0x05, 0x09, 0x1a, 0x26, 0x29, 0x10, 0x10, 0x2a, 0x26, 0x1a, 0x02, 0xe5, 0x08, 0x04, 0x0d, 0x12, 0x14, 0x07, 0x08, 0x16, 0x13, 0x0d, 0x04, 0x08, 0x0f, 0x2d, 0x2b, 0x1e, 0x1c, 0x29, 0x2c, 0x00, 0x01, 0x00, 0x14, 0x00, 0xdb, 0x01, 0xb7, 0x01, 0x2f, 0x00, 0x19, 0x00, 0x11, 0xb5, 0x00, 0x1b, 0x0d, 0x1a, 0x07, 0x15, 0x00, 0x2f, 0xcd, 0x01, 0x10, 0xc6, 0x10, 0xc6, 0x31, 0x30, 0x25, 0x14, 0x0e, 0x04, 0x23, 0x2a, 0x01, 0x2e, 0x03, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x02, 0x01, 0xb7, 0x1e, 0x2d, 0x37, 0x33, 0x28, 0x08, 0x07, 0x21, 0x2a, 0x2e, 0x25, 0x19, 0x1b, 0x29, 0x34, 0x31, 0x29, 0x0b, 0x0f, 0x41, 0x43, 0x33, 0xff, 0x09, 0x0b, 0x08, 0x05, 0x02, 0x01, 0x02, 0x04, 0x08, 0x0d, 0x09, 0x0b, 0x11, 0x0a, 0x06, 0x03, 0x01, 0x05, 0x0c, 0x12, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xf6, 0x00, 0x26, 0x01, 0xc7, 0x02, 0x08, 0x00, 0x38, 0x00, 0x4c, 0x00, 0x26, 0x40, 0x10, 0x3e, 0x23, 0x28, 0x1d, 0x00, 0x0b, 0x48, 0x06, 0x39, 0x30, 0x36, 0x2b, 0x0e, 0x1a, 0x43, 0x14, 0x00, 0x2f, 0xcd, 0x2f, 0xc4, 0x2f, 0xc4, 0x2f, 0xcd, 0x01, 0x2f, 0xcd, 0x2f, 0xc4, 0x2f, 0xc4, 0x2f, 0xcd, 0x31, 0x30, 0x01, 0x14, 0x06, 0x0f, 0x01, 0x16, 0x07, 0x06, 0x07, 0x1e, 0x01, 0x15, 0x14, 0x06, 0x23, 0x22, 0x26, 0x27, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x27, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x37, 0x2e, 0x01, 0x35, 0x34, 0x37, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x17, 0x36, 0x33, 0x32, 0x16, 0x17, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x07, 0x22, 0x0e, 0x02, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x34, 0x2e, 0x02, 0x01, 0xc7, 0x1d, 0x13, 0x13, 0x08, 0x03, 0x01, 0x10, 0x13, 0x1c, 0x1d, 0x17, 0x14, 0x28, 0x14, 0x10, 0x24, 0x15, 0x1a, 0x2d, 0x13, 0x1b, 0x28, 0x16, 0x17, 0x1a, 0x26, 0x1c, 0x02, 0x02, 0x07, 0x16, 0x24, 0x1e, 0x1a, 0x18, 0x2c, 0x13, 0x25, 0x32, 0x1a, 0x29, 0x11, 0x1c, 0x2b, 0x1b, 0x14, 0x16, 0xe6, 0x0f, 0x17, 0x0f, 0x08, 0x09, 0x10, 0x17, 0x0f, 0x10, 0x16, 0x0e, 0x06, 0x08, 0x0f, 0x16, 0x01, 0xdd, 0x1c, 0x36, 0x18, 0x1a, 0x27, 0x20, 0x2d, 0x2f, 0x1a, 0x36, 0x12, 0x11, 0x1d, 0x14, 0x0e, 0x08, 0x0a, 0x11, 0x0f, 0x17, 0x13, 0x1b, 0x12, 0x19, 0x45, 0x26, 0x0b, 0x18, 0x0b, 0x22, 0x1f, 0x25, 0x50, 0x1a, 0x15, 0x18, 0x1b, 0x15, 0x1a, 0x0e, 0x0c, 0x19, 0x15, 0x1b, 0x72, 0x16, 0x1f, 0x24, 0x0d, 0x11, 0x25, 0x20, 0x15, 0x14, 0x20, 0x24, 0x11, 0x10, 0x24, 0x1f, 0x15, 0x00, 0x00, 0x02, 0xff, 0xe6, 0xff, 0xfe, 0x02, 0x2e, 0x02, 0xed, 0x00, 0x24, 0x00, 0x47, 0x00, 0x28, 0x40, 0x11, 0x03, 0x48, 0x42, 0x25, 0x2f, 0x06, 0x20, 0x38, 0x15, 0x00, 0x2a, 0x06, 0x43, 0x32, 0x1b, 0x3d, 0x10, 0x00, 0x2f, 0xcd, 0x2f, 0xcd, 0x2f, 0xc5, 0xdd, 0xc5, 0x01, 0x2f, 0xcd, 0x2f, 0xc5, 0xdd, 0xc4, 0xc4, 0x10, 0xc4, 0x31, 0x30, 0x13, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x03, 0x37, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x2b, 0x01, 0x22, 0x2e, 0x04, 0x35, 0x3c, 0x01, 0x25, 0x14, 0x0e, 0x02, 0x07, 0x06, 0x14, 0x15, 0x1c, 0x01, 0x1e, 0x01, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x07, 0x0e, 0x03, 0x07, 0x1e, 0x03, 0x2f, 0x1d, 0x2c, 0x2e, 0x1e, 0x02, 0x05, 0x08, 0x09, 0x06, 0x0d, 0x36, 0x40, 0x41, 0x17, 0x42, 0x62, 0x40, 0x1f, 0x48, 0x79, 0xa0, 0x58, 0x02, 0x12, 0x18, 0x0f, 0x09, 0x03, 0x01, 0x01, 0x14, 0x13, 0x1f, 0x27, 0x13, 0x01, 0x03, 0x04, 0x05, 0x1e, 0x3c, 0x2f, 0x1e, 0x10, 0x1e, 0x28, 0x18, 0x16, 0x16, 0x05, 0x06, 0x05, 0x04, 0x01, 0x12, 0x25, 0x1f, 0x13, 0x01, 0x63, 0x03, 0x10, 0x0e, 0x11, 0x13, 0x05, 0x1b, 0x48, 0x45, 0x36, 0x09, 0x16, 0x22, 0x16, 0x0b, 0x31, 0x53, 0x6c, 0x3b, 0x58, 0xa3, 0x7e, 0x4b, 0x21, 0x32, 0x3e, 0x3b, 0x2f, 0x0c, 0x17, 0x30, 0x38, 0x08, 0x0b, 0x08, 0x06, 0x01, 0x0c, 0x11, 0x04, 0x0a, 0x27, 0x26, 0x1c, 0x2f, 0x44, 0x4a, 0x1a, 0x16, 0x2e, 0x26, 0x17, 0x0a, 0x02, 0x14, 0x1e, 0x26, 0x13, 0x02, 0x08, 0x0a, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x14, 0x00, 0x13, 0x01, 0xcd, 0x02, 0x25, 0x00, 0x30, 0x00, 0x4a, 0x00, 0x1e, 0x40, 0x0c, 0x19, 0x3f, 0x00, 0x31, 0x46, 0x39, 0x14, 0x08, 0x1d, 0x29, 0x24, 0x0f, 0x00, 0x2f, 0xcd, 0x2f, 0xc4, 0xdd, 0xc5, 0x2f, 0xcd, 0x01, 0x2f, 0xc4, 0x2f, 0xc4, 0x31, 0x30, 0x01, 0x14, 0x0e, 0x02, 0x23, 0x0e, 0x01, 0x23, 0x0e, 0x05, 0x07, 0x06, 0x2e, 0x02, 0x27, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x01, 0x16, 0x33, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x1e, 0x01, 0x17, 0x32, 0x1e, 0x02, 0x03, 0x14, 0x0e, 0x04, 0x23, 0x2a, 0x01, 0x2e, 0x03, 0x35, 0x34, 0x3e, 0x04, 0x33, 0x32, 0x1e, 0x02, 0x01, 0xcd, 0x18, 0x20, 0x20, 0x07, 0x14, 0x27, 0x13, 0x01, 0x01, 0x03, 0x05, 0x0a, 0x0d, 0x0a, 0x0e, 0x13, 0x0c, 0x06, 0x01, 0x0b, 0x38, 0x3c, 0x2e, 0x30, 0x3e, 0x3b, 0x0b, 0x03, 0x0b, 0x13, 0x11, 0x0e, 0x10, 0x07, 0x01, 0x13, 0x26, 0x13, 0x07, 0x20, 0x21, 0x19, 0x0b, 0x1e, 0x2d, 0x37, 0x33, 0x28, 0x08, 0x07, 0x21, 0x2a, 0x2e, 0x25, 0x19, 0x1b, 0x29, 0x34, 0x31, 0x29, 0x0b, 0x0f, 0x41, 0x43, 0x33, 0x01, 0x59, 0x0c, 0x0d, 0x07, 0x02, 0x01, 0x01, 0x07, 0x1d, 0x25, 0x27, 0x20, 0x16, 0x01, 0x01, 0x2c, 0x39, 0x36, 0x09, 0x01, 0x05, 0x0d, 0x0d, 0x12, 0x12, 0x07, 0x01, 0x13, 0x0a, 0x32, 0x34, 0x27, 0x2e, 0x3a, 0x37, 0x09, 0x01, 0x01, 0x01, 0x02, 0x07, 0x0d, 0xfe, 0xd3, 0x09, 0x0b, 0x08, 0x05, 0x02, 0x01, 0x02, 0x04, 0x08, 0x0d, 0x09, 0x0b, 0x11, 0x0a, 0x06, 0x03, 0x01, 0x05, 0x0c, 0x12, 0x00, 0x00, 0x00, 0x01, 0x00, 0x5e, 0xff, 0x30, 0x01, 0xbb, 0x00, 0x35, 0x00, 0x20, 0x00, 0x11, 0xb5, 0x15, 0x07, 0x04, 0x21, 0x0f, 0x1c, 0x00, 0x2f, 0xcd, 0x10, 0xc6, 0x01, 0x2f, 0xc4, 0x31, 0x30, 0x17, 0x34, 0x37, 0x3e, 0x01, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x15, 0x14, 0x16, 0x33, 0x32, 0x3e, 0x02, 0x17, 0x1e, 0x01, 0x07, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x02, 0x5e, 0x26, 0x0e, 0x1f, 0x19, 0x11, 0x0c, 0x0d, 0x0c, 0x27, 0x16, 0x1a, 0x39, 0x34, 0x29, 0x0a, 0x0c, 0x02, 0x0c, 0x13, 0x2f, 0x31, 0x31, 0x15, 0x1f, 0x37, 0x2a, 0x18, 0x4a, 0x38, 0x28, 0x0f, 0x10, 0x11, 0x12, 0x0b, 0x13, 0x14, 0x18, 0x10, 0x17, 0x1d, 0x18, 0x19, 0x0d, 0x0a, 0x0c, 0x24, 0x0b, 0x13, 0x1d, 0x13, 0x0a, 0x14, 0x24, 0x31, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x9b, 0x12, 0x9e, 0x73, 0x5f, 0x0f, 0x3c, 0xf5, 0x00, 0x0b, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc9, 0x1a, 0xec, 0x20, 0x00, 0x00, 0x00, 0x00, 0xca, 0x9a, 0x2f, 0xde, 0xff, 0x57, 0xfe, 0xca, 0x04, 0x77, 0x03, 0xeb, 0x00, 0x00, 0x00, 0x09, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x03, 0xeb, 0xfe, 0xca, 0x00, 0x19, 0x04, 0x96, 0xff, 0x57, 0xff, 0xa3, 0x04, 0x77, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x01, 0xfb, 0x00, 0x0f, 0x01, 0xfe, 0xff, 0xdf, 0x01, 0x17, 0xff, 0xe4, 0x01, 0x6a, 0x00, 0x05, 0x01, 0x4d, 0xff, 0xec, 0x01, 0xbd, 0x00, 0x0a, 0x02, 0x12, 0x00, 0x0e, 0x01, 0xf5, 0x00, 0x1f, 0x02, 0x06, 0x00, 0x1f, 0x01, 0xb7, 0x00, 0x05, 0x01, 0xd5, 0x00, 0x00, 0x02, 0xa7, 0x00, 0x29, 0x02, 0xf7, 0x00, 0x29, 0x00, 0xd2, 0x00, 0x29, 0x03, 0x69, 0x00, 0x1f, 0x01, 0x47, 0x00, 0x1f, 0x01, 0x62, 0x00, 0x1f, 0x00, 0xd7, 0x00, 0x33, 0x01, 0xe0, 0x00, 0x1f, 0x01, 0xa2, 0x00, 0x1f, 0x00, 0xf1, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x1f, 0x01, 0x23, 0x00, 0x1f, 0x02, 0x12, 0x00, 0x00, 0x01, 0xe6, 0x00, 0x1a, 0x03, 0x39, 0x00, 0x14, 0x02, 0xc8, 0x00, 0x1f, 0x00, 0xa0, 0x00, 0x1f, 0x01, 0x10, 0x00, 0x29, 0x01, 0x13, 0x00, 0x14, 0x01, 0xd6, 0x00, 0x1f, 0x01, 0xe1, 0x00, 0x14, 0x00, 0xb8, 0x00, 0x0a, 0x01, 0xcc, 0x00, 0x14, 0x00, 0xb9, 0x00, 0x0a, 0x01, 0x87, 0x00, 0x0a, 0x02, 0x78, 0x00, 0x0f, 0x01, 0x14, 0x00, 0x1a, 0x02, 0x07, 0x00, 0x0a, 0x01, 0xf3, 0x00, 0x1a, 0x02, 0x20, 0x00, 0x1f, 0x02, 0x0e, 0x00, 0x24, 0x02, 0x1d, 0x00, 0x0f, 0x02, 0x17, 0x00, 0x0f, 0x02, 0x5e, 0x00, 0x0a, 0x02, 0x14, 0x00, 0x1a, 0x00, 0xc4, 0x00, 0x0a, 0x00, 0xc4, 0x00, 0x0a, 0x01, 0x4c, 0x00, 0x0a, 0x01, 0xec, 0x00, 0x1f, 0x01, 0x43, 0x00, 0x14, 0x01, 0xf4, 0x00, 0x14, 0x02, 0xd4, 0x00, 0x0f, 0x02, 0x3a, 0x00, 0x1a, 0x01, 0xe7, 0x00, 0x1f, 0x01, 0xe2, 0x00, 0x05, 0x02, 0x30, 0x00, 0x1f, 0x01, 0xe1, 0x00, 0x1a, 0x01, 0x9d, 0x00, 0x1f, 0x02, 0x15, 0x00, 0x00, 0x02, 0x22, 0x00, 0x1f, 0x01, 0x68, 0xff, 0xf1, 0x01, 0xb4, 0xff, 0xe6, 0x02, 0x1a, 0x00, 0x1a, 0x01, 0xf6, 0x00, 0x1f, 0x02, 0xfb, 0x00, 0x24, 0x02, 0x88, 0x00, 0x1f, 0x02, 0x1a, 0x00, 0x14, 0x01, 0xe8, 0x00, 0x1f, 0x02, 0x21, 0x00, 0x14, 0x02, 0x0b, 0x00, 0x1f, 0x01, 0x6a, 0x00, 0x05, 0x01, 0x7d, 0xff, 0xcd, 0x02, 0x5a, 0x00, 0x1a, 0x01, 0xf1, 0x00, 0x0a, 0x02, 0x8f, 0x00, 0x1a, 0x01, 0xea, 0xff, 0xf6, 0x01, 0xbd, 0x00, 0x0a, 0x01, 0xb7, 0x00, 0x05, 0x01, 0x11, 0x00, 0x29, 0x01, 0x5a, 0x00, 0x0a, 0x01, 0x02, 0x00, 0x0a, 0x01, 0xcc, 0x00, 0x0f, 0x01, 0xf5, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x1f, 0x01, 0xe5, 0x00, 0x05, 0x02, 0x16, 0x00, 0x24, 0x01, 0xab, 0x00, 0x0a, 0x01, 0xf1, 0x00, 0x0f, 0x01, 0xcb, 0x00, 0x0f, 0x01, 0x7e, 0xff, 0xdc, 0x02, 0x0c, 0x00, 0x0a, 0x02, 0x0d, 0x00, 0x24, 0x00, 0xf4, 0x00, 0x24, 0x01, 0x0e, 0xff, 0x57, 0x01, 0xdf, 0x00, 0x1f, 0x01, 0x07, 0x00, 0x24, 0x02, 0xa1, 0x00, 0x1e, 0x01, 0xde, 0x00, 0x1a, 0x01, 0xca, 0x00, 0x0f, 0x02, 0x07, 0x00, 0x1f, 0x02, 0x01, 0x00, 0x0f, 0x01, 0xb0, 0x00, 0x1a, 0x01, 0x4d, 0xff, 0xec, 0x01, 0x80, 0xff, 0xdc, 0x01, 0xf3, 0x00, 0x14, 0x01, 0xf2, 0x00, 0x05, 0x02, 0xe4, 0x00, 0x1f, 0x01, 0xc4, 0x00, 0x00, 0x02, 0x12, 0x00, 0x0e, 0x01, 0xd5, 0x00, 0x00, 0x01, 0x2a, 0x00, 0x1f, 0x00, 0xdd, 0x00, 0x33, 0x01, 0x25, 0x00, 0x00, 0x02, 0x0b, 0x00, 0x0f, 0x02, 0x3a, 0x00, 0x1a, 0x02, 0x3a, 0x00, 0x1a, 0x01, 0xe2, 0x00, 0x05, 0x01, 0xe1, 0x00, 0x1a, 0x02, 0x88, 0x00, 0x1f, 0x02, 0x1a, 0x00, 0x14, 0x02, 0x5a, 0x00, 0x1a, 0x01, 0xe5, 0x00, 0x05, 0x01, 0xe5, 0x00, 0x05, 0x01, 0xe5, 0x00, 0x05, 0x01, 0xe5, 0x00, 0x05, 0x01, 0xe5, 0x00, 0x05, 0x01, 0xe5, 0x00, 0x05, 0x01, 0x99, 0x00, 0x0a, 0x01, 0xcb, 0x00, 0x0f, 0x01, 0xcb, 0x00, 0x0f, 0x01, 0xcb, 0x00, 0x0f, 0x01, 0xcb, 0x00, 0x0f, 0x00, 0xf4, 0x00, 0x24, 0x00, 0xf4, 0x00, 0x1f, 0x00, 0xf4, 0x00, 0x01, 0x00, 0xf4, 0xff, 0xe3, 0x01, 0xde, 0x00, 0x1a, 0x01, 0xca, 0x00, 0x0f, 0x01, 0xca, 0x00, 0x0f, 0x01, 0xca, 0x00, 0x0f, 0x01, 0xca, 0x00, 0x0f, 0x01, 0xca, 0x00, 0x0f, 0x01, 0xf3, 0x00, 0x14, 0x01, 0xf3, 0x00, 0x14, 0x01, 0xf3, 0x00, 0x14, 0x01, 0xf3, 0x00, 0x14, 0x00, 0xcf, 0x00, 0x0a, 0x01, 0xb2, 0x00, 0x0f, 0x02, 0x18, 0xff, 0xf6, 0x01, 0x9f, 0x00, 0x14, 0x00, 0xd0, 0x00, 0x14, 0x02, 0x52, 0x00, 0x0f, 0x02, 0x5f, 0xff, 0xdc, 0x02, 0x4a, 0x00, 0x14, 0x02, 0x4a, 0x00, 0x14, 0x01, 0xbc, 0xff, 0xf6, 0x00, 0xd2, 0x00, 0x1f, 0x01, 0x87, 0x00, 0x1f, 0x03, 0x4e, 0x00, 0x1a, 0x02, 0x1a, 0x00, 0x14, 0x02, 0x1f, 0x00, 0x00, 0x01, 0x6d, 0x00, 0x15, 0x01, 0xa2, 0x00, 0x0f, 0x01, 0x90, 0x00, 0x14, 0x03, 0x46, 0x00, 0x05, 0x01, 0xca, 0x00, 0x0f, 0x01, 0xf2, 0x00, 0x14, 0x00, 0xf9, 0x00, 0x1e, 0x02, 0x1e, 0x00, 0x0f, 0x01, 0x7c, 0x00, 0x0a, 0x01, 0x79, 0x00, 0x14, 0x02, 0x7c, 0x00, 0x0a, 0x00, 0xf1, 0x00, 0x00, 0x02, 0x3a, 0x00, 0x1a, 0x02, 0x3a, 0x00, 0x1a, 0x02, 0x1a, 0x00, 0x14, 0x03, 0x56, 0x00, 0x14, 0x03, 0x0f, 0x00, 0x0a, 0x02, 0x09, 0x00, 0x1f, 0x02, 0x47, 0x00, 0x1f, 0x01, 0x81, 0x00, 0x1f, 0x01, 0x81, 0x00, 0x0a, 0x00, 0xcc, 0x00, 0x1f, 0x00, 0xcd, 0x00, 0x0a, 0x01, 0xc2, 0x00, 0x0f, 0x02, 0x12, 0x00, 0x0e, 0x01, 0xbd, 0x00, 0x0a, 0x01, 0xdb, 0x00, 0x1f, 0x02, 0x6c, 0x00, 0x00, 0x00, 0xe3, 0x00, 0x0a, 0x00, 0xe0, 0x00, 0x14, 0x02, 0x2a, 0xff, 0xdc, 0x02, 0x03, 0xff, 0xdc, 0x00, 0xe2, 0x00, 0x1f, 0x00, 0xcd, 0x00, 0x0a, 0x01, 0x81, 0x00, 0x0a, 0x04, 0x96, 0x00, 0x14, 0x02, 0x3a, 0x00, 0x1a, 0x01, 0xe1, 0x00, 0x1a, 0x02, 0x3a, 0x00, 0x1a, 0x01, 0xe1, 0x00, 0x1a, 0x01, 0xe1, 0x00, 0x1a, 0x01, 0x68, 0xff, 0xf1, 0x01, 0x68, 0xff, 0xf1, 0x01, 0x68, 0xff, 0xf1, 0x01, 0x68, 0xff, 0xf1, 0x02, 0x1a, 0x00, 0x14, 0x02, 0x1a, 0x00, 0x14, 0x02, 0x1a, 0x00, 0x14, 0x02, 0x5a, 0x00, 0x1a, 0x02, 0x5a, 0x00, 0x1a, 0x02, 0x5a, 0x00, 0x1a, 0x00, 0xf4, 0x00, 0x24, 0x01, 0x31, 0x00, 0x1f, 0x01, 0x96, 0x00, 0x1f, 0x01, 0x93, 0x00, 0x1f, 0x01, 0x34, 0x00, 0x1f, 0x00, 0xc6, 0x00, 0x1f, 0x00, 0xcf, 0x00, 0x0a, 0x01, 0x5e, 0x00, 0x1f, 0x01, 0x57, 0x00, 0x1f, 0x01, 0x31, 0x00, 0x1f, 0x01, 0xcc, 0x00, 0x14, 0x01, 0xbc, 0xff, 0xf6, 0x02, 0x3d, 0xff, 0xe6, 0x01, 0xe1, 0x00, 0x14, 0x01, 0x5e, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x09, 0x68, 0x00, 0x01, 0x01, 0x8f, 0x06, 0x00, 0x00, 0x08, 0x03, 0x5a, 0x00, 0x36, 0x00, 0x3f, 0x00, 0x14, 0x00, 0x36, 0x00, 0x44, 0xff, 0xf6, 0x00, 0x36, 0x00, 0x48, 0xff, 0xf6, 0x00, 0x36, 0x00, 0x49, 0xff, 0xf6, 0x00, 0x36, 0x00, 0x4a, 0xff, 0xf6, 0x00, 0x36, 0x00, 0x4e, 0xff, 0xe1, 0x00, 0x36, 0x00, 0x4f, 0xff, 0xf6, 0x00, 0x36, 0x00, 0x79, 0xff, 0xf6, 0x00, 0x36, 0x00, 0xb1, 0xff, 0xf6, 0x00, 0x36, 0x00, 0xb2, 0xff, 0xf6, 0x00, 0x36, 0x00, 0xbc, 0xff, 0xe1, 0x00, 0x36, 0x00, 0xd0, 0xff, 0xf6, 0x00, 0x36, 0x00, 0xd1, 0xff, 0xf6, 0x00, 0x36, 0x00, 0xd2, 0xff, 0xf6, 0x00, 0x36, 0x00, 0xd3, 0xff, 0xf6, 0x00, 0x36, 0x00, 0xd4, 0xff, 0xf6, 0x00, 0x36, 0x00, 0xd5, 0xff, 0xf6, 0x00, 0x39, 0x00, 0x3e, 0xff, 0xf6, 0x00, 0x39, 0x00, 0x4f, 0xff, 0xec, 0x00, 0x39, 0x00, 0xcc, 0xff, 0xf6, 0x00, 0x39, 0x00, 0xcd, 0xff, 0xf6, 0x00, 0x39, 0x00, 0xce, 0xff, 0xf6, 0x00, 0x39, 0x00, 0xcf, 0xff, 0xf6, 0x00, 0x3a, 0x00, 0x44, 0xff, 0xf6, 0x00, 0x3a, 0x00, 0x48, 0xff, 0xf6, 0x00, 0x3a, 0x00, 0x4a, 0xff, 0xec, 0x00, 0x3a, 0x00, 0x79, 0xff, 0xf6, 0x00, 0x3a, 0x00, 0xb1, 0xff, 0xf6, 0x00, 0x3a, 0x00, 0xb2, 0xff, 0xf6, 0x00, 0x3a, 0x00, 0xd0, 0xff, 0xf6, 0x00, 0x3a, 0x00, 0xd1, 0xff, 0xf6, 0x00, 0x3a, 0x00, 0xd2, 0xff, 0xf6, 0x00, 0x3a, 0x00, 0xd3, 0xff, 0xec, 0x00, 0x3a, 0x00, 0xd4, 0xff, 0xec, 0x00, 0x3a, 0x00, 0xd5, 0xff, 0xec, 0x00, 0x3b, 0x00, 0x21, 0xff, 0xc3, 0x00, 0x3b, 0x00, 0x23, 0xff, 0xc3, 0x00, 0x3b, 0x00, 0x36, 0xff, 0xf6, 0x00, 0x3b, 0x00, 0x74, 0xff, 0xf6, 0x00, 0x3b, 0x00, 0x75, 0xff, 0xf6, 0x00, 0x3b, 0x00, 0xa0, 0xff, 0xf6, 0x00, 0x3b, 0x00, 0xaf, 0xff, 0xf6, 0x00, 0x3b, 0x00, 0xb0, 0xff, 0xf6, 0x00, 0x3b, 0x00, 0xc7, 0xff, 0xf6, 0x00, 0x3b, 0x00, 0xc9, 0xff, 0xf6, 0x00, 0x3c, 0x00, 0x3e, 0xff, 0xf6, 0x00, 0x3c, 0x00, 0x48, 0xff, 0xf6, 0x00, 0x3c, 0x00, 0x49, 0xff, 0xf6, 0x00, 0x3c, 0x00, 0x4f, 0xff, 0xec, 0x00, 0x3c, 0x00, 0xcc, 0xff, 0xf6, 0x00, 0x3c, 0x00, 0xcd, 0xff, 0xf6, 0x00, 0x3c, 0x00, 0xce, 0xff, 0xf6, 0x00, 0x3c, 0x00, 0xcf, 0xff, 0xf6, 0x00, 0x3d, 0x00, 0x36, 0xff, 0xf6, 0x00, 0x3d, 0x00, 0x74, 0xff, 0xf6, 0x00, 0x3d, 0x00, 0x75, 0xff, 0xf6, 0x00, 0x3d, 0x00, 0xa0, 0xff, 0xf6, 0x00, 0x3d, 0x00, 0xaf, 0xff, 0xf6, 0x00, 0x3d, 0x00, 0xb0, 0xff, 0xf6, 0x00, 0x3d, 0x00, 0xc7, 0xff, 0xf6, 0x00, 0x3d, 0x00, 0xc9, 0xff, 0xf6, 0x00, 0x3f, 0x00, 0x4f, 0xff, 0xf6, 0x00, 0x40, 0x00, 0x44, 0xff, 0xf6, 0x00, 0x40, 0x00, 0x46, 0xff, 0xf6, 0x00, 0x40, 0x00, 0x4a, 0xff, 0xec, 0x00, 0x40, 0x00, 0x79, 0xff, 0xf6, 0x00, 0x40, 0x00, 0xb1, 0xff, 0xf6, 0x00, 0x40, 0x00, 0xb2, 0xff, 0xf6, 0x00, 0x40, 0x00, 0xd0, 0xff, 0xf6, 0x00, 0x40, 0x00, 0xd1, 0xff, 0xf6, 0x00, 0x40, 0x00, 0xd2, 0xff, 0xf6, 0x00, 0x40, 0x00, 0xd3, 0xff, 0xec, 0x00, 0x40, 0x00, 0xd4, 0xff, 0xec, 0x00, 0x40, 0x00, 0xd5, 0xff, 0xec, 0x00, 0x41, 0x00, 0x49, 0xff, 0xb8, 0x00, 0x41, 0x00, 0x4a, 0xff, 0xd7, 0x00, 0x41, 0x00, 0x4b, 0xff, 0xcd, 0x00, 0x41, 0x00, 0x4c, 0xff, 0xec, 0x00, 0x41, 0x00, 0x4e, 0xff, 0xd7, 0x00, 0x41, 0x00, 0x69, 0xff, 0xec, 0x00, 0x41, 0x00, 0x6b, 0xff, 0xe1, 0x00, 0x41, 0x00, 0x6c, 0xff, 0xf6, 0x00, 0x41, 0x00, 0x6e, 0xff, 0xf6, 0x00, 0x41, 0x00, 0xbb, 0xff, 0xf6, 0x00, 0x41, 0x00, 0xbc, 0xff, 0xd7, 0x00, 0x41, 0x00, 0xd3, 0xff, 0xd7, 0x00, 0x41, 0x00, 0xd4, 0xff, 0xd7, 0x00, 0x41, 0x00, 0xd5, 0xff, 0xd7, 0x00, 0x44, 0x00, 0x36, 0xff, 0xf6, 0x00, 0x44, 0x00, 0x4e, 0xff, 0xf6, 0x00, 0x44, 0x00, 0x74, 0xff, 0xf6, 0x00, 0x44, 0x00, 0x75, 0xff, 0xf6, 0x00, 0x44, 0x00, 0xa0, 0xff, 0xf6, 0x00, 0x44, 0x00, 0xaf, 0xff, 0xf6, 0x00, 0x44, 0x00, 0xb0, 0xff, 0xf6, 0x00, 0x44, 0x00, 0xbc, 0xff, 0xf6, 0x00, 0x44, 0x00, 0xc7, 0xff, 0xf6, 0x00, 0x44, 0x00, 0xc9, 0xff, 0xf6, 0x00, 0x45, 0x00, 0x21, 0xff, 0xa4, 0x00, 0x45, 0x00, 0x23, 0xff, 0xa4, 0x00, 0x45, 0x00, 0x36, 0xff, 0xec, 0x00, 0x45, 0x00, 0x3f, 0xff, 0xf6, 0x00, 0x45, 0x00, 0x74, 0xff, 0xec, 0x00, 0x45, 0x00, 0x75, 0xff, 0xec, 0x00, 0x45, 0x00, 0xa0, 0xff, 0xec, 0x00, 0x45, 0x00, 0xaf, 0xff, 0xec, 0x00, 0x45, 0x00, 0xb0, 0xff, 0xec, 0x00, 0x45, 0x00, 0xc7, 0xff, 0xec, 0x00, 0x45, 0x00, 0xc9, 0xff, 0xec, 0x00, 0x47, 0x00, 0x5c, 0xff, 0xec, 0x00, 0x47, 0x00, 0x66, 0xff, 0xec, 0x00, 0x48, 0x00, 0x36, 0xff, 0xf6, 0x00, 0x48, 0x00, 0x74, 0xff, 0xf6, 0x00, 0x48, 0x00, 0x75, 0xff, 0xf6, 0x00, 0x48, 0x00, 0xa0, 0xff, 0xf6, 0x00, 0x48, 0x00, 0xaf, 0xff, 0xf6, 0x00, 0x48, 0x00, 0xb0, 0xff, 0xf6, 0x00, 0x48, 0x00, 0xc7, 0xff, 0xf6, 0x00, 0x48, 0x00, 0xc9, 0xff, 0xf6, 0x00, 0x49, 0x00, 0x36, 0xff, 0xf6, 0x00, 0x49, 0x00, 0x58, 0xff, 0xec, 0x00, 0x49, 0x00, 0x5a, 0xff, 0xec, 0x00, 0x49, 0x00, 0x5c, 0xff, 0xd7, 0x00, 0x49, 0x00, 0x64, 0xff, 0xec, 0x00, 0x49, 0x00, 0x65, 0xff, 0xec, 0x00, 0x49, 0x00, 0x66, 0xff, 0xe1, 0x00, 0x49, 0x00, 0x6a, 0xff, 0xec, 0x00, 0x49, 0x00, 0x6e, 0xff, 0xf6, 0x00, 0x49, 0x00, 0x74, 0xff, 0xf6, 0x00, 0x49, 0x00, 0x75, 0xff, 0xf6, 0x00, 0x49, 0x00, 0x81, 0xff, 0xec, 0x00, 0x49, 0x00, 0x82, 0xff, 0xec, 0x00, 0x49, 0x00, 0x83, 0xff, 0xec, 0x00, 0x49, 0x00, 0x84, 0xff, 0xec, 0x00, 0x49, 0x00, 0x85, 0xff, 0xec, 0x00, 0x49, 0x00, 0x8b, 0xff, 0xec, 0x00, 0x49, 0x00, 0x8c, 0xff, 0xec, 0x00, 0x49, 0x00, 0x8d, 0xff, 0xec, 0x00, 0x49, 0x00, 0x8e, 0xff, 0xec, 0x00, 0x49, 0x00, 0x8f, 0xff, 0xec, 0x00, 0x49, 0x00, 0x90, 0xff, 0xec, 0x00, 0x49, 0x00, 0x91, 0xff, 0xec, 0x00, 0x49, 0x00, 0x92, 0xff, 0xec, 0x00, 0x49, 0x00, 0x93, 0xff, 0xec, 0x00, 0x49, 0x00, 0xa0, 0xff, 0xf6, 0x00, 0x49, 0x00, 0xaf, 0xff, 0xf6, 0x00, 0x49, 0x00, 0xb0, 0xff, 0xf6, 0x00, 0x49, 0x00, 0xb3, 0xff, 0xec, 0x00, 0x49, 0x00, 0xbb, 0xff, 0xf6, 0x00, 0x49, 0x00, 0xc7, 0xff, 0xf6, 0x00, 0x49, 0x00, 0xc9, 0xff, 0xf6, 0x00, 0x4a, 0x00, 0x36, 0xff, 0xf1, 0x00, 0x4a, 0x00, 0x3e, 0xff, 0xf6, 0x00, 0x4a, 0x00, 0x74, 0xff, 0xf1, 0x00, 0x4a, 0x00, 0x75, 0xff, 0xf1, 0x00, 0x4a, 0x00, 0xa0, 0xff, 0xf1, 0x00, 0x4a, 0x00, 0xaf, 0xff, 0xf1, 0x00, 0x4a, 0x00, 0xb0, 0xff, 0xf1, 0x00, 0x4a, 0x00, 0xc7, 0xff, 0xf1, 0x00, 0x4a, 0x00, 0xc9, 0xff, 0xf1, 0x00, 0x4a, 0x00, 0xcc, 0xff, 0xf6, 0x00, 0x4a, 0x00, 0xcd, 0xff, 0xf6, 0x00, 0x4a, 0x00, 0xce, 0xff, 0xf6, 0x00, 0x4a, 0x00, 0xcf, 0xff, 0xf6, 0x00, 0x4b, 0x00, 0x21, 0xff, 0xae, 0x00, 0x4b, 0x00, 0x23, 0xff, 0xae, 0x00, 0x4b, 0x00, 0x2f, 0xff, 0xec, 0x00, 0x4b, 0x00, 0x30, 0xff, 0xec, 0x00, 0x4b, 0x00, 0x5c, 0xff, 0xec, 0x00, 0x4b, 0x00, 0x64, 0xff, 0xf6, 0x00, 0x4b, 0x00, 0x66, 0xff, 0xf6, 0x00, 0x4b, 0x00, 0x8b, 0xff, 0xf6, 0x00, 0x4b, 0x00, 0x8c, 0xff, 0xf6, 0x00, 0x4b, 0x00, 0x8d, 0xff, 0xf6, 0x00, 0x4b, 0x00, 0x8e, 0xff, 0xf6, 0x00, 0x4b, 0x00, 0x8f, 0xff, 0xf6, 0x00, 0x4b, 0x00, 0xb3, 0xff, 0xf6, 0x00, 0x4c, 0x00, 0x21, 0xff, 0xe1, 0x00, 0x4c, 0x00, 0x23, 0xff, 0xe1, 0x00, 0x4c, 0x00, 0x36, 0xff, 0xf6, 0x00, 0x4c, 0x00, 0x5c, 0xff, 0xf6, 0x00, 0x4c, 0x00, 0x74, 0xff, 0xf6, 0x00, 0x4c, 0x00, 0x75, 0xff, 0xf6, 0x00, 0x4c, 0x00, 0xa0, 0xff, 0xf6, 0x00, 0x4c, 0x00, 0xaf, 0xff, 0xf6, 0x00, 0x4c, 0x00, 0xb0, 0xff, 0xf6, 0x00, 0x4c, 0x00, 0xc7, 0xff, 0xf6, 0x00, 0x4c, 0x00, 0xc9, 0xff, 0xf6, 0x00, 0x4d, 0x00, 0x5c, 0xff, 0xf6, 0x00, 0x4d, 0x00, 0x64, 0xff, 0xf6, 0x00, 0x4d, 0x00, 0x66, 0xff, 0xf6, 0x00, 0x4d, 0x00, 0x6a, 0xff, 0xf6, 0x00, 0x4d, 0x00, 0x6b, 0xff, 0xf6, 0x00, 0x4d, 0x00, 0x6e, 0xff, 0xf6, 0x00, 0x4d, 0x00, 0x8b, 0xff, 0xf6, 0x00, 0x4d, 0x00, 0x8c, 0xff, 0xf6, 0x00, 0x4d, 0x00, 0x8d, 0xff, 0xf6, 0x00, 0x4d, 0x00, 0x8e, 0xff, 0xf6, 0x00, 0x4d, 0x00, 0x8f, 0xff, 0xf6, 0x00, 0x4d, 0x00, 0x90, 0xff, 0xf6, 0x00, 0x4d, 0x00, 0x91, 0xff, 0xf6, 0x00, 0x4d, 0x00, 0x92, 0xff, 0xf6, 0x00, 0x4d, 0x00, 0x93, 0xff, 0xf6, 0x00, 0x4d, 0x00, 0xb3, 0xff, 0xf6, 0x00, 0x4d, 0x00, 0xbb, 0xff, 0xf6, 0x00, 0x4e, 0x00, 0x21, 0xff, 0xae, 0x00, 0x4e, 0x00, 0x23, 0xff, 0xae, 0x00, 0x4e, 0x00, 0x36, 0xff, 0xf6, 0x00, 0x4e, 0x00, 0x58, 0xff, 0xf6, 0x00, 0x4e, 0x00, 0x5c, 0xff, 0xe1, 0x00, 0x4e, 0x00, 0x64, 0xff, 0xf6, 0x00, 0x4e, 0x00, 0x66, 0xff, 0xf6, 0x00, 0x4e, 0x00, 0x74, 0xff, 0xf6, 0x00, 0x4e, 0x00, 0x75, 0xff, 0xf6, 0x00, 0x4e, 0x00, 0x81, 0xff, 0xf6, 0x00, 0x4e, 0x00, 0x8b, 0xff, 0xf6, 0x00, 0x4e, 0x00, 0x8c, 0xff, 0xf6, 0x00, 0x4e, 0x00, 0x8d, 0xff, 0xf6, 0x00, 0x4e, 0x00, 0x8e, 0xff, 0xf6, 0x00, 0x4e, 0x00, 0x8f, 0xff, 0xf6, 0x00, 0x4e, 0x00, 0xa0, 0xff, 0xf6, 0x00, 0x4e, 0x00, 0xaf, 0xff, 0xf6, 0x00, 0x4e, 0x00, 0xb0, 0xff, 0xf6, 0x00, 0x4e, 0x00, 0xb3, 0xff, 0xf6, 0x00, 0x4e, 0x00, 0xc7, 0xff, 0xf6, 0x00, 0x4e, 0x00, 0xc9, 0xff, 0xf6, 0x00, 0x4f, 0x00, 0x5a, 0xff, 0xf6, 0x00, 0x4f, 0x00, 0x5c, 0xff, 0xf6, 0x00, 0x4f, 0x00, 0x82, 0xff, 0xf6, 0x00, 0x4f, 0x00, 0x83, 0xff, 0xf6, 0x00, 0x4f, 0x00, 0x84, 0xff, 0xf6, 0x00, 0x4f, 0x00, 0x85, 0xff, 0xf6, 0x00, 0x60, 0x00, 0x58, 0xff, 0xfb, 0x00, 0x60, 0x00, 0x5a, 0xff, 0xfb, 0x00, 0x60, 0x00, 0x5c, 0xff, 0xfb, 0x00, 0x60, 0x00, 0x64, 0xff, 0xf6, 0x00, 0x60, 0x00, 0x66, 0xff, 0xf6, 0x00, 0x60, 0x00, 0x6a, 0xff, 0xfb, 0x00, 0x60, 0x00, 0x81, 0xff, 0xfb, 0x00, 0x60, 0x00, 0x82, 0xff, 0xfb, 0x00, 0x60, 0x00, 0x83, 0xff, 0xfb, 0x00, 0x60, 0x00, 0x84, 0xff, 0xfb, 0x00, 0x60, 0x00, 0x85, 0xff, 0xfb, 0x00, 0x60, 0x00, 0x8b, 0xff, 0xf6, 0x00, 0x60, 0x00, 0x8c, 0xff, 0xf6, 0x00, 0x60, 0x00, 0x8d, 0xff, 0xf6, 0x00, 0x60, 0x00, 0x8e, 0xff, 0xf6, 0x00, 0x60, 0x00, 0x8f, 0xff, 0xf6, 0x00, 0x60, 0x00, 0x90, 0xff, 0xfb, 0x00, 0x60, 0x00, 0x91, 0xff, 0xfb, 0x00, 0x60, 0x00, 0x92, 0xff, 0xfb, 0x00, 0x60, 0x00, 0x93, 0xff, 0xfb, 0x00, 0x60, 0x00, 0xb3, 0xff, 0xf6, 0x00, 0x64, 0x00, 0x6d, 0xff, 0xf6, 0x00, 0x65, 0x00, 0x6d, 0xff, 0xf6, 0x00, 0x6a, 0x00, 0x6c, 0xff, 0xf6, 0x00, 0x6a, 0x00, 0x6d, 0xff, 0xf6, 0x00, 0x6b, 0x00, 0x21, 0xff, 0xb8, 0x00, 0x6b, 0x00, 0x23, 0xff, 0xb8, 0x00, 0x6c, 0x00, 0x21, 0xff, 0xc3, 0x00, 0x6c, 0x00, 0x23, 0xff, 0xc3, 0x00, 0x6c, 0x00, 0x5a, 0xff, 0xfb, 0x00, 0x6c, 0x00, 0x5e, 0xff, 0xfb, 0x00, 0x6c, 0x00, 0x64, 0xff, 0xf6, 0x00, 0x6c, 0x00, 0x66, 0xff, 0xf6, 0x00, 0x6c, 0x00, 0x6a, 0xff, 0xf6, 0x00, 0x6c, 0x00, 0x6d, 0xff, 0xf6, 0x00, 0x6c, 0x00, 0x82, 0xff, 0xfb, 0x00, 0x6c, 0x00, 0x83, 0xff, 0xfb, 0x00, 0x6c, 0x00, 0x84, 0xff, 0xfb, 0x00, 0x6c, 0x00, 0x85, 0xff, 0xfb, 0x00, 0x6c, 0x00, 0x86, 0xff, 0xfb, 0x00, 0x6c, 0x00, 0x87, 0xff, 0xfb, 0x00, 0x6c, 0x00, 0x88, 0xff, 0xfb, 0x00, 0x6c, 0x00, 0x89, 0xff, 0xfb, 0x00, 0x6c, 0x00, 0x8b, 0xff, 0xf6, 0x00, 0x6c, 0x00, 0x8c, 0xff, 0xf6, 0x00, 0x6c, 0x00, 0x8d, 0xff, 0xf6, 0x00, 0x6c, 0x00, 0x8e, 0xff, 0xf6, 0x00, 0x6c, 0x00, 0x8f, 0xff, 0xf6, 0x00, 0x6c, 0x00, 0x90, 0xff, 0xf6, 0x00, 0x6c, 0x00, 0x91, 0xff, 0xf6, 0x00, 0x6c, 0x00, 0x92, 0xff, 0xf6, 0x00, 0x6c, 0x00, 0x93, 0xff, 0xf6, 0x00, 0x6c, 0x00, 0xb3, 0xff, 0xf6, 0x00, 0x6c, 0x00, 0xd6, 0xff, 0xfb, 0x00, 0x6d, 0x00, 0x5a, 0xff, 0xf6, 0x00, 0x6d, 0x00, 0x5c, 0xff, 0xf1, 0x00, 0x6d, 0x00, 0x64, 0xff, 0xf6, 0x00, 0x6d, 0x00, 0x66, 0xff, 0xf6, 0x00, 0x6d, 0x00, 0x6a, 0xff, 0xf6, 0x00, 0x6d, 0x00, 0x82, 0xff, 0xf6, 0x00, 0x6d, 0x00, 0x83, 0xff, 0xf6, 0x00, 0x6d, 0x00, 0x84, 0xff, 0xf6, 0x00, 0x6d, 0x00, 0x85, 0xff, 0xf6, 0x00, 0x6d, 0x00, 0x8b, 0xff, 0xf6, 0x00, 0x6d, 0x00, 0x8c, 0xff, 0xf6, 0x00, 0x6d, 0x00, 0x8d, 0xff, 0xf6, 0x00, 0x6d, 0x00, 0x8e, 0xff, 0xf6, 0x00, 0x6d, 0x00, 0x8f, 0xff, 0xf6, 0x00, 0x6d, 0x00, 0x90, 0xff, 0xf6, 0x00, 0x6d, 0x00, 0x91, 0xff, 0xf6, 0x00, 0x6d, 0x00, 0x92, 0xff, 0xf6, 0x00, 0x6d, 0x00, 0x93, 0xff, 0xf6, 0x00, 0x6d, 0x00, 0xb3, 0xff, 0xf6, 0x00, 0x74, 0x00, 0x3f, 0x00, 0x14, 0x00, 0x74, 0x00, 0x44, 0xff, 0xf6, 0x00, 0x74, 0x00, 0x48, 0xff, 0xf6, 0x00, 0x74, 0x00, 0x49, 0xff, 0xf6, 0x00, 0x74, 0x00, 0x4a, 0xff, 0xf6, 0x00, 0x74, 0x00, 0x4e, 0xff, 0xe1, 0x00, 0x74, 0x00, 0x4f, 0xff, 0xf6, 0x00, 0x75, 0x00, 0x3f, 0x00, 0x14, 0x00, 0x75, 0x00, 0x44, 0xff, 0xf6, 0x00, 0x75, 0x00, 0x48, 0xff, 0xf6, 0x00, 0x75, 0x00, 0x49, 0xff, 0xf6, 0x00, 0x75, 0x00, 0x4a, 0xff, 0xf6, 0x00, 0x75, 0x00, 0x4e, 0xff, 0xe1, 0x00, 0x75, 0x00, 0x4f, 0xff, 0xf6, 0x00, 0x77, 0x00, 0x44, 0xff, 0xf6, 0x00, 0x77, 0x00, 0x48, 0xff, 0xf6, 0x00, 0x77, 0x00, 0x4a, 0xff, 0xec, 0x00, 0x79, 0x00, 0x36, 0xff, 0xf6, 0x00, 0x79, 0x00, 0x4e, 0xff, 0xf6, 0x00, 0x8b, 0x00, 0x6d, 0xff, 0xf6, 0x00, 0x8c, 0x00, 0x6d, 0xff, 0xf6, 0x00, 0x8d, 0x00, 0x6d, 0xff, 0xf6, 0x00, 0x8e, 0x00, 0x6d, 0xff, 0xf6, 0x00, 0x8f, 0x00, 0x6d, 0xff, 0xf6, 0x00, 0x90, 0x00, 0x6c, 0xff, 0xf6, 0x00, 0x90, 0x00, 0x6d, 0xff, 0xf6, 0x00, 0x91, 0x00, 0x6c, 0xff, 0xf6, 0x00, 0x91, 0x00, 0x6d, 0xff, 0xf6, 0x00, 0x92, 0x00, 0x6c, 0xff, 0xf6, 0x00, 0x92, 0x00, 0x6d, 0xff, 0xf6, 0x00, 0x93, 0x00, 0x6c, 0xff, 0xf6, 0x00, 0x93, 0x00, 0x6d, 0xff, 0xf6, 0x00, 0xa0, 0x00, 0x44, 0xff, 0xf6, 0x00, 0xa0, 0x00, 0x48, 0xff, 0xf6, 0x00, 0xa0, 0x00, 0x4a, 0xff, 0xec, 0x00, 0xaf, 0x00, 0x3f, 0x00, 0x14, 0x00, 0xaf, 0x00, 0x44, 0xff, 0xf6, 0x00, 0xaf, 0x00, 0x48, 0xff, 0xf6, 0x00, 0xaf, 0x00, 0x49, 0xff, 0xf6, 0x00, 0xaf, 0x00, 0x4a, 0xff, 0xf6, 0x00, 0xaf, 0x00, 0x4e, 0xff, 0xe1, 0x00, 0xaf, 0x00, 0x4f, 0xff, 0xf6, 0x00, 0xb0, 0x00, 0x3f, 0x00, 0x14, 0x00, 0xb0, 0x00, 0x44, 0xff, 0xf6, 0x00, 0xb0, 0x00, 0x48, 0xff, 0xf6, 0x00, 0xb0, 0x00, 0x49, 0xff, 0xf6, 0x00, 0xb0, 0x00, 0x4a, 0xff, 0xf6, 0x00, 0xb0, 0x00, 0x4e, 0xff, 0xe1, 0x00, 0xb0, 0x00, 0x4f, 0xff, 0xf6, 0x00, 0xb1, 0x00, 0x36, 0xff, 0xf6, 0x00, 0xb1, 0x00, 0x4e, 0xff, 0xf6, 0x00, 0xb2, 0x00, 0x44, 0xff, 0xf6, 0x00, 0xb2, 0x00, 0x48, 0xff, 0xf6, 0x00, 0xb2, 0x00, 0x4a, 0xff, 0xec, 0x00, 0xbc, 0x00, 0x36, 0xff, 0xf6, 0x00, 0xbc, 0x00, 0x58, 0xff, 0xf6, 0x00, 0xbc, 0x00, 0x5c, 0xff, 0xe1, 0x00, 0xbc, 0x00, 0x64, 0xff, 0xf6, 0x00, 0xbc, 0x00, 0x66, 0xff, 0xf6, 0x00, 0xc7, 0x00, 0x3f, 0x00, 0x14, 0x00, 0xc7, 0x00, 0x44, 0xff, 0xf6, 0x00, 0xc7, 0x00, 0x48, 0xff, 0xf6, 0x00, 0xc7, 0x00, 0x49, 0xff, 0xf6, 0x00, 0xc7, 0x00, 0x4a, 0xff, 0xf6, 0x00, 0xc7, 0x00, 0x4e, 0xff, 0xe1, 0x00, 0xc7, 0x00, 0x4f, 0xff, 0xf6, 0x00, 0xc8, 0x00, 0x44, 0xff, 0xf6, 0x00, 0xc8, 0x00, 0x48, 0xff, 0xf6, 0x00, 0xc8, 0x00, 0x4a, 0xff, 0xec, 0x00, 0xc9, 0x00, 0x3f, 0x00, 0x14, 0x00, 0xc9, 0x00, 0x44, 0xff, 0xf6, 0x00, 0xc9, 0x00, 0x48, 0xff, 0xf6, 0x00, 0xc9, 0x00, 0x49, 0xff, 0xf6, 0x00, 0xc9, 0x00, 0x4a, 0xff, 0xf6, 0x00, 0xc9, 0x00, 0x4e, 0xff, 0xe1, 0x00, 0xc9, 0x00, 0x4f, 0xff, 0xf6, 0x00, 0xca, 0x00, 0x44, 0xff, 0xf6, 0x00, 0xca, 0x00, 0x48, 0xff, 0xf6, 0x00, 0xca, 0x00, 0x4a, 0xff, 0xec, 0x00, 0xcb, 0x00, 0x44, 0xff, 0xf6, 0x00, 0xcb, 0x00, 0x48, 0xff, 0xf6, 0x00, 0xcb, 0x00, 0x4a, 0xff, 0xec, 0x00, 0xd0, 0x00, 0x36, 0xff, 0xf6, 0x00, 0xd0, 0x00, 0x4e, 0xff, 0xf6, 0x00, 0xd1, 0x00, 0x36, 0xff, 0xf6, 0x00, 0xd1, 0x00, 0x4e, 0xff, 0xf6, 0x00, 0xd2, 0x00, 0x36, 0xff, 0xf6, 0x00, 0xd2, 0x00, 0x4e, 0xff, 0xf6, 0x00, 0xd3, 0x00, 0x36, 0xff, 0xf1, 0x00, 0xd3, 0x00, 0x3e, 0xff, 0xf6, 0x00, 0xd4, 0x00, 0x36, 0xff, 0xf1, 0x00, 0xd4, 0x00, 0x3e, 0xff, 0xf6, 0x00, 0xd5, 0x00, 0x36, 0xff, 0xf1, 0x00, 0xd5, 0x00, 0x3e, 0xff, 0xf6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x00, 0xde, 0x01, 0x30, 0x01, 0x3c, 0x01, 0x48, 0x01, 0x54, 0x01, 0x60, 0x01, 0xc0, 0x02, 0x2e, 0x02, 0x3a, 0x02, 0x46, 0x02, 0xf0, 0x03, 0xb6, 0x03, 0xe4, 0x04, 0xda, 0x05, 0x3e, 0x05, 0x9a, 0x06, 0x04, 0x06, 0x34, 0x06, 0x84, 0x06, 0x84, 0x06, 0xcc, 0x07, 0x16, 0x07, 0xc0, 0x08, 0x58, 0x09, 0x12, 0x09, 0x9e, 0x09, 0xc8, 0x0a, 0x08, 0x0a, 0x48, 0x0a, 0xb8, 0x0b, 0x0c, 0x0b, 0x36, 0x0b, 0x64, 0x0b, 0x88, 0x0b, 0xbc, 0x0c, 0x04, 0x0c, 0x3c, 0x0c, 0xa0, 0x0d, 0x0e, 0x0d, 0x88, 0x0d, 0xf8, 0x0e, 0x52, 0x0e, 0xa6, 0x0f, 0x24, 0x0f, 0x78, 0x0f, 0xb8, 0x10, 0x00, 0x10, 0x38, 0x10, 0x8a, 0x10, 0xc0, 0x11, 0x2c, 0x11, 0xda, 0x12, 0x39, 0x12, 0xbd, 0x13, 0x13, 0x13, 0x6d, 0x13, 0xe5, 0x14, 0x3b, 0x14, 0xa9, 0x15, 0x11, 0x15, 0x6b, 0x15, 0xb7, 0x16, 0x25, 0x16, 0x6d, 0x16, 0xe1, 0x17, 0x55, 0x17, 0x9b, 0x17, 0xf7, 0x18, 0x5b, 0x18, 0xc3, 0x19, 0x0f, 0x19, 0x5d, 0x19, 0xbb, 0x1a, 0x07, 0x1a, 0x77, 0x1a, 0xdd, 0x1b, 0x31, 0x1b, 0x8b, 0x1b, 0xdf, 0x1c, 0x15, 0x1c, 0x5f, 0x1c, 0x97, 0x1c, 0xcf, 0x1c, 0xf5, 0x1d, 0x5f, 0x1d, 0xcf, 0x1e, 0x2b, 0x1e, 0x97, 0x1e, 0xed, 0x1f, 0x63, 0x1f, 0xd9, 0x20, 0x35, 0x20, 0x81, 0x20, 0xdb, 0x21, 0x41, 0x21, 0x73, 0x22, 0x03, 0x22, 0x6d, 0x22, 0xb3, 0x23, 0x25, 0x23, 0x99, 0x23, 0xf9, 0x24, 0x41, 0x24, 0xaf, 0x25, 0x05, 0x25, 0x55, 0x25, 0xb7, 0x26, 0x0f, 0x26, 0x83, 0x26, 0xdf, 0x27, 0x41, 0x27, 0x77, 0x27, 0xdb, 0x28, 0x1d, 0x28, 0x29, 0x28, 0xaf, 0x29, 0x39, 0x29, 0x45, 0x29, 0x51, 0x29, 0x5d, 0x29, 0x69, 0x29, 0x75, 0x29, 0x81, 0x29, 0x8d, 0x29, 0x99, 0x29, 0xa5, 0x2a, 0x39, 0x2a, 0xc9, 0x2a, 0xd5, 0x2a, 0xe1, 0x2a, 0xed, 0x2a, 0xf9, 0x2b, 0x05, 0x2b, 0x11, 0x2b, 0x1d, 0x2b, 0x29, 0x2b, 0x35, 0x2b, 0x41, 0x2b, 0x4d, 0x2b, 0x59, 0x2b, 0x65, 0x2b, 0x71, 0x2b, 0x7d, 0x2b, 0x89, 0x2b, 0x95, 0x2b, 0xa1, 0x2b, 0xdb, 0x2c, 0x55, 0x2c, 0xef, 0x2d, 0x77, 0x2d, 0x95, 0x2e, 0x15, 0x2e, 0x9d, 0x2f, 0x3b, 0x2f, 0xbd, 0x30, 0x3d, 0x30, 0x65, 0x30, 0x97, 0x31, 0x5d, 0x31, 0xc3, 0x32, 0x5d, 0x32, 0xb5, 0x33, 0x1d, 0x33, 0x63, 0x34, 0x19, 0x34, 0x7b, 0x34, 0xe9, 0x35, 0x33, 0x35, 0x85, 0x35, 0xe5, 0x36, 0x43, 0x36, 0x9b, 0x36, 0x9b, 0x36, 0xa7, 0x36, 0xb3, 0x36, 0xbf, 0x37, 0x65, 0x37, 0xef, 0x38, 0x21, 0x38, 0x53, 0x38, 0xa1, 0x38, 0xed, 0x39, 0x19, 0x39, 0x45, 0x39, 0x99, 0x39, 0xa5, 0x39, 0xb1, 0x39, 0xe9, 0x3a, 0x89, 0x3a, 0xbd, 0x3a, 0xf1, 0x3b, 0x79, 0x3b, 0xf9, 0x3c, 0x1d, 0x3c, 0x47, 0x3c, 0x93, 0x3d, 0x89, 0x3d, 0x95, 0x3d, 0xa1, 0x3d, 0xad, 0x3d, 0xb9, 0x3d, 0xc5, 0x3d, 0xd1, 0x3d, 0xdd, 0x3d, 0xe9, 0x3d, 0xf5, 0x3e, 0x01, 0x3e, 0x0d, 0x3e, 0x19, 0x3e, 0x25, 0x3e, 0x31, 0x3e, 0x3d, 0x3e, 0x6f, 0x3e, 0xa1, 0x3e, 0xdb, 0x3f, 0x07, 0x3f, 0x3b, 0x3f, 0x59, 0x3f, 0x8f, 0x3f, 0xe3, 0x40, 0x2b, 0x40, 0x5b, 0x40, 0x8b, 0x41, 0x0b, 0x41, 0x81, 0x41, 0xf7, 0x42, 0x31, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe5, 0x00, 0xa6, 0x00, 0x07, 0x00, 0x71, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x01, 0x61, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x01, 0xaa, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x00, 0x7a, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x01, 0x47, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x25, 0x00, 0x48, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x05, 0x00, 0x7a, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0d, 0x00, 0x6d, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x7a, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x35, 0x00, 0x7a, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x1c, 0x00, 0x16, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x05, 0x00, 0xaf, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x24, 0x00, 0xb4, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x17, 0x00, 0xd8, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x2e, 0x00, 0xef, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x2a, 0x01, 0x1d, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x05, 0x00, 0x7a, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x07, 0x01, 0x47, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x05, 0x00, 0x7a, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x00, 0x00, 0x90, 0x01, 0x4e, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x01, 0x00, 0x0a, 0x02, 0x50, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x02, 0x00, 0x0e, 0x01, 0xde, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x03, 0x00, 0x4a, 0x01, 0xec, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x04, 0x00, 0x0a, 0x02, 0x50, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x05, 0x00, 0x1a, 0x02, 0x36, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x06, 0x00, 0x0a, 0x02, 0x50, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x07, 0x00, 0x6a, 0x02, 0x50, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x08, 0x00, 0x38, 0x01, 0x7a, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x09, 0x00, 0x0a, 0x02, 0xba, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x0a, 0x00, 0x90, 0x01, 0x4e, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x0b, 0x00, 0x48, 0x02, 0xc4, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x0c, 0x00, 0x2e, 0x03, 0x0c, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x0d, 0x00, 0x5c, 0x03, 0x3a, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x0e, 0x00, 0x54, 0x03, 0x96, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x10, 0x00, 0x0a, 0x02, 0x50, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x11, 0x00, 0x0e, 0x01, 0xde, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x28, 0x63, 0x29, 0x20, 0x32, 0x30, 0x31, 0x30, 0x20, 0x62, 0x79, 0x20, 0x46, 0x6f, 0x6e, 0x74, 0x20, 0x44, 0x69, 0x6e, 0x65, 0x72, 0x2c, 0x20, 0x49, 0x6e, 0x63, 0x20, 0x44, 0x42, 0x41, 0x20, 0x53, 0x69, 0x64, 0x65, 0x73, 0x68, 0x6f, 0x77, 0x2e, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x2e, 0x46, 0x6f, 0x6e, 0x74, 0x44, 0x69, 0x6e, 0x65, 0x72, 0x2c, 0x49, 0x6e, 0x63, 0x44, 0x42, 0x41, 0x53, 0x69, 0x64, 0x65, 0x73, 0x68, 0x6f, 0x77, 0x3a, 0x20, 0x43, 0x68, 0x65, 0x77, 0x79, 0x3a, 0x20, 0x32, 0x30, 0x31, 0x30, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x31, 0x2e, 0x30, 0x30, 0x30, 0x43, 0x68, 0x65, 0x77, 0x79, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x74, 0x72, 0x61, 0x64, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x20, 0x6f, 0x66, 0x20, 0x46, 0x6f, 0x6e, 0x74, 0x20, 0x44, 0x69, 0x6e, 0x65, 0x72, 0x2c, 0x20, 0x49, 0x6e, 0x63, 0x20, 0x44, 0x42, 0x41, 0x20, 0x53, 0x69, 0x64, 0x65, 0x73, 0x68, 0x6f, 0x77, 0x2e, 0x53, 0x71, 0x75, 0x69, 0x64, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x66, 0x6f, 0x6e, 0x74, 0x62, 0x72, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x69, 0x64, 0x65, 0x73, 0x68, 0x6f, 0x77, 0x2e, 0x70, 0x68, 0x70, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x73, 0x71, 0x75, 0x69, 0x64, 0x61, 0x72, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x64, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x32, 0x2e, 0x30, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x2d, 0x32, 0x2e, 0x30, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x00, 0x43, 0x00, 0x6f, 0x00, 0x70, 0x00, 0x79, 0x00, 0x72, 0x00, 0x69, 0x00, 0x67, 0x00, 0x68, 0x00, 0x74, 0x00, 0x20, 0x00, 0x28, 0x00, 0x63, 0x00, 0x29, 0x00, 0x20, 0x00, 0x32, 0x00, 0x30, 0x00, 0x31, 0x00, 0x30, 0x00, 0x20, 0x00, 0x62, 0x00, 0x79, 0x00, 0x20, 0x00, 0x46, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x20, 0x00, 0x44, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x65, 0x00, 0x72, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x20, 0x00, 0x44, 0x00, 0x42, 0x00, 0x41, 0x00, 0x20, 0x00, 0x53, 0x00, 0x69, 0x00, 0x64, 0x00, 0x65, 0x00, 0x73, 0x00, 0x68, 0x00, 0x6f, 0x00, 0x77, 0x00, 0x2e, 0x00, 0x20, 0x00, 0x41, 0x00, 0x6c, 0x00, 0x6c, 0x00, 0x20, 0x00, 0x72, 0x00, 0x69, 0x00, 0x67, 0x00, 0x68, 0x00, 0x74, 0x00, 0x73, 0x00, 0x20, 0x00, 0x72, 0x00, 0x65, 0x00, 0x73, 0x00, 0x65, 0x00, 0x72, 0x00, 0x76, 0x00, 0x65, 0x00, 0x64, 0x00, 0x2e, 0x00, 0x52, 0x00, 0x65, 0x00, 0x67, 0x00, 0x75, 0x00, 0x6c, 0x00, 0x61, 0x00, 0x72, 0x00, 0x46, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x44, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x65, 0x00, 0x72, 0x00, 0x2c, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x44, 0x00, 0x42, 0x00, 0x41, 0x00, 0x53, 0x00, 0x69, 0x00, 0x64, 0x00, 0x65, 0x00, 0x73, 0x00, 0x68, 0x00, 0x6f, 0x00, 0x77, 0x00, 0x3a, 0x00, 0x20, 0x00, 0x43, 0x00, 0x68, 0x00, 0x65, 0x00, 0x77, 0x00, 0x79, 0x00, 0x3a, 0x00, 0x20, 0x00, 0x32, 0x00, 0x30, 0x00, 0x31, 0x00, 0x30, 0x00, 0x56, 0x00, 0x65, 0x00, 0x72, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x31, 0x00, 0x2e, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x43, 0x00, 0x68, 0x00, 0x65, 0x00, 0x77, 0x00, 0x79, 0x00, 0x20, 0x00, 0x69, 0x00, 0x73, 0x00, 0x20, 0x00, 0x61, 0x00, 0x20, 0x00, 0x74, 0x00, 0x72, 0x00, 0x61, 0x00, 0x64, 0x00, 0x65, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x72, 0x00, 0x6b, 0x00, 0x20, 0x00, 0x6f, 0x00, 0x66, 0x00, 0x20, 0x00, 0x46, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x20, 0x00, 0x44, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x65, 0x00, 0x72, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x20, 0x00, 0x44, 0x00, 0x42, 0x00, 0x41, 0x00, 0x20, 0x00, 0x53, 0x00, 0x69, 0x00, 0x64, 0x00, 0x65, 0x00, 0x73, 0x00, 0x68, 0x00, 0x6f, 0x00, 0x77, 0x00, 0x2e, 0x00, 0x53, 0x00, 0x71, 0x00, 0x75, 0x00, 0x69, 0x00, 0x64, 0x00, 0x68, 0x00, 0x74, 0x00, 0x74, 0x00, 0x70, 0x00, 0x3a, 0x00, 0x2f, 0x00, 0x2f, 0x00, 0x77, 0x00, 0x77, 0x00, 0x77, 0x00, 0x2e, 0x00, 0x66, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x62, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x73, 0x00, 0x2e, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x2f, 0x00, 0x73, 0x00, 0x69, 0x00, 0x64, 0x00, 0x65, 0x00, 0x73, 0x00, 0x68, 0x00, 0x6f, 0x00, 0x77, 0x00, 0x2e, 0x00, 0x70, 0x00, 0x68, 0x00, 0x70, 0x00, 0x68, 0x00, 0x74, 0x00, 0x74, 0x00, 0x70, 0x00, 0x3a, 0x00, 0x2f, 0x00, 0x2f, 0x00, 0x77, 0x00, 0x77, 0x00, 0x77, 0x00, 0x2e, 0x00, 0x73, 0x00, 0x71, 0x00, 0x75, 0x00, 0x69, 0x00, 0x64, 0x00, 0x61, 0x00, 0x72, 0x00, 0x74, 0x00, 0x2e, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x4c, 0x00, 0x69, 0x00, 0x63, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x73, 0x00, 0x65, 0x00, 0x64, 0x00, 0x20, 0x00, 0x75, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x65, 0x00, 0x72, 0x00, 0x20, 0x00, 0x74, 0x00, 0x68, 0x00, 0x65, 0x00, 0x20, 0x00, 0x41, 0x00, 0x70, 0x00, 0x61, 0x00, 0x63, 0x00, 0x68, 0x00, 0x65, 0x00, 0x20, 0x00, 0x4c, 0x00, 0x69, 0x00, 0x63, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x73, 0x00, 0x65, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x56, 0x00, 0x65, 0x00, 0x72, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x32, 0x00, 0x2e, 0x00, 0x30, 0x00, 0x68, 0x00, 0x74, 0x00, 0x74, 0x00, 0x70, 0x00, 0x3a, 0x00, 0x2f, 0x00, 0x2f, 0x00, 0x77, 0x00, 0x77, 0x00, 0x77, 0x00, 0x2e, 0x00, 0x61, 0x00, 0x70, 0x00, 0x61, 0x00, 0x63, 0x00, 0x68, 0x00, 0x65, 0x00, 0x2e, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x67, 0x00, 0x2f, 0x00, 0x6c, 0x00, 0x69, 0x00, 0x63, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x73, 0x00, 0x65, 0x00, 0x73, 0x00, 0x2f, 0x00, 0x4c, 0x00, 0x49, 0x00, 0x43, 0x00, 0x45, 0x00, 0x4e, 0x00, 0x53, 0x00, 0x45, 0x00, 0x2d, 0x00, 0x32, 0x00, 0x2e, 0x00, 0x30, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xb3, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe5, 0x00, 0x00, 0x00, 0xea, 0x00, 0xe2, 0x00, 0xe3, 0x00, 0xe4, 0x00, 0xe5, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xf4, 0x00, 0xf5, 0x00, 0xf1, 0x00, 0xf6, 0x00, 0xf3, 0x00, 0xf2, 0x00, 0xe8, 0x00, 0xef, 0x00, 0xf0, 0x00, 0x03, 0x00, 0x04, 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0a, 0x00, 0x0b, 0x00, 0x0c, 0x00, 0x0d, 0x00, 0x0e, 0x00, 0x0f, 0x00, 0x10, 0x00, 0x11, 0x00, 0x12, 0x00, 0x13, 0x00, 0x14, 0x00, 0x15, 0x00, 0x16, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x00, 0x1a, 0x00, 0x1b, 0x00, 0x1c, 0x00, 0x1d, 0x00, 0x1e, 0x00, 0x1f, 0x00, 0x20, 0x00, 0x21, 0x00, 0x22, 0x00, 0x23, 0x00, 0x24, 0x00, 0x25, 0x00, 0x26, 0x00, 0x27, 0x00, 0x28, 0x00, 0x29, 0x00, 0x2a, 0x00, 0x2b, 0x00, 0x2c, 0x00, 0x2d, 0x00, 0x2e, 0x00, 0x2f, 0x00, 0x30, 0x00, 0x31, 0x00, 0x32, 0x00, 0x33, 0x00, 0x34, 0x00, 0x35, 0x00, 0x36, 0x00, 0x37, 0x00, 0x38, 0x00, 0x39, 0x00, 0x3a, 0x00, 0x3b, 0x00, 0x3c, 0x00, 0x3d, 0x00, 0x3e, 0x00, 0x3f, 0x00, 0x40, 0x00, 0x41, 0x00, 0x42, 0x00, 0x43, 0x00, 0x44, 0x00, 0x45, 0x00, 0x46, 0x00, 0x47, 0x00, 0x48, 0x00, 0x49, 0x00, 0x4a, 0x00, 0x4b, 0x00, 0x4c, 0x00, 0x4d, 0x00, 0x4e, 0x00, 0x4f, 0x00, 0x50, 0x00, 0x51, 0x00, 0x52, 0x00, 0x53, 0x00, 0x54, 0x00, 0x55, 0x00, 0x56, 0x00, 0x57, 0x00, 0x58, 0x00, 0x59, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x5c, 0x00, 0x5d, 0x00, 0x5e, 0x00, 0x5f, 0x00, 0x60, 0x00, 0x61, 0x00, 0x62, 0x00, 0x63, 0x00, 0x64, 0x00, 0x65, 0x00, 0x66, 0x00, 0x67, 0x00, 0x68, 0x00, 0x69, 0x00, 0x6a, 0x00, 0x6b, 0x00, 0x6c, 0x00, 0x6d, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x70, 0x00, 0x71, 0x00, 0x72, 0x00, 0x73, 0x00, 0x74, 0x00, 0x75, 0x00, 0x76, 0x00, 0x77, 0x00, 0x78, 0x00, 0x79, 0x00, 0x7a, 0x00, 0x7b, 0x00, 0x7c, 0x00, 0x7d, 0x00, 0x7e, 0x00, 0x7f, 0x00, 0x80, 0x00, 0x81, 0x00, 0x83, 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89, 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x90, 0x00, 0x91, 0x00, 0x96, 0x00, 0x97, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0xa0, 0x00, 0xa1, 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xab, 0x01, 0x02, 0x00, 0xad, 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3, 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x01, 0x03, 0x00, 0xbe, 0x00, 0xbf, 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5, 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb, 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x00, 0xd0, 0x00, 0xd1, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7, 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdd, 0x00, 0xde, 0x00, 0xdf, 0x00, 0xe1, 0x01, 0x04, 0x00, 0xbd, 0x00, 0xe9, 0x00, 0x93, 0x00, 0xe0, 0x07, 0x75, 0x6e, 0x69, 0x30, 0x30, 0x41, 0x30, 0x04, 0x45, 0x75, 0x72, 0x6f, 0x09, 0x73, 0x66, 0x74, 0x68, 0x79, 0x70, 0x68, 0x65, 0x6e, 0x00, 0xb8, 0x01, 0xff, 0x85, 0xb0, 0x04, 0x8d, 0x00 }; unsigned int Chewy_ttf_len = 41192;
[ "hello@aapelivuorinen.com" ]
hello@aapelivuorinen.com
bcd841f76f86d1edc9c07b92d50dd026ea7a59cd
4fe79a078c1aec9e224305d8d934fedeac9d6dfd
/src/main.cpp
d44861ae3213e1689f0507e4e8dc62c135ef8615
[ "LicenseRef-scancode-public-domain" ]
permissive
manyoso/qcode
d6dcb374bb165fa13efa5e1403789e5094e6b84b
903b5f5fd0d3fbdf54bf2fed9d8ceb407d462d4c
refs/heads/master
2021-01-10T07:54:01.315301
2015-09-30T15:22:04
2015-09-30T15:22:04
43,440,781
0
0
null
null
null
null
UTF-8
C++
false
false
151
cpp
#include "qcode.h" #include <QWidget> #include "mainwindow.h" int main(int argc, char *argv[]) { QCode app(argc, argv); return app.exec(); }
[ "manyoso@yahoo.com" ]
manyoso@yahoo.com
5653930f76133612942599673da31fde9e1b1bda
4503b4ec29e9a30d26c433bac376f2bddaefd9e5
/RealDWG/2012/x64/Inc/mgdinterop.h
4cf9d4369c6ed5932e9033d9465f3a4ef7cac8d8
[]
no_license
SwunZH/ecocommlibs
0a872e0bbecbb843a0584fb787cf0c5e8a2a270b
4cff09ff1e479f5f519f207262a61ee85f543b3a
refs/heads/master
2021-01-25T12:02:39.067444
2018-02-23T07:04:43
2018-02-23T07:04:43
123,447,012
1
0
null
2018-03-01T14:37:53
2018-03-01T14:37:53
null
UTF-8
C++
false
false
8,451
h
// $Header: //depot/release/ironman2012/develop/global/inc/dbxsdk/mgdinterop.h#1 $ $Change: 237375 $ $DateTime: 2011/01/30 18:32:54 $ $Author: integrat $ // $NoKeywords: $ // ////////////////////////////////////////////////////////////////////////////// // // (C) Copyright 2003-2011 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, // provided that the above copyright notice appears in all copies and // that both that copyright notice and the limited warranty and // restricted rights notice below appear in all supporting // documentation. // // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE // UNINTERRUPTED OR ERROR FREE. // // Use, duplication, or disclosure by the U.S. Government is subject to // restrictions set forth in FAR 52.227-19 (Commercial Computer // Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) // (Rights in Technical Data and Computer Software), as applicable.. // ////////////////////////////////////////////////////////////////////////////// #pragma once #include <vcclr.h> #include <gcroot.h> /////////////////////////////////////////////////////////////////////////////// // Forward Declarations // // Unmanaged types class AcGeVector2d; class AcGeVector3d; class AcGeMatrix2d; class AcGeMatrix3d; class AcGePoint2d; class AcGePoint3d; class AcGeScale2d; class AcGeScale3d; class AcGeTol; class AcDbObjectId; class AcDbExtents; // Managed types namespace Autodesk { namespace AutoCAD { namespace Runtime { #ifdef __cplusplus_cli ref class DisposableWrapper; #else public __gc __abstract class DisposableWrapper; #endif } } } #ifdef __cplusplus_cli #define AC_GCHANDLE_TO_VOIDPTR(x) ((GCHandle::operator System::IntPtr(x)).ToPointer()) #define AC_VOIDPTR_TO_GCHANDLE(x) (GCHandle::operator GCHandle(System::IntPtr(x))) #define AC_NULLPTR nullptr #define AC_GCNEW gcnew #define AC_WCHAR_PINNED_GCPTR pin_ptr<const wchar_t> typedef Autodesk::AutoCAD::Runtime::DisposableWrapper^ DisposableWrapper_GcPtr; typedef System::Type^ Type_GcPtr; typedef System::String^ String_GcPtr; #else #define AC_GCHANDLE_TO_VOIDPTR(x) ((GCHandle::op_Explicit(x)).ToPointer()) #define AC_VOIDPTR_TO_GCHANDLE(x) (GCHandle::op_Explicit(x)) #define AC_NULLPTR 0 #define AC_GCNEW new #define AC_WCHAR_PINNED_GCPTR const wchar_t __pin* typedef Autodesk::AutoCAD::Runtime::DisposableWrapper* DisposableWrapper_GcPtr; typedef System::Type* Type_GcPtr; typedef System::String* String_GcPtr; #endif /////////////////////////////////////////////////////////////////////////////// // Classes // class AcMgObjectFactoryBase : public AcRxObject { public: ACRX_DECLARE_MEMBERS(AcMgObjectFactoryBase); virtual gcroot<DisposableWrapper_GcPtr> createRCW(AcRxObject* unmanagedPointer, bool autoDelete) = 0; virtual bool isManaged() { return false; } virtual ~AcMgObjectFactoryBase(){} #ifdef METAOBJECT virtual gcroot<Type_GcPtr> getType() = 0; #endif }; template <typename RCW, typename ImpObj> class AcMgObjectFactory : public AcMgObjectFactoryBase { public: gcroot<DisposableWrapper_GcPtr> createRCW(AcRxObject* unmanagedPointer, bool autoDelete) { gcroot<DisposableWrapper_GcPtr> temp = AC_GCNEW RCW(System::IntPtr(static_cast<ImpObj*>(unmanagedPointer)),autoDelete); return temp; } AcMgObjectFactory() { ImpObj::desc()->addX(AcMgObjectFactoryBase::desc(),this); } ~AcMgObjectFactory() { ImpObj::desc()->delX(AcMgObjectFactoryBase::desc()); } #ifdef METAOBJECT gcroot<Type_GcPtr> getType() { return RCW::typeid; } #endif }; /////////////////////////////////////////////////////////////////////////////// // Data Marshalling // class StringToWchar { typedef System::Runtime::InteropServices::GCHandle GCHandle; const wchar_t* m_ptr; void* m_pinner; public: StringToWchar(String_GcPtr str) { //pin the string m_pinner = AC_GCHANDLE_TO_VOIDPTR( GCHandle::Alloc(str,System::Runtime::InteropServices::GCHandleType::Pinned) ); AC_WCHAR_PINNED_GCPTR tmp = PtrToStringChars(str); m_ptr = tmp; } ~StringToWchar() { GCHandle g = AC_VOIDPTR_TO_GCHANDLE(m_pinner); g.Free(); m_pinner = 0; } operator const wchar_t*() { return m_ptr; } }; inline String_GcPtr WcharToString(const wchar_t* value) { return AC_GCNEW System::String(value); } #undef AC_GCHANDLE_TO_VOIDPTR #undef AC_VOIDPTR_TO_GCHANDLE #undef AC_NULLPTR #undef AC_GCNEW //these defines make legacy clients happy #define StringToCIF StringToWchar #define CIFToString WcharToString #ifndef ACDBMGD #define GETVECTOR3D(vec3d) (*reinterpret_cast<AcGeVector3d*>(&(vec3d))) #define GETVECTOR2D(vec2d) (*reinterpret_cast<AcGeVector2d*>(&(vec2d))) #define GETMATRIX3D(mat3d) (*reinterpret_cast<AcGeMatrix3d*>(&(mat3d))) #define GETMATRIX2D(mat2d) (*reinterpret_cast<AcGeMatrix2d*>(&(mat2d))) #define GETPOINT3D(point3d) (*reinterpret_cast<AcGePoint3d*>(&(point3d))) #define GETPOINT2D(point2d) (*reinterpret_cast<AcGePoint2d*>(&(point2d))) #define GETSCALE2D(scale2d) (*reinterpret_cast<AcGeScale2d*>(&(scale2d))) #define GETSCALE3D(scale3d) (*reinterpret_cast<AcGeScale3d*>(&(scale3d))) #define GETTOL(tol) (*reinterpret_cast<AcGeTol*>(&(tol))) #define GETOBJECTID(id) (*reinterpret_cast<AcDbObjectId*>(&(id))) #define GETEXTENTS3D(ext3d) (*reinterpret_cast<AcDbExtents*>(&(ext3d))) #define GETSUBENTITYID(subentityId) (*reinterpret_cast<AcDbSubentId*>(&(subentityId))) #ifdef AC_GEVEC3D_H inline Autodesk::AutoCAD::Geometry::Vector3d ToVector3d(const AcGeVector3d& pt) { Autodesk::AutoCAD::Geometry::Vector3d ret; GETVECTOR3D(ret) = pt; return ret; } #endif #ifdef AC_GEVEC2D_H inline Autodesk::AutoCAD::Geometry::Vector2d ToVector2d(const AcGeVector2d& pt) { Autodesk::AutoCAD::Geometry::Vector2d ret; GETVECTOR2D(ret) = pt; return ret; } #endif #ifdef AC_GEMAT2D_H inline Autodesk::AutoCAD::Geometry::Matrix3d ToMatrix3d(const AcGeMatrix3d& pt) { Autodesk::AutoCAD::Geometry::Matrix3d ret; GETMATRIX3D(ret) = pt; return ret; } #endif #ifdef AC_GEMAT3D_H inline Autodesk::AutoCAD::Geometry::Matrix2d ToMatrix2d(const AcGeMatrix2d& pt) { Autodesk::AutoCAD::Geometry::Matrix2d ret; GETMATRIX2D(ret) = pt; return ret; } #endif #ifdef AC_GEPNT3D_H inline Autodesk::AutoCAD::Geometry::Point3d ToPoint3d(const AcGePoint3d& pt) { Autodesk::AutoCAD::Geometry::Point3d ret; GETPOINT3D(ret) = pt; return ret; } #endif #ifdef AC_GEPNT2D_H inline Autodesk::AutoCAD::Geometry::Point2d ToPoint2d(const AcGePoint2d& pt) { Autodesk::AutoCAD::Geometry::Point2d ret; GETPOINT2D(ret) = pt; return ret; } #endif #ifdef AC_GESCL2D_H inline Autodesk::AutoCAD::Geometry::Scale2d ToScale2d(const AcGeScale2d& pt) { Autodesk::AutoCAD::Geometry::Scale2d ret; GETSCALE2D(ret) = pt; return ret; } #endif #ifdef AC_GESCL3D_H inline Autodesk::AutoCAD::Geometry::Scale3d ToScale3d(const AcGeScale3d& pt) { Autodesk::AutoCAD::Geometry::Scale3d ret; GETSCALE3D(ret) = pt; return ret; } #endif #ifdef AC_GETOL_H inline Autodesk::AutoCAD::Geometry::Tolerance ToTolerance(const AcGeTol& pt) { Autodesk::AutoCAD::Geometry::Tolerance ret; GETTOL(ret) = pt; return ret; } #endif #ifdef _AD_DBID_H inline Autodesk::AutoCAD::DatabaseServices::ObjectId ToObjectId(const AcDbObjectId& pt) { Autodesk::AutoCAD::DatabaseServices::ObjectId ret; GETOBJECTID(ret) = pt; return ret; } #endif #ifdef AD_DBMAIN_H inline Autodesk::AutoCAD::DatabaseServices::Extents3d ToExtents3d(const AcDbExtents& pt) { Autodesk::AutoCAD::DatabaseServices::Extents3d ret; GETEXTENTS3D(ret) = pt; return ret; } #endif #endif // #ifndef ACDBMGD
[ "jwMoon@3e9e098e-e079-49b3-9d2b-ee27db7392fb" ]
jwMoon@3e9e098e-e079-49b3-9d2b-ee27db7392fb
f7bf84d8ebccce03fe512371d276b31e42eb2183
d94e6ed8fa1896eb5960117b21c5ad62d9b8b34c
/Atcoder/ARC104/B.cpp
ffc22527dd91d22b883548cb7237355f49ab8387
[ "MIT" ]
permissive
djayy035/Code_of_gunwookim
e33bff4840900f4a7916f6b1376fd6daa813bb98
e72e6724fb9ee6ccf2e1064583956fa954ba0282
refs/heads/main
2023-03-03T17:46:51.808322
2021-02-10T13:58:52
2021-02-10T13:58:52
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,006
cpp
#include <bits/stdc++.h> #define x first #define y second #define pb push_back #define all(v) v.begin(),v.end() #pragma gcc optimize("O3") #pragma gcc optimize("Ofast") #pragma gcc optimize("unroll-loops") using namespace std; const int INF = 1e9; const long long llINF = 1e18; const int mod = 998244353; typedef long long ll; typedef long double ld; typedef pair <int,int> pi; typedef pair <ll,ll> pl; typedef vector <int> vec; typedef vector <pi> vecpi; typedef long long ll; int n,cnt[5005][4]; char a[5005]; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cin >> n >> a+1; for(int i = 1;i <= n;i++) { for(int j = 0;j < 4;j++) cnt[i][j] = cnt[i-1][j]; if(a[i] == 'A') cnt[i][0]++; if(a[i] == 'T') cnt[i][1]++; if(a[i] == 'C') cnt[i][2]++; if(a[i] == 'G') cnt[i][3]++; } int c[4]; int ans = 0; for(int i = 1;i <= n;i++) { for(int j = 1;j <= i;j++) { for(int k = 0;k < 4;k++) c[k] = cnt[i][k]-cnt[j-1][k]; if(c[0] == c[1]&&c[2] == c[3]) ans++; } } cout << ans; }
[ "mario05092929@gmail.com" ]
mario05092929@gmail.com
1fe8c6baf4b2eed6a747eb36207626b4b7f648cd
77012e709bc909b40d9211ad323b162a68ff65d7
/main.cpp
54fddb0b7d1fb4fb2cc4a36177fefb7e579bb3a3
[]
no_license
travoul/messingaroungGL
5e7346d868f17e485e24ccfef9c57ef2fd9647f2
5659a92da0cd9e9310268c1fe1fd3b1c6fb3ef39
refs/heads/master
2021-01-15T23:11:37.987298
2015-05-07T15:40:22
2015-05-07T15:40:22
35,228,551
0
0
null
null
null
null
UTF-8
C++
false
false
1,197
cpp
#define GLEW_S #include <iostream> #include <SFML/Graphics.hpp> #include <GL/glew.h> int main(int argc, char *argv[]) { sf::ContextSettings settings; settings.depthBits = 24; settings.stencilBits = 8; settings.antialiasingLevel = 2; sf::RenderWindow window(sf::VideoMode(1280, 760), "Messing Around!",sf::Style::Close,settings); sf::CircleShape shape(50.0f); shape.setFillColor(sf::Color::Blue); shape.setOrigin(50.0f,50.0f); shape.setPosition(1280.0/2.0,760/2.0); sf::Event event; bool running = true; bool isObjectSelected = false; while (running) { while (window.pollEvent(event)) { switch(event.type) { case sf::Event::Closed: running = false; break; case sf::Event::MouseMoved: if (isObjectSelected){ shape.setPosition(sf::Mouse::getPosition(window).x,sf::Mouse::getPosition(window).y); } break; case sf::Event::MouseWheelMoved: shape.scale(1.05f,1.05f); break; case sf::Event::MouseButtonPressed: isObjectSelected = true; break; case sf::Event::MouseButtonReleased: isObjectSelected = false; break; } } window.clear(); window.draw(shape); window.display(); } return 0; }
[ "marcellopfcosta@gmail.com" ]
marcellopfcosta@gmail.com
64c3044ec6466d446ec24d196a5e6249526a8985
b291abc4e7a65357c4263e4ebeb13a833f614e40
/src/MIT_alice/MAUICompasses.h
4db962333a6bc24b0dcd18055b39b26fade76655
[ "MIT" ]
permissive
wnsgml972/aliceui
7088114b1f9c5f74b55de85fc32730058ac9c2d9
f06571363c3e93b73bc665e21b0f1f024702a773
refs/heads/master
2020-06-15T14:22:05.988018
2019-03-08T02:49:14
2019-03-08T02:49:14
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,275
h
#pragma once #include "MITAliceDef.h" namespace mit::alice { class MITALICE_API MAUISphereCompass : public AUICompass { public: MAUISphereCompass() = default; ~MAUISphereCompass() override = default; void CalcControlPosition(const glm::vec3& vRayOrg, const glm::vec3& vRayDir) override; glm::vec3 GetPosition() const override { return m_vCurrPosition; } void SetSphere(const glm::vec3& pos, float radius) { m_vSpherePos = pos; m_fSphereRadius = radius; } private: glm::vec3 m_vSpherePos; float m_fSphereRadius = 0.0f; glm::vec3 m_vCurrPosition; glm::vec3 m_vCurrDirection; }; class MITALICE_API MAUIStraightLineCompass : public AUICompass { public: MAUIStraightLineCompass() = default; ~MAUIStraightLineCompass() override = default; void CalcControlPosition(const glm::vec3& vRayOrg, const glm::vec3& vRayDir) override; glm::vec3 GetPosition() const override { return m_CurPos; } void SetStraightLine(const glm::vec3& pos, const glm::vec3& dir) { m_vPos = pos; m_vDir = dir; } glm::vec3 GetCurrentPosition() const { return m_CurPos; } float GetCurrentDisp() const { return m_fDisp; } private: glm::vec3 m_vPos; glm::vec3 m_vDir; glm::vec3 m_CurPos; float m_fDisp = 0.0f; }; class MITALICE_API MAUICircleBoundaryCompass : public AUICompass { public: MAUICircleBoundaryCompass() = default; ~MAUICircleBoundaryCompass() override = default; void CalcControlPosition(const glm::vec3& vRayOrg, const glm::vec3& vRayDir) override; glm::vec3 GetPosition() const override { return m_center; // Bad..? } void SetCircle(const glm::vec3& center, const glm::vec3& norm) { m_center = center; m_norm = norm; } glm::vec3 GetCurrentDir() const { return m_curDir; } private: glm::vec3 m_center; glm::vec3 m_norm; float m_fRadius = 0.0f; glm::vec3 m_curDir; }; }
[ "skwoo@midasit.com" ]
skwoo@midasit.com
27f783eb6b4b53e8fed47489c8f7f96cd2327460
2cf838b54b556987cfc49f42935f8aa7563ea1f4
/aws-cpp-sdk-glue/source/model/DeleteSchemaVersionsResult.cpp
b361695d0636ab30d107d7d3acdb28b0572d0454
[ "MIT", "Apache-2.0", "JSON" ]
permissive
QPC-database/aws-sdk-cpp
d11e9f0ff6958c64e793c87a49f1e034813dac32
9f83105f7e07fe04380232981ab073c247d6fc85
refs/heads/main
2023-06-14T17:41:04.817304
2021-07-09T20:28:20
2021-07-09T20:28:20
384,714,703
1
0
Apache-2.0
2021-07-10T14:16:41
2021-07-10T14:16:41
null
UTF-8
C++
false
false
1,296
cpp
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/glue/model/DeleteSchemaVersionsResult.h> #include <aws/core/utils/json/JsonSerializer.h> #include <aws/core/AmazonWebServiceResult.h> #include <aws/core/utils/StringUtils.h> #include <aws/core/utils/UnreferencedParam.h> #include <utility> using namespace Aws::Glue::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; DeleteSchemaVersionsResult::DeleteSchemaVersionsResult() { } DeleteSchemaVersionsResult::DeleteSchemaVersionsResult(const Aws::AmazonWebServiceResult<JsonValue>& result) { *this = result; } DeleteSchemaVersionsResult& DeleteSchemaVersionsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("SchemaVersionErrors")) { Array<JsonView> schemaVersionErrorsJsonList = jsonValue.GetArray("SchemaVersionErrors"); for(unsigned schemaVersionErrorsIndex = 0; schemaVersionErrorsIndex < schemaVersionErrorsJsonList.GetLength(); ++schemaVersionErrorsIndex) { m_schemaVersionErrors.push_back(schemaVersionErrorsJsonList[schemaVersionErrorsIndex].AsObject()); } } return *this; }
[ "aws-sdk-cpp-automation@github.com" ]
aws-sdk-cpp-automation@github.com
61a80113898f7a00607ddcd0c1fccc9ae84bbf5a
487f88955f150fc034baae5a727994c29636398b
/opensplice/install/HDE/x86_64.linux/include/streams/SACPP/streams_dcps.h
91746fda33e6288e0ade1da5e1b352a237abb537
[ "Apache-2.0" ]
permissive
itfanr/opensplice-cpp-cmake
6ddb8767509904c8b2a3cd3d3fafc3b460202ea0
d9a3eac9d7e91d3a5f114c914a449a9911d1d1ea
refs/heads/master
2020-04-01T22:32:35.124459
2018-10-19T05:34:14
2018-10-19T05:34:14
153,714,000
1
1
null
null
null
null
UTF-8
C++
false
false
4,907
h
//****************************************************************** // // Generated by IDL to C++ Translator // // File name: streams_dcps.h // Source: /home/itfanr/repo_git/github.com/ADLINK-IST/opensplice/src/api/streams/idl/streams_dcps.idl // Generated: Fri Oct 12 16:41:49 2018 // OpenSplice 6.7.180404OSS // //****************************************************************** #ifndef _STREAMS_DCPS_H_ #define _STREAMS_DCPS_H_ #include "sacpp_mapping.h" #include "dds_dcps.h" namespace DDS { namespace Streams { struct StreamFlushQosPolicy; struct StreamDataWriterQos; struct StreamDataReaderQos; class StreamDataWriter; typedef StreamDataWriter * StreamDataWriter_ptr; typedef DDS_DCPSInterface_var < StreamDataWriter> StreamDataWriter_var; typedef DDS_DCPSInterface_out < StreamDataWriter> StreamDataWriter_out; class StreamDataReader; typedef StreamDataReader * StreamDataReader_ptr; typedef DDS_DCPSInterface_var < StreamDataReader> StreamDataReader_var; typedef DDS_DCPSInterface_out < StreamDataReader> StreamDataReader_out; typedef DDS::ULong StreamId; struct StreamFlushQosPolicy { Duration_t max_delay; ULong max_samples; }; typedef DDS_DCPSStruct_var < StreamFlushQosPolicy> StreamFlushQosPolicy_var; typedef StreamFlushQosPolicy&StreamFlushQosPolicy_out; struct StreamDataWriterQos { StreamFlushQosPolicy flush; }; typedef DDS_DCPSStruct_var < StreamDataWriterQos> StreamDataWriterQos_var; typedef StreamDataWriterQos&StreamDataWriterQos_out; struct StreamDataReaderQos { octSeq value; }; typedef DDS_DCPSStruct_var < StreamDataReaderQos> StreamDataReaderQos_var; typedef DDS_DCPSStruct_out < StreamDataReaderQos> StreamDataReaderQos_out; class StreamDataWriter : virtual public LocalObject { public: typedef StreamDataWriter_ptr _ptr_type; typedef StreamDataWriter_var _var_type; static StreamDataWriter_ptr _duplicate (StreamDataWriter_ptr obj); DDS::Boolean _local_is_a (const char * id); static StreamDataWriter_ptr _narrow (DDS::Object_ptr obj); static StreamDataWriter_ptr _unchecked_narrow (DDS::Object_ptr obj); static StreamDataWriter_ptr _nil () { return 0; } static const char * _local_id; StreamDataWriter_ptr _this () { return this; } virtual Long set_qos (const StreamDataWriterQos& qos) = 0; virtual Long get_qos (StreamDataWriterQos& qos) = 0; virtual Long flush (ULong id) = 0; protected: StreamDataWriter () {}; ~StreamDataWriter () {}; private: StreamDataWriter (const StreamDataWriter &); StreamDataWriter & operator = (const StreamDataWriter &); }; class StreamDataReader : virtual public LocalObject { public: typedef StreamDataReader_ptr _ptr_type; typedef StreamDataReader_var _var_type; static StreamDataReader_ptr _duplicate (StreamDataReader_ptr obj); DDS::Boolean _local_is_a (const char * id); static StreamDataReader_ptr _narrow (DDS::Object_ptr obj); static StreamDataReader_ptr _unchecked_narrow (DDS::Object_ptr obj); static StreamDataReader_ptr _nil () { return 0; } static const char * _local_id; StreamDataReader_ptr _this () { return this; } virtual Long set_qos (const StreamDataReaderQos& qos) = 0; virtual Long get_qos (StreamDataReaderQos& qos) = 0; protected: StreamDataReader () {}; ~StreamDataReader () {}; private: StreamDataReader (const StreamDataReader &); StreamDataReader & operator = (const StreamDataReader &); }; class StreamsException : public UserException { public: static StreamsException* _downcast (DDS::Exception *); static const StreamsException* _downcast (const DDS::Exception *); static DDS::Exception * factory (); static DDS::ExceptionInitializer m_initializer; StreamsException () {}; StreamsException (const char * _message, Long _id); StreamsException (const StreamsException &); StreamsException& operator = (const StreamsException &); virtual DDS::Exception * _clone () const; virtual void _raise () const; virtual const char * _name () const { return m_name; }; virtual const char * _rep_id () const { return m_id; }; virtual ~StreamsException () {} public: String_mgr message; Long id; private: static const char * m_name; static const char * m_id; }; } } #endif
[ "bjq1016@126.com" ]
bjq1016@126.com
c248efb7cab6732efc2e7f5967ed101536fecdbf
b68d0b044b1c933862d12649606c9b03b8f86198
/test/test/Player.cpp
61f7e6a5cd4ca0da94bdb273844ef378ee134874
[]
no_license
andrewoneill/Box2D-SDL
2df7e144fc0a25fe4bdf7f9affa0d8147c302225
20a2a05d77735c4c21227919c3b7253b606385b6
refs/heads/master
2016-09-10T11:44:21.478073
2015-03-02T09:40:44
2015-03-02T09:40:44
31,512,702
0
0
null
null
null
null
UTF-8
C++
false
false
66
cpp
#include <Player.h> Player::Player(){ } Player::~Player(){ }
[ "andrew.oneill@outlook.com" ]
andrew.oneill@outlook.com
4e99879b86d3045e37369c50ff26bdf8cd63a5cc
6a90b7b15c41d1a6d8214e55bb8511ccae902919
/src/drivers/nrf/nrf.cpp
2b2015d57b7c0ed92afb45f98e8f27d303fadd8b
[ "BSD-3-Clause" ]
permissive
phuonglab/argon-rtos
378dc203b96f37f5a9643debc90ed1c0a067f17f
da43d5a5485cda0ee6dd2e00fa7668eb4f053d7f
refs/heads/master
2020-04-07T15:42:26.499159
2015-01-10T22:01:47
2015-01-10T22:01:47
null
0
0
null
null
null
null
UTF-8
C++
false
false
14,677
cpp
/* * Copyright (c) 2014 Immo Software * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * o Redistributions of source code must retain the above copyright notice, this list * of conditions and the following disclaimer. * * o 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. * * o Neither the name of the copyright holder nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "nrf.h" #include <stdio.h> #include <assert.h> //------------------------------------------------------------------------------ // Definitions //------------------------------------------------------------------------------ //! @brief nRF24L01 commands. enum { knRFCommand_R_REGISTER = 0x00, knRFCommand_W_REGISTER = 0x20, knRFCommand_R_RX_PAYLOAD = 0x61, knRFCommand_W_TX_PAYLOAD = 0xa0, knRFCommand_FLUSH_TX = 0xe1, knRFCommand_FLUSH_RX = 0xe2, knRFCommand_REUSE_TX_PL = 0xe3, knRFCommand_ACTIVATE = 0x50, knRFCommand_R_RX_PL_WID = 0x60, knRFCommand_W_ACK_PAYLOAD = 0xa7, knRFCommand_W_TX_PAYLOAD_NOACK = 0xb0, knRFCommand_NOP = 0xff, }; //! @brief nRF24L01 register addresses. enum { knRFRegisterAddressMask = 0x1f, knRFRegister_CONFIG = 0x00, knRFRegister_EN_AA = 0x01, knRFRegister_EN_RXADDR = 0x02, knRFRegister_SETUP_AW = 0x03, knRFRegister_SETUP_RETR = 0x04, knRFRegister_RF_CH = 0x05, knRFRegister_RF_SETUP = 0x06, knRFRegister_STATUS = 0x07, knRFRegister_OBSERVE_TX = 0x08, knRFRegister_CD = 0x09, knRFRegister_RX_ADDR_P0 = 0x0a, knRFRegister_TX_ADDR = 0x10, knRFRegister_RX_PW_P0 = 0x11, knRFRegister_FIFO_STATUS = 0x17, knRFRegister_DYNPD = 0x1c, knRFRegister_FEATURE = 0x1d, }; //! @brief nRF24L01 CONFIG register bitfield masks. enum { knRF_CONFIG_MASK_RX_DR = (1 << 6), knRF_CONFIG_MASK_TX_DS = (1 << 5), knRF_CONFIG_MASK_MAX_RT = (1 << 4), knRF_CONFIG_EN_CRC = (1 << 3), knRF_CONFIG_CRCO = (1 << 2), knRF_CONFIG_PWR_UP = (1 << 1), knRF_CONFIG_PRIM_RX = (1 << 0), }; //! @brief nRF24L01 RF_SETUP register bitfield masks. enum { knRF_RF_SETUP_PLL_LOCK = (1 << 4), knRF_RF_SETUP_RF_DR = (1 << 3), knRF_RF_SETUP_RF_PWR = (3 << 1), knRF_RF_SETUP_LNA_HCURR = (1 << 0), }; //! @brief nRF24L01 STATUS register bitfield masks. enum { knRF_STATUS_RX_DR = (1 << 6), knRF_STATUS_TX_DS = (1 << 5), knRF_STATUS_MAX_RT = (1 << 4), knRF_STATUS_RX_P_NO = (7 << 1), knRF_STATUS_TX_FULL = (1 << 0), }; //! @brief nRF24L01 FIFO_STATUS register bitfield masks. enum { knRF_FIFO_STATUS_TX_REUSE = (1 << 6), knRF_FIFO_STATUS_TX_FULL = (1 << 5), knRF_FIFO_STATUS_TX_EMPTY = (1 << 4), knRF_FIFO_STATUS_RX_FULL = (1 << 1), knRF_FIFO_STATUS_RX_EMPTY = (1 << 0), }; //! @brief nRF24L01 FEATURE register bitfield masks. enum { knRF_FEATURE_EN_DPL = (1 << 2), knRF_FEATURE_EN_ACK_PAY = (1 << 1), knRF_FEATURE_EN_DYN_ACK = (1 << 0), }; //------------------------------------------------------------------------------ // Code //------------------------------------------------------------------------------ inline void word_to_array(uint32_t value, uint8_t * buf) { buf[0] = value & 0xff; buf[1] = (value >> 8) & 0xff; buf[2] = (value >> 16) & 0xff; buf[3] = (value >> 24) & 0xff; } NordicRadio::NordicRadio(PinName ce, PinName cs, PinName sck, PinName mosi, PinName miso, PinName irq) : m_spi(mosi, miso, sck), m_cs(cs), m_ce(ce), m_irq(irq), m_stationAddress(0), m_channel(0), m_mode(kPTX), m_receiveSem(NULL) { m_spi.format(8, 0); m_spi.frequency(); m_cs = 1; m_ce = 0; m_irq.mode(PullUp); m_irq.fall(this, &NordicRadio::irqHandler); } NordicRadio::~NordicRadio() { } void NordicRadio::init(uint32_t address) { uint8_t buf[4]; // Enable dynamic payload size. It's done in this loop to handle the case // where the nRF was previously configured. If we send the ACTIVATE command again, // it will disable the features, which is not what we want. So we have to test // for the FEATURE register to be active first. // // A for loop is used so it's impossible to get stuck here. int i; for (i=0; i < 2; ++i) { // First try writing the feature register and reading it back. writeRegister(knRFRegister_FEATURE, knRF_FEATURE_EN_DPL); uint8_t feature = readRegister(knRFRegister_FEATURE); // Activate features if the feature register is disabled and reads as 0. if (feature == 0) { buf[0] = 0x73; writeCommand(knRFCommand_ACTIVATE, buf, 1); } else { break; } } // Set address width to 4 bytes. writeRegister(knRFRegister_SETUP_AW, 0x02); // Set tx and rx addresses to the same. m_stationAddress = address; word_to_array(address, buf); writeRegister(knRFRegister_TX_ADDR, buf, 4); writeRegister(knRFRegister_RX_ADDR_P0, buf, 4); // Configure and enable pipe 0 with dynamic payload and set its width to max. writeRegister(knRFRegister_DYNPD, 1); writeRegister(knRFRegister_EN_RXADDR, 1); writeRegister(knRFRegister_RX_PW_P0, 32); // Set default channel. This also clears PLOS_CNT. setChannel(2); // Disable interrupts, set mode to PTX uint8_t config = knRF_CONFIG_MASK_RX_DR | knRF_CONFIG_MASK_TX_DS | knRF_CONFIG_MASK_MAX_RT | knRF_CONFIG_EN_CRC; writeRegister(knRFRegister_CONFIG, config); m_mode = kPTX; // Flush FIFOs. writeCommand(knRFCommand_FLUSH_TX); writeCommand(knRFCommand_FLUSH_RX); // Clear all flags. writeRegister(knRFRegister_STATUS, knRF_STATUS_RX_DR | knRF_STATUS_TX_DS | knRF_STATUS_MAX_RT); // Power up. writeRegister(knRFRegister_CONFIG, config | knRF_CONFIG_PWR_UP); // Wait until radio is powered up (>=1.5ms) wait_ms(2); } void NordicRadio::setChannel(uint8_t channel) { m_channel = channel & 0x7f; writeRegister(knRFRegister_RF_CH, channel); } uint32_t NordicRadio::receive(uint8_t * buffer, uint32_t timeout_ms) { if (m_mode != kPRX) { // Write RX address. uint8_t addressBuf[4]; word_to_array(m_stationAddress, addressBuf); writeRegister(knRFRegister_RX_ADDR_P0, addressBuf, 4); // Set RX mode. uint8_t config = readRegister(knRFRegister_CONFIG); writeRegister(knRFRegister_CONFIG, config | knRF_CONFIG_PRIM_RX); m_mode = kPRX; } // Enable reception. m_ce = 1; // Spin until we get a packet. Timer timeout; timeout.start(); while (timeout_ms == 0 || (uint32_t)timeout.read_ms() <= timeout_ms) { uint8_t status = readRegister(knRFRegister_STATUS); if (status & knRF_STATUS_RX_DR) { break; } } // Disable reception. m_ce = 0; // Read packet. uint32_t count = readPacket(buffer); // Clear rx flag. writeRegister(knRFRegister_STATUS, knRF_STATUS_RX_DR); return count; } bool NordicRadio::send(uint32_t address, const uint8_t * buffer, uint32_t count, uint32_t timeout_ms) { assert(count <= 32); // Write TX and RX addresses. uint8_t addressBuf[4]; word_to_array(address, addressBuf); writeRegister(knRFRegister_TX_ADDR, addressBuf, 4); writeRegister(knRFRegister_RX_ADDR_P0, addressBuf, 4); // Clear tx flags. writeRegister(knRFRegister_STATUS, knRF_STATUS_TX_DS | knRF_STATUS_MAX_RT); if (m_mode != kPTX) { // Set TX mode. uint8_t config = readRegister(knRFRegister_CONFIG); writeRegister(knRFRegister_CONFIG, config & ~knRF_CONFIG_PRIM_RX); m_mode = kPTX; } // Fill the TX FIFO. writeCommand(knRFCommand_W_TX_PAYLOAD, buffer, count); // Pulse CE to send the packet. m_ce = 1; wait_ms(10); m_ce = 0; // Wait until we get an ack or timeout. Timer timeout; timeout.start(); uint8_t status = 0; while (timeout_ms == 0 || (uint32_t)timeout.read_ms() <= timeout_ms) { status = readRegister(knRFRegister_STATUS); if (status & (knRF_STATUS_TX_DS | knRF_STATUS_MAX_RT)) { break; } } // Clear the tx flags. writeRegister(knRFRegister_STATUS, knRF_STATUS_TX_DS | knRF_STATUS_MAX_RT); return (status & knRF_STATUS_TX_DS); } void NordicRadio::startReceive() { if (m_mode != kPRX) { // Write RX address. uint8_t addressBuf[4]; word_to_array(m_stationAddress, addressBuf); writeRegister(knRFRegister_RX_ADDR_P0, addressBuf, 4); // Set RX mode. uint8_t config = readRegister(knRFRegister_CONFIG); writeRegister(knRFRegister_CONFIG, config | knRF_CONFIG_PRIM_RX); m_mode = kPRX; } // Clear RX flag. // writeRegister(knRFRegister_STATUS, knRF_STATUS_RX_DR); // Enable RX interrupt. uint8_t config = readRegister(knRFRegister_CONFIG); writeRegister(knRFRegister_CONFIG, config & ~knRF_CONFIG_MASK_RX_DR); // Enable reception. m_ce = 1; } void NordicRadio::stopReceive() { // Disable reception. m_ce = 0; // Disable RX interrupt. uint8_t config = readRegister(knRFRegister_CONFIG); writeRegister(knRFRegister_CONFIG, config | knRF_CONFIG_MASK_RX_DR); } uint32_t NordicRadio::readPacket(uint8_t * buffer) { // Make sure there is something in the fifo. uint8_t status = readRegister(knRFRegister_FIFO_STATUS); if (status & knRF_FIFO_STATUS_RX_EMPTY) { return 0; } // Read received byte count. uint8_t count; readCommand(knRFCommand_R_RX_PL_WID, &count, 1); // Flush RX FIFO if count is invalid. if (count > 32) { writeCommand(knRFCommand_FLUSH_RX); count = 0; } else { // Read packet. readCommand(knRFCommand_R_RX_PAYLOAD, buffer, count); } return count; } bool NordicRadio::isPacketAvailable() { uint8_t status = readRegister(knRFRegister_FIFO_STATUS); return (status & knRF_FIFO_STATUS_RX_EMPTY) == 0; } void NordicRadio::clearReceiveFlag() { // Clear rx flag. writeRegister(knRFRegister_STATUS, knRF_STATUS_RX_DR); } void NordicRadio::irqHandler(void) { if (m_mode != kPRX) { return; } // Signal semaphore. if (m_receiveSem) { m_receiveSem->put(); } // Clear rx flag. // writeRegister(knRFRegister_STATUS, knRF_STATUS_RX_DR); } void NordicRadio::readRegister(uint8_t address, uint8_t * data, uint32_t count) { readCommand(knRFCommand_R_REGISTER | (address & knRFRegisterAddressMask), data, count); } void NordicRadio::writeRegister(uint8_t address, const uint8_t * data, uint32_t count) { writeCommand(knRFCommand_W_REGISTER | (address & knRFRegisterAddressMask), data, count); } uint8_t NordicRadio::readRegister(uint8_t address) { uint8_t value; readRegister(address, &value, 1); return value; } void NordicRadio::writeRegister(uint8_t address, uint8_t data) { writeRegister(address, &data, 1); } void NordicRadio::readCommand(uint8_t command, uint8_t * buffer, uint32_t count) { assert(count <= 32); m_cs = 0; m_spi.write(command); while (count--) { *buffer++ = m_spi.write(0x00); } m_cs = 1; } void NordicRadio::writeCommand(uint8_t command, const uint8_t * buffer, uint32_t count) { assert(count <= 32); m_cs = 0; m_spi.write(command); while (count--) { m_spi.write(*buffer++); } m_cs = 1; } void NordicRadio::dump() { #if DEBUG uint8_t config = readRegister(knRFRegister_CONFIG); uint8_t en_aa = readRegister(knRFRegister_EN_AA); uint8_t en_rxaddr = readRegister(knRFRegister_EN_RXADDR); uint8_t setup_aw = readRegister(knRFRegister_SETUP_AW); uint8_t setup_retr = readRegister(knRFRegister_SETUP_RETR); uint8_t rf_ch = readRegister(knRFRegister_RF_CH); uint8_t rf_setup = readRegister(knRFRegister_RF_SETUP); uint8_t status = readRegister(knRFRegister_STATUS); uint8_t observe_tx = readRegister(knRFRegister_OBSERVE_TX); uint8_t cd = readRegister(knRFRegister_CD); uint8_t rx_pw_p0 = readRegister(knRFRegister_RX_PW_P0); uint8_t fifo_status = readRegister(knRFRegister_FIFO_STATUS); uint8_t dynpd = readRegister(knRFRegister_DYNPD); uint8_t feature = readRegister(knRFRegister_FEATURE); uint8_t rx_addr_p0[5]; readRegister(knRFRegister_RX_ADDR_P0, rx_addr_p0, sizeof(rx_addr_p0)); uint8_t tx_addr[5]; readRegister(knRFRegister_TX_ADDR, tx_addr, sizeof(tx_addr)); printf( "CONFIG=0x%02x EN_AA=0x%02x EN_RXADDR=0x%02x\n" "SETUP_AW=0x%02x SETUP_RETR=0x%02x RF_CH=0x%02x\n" "RF_SETUP=0x%02x STATUS=0x%02x OBSERVE_TX=0x%02x\n" "CD=0x%02x RX_PW_P0=0x%02x FIFO_STATUS=0x%02x\n" "DYNPD=0x%02x FEATURE=0x%02x\n", config, en_aa, en_rxaddr, setup_aw, setup_retr, rf_ch, rf_setup, status, observe_tx, cd, rx_pw_p0, fifo_status, dynpd, feature); printf("RX_ADDR_P0={%02x %02x %02x %02x %02x}\nTX_ADDR={%02x %02x %02x %02x %02x}\n", rx_addr_p0[0], rx_addr_p0[1], rx_addr_p0[2], rx_addr_p0[3], rx_addr_p0[4], tx_addr[0], tx_addr[1], tx_addr[2], tx_addr[3], tx_addr[4]); #endif // DEBUG } //------------------------------------------------------------------------------ // EOF //------------------------------------------------------------------------------
[ "flit@me.com" ]
flit@me.com
901b1740851922bd722d8fef09cd6f76d410f0af
8ac2b2eedb374c69c843b489128ee3579f60fa4d
/data_pool/datapool.h
f251070ec3b937e5edbdf744e4cbd757dddf761e
[]
no_license
tongtongbaike/udp_comm
07cda6c768b8f561ddb17a505c8a421b0bb7ffb0
b98bf57d6f9f5a927a80afb043e9a64323374ec3
refs/heads/master
2020-04-02T03:56:06.218620
2016-07-21T04:12:18
2016-07-21T04:12:18
63,835,461
0
0
null
null
null
null
UTF-8
C++
false
false
499
h
#include<iostream> #include<vector> #include<semaphore.h> #include<pthread.h> #include<stdlib.h> #include<stdio.h> #include<string> #define _DATA_SIZE_ 256 using namespace std; class data_pool { public: data_pool(); ~data_pool(); void pool_push(string &msg); void pool_pop(string &msg); private: vector<std::string> datapools; sem_t sem_product; sem_t sem_consumer; pthread_mutex_t mutex_product; pthread_mutex_t mutex_consumer; int product_index; int customer_index; };
[ "tongtongbaike@foxmail.com" ]
tongtongbaike@foxmail.com
6f98f43dc93fb08aaa0e1f89c9c5321c7d251978
89c3e7831e90bbfa527b926ae4293051ee602827
/PARAEngineTest/unittest1.cpp
2f8d6d48547659d1f68594024d9b55500c091d9e
[]
no_license
Razjelll/PARAEngine
d3c4c2b9db01215f09557f973b0169d6ee33f047
9ab33a1988c5d01fb87c2c7e307dbd2adc1b249d
refs/heads/master
2021-01-02T22:30:10.070628
2017-08-16T09:27:56
2017-08-16T09:27:56
99,332,533
0
0
null
null
null
null
UTF-8
C++
false
false
264
cpp
#include "stdafx.h" #include "CppUnitTest.h" using namespace Microsoft::VisualStudio::CppUnitTestFramework; namespace PARAEngineTest { TEST_CLASS(UnitTest1) { public: TEST_METHOD(TestMethod1) { // TODO: W tym miejscu dodaj kod testowy } }; }
[ "followthekicaj@gmail.com" ]
followthekicaj@gmail.com
dcf51fe452ef9f0fe6a66dde4d3d4d608275f77e
dcc43f45f945011a74303ac9cbc5f800b0a8ee83
/src/Main.cpp
d807685270a721cc1cc26f392147859687ea1ed3
[]
no_license
Anastasija3793/DustyParticles
69a2add0ff56d43f0290f524633de094f0f97b07
01c7d393e0b0db5eed0e8ad6faf16a2d4fa2ec66
refs/heads/master
2021-01-19T11:20:31.067732
2017-05-16T06:10:01
2017-05-16T06:10:01
87,954,047
0
0
null
null
null
null
UTF-8
C++
false
false
10,147
cpp
/// @file Main.cpp /// @brief Title of Brief: Programming project 2 /// This is the program which represents a particle system named 'DustyParticles'. /// The particle system itself represents a 'cloud' of dust particles. /// The 'cloud' floats diagonally when it is in its normal/default behaviour (state). /// However, it changes when states are switched (such as 'explosion', 'freeze', 'galaxy') /// by pressing certain keys (see README.md file). /// It is also possible to pause/unpause timer and change particles colours (see README.md file). /// After a certain time particles return to their normal/default state. /// The main file (Main.cpp) contains the main method - creates window and runs the simulation. /// @author (start/modified) Richard Southern /// @author (finish) Anastasija Belaka /// @version 10.0 /// @date 15/05/2017 Updated to NCCA Coding standard /// Revision History : See https://github.com/Anastasija3793/DustyParticles /// Initial Version 11/04/2017 #ifdef _WIN32 #include <windows.h> #endif #include <iostream> #ifdef __APPLE__ #include <OpenGL/gl.h> #include <OpenGL/glu.h> #include "GLUT/glut.h" #include <SDL.h> #include <SDL_image.h> #else #include <SDL2/SDL.h> #include <SDL2/SDL_image.h> #include <GL/gl.h> #include <GL/glu.h> //#include <GL/glut.h> #endif // Include header files for our environment //Particle #include "Particle.h" #include "Vec4.h" //Emitter (contains particles) #include "Emitter.h" //Camera #include "Camera.h" // The name of the window #define WINDOW_TITLE "DustyParticles" // These defines are for the initial window size (it can be changed in the resize function) int WIDTH = 900; int HEIGHT = 600; //Emitter Emitter *myEmitter = NULL; //The window we'll be rendering to SDL_Window* gWindow = NULL; //OpenGL context SDL_GLContext gContext; int frame=0; bool pause = false; /** * @brief initSDL fires up the SDL window and readies it for OpenGL * @return EXIT_SUCCESS or EXIT_FAILURE */ int initSDL() { //Initialize SDL if( SDL_Init( SDL_INIT_VIDEO | SDL_INIT_TIMER ) < 0 ) { printf( "SDL could not initialize! SDL Error: %s\n", SDL_GetError() ); return EXIT_FAILURE; } else { //Use OpenGL 3.1 core SDL_GL_SetAttribute( SDL_GL_CONTEXT_MAJOR_VERSION, 2 ); SDL_GL_SetAttribute( SDL_GL_CONTEXT_MINOR_VERSION, 1 ); SDL_GL_SetAttribute( SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_COMPATIBILITY); SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); //Create window gWindow = SDL_CreateWindow( WINDOW_TITLE, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, WIDTH, HEIGHT, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE); if( gWindow == NULL ) { printf( "Window could not be created! SDL Error: %s\n", SDL_GetError() ); return EXIT_FAILURE; } } return EXIT_SUCCESS; } /** * @brief timerCallback an SDL2 callback function which will trigger whenever the timer has hit the elapsed time. * @param interval The elapsed time (not used - World uses it's own internal clock) * @return the elapsed time. */ Uint32 timerCallback(Uint32 interval, void *) { if(!pause) { myEmitter->update(); } ++frame; return interval; } /** * @brief main The main opengl loop is managed here * @param argc Not used * @param args Not used * @return EXIT_SUCCESS if it went well! */ /// This function was originally written by Richard Southern in his Cube workshop int main( int argc, char* args[] ) { //Start up SDL and create window if( initSDL() == EXIT_FAILURE ) return EXIT_FAILURE; //Create context gContext = SDL_GL_CreateContext( gWindow ); if( gContext == NULL ) return EXIT_FAILURE; //Use Vsync if( SDL_GL_SetSwapInterval( 1 ) < 0 ) { fprintf(stderr, "Warning: Unable to set VSync! SDL Error: %s\n", SDL_GetError() ); } //Setting particles start/default position Vec4 particlePosition; particlePosition.set(-1.0f,-1.0f,-1.0f,1.0f); //Setting particles start/default colour Vec4 particleColor; particleColor.set(0.0f,1.0f,0.5f,0.7f); myEmitter = new Emitter(particlePosition,1000,particleColor); //Camera and its default parameters Camera camera; float x = -0.15; float y = -0.15; float z = 2; float rX = -0.1; float rY = -0.1; float rZ = 0; \ // Use a timer to update our World. This is the best way to handle updates, // as the timer runs in a separate thread and is therefore not affected by the // rendering performance. SDL_TimerID timerID = SDL_AddTimer(20, //elapsed time in milliseconds* timerCallback, //callback function* (void*) NULL //parameters (none)*); ); //glutTimerFunc(30, timerCallback, (void *) NULL); //Main loop flag bool quit = false; //Event handler SDL_Event e; //Enable text input SDL_StartTextInput(); //While application is running while( !quit ) { while( SDL_PollEvent( &e ) != 0 ) { // The window has been resized if ((e.type == SDL_WINDOWEVENT) && (e.window.event == SDL_WINDOWEVENT_RESIZED)) { SDL_GetWindowSize(gWindow, &WIDTH, &HEIGHT); glViewport(0,0,WIDTH,HEIGHT); camera.perspective(45,float((float)WIDTH/(float)HEIGHT),0.01,500); } //User requests quit else if( e.type == SDL_QUIT ) { quit = true; } else if (e.type == SDL_KEYDOWN) { switch (e.key.keysym.sym) { case SDLK_ESCAPE: quit = true; break; //changing colours //change to red colour case SDLK_r: { myEmitter->changeColor(Vec4(1.0f,0.0f,0.0f,0.7f)); break; } //change to green colour case SDLK_g: { myEmitter->changeColor(Vec4(0.0f,1.0f,0.0f,0.7f)); break; } //change to blue colour case SDLK_b: { myEmitter->changeColor(Vec4(0.0f,0.0f,1.0f,0.7f)); break; } //change to white colour case SDLK_o: { myEmitter->changeColor(Vec4(1.0f,1.0f,1.0f,0.7f)); break; } //change to yellow colour case SDLK_y: { myEmitter->changeColor(Vec4(1.0f,1.0f,0.5f,0.7f)); break; } //change to random colour case SDLK_RETURN: { myEmitter->changeColor(Vec4((float)rand()/RAND_MAX,(float)rand()/RAND_MAX,(float)rand()/RAND_MAX,0.7f)); break; } //change to default colour case SDLK_z: { myEmitter->changeColor(Vec4(0.0f,1.0f,0.5f,0.7f)); break; } //behaviour of particles (and emitter) //pause particles and then resume it case SDLK_p: { pause = !pause; break; } //switching to the following cases //explode case SDLK_SPACE: { myEmitter->changeState(2); break; } //stop only the moving/freeze case SDLK_f: { myEmitter->changeState(1); break; } //create 'Dust Galaxy'/sphere case SDLK_TAB: { myEmitter->changeState(3); break; } //changing camera's parameters //moving camera up case SDLK_UP: { y-=0.005; break; } //moving camera down case SDLK_DOWN: { y+=0.005; break; } //moving camera right case SDLK_RIGHT: { x-=0.005; break; } //moving camera left case SDLK_LEFT: { x+=0.005; break; } //setting camera to the default/start position and 'target' case SDLK_0: {x = -0.15; y = -0.15; z = 2; rX = -0.1; rY = -0.1; rZ = 0; break; } //'zoom in'/move closer case SDLK_1: { z-=0.01; break; } //'zoom out'/move farther case SDLK_2: { z+=0.01; break; } //changing where camera look at (target) case SDLK_w: { rY+=0.005; break; } case SDLK_s: { rY-=0.005; break; } case SDLK_d: { rX+=0.005; break; } case SDLK_a: { rX-=0.005; break; } case SDLK_e: { rZ-=0.01; break; } case SDLK_q: { rZ+=0.01; break; } } } } glViewport(0,0,WIDTH,HEIGHT); camera.perspective(45,float(WIDTH/HEIGHT),0.01,500); camera.lookAt(Vec4(x,y,z),Vec4(rX,rY,rZ),Vec4(0,1,0)); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); myEmitter->draw(); SDL_GL_SwapWindow( gWindow ); } //Disable text input SDL_StopTextInput(); // Disable our timer SDL_RemoveTimer(timerID); //delete emitter delete myEmitter; //Destroy window SDL_DestroyWindow( gWindow ); //Quit SDL subsystems SDL_Quit(); return EXIT_SUCCESS; } /// end of function
[ "s4923023@bournemouth.ac.uk" ]
s4923023@bournemouth.ac.uk
ae200c4a16260821d9f1ea156a9ff2c65aba5dd3
5cae0bb7b1e35690f7f61a2b19455ea13a9311f1
/editor/editor_runtime/editing/editing_system.cpp
46d7727f0f29f2817a89aacb1c5e9aa3fbbecd45
[ "BSD-2-Clause" ]
permissive
qipa/EtherealEngine
aa05c19c53fc8042fdd23640f99691f54f33a2ac
0bce890d2783261023a4bcb743896f4930fe2872
refs/heads/master
2020-04-05T19:48:30.464283
2018-08-24T05:37:30
2018-08-24T05:37:30
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,505
cpp
#include "editing_system.h" #include "core/graphics/texture.h" #include "core/system/subsystem.h" #include "runtime/assets/asset_manager.h" #include "runtime/ecs/components/audio_listener_component.h" #include "runtime/ecs/components/camera_component.h" #include "runtime/ecs/components/transform_component.h" #include "runtime/ecs/constructs/utils.h" #include "runtime/rendering/material.h" #include "runtime/rendering/mesh.h" #include "runtime/rendering/render_window.h" #include "runtime/system/events.h" namespace editor { editing_system::editing_system() { auto& am = core::get_subsystem<runtime::asset_manager>(); icons["translate"] = am.load<gfx::texture>("editor:/data/icons/translate.png").get(); icons["rotate"] = am.load<gfx::texture>("editor:/data/icons/rotate.png").get(); icons["scale"] = am.load<gfx::texture>("editor:/data/icons/scale.png").get(); icons["local"] = am.load<gfx::texture>("editor:/data/icons/local.png").get(); icons["global"] = am.load<gfx::texture>("editor:/data/icons/global.png").get(); icons["play"] = am.load<gfx::texture>("editor:/data/icons/play.png").get(); icons["pause"] = am.load<gfx::texture>("editor:/data/icons/pause.png").get(); icons["stop"] = am.load<gfx::texture>("editor:/data/icons/stop.png").get(); icons["next"] = am.load<gfx::texture>("editor:/data/icons/next.png").get(); icons["material"] = am.load<gfx::texture>("editor:/data/icons/material.png").get(); icons["mesh"] = am.load<gfx::texture>("editor:/data/icons/mesh.png").get(); icons["export"] = am.load<gfx::texture>("editor:/data/icons/export.png").get(); icons["grid"] = am.load<gfx::texture>("editor:/data/icons/grid.png").get(); icons["wireframe"] = am.load<gfx::texture>("editor:/data/icons/wireframe.png").get(); icons["prefab"] = am.load<gfx::texture>("editor:/data/icons/prefab.png").get(); icons["scene"] = am.load<gfx::texture>("editor:/data/icons/scene.png").get(); icons["shader"] = am.load<gfx::texture>("editor:/data/icons/shader.png").get(); icons["loading"] = am.load<gfx::texture>("editor:/data/icons/loading.png").get(); icons["folder"] = am.load<gfx::texture>("editor:/data/icons/folder.png").get(); icons["animation"] = am.load<gfx::texture>("editor:/data/icons/animation.png").get(); icons["sound"] = am.load<gfx::texture>("editor:/data/icons/sound.png").get(); } void editing_system::save_editor_camera() { if(camera) ecs::utils::save_entity_to_file(fs::resolve_protocol("app:/settings/editor_camera.cfg"), camera); } void editing_system::load_editor_camera() { runtime::entity object; if(!ecs::utils::try_load_entity_from_file(fs::resolve_protocol("app:/settings/editor_camera.cfg"), object)) { auto& ecs = core::get_subsystem<runtime::entity_component_system>(); object = ecs.create(); } object.set_name("EDITOR CAMERA"); if(!object.has_component<transform_component>()) { auto transform_comp = object.assign<transform_component>().lock(); transform_comp->set_local_position({0.0f, 2.0f, -5.0f}); } if(!object.has_component<camera_component>()) { object.assign<camera_component>(); } if(!object.has_component<audio_listener_component>()) { object.assign<audio_listener_component>(); } camera = object; } void editing_system::select(rttr::variant object) { selection_data.object = object; } void editing_system::unselect() { selection_data = {}; imguizmo::enable(false); imguizmo::enable(true); } void editing_system::close_project() { save_editor_camera(); unselect(); scene.clear(); } }
[ "nikolai.p.ivanov@gmail.com" ]
nikolai.p.ivanov@gmail.com
1d752c7182bb990949beb237ce5860934a188723
388fbd2245e2dd65601c46d201a1afa9ee2f6d2c
/src/p2p/addrdb.cc
fd97331f9ad6be0566a95e62d387eba7ccc31e22
[ "MIT" ]
permissive
Ambr-org/Ambr
c927299c4b5ee33fefce7845e8a42e8a4e8c4cc0
2f36bac6e675006d83eb45b54a9907a0ebb7e3d5
refs/heads/master
2020-03-22T15:24:53.391685
2018-11-20T02:16:49
2018-11-20T02:16:49
140,250,863
12
3
null
null
null
null
UTF-8
C++
false
false
4,047
cc
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2017 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <addrdb.h> #include <addrman.h> #include <chainparams.h> #include <version.h> #include <hash.h> #include <random.h> #include <streams.h> #include <tinyformat.h> #include <util.h> namespace { template <typename Stream, typename Data> bool SerializeDB(Stream& stream, const Data& data) { // Write and commit header, data try { CHashWriter hasher(SER_DISK, CLIENT_VERSION); stream << Params().MessageStart() << data; hasher << Params().MessageStart() << data; stream << hasher.GetHash(); } catch (const std::exception& e) { return error("%s: Serialize or I/O error - %s", __func__, e.what()); } return true; } template <typename Data> bool SerializeFileDB(const std::string& prefix, const fs::path& path, const Data& data) { // Generate random temporary filename unsigned short randv = 0; ambr::p2p::GetRandBytes((unsigned char*)&randv, sizeof(randv)); std::string tmpfn = strprintf("%s.%04x", prefix, randv); // open temp output file, and associate with CAutoFile fs::path pathTmp = GetDataDir() / tmpfn; FILE *file = fsbridge::fopen(pathTmp, "wb"); CAutoFile fileout(file, SER_DISK, CLIENT_VERSION); if (fileout.IsNull()) return error("%s: Failed to open file %s", __func__, pathTmp.string()); // Serialize if (!SerializeDB(fileout, data)) return false; if (!FileCommit(fileout.Get())) return error("%s: Failed to flush file %s", __func__, pathTmp.string()); fileout.fclose(); // replace existing file, if any, with new file if (!RenameOver(pathTmp, path)) return error("%s: Rename-into-place failed", __func__); return true; } template <typename Stream, typename Data> bool DeserializeDB(Stream& stream, Data& data, bool fCheckSum = true) { try { CHashVerifier<Stream> verifier(&stream); // de-serialize file header (network specific magic number) and .. unsigned char pchMsgTmp[4]; verifier >> pchMsgTmp; // ... verify the network matches ours if (memcmp(pchMsgTmp, Params().MessageStart(), sizeof(pchMsgTmp))) return error("%s: Invalid network magic number", __func__); // de-serialize data verifier >> data; // verify checksum if (fCheckSum) { uint256 hashTmp; stream >> hashTmp; if (hashTmp != verifier.GetHash()) { return error("%s: Checksum mismatch, data corrupted", __func__); } } } catch (const std::exception& e) { return error("%s: Deserialize or I/O error - %s", __func__, e.what()); } return true; } template <typename Data> bool DeserializeFileDB(const fs::path& path, Data& data) { // open input file, and associate with CAutoFile FILE *file = fsbridge::fopen(path, "rb"); CAutoFile filein(file, SER_DISK, CLIENT_VERSION); if (filein.IsNull()) return error("%s: Failed to open file %s", __func__, path.string()); return DeserializeDB(filein, data); } } CBanDB::CBanDB() { pathBanlist = GetDataDir() / "banlist.dat"; } bool CBanDB::Write(const banmap_t& banSet) { return SerializeFileDB("banlist", pathBanlist, banSet); } bool CBanDB::Read(banmap_t& banSet) { return DeserializeFileDB(pathBanlist, banSet); } CAddrDB::CAddrDB() { pathAddr = GetDataDir() / "peers.dat"; } bool CAddrDB::Write(const CAddrMan& addr) { return SerializeFileDB("peers", pathAddr, addr); } bool CAddrDB::Read(CAddrMan& addr) { return DeserializeFileDB(pathAddr, addr); } bool CAddrDB::Read(CAddrMan& addr, CDataStream& ssPeers) { bool ret = DeserializeDB(ssPeers, addr, false); if (!ret) { // Ensure addrman is left in a clean state addr.Clear(); } return ret; }
[ "243522440@qq.com" ]
243522440@qq.com
d6748dfe3c7318dabc6d55cde6b88e70a4283867
1804bd640436344df4c6038a32acc3f08aa4dfd6
/include/vibeam/composition/Material.hpp
a0ba20963fa31cb3a0e6723158db6a5cea020355
[]
no_license
jeanpantoja/vibeam
63cdb974125a74b9fcf0366586d74b1c3d204c26
ba6b73051cb46c824476ebd15b506c78177619c2
refs/heads/master
2021-08-23T06:09:02.961582
2017-12-03T20:07:03
2017-12-03T20:07:03
112,401,972
0
0
null
null
null
null
UTF-8
C++
false
false
1,096
hpp
#pragma once #include <string> namespace vibeam { namespace composition { class Material { public: /** * @param name std::string Name of material * @param density double Density in Kg/m^3 units * @param elasticity double Elasticity in Pa units * @param poisson double Poisson ratio */ Material( const std::string & name, double density, double elasticity, double poisson ); ~Material() = default; /** * @return name std::string Name of material */ const std::string & name() const; /** * @return double Density in Kg/m^3 units */ double density() const; /** * @return double Elasticity modulus in Pa units */ double elasticity() const; /** * @return double Shear modulus in Pa units */ double shear() const; private: std::string _name; double _density; double _elasticity; double _poisson; }; }//namespace vibeam::composition }//namespace vibeam
[ "je.cspantoja@gmail.com" ]
je.cspantoja@gmail.com
0fda42651686877e47423436d9e4f93ddd2f1d03
6a5e7c071f6f62c92f1dcedb8489edda371023fd
/23tree/23tree6.cpp
7d52e2d3bafa1c3588fb790b7b53410e5992dd92
[]
no_license
hzhua/oiprogram
3ba80cf984682a7213f54e6d61cd3e5cbf6492f9
ca3e2c0e34446db28cb7200a40802647c09a42b3
refs/heads/master
2021-03-12T23:00:10.811539
2009-05-09T09:43:41
2009-05-09T09:43:41
125,700
2
0
null
null
null
null
UTF-8
C++
false
false
2,473
cpp
#include<stdio.h> #include<stdlib.h> struct tttree { tttree *left,*right,*mid,*extra; tttree *par; int v1,v2; int type; void needswap(){if(v1>v2&&type==3){int t=v1;v1=v2;v2=t;}} tttree(int a){left=right=mid=extra=par=NULL;v1=a;type=2;} tttree(){left=right=mid=extra=par=NULL;type=v1=v2=0;} }; tttree *root; int min(int a,int b,int c){int t=a<b?a:b;return t<c?t:c;} int max(int a,int b,int c){int t=a>b?a:b;return t>c?t:c;} bool isleaf(tttree *x){return x->left==NULL;} void sort(tttree *cur) { tttree *arr[]={cur->left,cur->right,cur->mid,cur->extra}; for(int i=0;i<=3;i++) for(int j=i;j<=3;j++) if(arr[i]->v1>arr[j]->v1) {tttree *t=arr[i];arr[i]=arr[j];arr[j]=t;} cur->left=arr[0]; cur->mid=arr[1]; cur->right=arr[2]; cur->extra=arr[3]; } void split(tttree *cur,int num) { tttree *n1=new tttree(min(cur->v1,cur->v2,num)); tttree *n2=new tttree(max(cur->v1,cur->v2,num)); int x=cur->v1+cur->v2+num-n1->v1-n2->v1; tttree *p; if(cur->par==NULL) { p=new tttree(x); root=p; } else p=cur->par; n1->par=p; n2->par=p; if(x<p->v1) { p->left=n1; p->extra=n2; } else if((p->type==3&&x>p->v2)||(p->type==2&&x>p->v1)) { p->right=n2; p->extra=n1; } else if(x!=p->v1) { p->mid=n1; p->extra=n2; } if(!isleaf(cur)) { sort(cur); n1->left=cur->left;cur->left->par=n1; n1->right=cur->mid;cur->mid->par=n1; n2->left=cur->right;cur->right->par=n2; n2->right=cur->extra;cur->extra->par=n2; } delete cur; if(x==p->v1) { p->left=n1; p->right=n2; return; } if(p->type==2) { p->mid=p->extra; p->v2=x; p->type=3; p->needswap(); } else split(p,x); } void insert(tttree *cur,int num) { if(cur==NULL) { cur=new tttree(num); root=cur; return; } if(num==cur->v1||(cur->type==3&&cur->v2==num))return; if(isleaf(cur)) { if(cur->type==2) { cur->v2=num; cur->type=3; cur->needswap(); } else if(cur->type==3) split(cur,num); return; } if(num<cur->v1)insert(cur->left,num); else if(cur->type==2&&num>cur->v1)insert(cur->right,num); else if(cur->type==3&&num>cur->v2)insert(cur->right,num); else if(cur->type==3)insert(cur->mid,num); } void inorder(tttree *cur) { if(cur==NULL)return; inorder(cur->left); printf("%d ",cur->v1); if(cur->type==3) { inorder(cur->mid); printf("%d ",cur->v2); } inorder(cur->right); } int main() { for(int i=1;i<=200;i++) { int x=rand()%1000; insert(root,x); } inorder(root); return 0; }
[ "hzhua201@gmail.com" ]
hzhua201@gmail.com
58a7a80649d7a663f9e3bf7ab649432ced9b6587
297497957c531d81ba286bc91253fbbb78b4d8be
/toolkit/crashreporter/google-breakpad/src/common/linux/elf_core_dump.cc
f6d5ebe0c39b2759a2462960a4407f09399f1b52
[ "BSD-3-Clause", "LicenseRef-scancode-unicode-mappings", "LicenseRef-scancode-unknown-license-reference" ]
permissive
marco-c/gecko-dev-comments-removed
7a9dd34045b07e6b22f0c636c0a836b9e639f9d3
61942784fb157763e65608e5a29b3729b0aa66fa
refs/heads/master
2023-08-09T18:55:25.895853
2023-08-01T00:40:39
2023-08-01T00:40:39
211,297,481
0
0
NOASSERTION
2019-09-29T01:27:49
2019-09-27T10:44:24
C++
UTF-8
C++
false
false
3,895
cc
#include "common/linux/elf_core_dump.h" #include <stddef.h> #include <string.h> namespace google_breakpad { ElfCoreDump::Note::Note() {} ElfCoreDump::Note::Note(const MemoryRange& content) : content_(content) {} bool ElfCoreDump::Note::IsValid() const { return GetHeader() != NULL; } const ElfCoreDump::Nhdr* ElfCoreDump::Note::GetHeader() const { return content_.GetData<Nhdr>(0); } ElfCoreDump::Word ElfCoreDump::Note::GetType() const { const Nhdr* header = GetHeader(); return header ? header->n_type : 0; } MemoryRange ElfCoreDump::Note::GetName() const { const Nhdr* header = GetHeader(); if (header) { return content_.Subrange(sizeof(Nhdr), header->n_namesz); } return MemoryRange(); } MemoryRange ElfCoreDump::Note::GetDescription() const { const Nhdr* header = GetHeader(); if (header) { return content_.Subrange(AlignedSize(sizeof(Nhdr) + header->n_namesz), header->n_descsz); } return MemoryRange(); } ElfCoreDump::Note ElfCoreDump::Note::GetNextNote() const { MemoryRange next_content; const Nhdr* header = GetHeader(); if (header) { size_t next_offset = AlignedSize(sizeof(Nhdr) + header->n_namesz); next_offset = AlignedSize(next_offset + header->n_descsz); next_content = content_.Subrange(next_offset, content_.length() - next_offset); } return Note(next_content); } size_t ElfCoreDump::Note::AlignedSize(size_t size) { size_t mask = sizeof(Word) - 1; return (size + mask) & ~mask; } ElfCoreDump::ElfCoreDump() {} ElfCoreDump::ElfCoreDump(const MemoryRange& content) : content_(content) { } void ElfCoreDump::SetContent(const MemoryRange& content) { content_ = content; } bool ElfCoreDump::IsValid() const { const Ehdr* header = GetHeader(); return (header && header->e_ident[0] == ELFMAG0 && header->e_ident[1] == ELFMAG1 && header->e_ident[2] == ELFMAG2 && header->e_ident[3] == ELFMAG3 && header->e_ident[4] == kClass && header->e_version == EV_CURRENT && header->e_type == ET_CORE); } const ElfCoreDump::Ehdr* ElfCoreDump::GetHeader() const { return content_.GetData<Ehdr>(0); } const ElfCoreDump::Phdr* ElfCoreDump::GetProgramHeader(unsigned index) const { const Ehdr* header = GetHeader(); if (header) { return reinterpret_cast<const Phdr*>(content_.GetArrayElement( header->e_phoff, header->e_phentsize, index)); } return NULL; } const ElfCoreDump::Phdr* ElfCoreDump::GetFirstProgramHeaderOfType( Word type) const { for (unsigned i = 0, n = GetProgramHeaderCount(); i < n; ++i) { const Phdr* program = GetProgramHeader(i); if (program->p_type == type) { return program; } } return NULL; } unsigned ElfCoreDump::GetProgramHeaderCount() const { const Ehdr* header = GetHeader(); return header ? header->e_phnum : 0; } bool ElfCoreDump::CopyData(void* buffer, Addr virtual_address, size_t length) { for (unsigned i = 0, n = GetProgramHeaderCount(); i < n; ++i) { const Phdr* program = GetProgramHeader(i); if (program->p_type != PT_LOAD) continue; size_t offset_in_segment = virtual_address - program->p_vaddr; if (virtual_address >= program->p_vaddr && offset_in_segment < program->p_filesz) { const void* data = content_.GetData(program->p_offset + offset_in_segment, length); if (data) { memcpy(buffer, data, length); return true; } } } return false; } ElfCoreDump::Note ElfCoreDump::GetFirstNote() const { MemoryRange note_content; const Phdr* program_header = GetFirstProgramHeaderOfType(PT_NOTE); if (program_header) { note_content = content_.Subrange(program_header->p_offset, program_header->p_filesz); } return Note(note_content); } }
[ "mcastelluccio@mozilla.com" ]
mcastelluccio@mozilla.com
ffa2f4e8e3607cad19a6598507a061683087dbaf
36fd6a38645f8d24657c8d29bb3c46069c6a2c2d
/project1/panntilt/Sid/Brake/src/PCL_Publisher.cpp
de5a5d7abf5cb298461317c21bd4a05d7a1de435
[]
no_license
silent07/workspace
4a597e6e18800ab4ad8048ad0b0095c04e55dea6
58891e4135619320b6c3ac736bcab8733d420ce5
refs/heads/master
2016-09-05T18:02:46.386953
2013-07-12T19:08:35
2013-07-12T19:08:35
10,446,372
0
2
null
null
null
null
UTF-8
C++
false
false
1,498
cpp
//Charanpreet Singh Parmar //csp6@sfu.ca //2011-8-19 #include <ros/ros.h> #include <sensor_msgs/PointCloud.h> #include <sensor_msgs/PointCloud2.h> #include "sensor_msgs/point_cloud_conversion.h" void PCL_callback(const sensor_msgs::PointCloud msg); void RefreshData(const ros::TimerEvent& event); ros::Publisher PCL_Pub; ros::Publisher PCL2_Pub; double period; sensor_msgs::PointCloud PCL; sensor_msgs::PointCloud2 PCL2; int main(int argc, char **argv) { ros::init(argc, argv, "PCL_Updater"); ros::NodeHandle n; ros::NodeHandle n_private("~"); n_private.param("period", period, 0.1); ros::Subscriber PCLSub = n.subscribe("/cloud_out", 1000, PCL_callback); ros::Timer timer = n.createTimer(ros::Duration(period), RefreshData); PCL_Pub = n.advertise<sensor_msgs::PointCloud>("/Assembled_PCL", 10);//Publish PointCloud PCL2_Pub = n.advertise<sensor_msgs::PointCloud2>("/Assembled_PCL2", 10);//Publish PointCloud2 ros::spin(); return 0; } void PCL_callback(const sensor_msgs::PointCloud msg) { PCL_Pub.publish(msg);//Copying can take a while so it's best to publish the message before copying PCL = msg;//Copy Received PointCloud sensor_msgs::convertPointCloudToPointCloud2 (PCL, PCL2);//Transform into PointCloud2 } void RefreshData(const ros::TimerEvent& event) { //Update Header Times to now PCL.header.stamp = ros::Time::now(); PCL2.header.stamp = ros::Time::now(); //Publish PointCloud and PointCloud2 PCL_Pub.publish(PCL); PCL2_Pub.publish(PCL2); }
[ "siddharth_oli@yahoo.com" ]
siddharth_oli@yahoo.com
0b4925bd62564bc7b685f7387e0f0835912ff109
a41a0e68886cdff81f56ce71ab7a4fc24470b373
/tree/654-Maximum Binary Tree.cpp
bd58b251efe48090f31bfbee6711bd3c8f16a37e
[]
no_license
BlackApple-LMZ/leetcode-practice
45590ab059efca6f2bf363fe80c56572ebaaa879
6dcbb4e3baee7d90f34c5d60bc32f692295ca287
refs/heads/master
2021-07-01T14:33:14.826433
2020-10-11T01:46:17
2020-10-11T01:46:17
180,742,461
1
0
null
null
null
null
UTF-8
C++
false
false
445
cpp
TreeNode* constructMaximumBinaryTree(vector<int>& nums) { vector<TreeNode*> stk; for (int i = 0; i < nums.size(); ++i) { TreeNode* cur = new TreeNode(nums[i]); while (!stk.empty() && stk.back()->val < nums[i]) { cur->left = stk.back(); stk.pop_back(); } if (!stk.empty()) stk.back()->right = cur; stk.push_back(cur); } return stk.front(); }
[ "noreply@github.com" ]
noreply@github.com
f21500202aeecc0bcd28169c06bbf1c99929cc6c
cfe35c413b9e33ecc1e556caa36507e6827502cc
/Libraries/plist/Sources/Format/JSONWriter.cpp
6667c3c0ca92eddc8fbfd0690ffdbfefd8b4ecd3
[ "BSD-3-Clause", "LicenseRef-scancode-philippe-de-muyter", "NCSA", "Zlib", "LicenseRef-scancode-public-domain", "BSD-2-Clause" ]
permissive
stlwtr/xcbuild
9c1cc4447dc92c1200df21e7f0c34cc5fc3c360a
5244ba67519e7f4c2cfa40189c0e889108bfdeb2
refs/heads/master
2021-01-21T03:54:16.035901
2016-07-31T18:51:39
2016-07-31T18:51:39
65,064,894
1
0
null
2016-08-06T04:28:24
2016-08-06T04:28:23
null
UTF-8
C++
false
false
7,604
cpp
/** Copyright (c) 2015-present, Facebook, Inc. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory. */ #include <plist/Format/JSONWriter.h> #include <plist/Objects.h> #include <cassert> #include <cinttypes> using plist::Format::JSONWriter; using plist::Object; using plist::String; using plist::Integer; using plist::Real; using plist::Boolean; using plist::Data; using plist::Date; using plist::Array; using plist::Dictionary; using plist::CastTo; JSONWriter:: JSONWriter(Object const *root) : _root (root), _indent (0), _lastKey(false) { } JSONWriter:: ~JSONWriter() { } bool JSONWriter:: write() { if (!handleObject(_root, true)) { return false; } return true; } /* * Low level functions. */ bool JSONWriter:: primitiveWriteString(std::string const &string) { _contents.insert(_contents.end(), string.begin(), string.end()); return true; } bool JSONWriter:: primitiveWriteEscapedString(std::string const &string) { _contents.reserve(_contents.size() + string.size()); if (!primitiveWriteString("\"")) { return false; } for (char c : string) { if (c < 0x20) { char buf[64]; int rc = snprintf(buf, sizeof(buf), "\\%04x", c); assert(rc < (int)sizeof(buf)); (void)rc; if (!primitiveWriteString(buf)) { return false; } } else { switch (c) { case '"': if (!primitiveWriteString("\\\"")) { return false; } break; case '\\': if (!primitiveWriteString("\\")) { return false; } break; default: _contents.push_back(c); break; } } } if (!primitiveWriteString("\"")) { return false; } return true; } bool JSONWriter:: writeString(std::string const &string, bool final) { if (final) { for (int n = 0; n < _indent; n++) { if (!primitiveWriteString("\t")) { return false; } } } return primitiveWriteString(string); } bool JSONWriter:: writeEscapedString(std::string const &string, bool final) { if (final) { for (int n = 0; n < _indent; n++) { if (!primitiveWriteString("\t")) { return false; } } } return primitiveWriteEscapedString(string); } /* * Higher level functions. */ bool JSONWriter:: handleObject(Object const *object, bool root) { if (Dictionary const *dictionary = CastTo<Dictionary>(object)) { if (!handleDictionary(dictionary, root)) { return false; } } else if (Array const *array = CastTo<Array>(object)) { if (!handleArray(array, root)) { return false; } } else if (Boolean const *boolean = CastTo<Boolean>(object)) { if (!handleBoolean(boolean, root)) { return false; } } else if (Integer const *integer = CastTo<Integer>(object)) { if (!handleInteger(integer, root)) { return false; } } else if (Real const *real = CastTo<Real>(object)) { if (!handleReal(real, root)) { return false; } } else if (String const *string = CastTo<String>(object)) { if (!handleString(string, root)) { return false; } } else if (Data const *data = CastTo<Data>(object)) { if (!handleData(data, root)) { return false; } } else if (Date const *date = CastTo<Date>(object)) { if (!handleDate(date, root)) { return false; } } else if (UID const *uid = CastTo<UID>(object)) { if (!handleUID(uid, root)) { return false; } } else { return false; } return true; } bool JSONWriter:: handleDictionary(Dictionary const *dictionary, bool root) { /* Write '{'. */ if (!writeString("{\n", !_lastKey)) { return false; } _indent++; _lastKey = false; for (int i = 0; i < dictionary->count(); ++i) { /* Write ',' if not first entry. */ if (i != 0) { if (!writeString(",\n", false)) { return false; } } _lastKey = false; if (!writeEscapedString(dictionary->key(i), !_lastKey)) { return false; } if (!writeString(": ", false)) { return false; } _lastKey = true; if (!handleObject(dictionary->value(i), false)) { return false; } } /* Write '}'. */ if (!writeString("\n", false)) { return false; } _indent--; if (!writeString("}", true)) { return false; } return true; } bool JSONWriter:: handleArray(Array const *array, bool root) { /* Write '['. */ if (!writeString("[\n", !_lastKey)) { return false; } _lastKey = false; _indent++; for (int i = 0; i < array->count(); ++i) { /* Write ',' if not first entry. */ if (i != 0) { if (!writeString(",\n", false)) { return false; } } if (!handleObject(array->value(i), false)) { return false; } } /* Write ']'. */ if (!writeString("\n", false)) { return false; } _indent--; return writeString("]", true); } bool JSONWriter:: handleBoolean(Boolean const *boolean, bool root) { if (!writeString(boolean->value() ? "true" : "false", !_lastKey)) { return false; } _lastKey = false; return true; } bool JSONWriter:: handleString(String const *string, bool root) { if (!writeEscapedString(string->value(), !_lastKey)) { return false; } _lastKey = false; return true; } bool JSONWriter:: handleData(Data const *data, bool root) { if (!writeString("\"", !_lastKey)) { return false; } _lastKey = false; std::vector<uint8_t> const &value = data->value(); for (auto it : value) { char buf[3]; int rc = snprintf(buf, sizeof(buf), "%02x", it); assert(rc < (int)sizeof(buf)); (void)rc; if (!writeString(buf, false)) { return false; } } return writeString("\"", false); } bool JSONWriter:: handleReal(Real const *real, bool root) { char buf[64]; int rc = snprintf(buf, sizeof(buf), "%g", real->value()); assert(rc < (int)sizeof(buf)); (void)rc; if (!writeString(buf, !_lastKey)) { return false; } _lastKey = false; return true; } bool JSONWriter:: handleInteger(Integer const *integer, bool root) { int rc; char buf[32]; rc = snprintf(buf, sizeof(buf), "%" PRId64, integer->value()); assert(rc < (int)sizeof(buf)); (void)rc; if (!writeString(buf, !_lastKey)) { return false; } _lastKey = false; return true; } bool JSONWriter:: handleDate(Date const *date, bool root) { if (!writeEscapedString(date->stringValue(), !_lastKey)) { return false; } _lastKey = false; return true; } bool JSONWriter:: handleUID(UID const *uid, bool root) { /* Write a CF$UID dictionary. */ std::unique_ptr<Dictionary> dictionary = Dictionary::New(); dictionary->set("CF$UID", Integer::New(uid->value())); return handleDictionary(dictionary.get(), root); }
[ "git@grantpaul.com" ]
git@grantpaul.com
bf768f076c11b02c421712cba363a37a0d4fe735
7396a56d1f6c61b81355fc6cb034491b97feb785
/externals/service_lapack_mkl.h
411ea6ae55528506713edd4d9244f8710238f3aa
[ "Apache-2.0", "Intel" ]
permissive
francktcheng/daal
0ad1703be1e628a5e761ae41d2d9f8c0dde7c0bc
875ddcc8e055d1dd7e5ea51e7c1b39886f9c7b79
refs/heads/master
2018-10-01T06:08:39.904147
2017-09-20T22:37:02
2017-09-20T22:37:02
119,408,979
0
0
null
2018-01-29T16:29:51
2018-01-29T16:29:51
null
UTF-8
C++
false
false
24,658
h
/* file: service_lapack_mkl.h */ /******************************************************************************* * Copyright 2014-2017 Intel Corporation * All Rights Reserved. * * If this software was obtained under the Intel Simplified Software License, * the following terms apply: * * The source code, information and material ("Material") contained herein is * owned by Intel Corporation or its suppliers or licensors, and title to such * Material remains with Intel Corporation or its suppliers or licensors. The * Material contains proprietary information of Intel or its suppliers and * licensors. The Material is protected by worldwide copyright laws and treaty * provisions. No part of the Material may be used, copied, reproduced, * modified, published, uploaded, posted, transmitted, distributed or disclosed * in any way without Intel's prior express written permission. No license under * any patent, copyright or other intellectual property rights in the Material * is granted to or conferred upon you, either expressly, by implication, * inducement, estoppel or otherwise. Any license under such intellectual * property rights must be express and approved by Intel in writing. * * Unless otherwise agreed by Intel in writing, you may not remove or alter this * notice or any other notice embedded in Materials by Intel or Intel's * suppliers or licensors in any way. * * * If this software was obtained under the Apache License, Version 2.0 (the * "License"), the following terms apply: * * You may not use this file except in compliance with the License. You may * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * limitations under the License. *******************************************************************************/ /* //++ // Template wrappers for common Intel(R) MKL functions. //-- */ #ifndef __SERVICE_LAPACK_MKL_H__ #define __SERVICE_LAPACK_MKL_H__ #include "daal_defines.h" #include "mkl_daal.h" #if !defined(__DAAL_CONCAT4) #define __DAAL_CONCAT4(a,b,c,d) __DAAL_CONCAT41(a,b,c,d) #define __DAAL_CONCAT41(a,b,c,d) a##b##c##d #endif #if !defined(__DAAL_CONCAT5) #define __DAAL_CONCAT5(a,b,c,d,e) __DAAL_CONCAT51(a,b,c,d,e) #define __DAAL_CONCAT51(a,b,c,d,e) a##b##c##d##e #endif #if defined(__APPLE__) #define __DAAL_MKL_SSE2 ssse3_ #define __DAAL_MKL_SSSE3 ssse3_ #else #define __DAAL_MKL_SSE2 sse2_ #define __DAAL_MKL_SSSE3 ssse3_ #endif #define __DAAL_MKLFN(f_cpu,f_pref,f_name) __DAAL_CONCAT4(fpk_,f_pref,f_cpu,f_name) #define __DAAL_MKLFN_CALL(f_pref,f_name,f_args) __DAAL_MKLFN_CALL1(f_pref,f_name,f_args) #define __DAAL_MKLFN_CALL_RETURN(f_pref,f_name,f_args) __DAAL_MKLFN_CALL2(f_pref,f_name,f_args) #if (defined(__x86_64__) && !defined(__APPLE__)) || defined(_WIN64) #define __DAAL_MKLFPK_KNL avx512_mic_ #else #define __DAAL_MKLFPK_KNL avx2_ #endif #define __DAAL_MKLFN_CALL1(f_pref,f_name,f_args) \ if(avx512 == cpu) \ { \ __DAAL_MKLFN(avx512_,f_pref,f_name) f_args; \ } \ if(avx512_mic == cpu) \ { \ __DAAL_MKLFN(__DAAL_MKLFPK_KNL,f_pref,f_name) f_args; \ } \ if(avx2 == cpu) \ { \ __DAAL_MKLFN(avx2_,f_pref,f_name) f_args; \ } \ if(avx == cpu) \ { \ __DAAL_MKLFN(avx_,f_pref,f_name) f_args; \ } \ if(sse42 == cpu) \ { \ __DAAL_MKLFN(sse42_,f_pref,f_name) f_args; \ } \ if(ssse3 == cpu) \ { \ __DAAL_MKLFN(__DAAL_MKL_SSSE3,f_pref,f_name) f_args; \ } \ if(sse2 == cpu) \ { \ __DAAL_MKLFN(__DAAL_MKL_SSE2,f_pref,f_name) f_args; \ } #define __DAAL_MKLFN_CALL2(f_pref,f_name,f_args) \ if(avx512 == cpu) \ { \ return __DAAL_MKLFN(avx512_,f_pref,f_name) f_args; \ } \ if(avx512_mic == cpu) \ { \ return __DAAL_MKLFN(__DAAL_MKLFPK_KNL,f_pref,f_name) f_args;\ } \ if(avx2 == cpu) \ { \ return __DAAL_MKLFN(avx2_,f_pref,f_name) f_args; \ } \ if(avx == cpu) \ { \ return __DAAL_MKLFN(avx_,f_pref,f_name) f_args; \ } \ if(sse42 == cpu) \ { \ return __DAAL_MKLFN(sse42_,f_pref,f_name) f_args; \ } \ if(ssse3 == cpu) \ { \ return __DAAL_MKLFN(__DAAL_MKL_SSSE3,f_pref,f_name) f_args; \ } \ if(sse2 == cpu) \ { \ return __DAAL_MKLFN(__DAAL_MKL_SSE2,f_pref,f_name) f_args; \ } namespace daal { namespace internal { namespace mkl { template<typename fpType, CpuType cpu> struct MklLapack{}; /* // Double precision functions definition */ template<CpuType cpu> struct MklLapack<double, cpu> { typedef DAAL_INT SizeType; static void xpotrf(char *uplo, DAAL_INT *p, double *ata, DAAL_INT *ldata, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, dpotrf, (uplo, p, ata, ldata, info, 1)); } static void xxpotrf(char *uplo, DAAL_INT *p, double *ata, DAAL_INT *ldata, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, dpotrf, (uplo, p, ata, ldata, info, 1)); fpk_serv_set_num_threads_local(old_threads); } static void xpotrs(char *uplo, DAAL_INT *p, DAAL_INT *ny, double *ata, DAAL_INT *ldata, double *beta, DAAL_INT *ldaty, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, dpotrs, (uplo, p, ny, ata, ldata, beta, ldaty, info, 1)); } static void xxpotrs(char *uplo, DAAL_INT *p, DAAL_INT *ny, double *ata, DAAL_INT *ldata, double *beta, DAAL_INT *ldaty, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, dpotrs, (uplo, p, ny, ata, ldata, beta, ldaty, info, 1)); fpk_serv_set_num_threads_local(old_threads); } static void xpotri(char *uplo, DAAL_INT *p, double *ata, DAAL_INT *ldata, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, dpotri, (uplo, p, ata, ldata, info, 1)); } static void xxpotri(char *uplo, DAAL_INT *p, double *ata, DAAL_INT *ldata, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, dpotri, (uplo, p, ata, ldata, info, 1)); fpk_serv_set_num_threads_local(old_threads); } static void xgerqf(DAAL_INT *m, DAAL_INT *n, double *a, DAAL_INT *lda, double *tau, double *work, DAAL_INT *lwork, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, dgerqf, (m, n, a, lda, tau, work, lwork, info)); } static void xxgerqf(DAAL_INT *m, DAAL_INT *n, double *a, DAAL_INT *lda, double *tau, double *work, DAAL_INT *lwork, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, dgerqf, (m, n, a, lda, tau, work, lwork, info)); fpk_serv_set_num_threads_local(old_threads); } static void xormrq(char *side, char *trans, DAAL_INT *m, DAAL_INT *n, DAAL_INT *k, double *a, DAAL_INT *lda, double *tau, double *c, DAAL_INT *ldc, double *work, DAAL_INT *lwork, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, dormrq, (side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info, 1, 1)); } static void xxormrq(char *side, char *trans, DAAL_INT *m, DAAL_INT *n, DAAL_INT *k, double *a, DAAL_INT *lda, double *tau, double *c, DAAL_INT *ldc, double *work, DAAL_INT *lwork, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, dormrq, (side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info, 1, 1)); fpk_serv_set_num_threads_local(old_threads); } static void xtrtrs(char *uplo, char *trans, char *diag, DAAL_INT *n, DAAL_INT *nrhs, double *a, DAAL_INT *lda, double *b, DAAL_INT *ldb, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, dtrtrs, (uplo, trans, diag, n, nrhs, a, lda, b, ldb, info, 1, 1, 1)); } static void xxtrtrs(char *uplo, char *trans, char *diag, DAAL_INT *n, DAAL_INT *nrhs, double *a, DAAL_INT *lda, double *b, DAAL_INT *ldb, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, dtrtrs, (uplo, trans, diag, n, nrhs, a, lda, b, ldb, info, 1, 1, 1)); fpk_serv_set_num_threads_local(old_threads); } static void xpptrf(char *uplo, DAAL_INT *n, double *ap, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, dpptrf, (uplo, n, ap, info, 1)); } static void xxpptrf(char *uplo, DAAL_INT *n, double *ap, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, dpptrf, (uplo, n, ap, info, 1)); fpk_serv_set_num_threads_local(old_threads); } static void xgeqrf(DAAL_INT m, DAAL_INT n, double *a, DAAL_INT lda, double *tau, double *work, DAAL_INT lwork, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, dgeqrf, (&m, &n, a, &lda, tau, work, &lwork, info)); } static void xxgeqrf(DAAL_INT m, DAAL_INT n, double *a, DAAL_INT lda, double *tau, double *work, DAAL_INT lwork, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, dgeqrf, (&m, &n, a, &lda, tau, work, &lwork, info)); fpk_serv_set_num_threads_local(old_threads); } static void xgeqp3(const DAAL_INT m, const DAAL_INT n, double *a, const DAAL_INT lda, DAAL_INT *jpvt, double *tau, double *work, const DAAL_INT lwork, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, dgeqp3, (&m, &n, a, &lda, jpvt, tau, work, &lwork, info)); } static void xxgeqp3(DAAL_INT m, DAAL_INT n, double *a, DAAL_INT lda, DAAL_INT *jpvt, double *tau, double *work, DAAL_INT lwork, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, dgeqp3, (&m, &n, a, &lda, jpvt, tau, work, &lwork, info)); fpk_serv_set_num_threads_local(old_threads); } static void xorgqr(const DAAL_INT m, const DAAL_INT n, const DAAL_INT k, double *a, const DAAL_INT lda, const double *tau, double *work, const DAAL_INT lwork, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, dorgqr, (&m, &n, &k, a, &lda, tau, work, &lwork, info)); } static void xxorgqr(DAAL_INT m, DAAL_INT n, DAAL_INT k, double *a, DAAL_INT lda, double *tau, double *work, DAAL_INT lwork, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, dorgqr, (&m, &n, &k, a, &lda, tau, work, &lwork, info)); fpk_serv_set_num_threads_local(old_threads); } static void xgesvd(char jobu, char jobvt, DAAL_INT m, DAAL_INT n, double *a, DAAL_INT lda, double *s, double *u, DAAL_INT ldu, double *vt, DAAL_INT ldvt, double *work, DAAL_INT lwork, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, dgesvd, (&jobu, &jobvt, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt, work, &lwork, info, 1, 1)); } static void xxgesvd(char jobu, char jobvt, DAAL_INT m, DAAL_INT n, double *a, DAAL_INT lda, double *s, double *u, DAAL_INT ldu, double *vt, DAAL_INT ldvt, double *work, DAAL_INT lwork, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, dgesvd, (&jobu, &jobvt, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt, work, &lwork, info, 1, 1)); fpk_serv_set_num_threads_local(old_threads); } static void xsyevd(char *jobz, char *uplo, DAAL_INT *n, double *a, DAAL_INT *lda, double *w, double *work, DAAL_INT *lwork, DAAL_INT *iwork, DAAL_INT *liwork, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, dsyevd, (jobz, uplo, n, a, lda, w, work, lwork, iwork, liwork, info, 1, 1)); } static void xxsyevd(char *jobz, char *uplo, DAAL_INT *n, double *a, DAAL_INT *lda, double *w, double *work, DAAL_INT *lwork, DAAL_INT *iwork, DAAL_INT *liwork, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, dsyevd, (jobz, uplo, n, a, lda, w, work, lwork, iwork, liwork, info, 1, 1)); fpk_serv_set_num_threads_local(old_threads); } static void xormqr(char *side, char *trans, DAAL_INT *m, DAAL_INT *n, DAAL_INT *k, double *a, DAAL_INT *lda, double *tau, double *c, DAAL_INT *ldc, double *work, DAAL_INT *lwork, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, dormqr, (side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info, 1, 1)); } static void xxormqr(char *side, char *trans, DAAL_INT *m, DAAL_INT *n, DAAL_INT *k, double *a, DAAL_INT *lda, double *tau, double *c, DAAL_INT *ldc, double *work, DAAL_INT *lwork, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, dormqr, (side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info, 1, 1)); fpk_serv_set_num_threads_local(old_threads); } }; /* // Single precision functions definition */ template<CpuType cpu> struct MklLapack<float, cpu> { typedef DAAL_INT SizeType; static void xpotrf(char *uplo, DAAL_INT *p, float *ata, DAAL_INT *ldata, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, spotrf, (uplo, p, ata, ldata, info, 1)); } static void xxpotrf(char *uplo, DAAL_INT *p, float *ata, DAAL_INT *ldata, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, spotrf, (uplo, p, ata, ldata, info, 1)); fpk_serv_set_num_threads_local(old_threads); } static void xpotrs(char *uplo, DAAL_INT *p, DAAL_INT *ny, float *ata, DAAL_INT *ldata, float *beta, DAAL_INT *ldaty, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, spotrs, (uplo, p, ny, ata, ldata, beta, ldaty, info, 1)); } static void xxpotrs(char *uplo, DAAL_INT *p, DAAL_INT *ny, float *ata, DAAL_INT *ldata, float *beta, DAAL_INT *ldaty, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, spotrs, (uplo, p, ny, ata, ldata, beta, ldaty, info, 1)); fpk_serv_set_num_threads_local(old_threads); } static void xpotri(char *uplo, DAAL_INT *p, float *ata, DAAL_INT *ldata, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, spotri, (uplo, p, ata, ldata, info, 1)); } static void xxpotri(char *uplo, DAAL_INT *p, float *ata, DAAL_INT *ldata, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, spotri, (uplo, p, ata, ldata, info, 1)); fpk_serv_set_num_threads_local(old_threads); } static void xgerqf(DAAL_INT *m, DAAL_INT *n, float *a, DAAL_INT *lda, float *tau, float *work, DAAL_INT *lwork, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, sgerqf, (m, n, a, lda, tau, work, lwork, info)); } static void xxgerqf(DAAL_INT *m, DAAL_INT *n, float *a, DAAL_INT *lda, float *tau, float *work, DAAL_INT *lwork, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, sgerqf, (m, n, a, lda, tau, work, lwork, info)); fpk_serv_set_num_threads_local(old_threads); } static void xormrq(char *side, char *trans, DAAL_INT *m, DAAL_INT *n, DAAL_INT *k, float *a, DAAL_INT *lda, float *tau, float *c, DAAL_INT *ldc, float *work, DAAL_INT *lwork, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, sormrq, (side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info, 1, 1)); } static void xxormrq(char *side, char *trans, DAAL_INT *m, DAAL_INT *n, DAAL_INT *k, float *a, DAAL_INT *lda, float *tau, float *c, DAAL_INT *ldc, float *work, DAAL_INT *lwork, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, sormrq, (side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info, 1, 1)); fpk_serv_set_num_threads_local(old_threads); } static void xtrtrs(char *uplo, char *trans, char *diag, DAAL_INT *n, DAAL_INT *nrhs, float *a, DAAL_INT *lda, float *b, DAAL_INT *ldb, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, strtrs, (uplo, trans, diag, n, nrhs, a, lda, b, ldb, info, 1, 1, 1)); } static void xxtrtrs(char *uplo, char *trans, char *diag, DAAL_INT *n, DAAL_INT *nrhs, float *a, DAAL_INT *lda, float *b, DAAL_INT *ldb, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, strtrs, (uplo, trans, diag, n, nrhs, a, lda, b, ldb, info, 1, 1, 1)); fpk_serv_set_num_threads_local(old_threads); } static void xpptrf(char *uplo, DAAL_INT *n, float *ap, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, spptrf, (uplo, n, ap, info, 1)); } static void xxpptrf(char *uplo, DAAL_INT *n, float *ap, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, spptrf, (uplo, n, ap, info, 1)); fpk_serv_set_num_threads_local(old_threads); } static void xgeqrf(DAAL_INT m, DAAL_INT n, float *a, DAAL_INT lda, float *tau, float *work, DAAL_INT lwork, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, sgeqrf, (&m, &n, a, &lda, tau, work, &lwork, info)); } static void xxgeqrf(DAAL_INT m, DAAL_INT n, float *a, DAAL_INT lda, float *tau, float *work, DAAL_INT lwork, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, sgeqrf, (&m, &n, a, &lda, tau, work, &lwork, info)); fpk_serv_set_num_threads_local(old_threads); } static void xgeqp3(const DAAL_INT m, const DAAL_INT n, float *a, const DAAL_INT lda, DAAL_INT *jpvt, float *tau, float *work, const DAAL_INT lwork, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, sgeqp3, (&m, &n, a, &lda, jpvt, tau, work, &lwork, info)); } static void xxgeqp3(DAAL_INT m, DAAL_INT n, float *a, DAAL_INT lda, DAAL_INT *jpvt, float *tau, float *work, DAAL_INT lwork, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, sgeqp3, (&m, &n, a, &lda, jpvt, tau, work, &lwork, info)); fpk_serv_set_num_threads_local(old_threads); } static void xorgqr(const DAAL_INT m, const DAAL_INT n, const DAAL_INT k, float *a, const DAAL_INT lda, const float *tau, float *work, const DAAL_INT lwork, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, sorgqr, (&m, &n, &k, a, &lda, tau, work, &lwork, info)); } static void xxorgqr(DAAL_INT m, DAAL_INT n, DAAL_INT k, float *a, DAAL_INT lda, float *tau, float *work, DAAL_INT lwork, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, sorgqr, (&m, &n, &k, a, &lda, tau, work, &lwork, info)); fpk_serv_set_num_threads_local(old_threads); } static void xgesvd(char jobu, char jobvt, DAAL_INT m, DAAL_INT n, float *a, DAAL_INT lda, float *s, float *u, DAAL_INT ldu, float *vt, DAAL_INT ldvt, float *work, DAAL_INT lwork, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, sgesvd, (&jobu, &jobvt, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt, work, &lwork, info, 1, 1)); } static void xxgesvd(char jobu, char jobvt, DAAL_INT m, DAAL_INT n, float *a, DAAL_INT lda, float *s, float *u, DAAL_INT ldu, float *vt, DAAL_INT ldvt, float *work, DAAL_INT lwork, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, sgesvd, (&jobu, &jobvt, &m, &n, a, &lda, s, u, &ldu, vt, &ldvt, work, &lwork, info, 1, 1)); fpk_serv_set_num_threads_local(old_threads); } static void xsyevd(char *jobz, char *uplo, DAAL_INT *n, float *a, DAAL_INT *lda, float *w, float *work, DAAL_INT *lwork, DAAL_INT *iwork, DAAL_INT *liwork, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, ssyevd, (jobz, uplo, n, a, lda, w, work, lwork, iwork, liwork, info, 1, 1)); } static void xxsyevd(char *jobz, char *uplo, DAAL_INT *n, float *a, DAAL_INT *lda, float *w, float *work, DAAL_INT *lwork, DAAL_INT *iwork, DAAL_INT *liwork, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, ssyevd, (jobz, uplo, n, a, lda, w, work, lwork, iwork, liwork, info, 1, 1)); fpk_serv_set_num_threads_local(old_threads); } static void xormqr(char *side, char *trans, DAAL_INT *m, DAAL_INT *n, DAAL_INT *k, float *a, DAAL_INT *lda, float *tau, float *c, DAAL_INT *ldc, float *work, DAAL_INT *lwork, DAAL_INT *info) { __DAAL_MKLFN_CALL(lapack_, sormqr, (side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info, 1, 1)); } static void xxormqr(char *side, char *trans, DAAL_INT *m, DAAL_INT *n, DAAL_INT *k, float *a, DAAL_INT *lda, float *tau, float *c, DAAL_INT *ldc, float *work, DAAL_INT *lwork, DAAL_INT *info) { int old_threads = fpk_serv_set_num_threads_local(1); __DAAL_MKLFN_CALL(lapack_, sormqr, (side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info, 1, 1)); fpk_serv_set_num_threads_local(old_threads); } }; } // namespace mkl } // namespace internal } // namespace daal #endif
[ "vasily.rubtsov@intel.com" ]
vasily.rubtsov@intel.com
07d4fdcd1f4d3bad8ba739690e599a77370496b8
b2b18fa2a1ed7cc3a1089235eea35684112662cb
/qmlpro/build-Teacher-Desktop_Qt_5_7_0_MinGW_32bit-Debug/debug/moc_sysset.cpp
780790b81ef03033544826cfd9bd7950af19953c
[]
no_license
kevin201353/Terminal_multiresol
dbd99eb5d294eef0f06e7f1ce8410c5b954523da
ee2a93088dfbb1370752ea8234af1f5267ed192c
refs/heads/master
2021-01-21T16:09:51.315060
2017-12-06T02:24:17
2017-12-06T02:24:17
68,807,731
0
0
null
null
null
null
UTF-8
C++
false
false
11,496
cpp
/**************************************************************************** ** Meta object code from reading C++ file 'sysset.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.7.0) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "../../Teacher/sysset.h" #include <QtCore/qbytearray.h> #include <QtCore/qmetatype.h> #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'sysset.h' doesn't include <QObject>." #elif Q_MOC_OUTPUT_REVISION != 67 #error "This file was generated using the moc from 5.7.0. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif QT_BEGIN_MOC_NAMESPACE struct qt_meta_stringdata_Sysset_t { QByteArrayData data[21]; char stringdata0[207]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ qptrdiff(offsetof(qt_meta_stringdata_Sysset_t, stringdata0) + ofs \ - idx * sizeof(QByteArrayData)) \ ) static const qt_meta_stringdata_Sysset_t qt_meta_stringdata_Sysset = { { QT_MOC_LITERAL(0, 0, 6), // "Sysset" QT_MOC_LITERAL(1, 7, 16), // "teacheripChanged" QT_MOC_LITERAL(2, 24, 0), // "" QT_MOC_LITERAL(3, 25, 13), // "seatnoChanged" QT_MOC_LITERAL(4, 39, 13), // "isdhcpChanged" QT_MOC_LITERAL(5, 53, 14), // "isdhcp2Changed" QT_MOC_LITERAL(6, 68, 12), // "netipChanged" QT_MOC_LITERAL(7, 81, 11), // "maskChanged" QT_MOC_LITERAL(8, 93, 14), // "gatewayChanged" QT_MOC_LITERAL(9, 108, 11), // "dns1Changed" QT_MOC_LITERAL(10, 120, 11), // "dns2Changed" QT_MOC_LITERAL(11, 132, 13), // "slot_save_acq" QT_MOC_LITERAL(12, 146, 9), // "teacherip" QT_MOC_LITERAL(13, 156, 6), // "seatno" QT_MOC_LITERAL(14, 163, 6), // "isdhcp" QT_MOC_LITERAL(15, 170, 7), // "isdhcp2" QT_MOC_LITERAL(16, 178, 5), // "netip" QT_MOC_LITERAL(17, 184, 4), // "mask" QT_MOC_LITERAL(18, 189, 7), // "gateway" QT_MOC_LITERAL(19, 197, 4), // "dns1" QT_MOC_LITERAL(20, 202, 4) // "dns2" }, "Sysset\0teacheripChanged\0\0seatnoChanged\0" "isdhcpChanged\0isdhcp2Changed\0netipChanged\0" "maskChanged\0gatewayChanged\0dns1Changed\0" "dns2Changed\0slot_save_acq\0teacherip\0" "seatno\0isdhcp\0isdhcp2\0netip\0mask\0" "gateway\0dns1\0dns2" }; #undef QT_MOC_LITERAL static const uint qt_meta_data_Sysset[] = { // content: 7, // revision 0, // classname 0, 0, // classinfo 10, 14, // methods 9, 74, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags 9, // signalCount // signals: name, argc, parameters, tag, flags 1, 0, 64, 2, 0x06 /* Public */, 3, 0, 65, 2, 0x06 /* Public */, 4, 0, 66, 2, 0x06 /* Public */, 5, 0, 67, 2, 0x06 /* Public */, 6, 0, 68, 2, 0x06 /* Public */, 7, 0, 69, 2, 0x06 /* Public */, 8, 0, 70, 2, 0x06 /* Public */, 9, 0, 71, 2, 0x06 /* Public */, 10, 0, 72, 2, 0x06 /* Public */, // slots: name, argc, parameters, tag, flags 11, 0, 73, 2, 0x0a /* Public */, // signals: parameters QMetaType::Void, QMetaType::Void, QMetaType::Void, QMetaType::Void, QMetaType::Void, QMetaType::Void, QMetaType::Void, QMetaType::Void, QMetaType::Void, // slots: parameters QMetaType::Void, // properties: name, type, flags 12, QMetaType::QString, 0x00495103, 13, QMetaType::QString, 0x00495103, 14, QMetaType::Int, 0x00495103, 15, QMetaType::Int, 0x00495103, 16, QMetaType::QString, 0x00495103, 17, QMetaType::QString, 0x00495103, 18, QMetaType::QString, 0x00495103, 19, QMetaType::QString, 0x00495103, 20, QMetaType::QString, 0x00495103, // properties: notify_signal_id 0, 1, 2, 3, 4, 5, 6, 7, 8, 0 // eod }; void Sysset::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { Sysset *_t = static_cast<Sysset *>(_o); Q_UNUSED(_t) switch (_id) { case 0: _t->teacheripChanged(); break; case 1: _t->seatnoChanged(); break; case 2: _t->isdhcpChanged(); break; case 3: _t->isdhcp2Changed(); break; case 4: _t->netipChanged(); break; case 5: _t->maskChanged(); break; case 6: _t->gatewayChanged(); break; case 7: _t->dns1Changed(); break; case 8: _t->dns2Changed(); break; case 9: _t->slot_save_acq(); break; default: ; } } else if (_c == QMetaObject::IndexOfMethod) { int *result = reinterpret_cast<int *>(_a[0]); void **func = reinterpret_cast<void **>(_a[1]); { typedef void (Sysset::*_t)(); if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&Sysset::teacheripChanged)) { *result = 0; return; } } { typedef void (Sysset::*_t)(); if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&Sysset::seatnoChanged)) { *result = 1; return; } } { typedef void (Sysset::*_t)(); if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&Sysset::isdhcpChanged)) { *result = 2; return; } } { typedef void (Sysset::*_t)(); if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&Sysset::isdhcp2Changed)) { *result = 3; return; } } { typedef void (Sysset::*_t)(); if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&Sysset::netipChanged)) { *result = 4; return; } } { typedef void (Sysset::*_t)(); if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&Sysset::maskChanged)) { *result = 5; return; } } { typedef void (Sysset::*_t)(); if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&Sysset::gatewayChanged)) { *result = 6; return; } } { typedef void (Sysset::*_t)(); if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&Sysset::dns1Changed)) { *result = 7; return; } } { typedef void (Sysset::*_t)(); if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&Sysset::dns2Changed)) { *result = 8; return; } } } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { Sysset *_t = static_cast<Sysset *>(_o); Q_UNUSED(_t) void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QString*>(_v) = _t->teacherip(); break; case 1: *reinterpret_cast< QString*>(_v) = _t->seatno(); break; case 2: *reinterpret_cast< int*>(_v) = _t->isdhcp(); break; case 3: *reinterpret_cast< int*>(_v) = _t->isdhcp2(); break; case 4: *reinterpret_cast< QString*>(_v) = _t->netip(); break; case 5: *reinterpret_cast< QString*>(_v) = _t->mask(); break; case 6: *reinterpret_cast< QString*>(_v) = _t->gateway(); break; case 7: *reinterpret_cast< QString*>(_v) = _t->dns1(); break; case 8: *reinterpret_cast< QString*>(_v) = _t->dns2(); break; default: break; } } else if (_c == QMetaObject::WriteProperty) { Sysset *_t = static_cast<Sysset *>(_o); Q_UNUSED(_t) void *_v = _a[0]; switch (_id) { case 0: _t->setTeacherip(*reinterpret_cast< QString*>(_v)); break; case 1: _t->setSeatno(*reinterpret_cast< QString*>(_v)); break; case 2: _t->setIsdhcp(*reinterpret_cast< int*>(_v)); break; case 3: _t->setIsdhcp2(*reinterpret_cast< int*>(_v)); break; case 4: _t->setNetip(*reinterpret_cast< QString*>(_v)); break; case 5: _t->setMask(*reinterpret_cast< QString*>(_v)); break; case 6: _t->setGateway(*reinterpret_cast< QString*>(_v)); break; case 7: _t->setDns1(*reinterpret_cast< QString*>(_v)); break; case 8: _t->setDns2(*reinterpret_cast< QString*>(_v)); break; default: break; } } else if (_c == QMetaObject::ResetProperty) { } #endif // QT_NO_PROPERTIES Q_UNUSED(_a); } const QMetaObject Sysset::staticMetaObject = { { &QObject::staticMetaObject, qt_meta_stringdata_Sysset.data, qt_meta_data_Sysset, qt_static_metacall, Q_NULLPTR, Q_NULLPTR} }; const QMetaObject *Sysset::metaObject() const { return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; } void *Sysset::qt_metacast(const char *_clname) { if (!_clname) return Q_NULLPTR; if (!strcmp(_clname, qt_meta_stringdata_Sysset.stringdata0)) return static_cast<void*>(const_cast< Sysset*>(this)); return QObject::qt_metacast(_clname); } int Sysset::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 10) qt_static_metacall(this, _c, _id, _a); _id -= 10; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { if (_id < 10) *reinterpret_cast<int*>(_a[0]) = -1; _id -= 10; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty || _c == QMetaObject::WriteProperty || _c == QMetaObject::ResetProperty || _c == QMetaObject::RegisterPropertyMetaType) { qt_static_metacall(this, _c, _id, _a); _id -= 9; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 9; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 9; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 9; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 9; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 9; } #endif // QT_NO_PROPERTIES return _id; } // SIGNAL 0 void Sysset::teacheripChanged() { QMetaObject::activate(this, &staticMetaObject, 0, Q_NULLPTR); } // SIGNAL 1 void Sysset::seatnoChanged() { QMetaObject::activate(this, &staticMetaObject, 1, Q_NULLPTR); } // SIGNAL 2 void Sysset::isdhcpChanged() { QMetaObject::activate(this, &staticMetaObject, 2, Q_NULLPTR); } // SIGNAL 3 void Sysset::isdhcp2Changed() { QMetaObject::activate(this, &staticMetaObject, 3, Q_NULLPTR); } // SIGNAL 4 void Sysset::netipChanged() { QMetaObject::activate(this, &staticMetaObject, 4, Q_NULLPTR); } // SIGNAL 5 void Sysset::maskChanged() { QMetaObject::activate(this, &staticMetaObject, 5, Q_NULLPTR); } // SIGNAL 6 void Sysset::gatewayChanged() { QMetaObject::activate(this, &staticMetaObject, 6, Q_NULLPTR); } // SIGNAL 7 void Sysset::dns1Changed() { QMetaObject::activate(this, &staticMetaObject, 7, Q_NULLPTR); } // SIGNAL 8 void Sysset::dns2Changed() { QMetaObject::activate(this, &staticMetaObject, 8, Q_NULLPTR); } QT_END_MOC_NAMESPACE
[ "zhaosenhua@shencloudtech.com" ]
zhaosenhua@shencloudtech.com
eb18c42211e58dd2d5b4a4175a7b0ecf4a150201
12ea67a9bd20cbeed3ed839e036187e3d5437504
/winxgui/Swc/samples/PwcStudio/CExplorer.h
909d84c072e5905655b21aa6f6a26544e63c143c
[]
no_license
cnsuhao/winxgui
e0025edec44b9c93e13a6c2884692da3773f9103
348bb48994f56bf55e96e040d561ec25642d0e46
refs/heads/master
2021-05-28T21:33:54.407837
2008-09-13T19:43:38
2008-09-13T19:43:38
null
0
0
null
null
null
null
UTF-8
C++
false
false
12,476
h
#pragma once #include "StdAfx.h" #include "resource.h" class CExplorer : public CDockPanelBase { protected: CToolBarCtrlEx m_ToolBarBuild; CTreeViewCtrl m_TreeExplorer; CComboBox m_comboboxExt; CImageCtrl Image; public: CExplorer() { } ~CExplorer() { SaveConfig(); } protected: virtual BOOL OnCreate(LPCREATESTRUCT lpCreateStruct) { if ( !m_ToolBarBuild.Create(GetSafeHwnd(),IDR_BUILD)) return -1; if (!m_comboboxExt.Create(GetSafeHwnd(),0x10000,NULL,WS_CHILD|WS_VISIBLE|CBS_DROPDOWN | WS_VSCROLL | CBS_HASSTRINGS |CBS_OWNERDRAWVARIABLE)) return -1; m_ToolBarBuild.LoadToolBar(IDR_BUILD); m_ToolBarBuild.AddTrueColor(IDB_BUILD,TB_SETIMAGELIST); if (!m_TreeExplorer.Create(GetSafeHwnd(),WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS, 2)) return -1; if(!Image.CreateColor(IDB_TREEEXPLORER)) return FALSE; m_TreeExplorer.SetImageList(Image.GetImageHandle(),TVSIL_NORMAL); PopulateTree(); return TRUE; } void PopulateTree() { HTREEITEM hRoot = m_TreeExplorer.InsertItem (_T("MySwc files"), 0, 0); HTREEITEM hSrc = m_TreeExplorer.InsertItem (_T("Source Files"), 2, 3, hRoot); m_TreeExplorer.InsertItem (_T("CMainWin.cpp"), 4, 4, hSrc); m_TreeExplorer.InsertItem (_T("CMenuSpawn.cpp"), 4, 4, hSrc); m_TreeExplorer.InsertItem (_T("CWinDock.cpp"), 4, 4, hSrc); m_TreeExplorer.InsertItem (_T("StdAfx.cpp"), 4, 4, hSrc); m_TreeExplorer.InsertItem (_T("MainFrm.cpp"), 4, 4, hSrc); m_TreeExplorer.InsertItem (_T("CComboBoxExt.cpp"), 4, 4, hSrc); m_TreeExplorer.InsertItem (_T("CContainer.cpp"), 4,4, hSrc); m_TreeExplorer.InsertItem (_T("CCFolder.cpp"), 4, 4, hSrc); m_TreeExplorer.InsertItem (_T("CCMMedia.cpp"), 4, 4, hSrc); m_TreeExplorer.InsertItem (_T("CCOutLook.cpp"), 4, 4, hSrc); m_TreeExplorer.InsertItem (_T("CSplitter.cpp"), 4, 4, hSrc); m_TreeExplorer.InsertItem (_T("CTabbed.cpp"), 4, 4, hSrc); m_TreeExplorer.InsertItem (_T("CWorkTab.cpp"), 4, 4, hSrc); HTREEITEM hInc = m_TreeExplorer.InsertItem (_T("Header Files"), 2, 3, hRoot); m_TreeExplorer.InsertItem (_T("CMainWin.h"), 5, 5, hInc); m_TreeExplorer.InsertItem (_T("CMenuSpawn.h"), 5, 5, hInc); m_TreeExplorer.InsertItem (_T("CWinDock.h"), 5, 5, hInc); m_TreeExplorer.InsertItem (_T("StdAfx.h"), 5, 5, hInc); m_TreeExplorer.InsertItem (_T("MainFrm.h"), 5, 5, hInc); m_TreeExplorer.InsertItem (_T("CComboBoxExt.h"), 5, 5, hInc); m_TreeExplorer.InsertItem (_T("CContainer.h"), 5, 5, hInc); m_TreeExplorer.InsertItem (_T("CCFolder.h"), 5, 5, hInc); m_TreeExplorer.InsertItem (_T("CCMMedia.h"), 5, 5, hInc); m_TreeExplorer.InsertItem (_T("CCOutLook.h"), 5, 5, hInc); m_TreeExplorer.InsertItem (_T("CSplitter.h"),5, 5, hInc); m_TreeExplorer.InsertItem (_T("CTabbed.h"), 5,5, hInc); m_TreeExplorer.InsertItem (_T("CWorkTab.h"), 5, 5, hInc); HTREEITEM hRes = m_TreeExplorer.InsertItem (_T("Resource Files"), 2, 3, hRoot); m_TreeExplorer.InsertItem (_T("MySwc.ico"), 10, 10, hRes); m_TreeExplorer.InsertItem (_T("MySwc.rc2"), 9, 9, hRes); m_TreeExplorer.InsertItem (_T("MySwcDoc.ico"), 10, 10, hRes); m_TreeExplorer.InsertItem (_T("Toolbar.bmp"), 13, 13, hRes); m_TreeExplorer.Expand (hRoot, TVE_EXPAND); m_TreeExplorer.Expand (hSrc, TVE_EXPAND); m_TreeExplorer.Expand (hInc, TVE_EXPAND); m_TreeExplorer.Expand (hRes, TVE_EXPAND); } virtual BOOL OnPaint(HDC hDC) { CRect rcClient; CPaintDC dc(GetSafeHwnd()); // device context for painting m_TreeExplorer.GetWindowRect(rcClient); ScreenToClient(rcClient); rcClient.InflateRect(1,1); rcClient.bottom+=1; dc.Draw3dRect(rcClient,GetSysColor(COLOR_BTNSHADOW),GetSysColor(COLOR_BTNSHADOW)); dc.DeleteDC(); return TRUE; } virtual void UpdatePanel() { CRect rc; CRect rcT; GetClientRect(rc); int nVal=0; rcT=rc; nVal=rc.top; rcT.bottom=22; m_comboboxExt.SetWindowPos(NULL,rcT,SWP_NOACTIVATE|SWP_NOZORDER); nVal+=24; rcT=rc; rcT.top=nVal; rcT.bottom=22; nVal+=22+2; m_ToolBarBuild.SetWindowPos(NULL,rcT,SWP_NOACTIVATE|SWP_NOZORDER); rcT=rc; rcT.right-=2; rcT.top=nVal; rcT.bottom-=nVal+3; rcT.DeflateRect(1,1); m_TreeExplorer.SetWindowPos(NULL,rcT,SWP_NOACTIVATE|SWP_NOZORDER); } }; //--------------------------------------------------------------- class COutputList : public CListView { public: COutputList(){}; virtual ~COutputList(){}; void OnWindowPosChanging(WINDOWPOS* lpwndpos) { Default(); ShowScrollBar (SB_HORZ, FALSE); //ModifyStyle (WS_HSCROLL, 0, SWP_DRAWFRAME); } protected: BEGIN_MSG_MAP() ON_WM_WINDOWPOSCHANGING(OnWindowPosChanging) END_MSG_MAP(CListView) }; class CWkTab : public CDockPanelBase { protected: CWorkTab m_wktab; COutputList m_wndOutList1; COutputList m_wndOutList2; COutputList m_wndOutList3; CHeaderView m_h1; CHeaderView m_h2; CHeaderView m_h3; public: CWkTab() { } ~CWkTab() { } protected: virtual BOOL OnCreate(LPCREATESTRUCT lpCreateStruct) { if (!m_wktab.Create(WS_VISIBLE|WS_CHILD,CRect(0,0,0,0),this,0x9933)) return -1; //------------------------------------------------------------- m_wndOutList1.Create (m_wktab.GetSafeHwnd(),WS_CHILD | WS_VISIBLE | WS_VSCROLL | LVS_REPORT,7000); m_wndOutList2.Create (m_wktab.GetSafeHwnd(),WS_CHILD | WS_VISIBLE | WS_VSCROLL | LVS_REPORT,8000); m_wndOutList3.Create (m_wktab.GetSafeHwnd(),WS_CHILD | WS_VISIBLE | WS_VSCROLL | LVS_REPORT,9000); m_wndOutList1.SendMessage (LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES); m_wndOutList1.InsertColumn (0, _T("Description"), LVCFMT_LEFT, 200,0); m_wndOutList1.InsertColumn (1, _T("Line"), LVCFMT_LEFT, 100,0); m_wndOutList1.InsertItemText (0, _T("Could not open the temporary file c:\\temp\\example.exe")); m_wndOutList1.InsertItemText (0, 1, _T("23")); m_wndOutList2.SendMessage (LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES); m_wndOutList2.InsertColumn (0, _T("Description"), LVCFMT_LEFT, 400,0); m_wndOutList2.InsertItemText (0, _T("Project loaded c:\\temp\\example.exe")); m_wndOutList2.InsertItemText (0, _T("Project loaded Microsoft.windows.common-controls")); m_wndOutList2.InsertItemText (0, _T("Project loaded c:\\windows\\system32\\shlapi.dll")); m_wndOutList3.SendMessage (LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES); m_wndOutList3.InsertColumn (0, _T("Description"), LVCFMT_LEFT, 300,0); m_wndOutList3.InsertItemText (0, _T("Project loaded c:\\temp\\example.exe No sysmbols loaded")); m_wndOutList3.InsertItemText (0, _T("Project loaded PwcStudio [4260] Native has exit with code 0 (0x0)")); HWND hWndHeader = m_wndOutList1.GetDlgItem(0); m_h1.SubclassWnd(hWndHeader); hWndHeader = m_wndOutList2.GetDlgItem(0); m_h2.SubclassWnd(hWndHeader); hWndHeader = m_wndOutList3.GetDlgItem(0); m_h3.SubclassWnd(hWndHeader); m_wktab.Addtab (&m_wndOutList1, _T("Error List")); m_wktab.Addtab (&m_wndOutList2, _T("Command")); m_wktab.Addtab (&m_wndOutList3, _T("Output")); m_wktab.SetCaption(); SetWindowText(_T("Demo Worktab")); //------------------------------------------------------------- return TRUE; } virtual BOOL OnPaint(HDC hDC) { CRect rcClient; CPaintDC dc(GetSafeHwnd()); // device context for painting m_wktab.GetWindowRect(rcClient); ScreenToClient(rcClient); rcClient.InflateRect(1,1); rcClient.bottom+=1; dc.Draw3dRect(rcClient,GetSysColor(COLOR_BTNSHADOW),GetSysColor(COLOR_BTNSHADOW)); dc.DeleteDC(); return TRUE; } virtual void UpdatePanel() { CRect rc; GetClientRect(rc); rc.right-=2; rc.bottom-=3; rc.DeflateRect(1,1); m_wktab.SetWindowPos(NULL,rc,SWP_NOACTIVATE|SWP_NOZORDER); } }; class CResource : public CDockPanelBase { protected: CTreeViewCtrl m_TreeResource; CImageCtrl Image; public: CResource() { } ~CResource() { } protected: virtual BOOL OnCreate(LPCREATESTRUCT lpCreateStruct) { if (!m_TreeResource.Create(GetSafeHwnd(),WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS, 0x123456)) return -1; if(!Image.CreateColor(IDB_TREEEXPLORER)) return FALSE; m_TreeResource.SetImageList(Image.GetImageHandle(),TVSIL_NORMAL); PopulateTree(); return TRUE; } void PopulateTree() { HTREEITEM hRoot = m_TreeResource.InsertItem (_T("My Project"), 1, 1); HTREEITEM hAcc = m_TreeResource.InsertItem (_T("Accelerator"), 2, 3, hRoot); HTREEITEM hBit = m_TreeResource.InsertItem (_T("Bitmap"), 2, 3, hRoot); HTREEITEM hDial = m_TreeResource.InsertItem (_T("Dialog"), 2, 3, hRoot); HTREEITEM hIcon = m_TreeResource.InsertItem (_T("Icon"), 2, 3, hRoot); HTREEITEM hMenu = m_TreeResource.InsertItem (_T("Menu"), 2, 3, hRoot); m_TreeResource.InsertItem (_T("IDC_WINCLASS"), 8, 8, hAcc); m_TreeResource.InsertItem (_T("IDB_BUILD"), 7, 7, hBit); m_TreeResource.InsertItem (_T("IDB_EDITTOOLBAR"), 7, 7, hBit); m_TreeResource.InsertItem (_T("IDB_MAINTOOLBAR"), 7, 7, hBit); m_TreeResource.InsertItem (_T("IDD_ABOUTBOX"), 9, 9, hDial); m_TreeResource.InsertItem (_T("IDI_SMALL"), 10, 10, hIcon); m_TreeResource.InsertItem (_T("IDI_BASEMENU"), 11, 11, hMenu); m_TreeResource.InsertItem (_T("IDI_MENUHELLO"), 11, 11, hMenu); m_TreeResource.InsertItem (_T("IDI_MENUOPTION"), 11, 11, hMenu); m_TreeResource.Expand (hRoot, TVE_EXPAND); m_TreeResource.Expand (hAcc, TVE_EXPAND); m_TreeResource.Expand (hBit, TVE_EXPAND); m_TreeResource.Expand (hDial, TVE_EXPAND); m_TreeResource.Expand (hIcon, TVE_EXPAND); m_TreeResource.Expand (hMenu, TVE_EXPAND); } virtual BOOL OnPaint(HDC hDC) { CRect rcClient; CPaintDC dc(GetSafeHwnd()); // device context for painting m_TreeResource.GetWindowRect(rcClient); ScreenToClient(rcClient); rcClient.InflateRect(1,1); rcClient.bottom+=1; dc.Draw3dRect(rcClient,GetSysColor(COLOR_BTNSHADOW),GetSysColor(COLOR_BTNSHADOW)); dc.DeleteDC(); return TRUE; } virtual void UpdatePanel() { CRect rc; GetClientRect(rc); rc.right-=2; rc.bottom-=3; rc.DeflateRect(1,1); m_TreeResource.SetWindowPos(NULL,rc,SWP_NOACTIVATE|SWP_NOZORDER); } }; class CClassView : public CDockPanelBase { protected: CTreeViewCtrl m_TreeResource; CImageCtrl Image; public: CClassView() { } ~CClassView() { } protected: virtual BOOL OnCreate(LPCREATESTRUCT lpCreateStruct) { if (!m_TreeResource.Create(GetSafeHwnd(),WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS, 0x123456)) return -1; if(!Image.CreateColor(IDB_TREEEXPLORER)) return FALSE; m_TreeResource.SetImageList(Image.GetImageHandle(),TVSIL_NORMAL); PopulateTree(); return TRUE; } void PopulateTree() { HTREEITEM hRoot = m_TreeResource.InsertItem (_T("My Project"), 0, 0); m_TreeResource.InsertItem (_T("Global Functions and Variables"), 20, 20, hRoot); m_TreeResource.InsertItem (_T("Macros and Constantes"), 21, 21, hRoot); m_TreeResource.InsertItem (_T("CAbout"), 19, 19, hRoot); m_TreeResource.InsertItem (_T("CAppMain"), 19, 19, hRoot); m_TreeResource.InsertItem (_T("CClassView"), 19, 19, hRoot); m_TreeResource.InsertItem (_T("CExplorer"),19, 19, hRoot); m_TreeResource.InsertItem (_T("COutputList"), 19, 19, hRoot); m_TreeResource.InsertItem (_T("CResourcce"), 19, 19, hRoot); m_TreeResource.Expand (hRoot, TVE_EXPAND); } virtual BOOL OnPaint(HDC hDC) { CRect rcClient; CPaintDC dc(GetSafeHwnd()); // device context for painting m_TreeResource.GetWindowRect(rcClient); ScreenToClient(rcClient); rcClient.InflateRect(1,1); rcClient.bottom+=1; dc.Draw3dRect(rcClient,GetSysColor(COLOR_BTNSHADOW),GetSysColor(COLOR_BTNSHADOW)); dc.DeleteDC(); return TRUE; } virtual void UpdatePanel() { CRect rc; GetClientRect(rc); rc.right-=2; rc.bottom-=3; rc.DeflateRect(1,1); m_TreeResource.SetWindowPos(NULL,rc,SWP_NOACTIVATE|SWP_NOZORDER); } };
[ "xushiweizh@86f14454-5125-0410-a45d-e989635d7e98" ]
xushiweizh@86f14454-5125-0410-a45d-e989635d7e98
428854c4eae1e681e0e2a65024827e6117a4133b
634ed8963490fefa000bcbb48cd348cd46c79aab
/Backup/Super2048/Joueur.h
5b054e37026282722b5bd5045381211779bb1ae4
[]
no_license
Nicor20/Projet-S2-P11
67027417e8d4b9a32788490bd264927f3827fe21
93da60452e93e283a97e98348a48c6b302811e8b
refs/heads/master
2023-04-06T03:36:30.152684
2021-04-20T16:50:05
2021-04-20T16:50:05
340,114,613
2
1
null
2021-04-05T17:46:20
2021-02-18T16:46:47
C++
ISO-8859-1
C++
false
false
227
h
#define JOUEUR_H #ifdef JOUEUR_H #include <QGraphicsRectItem> #include <QKeyEvent> class joueur : public QGraphicsRectItem { public: void keyPressEvent(QKeyEvent* event); //gère les contrôles du joueur }; #endif JOUEUR_H
[ "brow2801@usherbrooke.ca" ]
brow2801@usherbrooke.ca
de339de7bc4b92124b86c2806de7aad99bf2c759
5c20e2238bf727a91c3430cd4ecbc56c98b0e50e
/Qt/Visualizador/linked_list.h
50f7024f501d00f60a19baca2e40764c8f5c7dfb
[]
no_license
Jordy753/Lp-2-Jord
10b2e73d0e2c1193cee1eb4b820ca71bcb9149a1
ac29a7acf5caa67891a4a9b138f2896d1d18ab5c
refs/heads/master
2020-05-09T14:53:02.775459
2019-07-10T09:05:04
2019-07-10T09:05:04
181,212,153
0
1
null
null
null
null
UTF-8
C++
false
false
3,814
h
#ifndef LINKED_LIST_H #define LINKED_LIST_H #include<iostream> #include"image.h" #include<direct.h> #include <QDebug> using namespace std; template<class T> class linked_list{ public: struct node{ T date; node* p_next; node* p_prev; node(const T &d,node* n=NULL,node* m=NULL){ date=d; p_next=n; p_prev=m; } }; private: node* p_head; node* p_end; public: node* n; linked_list():p_head(NULL),p_end(NULL),n(NULL){} ~linked_list(){ while(p_head){ remove_front(); } } void push_front(T&d){ node* p_aux=p_head; p_head=new node(d,p_head,NULL); if(p_aux==NULL){ p_end=p_head; //cuando inicie con push_front n=p_head; } else if(p_aux->p_prev==NULL){ p_aux->p_prev=p_head; } n=p_head; } void push_back(const T &d){ qDebug()<<"1"; node* p_aux=p_end; qDebug()<<"2"; p_end=new node(d,NULL,p_end); qDebug()<<"3"; if(p_aux==NULL){ p_head=p_end; //cuando inicie con push_back qDebug()<<"4"; n=p_end; } else if(p_aux->p_next==NULL){ qDebug()<<"4.2"; p_aux->p_next=p_end; } qDebug()<<"5"; n=p_head; } void remove_front(){ if(!p_head) return; node* del=p_head; /*if(del->date==sizeof(Image)){ //ponemos }*/ p_head=p_head->p_next; delete del; } class iterator{ private: node* m; public: iterator(node* _m=NULL){ m=_m; } ~iterator(){} T& operator*(){ //contenido return m->date; } node*& nod(){ return m; } iterator& operator ++(){ //siguiente m=m->p_next; return *this; } bool operator !=(const iterator& it){ return m!=it.m; } }; void remove(int posic){ int j=posic-2; int i=0; linked_list<string>::iterator it; node* p_aux; node* del; node* m=p_head; while(i!=posic){ if(i==j){ p_aux=m; } if(i==j+1){ del=m; } m=m->p_next; i++; } p_aux->p_next=m; m->p_prev=p_aux; delete del; } iterator now(){ return iterator(n); } iterator begin(){ return iterator(p_head); } iterator ult(){ return iterator(p_end); } iterator end(){ return iterator(NULL); } iterator position(string a){ if(a=="next"){ n=n->p_next; if(n==NULL){ n=p_head; } } else if(a=="prev"){ n=n->p_prev; if(n==NULL){ n=p_end; } } return iterator(n); } }; #endif // LINKED_LIST_H
[ "yjor753@hotmail.com" ]
yjor753@hotmail.com
f8708487910a58f46a65130d32f3a52143752317
7f7ebd4118d60a08e4988f95a846d6f1c5fd8eda
/wxWidgets-2.9.1/include/wx/dfb/cursor.h
948e1cf74c33ae1d9a942b26db9421192c41a158
[]
no_license
esrrhs/fuck-music-player
58656fc49d5d3ea6c34459630c42072bceac9570
97f5c541a8295644837ad864f4f47419fce91e5d
refs/heads/master
2021-05-16T02:34:59.827709
2021-05-10T09:48:22
2021-05-10T09:48:22
39,882,495
2
0
null
null
null
null
UTF-8
C++
false
false
1,440
h
///////////////////////////////////////////////////////////////////////////// // Name: wx/dfb/cursor.h // Purpose: wxCursor declaration // Author: Vaclav Slavik // Created: 2006-08-08 // RCS-ID: $Id$ // Copyright: (c) 2006 REA Elektronik GmbH // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_DFB_CURSOR_H_ #define _WX_DFB_CURSOR_H_ #include "wx/gdiobj.h" #include "wx/gdicmn.h" class WXDLLIMPEXP_FWD_CORE wxBitmap; //----------------------------------------------------------------------------- // wxCursor //----------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject { public: wxCursor() {} wxCursor(wxStockCursor id) { InitFromStock(id); } #if WXWIN_COMPATIBILITY_2_8 wxCursor(int id) { InitFromStock((wxStockCursor)id); } #endif wxCursor(const wxString& name, wxBitmapType type = wxCURSOR_DEFAULT_TYPE, int hotSpotX = 0, int hotSpotY = 0); // implementation wxBitmap GetBitmap() const; protected: void InitFromStock(wxStockCursor); // ref counting code virtual wxGDIRefData *CreateGDIRefData() const; virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; DECLARE_DYNAMIC_CLASS(wxCursor) }; #endif // _WX_DFB_CURSOR_H_
[ "esrrhs@esrrhs-PC" ]
esrrhs@esrrhs-PC
a49d3e2d771834d98bb2f4353b588eb544947d2e
e5fd9a9762d1e92251c4f0b9d7c0bcf8e2762469
/lovely/inc/Spectrogram.h
e43a1503f516ab3c1b0461d0fd7b4bc87951a25a
[ "MIT" ]
permissive
gui-works/LovelyGUI-SDL-Educational
87c2e064246d81884e18d191dc91aa48debffd1a
effa96664a7396b2ab90f0e6893f95865cf967a3
refs/heads/master
2020-09-20T16:03:06.008469
2019-08-13T05:03:41
2019-08-13T05:03:41
null
0
0
null
null
null
null
UTF-8
C++
false
false
615
h
#ifndef LOVELY_GUI_SPECTROGRAM #define LOVELY_GUI_SPECTROGRAM #include "Application.h" #include "Widget.h" #include "Texture.h" namespace LovelyGUI { /* Waterfall Image */ class Spectrogram : public Widget { public: Spectrogram(Object* parent=nullptr); virtual ~Spectrogram(); virtual void setWidth(int width) override; virtual void setHeight(int height) override; virtual void pushLine(const std::vector<SDL_Color>& line); protected: virtual void paintEvent(Renderer* renderer) override; private: Texture _texture; void adjustTexture(); }; }; // namespace LovelyGUI #endif
[ "hubenchang0515@outlook.com" ]
hubenchang0515@outlook.com
a58df09fc89c6245f604d8e8c92f90336daa1a12
541a91ed5ab896d0053c88bc78c0dc2bc318a8fc
/Laberinto.cpp
1d1f5ac2f539693d0e8fac439db2e1499f71ea27
[]
no_license
fabr0d/ipoo
0535e7cf0729d6ab68bbb8b63375d6cdd4f4ec80
48411662205594b2e77ec2063bf539c641a171f6
refs/heads/master
2021-05-29T17:17:51.487994
2015-10-29T03:07:46
2015-10-29T03:07:46
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,689
cpp
#include <iostream> #include <cstdlib> #include <time.h> #include <conio.h> #define FIL 20 #define COL 50 using namespace std; int destinox, puntox, puntoy; char lab[FIL][COL]; void Menu(); void Inicializar(); void Imprimir(); void GenerarCamino(int i, int j); void GenerarParedes(); void FinGenerar(); void Jugar(int tecla); using namespace std; int main(int argc, char** argv){ cout<<""<<endl; cout<<", . . "<<endl; cout<<") ,-. |-. ,-. ,-. . ,-. |- ,-."<<endl; cout<<"/ ,-| | | |-' | | | | | | | "<<endl; cout<<"`--'`-^ ^-' `-' ' ' ' ' `' `-'"<<endl; srand(unsigned(time(NULL))); Menu(); int x=1+rand()%FIL-2; GenerarCamino(x, 1); lab[x][1]='I'; GenerarParedes(); FinGenerar(); Imprimir(); int tecla; puntox=x; puntoy=1; while(true){ tecla=getch(); if(tecla==27){ break; } else{ Jugar(tecla); if(lab[puntox][puntoy+1]=='F'){ cout<<""<<endl; cout<<"GANASTE!"<<endl; break; } } } int menu; cout<<"Presiona 1 para regresar al Menu Principal: "; cin>>menu; system("cls"); if (menu==1) { Menu(); } } void Menu(){ int selec; cout<<""<<endl; cout<<"1. Jugar"<<endl; cout<<"2. Instrucciones"<<endl; cout<<"3. Creditos"<<endl; cout<<"4. Salir"<<endl; cout<<""<<endl; cout<<"Seleccione una opcion: "; cin>>selec; system("cls"); if (selec==1) { Inicializar(); } if (selec==2) { cout<<""<<endl; cout<<",-_/ . "<<endl; cout<<"' | ,-. ,-. |- ,-. . . ,-. ,-. . ,-. ,-. ,-. ,-."<<endl; cout<<".^ | | | `-. | | | | | | | | | | | |-' `-."<<endl; cout<<"`--' ' ' `-' `' ' `-^ `-' `-' ' `-' ' ' `-' `-'"<<endl; cout<<""<<endl; cout<<"Usa las Teclas Direccionales (Arriba, Abajo, Izquierda y Derecha) para moverte por el tablero."<<endl; cout<<"Objetivo: De Inicio (I) debes llegar al Final (F)."<<endl; cout<<""<<endl; int menu; cout<<"Presiona 1 para regresar al Menu Principal: "; cin>>menu; system("cls"); if (menu==1) { Menu(); } } if (selec==3) { cout<<""<<endl; cout<<",--. . . "<<endl; cout<<"| `-' ,-. ,-. ,-| . |- ,-. ,-."<<endl; cout<<"| . | |-' | | | | | | `-."<<endl; cout<<"`--' ' `-' `-^ ' `' `-' `-'"<<endl; cout<<""<<endl; cout<<"Juego desarrollado por:"<<endl; cout<<"* Rodrigo Jesus Ali Guevara."<<endl; cout<<"* Giancarlo Andre Anco Valdivia."<<endl; cout<<"* Fabrizio Rodrigo Flores Pari."<<endl; cout<<""<<endl; int menu; cout<<"Presiona 1 para regresar al Menu Principal: "; cin>>menu; system("cls"); if (menu==1) { Menu(); } } if (selec==4) { exit(0); } } void Inicializar(){ for(int i=0; i<FIL; i++){ for(int j=0; j<COL; j++){ if(i==0 || j==0 || i==FIL-1 || j==COL-1){ lab[i][j]='P'; } else{ lab[i][j]=' '; } } } } void Imprimir(){ for(int i=0; i<FIL; i++){ for(int j=0; j<COL; j++){ if(lab[i][j]=='0' || lab[i][j]=='P'){ cout<<(char)177; } else{ cout<<lab[i][j]; } } cout<<endl; } } void GenerarCamino(int i, int j){ while(j!=COL-2){ int a=rand()%3; switch(a){ case 0: if(i+1!=FIL-1 && lab[i+1][j]!='O'){ i++; lab[i][j]='O'; } break; case 1: if(i-1!=0 && lab[i-1][j]!='O'){ i--; lab[i][j]='O'; } break; case 2: if(j+1!=COL-1 && lab[i][j+1]!='O'){ j++; lab[i][j]='O'; if(j==COL-2) lab[i][j]='F'; } break; } } destinox=i; } void GenerarParedes(){ int paredes=0; while(paredes<100){ int x=rand()%FIL; int y=rand()%COL; if(lab[x][y]==' '){ paredes++; int lim=1+rand()%10; int puestas=0; switch(rand()%4){ case 0: while(lab[x][y]==' '){ if(puestas==lim){ break; } puestas++; lab[x][y]='P'; x--; } break; case 1: while(lab[x][y]==' '){ if(puestas==lim){ break; } puestas++; lab[x][y]='P'; x++; } break; case 2: while(lab[x][y]==' '){ if(puestas==lim){ break; } puestas++; lab[x][y]='P'; y--; } break; case 3: while(lab[x][y]==' '){ if(puestas==lim){ break; } puestas++; lab[x][y]='P'; y++; } break; } } } } void FinGenerar(){ for(int i=0; i<FIL; i++){ for(int j=0; j<COL-1; j++){ if(lab[i][j]=='O'){ lab[i][j]=' '; } if(j==COL-2 && lab[i][j]!='F'){ lab[i][j]='P'; } if(lab[i][j]=='F'){ lab[i][j+1]='F'; lab[i][j]=' '; } } } } void Jugar(int tecla){ switch(tecla){ case 72: if(lab[puntox-1][puntoy]==' '){ system("cls"); lab[puntox-1][puntoy]='.'; puntox--; Imprimir(); } else if(lab[puntox-1][puntoy]=='.' || lab[puntox-1][puntoy]=='I'){ system("cls"); lab[puntox][puntoy]=' '; puntox--; Imprimir(); } break; case 80: if(lab[puntox+1][puntoy]=='.' || lab[puntox+1][puntoy]=='I'){ system("cls"); lab[puntox][puntoy]=' '; puntox++; Imprimir(); } else if(lab[puntox+1][puntoy]==' '){ system("cls"); lab[puntox+1][puntoy]='.'; puntox++; Imprimir(); } break; case 75: if(lab[puntox][puntoy-1]==' '){ system("cls"); lab[puntox][puntoy-1]='.'; puntoy--; Imprimir(); } else if(lab[puntox][puntoy-1]=='.' || lab[puntox][puntoy-1]=='I'){ system("cls"); lab[puntox][puntoy]=' '; puntoy--; Imprimir(); } break; case 77: if(lab[puntox][puntoy+1]=='.' || lab[puntox][puntoy+1]=='I'){ system("cls"); lab[puntox][puntoy]=' '; puntoy++; Imprimir(); } else if(lab[puntox][puntoy+1]==' '){ system("cls"); lab[puntox][puntoy+1]='.'; puntoy++; Imprimir(); } break; } }
[ "fabrizio.flores@ucsp.edu.pe" ]
fabrizio.flores@ucsp.edu.pe
09cc53ec905021a8b67c134527c313618e89e55b
1a5a3b9f8675000cf94b1a6797a909e1a0fcc40e
/src/client/src/Util/SystemInfo.h
b9bcb56baa0c21596ceaecd92412b8465daf9d19
[]
no_license
Davidixx/client
f57e0d82b4aeec75394b453aa4300e3dd022d5d7
4c0c1c0106c081ba9e0306c14607765372d6779c
refs/heads/main
2023-07-29T19:10:20.011837
2021-08-11T20:40:39
2021-08-11T20:40:39
403,916,993
0
0
null
2021-09-07T09:21:40
2021-09-07T09:21:39
null
UHC
C++
false
false
954
h
#ifndef _SYSTEM_INFO_ #define _SYSTEM_INFO_ enum enumWINDOWS_VERSION { WINDOWS_98 = 0, WINDOWS_NT, WINDOWS_ME, WINDOWS_2000, }; //---------------------------------------------------------------------------------------------------- /// class CSystemInfo /// 유즈 시스템의 정보 관리 //---------------------------------------------------------------------------------------------------- class CSystemInfo { private: char m_szLanguageBuffer[64]; char m_szWindowsFolder[1024]; OSVERSIONINFO m_OSVerInfo; int m_iWindowsVersion; public: CSystemInfo(void ); ~CSystemInfo(void); void CollectingSystemInfo(); int GetWindowsVersion() { return m_iWindowsVersion; } const char* GetLanguage() { return m_szLanguageBuffer; } const char* GetWindowsFolder() { return m_szWindowsFolder; } }; extern class CSystemInfo g_SystemInfo; #endif //_SYSTEM_INFO_
[ "ralphminderhoud@gmail.com" ]
ralphminderhoud@gmail.com
a3dc65f7774533b674e6c441faed181ea14746eb
6e85deabed81af4024a5b0764fc5071232824271
/game2d-dev-library/Collision/collisionHelper.cpp
c4f74b081f5adeb2d3536ebc9f6e3f5ed84fdf46
[]
no_license
datnt908/game2d-directx-framework
84ca8910809a5965d2861f0187055849e9763e6f
a97e27a12b42a4b2456b69dcd0a47071f18b056e
refs/heads/master
2020-12-07T00:58:19.704374
2020-01-08T15:37:44
2020-01-08T15:37:44
232,596,078
0
0
null
null
null
null
UTF-8
C++
false
false
3,840
cpp
#include "collisionHelper.h" MovementBox::MovementBox() { dtPosition = Vector2(0.f, 0.f); position = Vector2(0.f, 0.f); size = Vector2(0.f, 0.f); } BNDBOX MovementBox::getBndBox() { BNDBOX result; if (dtPosition.x >= 0) { result.position.x = position.x; result.size.x = dtPosition.x + size.x; } else { result.position.x = position.x + dtPosition.x; result.size.x = size.x - dtPosition.x; } if (dtPosition.y >= 0) { result.position.y = position.y; result.size.y = dtPosition.y + size.y; } else { result.position.y = position.y + dtPosition.y; result.size.y = size.y - dtPosition.y; } return result; } CollisionEvent::CollisionEvent() { colliTime = 0.f; gameObj = NULL; normal = Vector2(0, 0); } // Tính toán va chạm có vận tốc // Mô tả kết quả trả về: // normal == (0,0) và return == 1.f thì không có va chạm // normal == (0,0) và return == 0.f thì overlap từ đầu // normal != (0,0) thì có va chạm trong khoản thời gian return float sweptAABB(MOVEBOX mObj, MOVEBOX sObj, Vector2 & normal) { normal = Vector2(0, 0); BNDBOX bpb_mO = mObj.getBndBox(); BNDBOX bpb_sO = sObj.getBndBox(); /// 2 vùng ảnh hưởng không overlap thì không có va chạm if (!checkAABB_Box(bpb_mO, bpb_sO)) return 1.0f; /// Nếu cả 2 k chuyển động tức vùng ảnh hưởng là vùng vật => overlap if (mObj.dtPosition == Vector2(0, 0) && sObj.dtPosition == Vector2(0, 0)) return 0.f; /// Chuyển vận tốc về cho 1 đối tượng - tính tương đối vận tốc mObj.dtPosition -= sObj.dtPosition; sObj.dtPosition = Vector2(0, 0); /// Tính toán khoảng cách 2 mặt xa và 2 mặt gân theo từng chiều x, y Vector2 InvEntry(0, 0); Vector2 InvExit(0, 0); if (mObj.dtPosition.x > 0) { InvEntry.x = sObj.position.x - (mObj.position.x + mObj.size.x); InvExit.x = (sObj.position.x + sObj.size.x) - mObj.position.x; } else if (mObj.dtPosition.x < 0) { InvEntry.x = (sObj.position.x + sObj.size.x) - mObj.position.x; InvExit.x = sObj.position.x - (mObj.position.x + mObj.size.x); } if (mObj.dtPosition.y > 0) { InvEntry.y = sObj.position.y - (mObj.position.y + mObj.size.y); InvExit.y = (sObj.position.y + sObj.size.y) - mObj.position.y; } else if (mObj.dtPosition.y < 0) { InvEntry.y = (sObj.position.y + sObj.size.y) - mObj.position.y; InvExit.y = sObj.position.y - (mObj.position.y + mObj.size.y); } /// Tính toán thời gian bắt đầu(Entry) và kết thúc(Exit) va chạm theo từng chiều x, y Vector2 EntryT(0, 0); Vector2 ExitT(0, 0); if (mObj.dtPosition.x == 0) { EntryT.x = -std::numeric_limits<float>::infinity(); ExitT.x = std::numeric_limits<float>::infinity(); } else { EntryT.x = InvEntry.x / mObj.dtPosition.x; ExitT.x = InvExit.x / mObj.dtPosition.x; } if (mObj.dtPosition.y == 0) { EntryT.y = -std::numeric_limits<float>::infinity(); ExitT.y = std::numeric_limits<float>::infinity(); } else { EntryT.y = InvEntry.y / mObj.dtPosition.y; ExitT.y = InvExit.y / mObj.dtPosition.y; } float entryTime = max(EntryT.x, EntryT.y); float exitTime = min(ExitT.x, ExitT.y); if (entryTime > exitTime || EntryT.x > 1.0f || EntryT.y > 1.0f) return 1.0f; /// Trường hợp overlap ngay từ đầu if (entryTime < 0.0f) { /// Nếu chuyển động ra xa nhau thì xem như không overlap if (ExitT.x > abs(EntryT.x) || ExitT.y > abs(EntryT.y)) return 0.f; else return 1.f; } /// Tính toán vector phản hồi va chạm if (EntryT.x > EntryT.y) normal.x = mObj.dtPosition.x < 0.0f ? 1.0f : -1.0f; else if (EntryT.x == EntryT.y) { normal.x = mObj.dtPosition.x < 0.0f ? 1.0f : -1.0f; normal.y = mObj.dtPosition.y < 0.0f ? 1.0f : -1.0f; } else normal.y = mObj.dtPosition.y < 0.0f ? 1.0f : -1.0f; return entryTime; }
[ "34731364+NguyenTienDat150699@users.noreply.github.com" ]
34731364+NguyenTienDat150699@users.noreply.github.com
e4c159fc99f72a645a8a788d90055872bd097d8d
afa7a9d880345ac7d55ba1c1111a1fa01a9e5e9d
/ACcode/Codeforces/contest1213F.cpp
109cf268cbac8d4089151fbe7b83fe168d612ec0
[]
no_license
Sanzo00/ACM
a67bd40a75f14f58eed2b0af520a6a67487c609b
cdc05e9d5daa26c76bbb7448c8c61d2ab2a059d5
refs/heads/master
2022-01-11T10:01:31.787847
2019-12-20T05:08:20
2019-12-20T05:08:20
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,076
cpp
#include <bits/stdc++.h> #define endl '\n' const int maxn = 2e5 + 5; const int inf = 0x3f3f3f3f; const int mod = 1e9 + 7; using namespace std; int a[maxn], b[maxn]; vector<int> g[maxn], g2[maxn]; int dfn[maxn], low[maxn], Stack[maxn], inStack[maxn], belong[maxn], in[maxn], ts, cnt, len; int mp[maxn]; void init(int n) { for (int i = 0; i <= n; ++i) g[i].clear(); for (int i = 0; i <= n; ++i) g2[i].clear(); ts = cnt = len = 0; fill(dfn, dfn+n+1, 0); fill(in, in+n+1, 0); fill(mp, mp+n+1, -1); fill(inStack, inStack+n+1, 0); } void tarjan(int u) { dfn[u] = low[u] = ++ts; inStack[u] = 1; Stack[len++] = u; for (int i = 0; i < (int)g[u].size(); ++i) { int v = g[u][i]; if (!dfn[v]) { tarjan(v); low[u] = min(low[u], low[v]); }else if (inStack[v]) low[u] = min(low[u], dfn[v]); } if (dfn[u] == low[u]) { cnt++; while (1) { int top = Stack[--len]; belong[top] = cnt; inStack[top] = 0; if (top == u) break; } } } int main() { ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); int n, m; scanf("%d %d", &n, &m); init(n); for (int i = 0; i < n; ++i) { scanf("%d", &a[i]); if (i) g[a[i-1]].push_back(a[i]); } for (int i = 0; i < n; ++i) { scanf("%d", &b[i]); if (i) g[b[i-1]].push_back(b[i]); } for (int i = 1; i <= n; ++i) { if (dfn[i]) continue; tarjan(i); } for (int i = 1; i <= n; ++i) { for (int j = 0; j < (int)g[i].size(); ++j) { int v = g[i][j]; if (belong[i] == belong[v]) continue; in[belong[v]]++; g2[belong[i]].push_back(belong[v]); } } if (m > cnt) puts("NO"); else { puts("YES"); queue<int> que; for (int i = 1; i <= cnt; ++i) { if (in[i] == 0) que.push(i); } char c = 'a' - 1; while (!que.empty() && m--) { int u = que.front(); que.pop(); mp[u] = ++c; for (int i = 0; i < (int)g2[u].size(); ++i) { int v = g2[u][i]; if (--in[v] == 0) que.push(v); } } if (c < 'a') c = 'a'; for (int i = 1; i <= cnt; ++i) { if (mp[i] == -1) mp[i] = c; } for (int i = 1; i <= n; ++i) { printf("%c", mp[belong[i]]); } puts(""); } return 0; }
[ "2102370669@qq.com" ]
2102370669@qq.com
9100b5c05cd8e15185152ccb0f2a70d345e0dfca
b1300a08e9450172a85de8aa492d198711397325
/D2DTutorial5/D2DTutorial5.h
3ede6a4ced160ba9831e097e4a13ff53b747c997
[]
no_license
tomnoiprasit/D2DTutorial5
0bf1627f13ff9b205313ed265b4de8cf2eedce5d
0d21694647c9721a925118ef1fc8cf84c0d4683f
refs/heads/master
2021-01-19T00:14:38.261282
2014-08-10T06:56:26
2014-08-10T06:56:26
null
0
0
null
null
null
null
UTF-8
C++
false
false
941
h
#pragma once #include "resource.h" ID2D1Factory * pD2DFactory = NULL; ID2D1HwndRenderTarget* pD2DHRT = NULL; IWICImagingFactory* pWICImagingFactory = NULL; IWICBitmapDecoder* pWICBitmapDecoder = NULL; IWICFormatConverter* pWICFormatConverter = NULL; IWICBitmapFrameDecode* pWICBitmapFrameDecode = NULL; ID2D1Bitmap* pD2DBitMap = NULL; HRESULT hr; template<class Interface> inline void SafeRelease( Interface ** ); void Setup(HWND); void ReleaseThemAll(); void DrawMe(HWND); void SetHeroFrameSource(int, float&, float&, float&, float&); #define PIXELS_PER_STEP 20 // 1000 / 30 = 33.3333 so, it's around 30fps #define FRAME_RATE 33.3333 #define HERO_WIDTH 120 #define HERO_HEIGHT 120 #define APP_WIDTH 1024 #define APP_HEIGHT 768 DWORD dwCurrentTime{ 0 }; DWORD dwLastUpdateTime{ 0 }; DWORD dwElapsedTime{ 0 }; float globalX{ 0.0f }; float globalY{ 0.0f }; int frameNumber{ 0 }; float srcX1{ 0 }, srcY1{ 0 }, srcX2{ 0 }, srcY2{ 0 };
[ "tom.noiprasit@gmail.com" ]
tom.noiprasit@gmail.com
65e8cd18b029ff65e3e41abb463a99d137529f44
823ccb5ef6a81f5a40a7ed6d7147073400d7ff4e
/test/CXX/drs/dr13xx.cpp
3bfbfd6ecf2d6f48be21b78e0d961394705ad3cb
[ "NCSA" ]
permissive
asutton/old-clang-reflect
bea7293d1210a4f922ccc41aa1ba34197c565378
809700d7536ce7ade46cc900fbf096e53bb36de4
refs/heads/master
2021-06-11T01:27:28.542983
2017-02-20T13:34:09
2017-02-20T13:34:09
76,270,232
1
0
null
null
null
null
UTF-8
C++
false
false
5,928
cpp
// RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors // RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors // RUN: %clang_cc1 -std=c++14 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors // RUN: %clang_cc1 -std=c++1z %s -verify -fexceptions -fcxx-exceptions -pedantic-errors namespace dr1330 { // dr1330: 4.0 c++11 // exception-specifications are parsed in a context where the class is complete. struct A { void f() throw(T) {} // expected-error 0-1{{C++1z}} expected-note 0-1{{noexcept}} struct T {}; #if __cplusplus >= 201103L void g() noexcept(&a == b) {} static int a; static constexpr int *b = &a; #endif }; void (A::*af1)() throw(A::T) = &A::f; // expected-error 0-1{{C++1z}} expected-note 0-1{{noexcept}} void (A::*af2)() throw() = &A::f; // expected-error-re {{{{not superset|different exception spec}}}} #if __cplusplus >= 201103L static_assert(noexcept(A().g()), ""); #endif // Likewise, they're instantiated separately from an enclosing class template. template<typename U> struct B { void f() throw(T, typename U::type) {} // expected-error 0-1{{C++1z}} expected-note 0-1{{noexcept}} struct T {}; #if __cplusplus >= 201103L void g() noexcept(&a == b && U::value) {} static int a; static constexpr int *b = &a; #endif }; B<int> bi; // ok struct P { typedef int type; static const int value = true; }; void (B<P>::*bpf1)() throw(B<P>::T, int) = &B<P>::f; // expected-error 0-1{{C++1z}} expected-note 0-1{{noexcept}} #if __cplusplus < 201103L // expected-error@-2 {{not superset}} // FIXME: We only delay instantiation in C++11 onwards. In C++98, something // weird happens: instantiation of B<P> fails because it references T before // it's instantiated, but the diagnostic is suppressed in // Sema::FindInstantiatedDecl because we've already hit an error. This is // obviously a bad way to react to this situation; we should still producing // the "T has not yet been instantiated" error here, rather than giving // confusing errors later on. #endif void (B<P>::*bpf2)() throw(int) = &B<P>::f; // expected-error 0-1{{C++1z}} expected-note 0-1{{noexcept}} #if __cplusplus <= 201402L // expected-error@-2 {{not superset}} #else // expected-warning@-4 {{not superset}} #endif void (B<P>::*bpf3)() = &B<P>::f; void (B<P>::*bpf4)() throw() = &B<P>::f; #if __cplusplus <= 201402L // expected-error@-2 {{not superset}} #else // expected-error@-4 {{different exception specifications}} #endif #if __cplusplus >= 201103L static_assert(noexcept(B<P>().g()), ""); struct Q { static const int value = false; }; static_assert(!noexcept(B<Q>().g()), ""); #endif template<typename T> int f() throw(typename T::error) { return 0; } // expected-error 1-4{{prior to '::'}} expected-note 0-1{{instantiation of}} #if __cplusplus > 201402L // expected-error@-2 0-1{{C++1z}} expected-note@-2 0-1{{noexcept}} #endif // An exception-specification is needed even if the function is only used in // an unevaluated operand. int f1 = sizeof(f<int>()); // expected-note {{instantiation of}} #if __cplusplus >= 201103L decltype(f<char>()) f2; // expected-note {{instantiation of}} bool f3 = noexcept(f<float>()); // expected-note {{instantiation of}} #endif template int f<short>(); // expected-note {{instantiation of}} template<typename T> struct C { C() throw(typename T::type); // expected-error 1-2{{prior to '::'}} #if __cplusplus > 201402L // expected-error@-2 0-1{{C++1z}} expected-note@-2 0-1{{noexcept}} #endif }; struct D : C<void> {}; // ok #if __cplusplus < 201103L // expected-note@-2 {{instantiation of}} #endif void f(D &d) { d = d; } // ok // FIXME: In C++11 onwards, we should also note the declaration of 'e' as the // line that triggers the use of E::E()'s exception specification. struct E : C<int> {}; // expected-note {{in instantiation of}} E e; } namespace dr1346 { // dr1346: 3.5 auto a(1); // expected-error 0-1{{extension}} auto b(1, 2); // expected-error {{multiple expressions}} expected-error 0-1{{extension}} #if __cplusplus >= 201103L auto c({}); // expected-error {{parenthesized initializer list}} auto d({1}); // expected-error {{parenthesized initializer list}} auto e({1, 2}); // expected-error {{parenthesized initializer list}} #endif template<typename...Ts> void f(Ts ...ts) { // expected-error 0-1{{extension}} auto x(ts...); // expected-error {{empty}} expected-error 0-1{{extension}} } template void f(); // expected-note {{instantiation}} #if __cplusplus >= 201103L void init_capture() { [a(1)] {} (); // expected-error 0-1{{extension}} [b(1, 2)] {} (); // expected-error {{multiple expressions}} expected-error 0-1{{extension}} #if __cplusplus >= 201103L [c({})] {} (); // expected-error {{parenthesized initializer list}} expected-error 0-1{{extension}} [d({1})] {} (); // expected-error {{parenthesized initializer list}} expected-error 0-1{{extension}} [e({1, 2})] {} (); // expected-error {{parenthesized initializer list}} expected-error 0-1{{extension}} #endif } #endif } namespace dr1359 { // dr1359: 3.5 #if __cplusplus >= 201103L union A { constexpr A() = default; }; union B { constexpr B() = default; int a; }; // expected-error {{not constexpr}} expected-note 2{{candidate}} union C { constexpr C() = default; int a, b; }; // expected-error {{not constexpr}} expected-note 2{{candidate}} struct X { constexpr X() = default; union {}; }; struct Y { constexpr Y() = default; union { int a; }; }; // expected-error {{not constexpr}} expected-note 2{{candidate}} constexpr A a = A(); constexpr B b = B(); // expected-error {{no matching}} constexpr C c = C(); // expected-error {{no matching}} constexpr X x = X(); constexpr Y y = Y(); // expected-error {{no matching}} #endif }
[ "richard-llvm@metafoo.co.uk" ]
richard-llvm@metafoo.co.uk
90fd2837becb43f17c3911a60578a030af96d3e7
2372a753ad611c22053b6bbf2c277cefb3322168
/src/baseline/mips64/baseline-assembler-mips64-inl.h
69c70d961e8bf3fa29ff03d57671eaad944794d7
[ "BSD-3-Clause", "SunPro", "Apache-2.0" ]
permissive
MilesMa-Dev/v8
52d6f22afe2950925cec432f94c25f3523a8c045
d42ae8021a0c6263af038809584924f9fa67b044
refs/heads/master
2023-06-07T18:37:58.594182
2021-07-06T03:17:20
2021-07-06T03:58:32
null
0
0
null
null
null
null
UTF-8
C++
false
false
18,382
h
// Copyright 2021 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef V8_BASELINE_MIPS64_BASELINE_ASSEMBLER_MIPS64_INL_H_ #define V8_BASELINE_MIPS64_BASELINE_ASSEMBLER_MIPS64_INL_H_ #include "src/baseline/baseline-assembler.h" #include "src/codegen/interface-descriptors.h" #include "src/codegen/mips64/assembler-mips64-inl.h" namespace v8 { namespace internal { namespace baseline { class BaselineAssembler::ScratchRegisterScope { public: explicit ScratchRegisterScope(BaselineAssembler* assembler) : assembler_(assembler), prev_scope_(assembler->scratch_register_scope_), wrapped_scope_(assembler->masm()) { if (!assembler_->scratch_register_scope_) { // If we haven't opened a scratch scope yet, for the first one add a // couple of extra registers. wrapped_scope_.Include(t0.bit() | t1.bit() | t2.bit() | t3.bit()); } assembler_->scratch_register_scope_ = this; } ~ScratchRegisterScope() { assembler_->scratch_register_scope_ = prev_scope_; } Register AcquireScratch() { return wrapped_scope_.Acquire(); } private: BaselineAssembler* assembler_; ScratchRegisterScope* prev_scope_; UseScratchRegisterScope wrapped_scope_; }; enum class Condition : uint32_t { kEqual = eq, kNotEqual = ne, kLessThan = lt, kGreaterThan = gt, kLessThanEqual = le, kGreaterThanEqual = ge, kUnsignedLessThan = Uless, kUnsignedGreaterThan = Ugreater, kUnsignedLessThanEqual = Uless_equal, kUnsignedGreaterThanEqual = Ugreater_equal, kOverflow = overflow, kNoOverflow = no_overflow, kZero = eq, kNotZero = ne, }; inline internal::Condition AsMasmCondition(Condition cond) { STATIC_ASSERT(sizeof(internal::Condition) == sizeof(Condition)); return static_cast<internal::Condition>(cond); } namespace detail { #ifdef DEBUG inline bool Clobbers(Register target, MemOperand op) { return op.is_reg() && op.rm() == target; } #endif } // namespace detail #define __ masm_-> MemOperand BaselineAssembler::RegisterFrameOperand( interpreter::Register interpreter_register) { return MemOperand(fp, interpreter_register.ToOperand() * kSystemPointerSize); } MemOperand BaselineAssembler::FeedbackVectorOperand() { return MemOperand(fp, BaselineFrameConstants::kFeedbackVectorFromFp); } void BaselineAssembler::Bind(Label* label) { __ bind(label); } void BaselineAssembler::BindWithoutJumpTarget(Label* label) { __ bind(label); } void BaselineAssembler::JumpTarget() { // NOP. } void BaselineAssembler::Jump(Label* target, Label::Distance distance) { __ Branch(target); } void BaselineAssembler::JumpIfRoot(Register value, RootIndex index, Label* target, Label::Distance) { __ JumpIfRoot(value, index, target); } void BaselineAssembler::JumpIfNotRoot(Register value, RootIndex index, Label* target, Label::Distance) { __ JumpIfNotRoot(value, index, target); } void BaselineAssembler::JumpIfSmi(Register value, Label* target, Label::Distance) { __ JumpIfSmi(value, target); } void BaselineAssembler::JumpIfNotSmi(Register value, Label* target, Label::Distance) { __ JumpIfNotSmi(value, target); } void BaselineAssembler::CallBuiltin(Builtin builtin) { ASM_CODE_COMMENT_STRING(masm_, __ CommentForOffHeapTrampoline("call", builtin)); Register temp = t9; __ LoadEntryFromBuiltin(builtin, temp); __ Call(temp); } void BaselineAssembler::TailCallBuiltin(Builtin builtin) { ASM_CODE_COMMENT_STRING(masm_, __ CommentForOffHeapTrampoline("tail call", builtin)); Register temp = t9; __ LoadEntryFromBuiltin(builtin, temp); __ Jump(temp); } void BaselineAssembler::TestAndBranch(Register value, int mask, Condition cc, Label* target, Label::Distance) { ScratchRegisterScope temps(this); Register scratch = temps.AcquireScratch(); __ And(scratch, value, Operand(mask)); __ Branch(target, AsMasmCondition(cc), scratch, Operand(zero_reg)); } void BaselineAssembler::JumpIf(Condition cc, Register lhs, const Operand& rhs, Label* target, Label::Distance) { __ Branch(target, AsMasmCondition(cc), lhs, Operand(rhs)); } void BaselineAssembler::JumpIfObjectType(Condition cc, Register object, InstanceType instance_type, Register map, Label* target, Label::Distance) { ScratchRegisterScope temps(this); Register type = temps.AcquireScratch(); __ GetObjectType(object, map, type); __ Branch(target, AsMasmCondition(cc), type, Operand(instance_type)); } void BaselineAssembler::JumpIfInstanceType(Condition cc, Register map, InstanceType instance_type, Label* target, Label::Distance) { ScratchRegisterScope temps(this); Register type = temps.AcquireScratch(); if (FLAG_debug_code) { __ AssertNotSmi(map); __ GetObjectType(map, type, type); __ Assert(eq, AbortReason::kUnexpectedValue, type, Operand(MAP_TYPE)); } __ Ld(type, FieldMemOperand(map, Map::kInstanceTypeOffset)); __ Branch(target, AsMasmCondition(cc), type, Operand(instance_type)); } void BaselineAssembler::JumpIfPointer(Condition cc, Register value, MemOperand operand, Label* target, Label::Distance) { ScratchRegisterScope temps(this); Register scratch = temps.AcquireScratch(); __ Ld(scratch, operand); __ Branch(target, AsMasmCondition(cc), value, Operand(scratch)); } void BaselineAssembler::JumpIfSmi(Condition cc, Register value, Smi smi, Label* target, Label::Distance) { ScratchRegisterScope temps(this); Register scratch = temps.AcquireScratch(); __ li(scratch, Operand(smi)); __ SmiUntag(scratch); __ Branch(target, AsMasmCondition(cc), value, Operand(scratch)); } void BaselineAssembler::JumpIfSmi(Condition cc, Register lhs, Register rhs, Label* target, Label::Distance) { __ AssertSmi(lhs); __ AssertSmi(rhs); __ Branch(target, AsMasmCondition(cc), lhs, Operand(rhs)); } void BaselineAssembler::JumpIfTagged(Condition cc, Register value, MemOperand operand, Label* target, Label::Distance) { ScratchRegisterScope temps(this); Register scratch = temps.AcquireScratch(); __ Ld(scratch, operand); __ Branch(target, AsMasmCondition(cc), value, Operand(scratch)); } void BaselineAssembler::JumpIfTagged(Condition cc, MemOperand operand, Register value, Label* target, Label::Distance) { ScratchRegisterScope temps(this); Register scratch = temps.AcquireScratch(); __ Ld(scratch, operand); __ Branch(target, AsMasmCondition(cc), scratch, Operand(value)); } void BaselineAssembler::JumpIfByte(Condition cc, Register value, int32_t byte, Label* target, Label::Distance) { __ Branch(target, AsMasmCondition(cc), value, Operand(byte)); } void BaselineAssembler::Move(interpreter::Register output, Register source) { Move(RegisterFrameOperand(output), source); } void BaselineAssembler::Move(Register output, TaggedIndex value) { __ li(output, Operand(value.ptr())); } void BaselineAssembler::Move(MemOperand output, Register source) { __ Sd(source, output); } void BaselineAssembler::Move(Register output, ExternalReference reference) { __ li(output, Operand(reference)); } void BaselineAssembler::Move(Register output, Handle<HeapObject> value) { __ li(output, Operand(value)); } void BaselineAssembler::Move(Register output, int32_t value) { __ li(output, Operand(value)); } void BaselineAssembler::MoveMaybeSmi(Register output, Register source) { __ Move(output, source); } void BaselineAssembler::MoveSmi(Register output, Register source) { __ Move(output, source); } namespace detail { template <typename Arg> inline Register ToRegister(BaselineAssembler* basm, BaselineAssembler::ScratchRegisterScope* scope, Arg arg) { Register reg = scope->AcquireScratch(); basm->Move(reg, arg); return reg; } inline Register ToRegister(BaselineAssembler* basm, BaselineAssembler::ScratchRegisterScope* scope, Register reg) { return reg; } template <typename... Args> struct PushAllHelper; template <> struct PushAllHelper<> { static int Push(BaselineAssembler* basm) { return 0; } static int PushReverse(BaselineAssembler* basm) { return 0; } }; // TODO(ishell): try to pack sequence of pushes into one instruction by // looking at regiser codes. For example, Push(r1, r2, r5, r0, r3, r4) // could be generated as two pushes: Push(r1, r2, r5) and Push(r0, r3, r4). template <typename Arg> struct PushAllHelper<Arg> { static int Push(BaselineAssembler* basm, Arg arg) { BaselineAssembler::ScratchRegisterScope scope(basm); basm->masm()->Push(ToRegister(basm, &scope, arg)); return 1; } static int PushReverse(BaselineAssembler* basm, Arg arg) { return Push(basm, arg); } }; // TODO(ishell): try to pack sequence of pushes into one instruction by // looking at regiser codes. For example, Push(r1, r2, r5, r0, r3, r4) // could be generated as two pushes: Push(r1, r2, r5) and Push(r0, r3, r4). template <typename Arg, typename... Args> struct PushAllHelper<Arg, Args...> { static int Push(BaselineAssembler* basm, Arg arg, Args... args) { PushAllHelper<Arg>::Push(basm, arg); return 1 + PushAllHelper<Args...>::Push(basm, args...); } static int PushReverse(BaselineAssembler* basm, Arg arg, Args... args) { int nargs = PushAllHelper<Args...>::PushReverse(basm, args...); PushAllHelper<Arg>::Push(basm, arg); return nargs + 1; } }; template <> struct PushAllHelper<interpreter::RegisterList> { static int Push(BaselineAssembler* basm, interpreter::RegisterList list) { for (int reg_index = 0; reg_index < list.register_count(); ++reg_index) { PushAllHelper<interpreter::Register>::Push(basm, list[reg_index]); } return list.register_count(); } static int PushReverse(BaselineAssembler* basm, interpreter::RegisterList list) { for (int reg_index = list.register_count() - 1; reg_index >= 0; --reg_index) { PushAllHelper<interpreter::Register>::Push(basm, list[reg_index]); } return list.register_count(); } }; template <typename... T> struct PopAllHelper; template <> struct PopAllHelper<> { static void Pop(BaselineAssembler* basm) {} }; // TODO(ishell): try to pack sequence of pops into one instruction by // looking at regiser codes. For example, Pop(r1, r2, r5, r0, r3, r4) // could be generated as two pops: Pop(r1, r2, r5) and Pop(r0, r3, r4). template <> struct PopAllHelper<Register> { static void Pop(BaselineAssembler* basm, Register reg) { basm->masm()->Pop(reg); } }; template <typename... T> struct PopAllHelper<Register, T...> { static void Pop(BaselineAssembler* basm, Register reg, T... tail) { PopAllHelper<Register>::Pop(basm, reg); PopAllHelper<T...>::Pop(basm, tail...); } }; } // namespace detail template <typename... T> int BaselineAssembler::Push(T... vals) { return detail::PushAllHelper<T...>::Push(this, vals...); } template <typename... T> void BaselineAssembler::PushReverse(T... vals) { detail::PushAllHelper<T...>::PushReverse(this, vals...); } template <typename... T> void BaselineAssembler::Pop(T... registers) { detail::PopAllHelper<T...>::Pop(this, registers...); } void BaselineAssembler::LoadTaggedPointerField(Register output, Register source, int offset) { __ Ld(output, FieldMemOperand(source, offset)); } void BaselineAssembler::LoadTaggedSignedField(Register output, Register source, int offset) { __ Ld(output, FieldMemOperand(source, offset)); } void BaselineAssembler::LoadTaggedAnyField(Register output, Register source, int offset) { __ Ld(output, FieldMemOperand(source, offset)); } void BaselineAssembler::LoadByteField(Register output, Register source, int offset) { __ Lb(output, FieldMemOperand(source, offset)); } void BaselineAssembler::StoreTaggedSignedField(Register target, int offset, Smi value) { ASM_CODE_COMMENT(masm_); ScratchRegisterScope temps(this); Register scratch = temps.AcquireScratch(); __ li(scratch, Operand(value)); __ Sd(scratch, FieldMemOperand(target, offset)); } void BaselineAssembler::StoreTaggedFieldWithWriteBarrier(Register target, int offset, Register value) { ASM_CODE_COMMENT(masm_); __ Sd(value, FieldMemOperand(target, offset)); ScratchRegisterScope temps(this); Register scratch = temps.AcquireScratch(); __ RecordWriteField(target, offset, value, scratch, kRAHasNotBeenSaved, SaveFPRegsMode::kIgnore); } void BaselineAssembler::StoreTaggedFieldNoWriteBarrier(Register target, int offset, Register value) { __ Sd(value, FieldMemOperand(target, offset)); } void BaselineAssembler::AddToInterruptBudgetAndJumpIfNotExceeded( int32_t weight, Label* skip_interrupt_label) { ASM_CODE_COMMENT(masm_); ScratchRegisterScope scratch_scope(this); Register feedback_cell = scratch_scope.AcquireScratch(); LoadFunction(feedback_cell); LoadTaggedPointerField(feedback_cell, feedback_cell, JSFunction::kFeedbackCellOffset); Register interrupt_budget = scratch_scope.AcquireScratch(); __ Ld(interrupt_budget, FieldMemOperand(feedback_cell, FeedbackCell::kInterruptBudgetOffset)); __ Daddu(interrupt_budget, interrupt_budget, weight); __ Sd(interrupt_budget, FieldMemOperand(feedback_cell, FeedbackCell::kInterruptBudgetOffset)); if (skip_interrupt_label) { DCHECK_LT(weight, 0); __ Branch(skip_interrupt_label, ge, interrupt_budget, Operand(weight)); } } void BaselineAssembler::AddToInterruptBudgetAndJumpIfNotExceeded( Register weight, Label* skip_interrupt_label) { ASM_CODE_COMMENT(masm_); ScratchRegisterScope scratch_scope(this); Register feedback_cell = scratch_scope.AcquireScratch(); LoadFunction(feedback_cell); LoadTaggedPointerField(feedback_cell, feedback_cell, JSFunction::kFeedbackCellOffset); Register interrupt_budget = scratch_scope.AcquireScratch(); __ Ld(interrupt_budget, FieldMemOperand(feedback_cell, FeedbackCell::kInterruptBudgetOffset)); __ Daddu(interrupt_budget, interrupt_budget, weight); __ Sd(interrupt_budget, FieldMemOperand(feedback_cell, FeedbackCell::kInterruptBudgetOffset)); if (skip_interrupt_label) __ Branch(skip_interrupt_label, ge, interrupt_budget, Operand(weight)); } void BaselineAssembler::AddSmi(Register lhs, Smi rhs) { __ Daddu(lhs, lhs, Operand(rhs)); } void BaselineAssembler::Switch(Register reg, int case_value_base, Label** labels, int num_labels) { ASM_CODE_COMMENT(masm_); Label fallthrough; if (case_value_base > 0) { __ Dsubu(reg, reg, Operand(case_value_base)); } ScratchRegisterScope scope(this); Register temp = scope.AcquireScratch(); __ Branch(&fallthrough, AsMasmCondition(Condition::kUnsignedGreaterThanEqual), reg, Operand(num_labels)); __ push(ra); int entry_size_log2 = 3; __ nal(); __ daddiu(reg, reg, 3); __ Dlsa(temp, ra, reg, entry_size_log2); __ pop(ra); __ Jump(temp); { TurboAssembler::BlockTrampolinePoolScope(masm()); __ BlockTrampolinePoolFor(num_labels * kInstrSize * 2); for (int i = 0; i < num_labels; ++i) { __ Branch(labels[i]); } __ bind(&fallthrough); } } #undef __ #define __ basm. void BaselineAssembler::EmitReturn(MacroAssembler* masm) { ASM_CODE_COMMENT(masm); BaselineAssembler basm(masm); Register weight = BaselineLeaveFrameDescriptor::WeightRegister(); Register params_size = BaselineLeaveFrameDescriptor::ParamsSizeRegister(); { ASM_CODE_COMMENT_STRING(masm, "Update Interrupt Budget"); Label skip_interrupt_label; __ AddToInterruptBudgetAndJumpIfNotExceeded(weight, &skip_interrupt_label); __ masm()->SmiTag(params_size); __ masm()->Push(params_size, kInterpreterAccumulatorRegister); __ LoadContext(kContextRegister); __ LoadFunction(kJSFunctionRegister); __ masm()->Push(kJSFunctionRegister); __ CallRuntime(Runtime::kBytecodeBudgetInterruptFromBytecode, 1); __ masm()->Pop(params_size, kInterpreterAccumulatorRegister); __ masm()->SmiUntag(params_size); __ Bind(&skip_interrupt_label); } BaselineAssembler::ScratchRegisterScope temps(&basm); Register actual_params_size = temps.AcquireScratch(); // Compute the size of the actual parameters + receiver (in bytes). __ Move(actual_params_size, MemOperand(fp, StandardFrameConstants::kArgCOffset)); // If actual is bigger than formal, then we should use it to free up the stack // arguments. Label corrected_args_count; __ masm()->Branch(&corrected_args_count, ge, params_size, Operand(actual_params_size)); __ masm()->Move(params_size, actual_params_size); __ Bind(&corrected_args_count); // Leave the frame (also dropping the register file). __ masm()->LeaveFrame(StackFrame::BASELINE); // Drop receiver + arguments. __ masm()->Daddu(params_size, params_size, 1); // Include the receiver. __ masm()->Dlsa(sp, sp, params_size, kPointerSizeLog2); __ masm()->Ret(); } #undef __ } // namespace baseline } // namespace internal } // namespace v8 #endif // V8_BASELINE_MIPS64_BASELINE_ASSEMBLER_MIPS64_INL_H_
[ "v8-scoped@luci-project-accounts.iam.gserviceaccount.com" ]
v8-scoped@luci-project-accounts.iam.gserviceaccount.com
612626a96c6e54ca06fe0238ddda8c87f0c1cd14
44b30d88789cd0351bbc258c9b979c43e501d6b1
/src/rpc/client.cpp
ab069133dd3860f3e9960094c904a8cc7125bfe8
[ "MIT" ]
permissive
misternode/mogwai
d7b72f4a8754edb2e35a72670d6c08596705e502
b67457c5f1112c31463555d9c8427969827ff279
refs/heads/master
2020-03-26T09:02:11.700769
2018-08-29T18:19:03
2018-08-29T18:19:03
144,732,346
0
0
MIT
2018-08-14T14:35:03
2018-08-14T14:35:02
null
UTF-8
C++
false
false
5,774
cpp
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers // Copyright (c) 2014-2017 The Dash Core developers // Copyright (c) 2017-2018 The Mogwai Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "rpc/client.h" #include "rpc/protocol.h" #include "util.h" #include <set> #include <stdint.h> #include <boost/algorithm/string/case_conv.hpp> // for to_lower() #include <univalue.h> using namespace std; class CRPCConvertParam { public: std::string methodName; //! method whose params want conversion int paramIdx; //! 0-based idx of param to convert }; static const CRPCConvertParam vRPCConvertParams[] = { { "stop", 0 }, { "setmocktime", 0 }, { "getaddednodeinfo", 0 }, { "setgenerate", 0 }, { "setgenerate", 1 }, { "generate", 0 }, { "getnetworkhashps", 0 }, { "getnetworkhashps", 1 }, { "sendtoaddress", 1 }, { "sendtoaddress", 4 }, { "sendtoaddress", 5 }, { "sendtoaddress", 6 }, { "instantsendtoaddress", 1 }, { "instantsendtoaddress", 4 }, { "settxfee", 0 }, { "getreceivedbyaddress", 1 }, { "getreceivedbyaddress", 2 }, { "getreceivedbyaccount", 1 }, { "getreceivedbyaccount", 2 }, { "listreceivedbyaddress", 0 }, { "listreceivedbyaddress", 1 }, { "listreceivedbyaddress", 2 }, { "listreceivedbyaddress", 3 }, { "listreceivedbyaccount", 0 }, { "listreceivedbyaccount", 1 }, { "listreceivedbyaccount", 2 }, { "listreceivedbyaccount", 3 }, { "getbalance", 1 }, { "getbalance", 2 }, { "getbalance", 3 }, { "getchaintips", 0 }, { "getchaintips", 1 }, { "getblockhash", 0 }, { "getsuperblockbudget", 0 }, { "move", 2 }, { "move", 3 }, { "sendfrom", 2 }, { "sendfrom", 3 }, { "sendfrom", 4 }, { "listmirrtransactions", 1 }, { "listmirrtransactions", 2 }, { "listmirrtransactions", 3 }, { "listtransactions", 1 }, { "listtransactions", 2 }, { "listtransactions", 3 }, { "listaccounts", 0 }, { "listaccounts", 1 }, { "listaccounts", 2 }, { "walletpassphrase", 1 }, { "walletpassphrase", 2 }, { "getblocktemplate", 0 }, { "listsinceblock", 1 }, { "listsinceblock", 2 }, { "sendmany", 1 }, { "sendmany", 2 }, { "sendmany", 3 }, { "sendmany", 5 }, { "sendmany", 6 }, { "sendmany", 7 }, { "addmultisigaddress", 0 }, { "addmultisigaddress", 1 }, { "createmultisig", 0 }, { "createmultisig", 1 }, { "listunspent", 0 }, { "listunspent", 1 }, { "listunspent", 2 }, { "getblock", 1 }, { "getblockheader", 1 }, { "getblockheaders", 1 }, { "getblockheaders", 2 }, { "gettransaction", 1 }, { "getrawtransaction", 1 }, { "createrawtransaction", 0 }, { "createrawtransaction", 1 }, { "createrawtransaction", 2 }, { "signrawtransaction", 1 }, { "signrawtransaction", 2 }, { "sendrawtransaction", 1 }, { "sendrawtransaction", 2 }, { "fundrawtransaction", 1 }, { "gettxout", 1 }, { "gettxout", 2 }, { "gettxoutproof", 0 }, { "lockunspent", 0 }, { "lockunspent", 1 }, { "importprivkey", 2 }, { "importelectrumwallet", 1 }, { "importaddress", 2 }, { "importaddress", 3 }, { "importpubkey", 2 }, { "verifychain", 0 }, { "verifychain", 1 }, { "keypoolrefill", 0 }, { "getrawmempool", 0 }, { "estimatefee", 0 }, { "estimatepriority", 0 }, { "estimatesmartfee", 0 }, { "estimatesmartpriority", 0 }, { "prioritisetransaction", 1 }, { "prioritisetransaction", 2 }, { "setban", 2 }, { "setban", 3 }, { "setnetworkactive", 0 }, { "spork", 1 }, { "voteraw", 1 }, { "voteraw", 5 }, { "getblockhashes", 0 }, { "getblockhashes", 1 }, { "getspentinfo", 0}, { "getaddresstxids", 0}, { "getaddressbalance", 0}, { "getaddressdeltas", 0}, { "getaddressutxos", 0}, { "getaddressmempool", 0}, }; class CRPCConvertTable { private: std::set<std::pair<std::string, int> > members; public: CRPCConvertTable(); bool convert(const std::string& method, int idx) { return (members.count(std::make_pair(method, idx)) > 0); } }; CRPCConvertTable::CRPCConvertTable() { const unsigned int n_elem = (sizeof(vRPCConvertParams) / sizeof(vRPCConvertParams[0])); for (unsigned int i = 0; i < n_elem; i++) { members.insert(std::make_pair(vRPCConvertParams[i].methodName, vRPCConvertParams[i].paramIdx)); } } static CRPCConvertTable rpcCvtTable; /** Non-RFC4627 JSON parser, accepts internal values (such as numbers, true, false, null) * as well as objects and arrays. */ UniValue ParseNonRFCJSONValue(const std::string& strVal) { UniValue jVal; if (!jVal.read(std::string("[")+strVal+std::string("]")) || !jVal.isArray() || jVal.size()!=1) throw runtime_error(string("Error parsing JSON:")+strVal); return jVal[0]; } /** Convert strings to command-specific RPC representation */ UniValue RPCConvertValues(const std::string &strMethod, const std::vector<std::string> &strParams) { UniValue params(UniValue::VARR); for (unsigned int idx = 0; idx < strParams.size(); idx++) { const std::string& strVal = strParams[idx]; if (!rpcCvtTable.convert(strMethod, idx)) { // insert string value directly params.push_back(strVal); } else { // parse string as JSON, insert bool/number/object/etc. value params.push_back(ParseNonRFCJSONValue(strVal)); } } return params; }
[ "randall.peltzer@protonmail.com" ]
randall.peltzer@protonmail.com
e3c88b64428e29eceb09c8190967cca48b64901c
30e6060a3d927aa302a196e44c036b7c0f6cfe64
/Bomberman/Menu.h
40caa61e32b225e39bc5dba747770009f31b03c6
[]
no_license
Piecha93/Bomberman
85f2959a1282d0d1e8e279f5a4d1842cc512e6ac
2344a35b74e1588fe478e074559b387612a7c59f
refs/heads/master
2021-01-14T05:08:27.474317
2017-01-24T09:03:42
2017-01-24T09:03:42
31,956,447
0
0
null
null
null
null
UTF-8
C++
false
false
373
h
#pragma once enum MENU_STATUS { START_GAME, MAIN, INSTRUCTIONS, SETTINGS, EXIT}; class Menu { private: //pozycja w menu int m_position; //tablice z tekstem odpowiednich menu string menuStart[4]; string menuInstructions[7]; MENU_STATUS drawMain(); MENU_STATUS drawInstructions(); MENU_STATUS drawSettings(); public: Menu(); MENU_STATUS drawMenu(); ~Menu(); };
[ "piecha93@gmail.com" ]
piecha93@gmail.com
8f4f617550aaf7f41da548617b7bc1c2a48effff
1c489614bdfd88cffbbf9367e474a2dbdb12ff2f
/main.cpp
375e2de959e0f0676e7bec0817e3a30b286b3e77
[]
no_license
fanjiafei/DemoCSV
1d46c561f6fb8bb65b9546b104b4919b5b86da55
d8e39250b78b87297273c11c42b7c802c964deb2
refs/heads/master
2021-05-12T18:52:42.950515
2018-01-11T09:30:34
2018-01-11T09:30:34
117,078,277
0
0
null
null
null
null
UTF-8
C++
false
false
669
cpp
#include <fstream> using namespace std; int main(){ ofstream ofile; ofile.open("/home/fan/Desktop/result.csv",ios::out | ios::trunc); //判断.csv文件是否存在,不存在则建立 ofile<<"序号,第一列,第二列,第三列,第四列,第五列"<<endl; //如果每列中间隔一空列,就是"序号,,第一列,,第二列,,第三列,,第四列,,第五列"<<endl; int a[10][5]; for(int i=0;i<10;i++) { for(int j=0;j<5;j++) { a[i][j]=i*i+j; } } for(int i=0;i<10;i++)//说明有11行6列,序列号为1至10 { ofile<<i+1<<","; for(int j=0;j<5;j++) { ofile<<a[i][j]<<","; } ofile<<endl; } ofile.close(); }
[ "fanjiafei@hangsheng.com.cn" ]
fanjiafei@hangsheng.com.cn
e4c4ef5800128c82d143df10c71ac6bbd7de2e0f
fa99b0f9741c7877d168e047145d4cf63a05749b
/ESP8266_Signal_Strength.ino
32537390095971f47407f66db0fbfbb5dae3fee2
[]
no_license
Wuanitawanjiku/ESP8266_Signal_Strength
57b2295bbef3e8f827138abe8323db84f4caf2eb
cf46e85b362dcc5bf4488fb29adb7dbbe2c9d4de
refs/heads/main
2023-09-05T03:29:58.110827
2021-11-11T10:48:17
2021-11-11T10:48:17
416,240,872
0
0
null
null
null
null
UTF-8
C++
false
false
1,289
ino
#include "ThingSpeak.h" //#include "secrets.h" unsigned long myChannelNumber = 1518556; const char * myWriteAPIKey = "J39LACWL3HSU2CPZ"; #include <ESP8266WiFi.h> char ssid[] = "codehive"; char pass[] = "codehive!"; //int keyIndex = 0; // your network key index number (needed only for WEP) WiFiClient client; void setup() { Serial.begin(115200); delay(100); WiFi.mode(WIFI_STA); ThingSpeak.begin(client); } void loop() { // Connect or reconnect to WiFi if (WiFi.status() != WL_CONNECTED) { Serial.print("Attempting to connect to SSID: "); Serial.println(ssid); while (WiFi.status() != WL_CONNECTED) { WiFi.begin(ssid, pass); Serial.print("."); delay(5000); } Serial.println("\nConnected."); } // Measure Signal Strength (RSSI) of Wi-Fi connection long rssi = WiFi.RSSI(); // Write value to Field 1 of a ThingSpeak Channel int httpCode = ThingSpeak.writeField(myChannelNumber, 1, rssi, myWriteAPIKey); if (httpCode == 200) { Serial.println("Channel write successful."); } else { Serial.println("Problem writing to channel. HTTP error code " + String(httpCode)); } // Wait 20 seconds to update the channel again delay(20000); }
[ "noreply@github.com" ]
noreply@github.com
f0b9d7473393020e47a0034b436f7e04443c789e
84643d000f9dd1e39c5c008b490b09a8956c0f02
/PSS_ClientManager/PSS_ClientManager/DlgForbidenIP.cpp
e28725dc46cc5c52546a99632766388637c56854
[]
no_license
rover13/purenessscopeserver
9b7d3329a5f81c0c335e6942ff4877c0bb2f4fd8
b7255639dd94ea6b796e6537d3260c426bea1236
refs/heads/master
2020-05-19T17:03:45.461934
2015-02-19T03:08:28
2015-02-19T03:08:28
null
0
0
null
null
null
null
GB18030
C++
false
false
14,114
cpp
// DlgForbidenIP.cpp : implementation file // #include "stdafx.h" #include "PSS_ClientManager.h" #include "DlgForbidenIP.h" // CDlgForbidenIP dialog IMPLEMENT_DYNAMIC(CDlgForbidenIP, CDialog) CDlgForbidenIP::CDlgForbidenIP(CWnd* pParent /*=NULL*/) : CDialog(CDlgForbidenIP::IDD, pParent) { m_pTcpClientConnect = NULL; } CDlgForbidenIP::~CDlgForbidenIP() { } void CDlgForbidenIP::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); DDX_Control(pDX, IDC_EDIT1, m_txtForbidenIP); DDX_Control(pDX, IDC_EDIT2, m_txtForbidenSeconds); DDX_Control(pDX, IDC_LIST1, m_lcForbidenList); DDX_Control(pDX, IDC_RADIO1, m_btnTimeForbiden); DDX_Control(pDX, IDC_EDIT3, m_txtNickName); DDX_Control(pDX, IDC_EDIT4, m_txtConnectID); DDX_Control(pDX, IDC_LIST5, m_lcNickInfo); } BEGIN_MESSAGE_MAP(CDlgForbidenIP, CDialog) ON_BN_CLICKED(IDC_BUTTON1, &CDlgForbidenIP::OnBnClickedButton1) ON_BN_CLICKED(IDC_BUTTON2, &CDlgForbidenIP::OnBnClickedButton2) ON_BN_CLICKED(IDC_BUTTON3, &CDlgForbidenIP::OnBnClickedButton3) ON_BN_CLICKED(IDC_BUTTON4, &CDlgForbidenIP::OnBnClickedButton4) ON_BN_CLICKED(IDC_BUTTON7, &CDlgForbidenIP::OnBnClickedButton7) ON_BN_CLICKED(IDC_BUTTON5, &CDlgForbidenIP::OnBnClickedButton5) END_MESSAGE_MAP() CString CDlgForbidenIP::GetPageTitle() { return _T("IP封禁管理"); } // CDlgForbidenIP message handlers void CDlgForbidenIP::OnBnClickedButton1() { //添加封禁 char szIP[20] = {'\0'}; char szSeconds[20] = {'\0'}; CString strIP; CString strSeconds; int nType = 0; m_txtForbidenIP.GetWindowText(strIP); int nSrcLen = WideCharToMultiByte(CP_ACP, 0, strIP, strIP.GetLength(), NULL, 0, NULL, NULL); int nDecLen = WideCharToMultiByte(CP_ACP, 0, strIP, nSrcLen, szIP, 20, NULL,NULL); szIP[nDecLen] = '\0'; nSrcLen = WideCharToMultiByte(CP_ACP, 0, strSeconds, strSeconds.GetLength(), NULL, 0, NULL, NULL); nDecLen = WideCharToMultiByte(CP_ACP, 0, strSeconds, nSrcLen, szSeconds, 20, NULL,NULL); szSeconds[nDecLen] = '\0'; if(strlen(szIP) == 0) { MessageBox(_T(MESSAGE_INSERT_NULL) , _T(MESSAGE_TITLE_ERROR), MB_OK); return; } switch(GetCheckedRadioButton(IDC_RADIO1, IDC_RADIO2)) { case IDC_RADIO1: nType = 0; break; case IDC_RADIO2: nType = 1; break; } char szSendMessage[200] = {'\0'}; char szCommand[100] = {'\0'}; sprintf_s(szCommand, 100, "%s ForbiddenIP -c %s -t %d -s %s ", m_pTcpClientConnect->GetKey(), szIP, nType, szSeconds); int nSendLen = (int)strlen(szCommand); memcpy_s(szSendMessage, 200, &nSendLen, sizeof(int)); memcpy_s(&szSendMessage[4], 200, &szCommand, nSendLen); char szRecvBuff[10 * 1024] = {'\0'}; int nRecvLen = 10 * 1024; bool blState = m_pTcpClientConnect->SendConsoleMessage(szSendMessage, nSendLen + sizeof(int), (char*)szRecvBuff, nRecvLen); if(blState == false) { MessageBox(_T(MESSAGE_SENDERROR) , _T(MESSAGE_TITLE_ERROR), MB_OK); } else { int nStrLen = 0; int nPos = 0; int nResult = 0; memcpy_s(&nResult, sizeof(int), &szRecvBuff[nPos], sizeof(int)); nPos += sizeof(int); if(nResult == 0) { MessageBox(_T(MESSAGE_RESULT_SUCCESS) , _T(MESSAGE_TITLE_ERROR), MB_OK); } else { MessageBox(_T(MESSAGE_RESULT_FAIL) , _T(MESSAGE_TITLE_SUCCESS), MB_OK); OnBnClickedButton3(); } } } void CDlgForbidenIP::OnBnClickedButton2() { //解除封禁 char szIP[20] = {'\0'}; CString strIP; m_txtForbidenIP.GetWindowText(strIP); int nSrcLen = WideCharToMultiByte(CP_ACP, 0, strIP, strIP.GetLength(), NULL, 0, NULL, NULL); int nDecLen = WideCharToMultiByte(CP_ACP, 0, strIP, nSrcLen, szIP, 20, NULL,NULL); szIP[nDecLen] = '\0'; if(strlen(szIP) == 0) { MessageBox(_T(MESSAGE_INSERT_NULL) , _T(MESSAGE_TITLE_ERROR), MB_OK); return; } char szSendMessage[200] = {'\0'}; char szCommand[100] = {'\0'}; sprintf_s(szCommand, 100, "%s LiftedIP %s", m_pTcpClientConnect->GetKey(), szIP); int nSendLen = (int)strlen(szCommand); memcpy_s(szSendMessage, 200, &nSendLen, sizeof(int)); memcpy_s(&szSendMessage[4], 200, &szCommand, nSendLen); char szRecvBuff[10 * 1024] = {'\0'}; int nRecvLen = 10 * 1024; bool blState = m_pTcpClientConnect->SendConsoleMessage(szSendMessage, nSendLen + sizeof(int), (char*)szRecvBuff, nRecvLen); if(blState == false) { MessageBox(_T(MESSAGE_SENDERROR) , _T(MESSAGE_TITLE_ERROR), MB_OK); } else { int nStrLen = 0; int nPos = 0; int nResult = 0; memcpy_s(&nResult, sizeof(char), &szRecvBuff[nPos], sizeof(char)); nPos += sizeof(char); if(nResult == 0) { MessageBox(_T(MESSAGE_RESULT_SUCCESS) , _T(MESSAGE_TITLE_ERROR), MB_OK); } else { MessageBox(_T(MESSAGE_RESULT_FAIL) , _T(MESSAGE_TITLE_SUCCESS), MB_OK); OnBnClickedButton3(); } } } void CDlgForbidenIP::SetTcpClientConnect( CTcpClientConnect* pTcpClientConnect ) { m_pTcpClientConnect = pTcpClientConnect; } BOOL CDlgForbidenIP::OnInitDialog() { CDialog::OnInitDialog(); m_lcForbidenList.InsertColumn(0, _T("IP地址"), LVCFMT_CENTER, 150); m_lcForbidenList.InsertColumn(1, _T("封禁类型"), LVCFMT_CENTER, 100); m_lcForbidenList.InsertColumn(2, _T("封禁开始时间"), LVCFMT_CENTER, 200); m_lcForbidenList.InsertColumn(3, _T("封禁持续秒数"), LVCFMT_CENTER, 100); m_lcNickInfo.InsertColumn(0, _T("ConnectID"), LVCFMT_CENTER, 100); m_lcNickInfo.InsertColumn(1, _T("别名"), LVCFMT_CENTER, 150); m_lcNickInfo.InsertColumn(2, _T("客户端IP"), LVCFMT_CENTER, 100); m_lcNickInfo.InsertColumn(3, _T("端口"), LVCFMT_CENTER, 50); m_lcNickInfo.InsertColumn(4, _T("日志状态"), LVCFMT_CENTER, 50); return TRUE; } void CDlgForbidenIP::OnBnClickedButton3() { //查看列表 m_lcForbidenList.DeleteAllItems(); vecForbiddenIP objvecForbiddenIP; char szSendMessage[200] = {'\0'}; char szCommand[100] = {'\0'}; sprintf_s(szCommand, 100, "%s ShowForbiddenIP -a", m_pTcpClientConnect->GetKey()); int nSendLen = (int)strlen(szCommand); memcpy_s(szSendMessage, 200, &nSendLen, sizeof(int)); memcpy_s(&szSendMessage[4], 200, &szCommand, nSendLen); char szRecvBuff[10 * 1024] = {'\0'}; int nRecvLen = 10 * 1024; bool blState = m_pTcpClientConnect->SendConsoleMessage(szSendMessage, nSendLen + sizeof(int), (char*)szRecvBuff, nRecvLen); if(blState == false) { MessageBox(_T(MESSAGE_SENDERROR) , _T(MESSAGE_TITLE_ERROR), MB_OK); return; } else { int nStrLen = 0; int nPos = 0; int nForbidenCount = 0; memcpy_s(&nForbidenCount, sizeof(int), &szRecvBuff[nPos], sizeof(int)); nPos += sizeof(int); for(int i = 0; i < nForbidenCount; i++) { //开始还原数据结构 _ForbiddenIP ForbiddenIP; memcpy_s(&nStrLen, sizeof(char), &szRecvBuff[nPos], sizeof(char)); nPos += sizeof(char); memcpy_s(ForbiddenIP.m_szIP, nStrLen, &szRecvBuff[nPos], nStrLen); nPos += nStrLen; ForbiddenIP.m_szIP[nStrLen] = '\0'; memcpy_s(&ForbiddenIP.m_nType, sizeof(char), &szRecvBuff[nPos], sizeof(char)); nPos += sizeof(char); char szUpdateTime[30] = {'\0'}; memcpy_s(&ForbiddenIP.m_nBeginTime, sizeof(int), &szRecvBuff[nPos], sizeof(int)); nPos += sizeof(int); struct tm tmDate; time_t newRawTime = ForbiddenIP.m_nBeginTime; localtime_s(&tmDate, &newRawTime); sprintf_s(szUpdateTime, 30, "%04d-%02d-%02d %02d:%02d:%02d", tmDate.tm_year + 1900, tmDate.tm_mon + 1, tmDate.tm_mday, tmDate.tm_hour, tmDate.tm_min, tmDate.tm_sec); memcpy_s(&ForbiddenIP.m_nSecond, sizeof(int), &szRecvBuff[nPos], sizeof(int)); nPos += sizeof(int); //显示在桌面上 wchar_t szForbidenIP[200] = {'\0'}; wchar_t szzUpdateTime[30] = {'\0'}; int nSrcLen = MultiByteToWideChar(CP_ACP, 0, ForbiddenIP.m_szIP, -1, NULL, 0); int nDecLen = MultiByteToWideChar(CP_ACP, 0, ForbiddenIP.m_szIP, -1, szForbidenIP, 200); nSrcLen = MultiByteToWideChar(CP_ACP, 0, szUpdateTime, -1, NULL, 0); nDecLen = MultiByteToWideChar(CP_ACP, 0, szUpdateTime, -1, szzUpdateTime, 200); CString strSeconds; CString strType; if(ForbiddenIP.m_nType == 0) { strType = _T("永久封禁"); } else { strType = _T("时段封禁"); } strSeconds.Format(_T("%d"), ForbiddenIP.m_nSecond); m_lcForbidenList.InsertItem(i, szForbidenIP); m_lcForbidenList.SetItemText(i, 1, strType); m_lcForbidenList.SetItemText(i, 2, szzUpdateTime); m_lcForbidenList.SetItemText(i, 3, strSeconds); objvecForbiddenIP.push_back(ForbiddenIP); } } } void CDlgForbidenIP::OnBnClickedButton4() { //打开日志 char szConnectID[100] = {'\0'}; int nConnectID = 0; CString strData; m_txtConnectID.GetWindowText(strData); int nSrcLen = WideCharToMultiByte(CP_ACP, 0, strData, strData.GetLength(), NULL, 0, NULL, NULL); int nDecLen = WideCharToMultiByte(CP_ACP, 0, strData, nSrcLen, szConnectID, 100, NULL, NULL); szConnectID[nDecLen] = '\0'; nConnectID = atoi(szConnectID); SendSetLog(nConnectID, true); } void CDlgForbidenIP::OnBnClickedButton5() { //关闭日志 char szConnectID[100] = {'\0'}; int nConnectID = 0; CString strData; m_txtConnectID.GetWindowText(strData); int nSrcLen = WideCharToMultiByte(CP_ACP, 0, strData, strData.GetLength(), NULL, 0, NULL, NULL); int nDecLen = WideCharToMultiByte(CP_ACP, 0, strData, nSrcLen, szConnectID, 100, NULL, NULL); szConnectID[nDecLen] = '\0'; nConnectID = atoi(szConnectID); SendSetLog(nConnectID, false); } void CDlgForbidenIP::OnBnClickedButton7() { char szNickName[100] = {'\0'}; //查询别名 m_lcNickInfo.DeleteAllItems(); CString strData; m_txtNickName.GetWindowText(strData); int nSrcLen = WideCharToMultiByte(CP_ACP, 0, strData, strData.GetLength(), NULL, 0, NULL, NULL); int nDecLen = WideCharToMultiByte(CP_ACP, 0, strData, nSrcLen, szNickName, 100, NULL,NULL); szNickName[nDecLen] = '\0'; char szSendMessage[200] = {'\0'}; char szCommand[100] = {'\0'}; sprintf_s(szCommand, 100, "%s GetNickNameInfo -n %s", m_pTcpClientConnect->GetKey(), szNickName); int nSendLen = (int)strlen(szCommand); memcpy_s(szSendMessage, 200, &nSendLen, sizeof(int)); memcpy_s(&szSendMessage[4], 200, &szCommand, nSendLen); char szRecvBuff[10 * 1024] = {'\0'}; int nRecvLen = 10 * 1024; bool blState = m_pTcpClientConnect->SendConsoleMessage(szSendMessage, nSendLen + sizeof(int), (char*)szRecvBuff, nRecvLen); if(blState == false) { MessageBox(_T(MESSAGE_SENDERROR) , _T(MESSAGE_TITLE_ERROR), MB_OK); return; } else { int nStrLen = 0; int nPos = 0; int nForbidenCount = 0; memcpy_s(&nForbidenCount, sizeof(int), &szRecvBuff[nPos], sizeof(int)); nPos += sizeof(int); for(int i = 0; i < nForbidenCount; i++) { //开始还原数据结构 _ClientNameInfo ClientNameInfo; memcpy_s(&ClientNameInfo.m_nConnectID, sizeof(int), &szRecvBuff[nPos], sizeof(int)); nPos += sizeof(int); memcpy_s(&nStrLen, sizeof(char), &szRecvBuff[nPos], sizeof(char)); nPos += sizeof(char); memcpy_s(ClientNameInfo.m_szClientIP, nStrLen, &szRecvBuff[nPos], nStrLen); nPos += nStrLen; ClientNameInfo.m_szClientIP[nStrLen] = '\0'; memcpy_s(&ClientNameInfo.m_nPort, sizeof(int), &szRecvBuff[nPos], sizeof(int)); nPos += sizeof(int); memcpy_s(&nStrLen, sizeof(char), &szRecvBuff[nPos], sizeof(char)); nPos += sizeof(char); memcpy_s(ClientNameInfo.m_szName, nStrLen, &szRecvBuff[nPos], nStrLen); nPos += nStrLen; ClientNameInfo.m_szName[nStrLen] = '\0'; memcpy_s(&ClientNameInfo.m_nLog, sizeof(char), &szRecvBuff[nPos], sizeof(char)); nPos += sizeof(char); //显示在桌面上 wchar_t szClienIP[200] = {'\0'}; wchar_t szzNickName[100] = {'\0'}; int nSrcLen = MultiByteToWideChar(CP_ACP, 0, ClientNameInfo.m_szClientIP, -1, NULL, 0); int nDecLen = MultiByteToWideChar(CP_ACP, 0, ClientNameInfo.m_szClientIP, -1, szClienIP, 20); nSrcLen = MultiByteToWideChar(CP_ACP, 0, ClientNameInfo.m_szName, -1, NULL, 0); nDecLen = MultiByteToWideChar(CP_ACP, 0, ClientNameInfo.m_szName, -1, szzNickName, 100); CString strConnectID; CString strPort; strConnectID.Format(_T("%d"), ClientNameInfo.m_nConnectID); strPort.Format(_T("%d"), ClientNameInfo.m_nPort); m_lcNickInfo.InsertItem(i, strConnectID); m_lcNickInfo.SetItemText(i, 1, szzNickName); m_lcNickInfo.SetItemText(i, 2, szClienIP); m_lcNickInfo.SetItemText(i, 3, strPort); if(ClientNameInfo.m_nLog == 0) { m_lcNickInfo.SetItemText(i, 4, _T("未开启")); } else { m_lcNickInfo.SetItemText(i, 4, _T("开启")); } } } } bool CDlgForbidenIP::SendSetLog( int nConnectID, bool blFlag ) { char szSendMessage[200] = {'\0'}; char szCommand[100] = {'\0'}; int nResult = 0; if(blFlag == false) { sprintf_s(szCommand, 100, "%s SetConnectLog -n %d -f 0 ", m_pTcpClientConnect->GetKey(), nConnectID); } else { sprintf_s(szCommand, 100, "%s SetConnectLog -n %d -f 1 ", m_pTcpClientConnect->GetKey(), nConnectID); } int nSendLen = (int)strlen(szCommand); memcpy_s(szSendMessage, 200, &nSendLen, sizeof(int)); memcpy_s(&szSendMessage[4], 200, &szCommand, nSendLen); char szRecvBuff[10 * 1024] = {'\0'}; int nRecvLen = 10 * 1024; bool blState = m_pTcpClientConnect->SendConsoleMessage(szSendMessage, nSendLen + sizeof(int), (char*)szRecvBuff, nRecvLen); if(blState == false) { MessageBox(_T(MESSAGE_SENDERROR) , _T(MESSAGE_TITLE_ERROR), MB_OK); return false; } else { int nStrLen = 0; int nPos = 0; int nForbidenCount = 0; memcpy_s(&nResult, sizeof(int), &szRecvBuff[nPos], sizeof(int)); nPos += sizeof(int); MessageBox(_T(MESSAGE_RESULT_SUCCESS) , _T(MESSAGE_TITLE_SUCCESS), MB_OK); return true; } }
[ "freeeyes1226@gmail.com@f49f508c-0c2f-bbd7-3b2f-f17ad4634cb1" ]
freeeyes1226@gmail.com@f49f508c-0c2f-bbd7-3b2f-f17ad4634cb1
e56756a8626113c641083a38728b5500c020d059
eaaf2c0c7296814234ed800bb2edcb4c021e02e0
/TotalTabView.cpp
c9d6123a9a970a6ae9ad1b49a818e67a4f0b6eca
[]
no_license
TungHadwin/FileManager
81fcb1b67305b90c9991778aa59d4203fda55daf
2307279cb30d1efeb6b419e92c885eae7c2b3ae5
refs/heads/master
2021-01-19T09:38:00.054839
2016-03-18T07:38:26
2016-03-18T07:38:26
87,776,623
0
1
null
null
null
null
GB18030
C++
false
false
3,400
cpp
// TotalTabView.cpp : implementation file // #include "stdafx.h" #include "FileManager.h" #include "TotalTabView.h" #include "EmptyFileView.h" #include "EmptyFolderView.h" #include "TempCleanerView.h" #ifdef _DEBUG #define new DEBUG_NEW #endif #define EMPTY_FILE_INDEX 1 //#define HSF_INDEX 2 // CTotalTabView IMPLEMENT_DYNCREATE(CTotalTabView, CMultTabView) CTotalTabView::CTotalTabView() { } CTotalTabView::~CTotalTabView() { } BEGIN_MESSAGE_MAP(CTotalTabView, CMultTabView) ON_WM_MOUSEACTIVATE() ON_WM_CREATE() ON_REGISTERED_MESSAGE(AFX_WM_CHANGE_ACTIVE_TAB, &CMultTabView::OnChangeActiveTab) END_MESSAGE_MAP() // CTotalTabView diagnostics #ifdef _DEBUG void CTotalTabView::AssertValid() const { CMultTabView::AssertValid(); } void CTotalTabView::Dump(CDumpContext& dc) const { CMultTabView::Dump(dc); } CFileManagerDoc* CTotalTabView::GetDocument() const // 非调试版本是内联的 { ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CFileManagerDoc))); return (CFileManagerDoc*)m_pDocument; } #endif //_DEBUG // CTotalTabView message handlers int CTotalTabView::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CMultTabView::OnCreate(lpCreateStruct) == -1) return -1; //读取注册表 LoadRegedits(); CMFCTabCtrl* m_sbqwndTabs = AddTabCtrl(EMPTY_FILE_INDEX); if(m_sbqwndTabs!=NULL) { AddView(m_sbqwndTabs, RUNTIME_CLASS(CEmptyFileView), theApp.LoadString(IDS_EmptyFileManager), 0); AddView(m_sbqwndTabs, RUNTIME_CLASS(CEmptyFolderView), theApp.LoadString(IDS_EmptyFolderManager), 1); AddView(m_sbqwndTabs, RUNTIME_CLASS(CTempCleanerView), theApp.LoadString(IDS_TempCleaner), 2); } return 0; } void CTotalTabView::OnInitialUpdate() { CMultTabView::OnInitialUpdate(); ActiveEmptyFileManagerTabCtrl(); } //------------------------------------------------------------------------------------------- void CTotalTabView::ActiveEmptyFileManagerTabCtrl() { //激活界面 for(auto list_Iter=m_wndTabsList.begin(); list_Iter!=m_wndTabsList.end(); ++list_Iter) { if((*list_Iter)->m_TabIndex==EMPTY_FILE_INDEX) OnChangeActiveTab((*list_Iter)->m_nFirstActiveTab, (LPARAM)(*list_Iter)->m_wndTabs); } } void CTotalTabView::ShowCtrlPanel(bool en) { /*for(auto list_Iter=m_wndTabsList.begin(); list_Iter!=m_wndTabsList.end(); ++list_Iter) { if((*list_Iter)->m_TabIndex==SBQ_INDEX) { for(int i=0;i<3;i++) { CWnd* wnd = (*list_Iter)->m_wndTabs->GetTabWnd(i); CBasicDispView* pview = dynamic_cast<CBasicDispView*>(wnd); if(pview!=NULL) pview->ShowCtrlPanel(en); } } }*/ } void CTotalTabView::LoadRegedits() { /*CString base = theApp.GetRegistryBase(); theApp.SetRegistryBase(APP_REGISTBASE); m_hsfdisp_view=theApp.GetInt("Hsf_Disp_View",m_hsfdisp_view); theApp.SetRegistryBase(base);*/ } void CTotalTabView::SaveRegedits() { /*CString base = theApp.GetRegistryBase(); theApp.SetRegistryBase(APP_REGISTBASE); theApp.WriteInt("Hsf_Disp_View",m_hsfdisp_view); theApp.SetRegistryBase(base); //枚举view CMFCTabCtrl* wndTabs = GetTabCtrl(SBQ_INDEX); if(wndTabs!=NULL) { for(int k=0;k<3;k++) { CBasicDispView* pview = dynamic_cast<CBasicDispView*>( GetView(wndTabs, k)); if(pview!=NULL) pview->SaveRegedits(); } } wndTabs = GetTabCtrl(HSF_INDEX); if(wndTabs!=NULL) { CHsfDispView* pview = dynamic_cast<CHsfDispView*>( GetView(wndTabs, 0)); if(pview!=NULL) pview->SaveRegedits(); }*/ }
[ "donghongyong@live.cn" ]
donghongyong@live.cn
667d0d99437a19322311b3a88ce8af0f97a9041d
cf81585d4bca2a7e92d9786de50f73eb79826014
/Classes/Common/Player/Player.h
8c672eda6e630dbe5072db2792fa9b5b4014ef5e
[]
no_license
Davarg/Dark-Crusader-Escape-from-Hell
f320ba2ba3aa25b9d41fd84fc4f0f686034549b7
41b93ef4ea749f485df6cf7b72397dab9316b69e
refs/heads/master
2021-01-10T18:01:31.457254
2015-11-26T07:03:52
2015-11-26T07:03:52
46,909,399
1
0
null
null
null
null
UTF-8
C++
false
false
579
h
#ifndef __PLAYER_H__ #define __PLAYER_H__ #include <string> #include <cocos2d.h> #include <Box2D\Box2D.h> USING_NS_CC; class Player { private: static const std::string playerTexture; static const std::string playerC3B; Sprite3D *_sprite; b2Body *_physBody; bool _isJumped; public: enum PlayerCategoryBits { PLAYER_CATEGORY_BITS = 0x0020 }; Player(); void setPositionPxl(Vec3); bool isJumped() { return _isJumped; } Sprite3D* getSprite() { return _sprite; } b2Body* getPhysBody() { return _physBody; } void isJumped(bool flag) { _isJumped = flag; } }; #endif
[ "maka-dava@yandex.ru" ]
maka-dava@yandex.ru
03a839ca76580ed700c49dc911c0d6176df47e0b
882e80207604d9baba2ad84994c6ff9ef924c549
/source/main.cpp
c2ad46fb0ea3680fa2edb1cd62837b2bd1436390
[]
no_license
jakubWrobel94/SondowanieElektroOporowe
d0c631ae8e8aa928b6e8a12e786afec5ecee697d
af2094a52c974fa5d274b3b7229d90fc09588b91
refs/heads/master
2021-01-22T22:40:21.263544
2017-05-30T00:06:46
2017-05-30T00:06:46
92,784,897
0
0
null
null
null
null
UTF-8
C++
false
false
1,833
cpp
#include <iostream> #include<vector> #include<math.h> #include"RozkladOpornosci.h" #include <cstdlib> using namespace std; void interface(); //funkcja obslugujaca interfejs int main() { cout<< "Program wyliczajacy teoretyczna wartosc \nopornosci pozornej w profilowaniu elektro-oporowym "<<endl; interface(); } void interface() { double a; double h; double dx; double b; double ro1; double ro2; double I; cout<< "Podaj promien kuli [m] : "; cin >>a; cout <<endl<<"Podaj glebokosc zalegania kuli [m]: "; cin>>h; cout<<endl<<"Podaj krok pomiarowy [m]: "; cin>>dx; cout<<endl<<"Podaj rozuniecie elektrod w ukladzie Wenner'a [m]: "; cin>>b; cout<<endl<<"Podaj opornosc osrodka [Omm] : "; cin>>ro1; cout<<endl<<"Nacisnij 1 jesli chcesz podac opornosc kuli, jesli chcesz aby byla nieskonczona nacisnij 0 [1/0] : "; int i; cin>>i; if(i==1) { cout<<endl<<"Podaj opornosc kuli [Omm] : "; cin>>ro2; } else ro2=-99; cout<<endl<<"Podaj natezenie pradu [A] : "; cin>>I; RozkladOpornosci *pnt= new RozkladOpornosci(a,h,dx,b,ro1,ro2,I); cout<<endl<<"Chcesz zapisac wynik ?? [t/n] "; char odp; cin>>odp; if(odp== 't' || odp == 'T') { cout <<endl<<"Podaj nazwe pliku (pamietaj o koncowce .txt) : "; string filename; cin>>filename; pnt->zapisDoPliku(filename.c_str()); } cout<<endl<<"Wyswietlic wynik na konsoli ? [t/n]"; cin>>odp; if(odp== 't' || odp == 'T') { pnt->wypisz_V(); } cout<<endl<<"Wyjscie z programu : 1"; cout<<endl<<"Kolejne obliczenia : 2"<<endl; int i2; cin>>i2; switch(i2){ case 1 : return; case 2: system("cls"); delete pnt; interface(); } }
[ "jakub.wrobel94@gmail.com" ]
jakub.wrobel94@gmail.com
bb065c2653d33ff7a5a586cb98ca42be2493321b
fe9cda2a84d716795452e50ef469e1a86a1c1bbe
/src/algorithms/SortingAlgorithm.cpp
e323ac6456eaecb3c5406faabdaae820f4c35b1f
[ "Unlicense" ]
permissive
Bogdaner/SortingVisualizer
ce68c2970dc1478a7b99c9b0decdadc438e43f52
7fac2117f187f96793d4434c25babd2cfc71c5b9
refs/heads/master
2023-06-05T20:11:20.426102
2021-06-22T16:58:25
2021-06-22T17:00:30
379,201,793
0
0
null
null
null
null
UTF-8
C++
false
false
2,030
cpp
#include "SortingAlgorithm.hpp" using namespace std::chrono; void SortingAlgorithm::doSort(std::vector<unsigned int> &inputVec, std::mutex &dataMutex) { if (isSorting()) { return; } startSorting(inputVec.size()); algorithm(inputVec, dataMutex); stopSorting(); } // Static stuff below void SortingAlgorithm::waitForNextStep(const std::pair<unsigned int, unsigned int> accessedElements) { ++stats.swaps; stats.duration = duration_cast<milliseconds>(high_resolution_clock::now() - clock).count(); std::this_thread::sleep_for(milliseconds(stepDelay)); const std::lock_guard<std::mutex> gurad{ lastAccessedMutex }; lastAccessed.push_back(accessedElements.first); lastAccessed.push_back(accessedElements.second); while (lastAccessed.size() > maxLastAccessedStored) { lastAccessed.pop_front(); } } int SortingAlgorithm::isLastAccessed(unsigned int v) { const std::lock_guard<std::mutex> gurad{ lastAccessedMutex }; // Get first occurance of the v in the lastAccessed queue starting from the end of the queue auto rit = std::find(lastAccessed.rbegin(), lastAccessed.rend(), v); if (rit != lastAccessed.rend()) { return std::distance(std::begin(lastAccessed), rit.base()) - 1; } else { return -1; } } void SortingAlgorithm::startSorting(const size_t elems) { sorting.store(true); stats.swaps = 0; stats.elements = elems; clock = high_resolution_clock::now(); } void SortingAlgorithm::stopSorting() { sorting.store(false); stats = SortingStatistics{}; const std::lock_guard<std::mutex> gurad{ lastAccessedMutex }; lastAccessed.clear(); } unsigned int SortingAlgorithm::stepDelay = 1U; unsigned int SortingAlgorithm::maxLastAccessedStored = 10U; SortingStatistics SortingAlgorithm::stats{}; time_point<high_resolution_clock> SortingAlgorithm::clock{}; std::deque<unsigned int> SortingAlgorithm::lastAccessed{}; std::mutex SortingAlgorithm::lastAccessedMutex{}; std::atomic_bool SortingAlgorithm::sorting{ false };
[ "papierowski.adam@gmail.com" ]
papierowski.adam@gmail.com
66bc9b571936b0f81d3df780092194e560d62935
51d5b7ef841883d81826d4def8ebea1f00eee32d
/ExiledGame/Source/ExiledGame/ExiledGameHUD.cpp
d5c2a4e9d884f178db21c702595984baeae3c921
[]
no_license
Maxproz/Exiled
46b3a1e24e6fab43761e7ecb238a38183afcf0ff
bf9a6097f50eede1e10d6889873875de76cf7e21
refs/heads/master
2021-06-10T14:35:15.943853
2017-01-17T04:05:54
2017-01-17T04:05:54
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,015
cpp
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved. #include "ExiledGame.h" #include "ExiledGameHUD.h" #include "Engine/Canvas.h" #include "TextureResource.h" #include "CanvasItem.h" AExiledGameHUD::AExiledGameHUD() { // Set the crosshair texture static ConstructorHelpers::FObjectFinder<UTexture2D> CrosshiarTexObj(TEXT("/Game/FirstPerson/Textures/FirstPersonCrosshair")); CrosshairTex = CrosshiarTexObj.Object; } void AExiledGameHUD::DrawHUD() { Super::DrawHUD(); // Draw very simple crosshair // find center of the Canvas const FVector2D Center(Canvas->ClipX * 0.5f, Canvas->ClipY * 0.5f); // offset by half the texture's dimensions so that the center of the texture aligns with the center of the Canvas const FVector2D CrosshairDrawPosition( (Center.X), (Center.Y + 20.0f)); // draw the crosshair FCanvasTileItem TileItem( CrosshairDrawPosition, CrosshairTex->Resource, FLinearColor::White); TileItem.BlendMode = SE_BLEND_Translucent; Canvas->DrawItem( TileItem ); }
[ "maxdietz@hotmail.com" ]
maxdietz@hotmail.com
bdbec0b584561388ef2fb0b773fc2f937c503ca7
7ee32ddb0cdfdf1993aa4967e1045790690d7089
/Topcoder/SpecialCells.cpp
9af6960640af05b543ad0eeff10cfb5c723a546a
[]
no_license
ajimenezh/Programing-Contests
b9b91c31814875fd5544d63d7365b3fc20abd354
ad47d1f38b780de46997f16fbaa3338c9aca0e1a
refs/heads/master
2020-12-24T14:56:14.154367
2017-10-16T21:05:01
2017-10-16T21:05:01
11,746,917
1
2
null
null
null
null
UTF-8
C++
false
false
3,608
cpp
#include <iostream> #include <sstream> #include <vector> #include <string.h> #include <algorithm> #include <utility> #include <set> #include <map> #include <deque> #include <queue> #include <cmath> #include <cstdlib> #include <ctime> #include <cstdio> #include <stdio.h> using namespace std; #define rep(it,s) for(__typeof((s).begin()) it=(s).begin();it!=(s).end();it++) class SpecialCells { public: int guess(vector <int> x, vector <int> y) ; }; int SpecialCells::guess(vector <int> x, vector <int> y) { }; //BEGIN CUT HERE #include <ctime> #include <cmath> #include <string> #include <vector> #include <sstream> #include <iostream> #include <algorithm> using namespace std; int main(int argc, char* argv[]) { if (argc == 1) { cout << "Testing SpecialCells (450.0 points)" << endl << endl; for (int i = 0; i < 20; i++) { ostringstream s; s << argv[0] << " " << i; int exitCode = system(s.str().c_str()); if (exitCode) cout << "#" << i << ": Runtime Error" << endl; } int T = time(NULL)-1395321980; double PT = T/60.0, TT = 75.0; cout.setf(ios::fixed,ios::floatfield); cout.precision(2); cout << endl; cout << "Time : " << T/60 << " minutes " << T%60 << " secs" << endl; cout << "Score : " << 450.0*(.3+(.7*TT*TT)/(10.0*PT*PT+TT*TT)) << " points" << endl; } else { int _tc; istringstream(argv[1]) >> _tc; SpecialCells _obj; int _expected, _received; time_t _start = clock(); switch (_tc) { case 0: { int x[] = {1,2}; int y[] = {1,2}; _expected = 0; _received = _obj.guess(vector <int>(x, x+sizeof(x)/sizeof(int)), vector <int>(y, y+sizeof(y)/sizeof(int))); break; } case 1: { int x[] = {1,1,2}; int y[] = {1,2,1}; _expected = 3; _received = _obj.guess(vector <int>(x, x+sizeof(x)/sizeof(int)), vector <int>(y, y+sizeof(y)/sizeof(int))); break; } case 2: { int x[] = {1,2,1,2,1,2}; int y[] = {1,2,3,1,2,3}; _expected = 6; _received = _obj.guess(vector <int>(x, x+sizeof(x)/sizeof(int)), vector <int>(y, y+sizeof(y)/sizeof(int))); break; } case 3: { int x[] = {1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9}; int y[] = {1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3}; _expected = 9; _received = _obj.guess(vector <int>(x, x+sizeof(x)/sizeof(int)), vector <int>(y, y+sizeof(y)/sizeof(int))); break; } case 4: { int x[] = {1,100000}; int y[] = {1,100000}; _expected = 0; _received = _obj.guess(vector <int>(x, x+sizeof(x)/sizeof(int)), vector <int>(y, y+sizeof(y)/sizeof(int))); break; } /*case 5: { int x[] = ; int y[] = ; _expected = ; _received = _obj.guess(vector <int>(x, x+sizeof(x)/sizeof(int)), vector <int>(y, y+sizeof(y)/sizeof(int))); break; }*/ /*case 6: { int x[] = ; int y[] = ; _expected = ; _received = _obj.guess(vector <int>(x, x+sizeof(x)/sizeof(int)), vector <int>(y, y+sizeof(y)/sizeof(int))); break; }*/ /*case 7: { int x[] = ; int y[] = ; _expected = ; _received = _obj.guess(vector <int>(x, x+sizeof(x)/sizeof(int)), vector <int>(y, y+sizeof(y)/sizeof(int))); break; }*/ default: return 0; } cout.setf(ios::fixed,ios::floatfield); cout.precision(2); double _elapsed = (double)(clock()-_start)/CLOCKS_PER_SEC; if (_received == _expected) cout << "#" << _tc << ": Passed (" << _elapsed << " secs)" << endl; else { cout << "#" << _tc << ": Failed (" << _elapsed << " secs)" << endl; cout << " Expected: " << _expected << endl; cout << " Received: " << _received << endl; } } } //END CUT HERE
[ "alejandrojh90@gmail.com" ]
alejandrojh90@gmail.com
cef0fd37ebe4bb19de661063dcbfcd129679f066
e03ac6195b5817929e3f53740bdd0718d382467c
/src/Atributos.cpp
fab780e8c1312e9d84e792bd8c036e120ea43bf6
[]
no_license
KaueAlves/Grimorie-Tabuleiro
7cf1dc1ea487996c226fd78c3041afb728c1c01e
2b5903ae860545b120fef3b828ed7cd058b7cee1
refs/heads/master
2020-04-24T16:50:16.886828
2019-06-12T20:01:21
2019-06-12T20:01:21
172,123,681
0
0
null
2019-06-12T20:01:22
2019-02-22T19:31:25
C++
UTF-8
C++
false
false
1,125
cpp
#include "../headers/Atributos.h" Atributos::Atributos(){ this->hp = 100; this->iniciativa = 50; this->dano = 5; this->tempoRecarga = 5; this->alcance = 5; } Atributos::Atributos(vector<int> atributos_valores){ this->hp = atributos_valores[0]; this->iniciativa = atributos_valores[1]; this->dano = atributos_valores[2]; this->tempoRecarga = atributos_valores[3]; this->alcance = atributos_valores[4]; } Atributos::~Atributos(){} // Gets int Atributos::getHP(){ return this->hp; } int Atributos::getIniciativa(){ return this->iniciativa; } int Atributos::getDano(){ return this->dano; } int Atributos::getTempoRecarga(){ return this->tempoRecarga; } int Atributos::getAlcance(){ return this->alcance; } // Sets void Atributos::setHP( int hp){ this->hp = hp; } void Atributos::setIniciativa(int iniciativa){ this->iniciativa = iniciativa; } void Atributos::setDano(int dano){ this->dano = dano; } void Atributos::setTempoRecarga(int tempoRecarga){ this->hp = tempoRecarga; } void Atributos::setAlcance(int alcance){ this->alcance = alcance; }
[ "dkauealves2@gmail.com" ]
dkauealves2@gmail.com
22f929aefec447cd575ab65b4420933b4ce903c9
95dc70a29e3ccdfb5cecce1cd8099691d5b6bb5d
/leetcode/longest_common_prefix.cpp
ec0d57c3a00d1fc3fc609bf14dcd884c4acad06b
[]
no_license
hotbig/letmetry
b19ba07e551aabb58c405695f5ed2a7fc0f57fd7
1418022a0d63c2cad41435d30d54b5a01773b0e5
refs/heads/master
2020-05-22T06:54:50.252554
2016-11-01T14:26:25
2016-11-01T14:26:25
36,932,799
0
0
null
null
null
null
UTF-8
C++
false
false
1,703
cpp
#include<iostream> #include<vector> #include<string> using namespace std; class Solution{ public: string longestCommonPrefix(vector<string>& strs){ if(strs.size() == 0) return string(""); string common(strs[0]); vector<string>::iterator it; for(it = strs.begin()+1; it != strs.end(); it++) { int comm = common.size(); int newer = (*it).size(); if( comm > newer ) { common.erase(newer, comm-newer); comm = newer; } for(int i=0; i < comm; i++) { if(common[i] == (*it)[i]) { continue; } else { common.erase(i, comm-i); break; } } if(common.size()==0) break; } return common; } }; int main() { Solution s; vector<string> strs; strs.push_back("hee"); strs.push_back("hello"); strs.push_back("hxxxxxxxxxxxxxxxxxxxxxff"); cout << s.longestCommonPrefix(strs) << endl; vector<string> strs1; strs1.push_back("hee"); strs1.push_back("hello"); strs1.push_back("xxff"); cout << s.longestCommonPrefix(strs1) << endl; vector<string> strs2; strs2.push_back("aa"); strs2.push_back("aa"); strs2.push_back("a"); cout << s.longestCommonPrefix(strs2) << endl; return 0; }
[ "randyn.yang@gmail.com" ]
randyn.yang@gmail.com
d6d97466711ef41c71b09f6b4671d1b3d6d53f5f
0558e5e24d718fe78964ebe82eadc270f7013a7b
/Common/StopWatch.hpp
318802c7ae1c4607248b3e097f0f39f05c6c91f9
[]
no_license
spendola/CNeuralNetwork
0c57c206ec8fef9ea779f0be9facab9cf7f995f6
1ef4bace5777597c10760fb7be50af60add0666d
refs/heads/master
2020-04-12T10:09:37.478097
2016-11-04T02:06:11
2016-11-04T02:06:11
65,749,045
0
0
null
null
null
null
UTF-8
C++
false
false
417
hpp
// // StopWatch.hpp // NeuralNetworkManager // // Created by Sebastian Pendola on 8/15/16. // Copyright © 2016 Sebastian Pendola. All rights reserved. // #ifndef StopWatch_hpp #define StopWatch_hpp #include <stdio.h> #include <iostream> #include <ctime> class StopWatch { public: StopWatch(); ~StopWatch(); double GetElapsed(); private: std::clock_t start; }; #endif /* StopWatch_hpp */
[ "sebastianpendola@Sebastians-MacBook-Pro.local" ]
sebastianpendola@Sebastians-MacBook-Pro.local
4ba4b7b26e5edfa888b8100fa602eea7f4448c42
b96749359fe413046bb31678881b5ff5493bbb07
/c++/lab1/queue.cpp
e9ff3e28f7931a5c5971cce29e461326e2c63163
[ "MIT" ]
permissive
CodingHelpers/ValerySolomatin
6ceec041d6505386d2bf993c00ce5c7c9b8bf4cd
2b38e78073b52f370ea1c132b5f3fc93b407bfa6
refs/heads/master
2021-01-18T23:15:23.186959
2016-05-29T01:52:31
2016-05-29T01:52:31
55,101,105
0
0
null
null
null
null
UTF-8
C++
false
false
1,972
cpp
#include "queue.hpp" #include <stdexcept> Queue::Queue() : first(nullptr), last(nullptr), len(0) {} Queue::~Queue() { clear(); } void Queue::clear() { QueueNode* target; // Проходим в цикле пока first != nullptr while(first) { target = first; //< Сохраняем указатель на текущий элемент first = first->next; //< Переходим на следующий элемент delete target; //< Удаляем элемент по сохраненному указателю } first = nullptr; last = nullptr; len = 0; } void Queue::push(float value) { // Создаем новую ноду QueueNode* new_node = new QueueNode(value); // Если очередь пуста (нет первого элемента) if(!first) { // Делаем новый элемент первым и последним first = last = new_node; } else { // Иначе ставим новый элемент в конец очереди last->next = new_node; last = new_node; } // Увеличиваем счетчик элементов len++; } float Queue::pop() { // Проверяем случай, если очередь пуста if(!first) { // Если такое произошло, выкидываем исключение throw std::runtime_error("Queue is empty, can't pop"); } // Сохраняем указатель на первый элемент и значение QueueNode* node = first; float value = node->value; // Делаем первым элементом следующий за ним first = first->next; // Декрементируем длину len--; // Удаляем первый элемент delete node; return value; } size_t Queue::length() { return len; }
[ "lubinetsm@yandex.ru" ]
lubinetsm@yandex.ru
2e7d130e8b920afd45c8f8c40e31536b9d8a6034
f81f593553ad7295bd498e08ab3af44b83ed0be8
/src/main.cpp
ca3dadb6790679d96c7d8ec215e64ad9c4b4060d
[ "MIT", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
LumoCash2018/LumoCash
7038bbfa2fb4c0ab0a6c479cbfbf556656eb32cc
5fbaa077d63a643ce484ddf4fdada1fbc65651c6
refs/heads/master
2020-03-31T16:38:06.457344
2018-10-21T15:10:11
2018-10-21T15:10:11
152,383,389
0
1
null
null
null
null
UTF-8
C++
false
false
298,410
cpp
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers // Copyright (c) 2014-2017 The Dash Core developers // Copyright (c) 2018 The LumoCash developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "main.h" #include "addrman.h" #include "alert.h" #include "arith_uint256.h" #include "chainparams.h" #include "checkpoints.h" #include "checkqueue.h" #include "consensus/consensus.h" #include "consensus/merkle.h" #include "consensus/validation.h" #include "hash.h" #include "init.h" #include "merkleblock.h" #include "net.h" #include "policy/policy.h" #include "pow.h" #include "primitives/block.h" #include "primitives/transaction.h" #include "script/script.h" #include "script/sigcache.h" #include "script/standard.h" #include "tinyformat.h" #include "txdb.h" #include "txmempool.h" #include "ui_interface.h" #include "undo.h" #include "util.h" #include "spork.h" #include "utilmoneystr.h" #include "utilstrencodings.h" #include "validationinterface.h" #include "versionbits.h" #include "darksend.h" #include "governance.h" #include "instantx.h" #include "masternode-payments.h" #include "masternode-sync.h" #include "masternodeman.h" #include <sstream> #include <boost/algorithm/string/replace.hpp> #include <boost/filesystem.hpp> #include <boost/filesystem/fstream.hpp> #include <boost/lexical_cast.hpp> #include <boost/math/distributions/poisson.hpp> #include <boost/thread.hpp> using namespace std; #if defined(NDEBUG) # error "LumoCash cannot be compiled without assertions." #endif /** * Global state */ CCriticalSection cs_main; BlockMap mapBlockIndex; CChain chainActive; CBlockIndex *pindexBestHeader = NULL; int64_t nTimeBestReceived = 0; CWaitableCriticalSection csBestBlock; CConditionVariable cvBlockChange; int nScriptCheckThreads = 0; bool fImporting = false; bool fReindex = false; bool fTxIndex = true; bool fAddressIndex = false; bool fTimestampIndex = false; bool fSpentIndex = false; bool fHavePruned = false; bool fPruneMode = false; bool fIsBareMultisigStd = DEFAULT_PERMIT_BAREMULTISIG; bool fRequireStandard = true; unsigned int nBytesPerSigOp = DEFAULT_BYTES_PER_SIGOP; bool fCheckBlockIndex = false; bool fCheckpointsEnabled = DEFAULT_CHECKPOINTS_ENABLED; size_t nCoinCacheUsage = 2500 * 300; uint64_t nPruneTarget = 0; bool fAlerts = DEFAULT_ALERTS; bool fEnableReplacement = DEFAULT_ENABLE_REPLACEMENT; uint256 hashAssumeValid; /** Fees smaller than this (in duffs) are considered zero fee (for relaying, mining and transaction creation) */ CFeeRate minRelayTxFee = CFeeRate(DEFAULT_MIN_RELAY_TX_FEE); CTxMemPool mempool(::minRelayTxFee); struct COrphanTx { CTransaction tx; NodeId fromPeer; }; map<uint256, COrphanTx> mapOrphanTransactions GUARDED_BY(cs_main);; map<uint256, set<uint256> > mapOrphanTransactionsByPrev GUARDED_BY(cs_main);; map<uint256, int64_t> mapRejectedBlocks GUARDED_BY(cs_main); void EraseOrphansFor(NodeId peer) EXCLUSIVE_LOCKS_REQUIRED(cs_main); /** * Returns true if there are nRequired or more blocks of minVersion or above * in the last Consensus::Params::nMajorityWindow blocks, starting at pstart and going backwards. */ static bool IsSuperMajority(int minVersion, const CBlockIndex* pstart, unsigned nRequired, const Consensus::Params& consensusParams); static void CheckBlockIndex(const Consensus::Params& consensusParams); /** Constant stuff for coinbase transactions we create: */ CScript COINBASE_FLAGS; const string strMessageMagic = "LumoCashCoin Signed Message:\n"; // Internal stuff namespace { struct CBlockIndexWorkComparator { bool operator()(CBlockIndex *pa, CBlockIndex *pb) const { // First sort by most total work, ... if (pa->nChainWork > pb->nChainWork) return false; if (pa->nChainWork < pb->nChainWork) return true; // ... then by earliest time received, ... if (pa->nSequenceId < pb->nSequenceId) return false; if (pa->nSequenceId > pb->nSequenceId) return true; // Use pointer address as tie breaker (should only happen with blocks // loaded from disk, as those all have id 0). if (pa < pb) return false; if (pa > pb) return true; // Identical blocks. return false; } }; CBlockIndex *pindexBestInvalid; /** * The set of all CBlockIndex entries with BLOCK_VALID_TRANSACTIONS (for itself and all ancestors) and * as good as our current tip or better. Entries may be failed, though, and pruning nodes may be * missing the data for the block. */ set<CBlockIndex*, CBlockIndexWorkComparator> setBlockIndexCandidates; /** Number of nodes with fSyncStarted. */ int nSyncStarted = 0; /** All pairs A->B, where A (or one of its ancestors) misses transactions, but B has transactions. * Pruned nodes may have entries where B is missing data. */ multimap<CBlockIndex*, CBlockIndex*> mapBlocksUnlinked; CCriticalSection cs_LastBlockFile; std::vector<CBlockFileInfo> vinfoBlockFile; int nLastBlockFile = 0; /** Global flag to indicate we should check to see if there are * block/undo files that should be deleted. Set on startup * or if we allocate more file space when we're in prune mode */ bool fCheckForPruning = false; /** * Every received block is assigned a unique and increasing identifier, so we * know which one to give priority in case of a fork. */ CCriticalSection cs_nBlockSequenceId; /** Blocks loaded from disk are assigned id 0, so start the counter at 1. */ uint32_t nBlockSequenceId = 1; /** * Sources of received blocks, saved to be able to send them reject * messages or ban them when processing happens afterwards. Protected by * cs_main. */ map<uint256, NodeId> mapBlockSource; /** * Filter for transactions that were recently rejected by * AcceptToMemoryPool. These are not rerequested until the chain tip * changes, at which point the entire filter is reset. Protected by * cs_main. * * Without this filter we'd be re-requesting txs from each of our peers, * increasing bandwidth consumption considerably. For instance, with 100 * peers, half of which relay a tx we don't accept, that might be a 50x * bandwidth increase. A flooding attacker attempting to roll-over the * filter using minimum-sized, 60byte, transactions might manage to send * 1000/sec if we have fast peers, so we pick 120,000 to give our peers a * two minute window to send invs to us. * * Decreasing the false positive rate is fairly cheap, so we pick one in a * million to make it highly unlikely for users to have issues with this * filter. * * Memory used: 1.7MB */ boost::scoped_ptr<CRollingBloomFilter> recentRejects; uint256 hashRecentRejectsChainTip; /** Blocks that are in flight, and that are in the queue to be downloaded. Protected by cs_main. */ struct QueuedBlock { uint256 hash; CBlockIndex* pindex; //!< Optional. bool fValidatedHeaders; //!< Whether this block has validated headers at the time of request. }; map<uint256, pair<NodeId, list<QueuedBlock>::iterator> > mapBlocksInFlight; /** Number of preferable block download peers. */ int nPreferredDownload = 0; /** Dirty block index entries. */ set<CBlockIndex*> setDirtyBlockIndex; /** Dirty block file entries. */ set<int> setDirtyFileInfo; /** Number of peers from which we're downloading blocks. */ int nPeersWithValidatedDownloads = 0; } // anon namespace ////////////////////////////////////////////////////////////////////////////// // // Registration of network node signals. // namespace { struct CBlockReject { unsigned char chRejectCode; string strRejectReason; uint256 hashBlock; }; /** * Maintain validation-specific state about nodes, protected by cs_main, instead * by CNode's own locks. This simplifies asynchronous operation, where * processing of incoming data is done after the ProcessMessage call returns, * and we're no longer holding the node's locks. */ struct CNodeState { //! The peer's address CService address; //! Whether we have a fully established connection. bool fCurrentlyConnected; //! Accumulated misbehaviour score for this peer. int nMisbehavior; //! Whether this peer should be disconnected and banned (unless whitelisted). bool fShouldBan; //! String name of this peer (debugging/logging purposes). std::string name; //! List of asynchronously-determined block rejections to notify this peer about. std::vector<CBlockReject> rejects; //! The best known block we know this peer has announced. CBlockIndex *pindexBestKnownBlock; //! The hash of the last unknown block this peer has announced. uint256 hashLastUnknownBlock; //! The last full block we both have. CBlockIndex *pindexLastCommonBlock; //! The best header we have sent our peer. CBlockIndex *pindexBestHeaderSent; //! Whether we've started headers synchronization with this peer. bool fSyncStarted; //! Since when we're stalling block download progress (in microseconds), or 0. int64_t nStallingSince; list<QueuedBlock> vBlocksInFlight; //! When the first entry in vBlocksInFlight started downloading. Don't care when vBlocksInFlight is empty. int64_t nDownloadingSince; int nBlocksInFlight; int nBlocksInFlightValidHeaders; //! Whether we consider this a preferred download peer. bool fPreferredDownload; //! Whether this peer wants invs or headers (when possible) for block announcements. bool fPreferHeaders; CNodeState() { fCurrentlyConnected = false; nMisbehavior = 0; fShouldBan = false; pindexBestKnownBlock = NULL; hashLastUnknownBlock.SetNull(); pindexLastCommonBlock = NULL; pindexBestHeaderSent = NULL; fSyncStarted = false; nStallingSince = 0; nDownloadingSince = 0; nBlocksInFlight = 0; nBlocksInFlightValidHeaders = 0; fPreferredDownload = false; fPreferHeaders = false; } }; /** Map maintaining per-node state. Requires cs_main. */ map<NodeId, CNodeState> mapNodeState; // Requires cs_main. CNodeState *State(NodeId pnode) { map<NodeId, CNodeState>::iterator it = mapNodeState.find(pnode); if (it == mapNodeState.end()) return NULL; return &it->second; } int GetHeight() { LOCK(cs_main); return chainActive.Height(); } void UpdatePreferredDownload(CNode* node, CNodeState* state) { nPreferredDownload -= state->fPreferredDownload; // Whether this node should be marked as a preferred download node. state->fPreferredDownload = (!node->fInbound || node->fWhitelisted) && !node->fOneShot && !node->fClient; nPreferredDownload += state->fPreferredDownload; } void InitializeNode(NodeId nodeid, const CNode *pnode) { LOCK(cs_main); CNodeState &state = mapNodeState.insert(std::make_pair(nodeid, CNodeState())).first->second; state.name = pnode->addrName; state.address = pnode->addr; } void FinalizeNode(NodeId nodeid) { LOCK(cs_main); CNodeState *state = State(nodeid); if (state->fSyncStarted) nSyncStarted--; if (state->nMisbehavior == 0 && state->fCurrentlyConnected) { AddressCurrentlyConnected(state->address); } BOOST_FOREACH(const QueuedBlock& entry, state->vBlocksInFlight) { mapBlocksInFlight.erase(entry.hash); } EraseOrphansFor(nodeid); nPreferredDownload -= state->fPreferredDownload; nPeersWithValidatedDownloads -= (state->nBlocksInFlightValidHeaders != 0); assert(nPeersWithValidatedDownloads >= 0); mapNodeState.erase(nodeid); if (mapNodeState.empty()) { // Do a consistency check after the last peer is removed. assert(mapBlocksInFlight.empty()); assert(nPreferredDownload == 0); assert(nPeersWithValidatedDownloads == 0); } } // Requires cs_main. // Returns a bool indicating whether we requested this block. bool MarkBlockAsReceived(const uint256& hash) { map<uint256, pair<NodeId, list<QueuedBlock>::iterator> >::iterator itInFlight = mapBlocksInFlight.find(hash); if (itInFlight != mapBlocksInFlight.end()) { CNodeState *state = State(itInFlight->second.first); state->nBlocksInFlightValidHeaders -= itInFlight->second.second->fValidatedHeaders; if (state->nBlocksInFlightValidHeaders == 0 && itInFlight->second.second->fValidatedHeaders) { // Last validated block on the queue was received. nPeersWithValidatedDownloads--; } if (state->vBlocksInFlight.begin() == itInFlight->second.second) { // First block on the queue was received, update the start download time for the next one state->nDownloadingSince = std::max(state->nDownloadingSince, GetTimeMicros()); } state->vBlocksInFlight.erase(itInFlight->second.second); state->nBlocksInFlight--; state->nStallingSince = 0; mapBlocksInFlight.erase(itInFlight); return true; } return false; } // Requires cs_main. void MarkBlockAsInFlight(NodeId nodeid, const uint256& hash, const Consensus::Params& consensusParams, CBlockIndex *pindex = NULL) { CNodeState *state = State(nodeid); assert(state != NULL); // Make sure it's not listed somewhere already. MarkBlockAsReceived(hash); QueuedBlock newentry = {hash, pindex, pindex != NULL}; list<QueuedBlock>::iterator it = state->vBlocksInFlight.insert(state->vBlocksInFlight.end(), newentry); state->nBlocksInFlight++; state->nBlocksInFlightValidHeaders += newentry.fValidatedHeaders; if (state->nBlocksInFlight == 1) { // We're starting a block download (batch) from this peer. state->nDownloadingSince = GetTimeMicros(); } if (state->nBlocksInFlightValidHeaders == 1 && pindex != NULL) { nPeersWithValidatedDownloads++; } mapBlocksInFlight[hash] = std::make_pair(nodeid, it); } /** Check whether the last unknown block a peer advertised is not yet known. */ void ProcessBlockAvailability(NodeId nodeid) { CNodeState *state = State(nodeid); assert(state != NULL); if (!state->hashLastUnknownBlock.IsNull()) { BlockMap::iterator itOld = mapBlockIndex.find(state->hashLastUnknownBlock); if (itOld != mapBlockIndex.end() && itOld->second->nChainWork > 0) { if (state->pindexBestKnownBlock == NULL || itOld->second->nChainWork >= state->pindexBestKnownBlock->nChainWork) state->pindexBestKnownBlock = itOld->second; state->hashLastUnknownBlock.SetNull(); } } } /** Update tracking information about which blocks a peer is assumed to have. */ void UpdateBlockAvailability(NodeId nodeid, const uint256 &hash) { CNodeState *state = State(nodeid); assert(state != NULL); ProcessBlockAvailability(nodeid); BlockMap::iterator it = mapBlockIndex.find(hash); if (it != mapBlockIndex.end() && it->second->nChainWork > 0) { // An actually better block was announced. if (state->pindexBestKnownBlock == NULL || it->second->nChainWork >= state->pindexBestKnownBlock->nChainWork) state->pindexBestKnownBlock = it->second; } else { // An unknown block was announced; just assume that the latest one is the best one. state->hashLastUnknownBlock = hash; } } // Requires cs_main bool CanDirectFetch(const Consensus::Params &consensusParams) { return chainActive.Tip()->GetBlockTime() > GetAdjustedTime() - consensusParams.nPowTargetSpacing * 20; } // Requires cs_main bool PeerHasHeader(CNodeState *state, CBlockIndex *pindex) { if (state->pindexBestKnownBlock && pindex == state->pindexBestKnownBlock->GetAncestor(pindex->nHeight)) return true; if (state->pindexBestHeaderSent && pindex == state->pindexBestHeaderSent->GetAncestor(pindex->nHeight)) return true; return false; } /** Find the last common ancestor two blocks have. * Both pa and pb must be non-NULL. */ CBlockIndex* LastCommonAncestor(CBlockIndex* pa, CBlockIndex* pb) { if (pa->nHeight > pb->nHeight) { pa = pa->GetAncestor(pb->nHeight); } else if (pb->nHeight > pa->nHeight) { pb = pb->GetAncestor(pa->nHeight); } while (pa != pb && pa && pb) { pa = pa->pprev; pb = pb->pprev; } // Eventually all chain branches meet at the genesis block. assert(pa == pb); return pa; } /** Update pindexLastCommonBlock and add not-in-flight missing successors to vBlocks, until it has * at most count entries. */ void FindNextBlocksToDownload(NodeId nodeid, unsigned int count, std::vector<CBlockIndex*>& vBlocks, NodeId& nodeStaller) { if (count == 0) return; vBlocks.reserve(vBlocks.size() + count); CNodeState *state = State(nodeid); assert(state != NULL); // Make sure pindexBestKnownBlock is up to date, we'll need it. ProcessBlockAvailability(nodeid); if (state->pindexBestKnownBlock == NULL || state->pindexBestKnownBlock->nChainWork < chainActive.Tip()->nChainWork) { // This peer has nothing interesting. return; } if (state->pindexLastCommonBlock == NULL) { // Bootstrap quickly by guessing a parent of our best tip is the forking point. // Guessing wrong in either direction is not a problem. state->pindexLastCommonBlock = chainActive[std::min(state->pindexBestKnownBlock->nHeight, chainActive.Height())]; } // If the peer reorganized, our previous pindexLastCommonBlock may not be an ancestor // of its current tip anymore. Go back enough to fix that. state->pindexLastCommonBlock = LastCommonAncestor(state->pindexLastCommonBlock, state->pindexBestKnownBlock); if (state->pindexLastCommonBlock == state->pindexBestKnownBlock) return; std::vector<CBlockIndex*> vToFetch; CBlockIndex *pindexWalk = state->pindexLastCommonBlock; // Never fetch further than the best block we know the peer has, or more than BLOCK_DOWNLOAD_WINDOW + 1 beyond the last // linked block we have in common with this peer. The +1 is so we can detect stalling, namely if we would be able to // download that next block if the window were 1 larger. int nWindowEnd = state->pindexLastCommonBlock->nHeight + BLOCK_DOWNLOAD_WINDOW; int nMaxHeight = std::min<int>(state->pindexBestKnownBlock->nHeight, nWindowEnd + 1); NodeId waitingfor = -1; while (pindexWalk->nHeight < nMaxHeight) { // Read up to 128 (or more, if more blocks than that are needed) successors of pindexWalk (towards // pindexBestKnownBlock) into vToFetch. We fetch 128, because CBlockIndex::GetAncestor may be as expensive // as iterating over ~100 CBlockIndex* entries anyway. int nToFetch = std::min(nMaxHeight - pindexWalk->nHeight, std::max<int>(count - vBlocks.size(), 128)); vToFetch.resize(nToFetch); pindexWalk = state->pindexBestKnownBlock->GetAncestor(pindexWalk->nHeight + nToFetch); vToFetch[nToFetch - 1] = pindexWalk; for (unsigned int i = nToFetch - 1; i > 0; i--) { vToFetch[i - 1] = vToFetch[i]->pprev; } // Iterate over those blocks in vToFetch (in forward direction), adding the ones that // are not yet downloaded and not in flight to vBlocks. In the mean time, update // pindexLastCommonBlock as long as all ancestors are already downloaded, or if it's // already part of our chain (and therefore don't need it even if pruned). BOOST_FOREACH(CBlockIndex* pindex, vToFetch) { if (!pindex->IsValid(BLOCK_VALID_TREE)) { // We consider the chain that this peer is on invalid. return; } if (pindex->nStatus & BLOCK_HAVE_DATA || chainActive.Contains(pindex)) { if (pindex->nChainTx) state->pindexLastCommonBlock = pindex; } else if (mapBlocksInFlight.count(pindex->GetBlockHash()) == 0) { // The block is not already downloaded, and not yet in flight. if (pindex->nHeight > nWindowEnd) { // We reached the end of the window. if (vBlocks.size() == 0 && waitingfor != nodeid) { // We aren't able to fetch anything, but we would be if the download window was one larger. nodeStaller = waitingfor; } return; } vBlocks.push_back(pindex); if (vBlocks.size() == count) { return; } } else if (waitingfor == -1) { // This is the first already-in-flight block. waitingfor = mapBlocksInFlight[pindex->GetBlockHash()].first; } } } } } // anon namespace bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats) { LOCK(cs_main); CNodeState *state = State(nodeid); if (state == NULL) return false; stats.nMisbehavior = state->nMisbehavior; stats.nSyncHeight = state->pindexBestKnownBlock ? state->pindexBestKnownBlock->nHeight : -1; stats.nCommonHeight = state->pindexLastCommonBlock ? state->pindexLastCommonBlock->nHeight : -1; BOOST_FOREACH(const QueuedBlock& queue, state->vBlocksInFlight) { if (queue.pindex) stats.vHeightInFlight.push_back(queue.pindex->nHeight); } return true; } void RegisterNodeSignals(CNodeSignals& nodeSignals) { nodeSignals.GetHeight.connect(&GetHeight); nodeSignals.ProcessMessages.connect(&ProcessMessages); nodeSignals.SendMessages.connect(&SendMessages); nodeSignals.InitializeNode.connect(&InitializeNode); nodeSignals.FinalizeNode.connect(&FinalizeNode); } void UnregisterNodeSignals(CNodeSignals& nodeSignals) { nodeSignals.GetHeight.disconnect(&GetHeight); nodeSignals.ProcessMessages.disconnect(&ProcessMessages); nodeSignals.SendMessages.disconnect(&SendMessages); nodeSignals.InitializeNode.disconnect(&InitializeNode); nodeSignals.FinalizeNode.disconnect(&FinalizeNode); } CBlockIndex* FindForkInGlobalIndex(const CChain& chain, const CBlockLocator& locator) { // Find the first block the caller has in the main chain BOOST_FOREACH(const uint256& hash, locator.vHave) { BlockMap::iterator mi = mapBlockIndex.find(hash); if (mi != mapBlockIndex.end()) { CBlockIndex* pindex = (*mi).second; if (chain.Contains(pindex)) return pindex; } } return chain.Genesis(); } CCoinsViewCache *pcoinsTip = NULL; CBlockTreeDB *pblocktree = NULL; ////////////////////////////////////////////////////////////////////////////// // // mapOrphanTransactions // bool AddOrphanTx(const CTransaction& tx, NodeId peer) EXCLUSIVE_LOCKS_REQUIRED(cs_main) { uint256 hash = tx.GetHash(); if (mapOrphanTransactions.count(hash)) return false; // Ignore big transactions, to avoid a // send-big-orphans memory exhaustion attack. If a peer has a legitimate // large transaction with a missing parent then we assume // it will rebroadcast it later, after the parent transaction(s) // have been mined or received. // 10,000 orphans, each of which is at most 5,000 bytes big is // at most 500 megabytes of orphans: unsigned int sz = tx.GetSerializeSize(SER_NETWORK, CTransaction::CURRENT_VERSION); if (sz > 5000) { LogPrint("mempool", "ignoring large orphan tx (size: %u, hash: %s)\n", sz, hash.ToString()); return false; } mapOrphanTransactions[hash].tx = tx; mapOrphanTransactions[hash].fromPeer = peer; BOOST_FOREACH(const CTxIn& txin, tx.vin) mapOrphanTransactionsByPrev[txin.prevout.hash].insert(hash); LogPrint("mempool", "stored orphan tx %s (mapsz %u prevsz %u)\n", hash.ToString(), mapOrphanTransactions.size(), mapOrphanTransactionsByPrev.size()); return true; } void static EraseOrphanTx(uint256 hash) EXCLUSIVE_LOCKS_REQUIRED(cs_main) { map<uint256, COrphanTx>::iterator it = mapOrphanTransactions.find(hash); if (it == mapOrphanTransactions.end()) return; BOOST_FOREACH(const CTxIn& txin, it->second.tx.vin) { map<uint256, set<uint256> >::iterator itPrev = mapOrphanTransactionsByPrev.find(txin.prevout.hash); if (itPrev == mapOrphanTransactionsByPrev.end()) continue; itPrev->second.erase(hash); if (itPrev->second.empty()) mapOrphanTransactionsByPrev.erase(itPrev); } mapOrphanTransactions.erase(it); } void EraseOrphansFor(NodeId peer) { int nErased = 0; map<uint256, COrphanTx>::iterator iter = mapOrphanTransactions.begin(); while (iter != mapOrphanTransactions.end()) { map<uint256, COrphanTx>::iterator maybeErase = iter++; // increment to avoid iterator becoming invalid if (maybeErase->second.fromPeer == peer) { EraseOrphanTx(maybeErase->second.tx.GetHash()); ++nErased; } } if (nErased > 0) LogPrint("mempool", "Erased %d orphan tx from peer %d\n", nErased, peer); } unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans) EXCLUSIVE_LOCKS_REQUIRED(cs_main) { unsigned int nEvicted = 0; while (mapOrphanTransactions.size() > nMaxOrphans) { // Evict a random orphan: uint256 randomhash = GetRandHash(); map<uint256, COrphanTx>::iterator it = mapOrphanTransactions.lower_bound(randomhash); if (it == mapOrphanTransactions.end()) it = mapOrphanTransactions.begin(); EraseOrphanTx(it->first); ++nEvicted; } return nEvicted; } bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime) { if (tx.nLockTime == 0) return true; if ((int64_t)tx.nLockTime < ((int64_t)tx.nLockTime < LOCKTIME_THRESHOLD ? (int64_t)nBlockHeight : nBlockTime)) return true; BOOST_FOREACH(const CTxIn& txin, tx.vin) { if (!(txin.nSequence == CTxIn::SEQUENCE_FINAL)) return false; } return true; } bool CheckFinalTx(const CTransaction &tx, int flags) { AssertLockHeld(cs_main); // By convention a negative value for flags indicates that the // current network-enforced consensus rules should be used. In // a future soft-fork scenario that would mean checking which // rules would be enforced for the next block and setting the // appropriate flags. At the present time no soft-forks are // scheduled, so no flags are set. flags = std::max(flags, 0); // CheckFinalTx() uses chainActive.Height()+1 to evaluate // nLockTime because when IsFinalTx() is called within // CBlock::AcceptBlock(), the height of the block *being* // evaluated is what is used. Thus if we want to know if a // transaction can be part of the *next* block, we need to call // IsFinalTx() with one more than chainActive.Height(). const int nBlockHeight = chainActive.Height() + 1; // BIP113 will require that time-locked transactions have nLockTime set to // less than the median time of the previous block they're contained in. // When the next block is created its previous block will be the current // chain tip, so we use that to calculate the median time passed to // IsFinalTx() if LOCKTIME_MEDIAN_TIME_PAST is set. const int64_t nBlockTime = (flags & LOCKTIME_MEDIAN_TIME_PAST) ? chainActive.Tip()->GetMedianTimePast() : GetAdjustedTime(); return IsFinalTx(tx, nBlockHeight, nBlockTime); } /** * Calculates the block height and previous block's median time past at * which the transaction will be considered final in the context of BIP 68. * Also removes from the vector of input heights any entries which did not * correspond to sequence locked inputs as they do not affect the calculation. */ static std::pair<int, int64_t> CalculateSequenceLocks(const CTransaction &tx, int flags, std::vector<int>* prevHeights, const CBlockIndex& block) { assert(prevHeights->size() == tx.vin.size()); // Will be set to the equivalent height- and time-based nLockTime // values that would be necessary to satisfy all relative lock- // time constraints given our view of block chain history. // The semantics of nLockTime are the last invalid height/time, so // use -1 to have the effect of any height or time being valid. int nMinHeight = -1; int64_t nMinTime = -1; // tx.nVersion is signed integer so requires cast to unsigned otherwise // we would be doing a signed comparison and half the range of nVersion // wouldn't support BIP 68. bool fEnforceBIP68 = static_cast<uint32_t>(tx.nVersion) >= 2 && flags & LOCKTIME_VERIFY_SEQUENCE; // Do not enforce sequence numbers as a relative lock time // unless we have been instructed to if (!fEnforceBIP68) { return std::make_pair(nMinHeight, nMinTime); } for (size_t txinIndex = 0; txinIndex < tx.vin.size(); txinIndex++) { const CTxIn& txin = tx.vin[txinIndex]; // Sequence numbers with the most significant bit set are not // treated as relative lock-times, nor are they given any // consensus-enforced meaning at this point. if (txin.nSequence & CTxIn::SEQUENCE_LOCKTIME_DISABLE_FLAG) { // The height of this input is not relevant for sequence locks (*prevHeights)[txinIndex] = 0; continue; } int nCoinHeight = (*prevHeights)[txinIndex]; if (txin.nSequence & CTxIn::SEQUENCE_LOCKTIME_TYPE_FLAG) { int64_t nCoinTime = block.GetAncestor(std::max(nCoinHeight-1, 0))->GetMedianTimePast(); // NOTE: Subtract 1 to maintain nLockTime semantics // BIP 68 relative lock times have the semantics of calculating // the first block or time at which the transaction would be // valid. When calculating the effective block time or height // for the entire transaction, we switch to using the // semantics of nLockTime which is the last invalid block // time or height. Thus we subtract 1 from the calculated // time or height. // Time-based relative lock-times are measured from the // smallest allowed timestamp of the block containing the // txout being spent, which is the median time past of the // block prior. nMinTime = std::max(nMinTime, nCoinTime + (int64_t)((txin.nSequence & CTxIn::SEQUENCE_LOCKTIME_MASK) << CTxIn::SEQUENCE_LOCKTIME_GRANULARITY) - 1); } else { nMinHeight = std::max(nMinHeight, nCoinHeight + (int)(txin.nSequence & CTxIn::SEQUENCE_LOCKTIME_MASK) - 1); } } return std::make_pair(nMinHeight, nMinTime); } static bool EvaluateSequenceLocks(const CBlockIndex& block, std::pair<int, int64_t> lockPair) { assert(block.pprev); int64_t nBlockTime = block.pprev->GetMedianTimePast(); if (lockPair.first >= block.nHeight || lockPair.second >= nBlockTime) return false; return true; } bool SequenceLocks(const CTransaction &tx, int flags, std::vector<int>* prevHeights, const CBlockIndex& block) { return EvaluateSequenceLocks(block, CalculateSequenceLocks(tx, flags, prevHeights, block)); } bool TestLockPointValidity(const LockPoints* lp) { AssertLockHeld(cs_main); assert(lp); // If there are relative lock times then the maxInputBlock will be set // If there are no relative lock times, the LockPoints don't depend on the chain if (lp->maxInputBlock) { // Check whether chainActive is an extension of the block at which the LockPoints // calculation was valid. If not LockPoints are no longer valid if (!chainActive.Contains(lp->maxInputBlock)) { return false; } } // LockPoints still valid return true; } bool CheckSequenceLocks(const CTransaction &tx, int flags, LockPoints* lp, bool useExistingLockPoints) { AssertLockHeld(cs_main); AssertLockHeld(mempool.cs); CBlockIndex* tip = chainActive.Tip(); CBlockIndex index; index.pprev = tip; // CheckSequenceLocks() uses chainActive.Height()+1 to evaluate // height based locks because when SequenceLocks() is called within // ConnectBlock(), the height of the block *being* // evaluated is what is used. // Thus if we want to know if a transaction can be part of the // *next* block, we need to use one more than chainActive.Height() index.nHeight = tip->nHeight + 1; std::pair<int, int64_t> lockPair; if (useExistingLockPoints) { assert(lp); lockPair.first = lp->height; lockPair.second = lp->time; } else { // pcoinsTip contains the UTXO set for chainActive.Tip() CCoinsViewMemPool viewMemPool(pcoinsTip, mempool); std::vector<int> prevheights; prevheights.resize(tx.vin.size()); for (size_t txinIndex = 0; txinIndex < tx.vin.size(); txinIndex++) { const CTxIn& txin = tx.vin[txinIndex]; CCoins coins; if (!viewMemPool.GetCoins(txin.prevout.hash, coins)) { return error("%s: Missing input", __func__); } if (coins.nHeight == MEMPOOL_HEIGHT) { // Assume all mempool transaction confirm in the next block prevheights[txinIndex] = tip->nHeight + 1; } else { prevheights[txinIndex] = coins.nHeight; } } lockPair = CalculateSequenceLocks(tx, flags, &prevheights, index); if (lp) { lp->height = lockPair.first; lp->time = lockPair.second; // Also store the hash of the block with the highest height of // all the blocks which have sequence locked prevouts. // This hash needs to still be on the chain // for these LockPoint calculations to be valid // Note: It is impossible to correctly calculate a maxInputBlock // if any of the sequence locked inputs depend on unconfirmed txs, // except in the special case where the relative lock time/height // is 0, which is equivalent to no sequence lock. Since we assume // input height of tip+1 for mempool txs and test the resulting // lockPair from CalculateSequenceLocks against tip+1. We know // EvaluateSequenceLocks will fail if there was a non-zero sequence // lock on a mempool input, so we can use the return value of // CheckSequenceLocks to indicate the LockPoints validity int maxInputHeight = 0; BOOST_FOREACH(int height, prevheights) { // Can ignore mempool inputs since we'll fail if they had non-zero locks if (height != tip->nHeight+1) { maxInputHeight = std::max(maxInputHeight, height); } } lp->maxInputBlock = tip->GetAncestor(maxInputHeight); } } return EvaluateSequenceLocks(index, lockPair); } unsigned int GetLegacySigOpCount(const CTransaction& tx) { unsigned int nSigOps = 0; BOOST_FOREACH(const CTxIn& txin, tx.vin) { nSigOps += txin.scriptSig.GetSigOpCount(false); } BOOST_FOREACH(const CTxOut& txout, tx.vout) { nSigOps += txout.scriptPubKey.GetSigOpCount(false); } return nSigOps; } unsigned int GetP2SHSigOpCount(const CTransaction& tx, const CCoinsViewCache& inputs) { if (tx.IsCoinBase()) return 0; unsigned int nSigOps = 0; for (unsigned int i = 0; i < tx.vin.size(); i++) { const CTxOut &prevout = inputs.GetOutputFor(tx.vin[i]); if (prevout.scriptPubKey.IsPayToScriptHash()) nSigOps += prevout.scriptPubKey.GetSigOpCount(tx.vin[i].scriptSig); } return nSigOps; } int GetUTXOHeight(const COutPoint& outpoint) { LOCK(cs_main); CCoins coins; if(!pcoinsTip->GetCoins(outpoint.hash, coins) || (unsigned int)outpoint.n>=coins.vout.size() || coins.vout[outpoint.n].IsNull()) { return -1; } return coins.nHeight; } int GetInputAge(const CTxIn &txin) { CCoinsView viewDummy; CCoinsViewCache view(&viewDummy); { LOCK(mempool.cs); CCoinsViewMemPool viewMempool(pcoinsTip, mempool); view.SetBackend(viewMempool); // temporarily switch cache backend to db+mempool view const CCoins* coins = view.AccessCoins(txin.prevout.hash); if (coins) { if(coins->nHeight < 0) return 0; return chainActive.Height() - coins->nHeight + 1; } else { return -1; } } } int GetInputAgeIX(const uint256 &nTXHash, const CTxIn &txin) { int nResult = GetInputAge(txin); if(nResult < 0) return -1; if (nResult < 6 && instantsend.IsLockedInstantSendTransaction(nTXHash)) return nInstantSendDepth + nResult; return nResult; } int GetIXConfirmations(const uint256 &nTXHash) { if (instantsend.IsLockedInstantSendTransaction(nTXHash)) return nInstantSendDepth; return 0; } bool CheckTransaction(const CTransaction& tx, CValidationState &state) { // Basic checks that don't depend on any context if (tx.vin.empty()) return state.DoS(10, false, REJECT_INVALID, "bad-txns-vin-empty"); if (tx.vout.empty()) return state.DoS(10, false, REJECT_INVALID, "bad-txns-vout-empty"); // Size limits if (::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION) > MAX_BLOCK_SIZE) return state.DoS(100, false, REJECT_INVALID, "bad-txns-oversize"); // Check for negative or overflow output values CAmount nValueOut = 0; BOOST_FOREACH(const CTxOut& txout, tx.vout) { if (txout.nValue < 0) return state.DoS(100, false, REJECT_INVALID, "bad-txns-vout-negative"); if (txout.nValue > MAX_MONEY) return state.DoS(100, false, REJECT_INVALID, "bad-txns-vout-toolarge"); nValueOut += txout.nValue; if (!MoneyRange(nValueOut)) return state.DoS(100, false, REJECT_INVALID, "bad-txns-txouttotal-toolarge"); } // Check for duplicate inputs set<COutPoint> vInOutPoints; BOOST_FOREACH(const CTxIn& txin, tx.vin) { if (vInOutPoints.count(txin.prevout)) return state.DoS(100, false, REJECT_INVALID, "bad-txns-inputs-duplicate"); vInOutPoints.insert(txin.prevout); } if (tx.IsCoinBase()) { if (tx.vin[0].scriptSig.size() < 2 || tx.vin[0].scriptSig.size() > 100) return state.DoS(100, false, REJECT_INVALID, "bad-cb-length"); } else { BOOST_FOREACH(const CTxIn& txin, tx.vin) if (txin.prevout.IsNull()) return state.DoS(10, false, REJECT_INVALID, "bad-txns-prevout-null"); } return true; } void LimitMempoolSize(CTxMemPool& pool, size_t limit, unsigned long age) { int expired = pool.Expire(GetTime() - age); if (expired != 0) LogPrint("mempool", "Expired %i transactions from the memory pool\n", expired); std::vector<uint256> vNoSpendsRemaining; pool.TrimToSize(limit, &vNoSpendsRemaining); BOOST_FOREACH(const uint256& removed, vNoSpendsRemaining) pcoinsTip->Uncache(removed); } /** Convert CValidationState to a human-readable message for logging */ std::string FormatStateMessage(const CValidationState &state) { return strprintf("%s%s (code %i)", state.GetRejectReason(), state.GetDebugMessage().empty() ? "" : ", "+state.GetDebugMessage(), state.GetRejectCode()); } bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree, bool* pfMissingInputs, bool fOverrideMempoolLimit, bool fRejectAbsurdFee, std::vector<uint256>& vHashTxnToUncache, bool fDryRun) { AssertLockHeld(cs_main); if (pfMissingInputs) *pfMissingInputs = false; if (!CheckTransaction(tx, state)) return false; // Coinbase is only valid in a block, not as a loose transaction if (tx.IsCoinBase()) return state.DoS(100, false, REJECT_INVALID, "coinbase"); // Rather not work on nonstandard transactions (unless -testnet/-regtest) string reason; if (fRequireStandard && !IsStandardTx(tx, reason)) return state.DoS(0, false, REJECT_NONSTANDARD, reason); // Don't relay version 2 transactions until CSV is active, and we can be // sure that such transactions will be mined (unless we're on // -testnet/-regtest). const CChainParams& chainparams = Params(); if (fRequireStandard && tx.nVersion >= 2 && VersionBitsTipState(chainparams.GetConsensus(), Consensus::DEPLOYMENT_CSV) != THRESHOLD_ACTIVE) { return state.DoS(0, false, REJECT_NONSTANDARD, "premature-version2-tx"); } // Only accept nLockTime-using transactions that can be mined in the next // block; we don't want our mempool filled up with transactions that can't // be mined yet. if (!CheckFinalTx(tx, STANDARD_LOCKTIME_VERIFY_FLAGS)) return state.DoS(0, false, REJECT_NONSTANDARD, "non-final"); // is it already in the memory pool? uint256 hash = tx.GetHash(); if (pool.exists(hash)) return state.Invalid(false, REJECT_ALREADY_KNOWN, "txn-already-in-mempool"); // If this is a Transaction Lock Request check to see if it's valid if(instantsend.HasTxLockRequest(hash) && !CTxLockRequest(tx).IsValid()) return state.DoS(10, error("AcceptToMemoryPool : CTxLockRequest %s is invalid", hash.ToString()), REJECT_INVALID, "bad-txlockrequest"); // Check for conflicts with a completed Transaction Lock BOOST_FOREACH(const CTxIn &txin, tx.vin) { uint256 hashLocked; if(instantsend.GetLockedOutPointTxHash(txin.prevout, hashLocked) && hash != hashLocked) return state.DoS(10, error("AcceptToMemoryPool : Transaction %s conflicts with completed Transaction Lock %s", hash.ToString(), hashLocked.ToString()), REJECT_INVALID, "tx-txlock-conflict"); } // Check for conflicts with in-memory transactions set<uint256> setConflicts; { LOCK(pool.cs); // protect pool.mapNextTx BOOST_FOREACH(const CTxIn &txin, tx.vin) { if (pool.mapNextTx.count(txin.prevout)) { const CTransaction *ptxConflicting = pool.mapNextTx[txin.prevout].ptx; if (!setConflicts.count(ptxConflicting->GetHash())) { // InstantSend txes are not replacable if(instantsend.HasTxLockRequest(ptxConflicting->GetHash())) { // this tx conflicts with a Transaction Lock Request candidate return state.DoS(0, error("AcceptToMemoryPool : Transaction %s conflicts with Transaction Lock Request %s", hash.ToString(), ptxConflicting->GetHash().ToString()), REJECT_INVALID, "tx-txlockreq-mempool-conflict"); } else if (instantsend.HasTxLockRequest(hash)) { // this tx is a tx lock request and it conflicts with a normal tx return state.DoS(0, error("AcceptToMemoryPool : Transaction Lock Request %s conflicts with transaction %s", hash.ToString(), ptxConflicting->GetHash().ToString()), REJECT_INVALID, "txlockreq-tx-mempool-conflict"); } // Allow opt-out of transaction replacement by setting // nSequence >= maxint-1 on all inputs. // // maxint-1 is picked to still allow use of nLockTime by // non-replacable transactions. All inputs rather than just one // is for the sake of multi-party protocols, where we don't // want a single party to be able to disable replacement. // // The opt-out ignores descendants as anyone relying on // first-seen mempool behavior should be checking all // unconfirmed ancestors anyway; doing otherwise is hopelessly // insecure. bool fReplacementOptOut = true; if (fEnableReplacement) { BOOST_FOREACH(const CTxIn &txin, ptxConflicting->vin) { if (txin.nSequence < std::numeric_limits<unsigned int>::max()-1) { fReplacementOptOut = false; break; } } } if (fReplacementOptOut) return state.Invalid(false, REJECT_CONFLICT, "txn-mempool-conflict"); setConflicts.insert(ptxConflicting->GetHash()); } } } } { CCoinsView dummy; CCoinsViewCache view(&dummy); CAmount nValueIn = 0; LockPoints lp; { LOCK(pool.cs); CCoinsViewMemPool viewMemPool(pcoinsTip, pool); view.SetBackend(viewMemPool); // do we already have it? bool fHadTxInCache = pcoinsTip->HaveCoinsInCache(hash); if (view.HaveCoins(hash)) { if (!fHadTxInCache) vHashTxnToUncache.push_back(hash); return state.Invalid(false, REJECT_ALREADY_KNOWN, "txn-already-known"); } // do all inputs exist? // Note that this does not check for the presence of actual outputs (see the next check for that), // and only helps with filling in pfMissingInputs (to determine missing vs spent). BOOST_FOREACH(const CTxIn txin, tx.vin) { if (!pcoinsTip->HaveCoinsInCache(txin.prevout.hash)) vHashTxnToUncache.push_back(txin.prevout.hash); if (!view.HaveCoins(txin.prevout.hash)) { if (pfMissingInputs) *pfMissingInputs = true; return false; // fMissingInputs and !state.IsInvalid() is used to detect this condition, don't set state.Invalid() } } // are the actual inputs available? if (!view.HaveInputs(tx)) return state.Invalid(false, REJECT_DUPLICATE, "bad-txns-inputs-spent"); // Bring the best block into scope view.GetBestBlock(); nValueIn = view.GetValueIn(tx); // we have all inputs cached now, so switch back to dummy, so we don't need to keep lock on mempool view.SetBackend(dummy); // Only accept BIP68 sequence locked transactions that can be mined in the next // block; we don't want our mempool filled up with transactions that can't // be mined yet. // Must keep pool.cs for this unless we change CheckSequenceLocks to take a // CoinsViewCache instead of create its own if (!CheckSequenceLocks(tx, STANDARD_LOCKTIME_VERIFY_FLAGS, &lp)) return state.DoS(0, false, REJECT_NONSTANDARD, "non-BIP68-final"); } // Check for non-standard pay-to-script-hash in inputs if (fRequireStandard && !AreInputsStandard(tx, view)) return state.Invalid(false, REJECT_NONSTANDARD, "bad-txns-nonstandard-inputs"); unsigned int nSigOps = GetLegacySigOpCount(tx); nSigOps += GetP2SHSigOpCount(tx, view); CAmount nValueOut = tx.GetValueOut(); CAmount nFees = nValueIn-nValueOut; // nModifiedFees includes any fee deltas from PrioritiseTransaction CAmount nModifiedFees = nFees; double nPriorityDummy = 0; pool.ApplyDeltas(hash, nPriorityDummy, nModifiedFees); CAmount inChainInputValue; double dPriority = view.GetPriority(tx, chainActive.Height(), inChainInputValue); // Keep track of transactions that spend a coinbase, which we re-scan // during reorgs to ensure COINBASE_MATURITY is still met. bool fSpendsCoinbase = false; BOOST_FOREACH(const CTxIn &txin, tx.vin) { const CCoins *coins = view.AccessCoins(txin.prevout.hash); if (coins->IsCoinBase()) { fSpendsCoinbase = true; break; } } CTxMemPoolEntry entry(tx, nFees, GetTime(), dPriority, chainActive.Height(), pool.HasNoInputsOf(tx), inChainInputValue, fSpendsCoinbase, nSigOps, lp); unsigned int nSize = entry.GetTxSize(); // Check that the transaction doesn't have an excessive number of // sigops, making it impossible to mine. Since the coinbase transaction // itself can contain sigops MAX_STANDARD_TX_SIGOPS is less than // MAX_BLOCK_SIGOPS; we still consider this an invalid rather than // merely non-standard transaction. if ((nSigOps > MAX_STANDARD_TX_SIGOPS) || (nBytesPerSigOp && nSigOps > nSize / nBytesPerSigOp)) return state.DoS(0, false, REJECT_NONSTANDARD, "bad-txns-too-many-sigops", false, strprintf("%d", nSigOps)); CAmount mempoolRejectFee = pool.GetMinFee(GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFee(nSize); if (mempoolRejectFee > 0 && nModifiedFees < mempoolRejectFee) { return state.DoS(0, false, REJECT_INSUFFICIENTFEE, "mempool min fee not met", false, strprintf("%d < %d", nFees, mempoolRejectFee)); } else if (GetBoolArg("-relaypriority", DEFAULT_RELAYPRIORITY) && nModifiedFees < ::minRelayTxFee.GetFee(nSize) && !AllowFree(entry.GetPriority(chainActive.Height() + 1))) { // Require that free transactions have sufficient priority to be mined in the next block. return state.DoS(0, false, REJECT_INSUFFICIENTFEE, "insufficient priority"); } // Continuously rate-limit free (really, very-low-fee) transactions // This mitigates 'penny-flooding' -- sending thousands of free transactions just to // be annoying or make others' transactions take longer to confirm. if (fLimitFree && nModifiedFees < ::minRelayTxFee.GetFee(nSize)) { static CCriticalSection csFreeLimiter; static double dFreeCount; static int64_t nLastTime; int64_t nNow = GetTime(); LOCK(csFreeLimiter); // Use an exponentially decaying ~10-minute window: dFreeCount *= pow(1.0 - 1.0/600.0, (double)(nNow - nLastTime)); nLastTime = nNow; // -limitfreerelay unit is thousand-bytes-per-minute // At default rate it would take over a month to fill 1GB if (dFreeCount >= GetArg("-limitfreerelay", DEFAULT_LIMITFREERELAY) * 10 * 1000) return state.DoS(0, false, REJECT_INSUFFICIENTFEE, "rate limited free transaction"); LogPrint("mempool", "Rate limit dFreeCount: %g => %g\n", dFreeCount, dFreeCount+nSize); dFreeCount += nSize; } if (fRejectAbsurdFee && nFees > ::minRelayTxFee.GetFee(nSize) * 10000) return state.Invalid(false, REJECT_HIGHFEE, "absurdly-high-fee", strprintf("%d > %d", nFees, ::minRelayTxFee.GetFee(nSize) * 10000)); // Calculate in-mempool ancestors, up to a limit. CTxMemPool::setEntries setAncestors; size_t nLimitAncestors = GetArg("-limitancestorcount", DEFAULT_ANCESTOR_LIMIT); size_t nLimitAncestorSize = GetArg("-limitancestorsize", DEFAULT_ANCESTOR_SIZE_LIMIT)*1000; size_t nLimitDescendants = GetArg("-limitdescendantcount", DEFAULT_DESCENDANT_LIMIT); size_t nLimitDescendantSize = GetArg("-limitdescendantsize", DEFAULT_DESCENDANT_SIZE_LIMIT)*1000; std::string errString; if (!pool.CalculateMemPoolAncestors(entry, setAncestors, nLimitAncestors, nLimitAncestorSize, nLimitDescendants, nLimitDescendantSize, errString)) { return state.DoS(0, false, REJECT_NONSTANDARD, "too-long-mempool-chain", false, errString); } // A transaction that spends outputs that would be replaced by it is invalid. Now // that we have the set of all ancestors we can detect this // pathological case by making sure setConflicts and setAncestors don't // intersect. BOOST_FOREACH(CTxMemPool::txiter ancestorIt, setAncestors) { const uint256 &hashAncestor = ancestorIt->GetTx().GetHash(); if (setConflicts.count(hashAncestor)) { return state.DoS(10, error("AcceptToMemoryPool: %s spends conflicting transaction %s", hash.ToString(), hashAncestor.ToString()), REJECT_INVALID, "bad-txns-spends-conflicting-tx"); } } // Check if it's economically rational to mine this transaction rather // than the ones it replaces. CAmount nConflictingFees = 0; size_t nConflictingSize = 0; uint64_t nConflictingCount = 0; CTxMemPool::setEntries allConflicting; // If we don't hold the lock allConflicting might be incomplete; the // subsequent RemoveStaged() and addUnchecked() calls don't guarantee // mempool consistency for us. LOCK(pool.cs); if (setConflicts.size()) { CFeeRate newFeeRate(nModifiedFees, nSize); set<uint256> setConflictsParents; const int maxDescendantsToVisit = 100; CTxMemPool::setEntries setIterConflicting; BOOST_FOREACH(const uint256 &hashConflicting, setConflicts) { CTxMemPool::txiter mi = pool.mapTx.find(hashConflicting); if (mi == pool.mapTx.end()) continue; // Save these to avoid repeated lookups setIterConflicting.insert(mi); // If this entry is "dirty", then we don't have descendant // state for this transaction, which means we probably have // lots of in-mempool descendants. // Don't allow replacements of dirty transactions, to ensure // that we don't spend too much time walking descendants. // This should be rare. if (mi->IsDirty()) { return state.DoS(0, error("AcceptToMemoryPool: rejecting replacement %s; cannot replace tx %s with untracked descendants", hash.ToString(), mi->GetTx().GetHash().ToString()), REJECT_NONSTANDARD, "too many potential replacements"); } // Don't allow the replacement to reduce the feerate of the // mempool. // // We usually don't want to accept replacements with lower // feerates than what they replaced as that would lower the // feerate of the next block. Requiring that the feerate always // be increased is also an easy-to-reason about way to prevent // DoS attacks via replacements. // // The mining code doesn't (currently) take children into // account (CPFP) so we only consider the feerates of // transactions being directly replaced, not their indirect // descendants. While that does mean high feerate children are // ignored when deciding whether or not to replace, we do // require the replacement to pay more overall fees too, // mitigating most cases. CFeeRate oldFeeRate(mi->GetModifiedFee(), mi->GetTxSize()); if (newFeeRate <= oldFeeRate) { return state.DoS(0, error("AcceptToMemoryPool: rejecting replacement %s; new feerate %s <= old feerate %s", hash.ToString(), newFeeRate.ToString(), oldFeeRate.ToString()), REJECT_INSUFFICIENTFEE, "insufficient fee"); } BOOST_FOREACH(const CTxIn &txin, mi->GetTx().vin) { setConflictsParents.insert(txin.prevout.hash); } nConflictingCount += mi->GetCountWithDescendants(); } // This potentially overestimates the number of actual descendants // but we just want to be conservative to avoid doing too much // work. if (nConflictingCount <= maxDescendantsToVisit) { // If not too many to replace, then calculate the set of // transactions that would have to be evicted BOOST_FOREACH(CTxMemPool::txiter it, setIterConflicting) { pool.CalculateDescendants(it, allConflicting); } BOOST_FOREACH(CTxMemPool::txiter it, allConflicting) { nConflictingFees += it->GetModifiedFee(); nConflictingSize += it->GetTxSize(); } } else { return state.DoS(0, error("AcceptToMemoryPool: rejecting replacement %s; too many potential replacements (%d > %d)\n", hash.ToString(), nConflictingCount, maxDescendantsToVisit), REJECT_NONSTANDARD, "too many potential replacements"); } for (unsigned int j = 0; j < tx.vin.size(); j++) { // We don't want to accept replacements that require low // feerate junk to be mined first. Ideally we'd keep track of // the ancestor feerates and make the decision based on that, // but for now requiring all new inputs to be confirmed works. if (!setConflictsParents.count(tx.vin[j].prevout.hash)) { // Rather than check the UTXO set - potentially expensive - // it's cheaper to just check if the new input refers to a // tx that's in the mempool. if (pool.mapTx.find(tx.vin[j].prevout.hash) != pool.mapTx.end()) return state.DoS(0, error("AcceptToMemoryPool: replacement %s adds unconfirmed input, idx %d", hash.ToString(), j), REJECT_NONSTANDARD, "replacement-adds-unconfirmed"); } } // The replacement must pay greater fees than the transactions it // replaces - if we did the bandwidth used by those conflicting // transactions would not be paid for. if (nModifiedFees < nConflictingFees) { return state.DoS(0, error("AcceptToMemoryPool: rejecting replacement %s, less fees than conflicting txs; %s < %s", hash.ToString(), FormatMoney(nModifiedFees), FormatMoney(nConflictingFees)), REJECT_INSUFFICIENTFEE, "insufficient fee"); } // Finally in addition to paying more fees than the conflicts the // new transaction must pay for its own bandwidth. CAmount nDeltaFees = nModifiedFees - nConflictingFees; if (nDeltaFees < ::minRelayTxFee.GetFee(nSize)) { return state.DoS(0, error("AcceptToMemoryPool: rejecting replacement %s, not enough additional fees to relay; %s < %s", hash.ToString(), FormatMoney(nDeltaFees), FormatMoney(::minRelayTxFee.GetFee(nSize))), REJECT_INSUFFICIENTFEE, "insufficient fee"); } } // If we aren't going to actually accept it but just were verifying it, we are fine already if(fDryRun) return true; // Check against previous transactions // This is done last to help prevent CPU exhaustion denial-of-service attacks. if (!CheckInputs(tx, state, view, true, STANDARD_SCRIPT_VERIFY_FLAGS, true)) return false; // Check again against just the consensus-critical mandatory script // verification flags, in case of bugs in the standard flags that cause // transactions to pass as valid when they're actually invalid. For // instance the STRICTENC flag was incorrectly allowing certain // CHECKSIG NOT scripts to pass, even though they were invalid. // // There is a similar check in CreateNewBlock() to prevent creating // invalid blocks, however allowing such transactions into the mempool // can be exploited as a DoS attack. if (!CheckInputs(tx, state, view, true, MANDATORY_SCRIPT_VERIFY_FLAGS, true)) { return error("%s: BUG! PLEASE REPORT THIS! ConnectInputs failed against MANDATORY but not STANDARD flags %s, %s", __func__, hash.ToString(), FormatStateMessage(state)); } // Remove conflicting transactions from the mempool BOOST_FOREACH(const CTxMemPool::txiter it, allConflicting) { LogPrint("mempool", "replacing tx %s with %s for %s BTC additional fees, %d delta bytes\n", it->GetTx().GetHash().ToString(), hash.ToString(), FormatMoney(nModifiedFees - nConflictingFees), (int)nSize - (int)nConflictingSize); } pool.RemoveStaged(allConflicting); // Store transaction in memory pool.addUnchecked(hash, entry, setAncestors, !IsInitialBlockDownload()); // Add memory address index if (fAddressIndex) { pool.addAddressIndex(entry, view); } // Add memory spent index if (fSpentIndex) { pool.addSpentIndex(entry, view); } // trim mempool and check if tx was trimmed if (!fOverrideMempoolLimit) { LimitMempoolSize(pool, GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000, GetArg("-mempoolexpiry", DEFAULT_MEMPOOL_EXPIRY) * 60 * 60); if (!pool.exists(hash)) return state.DoS(0, false, REJECT_INSUFFICIENTFEE, "mempool full"); } } if(!fDryRun) SyncWithWallets(tx, NULL); return true; } bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree, bool* pfMissingInputs, bool fOverrideMempoolLimit, bool fRejectAbsurdFee, bool fDryRun) { std::vector<uint256> vHashTxToUncache; bool res = AcceptToMemoryPoolWorker(pool, state, tx, fLimitFree, pfMissingInputs, fOverrideMempoolLimit, fRejectAbsurdFee, vHashTxToUncache, fDryRun); if (!res || fDryRun) { if(!res) LogPrint("mempool", "%s: %s %s\n", __func__, tx.GetHash().ToString(), state.GetRejectReason()); BOOST_FOREACH(const uint256& hashTx, vHashTxToUncache) pcoinsTip->Uncache(hashTx); } return res; } bool GetTimestampIndex(const unsigned int &high, const unsigned int &low, std::vector<uint256> &hashes) { if (!fTimestampIndex) return error("Timestamp index not enabled"); if (!pblocktree->ReadTimestampIndex(high, low, hashes)) return error("Unable to get hashes for timestamps"); return true; } bool GetSpentIndex(CSpentIndexKey &key, CSpentIndexValue &value) { if (!fSpentIndex) return false; if (mempool.getSpentIndex(key, value)) return true; if (!pblocktree->ReadSpentIndex(key, value)) return false; return true; } bool GetAddressIndex(uint160 addressHash, int type, std::vector<std::pair<CAddressIndexKey, CAmount> > &addressIndex, int start, int end) { if (!fAddressIndex) return error("address index not enabled"); if (!pblocktree->ReadAddressIndex(addressHash, type, addressIndex, start, end)) return error("unable to get txids for address"); return true; } bool GetAddressUnspent(uint160 addressHash, int type, std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> > &unspentOutputs) { if (!fAddressIndex) return error("address index not enabled"); if (!pblocktree->ReadAddressUnspentIndex(addressHash, type, unspentOutputs)) return error("unable to get txids for address"); return true; } /** Return transaction in tx, and if it was found inside a block, its hash is placed in hashBlock */ bool GetTransaction(const uint256 &hash, CTransaction &txOut, const Consensus::Params& consensusParams, uint256 &hashBlock, bool fAllowSlow) { CBlockIndex *pindexSlow = NULL; LOCK(cs_main); if (mempool.lookup(hash, txOut)) { return true; } if (fTxIndex) { CDiskTxPos postx; if (pblocktree->ReadTxIndex(hash, postx)) { CAutoFile file(OpenBlockFile(postx, true), SER_DISK, CLIENT_VERSION); if (file.IsNull()) return error("%s: OpenBlockFile failed", __func__); CBlockHeader header; try { file >> header; fseek(file.Get(), postx.nTxOffset, SEEK_CUR); file >> txOut; } catch (const std::exception& e) { return error("%s: Deserialize or I/O error - %s", __func__, e.what()); } hashBlock = header.GetHash(); if (txOut.GetHash() != hash) return error("%s: txid mismatch", __func__); return true; } } if (fAllowSlow) { // use coin database to locate block that contains transaction, and scan it int nHeight = -1; { CCoinsViewCache &view = *pcoinsTip; const CCoins* coins = view.AccessCoins(hash); if (coins) nHeight = coins->nHeight; } if (nHeight > 0) pindexSlow = chainActive[nHeight]; } if (pindexSlow) { CBlock block; if (ReadBlockFromDisk(block, pindexSlow, consensusParams)) { BOOST_FOREACH(const CTransaction &tx, block.vtx) { if (tx.GetHash() == hash) { txOut = tx; hashBlock = pindexSlow->GetBlockHash(); return true; } } } } return false; } ////////////////////////////////////////////////////////////////////////////// // // CBlock and CBlockIndex // bool WriteBlockToDisk(const CBlock& block, CDiskBlockPos& pos, const CMessageHeader::MessageStartChars& messageStart) { // Open history file to append CAutoFile fileout(OpenBlockFile(pos), SER_DISK, CLIENT_VERSION); if (fileout.IsNull()) return error("WriteBlockToDisk: OpenBlockFile failed"); // Write index header unsigned int nSize = fileout.GetSerializeSize(block); fileout << FLATDATA(messageStart) << nSize; // Write block long fileOutPos = ftell(fileout.Get()); if (fileOutPos < 0) return error("WriteBlockToDisk: ftell failed"); pos.nPos = (unsigned int)fileOutPos; fileout << block; return true; } bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos, const Consensus::Params& consensusParams) { block.SetNull(); // Open history file to read CAutoFile filein(OpenBlockFile(pos, true), SER_DISK, CLIENT_VERSION); if (filein.IsNull()) return error("ReadBlockFromDisk: OpenBlockFile failed for %s", pos.ToString()); // Read block try { filein >> block; } catch (const std::exception& e) { return error("%s: Deserialize or I/O error - %s at %s", __func__, e.what(), pos.ToString()); } // Check the header if (!CheckProofOfWork(block.GetHash(), block.nBits, consensusParams)) return error("ReadBlockFromDisk: Errors in block header at %s", pos.ToString()); return true; } bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex, const Consensus::Params& consensusParams) { if (!ReadBlockFromDisk(block, pindex->GetBlockPos(), consensusParams)) return false; if (block.GetHash() != pindex->GetBlockHash()) return error("ReadBlockFromDisk(CBlock&, CBlockIndex*): GetHash() doesn't match index for %s at %s", pindex->ToString(), pindex->GetBlockPos().ToString()); return true; } double ConvertBitsToDouble(unsigned int nBits) { int nShift = (nBits >> 24) & 0xff; double dDiff = (double)0x0000ffff / (double)(nBits & 0x00ffffff); while (nShift < 29) { dDiff *= 256.0; nShift++; } while (nShift > 29) { dDiff /= 256.0; nShift--; } return dDiff; } /* NOTE: unlike bitcoin we are using PREVIOUS block height here, might be a good idea to change this to use prev bits but current height to avoid confusion. */ CAmount GetBlockSubsidy(int nPrevBits, int nPrevHeight, const Consensus::Params& consensusParams, bool fSuperblockPartOnly) { if (!nPrevHeight && nPrevHeight == 0) { return 300000 * COIN; } else if (nPrevHeight < 500) { return 1 * COIN; } else if (nPrevHeight >= 500 && nPrevHeight < 20000) { return 40 * COIN; } else if (nPrevHeight >= 20000 && nPrevHeight < 195480) { return 30 * COIN; } else if (nPrevHeight >= 195480 && nPrevHeight < 370960) { return 27.5 * COIN; } else if (nPrevHeight >= 370960 && nPrevHeight < 546440) { return 25 * COIN; } else if (nPrevHeight >= 546440 && nPrevHeight < 721920) { return 22.5 * COIN; } else if (nPrevHeight >= 721920 && nPrevHeight < 897400) { return 20 * COIN; } else if (nPrevHeight >= 897400 && nPrevHeight < 1072880) { return 17.5 * COIN; } else if (nPrevHeight >= 1072880) { return 15 * COIN; } } CAmount GetMasternodePayment(int nHeight, CAmount blockValue) { if (nHeight >= 20000) { return blockValue * 0.65; }else if (nHeight >= 195480) { return blockValue * 0.75; } return blockValue * 0.55; } bool IsInitialBlockDownload() { static bool lockIBDState = false; if (lockIBDState) return false; if (fImporting || fReindex) return true; LOCK(cs_main); const CChainParams& chainParams = Params(); if (fCheckpointsEnabled && chainActive.Height() < Checkpoints::GetTotalBlocksEstimate(chainParams.Checkpoints())) return true; bool state = (chainActive.Height() < pindexBestHeader->nHeight - 24 * 6 || std::max(chainActive.Tip()->GetBlockTime(), pindexBestHeader->GetBlockTime()) < GetTime() - chainParams.MaxTipAge()); if (!state) lockIBDState = true; return state; } bool fLargeWorkForkFound = false; bool fLargeWorkInvalidChainFound = false; CBlockIndex *pindexBestForkTip = NULL, *pindexBestForkBase = NULL; void CheckForkWarningConditions() { AssertLockHeld(cs_main); // Before we get past initial download, we cannot reliably alert about forks // (we assume we don't get stuck on a fork before the last checkpoint) if (IsInitialBlockDownload()) return; // If our best fork is no longer within 72 blocks (+/- 3 hours if no one mines it) // of our head, drop it if (pindexBestForkTip && chainActive.Height() - pindexBestForkTip->nHeight >= 72) pindexBestForkTip = NULL; if (pindexBestForkTip || (pindexBestInvalid && pindexBestInvalid->nChainWork > chainActive.Tip()->nChainWork + (GetBlockProof(*chainActive.Tip()) * 6))) { if (!fLargeWorkForkFound && pindexBestForkBase) { if(pindexBestForkBase->phashBlock){ std::string warning = std::string("'Warning: Large-work fork detected, forking after block ") + pindexBestForkBase->phashBlock->ToString() + std::string("'"); CAlert::Notify(warning, true); } } if (pindexBestForkTip && pindexBestForkBase) { if(pindexBestForkBase->phashBlock){ LogPrintf("%s: Warning: Large valid fork found\n forking the chain at height %d (%s)\n lasting to height %d (%s).\nChain state database corruption likely.\n", __func__, pindexBestForkBase->nHeight, pindexBestForkBase->phashBlock->ToString(), pindexBestForkTip->nHeight, pindexBestForkTip->phashBlock->ToString()); fLargeWorkForkFound = true; } } else { if(pindexBestInvalid->nHeight > chainActive.Height() + 6) LogPrintf("%s: Warning: Found invalid chain at least ~6 blocks longer than our best chain.\nChain state database corruption likely.\n", __func__); else LogPrintf("%s: Warning: Found invalid chain which has higher work (at least ~6 blocks worth of work) than our best chain.\nChain state database corruption likely.\n", __func__); fLargeWorkInvalidChainFound = true; } } else { fLargeWorkForkFound = false; fLargeWorkInvalidChainFound = false; } } void CheckForkWarningConditionsOnNewFork(CBlockIndex* pindexNewForkTip) { AssertLockHeld(cs_main); // If we are on a fork that is sufficiently large, set a warning flag CBlockIndex* pfork = pindexNewForkTip; CBlockIndex* plonger = chainActive.Tip(); while (pfork && pfork != plonger) { while (plonger && plonger->nHeight > pfork->nHeight) plonger = plonger->pprev; if (pfork == plonger) break; pfork = pfork->pprev; } // We define a condition where we should warn the user about as a fork of at least 7 blocks // with a tip within 72 blocks (+/- 3 hours if no one mines it) of ours // or a chain that is entirely longer than ours and invalid (note that this should be detected by both) // We use 7 blocks rather arbitrarily as it represents just under 10% of sustained network // hash rate operating on the fork. // We define it this way because it allows us to only store the highest fork tip (+ base) which meets // the 7-block condition and from this always have the most-likely-to-cause-warning fork if (pfork && (!pindexBestForkTip || (pindexBestForkTip && pindexNewForkTip->nHeight > pindexBestForkTip->nHeight)) && pindexNewForkTip->nChainWork - pfork->nChainWork > (GetBlockProof(*pfork) * 7) && chainActive.Height() - pindexNewForkTip->nHeight < 72) { pindexBestForkTip = pindexNewForkTip; pindexBestForkBase = pfork; } CheckForkWarningConditions(); } // Requires cs_main. void Misbehaving(NodeId pnode, int howmuch) { if (howmuch == 0) return; CNodeState *state = State(pnode); if (state == NULL) return; state->nMisbehavior += howmuch; int banscore = GetArg("-banscore", DEFAULT_BANSCORE_THRESHOLD); if (state->nMisbehavior >= banscore && state->nMisbehavior - howmuch < banscore) { LogPrintf("%s: %s (%d -> %d) BAN THRESHOLD EXCEEDED\n", __func__, state->name, state->nMisbehavior-howmuch, state->nMisbehavior); state->fShouldBan = true; } else LogPrintf("%s: %s (%d -> %d)\n", __func__, state->name, state->nMisbehavior-howmuch, state->nMisbehavior); } void static InvalidChainFound(CBlockIndex* pindexNew) { if (!pindexBestInvalid || pindexNew->nChainWork > pindexBestInvalid->nChainWork) pindexBestInvalid = pindexNew; LogPrintf("%s: invalid block=%s height=%d log2_work=%.8g date=%s\n", __func__, pindexNew->GetBlockHash().ToString(), pindexNew->nHeight, log(pindexNew->nChainWork.getdouble())/log(2.0), DateTimeStrFormat("%Y-%m-%d %H:%M:%S", pindexNew->GetBlockTime())); CBlockIndex *tip = chainActive.Tip(); printf("Tip = %s\n", chainActive.Tip()); assert (tip); LogPrintf("%s: current best=%s height=%d log2_work=%.8g date=%s\n", __func__, tip->GetBlockHash().ToString(), chainActive.Height(), log(tip->nChainWork.getdouble())/log(2.0), DateTimeStrFormat("%Y-%m-%d %H:%M:%S", tip->GetBlockTime())); CheckForkWarningConditions(); } void static InvalidBlockFound(CBlockIndex *pindex, const CValidationState &state) { int nDoS = 0; if (state.IsInvalid(nDoS)) { std::map<uint256, NodeId>::iterator it = mapBlockSource.find(pindex->GetBlockHash()); if (it != mapBlockSource.end() && State(it->second)) { assert (state.GetRejectCode() < REJECT_INTERNAL); // Blocks are never rejected with internal reject codes CBlockReject reject = {(unsigned char)state.GetRejectCode(), state.GetRejectReason().substr(0, MAX_REJECT_MESSAGE_LENGTH), pindex->GetBlockHash()}; State(it->second)->rejects.push_back(reject); if (nDoS > 0) Misbehaving(it->second, nDoS); } } if (!state.CorruptionPossible()) { pindex->nStatus |= BLOCK_FAILED_VALID; setDirtyBlockIndex.insert(pindex); setBlockIndexCandidates.erase(pindex); InvalidChainFound(pindex); } } void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCache &inputs, CTxUndo &txundo, int nHeight) { // mark inputs spent if (!tx.IsCoinBase()) { txundo.vprevout.reserve(tx.vin.size()); BOOST_FOREACH(const CTxIn &txin, tx.vin) { CCoinsModifier coins = inputs.ModifyCoins(txin.prevout.hash); unsigned nPos = txin.prevout.n; if (nPos >= coins->vout.size() || coins->vout[nPos].IsNull()) assert(false); // mark an outpoint spent, and construct undo information txundo.vprevout.push_back(CTxInUndo(coins->vout[nPos])); coins->Spend(nPos); if (coins->vout.size() == 0) { CTxInUndo& undo = txundo.vprevout.back(); undo.nHeight = coins->nHeight; undo.fCoinBase = coins->fCoinBase; undo.nVersion = coins->nVersion; } } // add outputs inputs.ModifyNewCoins(tx.GetHash())->FromTx(tx, nHeight); } else { // add outputs for coinbase tx // In this case call the full ModifyCoins which will do a database // lookup to be sure the coins do not already exist otherwise we do not // know whether to mark them fresh or not. We want the duplicate coinbases // before BIP30 to still be properly overwritten. inputs.ModifyCoins(tx.GetHash())->FromTx(tx, nHeight); } } void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCache &inputs, int nHeight) { CTxUndo txundo; UpdateCoins(tx, state, inputs, txundo, nHeight); } bool CScriptCheck::operator()() { const CScript &scriptSig = ptxTo->vin[nIn].scriptSig; if (!VerifyScript(scriptSig, scriptPubKey, nFlags, CachingTransactionSignatureChecker(ptxTo, nIn, cacheStore), &error)) { return false; } return true; } int GetSpendHeight(const CCoinsViewCache& inputs) { LOCK(cs_main); CBlockIndex* pindexPrev = mapBlockIndex.find(inputs.GetBestBlock())->second; return pindexPrev->nHeight + 1; } namespace Consensus { bool CheckTxInputs(const CTransaction& tx, CValidationState& state, const CCoinsViewCache& inputs, int nSpendHeight) { // This doesn't trigger the DoS code on purpose; if it did, it would make it easier // for an attacker to attempt to split the network. if (!inputs.HaveInputs(tx)) return state.Invalid(false, 0, "", "Inputs unavailable"); CAmount nValueIn = 0; CAmount nFees = 0; for (unsigned int i = 0; i < tx.vin.size(); i++) { const COutPoint &prevout = tx.vin[i].prevout; const CCoins *coins = inputs.AccessCoins(prevout.hash); assert(coins); // If prev is coinbase, check that it's matured if (coins->IsCoinBase()) { if (nSpendHeight - coins->nHeight < COINBASE_MATURITY) return state.Invalid(false, REJECT_INVALID, "bad-txns-premature-spend-of-coinbase", strprintf("tried to spend coinbase at depth %d", nSpendHeight - coins->nHeight)); } // Check for negative or overflow input values nValueIn += coins->vout[prevout.n].nValue; if (!MoneyRange(coins->vout[prevout.n].nValue) || !MoneyRange(nValueIn)) return state.DoS(100, false, REJECT_INVALID, "bad-txns-inputvalues-outofrange"); } if (nValueIn < tx.GetValueOut()) return state.DoS(100, false, REJECT_INVALID, "bad-txns-in-belowout", false, strprintf("value in (%s) < value out (%s)", FormatMoney(nValueIn), FormatMoney(tx.GetValueOut()))); // Tally transaction fees CAmount nTxFee = nValueIn - tx.GetValueOut(); if (nTxFee < 0) return state.DoS(100, false, REJECT_INVALID, "bad-txns-fee-negative"); nFees += nTxFee; if (!MoneyRange(nFees)) return state.DoS(100, false, REJECT_INVALID, "bad-txns-fee-outofrange"); return true; } }// namespace Consensus bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsViewCache &inputs, bool fScriptChecks, unsigned int flags, bool cacheStore, std::vector<CScriptCheck> *pvChecks) { if (!tx.IsCoinBase()) { if (!Consensus::CheckTxInputs(tx, state, inputs, GetSpendHeight(inputs))) return false; if (pvChecks) pvChecks->reserve(tx.vin.size()); // The first loop above does all the inexpensive checks. // Only if ALL inputs pass do we perform expensive ECDSA signature checks. // Helps prevent CPU exhaustion attacks. // Skip ECDSA signature verification when connecting blocks // before the last block chain checkpoint. This is safe because block merkle hashes are // still computed and checked, and any change will be caught at the next checkpoint. if (fScriptChecks) { for (unsigned int i = 0; i < tx.vin.size(); i++) { const COutPoint &prevout = tx.vin[i].prevout; const CCoins* coins = inputs.AccessCoins(prevout.hash); assert(coins); // Verify signature CScriptCheck check(*coins, tx, i, flags, cacheStore); if (pvChecks) { pvChecks->push_back(CScriptCheck()); check.swap(pvChecks->back()); } else if (!check()) { if (flags & STANDARD_NOT_MANDATORY_VERIFY_FLAGS) { // Check whether the failure was caused by a // non-mandatory script verification check, such as // non-standard DER encodings or non-null dummy // arguments; if so, don't trigger DoS protection to // avoid splitting the network between upgraded and // non-upgraded nodes. CScriptCheck check2(*coins, tx, i, flags & ~STANDARD_NOT_MANDATORY_VERIFY_FLAGS, cacheStore); if (check2()) return state.Invalid(false, REJECT_NONSTANDARD, strprintf("non-mandatory-script-verify-flag (%s)", ScriptErrorString(check.GetScriptError()))); } // Failures of other flags indicate a transaction that is // invalid in new blocks, e.g. a invalid P2SH. We DoS ban // such nodes as they are not following the protocol. That // said during an upgrade careful thought should be taken // as to the correct behavior - we may want to continue // peering with non-upgraded nodes even after a soft-fork // super-majority vote has passed. return state.DoS(100,false, REJECT_INVALID, strprintf("mandatory-script-verify-flag-failed (%s)", ScriptErrorString(check.GetScriptError()))); } } } } return true; } namespace { bool UndoWriteToDisk(const CBlockUndo& blockundo, CDiskBlockPos& pos, const uint256& hashBlock, const CMessageHeader::MessageStartChars& messageStart) { // Open history file to append CAutoFile fileout(OpenUndoFile(pos), SER_DISK, CLIENT_VERSION); if (fileout.IsNull()) return error("%s: OpenUndoFile failed", __func__); // Write index header unsigned int nSize = fileout.GetSerializeSize(blockundo); fileout << FLATDATA(messageStart) << nSize; // Write undo data long fileOutPos = ftell(fileout.Get()); if (fileOutPos < 0) return error("%s: ftell failed", __func__); pos.nPos = (unsigned int)fileOutPos; fileout << blockundo; // calculate & write checksum CHashWriter hasher(SER_GETHASH, PROTOCOL_VERSION); hasher << hashBlock; hasher << blockundo; fileout << hasher.GetHash(); return true; } bool UndoReadFromDisk(CBlockUndo& blockundo, const CDiskBlockPos& pos, const uint256& hashBlock) { // Open history file to read CAutoFile filein(OpenUndoFile(pos, true), SER_DISK, CLIENT_VERSION); if (filein.IsNull()) return error("%s: OpenBlockFile failed", __func__); // Read block uint256 hashChecksum; try { filein >> blockundo; filein >> hashChecksum; } catch (const std::exception& e) { return error("%s: Deserialize or I/O error - %s", __func__, e.what()); } // Verify checksum CHashWriter hasher(SER_GETHASH, PROTOCOL_VERSION); hasher << hashBlock; hasher << blockundo; if (hashChecksum != hasher.GetHash()) return error("%s: Checksum mismatch", __func__); return true; } /** Abort with a message */ bool AbortNode(const std::string& strMessage, const std::string& userMessage="") { strMiscWarning = strMessage; LogPrintf("*** %s\n", strMessage); uiInterface.ThreadSafeMessageBox( userMessage.empty() ? _("Error: A fatal internal error occurred, see debug.log for details") : userMessage, "", CClientUIInterface::MSG_ERROR); StartShutdown(); return false; } bool AbortNode(CValidationState& state, const std::string& strMessage, const std::string& userMessage="") { AbortNode(strMessage, userMessage); return state.Error(strMessage); } } // anon namespace /** * Apply the undo operation of a CTxInUndo to the given chain state. * @param undo The undo object. * @param view The coins view to which to apply the changes. * @param out The out point that corresponds to the tx input. * @return True on success. */ static bool ApplyTxInUndo(const CTxInUndo& undo, CCoinsViewCache& view, const COutPoint& out) { bool fClean = true; CCoinsModifier coins = view.ModifyCoins(out.hash); if (undo.nHeight != 0) { // undo data contains height: this is the last output of the prevout tx being spent if (!coins->IsPruned()) fClean = fClean && error("%s: undo data overwriting existing transaction", __func__); coins->Clear(); coins->fCoinBase = undo.fCoinBase; coins->nHeight = undo.nHeight; coins->nVersion = undo.nVersion; } else { if (coins->IsPruned()) fClean = fClean && error("%s: undo data adding output to missing transaction", __func__); } if (coins->IsAvailable(out.n)) fClean = fClean && error("%s: undo data overwriting existing output", __func__); if (coins->vout.size() < out.n+1) coins->vout.resize(out.n+1); coins->vout[out.n] = undo.txout; return fClean; } bool DisconnectBlock(const CBlock& block, CValidationState& state, const CBlockIndex* pindex, CCoinsViewCache& view, bool* pfClean) { assert(pindex->GetBlockHash() == view.GetBestBlock()); if (pfClean) *pfClean = false; bool fClean = true; CBlockUndo blockUndo; CDiskBlockPos pos = pindex->GetUndoPos(); if (pos.IsNull()) return error("DisconnectBlock(): no undo data available"); if (!UndoReadFromDisk(blockUndo, pos, pindex->pprev->GetBlockHash())) return error("DisconnectBlock(): failure reading undo data"); if (blockUndo.vtxundo.size() + 1 != block.vtx.size()) return error("DisconnectBlock(): block and undo data inconsistent"); std::vector<std::pair<CAddressIndexKey, CAmount> > addressIndex; std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> > addressUnspentIndex; std::vector<std::pair<CSpentIndexKey, CSpentIndexValue> > spentIndex; // undo transactions in reverse order for (int i = block.vtx.size() - 1; i >= 0; i--) { const CTransaction &tx = block.vtx[i]; uint256 hash = tx.GetHash(); if (fAddressIndex) { for (unsigned int k = tx.vout.size(); k-- > 0;) { const CTxOut &out = tx.vout[k]; if (out.scriptPubKey.IsPayToScriptHash()) { vector<unsigned char> hashBytes(out.scriptPubKey.begin()+2, out.scriptPubKey.begin()+22); // undo receiving activity addressIndex.push_back(make_pair(CAddressIndexKey(2, uint160(hashBytes), pindex->nHeight, i, hash, k, false), out.nValue)); // undo unspent index addressUnspentIndex.push_back(make_pair(CAddressUnspentKey(2, uint160(hashBytes), hash, k), CAddressUnspentValue())); } else if (out.scriptPubKey.IsPayToPublicKeyHash()) { vector<unsigned char> hashBytes(out.scriptPubKey.begin()+3, out.scriptPubKey.begin()+23); // undo receiving activity addressIndex.push_back(make_pair(CAddressIndexKey(1, uint160(hashBytes), pindex->nHeight, i, hash, k, false), out.nValue)); // undo unspent index addressUnspentIndex.push_back(make_pair(CAddressUnspentKey(1, uint160(hashBytes), hash, k), CAddressUnspentValue())); } else { continue; } } } // Check that all outputs are available and match the outputs in the block itself // exactly. { CCoinsModifier outs = view.ModifyCoins(hash); outs->ClearUnspendable(); CCoins outsBlock(tx, pindex->nHeight); // The CCoins serialization does not serialize negative numbers. // No network rules currently depend on the version here, so an inconsistency is harmless // but it must be corrected before txout nversion ever influences a network rule. if (outsBlock.nVersion < 0) outs->nVersion = outsBlock.nVersion; if (*outs != outsBlock) fClean = fClean && error("DisconnectBlock(): added transaction mismatch? database corrupted"); // remove outputs outs->Clear(); } // restore inputs if (i > 0) { // not coinbases const CTxUndo &txundo = blockUndo.vtxundo[i-1]; if (txundo.vprevout.size() != tx.vin.size()) return error("DisconnectBlock(): transaction and undo data inconsistent"); for (unsigned int j = tx.vin.size(); j-- > 0;) { const COutPoint &out = tx.vin[j].prevout; const CTxInUndo &undo = txundo.vprevout[j]; if (!ApplyTxInUndo(undo, view, out)) fClean = false; const CTxIn input = tx.vin[j]; if (fSpentIndex) { // undo and delete the spent index spentIndex.push_back(make_pair(CSpentIndexKey(input.prevout.hash, input.prevout.n), CSpentIndexValue())); } if (fAddressIndex) { const CTxOut &prevout = view.GetOutputFor(tx.vin[j]); if (prevout.scriptPubKey.IsPayToScriptHash()) { vector<unsigned char> hashBytes(prevout.scriptPubKey.begin()+2, prevout.scriptPubKey.begin()+22); // undo spending activity addressIndex.push_back(make_pair(CAddressIndexKey(2, uint160(hashBytes), pindex->nHeight, i, hash, j, true), prevout.nValue * -1)); // restore unspent index addressUnspentIndex.push_back(make_pair(CAddressUnspentKey(2, uint160(hashBytes), input.prevout.hash, input.prevout.n), CAddressUnspentValue(prevout.nValue, prevout.scriptPubKey, undo.nHeight))); } else if (prevout.scriptPubKey.IsPayToPublicKeyHash()) { vector<unsigned char> hashBytes(prevout.scriptPubKey.begin()+3, prevout.scriptPubKey.begin()+23); // undo spending activity addressIndex.push_back(make_pair(CAddressIndexKey(1, uint160(hashBytes), pindex->nHeight, i, hash, j, true), prevout.nValue * -1)); // restore unspent index addressUnspentIndex.push_back(make_pair(CAddressUnspentKey(1, uint160(hashBytes), input.prevout.hash, input.prevout.n), CAddressUnspentValue(prevout.nValue, prevout.scriptPubKey, undo.nHeight))); } else { continue; } } } } } // move best block pointer to prevout block view.SetBestBlock(pindex->pprev->GetBlockHash()); if (pfClean) { *pfClean = fClean; return true; } if (fAddressIndex) { if (!pblocktree->EraseAddressIndex(addressIndex)) { return AbortNode(state, "Failed to delete address index"); } if (!pblocktree->UpdateAddressUnspentIndex(addressUnspentIndex)) { return AbortNode(state, "Failed to write address unspent index"); } } return fClean; } void static FlushBlockFile(bool fFinalize = false) { LOCK(cs_LastBlockFile); CDiskBlockPos posOld(nLastBlockFile, 0); FILE *fileOld = OpenBlockFile(posOld); if (fileOld) { if (fFinalize) TruncateFile(fileOld, vinfoBlockFile[nLastBlockFile].nSize); FileCommit(fileOld); fclose(fileOld); } fileOld = OpenUndoFile(posOld); if (fileOld) { if (fFinalize) TruncateFile(fileOld, vinfoBlockFile[nLastBlockFile].nUndoSize); FileCommit(fileOld); fclose(fileOld); } } bool FindUndoPos(CValidationState &state, int nFile, CDiskBlockPos &pos, unsigned int nAddSize); static CCheckQueue<CScriptCheck> scriptcheckqueue(128); void ThreadScriptCheck() { RenameThread("lumocash-scriptch"); scriptcheckqueue.Thread(); } // // Called periodically asynchronously; alerts if it smells like // we're being fed a bad chain (blocks being generated much // too slowly or too quickly). // void PartitionCheck(bool (*initialDownloadCheck)(), CCriticalSection& cs, const CBlockIndex *const &bestHeader, int64_t nPowTargetSpacing) { if (bestHeader == NULL || initialDownloadCheck()) return; static int64_t lastAlertTime = 0; int64_t now = GetAdjustedTime(); if (lastAlertTime > now-60*60*24) return; // Alert at most once per day const int SPAN_HOURS=1; // was 4h in bitcoin but we have 4x faster blocks const int SPAN_SECONDS=SPAN_HOURS*60*60; int BLOCKS_EXPECTED = SPAN_SECONDS / nPowTargetSpacing; boost::math::poisson_distribution<double> poisson(BLOCKS_EXPECTED); std::string strWarning; int64_t startTime = GetAdjustedTime()-SPAN_SECONDS; LOCK(cs); const CBlockIndex* i = bestHeader; int nBlocks = 0; while (i->GetBlockTime() >= startTime) { ++nBlocks; i = i->pprev; if (i == NULL) return; // Ran out of chain, we must not be fully sync'ed } // How likely is it to find that many by chance? double p = boost::math::pdf(poisson, nBlocks); LogPrint("partitioncheck", "%s: Found %d blocks in the last %d hours\n", __func__, nBlocks, SPAN_HOURS); LogPrint("partitioncheck", "%s: likelihood: %g\n", __func__, p); // Aim for one false-positive about every fifty years of normal running: const int FIFTY_YEARS = 50*365*24*60*60; double alertThreshold = 1.0 / (FIFTY_YEARS / SPAN_SECONDS); if (p <= alertThreshold && nBlocks < BLOCKS_EXPECTED) { // Many fewer blocks than expected: alert! strWarning = strprintf(_("WARNING: check your network connection, %d blocks received in the last %d hours (%d expected)"), nBlocks, SPAN_HOURS, BLOCKS_EXPECTED); } else if (p <= alertThreshold && nBlocks > BLOCKS_EXPECTED) { // Many more blocks than expected: alert! strWarning = strprintf(_("WARNING: abnormally high number of blocks generated, %d blocks received in the last %d hours (%d expected)"), nBlocks, SPAN_HOURS, BLOCKS_EXPECTED); } if (!strWarning.empty()) { strMiscWarning = strWarning; CAlert::Notify(strWarning, true); lastAlertTime = now; } } // Protected by cs_main static VersionBitsCache versionbitscache; int32_t ComputeBlockVersion(const CBlockIndex* pindexPrev, const Consensus::Params& params) { LOCK(cs_main); int32_t nVersion = VERSIONBITS_TOP_BITS; for (int i = 0; i < (int)Consensus::MAX_VERSION_BITS_DEPLOYMENTS; i++) { ThresholdState state = VersionBitsState(pindexPrev, params, (Consensus::DeploymentPos)i, versionbitscache); if (state == THRESHOLD_LOCKED_IN || state == THRESHOLD_STARTED) { nVersion |= VersionBitsMask(params, (Consensus::DeploymentPos)i); } } return nVersion; } bool GetBlockHash(uint256& hashRet, int nBlockHeight) { LOCK(cs_main); if(chainActive.Tip() == NULL) return false; if(nBlockHeight < -1 || nBlockHeight > chainActive.Height()) return false; if(nBlockHeight == -1) nBlockHeight = chainActive.Height(); hashRet = chainActive[nBlockHeight]->GetBlockHash(); return true; } /** * Threshold condition checker that triggers when unknown versionbits are seen on the network. */ class WarningBitsConditionChecker : public AbstractThresholdConditionChecker { private: int bit; public: WarningBitsConditionChecker(int bitIn) : bit(bitIn) {} int64_t BeginTime(const Consensus::Params& params) const { return 0; } int64_t EndTime(const Consensus::Params& params) const { return std::numeric_limits<int64_t>::max(); } int Period(const Consensus::Params& params) const { return params.nMinerConfirmationWindow; } int Threshold(const Consensus::Params& params) const { return params.nRuleChangeActivationThreshold; } bool Condition(const CBlockIndex* pindex, const Consensus::Params& params) const { return ((pindex->nVersion & VERSIONBITS_TOP_MASK) == VERSIONBITS_TOP_BITS) && ((pindex->nVersion >> bit) & 1) != 0 && ((ComputeBlockVersion(pindex->pprev, params) >> bit) & 1) == 0; } }; // Protected by cs_main static ThresholdConditionCache warningcache[VERSIONBITS_NUM_BITS]; static int64_t nTimeCheck = 0; static int64_t nTimeForks = 0; static int64_t nTimeVerify = 0; static int64_t nTimeConnect = 0; static int64_t nTimeIndex = 0; static int64_t nTimeCallbacks = 0; static int64_t nTimeTotal = 0; bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& view, bool fJustCheck) { const CChainParams& chainparams = Params(); AssertLockHeld(cs_main); int64_t nTimeStart = GetTimeMicros(); // Check it again in case a previous version let a bad block in if (!CheckBlock(block, state, !fJustCheck, !fJustCheck)) return false; // verify that the view's current state corresponds to the previous block uint256 hashPrevBlock = pindex->pprev == NULL ? uint256() : pindex->pprev->GetBlockHash(); assert(hashPrevBlock == view.GetBestBlock()); // Special case for the genesis block, skipping connection of its transactions // (its coinbase is unspendable) if (block.GetHash() == chainparams.GetConsensus().hashGenesisBlock) { if (!fJustCheck) view.SetBestBlock(pindex->GetBlockHash()); return true; } bool fScriptChecks = true; if (!hashAssumeValid.IsNull()) { // We've been configured with the hash of a block which has been externally verified to have a valid history. // A suitable default value is included with the software and updated from time to time. Because validity // relative to a piece of software is an objective fact these defaults can be easily reviewed. // This setting doesn't force the selection of any particular chain but makes validating some faster by // effectively caching the result of part of the verification. BlockMap::const_iterator it = mapBlockIndex.find(hashAssumeValid); if (it != mapBlockIndex.end()) { if (it->second->GetAncestor(pindex->nHeight) == pindex && pindexBestHeader->GetAncestor(pindex->nHeight) == pindex && pindexBestHeader->nChainWork >= UintToArith256(chainparams.GetConsensus().nMinimumChainWork)) { // This block is a member of the assumed verified chain and an ancestor of the best header. // The equivalent time check discourages hashpower from extorting the network via DOS attack // into accepting an invalid block through telling users they must manually set assumevalid. // Requiring a software change or burying the invalid block, regardless of the setting, makes // it hard to hide the implication of the demand. This also avoids having release candidates // that are hardly doing any signature verification at all in testing without having to // artificially set the default assumed verified block further back. // The test against nMinimumChainWork prevents the skipping when denied access to any chain at // least as good as the expected chain. fScriptChecks = (GetBlockProofEquivalentTime(*pindexBestHeader, *pindex, *pindexBestHeader, chainparams.GetConsensus()) <= 60 * 60 * 24 * 7 * 2); } } } if (fCheckpointsEnabled) { CBlockIndex *pindexLastCheckpoint = Checkpoints::GetLastCheckpoint(chainparams.Checkpoints()); if (pindexLastCheckpoint && pindexLastCheckpoint->GetAncestor(pindex->nHeight) == pindex) { // This block is an ancestor of a checkpoint: disable script checks fScriptChecks = false; } } int64_t nTime1 = GetTimeMicros(); nTimeCheck += nTime1 - nTimeStart; LogPrint("bench", " - Sanity checks: %.2fms [%.2fs]\n", 0.001 * (nTime1 - nTimeStart), nTimeCheck * 0.000001); // Do not allow blocks that contain transactions which 'overwrite' older transactions, // unless those are already completely spent. // If such overwrites are allowed, coinbases and transactions depending upon those // can be duplicated to remove the ability to spend the first instance -- even after // being sent to another address. // See BIP30 and http://r6.ca/blog/20120206T005236Z.html for more information. // This logic is not necessary for memory pool transactions, as AcceptToMemoryPool // already refuses previously-known transaction ids entirely. // This rule was originally applied to all blocks with a timestamp after March 15, 2012, 0:00 UTC. // Now that the whole chain is irreversibly beyond that time it is applied to all blocks except the // two in the chain that violate it. This prevents exploiting the issue against nodes during their // initial block download. bool fEnforceBIP30 = (!pindex->phashBlock) || // Enforce on CreateNewBlock invocations which don't have a hash. !((pindex->nHeight==91842 && pindex->GetBlockHash() == uint256S("0x00000000000a4d0a398161ffc163c503763b1f4360639393e0e4c8e300e0caec")) || (pindex->nHeight==91880 && pindex->GetBlockHash() == uint256S("0x00000000000743f190a18c5577a3c2d2a1f610ae9601ac046a38084ccb7cd721"))); // Once BIP34 activated it was not possible to create new duplicate coinbases and thus other than starting // with the 2 existing duplicate coinbase pairs, not possible to create overwriting txs. But by the // time BIP34 activated, in each of the existing pairs the duplicate coinbase had overwritten the first // before the first had been spent. Since those coinbases are sufficiently buried its no longer possible to create further // duplicate transactions descending from the known pairs either. // If we're on the known chain at height greater than where BIP34 activated, we can save the db accesses needed for the BIP30 check. CBlockIndex *pindexBIP34height = pindex->pprev->GetAncestor(chainparams.GetConsensus().BIP34Height); //Only continue to enforce if we're below BIP34 activation height or the block hash at that height doesn't correspond. fEnforceBIP30 = fEnforceBIP30 && (!pindexBIP34height || !(pindexBIP34height->GetBlockHash() == chainparams.GetConsensus().BIP34Hash)); if (fEnforceBIP30) { BOOST_FOREACH(const CTransaction& tx, block.vtx) { const CCoins* coins = view.AccessCoins(tx.GetHash()); if (coins && !coins->IsPruned()) return state.DoS(100, error("ConnectBlock(): tried to overwrite transaction"), REJECT_INVALID, "bad-txns-BIP30"); } } // BIP16 didn't become active until Apr 1 2012 int64_t nBIP16SwitchTime = 1333238400; bool fStrictPayToScriptHash = (pindex->GetBlockTime() >= nBIP16SwitchTime); unsigned int flags = fStrictPayToScriptHash ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE; // Start enforcing the DERSIG (BIP66) rules, for block.nVersion=3 blocks, // when 75% of the network has upgraded: if (block.nVersion >= 3 && IsSuperMajority(3, pindex->pprev, chainparams.GetConsensus().nMajorityEnforceBlockUpgrade, chainparams.GetConsensus())) { flags |= SCRIPT_VERIFY_DERSIG; } // Start enforcing CHECKLOCKTIMEVERIFY, (BIP65) for block.nVersion=4 // blocks, when 75% of the network has upgraded: if (block.nVersion >= 4 && IsSuperMajority(4, pindex->pprev, chainparams.GetConsensus().nMajorityEnforceBlockUpgrade, chainparams.GetConsensus())) { flags |= SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY; } // Start enforcing BIP68 (sequence locks) and BIP112 (CHECKSEQUENCEVERIFY) using versionbits logic. int nLockTimeFlags = 0; if (VersionBitsState(pindex->pprev, chainparams.GetConsensus(), Consensus::DEPLOYMENT_CSV, versionbitscache) == THRESHOLD_ACTIVE) { flags |= SCRIPT_VERIFY_CHECKSEQUENCEVERIFY; nLockTimeFlags |= LOCKTIME_VERIFY_SEQUENCE; } int64_t nTime2 = GetTimeMicros(); nTimeForks += nTime2 - nTime1; LogPrint("bench", " - Fork checks: %.2fms [%.2fs]\n", 0.001 * (nTime2 - nTime1), nTimeForks * 0.000001); CBlockUndo blockundo; CCheckQueueControl<CScriptCheck> control(fScriptChecks && nScriptCheckThreads ? &scriptcheckqueue : NULL); std::vector<int> prevheights; CAmount nFees = 0; int nInputs = 0; unsigned int nSigOps = 0; CDiskTxPos pos(pindex->GetBlockPos(), GetSizeOfCompactSize(block.vtx.size())); std::vector<std::pair<uint256, CDiskTxPos> > vPos; vPos.reserve(block.vtx.size()); blockundo.vtxundo.reserve(block.vtx.size() - 1); std::vector<std::pair<CAddressIndexKey, CAmount> > addressIndex; std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> > addressUnspentIndex; std::vector<std::pair<CSpentIndexKey, CSpentIndexValue> > spentIndex; for (unsigned int i = 0; i < block.vtx.size(); i++) { const CTransaction &tx = block.vtx[i]; const uint256 txhash = tx.GetHash(); nInputs += tx.vin.size(); nSigOps += GetLegacySigOpCount(tx); if (nSigOps > MAX_BLOCK_SIGOPS) return state.DoS(100, error("ConnectBlock(): too many sigops"), REJECT_INVALID, "bad-blk-sigops"); if (!tx.IsCoinBase()) { if (!view.HaveInputs(tx)) return state.DoS(100, error("ConnectBlock(): inputs missing/spent"), REJECT_INVALID, "bad-txns-inputs-missingorspent"); // Check that transaction is BIP68 final // BIP68 lock checks (as opposed to nLockTime checks) must // be in ConnectBlock because they require the UTXO set prevheights.resize(tx.vin.size()); for (size_t j = 0; j < tx.vin.size(); j++) { prevheights[j] = view.AccessCoins(tx.vin[j].prevout.hash)->nHeight; } if (!SequenceLocks(tx, nLockTimeFlags, &prevheights, *pindex)) { return state.DoS(100, error("%s: contains a non-BIP68-final transaction", __func__), REJECT_INVALID, "bad-txns-nonfinal"); } if (fAddressIndex || fSpentIndex) { for (size_t j = 0; j < tx.vin.size(); j++) { const CTxIn input = tx.vin[j]; const CTxOut &prevout = view.GetOutputFor(tx.vin[j]); uint160 hashBytes; int addressType; if (prevout.scriptPubKey.IsPayToScriptHash()) { hashBytes = uint160(vector <unsigned char>(prevout.scriptPubKey.begin()+2, prevout.scriptPubKey.begin()+22)); addressType = 2; } else if (prevout.scriptPubKey.IsPayToPublicKeyHash()) { hashBytes = uint160(vector <unsigned char>(prevout.scriptPubKey.begin()+3, prevout.scriptPubKey.begin()+23)); addressType = 1; } else { hashBytes.SetNull(); addressType = 0; } if (fAddressIndex && addressType > 0) { // record spending activity addressIndex.push_back(make_pair(CAddressIndexKey(addressType, hashBytes, pindex->nHeight, i, txhash, j, true), prevout.nValue * -1)); // remove address from unspent index addressUnspentIndex.push_back(make_pair(CAddressUnspentKey(addressType, hashBytes, input.prevout.hash, input.prevout.n), CAddressUnspentValue())); } if (fSpentIndex) { // add the spent index to determine the txid and input that spent an output // and to find the amount and address from an input spentIndex.push_back(make_pair(CSpentIndexKey(input.prevout.hash, input.prevout.n), CSpentIndexValue(txhash, j, pindex->nHeight, prevout.nValue, addressType, hashBytes))); } } } if (fStrictPayToScriptHash) { // Add in sigops done by pay-to-script-hash inputs; // this is to prevent a "rogue miner" from creating // an incredibly-expensive-to-validate block. nSigOps += GetP2SHSigOpCount(tx, view); if (nSigOps > MAX_BLOCK_SIGOPS) return state.DoS(100, error("ConnectBlock(): too many sigops"), REJECT_INVALID, "bad-blk-sigops"); } nFees += view.GetValueIn(tx)-tx.GetValueOut(); std::vector<CScriptCheck> vChecks; bool fCacheResults = fJustCheck; /* Don't cache results if we're actually connecting blocks (still consult the cache, though) */ if (!CheckInputs(tx, state, view, fScriptChecks, flags, fCacheResults, nScriptCheckThreads ? &vChecks : NULL)) return error("ConnectBlock(): CheckInputs on %s failed with %s", tx.GetHash().ToString(), FormatStateMessage(state)); control.Add(vChecks); } if (fAddressIndex) { for (unsigned int k = 0; k < tx.vout.size(); k++) { const CTxOut &out = tx.vout[k]; if (out.scriptPubKey.IsPayToScriptHash()) { vector<unsigned char> hashBytes(out.scriptPubKey.begin()+2, out.scriptPubKey.begin()+22); // record receiving activity addressIndex.push_back(make_pair(CAddressIndexKey(2, uint160(hashBytes), pindex->nHeight, i, txhash, k, false), out.nValue)); // record unspent output addressUnspentIndex.push_back(make_pair(CAddressUnspentKey(2, uint160(hashBytes), txhash, k), CAddressUnspentValue(out.nValue, out.scriptPubKey, pindex->nHeight))); } else if (out.scriptPubKey.IsPayToPublicKeyHash()) { vector<unsigned char> hashBytes(out.scriptPubKey.begin()+3, out.scriptPubKey.begin()+23); // record receiving activity addressIndex.push_back(make_pair(CAddressIndexKey(1, uint160(hashBytes), pindex->nHeight, i, txhash, k, false), out.nValue)); // record unspent output addressUnspentIndex.push_back(make_pair(CAddressUnspentKey(1, uint160(hashBytes), txhash, k), CAddressUnspentValue(out.nValue, out.scriptPubKey, pindex->nHeight))); } else { continue; } } } CTxUndo undoDummy; if (i > 0) { blockundo.vtxundo.push_back(CTxUndo()); } UpdateCoins(tx, state, view, i == 0 ? undoDummy : blockundo.vtxundo.back(), pindex->nHeight); vPos.push_back(std::make_pair(tx.GetHash(), pos)); pos.nTxOffset += ::GetSerializeSize(tx, SER_DISK, CLIENT_VERSION); } int64_t nTime3 = GetTimeMicros(); nTimeConnect += nTime3 - nTime2; LogPrint("bench", " - Connect %u transactions: %.2fms (%.3fms/tx, %.3fms/txin) [%.2fs]\n", (unsigned)block.vtx.size(), 0.001 * (nTime3 - nTime2), 0.001 * (nTime3 - nTime2) / block.vtx.size(), nInputs <= 1 ? 0 : 0.001 * (nTime3 - nTime2) / (nInputs-1), nTimeConnect * 0.000001); // LUMO : MODIFIED TO CHECK MASTERNODE PAYMENTS AND SUPERBLOCKS // It's possible that we simply don't have enough data and this could fail // (i.e. block itself could be a correct one and we need to store it), // that's why this is in ConnectBlock. Could be the other way around however - // the peer who sent us this block is missing some data and wasn't able // to recognize that block is actually invalid. // TODO: resync data (both ways?) and try to reprocess this block later. CAmount blockReward = nFees + GetBlockSubsidy(pindex->pprev->nBits, pindex->pprev->nHeight, chainparams.GetConsensus()); std::string strError = ""; if (!IsBlockValueValid(block, pindex->nHeight, blockReward, strError)) { return state.DoS(0, error("ConnectBlock(LUMO): %s", strError), REJECT_INVALID, "bad-cb-amount"); } if (!IsBlockPayeeValid(block.vtx[0], pindex->nHeight, blockReward)) { mapRejectedBlocks.insert(make_pair(block.GetHash(), GetTime())); return state.DoS(0, error("ConnectBlock(LUMO): couldn't find masternode or superblock payments"), REJECT_INVALID, "bad-cb-payee"); } // END LUMO if (!control.Wait()) return state.DoS(100, false); int64_t nTime4 = GetTimeMicros(); nTimeVerify += nTime4 - nTime2; LogPrint("bench", " - Verify %u txins: %.2fms (%.3fms/txin) [%.2fs]\n", nInputs - 1, 0.001 * (nTime4 - nTime2), nInputs <= 1 ? 0 : 0.001 * (nTime4 - nTime2) / (nInputs-1), nTimeVerify * 0.000001); if (fJustCheck) return true; // Write undo information to disk if (pindex->GetUndoPos().IsNull() || !pindex->IsValid(BLOCK_VALID_SCRIPTS)) { if (pindex->GetUndoPos().IsNull()) { CDiskBlockPos pos; if (!FindUndoPos(state, pindex->nFile, pos, ::GetSerializeSize(blockundo, SER_DISK, CLIENT_VERSION) + 40)) return error("ConnectBlock(): FindUndoPos failed"); if (!UndoWriteToDisk(blockundo, pos, pindex->pprev->GetBlockHash(), chainparams.MessageStart())) return AbortNode(state, "Failed to write undo data"); // update nUndoPos in block index pindex->nUndoPos = pos.nPos; pindex->nStatus |= BLOCK_HAVE_UNDO; } pindex->RaiseValidity(BLOCK_VALID_SCRIPTS); setDirtyBlockIndex.insert(pindex); } if (fTxIndex) if (!pblocktree->WriteTxIndex(vPos)) return AbortNode(state, "Failed to write transaction index"); if (fAddressIndex) { if (!pblocktree->WriteAddressIndex(addressIndex)) { return AbortNode(state, "Failed to write address index"); } if (!pblocktree->UpdateAddressUnspentIndex(addressUnspentIndex)) { return AbortNode(state, "Failed to write address unspent index"); } } if (fSpentIndex) if (!pblocktree->UpdateSpentIndex(spentIndex)) return AbortNode(state, "Failed to write transaction index"); if (fTimestampIndex) if (!pblocktree->WriteTimestampIndex(CTimestampIndexKey(pindex->nTime, pindex->GetBlockHash()))) return AbortNode(state, "Failed to write timestamp index"); // add this block to the view's block chain view.SetBestBlock(pindex->GetBlockHash()); int64_t nTime5 = GetTimeMicros(); nTimeIndex += nTime5 - nTime4; LogPrint("bench", " - Index writing: %.2fms [%.2fs]\n", 0.001 * (nTime5 - nTime4), nTimeIndex * 0.000001); // Watch for changes to the previous coinbase transaction. static uint256 hashPrevBestCoinBase; GetMainSignals().UpdatedTransaction(hashPrevBestCoinBase); hashPrevBestCoinBase = block.vtx[0].GetHash(); int64_t nTime6 = GetTimeMicros(); nTimeCallbacks += nTime6 - nTime5; LogPrint("bench", " - Callbacks: %.2fms [%.2fs]\n", 0.001 * (nTime6 - nTime5), nTimeCallbacks * 0.000001); return true; } enum FlushStateMode { FLUSH_STATE_NONE, FLUSH_STATE_IF_NEEDED, FLUSH_STATE_PERIODIC, FLUSH_STATE_ALWAYS }; /** * Update the on-disk chain state. * The caches and indexes are flushed depending on the mode we're called with * if they're too large, if it's been a while since the last write, * or always and in all cases if we're in prune mode and are deleting files. */ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) { const CChainParams& chainparams = Params(); LOCK2(cs_main, cs_LastBlockFile); static int64_t nLastWrite = 0; static int64_t nLastFlush = 0; static int64_t nLastSetChain = 0; std::set<int> setFilesToPrune; bool fFlushForPrune = false; try { if (fPruneMode && fCheckForPruning && !fReindex) { FindFilesToPrune(setFilesToPrune, chainparams.PruneAfterHeight()); fCheckForPruning = false; if (!setFilesToPrune.empty()) { fFlushForPrune = true; if (!fHavePruned) { pblocktree->WriteFlag("prunedblockfiles", true); fHavePruned = true; } } } int64_t nNow = GetTimeMicros(); // Avoid writing/flushing immediately after startup. if (nLastWrite == 0) { nLastWrite = nNow; } if (nLastFlush == 0) { nLastFlush = nNow; } if (nLastSetChain == 0) { nLastSetChain = nNow; } size_t cacheSize = pcoinsTip->DynamicMemoryUsage(); // The cache is large and close to the limit, but we have time now (not in the middle of a block processing). bool fCacheLarge = mode == FLUSH_STATE_PERIODIC && cacheSize * (10.0/9) > nCoinCacheUsage; // The cache is over the limit, we have to write now. bool fCacheCritical = mode == FLUSH_STATE_IF_NEEDED && cacheSize > nCoinCacheUsage; // It's been a while since we wrote the block index to disk. Do this frequently, so we don't need to redownload after a crash. bool fPeriodicWrite = mode == FLUSH_STATE_PERIODIC && nNow > nLastWrite + (int64_t)DATABASE_WRITE_INTERVAL * 1000000; // It's been very long since we flushed the cache. Do this infrequently, to optimize cache usage. bool fPeriodicFlush = mode == FLUSH_STATE_PERIODIC && nNow > nLastFlush + (int64_t)DATABASE_FLUSH_INTERVAL * 1000000; // Combine all conditions that result in a full cache flush. bool fDoFullFlush = (mode == FLUSH_STATE_ALWAYS) || fCacheLarge || fCacheCritical || fPeriodicFlush || fFlushForPrune; // Write blocks and block index to disk. if (fDoFullFlush || fPeriodicWrite) { // Depend on nMinDiskSpace to ensure we can write block index if (!CheckDiskSpace(0)) return state.Error("out of disk space"); // First make sure all block and undo data is flushed to disk. FlushBlockFile(); // Then update all block file information (which may refer to block and undo files). { std::vector<std::pair<int, const CBlockFileInfo*> > vFiles; vFiles.reserve(setDirtyFileInfo.size()); for (set<int>::iterator it = setDirtyFileInfo.begin(); it != setDirtyFileInfo.end(); ) { vFiles.push_back(make_pair(*it, &vinfoBlockFile[*it])); setDirtyFileInfo.erase(it++); } std::vector<const CBlockIndex*> vBlocks; vBlocks.reserve(setDirtyBlockIndex.size()); for (set<CBlockIndex*>::iterator it = setDirtyBlockIndex.begin(); it != setDirtyBlockIndex.end(); ) { vBlocks.push_back(*it); setDirtyBlockIndex.erase(it++); } if (!pblocktree->WriteBatchSync(vFiles, nLastBlockFile, vBlocks)) { return AbortNode(state, "Files to write to block index database"); } } // Finally remove any pruned files if (fFlushForPrune) UnlinkPrunedFiles(setFilesToPrune); nLastWrite = nNow; } // Flush best chain related state. This can only be done if the blocks / block index write was also done. if (fDoFullFlush) { // Typical CCoins structures on disk are around 128 bytes in size. // Pushing a new one to the database can cause it to be written // twice (once in the log, and once in the tables). This is already // an overestimation, as most will delete an existing entry or // overwrite one. Still, use a conservative safety factor of 2. if (!CheckDiskSpace(128 * 2 * 2 * pcoinsTip->GetCacheSize())) return state.Error("out of disk space"); // Flush the chainstate (which may refer to block index entries). if (!pcoinsTip->Flush()) return AbortNode(state, "Failed to write to coin database"); nLastFlush = nNow; } if (fDoFullFlush || ((mode == FLUSH_STATE_ALWAYS || mode == FLUSH_STATE_PERIODIC) && nNow > nLastSetChain + (int64_t)DATABASE_WRITE_INTERVAL * 1000000)) { // Update best block in wallet (so we can detect restored wallets). GetMainSignals().SetBestChain(chainActive.GetLocator()); nLastSetChain = nNow; } } catch (const std::runtime_error& e) { return AbortNode(state, std::string("System error while flushing: ") + e.what()); } return true; } void FlushStateToDisk() { CValidationState state; FlushStateToDisk(state, FLUSH_STATE_ALWAYS); } void PruneAndFlush() { CValidationState state; fCheckForPruning = true; FlushStateToDisk(state, FLUSH_STATE_NONE); } /** Update chainActive and related internal data structures. */ void static UpdateTip(CBlockIndex *pindexNew) { const CChainParams& chainParams = Params(); chainActive.SetTip(pindexNew); // New best block nTimeBestReceived = GetTime(); mempool.AddTransactionsUpdated(1); LogPrintf("%s: new best=%s height=%d log2_work=%.8g tx=%lu date=%s progress=%f cache=%.1fMiB(%utx)\n", __func__, chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(), log(chainActive.Tip()->nChainWork.getdouble())/log(2.0), (unsigned long)chainActive.Tip()->nChainTx, DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime()), Checkpoints::GuessVerificationProgress(chainParams.Checkpoints(), chainActive.Tip()), pcoinsTip->DynamicMemoryUsage() * (1.0 / (1<<20)), pcoinsTip->GetCacheSize()); cvBlockChange.notify_all(); // Check the version of the last 100 blocks to see if we need to upgrade: static bool fWarned = false; if (!IsInitialBlockDownload()) { int nUpgraded = 0; const CBlockIndex* pindex = chainActive.Tip(); for (int bit = 0; bit < VERSIONBITS_NUM_BITS; bit++) { WarningBitsConditionChecker checker(bit); ThresholdState state = checker.GetStateFor(pindex, chainParams.GetConsensus(), warningcache[bit]); if (state == THRESHOLD_ACTIVE || state == THRESHOLD_LOCKED_IN) { if (state == THRESHOLD_ACTIVE) { strMiscWarning = strprintf(_("Warning: unknown new rules activated (versionbit %i)"), bit); if (!fWarned) { CAlert::Notify(strMiscWarning, true); fWarned = true; } } else { LogPrintf("%s: unknown new rules are about to activate (versionbit %i)\n", __func__, bit); } } } for (int i = 0; i < 100 && pindex != NULL; i++) { int32_t nExpectedVersion = ComputeBlockVersion(pindex->pprev, chainParams.GetConsensus()); if (pindex->nVersion > VERSIONBITS_LAST_OLD_BLOCK_VERSION && (pindex->nVersion & ~nExpectedVersion) != 0) ++nUpgraded; pindex = pindex->pprev; } if (nUpgraded > 0) LogPrintf("%s: %d of last 100 blocks have unexpected version\n", __func__, nUpgraded); if (nUpgraded > 100/2) { // strMiscWarning is read by GetWarnings(), called by Qt and the JSON-RPC code to warn the user: strMiscWarning = _("Warning: Unknown block versions being mined! It's possible unknown rules are in effect"); if (!fWarned) { CAlert::Notify(strMiscWarning, true); fWarned = true; } } } } /** Disconnect chainActive's tip. You probably want to call mempool.removeForReorg and manually re-limit mempool size after this, with cs_main held. */ bool static DisconnectTip(CValidationState& state, const Consensus::Params& consensusParams) { CBlockIndex *pindexDelete = chainActive.Tip(); assert(pindexDelete); // Read block from disk. CBlock block; if (!ReadBlockFromDisk(block, pindexDelete, consensusParams)) return AbortNode(state, "Failed to read block"); // Apply the block atomically to the chain state. int64_t nStart = GetTimeMicros(); { CCoinsViewCache view(pcoinsTip); if (!DisconnectBlock(block, state, pindexDelete, view)) return error("DisconnectTip(): DisconnectBlock %s failed", pindexDelete->GetBlockHash().ToString()); assert(view.Flush()); } LogPrint("bench", "- Disconnect block: %.2fms\n", (GetTimeMicros() - nStart) * 0.001); // Write the chain state to disk, if necessary. if (!FlushStateToDisk(state, FLUSH_STATE_IF_NEEDED)) return false; // Resurrect mempool transactions from the disconnected block. std::vector<uint256> vHashUpdate; BOOST_FOREACH(const CTransaction &tx, block.vtx) { // ignore validation errors in resurrected transactions list<CTransaction> removed; CValidationState stateDummy; if (tx.IsCoinBase() || !AcceptToMemoryPool(mempool, stateDummy, tx, false, NULL, true)) { mempool.remove(tx, removed, true); } else if (mempool.exists(tx.GetHash())) { vHashUpdate.push_back(tx.GetHash()); } } // AcceptToMemoryPool/addUnchecked all assume that new mempool entries have // no in-mempool children, which is generally not true when adding // previously-confirmed transactions back to the mempool. // UpdateTransactionsFromBlock finds descendants of any transactions in this // block that were added back and cleans up the mempool state. mempool.UpdateTransactionsFromBlock(vHashUpdate); // Update chainActive and related variables. UpdateTip(pindexDelete->pprev); // Let wallets know transactions went from 1-confirmed to // 0-confirmed or conflicted: BOOST_FOREACH(const CTransaction &tx, block.vtx) { SyncWithWallets(tx, NULL); } return true; } static int64_t nTimeReadFromDisk = 0; static int64_t nTimeConnectTotal = 0; static int64_t nTimeFlush = 0; static int64_t nTimeChainState = 0; static int64_t nTimePostConnect = 0; /** * Connect a new block to chainActive. pblock is either NULL or a pointer to a CBlock * corresponding to pindexNew, to bypass loading it again from disk. */ bool static ConnectTip(CValidationState& state, const CChainParams& chainparams, CBlockIndex* pindexNew, const CBlock* pblock) { assert(pindexNew->pprev == chainActive.Tip()); // Read block from disk. int64_t nTime1 = GetTimeMicros(); CBlock block; if (!pblock) { if (!ReadBlockFromDisk(block, pindexNew, chainparams.GetConsensus())) return AbortNode(state, "Failed to read block"); pblock = &block; } // Apply the block atomically to the chain state. int64_t nTime2 = GetTimeMicros(); nTimeReadFromDisk += nTime2 - nTime1; int64_t nTime3; LogPrint("bench", " - Load block from disk: %.2fms [%.2fs]\n", (nTime2 - nTime1) * 0.001, nTimeReadFromDisk * 0.000001); { CCoinsViewCache view(pcoinsTip); bool rv = ConnectBlock(*pblock, state, pindexNew, view); GetMainSignals().BlockChecked(*pblock, state); if (!rv) { if (state.IsInvalid()) InvalidBlockFound(pindexNew, state); return error("ConnectTip(): ConnectBlock %s failed", pindexNew->GetBlockHash().ToString()); } mapBlockSource.erase(pindexNew->GetBlockHash()); nTime3 = GetTimeMicros(); nTimeConnectTotal += nTime3 - nTime2; LogPrint("bench", " - Connect total: %.2fms [%.2fs]\n", (nTime3 - nTime2) * 0.001, nTimeConnectTotal * 0.000001); assert(view.Flush()); } int64_t nTime4 = GetTimeMicros(); nTimeFlush += nTime4 - nTime3; LogPrint("bench", " - Flush: %.2fms [%.2fs]\n", (nTime4 - nTime3) * 0.001, nTimeFlush * 0.000001); // Write the chain state to disk, if necessary. if (!FlushStateToDisk(state, FLUSH_STATE_IF_NEEDED)) return false; int64_t nTime5 = GetTimeMicros(); nTimeChainState += nTime5 - nTime4; LogPrint("bench", " - Writing chainstate: %.2fms [%.2fs]\n", (nTime5 - nTime4) * 0.001, nTimeChainState * 0.000001); // Remove conflicting transactions from the mempool. list<CTransaction> txConflicted; mempool.removeForBlock(pblock->vtx, pindexNew->nHeight, txConflicted, !IsInitialBlockDownload()); // Update chainActive & related variables. UpdateTip(pindexNew); // Tell wallet about transactions that went from mempool // to conflicted: BOOST_FOREACH(const CTransaction &tx, txConflicted) { SyncWithWallets(tx, NULL); } // ... and about transactions that got confirmed: BOOST_FOREACH(const CTransaction &tx, pblock->vtx) { SyncWithWallets(tx, pblock); } int64_t nTime6 = GetTimeMicros(); nTimePostConnect += nTime6 - nTime5; nTimeTotal += nTime6 - nTime1; LogPrint("bench", " - Connect postprocess: %.2fms [%.2fs]\n", (nTime6 - nTime5) * 0.001, nTimePostConnect * 0.000001); LogPrint("bench", "- Connect block: %.2fms [%.2fs]\n", (nTime6 - nTime1) * 0.001, nTimeTotal * 0.000001); return true; } bool DisconnectBlocks(int blocks) { LOCK(cs_main); CValidationState state; const CChainParams& chainparams = Params(); LogPrintf("DisconnectBlocks -- Got command to replay %d blocks\n", blocks); for(int i = 0; i < blocks; i++) { if(!DisconnectTip(state, chainparams.GetConsensus()) || !state.IsValid()) { return false; } } return true; } void ReprocessBlocks(int nBlocks) { LOCK(cs_main); std::map<uint256, int64_t>::iterator it = mapRejectedBlocks.begin(); while(it != mapRejectedBlocks.end()){ //use a window twice as large as is usual for the nBlocks we want to reset if((*it).second > GetTime() - (nBlocks*60*5)) { BlockMap::iterator mi = mapBlockIndex.find((*it).first); if (mi != mapBlockIndex.end() && (*mi).second) { CBlockIndex* pindex = (*mi).second; LogPrintf("ReprocessBlocks -- %s\n", (*it).first.ToString()); CValidationState state; ReconsiderBlock(state, pindex); } } ++it; } DisconnectBlocks(nBlocks); CValidationState state; ActivateBestChain(state, Params()); } /** * Return the tip of the chain with the most work in it, that isn't * known to be invalid (it's however far from certain to be valid). */ static CBlockIndex* FindMostWorkChain() { do { CBlockIndex *pindexNew = NULL; // Find the best candidate header. { std::set<CBlockIndex*, CBlockIndexWorkComparator>::reverse_iterator it = setBlockIndexCandidates.rbegin(); if (it == setBlockIndexCandidates.rend()) return NULL; pindexNew = *it; } // Check whether all blocks on the path between the currently active chain and the candidate are valid. // Just going until the active chain is an optimization, as we know all blocks in it are valid already. CBlockIndex *pindexTest = pindexNew; bool fInvalidAncestor = false; while (pindexTest && !chainActive.Contains(pindexTest)) { assert(pindexTest->nChainTx || pindexTest->nHeight == 0); // Pruned nodes may have entries in setBlockIndexCandidates for // which block files have been deleted. Remove those as candidates // for the most work chain if we come across them; we can't switch // to a chain unless we have all the non-active-chain parent blocks. bool fFailedChain = pindexTest->nStatus & BLOCK_FAILED_MASK; bool fMissingData = !(pindexTest->nStatus & BLOCK_HAVE_DATA); if (fFailedChain || fMissingData) { // Candidate chain is not usable (either invalid or missing data) if (fFailedChain && (pindexBestInvalid == NULL || pindexNew->nChainWork > pindexBestInvalid->nChainWork)) pindexBestInvalid = pindexNew; CBlockIndex *pindexFailed = pindexNew; // Remove the entire chain from the set. while (pindexTest != pindexFailed) { if (fFailedChain) { pindexFailed->nStatus |= BLOCK_FAILED_CHILD; } else if (fMissingData) { // If we're missing data, then add back to mapBlocksUnlinked, // so that if the block arrives in the future we can try adding // to setBlockIndexCandidates again. mapBlocksUnlinked.insert(std::make_pair(pindexFailed->pprev, pindexFailed)); } setBlockIndexCandidates.erase(pindexFailed); pindexFailed = pindexFailed->pprev; } setBlockIndexCandidates.erase(pindexTest); fInvalidAncestor = true; break; } pindexTest = pindexTest->pprev; } if (!fInvalidAncestor) return pindexNew; } while(true); } /** Delete all entries in setBlockIndexCandidates that are worse than the current tip. */ static void PruneBlockIndexCandidates() { // Note that we can't delete the current block itself, as we may need to return to it later in case a // reorganization to a better block fails. std::set<CBlockIndex*, CBlockIndexWorkComparator>::iterator it = setBlockIndexCandidates.begin(); while (it != setBlockIndexCandidates.end() && setBlockIndexCandidates.value_comp()(*it, chainActive.Tip())) { setBlockIndexCandidates.erase(it++); } // Either the current tip or a successor of it we're working towards is left in setBlockIndexCandidates. assert(!setBlockIndexCandidates.empty()); } /** * Try to make some progress towards making pindexMostWork the active block. * pblock is either NULL or a pointer to a CBlock corresponding to pindexMostWork. */ static bool ActivateBestChainStep(CValidationState& state, const CChainParams& chainparams, CBlockIndex* pindexMostWork, const CBlock* pblock) { AssertLockHeld(cs_main); bool fInvalidFound = false; const CBlockIndex *pindexOldTip = chainActive.Tip(); const CBlockIndex *pindexFork = chainActive.FindFork(pindexMostWork); // Disconnect active blocks which are no longer in the best chain. bool fBlocksDisconnected = false; while (chainActive.Tip() && chainActive.Tip() != pindexFork) { if (!DisconnectTip(state, chainparams.GetConsensus())) return false; fBlocksDisconnected = true; } // Build list of new blocks to connect. std::vector<CBlockIndex*> vpindexToConnect; bool fContinue = true; int nHeight = pindexFork ? pindexFork->nHeight : -1; while (fContinue && nHeight != pindexMostWork->nHeight) { // Don't iterate the entire list of potential improvements toward the best tip, as we likely only need // a few blocks along the way. int nTargetHeight = std::min(nHeight + 32, pindexMostWork->nHeight); vpindexToConnect.clear(); vpindexToConnect.reserve(nTargetHeight - nHeight); CBlockIndex *pindexIter = pindexMostWork->GetAncestor(nTargetHeight); while (pindexIter && pindexIter->nHeight != nHeight) { vpindexToConnect.push_back(pindexIter); pindexIter = pindexIter->pprev; } nHeight = nTargetHeight; // Connect new blocks. BOOST_REVERSE_FOREACH(CBlockIndex *pindexConnect, vpindexToConnect) { if (!ConnectTip(state, chainparams, pindexConnect, pindexConnect == pindexMostWork ? pblock : NULL)) { if (state.IsInvalid()) { // The block violates a consensus rule. if (!state.CorruptionPossible()) InvalidChainFound(vpindexToConnect.back()); state = CValidationState(); fInvalidFound = true; fContinue = false; break; } else { // A system error occurred (disk space, database error, ...). return false; } } else { PruneBlockIndexCandidates(); if (!pindexOldTip || chainActive.Tip()->nChainWork > pindexOldTip->nChainWork) { // We're in a better position than we were. Return temporarily to release the lock. fContinue = false; break; } } } } if (fBlocksDisconnected) { mempool.removeForReorg(pcoinsTip, chainActive.Tip()->nHeight + 1, STANDARD_LOCKTIME_VERIFY_FLAGS); LimitMempoolSize(mempool, GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000, GetArg("-mempoolexpiry", DEFAULT_MEMPOOL_EXPIRY) * 60 * 60); } mempool.check(pcoinsTip); // Callbacks/notifications for a new best chain. if (fInvalidFound) CheckForkWarningConditionsOnNewFork(vpindexToConnect.back()); else CheckForkWarningConditions(); return true; } /** * Make the best chain active, in multiple steps. The result is either failure * or an activated best chain. pblock is either NULL or a pointer to a block * that is already loaded (to avoid loading it again from disk). */ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams, const CBlock *pblock) { CBlockIndex *pindexMostWork = NULL; do { boost::this_thread::interruption_point(); if (ShutdownRequested()) break; CBlockIndex *pindexNewTip = NULL; const CBlockIndex *pindexFork; bool fInitialDownload; { LOCK(cs_main); CBlockIndex *pindexOldTip = chainActive.Tip(); pindexMostWork = FindMostWorkChain(); // Whether we have anything to do at all. if (pindexMostWork == NULL || pindexMostWork == chainActive.Tip()) return true; if (!ActivateBestChainStep(state, chainparams, pindexMostWork, pblock && pblock->GetHash() == pindexMostWork->GetBlockHash() ? pblock : NULL)) return false; pindexNewTip = chainActive.Tip(); pindexFork = chainActive.FindFork(pindexOldTip); fInitialDownload = IsInitialBlockDownload(); } // When we reach this point, we switched to a new tip (stored in pindexNewTip). // Notifications/callbacks that can run without cs_main // Always notify the UI if a new block tip was connected if (pindexFork != pindexNewTip) { uiInterface.NotifyBlockTip(fInitialDownload, pindexNewTip); if (!fInitialDownload) { // Find the hashes of all blocks that weren't previously in the best chain. std::vector<uint256> vHashes; CBlockIndex *pindexToAnnounce = pindexNewTip; while (pindexToAnnounce != pindexFork) { vHashes.push_back(pindexToAnnounce->GetBlockHash()); pindexToAnnounce = pindexToAnnounce->pprev; if (vHashes.size() == MAX_BLOCKS_TO_ANNOUNCE) { // Limit announcements in case of a huge reorganization. // Rely on the peer's synchronization mechanism in that case. break; } } // Relay inventory, but don't relay old inventory during initial block download. int nBlockEstimate = 0; if (fCheckpointsEnabled) nBlockEstimate = Checkpoints::GetTotalBlocksEstimate(chainparams.Checkpoints()); { LOCK(cs_vNodes); BOOST_FOREACH(CNode* pnode, vNodes) { if (chainActive.Height() > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : nBlockEstimate)) { BOOST_REVERSE_FOREACH(const uint256& hash, vHashes) { pnode->PushBlockHash(hash); } } } } // Notify external listeners about the new tip. if (!vHashes.empty()) { GetMainSignals().UpdatedBlockTip(pindexNewTip); } } } } while(pindexMostWork != chainActive.Tip()); CheckBlockIndex(chainparams.GetConsensus()); // Write changes periodically to disk, after relay. if (!FlushStateToDisk(state, FLUSH_STATE_PERIODIC)) { return false; } return true; } bool InvalidateBlock(CValidationState& state, const Consensus::Params& consensusParams, CBlockIndex *pindex) { AssertLockHeld(cs_main); // Mark the block itself as invalid. pindex->nStatus |= BLOCK_FAILED_VALID; setDirtyBlockIndex.insert(pindex); setBlockIndexCandidates.erase(pindex); while (chainActive.Contains(pindex)) { CBlockIndex *pindexWalk = chainActive.Tip(); pindexWalk->nStatus |= BLOCK_FAILED_CHILD; setDirtyBlockIndex.insert(pindexWalk); setBlockIndexCandidates.erase(pindexWalk); // ActivateBestChain considers blocks already in chainActive // unconditionally valid already, so force disconnect away from it. if (!DisconnectTip(state, consensusParams)) { mempool.removeForReorg(pcoinsTip, chainActive.Tip()->nHeight + 1, STANDARD_LOCKTIME_VERIFY_FLAGS); return false; } } LimitMempoolSize(mempool, GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000, GetArg("-mempoolexpiry", DEFAULT_MEMPOOL_EXPIRY) * 60 * 60); // The resulting new best tip may not be in setBlockIndexCandidates anymore, so // add it again. BlockMap::iterator it = mapBlockIndex.begin(); while (it != mapBlockIndex.end()) { if (it->second->IsValid(BLOCK_VALID_TRANSACTIONS) && it->second->nChainTx && !setBlockIndexCandidates.value_comp()(it->second, chainActive.Tip())) { setBlockIndexCandidates.insert(it->second); } it++; } InvalidChainFound(pindex); mempool.removeForReorg(pcoinsTip, chainActive.Tip()->nHeight + 1, STANDARD_LOCKTIME_VERIFY_FLAGS); return true; } bool ReconsiderBlock(CValidationState& state, CBlockIndex *pindex) { AssertLockHeld(cs_main); int nHeight = pindex->nHeight; // Remove the invalidity flag from this block and all its descendants. BlockMap::iterator it = mapBlockIndex.begin(); while (it != mapBlockIndex.end()) { if (!it->second->IsValid() && it->second->GetAncestor(nHeight) == pindex) { it->second->nStatus &= ~BLOCK_FAILED_MASK; setDirtyBlockIndex.insert(it->second); if (it->second->IsValid(BLOCK_VALID_TRANSACTIONS) && it->second->nChainTx && setBlockIndexCandidates.value_comp()(chainActive.Tip(), it->second)) { setBlockIndexCandidates.insert(it->second); } if (it->second == pindexBestInvalid) { // Reset invalid block marker if it was pointing to one of those. pindexBestInvalid = NULL; } } it++; } // Remove the invalidity flag from all ancestors too. while (pindex != NULL) { if (pindex->nStatus & BLOCK_FAILED_MASK) { pindex->nStatus &= ~BLOCK_FAILED_MASK; setDirtyBlockIndex.insert(pindex); } pindex = pindex->pprev; } return true; } CBlockIndex* AddToBlockIndex(const CBlockHeader& block) { // Check for duplicate uint256 hash = block.GetHash(); BlockMap::iterator it = mapBlockIndex.find(hash); if (it != mapBlockIndex.end()) return it->second; // Construct new block index object CBlockIndex* pindexNew = new CBlockIndex(block); assert(pindexNew); // We assign the sequence id to blocks only when the full data is available, // to avoid miners withholding blocks but broadcasting headers, to get a // competitive advantage. pindexNew->nSequenceId = 0; BlockMap::iterator mi = mapBlockIndex.insert(make_pair(hash, pindexNew)).first; pindexNew->phashBlock = &((*mi).first); BlockMap::iterator miPrev = mapBlockIndex.find(block.hashPrevBlock); if (miPrev != mapBlockIndex.end()) { pindexNew->pprev = (*miPrev).second; pindexNew->nHeight = pindexNew->pprev->nHeight + 1; pindexNew->BuildSkip(); } pindexNew->nChainWork = (pindexNew->pprev ? pindexNew->pprev->nChainWork : 0) + GetBlockProof(*pindexNew); pindexNew->RaiseValidity(BLOCK_VALID_TREE); if (pindexBestHeader == NULL || pindexBestHeader->nChainWork < pindexNew->nChainWork) pindexBestHeader = pindexNew; setDirtyBlockIndex.insert(pindexNew); return pindexNew; } /** Mark a block as having its data received and checked (up to BLOCK_VALID_TRANSACTIONS). */ bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBlockIndex *pindexNew, const CDiskBlockPos& pos) { pindexNew->nTx = block.vtx.size(); pindexNew->nChainTx = 0; pindexNew->nFile = pos.nFile; pindexNew->nDataPos = pos.nPos; pindexNew->nUndoPos = 0; pindexNew->nStatus |= BLOCK_HAVE_DATA; pindexNew->RaiseValidity(BLOCK_VALID_TRANSACTIONS); setDirtyBlockIndex.insert(pindexNew); if (pindexNew->pprev == NULL || pindexNew->pprev->nChainTx) { // If pindexNew is the genesis block or all parents are BLOCK_VALID_TRANSACTIONS. deque<CBlockIndex*> queue; queue.push_back(pindexNew); // Recursively process any descendant blocks that now may be eligible to be connected. while (!queue.empty()) { CBlockIndex *pindex = queue.front(); queue.pop_front(); pindex->nChainTx = (pindex->pprev ? pindex->pprev->nChainTx : 0) + pindex->nTx; { LOCK(cs_nBlockSequenceId); pindex->nSequenceId = nBlockSequenceId++; } if (chainActive.Tip() == NULL || !setBlockIndexCandidates.value_comp()(pindex, chainActive.Tip())) { setBlockIndexCandidates.insert(pindex); } std::pair<std::multimap<CBlockIndex*, CBlockIndex*>::iterator, std::multimap<CBlockIndex*, CBlockIndex*>::iterator> range = mapBlocksUnlinked.equal_range(pindex); while (range.first != range.second) { std::multimap<CBlockIndex*, CBlockIndex*>::iterator it = range.first; queue.push_back(it->second); range.first++; mapBlocksUnlinked.erase(it); } } } else { if (pindexNew->pprev && pindexNew->pprev->IsValid(BLOCK_VALID_TREE)) { mapBlocksUnlinked.insert(std::make_pair(pindexNew->pprev, pindexNew)); } } return true; } bool FindBlockPos(CValidationState &state, CDiskBlockPos &pos, unsigned int nAddSize, unsigned int nHeight, uint64_t nTime, bool fKnown = false) { LOCK(cs_LastBlockFile); unsigned int nFile = fKnown ? pos.nFile : nLastBlockFile; if (vinfoBlockFile.size() <= nFile) { vinfoBlockFile.resize(nFile + 1); } if (!fKnown) { while (vinfoBlockFile[nFile].nSize + nAddSize >= MAX_BLOCKFILE_SIZE) { nFile++; if (vinfoBlockFile.size() <= nFile) { vinfoBlockFile.resize(nFile + 1); } } pos.nFile = nFile; pos.nPos = vinfoBlockFile[nFile].nSize; } if ((int)nFile != nLastBlockFile) { if (!fKnown) { LogPrintf("Leaving block file %i: %s\n", nLastBlockFile, vinfoBlockFile[nLastBlockFile].ToString()); } FlushBlockFile(!fKnown); nLastBlockFile = nFile; } vinfoBlockFile[nFile].AddBlock(nHeight, nTime); if (fKnown) vinfoBlockFile[nFile].nSize = std::max(pos.nPos + nAddSize, vinfoBlockFile[nFile].nSize); else vinfoBlockFile[nFile].nSize += nAddSize; if (!fKnown) { unsigned int nOldChunks = (pos.nPos + BLOCKFILE_CHUNK_SIZE - 1) / BLOCKFILE_CHUNK_SIZE; unsigned int nNewChunks = (vinfoBlockFile[nFile].nSize + BLOCKFILE_CHUNK_SIZE - 1) / BLOCKFILE_CHUNK_SIZE; if (nNewChunks > nOldChunks) { if (fPruneMode) fCheckForPruning = true; if (CheckDiskSpace(nNewChunks * BLOCKFILE_CHUNK_SIZE - pos.nPos)) { FILE *file = OpenBlockFile(pos); if (file) { LogPrintf("Pre-allocating up to position 0x%x in blk%05u.dat\n", nNewChunks * BLOCKFILE_CHUNK_SIZE, pos.nFile); AllocateFileRange(file, pos.nPos, nNewChunks * BLOCKFILE_CHUNK_SIZE - pos.nPos); fclose(file); } } else return state.Error("out of disk space"); } } setDirtyFileInfo.insert(nFile); return true; } bool FindUndoPos(CValidationState &state, int nFile, CDiskBlockPos &pos, unsigned int nAddSize) { pos.nFile = nFile; LOCK(cs_LastBlockFile); unsigned int nNewSize; pos.nPos = vinfoBlockFile[nFile].nUndoSize; nNewSize = vinfoBlockFile[nFile].nUndoSize += nAddSize; setDirtyFileInfo.insert(nFile); unsigned int nOldChunks = (pos.nPos + UNDOFILE_CHUNK_SIZE - 1) / UNDOFILE_CHUNK_SIZE; unsigned int nNewChunks = (nNewSize + UNDOFILE_CHUNK_SIZE - 1) / UNDOFILE_CHUNK_SIZE; if (nNewChunks > nOldChunks) { if (fPruneMode) fCheckForPruning = true; if (CheckDiskSpace(nNewChunks * UNDOFILE_CHUNK_SIZE - pos.nPos)) { FILE *file = OpenUndoFile(pos); if (file) { LogPrintf("Pre-allocating up to position 0x%x in rev%05u.dat\n", nNewChunks * UNDOFILE_CHUNK_SIZE, pos.nFile); AllocateFileRange(file, pos.nPos, nNewChunks * UNDOFILE_CHUNK_SIZE - pos.nPos); fclose(file); } } else return state.Error("out of disk space"); } return true; } bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, bool fCheckPOW) { // Check proof of work matches claimed amount if (fCheckPOW && !CheckProofOfWork(block.GetHash(), block.nBits, Params().GetConsensus())) return state.DoS(50, error("CheckBlockHeader(): proof of work failed"), REJECT_INVALID, "high-hash"); // Check timestamp if (block.GetBlockTime() > GetAdjustedTime() + 2 * 60 * 60) return state.Invalid(error("CheckBlockHeader(): block timestamp too far in the future"), REJECT_INVALID, "time-too-new"); return true; } bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bool fCheckMerkleRoot) { // These are checks that are independent of context. if (block.fChecked) return true; // Check that the header is valid (particularly PoW). This is mostly // redundant with the call in AcceptBlockHeader. if (!CheckBlockHeader(block, state, fCheckPOW)) return false; // Check the merkle root. if (fCheckMerkleRoot) { bool mutated; uint256 hashMerkleRoot2 = BlockMerkleRoot(block, &mutated); if (block.hashMerkleRoot != hashMerkleRoot2) return state.DoS(100, error("CheckBlock(): hashMerkleRoot mismatch"), REJECT_INVALID, "bad-txnmrklroot", true); // Check for merkle tree malleability (CVE-2012-2459): repeating sequences // of transactions in a block without affecting the merkle root of a block, // while still invalidating it. if (mutated) return state.DoS(100, error("CheckBlock(): duplicate transaction"), REJECT_INVALID, "bad-txns-duplicate", true); } // All potential-corruption validation must be done before we do any // transaction validation, as otherwise we may mark the header as invalid // because we receive the wrong transactions for it. // Size limits if (block.vtx.empty() || block.vtx.size() > MAX_BLOCK_SIZE || ::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION) > MAX_BLOCK_SIZE) return state.DoS(100, error("CheckBlock(): size limits failed"), REJECT_INVALID, "bad-blk-length"); // First transaction must be coinbase, the rest must not be if (block.vtx.empty() || !block.vtx[0].IsCoinBase()) return state.DoS(100, error("CheckBlock(): first tx is not coinbase"), REJECT_INVALID, "bad-cb-missing"); for (unsigned int i = 1; i < block.vtx.size(); i++) if (block.vtx[i].IsCoinBase()) return state.DoS(100, error("CheckBlock(): more than one coinbase"), REJECT_INVALID, "bad-cb-multiple"); // LUMO : CHECK TRANSACTIONS FOR INSTANTSEND if(sporkManager.IsSporkActive(SPORK_3_INSTANTSEND_BLOCK_FILTERING)) { // We should never accept block which conflicts with completed transaction lock, // that's why this is in CheckBlock unlike coinbase payee/amount. // Require other nodes to comply, send them some data in case they are missing it. BOOST_FOREACH(const CTransaction& tx, block.vtx) { // skip coinbase, it has no inputs if (tx.IsCoinBase()) continue; // LOOK FOR TRANSACTION LOCK IN OUR MAP OF OUTPOINTS BOOST_FOREACH(const CTxIn& txin, tx.vin) { uint256 hashLocked; if(instantsend.GetLockedOutPointTxHash(txin.prevout, hashLocked) && hashLocked != tx.GetHash()) { // Every node which relayed this block to us must invalidate it // but they probably need more data. // Relay corresponding transaction lock request and all its votes // to let other nodes complete the lock. instantsend.Relay(hashLocked); LOCK(cs_main); mapRejectedBlocks.insert(make_pair(block.GetHash(), GetTime())); return state.DoS(0, error("CheckBlock(LUMO): transaction %s conflicts with transaction lock %s", tx.GetHash().ToString(), hashLocked.ToString()), REJECT_INVALID, "conflict-tx-lock"); } } } } else { LogPrintf("CheckBlock(LUMO): spork is off, skipping transaction locking checks\n"); } // END LUMO // Check transactions BOOST_FOREACH(const CTransaction& tx, block.vtx) if (!CheckTransaction(tx, state)) return error("CheckBlock(): CheckTransaction of %s failed with %s", tx.GetHash().ToString(), FormatStateMessage(state)); unsigned int nSigOps = 0; BOOST_FOREACH(const CTransaction& tx, block.vtx) { nSigOps += GetLegacySigOpCount(tx); } if (nSigOps > MAX_BLOCK_SIGOPS) return state.DoS(100, error("CheckBlock(): out-of-bounds SigOpCount"), REJECT_INVALID, "bad-blk-sigops"); if (fCheckPOW && fCheckMerkleRoot) block.fChecked = true; return true; } static bool CheckIndexAgainstCheckpoint(const CBlockIndex* pindexPrev, CValidationState& state, const CChainParams& chainparams, const uint256& hash) { if (*pindexPrev->phashBlock == chainparams.GetConsensus().hashGenesisBlock) return true; int nHeight = pindexPrev->nHeight+1; // Don't accept any forks from the main chain prior to last checkpoint CBlockIndex* pcheckpoint = Checkpoints::GetLastCheckpoint(chainparams.Checkpoints()); if (pcheckpoint && nHeight < pcheckpoint->nHeight) return state.DoS(100, error("%s: forked chain older than last checkpoint (height %d)", __func__, nHeight)); return true; } bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& state, CBlockIndex * const pindexPrev) { const Consensus::Params& consensusParams = Params().GetConsensus(); int nHeight = pindexPrev->nHeight + 1; hashAssumeValid = uint256S(consensusParams.defaultAssumeValid.GetHex()); // Check proof of work if(Params().NetworkIDString() == CBaseChainParams::MAIN && nHeight <= 1938){ //changed consensus at block 1938 bool fScriptChecks = true; // We've been configured with the hash of a block which has been externally verified to have a valid history. // A suitable default value is included with the software and updated from time to time. Because validity // relative to a piece of software is an objective fact these defaults can be easily reviewed. // This setting doesn't force the selection of any particular chain but makes validating some faster by // effectively caching the result of part of the verification. BlockMap::const_iterator it = mapBlockIndex.find(hashAssumeValid); if (it != mapBlockIndex.end()) { if (it->second->GetAncestor(pindexPrev->nHeight) == pindexPrev && pindexBestHeader->GetAncestor(pindexPrev->nHeight) == pindexPrev && pindexBestHeader->nChainWork >= UintToArith256(consensusParams.nMinimumChainWork)) { // This block is a member of the assumed verified chain and an ancestor of the best header. // The equivalent time check discourages hashpower from extorting the network via DOS attack // into accepting an invalid block through telling users they must manually set assumevalid. // Requiring a software change or burying the invalid block, regardless of the setting, makes // it hard to hide the implication of the demand. This also avoids having release candidates // that are hardly doing any signature verification at all in testing without having to // artificially set the default assumed verified block further back. // The test against nMinimumChainWork prevents the skipping when denied access to any chain at // least as good as the expected chain. fScriptChecks = (GetBlockProofEquivalentTime(*pindexBestHeader, *pindexPrev, *pindexBestHeader, consensusParams) <= 60 * 60 * 24 * 7 * 2); } } if(!fScriptChecks) return state.DoS(100, error("%s : incorrect proof of work at %d", __func__, nHeight), REJECT_INVALID, "bad-diffbits"); } else { if(Params().NetworkIDString() == CBaseChainParams::MAIN && nHeight > 1938){ // architecture issues with DGW v1 and v2) unsigned int nBitsNext = GetNextWorkRequired(pindexPrev, &block, consensusParams); double n1 = ConvertBitsToDouble(block.nBits); double n2 = ConvertBitsToDouble(nBitsNext); if (abs(n1-n2) > n1*0.5) return state.DoS(100, error("%s : incorrect proof of work (DGW pre-fork) - %f %f %f at %d", __func__, abs(n1-n2), n1, n2, nHeight), REJECT_INVALID, "bad-diffbits"); } else { if (block.nBits != GetNextWorkRequired(pindexPrev, &block, consensusParams)) return state.DoS(100, error("%s : incorrect proof of work at %d", __func__, nHeight), REJECT_INVALID, "bad-diffbits"); } } // Check timestamp against prev if (block.GetBlockTime() <= pindexPrev->GetMedianTimePast()) return state.Invalid(error("%s: block's timestamp is too early", __func__), REJECT_INVALID, "time-too-old"); // Reject block.nVersion=1 blocks when 95% (75% on testnet) of the network has upgraded: if (block.nVersion < 2 && IsSuperMajority(2, pindexPrev, consensusParams.nMajorityRejectBlockOutdated, consensusParams)) return state.Invalid(error("%s: rejected nVersion=1 block", __func__), REJECT_OBSOLETE, "bad-version"); // Reject block.nVersion=2 blocks when 95% (75% on testnet) of the network has upgraded: if (block.nVersion < 3 && IsSuperMajority(3, pindexPrev, consensusParams.nMajorityRejectBlockOutdated, consensusParams)) return state.Invalid(error("%s: rejected nVersion=2 block", __func__), REJECT_OBSOLETE, "bad-version"); // Reject block.nVersion=3 blocks when 95% (75% on testnet) of the network has upgraded: if (block.nVersion < 4 && IsSuperMajority(4, pindexPrev, consensusParams.nMajorityRejectBlockOutdated, consensusParams)) return state.Invalid(error("%s : rejected nVersion=3 block", __func__), REJECT_OBSOLETE, "bad-version"); return true; } bool ContextualCheckBlock(const CBlock& block, CValidationState& state, CBlockIndex * const pindexPrev) { const int nHeight = pindexPrev == NULL ? 0 : pindexPrev->nHeight + 1; const Consensus::Params& consensusParams = Params().GetConsensus(); // Start enforcing BIP113 (Median Time Past) using versionbits logic. int nLockTimeFlags = 0; if (VersionBitsState(pindexPrev, consensusParams, Consensus::DEPLOYMENT_CSV, versionbitscache) == THRESHOLD_ACTIVE) { nLockTimeFlags |= LOCKTIME_MEDIAN_TIME_PAST; } int64_t nLockTimeCutoff = (nLockTimeFlags & LOCKTIME_MEDIAN_TIME_PAST) ? pindexPrev->GetMedianTimePast() : block.GetBlockTime(); // Check that all transactions are finalized BOOST_FOREACH(const CTransaction& tx, block.vtx) { if (!IsFinalTx(tx, nHeight, nLockTimeCutoff)) { return state.DoS(10, error("%s: contains a non-final transaction", __func__), REJECT_INVALID, "bad-txns-nonfinal"); } } // Enforce block.nVersion=2 rule that the coinbase starts with serialized block height // if 750 of the last 1,000 blocks are version 2 or greater (51/100 if testnet): if (block.nVersion >= 2 && IsSuperMajority(2, pindexPrev, consensusParams.nMajorityEnforceBlockUpgrade, consensusParams)) { CScript expect = CScript() << nHeight; if (block.vtx[0].vin[0].scriptSig.size() < expect.size() || !std::equal(expect.begin(), expect.end(), block.vtx[0].vin[0].scriptSig.begin())) { return state.DoS(100, error("%s: block height mismatch in coinbase", __func__), REJECT_INVALID, "bad-cb-height"); } } return true; } static bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, const CChainParams& chainparams, CBlockIndex** ppindex=NULL) { AssertLockHeld(cs_main); // Check for duplicate uint256 hash = block.GetHash(); BlockMap::iterator miSelf = mapBlockIndex.find(hash); CBlockIndex *pindex = NULL; // TODO : ENABLE BLOCK CACHE IN SPECIFIC CASES if (hash != chainparams.GetConsensus().hashGenesisBlock) { if (miSelf != mapBlockIndex.end()) { // Block header is already known. pindex = miSelf->second; if (ppindex) *ppindex = pindex; if (pindex->nStatus & BLOCK_FAILED_MASK) return state.Invalid(error("%s: block is marked invalid", __func__), 0, "duplicate"); return true; } if (!CheckBlockHeader(block, state)) return false; // Get prev block index CBlockIndex* pindexPrev = NULL; BlockMap::iterator mi = mapBlockIndex.find(block.hashPrevBlock); if (mi == mapBlockIndex.end()) return state.DoS(10, error("%s: prev block not found", __func__), 0, "bad-prevblk"); pindexPrev = (*mi).second; if (pindexPrev->nStatus & BLOCK_FAILED_MASK) return state.DoS(100, error("%s: prev block invalid", __func__), REJECT_INVALID, "bad-prevblk"); assert(pindexPrev); if (fCheckpointsEnabled && !CheckIndexAgainstCheckpoint(pindexPrev, state, chainparams, hash)) return error("%s: CheckIndexAgainstCheckpoint(): %s", __func__, state.GetRejectReason().c_str()); if (!ContextualCheckBlockHeader(block, state, pindexPrev)) return false; } if (pindex == NULL) pindex = AddToBlockIndex(block); if (ppindex) *ppindex = pindex; return true; } /** Store block on disk. If dbp is non-NULL, the file is known to already reside on disk */ static bool AcceptBlock(const CBlock& block, CValidationState& state, const CChainParams& chainparams, CBlockIndex** ppindex, bool fRequested, CDiskBlockPos* dbp) { AssertLockHeld(cs_main); CBlockIndex *&pindex = *ppindex; if (!AcceptBlockHeader(block, state, chainparams, &pindex)) return false; // Try to process all requested blocks that we don't have, but only // process an unrequested block if it's new and has enough work to // advance our tip, and isn't too many blocks ahead. bool fAlreadyHave = pindex->nStatus & BLOCK_HAVE_DATA; bool fHasMoreWork = (chainActive.Tip() ? pindex->nChainWork > chainActive.Tip()->nChainWork : true); // Blocks that are too out-of-order needlessly limit the effectiveness of // pruning, because pruning will not delete block files that contain any // blocks which are too close in height to the tip. Apply this test // regardless of whether pruning is enabled; it should generally be safe to // not process unrequested blocks. bool fTooFarAhead = (pindex->nHeight > int(chainActive.Height() + MIN_BLOCKS_TO_KEEP)); // TODO: deal better with return value and error conditions for duplicate // and unrequested blocks. if (fAlreadyHave) return true; if (!fRequested) { // If we didn't ask for it: if (pindex->nTx != 0) return true; // This is a previously-processed block that was pruned if (!fHasMoreWork) return true; // Don't process less-work chains if (fTooFarAhead) return true; // Block height is too high } if ((!CheckBlock(block, state)) || !ContextualCheckBlock(block, state, pindex->pprev)) { if (state.IsInvalid() && !state.CorruptionPossible()) { pindex->nStatus |= BLOCK_FAILED_VALID; setDirtyBlockIndex.insert(pindex); } return false; } int nHeight = pindex->nHeight; // Write block to history file try { unsigned int nBlockSize = ::GetSerializeSize(block, SER_DISK, CLIENT_VERSION); CDiskBlockPos blockPos; if (dbp != NULL) blockPos = *dbp; if (!FindBlockPos(state, blockPos, nBlockSize+8, nHeight, block.GetBlockTime(), dbp != NULL)) return error("AcceptBlock(): FindBlockPos failed"); if (dbp == NULL) if (!WriteBlockToDisk(block, blockPos, chainparams.MessageStart())) AbortNode(state, "Failed to write block"); if (!ReceivedBlockTransactions(block, state, pindex, blockPos)) return error("AcceptBlock(): ReceivedBlockTransactions failed"); } catch (const std::runtime_error& e) { return AbortNode(state, std::string("System error: ") + e.what()); } if (fCheckForPruning) FlushStateToDisk(state, FLUSH_STATE_NONE); // we just allocated more disk space for block files return true; } static bool IsSuperMajority(int minVersion, const CBlockIndex* pstart, unsigned nRequired, const Consensus::Params& consensusParams) { unsigned int nFound = 0; for (int i = 0; i < consensusParams.nMajorityWindow && nFound < nRequired && pstart != NULL; i++) { if (pstart->nVersion >= minVersion) ++nFound; pstart = pstart->pprev; } return (nFound >= nRequired); } bool ProcessNewBlock(CValidationState& state, const CChainParams& chainparams, const CNode* pfrom, const CBlock* pblock, bool fForceProcessing, CDiskBlockPos* dbp) { // Preliminary checks bool checked = CheckBlock(*pblock, state); { LOCK(cs_main); bool fRequested = MarkBlockAsReceived(pblock->GetHash()); fRequested |= fForceProcessing; if (!checked) { return error("%s: CheckBlock FAILED", __func__); } // Store to disk CBlockIndex *pindex = NULL; bool ret = AcceptBlock(*pblock, state, chainparams, &pindex, fRequested, dbp); if (pindex && pfrom) { mapBlockSource[pindex->GetBlockHash()] = pfrom->GetId(); } CheckBlockIndex(chainparams.GetConsensus()); if (!ret) return error("%s: AcceptBlock FAILED", __func__); } if (!ActivateBestChain(state, chainparams, pblock)) return error("%s: ActivateBestChain failed", __func__); masternodeSync.IsBlockchainSynced(true); LogPrintf("%s : ACCEPTED\n", __func__); return true; } bool TestBlockValidity(CValidationState& state, const CChainParams& chainparams, const CBlock& block, CBlockIndex* pindexPrev, bool fCheckPOW, bool fCheckMerkleRoot) { AssertLockHeld(cs_main); assert(pindexPrev && pindexPrev == chainActive.Tip()); if (fCheckpointsEnabled && !CheckIndexAgainstCheckpoint(pindexPrev, state, chainparams, block.GetHash())) return error("%s: CheckIndexAgainstCheckpoint(): %s", __func__, state.GetRejectReason().c_str()); CCoinsViewCache viewNew(pcoinsTip); CBlockIndex indexDummy(block); indexDummy.pprev = pindexPrev; indexDummy.nHeight = pindexPrev->nHeight + 1; // NOTE: CheckBlockHeader is called by CheckBlock if (!ContextualCheckBlockHeader(block, state, pindexPrev)) return false; if (!CheckBlock(block, state, fCheckPOW, fCheckMerkleRoot)) return false; if (!ContextualCheckBlock(block, state, pindexPrev)) return false; if (!ConnectBlock(block, state, &indexDummy, viewNew, true)) return false; assert(state.IsValid()); return true; } /** * BLOCK PRUNING CODE */ /* Calculate the amount of disk space the block & undo files currently use */ uint64_t CalculateCurrentUsage() { uint64_t retval = 0; BOOST_FOREACH(const CBlockFileInfo &file, vinfoBlockFile) { retval += file.nSize + file.nUndoSize; } return retval; } /* Prune a block file (modify associated database entries)*/ void PruneOneBlockFile(const int fileNumber) { for (BlockMap::iterator it = mapBlockIndex.begin(); it != mapBlockIndex.end(); ++it) { CBlockIndex* pindex = it->second; if (pindex->nFile == fileNumber) { pindex->nStatus &= ~BLOCK_HAVE_DATA; pindex->nStatus &= ~BLOCK_HAVE_UNDO; pindex->nFile = 0; pindex->nDataPos = 0; pindex->nUndoPos = 0; setDirtyBlockIndex.insert(pindex); // Prune from mapBlocksUnlinked -- any block we prune would have // to be downloaded again in order to consider its chain, at which // point it would be considered as a candidate for // mapBlocksUnlinked or setBlockIndexCandidates. std::pair<std::multimap<CBlockIndex*, CBlockIndex*>::iterator, std::multimap<CBlockIndex*, CBlockIndex*>::iterator> range = mapBlocksUnlinked.equal_range(pindex->pprev); while (range.first != range.second) { std::multimap<CBlockIndex *, CBlockIndex *>::iterator it = range.first; range.first++; if (it->second == pindex) { mapBlocksUnlinked.erase(it); } } } } vinfoBlockFile[fileNumber].SetNull(); setDirtyFileInfo.insert(fileNumber); } void UnlinkPrunedFiles(std::set<int>& setFilesToPrune) { for (set<int>::iterator it = setFilesToPrune.begin(); it != setFilesToPrune.end(); ++it) { CDiskBlockPos pos(*it, 0); boost::filesystem::remove(GetBlockPosFilename(pos, "blk")); boost::filesystem::remove(GetBlockPosFilename(pos, "rev")); LogPrintf("Prune: %s deleted blk/rev (%05u)\n", __func__, *it); } } /* Calculate the block/rev files that should be deleted to remain under target*/ void FindFilesToPrune(std::set<int>& setFilesToPrune, uint64_t nPruneAfterHeight) { LOCK2(cs_main, cs_LastBlockFile); if (chainActive.Tip() == NULL || nPruneTarget == 0) { return; } if ((uint64_t)chainActive.Tip()->nHeight <= nPruneAfterHeight) { return; } unsigned int nLastBlockWeCanPrune = chainActive.Tip()->nHeight - MIN_BLOCKS_TO_KEEP; uint64_t nCurrentUsage = CalculateCurrentUsage(); // We don't check to prune until after we've allocated new space for files // So we should leave a buffer under our target to account for another allocation // before the next pruning. uint64_t nBuffer = BLOCKFILE_CHUNK_SIZE + UNDOFILE_CHUNK_SIZE; uint64_t nBytesToPrune; int count=0; if (nCurrentUsage + nBuffer >= nPruneTarget) { for (int fileNumber = 0; fileNumber < nLastBlockFile; fileNumber++) { nBytesToPrune = vinfoBlockFile[fileNumber].nSize + vinfoBlockFile[fileNumber].nUndoSize; if (vinfoBlockFile[fileNumber].nSize == 0) continue; if (nCurrentUsage + nBuffer < nPruneTarget) // are we below our target? break; // don't prune files that could have a block within MIN_BLOCKS_TO_KEEP of the main chain's tip but keep scanning if (vinfoBlockFile[fileNumber].nHeightLast > nLastBlockWeCanPrune) continue; PruneOneBlockFile(fileNumber); // Queue up the files for removal setFilesToPrune.insert(fileNumber); nCurrentUsage -= nBytesToPrune; count++; } } LogPrint("prune", "Prune: target=%dMiB actual=%dMiB diff=%dMiB max_prune_height=%d removed %d blk/rev pairs\n", nPruneTarget/1024/1024, nCurrentUsage/1024/1024, ((int64_t)nPruneTarget - (int64_t)nCurrentUsage)/1024/1024, nLastBlockWeCanPrune, count); } bool CheckDiskSpace(uint64_t nAdditionalBytes) { uint64_t nFreeBytesAvailable = boost::filesystem::space(GetDataDir()).available; // Check for nMinDiskSpace bytes (currently 50MB) if (nFreeBytesAvailable < nMinDiskSpace + nAdditionalBytes) return AbortNode("Disk space is low!", _("Error: Disk space is low!")); return true; } FILE* OpenDiskFile(const CDiskBlockPos &pos, const char *prefix, bool fReadOnly) { if (pos.IsNull()) return NULL; boost::filesystem::path path = GetBlockPosFilename(pos, prefix); boost::filesystem::create_directories(path.parent_path()); FILE* file = fopen(path.string().c_str(), "rb+"); if (!file && !fReadOnly) file = fopen(path.string().c_str(), "wb+"); if (!file) { LogPrintf("Unable to open file %s\n", path.string()); return NULL; } if (pos.nPos) { if (fseek(file, pos.nPos, SEEK_SET)) { LogPrintf("Unable to seek to position %u of %s\n", pos.nPos, path.string()); fclose(file); return NULL; } } return file; } FILE* OpenBlockFile(const CDiskBlockPos &pos, bool fReadOnly) { return OpenDiskFile(pos, "blk", fReadOnly); } FILE* OpenUndoFile(const CDiskBlockPos &pos, bool fReadOnly) { return OpenDiskFile(pos, "rev", fReadOnly); } boost::filesystem::path GetBlockPosFilename(const CDiskBlockPos &pos, const char *prefix) { return GetDataDir() / "blocks" / strprintf("%s%05u.dat", prefix, pos.nFile); } CBlockIndex * InsertBlockIndex(uint256 hash) { if (hash.IsNull()) return NULL; // Return existing BlockMap::iterator mi = mapBlockIndex.find(hash); if (mi != mapBlockIndex.end()) return (*mi).second; // Create new CBlockIndex* pindexNew = new CBlockIndex(); if (!pindexNew) throw runtime_error("LoadBlockIndex(): new CBlockIndex failed"); mi = mapBlockIndex.insert(make_pair(hash, pindexNew)).first; pindexNew->phashBlock = &((*mi).first); return pindexNew; } bool static LoadBlockIndexDB() { const CChainParams& chainparams = Params(); if (!pblocktree->LoadBlockIndexGuts()) return false; boost::this_thread::interruption_point(); // Calculate nChainWork vector<pair<int, CBlockIndex*> > vSortedByHeight; vSortedByHeight.reserve(mapBlockIndex.size()); BOOST_FOREACH(const PAIRTYPE(uint256, CBlockIndex*)& item, mapBlockIndex) { CBlockIndex* pindex = item.second; vSortedByHeight.push_back(make_pair(pindex->nHeight, pindex)); } sort(vSortedByHeight.begin(), vSortedByHeight.end()); BOOST_FOREACH(const PAIRTYPE(int, CBlockIndex*)& item, vSortedByHeight) { CBlockIndex* pindex = item.second; pindex->nChainWork = (pindex->pprev ? pindex->pprev->nChainWork : 0) + GetBlockProof(*pindex); // We can link the chain of blocks for which we've received transactions at some point. // Pruned nodes may have deleted the block. if (pindex->nTx > 0) { if (pindex->pprev) { if (pindex->pprev->nChainTx) { pindex->nChainTx = pindex->pprev->nChainTx + pindex->nTx; } else { pindex->nChainTx = 0; mapBlocksUnlinked.insert(std::make_pair(pindex->pprev, pindex)); } } else { pindex->nChainTx = pindex->nTx; } } if (pindex->IsValid(BLOCK_VALID_TRANSACTIONS) && (pindex->nChainTx || pindex->pprev == NULL)) setBlockIndexCandidates.insert(pindex); if (pindex->nStatus & BLOCK_FAILED_MASK && (!pindexBestInvalid || pindex->nChainWork > pindexBestInvalid->nChainWork)) pindexBestInvalid = pindex; if (pindex->pprev) pindex->BuildSkip(); if (pindex->IsValid(BLOCK_VALID_TREE) && (pindexBestHeader == NULL || CBlockIndexWorkComparator()(pindexBestHeader, pindex))) pindexBestHeader = pindex; } // Load block file info pblocktree->ReadLastBlockFile(nLastBlockFile); vinfoBlockFile.resize(nLastBlockFile + 1); LogPrintf("%s: last block file = %i\n", __func__, nLastBlockFile); for (int nFile = 0; nFile <= nLastBlockFile; nFile++) { pblocktree->ReadBlockFileInfo(nFile, vinfoBlockFile[nFile]); } LogPrintf("%s: last block file info: %s\n", __func__, vinfoBlockFile[nLastBlockFile].ToString()); for (int nFile = nLastBlockFile + 1; true; nFile++) { CBlockFileInfo info; if (pblocktree->ReadBlockFileInfo(nFile, info)) { vinfoBlockFile.push_back(info); } else { break; } } // Check presence of blk files LogPrintf("Checking all blk files are present...\n"); set<int> setBlkDataFiles; BOOST_FOREACH(const PAIRTYPE(uint256, CBlockIndex*)& item, mapBlockIndex) { CBlockIndex* pindex = item.second; if (pindex->nStatus & BLOCK_HAVE_DATA) { setBlkDataFiles.insert(pindex->nFile); } } for (std::set<int>::iterator it = setBlkDataFiles.begin(); it != setBlkDataFiles.end(); it++) { CDiskBlockPos pos(*it, 0); if (CAutoFile(OpenBlockFile(pos, true), SER_DISK, CLIENT_VERSION).IsNull()) { return false; } } // Check whether we have ever pruned block & undo files pblocktree->ReadFlag("prunedblockfiles", fHavePruned); if (fHavePruned) LogPrintf("LoadBlockIndexDB(): Block files have previously been pruned\n"); // Check whether we need to continue reindexing bool fReindexing = false; pblocktree->ReadReindexing(fReindexing); fReindex |= fReindexing; // Check whether we have a transaction index pblocktree->ReadFlag("txindex", fTxIndex); LogPrintf("%s: transaction index %s\n", __func__, fTxIndex ? "enabled" : "disabled"); // Check whether we have an address index pblocktree->ReadFlag("addressindex", fAddressIndex); LogPrintf("%s: address index %s\n", __func__, fAddressIndex ? "enabled" : "disabled"); // Check whether we have a timestamp index pblocktree->ReadFlag("timestampindex", fTimestampIndex); LogPrintf("%s: timestamp index %s\n", __func__, fTimestampIndex ? "enabled" : "disabled"); // Check whether we have a spent index pblocktree->ReadFlag("spentindex", fSpentIndex); LogPrintf("%s: spent index %s\n", __func__, fSpentIndex ? "enabled" : "disabled"); // Load pointer to end of best chain BlockMap::iterator it = mapBlockIndex.find(pcoinsTip->GetBestBlock()); if (it == mapBlockIndex.end()) return true; chainActive.SetTip(it->second); PruneBlockIndexCandidates(); LogPrintf("%s: hashBestChain=%s height=%d date=%s progress=%f\n", __func__, chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(), DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime()), Checkpoints::GuessVerificationProgress(chainparams.Checkpoints(), chainActive.Tip())); return true; } CVerifyDB::CVerifyDB() { uiInterface.ShowProgress(_("Verifying blocks..."), 0); } CVerifyDB::~CVerifyDB() { uiInterface.ShowProgress("", 100); } bool CVerifyDB::VerifyDB(const CChainParams& chainparams, CCoinsView *coinsview, int nCheckLevel, int nCheckDepth) { LOCK(cs_main); if (chainActive.Tip() == NULL || chainActive.Tip()->pprev == NULL) return true; // Verify blocks in the best chain if (nCheckDepth <= 0) nCheckDepth = 1000000000; // suffices until the year 19000 if (nCheckDepth > chainActive.Height()) nCheckDepth = chainActive.Height(); nCheckLevel = std::max(0, std::min(4, nCheckLevel)); LogPrintf("Verifying last %i blocks at level %i\n", nCheckDepth, nCheckLevel); CCoinsViewCache coins(coinsview); CBlockIndex* pindexState = chainActive.Tip(); CBlockIndex* pindexFailure = NULL; int nGoodTransactions = 0; CValidationState state; for (CBlockIndex* pindex = chainActive.Tip(); pindex && pindex->pprev; pindex = pindex->pprev) { boost::this_thread::interruption_point(); uiInterface.ShowProgress(_("Verifying blocks..."), std::max(1, std::min(99, (int)(((double)(chainActive.Height() - pindex->nHeight)) / (double)nCheckDepth * (nCheckLevel >= 4 ? 50 : 100))))); if (pindex->nHeight < chainActive.Height()-nCheckDepth) break; CBlock block; // check level 0: read from disk if (!ReadBlockFromDisk(block, pindex, chainparams.GetConsensus())) return error("VerifyDB(): *** ReadBlockFromDisk failed at %d, hash=%s", pindex->nHeight, pindex->GetBlockHash().ToString()); // check level 1: verify block validity if (nCheckLevel >= 1 && !CheckBlock(block, state)) return error("VerifyDB(): *** found bad block at %d, hash=%s\n", pindex->nHeight, pindex->GetBlockHash().ToString()); // check level 2: verify undo validity if (nCheckLevel >= 2 && pindex) { CBlockUndo undo; CDiskBlockPos pos = pindex->GetUndoPos(); if (!pos.IsNull()) { if (!UndoReadFromDisk(undo, pos, pindex->pprev->GetBlockHash())) return error("VerifyDB(): *** found bad undo data at %d, hash=%s\n", pindex->nHeight, pindex->GetBlockHash().ToString()); } } // check level 3: check for inconsistencies during memory-only disconnect of tip blocks if (nCheckLevel >= 3 && pindex == pindexState && (coins.DynamicMemoryUsage() + pcoinsTip->DynamicMemoryUsage()) <= nCoinCacheUsage) { bool fClean = true; if (!DisconnectBlock(block, state, pindex, coins, &fClean)) return error("VerifyDB(): *** irrecoverable inconsistency in block data at %d, hash=%s", pindex->nHeight, pindex->GetBlockHash().ToString()); pindexState = pindex->pprev; if (!fClean) { nGoodTransactions = 0; pindexFailure = pindex; } else nGoodTransactions += block.vtx.size(); } if (ShutdownRequested()) return true; } if (pindexFailure) return error("VerifyDB(): *** coin database inconsistencies found (last %i blocks, %i good transactions before that)\n", chainActive.Height() - pindexFailure->nHeight + 1, nGoodTransactions); // check level 4: try reconnecting blocks if (nCheckLevel >= 4) { CBlockIndex *pindex = pindexState; while (pindex != chainActive.Tip()) { boost::this_thread::interruption_point(); uiInterface.ShowProgress(_("Verifying blocks..."), std::max(1, std::min(99, 100 - (int)(((double)(chainActive.Height() - pindex->nHeight)) / (double)nCheckDepth * 50)))); pindex = chainActive.Next(pindex); CBlock block; if (!ReadBlockFromDisk(block, pindex, chainparams.GetConsensus())) return error("VerifyDB(): *** ReadBlockFromDisk failed at %d, hash=%s", pindex->nHeight, pindex->GetBlockHash().ToString()); if (!ConnectBlock(block, state, pindex, coins)) return error("VerifyDB(): *** found unconnectable block at %d, hash=%s", pindex->nHeight, pindex->GetBlockHash().ToString()); } } LogPrintf("No coin database inconsistencies in last %i blocks (%i transactions)\n", chainActive.Height() - pindexState->nHeight, nGoodTransactions); return true; } void UnloadBlockIndex() { LOCK(cs_main); setBlockIndexCandidates.clear(); chainActive.SetTip(NULL); pindexBestInvalid = NULL; pindexBestHeader = NULL; mempool.clear(); mapOrphanTransactions.clear(); mapOrphanTransactionsByPrev.clear(); nSyncStarted = 0; mapBlocksUnlinked.clear(); vinfoBlockFile.clear(); nLastBlockFile = 0; nBlockSequenceId = 1; mapBlockSource.clear(); mapBlocksInFlight.clear(); nPreferredDownload = 0; setDirtyBlockIndex.clear(); setDirtyFileInfo.clear(); mapNodeState.clear(); recentRejects.reset(NULL); versionbitscache.Clear(); for (int b = 0; b < VERSIONBITS_NUM_BITS; b++) { warningcache[b].clear(); } BOOST_FOREACH(BlockMap::value_type& entry, mapBlockIndex) { delete entry.second; } mapBlockIndex.clear(); fHavePruned = false; } bool LoadBlockIndex() { // Load block index from databases if (!fReindex && !LoadBlockIndexDB()) return false; return true; } bool InitBlockIndex(const CChainParams& chainparams) { LOCK(cs_main); // Initialize global variables that cannot be constructed at startup. recentRejects.reset(new CRollingBloomFilter(120000, 0.000001)); // Check whether we're already initialized if (chainActive.Genesis() != NULL) return true; // Use the provided setting for -txindex in the new database fTxIndex = GetBoolArg("-txindex", DEFAULT_TXINDEX); pblocktree->WriteFlag("txindex", fTxIndex); // Use the provided setting for -addressindex in the new database fAddressIndex = GetBoolArg("-addressindex", DEFAULT_ADDRESSINDEX); pblocktree->WriteFlag("addressindex", fAddressIndex); // Use the provided setting for -timestampindex in the new database fTimestampIndex = GetBoolArg("-timestampindex", DEFAULT_TIMESTAMPINDEX); pblocktree->WriteFlag("timestampindex", fTimestampIndex); fSpentIndex = GetBoolArg("-spentindex", DEFAULT_SPENTINDEX); pblocktree->WriteFlag("spentindex", fSpentIndex); LogPrintf("Initializing databases...\n"); // Only add the genesis block if not reindexing (in which case we reuse the one already on disk) if (!fReindex) { try { CBlock &block = const_cast<CBlock&>(chainparams.GenesisBlock()); // Start new block file unsigned int nBlockSize = ::GetSerializeSize(block, SER_DISK, CLIENT_VERSION); CDiskBlockPos blockPos; CValidationState state; if (!FindBlockPos(state, blockPos, nBlockSize+8, 0, block.GetBlockTime())) return error("LoadBlockIndex(): FindBlockPos failed"); if (!WriteBlockToDisk(block, blockPos, chainparams.MessageStart())) return error("LoadBlockIndex(): writing genesis block to disk failed"); CBlockIndex *pindex = AddToBlockIndex(block); if (!ReceivedBlockTransactions(block, state, pindex, blockPos)) return error("LoadBlockIndex(): genesis block not accepted"); if (!ActivateBestChain(state, chainparams, &block)) return error("LoadBlockIndex(): genesis block cannot be activated"); // Force a chainstate write so that when we VerifyDB in a moment, it doesn't check stale data return FlushStateToDisk(state, FLUSH_STATE_ALWAYS); } catch (const std::runtime_error& e) { return error("LoadBlockIndex(): failed to initialize block database: %s", e.what()); } } return true; } bool LoadExternalBlockFile(const CChainParams& chainparams, FILE* fileIn, CDiskBlockPos *dbp) { // Map of disk positions for blocks with unknown parent (only used for reindex) static std::multimap<uint256, CDiskBlockPos> mapBlocksUnknownParent; int64_t nStart = GetTimeMillis(); int nLoaded = 0; try { // This takes over fileIn and calls fclose() on it in the CBufferedFile destructor CBufferedFile blkdat(fileIn, 2*MAX_BLOCK_SIZE, MAX_BLOCK_SIZE+8, SER_DISK, CLIENT_VERSION); uint64_t nRewind = blkdat.GetPos(); while (!blkdat.eof()) { boost::this_thread::interruption_point(); blkdat.SetPos(nRewind); nRewind++; // start one byte further next time, in case of failure blkdat.SetLimit(); // remove former limit unsigned int nSize = 0; try { // locate a header unsigned char buf[MESSAGE_START_SIZE]; blkdat.FindByte(chainparams.MessageStart()[0]); nRewind = blkdat.GetPos()+1; blkdat >> FLATDATA(buf); if (memcmp(buf, chainparams.MessageStart(), MESSAGE_START_SIZE)) continue; // read size blkdat >> nSize; if (nSize < 80 || nSize > MAX_BLOCK_SIZE) continue; } catch (const std::exception&) { // no valid block header found; don't complain break; } try { // read block uint64_t nBlockPos = blkdat.GetPos(); if (dbp) dbp->nPos = nBlockPos; blkdat.SetLimit(nBlockPos + nSize); blkdat.SetPos(nBlockPos); CBlock block; blkdat >> block; nRewind = blkdat.GetPos(); // detect out of order blocks, and store them for later uint256 hash = block.GetHash(); if (hash != chainparams.GetConsensus().hashGenesisBlock && mapBlockIndex.find(block.hashPrevBlock) == mapBlockIndex.end()) { LogPrint("reindex", "%s: Out of order block %s, parent %s not known\n", __func__, hash.ToString(), block.hashPrevBlock.ToString()); if (dbp) mapBlocksUnknownParent.insert(std::make_pair(block.hashPrevBlock, *dbp)); continue; } // process in case the block isn't known yet if (mapBlockIndex.count(hash) == 0 || (mapBlockIndex[hash]->nStatus & BLOCK_HAVE_DATA) == 0) { CValidationState state; if (ProcessNewBlock(state, chainparams, NULL, &block, true, dbp)) nLoaded++; if (state.IsError()) break; } else if (hash != chainparams.GetConsensus().hashGenesisBlock && mapBlockIndex[hash]->nHeight % 1000 == 0) { LogPrintf("Block Import: already had block %s at height %d\n", hash.ToString(), mapBlockIndex[hash]->nHeight); } // Recursively process earlier encountered successors of this block deque<uint256> queue; queue.push_back(hash); while (!queue.empty()) { uint256 head = queue.front(); queue.pop_front(); std::pair<std::multimap<uint256, CDiskBlockPos>::iterator, std::multimap<uint256, CDiskBlockPos>::iterator> range = mapBlocksUnknownParent.equal_range(head); while (range.first != range.second) { std::multimap<uint256, CDiskBlockPos>::iterator it = range.first; if (ReadBlockFromDisk(block, it->second, chainparams.GetConsensus())) { LogPrintf("%s: Processing out of order child %s of %s\n", __func__, block.GetHash().ToString(), head.ToString()); CValidationState dummy; if (ProcessNewBlock(dummy, chainparams, NULL, &block, true, &it->second)) { nLoaded++; queue.push_back(block.GetHash()); } } range.first++; mapBlocksUnknownParent.erase(it); } } } catch (const std::exception& e) { LogPrintf("%s: Deserialize or I/O error - %s\n", __func__, e.what()); } } } catch (const std::runtime_error& e) { AbortNode(std::string("System error: ") + e.what()); } if (nLoaded > 0) LogPrintf("Loaded %i blocks from external file in %dms\n", nLoaded, GetTimeMillis() - nStart); return nLoaded > 0; } void static CheckBlockIndex(const Consensus::Params& consensusParams) { if (!fCheckBlockIndex) { return; } LOCK(cs_main); // During a reindex, we read the genesis block and call CheckBlockIndex before ActivateBestChain, // so we have the genesis block in mapBlockIndex but no active chain. (A few of the tests when // iterating the block tree require that chainActive has been initialized.) if (chainActive.Height() < 0) { assert(mapBlockIndex.size() <= 1); return; } // Build forward-pointing map of the entire block tree. std::multimap<CBlockIndex*,CBlockIndex*> forward; for (BlockMap::iterator it = mapBlockIndex.begin(); it != mapBlockIndex.end(); it++) { forward.insert(std::make_pair(it->second->pprev, it->second)); } assert(forward.size() == mapBlockIndex.size()); std::pair<std::multimap<CBlockIndex*,CBlockIndex*>::iterator,std::multimap<CBlockIndex*,CBlockIndex*>::iterator> rangeGenesis = forward.equal_range(NULL); CBlockIndex *pindex = rangeGenesis.first->second; rangeGenesis.first++; assert(rangeGenesis.first == rangeGenesis.second); // There is only one index entry with parent NULL. // Iterate over the entire block tree, using depth-first search. // Along the way, remember whether there are blocks on the path from genesis // block being explored which are the first to have certain properties. size_t nNodes = 0; int nHeight = 0; CBlockIndex* pindexFirstInvalid = NULL; // Oldest ancestor of pindex which is invalid. CBlockIndex* pindexFirstMissing = NULL; // Oldest ancestor of pindex which does not have BLOCK_HAVE_DATA. CBlockIndex* pindexFirstNeverProcessed = NULL; // Oldest ancestor of pindex for which nTx == 0. CBlockIndex* pindexFirstNotTreeValid = NULL; // Oldest ancestor of pindex which does not have BLOCK_VALID_TREE (regardless of being valid or not). CBlockIndex* pindexFirstNotTransactionsValid = NULL; // Oldest ancestor of pindex which does not have BLOCK_VALID_TRANSACTIONS (regardless of being valid or not). CBlockIndex* pindexFirstNotChainValid = NULL; // Oldest ancestor of pindex which does not have BLOCK_VALID_CHAIN (regardless of being valid or not). CBlockIndex* pindexFirstNotScriptsValid = NULL; // Oldest ancestor of pindex which does not have BLOCK_VALID_SCRIPTS (regardless of being valid or not). while (pindex != NULL) { nNodes++; if (pindexFirstInvalid == NULL && pindex->nStatus & BLOCK_FAILED_VALID) pindexFirstInvalid = pindex; if (pindexFirstMissing == NULL && !(pindex->nStatus & BLOCK_HAVE_DATA)) pindexFirstMissing = pindex; if (pindexFirstNeverProcessed == NULL && pindex->nTx == 0) pindexFirstNeverProcessed = pindex; if (pindex->pprev != NULL && pindexFirstNotTreeValid == NULL && (pindex->nStatus & BLOCK_VALID_MASK) < BLOCK_VALID_TREE) pindexFirstNotTreeValid = pindex; if (pindex->pprev != NULL && pindexFirstNotTransactionsValid == NULL && (pindex->nStatus & BLOCK_VALID_MASK) < BLOCK_VALID_TRANSACTIONS) pindexFirstNotTransactionsValid = pindex; if (pindex->pprev != NULL && pindexFirstNotChainValid == NULL && (pindex->nStatus & BLOCK_VALID_MASK) < BLOCK_VALID_CHAIN) pindexFirstNotChainValid = pindex; if (pindex->pprev != NULL && pindexFirstNotScriptsValid == NULL && (pindex->nStatus & BLOCK_VALID_MASK) < BLOCK_VALID_SCRIPTS) pindexFirstNotScriptsValid = pindex; // Begin: actual consistency checks. if (pindex->pprev == NULL) { // Genesis block checks. assert(pindex->GetBlockHash() == consensusParams.hashGenesisBlock); // Genesis block's hash must match. assert(pindex == chainActive.Genesis()); // The current active chain's genesis block must be this block. } if (pindex->nChainTx == 0) assert(pindex->nSequenceId == 0); // nSequenceId can't be set for blocks that aren't linked // VALID_TRANSACTIONS is equivalent to nTx > 0 for all nodes (whether or not pruning has occurred). // HAVE_DATA is only equivalent to nTx > 0 (or VALID_TRANSACTIONS) if no pruning has occurred. if (!fHavePruned) { // If we've never pruned, then HAVE_DATA should be equivalent to nTx > 0 assert(!(pindex->nStatus & BLOCK_HAVE_DATA) == (pindex->nTx == 0)); assert(pindexFirstMissing == pindexFirstNeverProcessed); } else { // If we have pruned, then we can only say that HAVE_DATA implies nTx > 0 if (pindex->nStatus & BLOCK_HAVE_DATA) assert(pindex->nTx > 0); } if (pindex->nStatus & BLOCK_HAVE_UNDO) assert(pindex->nStatus & BLOCK_HAVE_DATA); assert(((pindex->nStatus & BLOCK_VALID_MASK) >= BLOCK_VALID_TRANSACTIONS) == (pindex->nTx > 0)); // This is pruning-independent. // All parents having had data (at some point) is equivalent to all parents being VALID_TRANSACTIONS, which is equivalent to nChainTx being set. assert((pindexFirstNeverProcessed != NULL) == (pindex->nChainTx == 0)); // nChainTx != 0 is used to signal that all parent blocks have been processed (but may have been pruned). assert((pindexFirstNotTransactionsValid != NULL) == (pindex->nChainTx == 0)); assert(pindex->nHeight == nHeight); // nHeight must be consistent. assert(pindex->pprev == NULL || pindex->nChainWork >= pindex->pprev->nChainWork); // For every block except the genesis block, the chainwork must be larger than the parent's. assert(nHeight < 2 || (pindex->pskip && (pindex->pskip->nHeight < nHeight))); // The pskip pointer must point back for all but the first 2 blocks. assert(pindexFirstNotTreeValid == NULL); // All mapBlockIndex entries must at least be TREE valid if ((pindex->nStatus & BLOCK_VALID_MASK) >= BLOCK_VALID_TREE) assert(pindexFirstNotTreeValid == NULL); // TREE valid implies all parents are TREE valid if ((pindex->nStatus & BLOCK_VALID_MASK) >= BLOCK_VALID_CHAIN) assert(pindexFirstNotChainValid == NULL); // CHAIN valid implies all parents are CHAIN valid if ((pindex->nStatus & BLOCK_VALID_MASK) >= BLOCK_VALID_SCRIPTS) assert(pindexFirstNotScriptsValid == NULL); // SCRIPTS valid implies all parents are SCRIPTS valid if (pindexFirstInvalid == NULL) { // Checks for not-invalid blocks. assert((pindex->nStatus & BLOCK_FAILED_MASK) == 0); // The failed mask cannot be set for blocks without invalid parents. } if (!CBlockIndexWorkComparator()(pindex, chainActive.Tip()) && pindexFirstNeverProcessed == NULL) { if (pindexFirstInvalid == NULL) { // If this block sorts at least as good as the current tip and // is valid and we have all data for its parents, it must be in // setBlockIndexCandidates. chainActive.Tip() must also be there // even if some data has been pruned. if (pindexFirstMissing == NULL || pindex == chainActive.Tip()) { assert(setBlockIndexCandidates.count(pindex)); } // If some parent is missing, then it could be that this block was in // setBlockIndexCandidates but had to be removed because of the missing data. // In this case it must be in mapBlocksUnlinked -- see test below. } } else { // If this block sorts worse than the current tip or some ancestor's block has never been seen, it cannot be in setBlockIndexCandidates. assert(setBlockIndexCandidates.count(pindex) == 0); } // Check whether this block is in mapBlocksUnlinked. std::pair<std::multimap<CBlockIndex*,CBlockIndex*>::iterator,std::multimap<CBlockIndex*,CBlockIndex*>::iterator> rangeUnlinked = mapBlocksUnlinked.equal_range(pindex->pprev); bool foundInUnlinked = false; while (rangeUnlinked.first != rangeUnlinked.second) { assert(rangeUnlinked.first->first == pindex->pprev); if (rangeUnlinked.first->second == pindex) { foundInUnlinked = true; break; } rangeUnlinked.first++; } if (pindex->pprev && (pindex->nStatus & BLOCK_HAVE_DATA) && pindexFirstNeverProcessed != NULL && pindexFirstInvalid == NULL) { // If this block has block data available, some parent was never received, and has no invalid parents, it must be in mapBlocksUnlinked. assert(foundInUnlinked); } if (!(pindex->nStatus & BLOCK_HAVE_DATA)) assert(!foundInUnlinked); // Can't be in mapBlocksUnlinked if we don't HAVE_DATA if (pindexFirstMissing == NULL) assert(!foundInUnlinked); // We aren't missing data for any parent -- cannot be in mapBlocksUnlinked. if (pindex->pprev && (pindex->nStatus & BLOCK_HAVE_DATA) && pindexFirstNeverProcessed == NULL && pindexFirstMissing != NULL) { // We HAVE_DATA for this block, have received data for all parents at some point, but we're currently missing data for some parent. assert(fHavePruned); // We must have pruned. // This block may have entered mapBlocksUnlinked if: // - it has a descendant that at some point had more work than the // tip, and // - we tried switching to that descendant but were missing // data for some intermediate block between chainActive and the // tip. // So if this block is itself better than chainActive.Tip() and it wasn't in // setBlockIndexCandidates, then it must be in mapBlocksUnlinked. if (!CBlockIndexWorkComparator()(pindex, chainActive.Tip()) && setBlockIndexCandidates.count(pindex) == 0) { if (pindexFirstInvalid == NULL) { assert(foundInUnlinked); } } } // assert(pindex->GetBlockHash() == pindex->GetBlockHeader().GetHash()); // Perhaps too slow // End: actual consistency checks. // Try descending into the first subnode. std::pair<std::multimap<CBlockIndex*,CBlockIndex*>::iterator,std::multimap<CBlockIndex*,CBlockIndex*>::iterator> range = forward.equal_range(pindex); if (range.first != range.second) { // A subnode was found. pindex = range.first->second; nHeight++; continue; } // This is a leaf node. // Move upwards until we reach a node of which we have not yet visited the last child. while (pindex) { // We are going to either move to a parent or a sibling of pindex. // If pindex was the first with a certain property, unset the corresponding variable. if (pindex == pindexFirstInvalid) pindexFirstInvalid = NULL; if (pindex == pindexFirstMissing) pindexFirstMissing = NULL; if (pindex == pindexFirstNeverProcessed) pindexFirstNeverProcessed = NULL; if (pindex == pindexFirstNotTreeValid) pindexFirstNotTreeValid = NULL; if (pindex == pindexFirstNotTransactionsValid) pindexFirstNotTransactionsValid = NULL; if (pindex == pindexFirstNotChainValid) pindexFirstNotChainValid = NULL; if (pindex == pindexFirstNotScriptsValid) pindexFirstNotScriptsValid = NULL; // Find our parent. CBlockIndex* pindexPar = pindex->pprev; // Find which child we just visited. std::pair<std::multimap<CBlockIndex*,CBlockIndex*>::iterator,std::multimap<CBlockIndex*,CBlockIndex*>::iterator> rangePar = forward.equal_range(pindexPar); while (rangePar.first->second != pindex) { assert(rangePar.first != rangePar.second); // Our parent must have at least the node we're coming from as child. rangePar.first++; } // Proceed to the next one. rangePar.first++; if (rangePar.first != rangePar.second) { // Move to the sibling. pindex = rangePar.first->second; break; } else { // Move up further. pindex = pindexPar; nHeight--; continue; } } } // Check that we actually traversed the entire map. assert(nNodes == forward.size()); } ////////////////////////////////////////////////////////////////////////////// // // CAlert // std::string GetWarnings(const std::string& strFor) { int nPriority = 0; string strStatusBar; string strRPC; string strGUI; if (!CLIENT_VERSION_IS_RELEASE) { strStatusBar = "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications"; strGUI = _("This is a pre-release test build - use at your own risk - do not use for mining or merchant applications"); } if (GetBoolArg("-testsafemode", DEFAULT_TESTSAFEMODE)) strStatusBar = strRPC = strGUI = "testsafemode enabled"; // Misc warnings like out of disk space and clock is wrong if (strMiscWarning != "") { nPriority = 1000; strStatusBar = strGUI = strMiscWarning; } if (fLargeWorkForkFound) { nPriority = 2000; strStatusBar = strRPC = "Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues."; strGUI = _("Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues."); } else if (fLargeWorkInvalidChainFound) { nPriority = 2000; strStatusBar = strRPC = "Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade."; strGUI = _("Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade."); } // Alerts { LOCK(cs_mapAlerts); BOOST_FOREACH(PAIRTYPE(const uint256, CAlert)& item, mapAlerts) { const CAlert& alert = item.second; if (alert.AppliesToMe() && alert.nPriority > nPriority) { nPriority = alert.nPriority; strStatusBar = strGUI = alert.strStatusBar; } } } if (strFor == "gui") return strGUI; else if (strFor == "statusbar") return strStatusBar; else if (strFor == "rpc") return strRPC; assert(!"GetWarnings(): invalid parameter"); return "error"; } ////////////////////////////////////////////////////////////////////////////// // // Messages // bool static AlreadyHave(const CInv& inv) EXCLUSIVE_LOCKS_REQUIRED(cs_main) { switch (inv.type) { case MSG_TX: { assert(recentRejects); if (chainActive.Tip()->GetBlockHash() != hashRecentRejectsChainTip) { // If the chain tip has changed previously rejected transactions // might be now valid, e.g. due to a nLockTime'd tx becoming valid, // or a double-spend. Reset the rejects filter and give those // txs a second chance. hashRecentRejectsChainTip = chainActive.Tip()->GetBlockHash(); recentRejects->reset(); } return recentRejects->contains(inv.hash) || mempool.exists(inv.hash) || mapOrphanTransactions.count(inv.hash) || pcoinsTip->HaveCoins(inv.hash); } case MSG_BLOCK: return mapBlockIndex.count(inv.hash); /* LumoCash Related Inventory Messages -- We shouldn't update the sync times for each of the messages when we already have it. We're going to be asking many nodes upfront for the full inventory list, so we'll get duplicates of these. We want to only update the time on new hits, so that we can time out appropriately if needed. */ case MSG_TXLOCK_REQUEST: return instantsend.AlreadyHave(inv.hash); case MSG_TXLOCK_VOTE: return instantsend.AlreadyHave(inv.hash); case MSG_SPORK: return mapSporks.count(inv.hash); case MSG_MASTERNODE_PAYMENT_VOTE: return mnpayments.mapMasternodePaymentVotes.count(inv.hash); case MSG_MASTERNODE_PAYMENT_BLOCK: { BlockMap::iterator mi = mapBlockIndex.find(inv.hash); return mi != mapBlockIndex.end() && mnpayments.mapMasternodeBlocks.find(mi->second->nHeight) != mnpayments.mapMasternodeBlocks.end(); } case MSG_MASTERNODE_ANNOUNCE: return mnodeman.mapSeenMasternodeBroadcast.count(inv.hash) && !mnodeman.IsMnbRecoveryRequested(inv.hash); case MSG_MASTERNODE_PING: return mnodeman.mapSeenMasternodePing.count(inv.hash); case MSG_DSTX: return mapDarksendBroadcastTxes.count(inv.hash); case MSG_GOVERNANCE_OBJECT: case MSG_GOVERNANCE_OBJECT_VOTE: return ! governance.ConfirmInventoryRequest(inv); case MSG_MASTERNODE_VERIFY: return mnodeman.mapSeenMasternodeVerification.count(inv.hash); } // Don't know what it is, just say we already got one return true; } void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParams) { std::deque<CInv>::iterator it = pfrom->vRecvGetData.begin(); vector<CInv> vNotFound; LOCK(cs_main); while (it != pfrom->vRecvGetData.end()) { // Don't bother if send buffer is too full to respond anyway if (pfrom->nSendSize >= SendBufferSize()) break; const CInv &inv = *it; LogPrint("net", "ProcessGetData -- inv = %s\n", inv.ToString()); { boost::this_thread::interruption_point(); it++; if (inv.type == MSG_BLOCK || inv.type == MSG_FILTERED_BLOCK) { bool send = false; BlockMap::iterator mi = mapBlockIndex.find(inv.hash); if (mi != mapBlockIndex.end()) { if (chainActive.Contains(mi->second)) { send = true; } else { static const int nOneMonth = 30 * 24 * 60 * 60; // To prevent fingerprinting attacks, only send blocks outside of the active // chain if they are valid, and no more than a month older (both in time, and in // best equivalent proof of work) than the best header chain we know about. send = mi->second->IsValid(BLOCK_VALID_SCRIPTS) && (pindexBestHeader != NULL) && (pindexBestHeader->GetBlockTime() - mi->second->GetBlockTime() < nOneMonth) && (GetBlockProofEquivalentTime(*pindexBestHeader, *mi->second, *pindexBestHeader, consensusParams) < nOneMonth); if (!send) { LogPrintf("%s: ignoring request from peer=%i for old block that isn't in the main chain\n", __func__, pfrom->GetId()); } } } // disconnect node in case we have reached the outbound limit for serving historical blocks // never disconnect whitelisted nodes static const int nOneWeek = 7 * 24 * 60 * 60; // assume > 1 week = historical if (send && CNode::OutboundTargetReached(true) && ( ((pindexBestHeader != NULL) && (pindexBestHeader->GetBlockTime() - mi->second->GetBlockTime() > nOneWeek)) || inv.type == MSG_FILTERED_BLOCK) && !pfrom->fWhitelisted) { LogPrint("net", "historical block serving limit reached, disconnect peer=%d\n", pfrom->GetId()); //disconnect node pfrom->fDisconnect = true; send = false; } // Pruned nodes may have deleted the block, so check whether // it's available before trying to send. if (send && (mi->second->nStatus & BLOCK_HAVE_DATA)) { // Send block from disk CBlock block; if (!ReadBlockFromDisk(block, (*mi).second, consensusParams)) assert(!"cannot load block from disk"); if (inv.type == MSG_BLOCK) pfrom->PushMessage(NetMsgType::BLOCK, block); else // MSG_FILTERED_BLOCK) { LOCK(pfrom->cs_filter); if (pfrom->pfilter) { CMerkleBlock merkleBlock(block, *pfrom->pfilter); pfrom->PushMessage(NetMsgType::MERKLEBLOCK, merkleBlock); // CMerkleBlock just contains hashes, so also push any transactions in the block the client did not see // This avoids hurting performance by pointlessly requiring a round-trip // Note that there is currently no way for a node to request any single transactions we didn't send here - // they must either disconnect and retry or request the full block. // Thus, the protocol spec specified allows for us to provide duplicate txn here, // however we MUST always provide at least what the remote peer needs typedef std::pair<unsigned int, uint256> PairType; BOOST_FOREACH(PairType& pair, merkleBlock.vMatchedTxn) pfrom->PushMessage(NetMsgType::TX, block.vtx[pair.first]); } // else // no response } // Trigger the peer node to send a getblocks request for the next batch of inventory if (inv.hash == pfrom->hashContinue) { // Bypass PushInventory, this must send even if redundant, // and we want it right after the last block so they don't // wait for other stuff first. vector<CInv> vInv; vInv.push_back(CInv(MSG_BLOCK, chainActive.Tip()->GetBlockHash())); pfrom->PushMessage(NetMsgType::INV, vInv); pfrom->hashContinue.SetNull(); } } } else if (inv.IsKnownType()) { // Send stream from relay memory bool pushed = false; { CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); { LOCK(cs_mapRelay); map<CInv, CDataStream>::iterator mi = mapRelay.find(inv); if (mi != mapRelay.end()) { ss += (*mi).second; pushed = true; } } if(pushed) pfrom->PushMessage(inv.GetCommand(), ss); } if (!pushed && inv.type == MSG_TX) { CTransaction tx; if (mempool.lookup(inv.hash, tx)) { CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); ss.reserve(1000); ss << tx; pfrom->PushMessage(NetMsgType::TX, ss); pushed = true; } } if (!pushed && inv.type == MSG_TXLOCK_REQUEST) { CTxLockRequest txLockRequest; if(instantsend.GetTxLockRequest(inv.hash, txLockRequest)) { CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); ss.reserve(1000); ss << txLockRequest; pfrom->PushMessage(NetMsgType::TXLOCKREQUEST, ss); pushed = true; } } if (!pushed && inv.type == MSG_TXLOCK_VOTE) { CTxLockVote vote; if(instantsend.GetTxLockVote(inv.hash, vote)) { CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); ss.reserve(1000); ss << vote; pfrom->PushMessage(NetMsgType::TXLOCKVOTE, ss); pushed = true; } } if (!pushed && inv.type == MSG_SPORK) { if(mapSporks.count(inv.hash)) { CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); ss.reserve(1000); ss << mapSporks[inv.hash]; pfrom->PushMessage(NetMsgType::SPORK, ss); pushed = true; } } if (!pushed && inv.type == MSG_MASTERNODE_PAYMENT_VOTE) { if(mnpayments.HasVerifiedPaymentVote(inv.hash)) { CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); ss.reserve(1000); ss << mnpayments.mapMasternodePaymentVotes[inv.hash]; pfrom->PushMessage(NetMsgType::MASTERNODEPAYMENTVOTE, ss); pushed = true; } } if (!pushed && inv.type == MSG_MASTERNODE_PAYMENT_BLOCK) { BlockMap::iterator mi = mapBlockIndex.find(inv.hash); LOCK(cs_mapMasternodeBlocks); if (mi != mapBlockIndex.end() && mnpayments.mapMasternodeBlocks.count(mi->second->nHeight)) { BOOST_FOREACH(CMasternodePayee& payee, mnpayments.mapMasternodeBlocks[mi->second->nHeight].vecPayees) { std::vector<uint256> vecVoteHashes = payee.GetVoteHashes(); BOOST_FOREACH(uint256& hash, vecVoteHashes) { if(mnpayments.HasVerifiedPaymentVote(hash)) { CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); ss.reserve(1000); ss << mnpayments.mapMasternodePaymentVotes[hash]; pfrom->PushMessage(NetMsgType::MASTERNODEPAYMENTVOTE, ss); } } } pushed = true; } } if (!pushed && inv.type == MSG_MASTERNODE_ANNOUNCE) { if(mnodeman.mapSeenMasternodeBroadcast.count(inv.hash)){ CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); ss.reserve(1000); ss << mnodeman.mapSeenMasternodeBroadcast[inv.hash].second; pfrom->PushMessage(NetMsgType::MNANNOUNCE, ss); pushed = true; } } if (!pushed && inv.type == MSG_MASTERNODE_PING) { if(mnodeman.mapSeenMasternodePing.count(inv.hash)) { CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); ss.reserve(1000); ss << mnodeman.mapSeenMasternodePing[inv.hash]; pfrom->PushMessage(NetMsgType::MNPING, ss); pushed = true; } } if (!pushed && inv.type == MSG_DSTX) { if(mapDarksendBroadcastTxes.count(inv.hash)) { CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); ss.reserve(1000); ss << mapDarksendBroadcastTxes[inv.hash]; pfrom->PushMessage(NetMsgType::DSTX, ss); pushed = true; } } if (!pushed && inv.type == MSG_GOVERNANCE_OBJECT) { LogPrint("net", "ProcessGetData -- MSG_GOVERNANCE_OBJECT: inv = %s\n", inv.ToString()); CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); bool topush = false; { if(governance.HaveObjectForHash(inv.hash)) { ss.reserve(1000); if(governance.SerializeObjectForHash(inv.hash, ss)) { topush = true; } } } LogPrint("net", "ProcessGetData -- MSG_GOVERNANCE_OBJECT: topush = %d, inv = %s\n", topush, inv.ToString()); if(topush) { pfrom->PushMessage(NetMsgType::MNGOVERNANCEOBJECT, ss); pushed = true; } } if (!pushed && inv.type == MSG_GOVERNANCE_OBJECT_VOTE) { CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); bool topush = false; { if(governance.HaveVoteForHash(inv.hash)) { ss.reserve(1000); if(governance.SerializeVoteForHash(inv.hash, ss)) { topush = true; } } } if(topush) { LogPrint("net", "ProcessGetData -- pushing: inv = %s\n", inv.ToString()); pfrom->PushMessage(NetMsgType::MNGOVERNANCEOBJECTVOTE, ss); pushed = true; } } if (!pushed && inv.type == MSG_MASTERNODE_VERIFY) { if(mnodeman.mapSeenMasternodeVerification.count(inv.hash)) { CDataStream ss(SER_NETWORK, PROTOCOL_VERSION); ss.reserve(1000); ss << mnodeman.mapSeenMasternodeVerification[inv.hash]; pfrom->PushMessage(NetMsgType::MNVERIFY, ss); pushed = true; } } if (!pushed) vNotFound.push_back(inv); } // Track requests for our stuff. GetMainSignals().Inventory(inv.hash); if (inv.type == MSG_BLOCK || inv.type == MSG_FILTERED_BLOCK) break; } } pfrom->vRecvGetData.erase(pfrom->vRecvGetData.begin(), it); if (!vNotFound.empty()) { // Let the peer know that we didn't find what it asked for, so it doesn't // have to wait around forever. Currently only SPV clients actually care // about this message: it's needed when they are recursively walking the // dependencies of relevant unconfirmed transactions. SPV clients want to // do that because they want to know about (and store and rebroadcast and // risk analyze) the dependencies of transactions relevant to them, without // having to download the entire memory pool. pfrom->PushMessage(NetMsgType::NOTFOUND, vNotFound); } } bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, int64_t nTimeReceived) { const CChainParams& chainparams = Params(); RandAddSeedPerfmon(); LogPrint("net", "received: %s (%u bytes) peer=%d\n", SanitizeString(strCommand), vRecv.size(), pfrom->id); if (mapArgs.count("-dropmessagestest") && GetRand(atoi(mapArgs["-dropmessagestest"])) == 0) { LogPrintf("dropmessagestest DROPPING RECV MESSAGE\n"); return true; } if (!(nLocalServices & NODE_BLOOM) && (strCommand == NetMsgType::FILTERLOAD || strCommand == NetMsgType::FILTERADD || strCommand == NetMsgType::FILTERCLEAR)) { if (pfrom->nVersion >= NO_BLOOM_VERSION) { Misbehaving(pfrom->GetId(), 100); return false; } else if (GetBoolArg("-enforcenodebloom", false)) { pfrom->fDisconnect = true; return false; } } if (strCommand == NetMsgType::VERSION) { // Each connection can only send one version message if (pfrom->nVersion != 0) { pfrom->PushMessage(NetMsgType::REJECT, strCommand, REJECT_DUPLICATE, string("Duplicate version message")); Misbehaving(pfrom->GetId(), 1); return false; } int64_t nTime; CAddress addrMe; CAddress addrFrom; uint64_t nNonce = 1; vRecv >> pfrom->nVersion >> pfrom->nServices >> nTime >> addrMe; if (pfrom->nVersion < MIN_PEER_PROTO_VERSION) { // disconnect from peers older than this proto version LogPrintf("peer=%d using obsolete version %i; disconnecting\n", pfrom->id, pfrom->nVersion); pfrom->PushMessage(NetMsgType::REJECT, strCommand, REJECT_OBSOLETE, strprintf("Version must be %d or greater", MIN_PEER_PROTO_VERSION)); pfrom->fDisconnect = true; return false; } if (pfrom->nVersion == 10300) pfrom->nVersion = 300; if (!vRecv.empty()) vRecv >> addrFrom >> nNonce; if (!vRecv.empty()) { vRecv >> LIMITED_STRING(pfrom->strSubVer, MAX_SUBVERSION_LENGTH); pfrom->cleanSubVer = SanitizeString(pfrom->strSubVer); } if (!vRecv.empty()) vRecv >> pfrom->nStartingHeight; if (!vRecv.empty()) vRecv >> pfrom->fRelayTxes; // set to true after we get the first filter* message else pfrom->fRelayTxes = true; // Disconnect if we connected to ourself if (nNonce == nLocalHostNonce && nNonce > 1) { LogPrintf("connected to self at %s, disconnecting\n", pfrom->addr.ToString()); pfrom->fDisconnect = true; return true; } pfrom->addrLocal = addrMe; if (pfrom->fInbound && addrMe.IsRoutable()) { SeenLocal(addrMe); } // Be shy and don't send version until we hear if (pfrom->fInbound) pfrom->PushVersion(); pfrom->fClient = !(pfrom->nServices & NODE_NETWORK); CNodeState* pNodeState = NULL; { LOCK(cs_main); pNodeState = State(pfrom->GetId()); assert(pNodeState); } // Potentially mark this peer as a preferred download peer. UpdatePreferredDownload(pfrom, pNodeState); // Change version pfrom->PushMessage(NetMsgType::VERACK); pfrom->ssSend.SetVersion(min(pfrom->nVersion, PROTOCOL_VERSION)); if (!pfrom->fInbound) { // Advertise our address if (fListen && !IsInitialBlockDownload()) { CAddress addr = GetLocalAddress(&pfrom->addr); if (addr.IsRoutable()) { LogPrintf("ProcessMessages: advertising address %s\n", addr.ToString()); pfrom->PushAddress(addr); } else if (IsPeerAddrLocalGood(pfrom)) { addr.SetIP(pfrom->addrLocal); LogPrintf("ProcessMessages: advertising address %s\n", addr.ToString()); pfrom->PushAddress(addr); } } // Get recent addresses if (pfrom->fOneShot || pfrom->nVersion >= CADDR_TIME_VERSION || addrman.size() < 1000) { pfrom->PushMessage(NetMsgType::GETADDR); pfrom->fGetAddr = true; } addrman.Good(pfrom->addr); } else { if (((CNetAddr)pfrom->addr) == (CNetAddr)addrFrom) { addrman.Add(addrFrom, addrFrom); addrman.Good(addrFrom); } } // Relay alerts { LOCK(cs_mapAlerts); BOOST_FOREACH(PAIRTYPE(const uint256, CAlert)& item, mapAlerts) item.second.RelayTo(pfrom); } pfrom->fSuccessfullyConnected = true; string remoteAddr; if (fLogIPs) remoteAddr = ", peeraddr=" + pfrom->addr.ToString(); LogPrintf("receive version message: %s: version %d, blocks=%d, us=%s, peer=%d%s\n", pfrom->cleanSubVer, pfrom->nVersion, pfrom->nStartingHeight, addrMe.ToString(), pfrom->id, remoteAddr); int64_t nTimeOffset = nTime - GetTime(); pfrom->nTimeOffset = nTimeOffset; AddTimeData(pfrom->addr, nTimeOffset); } else if (pfrom->nVersion == 0) { // Must have a version message before anything else Misbehaving(pfrom->GetId(), 1); return false; } else if (strCommand == NetMsgType::VERACK) { pfrom->SetRecvVersion(min(pfrom->nVersion, PROTOCOL_VERSION)); // Mark this node as currently connected, so we update its timestamp later. if (pfrom->fNetworkNode) { LOCK(cs_main); State(pfrom->GetId())->fCurrentlyConnected = true; } if (pfrom->nVersion >= SENDHEADERS_VERSION) { // Tell our peer we prefer to receive headers rather than inv's // We send this to non-NODE NETWORK peers as well, because even // non-NODE NETWORK peers can announce blocks (such as pruning // nodes) pfrom->PushMessage(NetMsgType::SENDHEADERS); } } else if (strCommand == NetMsgType::ADDR) { vector<CAddress> vAddr; vRecv >> vAddr; // Don't want addr from older versions unless seeding if (pfrom->nVersion < CADDR_TIME_VERSION && addrman.size() > 1000) return true; if (vAddr.size() > 1000) { Misbehaving(pfrom->GetId(), 20); return error("message addr size() = %u", vAddr.size()); } // Store the new addresses vector<CAddress> vAddrOk; int64_t nNow = GetAdjustedTime(); int64_t nSince = nNow - 10 * 60; BOOST_FOREACH(CAddress& addr, vAddr) { boost::this_thread::interruption_point(); if (addr.nTime <= 100000000 || addr.nTime > nNow + 10 * 60) addr.nTime = nNow - 5 * 24 * 60 * 60; pfrom->AddAddressKnown(addr); bool fReachable = IsReachable(addr); if (addr.nTime > nSince && !pfrom->fGetAddr && vAddr.size() <= 10 && addr.IsRoutable()) { // Relay to a limited number of other nodes { LOCK(cs_vNodes); // Use deterministic randomness to send to the same nodes for 24 hours // at a time so the addrKnowns of the chosen nodes prevent repeats static uint256 hashSalt; if (hashSalt.IsNull()) hashSalt = GetRandHash(); uint64_t hashAddr = addr.GetHash(); uint256 hashRand = ArithToUint256(UintToArith256(hashSalt) ^ (hashAddr<<32) ^ ((GetTime()+hashAddr)/(24*60*60))); hashRand = Hash(BEGIN(hashRand), END(hashRand)); multimap<uint256, CNode*> mapMix; BOOST_FOREACH(CNode* pnode, vNodes) { if (pnode->nVersion < CADDR_TIME_VERSION) continue; unsigned int nPointer; memcpy(&nPointer, &pnode, sizeof(nPointer)); uint256 hashKey = ArithToUint256(UintToArith256(hashRand) ^ nPointer); hashKey = Hash(BEGIN(hashKey), END(hashKey)); mapMix.insert(make_pair(hashKey, pnode)); } int nRelayNodes = fReachable ? 2 : 1; // limited relaying of addresses outside our network(s) for (multimap<uint256, CNode*>::iterator mi = mapMix.begin(); mi != mapMix.end() && nRelayNodes-- > 0; ++mi) ((*mi).second)->PushAddress(addr); } } // Do not store addresses outside our network if (fReachable) vAddrOk.push_back(addr); } addrman.Add(vAddrOk, pfrom->addr, 2 * 60 * 60); if (vAddr.size() < 1000) pfrom->fGetAddr = false; if (pfrom->fOneShot) pfrom->fDisconnect = true; } else if (strCommand == NetMsgType::SENDHEADERS) { LOCK(cs_main); State(pfrom->GetId())->fPreferHeaders = true; } else if (strCommand == NetMsgType::INV) { vector<CInv> vInv; vRecv >> vInv; if (vInv.size() > MAX_INV_SZ) { Misbehaving(pfrom->GetId(), 20); return error("message inv size() = %u", vInv.size()); } bool fBlocksOnly = GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY); // Allow whitelisted peers to send data other than blocks in blocks only mode if whitelistrelay is true if (pfrom->fWhitelisted && GetBoolArg("-whitelistrelay", DEFAULT_WHITELISTRELAY)) fBlocksOnly = false; LOCK(cs_main); std::vector<CInv> vToFetch; for (unsigned int nInv = 0; nInv < vInv.size(); nInv++) { const CInv &inv = vInv[nInv]; if(!inv.IsKnownType()) { LogPrint("net", "got inv of unknown type %d: %s peer=%d\n", inv.type, inv.hash.ToString(), pfrom->id); continue; } boost::this_thread::interruption_point(); pfrom->AddInventoryKnown(inv); bool fAlreadyHave = AlreadyHave(inv); LogPrint("net", "got inv: %s %s peer=%d\n", inv.ToString(), fAlreadyHave ? "have" : "new", pfrom->id); if (inv.type == MSG_BLOCK) { UpdateBlockAvailability(pfrom->GetId(), inv.hash); if (!fAlreadyHave && !fImporting && !fReindex && !mapBlocksInFlight.count(inv.hash)) { // First request the headers preceding the announced block. In the normal fully-synced // case where a new block is announced that succeeds the current tip (no reorganization), // there are no such headers. // Secondly, and only when we are close to being synced, we request the announced block directly, // to avoid an extra round-trip. Note that we must *first* ask for the headers, so by the // time the block arrives, the header chain leading up to it is already validated. Not // doing this will result in the received block being rejected as an orphan in case it is // not a direct successor. pfrom->PushMessage(NetMsgType::GETHEADERS, chainActive.GetLocator(pindexBestHeader), inv.hash); CNodeState *nodestate = State(pfrom->GetId()); if (CanDirectFetch(chainparams.GetConsensus()) && nodestate->nBlocksInFlight < MAX_BLOCKS_IN_TRANSIT_PER_PEER) { vToFetch.push_back(inv); // Mark block as in flight already, even though the actual "getdata" message only goes out // later (within the same cs_main lock, though). MarkBlockAsInFlight(pfrom->GetId(), inv.hash, chainparams.GetConsensus()); } LogPrint("net", "getheaders (%d) %s to peer=%d\n", pindexBestHeader->nHeight, inv.hash.ToString(), pfrom->id); } } else { if (fBlocksOnly) LogPrint("net", "transaction (%s) inv sent in violation of protocol peer=%d\n", inv.hash.ToString(), pfrom->id); else if (!fAlreadyHave && !fImporting && !fReindex && !IsInitialBlockDownload()) pfrom->AskFor(inv); } // Track requests for our stuff GetMainSignals().Inventory(inv.hash); if (pfrom->nSendSize > (SendBufferSize() * 2)) { Misbehaving(pfrom->GetId(), 50); return error("send buffer size() = %u", pfrom->nSendSize); } } if (!vToFetch.empty()) pfrom->PushMessage(NetMsgType::GETDATA, vToFetch); } else if (strCommand == NetMsgType::GETDATA) { vector<CInv> vInv; vRecv >> vInv; if (vInv.size() > MAX_INV_SZ) { Misbehaving(pfrom->GetId(), 20); return error("message getdata size() = %u", vInv.size()); } if (fDebug || (vInv.size() != 1)) LogPrint("net", "received getdata (%u invsz) peer=%d\n", vInv.size(), pfrom->id); if ((fDebug && vInv.size() > 0) || (vInv.size() == 1)) LogPrint("net", "received getdata for: %s peer=%d\n", vInv[0].ToString(), pfrom->id); pfrom->vRecvGetData.insert(pfrom->vRecvGetData.end(), vInv.begin(), vInv.end()); ProcessGetData(pfrom, chainparams.GetConsensus()); } else if (strCommand == NetMsgType::GETBLOCKS) { CBlockLocator locator; uint256 hashStop; vRecv >> locator >> hashStop; LOCK(cs_main); // Find the last block the caller has in the main chain CBlockIndex* pindex = FindForkInGlobalIndex(chainActive, locator); // Send the rest of the chain if (pindex) pindex = chainActive.Next(pindex); int nLimit = 500; LogPrint("net", "getblocks %d to %s limit %d from peer=%d\n", (pindex ? pindex->nHeight : -1), hashStop.IsNull() ? "end" : hashStop.ToString(), nLimit, pfrom->id); for (; pindex; pindex = chainActive.Next(pindex)) { if (pindex->GetBlockHash() == hashStop) { LogPrint("net", " getblocks stopping at %d %s\n", pindex->nHeight, pindex->GetBlockHash().ToString()); break; } // If pruning, don't inv blocks unless we have on disk and are likely to still have // for some reasonable time window (1 hour) that block relay might require. const int nPrunedBlocksLikelyToHave = MIN_BLOCKS_TO_KEEP - 3600 / chainparams.GetConsensus().nPowTargetSpacing; if (fPruneMode && (!(pindex->nStatus & BLOCK_HAVE_DATA) || pindex->nHeight <= chainActive.Tip()->nHeight - nPrunedBlocksLikelyToHave)) { LogPrint("net", " getblocks stopping, pruned or too old block at %d %s\n", pindex->nHeight, pindex->GetBlockHash().ToString()); break; } pfrom->PushInventory(CInv(MSG_BLOCK, pindex->GetBlockHash())); if (--nLimit <= 0) { // When this block is requested, we'll send an inv that'll // trigger the peer to getblocks the next batch of inventory. LogPrint("net", " getblocks stopping at limit %d %s\n", pindex->nHeight, pindex->GetBlockHash().ToString()); pfrom->hashContinue = pindex->GetBlockHash(); break; } } } else if (strCommand == NetMsgType::GETHEADERS) { CBlockLocator locator; uint256 hashStop; vRecv >> locator >> hashStop; LOCK(cs_main); if (IsInitialBlockDownload() && !pfrom->fWhitelisted) { LogPrint("net", "Ignoring getheaders from peer=%d because node is in initial block download\n", pfrom->id); return true; } CNodeState *nodestate = State(pfrom->GetId()); CBlockIndex* pindex = NULL; if (locator.IsNull()) { // If locator is null, return the hashStop block BlockMap::iterator mi = mapBlockIndex.find(hashStop); if (mi == mapBlockIndex.end()) return true; pindex = (*mi).second; } else { // Find the last block the caller has in the main chain pindex = FindForkInGlobalIndex(chainActive, locator); if (pindex) pindex = chainActive.Next(pindex); } // we must use CBlocks, as CBlockHeaders won't include the 0x00 nTx count at the end vector<CBlock> vHeaders; int nLimit = MAX_HEADERS_RESULTS; LogPrint("net", "getheaders %d to %s from peer=%d\n", (pindex ? pindex->nHeight : -1), hashStop.ToString(), pfrom->id); for (; pindex; pindex = chainActive.Next(pindex)) { vHeaders.push_back(pindex->GetBlockHeader()); if (--nLimit <= 0 || pindex->GetBlockHash() == hashStop) break; } // pindex can be NULL either if we sent chainActive.Tip() OR // if our peer has chainActive.Tip() (and thus we are sending an empty // headers message). In both cases it's safe to update // pindexBestHeaderSent to be our tip. nodestate->pindexBestHeaderSent = pindex ? pindex : chainActive.Tip(); pfrom->PushMessage(NetMsgType::HEADERS, vHeaders); } else if (strCommand == NetMsgType::TX || strCommand == NetMsgType::DSTX || strCommand == NetMsgType::TXLOCKREQUEST) { // Stop processing the transaction early if // We are in blocks only mode and peer is either not whitelisted or whitelistrelay is off if (GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY) && (!pfrom->fWhitelisted || !GetBoolArg("-whitelistrelay", DEFAULT_WHITELISTRELAY))) { LogPrint("net", "transaction sent in violation of protocol peer=%d\n", pfrom->id); return true; } vector<uint256> vWorkQueue; vector<uint256> vEraseQueue; CTransaction tx; CTxLockRequest txLockRequest; CDarksendBroadcastTx dstx; int nInvType = MSG_TX; // Read data and assign inv type if(strCommand == NetMsgType::TX) { vRecv >> tx; } else if(strCommand == NetMsgType::TXLOCKREQUEST) { vRecv >> txLockRequest; tx = txLockRequest; nInvType = MSG_TXLOCK_REQUEST; } else if (strCommand == NetMsgType::DSTX) { vRecv >> dstx; tx = dstx.tx; nInvType = MSG_DSTX; } CInv inv(nInvType, tx.GetHash()); pfrom->AddInventoryKnown(inv); pfrom->setAskFor.erase(inv.hash); // Process custom logic, no matter if tx will be accepted to mempool later or not if (strCommand == NetMsgType::TXLOCKREQUEST) { if(!instantsend.ProcessTxLockRequest(txLockRequest)) { LogPrint("instantsend", "TXLOCKREQUEST -- failed %s\n", txLockRequest.GetHash().ToString()); return false; } } else if (strCommand == NetMsgType::DSTX) { uint256 hashTx = tx.GetHash(); if(mapDarksendBroadcastTxes.count(hashTx)) { LogPrint("privatesend", "DSTX -- Already have %s, skipping...\n", hashTx.ToString()); return true; // not an error } CMasternode* pmn = mnodeman.Find(dstx.vin); if(pmn == NULL) { LogPrint("privatesend", "DSTX -- Can't find masternode %s to verify %s\n", dstx.vin.prevout.ToStringShort(), hashTx.ToString()); return false; } if(!pmn->fAllowMixingTx) { LogPrint("privatesend", "DSTX -- Masternode %s is sending too many transactions %s\n", dstx.vin.prevout.ToStringShort(), hashTx.ToString()); return true; // TODO: Not an error? Could it be that someone is relaying old DSTXes // we have no idea about (e.g we were offline)? How to handle them? } if(!dstx.CheckSignature(pmn->pubKeyMasternode)) { LogPrint("privatesend", "DSTX -- CheckSignature() failed for %s\n", hashTx.ToString()); return false; } LogPrintf("DSTX -- Got Masternode transaction %s\n", hashTx.ToString()); mempool.PrioritiseTransaction(hashTx, hashTx.ToString(), 1000, 0.1*COIN); pmn->fAllowMixingTx = false; } LOCK(cs_main); bool fMissingInputs = false; CValidationState state; mapAlreadyAskedFor.erase(inv.hash); if (!AlreadyHave(inv) && AcceptToMemoryPool(mempool, state, tx, true, &fMissingInputs)) { // Process custom txes, this changes AlreadyHave to "true" if (strCommand == NetMsgType::DSTX) { LogPrintf("DSTX -- Masternode transaction accepted, txid=%s, peer=%d\n", tx.GetHash().ToString(), pfrom->id); mapDarksendBroadcastTxes.insert(make_pair(tx.GetHash(), dstx)); } else if (strCommand == NetMsgType::TXLOCKREQUEST) { LogPrintf("TXLOCKREQUEST -- Transaction Lock Request accepted, txid=%s, peer=%d\n", tx.GetHash().ToString(), pfrom->id); instantsend.AcceptLockRequest(txLockRequest); } mempool.check(pcoinsTip); RelayTransaction(tx); vWorkQueue.push_back(inv.hash); LogPrint("mempool", "AcceptToMemoryPool: peer=%d: accepted %s (poolsz %u txn, %u kB)\n", pfrom->id, tx.GetHash().ToString(), mempool.size(), mempool.DynamicMemoryUsage() / 1000); // Recursively process any orphan transactions that depended on this one set<NodeId> setMisbehaving; for (unsigned int i = 0; i < vWorkQueue.size(); i++) { map<uint256, set<uint256> >::iterator itByPrev = mapOrphanTransactionsByPrev.find(vWorkQueue[i]); if (itByPrev == mapOrphanTransactionsByPrev.end()) continue; for (set<uint256>::iterator mi = itByPrev->second.begin(); mi != itByPrev->second.end(); ++mi) { const uint256& orphanHash = *mi; const CTransaction& orphanTx = mapOrphanTransactions[orphanHash].tx; NodeId fromPeer = mapOrphanTransactions[orphanHash].fromPeer; bool fMissingInputs2 = false; // Use a dummy CValidationState so someone can't setup nodes to counter-DoS based on orphan // resolution (that is, feeding people an invalid transaction based on LegitTxX in order to get // anyone relaying LegitTxX banned) CValidationState stateDummy; if (setMisbehaving.count(fromPeer)) continue; if (AcceptToMemoryPool(mempool, stateDummy, orphanTx, true, &fMissingInputs2)) { LogPrint("mempool", " accepted orphan tx %s\n", orphanHash.ToString()); RelayTransaction(orphanTx); vWorkQueue.push_back(orphanHash); vEraseQueue.push_back(orphanHash); } else if (!fMissingInputs2) { int nDos = 0; if (stateDummy.IsInvalid(nDos) && nDos > 0) { // Punish peer that gave us an invalid orphan tx Misbehaving(fromPeer, nDos); setMisbehaving.insert(fromPeer); LogPrint("mempool", " invalid orphan tx %s\n", orphanHash.ToString()); } // Has inputs but not accepted to mempool // Probably non-standard or insufficient fee/priority LogPrint("mempool", " removed orphan tx %s\n", orphanHash.ToString()); vEraseQueue.push_back(orphanHash); assert(recentRejects); recentRejects->insert(orphanHash); } mempool.check(pcoinsTip); } } BOOST_FOREACH(uint256 hash, vEraseQueue) EraseOrphanTx(hash); } else if (fMissingInputs) { AddOrphanTx(tx, pfrom->GetId()); // DoS prevention: do not allow mapOrphanTransactions to grow unbounded unsigned int nMaxOrphanTx = (unsigned int)std::max((int64_t)0, GetArg("-maxorphantx", DEFAULT_MAX_ORPHAN_TRANSACTIONS)); unsigned int nEvicted = LimitOrphanTxSize(nMaxOrphanTx); if (nEvicted > 0) LogPrint("mempool", "mapOrphan overflow, removed %u tx\n", nEvicted); } else { assert(recentRejects); recentRejects->insert(tx.GetHash()); if (strCommand == NetMsgType::TXLOCKREQUEST && !AlreadyHave(inv)) { // i.e. AcceptToMemoryPool failed, probably because it's conflicting // with existing normal tx or tx lock for another tx. For the same tx lock // AlreadyHave would have return "true" already. // It's the first time we failed for this tx lock request, // this should switch AlreadyHave to "true". instantsend.RejectLockRequest(txLockRequest); // this lets other nodes to create lock request candidate i.e. // this allows multiple conflicting lock requests to compete for votes RelayTransaction(tx); } if (pfrom->fWhitelisted && GetBoolArg("-whitelistforcerelay", DEFAULT_WHITELISTFORCERELAY)) { // Always relay transactions received from whitelisted peers, even // if they were already in the mempool or rejected from it due // to policy, allowing the node to function as a gateway for // nodes hidden behind it. // // Never relay transactions that we would assign a non-zero DoS // score for, as we expect peers to do the same with us in that // case. int nDoS = 0; if (!state.IsInvalid(nDoS) || nDoS == 0) { LogPrintf("Force relaying tx %s from whitelisted peer=%d\n", tx.GetHash().ToString(), pfrom->id); RelayTransaction(tx); } else { LogPrintf("Not relaying invalid transaction %s from whitelisted peer=%d (%s)\n", tx.GetHash().ToString(), pfrom->id, FormatStateMessage(state)); } } } int nDoS = 0; if (state.IsInvalid(nDoS)) { LogPrint("mempoolrej", "%s from peer=%d was not accepted: %s\n", tx.GetHash().ToString(), pfrom->id, FormatStateMessage(state)); if (state.GetRejectCode() < REJECT_INTERNAL) // Never send AcceptToMemoryPool's internal codes over P2P pfrom->PushMessage(NetMsgType::REJECT, strCommand, (unsigned char)state.GetRejectCode(), state.GetRejectReason().substr(0, MAX_REJECT_MESSAGE_LENGTH), inv.hash); if (nDoS > 0) Misbehaving(pfrom->GetId(), nDoS); } FlushStateToDisk(state, FLUSH_STATE_PERIODIC); } else if (strCommand == NetMsgType::HEADERS && !fImporting && !fReindex) // Ignore headers received while importing { std::vector<CBlockHeader> headers; // Bypass the normal CBlock deserialization, as we don't want to risk deserializing 2000 full blocks. unsigned int nCount = ReadCompactSize(vRecv); if (nCount > MAX_HEADERS_RESULTS) { Misbehaving(pfrom->GetId(), 20); return error("headers message size = %u", nCount); } headers.resize(nCount); for (unsigned int n = 0; n < nCount; n++) { vRecv >> headers[n]; ReadCompactSize(vRecv); // ignore tx count; assume it is 0. } LOCK(cs_main); if (nCount == 0) { // Nothing interesting. Stop asking this peers for more headers. return true; } CBlockIndex *pindexLast = NULL; BOOST_FOREACH(const CBlockHeader& header, headers) { CValidationState state; if (pindexLast != NULL && header.hashPrevBlock != pindexLast->GetBlockHash()) { Misbehaving(pfrom->GetId(), 20); return error("non-continuous headers sequence"); } if (!AcceptBlockHeader(header, state, chainparams, &pindexLast)) { int nDoS; if (state.IsInvalid(nDoS)) { if (nDoS > 0) Misbehaving(pfrom->GetId(), nDoS); std::string strError = "invalid header received " + header.GetHash().ToString(); return error(strError.c_str()); } } } if (pindexLast) UpdateBlockAvailability(pfrom->GetId(), pindexLast->GetBlockHash()); if (nCount == MAX_HEADERS_RESULTS && pindexLast) { // Headers message had its maximum size; the peer may have more headers. // TODO: optimize: if pindexLast is an ancestor of chainActive.Tip or pindexBestHeader, continue // from there instead. LogPrint("net", "more getheaders (%d) to end to peer=%d (startheight:%d)\n", pindexLast->nHeight, pfrom->id, pfrom->nStartingHeight); pfrom->PushMessage(NetMsgType::GETHEADERS, chainActive.GetLocator(pindexLast), uint256()); } bool fCanDirectFetch = CanDirectFetch(chainparams.GetConsensus()); CNodeState *nodestate = State(pfrom->GetId()); // If this set of headers is valid and ends in a block with at least as // much work as our tip, download as much as possible. if (fCanDirectFetch && pindexLast->IsValid(BLOCK_VALID_TREE) && chainActive.Tip()->nChainWork <= pindexLast->nChainWork) { vector<CBlockIndex *> vToFetch; CBlockIndex *pindexWalk = pindexLast; // Calculate all the blocks we'd need to switch to pindexLast, up to a limit. while (pindexWalk && !chainActive.Contains(pindexWalk) && vToFetch.size() <= MAX_BLOCKS_IN_TRANSIT_PER_PEER) { if (!(pindexWalk->nStatus & BLOCK_HAVE_DATA) && !mapBlocksInFlight.count(pindexWalk->GetBlockHash())) { // We don't have this block, and it's not yet in flight. vToFetch.push_back(pindexWalk); } pindexWalk = pindexWalk->pprev; } // If pindexWalk still isn't on our main chain, we're looking at a // very large reorg at a time we think we're close to caught up to // the main chain -- this shouldn't really happen. Bail out on the // direct fetch and rely on parallel download instead. if (!chainActive.Contains(pindexWalk)) { LogPrint("net", "Large reorg, won't direct fetch to %s (%d)\n", pindexLast->GetBlockHash().ToString(), pindexLast->nHeight); } else { vector<CInv> vGetData; // Download as much as possible, from earliest to latest. BOOST_REVERSE_FOREACH(CBlockIndex *pindex, vToFetch) { if (nodestate->nBlocksInFlight >= MAX_BLOCKS_IN_TRANSIT_PER_PEER) { // Can't download any more from this peer break; } vGetData.push_back(CInv(MSG_BLOCK, pindex->GetBlockHash())); MarkBlockAsInFlight(pfrom->GetId(), pindex->GetBlockHash(), chainparams.GetConsensus(), pindex); LogPrint("net", "Requesting block %s from peer=%d\n", pindex->GetBlockHash().ToString(), pfrom->id); } if (vGetData.size() > 1) { LogPrint("net", "Downloading blocks toward %s (%d) via headers direct fetch\n", pindexLast->GetBlockHash().ToString(), pindexLast->nHeight); } if (vGetData.size() > 0) { pfrom->PushMessage(NetMsgType::GETDATA, vGetData); } } } CheckBlockIndex(chainparams.GetConsensus()); } else if (strCommand == NetMsgType::BLOCK && !fImporting && !fReindex) // Ignore blocks received while importing { CBlock block; vRecv >> block; CInv inv(MSG_BLOCK, block.GetHash()); LogPrint("net", "received block %s peer=%d\n", inv.hash.ToString(), pfrom->id); pfrom->AddInventoryKnown(inv); CValidationState state; // Process all blocks from whitelisted peers, even if not requested, // unless we're still syncing with the network. // Such an unrequested block may still be processed, subject to the // conditions in AcceptBlock(). bool forceProcessing = pfrom->fWhitelisted && !IsInitialBlockDownload(); ProcessNewBlock(state, chainparams, pfrom, &block, forceProcessing, NULL); int nDoS; if (state.IsInvalid(nDoS)) { assert (state.GetRejectCode() < REJECT_INTERNAL); // Blocks are never rejected with internal reject codes pfrom->PushMessage(NetMsgType::REJECT, strCommand, (unsigned char)state.GetRejectCode(), state.GetRejectReason().substr(0, MAX_REJECT_MESSAGE_LENGTH), inv.hash); if (nDoS > 0) { LOCK(cs_main); Misbehaving(pfrom->GetId(), nDoS); } } } else if (strCommand == NetMsgType::GETADDR) { // This asymmetric behavior for inbound and outbound connections was introduced // to prevent a fingerprinting attack: an attacker can send specific fake addresses // to users' AddrMan and later request them by sending getaddr messages. // Making nodes which are behind NAT and can only make outgoing connections ignore // the getaddr message mitigates the attack. if (!pfrom->fInbound) { LogPrint("net", "Ignoring \"getaddr\" from outbound connection. peer=%d\n", pfrom->id); return true; } pfrom->vAddrToSend.clear(); vector<CAddress> vAddr = addrman.GetAddr(); BOOST_FOREACH(const CAddress &addr, vAddr) pfrom->PushAddress(addr); } else if (strCommand == NetMsgType::MEMPOOL) { if (CNode::OutboundTargetReached(false) && !pfrom->fWhitelisted) { LogPrint("net", "mempool request with bandwidth limit reached, disconnect peer=%d\n", pfrom->GetId()); pfrom->fDisconnect = true; return true; } LOCK2(cs_main, pfrom->cs_filter); std::vector<uint256> vtxid; mempool.queryHashes(vtxid); vector<CInv> vInv; BOOST_FOREACH(uint256& hash, vtxid) { CInv inv(MSG_TX, hash); if (pfrom->pfilter) { CTransaction tx; bool fInMemPool = mempool.lookup(hash, tx); if (!fInMemPool) continue; // another thread removed since queryHashes, maybe... if (!pfrom->pfilter->IsRelevantAndUpdate(tx)) continue; } vInv.push_back(inv); if (vInv.size() == MAX_INV_SZ) { pfrom->PushMessage(NetMsgType::INV, vInv); vInv.clear(); } } if (vInv.size() > 0) pfrom->PushMessage(NetMsgType::INV, vInv); } else if (strCommand == NetMsgType::PING) { if (pfrom->nVersion > BIP0031_VERSION) { uint64_t nonce = 0; vRecv >> nonce; // Echo the message back with the nonce. This allows for two useful features: // // 1) A remote node can quickly check if the connection is operational // 2) Remote nodes can measure the latency of the network thread. If this node // is overloaded it won't respond to pings quickly and the remote node can // avoid sending us more work, like chain download requests. // // The nonce stops the remote getting confused between different pings: without // it, if the remote node sends a ping once per second and this node takes 5 // seconds to respond to each, the 5th ping the remote sends would appear to // return very quickly. pfrom->PushMessage(NetMsgType::PONG, nonce); } } else if (strCommand == NetMsgType::PONG) { int64_t pingUsecEnd = nTimeReceived; uint64_t nonce = 0; size_t nAvail = vRecv.in_avail(); bool bPingFinished = false; std::string sProblem; if (nAvail >= sizeof(nonce)) { vRecv >> nonce; // Only process pong message if there is an outstanding ping (old ping without nonce should never pong) if (pfrom->nPingNonceSent != 0) { if (nonce == pfrom->nPingNonceSent) { // Matching pong received, this ping is no longer outstanding bPingFinished = true; int64_t pingUsecTime = pingUsecEnd - pfrom->nPingUsecStart; if (pingUsecTime > 0) { // Successful ping time measurement, replace previous pfrom->nPingUsecTime = pingUsecTime; pfrom->nMinPingUsecTime = std::min(pfrom->nMinPingUsecTime, pingUsecTime); } else { // This should never happen sProblem = "Timing mishap"; } } else { // Nonce mismatches are normal when pings are overlapping sProblem = "Nonce mismatch"; if (nonce == 0) { // This is most likely a bug in another implementation somewhere; cancel this ping bPingFinished = true; sProblem = "Nonce zero"; } } } else { sProblem = "Unsolicited pong without ping"; } } else { // This is most likely a bug in another implementation somewhere; cancel this ping bPingFinished = true; sProblem = "Short payload"; } if (!(sProblem.empty())) { LogPrint("net", "pong peer=%d: %s, %x expected, %x received, %u bytes\n", pfrom->id, sProblem, pfrom->nPingNonceSent, nonce, nAvail); } if (bPingFinished) { pfrom->nPingNonceSent = 0; } } else if (fAlerts && strCommand == NetMsgType::ALERT) { CAlert alert; vRecv >> alert; uint256 alertHash = alert.GetHash(); if (pfrom->setKnown.count(alertHash) == 0) { if (alert.ProcessAlert(chainparams.AlertKey())) { // Relay pfrom->setKnown.insert(alertHash); { LOCK(cs_vNodes); BOOST_FOREACH(CNode* pnode, vNodes) alert.RelayTo(pnode); } } else { // Small DoS penalty so peers that send us lots of // duplicate/expired/invalid-signature/whatever alerts // eventually get banned. // This isn't a Misbehaving(100) (immediate ban) because the // peer might be an older or different implementation with // a different signature key, etc. Misbehaving(pfrom->GetId(), 10); } } } else if (strCommand == NetMsgType::FILTERLOAD) { CBloomFilter filter; vRecv >> filter; if (!filter.IsWithinSizeConstraints()) // There is no excuse for sending a too-large filter Misbehaving(pfrom->GetId(), 100); else { LOCK(pfrom->cs_filter); delete pfrom->pfilter; pfrom->pfilter = new CBloomFilter(filter); pfrom->pfilter->UpdateEmptyFull(); } pfrom->fRelayTxes = true; } else if (strCommand == NetMsgType::FILTERADD) { vector<unsigned char> vData; vRecv >> vData; // Nodes must NEVER send a data item > 520 bytes (the max size for a script data object, // and thus, the maximum size any matched object can have) in a filteradd message if (vData.size() > MAX_SCRIPT_ELEMENT_SIZE) { Misbehaving(pfrom->GetId(), 100); } else { LOCK(pfrom->cs_filter); if (pfrom->pfilter) pfrom->pfilter->insert(vData); else Misbehaving(pfrom->GetId(), 100); } } else if (strCommand == NetMsgType::FILTERCLEAR) { LOCK(pfrom->cs_filter); delete pfrom->pfilter; pfrom->pfilter = new CBloomFilter(); pfrom->fRelayTxes = true; } else if (strCommand == NetMsgType::REJECT) { if (fDebug) { try { string strMsg; unsigned char ccode; string strReason; vRecv >> LIMITED_STRING(strMsg, CMessageHeader::COMMAND_SIZE) >> ccode >> LIMITED_STRING(strReason, MAX_REJECT_MESSAGE_LENGTH); ostringstream ss; ss << strMsg << " code " << itostr(ccode) << ": " << strReason; if (strMsg == NetMsgType::BLOCK || strMsg == NetMsgType::TX) { uint256 hash; vRecv >> hash; ss << ": hash " << hash.ToString(); } LogPrint("net", "Reject %s\n", SanitizeString(ss.str())); } catch (const std::ios_base::failure&) { // Avoid feedback loops by preventing reject messages from triggering a new reject message. LogPrint("net", "Unparseable reject message received\n"); } } } else { bool found = false; const std::vector<std::string> &allMessages = getAllNetMessageTypes(); BOOST_FOREACH(const std::string msg, allMessages) { if(msg == strCommand) { found = true; break; } } if (found) { //probably one the extensions darkSendPool.ProcessMessage(pfrom, strCommand, vRecv); mnodeman.ProcessMessage(pfrom, strCommand, vRecv); mnpayments.ProcessMessage(pfrom, strCommand, vRecv); instantsend.ProcessMessage(pfrom, strCommand, vRecv); sporkManager.ProcessSpork(pfrom, strCommand, vRecv); masternodeSync.ProcessMessage(pfrom, strCommand, vRecv); governance.ProcessMessage(pfrom, strCommand, vRecv); } else { // Ignore unknown commands for extensibility LogPrint("net", "Unknown command \"%s\" from peer=%d\n", SanitizeString(strCommand), pfrom->id); } } return true; } // requires LOCK(cs_vRecvMsg) bool ProcessMessages(CNode* pfrom) { const CChainParams& chainparams = Params(); //if (fDebug) // LogPrintf("%s(%u messages)\n", __func__, pfrom->vRecvMsg.size()); // // Message format // (4) message start // (12) command // (4) size // (4) checksum // (x) data // bool fOk = true; if (!pfrom->vRecvGetData.empty()) ProcessGetData(pfrom, chainparams.GetConsensus()); // this maintains the order of responses if (!pfrom->vRecvGetData.empty()) return fOk; std::deque<CNetMessage>::iterator it = pfrom->vRecvMsg.begin(); while (!pfrom->fDisconnect && it != pfrom->vRecvMsg.end()) { // Don't bother if send buffer is too full to respond anyway if (pfrom->nSendSize >= SendBufferSize()) break; // get next message CNetMessage& msg = *it; //if (fDebug) // LogPrintf("%s(message %u msgsz, %u bytes, complete:%s)\n", __func__, // msg.hdr.nMessageSize, msg.vRecv.size(), // msg.complete() ? "Y" : "N"); // end, if an incomplete message is found if (!msg.complete()) break; // at this point, any failure means we can delete the current message it++; // Scan for message start if (memcmp(msg.hdr.pchMessageStart, chainparams.MessageStart(), MESSAGE_START_SIZE) != 0) { LogPrintf("PROCESSMESSAGE: INVALID MESSAGESTART %s peer=%d\n", SanitizeString(msg.hdr.GetCommand()), pfrom->id); fOk = false; break; } // Read header CMessageHeader& hdr = msg.hdr; if (!hdr.IsValid(chainparams.MessageStart())) { LogPrintf("PROCESSMESSAGE: ERRORS IN HEADER %s peer=%d\n", SanitizeString(hdr.GetCommand()), pfrom->id); continue; } string strCommand = hdr.GetCommand(); // Message size unsigned int nMessageSize = hdr.nMessageSize; // Checksum CDataStream& vRecv = msg.vRecv; uint256 hash = Hash(vRecv.begin(), vRecv.begin() + nMessageSize); unsigned int nChecksum = ReadLE32((unsigned char*)&hash); if (nChecksum != hdr.nChecksum) { LogPrintf("%s(%s, %u bytes): CHECKSUM ERROR nChecksum=%08x hdr.nChecksum=%08x\n", __func__, SanitizeString(strCommand), nMessageSize, nChecksum, hdr.nChecksum); continue; } // Process message bool fRet = false; try { fRet = ProcessMessage(pfrom, strCommand, vRecv, msg.nTime); boost::this_thread::interruption_point(); } catch (const std::ios_base::failure& e) { pfrom->PushMessage(NetMsgType::REJECT, strCommand, REJECT_MALFORMED, string("error parsing message")); if (strstr(e.what(), "end of data")) { // Allow exceptions from under-length message on vRecv LogPrintf("%s(%s, %u bytes): Exception '%s' caught, normally caused by a message being shorter than its stated length\n", __func__, SanitizeString(strCommand), nMessageSize, e.what()); } else if (strstr(e.what(), "size too large")) { // Allow exceptions from over-long size LogPrintf("%s(%s, %u bytes): Exception '%s' caught\n", __func__, SanitizeString(strCommand), nMessageSize, e.what()); } else { PrintExceptionContinue(&e, "ProcessMessages()"); } } catch (const boost::thread_interrupted&) { throw; } catch (const std::exception& e) { PrintExceptionContinue(&e, "ProcessMessages()"); } catch (...) { PrintExceptionContinue(NULL, "ProcessMessages()"); } if (!fRet) LogPrintf("%s(%s, %u bytes) FAILED peer=%d\n", __func__, SanitizeString(strCommand), nMessageSize, pfrom->id); break; } // In case the connection got shut down, its receive buffer was wiped if (!pfrom->fDisconnect) pfrom->vRecvMsg.erase(pfrom->vRecvMsg.begin(), it); return fOk; } bool SendMessages(CNode* pto) { const Consensus::Params& consensusParams = Params().GetConsensus(); { // Don't send anything until we get its version message if (pto->nVersion == 0) return true; // // Message: ping // bool pingSend = false; if (pto->fPingQueued) { // RPC ping request by user pingSend = true; } if (pto->nPingNonceSent == 0 && pto->nPingUsecStart + PING_INTERVAL * 1000000 < GetTimeMicros()) { // Ping automatically sent as a latency probe & keepalive. pingSend = true; } if (pingSend) { uint64_t nonce = 0; while (nonce == 0) { GetRandBytes((unsigned char*)&nonce, sizeof(nonce)); } pto->fPingQueued = false; pto->nPingUsecStart = GetTimeMicros(); if (pto->nVersion > BIP0031_VERSION) { pto->nPingNonceSent = nonce; pto->PushMessage(NetMsgType::PING, nonce); } else { // Peer is too old to support ping command with nonce, pong will never arrive. pto->nPingNonceSent = 0; pto->PushMessage(NetMsgType::PING); } } TRY_LOCK(cs_main, lockMain); // Acquire cs_main for IsInitialBlockDownload() and CNodeState() if (!lockMain) return true; // Address refresh broadcast int64_t nNow = GetTimeMicros(); if (!IsInitialBlockDownload() && pto->nNextLocalAddrSend < nNow) { AdvertiseLocal(pto); pto->nNextLocalAddrSend = PoissonNextSend(nNow, AVG_LOCAL_ADDRESS_BROADCAST_INTERVAL); } // // Message: addr // if (pto->nNextAddrSend < nNow) { pto->nNextAddrSend = PoissonNextSend(nNow, AVG_ADDRESS_BROADCAST_INTERVAL); vector<CAddress> vAddr; vAddr.reserve(pto->vAddrToSend.size()); BOOST_FOREACH(const CAddress& addr, pto->vAddrToSend) { if (!pto->addrKnown.contains(addr.GetKey())) { pto->addrKnown.insert(addr.GetKey()); vAddr.push_back(addr); // receiver rejects addr messages larger than 1000 if (vAddr.size() >= 1000) { pto->PushMessage(NetMsgType::ADDR, vAddr); vAddr.clear(); } } } pto->vAddrToSend.clear(); if (!vAddr.empty()) pto->PushMessage(NetMsgType::ADDR, vAddr); } CNodeState &state = *State(pto->GetId()); if (state.fShouldBan) { if (pto->fWhitelisted) LogPrintf("Warning: not punishing whitelisted peer %s!\n", pto->addr.ToString()); else { pto->fDisconnect = true; if (pto->addr.IsLocal()) LogPrintf("Warning: not banning local peer %s!\n", pto->addr.ToString()); else { CNode::Ban(pto->addr, BanReasonNodeMisbehaving); } } state.fShouldBan = false; } BOOST_FOREACH(const CBlockReject& reject, state.rejects) pto->PushMessage(NetMsgType::REJECT, (string)NetMsgType::BLOCK, reject.chRejectCode, reject.strRejectReason, reject.hashBlock); state.rejects.clear(); // Start block sync if (pindexBestHeader == NULL) pindexBestHeader = chainActive.Tip(); bool fFetch = state.fPreferredDownload || (nPreferredDownload == 0 && !pto->fClient && !pto->fOneShot); // Download if this is a nice peer, or we have no nice peers and this one might do. if (!state.fSyncStarted && !pto->fClient && !fImporting && !fReindex) { // Only actively request headers from a single peer, unless we're close to end of initial download. if ((nSyncStarted == 0 && fFetch) || pindexBestHeader->GetBlockTime() > GetAdjustedTime() - 6 * 60 * 60) { // NOTE: was "close to today" and 24h in Bitcoin state.fSyncStarted = true; nSyncStarted++; const CBlockIndex *pindexStart = pindexBestHeader; /* If possible, start at the block preceding the currently best known header. This ensures that we always get a non-empty list of headers back as long as the peer is up-to-date. With a non-empty response, we can initialise the peer's known best block. This wouldn't be possible if we requested starting at pindexBestHeader and got back an empty response. */ if (pindexStart->pprev) pindexStart = pindexStart->pprev; LogPrint("net", "initial getheaders (%d) to peer=%d (startheight:%d)\n", pindexStart->nHeight, pto->id, pto->nStartingHeight); pto->PushMessage(NetMsgType::GETHEADERS, chainActive.GetLocator(pindexStart), uint256()); } } // Resend wallet transactions that haven't gotten in a block yet // Except during reindex, importing and IBD, when old wallet // transactions become unconfirmed and spams other nodes. if (!fReindex && !fImporting && !IsInitialBlockDownload()) { GetMainSignals().Broadcast(nTimeBestReceived); } // // Try sending block announcements via headers // { // If we have less than MAX_BLOCKS_TO_ANNOUNCE in our // list of block hashes we're relaying, and our peer wants // headers announcements, then find the first header // not yet known to our peer but would connect, and send. // If no header would connect, or if we have too many // blocks, or if the peer doesn't want headers, just // add all to the inv queue. LOCK(pto->cs_inventory); vector<CBlock> vHeaders; bool fRevertToInv = (!state.fPreferHeaders || pto->vBlockHashesToAnnounce.size() > MAX_BLOCKS_TO_ANNOUNCE); CBlockIndex *pBestIndex = NULL; // last header queued for delivery ProcessBlockAvailability(pto->id); // ensure pindexBestKnownBlock is up-to-date if (!fRevertToInv) { bool fFoundStartingHeader = false; // Try to find first header that our peer doesn't have, and // then send all headers past that one. If we come across any // headers that aren't on chainActive, give up. BOOST_FOREACH(const uint256 &hash, pto->vBlockHashesToAnnounce) { BlockMap::iterator mi = mapBlockIndex.find(hash); assert(mi != mapBlockIndex.end()); CBlockIndex *pindex = mi->second; if (chainActive[pindex->nHeight] != pindex) { // Bail out if we reorged away from this block fRevertToInv = true; break; } if (pBestIndex != NULL && pindex->pprev != pBestIndex) { // This means that the list of blocks to announce don't // connect to each other. // This shouldn't really be possible to hit during // regular operation (because reorgs should take us to // a chain that has some block not on the prior chain, // which should be caught by the prior check), but one // way this could happen is by using invalidateblock / // reconsiderblock repeatedly on the tip, causing it to // be added multiple times to vBlockHashesToAnnounce. // Robustly deal with this rare situation by reverting // to an inv. fRevertToInv = true; break; } pBestIndex = pindex; if (fFoundStartingHeader) { // add this to the headers message vHeaders.push_back(pindex->GetBlockHeader()); } else if (PeerHasHeader(&state, pindex)) { continue; // keep looking for the first new block } else if (pindex->pprev == NULL || PeerHasHeader(&state, pindex->pprev)) { // Peer doesn't have this header but they do have the prior one. // Start sending headers. fFoundStartingHeader = true; vHeaders.push_back(pindex->GetBlockHeader()); } else { // Peer doesn't have this header or the prior one -- nothing will // connect, so bail out. fRevertToInv = true; break; } } } if (fRevertToInv) { // If falling back to using an inv, just try to inv the tip. // The last entry in vBlockHashesToAnnounce was our tip at some point // in the past. if (!pto->vBlockHashesToAnnounce.empty()) { const uint256 &hashToAnnounce = pto->vBlockHashesToAnnounce.back(); BlockMap::iterator mi = mapBlockIndex.find(hashToAnnounce); assert(mi != mapBlockIndex.end()); CBlockIndex *pindex = mi->second; // Warn if we're announcing a block that is not on the main chain. // This should be very rare and could be optimized out. // Just log for now. if (chainActive[pindex->nHeight] != pindex) { LogPrint("net", "Announcing block %s not on main chain (tip=%s)\n", hashToAnnounce.ToString(), chainActive.Tip()->GetBlockHash().ToString()); } // If the peer announced this block to us, don't inv it back. // (Since block announcements may not be via inv's, we can't solely rely on // setInventoryKnown to track this.) if (!PeerHasHeader(&state, pindex)) { pto->PushInventory(CInv(MSG_BLOCK, hashToAnnounce)); LogPrint("net", "%s: sending inv peer=%d hash=%s\n", __func__, pto->id, hashToAnnounce.ToString()); } } } else if (!vHeaders.empty()) { if (vHeaders.size() > 1) { LogPrint("net", "%s: %u headers, range (%s, %s), to peer=%d\n", __func__, vHeaders.size(), vHeaders.front().GetHash().ToString(), vHeaders.back().GetHash().ToString(), pto->id); } else { LogPrint("net", "%s: sending header %s to peer=%d\n", __func__, vHeaders.front().GetHash().ToString(), pto->id); } pto->PushMessage(NetMsgType::HEADERS, vHeaders); state.pindexBestHeaderSent = pBestIndex; } pto->vBlockHashesToAnnounce.clear(); } // // Message: inventory // vector<CInv> vInv; vector<CInv> vInvWait; { bool fSendTrickle = pto->fWhitelisted; if (pto->nNextInvSend < nNow) { fSendTrickle = true; pto->nNextInvSend = PoissonNextSend(nNow, AVG_INVENTORY_BROADCAST_INTERVAL); } LOCK(pto->cs_inventory); vInv.reserve(std::min<size_t>(1000, pto->vInventoryToSend.size())); vInvWait.reserve(pto->vInventoryToSend.size()); BOOST_FOREACH(const CInv& inv, pto->vInventoryToSend) { if (inv.type == MSG_TX && pto->filterInventoryKnown.contains(inv.hash)) continue; // trickle out tx inv to protect privacy if (inv.type == MSG_TX && !fSendTrickle) { // 1/4 of tx invs blast to all immediately static uint256 hashSalt; if (hashSalt.IsNull()) hashSalt = GetRandHash(); uint256 hashRand = ArithToUint256(UintToArith256(inv.hash) ^ UintToArith256(hashSalt)); hashRand = Hash(BEGIN(hashRand), END(hashRand)); bool fTrickleWait = ((UintToArith256(hashRand) & 3) != 0); if (fTrickleWait) { LogPrint("net", "SendMessages -- queued inv(vInvWait): %s index=%d peer=%d\n", inv.ToString(), vInvWait.size(), pto->id); vInvWait.push_back(inv); continue; } } pto->filterInventoryKnown.insert(inv.hash); LogPrint("net", "SendMessages -- queued inv: %s index=%d peer=%d\n", inv.ToString(), vInv.size(), pto->id); vInv.push_back(inv); if (vInv.size() >= 1000) { LogPrint("net", "SendMessages -- pushing inv's: count=%d peer=%d\n", vInv.size(), pto->id); pto->PushMessage(NetMsgType::INV, vInv); vInv.clear(); } } pto->vInventoryToSend = vInvWait; } if (!vInv.empty()) { LogPrint("net", "SendMessages -- pushing tailing inv's: count=%d peer=%d\n", vInv.size(), pto->id); pto->PushMessage(NetMsgType::INV, vInv); } // Detect whether we're stalling nNow = GetTimeMicros(); if (!pto->fDisconnect && state.nStallingSince && state.nStallingSince < nNow - 1000000 * BLOCK_STALLING_TIMEOUT) { // Stalling only triggers when the block download window cannot move. During normal steady state, // the download window should be much larger than the to-be-downloaded set of blocks, so disconnection // should only happen during initial block download. LogPrintf("Peer=%d is stalling block download, disconnecting\n", pto->id); pto->fDisconnect = true; } // In case there is a block that has been in flight from this peer for 2 + 0.5 * N times the block interval // (with N the number of peers from which we're downloading validated blocks), disconnect due to timeout. // We compensate for other peers to prevent killing off peers due to our own downstream link // being saturated. We only count validated in-flight blocks so peers can't advertise non-existing block hashes // to unreasonably increase our timeout. if (!pto->fDisconnect && state.vBlocksInFlight.size() > 0) { QueuedBlock &queuedBlock = state.vBlocksInFlight.front(); int nOtherPeersWithValidatedDownloads = nPeersWithValidatedDownloads - (state.nBlocksInFlightValidHeaders > 0); if (nNow > state.nDownloadingSince + consensusParams.nPowTargetSpacing * (BLOCK_DOWNLOAD_TIMEOUT_BASE + BLOCK_DOWNLOAD_TIMEOUT_PER_PEER * nOtherPeersWithValidatedDownloads)) { LogPrintf("Timeout downloading block %s from peer=%d, disconnecting\n", queuedBlock.hash.ToString(), pto->id); pto->fDisconnect = true; } } // // Message: getdata (blocks) // vector<CInv> vGetData; if (!pto->fDisconnect && !pto->fClient && (fFetch || !IsInitialBlockDownload()) && state.nBlocksInFlight < MAX_BLOCKS_IN_TRANSIT_PER_PEER) { vector<CBlockIndex*> vToDownload; NodeId staller = -1; FindNextBlocksToDownload(pto->GetId(), MAX_BLOCKS_IN_TRANSIT_PER_PEER - state.nBlocksInFlight, vToDownload, staller); BOOST_FOREACH(CBlockIndex *pindex, vToDownload) { vGetData.push_back(CInv(MSG_BLOCK, pindex->GetBlockHash())); MarkBlockAsInFlight(pto->GetId(), pindex->GetBlockHash(), consensusParams, pindex); LogPrint("net", "Requesting block %s (%d) peer=%d\n", pindex->GetBlockHash().ToString(), pindex->nHeight, pto->id); } if (state.nBlocksInFlight == 0 && staller != -1) { if (State(staller)->nStallingSince == 0) { State(staller)->nStallingSince = nNow; LogPrint("net", "Stall started peer=%d\n", staller); } } } // // Message: getdata (non-blocks) // int64_t nFirst = -1; if(!pto->mapAskFor.empty()) { nFirst = (*pto->mapAskFor.begin()).first; } LogPrint("net", "SendMessages (mapAskFor) -- before loop: nNow = %d, nFirst = %d\n", nNow, nFirst); while (!pto->fDisconnect && !pto->mapAskFor.empty() && (*pto->mapAskFor.begin()).first <= nNow) { const CInv& inv = (*pto->mapAskFor.begin()).second; LogPrint("net", "SendMessages (mapAskFor) -- inv = %s peer=%d\n", inv.ToString(), pto->id); if (!AlreadyHave(inv)) { if (fDebug) LogPrint("net", "Requesting %s peer=%d\n", inv.ToString(), pto->id); vGetData.push_back(inv); if (vGetData.size() >= 1000) { pto->PushMessage(NetMsgType::GETDATA, vGetData); vGetData.clear(); } } else { //If we're not going to ask, don't expect a response. LogPrint("net", "SendMessages -- already have inv = %s peer=%d\n", inv.ToString(), pto->id); pto->setAskFor.erase(inv.hash); } pto->mapAskFor.erase(pto->mapAskFor.begin()); } if (!vGetData.empty()) pto->PushMessage(NetMsgType::GETDATA, vGetData); } return true; } std::string CBlockFileInfo::ToString() const { return strprintf("CBlockFileInfo(blocks=%u, size=%u, heights=%u...%u, time=%s...%s)", nBlocks, nSize, nHeightFirst, nHeightLast, DateTimeStrFormat("%Y-%m-%d", nTimeFirst), DateTimeStrFormat("%Y-%m-%d", nTimeLast)); } ThresholdState VersionBitsTipState(const Consensus::Params& params, Consensus::DeploymentPos pos) { LOCK(cs_main); return VersionBitsState(chainActive.Tip(), params, pos, versionbitscache); } class CMainCleanup { public: CMainCleanup() {} ~CMainCleanup() { // block headers BlockMap::iterator it1 = mapBlockIndex.begin(); for (; it1 != mapBlockIndex.end(); it1++) delete (*it1).second; mapBlockIndex.clear(); // orphan transactions mapOrphanTransactions.clear(); mapOrphanTransactionsByPrev.clear(); } } instance_of_cmaincleanup;
[ "lumocash2018main@gmail.com" ]
lumocash2018main@gmail.com
17a7ceca25245b292f016194030cd63e991bb3d7
bb6ebff7a7f6140903d37905c350954ff6599091
/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteDatabase.cpp
4f1caacdc97b88c04e02ebe660e6e832e34571de
[ "LGPL-2.0-or-later", "GPL-1.0-or-later", "MIT", "Apache-2.0", "BSD-3-Clause" ]
permissive
PDi-Communication-Systems-Inc/lollipop_external_chromium_org
faa6602bd6bfd9b9b6277ce3cd16df0bd26e7f2f
ccadf4e63dd34be157281f53fe213d09a8c66d2c
refs/heads/master
2022-12-23T18:07:04.568931
2016-04-11T16:03:36
2016-04-11T16:03:36
53,677,925
0
1
BSD-3-Clause
2022-12-09T23:46:46
2016-03-11T15:49:07
C++
UTF-8
C++
false
false
13,216
cpp
/* * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``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 APPLE COMPUTER, INC. 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 "config.h" #include "modules/webdatabase/sqlite/SQLiteDatabase.h" #include <sqlite3.h> #include "platform/Logging.h" #include "modules/webdatabase/sqlite/SQLiteFileSystem.h" #include "modules/webdatabase/sqlite/SQLiteStatement.h" #include "modules/webdatabase/DatabaseAuthorizer.h" namespace WebCore { const int SQLResultDone = SQLITE_DONE; const int SQLResultOk = SQLITE_OK; const int SQLResultRow = SQLITE_ROW; const int SQLResultFull = SQLITE_FULL; const int SQLResultInterrupt = SQLITE_INTERRUPT; const int SQLResultConstraint = SQLITE_CONSTRAINT; static const char notOpenErrorMessage[] = "database is not open"; SQLiteDatabase::SQLiteDatabase() : m_db(0) , m_pageSize(-1) , m_transactionInProgress(false) , m_sharable(false) , m_openingThread(0) , m_interrupted(false) , m_openError(SQLITE_ERROR) , m_openErrorMessage() , m_lastChangesCount(0) { } SQLiteDatabase::~SQLiteDatabase() { close(); } bool SQLiteDatabase::open(const String& filename, bool forWebSQLDatabase) { close(); m_openError = SQLiteFileSystem::openDatabase(filename, &m_db, forWebSQLDatabase); if (m_openError != SQLITE_OK) { m_openErrorMessage = m_db ? sqlite3_errmsg(m_db) : "sqlite_open returned null"; WTF_LOG_ERROR("SQLite database failed to load from %s\nCause - %s", filename.ascii().data(), m_openErrorMessage.data()); sqlite3_close(m_db); m_db = 0; return false; } m_openError = sqlite3_extended_result_codes(m_db, 1); if (m_openError != SQLITE_OK) { m_openErrorMessage = sqlite3_errmsg(m_db); WTF_LOG_ERROR("SQLite database error when enabling extended errors - %s", m_openErrorMessage.data()); sqlite3_close(m_db); m_db = 0; return false; } if (isOpen()) m_openingThread = currentThread(); else m_openErrorMessage = "sqlite_open returned null"; if (!SQLiteStatement(*this, "PRAGMA temp_store = MEMORY;").executeCommand()) WTF_LOG_ERROR("SQLite database could not set temp_store to memory"); return isOpen(); } void SQLiteDatabase::close() { if (m_db) { // FIXME: This is being called on the main thread during JS GC. <rdar://problem/5739818> // ASSERT(currentThread() == m_openingThread); sqlite3* db = m_db; { MutexLocker locker(m_databaseClosingMutex); m_db = 0; } sqlite3_close(db); } m_openingThread = 0; m_openError = SQLITE_ERROR; m_openErrorMessage = CString(); } void SQLiteDatabase::interrupt() { m_interrupted = true; while (!m_lockingMutex.tryLock()) { MutexLocker locker(m_databaseClosingMutex); if (!m_db) return; sqlite3_interrupt(m_db); yield(); } m_lockingMutex.unlock(); } bool SQLiteDatabase::isInterrupted() { ASSERT(!m_lockingMutex.tryLock()); return m_interrupted; } void SQLiteDatabase::setMaximumSize(int64_t size) { if (size < 0) size = 0; int currentPageSize = pageSize(); ASSERT(currentPageSize || !m_db); int64_t newMaxPageCount = currentPageSize ? size / currentPageSize : 0; MutexLocker locker(m_authorizerLock); enableAuthorizer(false); SQLiteStatement statement(*this, "PRAGMA max_page_count = " + String::number(newMaxPageCount)); statement.prepare(); if (statement.step() != SQLResultRow) #if OS(WIN) WTF_LOG_ERROR("Failed to set maximum size of database to %I64i bytes", static_cast<long long>(size)); #else WTF_LOG_ERROR("Failed to set maximum size of database to %lli bytes", static_cast<long long>(size)); #endif enableAuthorizer(true); } int SQLiteDatabase::pageSize() { // Since the page size of a database is locked in at creation and therefore cannot be dynamic, // we can cache the value for future use if (m_pageSize == -1) { MutexLocker locker(m_authorizerLock); enableAuthorizer(false); SQLiteStatement statement(*this, "PRAGMA page_size"); m_pageSize = statement.getColumnInt(0); enableAuthorizer(true); } return m_pageSize; } int64_t SQLiteDatabase::freeSpaceSize() { int64_t freelistCount = 0; { MutexLocker locker(m_authorizerLock); enableAuthorizer(false); // Note: freelist_count was added in SQLite 3.4.1. SQLiteStatement statement(*this, "PRAGMA freelist_count"); freelistCount = statement.getColumnInt64(0); enableAuthorizer(true); } return freelistCount * pageSize(); } int64_t SQLiteDatabase::totalSize() { int64_t pageCount = 0; { MutexLocker locker(m_authorizerLock); enableAuthorizer(false); SQLiteStatement statement(*this, "PRAGMA page_count"); pageCount = statement.getColumnInt64(0); enableAuthorizer(true); } return pageCount * pageSize(); } void SQLiteDatabase::setBusyTimeout(int ms) { if (m_db) sqlite3_busy_timeout(m_db, ms); else WTF_LOG(SQLDatabase, "BusyTimeout set on non-open database"); } bool SQLiteDatabase::executeCommand(const String& sql) { return SQLiteStatement(*this, sql).executeCommand(); } bool SQLiteDatabase::tableExists(const String& tablename) { if (!isOpen()) return false; String statement = "SELECT name FROM sqlite_master WHERE type = 'table' AND name = '" + tablename + "';"; SQLiteStatement sql(*this, statement); sql.prepare(); return sql.step() == SQLITE_ROW; } int SQLiteDatabase::runVacuumCommand() { if (!executeCommand("VACUUM;")) WTF_LOG(SQLDatabase, "Unable to vacuum database - %s", lastErrorMsg()); return lastError(); } int SQLiteDatabase::runIncrementalVacuumCommand() { MutexLocker locker(m_authorizerLock); enableAuthorizer(false); if (!executeCommand("PRAGMA incremental_vacuum")) WTF_LOG(SQLDatabase, "Unable to run incremental vacuum - %s", lastErrorMsg()); enableAuthorizer(true); return lastError(); } int64_t SQLiteDatabase::lastInsertRowID() { if (!m_db) return 0; return sqlite3_last_insert_rowid(m_db); } void SQLiteDatabase::updateLastChangesCount() { if (!m_db) return; m_lastChangesCount = sqlite3_total_changes(m_db); } int SQLiteDatabase::lastChanges() { if (!m_db) return 0; return sqlite3_total_changes(m_db) - m_lastChangesCount; } int SQLiteDatabase::lastError() { return m_db ? sqlite3_errcode(m_db) : m_openError; } const char* SQLiteDatabase::lastErrorMsg() { if (m_db) return sqlite3_errmsg(m_db); return m_openErrorMessage.isNull() ? notOpenErrorMessage : m_openErrorMessage.data(); } int SQLiteDatabase::authorizerFunction(void* userData, int actionCode, const char* parameter1, const char* parameter2, const char* /*databaseName*/, const char* /*trigger_or_view*/) { DatabaseAuthorizer* auth = static_cast<DatabaseAuthorizer*>(userData); ASSERT(auth); switch (actionCode) { case SQLITE_CREATE_INDEX: return auth->createIndex(parameter1, parameter2); case SQLITE_CREATE_TABLE: return auth->createTable(parameter1); case SQLITE_CREATE_TEMP_INDEX: return auth->createTempIndex(parameter1, parameter2); case SQLITE_CREATE_TEMP_TABLE: return auth->createTempTable(parameter1); case SQLITE_CREATE_TEMP_TRIGGER: return auth->createTempTrigger(parameter1, parameter2); case SQLITE_CREATE_TEMP_VIEW: return auth->createTempView(parameter1); case SQLITE_CREATE_TRIGGER: return auth->createTrigger(parameter1, parameter2); case SQLITE_CREATE_VIEW: return auth->createView(parameter1); case SQLITE_DELETE: return auth->allowDelete(parameter1); case SQLITE_DROP_INDEX: return auth->dropIndex(parameter1, parameter2); case SQLITE_DROP_TABLE: return auth->dropTable(parameter1); case SQLITE_DROP_TEMP_INDEX: return auth->dropTempIndex(parameter1, parameter2); case SQLITE_DROP_TEMP_TABLE: return auth->dropTempTable(parameter1); case SQLITE_DROP_TEMP_TRIGGER: return auth->dropTempTrigger(parameter1, parameter2); case SQLITE_DROP_TEMP_VIEW: return auth->dropTempView(parameter1); case SQLITE_DROP_TRIGGER: return auth->dropTrigger(parameter1, parameter2); case SQLITE_DROP_VIEW: return auth->dropView(parameter1); case SQLITE_INSERT: return auth->allowInsert(parameter1); case SQLITE_PRAGMA: return auth->allowPragma(parameter1, parameter2); case SQLITE_READ: return auth->allowRead(parameter1, parameter2); case SQLITE_SELECT: return auth->allowSelect(); case SQLITE_TRANSACTION: return auth->allowTransaction(); case SQLITE_UPDATE: return auth->allowUpdate(parameter1, parameter2); case SQLITE_ATTACH: return auth->allowAttach(parameter1); case SQLITE_DETACH: return auth->allowDetach(parameter1); case SQLITE_ALTER_TABLE: return auth->allowAlterTable(parameter1, parameter2); case SQLITE_REINDEX: return auth->allowReindex(parameter1); #if SQLITE_VERSION_NUMBER >= 3003013 case SQLITE_ANALYZE: return auth->allowAnalyze(parameter1); case SQLITE_CREATE_VTABLE: return auth->createVTable(parameter1, parameter2); case SQLITE_DROP_VTABLE: return auth->dropVTable(parameter1, parameter2); case SQLITE_FUNCTION: return auth->allowFunction(parameter2); #endif default: ASSERT_NOT_REACHED(); return SQLAuthDeny; } } void SQLiteDatabase::setAuthorizer(DatabaseAuthorizer* auth) { if (!m_db) { WTF_LOG_ERROR("Attempt to set an authorizer on a non-open SQL database"); ASSERT_NOT_REACHED(); return; } MutexLocker locker(m_authorizerLock); m_authorizer = auth; enableAuthorizer(true); } void SQLiteDatabase::enableAuthorizer(bool enable) { if (m_authorizer && enable) sqlite3_set_authorizer(m_db, SQLiteDatabase::authorizerFunction, m_authorizer.get()); else sqlite3_set_authorizer(m_db, NULL, 0); } bool SQLiteDatabase::isAutoCommitOn() const { return sqlite3_get_autocommit(m_db); } bool SQLiteDatabase::turnOnIncrementalAutoVacuum() { SQLiteStatement statement(*this, "PRAGMA auto_vacuum"); int autoVacuumMode = statement.getColumnInt(0); int error = lastError(); // Check if we got an error while trying to get the value of the auto_vacuum flag. // If we got a SQLITE_BUSY error, then there's probably another transaction in // progress on this database. In this case, keep the current value of the // auto_vacuum flag and try to set it to INCREMENTAL the next time we open this // database. If the error is not SQLITE_BUSY, then we probably ran into a more // serious problem and should return false (to log an error message). if (error != SQLITE_ROW) return false; switch (autoVacuumMode) { case AutoVacuumIncremental: return true; case AutoVacuumFull: return executeCommand("PRAGMA auto_vacuum = 2"); case AutoVacuumNone: default: if (!executeCommand("PRAGMA auto_vacuum = 2")) return false; runVacuumCommand(); error = lastError(); return (error == SQLITE_OK); } } void SQLiteDatabase::trace(Visitor* visitor) { visitor->trace(m_authorizer); } } // namespace WebCore
[ "mrobbeloth@pdiarm.com" ]
mrobbeloth@pdiarm.com
acd678e09df7a4c6fe5f9d55175b699e042280f6
82770c7bc5e2f27a48b8c370b0bab2ee41f24d86
/graph-tool/src/graph/clustering/graph_motifs.hh
33b9ae6445fc1f843db77ac0a08ce1e30c98c1a5
[ "Apache-2.0", "GPL-3.0-or-later", "GPL-3.0-only", "LicenseRef-scancode-philippe-de-muyter" ]
permissive
johankaito/fufuka
77ddb841f27f6ce8036d7b38cb51dc62e85b2679
32a96ecf98ce305c2206c38443e58fdec88c788d
refs/heads/master
2022-07-20T00:51:55.922063
2015-08-21T20:56:48
2015-08-21T20:56:48
39,845,849
2
0
Apache-2.0
2022-06-29T23:30:11
2015-07-28T16:39:54
Python
UTF-8
C++
false
false
14,660
hh
// graph-tool -- a general graph modification and manipulation thingy // // Copyright (C) 2006-2015 Tiago de Paula Peixoto <tiago@skewed.de> // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 3 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. #ifndef GRAPH_MOTIFS_HH #define GRAPH_MOTIFS_HH #include <boost/graph/isomorphism.hpp> #include <unordered_set> #include <boost/functional/hash.hpp> #include <algorithm> #include <vector> #include "random.hh" namespace graph_tool { using namespace boost; template <class Value> void insert_sorted(std::vector<Value>& v, const Value& val) { typeof(v.begin()) iter = lower_bound(v.begin(), v.end(), val); if (iter != v.end() && *iter == val) return; // no repetitions v.insert(iter, val); } template <class Value> bool has_val(std::vector<Value>& v, const Value& val) { typeof(v.begin()) iter = lower_bound(v.begin(), v.end(), val); if (iter == v.end()) return false; return *iter == val; } // gets all the subgraphs starting from vertex v and store it in subgraphs. template <class Graph, class Sampler> void get_subgraphs(Graph& g, typename graph_traits<Graph>::vertex_descriptor v, size_t n, std::vector<std::vector<typename graph_traits<Graph>::vertex_descriptor> >& subgraphs, Sampler sampler) { typedef typename graph_traits<Graph>::vertex_descriptor vertex_t; // extension and subgraph stack std::vector<std::vector<vertex_t> > ext_stack(1); std::vector<std::vector<vertex_t> > sub_stack(1); std::vector<std::vector<vertex_t> > sub_neighbours_stack(1); sub_stack[0].push_back(v); typename graph_traits<Graph>::out_edge_iterator e, e_end; for (tie(e, e_end) = out_edges(v, g); e != e_end; ++e) { typename graph_traits<Graph>::vertex_descriptor u = target(*e, g); if (u > v && !has_val(ext_stack[0], u)) { insert_sorted(ext_stack[0], u); insert_sorted(sub_neighbours_stack[0],u); } } while (!sub_stack.empty()) { std::vector<vertex_t>& ext = ext_stack.back(); std::vector<vertex_t>& sub = sub_stack.back(); std::vector<vertex_t>& sub_neighbours = sub_neighbours_stack.back(); if (sub.size() == n) { // found a subgraph of the desired size; put it in the list and go // back a level subgraphs.push_back(sub); sub_stack.pop_back(); ext_stack.pop_back(); sub_neighbours_stack.pop_back(); continue; } if (ext.empty()) { // no where else to go ext_stack.pop_back(); sub_stack.pop_back(); sub_neighbours_stack.pop_back(); continue; } else { // extend subgraph std::vector<vertex_t> new_ext, new_sub = sub, new_sub_neighbours = sub_neighbours; // remove w from ext vertex_t w = ext.back(); ext.pop_back(); // insert w in subgraph insert_sorted(new_sub, w); // update new_ext new_ext = ext; for (tie(e, e_end) = out_edges(w, g); e != e_end; ++e) { vertex_t u = target(*e,g); if (u > v) { if (!has_val(sub_neighbours, u)) insert_sorted(new_ext, u); insert_sorted(new_sub_neighbours, u); } } sampler(new_ext, ext_stack.size()); ext_stack.push_back(new_ext); sub_stack.push_back(new_sub); sub_neighbours_stack.push_back(new_sub_neighbours); } } } // sampling selectors struct sample_all { template <class val_type> void operator()(std::vector<val_type>&, size_t) {} }; struct sample_some { sample_some(std::vector<double>& p, rng_t& rng): _p(&p), _rng(&rng) {} sample_some() {} template <class val_type> void operator()(std::vector<val_type>& extend, size_t d) { typedef std::uniform_real_distribution<double> rdist_t; auto random = std::bind(rdist_t(), std::ref(*_rng)); double pd = (*_p)[d+1]; size_t nc = extend.size(); double u = nc*pd - floor(nc*pd); size_t n; double r; { #pragma omp critical r = random(); } if (r < u) n = size_t(ceil(nc*pd)); else n = size_t(floor(nc*pd)); if (n == extend.size()) return; if (n == 0) { extend.clear(); return; } typedef std::uniform_int_distribution<size_t> idist_t; for (size_t i = 0; i < n; ++i) { auto random_v = std::bind(idist_t(0, extend.size()-i-1), std::ref(*_rng)); size_t j; { #pragma omp critical j = i + random_v(); } swap(extend[i], extend[j]); } extend.resize(n); } std::vector<double>* _p; rng_t* _rng; }; // build the actual induced subgraph from the vertex list template <class Graph, class GraphSG> void make_subgraph (std::vector<typename graph_traits<Graph>::vertex_descriptor>& vlist, Graph& g, GraphSG& sub) { for (size_t i = 0; i < vlist.size(); ++i) add_vertex(sub); for (size_t i = 0; i < vlist.size(); ++i) { typename graph_traits<Graph>::vertex_descriptor ov = vlist[i], ot; typename graph_traits<GraphSG>::vertex_descriptor nv = vertex(i,sub); typename graph_traits<Graph>::out_edge_iterator e, e_end; for (tie(e, e_end) = out_edges(ov, g); e != e_end; ++e) { ot = target(*e, g); typeof(vlist.begin()) viter = lower_bound(vlist.begin(), vlist.end(), ot); size_t ot_index = viter - vlist.begin(); if (viter != vlist.end() && vlist[ot_index] == ot && (is_directed::apply<Graph>::type::value || ot < ov)) add_edge(nv, vertex(ot_index, sub), sub); } } } // compare two graphs for labeled exactness (not isomorphism) template <class Graph> bool graph_cmp(Graph& g1, Graph& g2) { if (num_vertices(g1) != num_vertices(g2) || num_edges(g1) != num_edges(g2)) return false; typename graph_traits<Graph>::vertex_iterator v1, v1_end; typename graph_traits<Graph>::vertex_iterator v2, v2_end; tie(v2, v2_end) = vertices(g2); for (tie(v1, v1_end) = vertices(g1); v1 != v1_end; ++v1) { if (out_degree(*v1, g1) != out_degree(*v2, g2)) return false; if (in_degreeS()(*v1, g1) != in_degreeS()(*v2, g2)) return false; std::vector<typename graph_traits<Graph>::vertex_descriptor> out1, out2; typename graph_traits<Graph>::out_edge_iterator e, e_end; for (tie(e, e_end) = out_edges(*v1, g1); e != e_end; ++e) out1.push_back(target(*e, g1)); for (tie(e, e_end) = out_edges(*v2, g2); e != e_end; ++e) out2.push_back(target(*e, g2)); sort(out1.begin(), out1.end()); sort(out2.begin(), out2.end()); if (out1 != out2) return false; } return true; } // short hand for both types of subgraphs typedef adj_list<size_t> d_graph_t; typedef adj_list<size_t> u_graph_t; // we need this wrap to use the UndirectedAdaptor only on directed graphs struct wrap_undirected { template <class Graph> struct apply { typedef typename mpl::if_<typename is_directed::apply<Graph>::type, UndirectedAdaptor<Graph>, Graph&>::type type; }; }; // get the signature of the graph: sorted degree sequence template <class Graph> void get_sig(Graph& g, std::vector<size_t>& sig) { sig.clear(); size_t N = num_vertices(g); if (N > 0) sig.resize(is_directed::apply<Graph>::type::value ? 2 * N : N); for (size_t i = 0; i < N; ++i) { typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g); sig[i] = out_degree(v, g); if(is_directed::apply<Graph>::type::value) sig[i + N] = in_degreeS()(v, g); } sort(sig.begin(), sig.end()); } // gets (or samples) all the subgraphs in graph g struct get_all_motifs { get_all_motifs(bool collect_vmaps, double p, bool comp_iso, bool fill_list, rng_t& rng) : collect_vmaps(collect_vmaps), p(p), comp_iso(comp_iso), fill_list(fill_list), rng(rng) {} bool collect_vmaps; double p; bool comp_iso; bool fill_list; rng_t& rng; template <class Graph, class Sampler, class VMap> void operator()(Graph& g, size_t k, boost::any& list, std::vector<size_t>& hist, std::vector<std::vector<VMap> >& vmaps, Sampler sampler) const { typedef typename mpl::if_<typename is_directed::apply<Graph>::type, d_graph_t, u_graph_t>::type graph_sg_t; // the main subgraph lists std::vector<graph_sg_t>& subgraph_list = any_cast<std::vector<graph_sg_t>&>(list); // this hashes subgraphs according to their signature std::unordered_map<std::vector<size_t>, std::vector<pair<size_t, graph_sg_t> >, std::hash<std::vector<size_t>>> sub_list; std::vector<size_t> sig; // current signature for (size_t i = 0; i < subgraph_list.size(); ++i) { get_sig(subgraph_list[i], sig); sub_list[sig].push_back(make_pair(i,subgraph_list[i])); } // the subgraph count hist.resize(subgraph_list.size()); typedef std::uniform_real_distribution<double> rdist_t; auto random = std::bind(rdist_t(), std::ref(rng)); // the set of vertices V to be sampled (filled only if p < 1) std::vector<size_t> V; if (p < 1) { typename graph_traits<Graph>::vertex_iterator v, v_end; for (tie(v, v_end) = vertices(g); v != v_end; ++v) V.push_back(*v); size_t n; if (random() < p) n = size_t(ceil(V.size()*p)); else n = size_t(floor(V.size()*p)); typedef std::uniform_int_distribution<size_t> idist_t; for (size_t i = 0; i < n; ++i) { auto random_v = std::bind(idist_t(0, V.size()-i-1), std::ref(rng)); size_t j = i + random_v(); swap(V[i], V[j]); } V.resize(n); } int i, N = (p < 1) ? V.size() : num_vertices(g); #pragma omp parallel for default(shared) private(i, sig) \ schedule(runtime) if (N > 100) for (i = 0; i < N; ++i) { std::vector<std::vector<typename graph_traits<Graph>::vertex_descriptor> > subgraphs; typename graph_traits<Graph>::vertex_descriptor v = (p < 1) ? V[i] : vertex(i, g); if (v == graph_traits<Graph>::null_vertex()) continue; typename wrap_undirected::apply<Graph>::type ug(g); get_subgraphs(ug, v, k, subgraphs, sampler); #pragma omp critical for (size_t j = 0; j < subgraphs.size(); ++j) { graph_sg_t sub; make_subgraph(subgraphs[j], g, sub); get_sig(sub, sig); typeof(sub_list.begin()) iter = sub_list.find(sig); if(iter == sub_list.end()) { if (!fill_list) continue; // avoid inserting an element in sub_list sub_list[sig].clear(); } bool found = false; size_t pos; typeof(sub_list.begin()) sl = sub_list.find(sig); if (sl != sub_list.end()) { for (size_t l = 0; l < sl->second.size(); ++l) { graph_sg_t& motif = sl->second[l].second; if (comp_iso) { if (isomorphism(motif, sub, vertex_index1_map(get(vertex_index, motif)). vertex_index2_map(get(vertex_index, sub)))) found = true; } else { if (graph_cmp(motif, sub)) found = true; } if (found) { pos = sl->second[l].first; hist[pos]++; break; } } } if (found == false && fill_list) { subgraph_list.push_back(sub); sub_list[sig].push_back(make_pair(subgraph_list.size() - 1, sub)); hist.push_back(1); pos = hist.size() - 1; found = true; } if (found && collect_vmaps) { if (pos >= vmaps.size()) vmaps.resize(pos + 1); vmaps[pos].push_back(VMap(get(boost::vertex_index,sub))); for (size_t vi = 0; vi < num_vertices(sub); ++vi) vmaps[pos].back()[vertex(vi, sub)] = subgraphs[j][vi]; } } } } }; } //graph-tool namespace #endif // GRAPH_MOTIFS_HH
[ "john.g.keto@gmail.com" ]
john.g.keto@gmail.com
659f9d2812952b2a2cb6c203c9c8094a3d96c096
820c61849a45ed69f3e4636e2d3f0486304b5d46
/Contest Participations/New folder/a.cpp
0e07bff149eb12f66cb557ce51836c7d2d3534f2
[]
no_license
Tanmoytkd/programming-projects
1d842c994b6e2c546ab37a5378a823f9c9443c39
42c6f741d6da1e4cf787b1b4971a72ab2c2919e1
refs/heads/master
2021-08-07T18:00:43.530215
2021-06-04T11:18:27
2021-06-04T11:18:27
42,516,841
2
1
null
null
null
null
UTF-8
C++
false
false
1,327
cpp
#include<bits/stdc++.h> #define pii pair<int,int> #define mkp make_pair #define fs first #define sc second #define pb push_back #define ppb pop_back() #define pf printf #define pf1(a) printf("%d\n",a) #define hi printf("hi!\n"); #define sf scanf #define sf1(a) scanf("%d",&a) #define sf2(a,b) scanf("%d %d",&a,&b) #define sf3(a,b,c) scanf("%d %d %d",&a,&b,&c) #define sf1ll(a) scanf("%I64d",&a) #define sf2ll(a,b) scanf("%I64d %I64d",&a,&b) #define sf3ll(a,b,c) scanf("%I64d %I64d %I64d",&a,&b,&c) #define pcase(x) printf("Case %d: ",x) #define MX 1000000007 #define inf 1000000007 #define pi acos(-1.0) #define mem(arr,x) memset((arr), (x), sizeof((arr))); #define FOR(i,x) for(int i=0;i<(x); i++) #define FOR1(i, x) for(int i = 1; i<=x ; i++) using namespace std; typedef long long int lint; typedef double dbl; int main() { int t, tst = 1; string s; cin >> s; int cnt[256]; mem(cnt, 0); FOR(i, s.size()) { char ch=s[i]; cnt[ch]++; } string w="Bulbasaur"; int res=0; while(1) { int wrong=0; FOR(i, w.size()) { char ch=w[i]; if(!cnt[ch]) { wrong=1; break; } cnt[ch]--; } if(wrong) break; res++; } cout << res << endl; return 0; }
[ "tanmoykrishnadas@gmail.com" ]
tanmoykrishnadas@gmail.com
eec9064a7d2565082e4e55400834b3b620c9c14d
5e0d9c2d420261043e0dc92cde24017e1e3a6438
/WheelChair/slide_pot-chair.ino
5ed1363e11f38b5b1ddbb16ff56f163f6f66787c
[]
no_license
TNUA-NMA-Graduate2018/EmilySaysGoodbye1208
090246edf70cdea67d3f2ad29e4c7d7ebbf88c33
8b0d5bfe2cd7bf82e72356db4976096dbd96d268
refs/heads/master
2021-09-02T16:02:47.915917
2018-01-03T14:27:49
2018-01-03T14:27:49
112,211,692
0
0
null
2017-11-29T15:39:42
2017-11-27T15:13:03
Arduino
UTF-8
C++
false
false
279
ino
const int slider1 = A0; int sli1 = 0; int value1; void setup() { pinMode(slider1, INPUT); Serial.begin(9600); } void loop() { int s; s = slider(); } int slider() { sli1 = analogRead(slider1); value1 = int(map(sli1, 0, 1024, -100, 100)); return value1 ; }
[ "noreply@github.com" ]
noreply@github.com
03529b54dfb6f22ac082acd3e942b8e968b702fe
b4da69db6113bb901bcb362e79f30a7f3cc0e096
/FENCE1 - Build a Fence.cpp
eeca5ced40097202ab1036928ded0549a62fe48f
[]
no_license
raviRB/SPOJ-backup
9748b966e1c43de8eb348fb70bce49e524d302dd
0188eb63f964ad257972dcf5356f35a9cf46ed87
refs/heads/master
2020-03-30T05:13:37.762527
2018-10-01T16:22:45
2018-10-01T16:22:45
150,787,015
0
0
null
null
null
null
UTF-8
C++
false
false
364
cpp
#include<iostream> #include<algorithm> #include<vector> #include<queue> #include<map> #include<set> #include<math.h> #define MAX 10 #define ll long long int #define rep(i,j) for(int i=0;i<j;i++) using namespace std; int main(){ float l; cin>>l; while(l!=0){ float num ,r = l/2; num = 3.14159*r*r; num=num/2; cout<<num<<"\n"; cin>>l; } return 0; }
[ "ravi.bhatt.754918@gmail.com" ]
ravi.bhatt.754918@gmail.com
659bb7bced9d5892d43f07ac5e7f92df9b760e93
179ffb8f2137307583a23cb6826d720974fc9784
/Unit05/ConstexprAndAssert/ConstexprAndAssert.cpp
07c5f6799bd009fe6db66d490f2c5afdbc1c4e7b
[]
no_license
Sheepypy/MOOC
e59f85732e225cc0f6059e46b0620dd34869faa8
258b178481419dcea1dc32f07aab4536f606205c
refs/heads/master
2023-08-13T23:14:52.245101
2021-09-14T09:57:46
2021-09-14T09:57:46
392,976,556
2
0
null
null
null
null
GB18030
C++
false
false
742
cpp
//任务1:用递归计算factorial,用assert检查3的阶乘 //任务2:将factorial变成常量表达式,用static_assert检查3的阶乘; //任务3:创建factorial(4)大小的数组 #include <iostream> #include<array> #include<cassert> using std::cout; using std::cin; using std::endl; constexpr int factoral(int n) {//阶乘 if (n == 0) { return 1;//error:2; right:1 } else { return n * factoral(n - 1); } } int main() { int x = 3; auto y = factoral(x); static_assert(factoral(3) == 6, "factorial(3) should be 6");//c++11起引入 assert(y == 6);//断言 //cout << "3!=" << y << endl; static_assert(factoral(4) == 24, "factorial(4) should be 24"); std::array<int, factoral(4)> a; cout << a.size(); return 0; }
[ "778453146@qq.com" ]
778453146@qq.com
414d5409f6cb0aa516e13a5bb83f2cb12f8d9781
ad273708d98b1f73b3855cc4317bca2e56456d15
/aws-cpp-sdk-ec2/source/model/ClientVpnConnectionStatusCode.cpp
03408e76d46109b32c0a51aee5820158d037a7cf
[ "MIT", "Apache-2.0", "JSON" ]
permissive
novaquark/aws-sdk-cpp
b390f2e29f86f629f9efcf41c4990169b91f4f47
a0969508545bec9ae2864c9e1e2bb9aff109f90c
refs/heads/master
2022-08-28T18:28:12.742810
2020-05-27T15:46:18
2020-05-27T15:46:18
267,351,721
1
0
Apache-2.0
2020-05-27T15:08:16
2020-05-27T15:08:15
null
UTF-8
C++
false
false
3,288
cpp
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ #include <aws/ec2/model/ClientVpnConnectionStatusCode.h> #include <aws/core/utils/HashingUtils.h> #include <aws/core/Globals.h> #include <aws/core/utils/EnumParseOverflowContainer.h> using namespace Aws::Utils; namespace Aws { namespace EC2 { namespace Model { namespace ClientVpnConnectionStatusCodeMapper { static const int active_HASH = HashingUtils::HashString("active"); static const int failed_to_terminate_HASH = HashingUtils::HashString("failed-to-terminate"); static const int terminating_HASH = HashingUtils::HashString("terminating"); static const int terminated_HASH = HashingUtils::HashString("terminated"); ClientVpnConnectionStatusCode GetClientVpnConnectionStatusCodeForName(const Aws::String& name) { int hashCode = HashingUtils::HashString(name.c_str()); if (hashCode == active_HASH) { return ClientVpnConnectionStatusCode::active; } else if (hashCode == failed_to_terminate_HASH) { return ClientVpnConnectionStatusCode::failed_to_terminate; } else if (hashCode == terminating_HASH) { return ClientVpnConnectionStatusCode::terminating; } else if (hashCode == terminated_HASH) { return ClientVpnConnectionStatusCode::terminated; } EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { overflowContainer->StoreOverflow(hashCode, name); return static_cast<ClientVpnConnectionStatusCode>(hashCode); } return ClientVpnConnectionStatusCode::NOT_SET; } Aws::String GetNameForClientVpnConnectionStatusCode(ClientVpnConnectionStatusCode enumValue) { switch(enumValue) { case ClientVpnConnectionStatusCode::active: return "active"; case ClientVpnConnectionStatusCode::failed_to_terminate: return "failed-to-terminate"; case ClientVpnConnectionStatusCode::terminating: return "terminating"; case ClientVpnConnectionStatusCode::terminated: return "terminated"; default: EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer(); if(overflowContainer) { return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue)); } return {}; } } } // namespace ClientVpnConnectionStatusCodeMapper } // namespace Model } // namespace EC2 } // namespace Aws
[ "aws-sdk-cpp-automation@github.com" ]
aws-sdk-cpp-automation@github.com
1fb44735596e9798ec608932084926669cc0d1eb
9b8591c5f2a54cc74c73a30472f97909e35f2ecf
/source/QtNetwork/QLocalSocketSlots.h
42cbf895874be6de4efe214e6d101adef13c7001
[ "MIT" ]
permissive
tnsr1/Qt5xHb
d3a9396a6ad5047010acd5d8459688e6e07e49c2
04b6bd5d8fb08903621003fa5e9b61b831c36fb3
refs/heads/master
2021-05-17T11:15:52.567808
2020-03-26T06:52:17
2020-03-26T06:52:17
null
0
0
null
null
null
null
UTF-8
C++
false
false
900
h
/* Qt5xHb - Bindings libraries for Harbour/xHarbour and Qt Framework 5 Copyright (C) 2020 Marcos Antonio Gambeta <marcosgambeta AT outlook DOT com> */ /* DO NOT EDIT THIS FILE - the content was created using a source code generator */ #ifndef QLOCALSOCKETSLOTS_H #define QLOCALSOCKETSLOTS_H #include <QtCore/QObject> #include <QtCore/QCoreApplication> #include <QtCore/QString> #include <QtNetwork/QLocalSocket> #include "qt5xhb_common.h" #include "qt5xhb_macros.h" #include "qt5xhb_signals.h" class QLocalSocketSlots: public QObject { Q_OBJECT public: QLocalSocketSlots(QObject *parent = 0); ~QLocalSocketSlots(); public slots: void connected(); void disconnected(); void error( QLocalSocket::LocalSocketError socketError ); void stateChanged( QLocalSocket::LocalSocketState socketState ); }; #endif /* QLOCALSOCKETSLOTS_H */
[ "5998677+marcosgambeta@users.noreply.github.com" ]
5998677+marcosgambeta@users.noreply.github.com
a78e378974bc695ffda88619668307e98afa8d03
34e0a89e7c9ab88d80d6ee1435990bf873c26d58
/src/model/Blender.h
feb713b233ed7c86d01cee3b400f5b194c6a5a89
[]
no_license
dxinteractive/blend2-pedal
63becf70bd36d41f2f3d0671bdd92bd90d8581f4
b59b01cea65a6bce38878625ef1ba353a89fe09b
refs/heads/master
2022-06-19T08:44:04.940866
2019-06-10T10:32:07
2019-06-10T10:32:07
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,079
h
#ifndef BLENDER_H #define BLENDER_H #include <Arduino.h> #include "BlendPreset.h" #include "../output/AmpController.h" #include "../config.h" class Blender { public: Blender(const BlendPreset* presets, int presetsTotal); void setup(); int getPreset() const { return presetId; } int getPresetsTotal() const { return presetsTotal; } int setPreset(int newPresetId); int nextPreset(); int prevPreset(); char const* presetName() const; char const* presetName(int presetId) const; float getKeyframe(int ampId, int keyframe) const; float const* getKeyframes() const; float setKeyframe(int ampId, int keyframe, float value); float setPosition(float newBlendPosition); float getBlendedValue(int ampId) const; float getBlendedValue(int ampId, float blend) const; private: void updateAmpController(); AmpController ampController; const BlendPreset* presets; int presetsTotal; int presetId; float ampKeyframeValues[8]; float blendPosition; }; #endif
[ "dxinteractive@gmail.com" ]
dxinteractive@gmail.com
2436567eba721aa7c29da6b4cb3d92eaf580134f
c2984ee5cb78173ca44958367c14d5b3575eccdc
/Source/FlirListener/FlirListener.cpp
34b62aa2e578e2cb888cce11401239d2bee6cfcc
[]
no_license
McBusinessTime/FLIR-Listener
8c387f6f38a56e55b20be68d9418b9e2af249b6a
65c67433e9b7f636453d2e0d3c99f9a7a56062a3
refs/heads/master
2020-12-24T11:25:52.757221
2016-11-07T03:30:08
2016-11-07T03:30:08
73,031,981
0
0
null
null
null
null
UTF-8
C++
false
false
247
cpp
// Fill out your copyright notice in the Description page of Project Settings. #include "FlirListener.h" IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, FlirListener, "FlirListener" ); //General Log DEFINE_LOG_CATEGORY(FlirListenerLog);
[ "paulmmcbride123@gmail.com" ]
paulmmcbride123@gmail.com
7d583b2c88ce713cf4f26a6a69980a8566a8d3f8
1e28aa10362a7b0d83211cf2962d0f96223e8c3d
/cfuncs/mexVFI.cpp
5ef1dbfb737a89519c81c3e349909d5e55f51552
[ "MIT" ]
permissive
rickecon/G2EGM
f5a8aea9f46bd34a85376403f274dd44090baf86
30aa550d8319582f9a17e08192dc8f1361726c9b
refs/heads/master
2022-04-01T18:05:42.908681
2020-01-23T06:53:36
2020-01-23T06:53:36
null
0
0
null
null
null
null
UTF-8
C++
false
false
8,004
cpp
// version: 1.0. // @author: Jeppe Druedahl og Thomas Høgholm Jørgensen, 2016. #include<cmath> #include"mex.h" #include"matrix.h" #include<omp.h> #include"base_funcs.c" #include"mesh_interp.cpp" #define MAX(X,Y) ((X)>(Y)?(X):(Y)) #define MIN(X,Y) ((X)<(Y)?(X):(Y)) #define MAXTHREADS MIN(16, omp_get_max_threads()-1) ///////////// // GATEWAY // ///////////// void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { //////////////////// // 1. load inputs // //////////////////// int iin = 0; // first input // a. par: grids par_struct* par = new par_struct; par->ndim = (int) mxGetScalar(mxGetField(prhs[iin],0,"ndim")); par->grid_m = (double*) mxGetPr(mxGetField(prhs[iin],0,"grid_m")); par->grid_n = (double*) mxGetPr(mxGetField(prhs[iin],0,"grid_n")); par->grid_k = (double*) mxGetPr(mxGetField(prhs[iin],0,"grid_k")); par->Nm = (int) mxGetScalar(mxGetField(prhs[iin],0,"Nm")); par->Nn = (int) mxGetScalar(mxGetField(prhs[iin],0,"Nn")); par->Nk = (int) mxGetScalar(mxGetField(prhs[iin],0,"Nk")); par->grid_a_pd = (double*) mxGetPr(mxGetField(prhs[iin],0,"grid_a_pd")); par->grid_b_pd = (double*) mxGetPr(mxGetField(prhs[iin],0,"grid_b_pd")); par->grid_q_pd = (double*) mxGetPr(mxGetField(prhs[iin],0,"grid_q_pd")); par->Na_pd = (int) mxGetScalar(mxGetField(prhs[iin],0,"Na_pd")); par->Nb_pd = (int) mxGetScalar(mxGetField(prhs[iin],0,"Nb_pd")); par->Nq_pd = (int) mxGetScalar(mxGetField(prhs[iin],0,"Nq_pd")); par->N_guess_vfi = (int) mxGetScalar(mxGetField(prhs[iin],0,"N_guess_vfi")); // b. par: parameters par->beta = (double) mxGetScalar(mxGetField(prhs[iin],0,"beta")); par->rho = (double) mxGetScalar(mxGetField(prhs[iin],0,"rho")); par->alpha = (double) mxGetScalar(mxGetField(prhs[iin],0,"alpha")); par->varphi = (double) mxGetScalar(mxGetField(prhs[iin],0,"varphi")); par->gamma = (double) mxGetScalar(mxGetField(prhs[iin],0,"gamma")); par->chi = (double) mxGetScalar(mxGetField(prhs[iin],0,"chi")); par->rk = (double) mxGetScalar(mxGetField(prhs[iin],0,"rk")); par->delta = (double) mxGetScalar(mxGetField(prhs[iin],0,"delta")); par->lmax = (double) mxGetScalar(mxGetField(prhs[iin],0,"lmax")); // c. par: settings par->max_threads = (int) mxGetScalar(mxGetField(prhs[iin],0,"max_threads")); // next intput iin++; // d. par: continuation value double* w = (double*) mxGetPr(mxGetField(prhs[iin],0,"w_values")); iin++; //////////////////////// // 2. allocate output // //////////////////////// int iout = 0; // first output // a. output size_t* dims = new size_t[par->ndim]; dims[0] = par->Nm; dims[1] = par->Nn; if(par->ndim == 3){ dims[2] = par->Nk; } plhs[iout] = mxCreateNumericArray(par->ndim,dims,mxDOUBLE_CLASS,mxREAL); double* c = mxGetPr(plhs[iout]); iout++; plhs[iout] = mxCreateNumericArray(par->ndim,dims,mxDOUBLE_CLASS,mxREAL); double* d = mxGetPr(plhs[iout]); iout++; plhs[iout] = mxCreateNumericArray(par->ndim,dims,mxDOUBLE_CLASS,mxREAL); double* v = mxGetPr(plhs[iout]); iout++; #pragma omp parallel num_threads(MAXTHREADS) { double** grid_vectors = new double*[par->ndim]; grid_vectors[0] = par->grid_a_pd; grid_vectors[1] = par->grid_b_pd; int* grid_lengths = new int[par->ndim]; grid_lengths[0] = par->Na_pd; grid_lengths[1] = par->Nb_pd; mesh::settings_struct* w_interp_func = new mesh::settings_struct; mesh::create(w_interp_func, par->ndim, grid_lengths, grid_vectors, w); double* pd = new double[par->ndim]; // loop over states #pragma omp for for(int i_n =0; i_n < par->Nn; i_n++){ for(int i_m =0; i_m < par->Nm; i_m++){ double curr_c, curr_d; double curr_v = -mxGetInf();; // a. states double mi = par->grid_m[i_m]; double ni = par->grid_n[i_n]; // b. loop over guesses double min_c = 0.001*mi; double max_c = mi; double min_d = 0.0; double max_d = max_c; for(int i_cguess = 0; i_cguess < par->N_guess_vfi+1; i_cguess++){ for(int i_dguess = 0; i_dguess < par->N_guess_vfi; i_dguess++){ // i. c and d guess double c_guess, d_guess; if(i_cguess==par->N_guess_vfi){ // add points on the constraint double delta_c = (double)i_dguess/(double)(par->N_guess_vfi-1); c_guess = (1.0-delta_c)*min_c + delta_c*max_c; d_guess = mi + - c_guess; } else { double delta_c = (double)i_cguess/(double)(par->N_guess_vfi-1); double delta_d = (double)i_dguess/(double)(par->N_guess_vfi-1); c_guess = (1.0-delta_c)*min_c + delta_c*max_c; d_guess = (1.0-delta_d)*min_d + delta_d*max_d; } // ii. check contraints if(c_guess + d_guess <= mi){ // a. post-decision states double a_guess = mi - c_guess - d_guess; double b_guess = ni + d_guess + par->chi*log(1.0+d_guess); // b. continuation-value-of-choice pd[0] = a_guess; pd[1] = b_guess; double w_guess = mesh::interp(w_interp_func,pd); // c. value-of-choice double v_guess = u(c_guess, 0, par->rho, par->alpha, par->varphi, par->gamma) + par->beta*w_guess; // d. update if highest value-of-choice if(v_guess > curr_v){ curr_v = v_guess; curr_c = c_guess; curr_d = d_guess; } } // allowed guess } // d } // c // c. fine-tune double delta_c = max_c*1.0/(double)(par->N_guess_vfi-1); min_c = MAX(curr_c - delta_c,min_c); max_c = MIN(curr_c + delta_c,max_c); double delta_d = max_d*1.0/(double)(par->N_guess_vfi-1); min_d = MAX(curr_d - delta_d,min_d); max_d = MIN(curr_d + delta_d,max_d); for(int i_cguess = 0; i_cguess < par->N_guess_vfi/4; i_cguess++){ for(int i_dguess = 0; i_dguess < par->N_guess_vfi/4; i_dguess++){ // i. c and d guess double delta_c = (double)i_cguess/(double)(par->N_guess_vfi/4-1); double delta_d = (double)i_dguess/(double)(par->N_guess_vfi/4-1); double c_guess = (1.0-delta_c)*min_c + delta_c*max_c; double d_guess = (1.0-delta_d)*min_d + delta_d*max_d; // ii. check contraints if(c_guess + d_guess <= mi){ // a. post-decision states double a_guess = mi - c_guess - d_guess; double b_guess = ni + d_guess + par->chi*log(1.0+d_guess); // b. continuation-value-of-choice pd[0] = a_guess; pd[1] = b_guess; double w_guess = mesh::interp(w_interp_func,pd); // c. value-of-choice double v_guess = u(c_guess, 0, par->rho, par->alpha, par->varphi, par->gamma) + par->beta*w_guess; // d. update if highest value-of-choice if(v_guess > curr_v){ curr_v = v_guess; curr_c = c_guess; curr_d = d_guess; } } // allowed guess } // d } // c // d. store results in the output matrix int igrid = index_func(i_m,i_n,0,par->Nm,par->Nn,1); v[igrid] = curr_v; c[igrid] = curr_c; d[igrid] = curr_d; } // i_n } // i_m delete[] pd; delete[] grid_lengths; delete[] grid_vectors; mesh::destroy(w_interp_func); } // end of parallel } // GATEWAY
[ "gmf123@ku.dk" ]
gmf123@ku.dk
ac38e6bbb67626747a50be4548a7cfd9851d4af2
bc15af91d4c997d50a1e4b618b0afa460ba58297
/src/verilog/ast/visitors/editor.cc
bc7a51579fe3157c4c51b7a0c9226a187d032ec9
[ "LicenseRef-scancode-unknown-license-reference", "BSD-2-Clause" ]
permissive
sagniknitr/cascade
fa3f0ced7a420170156e68695da69a3260c01fa9
2fc36ec208b87013c58f86e2c152a3fe2f21d5fe
refs/heads/master
2020-04-19T11:24:40.854017
2019-01-26T03:48:21
2019-01-26T03:48:21
160,314,791
0
0
NOASSERTION
2019-01-20T06:52:27
2018-12-04T07:12:32
C++
UTF-8
C++
false
false
6,752
cc
// Copyright 2017-2019 VMware, Inc. // SPDX-License-Identifier: BSD-2-Clause // // The BSD-2 license (the License) set forth below applies to all parts of the // Cascade project. You may not use this file except in compliance with the // License. // // BSD-2 License // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, this // list of conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "src/verilog/ast/visitors/editor.h" #include "src/verilog/ast/ast.h" namespace cascade { void Editor::edit(ArgAssign* aa) { aa->accept_exp(this); aa->accept_imp(this); } void Editor::edit(Attributes* a) { a->accept_as(this); } void Editor::edit(AttrSpec* as) { as->accept_lhs(this); as->accept_rhs(this); } void Editor::edit(CaseGenerateItem* cgi) { cgi->accept_exprs(this); cgi->accept_block(this); } void Editor::edit(CaseItem* ci) { ci->accept_exprs(this); ci->accept_stmt(this); } void Editor::edit(Event* e) { e->accept_expr(this); } void Editor::edit(BinaryExpression* be) { be->accept_lhs(this); be->accept_rhs(this); } void Editor::edit(ConditionalExpression* ce) { ce->accept_cond(this); ce->accept_lhs(this); ce->accept_rhs(this); } void Editor::edit(Concatenation* c) { c->accept_exprs(this); } void Editor::edit(Identifier* i) { i->accept_ids(this); i->accept_dim(this); } void Editor::edit(MultipleConcatenation* mc) { mc->accept_expr(this); mc->accept_concat(this); } void Editor::edit(Number* n) { (void) n; } void Editor::edit(String* s) { (void) s; } void Editor::edit(RangeExpression* re) { re->accept_upper(this); re->accept_lower(this); } void Editor::edit(UnaryExpression* ue) { ue->accept_lhs(this); } void Editor::edit(GenerateBlock* gb) { gb->accept_id(this); gb->accept_items(this); } void Editor::edit(Id* i) { i->accept_isel(this); } void Editor::edit(IfGenerateClause* igc) { igc->accept_if(this); igc->accept_then(this); } void Editor::edit(ModuleDeclaration* md) { md->accept_attrs(this); md->accept_id(this); md->accept_ports(this); md->accept_items(this); } void Editor::edit(AlwaysConstruct* ac) { ac->accept_stmt(this); } void Editor::edit(IfGenerateConstruct* igc) { igc->accept_attrs(this); igc->accept_clauses(this); igc->accept_else(this); } void Editor::edit(CaseGenerateConstruct* cgc) { cgc->accept_cond(this); cgc->accept_items(this); } void Editor::edit(LoopGenerateConstruct* lgc) { lgc->accept_init(this); lgc->accept_cond(this); lgc->accept_update(this); lgc->accept_block(this); } void Editor::edit(InitialConstruct* ic) { ic->accept_attrs(this); ic->accept_stmt(this); } void Editor::edit(ContinuousAssign* ca) { ca->accept_ctrl(this); ca->accept_assign(this); } void Editor::edit(GenvarDeclaration* gd) { gd->accept_attrs(this); gd->accept_id(this); } void Editor::edit(IntegerDeclaration* id) { id->accept_attrs(this); id->accept_id(this); id->accept_val(this); } void Editor::edit(LocalparamDeclaration* ld) { ld->accept_attrs(this); ld->accept_dim(this); ld->accept_id(this); ld->accept_val(this); } void Editor::edit(NetDeclaration* nd) { nd->accept_attrs(this); nd->accept_ctrl(this); nd->accept_id(this); nd->accept_dim(this); } void Editor::edit(ParameterDeclaration* pd) { pd->accept_attrs(this); pd->accept_dim(this); pd->accept_id(this); pd->accept_val(this); } void Editor::edit(RegDeclaration* rd) { rd->accept_attrs(this); rd->accept_id(this); rd->accept_dim(this); rd->accept_val(this); } void Editor::edit(GenerateRegion* gr) { gr->accept_items(this); } void Editor::edit(ModuleInstantiation* mi) { mi->accept_attrs(this); mi->accept_mid(this); mi->accept_iid(this); mi->accept_range(this); mi->accept_params(this); mi->accept_ports(this); } void Editor::edit(PortDeclaration* pd) { pd->accept_attrs(this); pd->accept_decl(this); } void Editor::edit(BlockingAssign* ba) { ba->accept_ctrl(this); ba->accept_assign(this); } void Editor::edit(NonblockingAssign* na) { na->accept_ctrl(this); na->accept_assign(this); } void Editor::edit(CaseStatement* cs) { cs->accept_cond(this); cs->accept_items(this); } void Editor::edit(ConditionalStatement* cs) { cs->accept_if(this); cs->accept_then(this); cs->accept_else(this); } void Editor::edit(ForStatement* fs) { fs->accept_init(this); fs->accept_cond(this); fs->accept_update(this); fs->accept_stmt(this); } void Editor::edit(ForeverStatement* fs) { fs->accept_stmt(this); } void Editor::edit(RepeatStatement* rs) { rs->accept_cond(this); rs->accept_stmt(this); } void Editor::edit(ParBlock* pb) { pb->accept_id(this); pb->accept_decls(this); pb->accept_stmts(this); } void Editor::edit(SeqBlock* sb) { sb->accept_id(this); sb->accept_decls(this); sb->accept_stmts(this); } void Editor::edit(TimingControlStatement* tcs) { tcs->accept_ctrl(this); tcs->accept_stmt(this); } void Editor::edit(DisplayStatement* ds) { ds->accept_args(this); } void Editor::edit(FinishStatement* fs) { fs->accept_arg(this); } void Editor::edit(WriteStatement* ws) { ws->accept_args(this); } void Editor::edit(WaitStatement* ws) { ws->accept_cond(this); ws->accept_stmt(this); } void Editor::edit(WhileStatement* ws) { ws->accept_cond(this); ws->accept_stmt(this); } void Editor::edit(DelayControl* dc) { dc->accept_delay(this); } void Editor::edit(EventControl* ec) { ec->accept_events(this); } void Editor::edit(VariableAssign* va) { va->accept_lhs(this); va->accept_rhs(this); } } // namespace cascade
[ "eric.schkufza@gmail.com" ]
eric.schkufza@gmail.com
91abf1861bd7be61bcff9995c55033f3b7b7a22c
15dd58ba2d46be7766c3304ecec98b0bde47bfe3
/SteckMe/SteckMe/Main.cpp
9c226c16150d9b0c8650acbb081fa946e0fedef3
[]
no_license
AliakseyBely/stackMe
271ee71c6c427c1b42c3475c35af670cbacd8715
65cbaa5b49412a3d2a9e1552b7cbc3fc161e5003
refs/heads/master
2021-01-22T11:12:08.902384
2017-05-28T17:31:23
2017-05-28T17:31:23
92,674,674
0
0
null
null
null
null
UTF-8
C++
false
false
204
cpp
#define _CRT_SECURE_NO_WARNINGS #include "Interface.h" #include "VvodExc.h" using namespace std; int main() { setlocale(0, "Rus"); set_terminate(ITerminate); Interface obj; obj.Page1(); return 0; }
[ "Ellectro@tut.by" ]
Ellectro@tut.by
07623a7a10ae47a8cefbb582fecc3d5fa129fe06
421fc6cf071f1f02e51781808fe53f3897a890e4
/src/version.cpp
a476570410bbd4b369d37261b3bfc512253aafeb
[ "MIT" ]
permissive
SnideCoin/snidecoin
646fddaf6871658458c06b921e5cd18c41ae1a6d
73c2fac0d14489dd79f2f23d354830919a59d402
refs/heads/master
2020-03-11T08:04:39.393655
2018-04-17T08:57:51
2018-04-17T08:57:51
129,874,366
1
0
null
null
null
null
UTF-8
C++
false
false
2,589
cpp
// Copyright (c) 2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <string> #include "version.h" // Name of client reported in the 'version' message. Report the same name // for both bitcoind and bitcoin-qt, to make it harder for attackers to // target servers or GUI users specifically. const std::string CLIENT_NAME("SNIDE"); // Client version number #define CLIENT_VERSION_SUFFIX "-beta" // The following part of the code determines the CLIENT_BUILD variable. // Several mechanisms are used for this: // * first, if HAVE_BUILD_INFO is defined, include build.h, a file that is // generated by the build environment, possibly containing the output // of git-describe in a macro called BUILD_DESC // * secondly, if this is an exported version of the code, GIT_ARCHIVE will // be defined (automatically using the export-subst git attribute), and // GIT_COMMIT will contain the commit id. // * then, three options exist for determining CLIENT_BUILD: // * if BUILD_DESC is defined, use that literally (output of git-describe) // * if not, but GIT_COMMIT is defined, use v[maj].[min].[rev].[build]-g[commit] // * otherwise, use v[maj].[min].[rev].[build]-unk // finally CLIENT_VERSION_SUFFIX is added // First, include build.h if requested #ifdef HAVE_BUILD_INFO # include "build.h" #endif // git will put "#define GIT_ARCHIVE 1" on the next line inside archives. #define GIT_ARCHIVE 1 #ifdef GIT_ARCHIVE # define GIT_COMMIT_ID "" # define GIT_COMMIT_DATE "" #endif #define BUILD_DESC_FROM_COMMIT(maj,min,rev,build,commit) \ "v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "" commit #define BUILD_DESC_FROM_UNKNOWN(maj,min,rev,build) \ "v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "" #ifndef BUILD_DESC # ifdef GIT_COMMIT_ID # define BUILD_DESC BUILD_DESC_FROM_COMMIT(CLIENT_VERSION_MAJOR, CLIENT_VERSION_MINOR, CLIENT_VERSION_REVISION, CLIENT_VERSION_BUILD, GIT_COMMIT_ID) # else # define BUILD_DESC BUILD_DESC_FROM_UNKNOWN(CLIENT_VERSION_MAJOR, CLIENT_VERSION_MINOR, CLIENT_VERSION_REVISION, CLIENT_VERSION_BUILD) # endif #endif #ifndef BUILD_DATE # ifdef GIT_COMMIT_DATE # define BUILD_DATE GIT_COMMIT_DATE # else # define BUILD_DATE __DATE__ ", " __TIME__ # endif #endif const std::string CLIENT_BUILD(BUILD_DESC CLIENT_VERSION_SUFFIX); const std::string CLIENT_DATE(BUILD_DATE);
[ "snidecoin@gmail.com" ]
snidecoin@gmail.com
87d2d5bf6d5c3448fdee0c887afbd86c6b39daac
4144a415afd9a72f2ff048f32bb28d68cef76e9a
/c++/class/template/main.cpp
4493e13b04c4c817045c2fdd06b513f2835b6407
[]
no_license
Mshrimp/up_code_note
c36fa516f511da26a88eaa6b9e9cd5a766239b88
112d4521ea449fd7d27864b1f6c15bf2feb33c4b
refs/heads/master
2021-06-13T09:29:44.239997
2017-04-10T11:51:28
2017-04-10T11:51:28
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,027
cpp
#include "stack.h" int main(void) { #if 0 Stack<int> st; Stack<int> se; int num; int po; #else Stack<string> st; Stack<string> se; string num; string po; #endif //Stack<char *> sp; int i; char ch; for (i = 0; i < 10 + 2; i++) { num = rand() % 100; st.push(num); } st.show(); st.pop(po); cout << "po = " << po << endl; printf("==========\n"); while(1) { printf("please input A -> push\n" "please input P -> pop\n" "please input Q -> exit\n"); printf("=======================\n"); cin >> ch; if (ch == 'Q' || ch == 'q') { break; } switch(ch) { case 'a': case 'A': cout << "please input number : "; cin >> num; if (se.is_full()) { cout << "stack is full!\n"; } else { se.push(num); } break; case 'p': case 'P': if (se.is_empty()) { cout << "stack is empty!\n"; } else { se.pop(po); cout << "pop : " << po << endl; } break; } } //se.show(); return 0; }
[ "chiyuan.ma@outlook.com" ]
chiyuan.ma@outlook.com
dca007cc5dd0cdda60714a28168851b45d1e1f84
c4f7c49b06f29b9da7c90f11f070c1d755950f51
/src/mason/imx/ImGuiTexture.cpp
eabc5a21e96b750ac4bfab1b20aa1012239e91cb
[ "BSD-2-Clause" ]
permissive
richardeakin/mason
bce780e3bbd78107dab4d06a08156b61cec9c1c7
ae7a90869cc4767d6e4d2b6c33450c18cea30803
refs/heads/master
2023-08-21T12:33:09.248036
2023-06-11T21:30:30
2023-06-11T21:30:30
72,960,107
12
3
BSD-2-Clause
2023-06-11T21:30:31
2016-11-05T23:55:06
C
UTF-8
C++
false
false
15,491
cpp
#include "mason/imx/ImGuiTexture.h" #include "mason/Assets.h" #include "mason/glutils.h" #include "cinder/gl/gl.h" #include "cinder/Log.h" using namespace std; using namespace ci; using namespace ImGui; namespace imx { // ---------------------------------------------------------------------------------------------------- // TextureViewer // ---------------------------------------------------------------------------------------------------- class TextureViewer { public: enum class Type { TextureColor, TextureVelocity, TextureDepth, Texture3d, NumTypes }; TextureViewer( const string &label, Type type ) : mLabel( label ), mType( type ) { } void view( const gl::TextureBaseRef &texture ); void setOptions( const TextureViewerOptions &options ) { mOptions = options; } void setTiledAtlasMode( bool enabled ) { mTiledAtlasMode = enabled; } static TextureViewer* getTextureViewer( const char *label, TextureViewer::Type type, const TextureViewerOptions &options ); private: void viewImpl( gl::FboRef &fbo, const gl::TextureBaseRef &texture ); void updatePixelCoord( const gl::TextureBaseRef &texture ); void renderColor( const gl::Texture2dRef &texture, const Rectf &destRect ); void renderDepth( const gl::Texture2dRef &texture, const Rectf &destRect ); void renderVelocity( const gl::Texture2dRef &texture, const Rectf &destRect ); void render3d( const gl::Texture3dRef &texture, const Rectf &destRect ); string mLabel; Type mType; gl::FboRef mFbo, mFboNewWindow; // need a separate fbo for the 'new window' option to avoid imgui crash on stale texture id int mNumTiles = -1; // TODO: this is actually tiles per row, should probably be renamed int mFocusedLayer = 0; bool mTiledAtlasMode = false; // TODO: move this to options. defaults to true only for Texture3d float mScale = 1; vec4 mDebugPixel; ivec3 mDebugPixelCoord; bool mDebugPixelNeedsUpdate = false; TextureViewerOptions mOptions; }; const char *typeToString( TextureViewer::Type type ) { switch( type ) { case TextureViewer::Type::TextureColor: return "Color"; case TextureViewer::Type::TextureVelocity: return "Velocity"; case TextureViewer::Type::TextureDepth: return "Depth"; case TextureViewer::Type::Texture3d: return "3d"; case TextureViewer::Type::NumTypes: return "NumTypes"; default: CI_ASSERT_NOT_REACHABLE(); } return "(unknown)"; } // static TextureViewer* TextureViewer::getTextureViewer( const char *label, TextureViewer::Type type, const TextureViewerOptions &options ) { static map<ImGuiID, TextureViewer> sViewers; auto id = GetID( label ); auto it = sViewers.find( id ); if( it == sViewers.end() ) { it = sViewers.insert( { id, TextureViewer( label, type ) } ).first; if( type == Type::Texture3d ) { // default to atlas although will let options override it->second.setTiledAtlasMode( true ); } it->second.setOptions( options ); } else if( options.mClearCachedOptions ) { it->second.setOptions( options ); } // always update the glsl if it exists if( options.mGlsl ) { it->second.mOptions.mGlsl = options.mGlsl; } return &it->second; } void TextureViewer::view( const gl::TextureBaseRef &texture ) { ColorA headerColor = GetStyleColorVec4( ImGuiCol_Header ); headerColor *= 0.65f; PushStyleColor( ImGuiCol_Header, headerColor ); if( CollapsingHeader( mLabel.c_str(), mOptions.mTreeNodeFlags ) ) { viewImpl( mFbo, texture ); } PopStyleColor(); if( mOptions.mOpenNewWindow ) { SetNextWindowSize( vec2( 800, 600 ), ImGuiCond_FirstUseEver ); if( Begin( mLabel.c_str(), &mOptions.mOpenNewWindow, ImGuiWindowFlags_AlwaysVerticalScrollbar ) ) { viewImpl( mFboNewWindow, texture ); } End(); } } void TextureViewer::viewImpl( gl::FboRef &fbo, const gl::TextureBaseRef &tex ) { if( ! tex ) { Text( "null texture" ); return; } ScopedId idScope( mLabel.c_str() ); // init or resize fbo if needed float availWidth = GetContentRegionAvail().x; if( ! fbo || abs( mFbo->getWidth() - availWidth ) > 4 ) { auto texFormat = gl::Texture2d::Format() .minFilter( GL_NEAREST ).magFilter( GL_NEAREST ) .mipmap( false ) .label( "TextureViewer (" + mLabel + ")" ) ; vec2 size = vec2( availWidth ); if( mType != Type::Texture3d ) { float aspect = tex->getAspectRatio(); size.y /= tex->getAspectRatio(); } auto fboFormat = gl::Fbo::Format().colorTexture( texFormat ).samples( 0 ).label( texFormat.getLabel() ); fbo = gl::Fbo::create( int( size.x ), int( size.y ), fboFormat ); } if( mType == Type::Texture3d ) { Text( "size: [%d, %d, %d]", tex->getWidth(), tex->getHeight(), tex->getDepth() ); } else { Text( "size: [%d, %d],", tex->getWidth(), tex->getHeight() ); } SameLine(); Text( "format: %s", mason::textureFormatToString( tex->getInternalFormat() ) ); // show size of data in kilobytes // - TODO: need convenience routine for calcing one pixel's size size_t bytes = tex->getWidth() * tex->getHeight() * tex->getDepth() * ( sizeof( float ) * 4 ); SameLine(); Text( "memory: %0.2f kb", float( bytes ) / 1024.0f ); // render to fbo based on current params { gl::ScopedFramebuffer fboScope( fbo ); gl::ScopedViewport viewportScope( fbo->getSize() ); gl::clear( ColorA::zero() ); gl::ScopedDepth depthScope( false ); gl::ScopedBlend blendScope( false ); gl::ScopedMatrices matScope; gl::setMatricesWindow( fbo->getSize() ); auto destRect = Rectf( vec2( 0 ), fbo->getSize() ); if( mType == Type::TextureColor ) { auto texture2d = dynamic_pointer_cast<gl::Texture2d>( tex ); renderColor( texture2d, destRect ); } else if( mType == Type::TextureVelocity ) { auto texture2d = dynamic_pointer_cast<gl::Texture2d>( tex ); renderVelocity( texture2d, destRect ); } else if( mType == Type::TextureDepth ) { auto texture2d = dynamic_pointer_cast<gl::Texture2d>( tex ); renderDepth( texture2d, destRect ); } else if( mType == Type::Texture3d ) { auto texture3d = dynamic_pointer_cast<gl::Texture3d>( tex ); render3d( texture3d, destRect ); } updatePixelCoord( tex ); } if( mOptions.mExtendedUI ) { //Checkbox( "debug pixel", &options.mDebugPixelEnabled ); //SameLine(); //Checkbox( "use mouse", &mDebugPixelUseMouse ); static vector<string> debugPixelModes = { "Disabled", "MouseClick", "MouseHover" }; int t = (int)mOptions.mDebugPixelMode; SetNextItemWidth( 200 ); if( Combo( "debug pixel", &t, debugPixelModes ) ) { mOptions.mDebugPixelMode = (TextureViewerOptions::DebugPixelMode)t; } SameLine(); SetNextItemWidth( 300 ); // TODO: fix this for non-square images if( DragInt3( "pixel coord", &mDebugPixelCoord, 0.5f, 0, tex->getWidth() - 1 ) ) { mDebugPixelNeedsUpdate = true; } DragFloat4( "pixel", &mDebugPixel ); } // show texture that we've rendered to vec2 imagePos = ImGui::GetCursorScreenPos(); Image( fbo->getColorTexture(), vec2( fbo->getSize() ) - vec2( 0.0f ) ); bool pixelCoordNeedsUpdate = false; if( mOptions.mDebugPixelMode == TextureViewerOptions::DebugPixelMode::MouseClick && IsItemClicked() ) { mDebugPixelNeedsUpdate = true; pixelCoordNeedsUpdate = true; } else if( mOptions.mDebugPixelMode == TextureViewerOptions::DebugPixelMode::MouseHover && IsItemHovered() ) { mDebugPixelNeedsUpdate = true; pixelCoordNeedsUpdate = true; } if( pixelCoordNeedsUpdate ) { const float tiles = (float)mNumTiles; vec2 mouseNorm = ( vec2( GetMousePos() ) - vec2( GetItemRectMin() ) ) / vec2( GetItemRectSize() ); vec3 pixelCoord; if( mTiledAtlasMode ) { pixelCoord.x = fmodf( mouseNorm.x * (float)tex->getWidth() * tiles, (float)tex->getWidth() ); pixelCoord.y = fmodf( mouseNorm.y * (float)tex->getHeight() * tiles, (float)tex->getHeight() ); vec2 cellId = glm::floor( mouseNorm * tiles ); pixelCoord.z = cellId.y * tiles + cellId.x; } else { pixelCoord.x = lround( mouseNorm.x * (float)tex->getWidth() ); pixelCoord.y = lround( mouseNorm.y * (float)tex->getHeight() ); pixelCoord.z = mFocusedLayer; } mDebugPixelCoord = glm::clamp( ivec3( pixelCoord ), ivec3( 0 ), ivec3( tex->getWidth(), tex->getHeight(), tex->getDepth() ) - ivec3( 1 ) ); } if( mType == Type::Texture3d && mTiledAtlasMode && mOptions.mVolumeAtlasLineThickness > 0.01f ) { // draw some grid lines over the image, using ImDrawList // - use current window background color for lines ImDrawList* drawList = ImGui::GetWindowDrawList(); auto col = GetStyleColorVec4( ImGuiCol_WindowBg ); vec2 imageSize = GetItemRectSize(); vec2 tileSize = imageSize / vec2( (float)mNumTiles ); // note on drawing an extra line at x = 0 column and y = 0 row: it shouldn't be necessary, // but it is masking what appears to be an anti-aliasiang artifact in imgui drawlist for( int i = 0; i < mNumTiles; i++ ) { float thickness = i == 0 ? 1.0f : mOptions.mVolumeAtlasLineThickness; drawList->AddLine( imagePos + vec2( tileSize.x * (float)i, 0 ), imagePos + vec2( tileSize.x * (float)i, imageSize.y ), ImColor( col ), thickness ); drawList->AddLine( imagePos + vec2( 0, tileSize.y * (float)i ), imagePos + vec2( imageSize.x, tileSize.y * (float)i ), ImColor( col ), thickness ); } } OpenPopupOnItemClick( ( "##popup" + mLabel ).c_str() ); if( BeginPopup( ( "##popup" + mLabel ).c_str() ) ) { Checkbox( "extended ui", &mOptions.mExtendedUI ); if( Checkbox( "new window", &mOptions.mOpenNewWindow ) ) { if( ! mOptions.mOpenNewWindow ) { mFboNewWindow = nullptr; } } if( mType == Type::Texture3d ) { Checkbox( "atlas mode", &mTiledAtlasMode ); //DragInt( "tiles", &mNumTiles, 0.2f, 1, 1024 ); DragFloat( "atlas line thikness", &mOptions.mVolumeAtlasLineThickness, 0.02f, 0, 4096 ); } DragFloat( "scale", &mScale, 0.01f, 0.02f, 1000.0f ); if( mType == Type::TextureDepth ) { Checkbox( "inverted", &mOptions.mInvertColor ); } EndPopup(); } if( mOptions.mExtendedUI ) { if( mOptions.mGlsl ) { Text( "GlslProg: %s", ( ! mOptions.mGlsl->getLabel().empty() ? mOptions.mGlsl->getLabel().c_str() : "(unlabeled)" ) ); } } } void TextureViewer::updatePixelCoord( const gl::TextureBaseRef &texture ) { if( ! mDebugPixelNeedsUpdate ) { return; } gl::ScopedTextureBind scopedTex0( texture, 0 ); //glPixelStorei( GL_PACK_ALIGNMENT, 1 ); // TODO: needed? //glPixelStorei( GL_UNPACK_ALIGNMENT, 1 ); ivec3 pixelCoord = mDebugPixelCoord; // TODO: clamp so we can't crash vec4 pixel; const ivec3 pixelSize = { 1, 1, 1 }; const GLint level = 0; const GLenum format = GL_RGBA; const GLenum dataType = GL_FLOAT; // fetch one pixel from texture glGetTextureSubImage( texture->getId(), level, pixelCoord.x, pixelCoord.y, pixelCoord.z, pixelSize.x, pixelSize.y, pixelSize.z, format, dataType, sizeof( pixel ), &pixel.x ); mDebugPixel = pixel; mDebugPixelNeedsUpdate = false; } void TextureViewer::renderColor( const gl::Texture2dRef &texture, const Rectf &destRect ) { if( ! texture ) { ImGui::Text( "%s null", mLabel.c_str() ); return; } // use static glsl if none provided auto glsl = mOptions.mGlsl; if( ! glsl ) { static gl::GlslProgRef sGlsl; if( ! sGlsl ) { const fs::path vertPath = "mason/textureViewer/texture.vert"; const fs::path fragPath = "mason/textureViewer/textureColor.frag"; ma::assets()->getShader( vertPath, fragPath, []( gl::GlslProgRef glsl ) { sGlsl = glsl; } ); } glsl = sGlsl; } // render to fbo based on current params if( glsl ) { gl::ScopedTextureBind scopedTex0( texture, 0 ); gl::ScopedGlslProg glslScope( glsl ); glsl->uniform( "uScale", mScale ); gl::drawSolidRect( destRect ); } } void TextureViewer::renderDepth( const gl::Texture2dRef &texture, const Rectf &destRect ) { if( ! texture ) { ImGui::Text( "%s null", mLabel.c_str() ); return; } // use static glsl if none provided auto glsl = mOptions.mGlsl; if( ! glsl ) { static gl::GlslProgRef sGlsl; if( ! sGlsl ) { const fs::path vertPath = "mason/textureViewer/texture.vert"; const fs::path fragPath = "mason/textureViewer/textureDepth.frag"; ma::assets()->getShader( vertPath, fragPath, []( gl::GlslProgRef glsl ) { sGlsl = glsl; } ); } glsl = sGlsl; } if( glsl) { gl::ScopedTextureBind scopedTex0( texture, 0 ); gl::ScopedGlslProg glslScope( glsl ); glsl->uniform( "uScale", mScale ); glsl->uniform( "uInverted", mOptions.mInvertColor ); gl::drawSolidRect( destRect ); } } void TextureViewer::renderVelocity( const gl::Texture2dRef &texture, const Rectf &destRect ) { if( ! texture ) { ImGui::Text( "%s null", mLabel.c_str() ); return; } // use static glsl if none provided auto glsl = mOptions.mGlsl; if( ! glsl ) { static gl::GlslProgRef sGlsl; if( ! sGlsl ) { const fs::path vertPath = "mason/textureViewer/texture.vert"; const fs::path fragPath = "mason/textureViewer/textureVelocity.frag"; ma::assets()->getShader( vertPath, fragPath, []( gl::GlslProgRef glsl ) { sGlsl = glsl; } ); } glsl = sGlsl; } if( glsl ) { gl::ScopedTextureBind scopedTex0( texture, 0 ); gl::ScopedGlslProg glslScope( glsl ); glsl->uniform( "uScale", mScale ); gl::drawSolidRect( destRect ); } } void TextureViewer::render3d( const gl::Texture3dRef &texture, const Rectf &destRect ) { if( ! texture ) { ImGui::Text( "%s null", mLabel.c_str() ); return; } //if( mNumTiles < 0 ) { // mNumTiles = (int)sqrt( texture->getDepth() ) + 1; //} mNumTiles = (int)sqrt( texture->getDepth() ); // use static glsl if none provided auto glsl = mOptions.mGlsl; if( ! glsl ) { static gl::GlslProgRef sGlsl; if( ! sGlsl ) { const fs::path vertPath = "mason/textureViewer/texture.vert"; const fs::path fragPath = "mason/textureViewer/texture3d.frag"; ma::assets()->getShader( vertPath, fragPath, []( gl::GlslProgRef glsl ) { sGlsl = glsl; } ); } glsl = sGlsl; } // render to fbo based on current params { gl::ScopedTextureBind scopedTex0( texture, 0 ); if( glsl ) { gl::ScopedGlslProg glslScope( glsl ); glsl->uniform( "uNumTiles", mNumTiles ); glsl->uniform( "uFocusedLayer", mFocusedLayer ); glsl->uniform( "uTiledAtlasMode", mTiledAtlasMode ); glsl->uniform( "uRgbScale", mScale ); gl::drawSolidRect( destRect ); } } if( mOptions.mExtendedUI ) { // TODO: make this a dropdown to select mode (may have more than two) Checkbox( "atlas mode", &mTiledAtlasMode ); if( mTiledAtlasMode ) { SameLine(); Text( ", tiles: %d", mNumTiles ); } else { SliderInt( "slice", &mFocusedLayer, 0, texture->getDepth() ); } } } void Texture2d( const char *label, const gl::TextureBaseRef &texture, const TextureViewerOptions &options ) { TextureViewer::getTextureViewer( label, TextureViewer::Type::TextureColor, options )->view( texture ); } void TextureDepth( const char *label, const gl::TextureBaseRef &texture, const TextureViewerOptions &options ) { TextureViewer::getTextureViewer( label, TextureViewer::Type::TextureDepth, options )->view( texture ); } void TextureVelocity( const char *label, const gl::TextureBaseRef &texture, const TextureViewerOptions &options ) { TextureViewer::getTextureViewer( label, TextureViewer::Type::TextureVelocity, options )->view( texture ); } void Texture3d( const char *label, const gl::TextureBaseRef &texture, const TextureViewerOptions &options ) { TextureViewer::getTextureViewer( label, TextureViewer::Type::Texture3d, options )->view( texture ); } } // namespace imx
[ "rich.eakin@gmail.com" ]
rich.eakin@gmail.com
ffdf328ef59ca500ea4d02700144dea21860dffb
9a3bcd7843dec75f7f75e2762bb3460b8256a78c
/checkers_engine/tests/GamePlayTests.cpp
c73036e1a93154c9f0b64f4f7a9fd1396b3420b8
[]
no_license
gdomeradzki/genetic-checkers
d07654f0be21d9c1714866aacc8ec4b90cd575e9
259d4379ecd96323f119c1ff5856472a32a0c113
refs/heads/master
2021-01-01T08:25:08.719225
2020-03-01T12:07:19
2020-03-01T12:07:19
239,194,701
0
0
null
null
null
null
UTF-8
C++
false
false
9,216
cpp
#include <gtest/gtest.h> #include "GamePlay.hpp" namespace { const auto chooseFirstMoveStrategy = [](const InitialGameState&, const std::vector<GameStateWithMove>& gameStatesWithMove) { return gameStatesWithMove.front(); }; } TEST(GamePlay, ShouldThrowWhenWhiteMoveNotAllowed) { GameState gameState; GameState invalidGameState; GamePlay gamePlay{gameState, [invalidGameState](const InitialGameState&, const std::vector<GameStateWithMove>&) { return GameStateWithMove{invalidGameState, Move{}}; }, chooseFirstMoveStrategy}; EXPECT_THROW(gamePlay.start(), std::runtime_error); } TEST(GamePlay, ShouldThrowWhenBlackMoveNotAllowed) { GameState gameState; GameState invalidGameState; GamePlay gamePlay{gameState, chooseFirstMoveStrategy, [invalidGameState](const InitialGameState&, const std::vector<GameStateWithMove>&) { return GameStateWithMove{invalidGameState, Move{}}; }}; EXPECT_THROW(gamePlay.start(), std::runtime_error); } TEST(GamePlay, ShouldEndWithBlackWinWhenWhiteHasNoMove) { Board board{}; board[1][1] = FigureState{FigureType::Pawn, FigureColor::Black}; GameState gameState{std::move(board)}; GamePlay gamePlay{gameState, chooseFirstMoveStrategy, chooseFirstMoveStrategy}; EXPECT_EQ(gamePlay.start(), GameResult::BlackWin); } TEST(GamePlay, ShouldEndWithWhiteWinWhenBlackHasNoMove) { Board board{}; board[1][1] = FigureState{FigureType::Pawn, FigureColor::White}; GameState gameState{std::move(board)}; GamePlay gamePlay{gameState, chooseFirstMoveStrategy, chooseFirstMoveStrategy}; EXPECT_EQ(gamePlay.start(), GameResult::WhiteWin); } TEST(GamePlay, ShouldInterchangePlayersMoves) { bool whiteMove = true; Board board{}; board[1][1] = FigureState{FigureType::Pawn, FigureColor::White}; GameState gameState{std::move(board)}; const auto chooseFirstMoveStrategyWithMoveCheckWhite = [&whiteMove, &gameState]( const InitialGameState& initialGameState, const std::vector<GameStateWithMove>& gameStatesWithMove) { EXPECT_TRUE(whiteMove); EXPECT_EQ(gameState, initialGameState); whiteMove = false; return chooseFirstMoveStrategy(gameState, gameStatesWithMove); }; const auto chooseFirstMoveStrategyWithMoveCheckBlack = [&whiteMove, &gameState]( const InitialGameState& initialGameState, const std::vector<GameStateWithMove>& gameStatesWithMove) { EXPECT_FALSE(whiteMove); EXPECT_EQ(gameState, initialGameState); whiteMove = true; return chooseFirstMoveStrategy(gameState, gameStatesWithMove); }; GamePlay gamePlay{gameState, chooseFirstMoveStrategyWithMoveCheckWhite, chooseFirstMoveStrategyWithMoveCheckBlack}; gamePlay.start(); } TEST(GamePlay, ShouldDrawWhenNumberOfMovesWithNoBeatsExeedes20) { int numberOfMoves = 0; Board board{}; board[1][1] = FigureState{FigureType::King, FigureColor::White}; board[7][1] = FigureState{FigureType::King, FigureColor::Black}; GameState inGameGameState{std::move(board)}; const auto goToCornerEndlessStrategyWhite = [&numberOfMoves, &inGameGameState](const InitialGameState&, const std::vector<GameStateWithMove>& gameStatesWithMove) { numberOfMoves++; const auto startPosition = gameStatesWithMove.front().move.front(); if (startPosition == Position{0, 0}) { inGameGameState.movePawn({0, 0}, {1, 1}); } else { inGameGameState.movePawn({1, 1}, {0, 0}); } return GameStateWithMove{inGameGameState, Move{}}; }; const auto goToCornerEndlessStrategyBlack = [&numberOfMoves, &inGameGameState](const InitialGameState&, const std::vector<GameStateWithMove>& gameStatesWithMove) { numberOfMoves++; const auto startPosition = gameStatesWithMove.front().move.front(); if (startPosition == Position{1, 7}) { inGameGameState.movePawn({1, 7}, {7, 1}); } else { inGameGameState.movePawn({7, 1}, {1, 7}); } return GameStateWithMove{inGameGameState, Move{}}; }; GameState gameState = inGameGameState; GamePlay gamePlay{gameState, goToCornerEndlessStrategyWhite, goToCornerEndlessStrategyBlack}; EXPECT_EQ(gamePlay.start(), GameResult::Draw); EXPECT_EQ(numberOfMoves, 20); } TEST(GamePlay, ShouldDrawWhenNumberOfMovesWithNoBeatsExeedes20WithResetCounterAfterWhitePawnBeaten) { int numberOfMoves = 0; Board board{}; board[1][1] = FigureState{FigureType::King, FigureColor::White}; board[1][5] = FigureState{FigureType::King, FigureColor::White}; board[7][1] = FigureState{FigureType::King, FigureColor::Black}; GameState inGameGameState{std::move(board)}; const auto goToCornerEndlessStrategyWhite = [&numberOfMoves, &inGameGameState](const InitialGameState&, const std::vector<GameStateWithMove>& gameStatesWithMove) { numberOfMoves++; if (numberOfMoves == 9) { inGameGameState.movePawn({1, 5}, {2, 6}); return GameStateWithMove{inGameGameState, Move{}}; } const auto startPosition = gameStatesWithMove.front().move.front(); if (startPosition == Position{0, 0}) { inGameGameState.movePawn({0, 0}, {1, 1}); } else { inGameGameState.movePawn({1, 1}, {0, 0}); } return GameStateWithMove{inGameGameState, Move{}}; }; const auto goToCornerEndlessStrategyBlack = [&numberOfMoves, &inGameGameState](const InitialGameState&, const std::vector<GameStateWithMove>& gameStatesWithMove) { numberOfMoves++; const auto startPosition = gameStatesWithMove.front().move.front(); if (startPosition == Position{1, 7}) { inGameGameState.movePawn({1, 7}, {7, 1}); } else { inGameGameState.movePawn({7, 1}, {1, 7}); } if (numberOfMoves == 10) { inGameGameState.removePawn({2, 6}); return GameStateWithMove{inGameGameState, Move{}}; } return GameStateWithMove{inGameGameState, Move{}}; }; GameState gameState = inGameGameState; GamePlay gamePlay{gameState, goToCornerEndlessStrategyWhite, goToCornerEndlessStrategyBlack}; EXPECT_EQ(gamePlay.start(), GameResult::Draw); EXPECT_EQ(numberOfMoves, 30); } TEST(GamePlay, ShouldDrawWhenNumberOfMovesWithNoBeatsExeedes20WithResetCounterAfterBlackPawnBeaten) { int numberOfMoves = 0; Board board{}; board[1][1] = FigureState{FigureType::King, FigureColor::White}; board[4][2] = FigureState{FigureType::King, FigureColor::Black}; board[7][1] = FigureState{FigureType::King, FigureColor::Black}; GameState inGameGameState{std::move(board)}; const auto goToCornerEndlessStrategyWhite = [&numberOfMoves, &inGameGameState](const InitialGameState&, const std::vector<GameStateWithMove>& gameStatesWithMove) { numberOfMoves++; const auto startPosition = gameStatesWithMove.front().move.front(); if (startPosition == Position{7, 7}) { inGameGameState.movePawn({7, 7}, {1, 1}); } else { inGameGameState.movePawn({1, 1}, {7, 7}); } if (numberOfMoves == 11) { inGameGameState.removePawn({3, 3}); return GameStateWithMove{inGameGameState, Move{}}; } return GameStateWithMove{inGameGameState, Move{}}; }; const auto goToCornerEndlessStrategyBlack = [&numberOfMoves, &inGameGameState](const InitialGameState&, const std::vector<GameStateWithMove>& gameStatesWithMove) { numberOfMoves++; if (numberOfMoves == 10) { inGameGameState.movePawn({4, 2}, {3, 3}); return GameStateWithMove{inGameGameState, Move{}}; } const auto startPosition = gameStatesWithMove.front().move.front(); if (startPosition == Position{1, 7}) { inGameGameState.movePawn({1, 7}, {7, 1}); } else { inGameGameState.movePawn({7, 1}, {1, 7}); } return GameStateWithMove{inGameGameState, Move{}}; }; GameState gameState = inGameGameState; GamePlay gamePlay{gameState, goToCornerEndlessStrategyWhite, goToCornerEndlessStrategyBlack}; EXPECT_EQ(gamePlay.start(), GameResult::Draw); EXPECT_EQ(numberOfMoves, 31); }
[ "grzegorz@domeradzki.com" ]
grzegorz@domeradzki.com
b6973e40e37de0ff78aee9a23cddda4e7780c3ab
b3ed6d9a0d88a6c1ab795f89280276dbd252fc10
/c/tensorNet.h
105c001c31d37b5b058125f9d49dff176b53ef7e
[ "MIT" ]
permissive
corenel/jetson-inference
d6619d8a41992d090eb8271a319c78b11055c71d
d9c2fe77cdccdfcdcc238bbd622b1222906804b1
refs/heads/master
2020-09-26T03:35:32.817777
2019-12-05T18:09:57
2019-12-05T18:09:57
226,155,474
1
0
NOASSERTION
2019-12-05T17:33:14
2019-12-05T17:33:13
null
UTF-8
C++
false
false
16,700
h
/* * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ #ifndef __TENSOR_NET_H__ #define __TENSOR_NET_H__ // forward declaration of IInt8Calibrator namespace nvinfer1 { class IInt8Calibrator; } // includes #include <NvInfer.h> #include <jetson-utils/cudaUtility.h> #include <jetson-utils/timespec.h> #include <vector> #include <sstream> #include <math.h> #if NV_TENSORRT_MAJOR > 1 typedef nvinfer1::DimsCHW Dims3; #define DIMS_C(x) x.d[0] #define DIMS_H(x) x.d[1] #define DIMS_W(x) x.d[2] #else typedef nvinfer1::Dims3 Dims3; #define DIMS_C(x) x.c #define DIMS_H(x) x.h #define DIMS_W(x) x.w #ifndef NV_TENSORRT_MAJOR #define NV_TENSORRT_MAJOR 1 #define NV_TENSORRT_MINOR 0 #endif #endif /** * Default maximum batch size * @ingroup tensorNet */ #define DEFAULT_MAX_BATCH_SIZE 1 /** * Prefix used for tagging printed log output from TensorRT. * @ingroup tensorNet */ #define LOG_TRT "[TRT] " /** * Enumeration for indicating the desired precision that * the network should run in, if available in hardware. * @ingroup tensorNet */ enum precisionType { TYPE_DISABLED = 0, /**< Unknown, unspecified, or disabled type */ TYPE_FASTEST, /**< The fastest detected precision should be use (i.e. try INT8, then FP16, then FP32) */ TYPE_FP32, /**< 32-bit floating-point precision (FP32) */ TYPE_FP16, /**< 16-bit floating-point half precision (FP16) */ TYPE_INT8, /**< 8-bit integer precision (INT8) */ NUM_PRECISIONS /**< Number of precision types defined */ }; /** * Stringize function that returns precisionType in text. * @ingroup tensorNet */ const char* precisionTypeToStr( precisionType type ); /** * Parse the precision type from a string. * @ingroup tensorNet */ precisionType precisionTypeFromStr( const char* str ); /** * Enumeration for indicating the desired device that * the network should run on, if available in hardware. * @ingroup tensorNet */ enum deviceType { DEVICE_GPU = 0, /**< GPU (if multiple GPUs are present, a specific GPU can be selected with cudaSetDevice() */ DEVICE_DLA, /**< Deep Learning Accelerator (DLA) Core 0 (only on Jetson Xavier) */ DEVICE_DLA_0 = DEVICE_DLA, /**< Deep Learning Accelerator (DLA) Core 0 (only on Jetson Xavier) */ DEVICE_DLA_1, /**< Deep Learning Accelerator (DLA) Core 1 (only on Jetson Xavier) */ NUM_DEVICES /**< Number of device types defined */ }; /** * Stringize function that returns deviceType in text. * @ingroup tensorNet */ const char* deviceTypeToStr( deviceType type ); /** * Parse the device type from a string. * @ingroup tensorNet */ deviceType deviceTypeFromStr( const char* str ); /** * Enumeration indicating the format of the model that's * imported in TensorRT (either caffe, ONNX, or UFF). * @ingroup tensorNet */ enum modelType { MODEL_CUSTOM = 0, /**< Created directly with TensorRT API */ MODEL_CAFFE, /**< caffemodel */ MODEL_ONNX, /**< ONNX */ MODEL_UFF /**< UFF */ }; /** * Stringize function that returns modelType in text. * @ingroup tensorNet */ const char* modelTypeToStr( modelType type ); /** * Parse the model format from a string. * @ingroup tensorNet */ modelType modelTypeFromStr( const char* str ); /** * Profiling queries * @see tensorNet::GetProfilerTime() * @ingroup tensorNet */ enum profilerQuery { PROFILER_PREPROCESS = 0, PROFILER_NETWORK, PROFILER_POSTPROCESS, PROFILER_VISUALIZE, PROFILER_TOTAL, }; /** * Stringize function that returns profilerQuery in text. * @ingroup tensorNet */ const char* profilerQueryToStr( profilerQuery query ); /** * Profiler device * @ingroup tensorNet */ enum profilerDevice { PROFILER_CPU = 0, /**< CPU walltime */ PROFILER_CUDA, /**< CUDA kernel time */ }; /** * Abstract class for loading a tensor network with TensorRT. * For example implementations, @see imageNet and @see detectNet * @ingroup tensorNet */ class tensorNet { public: /** * Destory */ virtual ~tensorNet(); /** * Load a new network instance * @param prototxt File path to the deployable network prototxt * @param model File path to the caffemodel * @param mean File path to the mean value binary proto (NULL if none) * @param input_blob The name of the input blob data to the network. * @param output_blob The name of the output blob data from the network. * @param maxBatchSize The maximum batch size that the network will be optimized for. */ bool LoadNetwork( const char* prototxt, const char* model, const char* mean=NULL, const char* input_blob="data", const char* output_blob="prob", uint32_t maxBatchSize=DEFAULT_MAX_BATCH_SIZE, precisionType precision=TYPE_FASTEST, deviceType device=DEVICE_GPU, bool allowGPUFallback=true, nvinfer1::IInt8Calibrator* calibrator=NULL, cudaStream_t stream=NULL ); /** * Load a new network instance with multiple output layers * @param prototxt File path to the deployable network prototxt * @param model File path to the caffemodel * @param mean File path to the mean value binary proto (NULL if none) * @param input_blob The name of the input blob data to the network. * @param output_blobs List of names of the output blobs from the network. * @param maxBatchSize The maximum batch size that the network will be optimized for. */ bool LoadNetwork( const char* prototxt, const char* model, const char* mean, const char* input_blob, const std::vector<std::string>& output_blobs, uint32_t maxBatchSize=DEFAULT_MAX_BATCH_SIZE, precisionType precision=TYPE_FASTEST, deviceType device=DEVICE_GPU, bool allowGPUFallback=true, nvinfer1::IInt8Calibrator* calibrator=NULL, cudaStream_t stream=NULL ); /** * Load a new network instance (this variant is used for UFF models) * @param prototxt File path to the deployable network prototxt * @param model File path to the caffemodel * @param mean File path to the mean value binary proto (NULL if none) * @param input_blob The name of the input blob data to the network. * @param input_dims The dimensions of the input blob (used for UFF). * @param output_blobs List of names of the output blobs from the network. * @param maxBatchSize The maximum batch size that the network will be optimized for. */ bool LoadNetwork( const char* prototxt, const char* model, const char* mean, const char* input_blob, const Dims3& input_dims, const std::vector<std::string>& output_blobs, uint32_t maxBatchSize=DEFAULT_MAX_BATCH_SIZE, precisionType precision=TYPE_FASTEST, deviceType device=DEVICE_GPU, bool allowGPUFallback=true, nvinfer1::IInt8Calibrator* calibrator=NULL, cudaStream_t stream=NULL ); /** * Manually enable layer profiling times. */ void EnableLayerProfiler(); /** * Manually enable debug messages and synchronization. */ void EnableDebug(); /** * Return true if GPU fallback is enabled. */ inline bool AllowGPUFallback() const { return mAllowGPUFallback; } /** * Retrieve the device being used for execution. */ inline deviceType GetDevice() const { return mDevice; } /** * Retrieve the type of precision being used. */ inline precisionType GetPrecision() const { return mPrecision; } /** * Check if a particular precision is being used. */ inline bool IsPrecision( precisionType type ) const { return (mPrecision == type); } /** * Determine the fastest native precision on a device. */ static precisionType FindFastestPrecision( deviceType device=DEVICE_GPU, bool allowInt8=true ); /** * Detect the precisions supported natively on a device. */ static std::vector<precisionType> DetectNativePrecisions( deviceType device=DEVICE_GPU ); /** * Detect if a particular precision is supported natively. */ static bool DetectNativePrecision( const std::vector<precisionType>& nativeTypes, precisionType type ); /** * Detect if a particular precision is supported natively. */ static bool DetectNativePrecision( precisionType precision, deviceType device=DEVICE_GPU ); /** * Retrieve the stream that the device is operating on. */ inline cudaStream_t GetStream() const { return mStream; } /** * Create and use a new stream for execution. */ cudaStream_t CreateStream( bool nonBlocking=true ); /** * Set the stream that the device is operating on. */ void SetStream( cudaStream_t stream ); /** * Retrieve the path to the network prototxt file. */ inline const char* GetPrototxtPath() const { return mPrototxtPath.c_str(); } /** * Retrieve the path to the network model file. */ inline const char* GetModelPath() const { return mModelPath.c_str(); } /** * Retrieve the format of the network model. */ inline modelType GetModelType() const { return mModelType; } /** * Return true if the model is of the specified format. */ inline bool IsModelType( modelType type ) const { return (mModelType == type); } /** * Retrieve the network frames per second (FPS). */ inline float GetNetworkFPS() { return 1000.0f / GetNetworkTime(); } /** * Retrieve the network runtime (in milliseconds). */ inline float GetNetworkTime() { return GetProfilerTime(PROFILER_NETWORK, PROFILER_CUDA); } /** * Retrieve the profiler runtime (in milliseconds). */ inline float2 GetProfilerTime( profilerQuery query ) { PROFILER_QUERY(query); return mProfilerTimes[query]; } /** * Retrieve the profiler runtime (in milliseconds). */ inline float GetProfilerTime( profilerQuery query, profilerDevice device ) { PROFILER_QUERY(query); return (device == PROFILER_CPU) ? mProfilerTimes[query].x : mProfilerTimes[query].y; } /** * Print the profiler times (in millseconds). */ inline void PrintProfilerTimes() { printf("\n"); printf(LOG_TRT "------------------------------------------------\n"); printf(LOG_TRT "Timing Report %s\n", GetModelPath()); printf(LOG_TRT "------------------------------------------------\n"); for( uint32_t n=0; n <= PROFILER_TOTAL; n++ ) { const profilerQuery query = (profilerQuery)n; if( PROFILER_QUERY(query) ) printf(LOG_TRT "%-12s CPU %9.5fms CUDA %9.5fms\n", profilerQueryToStr(query), mProfilerTimes[n].x, mProfilerTimes[n].y); } printf(LOG_TRT "------------------------------------------------\n\n"); static bool first_run=true; if( first_run ) { printf(LOG_TRT "note -- when processing a single image, run 'sudo jetson_clocks' before\n" " to disable DVFS for more accurate profiling/timing measurements\n\n"); first_run = false; } } protected: /** * Constructor. */ tensorNet(); /** * Create and output an optimized network model * @note this function is automatically used by LoadNetwork, but also can * be used individually to perform the network operations offline. * @param deployFile name for network prototxt * @param modelFile name for model * @param outputs network outputs * @param maxBatchSize maximum batch size * @param modelStream output model stream */ bool ProfileModel( const std::string& deployFile, const std::string& modelFile, const char* input, const Dims3& inputDims, const std::vector<std::string>& outputs, uint32_t maxBatchSize, precisionType precision, deviceType device, bool allowGPUFallback, nvinfer1::IInt8Calibrator* calibrator, std::ostream& modelStream); /** * Logger class for GIE info/warning/errors */ class Logger : public nvinfer1::ILogger { void log( Severity severity, const char* msg ) override { if( severity != Severity::kINFO /*|| mEnableDebug*/ ) printf(LOG_TRT "%s\n", msg); } } gLogger; /** * Profiler interface for measuring layer timings */ class Profiler : public nvinfer1::IProfiler { public: Profiler() : timingAccumulator(0.0f) { } virtual void reportLayerTime(const char* layerName, float ms) { printf(LOG_TRT "layer %s - %f ms\n", layerName, ms); timingAccumulator += ms; } float timingAccumulator; } gProfiler; /** * Begin a profiling query, before network is run */ inline void PROFILER_BEGIN( profilerQuery query ) { const uint32_t evt = query*2; const uint32_t flag = (1 << query); CUDA(cudaEventRecord(mEventsGPU[evt], mStream)); timestamp(&mEventsCPU[evt]); mProfilerQueriesUsed |= flag; mProfilerQueriesDone &= ~flag; } /** * End a profiling query, after the network is run */ inline void PROFILER_END( profilerQuery query ) { const uint32_t evt = query*2+1; CUDA(cudaEventRecord(mEventsGPU[evt])); timestamp(&mEventsCPU[evt]); timespec cpuTime; timeDiff(mEventsCPU[evt-1], mEventsCPU[evt], &cpuTime); mProfilerTimes[query].x = timeFloat(cpuTime); if( mEnableProfiler && query == PROFILER_NETWORK ) { printf(LOG_TRT "layer network time - %f ms\n", gProfiler.timingAccumulator); gProfiler.timingAccumulator = 0.0f; printf(LOG_TRT "note -- when processing a single image, run 'sudo jetson_clocks' before\n" " to disable DVFS for more accurate profiling/timing measurements\n"); } } /** * Query the CUDA part of a profiler query. */ inline bool PROFILER_QUERY( profilerQuery query ) { const uint32_t flag = (1 << query); if( query == PROFILER_TOTAL ) { mProfilerTimes[PROFILER_TOTAL].x = 0.0f; mProfilerTimes[PROFILER_TOTAL].y = 0.0f; for( uint32_t n=0; n < PROFILER_TOTAL; n++ ) { if( PROFILER_QUERY((profilerQuery)n) ) { mProfilerTimes[PROFILER_TOTAL].x += mProfilerTimes[n].x; mProfilerTimes[PROFILER_TOTAL].y += mProfilerTimes[n].y; } } return true; } else if( mProfilerQueriesUsed & flag ) { if( !(mProfilerQueriesDone & flag) ) { const uint32_t evt = query*2; float cuda_time = 0.0f; CUDA(cudaEventElapsedTime(&cuda_time, mEventsGPU[evt], mEventsGPU[evt+1])); mProfilerTimes[query].y = cuda_time; mProfilerQueriesDone |= flag; //mProfilerQueriesUsed &= ~flag; } return true; } return false; } protected: /* Member Variables */ std::string mPrototxtPath; std::string mModelPath; std::string mMeanPath; std::string mInputBlobName; std::string mCacheEnginePath; std::string mCacheCalibrationPath; deviceType mDevice; precisionType mPrecision; modelType mModelType; cudaStream_t mStream; cudaEvent_t mEventsGPU[PROFILER_TOTAL * 2]; timespec mEventsCPU[PROFILER_TOTAL * 2]; nvinfer1::IRuntime* mInfer; nvinfer1::ICudaEngine* mEngine; nvinfer1::IExecutionContext* mContext; uint32_t mWidth; uint32_t mHeight; uint32_t mInputSize; float* mInputCPU; float* mInputCUDA; float2 mProfilerTimes[PROFILER_TOTAL + 1]; uint32_t mProfilerQueriesUsed; uint32_t mProfilerQueriesDone; uint32_t mMaxBatchSize; bool mEnableProfiler; bool mEnableDebug; bool mAllowGPUFallback; Dims3 mInputDims; struct outputLayer { std::string name; Dims3 dims; uint32_t size; float* CPU; float* CUDA; }; std::vector<outputLayer> mOutputs; }; #endif
[ "dustinf@nvidia.com" ]
dustinf@nvidia.com
5831e92e22aaad4a46fa1ec73cb730e22d2b5dba
f0a739dda86d11b615d4225662dcd89b65b3d01a
/MapEditor/Direct3D/TestModel/ModelBoneWeights.h
b5065ba311be81a03d4c3a7fd69efe3ca4841326
[]
no_license
kbm0818/Portfolio
173d3de48902083cf575c3231448fb6dc0ab4bc3
dc4df24bb629379d55bfa15a84cd0fc6e8dc757f
refs/heads/master
2020-03-28T22:49:21.942143
2018-10-02T07:33:35
2018-10-02T07:33:35
149,260,142
0
0
null
null
null
null
UHC
C++
false
false
2,117
h
#pragma once #include "BinaryInputOutputHandler.h" /******************************************************************************** @brief 각 Vertex에 영향을 미치는 Bone Index와 영향을 미치는 정도인 Wieght를 저장하는 Class 각 Vertex는 최대 4개의 BoneWeight를 가질수 있으며, Bone Index와 Bone Weight는 vector4의 형태로 Vertex Data에 저장된다. 최종적인 Vertex 정보에 이 Weights값 들이 Blending 되어 적용된다. ********************************************************************************/ struct ModelBlendWeights { D3DXVECTOR4 BlendIndices; D3DXVECTOR4 BlendWeights; ModelBlendWeights() { BlendIndices = D3DXVECTOR4(0.0f, 0.0f, 0.0f, 0.0f); BlendWeights = D3DXVECTOR4(0.0f, 0.0f, 0.0f, 0.0f); } void SetBlendWeight(int nIndex, int nBoneIndex, float fWeight) { switch (nIndex) { case 0: BlendIndices.x = (float)nBoneIndex; BlendWeights.x = fWeight; break; case 1: BlendIndices.y = (float)nBoneIndex; BlendWeights.y = fWeight; break; case 2: BlendIndices.z = (float)nBoneIndex; BlendWeights.z = fWeight; break; case 3: BlendIndices.w = (float)nBoneIndex; BlendWeights.w = fWeight; break; } } }; class ModelBoneWeights { public: ModelBoneWeights(); ModelBoneWeights(const ModelBoneWeights& otherModelBoneWeights); ~ModelBoneWeights(); static const UINT MaxBonesPerVertex; /// 한 Vertex에 영향을 미치는 최대 Bone의 수 static const UINT MaxBonesPerMax; /// 최대 Bone의 수 void AddBoneWeight(int boneIndex, float boneWeight); void AddBoneWeight(pair<int, float> boneWeightPair); void AddBoneWeights(const ModelBoneWeights& boneWeights); void Validate(); void Normalize(); int GetBoneWeightCount() const { return boneWeights.size(); } pair<int, float> GetBoneWeight(int index) const { return boneWeights[index]; } ModelBlendWeights GetBlendWeights(); private: float sumWeight; /// 한 Vertex에 영향을 주는 모든 Wieght의 합 vector<pair<int, float>> boneWeights; /// Bone Index와 Weight값을 Pair를 저장하는 벡터 };
[ "kbm0818@naver.com" ]
kbm0818@naver.com
b7ed9089feed0cb42b94e3f90ea8f5cfffcbbdc5
5e8d200078e64b97e3bbd1e61f83cb5bae99ab6e
/main/source/src/protocols/canonical_sampling/MultiTemperatureTrialCounter.hh
bf4feeeca8b0ce8eefd65fd52042523ef6048ba6
[]
no_license
MedicaicloudLink/Rosetta
3ee2d79d48b31bd8ca898036ad32fe910c9a7a28
01affdf77abb773ed375b83cdbbf58439edd8719
refs/heads/master
2020-12-07T17:52:01.350906
2020-01-10T08:24:09
2020-01-10T08:24:09
232,757,729
2
6
null
null
null
null
UTF-8
C++
false
false
3,391
hh
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- // vi: set ts=2 noet: // // (c) Copyright Rosetta Commons Member Institutions. // (c) This file is part of the Rosetta software suite and is made available under license. // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons. // (c) For more information, see http://www.rosettacommons.org. Questions about this can be // (c) addressed to University of Washington CoMotion, email: license@uw.edu. /// @file /protocols/canonical_sampling/MultiTemperatureTrialCounter.hh /// @brief /// @author Oliver Lange #ifndef INCLUDED_protocols_canonical_sampling_MultiTemperatureTrialCounter_hh #define INCLUDED_protocols_canonical_sampling_MultiTemperatureTrialCounter_hh // Unit Headers #include <protocols/canonical_sampling/TemperatureController.hh> #include <protocols/moves/TrialCounter.hh> // Utility Headers #include <core/types.hh> #include <utility/vector1.hh> namespace protocols { namespace canonical_sampling { /// @brief Keep track of trial statistics for any number of replicas. /// @details This class helps MetropolisHastingsMover keep track of move /// statistics. At the end of a simulation, operator[]() can be used to access /// the TrialCounter objects kept for each temperature level. Alternatively, /// the show() and write_to_file() methods can also be used to directly output /// acceptance rates to a stream or file. class MultiTemperatureTrialCounter { public: /// @brief Default constructor. A temperature controller must be set before /// the trial counter can be used. MultiTemperatureTrialCounter() {}; /// @brief Fully construct the counter with a temperature controller. MultiTemperatureTrialCounter( TemperatureController const * ); /// @brief Set all counters for all temperatures to zero. void reset(); /// @brief Note that a move of the given type was attempted. void count_trial( std::string const& ); /// @brief Note that a move of the given type was accepted. void count_accepted( std::string const& ); /// @brief Note that a move of the given type led to the given energy drop. void count_energy_drop( std::string const&, core::Real ); /// @brief Return const access to the TrialCounter for the given temperature /// level. protocols::moves::TrialCounter const& operator[]( core::Size ) const; /// @brief Return non-const access to the TrialCounter for the given /// temperature level. protocols::moves::TrialCounter& operator[]( core::Size ); /// @brief Write acceptance rates for each move at each temperature to the /// given stream. void show( std::ostream& ) const; /// @brief Write acceptance rates for each move at each temperature to this /// module's tracer. void show() const; /// @brief Write acceptance rates for each move at each temperature to the /// given file. void write_to_file( std::string const& file, std::string const& tag ) const; /// @brief Set the temperature controller. void set_temperature_observer( TemperatureController const * ); private: /// @brief Help write the trial counters to the given stream. /// @see show() /// @see write_to_file() void _write_to_stream( std::ostream&, std::string const& tag ) const; TemperatureController const * tempering_; utility::vector1< protocols::moves::TrialCounter > counters_; }; } } #endif
[ "36790013+MedicaicloudLink@users.noreply.github.com" ]
36790013+MedicaicloudLink@users.noreply.github.com
4dd38240dac37122141cb3b5c1514d1070c87b8d
297952a5412cf123a642c3fc6814039800129f0b
/main.cpp
7230983c5106bd2e974ea54ab594ed1790808d9f
[]
no_license
NotAMorningSpartan/BunnySimulation
89891c2c5498af044339219ea318364a88ec2106
54df6bd7212b9b86fbd817797bb5c80b11a1a356
refs/heads/main
2023-03-27T00:38:28.651953
2021-03-18T09:18:49
2021-03-18T09:18:49
346,923,836
0
0
null
null
null
null
UTF-8
C++
false
false
203
cpp
//Tyler Kness-Miller //CS4499 - Scientific Computing //18 March 2021 #include "BunnySimulation.h" int main(){ Simulation s = Simulation(); srand(time(0)); s.runSimulation(); return 0; }
[ "tylerkm75@gmail.com" ]
tylerkm75@gmail.com
0836ad240fd843ce4d446fea4bb276f34d353f9e
3e9df7ab57d6365f46d877cbb0ddd53b0a273cd2
/Ex3_4_1_菜单栏/Form1.h
47576ce9a14325cfe4ebd6f972d6c268ab3175eb
[]
no_license
colesmith/ElementaryEditor
657f3027699ad3d9c75189a8808e41a6c617875d
be1a7a7984f87477aa7b15d2d70f8f03a394c5af
refs/heads/master
2021-01-23T12:16:57.835167
2015-03-10T08:21:18
2015-03-10T08:21:18
31,939,587
0
0
null
null
null
null
GB18030
C++
false
false
17,972
h
#pragma once namespace Ex3_4_1_菜单栏 { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; /// <summary> /// Form1 摘要 /// </summary> public ref class Form1 : public System::Windows::Forms::Form { public: Form1(void) { InitializeComponent(); // //TODO: 在此处添加构造函数代码 // } protected: /// <summary> /// 清理所有正在使用的资源。 /// </summary> ~Form1() { if (components) { delete components; } } private: System::Windows::Forms::MenuStrip^ menuPanel; protected: protected: private: System::Windows::Forms::ToolStripMenuItem^ file; private: System::Windows::Forms::ToolStripMenuItem^ fileNew; private: System::Windows::Forms::ToolStripMenuItem^ fileOpen; private: System::Windows::Forms::ToolStripMenuItem^ fileSave; private: System::Windows::Forms::ToolStripMenuItem^ fileSaveAs; private: System::Windows::Forms::ToolStripMenuItem^ exit; private: System::Windows::Forms::ToolStripMenuItem^ 编辑ToolStripMenuItem; private: System::Windows::Forms::ToolStripMenuItem^ 格式OToolStripMenuItem; private: System::Windows::Forms::ToolStripMenuItem^ cancel; private: System::Windows::Forms::ToolStripMenuItem^ textCut; private: System::Windows::Forms::ToolStripMenuItem^ textCopy; private: System::Windows::Forms::ToolStripMenuItem^ 查看VToolStripMenuItem; private: System::Windows::Forms::ToolStripMenuItem^ about; private: System::Windows::Forms::ToolStripMenuItem^ textPaste; private: System::Windows::Forms::ToolStripMenuItem^ textDelete; private: System::Windows::Forms::ToolStripMenuItem^ textSearch; private: System::Windows::Forms::ToolStripMenuItem^ textSearchNext; private: System::Windows::Forms::ToolStripMenuItem^ textReplace; private: System::Windows::Forms::ToolStripMenuItem^ textGoTo; private: System::Windows::Forms::ToolStripMenuItem^ textSelectAll; private: System::Windows::Forms::ToolStripMenuItem^ textDateTime; private: System::Windows::Forms::ToolStripMenuItem^ textAutoIndent; private: System::Windows::Forms::ToolStripMenuItem^ textFont; private: System::Windows::Forms::ToolStripMenuItem^ statusLine; private: System::Windows::Forms::ToolStripMenuItem^ getHelp; private: System::Windows::Forms::ToolStripMenuItem^ 关于记事本AToolStripMenuItem; private: System::Windows::Forms::ToolStripMenuItem^ pageSetting; private: System::Windows::Forms::ToolStripMenuItem^ printer; private: System::Windows::Forms::StatusStrip^ statusPanel; private: System::Windows::Forms::ToolStripStatusLabel^ cursorCoordinate; private: System::Windows::Forms::ToolStripStatusLabel^ mouseCoordinate; private: System::Windows::Forms::ToolStripStatusLabel^ errorLog; private: /// <summary> /// 必需的设计器变量。 /// </summary> System::ComponentModel::Container ^components; #pragma region Windows Form Designer generated code /// <summary> /// 设计器支持所需的方法 - 不要 /// 使用代码编辑器修改此方法的内容。 /// </summary> void InitializeComponent(void) { this->menuPanel = (gcnew System::Windows::Forms::MenuStrip()); this->file = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->fileNew = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->fileOpen = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->fileSave = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->fileSaveAs = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->pageSetting = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->printer = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->exit = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->编辑ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->cancel = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->textCut = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->textCopy = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->textPaste = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->textDelete = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->textSearch = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->textSearchNext = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->textReplace = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->textGoTo = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->textSelectAll = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->textDateTime = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->格式OToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->textAutoIndent = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->textFont = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->查看VToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->statusLine = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->about = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->getHelp = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->关于记事本AToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); this->statusPanel = (gcnew System::Windows::Forms::StatusStrip()); this->cursorCoordinate = (gcnew System::Windows::Forms::ToolStripStatusLabel()); this->mouseCoordinate = (gcnew System::Windows::Forms::ToolStripStatusLabel()); this->errorLog = (gcnew System::Windows::Forms::ToolStripStatusLabel()); this->menuPanel->SuspendLayout(); this->statusPanel->SuspendLayout(); this->SuspendLayout(); // // menuPanel // this->menuPanel->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(5) {this->file, this->编辑ToolStripMenuItem, this->格式OToolStripMenuItem, this->查看VToolStripMenuItem, this->about}); this->menuPanel->Location = System::Drawing::Point(0, 0); this->menuPanel->Name = L"menuPanel"; this->menuPanel->Size = System::Drawing::Size(732, 24); this->menuPanel->TabIndex = 0; this->menuPanel->Text = L"菜单栏"; // // file // this->file->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(7) {this->fileNew, this->fileOpen, this->fileSave, this->fileSaveAs, this->pageSetting, this->printer, this->exit}); this->file->Name = L"file"; this->file->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Alt | System::Windows::Forms::Keys::F)); this->file->Size = System::Drawing::Size(57, 20); this->file->Text = L"文件(F)"; // // fileNew // this->fileNew->Name = L"fileNew"; this->fileNew->ShortcutKeys = static_cast<System::Windows::Forms::Keys>(((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::Alt) | System::Windows::Forms::Keys::N)); this->fileNew->Size = System::Drawing::Size(168, 22); this->fileNew->Text = L"新建"; this->fileNew->Click += gcnew System::EventHandler(this, &Form1::fileNew_Click); // // fileOpen // this->fileOpen->Name = L"fileOpen"; this->fileOpen->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::O)); this->fileOpen->Size = System::Drawing::Size(168, 22); this->fileOpen->Text = L"打开"; this->fileOpen->Click += gcnew System::EventHandler(this, &Form1::fileOpen_Click); // // fileSave // this->fileSave->Name = L"fileSave"; this->fileSave->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::S)); this->fileSave->Size = System::Drawing::Size(168, 22); this->fileSave->Text = L"保存"; this->fileSave->Click += gcnew System::EventHandler(this, &Form1::fileSave_Click); // // fileSaveAs // this->fileSaveAs->Name = L"fileSaveAs"; this->fileSaveAs->Size = System::Drawing::Size(168, 22); this->fileSaveAs->Text = L"另存为(A)"; this->fileSaveAs->Click += gcnew System::EventHandler(this, &Form1::fileSaveAs_Click); // // pageSetting // this->pageSetting->Name = L"pageSetting"; this->pageSetting->Size = System::Drawing::Size(168, 22); this->pageSetting->Text = L"页面设置(U)"; // // printer // this->printer->Name = L"printer"; this->printer->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::P)); this->printer->Size = System::Drawing::Size(168, 22); this->printer->Text = L"打印(P)"; // // exit // this->exit->Name = L"exit"; this->exit->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Alt | System::Windows::Forms::Keys::F4)); this->exit->Size = System::Drawing::Size(168, 22); this->exit->Text = L"退出"; // // 编辑ToolStripMenuItem // this->编辑ToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(11) {this->cancel, this->textCut, this->textCopy, this->textPaste, this->textDelete, this->textSearch, this->textSearchNext, this->textReplace, this->textGoTo, this->textSelectAll, this->textDateTime}); this->编辑ToolStripMenuItem->Name = L"编辑ToolStripMenuItem"; this->编辑ToolStripMenuItem->Size = System::Drawing::Size(58, 20); this->编辑ToolStripMenuItem->Text = L"编辑(E)"; this->编辑ToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::编辑ToolStripMenuItem_Click); // // cancel // this->cancel->Name = L"cancel"; this->cancel->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::Z)); this->cancel->Size = System::Drawing::Size(172, 22); this->cancel->Text = L"撤销(U)"; // // textCut // this->textCut->Name = L"textCut"; this->textCut->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::X)); this->textCut->Size = System::Drawing::Size(172, 22); this->textCut->Text = L"剪切(T)"; // // textCopy // this->textCopy->Name = L"textCopy"; this->textCopy->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::C)); this->textCopy->Size = System::Drawing::Size(172, 22); this->textCopy->Text = L"复制(C)"; // // textPaste // this->textPaste->Name = L"textPaste"; this->textPaste->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::V)); this->textPaste->Size = System::Drawing::Size(172, 22); this->textPaste->Text = L"粘贴(P)"; // // textDelete // this->textDelete->Name = L"textDelete"; this->textDelete->ShortcutKeys = System::Windows::Forms::Keys::Delete; this->textDelete->Size = System::Drawing::Size(172, 22); this->textDelete->Text = L"删除(L)"; // // textSearch // this->textSearch->Name = L"textSearch"; this->textSearch->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::F)); this->textSearch->Size = System::Drawing::Size(172, 22); this->textSearch->Text = L"查找(F)"; // // textSearchNext // this->textSearchNext->Name = L"textSearchNext"; this->textSearchNext->ShortcutKeys = System::Windows::Forms::Keys::F3; this->textSearchNext->Size = System::Drawing::Size(172, 22); this->textSearchNext->Text = L"查找下一个(N)"; // // textReplace // this->textReplace->Name = L"textReplace"; this->textReplace->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::H)); this->textReplace->Size = System::Drawing::Size(172, 22); this->textReplace->Text = L"替换(R)"; // // textGoTo // this->textGoTo->Name = L"textGoTo"; this->textGoTo->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::G)); this->textGoTo->Size = System::Drawing::Size(172, 22); this->textGoTo->Text = L"转到(G)"; // // textSelectAll // this->textSelectAll->Name = L"textSelectAll"; this->textSelectAll->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::A)); this->textSelectAll->Size = System::Drawing::Size(172, 22); this->textSelectAll->Text = L"全选(A)"; // // textDateTime // this->textDateTime->Name = L"textDateTime"; this->textDateTime->ShortcutKeys = System::Windows::Forms::Keys::F5; this->textDateTime->Size = System::Drawing::Size(172, 22); this->textDateTime->Text = L"时间/日期(D)"; // // 格式OToolStripMenuItem // this->格式OToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(2) {this->textAutoIndent, this->textFont}); this->格式OToolStripMenuItem->Name = L"格式OToolStripMenuItem"; this->格式OToolStripMenuItem->Size = System::Drawing::Size(61, 20); this->格式OToolStripMenuItem->Text = L"格式(O)"; // // textAutoIndent // this->textAutoIndent->Name = L"textAutoIndent"; this->textAutoIndent->Size = System::Drawing::Size(142, 22); this->textAutoIndent->Text = L"自行换行(W)"; // // textFont // this->textFont->Name = L"textFont"; this->textFont->Size = System::Drawing::Size(142, 22); this->textFont->Text = L"字体(F)"; // // 查看VToolStripMenuItem // this->查看VToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(1) {this->statusLine}); this->查看VToolStripMenuItem->Name = L"查看VToolStripMenuItem"; this->查看VToolStripMenuItem->Size = System::Drawing::Size(59, 20); this->查看VToolStripMenuItem->Text = L"查看(V)"; // // statusLine // this->statusLine->Name = L"statusLine"; this->statusLine->Size = System::Drawing::Size(125, 22); this->statusLine->Text = L"状态栏(S)"; // // about // this->about->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(2) {this->getHelp, this->关于记事本AToolStripMenuItem}); this->about->Name = L"about"; this->about->Size = System::Drawing::Size(60, 20); this->about->Text = L"帮助(H)"; // // getHelp // this->getHelp->Name = L"getHelp"; this->getHelp->Size = System::Drawing::Size(150, 22); this->getHelp->Text = L"查看帮助(H)"; this->getHelp->Click += gcnew System::EventHandler(this, &Form1::查看帮助ToolStripMenuItem_Click); // // 关于记事本AToolStripMenuItem // this->关于记事本AToolStripMenuItem->Name = L"关于记事本AToolStripMenuItem"; this->关于记事本AToolStripMenuItem->Size = System::Drawing::Size(150, 22); this->关于记事本AToolStripMenuItem->Text = L"关于记事本(A)"; // // statusPanel // this->statusPanel->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(3) {this->cursorCoordinate, this->mouseCoordinate, this->errorLog}); this->statusPanel->Location = System::Drawing::Point(0, 415); this->statusPanel->Name = L"statusPanel"; this->statusPanel->Size = System::Drawing::Size(732, 22); this->statusPanel->TabIndex = 1; this->statusPanel->Text = L"状态栏"; // // cursorCoordinate // this->cursorCoordinate->Name = L"cursorCoordinate"; this->cursorCoordinate->Size = System::Drawing::Size(81, 17); this->cursorCoordinate->Text = L"Line: 0 Col: 0"; // // mouseCoordinate // this->mouseCoordinate->Name = L"mouseCoordinate"; this->mouseCoordinate->Size = System::Drawing::Size(46, 17); this->mouseCoordinate->Text = L"X:0 Y:0"; // // errorLog // this->errorLog->Name = L"errorLog"; this->errorLog->Size = System::Drawing::Size(53, 17); this->errorLog->Text = L"Error: ..."; // // Form1 // this->AutoScaleDimensions = System::Drawing::SizeF(6, 12); this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; this->ClientSize = System::Drawing::Size(732, 437); this->Controls->Add(this->statusPanel); this->Controls->Add(this->menuPanel); this->MainMenuStrip = this->menuPanel; this->Name = L"Form1"; this->StartPosition = System::Windows::Forms::FormStartPosition::CenterScreen; this->Text = L"Elementary Editor"; this->menuPanel->ResumeLayout(false); this->menuPanel->PerformLayout(); this->statusPanel->ResumeLayout(false); this->statusPanel->PerformLayout(); this->ResumeLayout(false); this->PerformLayout(); } #pragma endregion private: System::Void fileNew_Click(System::Object^ sender, System::EventArgs^ e) { MessageBox::Show(L"新建文件"); } private: System::Void fileOpen_Click(System::Object^ sender, System::EventArgs^ e) { MessageBox::Show(L"打开文件"); } private: System::Void fileSave_Click(System::Object^ sender, System::EventArgs^ e) { MessageBox::Show(L"保存文件"); } private: System::Void fileSaveAs_Click(System::Object^ sender, System::EventArgs^ e) { MessageBox::Show(L"另存为"); } private: System::Void 编辑ToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) { } private: System::Void 查看帮助ToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) { } }; }
[ "uniquecolesmith@gmail.com" ]
uniquecolesmith@gmail.com
4ae98b7b5aad20b303df9375e88cc1f5d402ebe0
0aaa8f7c18d6d03a58f29e873c30eb8e7690efe1
/Megaman/CCutManBullet.h
53806773bd60e5841a5d8ba82eee010501b76dd4
[]
no_license
hyubyn/RockMan-Summer
19a096910ab156855ce6813b38acff287a4013c9
7de2fda1d056779bb568974774a05def44826e27
refs/heads/master
2021-01-01T17:32:04.285598
2015-08-21T16:52:46
2015-08-21T16:52:46
39,303,101
0
0
null
null
null
null
UTF-8
C++
false
false
1,470
h
#ifndef _CCUTMAN_BULLET_ #define _CCUTMAN_BULLET_ #include "CBullet.h" #include "CSprite.h" class CCutManBullet : public CBullet { public: CCutManBullet(int id, int typeID, CSprite sprite, int dame, D3DXVECTOR2 v, D3DXVECTOR2 beginPosition); ~CCutManBullet(); int Initlize() override; void Render(CTimer* gameTime, MGraphic* graphics) override; void Update(CTimer* gameTime) override; void UpdateBox(); void OnCollideWith(CGameObject *gameObject, CDirection normalX, CDirection normalY, float deltaTime) override; //----------------------------------------------------------------------------- // Phương thức tạo ẩn viên đạn và restar lại các thuộc tính // //----------------------------------------------------------------------------- void Hide(); //----------------------------------------------------------------------------- // Phương thức hủy viên đạn // //----------------------------------------------------------------------------- void setState(); D3DXVECTOR2 _posRockMan; // Vị trí của rock man khi nó đứng D3DXVECTOR2 _posCutMan; // Vị trí của cut man khi nó đứng double _spBulletAndCutMan; // Khoảng cách giữa đạn và cut man bool _isReverse; bool _isHide;// ẩn viên đạn khi viên đạn trở về. private: float _speed; // tốc độ của đạn. void Fire(double d); void CheckDirectionBullet(); CMoveableObject* _master; }; #endif //_CCUTMAN_BULLET_
[ "tai.cnpmk06@gmail.com" ]
tai.cnpmk06@gmail.com
d346149aafc98d355b68baaa6924c34084307baf
48d4cc56a3494276df563013e46cc29c22931bcf
/vs2017/sdk/pc_win/include/interface/IGroupService.h
ec900670fe9e67072fbe1706ed5804aaf93be6fb
[ "MIT" ]
permissive
cheechang/cppcc
8e8fde9eedc84641b3bc64efac116a32471ffa1d
0292e9a9b27e0579970c83b4f6a75dcdae1558bf
refs/heads/main
2023-03-16T23:09:56.725184
2021-03-05T09:46:28
2021-03-05T09:46:28
344,737,972
0
2
null
null
null
null
UTF-8
C++
false
false
10,553
h
#pragma once #include "../model/Group.h" #include"../model/Packet.h" #include "../model/Member.h" #include "IService.h" #include <string> #include <vector> #define VER_GROUP INTERFACE_VERSION(1,0) static const VRVIID IID_IGroupService = { 0x6df7882f, 0x5ab3, 0x4326, 0x4d, 0xd2, 0xaf, 0x3f, 0xb2, 0xd1, 0xa2, 0x16 }; namespace service { class IGroupService : public IService { public: virtual ~IGroupService(){} /*****************************************注册通知回调*******************************************/ /** * \brief 监听群头像更新 * @param[in] _1 群ID * @param[in] _2 传入头像 */ virtual void regGroupHeadImgUpdateCb(SFunction < void(int64, const std::string&) > cb) = 0; /** * \brief 监听群成员头像更新 * @param[in] _1 群成员ID * @param[in] _2 传入头像 */ virtual void regMemberHeadImgUpdateCb(SFunction < void(int64, const std::string&) > cb) = 0; /** * \brief 监听群背景更新 * @param[in] _1 群ID * @param[in] _2 传入头像 */ virtual void regGroupBackImgUpdateCb(SFunction < void(int64, const std::string&) > cb) = 0; /** * \brief 设置监听群信息更新的回调 * @param[in] _1 操作类型 1.添加 2.更新,31.解散 32.移除 33.退出 * @param[in] _2 群信息 */ virtual void regGroupRefreshCb(SFunction< void(int8, const Group&) > cb) = 0; /** * \brief 设置监听群主更新的回调 * @param[in] _1 群主ID * @param[in] _2 群主名 * @param[in] _3 群ID * @param[in] _4 群名 */ virtual void regTransferGroupCb(SFunction< void(int64, const std::string&, int64, const std::string&) > cb) = 0; /** * \brief 设置监听群成员信息更新的回调 * @param[in] _1 群ID * @param[in] _2 群成员信息 */ virtual void regGrpMemInfoRefreshCb(SFunction< void(int64, const Member&) > cb) = 0; /** * \brief 设置群成员列表更新的回调 * @param[in] _1 操作类型 1 添加, 32 移除, 33 退出 * @param[in] _2 群ID * @param[in] _3 变更的群成员集合 */ virtual void regGrpMemRefreshCb(SFunction< void(int, int64, std::vector<SSharedPtr<Member> >&) > cb) = 0; /** * \brief 设置获取群成员列表的回调 * @param[in] _1 错误信息,不使用,只是为了和getMemberList回调函数一致 * @param[in] _2 群成员列表 */ virtual void regGetGrpMemListCb(SFunction<void(ErrorInfo, std::vector<SSharedPtr<Member> >&)> cb) = 0; /** * \brief 监听群列表刷新 * @param[in] _1 群列表 */ virtual void regGroupListCb(SFunction< void(std::vector<SSharedPtr<TinyGroup> >&) > cb) = 0; /*****************************************请求接口*******************************************/ /** * \brief 创建群 * @param[in] level 传入群等级 1.临时群,2.普通群 * @param[in] name 传入群名称 * @param[in] members 传入群成员 * @param[in] cb 传入接收结果回调 _1错误信息 _2群ID */ virtual void createGroup(int level, const std::string &name, std::vector<int64> &members, SFunction<void(ErrorInfo, int64)> cb) = 0; /** * \brief 加群 * @param[in] groupid 传入群id * @param[in] verify_info 传入验证信息 * @param[in] cb 传入接收结果回调 _1错误信息 */ virtual void addGroup(int64 groupid, const std::string &verify_info, SFunction<void(ErrorInfo)> cb) = 0; /** * \brief 解散群 * @param[in] type 传入操作类型 1 群主解散群,2 群成员退群 * @param[in] groupid 传入群id * @param[in] cb 传入接收结果回调 _1错误信息 */ virtual void removeGroup(int type, int64 groupid, SFunction<void(ErrorInfo)> cb) = 0; /** * \brief 转让群 * @param[in] groupid 传入群id * @param[in] userid 传入新群主的id * @param[in] cb 传入接收结果回调 _1错误信息 */ virtual void transferGroup(int64 groupid, int64 userid, SFunction<void(ErrorInfo)> cb) = 0; /** * \brief 获取群设置 * @param[in] groupid 传入群id * @param[in] cb 传入接收结果回调 _1错误信息 \n * _2 验证类型: 1.不允许任何人添加, 2.需要验证信息, 3.允许任何人添加.\n * _3 是否允许群成员邀请好友加入群: 1.允许 2.不允许. */ virtual void getGroupSet(int64 groupid, SFunction<void(ErrorInfo, int8, int8)> cb) = 0; /** * \brief 设置群设置 * @param[in] groupid 传入群id * @param[in] verify_type 传入验证类型 1:不允许任何人添加,2:需要验证信息,3:允许任何人添加 * @param[in] is_allow 传入是否允许成员邀请用户 1,允许 2,不允许 isAllow * @param[in] cb 传入接收结果回调 _1错误信息 */ virtual void setGroupSet(int64 groupid, int8 verify_type, int8 is_allow, SFunction<void(ErrorInfo)> cb) = 0; /** * \brief 获取群信息 (同步接口) * @param[in] groupid 传入群id * @param[out] groupInfo 群信息 */ virtual void getGroupInfo(int64 groupid, Group& groupInfo) = 0; /** * \brief 设置群信息 * @param[in] groupId 设置的群ID * @param[in] group 可设置的群信息 * @param[in] cb 传入接收结果回调 _1错误信息 */ virtual void setGroupInfo(int64 groupId, GroupUpdate &group, SFunction<void(ErrorInfo)> cb) = 0; /** * \brief 获取群列表 (同步接口) * @param[in] cb 传入接收结果回调 _1群信息集合; */ virtual void getGroupList(std::vector<SSharedPtr<TinyGroup> > &groups) = 0; /** * \brief 邀请群成员 * @param[in] groupid 传入群id * @param[in] members 传入成员名单 * @param[in] cb 传入接收结果回调 _1错误信息 */ virtual void inviteMember(int64 groupid,std::vector<int64> &members,SFunction<void(ErrorInfo)> cb) = 0; /** * \brief 移除群成员 * @param[in] groupid 传入群id * @param[in] userid 传入需要移除的成员id * @param[in] cb 传入接收结果回调 _1错误信息 */ virtual void removeMember(int64 groupid, int64 userid, SFunction<void(ErrorInfo)> cb) = 0; /** * \brief 批量移除群成员 * @param[in] groupid 传入群id * @param[in] userids 传入需要移除的成员id集合 * @param[in] cb 传入接收结果回调 _1错误信息 */ virtual void removeMembers(int64 groupid, std::vector<int64> userids, SFunction<void(ErrorInfo)> cb) = 0; /** * \brief 设置群成员信息 * @param[in] member 传入成员信息 * @param[in] cb 传入接收结果回调 */ virtual void setMemberInfo(Member &member, SFunction<void(ErrorInfo)> cb) = 0; /** * \brief 判断用户是否在群里 (同步接口) * @param[in] groupid 传入群id * @param[in] userid 传入成员id * @return false代表不是群成员 */ virtual bool isInGroup(int64 groupId, int64 userId) = 0; /** * \brief 获取群成员信息 (同步接口) * @param[in] groupid 传入群id * @param[in] userid 传入成员id * @param[out] member返回成员信息 * @return false代表没有此信息 */ virtual bool getMemberInfo(int64 groupid, int64 userid, Member &member) = 0; /** * \brief 获取群成员列表 * @param[in] groupid 传入群id * @param[in] cb 传入接收结果回调 _1错误信息 _2群成员信息集合 */ virtual void getMemberList(int64 groupid, SFunction<void(ErrorInfo, std::vector<SSharedPtr<Member> >&)> cb) = 0; /** * \brief 获取群文件列表 * @param[in] groupid 传入群id * @param[in] beginid 传入起始id * @param[in] count 传入数量 * @param[in] flag 传入偏移标志0为向上1为向下 * @param[in] cb 传入接收结果回调 _1错误信息 _2文件信息集合 */ virtual void getGroupFileList(int64 groupid, int64 beginid, int count, int8 flag, SFunction<void(ErrorInfo, std::vector<Fileinfo>&)> cb) = 0; /** * \brief 删除群文件 * @param[in] files 传入群文件id * @param[in] groupId 传入群id * @param[in] cb 传入接收结果回调 _1错误信息 */ virtual void deleteGroupFile(std::vector<int64> &files, int64 groupId, SFunction<void(ErrorInfo)> cb) = 0; /** * \brief 获取个人群聊背景图片 * @param[in] groupId 群ID * @param[in] cb 传入接收结果回调 _1错误信息 _2图片URL */ virtual void getPersonalGroupImg(int64 groupId, SFunction<void(ErrorInfo, const std::string&)> cb) = 0; /** * \brief 设置个人群聊背景图片 * @param[in] groupId 群ID * @param[in] imgUrl 图片URL * @param[in] cb 传入接收结果回调 _1错误信息 */ virtual void setPersonalGroupImg(int64 groupId, const std::string &imgUrl, SFunction<void(ErrorInfo)> cb) = 0; /** * \brief 设置群消息免打扰模式 * @param[in] groupId 群ID * @param[in] mode 提醒模式 1:提示并接收消息;2:不提示,接收仅显示数目;3:屏蔽消息 * @param[in] cb 传入接收结果回调 _1错误信息 */ virtual void setGroupMsgRemindType(int64 groupId, int8 mode , SFunction<void(ErrorInfo)> cb) = 0; /** * \brief 获取群消息免打扰模式 * @param[in] groupId 群ID * @param[in] cb 传入接收结果回调 _1错误信息 _2提醒模式 1:提示并接收消息;2:不提示,接收仅显示数目;3:屏蔽消息 */ virtual void getGroupMsgRemindType(int64 groupId, SFunction<void(ErrorInfo, int8)> cb) = 0; /** * \brief 设置群消息内容模式和V标 * @param[in] groupId 群ID * @param[in] vSign 群V标 0为非v标群,1为v标群 -1为不设置 * @param[in] msgContentMode 群通知消息内容模式: 1、通知详情 2、通知源,隐藏内容 3、完全隐藏 -1为不设置 * @param[in] cb 传入接收结果回调 _1错误信息 _2提醒模式 */ virtual void setGroupExtraInfo(int64 groupId, int8 vSign, int8 msgContentMode, SFunction<void(ErrorInfo)> cb) = 0; /** * \brief 从网络获取群成员信息 * @param[in] groupId 群ID * @param[in] memberId 群成员id * @param[in] cb 传入接收结果回调 _1错误信息 _2成员信息 */ virtual void getGroupMemberFromNet(int64 groupId, int64 memberID, SFunction<void(ErrorInfo, Member&)> cb) = 0; /** * \brief 批量获取群成员 * @param[in] groupId 群ID * @param[in] memberIDs 群成员id集合 * @param[in] cb 传入接收结果回调 _1错误信息 _2成员信息集合 */ virtual void getBatchMemberByID(int64 groupId, std::vector<int64>& memberIDs, SFunction<void(ErrorInfo, std::vector<SSharedPtr<Member> >&)> cb) = 0; /** * \brief 判断是否为群成员 同步接口 * @param[in] groupId 群ID * @param[in] memberId 群成员id * @return true代表为此群成员,返回false不为群成员 */ //virtual bool isGroupMember(int64 groupId, int64 memberId) = 0; }; } /*namespace service*/
[ "zhangq1001@chinaunicom.cn" ]
zhangq1001@chinaunicom.cn
789f76e3fc26510f92bc4d8179292950fab76a73
d0263ac37e913ca4ad5d85b48ad4ab0425300952
/Applications/ProcessManager/ProcessModel.h
883da5d5cb0d3c11663f8b5cd0a0b850d8602998
[ "BSD-2-Clause" ]
permissive
golegen/serenity
84d64f3dc5901295c43bc9a8c612cdff21af9ee3
8a703d7fc76c92ac562e6b6478fb1c991706d98b
refs/heads/master
2020-06-16T16:37:24.658153
2019-08-03T06:42:53
2019-08-03T06:42:53
195,638,047
0
0
BSD-2-Clause
2019-08-03T06:42:55
2019-07-07T10:27:49
C++
UTF-8
C++
false
false
1,755
h
#pragma once #include <AK/AKString.h> #include <AK/HashMap.h> #include <AK/Vector.h> #include <LibGUI/GModel.h> #include <unistd.h> class GraphWidget; class ProcessModel final : public GModel { public: enum Column { Icon = 0, Name, CPU, State, Priority, User, PID, Virtual, Physical, Syscalls, __Count }; static NonnullRefPtr<ProcessModel> create(GraphWidget& graph) { return adopt(*new ProcessModel(graph)); } virtual ~ProcessModel() override; virtual int row_count(const GModelIndex&) const override; virtual int column_count(const GModelIndex&) const override; virtual String column_name(int column) const override; virtual ColumnMetadata column_metadata(int column) const override; virtual GVariant data(const GModelIndex&, Role = Role::Display) const override; virtual void update() override; private: explicit ProcessModel(GraphWidget&); GraphWidget& m_graph; struct ProcessState { pid_t pid; unsigned times_scheduled; String name; String state; String user; String priority; size_t amount_virtual; size_t amount_resident; unsigned syscall_count; float cpu_percent; int icon_id; }; struct Process { ProcessState current_state; ProcessState previous_state; }; HashMap<uid_t, String> m_usernames; HashMap<pid_t, NonnullOwnPtr<Process>> m_processes; Vector<pid_t> m_pids; RefPtr<GraphicsBitmap> m_generic_process_icon; RefPtr<GraphicsBitmap> m_high_priority_icon; RefPtr<GraphicsBitmap> m_low_priority_icon; RefPtr<GraphicsBitmap> m_normal_priority_icon; };
[ "awesomekling@gmail.com" ]
awesomekling@gmail.com
cf7ddce4bf022067602f22a305533d535df253e5
f6892a295e358d6ed7b401cdd193b40e3f04036b
/EarClipTriangulation/src/algo/main.cpp
07e2312b9b36a4ae78d9ceb1b79d29fb48c16097
[]
no_license
yakupov/CompGeo_lab
bfb397c39e13bc7855cc3c38db6cd78b1e1c6aad
c7d7569795ab297461124cc7e0b5c71ddc55ef52
refs/heads/master
2021-01-10T19:48:36.732124
2012-03-25T05:20:45
2012-03-25T05:20:45
null
0
0
null
null
null
null
UTF-8
C++
false
false
311
cpp
#include <QApplication> #include <QtGui> #include "src/gui/MainWidget.h" int main(int argc, char *argv[]) { QApplication app(argc, argv); MainWidget mainWindow; mainWindow.show(); QObject::connect (&mainWindow, SIGNAL(performExitButtonAction()), &app, SLOT(quit())); return app.exec(); }
[ "iyakupov93@gmail.com" ]
iyakupov93@gmail.com
a23ddc2ffb698d82b51e2f2584f77f7516dd7a85
b25f4ba4febaa36c1c837f088c9d4a1ea80c5194
/HIS/3주차/안전구역.cpp
b0edd4ba582ffb15ae125df5e4e22a7f26280611
[]
no_license
KimJinYounga/TAVE4_Algorithm
70daa6e664dd301bdc4bbf2bf68e6eac04540d56
75929c87f9d866e6be03df840ff23607932b07e1
refs/heads/master
2020-07-04T03:28:48.849494
2019-12-30T16:11:51
2019-12-30T16:11:51
202,140,218
1
0
null
2019-12-30T16:11:53
2019-08-13T12:32:00
C++
UTF-8
C++
false
false
2,066
cpp
#include<iostream> using namespace std; /* error : 비가 아예 오지 않은 경우가 존재하므로, 비가 온 높이의 범위를 0부터 잡아야하는데, 1부터 잡아서 실행함. */ int N, H = 0, ans = 0, cnt; int map[100][100]; int visited[100][100]; int dy[4] = { 0, 0, 1, -1 }; int dx[4] = { 1, -1, 0, 0 }; // visited 초기화 void refresh() { for (int y = 0; y < N; y++) for (int x = 0; x < N; x++) visited[y][x] = 0; cnt = 0; } // 현재 좌표가 parameter height 높이보다 높으며, 첫 방문한 경우 방문 여부를 기록하고, 인근 노드들에 대해 재귀적으로 탐색하여 영역을 확장한다. void dfs(int height, int y, int x) { if (map[y][x] > height && visited[y][x] == 0) { visited[y][x] = 1; // 인근 노드 탐색 부분 for (int i = 0; i < 4; i++) { int ny = y + dy[i]; int nx = x + dx[i]; if (ny >= 0 && ny < N && nx >= 0 && nx < N) { dfs(height, ny, nx); } } } // 이미 방문한 경우, return해서 종료시켜버리기~ else if (visited[y][x] != 0) return; } int main() { cin >> N; // 지도 정보 입력 for (int y = 0; y < N; y++) for (int x = 0; x < N; x++) { cin >> map[y][x]; // 가장 높은 height를 저장해두기. if (map[y][x] > H) H = map[y][x]; } // 비가 찰 수 있는 높이는 0부터 H까지. for (int i = 0; i < H; i++) { // dfs 동작 마다 visited 2차배열에 방문여부를 기록하므로, 매 dfs 전에 초기화 필요 refresh(); // 아래 2중 for문이 한 dfs 탐색 동작 덩어리. for(int y=0; y<N; y++) for (int x = 0; x < N; x++) { // 여기에 조건문을 작성함으로서, dfs 호출은 첫 방문하는 영역의 첫 안전지대에서만 발생하게됨. // 즉, 2중 for문 내의 dfs 호출마다 cnt 추가가 논리적으로 가능해진다. if (map[y][x] > i && visited[y][x] == 0) { dfs(i, y, x); cnt++; } } if (cnt > ans) ans = cnt; } cout << ans << endl; }
[ "noreply@github.com" ]
noreply@github.com
7b329b61ccdaaa32c74be7ed6b7e8fecfd9228a6
251b69d2ab1f4696573796cfae76274f5cb8cbd9
/Tutorial7/tutorial7code/Engine/Engine/inputclass.h
9c12c982bdbf16c4e0736186e844d3be3325f3bd
[]
no_license
benjyblack/COMP2501Winter2014Tutorials
3b7805b520eb2945c2407758b6b6d2624e806a23
bd9832d8ef9d42081b2b95e8327c8e66464c7bf5
refs/heads/master
2016-09-05T20:32:35.259921
2013-12-16T23:13:37
2013-12-16T23:13:37
14,733,639
0
1
null
null
null
null
UTF-8
C++
false
false
662
h
//////////////////////////////////////////////////////////////////////////////// // Filename: inputclass.h //////////////////////////////////////////////////////////////////////////////// #ifndef _INPUTCLASS_H_ #define _INPUTCLASS_H_ //////////////////////////////////////////////////////////////////////////////// // Class name: InputClass //////////////////////////////////////////////////////////////////////////////// class InputClass { public: InputClass(); InputClass(const InputClass&); ~InputClass(); void Initialize(); void KeyDown(unsigned int); void KeyUp(unsigned int); bool IsKeyDown(unsigned int); private: bool m_keys[256]; }; #endif
[ "benjyblack@gmail.com" ]
benjyblack@gmail.com
81190a1d1a3a853c18deda84617bbffc95d8cab7
2ab1875c941ce0c5201d77c4a6fbe0d508b308b3
/Ludo_Game/Ludo_Game.cpp
c6340f033632bb095bbcc534e2e738c95e24c629
[]
no_license
PiperGuy/LudoGame
36fa2673f0edb227b149b90ad35a639501628b7d
6a24ac3ed9eb130591ad9e1e7b3d5dee149976be
refs/heads/master
2022-04-23T00:02:32.797871
2020-04-20T07:48:18
2020-04-20T07:48:18
257,208,439
1
0
null
null
null
null
UTF-8
C++
false
false
40,879
cpp
// Ludo_Game.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include<glut.h> #include<stdio.h> #include<stdlib1.h> #include<math.h> int isIdle=0,ww,wh,s; int in_about=1; int in_guide=1; int fontType; void *font; int f1,f2,g1,g2,k1,k2,l1,l2,ply1,ply2,h1,h2,h3,h4,s1,s2,u,v,r1,op,w,dice1,enter; int i,ch1,ch,p1,p2,ra1,z,z1,za1; float a[100][100]={{-0.4,-0.325},{-0.1375,-0.7275},{-0.1375,-0.61},{-0.1375,-0.4925},{-0.1375,-0.375},{-0.1375,-0.2575},{-0.2575,-0.14},{-0.375,-0.14},{-0.495,-0.14},{-0.6110,-0.14},{-0.7275,-0.14},{-0.84,-0.14},{-0.84,0.005},{-0.84,0.1375},{-0.7275,0.1375},{-0.6110,0.1375},{-.495,.1375},{-0.375,0.1375},{-0.2575,0.1375},{-0.1375,0.2575},{-0.1375,0.375},{-0.1375,0.4925},{-0.1375,0.61},{-0.1375,0.7275},{-0.1375,0.845},{0,0.845},{0.1375,0.845},{0.1375,0.7275},{0.1375,0.61},{0.1375,0.4925},{0.1375,0.375},{0.1375,0.2575},{0.2575,0.1375},{0.375,0.1375},{.495,0.14},{0.6110,0.1375},{0.7275,0.1375},{0.84,0.1375},{0.84,0.005},{0.84,-0.14},{0.7275,-0.14},{0.6110,-0.14},{.495,-0.14},{0.375,-0.14},{0.2575,-0.14},{0.1375,-0.2575},{0.1375,-0.375},{0.1375,-0.4925},{0.1375,-0.61},{0.1375,-0.7275},{0.1375,-0.845},{0,-0.845},{0,-0.7275},{0,-0.61},{0,-0.4925},{0,-0.375},{0,-0.2575}}; float b[100][100]={{-0.4,-0.325},{0.1375,0.7275},{0.1375,0.61},{0.1375,0.4925},{0.1375,0.375},{0.1375,0.2575},{0.2575,0.1375},{0.375,0.1375},{0.495,0.14},{0.6110,0.1375},{0.7275,0.1375},{0.84,0.1375},{0.84,0.005},{0.84,-0.14},{0.7275,-0.14},{0.6110,-0.14},{.495,-.14},{0.375,-0.14},{0.2575,-0.14},{0.1375,-0.2575},{0.1375,-0.375},{0.1375,-0.4925},{0.1375,-0.61},{0.1375,-0.7275},{0.1375,-0.845},{0,-0.845},{-0.1375,-0.845},{-0.1375,-0.7275},{-0.1375,-0.61},{-0.1375,-0.4925},{-0.1375,-0.375},{-0.1375,-0.2575},{-0.2575,-0.14},{-0.375,-0.14},{-.495,-0.14},{-0.6110,-0.14},{-0.7275,-0.14},{-0.84,-0.14},{-0.84,0.005},{-0.84,0.1375},{-0.7275,0.1375},{-0.6110,0.1375},{-.495,0.1375},{-0.375,0.1375},{-0.2575,0.1375},{-0.1375,0.2575},{-0.1375,0.375},{-0.1375,0.4925},{-0.1375,0.61},{-0.1375,0.7275},{-0.1375,0.845},{0,0.845},{0,0.7275},{0,0.61},{0,0.4925},{0,0.375},{0,0.2575}}; float c[10][10]={{-0.5,-0.7},{-0.7,-0.5}}; float d[10][10]={{0.5,0.7},{0.7,0.5}}; int A[100][100]={{430,527},{630,608},{626,567},{628,528},{626,485},{629,441},{585,397},{544,398},{502,400},{463,397},{420,395},{381,397},{380,350},{377,304},{421,303},{460,304},{501,301},{541,302},{585,300},{627,260},{627,221},{627,177},{627,138},{627,97},{627,58},{676,56},{723,54},{723,96},{725,138},{724,176},{725,216},{723,258},{764,300},{809,303},{850,304},{890,304},{931,303},{972,303},{971,352},{973,398},{932,396},{890,396},{851,395},{811,395},{768,396},{724,441},{725,484},{724,523},{725,562},{725,606},{728,645},{677,645},{677,608},{677,565},{677,522},{677,485},{677,442}}; int B[100][100]={{853,104},{723,96},{725,138},{724,176},{725,216},{723,258},{764,300},{809,303},{850,304},{890,304},{931,303},{972,303},{971,352},{973,398},{932,396},{890,396},{851,395},{811,395},{768,396},{724,441},{725,484},{724,523},{725,562},{725,606},{728,645},{677,645},{629,650},{630,608},{626,567},{628,528},{626,485},{629,441},{585,397},{544,398},{502,400},{463,397},{420,395},{381,397},{380,350},{377,304},{421,303},{460,304},{501,301},{541,302},{585,300},{627,260},{627,221},{627,177},{627,138},{627,97},{627,58},{676,56},{677,97},{677,137},{677,177},{677,219},{677,261}}; //int A[100][100]={{424,626},{661,724},{661,672},{660,622},{659,574},{659,526},{608,474},{559,474},{512,474},{463,473},{414,473},{365,475},{363,417},{363,359},{413,359},{463,361},{511,360},{559,360},{609,358},{661,306},{660,258},{659,210},{659,162},{659,113},{659,63},{719,65},{774,65},{774,113},{775,163},{775,209},{775,258},{776,306},{826,361},{877,362},{925,360},{974,361},{1023,361},{1072,360},{1071,418},{1073,473},{1023,473},{974,473},{926,475},{878,473},{826,472},{773,526},{774,574},{773,622},{774,672},{775,720},{775,771},{718,773},{719,722},{720,675},{719,625},{719,577},{717,530}}; //int B[100][100]={{929,125},{774,113},{775,163},{775,209},{775,258},{776,306},{826,361},{877,362},{925,360},{974,361},{1023,361},{1072,360},{1071,418},{1073,473},{1023,473},{974,473},{926,475},{878,473},{826,472},{773,526},{774,574},{773,622},{774,672},{775,720},{775,771},{718,773},{660,771},{661,724},{661,672},{660,622},{659,574},{659,526},{608,474},{559,474},{512,474},{463,473},{414,473},{365,475},{363,417},{363,359},{413,359},{463,361},{511,360},{559,360},{609,358},{661,306},{660,258},{659,210},{659,162},{659,113},{659,63},{719,65},{719,112},{719,161},{719,209},{719,259},{719,309}}; void display_inter_guide(); void arrow(); void display_enter1(); void init() { glClearColor(1,0.8,0.5,1); glEnable(GL_DEPTH_TEST); glutInitDisplayMode(GLUT_RGBA); glutInitWindowPosition(0,0); glutInitWindowSize(1355,703); glutCreateWindow("LUDO - BOARD GAME"); } void myReshape(int w,int h) { glViewport(0,0,w,h); glMatrixMode(GL_PROJECTION); glLoadIdentity(); if(w<=h) glOrtho(-1.0,1.0,-1.0*(GLfloat)h/(GLfloat)w, 2.0*(GLfloat)h/(GLfloat)w,-20.0,20.0); else glOrtho(-1.0*(GLfloat)w/(GLfloat)h, 1.0*(GLfloat)w/(GLfloat)h,-1.0,1.0,-20.0,20.0); glMatrixMode(GL_MODELVIEW); glutPostRedisplay(); } void dice(int y) { glPointSize(5); glColor3f(1,1,1); glBegin(GL_QUADS); glVertex2f(-0.82,0.25); glVertex2f(-0.82,0.38); glVertex2f(-0.69,0.38); glVertex2f(-0.69,0.25); glEnd(); glBegin(GL_QUADS); glVertex2f(-0.82,0.38); glVertex2f(-0.69,0.38); glVertex2f(-0.67,0.4); glVertex2f(-0.79,0.4); glEnd(); glBegin(GL_QUADS); glVertex2f(-0.69,0.38); glVertex2f(-0.67,0.4); glVertex2f(-0.67,0.27); glVertex2f(-0.69,0.25); glEnd(); glColor3f(0,0,0); glBegin(GL_LINE_LOOP); glVertex2f(-0.82,0.38); glVertex2f(-0.69,0.38); glVertex2f(-0.67,0.4); glVertex2f(-0.79,0.4); glEnd(); glBegin(GL_LINE_LOOP); glVertex2f(-0.69,0.38); glVertex2f(-0.67,0.4); glVertex2f(-0.67,0.27); glVertex2f(-0.69,0.25); glEnd(); glColor3f(0,0,0); switch(y) { case 0: case 1: glBegin(GL_POINTS); glVertex2f(-0.75,0.31); glEnd(); break; case 2:glBegin(GL_POINTS); glVertex2f(-0.73,0.31); glVertex2f(-0.77,0.31); glEnd(); break; case 3:glBegin(GL_POINTS); glVertex2f(-0.72,0.31); glVertex2f(-0.755,0.31); glVertex2f(-0.79,0.31); glEnd(); break; case 4:glBegin(GL_POINTS); glVertex2f(-0.72,0.285); glVertex2f(-0.72,0.345); glVertex2f(-0.78,0.285); glVertex2f(-0.78,0.345); glEnd(); break; case 5:glBegin(GL_POINTS); glVertex2f(-0.72,0.285); glVertex2f(-0.72,0.345); glVertex2f(-0.75,0.31); glVertex2f(-0.78,0.285); glVertex2f(-0.78,0.345); glEnd(); break; case 6:glBegin(GL_POINTS); glVertex2f(-0.72,0.29); glVertex2f(-0.755,0.29); glVertex2f(-0.79,0.29); glVertex2f(-0.72,0.34); glVertex2f(-0.755,0.34); glVertex2f(-0.79,0.34); glEnd(); break; } glPointSize(25); glFlush(); } void player1(int ch); void player2(int ch1); void call(int w); void myMouse(int btn,int state,int x,int y) { int C[10][10]; GLint rand(); int D[10][10]; C[0][0]=A[k2][0];C[0][1]=A[k2][1];C[1][0]=A[k1][0];C[1][1]=A[k1][1]; D[0][0]=B[l2][0];D[0][1]=B[l2][1];D[1][0]=B[l1][0];D[1][1]=B[l1][1]; if(ra1+k1>57||ra1+k2>57||ra1+l1>57||ra1+l2>57) {z=1;} if(btn==GLUT_LEFT_BUTTON&&state==GLUT_DOWN) { if(ply1==1&&ply2==0) { if(k1==0&&x>483&&x<517&&y<615&&y>580) { if(ra1==6||ra1==1) player1(1); else player1(2); } else if(k2==0&&x>412&&x<447&&y<545&&y>510) { if(ra1==6||ra1==1) player1(2); else player1(1); } else if(x>(C[0][0]-20)&&x<(C[0][0]+20)&&y>(C[0][1]-20)&&y<(C[0][1]+20)&&z1==1&&k2>0) player1(2); else if(x>(C[1][0]-20)&&x<(C[1][0]+20)&&y>(C[1][1]-20)&&y<(C[1][1]+20)&&z1==1&&k1>0) player1(1); if(z==1&&dice1==1) { z=0; z1=1; ra1=rand()%2+rand()%3+rand()%2+rand()%3; if(ra1==0) ra1=1; dice(ra1); } } else {if(l1==0&&x>833&&x<873&&y>84&&y<124) { if(ra1==6||ra1==1) player2(1); else player2(2); } else if(l2==0&&x>906&&x<940&&y<190&&y>158) { if(ra1==6||ra1==1) player2(2); else player2(1); } else if(x>(D[0][0]-20)&&x<(D[0][0]+20)&&y>(D[0][1]-20)&&y<(D[0][1]+20)&&z1==1&&l2>0) player2(2); else if(x>(D[1][0]-20)&&x<(D[1][0]+20)&&y>(D[1][1]-20)&&y<(D[1][1]+20)&&z1==1&&l1>0) player2(1); if(z==1&&dice1==1) { z=0; z1=1; ra1=rand()%2+rand()%3+rand()%2+rand()%3; if(ra1==0) ra1=1; dice(ra1); } } } } void display2(); void wait(void); void call(int w); void display1(void); void key(unsigned char key,int x,int y) { if(key=='q' || key=='Q') call(2); if(key==13 && enter==1) { call(1); wait(); display_enter1(); display1(); } } void call(int w) { switch(w) { case 1:glClear(GL_COLOR_BUFFER_BIT); glClearColor(0,0,0,0); glFlush(); f1=0;f2=0;g1=0;g2=0;k1=0;k2=0;l1=0;l2=0;ply1=1;ply2=0;h1=0;h2=0;h3=0;h4=0,s1=0,s2=0; c[0][0]=-0.5;c[0][1]=-0.7;c[1][0]=-0.7;c[1][1]=-0.5; d[0][0]=0.5;d[0][1]=0.7;d[1][0]=0.7;d[1][1]=0.5; wait(); break; case 2:exit(0); break; } } void about(void) { char *about="\t\t\tMATCH IS DRAWN ! \n\n\n\n\n\n\n\n\n\n\n\n\n\n\nQ = QUIT ENTER = RESTART"; void *en=GLUT_BITMAP_TIMES_ROMAN_24; int i; float x=-0.4,y=0.3,z=0; in_about=1; glPushMatrix(); glLoadIdentity(); glColor3f(0.9,0.7,0.6); glRasterPos3f(x,y,z); for(i=0;about[i]!='\0';i++) { if(about[i]=='\n') { y-=0.08; glRasterPos3f(x,y,z); } if(about[i]=='\t') { x-=0.03; } else {wait(); glutBitmapCharacter(en,about[i]); } } glPopMatrix(); glFlush(); enter=1; } void about1(void) { char *about="\t\t\tCONGRATULATIONS !\n\n\nPLAYER 1 WON THE GAME.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nQ = QUIT ENTER = RESTART"; void *en=GLUT_BITMAP_TIMES_ROMAN_24; int i; float x=-0.4,y=0.6,z=0; in_about=1; glPushMatrix(); glLoadIdentity(); glColor3f(0.9,0.7,0.6); glRasterPos3f(x,y,z); for(i=0;about[i]!='\0';i++) { if(about[i]=='\n') { y-=0.08; glRasterPos3f(x,y,z); } if(about[i]=='\t') { x-=0.03; } else {wait(); glutBitmapCharacter(en,about[i]); } } glPopMatrix(); glFlush(); enter=1; } void about2(void) { char *about="\t\t\tCONGRATULATIONS !\n\n\nPLAYER 2 WON THE GAME.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nQ = QUIT ENTER = RESTART"; void *en=GLUT_BITMAP_TIMES_ROMAN_24; int i; float x=-0.4,y=0.6,z=0; in_about=1; glPushMatrix(); glLoadIdentity(); glColor3f(0.9,0.7,0.6); glRasterPos3f(x,y,z); for(i=0;about[i]!='\0';i++) { if(about[i]=='\n') { y-=0.08; glRasterPos3f(x,y,z); } if(about[i]=='\t') { x-=0.03; } else {wait(); glutBitmapCharacter(en,about[i]); } } glPopMatrix(); glFlush(); enter=1; } void check_cond() { if((k1>27&&p1==0)&&(k2>27&&p1==0)&&(l1>27&&p2==0)&&(l2>27&&p2==0)) { dice1=0; glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); glClearColor(0,0,0,0); glFlush(); about(); } else if(s1==2) { dice1=0; glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); glClearColor(0,0,0,0); glFlush(); about1(); } else if(s2==2) { dice1=0; glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); glClearColor(0,0,0,0); glFlush(); about2(); } } void circle() {float ang; int i; glPushMatrix(); glLoadIdentity(); glTranslatef(-1.47,0.72,0); if(ply1==1&&ply2==0) {glColor3f(1,0,0);} else {glColor3f(0,0,0);} glBegin(GL_POLYGON); for(i=0;i<=12;i++) { ang=(3.1415/6)*i; glVertex2f(0.02*cos(ang),0.02*sin(ang)); } glEnd(); glColor3f(0,1,0); glFlush(); glPopMatrix(); glFlush(); glPushMatrix(); glLoadIdentity(); glTranslatef(-1.47,0.56,0); if(ply1==0&&ply2==1) {glColor3f(1,0,0);} else {glColor3f(0,0,0);} glBegin(GL_POLYGON); for(i=0;i<=12;i++) { ang=(3.1415/6)*i; glVertex2f(0.02*cos(ang),0.02*sin(ang)); } glEnd(); glColor3f(0,1,0); glFlush(); glPopMatrix(); glFlush(); } void display2() { glColor3f(1,1,1); glBegin(GL_LINE_STRIP); glVertex2f(0.15,-0.84); //Bottom direction glVertex2f(0,-0.84); glVertex2f(0,-0.6); glEnd(); glFlush(); glBegin(GL_LINES); glVertex2f(0,-0.6); glVertex2f(-0.04,-0.64); glVertex2f(0,-0.6); glVertex2f(0.04,-0.64); glEnd(); glBegin(GL_LINE_STRIP); glVertex2f(-0.15,0.84); //Top direction glVertex2f(0,0.84); glVertex2f(0,0.6); glEnd(); glFlush(); glBegin(GL_LINES); glVertex2f(0,0.6); glVertex2f(-0.04,0.64); glVertex2f(0,0.6); glVertex2f(0.04,0.64); glEnd(); glPointSize(25); glBegin(GL_POINTS); glColor3f(0,1,0); glVertex2f(c[0][0],c[0][1]); glVertex2f(c[1][0],c[1][1]); glColor3f(1,0,1); glVertex2f(d[0][0],d[0][1]); glVertex2f(d[1][0],d[1][1]); glEnd(); glColor3f(0,1,0); glFlush(); circle(); check_cond(); } void player1(int ch) { GLint rand(); if((f1==0)&&(h1==0)) { glBegin(GL_POINTS); glVertex2f(c[0][0],c[0][1]); glEnd(); glFlush(); } else if(h1==1) { glBegin(GL_POINTS); glVertex2f(0.7,-0.5); glEnd(); } else { glBegin(GL_POINTS); glVertex2f(a[k1][0],a[k1][1]); glEnd(); } if((f2==0)&&(h2==0)) { glBegin(GL_POINTS); glVertex2f(c[1][0],c[1][1]); glEnd(); } else if(h2==1) { glBegin(GL_POINTS); glVertex2f(0.5,-0.7); glEnd(); } else { glBegin(GL_POINTS); glVertex2f(a[k2][0],a[k2][1]); glEnd(); } glColor3f(0,1,0); if(h1==1) ch=2; else if(h2==1) ch=1; else if( ( (ra1+k1>57)||(ra1+k1>51&&p1==0))&&((ra1+k2>57)||(ra1+k2>51&&p1==0))) { ply1=0; ply2=1; } else if((ra1+k1>57&&ch==1)||(ra1+k1>51&&p1==0&&ch==1)) {if(a[ra1+k2][0]==c[0][0]&&a[ra1+k2][1]==c[0][1]) ch=776; else { ch=2;} } else if((ra1+k2>57&&ch==2)||(ra1+k2>51&&p1==0&&ch==2)) {if(a[ra1+k1][0]==c[1][0]&&a[ra1+k1][1]==c[1][1]) ch=776; else { ch=1;} } if(ch==1&&a[ra1+k1][0]==c[1][0]&&a[ra1+k1][1]==c[1][1]) {display2(); return; } else if(ch==2&&a[ra1+k2][0]==c[0][0]&&a[ra1+k2][1]==c[0][1]) {display2(); return; } switch(ch) { case 1: if(f1==0&&(ra1==6||ra1==1)) //y==4; { ra1=1; f1=1; } else {z=1; z1=0; ply1=0;ply2=1; } if((f1==1)&&(ra1+k1<=57)&&(h1==0)) { for(i=0;i<2;i++) { if(a[ra1+k1][0]==d[i][0]&&a[ra1+k1][1]==d[i][1]) { if(i==0) {g1=0;l1=0;d[0][0]=0.5;d[0][1]=0.7;} if(i==1) {g2=0;l2=0;d[1][0]=0.7;d[1][1]=0.5;} p1=1; } } if(((ra1+k1)>51&&p1==1)||(ra1+k1<=51)) { glColor3f(0,0,0); if(k1==0) { glBegin(GL_POINTS); glVertex2f(-0.5,-0.7); glEnd(); } else if(k1==1||k1==52||k1==53||k1==54||k1==55||k1==56) {glColor3f(1,0,0); } else if(k1==27) {glColor3f(0,0,1); } glBegin(GL_POINTS); glVertex2f(a[k1][0],a[k1][1]); glEnd(); glColor3f(0,1,0); k1=ra1+k1; z=1; c[0][0]=a[k1][0]; c[0][1]=a[k1][1]; if(ra1==6) {z1=0; ply1=1; ply2=0; } else { ply1=0; ply2=1; } } }ch=0; if(k1==57) {k1=0; h1=1; glBegin(GL_POINTS); c[0][0]=0.7;c[0][1]=-0.5; glVertex2f(c[0][0],c[0][1]); s1++; glEnd(); } break; case 2:if(f2==0&&(ra1==6||ra1==1)) {ra1=1; f2=1; } else {z=1; z1=0; ply1=0;ply2=1; } if((f2==1)&&(ra1+k2<=57)&&(h2==0)) { for(i=0;i<2;i++) { if(a[ra1+k2][0]==d[i][0]&&a[ra1+k2][1]==d[i][1]) { if(i==0) {g1=0;l1=0;d[0][0]=0.5;d[0][1]=0.7;} if(i==1) {g2=0;l2=0;d[1][0]=0.7;d[1][1]=0.5;} p1=1; } } if(((ra1+k2)>51&&p1==1)||(ra1+k2<=51)) { glColor3f(0,0,0); if(k2==0) { glBegin(GL_POINTS); glVertex2f(-0.7,-0.5); glEnd(); } else if(k2==1||k2==52||k2==53||k2==54||k2==55||k2==56) {glColor3f(1,0,0); } else if(k2==27) {glColor3f(0,0,1); } glBegin(GL_POINTS); glVertex2f(a[k2][0],a[k2][1]); glEnd(); glColor3f(0,1,0); k2=ra1+k2; z=1; c[1][0]=a[k2][0]; c[1][1]=a[k2][1]; if(ra1==6) {z1=0; ply1=1; ply2=0; } else { ply1=0; ply2=1; } } } if(k2==57) {k2=0; h2=1; c[1][0]=0.5;c[1][1]=-0.7; s1++; } break; case 776:ply1=0;ply2=1; break; }ch=0; glColor3f(1,0,1); arrow(); display2(); } void player2(int ch1) { glColor3f(1,0,1); if((g1==0)&&(h3==0)) { glBegin(GL_POINTS); glVertex2f(d[0][0],d[0][1]); glEnd(); } else if(h3==1) { glBegin(GL_POINTS); glVertex2f(-0.7,0.5); glEnd(); } else { glBegin(GL_POINTS); glVertex2f(b[l1][0],b[l1][1]); glEnd(); } if((g2==0)&&(h4==0)) { glBegin(GL_POINTS); glVertex2f(d[1][0],d[1][1]); glEnd(); } else if(h4==1) { glBegin(GL_POINTS); glVertex2f(-0.5,0.7); glEnd(); } else { glBegin(GL_POINTS); glVertex2f(b[l2][0],b[l2][1]); glEnd(); } glColor3f(1,0,1); if(h3==1) ch1=2; else if(h4==1) ch1=1; else if((ra1+l1>57||(ra1+l1>51&&p2==0))&&(ra1+l2>57||(ra1+l2>51&&p2==0))) { ply1=1; ply2=0; } else if((ra1+l1>57&&ch1==1)||(ra1+l1>51&&p2==0&&ch1==1)) { if(b[ra1+l2][0]==d[0][0]&&b[ra1+l2][1]==d[0][1]) ch1=776; else { ch1=2;} } else if((ra1+l2>57&&ch1==2)||(ra1+l2>51&&p2==0&&ch1==2)) { if(b[ra1+l1][0]==d[1][0]&&b[ra1+l1][1]==d[1][1]) ch1=776; else { ch1=1;} } if(ch1==1&&b[ra1+l1][0]==d[1][0]&&b[ra1+l1][1]==d[1][1]) { display2(); return; } else if(ch1==2&&b[ra1+l2][0]==d[0][0]&&b[ra1+l2][1]==d[0][1]) { display2(); return; } switch(ch1) { case 1:if(g1==0&&(ra1==6||ra1==1)) {ra1=1; g1=1; } else {z=1; z1=0; ply1=1;ply2=0; } if((g1==1)&&(ra1+l1<=57)&&(h3==0)) { for(i=0;i<2;i++) { if(b[ra1+l1][0]==c[i][0]&&b[ra1+l1][1]==c[i][1]) { p2=1; if(i==0) {f1=0;k1=0;c[0][0]=-0.5;c[0][1]=-0.7;} if(i==1) {f2=0;k2=0;c[1][0]=-0.7;c[1][1]=-0.5;} } } if(((ra1+l1)>51&&p2==1)||(ra1+l1<=51)) { glColor3f(0,0,0); if(l1==0) { glBegin(GL_POINTS); glVertex2f(0.5,0.7); glEnd(); } else if(l1==1||l1==52||l1==53||l1==54||l1==55||l1==56) {glColor3f(0,0,1); } else if(l1==27) {glColor3f(1,0,0); } glBegin(GL_POINTS); glVertex2f(b[l1][0],b[l1][1]); glEnd(); glColor3f(1,0,1); z=1; l1=ra1+l1; d[0][0]=b[l1][0]; d[0][1]=b[l1][1]; if(ra1==6) {z1=0; ply1=0; ply2=1; } else { ply1=1; ply2=0; } } }ch1=0; if(l1==57) { l1=0; h3=1; d[0][0]=-0.7;d[0][1]=0.5; s2++; } break; case 2:if(g2==0&&(ra1==6||ra1==1)) {ra1=1; g2=1; } else {z=1; z1=0; ply1=1;ply2=0; } if((g2==1)&&(ra1+l2<=57)&&(h4==0)) { for(i=0;i<2;i++) { if(b[ra1+l2][0]==c[i][0]&&b[ra1+l2][1]==c[i][1]) { if(i==0) {f1=0;k1=0;c[0][0]=-0.5;c[0][1]=-0.7;} if(i==1) {f2=0;k2=0;c[1][0]=-0.7;c[1][1]=-0.5;} p2=1; } } if(((ra1+l2)>51&&p2==1)||(ra1+l2<=51)) { glColor3f(0,0,0); if(l2==0) { glBegin(GL_POINTS); glVertex2f(0.7,0.5); glEnd(); } else if(l2==1||l2==52||l2==53||l2==54||l2==55||l2==56) {glColor3f(0,0,1); } else if(l2==27) {glColor3f(1,0,0); } glBegin(GL_POINTS); glVertex2f(b[l2][0],b[l2][1]); glEnd(); glColor3f(1,0,1); z=1; l2=ra1+l2; d[1][0]=b[l2][0]; d[1][1]=b[l2][1]; if(ra1==6) {z1=0; ply1=0; ply2=1; } else { ply1=1; ply2=0; } } } if(l2==57) {l2=0; h4=1; d[1][0]=-0.5;d[1][1]=0.7; s2++; } break; case 776:ply1=1;ply2=0; break; } ch1=0; glColor3f(1,0,1); arrow(); display2(); } void pl1_pl2(void) { char *guide="PLAYER 1\n\nPLAYER 2"; void *en=GLUT_BITMAP_TIMES_ROMAN_24; float x=-1.4,y=0.7,z=0; int i; in_guide=1; glColor3f(0,1,0); glRasterPos3f(x,y,z); for(i=0;guide[i]!='\0';i++) { if(guide[i]=='\n') {glColor3f(1,0,1); y-=0.08; glRasterPos3f(x,y,z); } glutBitmapCharacter(en,guide[i]); } glFlush(); } void display1(void) {z=1,z1=1,dice1=1; f1=0,f2=0,g1=0,g2=0,k1=0,k2=0,l1=0,l2=0,ply1=1,ply2=0,h1=0,h2=0,h3=0,h4=0,s1=0,s2=0; p1=0,p2=0,enter=0; glClearColor(0,0,0,0); glClear(GL_COLOR_BUFFER_BIT); glColor3f(1,1,1); glLineWidth(2); glBegin(GL_LINE_LOOP); glVertex2f(0.9,0.9); glVertex2f(-0.9,0.9); //Main BOX Outline glVertex2f(-0.9,-0.9); glVertex2f(0.9,-0.9); glEnd(); glBegin(GL_LINES); glVertex2f(-0.2,-0.2); glVertex2f(-0.9,-0.2); //(-,-) BOX glVertex2f(-0.9,-0.9); glVertex2f(-0.2,-0.9); glColor3f(1,1,1); glEnd(); glBegin(GL_LINES); glVertex2f(0.2,0.2); glVertex2f(0.9,0.2); //(+,+) BOX glVertex2f(0.9,0.9); glVertex2f(0.2,0.9); glEnd(); glBegin(GL_TRIANGLES); glColor3f(0,0,1); glVertex2f(0.2,0.2); glVertex2f(-0.2,0.2); //Top part Home glVertex2f(0,0); glEnd(); glBegin(GL_TRIANGLES); glColor3f(1,0,0); glVertex2f(-0.2,-0.2); glVertex2f(0.2,-0.2); //Bottom part Home glVertex2f(0,0); glEnd(); glColor3f(1,1,1); glBegin(GL_QUADS); glColor3f(0,0,1); glVertex2f(-0.075,0.2); glVertex2f(0.075,0.2); glVertex2f(0.075,0.785); //TOP ARROW glVertex2f(-0.075,0.785); glVertex2f(0.2,0.67); glVertex2f(-0.075,0.67); glVertex2f(-0.075,0.785); glVertex2f(0.2,0.785); glEnd(); glColor3f(1,1,1); glBegin(GL_QUADS); glColor3f(1,0,0); glVertex2f(-0.075,-0.2); glVertex2f(0.075,-0.2); glVertex2f(0.075,-0.785); //BOTTOM ARROW glVertex2f(-0.075,-0.785); glVertex2f(-0.2,-0.67); glVertex2f(-0.075,-0.67); glVertex2f(-0.075,-0.785); glVertex2f(-0.2,-0.785); glEnd(); glColor3f(1,1,1); glBegin(GL_LINE_LOOP); glVertex2f(-0.4,-0.4); glVertex2f(-0.8,-0.4); //Player coins (-,-) BOX glVertex2f(-0.8,-0.8); glVertex2f(-0.4,-0.8); glEnd(); glFlush(); glBegin(GL_LINE_LOOP); glVertex2f(-0.45,-0.65); glVertex2f(-0.55,-0.65); glVertex2f(-0.55,-0.75); glVertex2f(-0.45,-0.75); glEnd(); glFlush(); //Player coins keeping (-,-) BOX glBegin(GL_LINE_LOOP); glVertex2f(-0.75,-0.45); glVertex2f(-0.65,-0.45); glVertex2f(-0.65,-0.55); glVertex2f(-0.75,-0.55); glEnd(); glFlush(); glBegin(GL_LINE_LOOP); glVertex2f(0.4,0.4); glVertex2f(0.8,0.4); //Player Coins (+,+) BOX glVertex2f(0.8,0.8); glVertex2f(0.4,0.8); glEnd(); glFlush(); glBegin(GL_LINE_LOOP); glVertex2f(0.45,0.65); glVertex2f(0.55,0.65); glVertex2f(0.55,0.75); glVertex2f(0.45,0.75); glEnd(); glFlush(); //Player coins keeping (+,+) BOX glBegin(GL_LINE_LOOP); glVertex2f(0.75,0.45); glVertex2f(0.65,0.45); glVertex2f(0.65,0.55); glVertex2f(0.75,0.55); glEnd(); glFlush(); glBegin(GL_LINE_STRIP); glVertex2f(0.15,-0.84); //Bottom direction glVertex2f(0,-0.84); glVertex2f(0,-0.6); glEnd(); glFlush(); glBegin(GL_LINES); glVertex2f(0,-0.6); glVertex2f(-0.04,-0.64); glVertex2f(0,-0.6); glVertex2f(0.04,-0.64); glEnd(); glBegin(GL_LINE_STRIP); glVertex2f(-0.15,0.84); //Top direction glVertex2f(0,0.84); glVertex2f(0,0.6); glEnd(); glFlush(); glBegin(GL_LINES); glVertex2f(0,0.6); glVertex2f(-0.04,0.64); glVertex2f(0,0.6); glVertex2f(0.04,0.64); glEnd(); glBegin(GL_LINES); glVertex2f(-0.075,-0.2); glVertex2f(-0.075,-0.9); glEnd(); //Bottom part Lines glBegin(GL_LINES); glVertex2f(0.075,-0.2); glVertex2f(0.075,-0.9); glEnd(); glBegin(GL_LINES); glVertex2f(-0.2,-0.2); glVertex2f(-0.2,-0.9); glEnd(); glBegin(GL_LINES); glVertex2f(0.2,-0.2); glVertex2f(0.2,-0.9); glEnd(); glBegin(GL_LINES); glVertex2f(-0.9,-0.2); glVertex2f(-0.9,-0.9); glEnd(); glBegin(GL_LINES); glVertex2f(0.9,0.2); glVertex2f(0.9,0.9); glEnd(); glBegin(GL_LINES); glVertex2f(-0.075,0.2); glVertex2f(-0.075,0.9); glEnd(); //Top part Lines glBegin(GL_LINES); glVertex2f(0.075,0.2); glVertex2f(0.075,0.9); glEnd(); glBegin(GL_LINES); glVertex2f(-0.2,0.2); glVertex2f(-0.2,0.9); glEnd(); glBegin(GL_LINES); glVertex2f(0.2,0.2); glVertex2f(0.2,0.9); glEnd(); glBegin(GL_LINES); glVertex2f(0.2,-0.075); glVertex2f(0.9,-0.075); glEnd(); //Right part Lines glBegin(GL_LINES); glVertex2f(0.2,0.075); glVertex2f(0.9,0.075); glEnd(); glBegin(GL_LINES); glVertex2f(0.2,-0.2); glVertex2f(0.9,-0.2); glEnd(); glBegin(GL_LINES); glVertex2f(0.2,0.2); glVertex2f(0.9,0.2); glEnd(); glBegin(GL_LINES); glVertex2f(-0.2,-0.075); glVertex2f(-0.9,-0.075); glEnd(); //Left part Lines glBegin(GL_LINES); glVertex2f(-0.2,0.075); glVertex2f(-0.9,0.075); glEnd(); glBegin(GL_LINES); glVertex2f(-0.2,-0.2); glVertex2f(-0.9,-0.2); glEnd(); glBegin(GL_LINES); glVertex2f(-0.2,0.2); glVertex2f(-0.9,0.2); glEnd(); glBegin(GL_LINES); glVertex2f(-0.2,-0.784); glVertex2f(0.2,-0.784); glEnd(); glBegin(GL_LINES); glVertex2f(-0.2,-0.67); glVertex2f(0.2,-0.67); glEnd(); glBegin(GL_LINES); glVertex2f(-0.2,-0.552); glVertex2f(0.2,-0.552); glEnd(); //Across -Bottom Lines glBegin(GL_LINES); glVertex2f(-0.2,-0.436); glVertex2f(0.2,-0.436); glEnd(); glBegin(GL_LINES); glVertex2f(-0.2,-0.32); glVertex2f(0.2,-0.32); glEnd(); glBegin(GL_LINES); glVertex2f(-0.2,-0.2); glVertex2f(0.2,-0.2); glEnd(); glBegin(GL_LINES); glVertex2f(-0.2,0.784); glVertex2f(0.2,0.784); glEnd(); glBegin(GL_LINES); glVertex2f(-0.2,0.668); glVertex2f(0.2,0.668); glEnd(); glBegin(GL_LINES); glVertex2f(-0.2,0.552); glVertex2f(0.2,0.552); glEnd(); //Across -Top Lines glBegin(GL_LINES); glVertex2f(-0.2,0.436); glVertex2f(0.2,0.436); glEnd(); glBegin(GL_LINES); glVertex2f(-0.2,0.32); glVertex2f(0.2,0.32); glEnd(); glBegin(GL_LINES); glVertex2f(-0.2,0.2); glVertex2f(0.2,0.2); glEnd(); glBegin(GL_LINES); glVertex2f(0.784,-0.2); glVertex2f(0.784,0.2); glEnd(); glBegin(GL_LINES); glVertex2f(0.668,-0.2); glVertex2f(0.668,0.2); glEnd(); glBegin(GL_LINES); glVertex2f(0.552,-0.2); glVertex2f(0.552,0.2); glEnd(); //Across -Right Lines glBegin(GL_LINES); glVertex2f(0.436,-0.2); glVertex2f(0.436,0.2); glEnd(); glBegin(GL_LINES); glVertex2f(0.32,-0.2); glVertex2f(0.32,0.2); glEnd(); glBegin(GL_LINE_STRIP); glVertex2f(0.7275,0.14); glVertex2f(0.84,0.14); glVertex2f(0.84,-0.1375); glVertex2f(0.7275,-0.1375); glEnd(); glBegin(GL_LINES); glVertex2f(0.7275,-0.1375); glVertex2f(0.76,-0.1111); glEnd(); glBegin(GL_LINES); glVertex2f(0.7275,-0.1375); glVertex2f(0.76,-0.16); glEnd(); glBegin(GL_LINES); glVertex2f(0.2,-0.2); glVertex2f(0.2,0.2); glEnd(); glBegin(GL_LINES); glVertex2f(-0.784,-0.2); glVertex2f(-0.784,0.2); glEnd(); glBegin(GL_LINES); glVertex2f(-0.668,-0.2); glVertex2f(-0.668,0.2); glEnd(); glBegin(GL_LINES); glVertex2f(-0.552,-0.2); glVertex2f(-0.552,0.2); glEnd(); //Across -Left Lines glBegin(GL_LINES); glVertex2f(-0.436,-0.2); glVertex2f(-0.436,0.2); glEnd(); glBegin(GL_LINES); glVertex2f(-0.32,-0.2); glVertex2f(-0.32,0.2); glEnd(); glBegin(GL_LINE_STRIP); glVertex2f(-0.7275,-0.14); glVertex2f(-0.84,-0.14); glVertex2f(-0.84,0.1375); glVertex2f(-0.7275,0.1375); glEnd(); glBegin(GL_LINES); glVertex2f(-0.7275,0.1375); glVertex2f(-0.76,0.1111); glEnd(); glBegin(GL_LINES); glVertex2f(-0.7275,0.1375); glVertex2f(-0.76,0.16); glEnd(); glBegin(GL_LINES); glVertex2f(-0.2,-0.2); glVertex2f(-0.2,0.2); glEnd(); display_inter_guide(); glFlush(); pl1_pl2(); circle(); display2(); } void arrow() { glColor3f(1,1,1); glBegin(GL_LINE_STRIP); glVertex2f(0.7275,0.14); glVertex2f(0.84,0.14); glVertex2f(0.84,-0.1375); glVertex2f(0.7275,-0.1375); glEnd(); glBegin(GL_LINES); glVertex2f(0.7275,-0.1375); glVertex2f(0.76,-0.1111); glEnd(); glBegin(GL_LINES); glVertex2f(0.7275,-0.1375); glVertex2f(0.76,-0.16); glEnd(); glBegin(GL_LINE_STRIP); glVertex2f(-0.7275,-0.14); glVertex2f(-0.84,-0.14); glVertex2f(-0.84,0.1375); glVertex2f(-0.7275,0.1375); glEnd(); glBegin(GL_LINES); glVertex2f(-0.7275,0.1375); glVertex2f(-0.76,0.1111); glEnd(); glBegin(GL_LINES); glVertex2f(-0.7275,0.1375); glVertex2f(-0.76,0.16); glEnd(); glFlush(); } void wait(void) { int i,j; for(i=1;i<1000;i++) for(j=1;j<9000;j++); } void display_msg(float x,float y,float z ,char *msg) { int i; glColor3f(0,0,0); glRasterPos3f(x,y,z); for(i=0;msg[i]!='\0';i++) glutBitmapCharacter(font,msg[i]); glFlush(); } void display_about(void) { char *about="This mini-Project is based on a very ancient game LUDO,using OpenGL\nDeveloped by Naveen P and Saujanya P under the Guidence of Mr. S. Suresh Kumar of Vivekanada Institute of Technology\n\n\nINSTRUCTIONS :\nInput can be provided either from Mouse or from Keyboard.\nFor mouse interaction right-click on the screen and select the required option.\nKeyboard and Mouse Interfaces are explained in Instructions Section.\n\n\n\n\n\n"; enter=0; int i; float x=-1.8,y=0.9,z=0; if(in_about!=0) { in_about=1; glColor3f(1,0,0); glRasterPos3f(x,y,z); for(i=0;about[i]!='\0';i++) { if(about[i]=='\n') { y-=0.08; glRasterPos3f(x,y,z); } else glutBitmapCharacter(font,about[i]); } glPopMatrix(); glFlush(); } } void display(void) { glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); display_about(); } void display_about_game(void) { char *about_game="RULES:\n\n\nAt the start of the game, the player's four pieces are placed in the start area of their colour.\n\nPlayers take it in turn to throw a single die. A player must first throw a six to be able to move a piece from the starting area\nonto the starting square.In each subsequent turn the player moves a piece forward 1 to 6 squares as indicated by the die.When a\nplayer throws a 6 the player may bring a new piece onto the starting square, or may choose to move a piece already in play.Any\nthrow of a six results in another turn.\n\nIf a player cannot make a valid move they must pass the die to the next player.\n\nIf a player's piece lands on a square containing an opponent's piece, the opponent's piece is captured and returns to the starting\narea.A piece may not land on a square that already contains a piece of the same colour(unless playing doubling rules).\n\nOnce a piece has completed a circuit of the board it moves up the home column of its own colour. The player must throw the exact\nnumber to advance to the home square.The winner is the first player to get all four of their pieces onto the home square."; int i; float x=-1.8,y=0.9,z=0; in_about=1; glPushMatrix(); glLoadIdentity(); glColor3f(1,0,0); glRasterPos3f(x,y,z); for(i=0;about_game[i]!='\0';i++) { if(about_game[i]=='\n') { y-=0.08; glRasterPos3f(x,y,z); } else glutBitmapCharacter(font,about_game[i]); } glPopMatrix(); glFlush(); } void display_inter_guide(void) { char *gui="KEYBOARD OPTIONS:\nQ-To Quit.\n\nMOUSE OPTIONS:\nLEFT BUTTON- To Select the coin,\nClick on the coin of Player to\nROLL DICE & to move.\nRIGHT BUTTON- To Restart."; float x=1.1,y=0.4,z=0; int i; glColor3f(0,0,0); glBegin(GL_LINE_LOOP); glVertex2f(1.08,0.5); glVertex2f(1.92,0.5); glVertex2f(1.92,-0.2); glVertex2f(1.08,-0.2); glEnd(); in_guide=1; glColor3f(1,0,0); glRasterPos3f(x,y,z); for(i=0;gui[i]!='\0';i++) { if(gui[i]=='\n') { y-=0.08; glRasterPos3f(x,y,z); } else glutBitmapCharacter(font,gui[i]); } glFlush(); } void enter_display2() { char *about="PRESS ENTER\n"; void *en=GLUT_BITMAP_TIMES_ROMAN_24; float x=0.8,y=-0.8,z=0; int i; enter=1; glClear(GL_COLOR_BUFFER_BIT); glLineWidth(9); glColor3f(0,0,0); glColor3f(0,0,0); glColor3f(1,1,1); glRasterPos3f(x,y,z); for(i=0;about[i]!='\0';i++) { if(about[i]=='\n') { wait(); y-=0.08; glRasterPos3f(x,y,z); } else if(about[i]=='\t') {wait(); x-=0.2; glRasterPos3f(x,y,z); } else {wait(); glutBitmapCharacter(en,about[i]); } } glFlush(); } void square() { glColor3f(1,1,1); glBegin(GL_QUADS); { glVertex2f(-.4,-.7); glVertex2f(-.4,-.65); glVertex2f(.4,-.65); glVertex2f(.4,-.7); } glColor3f(0,0,0); glBegin(GL_QUADS); { glVertex2f(-.39,-.69); glVertex2f(-.39,-.66); glVertex2f(-.34,-.66); glVertex2f(-.34,-.69); } glEnd(); glFlush(); wait(); wait(); glBegin(GL_QUADS); { glVertex2f(-.34,-.69); glVertex2f(-.34,-.66); glVertex2f(-.30,-.66); glVertex2f(-.30,-.69); } glEnd(); glFlush(); wait(); wait(); wait(); glBegin(GL_QUADS); { glVertex2f(-.30,-.69); glVertex2f(-.30,-.66); glVertex2f(-.23,-.66); glVertex2f(-.23,-.69); } glEnd(); glFlush(); wait(); wait(); wait(); glBegin(GL_QUADS); { glVertex2f(-.23,-.69); glVertex2f(-.23,-.66); glVertex2f(-.1,-.66); glVertex2f(-.1,-.69); } glEnd(); glFlush(); wait(); wait(); wait(); glBegin(GL_QUADS); { glVertex2f(-.1,-.69); glVertex2f(-.1,-.66); glVertex2f(0.1,-.66); glVertex2f(0.1,-.69); } glEnd(); glFlush(); wait(); wait(); wait(); wait(); wait(); wait(); glBegin(GL_QUADS); { glVertex2f(0.1,-.69); glVertex2f(0.1,-.66); glVertex2f(0.15,-.66); glVertex2f(0.15,-.69); } glEnd(); glFlush(); wait(); wait(); wait(); glBegin(GL_QUADS); { glVertex2f(0.15,-.69); glVertex2f(0.15,-.66); glVertex2f(0.2,-.66); glVertex2f(0.2,-.69); } glEnd(); glFlush(); wait(); wait(); glBegin(GL_QUADS); { glVertex2f(0.2,-.69); glVertex2f(0.2,-.66); glVertex2f(0.39,-.66); glVertex2f(0.39,-.69); } glEnd(); glFlush(); wait(); wait(); wait(); wait(); enter_display2(); } void display_enter1(void) { char *about="please wait...\n"; void *en=GLUT_BITMAP_TIMES_ROMAN_24; float x=-0.16,y=-0.8,z=0; int i; glClear(GL_COLOR_BUFFER_BIT); glLineWidth(9); glColor3f(0,0,0); glColor3f(0,0,0); glRasterPos3f(x,y,z); for(i=0;about[i]!='\0';i++) { if(about[i]=='\n') { wait(); y-=0.08; glRasterPos3f(x,y,z); } else if(about[i]=='\t') {wait(); x-=0.2; glRasterPos3f(x,y,z); } else {wait(); glutBitmapCharacter(en,about[i]); } } square(); } void options(int id) { switch(id) { case 1: glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); in_about=1; display_about(); break; case 2: glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); display_about_game(); break; case 4: glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); glClearColor(0.6,0.7,0,0); display_enter1(); break; case 5: exit(0); } } int main(int argc, char **argv) { glutInit(&argc, argv); enter=1; glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB|GLUT_DEPTH); init(); glutCreateMenu(options); glutAddMenuEntry("About the Project",1); glutAddMenuEntry("Rules of the Game",2); glutAddMenuEntry("Game Mode or Restart",4); glutAddMenuEntry("Quit",5); glutMouseFunc(myMouse); glutKeyboardFunc(key); glutAttachMenu(GLUT_RIGHT_BUTTON); glutReshapeFunc(myReshape); glutDisplayFunc(display); font=GLUT_BITMAP_9_BY_15;//GLUT_BITMAP_HELVETICA_12; glutMainLoop(); return 0; }
[ "naveenpandurangi@yahoo.com" ]
naveenpandurangi@yahoo.com
cfbf6a8959a5f524aed3da3637eed67ad2d87442
3b56a677b4955a64ddecc59f80a5f2207263dda6
/Lista04/Ecosystem/src/Plant.cpp
75fe18c8b3c271c055f5ab4d4bafa9583469a4f1
[]
no_license
marcinu456/Modelowanie-Komputerowe
9ec9462130200f8b5bf485b8f820be0c2d2fab31
4a469e02c13cbdfdaf377ed6f09dfd6891dbee6b
refs/heads/master
2023-06-01T17:31:00.917418
2021-06-14T21:06:23
2021-06-14T21:06:23
345,437,865
0
0
null
null
null
null
UTF-8
C++
false
false
425
cpp
#include "Plant.h" Plant::Plant(ofVec2f _position, size_t _hp) : Agent(_position, _hp) { } void Plant::draw(ofColor color) { ofSetColor(color); /*yourModel.setPosition(position.x, position.y, 0); yourModel.setRotation(0, 90, 90, 0, 00); double f = 0.1; yourModel.setScale(f, f, f); yourModel.drawFaces();*/ ofDrawTriangle(position, ofVec2f(position.x + 20, position.y), ofVec2f(position.x + 10, position.y+20)); }
[ "marcinu456@gmail.com" ]
marcinu456@gmail.com
82bbed8d0f94264f20b734321888cf03ac5b61f0
d85b1f3ce9a3c24ba158ca4a51ea902d152ef7b9
/testcases/CWE78_OS_Command_Injection/s06/CWE78_OS_Command_Injection__wchar_t_console_w32_execvp_83a.cpp
1581343ca7b8c7c6782497f5e83bd5dd9ced249d
[]
no_license
arichardson/juliet-test-suite-c
cb71a729716c6aa8f4b987752272b66b1916fdaa
e2e8cf80cd7d52f824e9a938bbb3aa658d23d6c9
refs/heads/master
2022-12-10T12:05:51.179384
2022-11-17T15:41:30
2022-12-01T15:25:16
179,281,349
34
34
null
2022-12-01T15:25:18
2019-04-03T12:03:21
null
UTF-8
C++
false
false
2,166
cpp
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE78_OS_Command_Injection__wchar_t_console_w32_execvp_83a.cpp Label Definition File: CWE78_OS_Command_Injection.strings.label.xml Template File: sources-sink-83a.tmpl.cpp */ /* * @description * CWE: 78 OS Command Injection * BadSource: console Read input from the console * GoodSource: Fixed string * Sinks: w32_execvp * BadSink : execute command with wexecvp * Flow Variant: 83 Data flow: data passed to class constructor and destructor by declaring the class object on the stack * * */ #include "std_testcase.h" #include "CWE78_OS_Command_Injection__wchar_t_console_w32_execvp_83.h" namespace CWE78_OS_Command_Injection__wchar_t_console_w32_execvp_83 { #ifndef OMITBAD void bad() { wchar_t * data; wchar_t dataBuffer[100] = COMMAND_ARG2; data = dataBuffer; CWE78_OS_Command_Injection__wchar_t_console_w32_execvp_83_bad badObject(data); } #endif /* OMITBAD */ #ifndef OMITGOOD /* goodG2B uses the GoodSource with the BadSink */ static void goodG2B() { wchar_t * data; wchar_t dataBuffer[100] = COMMAND_ARG2; data = dataBuffer; CWE78_OS_Command_Injection__wchar_t_console_w32_execvp_83_goodG2B goodG2BObject(data); } void good() { goodG2B(); } #endif /* OMITGOOD */ } /* close namespace */ /* Below is the main(). It is only used when building this testcase on its own for testing or for building a binary to use in testing binary analysis tools. It is not used when compiling all the testcases as one application, which is how source code analysis tools are tested. */ #ifdef INCLUDEMAIN using namespace CWE78_OS_Command_Injection__wchar_t_console_w32_execvp_83; /* so that we can use good and bad easily */ int main(int argc, char * argv[]) { /* seed randomness */ srand( (unsigned)time(NULL) ); #ifndef OMITGOOD printLine("Calling good()..."); good(); printLine("Finished good()"); #endif /* OMITGOOD */ #ifndef OMITBAD printLine("Calling bad()..."); bad(); printLine("Finished bad()"); #endif /* OMITBAD */ return 0; } #endif
[ "Alexander.Richardson@cl.cam.ac.uk" ]
Alexander.Richardson@cl.cam.ac.uk
d242d504e7b39b9e14666ee229fe0d8385ad4df3
db7ea35dd4d450e869da06b372823d27404b630d
/pthreads/project.cpp
813d1326a21e4f338a36d3529d89ac34070608a8
[]
no_license
VisveshS/Mining-Simulation-Pthreads
6a5ee2fdbbdcd659e4759b469d0fa793e18c020c
d379df818f958fd7f186c881fa898cb2d12dd273
refs/heads/main
2023-03-24T04:44:12.599040
2021-03-24T17:09:37
2021-03-24T17:09:37
351,161,398
0
0
null
null
null
null
UTF-8
C++
false
false
5,625
cpp
#include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include "helper/hash.h" #include <cmath> #include <fstream> #define MAX 1048576.0 bool mineAttempt;// if someone claims to have solved it int nonce;// solution to puzzle int n_verify,n_reject;// number of verifivations, rejections int miner_pubkey; string prevhash; int N, block_num; pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;// ensure only one thread attempts to solve puzzle at a time pthread_mutex_t mutex_1 = PTHREAD_MUTEX_INITIALIZER;// ensure only one thread attempts to solve puzzle at a time using namespace std; struct nodeArgs { int index; float puzzle_threshold; }; struct block { unsigned char prevHash[SHA256_DIGEST_LENGTH]; int minerIndex; struct block* next; } *head; float RandomFloat(float a, float b) { float random = ((float) rand()) / (float) RAND_MAX; float diff = b - a; float r = random * diff; return a + r; } /* This ‘sum’ is shared by the thread(s) */ void *runner(void *param); float fx(float n, int iter=29) { if(iter==0) return n; float lambda = 3.8; float f = lambda*(1-n)*n; return fx(f,iter-1); } /* threads call this function */ int main(int argc, char *argv[]){ srand(time(0)); cout<<"_______________________________\n"; cout<<"Demo of the chaotic function:\n"; cout<<"_______________________________\n"; float x=RandomFloat(0.1,0.9); for(float i=0.0;i<0.00001;i+=0.000001) cout<<"fx("<<x+i<<") = "<<fx(x+i)<<endl; cout<<"_______________________________\n"; ofstream ofs; ofs.open("outputs/blockchain.txt", std::ofstream::out | std::ofstream::trunc); ofs.close(); ofs.open("outputs/useful_information.txt", std::ofstream::out | std::ofstream::trunc); ofs.close(); prevhash = "*"; /* the thread identifier */ pthread_attr_t attr; /* set of thread attributes */ if (argc != 3){ fprintf(stderr,"usage: a.out #miner #block\n"); return -1; } if (atoi(argv[1]) < 0){ fprintf(stderr,"%d must be >= 0\n",atoi(argv[1])); return -1; } if (atoi(argv[2]) < 0){ fprintf(stderr,"%d must be >= 0\n",atoi(argv[1])); return -1; } N = atoi(argv[1]); int num_blocks = atoi(argv[2]); pthread_t tid[N]; /* get the default attributes */ pthread_attr_init(&attr); /* create the thread */ for(int block=0;block<num_blocks;block++) { mineAttempt=false; n_verify=0; n_reject=0; nonce=-1; block_num = block; struct nodeArgs *Args[N]; float puzzle_threshold=RandomFloat(0.2,0.9999); for(int i=0;i<N;i++) { Args[i] = (struct nodeArgs*)malloc(sizeof(struct nodeArgs)); Args[i]->index=i; Args[i]->puzzle_threshold=puzzle_threshold; } // args1->n=atoi((char*)argv[1]); for(int i=0;i<N;i++) pthread_create(&tid[i],&attr,runner,Args[i]); /* wait for the thread to exit */ for(int i=0;i<N;i++) pthread_join(tid[i],NULL); } } void *runner(void *param){ int size = 100000; float y0 = ((struct nodeArgs*)param)->puzzle_threshold; bool solved=false; int index=((struct nodeArgs*)param)->index; // printf("Index %d\n",index); int mr = 0; string hash; //solving puzzle, only one thread at a time because of mutex for(int nonce_ = 0; nonce_ < size and mineAttempt == false; nonce_++) { hash = gethash(nonce_, prevhash, mr, index); float guess = (float)std::stoi(hash.substr(0,5), nullptr, 16)/MAX; float f = fx(guess); pthread_mutex_lock(&mutex); usleep(20000); if(f < y0 and not mineAttempt) { printf("problem solved by thread %d\n", index); mineAttempt = true; solved = true; nonce = nonce_; miner_pubkey = index; } pthread_mutex_unlock(&mutex); } //if yo solved it, wait for enough verifications and add to blockchain if(solved) { while(n_verify+n_reject<N-1); if(n_verify>=N/2) { printf("block mined by %d\n", index); // prevhash = sha256(prevhash + hash); ofstream ofs; ofs.open("outputs/blockchain.txt", std::ofstream::out|std::ofstream::app); ofs << "block number:" << block_num << endl; ofs << "miner id:"<< miner_pubkey << endl; ofs << "prevhash:" << prevhash << endl; ofs << "nonce:" <<nonce<<endl; ofs << "hash:" << hash << endl; ofs.close(); string hash1 = gethash(nonce, prevhash, mr, miner_pubkey); float number = (float)std::stoi(hash1.substr(0,5), nullptr, 16)/MAX; ofs.open("outputs/useful_information.txt", std::ofstream::out|std::ofstream::app); ofs<<"fx("<<number<<") = "<<fx(number)<<" < "<<y0<<endl; ofs.close(); prevhash=hash; } else printf("verification error in %d\n", index); } // perform verification if someone else has solved if(not solved) { while(nonce == -1); string hash = gethash(nonce, prevhash, mr, miner_pubkey); float guess = (float)std::stoi(hash.substr(0,5), nullptr, 16)/MAX; float f = fx(guess); // if (hash.compare(hash_pub) == 0) // cout << "Hash matched" << endl; // else // cout << "Hash did not match" << endl; // cout << "fval:: " << f << endl; if(f<y0) { pthread_mutex_lock(&mutex); n_verify++; pthread_mutex_unlock(&mutex); } else { pthread_mutex_lock(&mutex); n_reject++; pthread_mutex_unlock(&mutex); } } pthread_exit(0); }
[ "noreply@github.com" ]
noreply@github.com
ebc213de7a29885aab27ac38acef9802a7360c61
15b141a7648a05b7ad6c724c43fb703c7ba25857
/textures/main.cpp
cbff28f98a7cf102ff61a41ab8b555af350eb4f4
[]
no_license
puffikru/Brown_belt
d1a1ec0797535eae04852461a395ba3e33cb431d
e309ce08e21f48454195849b573bb119d051ac56
refs/heads/master
2021-06-20T12:19:16.014648
2021-05-08T21:44:04
2021-05-08T21:44:04
215,209,647
3
2
null
null
null
null
UTF-8
C++
false
false
6,310
cpp
#include "Common.h" #include "Textures.h" #include "test_runner.h" #include <iostream> #include <map> using namespace std; class Canvas { public: using ShapeId = size_t; void SetSize(Size size) { size_ = size; } ShapeId AddShape(ShapeType shape_type, Point position, Size size, unique_ptr<ITexture> texture) { auto shape = MakeShape(shape_type); shape->SetPosition(position); shape->SetSize(size); shape->SetTexture(move(texture)); return InsertShape(move(shape)); } ShapeId DuplicateShape(ShapeId source_id, Point target_position) { auto shape = GetShapeNodeById(source_id)->second->Clone(); shape->SetPosition(target_position); return InsertShape(move(shape)); } void RemoveShape(ShapeId id) { shapes_.erase(GetShapeNodeById(id)); } void MoveShape(ShapeId id, Point position) { GetShapeNodeById(id)->second->SetPosition(position); } void ResizeShape(ShapeId id, Size size) { GetShapeNodeById(id)->second->SetSize(size); } int GetShapesCount() const { return static_cast<int>(shapes_.size()); } void Print(ostream& output) const { Image image(size_.height, string(size_.width, ' ')); for (const auto& [id, shape] : shapes_) { shape->Draw(image); } output << '#' << string(size_.width, '#') << "#\n"; for (const auto& line : image) { output << '#' << line << "#\n"; } output << '#' << string(size_.width, '#') << "#\n"; } private: using Shapes = map<ShapeId, unique_ptr<IShape>>; Shapes::iterator GetShapeNodeById(ShapeId id) { auto it = shapes_.find(id); if (it == shapes_.end()) { throw out_of_range("No shape with given ID"); } return it; } ShapeId InsertShape(unique_ptr<IShape> shape) { shapes_[current_id_] = move(shape); return current_id_++; } Size size_ = {}; ShapeId current_id_ = 0; Shapes shapes_; }; void TestSimple() { Canvas canvas; canvas.SetSize({5, 3}); canvas.AddShape(ShapeType::Rectangle, {1, 0}, {3, 3}, nullptr); stringstream output; canvas.Print(output); const auto answer = "#######\n" "# ... #\n" "# ... #\n" "# ... #\n" "#######\n"; ASSERT_EQUAL(answer, output.str()); } void TestSmallTexture() { Canvas canvas; canvas.SetSize({6, 4}); canvas.AddShape(ShapeType::Rectangle, {1, 1}, {4, 2}, MakeTextureSolid({3, 1}, '*')); stringstream output; canvas.Print(output); const auto answer = "########\n" "# #\n" "# ***. #\n" "# .... #\n" "# #\n" "########\n"; ASSERT_EQUAL(answer, output.str()); } void TestCow() { Canvas canvas; canvas.SetSize({18, 5}); canvas.AddShape(ShapeType::Rectangle, {1, 0}, {16, 5}, MakeTextureCow()); stringstream output; canvas.Print(output); // Здесь уместно использовать сырые литералы, т.к. в текстуре есть символы '\' const auto answer = R"(####################)""\n" R"(# ^__^ #)""\n" R"(# (oo)\_______ #)""\n" R"(# (__)\ )\/\ #)""\n" R"(# ||----w | #)""\n" R"(# || || #)""\n" R"(####################)""\n"; ASSERT_EQUAL(answer, output.str()); } void TestCpp() { Canvas canvas; canvas.SetSize({77, 17}); // Буква "C" как разность двух эллипсов, один из которых нарисован цветом фона canvas.AddShape(ShapeType::Ellipse, {2, 1}, {30, 15}, MakeTextureCheckers({100, 100}, 'c', 'C')); canvas.AddShape(ShapeType::Ellipse, {8, 4}, {30, 9}, MakeTextureSolid({100, 100}, ' ')); // Горизонтальные чёрточки плюсов auto h1 = canvas.AddShape(ShapeType::Rectangle, {54, 7}, {22, 3}, MakeTextureSolid({100, 100}, '+')); auto h2 = canvas.DuplicateShape(h1, {30, 7}); // Вертикальные чёрточки плюсов auto v1 = canvas.DuplicateShape(h1, {62, 3}); canvas.ResizeShape(v1, {6, 11}); auto v2 = canvas.DuplicateShape(v1, {38, 3}); stringstream output; canvas.Print(output); const auto answer = "###############################################################################\n" "# #\n" "# cCcCcCcCcC #\n" "# CcCcCcCcCcCcCcCcCc #\n" "# cCcCcCcCcCcCcCcCcCcCcC ++++++ ++++++ #\n" "# CcCcCcCcCcCc ++++++ ++++++ #\n" "# CcCcCcCcC ++++++ ++++++ #\n" "# cCcCcCc ++++++ ++++++ #\n" "# cCcCcC ++++++++++++++++++++++ ++++++++++++++++++++++ #\n" "# CcCcCc ++++++++++++++++++++++ ++++++++++++++++++++++ #\n" "# cCcCcC ++++++++++++++++++++++ ++++++++++++++++++++++ #\n" "# cCcCcCc ++++++ ++++++ #\n" "# CcCcCcCcC ++++++ ++++++ #\n" "# CcCcCcCcCcCc ++++++ ++++++ #\n" "# cCcCcCcCcCcCcCcCcCcCcC ++++++ ++++++ #\n" "# CcCcCcCcCcCcCcCcCc #\n" "# cCcCcCcCcC #\n" "# #\n" "###############################################################################\n"; ASSERT_EQUAL(answer, output.str()); } int main() { TestRunner tr; RUN_TEST(tr, TestSimple); RUN_TEST(tr, TestSmallTexture); RUN_TEST(tr, TestCow); RUN_TEST(tr, TestCpp); return 0; }
[ "igorbulakh1987@yandex.ru" ]
igorbulakh1987@yandex.ru
32f0db8013c0a1f58dd7ef03c3cc0b7e71d50c67
e1d064c3924448e5d58d2c38b4f72a473524d327
/exp/StagHunt-Leadership/StagHunt_control3_preys2_bstag0_sstag125_trials5_pos_close.cpp
e651ff8f9bc16e3bf4e37d1478acba14570e1dc4
[]
no_license
CAThanatos/sferes-leaderfollower
9e747b5d6a4420d0d0625deb4e6063ec67f7e7d9
e40000adeacb1fecb8a96fb4046424e83d1195e6
refs/heads/master
2020-03-31T14:56:43.092960
2018-10-09T20:40:10
2018-10-09T20:40:10
152,316,693
1
0
null
null
null
null
UTF-8
C++
false
false
37,013
cpp
// THIS IS A GENERATED FILE - DO NOT EDIT #define CONTROL3 #define PREYS2 #define BSTAG0 #define SSTAG125 #define TRIALS5 #define POS_CLOSE #line 1 "/home/krocutan/sferes2-0.99/exp/StagHunt-Leadership/StagHunt.cpp" #include "includes.hpp" #include "defparams.hpp" namespace sferes { using namespace nn; // ********** Main Class *********** SFERES_FITNESS(FitStagHunt, sferes::fit::Fitness) { public: typedef Neuron<PfWSum<>, AfSigmoidNoBias<> > neuron_t; typedef Connection<float> connection_t; #ifdef ELMAN typedef Elman< neuron_t, connection_t > nn_t; #else typedef Mlp< neuron_t, connection_t > nn_t; #endif template<typename Indiv> void eval(Indiv& ind) { std::cout << "Nop !" << std::endl; } #ifdef COEVO template<typename Indiv> void eval_compet(Indiv& ind1, Indiv& ind2, int num_leader = 1) #elif defined(LISTMATCH) #ifdef GENOME_TRACES template<typename Indiv> void eval_compet(Indiv& ind1, Indiv& ind2, bool genome_traces = false, bool evaluateInd2 = false) #else template<typename Indiv> void eval_compet(Indiv& ind1, Indiv& ind2, bool evaluateInd2 = false) #endif #elif defined(GENOME_TRACES) template<typename Indiv> void eval_compet(Indiv& ind1, Indiv& ind2, bool genome_traces = false) #else template<typename Indiv> void eval_compet(Indiv& ind1, Indiv& ind2) #endif { nn_t nn1(Params::nn::nb_inputs, Params::nn::nb_hidden, Params::nn::nb_outputs); nn_t nn2(Params::nn::nb_inputs, Params::nn::nb_hidden, Params::nn::nb_outputs); #ifndef MLP_PERSO nn1.set_all_weights(ind1.data()); nn2.set_all_weights(ind2.data()); nn1.init(); nn2.init(); #endif typedef simu::FastsimMulti<Params> simu_t; typedef fastsim::Map map_t; using namespace fastsim; //this->set_mode(fit::mode::eval); // *** Main Loop *** float moy_hares1 = 0, moy_sstags1 = 0, moy_bstags1 = 0; float moy_hares1_solo = 0, moy_sstags1_solo = 0, moy_bstags1_solo = 0; int food1 = 0; float moy_hares2 = 0, moy_sstags2 = 0, moy_bstags2 = 0; float moy_hares2_solo = 0, moy_sstags2_solo = 0, moy_bstags2_solo = 0; int food2 = 0; #ifdef COEVO _num_leader = num_leader; #endif #ifdef DIFF_FIT float fit2 = 0; #endif #ifdef MOVING_LEADER float dist_traveled = 0.0f; #endif #ifdef FITFOLLOW float fit_follow = 0; #endif _nb_leader_first = 0; _nb_preys_killed = 0; _nb_preys_killed_coop = 0; float proportion_leader = 0; float nb_ind1_leader_first = 0; #ifdef DOUBLE_NN float nb_nn1_chosen = 0; float nb_bigger_nn1_chosen = 0; float nb_role_divisions = 0; float fit_nn1 = 0; float fit_nn2 = 0; #endif #ifdef DIVERSITY std::vector<float> vec_sm; #endif for (size_t j = 0; j < Params::simu::nb_trials; ++j) { // clock_t deb = clock(); // init map_t map(Params::simu::map_name(), Params::simu::real_w); simu_t simu(map, (this->mode() == fit::mode::view)); init_simu(simu, nn1, nn2); #ifdef BEHAVIOUR_LOG _file_behaviour = "behaviourTrace"; cpt_files = 0; #endif #ifdef MLP_PERSO StagHuntRobot* robot1 = (StagHuntRobot*)(simu.robots()[0]); StagHuntRobot* robot2 = (StagHuntRobot*)(simu.robots()[1]); Hunter* hunter1 = (Hunter*)robot1; Hunter* hunter2 = (Hunter*)robot2; #ifdef DOUBLE_NN float rand1 = misc::rand(1.0f); float rand2 = misc::rand(1.0f); float diff_hunters = rand1 - rand2; diff_hunters = (diff_hunters/2.0f) + 0.5f; if(rand1 > rand2) { _num_leader = 1; hunter1->set_bool_leader(true); hunter2->set_bool_leader(false); } else { _num_leader = 2; hunter1->set_bool_leader(false); hunter2->set_bool_leader(true); } #ifdef NN_LEADER if(hunter1->is_leader()) { hunter1->choose_nn(0, ind1.data()); hunter2->choose_nn(1, ind2.data()); } else { hunter1->choose_nn(1, ind1.data()); hunter2->choose_nn(0, ind2.data()); } #elif defined(NO_CHOICE_DUP) int nb_weights = (Params::nn::nb_inputs + 1) * Params::nn::nb_hidden + Params::nn::nb_outputs * Params::nn::nb_hidden + Params::nn::nb_outputs; if(ind1.data().size() == nb_weights) { hunter1->choose_nn(0, ind1.data()); if((ind2.data().size() == nb_weights) || (misc::rand<float>() < 0.5f)) hunter2->choose_nn(0, ind2.data()); else hunter2->choose_nn(1, ind2.data()); } else { if(ind2.data().size() == nb_weights) { if(misc::rand<float>() < 0.5f) hunter1->choose_nn(0, ind1.data()); else hunter1->choose_nn(1, ind1.data()); hunter2->choose_nn(0, ind2.data()); } else { if(rand1 > rand2) { hunter1->choose_nn(0, ind1.data()); hunter2->choose_nn(1, ind2.data()); } else { hunter1->choose_nn(1, ind1.data()); hunter2->choose_nn(0, ind2.data()); } } } #elif defined(FORCE_SYMMETRY) int nb_weights = (Params::nn::nb_inputs + 1) * Params::nn::nb_hidden + Params::nn::nb_outputs * Params::nn::nb_hidden + Params::nn::nb_outputs; if(ind1.data().size() == nb_weights) { hunter1->choose_nn(0, ind1.data()); hunter2->choose_nn(0, ind2.data()); } else { if(ind2.data().size() == nb_weights) { hunter1->choose_nn(0, ind1.data()); hunter2->choose_nn(0, ind2.data()); } else { if(misc::rand<float>() < 0.5f) { hunter1->choose_nn(0, ind1.data()); hunter2->choose_nn(0, ind2.data()); } else { hunter1->choose_nn(1, ind1.data()); hunter2->choose_nn(1, ind2.data()); } } } #elif defined(BINARY_DIFF) if(rand1 > rand2) { hunter1->choose_nn(ind1.data(), 1); hunter2->choose_nn(ind2.data(), 0); } else { hunter1->choose_nn(ind1.data(), 0); hunter2->choose_nn(ind2.data(), 1); } #elif defined(CHOICE_ORDERED) int choice_leader; if(hunter1->is_leader()) { #ifdef FORCE_LEADER if(misc::rand<float>() < 0.5f) { choice_leader = 0; hunter1->choose_nn(0, ind1.data()); } else { choice_leader = 1; hunter1->choose_nn(1, ind1.data()); } #else choice_leader = hunter1->choose_nn(ind1.data(), -1); #endif hunter2->choose_nn(ind2.data(), choice_leader); } else { #ifdef FORCE_LEADER if(misc::rand<float>() < 0.5f) { choice_leader = 0; hunter2->choose_nn(0, ind2.data()); } else { choice_leader = 1; hunter2->choose_nn(1, ind2.data()); } #else choice_leader = hunter2->choose_nn(ind2.data(), -1); #endif hunter1->choose_nn(ind1.data(), choice_leader); } #elif defined(COM_NN) #ifdef DECISION_MAPPING hunter1->choose_nn(ind1.data(), 0); hunter2->choose_nn(ind2.data(), 0); #else hunter1->choose_nn(0, ind1.data()); hunter2->choose_nn(0, ind2.data()); #endif #else hunter1->choose_nn(ind1.data(), diff_hunters); hunter2->choose_nn(ind2.data(), 1 - diff_hunters); #endif // Is the nn chosen because of the two random numbers ? if(hunter1->nn1_chosen()) { if(rand1 > rand2) nb_bigger_nn1_chosen++; nb_nn1_chosen++; } // Did the two individuals select a different nn ? if(hunter1->nn1_chosen() != hunter2->nn1_chosen()) nb_role_divisions++; #else hunter1->set_weights(ind1.data()); hunter2->set_weights(ind2.data()); #endif #endif float food_trial = 0; #ifdef MOVING_LEADER Posture prev_pos; StagHuntRobot* rob = (StagHuntRobot*)(simu.robots()[_num_leader - 1]); prev_pos.set_x(rob->get_pos().x()); prev_pos.set_y(rob->get_pos().y()); #endif _nb_leader_first_trial = 0; _nb_preys_killed_coop_trial = 0; #ifdef DIVERSITY std::vector<float> vec_sm_trial; #endif for (size_t i = 0; i < Params::simu::nb_steps && !stop_eval; ++i) { #if defined(FITFOLLOW) || defined(STAGFOLLOW) // We compute the distance between the two individuals StagHuntRobot *rob1, *rob2; if(_num_leader == 1) { rob1 = (StagHuntRobot*)(simu.robots()[0]); rob2 = (StagHuntRobot*)(simu.robots()[1]); } else { rob1 = (StagHuntRobot*)(simu.robots()[1]); rob2 = (StagHuntRobot*)(simu.robots()[0]); } Hunter* follower = (Hunter *)rob2; float distance_leader = rob1->get_pos().dist_to(rob2->get_pos().x(), rob2->get_pos().y()); distance_leader = distance_leader - rob1->get_radius() - rob2->get_radius(); follower->set_distance_hunter(distance_leader); #ifdef COMPAS_FOLLOWER float angle_toLeader = normalize_angle(atan2(rob1->get_pos().y() - rob2->get_pos().y(), rob1->get_pos().x() - rob2->get_pos().x())); angle_toLeader = normalize_angle(angle_toLeader - rob2->get_pos().theta()); follower->set_angle_hunter(angle_toLeader); // We set the values to 0 for the leader by simplicity Hunter* leader = (Hunter *)rob1; leader->set_distance_hunter(0.0f); leader->set_angle_hunter(0.0f); #endif #endif #ifdef COM_COMPAS StagHuntRobot *rob1 = (StagHuntRobot*)(simu.robots()[0]); StagHuntRobot *rob2 = (StagHuntRobot*)(simu.robots()[1]); Hunter* hunter1 = (Hunter*)rob1; Hunter* hunter2 = (Hunter*)rob2; float distance = rob1->get_pos().dist_to(rob2->get_pos().x(), rob2->get_pos().y()); distance = distance - rob1->get_radius() - rob2->get_radius(); hunter1->set_distance_hunter(distance); float angle12 = normalize_angle(atan2(rob2->get_pos().y() - rob1->get_pos().y(), rob2->get_pos().x() - rob1->get_pos().x())); angle12 = normalize_angle(angle12 - rob1->get_pos().theta()); hunter1->set_angle_hunter(angle12); float angle21 = normalize_angle(atan2(rob1->get_pos().y() - rob2->get_pos().y(), rob1->get_pos().x() - rob2->get_pos().x())); angle21 = normalize_angle(angle21 - rob2->get_pos().theta()); hunter2->set_angle_hunter(angle21); #endif // Number of steps the robots are evaluated _nb_eval = i + 1; #ifdef STAGFOLLOW close_hunters = false; #endif // We compute the robots' actions in an ever-changing order std::vector<size_t> ord_vect; misc::rand_ind(ord_vect, simu.robots().size()); for(int k = 0; k < ord_vect.size(); ++k) { int num = (int)(ord_vect[k]); assert(num < simu.robots().size()); StagHuntRobot* robot = (StagHuntRobot*)(simu.robots()[num]); std::vector<float> action = robot->step_action(); // We compute the movement of the robot if(action[0] >= 0 || action[1] >= 0) { float v1 = 4.0*(action[0] * 2.0-1.0); float v2 = 4.0*(action[1] * 2.0-1.0); #ifdef SLOW_LEADER Hunter* hunter = (Hunter*)robot; if(hunter->is_leader()) { v1 /= 2.0; v2 /= 2.0; } #endif // v1 and v2 are between -4 and 4 simu.move_robot(v1, v2, num); #ifdef DIVERSITY if (0 == num) for(size_t l = 0; l < action.size(); ++l) vec_sm_trial.push_back(action[l]); #endif #if defined(SCREAM) && !defined(SCREAM_PREY) if(action[2] >= 0.5) { if(0 == num) hunter2->hear_scream(); else hunter1->hear_scream(); } #endif } } #ifdef DIVERSITY std::vector<float>& vec_inputs_rob = ((Hunter*)(simu.robots()[0]))->get_last_inputs(); for (size_t l = 0; l < vec_inputs_rob.size(); ++l) vec_sm_trial.push_back(vec_inputs_rob[l]); #endif update_simu(simu); // And then we update their status : food gathered, prey dead // For each prey, we check if there are hunters close std::vector<int> dead_preys; #ifdef STAGFOLLOW if(distance_leader <= CATCHING_DISTANCE) close_hunters = true; #endif for(int k = 2; k < simu.robots().size(); ++k) check_status(simu, (Prey*)(simu.robots()[k]), dead_preys, k); #ifdef FITFOLLOW #ifdef SMOOTHPROX fit_follow += (3400.0f - distance_leader)/3400.0f; #else if(distance_leader <= CATCHING_DISTANCE) fit_follow += 1; #endif #endif #ifdef MOVING_LEADER dist_traveled += rob->get_pos().dist_to(prev_pos.x(), prev_pos.y())/3400.0f; prev_pos.set_x(rob->get_pos().x()); prev_pos.set_y(rob->get_pos().y()); #endif // We remove the dead preys while(!dead_preys.empty()) { int index = dead_preys.back(); Prey::type_prey type = ((Prey*)simu.robots()[index])->get_type(); Posture pos; int nb_blocked = ((Prey*)simu.robots()[index])->get_nb_blocked(); bool alone = (nb_blocked > 1) ? false : true; #ifdef BEHAVIOUR_LOG // Is the first robot the first one on the target ? bool first_robot = (((Prey*)simu.robots()[index])->get_leader_first() == 1) == (((Hunter*)simu.robots()[0])->is_leader()); if(this->mode() == fit::mode::view) { std::string fileDump = _file_behaviour + boost::lexical_cast<std::string>(cpt_files + 1) + ".bmp"; simu.add_dead_prey(index, alone, first_robot); // simu.dump_behaviour_log(fileDump.c_str()); cpt_files++; } #endif bool pred_on_it = ((Prey*)simu.robots()[index])->is_pred_on_it(); dead_preys.pop_back(); simu.remove_robot(index); if(type == Prey::HARE) { Posture pos; if(simu.get_random_initial_position(Params::simu::hare_radius, pos)) { Hare* r = new Hare(Params::simu::hare_radius, pos, HARE_COLOR); if(pred_on_it) r->set_pred_on_it(true); simu.add_robot(r); } } else if(type == Prey::SMALL_STAG) { if(simu.get_random_initial_position(Params::simu::big_stag_radius, pos)) { int fur_color = 0; #ifdef FIXED_POS Stag* r = new Stag(Params::simu::big_stag_radius, simu.robots()[index]->get_pos(), BIG_STAG_COLOR, Stag::big, fur_color); #else Stag* r = new Stag(Params::simu::big_stag_radius, pos, BIG_STAG_COLOR, Stag::big, fur_color); #endif if(pred_on_it) r->set_pred_on_it(true); simu.add_robot(r); } } else if(type == Prey::BIG_STAG) { Posture pos; if(simu.get_random_initial_position(Params::simu::big_stag_radius, pos)) { int fur_color = 50; #ifdef FIXED_POS Stag* r = new Stag(Params::simu::big_stag_radius, simu.robots()[index]->get_pos(), BIG_STAG_COLOR, Stag::big, fur_color); #else Stag* r = new Stag(Params::simu::big_stag_radius, pos, BIG_STAG_COLOR, Stag::big, fur_color); #endif if(pred_on_it) r->set_pred_on_it(true); simu.add_robot(r); } } #ifdef FIXED_POS std::vector<Posture> pos_init; #ifdef POS_CLOSE pos_init.push_back(Posture(width/2 - 40, 80, M_PI/2)); pos_init.push_back(Posture(width/2 + 40, 80, M_PI/2)); #else pos_init.push_back(Posture(width/2, 80, M_PI/2)); pos_init.push_back(Posture(width/2, height - 80, -M_PI/2)); #endif for(size_t i = 0; i < 2;++i) simu.teleport_robot(pos_init[i], i); #endif } } Hunter* h1 = (Hunter*)(simu.robots()[0]); food1 += h1->get_food_gathered(); food_trial += h1->get_food_gathered(); moy_hares1 += h1->nb_hares_hunted(); moy_sstags1 += h1->nb_small_stags_hunted(); moy_bstags1 += h1->nb_big_stags_hunted(); moy_hares1_solo += h1->nb_hares_hunted_solo(); moy_sstags1_solo += h1->nb_small_stags_hunted_solo(); moy_bstags1_solo += h1->nb_big_stags_hunted_solo(); Hunter* h2 = (Hunter*)(simu.robots()[1]); food2 += h2->get_food_gathered(); std::cout << "Trial " << j << " : " << std::endl; std::cout << "Food 1 : " << h1->get_food_gathered() << std::endl; std::cout << "Food 2 : " << h2->get_food_gathered() << std::endl; std::cout << "nbSStags 1 :" << h1->nb_small_stags_hunted() << std::endl; std::cout << "nbSStags 2 :" << h2->nb_small_stags_hunted() << std::endl; std::cout << "nbBStags 1 :" << h1->nb_big_stags_hunted() << std::endl; std::cout << "nbBStags 2 :" << h2->nb_big_stags_hunted() << std::endl; // float tmpLeadership = fabs(0.5 - (_nb_leader_first_trial/_nb_preys_killed_coop_trial))/0.5; // std::cout << "Leadership : " << tmpLeadership << std::endl; moy_hares2 += h2->nb_hares_hunted(); moy_sstags2 += h2->nb_small_stags_hunted(); moy_bstags2 += h2->nb_big_stags_hunted(); moy_hares2_solo += h2->nb_hares_hunted_solo(); moy_sstags2_solo += h2->nb_small_stags_hunted_solo(); moy_bstags2_solo += h2->nb_big_stags_hunted_solo(); _nb_leader_first += _nb_leader_first_trial; _nb_preys_killed_coop += _nb_preys_killed_coop_trial; float max_hunts = Params::simu::nb_steps/STAMINA; if(_nb_preys_killed_coop_trial > 0) proportion_leader += fabs(0.5 - (_nb_leader_first_trial/_nb_preys_killed_coop_trial));//*(_nb_preys_killed_coop_trial/max_hunts); if(_num_leader == 1) nb_ind1_leader_first += _nb_leader_first_trial; else nb_ind1_leader_first += _nb_preys_killed_coop_trial - _nb_leader_first_trial; #ifdef DOUBLE_NN if(hunter1->nn1_chosen()) fit_nn1 += food_trial; else fit_nn2 += food_trial; #endif #ifdef DIVERSITY for (size_t l = 0; l < vec_sm_trial.size(); ++l) vec_sm.push_back(vec_sm_trial[l]); #endif #if defined(BEHAVIOUR_LOG) if(this->mode() == fit::mode::view) { std::string fileDump = _file_behaviour + ".bmp"; simu.dump_behaviour_log(fileDump.c_str()); } #endif // std::cout << h1->nb_big #if defined(BEHAVIOUR_VIDEO) if(this->mode() == fit::mode::view) { return; } #endif #ifdef GENOME_TRACES if(genome_traces) { _nb_ind1_leader_first = nb_ind1_leader_first; _nb_preys_killed_ind1 = h1->nb_hares_hunted(); _nb_preys_killed_ind1 += h1->nb_small_stags_hunted(); _nb_preys_killed_ind1 += h1->nb_big_stags_hunted(); return; } #endif } // Mean on all the trials moy_hares1 /= Params::simu::nb_trials; moy_sstags1 /= Params::simu::nb_trials; moy_bstags1 /= Params::simu::nb_trials; moy_hares1_solo /= Params::simu::nb_trials; moy_sstags1_solo /= Params::simu::nb_trials; moy_bstags1_solo /= Params::simu::nb_trials; food1 /= Params::simu::nb_trials; moy_hares2 /= Params::simu::nb_trials; moy_sstags2 /= Params::simu::nb_trials; moy_bstags2 /= Params::simu::nb_trials; moy_hares2_solo /= Params::simu::nb_trials; moy_sstags2_solo /= Params::simu::nb_trials; moy_bstags2_solo /= Params::simu::nb_trials; food2 /= Params::simu::nb_trials; _nb_leader_first /= Params::simu::nb_trials; _nb_preys_killed_coop /= Params::simu::nb_trials; proportion_leader /= Params::simu::nb_trials; nb_ind1_leader_first /= Params::simu::nb_trials; #ifdef DOUBLE_NN nb_nn1_chosen /= Params::simu::nb_trials; nb_bigger_nn1_chosen /= Params::simu::nb_trials; nb_role_divisions /= Params::simu::nb_trials; fit_nn1 /= Params::simu::nb_trials; fit_nn2 /= Params::simu::nb_trials; #endif #ifdef NOT_AGAINST_ALL int nb_encounters = Params::pop::nb_opponents*Params::pop::nb_eval; #elif defined(ALTRUISM) int nb_encounters = 1; #else int nb_encounters = Params::pop::size - 1; #endif moy_hares1 /= nb_encounters; moy_sstags1 /= nb_encounters; moy_bstags1 /= nb_encounters; moy_hares1_solo /= nb_encounters; moy_sstags1_solo /= nb_encounters; moy_bstags1_solo /= nb_encounters; moy_hares2 /= nb_encounters; moy_sstags2 /= nb_encounters; moy_bstags2 /= nb_encounters; moy_hares2_solo /= nb_encounters; moy_sstags2_solo /= nb_encounters; moy_bstags2_solo /= nb_encounters; _nb_leader_first /= nb_encounters; _nb_preys_killed_coop /= nb_encounters; proportion_leader /= nb_encounters; proportion_leader /= 0.5f; nb_ind1_leader_first /= nb_encounters; _nb_ind1_leader_first = nb_ind1_leader_first; #ifdef DOUBLE_NN nb_nn1_chosen /= nb_encounters; nb_bigger_nn1_chosen /= nb_encounters; nb_role_divisions /= nb_encounters; fit_nn1 /= nb_encounters; fit_nn2 /= nb_encounters; #endif food2 /= nb_encounters; food1 /= nb_encounters; ind1.add_nb_hares(moy_hares1, moy_hares1_solo); ind1.add_nb_sstag(moy_sstags1, moy_sstags1_solo); ind1.add_nb_bstag(moy_bstags1, moy_bstags1_solo); ind1.add_nb_leader_first(_nb_leader_first); ind1.add_nb_preys_killed_coop(_nb_preys_killed_coop); ind1.add_proportion_leader(proportion_leader); ind1.add_nb_ind1_leader_first(nb_ind1_leader_first); #ifdef DOUBLE_NN ind1.add_nb_nn1_chosen(nb_nn1_chosen); ind1.add_nb_bigger_nn1_chosen(nb_bigger_nn1_chosen); ind1.add_nb_role_divisions(nb_role_divisions); ind1.add_fit_nn1(fit_nn1); ind1.add_fit_nn2(fit_nn2); #endif ind1.fit().add_fitness(food1); #if (!defined(NOT_AGAINST_ALL) && !defined(ALTRUISM)) || defined(LISTMATCH) #ifdef LISTMATCH if(evaluateInd2) #else if(true) #endif { ind2.add_nb_hares(moy_hares2, moy_hares2_solo); ind2.add_nb_sstag(moy_sstags2, moy_sstags2_solo); ind2.add_nb_bstag(moy_bstags2, moy_bstags2_solo); ind2.add_nb_leader_first(_nb_leader_first); ind2.add_nb_preys_killed_coop(_nb_preys_killed_coop); ind2.add_proportion_leader(proportion_leader); ind2.add_nb_ind1_leader_first(nb_ind1_leader_first); #ifdef DOUBLE_NN ind2.add_nb_nn1_chosen(nb_nn1_chosen); ind2.add_nb_bigger_nn1_chosen(nb_bigger_nn1_chosen); ind2.add_nb_role_divisions(nb_role_divisions); ind2.add_fit_nn1(fit_nn1); ind2.add_fit_nn2(fit_nn2); #endif ind2.fit().add_fitness(food2); } #endif #ifdef DIVERSITY for(size_t l = 0; l < vec_sm.size(); ++l) { vec_sm[l] /= nb_encounters; ind1.add_vec_sm(vec_sm[l], l); } #endif } // *** end of eval *** template<typename Simu> void init_simu(Simu& simu, nn_t &nn1, nn_t &nn2) { // Preparing the environment prepare_env(simu, nn1, nn2); // Visualisation mode if(this->mode() == fit::mode::view) { simu.init_view(true); #if defined(BEHAVIOUR_VIDEO) simu.set_file_video(_file_video); #endif } stop_eval = false; reinit = false; } // Prepare environment template<typename Simu> void prepare_env(Simu& simu, nn_t &nn1, nn_t &nn2) { using namespace fastsim; simu.init(); simu.map()->clear_illuminated_switches(); // Sizes width=simu.map()->get_real_w(); height=simu.map()->get_real_h(); // Robots : // First the robots for the two hunters std::vector<Posture> pos_init; #ifdef POS_CLOSE pos_init.push_back(Posture(width/2 - 40, 80, M_PI/2)); pos_init.push_back(Posture(width/2 + 40, 80, M_PI/2)); #else pos_init.push_back(Posture(width/2, 80, M_PI/2)); pos_init.push_back(Posture(width/2, height - 80, -M_PI/2)); #endif #ifdef INVERS_POS invers_pos = misc::flip_coin(); #else invers_pos = false; #endif #ifdef FIXED_POS std::vector<Posture> vec_pos_preys(Params::simu::nb_big_stags + Params::simu::nb_hares); if(Params::simu::nb_big_stags + Params::simu::nb_hares == 2) { float pos_arr[Params::simu::nb_big_stags + Params::simu::nb_hares][2] = { {width/2 - 600, height/2}, {width/2 + 600, height/2} }; for(size_t i = 0; i < vec_pos_preys.size(); ++i) vec_pos_preys[i] = Posture(pos_arr[i][0], pos_arr[i][1], M_PI/2); } std::vector<size_t> ord_vect; misc::rand_ind(ord_vect, vec_pos_preys.size()); #endif #ifdef COEVO bool first_leader = (_num_leader == 1); #else #ifdef DEACT_LEADER bool first_leader = false; #else bool first_leader = misc::flip_coin(); // bool first_leader = true; #endif _num_leader = first_leader?1:2; #endif #ifdef OBSTACLE_AVOIDANCE for(int i = 0; i < 2; ++i) { Posture pos; if(simu.map()->get_random_initial_position(Params::simu::big_stag_radius + 5, pos)) pos_init[i] = pos; } #endif for(int i = 0; i < 2; ++i) { Hunter* r; Posture pos = (invers_pos) ? pos_init[(i + 1)%2] : pos_init[i]; // Simple NXOR : if first hunter is supposed to be leader and this is // the first hunter we're creating -> true // if first hunter isn't supposed to be leader and this is // not the first hunter we're creating -> true // else -> false bool leader = first_leader == (i == 0); if(0 == i) r = new Hunter(Params::simu::hunter_radius, pos, HUNTER_COLOR, nn1); else r = new Hunter(Params::simu::hunter_radius, pos, HUNTER_COLOR, nn2); #ifdef SOLO if(i > 0) r->set_deactivated(true); #endif if(!r->is_deactivated()) { // 12 lasers range sensors #ifdef AVOID_LEADER if(leader) { r->add_laser(Laser(0, 50)); r->add_laser(Laser(M_PI / 3, 50)); r->add_laser(Laser(-M_PI / 3, 50)); r->add_laser(Laser(2 * M_PI / 3, 50)); r->add_laser(Laser(-2 * M_PI / 3, 50)); r->add_laser(Laser(M_PI, 50)); } else { r->add_laser(Laser(0, 50)); r->add_laser(Laser(M_PI / 6, 50)); r->add_laser(Laser(M_PI / 3, 50)); r->add_laser(Laser(M_PI / 2, 50)); r->add_laser(Laser(2*M_PI / 3, 50)); r->add_laser(Laser(5*M_PI / 6, 50)); r->add_laser(Laser(M_PI, 50)); r->add_laser(Laser(-5*M_PI / 6, 50)); r->add_laser(Laser(-2*M_PI / 3, 50)); r->add_laser(Laser(-M_PI / 2, 50)); r->add_laser(Laser(-M_PI / 3, 50)); r->add_laser(Laser(-M_PI / 6, 50)); } #else r->add_laser(Laser(0, 50)); r->add_laser(Laser(M_PI / 6, 50)); r->add_laser(Laser(M_PI / 3, 50)); r->add_laser(Laser(M_PI / 2, 50)); r->add_laser(Laser(2*M_PI / 3, 50)); r->add_laser(Laser(5*M_PI / 6, 50)); r->add_laser(Laser(M_PI, 50)); r->add_laser(Laser(-5*M_PI / 6, 50)); r->add_laser(Laser(-2*M_PI / 3, 50)); r->add_laser(Laser(-M_PI / 2, 50)); r->add_laser(Laser(-M_PI / 3, 50)); r->add_laser(Laser(-M_PI / 6, 50)); #endif // 1 linear camera r->use_camera(LinearCamera(M_PI/2, Params::simu::nb_camera_pixels)); r->set_bool_leader(leader); #ifdef DEACT_LEADER if(leader) r->set_deactivated(true); #endif } simu.add_robot(r); } // Then the hares std::vector<Posture> vec_pos; int nb_big_stags = Params::simu::ratio_big_stags*Params::simu::nb_big_stags; int nb_small_stags = Params::simu::nb_big_stags - nb_big_stags; for(int i = 0; i < Params::simu::nb_hares; ++i) { Posture pos; if(simu.map()->get_random_initial_position(Params::simu::big_stag_radius + 5, pos, 1000, false)) { #ifdef FIXED_POS Hare* r = new Hare(Params::simu::hare_radius, vec_pos_preys[ord_vect[i]], HARE_COLOR); #else Hare* r = new Hare(Params::simu::hare_radius, pos, HARE_COLOR); #endif #ifdef COOP_HARE if(0 == i) r->set_pred_on_it(true); #endif simu.add_robot(r); } } // And finally the big stags for(int i = 0; i < Params::simu::nb_big_stags; ++i) { int fur_color = 0; if(i >= nb_small_stags) fur_color = 50; Posture pos; if(simu.map()->get_random_initial_position(Params::simu::big_stag_radius + 5, pos, 1000, false)) { #ifdef FIXED_POS Stag* r = new Stag(Params::simu::big_stag_radius, vec_pos_preys[ord_vect[Params::simu::nb_hares + i]], BIG_STAG_COLOR, Stag::big, fur_color); #else Stag* r = new Stag(Params::simu::big_stag_radius, pos, BIG_STAG_COLOR, Stag::big, fur_color); #endif #ifdef COOP_SSTAG if(0 == i) r->set_pred_on_it(true); #endif #ifdef COOP_BSTAG if(nb_small_stags == i) r->set_pred_on_it(true); #endif simu.add_robot(r); } } #ifdef LIGHTS for(int i = 0; i < Params::simu::nb_lights; ++i) { Posture pos; if(simu.map()->get_random_initial_position(Params::simu::light_radius + 5, pos)) { fastsim::Map::ill_sw_t sw = boost::shared_ptr<IlluminatedSwitch>(new IlluminatedSwitch(HARE_COLOR, Params::simu::light_radius, pos.x(), pos.y(), true, HARE_COLOR/100)); simu.add_illuminated_switch(sw); } } #endif } // *** Refresh infos about the robots template<typename Simu> void update_simu(Simu &simu) { // refresh using namespace fastsim; // simu.refresh(); if (this->mode() == fit::mode::view) simu.refresh_view(); } template<typename Simu> void check_status(Simu &simu, Prey* prey, std::vector<int>& dead_preys, int position) { using namespace fastsim; // We compute the distance between this prey and each of its hunters std::vector<Hunter*> hunters; float px = prey->get_pos().x(); float py = prey->get_pos().y(); for(int i = 0; i < 2; ++i) { Hunter* hunter = (Hunter*)(simu.robots()[i]); float hx = hunter->get_pos().x(); float hy = hunter->get_pos().y(); float dist = sqrt(pow(px - hx, 2) + pow(py - hy, 2)); // The radius must not be taken into account if((dist - prey->get_radius() - hunter->get_radius()) <= CATCHING_DISTANCE) hunters.push_back(hunter); } if(hunters.size() == 1) { #ifdef COM_NN // If the individual got first on the prey, we change the nn of the other one for(int i = 0; i < 2; ++i) { Hunter* hunter = (Hunter*)(simu.robots()[i]); #ifdef DECISION_MAPPING if(hunter != hunters[0]) hunter->change_nn_mapping(1); else hunter->change_nn_mapping(0); #else if(hunter != hunters[0]) { if(hunter->nn1_chosen()) hunter->change_nn(1); } #endif } #elif defined(SCREAM_PREY) // If the individual got first on the prey, we alert the other one for(int i = 0; i < 2; ++i) { Hunter* hunter = (Hunter*)(simu.robots()[i]); if(hunter != hunters[0]) hunter->hear_scream(); } #endif if(prey->get_leader_first() == -1) { if(hunters[0]->is_leader()) prey->set_leader_first(1); else prey->set_leader_first(0); } if(!(hunters[0]->is_leader())) { #if defined(FORCE_LEADERSHIP) || defined(FITSECOND) prey->set_no_reward(true); #elif defined(FORCE_LEADERSHIP_STRONG) dead_preys.push_back(position); return; #endif } } // We check if the prey is blocked #ifdef STAGFOLLOW if(close_hunters) if(hunters.size() > 0) prey->blocked_by_hunters(2); else prey->blocked_by_hunters(hunters.size()); else prey->blocked_by_hunters(hunters.size()); #else prey->blocked_by_hunters(hunters.size()); #endif // And then we check if the prey is dead and let the hunters // have a glorious feast on its corpse. Yay ! if(prey->is_dead()) { float food = 0; food = prey->feast(); Prey::type_prey type = prey->get_type(); dead_preys.push_back(position); bool alone; if(prey->get_nb_blocked() <= 1) alone = true; else alone = false; _nb_preys_killed++; if(!alone) { _nb_preys_killed_coop_trial++; if(prey->get_leader_first() == 1) _nb_leader_first_trial++; } for(int i = 0; i < hunters.size(); ++i) { #ifdef FITSECOND if((prey->get_no_reward()) && !(hunters[i]->is_leader())) continue; #endif hunters[i]->add_food(food); if(type == Prey::HARE) hunters[i]->eat_hare(alone); else if(type == Prey::SMALL_STAG) hunters[i]->eat_small_stag(alone); else { hunters[i]->eat_big_stag(alone); #ifdef STAG_STUN if(alone) hunters[i]->stun_hunter(); #elif defined(STAG_KILL) if(alone) hunters[i]->kill_hunter(); #endif } #ifdef EASY_SIMU stop_eval = true; #endif } #ifdef COM_NN for(int i = 0; i < 2; ++i) #ifdef DECISION_MAPPING ((Hunter*)(simu.robots()[i]))->change_nn_mapping(0); #else ((Hunter*)(simu.robots()[i]))->change_nn(0); #endif #elif defined(SCREAM_PREY) for(int i = 0; i < 2; ++i) ((Hunter*)(simu.robots()[i]))->set_scream(0.0f); #endif } } float width, height; bool stop_eval; // Stops the evaluation int _nb_eval; // Number of evaluation (until the robot stands still) bool invers_pos; bool reinit; int nb_invers_pos, nb_spawn; #ifdef STAGFOLLOW bool close_hunters; #endif int _num_leader; float _nb_leader_first; float _nb_preys_killed; float _nb_preys_killed_ind1; float _nb_preys_killed_coop; float _nb_leader_first_trial; float _nb_preys_killed_coop_trial; float _nb_ind1_leader_first; std::string res_dir; size_t gen; void set_res_dir(std::string res_dir) { this->res_dir = res_dir; } void set_gen(size_t gen) { this->gen = gen; } #ifdef BEHAVIOUR_VIDEO std::string _file_video; void set_file_video(const std::string& file_video) { _file_video = file_video; } #endif #ifdef BEHAVIOUR_LOG std::string _file_behaviour; int cpt_files; #endif std::vector<float> vec_fitness; tbb::atomic<float> fitness_at; void add_fitness(float fitness) { fitness_at.fetch_and_store(fitness_at + fitness); } }; } // ****************** Main ************************* int main(int argc, char **argv) { srand(time(0)); // FITNESS typedef FitStagHunt<Params> fit_t; // GENOTYPE #ifdef DIVERSITY typedef gen::EvoFloat<Params::nn::genome_size, Params> gen_t; #else #ifdef CMAES typedef gen::Cmaes<Params::nn::genome_size, Params> gen_t; // typedef gen::Cmaes<90, Params> gen_t; #else #ifdef ELITIST typedef gen::ElitistGen<Params::nn::genome_size, Params> gen_t; #else #ifdef EVOFLOAT typedef gen::EvoFloat<Params::nn::genome_size, Params> gen_t; #else typedef gen::ElitistGen<Params::nn::genome_size, Params> gen_t; #endif #endif #endif #endif // PHENOTYPE typedef phen::PhenChasseur<gen_t, fit_t, Params> phen_t; // EVALUATION #ifdef COEVO typedef eval::StagHuntEvalParallelCoEvo<Params> eval_t; #else typedef eval::StagHuntEvalParallel<Params> eval_t; #endif // STATS typedef boost::fusion::vector< #ifdef COEVO sferes::stat::BestFitEvalCoEvo<phen_t, Params>, // sferes::stat::MeanFitEvalCoEvo<phen_t, Params>, sferes::stat::BestEverFitEvalCoEvo<phen_t, Params>, sferes::stat::AllFitEvalStatCoEvo<phen_t, Params>, sferes::stat::BestLeadershipEvalCoEvo<phen_t, Params>, sferes::stat::AllLeadershipEvalStatCoEvo<phen_t, Params>, #ifdef BEHAVIOUR_VIDEO sferes::stat::BestFitBehaviourVideoCoEvo<phen_t, Params>, #endif #else sferes::stat::BestFitEval<phen_t, Params>, // sferes::stat::MeanFitEval<phen_t, Params>, sferes::stat::BestEverFitEval<phen_t, Params>, sferes::stat::AllFitEvalStat<phen_t, Params>, sferes::stat::BestLeadershipEval<phen_t, Params>, #ifndef POP100 sferes::stat::AllLeadershipEvalStat<phen_t, Params>, #ifdef GENOME_TRACES sferes::stat::AllGenomesTraceStat<phen_t, Params>, #endif #endif #ifdef DOUBLE_NN sferes::stat::BestNNEval<phen_t, Params>, sferes::stat::AllNNEvalStat<phen_t, Params>, #endif #ifdef BEHAVIOUR_VIDEO sferes::stat::BestFitBehaviourVideo<phen_t, Params>, #endif #endif #ifdef DIVERSITY sferes::stat::BestDiversityEval<phen_t, Params>, sferes::stat::AllDiversityEvalStat<phen_t, Params>, // sferes::stat::MeanDiversityEval<phen_t, Params>, // sferes::stat::BestEverDiversityEval<phen_t, Params>, #endif sferes::stat::StopEval<Params> > stat_t; //MODIFIER typedef modif::Dummy<Params> modifier_t; // EVOLUTION ALGORITHM #ifdef DIVERSITY #ifdef COEVO typedef ea::Nsga2CoEvo<phen_t, eval_t, stat_t, modifier_t, Params> ea_t; #else typedef ea::Nsga2<phen_t, eval_t, stat_t, modifier_t, Params> ea_t; #endif #else #ifdef FITPROP typedef ea::FitnessProp<phen_t, eval_t, stat_t, modifier_t, Params> ea_t; #elif defined(CMAES) typedef ea::Cmaes<phen_t, eval_t, stat_t, modifier_t, Params> ea_t; #elif defined(ELITIST) #ifdef COEVO typedef ea::ElitistCoEvo<phen_t, eval_t, stat_t, modifier_t, Params> ea_t; #else typedef ea::Elitist<phen_t, eval_t, stat_t, modifier_t, Params> ea_t; #endif #else typedef ea::RankSimple<phen_t, eval_t, stat_t, modifier_t, Params> ea_t; #endif #endif ea_t ea; // RUN EA time_t exec = time(NULL); run_ea(argc, argv, ea); std::cout << "Temps d'exécution : " << time(NULL) - exec; return 0; }
[ "arthur.bernard1204@gmail.com" ]
arthur.bernard1204@gmail.com
e813b4f8eaf1594992aeee08c5f2c0abd8da4c61
5e54e3f2b98ee4b71cc9e63cb8a78771472f5add
/src/chromium/strings/string_util_win.hh
35f580139d41a9806b737e34142a2f2cfb6b2403
[]
no_license
steve-o/Kigoron
4c5d6d4681563b3f687bdca41124c823225f649b
42123c89b9810015dc91392a96a3c96ce3cdbb1a
refs/heads/master
2021-01-17T15:14:44.723630
2016-05-25T22:21:17
2016-05-25T22:21:17
39,047,724
5
0
null
2015-11-10T00:07:22
2015-07-14T01:57:35
C++
UTF-8
C++
false
false
882
hh
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROMIUM_STRINGS_STRING_UTIL_WIN_HH__ #define CHROMIUM_STRINGS_STRING_UTIL_WIN_HH__ #include <stdarg.h> #include <stdio.h> #include <string.h> namespace chromium { inline int strcasecmp(const char* s1, const char* s2) { return _stricmp(s1, s2); } inline int strncasecmp(const char* s1, const char* s2, size_t count) { return _strnicmp(s1, s2, count); } inline int vsnprintf(char* buffer, size_t size, const char* format, va_list arguments) { int length = vsnprintf_s(buffer, size, size - 1, format, arguments); if (length < 0) return _vscprintf(format, arguments); return length; } } // namespace chromium #endif // CHROMIUM_STRINGS_STRING_UTIL_WIN_HH__
[ "fnjordy@gmail.com" ]
fnjordy@gmail.com
a4c54f7d01ce4a2adc9ae5f5f0c9da9b7628097c
9c5a9cdad7a0975824d7a291d53c3801fa7c3f80
/PAT/code/nineth/9.4/9.4 3 A1099(30)/9.4 3 A1099(30)/stdafx.cpp
e215a9ce652b503dcc2ee00ad35132e887e3a62e
[]
no_license
luckyxuanyeah/Algorithm_Practice
893c6aaae108ab652a0355352366a393553940fe
4f6206a8bfd94d64961f2a8fb07b8afbeb82c1b1
refs/heads/master
2020-04-06T13:48:11.653204
2019-07-17T15:35:47
2019-07-17T15:35:47
157,508,492
0
0
null
2018-11-14T08:19:44
2018-11-14T07:27:47
null
GB18030
C++
false
false
268
cpp
// stdafx.cpp : 只包括标准包含文件的源文件 // 9.4 3 A1099(30).pch 将作为预编译头 // stdafx.obj 将包含预编译类型信息 #include "stdafx.h" // TODO: 在 STDAFX.H 中 // 引用任何所需的附加头文件,而不是在此文件中引用
[ "382435443@qq.com" ]
382435443@qq.com
e5ddd5fe19f45bd599ac81affe2f56d8cecd1824
cf36ff708344bd4d1260191f567a1facad116342
/widgets/Common/CommonAction.cpp
971e973ac0c16e2bb7e00073ce8961be12d1770e
[]
no_license
SeptemberHX/TodoManager
b192ba3c19fe86bf717bfddee3a22eefdf16a1a3
16778c4fd2b636be0ab703ef5f25a0656afd0f54
refs/heads/master
2020-03-25T06:25:59.845908
2018-10-17T14:13:18
2018-10-17T14:13:18
143,501,046
2
0
null
null
null
null
UTF-8
C++
false
false
1,569
cpp
// // Created by septemberhx on 8/7/18. // #include "CommonAction.h" CommonAction *CommonAction::instancePtr = nullptr; CommonAction *CommonAction::getInstance() { if (CommonAction::instancePtr == nullptr) { CommonAction::instancePtr = new CommonAction(); } return CommonAction::instancePtr; } CommonAction::CommonAction() { this->initType2NameMap(); } QList<CommonActionType> CommonAction::getTagActions(bool multiItems) { QList<CommonActionType> resultList; resultList.append(CommonActionType::TAG_REMOVE_ONLY); resultList.append(CommonActionType::TAG_REMOVE_COMPLETE); return resultList; } QList<CommonActionType> CommonAction::getItemDetailActions(bool multiItems) { QList<CommonActionType> resultList; resultList.append(CommonActionType::ITEMDETAIL_ASSIGN_TO_PROJECT); return resultList; } void CommonAction::initType2NameMap() { this->actionType2Name[CommonActionType::TAG_REMOVE_ONLY] = "Remove tag only"; this->actionType2Name[CommonActionType::TAG_REMOVE_COMPLETE] = "Remove tag and tasks"; this->actionType2Name[CommonActionType::ITEMDETAIL_ASSIGN_TO_PROJECT] = "Assign to project"; } QString CommonAction::getActionName(const CommonActionType &actionType) { return this->actionType2Name[actionType]; } CommonActionType CommonAction::getActionType(const QString &name) { foreach (auto const &actionType, this->actionType2Name.keys()) { if (this->actionType2Name[actionType] == name) { return actionType; } } return CommonActionType::ERROR; }
[ "tianjianshan@outlook.com" ]
tianjianshan@outlook.com
81fdbde7a8d97a2b1e327f21b22998e2ba709d35
c14e92092077be792b4a453a984e5a4b2c4f9e1e
/src/draw.h
b50e6f41946e0598bd92df9835da756bf7c08f24
[]
no_license
AaHigh/FontDemo
d05463f851d43ef993d68f453d40a14b2f01eada
8905c0f468d2e486c36a088692f65d59ce4dedda
refs/heads/master
2021-01-19T20:49:15.951547
2018-03-10T01:21:04
2018-03-10T01:21:04
88,561,660
0
0
null
null
null
null
UTF-8
C++
false
false
3,626
h
#ifndef __DRAW_H__ #define __DRAW_H__ U32 ncolortime(F32 n); // normalized colortime -- lowest level func U32 colortime(F32 period_in_secs, F32 normalized_offset=0.0f); U32 colortime(U32 msec, F32 period_in_secs, F32 normalized_offset=0.0f); U32 blendcolors( U32 color1, U32 color2, F32 blend ); // return color1 + ( color2 - color1 ) * blend for each component / byte void myPushMatrix( void ); void myPopMatrix( void ); struct Dinfo // my display info .. one instance per screen { bool primary; int width; int height; RECT rect; }; class AABB // axis aligned bounding box - for debugging and trivial rejection { public: AABB() { reset(); } void reset( void ) { minx = 1.0e+37f; miny = 1.0e+37f; maxx = -1.0e+37f; maxy = -1.0e+37f; } void expand( F32 pt[2] ) { if( pt[0] < minx ) minx = pt[0]; if( pt[0] > maxx ) maxx = pt[0]; if( pt[1] < miny ) miny = pt[1]; if( pt[1] > maxy ) maxy = pt[1]; } void expand( AABB *bbox ) { if( bbox->minx < minx ) minx = bbox->minx; if( bbox->maxx > maxx ) maxx = bbox->maxx; if( bbox->miny < miny ) miny = bbox->miny; if( bbox->maxy > maxy ) maxy = bbox->maxy; } void expand( F32 radius ) { minx -= radius; maxx += radius; miny -= radius; maxy += radius; } bool overlap( AABB *bbox ) { if( bbox->maxx < minx ) return 0; if( bbox->minx > maxx ) return 0; if( bbox->maxy < miny ) return 0; if( bbox->miny > maxy ) return 0; return 1; } void draw( U32 color=0xffffffff ); public: F32 minx,miny; F32 maxx,maxy; }; void draw_everything( void ); void draw_clear_buffers( bool inverted ); void draw_textured_frame( F32 x, F32 y, F32 hwidth, F32 hheight, U32 color, U32 col2=0, F32 z=0, F32 trot=0 ); void draw_textured_frame_pieces( F32 x, F32 y, F32 hwidth, F32 hheight, int hpiececount, int vpiececount, int hoff, int voff, U32 color, U32 col2=0, F32 z=0 ); void draw_textured_frame_pieces_heightfield( F32 x, F32 y, F32 hwidth, F32 hheight, int cols, int rows, int x0, int y0, U32 color, U32 col2, F32 z, F32 **heightfield=NULL ); void draw_textured_frame_decreasing_timer( F32 normalized_timer_remaining, F32 x, F32 y, F32 hwidth, F32 hheight, U32 color, U32 col2=0 ); void draw_untextured_frame( F32 x, F32 y, F32 hwidth, F32 hheight, U32 color ); void draw_in_screen_coord( void ); void draw_in_shadow_coord( U32 w, U32 h ); void draw_in_portrait_screen_coord( void ); void draw_in_landscape_screen_coord( void ); void draw_in_portrait_perspective_screen_coord( F32 camera_dist=0.0f, int width=0, int height=0 ); void draw_in_landscape_perspective_screen_coord( F32 camera_dist=0.0f ); void draw_in_external_camera_perspective( F32 aspect_ratio /* EG: 640.0/480.0f */ ); void get_camera_position( F32 dst[3] ); // this is undefineded when not in Perspective Camera mode bool getSync( void ); void setSync( bool onoff ); void setSwapInterval( int interval ); int getSwapInterval( void ); void myCullFace( U32 mode ); void myTexRot( F32 angle, bool topbottom=true ); void myDepthFunc( U32 mode ); void myMaterial( GLenum face, GLenum pname, U32 color, F32 colormod=1.0f, F32 alphamod=1.0f ); void setupLighting( void ); void defaultLightMaterial( void ); void bind_circle_texture( void ); void draw_init( void ); U32 getNumDisplays( void ); int getDisplayWidth( int display=-1 ); // defaults to primary display int getDisplayHeight( int display=-1 ); void world2screen( F32 dst_screen[3], F32 src_world[3] ); void screen2world( F32 x, F32 y, F32 z, F32 &dst_x, F32 &dst_y ); const Dinfo &getDisplayInfo( int display ); void screengrab( void ); U32 get_refresh_frequency( void ); #endif /* !__DRAW_H__ */
[ "Aaron_Hightower@comcast.com" ]
Aaron_Hightower@comcast.com
a7d8254c299a316c4bf58b28e4fe4841a1c5a861
af9b093999a73245372003fb8c1ad6017be012a5
/UHunt/dynamicPrograming/others/10003-cuttingSticks.cpp
562d3b9a440e095b8dec58c44ce81f6e1f5beca4
[]
no_license
Dariiio/competitiveProgramming
5463657cb5df2d96771d622622a9b26ec7e9bfec
ffb7f429bdea6ff08d3fdded68ce5f0e1301f540
refs/heads/master
2021-06-12T15:22:54.441439
2020-05-26T04:56:48
2020-05-26T04:56:48
128,706,958
0
0
null
null
null
null
UTF-8
C++
false
false
709
cpp
#include<bits/stdc++.h> using namespace std; #define min(a,b) ((a)<(b)?(a):(b)) int v[51],dp[51][51]; int cut(int left,int right,int l_idx,int r_idx){ int len=right-left; if(l_idx==r_idx) return len; else if(l_idx>r_idx) return 0; else if(dp[l_idx][r_idx]!=1e9) return dp[l_idx][r_idx]; for(int i=l_idx;i<=r_idx;i++) dp[l_idx][r_idx]=min(dp[l_idx][r_idx],cut(left,v[i],l_idx,i-1)+cut(v[i],right,i+1,r_idx)+len); return dp[l_idx][r_idx]; } int main() { int len,n,i; while(cin>>len){ if(len==0)break; cin>>n; for(i=0;i<n;i++) cin>>v[i]; for(i=0;i<51;i++) for(int j=0;j<51;j++) dp[i][j]=1e9; printf("The minimum cutting is %d.\n", cut(0, len, 0, n - 1)); } return 0; }
[ "dariiodallara@gmail.com" ]
dariiodallara@gmail.com