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
e159fabf5d4a2d9ed22d61ec6c3428a455b331ab
307faf6d074c09ab6c3417d65f57bf0b3b69646d
/proj/ssa/PerformanceTest/build_vc8/PerformanceTestDlg.cpp
591ab44d0772989714939e0e3557853c1de7b3ac
[]
no_license
h-godai/ssa
bda3cbdddfaa429cb622558a42bcf01ec89de0f2
49c735b954275d4da1102da62f351a040355a211
refs/heads/master
2021-01-13T04:32:25.826868
2017-12-07T19:07:06
2017-12-07T19:07:06
9,258,379
0
1
null
null
null
null
SHIFT_JIS
C++
false
false
5,414
cpp
// PerformanceTestDlg.cpp : 実装ファイル // #include "stdafx.h" #include "PerformanceTestApp.h" #include "PerformanceTestDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // アプリケーションのバージョン情報に使われる CAboutDlg ダイアログ class CAboutDlg : public CDialog { public: CAboutDlg(); // ダイアログ データ enum { IDD = IDD_ABOUTBOX }; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV サポート // 実装 protected: DECLARE_MESSAGE_MAP() }; CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) { } void CAboutDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); } BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) END_MESSAGE_MAP() // PerformanceTestDlg ダイアログ PerformanceTestDlg::PerformanceTestDlg(CWnd* pParent /*=NULL*/) : CDialog(PerformanceTestDlg::IDD, pParent) , m_result1(_T("")) , m_result2(_T("")) , m_result3(_T("")) , m_result4(_T("")) { m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); m_performanceTestForm = shared_ptr<PerformanceTestForm>(new PerformanceTestForm(*this)); } void PerformanceTestDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); DDX_Text(pDX, IDC_EDIT_RESULT1, m_result1); DDX_Text(pDX, IDC_EDIT_RESULT2, m_result2); DDX_Text(pDX, IDC_EDIT_RESULT3, m_result3); DDX_Text(pDX, IDC_EDIT_RESULT4, m_result4); DDX_Control(pDX, IDC_EDIT1, m_console); DDX_Control(pDX, IDC_COMBO_KIND, m_kindComboBox); } BEGIN_MESSAGE_MAP(PerformanceTestDlg, CDialog) ON_WM_SYSCOMMAND() ON_WM_PAINT() ON_WM_QUERYDRAGICON() //}}AFX_MSG_MAP ON_BN_CLICKED(IDC_BUTTON1, &PerformanceTestDlg::OnBnClickedButton1) ON_BN_CLICKED(IDC_BUTTON2, &PerformanceTestDlg::OnBnClickedButton2) ON_BN_CLICKED(IDC_BUTTON3, &PerformanceTestDlg::OnBnClickedButton3) ON_BN_CLICKED(IDC_BUTTON4, &PerformanceTestDlg::OnBnClickedButton4) END_MESSAGE_MAP() // PerformanceTestDlg メッセージ ハンドラ BOOL PerformanceTestDlg::OnInitDialog() { CDialog::OnInitDialog(); // "バージョン情報..." メニューをシステム メニューに追加します。 // IDM_ABOUTBOX は、システム コマンドの範囲内になければなりません。 ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); ASSERT(IDM_ABOUTBOX < 0xF000); CMenu* pSysMenu = GetSystemMenu(FALSE); if (pSysMenu != NULL) { CString strAboutMenu; strAboutMenu.LoadString(IDS_ABOUTBOX); if (!strAboutMenu.IsEmpty()) { pSysMenu->AppendMenu(MF_SEPARATOR); pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); } } // このダイアログのアイコンを設定します。アプリケーションのメイン ウィンドウがダイアログでない場合、 // Framework は、この設定を自動的に行います。 SetIcon(m_hIcon, TRUE); // 大きいアイコンの設定 SetIcon(m_hIcon, FALSE); // 小さいアイコンの設定 // TODO: 初期化をここに追加します。 m_console.SetWindowText(m_outputText); for (PerformanceTestForm::nameListIterator i = m_performanceTestForm->getTestNames().begin(); i != m_performanceTestForm->getTestNames().end(); ++i) { m_kindComboBox.AddString(i->c_str()); } m_kindComboBox.SetCurSel(0); return TRUE; // フォーカスをコントロールに設定した場合を除き、TRUE を返します。 } void PerformanceTestDlg::OnSysCommand(UINT nID, LPARAM lParam) { if ((nID & 0xFFF0) == IDM_ABOUTBOX) { CAboutDlg dlgAbout; dlgAbout.DoModal(); } else { CDialog::OnSysCommand(nID, lParam); } } // ダイアログに最小化ボタンを追加する場合、アイコンを描画するための // 下のコードが必要です。ドキュメント/ビュー モデルを使う MFC アプリケーションの場合、 // これは、Framework によって自動的に設定されます。 void PerformanceTestDlg::OnPaint() { if (IsIconic()) { CPaintDC dc(this); // 描画のデバイス コンテキスト SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0); // クライアントの四角形領域内の中央 int cxIcon = GetSystemMetrics(SM_CXICON); int cyIcon = GetSystemMetrics(SM_CYICON); CRect rect; GetClientRect(&rect); int x = (rect.Width() - cxIcon + 1) / 2; int y = (rect.Height() - cyIcon + 1) / 2; // アイコンの描画 dc.DrawIcon(x, y, m_hIcon); } else { CDialog::OnPaint(); } } // ユーザーが最小化したウィンドウをドラッグしているときに表示するカーソルを取得するために、 // システムがこの関数を呼び出します。 HCURSOR PerformanceTestDlg::OnQueryDragIcon() { return static_cast<HCURSOR>(m_hIcon); } void PerformanceTestDlg::OnBnClickedButton1() { m_performanceTestForm->startTest(m_kindComboBox.GetCurSel(), 1); } void PerformanceTestDlg::OnBnClickedButton2() { m_performanceTestForm->startTest(m_kindComboBox.GetCurSel(), 2); } void PerformanceTestDlg::OnBnClickedButton3() { m_performanceTestForm->startTest(m_kindComboBox.GetCurSel(), 3); } void PerformanceTestDlg::OnBnClickedButton4() { m_performanceTestForm->startTest(m_kindComboBox.GetCurSel(), 4); }
[ "godai@techarts.co.jp" ]
godai@techarts.co.jp
a513c0b4cddac117be014ec06f56c5cdd1e3d0f3
fbd2ca9575b17d86aa28e00dc891acc02f35dcb7
/game/save.cpp
26d08557a8c9271cd32e62bcd78be0273de68e08
[]
no_license
TPiechocki/Scrabble
90413de57c685ae798daf93fdc3a3de79475ff0a
47c28004cdd731f4c8728c9ab005ad4006451859
refs/heads/master
2020-04-08T05:56:28.908098
2018-12-16T11:52:12
2018-12-16T11:52:12
159,077,100
0
0
null
null
null
null
UTF-8
C++
false
false
3,284
cpp
// // Created by Tomasz Piechocki on 01/12/2018. // #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> #include<string.h> #include<direct.h> #include"save.h" #include"../conio2.h" #ifdef __GNUC__ #include<stdlib.h> #endif #ifdef __cplusplus #define EXTERNC extern "C" #else #define EXTERNC #endif // function which returns save file name provided by the user char *enterName() { clrscr(); char str[30]; // buffer char ch = 0; gotoxy(5, 5); cputs("Enter the file name. Use letters, numbers or spaces: "); gotoxy(5, 6); int count = 0; while (ch != 0x0d) { // confirm with enter ch = (char)getch(); if (ch == '\b') { // backspace if (count > 0) { count--; str[count] = '\0'; } } // letters, numbers or space else if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '1' && ch <= '9') || ch == ' ') { if (count < 29) { str[count] = ch; str[count + 1] = '\0'; ++count; } } else if (ch == 0x0d); // do nothing when enter - confirmation of action else { error("Invalid character."); return NULL; } gotoxy(5,6); clreol(); for (int i = 0; str[i] != '\0'; ++i) { putch(str[i]); } } int length = strlen(str); if (length == 0) { // error when file name is empty error("Name can't be empty."); return NULL; } char *fileName = (char *)malloc(sizeof(str[0])*(length + 1)); if (fileName == NULL) { error("Error while creating a save."); return NULL; } strcpy(fileName, str); return fileName; } EXTERNC void saveGame(board_status_t *board, player_t *player, char *dictionary) { char *fileName = enterName(); // get name for save if(fileName == NULL) { // if fileName was empty do nothing error("You must enter name."); return; } char txt[30]; _mkdir("saves"); // create directory for saves if it does not exits sprintf(txt, "saves\\%s", fileName); // save in folder saves FILE *saveFile = fopen(txt, "w"); if (saveFile == NULL) { error("Can't create save with this name."); return; } fwrite(dictionary, sizeof(dictionary[0]), 50, saveFile); fwrite(board, sizeof(*board), 1, saveFile); fwrite(player, sizeof(*player), 1, saveFile); fclose(saveFile); free(fileName); } EXTERNC void loadGame(board_status_t *board, player_t *player, char *dictionary) { char *fileName = enterName(); // get name of file if(fileName == NULL) // if fileName was empty do nothing return; char txt[30]; sprintf(txt, "saves//%s", fileName); // save from folder saves FILE *saveFile = fopen(txt, "r"); if (saveFile == NULL) // check if save with this name exist error("This save does not exist."); else { // read only if exist fread(dictionary, sizeof(dictionary[0]), 50, saveFile); fread(board, sizeof(*board), 1, saveFile); fread(player, sizeof(*player), 1, saveFile); fclose(saveFile); } free(fileName); }
[ "t.piechocki@yahoo.com" ]
t.piechocki@yahoo.com
2853e19bcca3dd082d5c1e97f6a7896d25d0bb63
5dad832bb419bbdb16eecc8ef7991ff394db79bf
/ATtiny-LED-ButtonLamp.ino
2f7c8a93ae2930efeedf25175435a343261162ef
[]
no_license
tomtheswede/ATtiny-LED-ButtonLamp
e354838d5c750089bda6016862279ba8e4530ff0
8b9883eebc6b135c0edce3ed8a1d11dc55fe4ff5
refs/heads/master
2021-01-16T23:14:08.785830
2016-07-17T05:46:00
2016-07-17T05:46:00
63,516,798
0
0
null
null
null
null
UTF-8
C++
false
false
5,131
ino
/* * For a Tactile button and an LED driver at the ledPin. * Code by Thomas Friberg (https://github.com/tomtheswede) * Updated 17/07/2016 */ #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) //OR #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) //AND //Interrupt variables volatile bool pressed=false; volatile bool buttonState=false; volatile unsigned long pressTime=0; volatile const unsigned int reTriggerDelay=190; //minimum time in millis between button presses volatile const unsigned int buttonPin=1; //(1 on ATtiny85) //INPUT CONSTANTS const unsigned int ledPin=0; // (0 on ATtiny85) const unsigned int defaultFadeSpeed=5; const unsigned int longPressLength=600; //Time in milliseconds for a long press const unsigned int longerPressLength=3000; //Time in milliseconds for a longer press (all off) const unsigned int PWMTable[101] = {0,1,1,1,1,1,2,2,2,2,3,3,3,4,4,5,5,6,6,7,7,8,9,9,10,11,12,13,14,15,16,17,18,19,20,21,23,24,25,27,28,30,32,33,35,37,39,41,43,45,47,49,51,53,56,58,61,63,66,69,72,74,77,80,84,87,90,93,97,100,104,108,111,115,119,123,127,131,136,140,145,149,154,159,163,168,174,179,184,189,195,200,206,212,218,224,230,236,242,249,255}; //0 to 100 values for brightnes //GLOBAL VARIABLES String data = ""; unsigned int fadeSpeed=defaultFadeSpeed; bool longPressPrimer=false; bool longerPressPrimer=false; unsigned int ledPinState = 0; //Default boot state of LEDs and last setPoint of the pin between 0 and 100 unsigned int ledSetPoint = 0; unsigned int brightness = 100; //last 'on' setpoint for 0-100 scale brightness unsigned long lastFadeTime = 0; long calibrationTime=0; bool calibratePrimer=false; int timerCount=0; bool timerPrimer=false; //----------------------------------------------------------------------------- void setup() { setupLines(); } //----------------------------------------------------------------------------- void loop() { ReportButtonPress(); FadeLEDs(); delay(0); } //----------------------------------------------------------------------------- void setupLines() { pinMode(buttonPin,INPUT_PULLUP); pinMode(ledPin,OUTPUT); digitalWrite(ledPin, HIGH); //Turn off LED while connecting delay(20); digitalWrite(ledPin, LOW); //Turn off LED while connecting ledSetPoint=0; // input a setpoint for fading as we enter the loop //Serial.begin(9600); //Set pin to start interrupts sbi(GIMSK,PCIE); //Turn on interrupt sbi(PCMSK,PCINT1); //set pin affected by interupt } //----------------------------------------------------------------------------- ISR(PCINT0_vect) { // This is called when the interrupt occurs, but I don't need to do anything in it buttonState=!digitalRead(buttonPin); //Serial.println("Test trigger"); if (buttonState && (millis()-pressTime>reTriggerDelay)) { //if pressed in pressed=true; pressTime=millis(); //Serial.println("--Test trigger2"); } else if (!buttonState && (millis()-pressTime>reTriggerDelay)) { //if released pressTime=millis(); //Serial.println("--Test trigger4"); } } //----------------------------------------------------------------------------- void ReportButtonPress() { buttonState=!digitalRead(buttonPin); if (pressed && (ledPinState>0) && (ledPinState!=ledSetPoint)) { //Hold brightness=ledPinState; ledSetPoint=brightness; //Serial.println("Hold Triggered. "); longPressPrimer=true; longerPressPrimer=true; pressed=false; } if (pressed && (ledPinState==0)) { //Switch on ledSetPoint=brightness; // input a setpoint for fading //Serial.println("Toggle On Triggered. "); longPressPrimer=true; longerPressPrimer=true; pressed=false; } if (pressed && (ledPinState>0)) { //Off ledSetPoint=0; // input a setpoint for fading //Serial.println("Toggle Off Triggered. "); longPressPrimer=true; longerPressPrimer=true; pressed=false; } else if (buttonState && longPressPrimer && (millis()-pressTime>longPressLength)) { // Full power (or all off) longPressPrimer=false; brightness=100; ledSetPoint=brightness; //Serial.println("Full Power Triggered. "); } //else if (buttonState && longerPressPrimer && (millis()-pressTime>longerPressLength)) { // Longer hold // longerPressPrimer=false; // ledSetPoint=0; // input a setpoint for fading // Serial.println("All Off Triggered. "); //} else if (!buttonState && (millis()-pressTime>longerPressLength)) { longPressPrimer=false; longerPressPrimer=false; } } //----------------------------------------------------------------------------- void FadeLEDs() { if ((millis()-lastFadeTime>fadeSpeed) && (ledPinState<ledSetPoint)) { ledPinState = ledPinState + 1; analogWrite(ledPin, PWMTable[ledPinState]); //Serial.println("LED state is now set to " + String(ledPinState)); lastFadeTime=millis(); } else if ((millis()-lastFadeTime>fadeSpeed) && (ledPinState > ledSetPoint)) { ledPinState = ledPinState - 1; analogWrite(ledPin, PWMTable[ledPinState]); //Serial.println("LED state is now set to " + String(ledPinState)); lastFadeTime=millis(); } }
[ "tomtheswede@gmail.com" ]
tomtheswede@gmail.com
e60b31478634f0047baae13bfc3d5d37f38743bb
750d37f186d192ba9493c0bc530b4d3d11c90148
/include/hash.h
ed5666dd7e624bd4f5208660c0a243a76c9fd851
[ "MIT" ]
permissive
TaWeiTu/tcg-cdc
4492285e0a66fe37c4e786035b1c1a5dcfd8bdda
02e2aef69ce70a0d72b07a2165690cc34da3bfb4
refs/heads/master
2023-02-22T17:03:10.148588
2021-01-20T21:20:34
2021-01-20T21:20:34
329,855,473
0
0
null
null
null
null
UTF-8
C++
false
false
1,868
h
#ifndef HASH_H_ #define HASH_H_ #include <algorithm> #include <array> #include <iostream> #include <random> using uint128_t = unsigned __int128; inline std::ostream &operator<<(std::ostream &os, uint128_t v) { if (v == 0) return os << "0"; char stk[64]; int ptr = 0; while (v > 0) { stk[ptr++] = (v % 10) + '0'; v /= 10; } while (ptr > 0) os << stk[--ptr]; return os; } template <size_t N, size_t M, size_t K> class ZobristHash { std::array<std::array<uint128_t, M>, N> hash_pieces_; std::array<uint128_t, K> hash_player_; public: explicit ZobristHash(uint64_t seed = 0) { std::mt19937 rng(seed); std::uniform_int_distribution<uint64_t> dist; auto Rand128 = [&rng, &dist]() -> uint128_t { return (uint128_t(dist(rng)) << 64) | uint128_t(dist(rng)); }; for (size_t i = 0; i < N; ++i) { std::generate(hash_pieces_[i].begin(), hash_pieces_[i].end(), Rand128); } for (size_t i = 0; i < K; ++i) hash_player_[i] = Rand128(); } uint128_t GetPieceHash(size_t i, size_t j) const { return hash_pieces_[i][j]; }; uint128_t GetPlayerHash(size_t idx) const { return hash_player_[idx]; } }; enum Status : uint8_t { NO_VALUE, EXACT_VALUE, LOWER_BOUND, UPPER_BOUND }; template <class MoveT> struct Entry { Status flag; uint128_t hash_value; float score; int depth; MoveT best_move; Entry() = default; Entry(Status f, uint128_t v, float s, int d, const MoveT &mv) : flag(f), hash_value(v), score(s), depth(d), best_move(mv) {} }; template <size_t B, class MoveT> class TranspositionTable { static constexpr size_t N = (1 << B); std::array<Entry<MoveT>, N> table_; public: explicit TranspositionTable() { for (size_t i = 0; i < N; ++i) table_[i].flag = NO_VALUE; } Entry<MoveT> &GetEntry(uint128_t v) { return table_[v & (N - 1)]; } }; #endif // HASH_H_
[ "tu.da.wei@gmail.com" ]
tu.da.wei@gmail.com
0407329e80008a5c8098afe3aa096a8e67b76779
d4d5a0bc519294e4b3f312048dd52cf9264b7e29
/CodeForces/385C/15230227_TLE_2000ms_160756kB.cpp
cda603597be4933d822f33dee46ba771935e4931
[]
no_license
imhdx/My-all-code-of-Vjudge-Judge
fc625f83befbaeda7a033fd271fd4f61d295e807
b0db5247db09837be9866f39b183409f0a02c290
refs/heads/master
2020-04-29T08:16:24.607167
2019-07-24T01:17:15
2019-07-24T01:17:15
175,981,455
0
0
null
null
null
null
UTF-8
C++
false
false
1,122
cpp
#include<bits/stdc++.h> using namespace std; int a[1000011]; int pri[10000010]; int prim[10000010]; long long int num[10000010]; int main() { int i; int cnt=0; for (i=2;i<10000010;i++) { if (pri[i]==0) { prim[cnt++]=i; for (long long int j=i;i*j<10000010;j++) pri[i*j]=1; } } int m; int n; scanf("%d",&n); //int maxx=0; for (i=1;i<=n;i++) { scanf("%d",&a[i]); int j; for (j=0;prim[j]<=(int)sqrt(a[i]);j++) { if (a[i]%prim[j]==0) { num[prim[j]]++; a[i]=a[i]/prim[j]; while (a[i]%prim[j]==0) a[i]=a[i]/prim[j]; } } if (a[i]==1) continue; else num[a[i]]++; //maxx=max(prim[j],max(maxx,a[i])); } for (i=1;i<10000010;i++) num[i]+=num[i-1]; scanf("%d",&m); for (i=0;i<m;i++) { int x,y; scanf("%d%d",&x,&y); printf("%I64d\n",num[min(10000010-1,y)]-num[min(10000010-1,x-1)]); } return 0; }
[ "mhdxacmer@126.com" ]
mhdxacmer@126.com
007f489276b92d73a6fe46bcc76dccf4462dcd4e
1a14a2d861f098aeffb32ac727fd28e3e11b7812
/arduino-1.8.3/hardware/arduino/avr/cores/arduino/Print.h
e42f843109f8ba09bf2ee84a4e4ca55aba17c8f9
[]
no_license
TRIROG/questbox
aab0abedb3e9895ceb510770137b58fa7d7ad4f4
f48233f8ca9f238e0867b7baff050db46469b69c
refs/heads/master
2020-04-08T05:02:06.697811
2018-09-17T15:44:34
2018-09-17T15:44:34
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,050
h
/* Print.h - Base class that provides print() and println() Copyright (c) 2008 David A. Mellis. All right reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef Print_h #define Print_h #include <inttypes.h> #include <stdio.h> // for size_t #include "WString.h" #include "Printable.h" #define DEC 10 #define HEX 16 #define OCT 8 #ifdef BIN // Prevent warnings if BIN is previously defined in "iotnx4.h" or similar #undef BIN #endif #define BIN 2 class Print { private: int write_error; size_t printNumber(unsigned long, uint8_t); size_t printFloat(double, uint8_t); protected: void setWriteError(int err = 1) { write_error = err; } public: Print() : write_error(0) {} int getWriteError() { return write_error; } void clearWriteError() { setWriteError(0); } virtual size_t write(uint8_t) = 0; size_t write(const char *str) { if (str == NULL) return 0; return write((const uint8_t *)str, strlen(str)); } virtual size_t write(const uint8_t *buffer, size_t size); size_t write(const char *buffer, size_t size) { return write((const uint8_t *)buffer, size); } // default to zero, meaning "a single write may block" // should be overriden by subclasses with buffering virtual int availableForWrite() { return 0; } size_t print(const __FlashStringHelper *); size_t print(const String &); size_t print(const char[]); size_t print(char); size_t print(unsigned char, int = DEC); size_t print(int, int = DEC); size_t print(unsigned int, int = DEC); size_t print(long, int = DEC); size_t print(unsigned long, int = DEC); size_t print(double, int = 2); size_t print(const Printable&); size_t println(const __FlashStringHelper *); size_t println(const String &s); size_t println(const char[]); size_t println(char); size_t println(unsigned char, int = DEC); size_t println(int, int = DEC); size_t println(unsigned int, int = DEC); size_t println(long, int = DEC); size_t println(unsigned long, int = DEC); size_t println(double, int = 2); size_t println(const Printable&); size_t println(void); virtual void flush() { /* Empty implementation for backward compatibility */ } #include <stdarg.h> #define PRINTF_BUF 80 // define the tmp buffer size (change if desired) void printf(const char *format, ...) { char buf[PRINTF_BUF]; va_list ap; va_start(ap, format); vsnprintf(buf, sizeof(buf), format, ap); for(char *p = &buf[0]; *p; p++) // emulate cooked mode for newlines { if(*p == '\n') write('\r'); write(*p); } va_end(ap); } #ifdef F // check to see if F() macro is available void printf(const __FlashStringHelper *format, ...) { char buf[PRINTF_BUF]; va_list ap; va_start(ap, format); #ifdef __AVR__ vsnprintf_P(buf, sizeof(buf), (const char *)format, ap); // progmem for AVR #else vsnprintf(buf, sizeof(buf), (const char *)format, ap); // for the rest of the world #endif for(char *p = &buf[0]; *p; p++) // emulate cooked mode for newlines { if(*p == '\n') write('\r'); write(*p); } va_end(ap); } #endif }; #endif
[ "vidvranjek@gmail.com" ]
vidvranjek@gmail.com
3973808d650c7e8cd99c827f8d22dd6c7f68903e
e0876762ef0951357b54842d0ae34bd875f7541c
/part_B_program_3.cpp
b722bfe362db3a2fc8c23b66a40ad2cc86a85628
[]
no_license
sir-rasel/c_plus_plus_lab_program
7c6f26db4b8f340d02d10ecde2b0d93c17e41fd7
67bd797c3b1671a05134ce0efadcb03bafe1ae04
refs/heads/master
2020-03-24T20:17:14.381057
2019-02-17T14:06:51
2019-02-17T14:06:51
142,969,690
3
0
null
null
null
null
UTF-8
C++
false
false
1,681
cpp
/*////////////////// // Part - B // // Program - 3 // //////////////////*/ #include<iostream> #include<string> using namespace std; class student{ string name,roll; public: student(){ name = "unknown"; roll = "unknown"; } void putdata(string n,string r){ name = n; roll = r; } void getdata(){ cout<< "Name: "<<name<<endl; cout<< "Roll: "<<roll<<endl; } }; class exam:public student{ protected: int marks[6]; public: exam(){ for(int i=0;i<6;i++){ marks[i]=0; } } void putdata(string n,string r,int *a){ student::putdata(n,r); for(int i=0;i<6;i++){ marks[i]=a[i]; } } void getdata(){ student::getdata(); cout<< "Marks of student: "; for(int i=0;i<6;i++){ cout<<marks[i]<< " "; } cout<<endl; } }; class result:public exam{ int totalMarks; public: result(){ totalMarks = 0; } void putdata(string n,string r,int *a){ exam::putdata(n,r,a); for(int i=0;i<6;i++){ totalMarks+=marks[i]; } } void getdata(){ exam::getdata(); cout<< "Total Marks : "<<totalMarks<<endl; } }; void getInformation(string &name,string &roll,int marks[]){ cout<< "Name: "; getline(cin,name); cout<< "Roll: "; getline(cin,roll); cout<< "Marks in six subject: "; for(int i=0;i<6;i++) cin>>marks[i]; } int main(){ result ob; string name,roll; int marks[6]; getInformation(name,roll,marks); ob.putdata(name,roll,marks); ob.getdata(); return 0; }
[ "s.i.r.computerengineer24@gmail.com" ]
s.i.r.computerengineer24@gmail.com
a5cc8f7ac8fbe760bdfdf033855be03abc0a7a74
3c199d61a0070b948f91d654d7287dbcaa1585fd
/tests/utils/test_quaternion.cc
84758fbc5b4114253e2c2b776755bc8af166216c
[ "BSD-3-Clause" ]
permissive
mihaibujanca/dynamicfusion
e13cbb18e6285a5b9810f3ffb104443af5ebf7fe
b687a8987b77c9f613ed072726729d8ce05a458a
refs/heads/master
2023-03-08T13:18:01.413162
2023-03-02T12:59:37
2023-03-02T12:59:37
90,779,414
399
118
BSD-3-Clause
2017-12-27T14:55:14
2017-05-09T18:34:11
C++
UTF-8
C++
false
false
1,788
cc
#include <gtest/gtest.h> #include <quaternion.hpp> #include <math.h> #include <kfusion/types.hpp> using namespace kfusion::utils; TEST(QuaternionTest, encodeRotation) { Quaternion<float> quaternion; quaternion.encodeRotation(M_PI_4, 0, 0, 1); ASSERT_FLOAT_EQ(0.9238795, quaternion.w_); ASSERT_FLOAT_EQ(0, quaternion.x_); ASSERT_FLOAT_EQ(0, quaternion.y_); ASSERT_FLOAT_EQ(0.38268346, quaternion.z_); } TEST(QuaternionTest, rotate) { Quaternion<float> quaternion(0,0,1,1); float vector[] = {0,0,1}; quaternion.rotate(vector[0], vector[1], vector[2]); EXPECT_EQ(vector[0], 0); EXPECT_EQ(vector[1], 2); EXPECT_EQ(vector[2], 0); } TEST(QuaternionTest, quat_product) { Quaternion<float> quaternion(1,1,2,2); Quaternion<float> quaternion1(0,0,1,1); Quaternion<float> product = quaternion * quaternion1; EXPECT_EQ(product.w_, -4); EXPECT_EQ(product.x_, 0); EXPECT_EQ(product.y_, 0); EXPECT_EQ(product.z_, 2); } TEST(QuaternionTest, dotProduct) { Quaternion<float> quaternion(1,1,2,2); Quaternion<float> quaternion1(0,0,1,1); EXPECT_EQ(quaternion.dotProduct(quaternion1), 4); } TEST(QuaternionTest, normalize) { Quaternion<float> quaternion(10,10,10,10); quaternion.normalize(); EXPECT_EQ(quaternion, Quaternion<float>(0.5, 0.5, 0.5, 0.5)); } TEST(QuaternionTest, rodrigues) { Quaternion<float> quaternion; quaternion.encodeRotation(3,1,1,1); float x, y, z; quaternion.getRodrigues(x,y,z); std::cout<<x<<" "<<y<<" "<<z<<std::endl; ASSERT_FLOAT_EQ(2, x); ASSERT_FLOAT_EQ(4, y); ASSERT_FLOAT_EQ(4, z); } TEST(QuaternionTest, normal) { kfusion::Vec3f normal(0,1,0); Quaternion<float> quaternion(normal); std::cout<<"Quaternion:" << quaternion; }
[ "mihaibujanca@yahoo.com" ]
mihaibujanca@yahoo.com
8e1f486569f3693a456901f1d9fe144c7c254fd6
5d684c2d05d766996c3270e9629439ea2729e54a
/src/pronet/pro_net/pro_tp_reactor_task.cpp
bd5ee12d9c82bd4e4f60a95ad8db21a9725ac80e
[ "Apache-2.0", "BSD-3-Clause", "LicenseRef-scancode-mit-old-style", "LicenseRef-scancode-public-domain" ]
permissive
xxmingming/libpronet
c8d3421b576a5cbd8a4061a833e6948e89d2f138
99ab28db9d19dca48fac1680bf38c056cbfc6e7f
refs/heads/master
2023-09-05T18:34:21.317207
2021-11-07T12:08:26
2021-11-16T18:09:59
null
0
0
null
null
null
null
UTF-8
C++
false
false
14,547
cpp
/* * Copyright (C) 2018-2019 Eric Tung <libpronet@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"), * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * This file is part of LibProNet (https://github.com/libpronet/libpronet) */ #include "pro_tp_reactor_task.h" #include "pro_base_reactor.h" #include "pro_epoll_reactor.h" #include "pro_event_handler.h" #include "pro_net.h" #include "pro_select_reactor.h" #include "../pro_util/pro_memory_pool.h" #include "../pro_util/pro_stl.h" #include "../pro_util/pro_thread.h" #include "../pro_util/pro_thread_mutex.h" #include "../pro_util/pro_timer_factory.h" #include "../pro_util/pro_z.h" #if defined(_WIN32) || defined(_WIN32_WCE) #include <windows.h> #endif #include <cassert> ///////////////////////////////////////////////////////////////////////////// //// #if defined(PRO_HAS_EPOLL) typedef CProEpollReactor CProReactorImpl; #else typedef CProSelectReactor CProReactorImpl; #endif ///////////////////////////////////////////////////////////////////////////// //// CProTpReactorTask::CProTpReactorTask() { m_acceptReactor = NULL; m_acceptThreadCount = 0; m_ioThreadCount = 0; m_ioThreadPriority = 0; m_curThreadCount = 0; m_wantExit = false; } CProTpReactorTask::~CProTpReactorTask() { Stop(); } bool CProTpReactorTask::Start(unsigned long ioThreadCount, long ioThreadPriority) /* = 0, 1, 2 */ {{ CProThreadMutexGuard mon(m_lockAtom); assert(ioThreadCount > 0); assert( ioThreadPriority == 0 || ioThreadPriority == 1 || ioThreadPriority == 2 ); if ( ioThreadCount == 0 || (ioThreadPriority != 0 && ioThreadPriority != 1 && ioThreadPriority != 2) ) { return (false); } { CProThreadMutexGuard mon(m_lock); assert(m_acceptThreadCount + m_ioThreadCount == 0); if (m_acceptThreadCount + m_ioThreadCount != 0) { return (false); } m_acceptThreadCount = 1; m_ioThreadCount = ioThreadCount; /* for StopMe(...) */ m_ioThreadPriority = ioThreadPriority; /* * reactors */ { m_acceptReactor = new CProReactorImpl; if (!m_acceptReactor->Init()) { goto EXIT; } for (int i = 0; i < (int)m_ioThreadCount; ++i) { CProBaseReactor* const reactor = new CProReactorImpl; if (!reactor->Init()) { delete reactor; break; } m_ioReactors.push_back(reactor); } assert(m_ioReactors.size() == m_ioThreadCount); if (m_ioReactors.size() != m_ioThreadCount) { goto EXIT; } } /* * threads */ { int i; for (i = 0; i < (int)(m_acceptThreadCount + m_ioThreadCount); ++i) { if (!Spawn(false)) { break; } } assert(i == (int)(m_acceptThreadCount + m_ioThreadCount)); if (i != (int)(m_acceptThreadCount + m_ioThreadCount)) { goto EXIT; } } /* * timer factories */ if (!m_timerFactory.Start(false) || !m_mmTimerFactory.Start(true)) { goto EXIT; } while (m_curThreadCount < m_acceptThreadCount + m_ioThreadCount) { m_initCond.Wait(&m_lock); } } return (true); EXIT: StopMe(); return (false); }} void CProTpReactorTask::Stop() {{ CProThreadMutexGuard mon(m_lockAtom); StopMe(); }} void CProTpReactorTask::StopMe() { { CProThreadMutexGuard mon(m_lock); if (m_acceptThreadCount + m_ioThreadCount == 0) { return; } assert(m_threadIds.find(ProGetThreadId()) == m_threadIds.end()); /* deadlock */ m_wantExit = true; if (m_acceptReactor != NULL) { m_acceptReactor->Fini(); } int i = 0; const int c = (int)m_ioReactors.size(); for (; i < c; ++i) { m_ioReactors[i]->Fini(); } } WaitAll(); m_timerFactory.Stop(); m_mmTimerFactory.Stop(); { CProThreadMutexGuard mon(m_lock); delete m_acceptReactor; int i = 0; const int c = (int)m_ioReactors.size(); for (; i < c; ++i) { delete m_ioReactors[i]; } m_ioReactors.clear(); m_acceptReactor = NULL; m_acceptThreadCount = 0; m_ioThreadCount = 0; m_ioThreadPriority = 0; m_curThreadCount = 0; m_wantExit = false; } } bool CProTpReactorTask::AddHandler(PRO_INT64 sockId, CProEventHandler* handler, unsigned long mask) { mask &= (PRO_MASK_ACCEPT | PRO_MASK_CONNECT | PRO_MASK_WRITE | PRO_MASK_READ | PRO_MASK_EXCEPTION); assert(sockId != -1); assert(handler != NULL); assert(mask != 0); if (sockId == -1 || handler == NULL || mask == 0) { return (false); } if (PRO_BIT_ENABLED(mask, PRO_MASK_ACCEPT)) { assert(mask == PRO_MASK_ACCEPT); if (mask != PRO_MASK_ACCEPT) { return (false); } } bool ret = false; { CProThreadMutexGuard mon(m_lock); if (m_acceptThreadCount + m_ioThreadCount == 0 || m_curThreadCount != m_acceptThreadCount + m_ioThreadCount || m_wantExit) { return (false); } CProBaseReactor* ioReactor = handler->GetReactor(); if (ioReactor == NULL) { int i = 0; const int c = (int)m_ioReactors.size(); for (; i < c; ++i) { if (ioReactor == NULL) { ioReactor = m_ioReactors[i]; continue; } if (m_ioReactors[i]->GetHandlerCount() < ioReactor->GetHandlerCount()) { ioReactor = m_ioReactors[i]; } } } if (PRO_BIT_ENABLED(mask, PRO_MASK_ACCEPT)) { ret = m_acceptReactor->AddHandler( sockId, handler, PRO_MASK_ACCEPT); if (!ret) { mask = 0; } } else { ret = ioReactor->AddHandler(sockId, handler, mask); if (ret) { handler->SetReactor(ioReactor); } else { mask = 0; } } handler->AddMask(mask); } return (ret); } void CProTpReactorTask::RemoveHandler(PRO_INT64 sockId, CProEventHandler* handler, unsigned long mask) { mask &= (PRO_MASK_ACCEPT | PRO_MASK_CONNECT | PRO_MASK_WRITE | PRO_MASK_READ | PRO_MASK_EXCEPTION); if (sockId == -1 || handler == NULL || mask == 0) { return; } { CProThreadMutexGuard mon(m_lock); if (m_acceptThreadCount + m_ioThreadCount == 0 || m_curThreadCount != m_acceptThreadCount + m_ioThreadCount) { return; } if (PRO_BIT_ENABLED(mask, PRO_MASK_ACCEPT)) { m_acceptReactor->RemoveHandler(sockId, PRO_MASK_ACCEPT); handler->RemoveMask(PRO_MASK_ACCEPT); } if (PRO_BIT_ENABLED(mask, ~PRO_MASK_ACCEPT)) { unsigned long ioMask = mask & ~PRO_MASK_ACCEPT; CProBaseReactor* const ioReactor = handler->GetReactor(); if (ioReactor != NULL) { ioReactor->RemoveHandler(sockId, ioMask); } handler->RemoveMask(ioMask); ioMask = handler->GetMask() & ~PRO_MASK_ACCEPT; if (ioMask == 0) { handler->SetReactor(NULL); } } } } PRO_UINT64 PRO_CALLTYPE CProTpReactorTask::ScheduleTimer(IProOnTimer* onTimer, PRO_UINT64 timeSpan, bool recurring, PRO_INT64 userData) /* = 0 */ { PRO_UINT64 timerId = 0; { CProThreadMutexGuard mon(m_lock); if (m_acceptThreadCount + m_ioThreadCount == 0 || m_curThreadCount != m_acceptThreadCount + m_ioThreadCount || m_wantExit) { return (0); } timerId = m_timerFactory.ScheduleTimer( onTimer, timeSpan, recurring, userData); } return (timerId); } PRO_UINT64 PRO_CALLTYPE CProTpReactorTask::ScheduleHeartbeatTimer(IProOnTimer* onTimer, PRO_INT64 userData) /* = 0 */ { PRO_UINT64 timerId = 0; { CProThreadMutexGuard mon(m_lock); if (m_acceptThreadCount + m_ioThreadCount == 0 || m_curThreadCount != m_acceptThreadCount + m_ioThreadCount || m_wantExit) { return (0); } timerId = m_timerFactory.ScheduleHeartbeatTimer(onTimer, userData); } return (timerId); } bool PRO_CALLTYPE CProTpReactorTask::UpdateHeartbeatTimers(unsigned long htbtIntervalInSeconds) { bool ret = false; { CProThreadMutexGuard mon(m_lock); if (m_acceptThreadCount + m_ioThreadCount == 0 || m_curThreadCount != m_acceptThreadCount + m_ioThreadCount || m_wantExit) { return (false); } ret = m_timerFactory.UpdateHeartbeatTimers(htbtIntervalInSeconds); } return (ret); } void PRO_CALLTYPE CProTpReactorTask::CancelTimer(PRO_UINT64 timerId) { { CProThreadMutexGuard mon(m_lock); if (m_acceptThreadCount + m_ioThreadCount == 0 || m_curThreadCount != m_acceptThreadCount + m_ioThreadCount) { return; } m_timerFactory.CancelTimer(timerId); } } PRO_UINT64 PRO_CALLTYPE CProTpReactorTask::ScheduleMmTimer(IProOnTimer* onTimer, PRO_UINT64 timeSpan, bool recurring, PRO_INT64 userData) /* = 0 */ { PRO_UINT64 timerId = 0; { CProThreadMutexGuard mon(m_lock); if (m_acceptThreadCount + m_ioThreadCount == 0 || m_curThreadCount != m_acceptThreadCount + m_ioThreadCount || m_wantExit) { return (0); } timerId = m_mmTimerFactory.ScheduleTimer( onTimer, timeSpan, recurring, userData); } return (timerId); } void PRO_CALLTYPE CProTpReactorTask::CancelMmTimer(PRO_UINT64 timerId) { { CProThreadMutexGuard mon(m_lock); if (m_acceptThreadCount + m_ioThreadCount == 0 || m_curThreadCount != m_acceptThreadCount + m_ioThreadCount) { return; } m_mmTimerFactory.CancelTimer(timerId); } } void PRO_CALLTYPE CProTpReactorTask::GetTraceInfo(char* buf, size_t size) const { assert(buf != NULL); assert(size > 0); if (buf == NULL || size == 0) { return; } { CProThreadMutexGuard mon(m_lock); if (m_acceptThreadCount + m_ioThreadCount == 0 || m_curThreadCount != m_acceptThreadCount + m_ioThreadCount || m_wantExit) { return; } CProStlString theInfo = ""; char theBuf[256] = ""; int theValue = 0; for (int i = 0; i < (int)m_ioThreadCount; ++i) { theValue += (int)m_ioReactors[i]->GetHandlerCount(); --theValue; /* exclude the signal socket */ } sprintf( theBuf, " [I/O Threads] : %d \n" " [I/O Sockets] : %d \n" , (int)m_ioThreadCount, theValue ); theInfo += theBuf; sprintf(theBuf, " %d ", (int)m_ioReactors[0]->GetHandlerCount() - 1); theInfo += theBuf; for (int j = 1; j < (int)m_ioThreadCount; ++j) { sprintf(theBuf, "+ %d ", (int)m_ioReactors[j]->GetHandlerCount() - 1); theInfo += theBuf; } theInfo += "\n"; theValue = (int)m_timerFactory.GetTimerCount(); sprintf(theBuf, " [ ST Timers ] : %d \n", theValue); theInfo += theBuf; theValue = (int)m_mmTimerFactory.GetTimerCount(); sprintf(theBuf, " [ MM Timers ] : %d \n", theValue); theInfo += theBuf; theValue = (int)m_timerFactory.GetHeartbeatInterval(); sprintf(theBuf, " [ HTBT Time ] : %d ", theValue); theInfo += theBuf; strncpy_pro(buf, size, theInfo.c_str()); } } void CProTpReactorTask::Svc() { const PRO_UINT64 threadId = ProGetThreadId(); unsigned long threadCount = 0; { CProThreadMutexGuard mon(m_lock); threadCount = ++m_curThreadCount; m_threadIds.insert(threadId); m_initCond.Signal(); } if (threadCount <= m_acceptThreadCount) { m_acceptReactor->WorkerRun(); } else { #if defined(_WIN32) || defined(_WIN32_WCE) ::SetThreadPriority(::GetCurrentThread(), m_ioThreadPriority); #endif m_ioReactors[threadCount - 2]->WorkerRun(); } { CProThreadMutexGuard mon(m_lock); m_threadIds.erase(threadId); } }
[ "libpronet@gmail.com" ]
libpronet@gmail.com
e4cf9801449cfae200780a91b34714f0441f2f09
43a54d76227b48d851a11cc30bbe4212f59e1154
/gse/src/v20191112/model/DeleteScalingPolicyResponse.cpp
87c341f6bf7ed6e7fed6cd56425574c8060f82da
[ "Apache-2.0" ]
permissive
make1122/tencentcloud-sdk-cpp
175ce4d143c90d7ea06f2034dabdb348697a6c1c
2af6954b2ee6c9c9f61489472b800c8ce00fb949
refs/heads/master
2023-06-04T03:18:47.169750
2021-06-18T03:00:01
2021-06-18T03:00:01
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,454
cpp
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <tencentcloud/gse/v20191112/model/DeleteScalingPolicyResponse.h> #include <tencentcloud/core/utils/rapidjson/document.h> #include <tencentcloud/core/utils/rapidjson/writer.h> #include <tencentcloud/core/utils/rapidjson/stringbuffer.h> using TencentCloud::CoreInternalOutcome; using namespace TencentCloud::Gse::V20191112::Model; using namespace std; DeleteScalingPolicyResponse::DeleteScalingPolicyResponse() { } CoreInternalOutcome DeleteScalingPolicyResponse::Deserialize(const string &payload) { rapidjson::Document d; d.Parse(payload.c_str()); if (d.HasParseError() || !d.IsObject()) { return CoreInternalOutcome(Error("response not json format")); } if (!d.HasMember("Response") || !d["Response"].IsObject()) { return CoreInternalOutcome(Error("response `Response` is null or not object")); } rapidjson::Value &rsp = d["Response"]; if (!rsp.HasMember("RequestId") || !rsp["RequestId"].IsString()) { return CoreInternalOutcome(Error("response `Response.RequestId` is null or not string")); } string requestId(rsp["RequestId"].GetString()); SetRequestId(requestId); if (rsp.HasMember("Error")) { if (!rsp["Error"].IsObject() || !rsp["Error"].HasMember("Code") || !rsp["Error"]["Code"].IsString() || !rsp["Error"].HasMember("Message") || !rsp["Error"]["Message"].IsString()) { return CoreInternalOutcome(Error("response `Response.Error` format error").SetRequestId(requestId)); } string errorCode(rsp["Error"]["Code"].GetString()); string errorMsg(rsp["Error"]["Message"].GetString()); return CoreInternalOutcome(Error(errorCode, errorMsg).SetRequestId(requestId)); } return CoreInternalOutcome(true); }
[ "tencentcloudapi@tenent.com" ]
tencentcloudapi@tenent.com
228e1419ee9145df2590a997f3653df8d4c37c5e
74e27a17ce3a50b23d638ef600f550bce82152fc
/Codeforces/570A/570A.cpp
7622269f545dc3df2ca9b4345b5f575c0c02f96b
[]
no_license
shoumobd/competitive-programming
8e2b14577920e9b35ad878ba4f8a7bbf8c90c203
33ebe1b192c4b923a90f19b1d2049d2300388092
refs/heads/master
2022-04-30T17:45:27.402517
2022-03-09T17:23:42
2022-03-09T17:23:57
210,653,153
0
0
null
null
null
null
UTF-8
C++
false
false
695
cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { //freopen("in.txt","r",stdin); //freopen("out.txt","w",stdout); ios_base::sync_with_stdio(false); cin.tie(NULL); ll n,m,i,j,mxj,mx,a; cin>>n>>m; vector <ll> v(n+2); fill(v.begin(),v.end(),0); for(i=0;i<m;i++) { mx=-1; for(j=0;j<n;j++) { cin>>a; if(a>mx) { mx=a; mxj=j; } } v[mxj]++; } mx=-1; for(i=0;i<n;i++) { if(v[i]>mx) { mx=v[i]; mxj=i; } } cout<<mxj+1<<"\n"; return 0; }
[ "sheikhsakib@iut-dhaka.edu" ]
sheikhsakib@iut-dhaka.edu
93efa0991d706ef5757f585874e986c3390817cb
425eb72d3d8dc0492c649e0a29f757c3e9750d78
/Source/GUI/Theme/Colour/Theme_Colour_JSONKeys.cpp
ceaf790d674c4cf4028b4d26e3be8e3a78b02e22
[]
no_license
centuryglass/Pocket-Home-Bismuth
76a79a6d72d17253e1fe5c4702dc77a462a46f13
c5cc2703f6176e97416e51877a6484b0ebd6b872
refs/heads/master
2022-06-18T18:27:16.736586
2022-06-02T16:13:01
2022-06-02T16:13:01
112,958,912
36
9
null
2022-06-02T16:13:02
2017-12-03T19:57:34
C++
UTF-8
C++
false
false
8,183
cpp
#include "Theme_Colour_JSONKeys.h" #include "Theme_Colour_ColourIds.h" #include <map> #ifdef JUCE_DEBUG // Print the full namespace name before all debug output: static const constexpr char* dbgPrefix = "Theme::Colour::JSONKeys::"; #endif namespace ColourKeys = Theme::Colour::JSONKeys; //=============================== Colour Keys: ================================= /** * @brief Keys for colour values assigned to UI element colour categories. * * All JUCE ColourId values are grouped under one of these categories. When * looking up colour values, if no value is explicitly assigned to a given * ColourId, the value assigned to the associated UICategory will be used. */ static const juce::Array<juce::Identifier> uiCategoryKeys= { "Window background", "Widget background", "Widget", "Widget(off)", "Menu background", "Outline", "Focused outline", "Text", "Highlighted text", "Text field", "Highlighted text field", }; namespace Theme { namespace Colour { namespace ColourIds { /** * @brief For each JSON colour key tracked in colours.json, keyMap maps that * key to its JUCE ColourId value and UI element category. */ static const std::map<juce::Identifier, const Element*> keyMap { {"Text button(off) background", &TextButton::buttonOff}, {"Text button background", &TextButton::button}, {"Label background", &Label::background}, {"Label text", &Label::text}, {"Label outline", &Label::outline}, {"Combo box text", &ComboBox::text}, {"Combo box background", &ComboBox::background}, {"Combo box outline", &ComboBox::outline}, {"Combo box arrow", &ComboBox::arrow}, {"Combo box focused outline", &ComboBox::focusedOutline}, {"Slider background", &Slider::background}, {"Slider thumb", &Slider::thumb}, {"Slider track", &Slider::track}, {"Alert window background", &AlertWindow::background}, {"Alert window text", &AlertWindow::text}, {"Alert window outline", &AlertWindow::outline}, {"Image0", &Image::image0}, {"Image1", &Image::image1}, {"Image2", &Image::image2}, {"Image3", &Image::image3}, {"Image4", &Image::image4}, {"List editor background", &ListEditor::background}, {"List editor item", &ListEditor::listItem}, {"List editor selected item", &ListEditor::selectedListItem}, {"List editor text", &ListEditor::text}, {"AppMenu button text", &AppMenuButton::text}, {"AppMenu button selected text", &AppMenuButton::selectedText}, {"AppMenu button text background", &AppMenuButton::textBackground}, {"AppMenu button selected text background", &AppMenuButton::selectedTextBG}, {"AppMenu button background", &AppMenuButton::background}, {"AppMenu button selected background", &AppMenuButton::selectedBG}, {"AppMenu button border", &AppMenuButton::border}, {"AppMenu button selected border", &AppMenuButton::selectedBorder}, {"File selection window", &FilePathEditor::fileWindow}, {"File selection text", &FilePathEditor::text}, {"Overlay spinner background", &OverlaySpinner::background}, {"Overlay spinner text", &OverlaySpinner::text}, {"Page background", &Page::background}, {"Colour picker checkerboard(light)", &ColourPicker::checkerboardLight}, {"Colour picker checkerboard(dark)", &ColourPicker::checkerboardDark}, {"Colour picker colour outline", &ColourPicker::outline}, {"Colour picker focused colour outline", &ColourPicker::focusedOutline}, {"Switch background", &Switch::background}, {"Switch handle", &Switch::handle}, {"Switch handle(off)", &Switch::handleOff}, {"HomePage widget text", &HomePage::text}, {"Power page background", &PowerPage::background} }; }}} // Gets all JUCE ColourId values defined by the colour config file. juce::Array<int> ColourKeys::getColourIds() { juce::Array<int> idList; for (const auto iter : ColourIds::allElements) { idList.add(iter->getColourId()); } return idList; } // Gets all UI category colour keys. const juce::Array<juce::Identifier>& ColourKeys::getCategoryKeys() { return uiCategoryKeys; } // Gets all keys used by the ColourConfigFile. juce::Array<const juce::Identifier*> ColourKeys::getColourKeys() { juce::Array<const juce::Identifier*> colourKeys; for (const auto& key : uiCategoryKeys) { colourKeys.add(&key); } for (const auto& keyPair : ColourIds::keyMap) { colourKeys.add(&keyPair.first); } return colourKeys; } // Gets the UICategory assigned to a JUCE ColourId value. Theme::Colour::UICategory ColourKeys::getUICategory(const int colourId) { if (colourId < 0) { DBG(dbgPrefix << __func__ << ": Invalid colourId value " << colourId); jassertfalse; return UICategory::none; } int index = -1; int min = 0, max = ColourIds::allElements.size() - 1; while (min <= max) { int testIndex = min + (max - min) / 2; int testId = ColourIds::allElements[testIndex]->getColourId(); if (testId > colourId) { max = testIndex; } else if (testId < colourId) { if (testIndex == min) { ++min; } else { min = testIndex; } } else { index = testIndex; break; } } if (index < 0) { jassertfalse; return UICategory::none; } return ColourIds::allElements[index]->getColourCategory(); } //=================== Lookup values using keys: ============================ // Finds the JUCE ColourId value of a UI element from its key. int ColourKeys::getColourId(const juce::Identifier& colourKey) { auto searchIter = ColourIds::keyMap.find(colourKey); if (searchIter == ColourIds::keyMap.end()) { DBG(dbgPrefix << __func__ << ": No ID found for key " << colourKey.toString()); return -1; } return searchIter->second->getColourId(); } // Finds the UICategory type represented by a specific key. Theme::Colour::UICategory ColourKeys::getCategoryType (const juce::Identifier& categoryKey) { int enumVal = uiCategoryKeys.indexOf(categoryKey); if (enumVal < 0) { DBG(dbgPrefix << __func__ << ": No category matches key " << categoryKey.toString()); return UICategory::none; } return (UICategory) enumVal; } //====================== Lookup keys by value: ============================ // Gets the key used to store a specific JUCE ColourId in the colour config // file. const juce::Identifier& ColourKeys::getColourKey(const int colourId) { static std::map<int, const juce::Identifier*> idMap; static juce::ReadWriteLock mapProtector; const juce::ScopedReadLock mapReadLock(mapProtector); if (idMap.empty()) { const juce::ScopedWriteLock mapInitLock(mapProtector); for (const auto& iter : ColourIds::keyMap) { idMap[iter.second->getColourId()] = &iter.first; } } auto keySearch = idMap.find(colourId); if (keySearch == idMap.end()) { return invalidKey; } return *keySearch->second; } // Finds the key representing a UICategory value. const juce::Identifier& ColourKeys::getCategoryKey(const UICategory category) { if (category == UICategory::none) { DBG(dbgPrefix << __func__ << ": No key, category == none"); return invalidKey; } return uiCategoryKeys.getReference((int) category); }
[ "anthony0857@gmail.com" ]
anthony0857@gmail.com
6370c49d0c75af39ae4458dd91d27b524322a94e
07318127752c82cd19cc90d9297754a1ac6f2f53
/SeRoNet-Tooling-ROS-Mixed-Port/ROS-MixedPort-Examples/ROSClientCall_examples/StringServiceQuery/smartsoft/src-gen/SetBoolQueryServiceAnswHandlerObserverInterface.hh
0cfa2b5d416633c83ce99a8ef97d2a7d33e26edf
[]
no_license
seronet-project/SeRoNet-examples
2dc694a2e36d80e5a852d328b324dd5cc30dffbb
1d712c2bfab7ab54e43b6282cef94e5cdf6df8ca
refs/heads/master
2020-08-15T08:35:16.025675
2020-08-14T06:14:55
2020-08-14T06:14:55
215,308,821
0
2
null
2020-04-16T09:59:21
2019-10-15T13:41:37
C++
UTF-8
C++
false
false
977
hh
//-------------------------------------------------------------------------- // Code generated by the SmartSoft MDSD Toolchain // The SmartSoft Toolchain has been developed by: // // Service Robotics Research Center // University of Applied Sciences Ulm // Prittwitzstr. 10 // 89075 Ulm (Germany) // // Information about the SmartSoft MDSD Toolchain is available at: // www.servicerobotik-ulm.de // // Please do not modify this file. It will be re-generated // running the code generator. //-------------------------------------------------------------------------- #ifndef _SETBOOLQUERYSERVICEANSWHANDLER_OBSERVER_INTERFACE_HH #define _SETBOOLQUERYSERVICEANSWHANDLER_OBSERVER_INTERFACE_HH // forward declaration class SetBoolQueryServiceAnswHandler; class SetBoolQueryServiceAnswHandlerObserverInterface { public: virtual ~SetBoolQueryServiceAnswHandlerObserverInterface() { } virtual void on_update_from(const SetBoolQueryServiceAnswHandler *subject) = 0; }; #endif
[ "nhg@ipa.fhg.de" ]
nhg@ipa.fhg.de
a9f9d762d5658dbde8f2affddd5f95529551790c
f53a79a1cee7e2ba44e06fe0a94d4032bb9ee43f
/BOJ/15814.cpp
95432bffc85ed78a33dc5ef67c0366bb66acf471
[]
no_license
SOFTK2765/PS
f576a416da21034d5ebea60538fcd263b6d042f3
a9215bc9c41530ad6a1a7352716c64e6d73354a7
refs/heads/master
2021-06-21T00:39:34.065445
2021-01-01T12:45:51
2021-01-01T12:45:51
152,511,667
2
0
null
null
null
null
UTF-8
C++
false
false
318
cpp
#include <bits/stdc++.h> using namespace std; char s[101]; int main() { scanf("%s", s); int t; scanf("%d", &t); for(int i=0;i<t;i++) { int a, b; scanf(" %d %d", &a, &b); char tmp = s[a]; s[a] = s[b]; s[b] = tmp; } printf("%s", s); return 0; }
[ "44043820+SOFTK2765@users.noreply.github.com" ]
44043820+SOFTK2765@users.noreply.github.com
bff6906001f4f36c3f252f1bd28084c7f0980d5f
f7344a0fc96c07c777c13df261b796f49db5e445
/Exemplo18/sources/model/Scene.cpp
758c111b215699331789e3ac26a339245af720ee
[ "MIT" ]
permissive
alencarrh/unisinos-computacao-grafica
e9e719b2d199c0b49fb223ba6c49f519dd094dd1
b7ea6b46956e47f695e4437fe254fd974a2b90de
refs/heads/master
2022-10-20T15:56:59.873806
2018-12-05T23:34:04
2018-12-06T11:39:33
145,136,103
0
0
MIT
2022-09-23T19:47:36
2018-08-17T15:18:11
C
UTF-8
C++
false
false
4,469
cpp
#include "../../headers/model/Scene.h" Scene::Scene(int width, int height, std::string screenTitle) { this->WIDTH = width; this->HEIGHT = height; this->SCREEN_TITLE = screenTitle; this->_width = (float)width; this->_height = (float)height; } Scene::~Scene() { this->objs.clear(); this->objs.shrink_to_fit(); } int Scene::init(GLFWwindow* window) { lamp->prepare(); for (Drawable* obj : this->objs) { obj->prepare(); } shader = new ShaderHandler("./shaders/core/vertex.vert", "./shaders/core/fragment.frag"); shaderLamp = new ShaderHandler("./shaders/core/vertex_lamp.vert", "./shaders/core/fragment_lamp.frag"); glfwSetFramebufferSizeCallback(window, framebuffer_size_callback); glfwSetCursorPosCallback(window, mouse_callback); glfwSetScrollCallback(window, scroll_callback); glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED); glClearColor(0.0f, 0.0f, 0.0f, 1.0f); glm::ortho(0.0f, this->_width, 0.0f, this->_height, 0.1f, 100.0f); return EXIT_SUCCESS; } void Scene::addObj(Drawable* drawable) { this->objs.push_back(drawable); } void Scene::run(GLFWwindow* window) { float currentFrame = glfwGetTime(); deltaTime = currentFrame - lastFrame; lastFrame = currentFrame; process_input(window); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glm::mat4 projection(1.0f); projection = glm::perspective(glm::radians(camera->zoom), (float)this->WIDTH / (float)this->HEIGHT, 0.1f, 100.0f); glm::mat4 view = camera->getViewMatrix(); glm::mat4 model(1.0f); // model = glm::rotate(model, glm::radians(75.0f), glm::vec3(0.5f, 1.0f, 0.0f)); model = glm::rotate(model, (float)glfwGetTime() * glm::radians(10.0f), glm::vec3(0.5f, 1.0f, 0.0f)); glm::mat4 modelLight(1.0f); modelLight = glm::translate(modelLight, (*lightPos)); this->shaderLamp->use(); this->shaderLamp->setMatrix4fv("model", modelLight); this->shaderLamp->setMatrix4fv("view", view); this->shaderLamp->setMatrix4fv("projection", projection); this->shaderLamp->setUniform3f("lightColor", lightColor); for (Group* group : this->lamp->mesh()->getGroups()) { group->bindVAO(); glDrawArrays(GL_TRIANGLES, 0, group->numVertices()); } this->shader->use(); this->shader->setMatrix4fv("model", model); this->shader->setMatrix4fv("view", view); this->shader->setMatrix4fv("projection", projection); this->shader->setUniform3f("lightColor", lightColor); this->shader->setUniform3f("lightPos", lightPos); this->shader->setUniform3f("viewPos", &camera->position); //TODO no momento só usamos 1 textura, então vai funcionar, caso queiramos mais de uma por grupo //vai ser necessário modificar e linha abaixo this->shader->setInt("texture1", 0); for (Drawable* obj : this->objs) { for (Group* group : obj->mesh()->getGroups()) { group->bindTexture(); group->bindVAO(); glDrawArrays(GL_TRIANGLES, 0, group->numVertices()); } } } bool Scene::keepRunning(GLFWwindow* window) { return !glfwWindowShouldClose(window); } void Scene::finish() { } void Scene::process_input(GLFWwindow* window) { if (glfwGetKey(window, GLFW_KEY_ESCAPE) == GLFW_PRESS) { glfwSetWindowShouldClose(window, true); } if (glfwGetKey(window, GLFW_KEY_W) == GLFW_PRESS) { camera->processKeyboard(FORWARD, deltaTime); } if (glfwGetKey(window, GLFW_KEY_S) == GLFW_PRESS) { camera->processKeyboard(BACKWARD, deltaTime); } if (glfwGetKey(window, GLFW_KEY_A) == GLFW_PRESS) { camera->processKeyboard(LEFT, deltaTime); } if (glfwGetKey(window, GLFW_KEY_D) == GLFW_PRESS) { camera->processKeyboard(RIGHT, deltaTime); } } void Scene::mouse_callback(GLFWwindow* window, double xpos, double ypos) { if (firstMouse) { lastX = xpos; lastY = ypos; firstMouse = false; } float xoffset = xpos - lastX; float yoffset = lastY - ypos; // reversed since y-coordinates go from bottom to top lastX = xpos; lastY = ypos; camera->processMouseMovement(xoffset, yoffset); } void Scene::scroll_callback(GLFWwindow* window, double xoffset, double yoffset) { camera->processMouseScroll(yoffset); } void Scene::framebuffer_size_callback(GLFWwindow* window, int width, int height) { glViewport(0, 0, width, height); }
[ "alencarhentges@gmail.com" ]
alencarhentges@gmail.com
989e05959d097837b2dd5aee0f944075e5318af7
34ea5c3d76eda4032f74c8c6f34c180f0bec6371
/libs/Texture.h
026734d6f869ae5c15746fb2673a284f1abc0523
[]
no_license
AldOgen/ComputerGraphics
df700dd92e2e573675f5aa090896dd0b9b45c666
cdfef3f2f9602f3b19b13845cc924207e9c39025
refs/heads/master
2023-02-04T01:52:46.138309
2020-12-28T05:55:57
2020-12-28T05:55:57
313,317,087
0
0
null
null
null
null
UTF-8
C++
false
false
2,736
h
#pragma once #include <iostream> #include <optional> #include <vector> #include <string> #include <sstream> #include <glad/glad.h> #include <GLFW/glfw3.h> #include "stb_image.h" #include "Shader.h" struct TextureParametrs { public: static constexpr std::string_view FLARE = "flare"; static constexpr std::string_view DIFF_COEF = "diff_coef"; static constexpr std::string_view HEIGHT_COEF = "height_coef"; public: TextureParametrs(GLfloat = 0.0f, GLfloat = 0.0f, GLfloat = 0.0f); public: GLfloat flare; GLfloat diff_coef; GLfloat height_coef; }; class Texture { public: static constexpr std::string_view TEXTURE = "texture_data"; static constexpr std::string_view CUBE_MAP_DATA = "cube_map_data"; public: virtual ~Texture() {} virtual void LoadTexture(const std::vector<std::string>&, const std::string&, bool) {}; std::optional<GLuint> GetTextureID() const; std::optional <std::string> GetType() const; void SetTextureParametrs(const TextureParametrs&); virtual void UseTexture(const ShaderPipe&, const std::string, GLuint) const {}; protected: std::optional<TextureParametrs> texture_params; std::optional<std::string> type; std::optional<GLuint> texture_id; }; class Texture2D : public Texture { public: friend void BindShadowTexture(const Texture2D&, GLuint); public: static constexpr std::string_view DIFFUSE_MAP = "diffuse_map"; static constexpr std::string_view SPECULAR_MAP = "specular_map"; static constexpr std::string_view SHADOW_MAP = "shadow_map"; static constexpr std::string_view NORMAL_MAP = "normal_map"; static constexpr std::string_view DEPTH_MAP = "depth_map"; public: Texture2D() = default; void LoadTexture(const std::vector<std::string>&, const std::string&, bool = false) override; void GenShadowTexture(GLuint, GLuint); void UseTexture(const ShaderPipe& shader_program, const std::string, GLuint) const override; }; void CreateTexture2DUnion(const std::vector<Texture2D> &, const std::vector <ShaderPipe>&, const std::vector <std::string>); void BindShadowTexture(const Texture2D&, GLuint); class TextureCube : public Texture { public: friend void BindShadowCubeTexture(const TextureCube&, GLuint); public: static constexpr std::string_view SKYBOX_MAP = "skybox_map"; static constexpr std::string_view SHADOW_CUBE_MAP = "shadow_cube_map"; public: void LoadTexture(const std::vector<std::string>&, const std::string&, bool = false) override; void GenShadowTexture(GLuint, GLuint); void UseTextureForShadowRendering() const; void UseTexture(const ShaderPipe&, const std::string, GLuint) const; }; void BindShadowCubeTexture(const TextureCube&, GLuint);
[ "zegal2000@gmail.com" ]
zegal2000@gmail.com
ee1e183c60150583dcca0ffe2727d3e829fa79c0
dde31782e6e39cf6dcbff2a4bbea46e75091693a
/src/pagespeed/automatic/proxy_interface_test.cc
7ea12cba6ec8d2303310a881b4bd8a9aa383a56f
[]
no_license
apache/incubator-pagespeed-debian
02a320a67860118b22be3019428d3acf176fc59c
0202964b14afc20ea2a17a21444bb5be3e3c8c1c
refs/heads/master
2023-07-02T21:15:01.888831
2023-04-21T06:58:40
2023-04-21T14:55:52
78,453,135
3
5
null
2023-04-21T14:55:53
2017-01-09T17:43:02
C++
UTF-8
C++
false
false
152,826
cc
/* * Copyright 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Author: morlovich@google.com (Maksim Orlovich) // Unit-tests for ProxyInterface. #include "pagespeed/automatic/proxy_interface.h" #include "net/instaweb/http/public/async_fetch.h" #include "net/instaweb/http/public/http_cache.h" #include "net/instaweb/http/public/logging_proto_impl.h" #include "net/instaweb/http/public/mock_callback.h" #include "net/instaweb/http/public/mock_url_fetcher.h" #include "net/instaweb/http/public/reflecting_test_fetcher.h" #include "net/instaweb/http/public/request_context.h" #include "net/instaweb/http/public/request_timing_info.h" #include "net/instaweb/rewriter/public/blink_util.h" #include "net/instaweb/rewriter/public/domain_lawyer.h" #include "net/instaweb/rewriter/public/experiment_util.h" #include "net/instaweb/rewriter/public/rewrite_driver.h" #include "net/instaweb/rewriter/public/rewrite_options.h" #include "net/instaweb/rewriter/public/rewrite_test_base.h" #include "net/instaweb/rewriter/public/server_context.h" #include "net/instaweb/rewriter/public/test_rewrite_driver_factory.h" #include "net/instaweb/util/public/fallback_property_page.h" #include "net/instaweb/util/public/mock_property_page.h" #include "net/instaweb/util/public/property_cache.h" #include "pagespeed/automatic/proxy_fetch.h" #include "pagespeed/automatic/proxy_interface_test_base.h" #include "pagespeed/kernel/base/abstract_mutex.h" #include "pagespeed/kernel/base/basictypes.h" #include "pagespeed/kernel/base/function.h" #include "pagespeed/kernel/base/gtest.h" #include "pagespeed/kernel/base/mock_message_handler.h" #include "pagespeed/kernel/base/mock_timer.h" #include "pagespeed/kernel/base/null_message_handler.h" #include "pagespeed/kernel/base/scoped_ptr.h" #include "pagespeed/kernel/base/statistics.h" #include "pagespeed/kernel/base/string.h" #include "pagespeed/kernel/base/string_util.h" #include "pagespeed/kernel/base/thread_system.h" #include "pagespeed/kernel/base/time_util.h" #include "pagespeed/kernel/base/timer.h" #include "pagespeed/kernel/cache/lru_cache.h" #include "pagespeed/kernel/html/html_parse_test_base.h" #include "pagespeed/kernel/http/content_type.h" #include "pagespeed/kernel/http/google_url.h" #include "pagespeed/kernel/http/http_names.h" #include "pagespeed/kernel/http/request_headers.h" #include "pagespeed/kernel/http/response_headers.h" #include "pagespeed/kernel/http/semantic_type.h" #include "pagespeed/kernel/http/user_agent_matcher.h" #include "pagespeed/kernel/thread/mock_scheduler.h" #include "pagespeed/kernel/thread/queued_worker_pool.h" #include "pagespeed/kernel/thread/thread_synchronizer.h" #include "pagespeed/kernel/thread/worker_test_base.h" namespace net_instaweb { namespace { // This jpeg file lacks a .jpg or .jpeg extension. So we initiate // a property-cache read prior to getting the response-headers back, // but will never go into the ProxyFetch flow that blocks waiting // for the cache lookup to come back. const char kImageFilenameLackingExt[] = "jpg_file_lacks_ext"; const char kHttpsPageUrl[] = "https://www.test.com/page.html"; const char kHttpsCssUrl[] = "https://www.test.com/style.css"; const char kCssContent[] = "* { display: none; }"; const char kMinimizedCssContent[] = "*{display:none}"; } // namespace class ProxyInterfaceTest : public ProxyInterfaceTestBase { protected: static const int kHtmlCacheTimeSec = 5000; ProxyInterfaceTest() : start_time_ms_(0), max_age_300_("max-age=300") { ConvertTimeToString(MockTimer::kApr_5_2010_ms, &start_time_string_); ConvertTimeToString(MockTimer::kApr_5_2010_ms + 5 * Timer::kMinuteMs, &start_time_plus_300s_string_); ConvertTimeToString(MockTimer::kApr_5_2010_ms - 2 * Timer::kDayMs, &old_time_string_); } virtual ~ProxyInterfaceTest() {} virtual void SetUp() { ThreadSynchronizer* sync = server_context()->thread_synchronizer(); sync->EnableForPrefix(ProxyFetch::kCollectorDoneFinish); sync->EnableForPrefix(ProxyFetch::kCollectorDetachFinish); sync->EnableForPrefix(ProxyFetch::kCollectorConnectProxyFetchFinish); server_context_->set_enable_property_cache(true); const PropertyCache::Cohort* dom_cohort = SetupCohort(server_context_->page_property_cache(), RewriteDriver::kDomCohort); const PropertyCache::Cohort* blink_cohort = SetupCohort(server_context_->page_property_cache(), BlinkUtil::kBlinkCohort); server_context()->set_dom_cohort(dom_cohort); server_context()->set_blink_cohort(blink_cohort); RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->EnableFilter(RewriteOptions::kRewriteCss); options->set_max_html_cache_time_ms(kHtmlCacheTimeSec * Timer::kSecondMs); options->set_in_place_rewriting_enabled(true); options->Disallow("*blacklist*"); server_context()->ComputeSignature(options); ProxyInterfaceTestBase::SetUp(); // The original url_async_fetcher() is still owned by RewriteDriverFactory. background_fetch_fetcher_.reset(new BackgroundFetchCheckingUrlAsyncFetcher( factory()->ComputeUrlAsyncFetcher())); server_context()->set_default_system_fetcher( background_fetch_fetcher_.get()); start_time_ms_ = timer()->NowMs(); SetResponseWithDefaultHeaders(kImageFilenameLackingExt, kContentTypeJpeg, "image data", 300); SetResponseWithDefaultHeaders(kPageUrl, kContentTypeHtml, "<div><p></p></div>", 0); } void CheckHeaders(const ResponseHeaders& headers, const ContentType& expect_type) { ASSERT_TRUE(headers.has_status_code()); EXPECT_EQ(HttpStatus::kOK, headers.status_code()); EXPECT_STREQ(expect_type.mime_type(), headers.Lookup1(HttpAttributes::kContentType)); } void CheckBackgroundFetch(const ResponseHeaders& headers, bool is_background_fetch) { EXPECT_STREQ(is_background_fetch ? "1" : "0", headers.Lookup1(kBackgroundFetchHeader)); } void CheckNumBackgroundFetches(int num) { EXPECT_EQ(num, background_fetch_fetcher_->num_background_fetches()); } virtual void ClearStats() { RewriteTestBase::ClearStats(); background_fetch_fetcher_->clear_num_background_fetches(); } // Serve a trivial HTML page with initial Cache-Control header set to // input_cache_control and return the Cache-Control header after running // through ProxyInterface. // // A unique id must be set to assure different websites are requested. // id is put in a URL, so it probably shouldn't have spaces and other // special chars. GoogleString RewriteHtmlCacheHeader(const StringPiece& id, const StringPiece& input_cache_control) { GoogleString url = StrCat("http://www.example.com/", id, ".html"); ResponseHeaders input_headers; DefaultResponseHeaders(kContentTypeHtml, 100, &input_headers); input_headers.Replace(HttpAttributes::kCacheControl, input_cache_control); SetFetchResponse(url, input_headers, "<body>Foo</body>"); GoogleString body; ResponseHeaders output_headers; FetchFromProxy(url, true, &body, &output_headers); return output_headers.LookupJoined(HttpAttributes::kCacheControl); } int GetStatusCodeInPropertyCache(const GoogleString& url) { PropertyCache* pcache = page_property_cache(); scoped_ptr<MockPropertyPage> page(NewMockPage( url, server_context()->GetRewriteOptionsSignatureHash( server_context()->global_options()), UserAgentMatcher::kDesktop)); const PropertyCache::Cohort* cohort = pcache->GetCohort( RewriteDriver::kDomCohort); PropertyValue* value; pcache->Read(page.get()); value = page->GetProperty( cohort, RewriteDriver::kStatusCodePropertyName); int status_code; EXPECT_TRUE(StringToInt(value->value(), &status_code)); return status_code; } void DisableAjax() { RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->set_in_place_rewriting_enabled(false); server_context()->ComputeSignature(options); } void RejectBlacklisted() { RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->set_reject_blacklisted(true); options->set_reject_blacklisted_status_code(HttpStatus::kImATeapot); server_context()->ComputeSignature(options); } // This function is primarily meant to enable writes to the dom cohort of the // property cache. Writes to this cohort are predicated on a filter that uses // that cohort being enabled, which includes the insert dns prefetch filter. void EnableDomCohortWritesWithDnsPrefetch() { RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->EnableFilter(RewriteOptions::kInsertDnsPrefetch); server_context()->ComputeSignature(options); } void TestFallbackPageProperties( const GoogleString& url, const GoogleString& fallback_url) { GoogleUrl gurl(url); GoogleString kPropertyName("prop"); GoogleString kValue("value"); options()->set_use_fallback_property_cache_values(true); // No fallback value is present. const PropertyCache::Cohort* cohort = page_property_cache()->GetCohort(RewriteDriver::kDomCohort); StringAsyncFetch callback( RequestContext::NewTestRequestContext( server_context()->thread_system())); RequestHeaders request_headers; callback.set_request_headers(&request_headers); scoped_ptr<ProxyFetchPropertyCallbackCollector> callback_collector( proxy_interface_->InitiatePropertyCacheLookup( false, gurl, options(), &callback, false)); FallbackPropertyPage* fallback_page = callback_collector->fallback_property_page(); fallback_page->UpdateValue(cohort, kPropertyName, kValue); fallback_page->WriteCohort(cohort); // Read from fallback value. GoogleUrl new_gurl(fallback_url); callback_collector.reset(proxy_interface_->InitiatePropertyCacheLookup( false, new_gurl, options(), &callback, false)); fallback_page = callback_collector->fallback_property_page(); EXPECT_FALSE(fallback_page->actual_property_page()->GetProperty( cohort, kPropertyName)->has_value()); EXPECT_EQ(kValue, fallback_page->GetProperty(cohort, kPropertyName)->value()); // If use_fallback_property_cache_values option is set to false, fallback // values will not be used. options()->ClearSignatureForTesting(); options()->set_use_fallback_property_cache_values(false); callback_collector.reset(proxy_interface_->InitiatePropertyCacheLookup( false, new_gurl, options(), &callback, false)); EXPECT_FALSE(callback_collector->fallback_property_page()->GetProperty( cohort, kPropertyName)->has_value()); } void TestQueryParameters(StringPiece original_domain, StringPiece redirect_domain, bool add_params_to_redirect, bool add_params_to_location) { // Test to check if we re-add our query params when we get a redirect. const char kParams[] = "PageSpeedCssInlineMaxBytes=99"; GoogleString original_url = StrCat(original_domain, "a/?x=y"); GoogleString redirect_url = StrCat(redirect_domain, "b/", add_params_to_redirect ? "?x=y" : ""); GoogleString set_text, get_text; RequestHeaders request_headers; ResponseHeaders set_headers, get_headers; NullMessageHandler handler; GoogleString expected_location(redirect_url); if (add_params_to_location) { StrAppend(&expected_location, add_params_to_redirect ? "&" : "?", kParams); } set_headers.Add(HttpAttributes::kContentType, kContentTypeHtml.mime_type()); set_headers.Add(HttpAttributes::kLocation, redirect_url); set_headers.SetStatusAndReason(HttpStatus::kFound); set_text = "<html></html>"; mock_url_fetcher_.SetResponse(original_url, set_headers, set_text); FetchFromProxy(StrCat(original_url, "&", kParams), request_headers, true, &get_text, &get_headers); EXPECT_STREQ(StrCat("HTTP/1.0 302 Found\r\n" "Content-Type: text/html\r\n" "Location: ", expected_location, "\r\n" "X-Background-Fetch: 0\r\n" "Date: Tue, 02 Feb 2010 18:51:26 GMT\r\n" "Expires: Tue, 02 Feb 2010 18:51:26 GMT\r\n" "Cache-Control: max-age=0, private\r\n" "X-Page-Speed: \r\n" "HeadersComplete: 1\r\n\r\n"), get_headers.ToString()); } scoped_ptr<BackgroundFetchCheckingUrlAsyncFetcher> background_fetch_fetcher_; int64 start_time_ms_; GoogleString start_time_string_; GoogleString start_time_plus_300s_string_; GoogleString old_time_string_; const GoogleString max_age_300_; private: DISALLOW_COPY_AND_ASSIGN(ProxyInterfaceTest); }; TEST_F(ProxyInterfaceTest, LoggingInfo) { GoogleString url = "http://www.example.com/"; GoogleString text; RequestHeaders request_headers; ResponseHeaders headers; headers.Add(HttpAttributes::kContentType, kContentTypeHtml.mime_type()); headers.SetStatusAndReason(HttpStatus::kOK); // Fetch HTML content. mock_url_fetcher_.SetResponse(url, headers, "<html></html>"); FetchFromProxy(url, request_headers, true, &text, &headers); CheckBackgroundFetch(headers, false); CheckNumBackgroundFetches(0); const RequestTimingInfo& rti = timing_info(); int64 latency_ms; ASSERT_TRUE(rti.GetHTTPCacheLatencyMs(&latency_ms)); EXPECT_EQ(0, latency_ms); EXPECT_FALSE(rti.GetL2HTTPCacheLatencyMs(&latency_ms)); EXPECT_FALSE(rti.GetFetchHeaderLatencyMs(&latency_ms)); EXPECT_FALSE(rti.GetFetchLatencyMs(&latency_ms)); EXPECT_TRUE(logging_info()->is_html_response()); EXPECT_FALSE(logging_info()->is_url_disallowed()); EXPECT_FALSE(logging_info()->is_request_disabled()); EXPECT_FALSE(logging_info()->is_pagespeed_resource()); // Fetch non-HTML content. logging_info()->Clear(); mock_url_fetcher_.SetResponse(url, headers, "js"); FetchFromProxy(url, request_headers, true, &text, &headers); EXPECT_FALSE(logging_info()->is_html_response()); EXPECT_FALSE(logging_info()->is_url_disallowed()); EXPECT_FALSE(logging_info()->is_request_disabled()); // Fetch blacklisted url. url = "http://www.blacklist.com/"; logging_info()->Clear(); mock_url_fetcher_.SetResponse(url, headers, "<html></html>"); FetchFromProxy(url, request_headers, true, /* expect_success */ &text, &headers, false /* proxy_fetch_property_callback_collector_created */); EXPECT_TRUE(logging_info()->is_html_response()); EXPECT_TRUE(logging_info()->is_url_disallowed()); EXPECT_FALSE(logging_info()->is_request_disabled()); // Fetch disabled url. url = "http://www.example.com/?PageSpeed=off"; logging_info()->Clear(); mock_url_fetcher_.SetResponse("http://www.example.com/", headers, "<html></html>"); FetchFromProxy(url, request_headers, true, /* expect_success */ &text, &headers, false /* proxy_fetch_property_callback_collector_created */); EXPECT_TRUE(logging_info()->is_html_response()); EXPECT_FALSE(logging_info()->is_url_disallowed()); EXPECT_TRUE(logging_info()->is_request_disabled()); } TEST_F(ProxyInterfaceTest, SkipPropertyCacheLookupIfOptionsNotEnabled) { GoogleString url = "http://www.example.com/"; GoogleString text; RequestHeaders request_headers; ResponseHeaders headers; headers.Add(HttpAttributes::kContentType, kContentTypeHtml.mime_type()); headers.SetStatusAndReason(HttpStatus::kOK); // Fetch disabled url. url = "http://www.example.com/?PageSpeed=off"; logging_info()->Clear(); mock_url_fetcher_.SetResponse("http://www.example.com/", headers, "<html></html>"); FetchFromProxy(url, request_headers, true, /* expect_success */ &text, &headers, false /* proxy_fetch_property_callback_collector_created */); EXPECT_TRUE(logging_info()->is_html_response()); EXPECT_FALSE(logging_info()->is_url_disallowed()); EXPECT_TRUE(logging_info()->is_request_disabled()); // Only the HTTP response lookup is issued and it is not in the cache. EXPECT_EQ(0, lru_cache()->num_hits()); EXPECT_EQ(1, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); } TEST_F(ProxyInterfaceTest, SkipPropertyCacheLookupIfUrlBlacklisted) { GoogleString url = "http://www.blacklist.com/"; RequestHeaders request_headers; GoogleString text; ResponseHeaders headers; headers.Add(HttpAttributes::kContentType, kContentTypeHtml.mime_type()); headers.SetStatusAndReason(HttpStatus::kOK); scoped_ptr<RewriteOptions> custom_options( server_context()->global_options()->Clone()); custom_options->AddRejectedUrlWildcard(AbsolutifyUrl("blacklist*")); SetRewriteOptions(custom_options.get()); logging_info()->Clear(); mock_url_fetcher_.SetResponse(url, headers, "<html></html>"); FetchFromProxy(url, request_headers, true, &text, &headers, false); EXPECT_TRUE(logging_info()->is_html_response()); EXPECT_TRUE(logging_info()->is_url_disallowed()); EXPECT_FALSE(logging_info()->is_request_disabled()); // Only the HTTP response lookup is issued and it is not in the cache. EXPECT_EQ(0, lru_cache()->num_hits()); EXPECT_EQ(1, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); } TEST_F(ProxyInterfaceTest, HeadRequest) { // Test to check if we are handling Head requests correctly. GoogleString url = "http://www.example.com/"; GoogleString set_text, get_text; RequestHeaders request_headers; ResponseHeaders set_headers, get_headers; set_headers.Add(HttpAttributes::kContentType, kContentTypeHtml.mime_type()); set_headers.SetStatusAndReason(HttpStatus::kOK); set_text = "<html><head/></html>"; mock_url_fetcher_.SetResponse(url, set_headers, set_text); FetchFromProxy(url, request_headers, true, &get_text, &get_headers); // Headers and body are correct for a Get request. EXPECT_EQ("HTTP/1.0 200 OK\r\n" "Content-Type: text/html\r\n" "X-Background-Fetch: 0\r\n" "Date: Tue, 02 Feb 2010 18:51:26 GMT\r\n" "Expires: Tue, 02 Feb 2010 18:51:26 GMT\r\n" "Cache-Control: max-age=0, private\r\n" "X-Page-Speed: \r\n" "HeadersComplete: 1\r\n\r\n", get_headers.ToString()); EXPECT_EQ(set_text, get_text); // Remove from the cache so we can actually test a HEAD fetch. http_cache()->Delete(url, rewrite_driver_->CacheFragment()); ClearStats(); // Headers and body are correct for a Head request. request_headers.set_method(RequestHeaders::kHead); FetchFromProxy(url, request_headers, true, /* expect_success */ &get_text, &get_headers, false /* proxy_fetch_property_callback_collector_created */); EXPECT_EQ(0, http_cache()->cache_hits()->Get()); EXPECT_EQ("HTTP/1.0 200 OK\r\n" "Content-Type: text/html\r\n" "X-Background-Fetch: 0\r\n" "X-Page-Speed: \r\n" "HeadersComplete: 1\r\n\r\n", get_headers.ToString()); EXPECT_TRUE(get_text.empty()); } TEST_F(ProxyInterfaceTest, RedirectRequestWhenDomainRewriterEnabled) { // A MapRewriteDomain should not change the Location of a redirect. // Test to check if we are handling Head requests correctly. GoogleString url = "http://www.example.com/"; GoogleString set_text, get_text; RequestHeaders request_headers; ResponseHeaders set_headers, get_headers; NullMessageHandler handler; set_headers.Add(HttpAttributes::kContentType, kContentTypeHtml.mime_type()); set_headers.Add(HttpAttributes::kLocation, "http://m.example.com"); set_headers.SetStatusAndReason(HttpStatus::kFound); scoped_ptr<RewriteOptions> custom_options( server_context()->global_options()->Clone()); custom_options->EnableFilter(RewriteOptions::kRewriteDomains); custom_options->WriteableDomainLawyer()->AddTwoProtocolRewriteDomainMapping( "www.example.com", "m.example.com", &handler); SetRewriteOptions(custom_options.get()); set_text = "<html></html>"; mock_url_fetcher_.SetResponse(url, set_headers, set_text); FetchFromProxy(url, request_headers, true, &get_text, &get_headers); // Headers and body are correct for a Get request. EXPECT_STREQ("HTTP/1.0 302 Found\r\n" "Content-Type: text/html\r\n" "Location: http://m.example.com\r\n" "X-Background-Fetch: 0\r\n" "Date: Tue, 02 Feb 2010 18:51:26 GMT\r\n" "Expires: Tue, 02 Feb 2010 18:51:26 GMT\r\n" "Cache-Control: max-age=0, private\r\n" "X-Page-Speed: \r\n" "HeadersComplete: 1\r\n\r\n", get_headers.ToString()); } TEST_F(ProxyInterfaceTest, RewriteDomainForRedirectsAndCookiesWithEmptyBody) { GoogleString url = "http://www.example.com/"; GoogleString get_text; RequestHeaders request_headers; ResponseHeaders set_headers, get_headers; NullMessageHandler handler; set_headers.Add(HttpAttributes::kContentType, kContentTypeHtml.mime_type()); set_headers.Add(HttpAttributes::kLocation, "http://m.example.com"); set_headers.Add(HttpAttributes::kSetCookie, "a=b; domain=m.example.com; HttpOnly"); set_headers.SetStatusAndReason(HttpStatus::kFound); scoped_ptr<RewriteOptions> custom_options( server_context()->global_options()->Clone()); custom_options->EnableFilter(RewriteOptions::kRewriteDomains); custom_options->WriteableDomainLawyer()->AddTwoProtocolRewriteDomainMapping( "www.example.com", "m.example.com", &handler); custom_options->set_domain_rewrite_hyperlinks(true); custom_options->set_domain_rewrite_cookies(true); SetRewriteOptions(custom_options.get()); mock_url_fetcher_.SetResponse(url, set_headers, ""); FetchFromProxy(url, request_headers, true, &get_text, &get_headers); // The ProxyFetch should change the Location of a redirect when // domain_rewrite_hyperlinks is enabled. const char* location = get_headers.Lookup1(HttpAttributes::kLocation); EXPECT_STREQ("http://www.example.com/", location); // The ProxyFetch should change the domain of a Cookie when // domain_rewrite_cookies is enabled. const char* cookie = get_headers.Lookup1(HttpAttributes::kSetCookie); EXPECT_STREQ("a=b; domain=www.example.com; HttpOnly", cookie); } TEST_F(ProxyInterfaceTest, RedirectRequestRetainsQueryParams) { // "Location: http://www.example.com/b/?x=y&PageSpeedCssInlineMaxBytes=99" is // what we expect to see - note the PageSpeed query parameter IS copied over. TestQueryParameters(/* original_domain= */ "http://www.example.com/", /* redirect_domain= */ "http://www.example.com/", /* add_params_to_redirect= */ true, /* add_params_to_location= */ true); } TEST_F(ProxyInterfaceTest, RedirectRequestRetainsOnlyPagespeedQueryParams) { // "Location: http://www.example.com/b/?PageSpeedCssInlineMaxBytes=99" is // what we expect to see - note the PageSpeed query parameter IS copied over. TestQueryParameters(/* original_domain= */ "http://www.example.com/", /* redirect_domain= */ "http://www.example.com/", /* add_params_to_redirect= */ false, /* add_params_to_location= */ true); } TEST_F(ProxyInterfaceTest, RedirectToDiffDomainDiscardsQueryParams) { // "Location: http://test.com/?x=y" is what we expect to see - note the // PageSpeed query parameter is NOT copied over. TestQueryParameters(/* original_domain= */ "http://www.example.com/", /* redirect_domain= */ kTestDomain, /* add_params_to_redirect= */ true, /* add_params_to_location= */ false); } TEST_F(ProxyInterfaceTest, RedirectToDiffDomainDiscardsPagespeedQueryParams) { // "Location: http://test.com/" is what we expect to see - note the // PageSpeed query parameter is NOT copied over. TestQueryParameters(/* original_domain= */ "http://www.example.com/", /* redirect_domain= */ kTestDomain, /* add_params_to_redirect= */ false, /* add_params_to_location= */ false); } TEST_F(ProxyInterfaceTest, HeadResourceRequest) { // Test to check if we are handling Head requests correctly in pagespeed // resource flow. const char kCssWithEmbeddedImage[] = "*{background-image:url(%s)}"; const char kBackgroundImage[] = "1.png"; GoogleString text; RequestHeaders request_headers; ResponseHeaders response_headers; GoogleString expected_response_headers_string = "HTTP/1.1 200 OK\r\n" "Content-Type: text/css\r\n" "X-Background-Fetch: 0\r\n" "X-Content-Type-Options: nosniff\r\n" "Date: Tue, 02 Feb 2010 18:51:26 GMT\r\n" "Expires: Tue, 02 Feb 2010 18:56:26 GMT\r\n" "Cache-Control: max-age=300,private\r\n" "X-Page-Speed: \r\n" "HeadersComplete: 1\r\n\r\n"; // We're not going to image-compress so we don't need our mock image // to really be an image. SetResponseWithDefaultHeaders(kBackgroundImage, kContentTypePng, "image", kHtmlCacheTimeSec * 2); GoogleString orig_css = StringPrintf(kCssWithEmbeddedImage, kBackgroundImage); SetResponseWithDefaultHeaders("embedded.css", kContentTypeCss, orig_css, kHtmlCacheTimeSec * 2); // By default, cache extension is off in the default options. server_context()->global_options()->SetDefaultRewriteLevel( RewriteOptions::kPassThrough); // Because cache-extension was turned off, the image in the CSS file // will not be changed. FetchFromProxy("I.embedded.css.pagespeed.cf.0.css", request_headers, true, /* expect_success */ &text, &response_headers, false /* proxy_fetch_property_callback_collector_created */); EXPECT_TRUE(logging_info()->is_pagespeed_resource()); EXPECT_EQ(expected_response_headers_string, response_headers.ToString()); EXPECT_EQ(orig_css, text); // Headers and body are correct for a Head request. request_headers.set_method(RequestHeaders::kHead); FetchFromProxy("I.embedded.css.pagespeed.cf.0.css", request_headers, true, /* expect_success */ &text, &response_headers, false /* proxy_fetch_property_callback_collector_created */); // This leads to a conditional refresh of the original resource. expected_response_headers_string = "HTTP/1.1 200 OK\r\n" "Content-Type: text/css\r\n" "X-Background-Fetch: 0\r\n" "X-Content-Type-Options: nosniff\r\n" "Date: Tue, 02 Feb 2010 18:51:26 GMT\r\n" "Expires: Tue, 02 Feb 2010 18:56:26 GMT\r\n" "Cache-Control: max-age=300,private\r\n" "X-Page-Speed: \r\n" "HeadersComplete: 1\r\n\r\n"; EXPECT_EQ(expected_response_headers_string, response_headers.ToString()); EXPECT_TRUE(text.empty()); } TEST_F(ProxyInterfaceTest, FetchFailure) { GoogleString text; ResponseHeaders headers; // We don't want fetcher to fail the test, merely the fetch. SetFetchFailOnUnexpected(false); FetchFromProxy("invalid", false, &text, &headers); CheckBackgroundFetch(headers, false); CheckNumBackgroundFetches(0); } TEST_F(ProxyInterfaceTest, ReturnUnavailableForBlockedUrls) { GoogleString text; ResponseHeaders response_headers; response_headers.SetStatusAndReason(HttpStatus::kOK); mock_url_fetcher_.SetResponse(AbsolutifyUrl("blocked"), response_headers, "<html></html>"); FetchFromProxy("blocked", true, &text, &response_headers); EXPECT_EQ(HttpStatus::kOK, response_headers.status_code()); text.clear(); response_headers.Clear(); scoped_ptr<RewriteOptions> custom_options( server_context()->global_options()->Clone()); custom_options->AddRejectedUrlWildcard(AbsolutifyUrl("block*")); SetRewriteOptions(custom_options.get()); RequestHeaders request_headers; FetchFromProxy( "blocked", request_headers, false, /* expect_success */ &text, &response_headers, false /* proxy_fetch_property_callback_collector_created */); EXPECT_EQ(HttpStatus::kProxyDeclinedRequest, response_headers.status_code()); } TEST_F(ProxyInterfaceTest, ReturnUnavailableForBlockedHeaders) { GoogleString text; RequestHeaders request_headers; ResponseHeaders response_headers; response_headers.SetStatusAndReason(HttpStatus::kOK); mock_url_fetcher_.SetResponse(kTestDomain, response_headers, "<html></html>"); scoped_ptr<RewriteOptions> custom_options( server_context()->global_options()->Clone()); custom_options->AddRejectedHeaderWildcard(HttpAttributes::kUserAgent, "*Chrome*"); custom_options->AddRejectedHeaderWildcard(HttpAttributes::kXForwardedFor, "10.3.4.*"); SetRewriteOptions(custom_options.get()); request_headers.Add(HttpAttributes::kUserAgent, "Firefox"); request_headers.Add(HttpAttributes::kXForwardedFor, "10.0.0.11"); FetchFromProxy(kTestDomain, request_headers, true, &text, &response_headers); EXPECT_EQ(HttpStatus::kOK, response_headers.status_code()); request_headers.Clear(); response_headers.Clear(); request_headers.Add(HttpAttributes::kUserAgent, "abc"); request_headers.Add(HttpAttributes::kUserAgent, "xyz Chrome abc"); FetchFromProxy(kTestDomain, request_headers, false, /* expect_success */ &text, &response_headers, false /* proxy_fetch_property_callback_collector_created */); EXPECT_EQ(HttpStatus::kProxyDeclinedRequest, response_headers.status_code()); request_headers.Clear(); response_headers.Clear(); request_headers.Add(HttpAttributes::kXForwardedFor, "10.3.4.32"); FetchFromProxy(kTestDomain, request_headers, false, /* expect_success */ &text, &response_headers, false /* proxy_fetch_property_callback_collector_created */); EXPECT_EQ(HttpStatus::kProxyDeclinedRequest, response_headers.status_code()); } TEST_F(ProxyInterfaceTest, InvalidUrl) { ExpectStringAsyncFetch fetch(false, rewrite_driver()->request_context()); proxy_interface_->Fetch("localhost:3141", message_handler(), &fetch); EXPECT_TRUE(fetch.done()); } TEST_F(ProxyInterfaceTest, PassThrough404) { GoogleString text; ResponseHeaders headers; SetFetchResponse404("404"); FetchFromProxy("404", true, &text, &headers); ASSERT_TRUE(headers.has_status_code()); EXPECT_EQ(HttpStatus::kNotFound, headers.status_code()); } TEST_F(ProxyInterfaceTest, PassThroughResource) { GoogleString text; ResponseHeaders headers; const char kContent[] = "A very compelling article"; SetResponseWithDefaultHeaders("text.txt", kContentTypeText, kContent, kHtmlCacheTimeSec * 2); FetchFromProxy("text.txt", true, &text, &headers); CheckHeaders(headers, kContentTypeText); CheckBackgroundFetch(headers, false); CheckNumBackgroundFetches(0); EXPECT_EQ(kContent, text); } TEST_F(ProxyInterfaceTest, PassThroughEmptyResource) { ResponseHeaders headers; const char kContent[] = ""; SetDefaultLongCacheHeaders(&kContentTypeText, &headers); SetFetchResponse(AbsolutifyUrl("text.txt"), headers, kContent); GoogleString text; ResponseHeaders response_headers; FetchFromProxy("text.txt", true, &text, &response_headers); EXPECT_EQ(kContent, text); // HTTP resource not found the first time. EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(0, http_cache()->cache_hits()->Get()); // One lookup for ajax metadata and one for the HTTP response. Neither are // found. EXPECT_EQ(2, lru_cache()->num_misses()); EXPECT_EQ(0, lru_cache()->num_hits()); ClearStats(); GoogleString text2; ResponseHeaders response_headers2; FetchFromProxy("text.txt", true, &text2, &response_headers2); EXPECT_EQ(kContent, text2); // Empty resources are not remembered in this flow, so stats are exactly the // same on second load. EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(0, http_cache()->cache_hits()->Get()); EXPECT_EQ(2, lru_cache()->num_misses()); EXPECT_EQ(0, lru_cache()->num_hits()); } TEST_F(ProxyInterfaceTest, SetCookieNotCached) { ResponseHeaders headers; const char kContent[] = "A very compelling article"; SetDefaultLongCacheHeaders(&kContentTypeText, &headers); headers.Add(HttpAttributes::kSetCookie, "cookie"); headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl("text.txt"), headers, kContent); // The first response served by the fetcher has Set-Cookie headers. GoogleString text; ResponseHeaders response_headers; FetchFromProxy("text.txt", true, &text, &response_headers); EXPECT_STREQ("cookie", response_headers.Lookup1(HttpAttributes::kSetCookie)); EXPECT_EQ(kContent, text); // One lookup for ajax metadata and one for the HTTP response. Neither are // found. EXPECT_EQ(2, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(0, lru_cache()->num_hits()); ClearStats(); // The next response that is served from cache does not have any Set-Cookie // headers. GoogleString text2; ResponseHeaders response_headers2; FetchFromProxy("text.txt", true, &text2, &response_headers2); EXPECT_EQ(NULL, response_headers2.Lookup1(HttpAttributes::kSetCookie)); EXPECT_EQ(kContent, text2); // The HTTP response is found but the ajax metadata is not found. EXPECT_EQ(1, lru_cache()->num_hits()); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); EXPECT_EQ(1, lru_cache()->num_misses()); EXPECT_EQ(0, http_cache()->cache_misses()->Get()); } TEST_F(ProxyInterfaceTest, SetCookie2NotCached) { ResponseHeaders headers; const char kContent[] = "A very compelling article"; SetDefaultLongCacheHeaders(&kContentTypeText, &headers); headers.Add(HttpAttributes::kSetCookie2, "cookie"); headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl("text.txt"), headers, kContent); // The first response served by the fetcher has Set-Cookie headers. GoogleString text; ResponseHeaders response_headers; FetchFromProxy("text.txt", true, &text, &response_headers); EXPECT_STREQ("cookie", response_headers.Lookup1(HttpAttributes::kSetCookie2)); EXPECT_EQ(kContent, text); // One lookup for ajax metadata and one for the HTTP response. Neither are // found. EXPECT_EQ(2, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(0, lru_cache()->num_hits()); ClearStats(); // The next response that is served from cache does not have any Set-Cookie // headers. GoogleString text2; ResponseHeaders response_headers2; FetchFromProxy("text.txt", true, &text2, &response_headers2); EXPECT_EQ(NULL, response_headers2.Lookup1(HttpAttributes::kSetCookie2)); EXPECT_EQ(kContent, text2); // The HTTP response is found but the ajax metadata is not found. EXPECT_EQ(1, lru_cache()->num_misses()); EXPECT_EQ(0, http_cache()->cache_misses()->Get()); EXPECT_EQ(1, lru_cache()->num_hits()); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); } TEST_F(ProxyInterfaceTest, NotCachedIfAuthorizedAndNotPublic) { // We should not cache things which are default cache-control if we // are sending Authorization:. See RFC 2616, 14.8. ReflectingTestFetcher reflect; server_context()->set_default_system_fetcher(&reflect); RequestHeaders request_headers; request_headers.Add("Was", "Here"); request_headers.Add(HttpAttributes::kAuthorization, "Secret"); // This will get reflected as well, and hence will determine whether // cacheable or not. request_headers.Replace(HttpAttributes::kCacheControl, "max-age=600000"); ResponseHeaders out_headers; GoogleString out_text; // Using .txt here so we don't try any AJAX rewriting. FetchFromProxy("http://test.com/file.txt", request_headers, true, &out_text, &out_headers); // We should see the request headers we sent back as the response headers // as we're using a ReflectingTestFetcher. EXPECT_STREQ("Here", out_headers.Lookup1("Was")); // Not cross-domain, so should propagate out header. EXPECT_TRUE(out_headers.Has(HttpAttributes::kAuthorization)); // Should not have written anything to cache, due to the authorization // header. EXPECT_EQ(0, http_cache()->cache_inserts()->Get()); ClearStats(); // Now try again. This time no authorization header, different 'Was'. request_headers.Replace("Was", "There"); request_headers.RemoveAll(HttpAttributes::kAuthorization); FetchFromProxy("http://test.com/file.txt", request_headers, true, &out_text, &out_headers); // Should get different headers since we should not be cached. EXPECT_STREQ("There", out_headers.Lookup1("Was")); EXPECT_FALSE(out_headers.Has(HttpAttributes::kAuthorization)); // And should be a miss per stats. EXPECT_EQ(0, http_cache()->cache_hits()->Get()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); mock_scheduler()->AwaitQuiescence(); } TEST_F(ProxyInterfaceTest, CachedIfAuthorizedAndPublic) { // This with Cache-Control: public should be cached even if // we are sending Authorization:. See RFC 2616. ReflectingTestFetcher reflect; server_context()->set_default_system_fetcher(&reflect); RequestHeaders request_headers; request_headers.Add("Was", "Here"); request_headers.Add(HttpAttributes::kAuthorization, "Secret"); // This will get reflected as well, and hence will determine whether // cacheable or not. request_headers.Replace(HttpAttributes::kCacheControl, "max-age=600000"); request_headers.Add(HttpAttributes::kCacheControl, "public"); // unlike above ResponseHeaders out_headers; GoogleString out_text; // Using .txt here so we don't try any AJAX rewriting. FetchFromProxy("http://test.com/file.txt", request_headers, true, &out_text, &out_headers); EXPECT_STREQ("Here", out_headers.Lookup1("Was")); // Not cross-domain, so should propagate out header. EXPECT_TRUE(out_headers.Has(HttpAttributes::kAuthorization)); // Should have written the result to the cache, despite the request having // Authorization: thanks to cache-control: public, EXPECT_EQ(1, http_cache()->cache_inserts()->Get()); ClearStats(); // Now try again. This time no authorization header, different 'Was'. request_headers.Replace("Was", "There"); request_headers.RemoveAll(HttpAttributes::kAuthorization); FetchFromProxy("http://test.com/file.txt", request_headers, true, &out_text, &out_headers); // Should get old headers, since original was cacheable. EXPECT_STREQ("Here", out_headers.Lookup1("Was")); // ... of course hopefully a real server won't serve secrets on a // cache-control: public page. EXPECT_STREQ("Secret", out_headers.Lookup1(HttpAttributes::kAuthorization)); // And should be a hit per stats. EXPECT_EQ(1, http_cache()->cache_hits()->Get()); EXPECT_EQ(0, http_cache()->cache_misses()->Get()); mock_scheduler()->AwaitQuiescence(); } TEST_F(ProxyInterfaceTest, ImplicitCachingHeadersForCss) { ResponseHeaders headers; const char kContent[] = "A very compelling article"; SetTimeMs(MockTimer::kApr_5_2010_ms); headers.Add(HttpAttributes::kContentType, kContentTypeCss.mime_type()); headers.SetDate(MockTimer::kApr_5_2010_ms); headers.SetStatusAndReason(HttpStatus::kOK); headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl("text.css"), headers, kContent); // The first response served by the fetcher has caching headers. GoogleString text; ResponseHeaders response_headers; FetchFromProxy("text.css", true, &text, &response_headers); EXPECT_STREQ(max_age_300_, response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(start_time_plus_300s_string_, response_headers.Lookup1(HttpAttributes::kExpires)); EXPECT_STREQ(start_time_string_, response_headers.Lookup1(HttpAttributes::kDate)); EXPECT_EQ(kContent, text); // One lookup for ajax metadata, one for the HTTP response and one by the css // filter which looks up metadata while rewriting. None are found. EXPECT_EQ(3, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(0, lru_cache()->num_hits()); ClearStats(); // Fetch again from cache. It has the same caching headers. text.clear(); response_headers.Clear(); FetchFromProxy("text.css", true, &text, &response_headers); EXPECT_STREQ(max_age_300_, response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(start_time_plus_300s_string_, response_headers.Lookup1(HttpAttributes::kExpires)); EXPECT_STREQ(start_time_string_, response_headers.Lookup1(HttpAttributes::kDate)); EXPECT_EQ(kContent, text); // One hit for ajax metadata and one for the HTTP response. EXPECT_EQ(2, lru_cache()->num_hits()); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); EXPECT_EQ(0, lru_cache()->num_misses()); } TEST_F(ProxyInterfaceTest, MinCacheTtl) { RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->set_min_cache_ttl_ms(600 * Timer::kSecondMs); server_context()->ComputeSignature(options); ResponseHeaders headers; const char kContent[] = "A very compelling article"; SetTimeMs(MockTimer::kApr_5_2010_ms); headers.Add(HttpAttributes::kContentType, kContentTypeCss.mime_type()); headers.SetStatusAndReason(HttpStatus::kOK); headers.SetDateAndCaching(MockTimer::kApr_5_2010_ms, 300 * Timer::kSecondMs); SetFetchResponse(AbsolutifyUrl("text.css"), headers, kContent); GoogleString text; ResponseHeaders response_headers; FetchFromProxy("text.css", true, &text, &response_headers); GoogleString expiry; ConvertTimeToString(MockTimer::kApr_5_2010_ms + 600 * Timer::kSecondMs, &expiry); EXPECT_STREQ("max-age=600", response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(expiry, response_headers.Lookup1(HttpAttributes::kExpires)); EXPECT_STREQ(start_time_string_, response_headers.Lookup1(HttpAttributes::kDate)); EXPECT_EQ(kContent, text); // One lookup for ajax metadata, one for the HTTP response and one by the css // filter which looks up metadata while rewriting. None are found. EXPECT_EQ(3, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(0, lru_cache()->num_hits()); ClearStats(); // Change the origin content and advance time. Fetch again from cache. SetFetchResponse(AbsolutifyUrl("text.css"), headers, "new"); text.clear(); response_headers.Clear(); AdvanceTimeMs(400 * 1000); // Even though the max age set on the resource of 300 seconds, since the // min caching is set to 600 seconds, we should get a cache hit. And since // the content is fetched from cache, the old content is returned. FetchFromProxy("text.css", true, &text, &response_headers); ConvertTimeToString(timer()->NowMs() + 600 * Timer::kSecondMs, &expiry); EXPECT_STREQ("max-age=600", response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(expiry, response_headers.Lookup1(HttpAttributes::kExpires)); EXPECT_EQ(kContent, text); // One hit for ajax metadata and one for the HTTP response. EXPECT_EQ(2, lru_cache()->num_hits()); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); EXPECT_EQ(0, lru_cache()->num_misses()); ClearStats(); // Advance time past min cache ttl and fetch again. This time the new content // should be fetched. text.clear(); response_headers.Clear(); AdvanceTimeMs(400 * 1000); FetchFromProxy("text.css", true, &text, &response_headers); ConvertTimeToString(timer()->NowMs() + 600 * Timer::kSecondMs, &expiry); EXPECT_STREQ("max-age=600", response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(expiry, response_headers.Lookup1(HttpAttributes::kExpires)); EXPECT_EQ("new", text); // 1. ajax metadata 2. text.css 3. cf filter metadata lookup. EXPECT_EQ(3, lru_cache()->num_hits()); // http cache miss for text.css as it has expired. EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(0, lru_cache()->num_misses()); } TEST_F(ProxyInterfaceTest, CacheableSize) { // Test to check that we are not caching responses which have content length > // max_cacheable_response_content_length. ResponseHeaders headers; const char kContent[] = "A very compelling article"; SetTimeMs(MockTimer::kApr_5_2010_ms); headers.Add(HttpAttributes::kContentType, kContentTypeHtml.mime_type()); headers.SetStatusAndReason(HttpStatus::kOK); headers.SetDateAndCaching(MockTimer::kApr_5_2010_ms, 300 * Timer::kSecondMs); headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl("text.html"), headers, kContent); // Set the set_max_cacheable_response_content_length to 10 bytes. http_cache()->set_max_cacheable_response_content_length(10); // Fetch once. GoogleString text; ResponseHeaders response_headers; FetchFromProxy("text.html", true, &text, &response_headers); // One lookup for ajax metadata, one for the HTTP response and one for the // property cache entry. None are found. EXPECT_EQ(3, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(0, lru_cache()->num_hits()); EXPECT_EQ(0, lru_cache()->num_inserts()); // Fetch again. It has the same caching headers. ClearStats(); text.clear(); response_headers.Clear(); FetchFromProxy("text.html", true, &text, &response_headers); // None are found as the size is bigger than // max_cacheable_response_content_length. EXPECT_EQ(3, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(0, lru_cache()->num_hits()); // Set the set_max_cacheable_response_content_length to 1024 bytes. http_cache()->set_max_cacheable_response_content_length(1024); ClearStats(); text.clear(); response_headers.Clear(); FetchFromProxy("text.html", true, &text, &response_headers); // None are found. EXPECT_EQ(3, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(0, lru_cache()->num_hits()); EXPECT_EQ(1, lru_cache()->num_inserts()); // Fetch again. ClearStats(); text.clear(); response_headers.Clear(); FetchFromProxy("text.html", true, &text, &response_headers); // One hit for the HTTP response as content is smaller than // max_cacheable_response_content_length. EXPECT_EQ(1, lru_cache()->num_hits()); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); EXPECT_EQ(2, lru_cache()->num_misses()); } TEST_F(ProxyInterfaceTest, CacheableSizeAjax) { // Test to check that we are not caching responses which have content length > // max_cacheable_response_content_length in Ajax flow. ResponseHeaders headers; SetTimeMs(MockTimer::kApr_5_2010_ms); headers.Add(HttpAttributes::kContentType, kContentTypeCss.mime_type()); headers.SetDate(MockTimer::kApr_5_2010_ms); headers.SetStatusAndReason(HttpStatus::kOK); headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl("text.css"), headers, kCssContent); http_cache()->set_max_cacheable_response_content_length(0); // The first response served by the fetcher and is not rewritten. An ajax // rewrite should not be triggered as the content length is greater than // max_cacheable_response_content_length. GoogleString text; ResponseHeaders response_headers; FetchFromProxy("text.css", true, &text, &response_headers); EXPECT_EQ(kCssContent, text); // One lookup for ajax metadata, one for the HTTP response. None are found. EXPECT_EQ(2, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(0, lru_cache()->num_hits()); EXPECT_EQ(0, lru_cache()->num_inserts()); ClearStats(); // Fetch again. Optimized version is not served. text.clear(); response_headers.Clear(); FetchFromProxy("text.css", true, &text, &response_headers); EXPECT_EQ(kCssContent, text); // None are found. EXPECT_EQ(2, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(0, lru_cache()->num_hits()); } TEST_F(ProxyInterfaceTest, CacheableSizeResource) { // Test to check that we are not caching responses which have content length > // max_cacheable_response_content_length in resource flow. GoogleString text; RequestHeaders request_headers; ResponseHeaders headers; // Fetching of a rewritten resource we did not just create // after an HTML rewrite. SetResponseWithDefaultHeaders("a.css", kContentTypeCss, kCssContent, kHtmlCacheTimeSec * 2); // Set the set_max_cacheable_response_content_length to 0 bytes. http_cache()->set_max_cacheable_response_content_length(0); // Fetch fails as original is not accessible. FetchFromProxy( Encode("", "cf", "0", "a.css", "css"), request_headers, false, /* expect_success */ &text, &headers, false /* proxy_fetch_property_callback_collector_created */); } TEST_F(ProxyInterfaceTest, InvalidationForCacheableHtml) { ResponseHeaders headers; const char kContent[] = "A very compelling article"; SetTimeMs(MockTimer::kApr_5_2010_ms); headers.Add(HttpAttributes::kContentType, kContentTypeHtml.mime_type()); headers.SetDate(MockTimer::kApr_5_2010_ms); headers.SetStatusAndReason(HttpStatus::kOK); headers.SetDateAndCaching(MockTimer::kApr_5_2010_ms, 300 * Timer::kSecondMs); headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl("text.html"), headers, kContent); GoogleString text; ResponseHeaders response_headers; FetchFromProxy("text.html", true, &text, &response_headers); EXPECT_STREQ(max_age_300_, response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(start_time_plus_300s_string_, response_headers.Lookup1(HttpAttributes::kExpires)); EXPECT_STREQ(start_time_string_, response_headers.Lookup1(HttpAttributes::kDate)); EXPECT_EQ(kContent, text); // One lookup for ajax metadata, one for the HTTP response and one for the // property cache entry. None are found. EXPECT_EQ(3, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(0, lru_cache()->num_hits()); ClearStats(); // Fetch again from cache. It has the same caching headers. text.clear(); response_headers.Clear(); FetchFromProxy("text.html", true, &text, &response_headers); EXPECT_STREQ(max_age_300_, response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(start_time_plus_300s_string_, response_headers.Lookup1(HttpAttributes::kExpires)); EXPECT_STREQ(start_time_string_, response_headers.Lookup1(HttpAttributes::kDate)); EXPECT_EQ(kContent, text); // One hit for the HTTP response. Misses for the property cache entry and the // ajax metadata. EXPECT_EQ(1, lru_cache()->num_hits()); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); EXPECT_EQ(2, lru_cache()->num_misses()); // Change the response. SetFetchResponse(AbsolutifyUrl("text.html"), headers, "new"); ClearStats(); // Fetch again from cache. It has the same caching headers. text.clear(); response_headers.Clear(); FetchFromProxy("text.html", true, &text, &response_headers); EXPECT_STREQ(max_age_300_, response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(start_time_plus_300s_string_, response_headers.Lookup1(HttpAttributes::kExpires)); EXPECT_STREQ(start_time_string_, response_headers.Lookup1(HttpAttributes::kDate)); // We continue to serve the previous response since we've cached it. EXPECT_EQ(kContent, text); // One hit for the HTTP response. Misses for the property cache entry and the // ajax metadata. EXPECT_EQ(1, lru_cache()->num_hits()); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); EXPECT_EQ(2, lru_cache()->num_misses()); // Invalidate the cache. scoped_ptr<RewriteOptions> custom_options( server_context()->global_options()->Clone()); custom_options->UpdateCacheInvalidationTimestampMs(timer()->NowMs()); SetRewriteOptions(custom_options.get()); ClearStats(); text.clear(); response_headers.Clear(); FetchFromProxy("text.html", true, &text, &response_headers); EXPECT_STREQ(max_age_300_, response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(start_time_plus_300s_string_, response_headers.Lookup1(HttpAttributes::kExpires)); EXPECT_STREQ(start_time_string_, response_headers.Lookup1(HttpAttributes::kDate)); // We get the new response since we've invalidated the cache. EXPECT_EQ("new", text); // The HTTP response is found in the LRU cache but counts as a miss in the // HTTPCache since it has been invalidated. Also, cache misses for the ajax // metadata and property cache entry. EXPECT_EQ(1, lru_cache()->num_hits()); EXPECT_EQ(0, http_cache()->cache_hits()->Get()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(2, lru_cache()->num_misses()); } TEST_F(ProxyInterfaceTest, UrlInvalidationForCacheableHtml) { ResponseHeaders headers; const char kContent[] = "A very compelling article"; SetTimeMs(MockTimer::kApr_5_2010_ms); headers.Add(HttpAttributes::kContentType, kContentTypeHtml.mime_type()); headers.SetStatusAndReason(HttpStatus::kOK); headers.SetDateAndCaching(MockTimer::kApr_5_2010_ms, 300 * Timer::kSecondMs); headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl("text.html"), headers, kContent); GoogleString text; ResponseHeaders response_headers; FetchFromProxy("text.html", true, &text, &response_headers); EXPECT_STREQ(max_age_300_, response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(start_time_plus_300s_string_, response_headers.Lookup1(HttpAttributes::kExpires)); EXPECT_STREQ(start_time_string_, response_headers.Lookup1(HttpAttributes::kDate)); EXPECT_EQ(kContent, text); // One lookup for ajax metadata, one for the HTTP response and one for the // property cache entry. None are found. EXPECT_EQ(3, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(0, lru_cache()->num_hits()); ClearStats(); // Fetch again from cache. It has the same caching headers. text.clear(); response_headers.Clear(); FetchFromProxy("text.html", true, &text, &response_headers); EXPECT_STREQ(max_age_300_, response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(start_time_plus_300s_string_, response_headers.Lookup1(HttpAttributes::kExpires)); EXPECT_STREQ(start_time_string_, response_headers.Lookup1(HttpAttributes::kDate)); EXPECT_EQ(kContent, text); // One hit for the HTTP response. Misses for the property cache entry and the // ajax metadata. EXPECT_EQ(1, lru_cache()->num_hits()); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); EXPECT_EQ(2, lru_cache()->num_misses()); // Change the response. SetFetchResponse(AbsolutifyUrl("text.html"), headers, "new"); ClearStats(); // Fetch again from cache. It has the same caching headers. text.clear(); response_headers.Clear(); FetchFromProxy("text.html", true, &text, &response_headers); EXPECT_STREQ(max_age_300_, response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(start_time_plus_300s_string_, response_headers.Lookup1(HttpAttributes::kExpires)); EXPECT_STREQ(start_time_string_, response_headers.Lookup1(HttpAttributes::kDate)); // We continue to serve the previous response since we've cached it. EXPECT_EQ(kContent, text); // One hit for the HTTP response. Misses for the property cache entry and the // ajax metadata. EXPECT_EQ(1, lru_cache()->num_hits()); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); EXPECT_EQ(2, lru_cache()->num_misses()); // Invalidate the cache for some URL other than 'text.html'. scoped_ptr<RewriteOptions> custom_options_1( server_context()->global_options()->Clone()); custom_options_1->AddUrlCacheInvalidationEntry( AbsolutifyUrl("foo.bar"), timer()->NowMs(), true); SetRewriteOptions(custom_options_1.get()); ClearStats(); text.clear(); response_headers.Clear(); FetchFromProxy("text.html", true, &text, &response_headers); EXPECT_STREQ(max_age_300_, response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(start_time_plus_300s_string_, response_headers.Lookup1(HttpAttributes::kExpires)); EXPECT_STREQ(start_time_string_, response_headers.Lookup1(HttpAttributes::kDate)); // We continue to serve the previous response since we've cached it. EXPECT_EQ(kContent, text); // One hit for the HTTP response. Misses for the property cache entry and the // ajax metadata. EXPECT_EQ(1, lru_cache()->num_hits()); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); EXPECT_EQ(2, lru_cache()->num_misses()); // Invalidate the cache. scoped_ptr<RewriteOptions> custom_options_2( server_context()->global_options()->Clone()); // Strictness of URL cache invalidation entry (last argument below) does not // matter in this test since there is nothing cached in metadata or property // caches. custom_options_2->AddUrlCacheInvalidationEntry( AbsolutifyUrl("text.html"), timer()->NowMs(), true); SetRewriteOptions(custom_options_2.get()); ClearStats(); text.clear(); response_headers.Clear(); FetchFromProxy("text.html", true, &text, &response_headers); EXPECT_STREQ(max_age_300_, response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(start_time_plus_300s_string_, response_headers.Lookup1(HttpAttributes::kExpires)); EXPECT_STREQ(start_time_string_, response_headers.Lookup1(HttpAttributes::kDate)); // We get the new response since we've invalidated the cache. EXPECT_EQ("new", text); // The HTTP response is found in the LRU cache but counts as a miss in the // HTTPCache since it has been invalidated. Also, cache misses for the ajax // metadata and property cache entry. EXPECT_EQ(1, lru_cache()->num_hits()); EXPECT_EQ(0, http_cache()->cache_hits()->Get()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(2, lru_cache()->num_misses()); } TEST_F(ProxyInterfaceTest, NoImplicitCachingHeadersForHtml) { ResponseHeaders headers; const char kContent[] = "A very compelling article"; headers.Add(HttpAttributes::kContentType, kContentTypeHtml.mime_type()); SetTimeMs(MockTimer::kApr_5_2010_ms); headers.SetDate(MockTimer::kApr_5_2010_ms); headers.SetStatusAndReason(HttpStatus::kOK); headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl("text.html"), headers, kContent); // The first response served by the fetcher does not have implicit caching // headers. GoogleString text; ResponseHeaders response_headers; FetchFromProxy("text.html", true, &text, &response_headers); EXPECT_STREQ(NULL, response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(start_time_string_, response_headers.Lookup1(HttpAttributes::kDate)); EXPECT_EQ(kContent, text); // Lookups for: (1) ajax metadata (2) HTTP response (3) Property cache. // None are found. EXPECT_EQ(3, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(0, lru_cache()->num_hits()); ClearStats(); // Fetch again. Not found in cache. text.clear(); response_headers.Clear(); FetchFromProxy("text.html", true, &text, &response_headers); EXPECT_EQ(NULL, response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(start_time_string_, response_headers.Lookup1(HttpAttributes::kDate)); EXPECT_EQ(kContent, text); // Lookups for: (1) ajax metadata (2) HTTP response (3) Property cache. // None are found. EXPECT_EQ(3, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(0, lru_cache()->num_hits()); } TEST_F(ProxyInterfaceTest, ModifiedImplicitCachingHeadersForCss) { RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->set_implicit_cache_ttl_ms(500 * Timer::kSecondMs); server_context()->ComputeSignature(options); ResponseHeaders headers; const char kContent[] = "A very compelling article"; SetTimeMs(MockTimer::kApr_5_2010_ms); headers.Add(HttpAttributes::kContentType, kContentTypeCss.mime_type()); headers.SetStatusAndReason(HttpStatus::kOK); // Do not call ComputeCaching before calling SetFetchResponse because it will // add an explicit max-age=300 cache control header. We do not want that // header in this test. SetFetchResponse(AbsolutifyUrl("text.css"), headers, kContent); // The first response served by the fetcher has caching headers. GoogleString text; ResponseHeaders response_headers; FetchFromProxy("text.css", true, &text, &response_headers); GoogleString max_age_500 = "max-age=500"; GoogleString start_time_plus_500s_string; ConvertTimeToString(MockTimer::kApr_5_2010_ms + 500 * Timer::kSecondMs, &start_time_plus_500s_string); EXPECT_STREQ(max_age_500, response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(start_time_plus_500s_string, response_headers.Lookup1(HttpAttributes::kExpires)); EXPECT_STREQ(start_time_string_, response_headers.Lookup1(HttpAttributes::kDate)); EXPECT_EQ(kContent, text); // One lookup for ajax metadata, one for the HTTP response and one by the css // filter which looks up metadata while rewriting. None are found. EXPECT_EQ(3, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(0, lru_cache()->num_hits()); ClearStats(); // Fetch again from cache. It has the same caching headers. text.clear(); response_headers.Clear(); FetchFromProxy("text.css", true, &text, &response_headers); EXPECT_STREQ(max_age_500, response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(start_time_plus_500s_string, response_headers.Lookup1(HttpAttributes::kExpires)); EXPECT_STREQ(start_time_string_, response_headers.Lookup1(HttpAttributes::kDate)); EXPECT_EQ(kContent, text); // One hit for ajax metadata and one for the HTTP response. EXPECT_EQ(2, lru_cache()->num_hits()); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); EXPECT_EQ(0, lru_cache()->num_misses()); } TEST_F(ProxyInterfaceTest, EtagsAddedWhenAbsent) { ResponseHeaders headers; const char kContent[] = "A very compelling article"; SetDefaultLongCacheHeaders(&kContentTypeText, &headers); headers.RemoveAll(HttpAttributes::kEtag); headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl("text.txt"), headers, kContent); // The first response served by the fetcher has no Etag in the response. GoogleString text; ResponseHeaders response_headers; FetchFromProxy("text.txt", true, &text, &response_headers); EXPECT_EQ(HttpStatus::kOK, response_headers.status_code()); EXPECT_EQ(NULL, response_headers.Lookup1(HttpAttributes::kEtag)); EXPECT_EQ(kContent, text); // One lookup for ajax metadata and one for the HTTP response. Neither are // found. EXPECT_EQ(2, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(0, lru_cache()->num_hits()); ClearStats(); // An Etag is added before writing to cache. The next response is served from // cache and has an Etag. GoogleString text2; ResponseHeaders response_headers2; FetchFromProxy("text.txt", true, &text2, &response_headers2); EXPECT_EQ(HttpStatus::kOK, response_headers2.status_code()); EXPECT_STREQ(kEtag0, response_headers2.Lookup1(HttpAttributes::kEtag)); EXPECT_EQ(kContent, text2); // One lookup for ajax metadata and one for the HTTP response. The metadata is // not found but the HTTP response is found. EXPECT_EQ(1, lru_cache()->num_misses()); EXPECT_EQ(0, http_cache()->cache_misses()->Get()); EXPECT_EQ(1, lru_cache()->num_hits()); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); ClearStats(); // The Etag matches and a 304 is served out. GoogleString text3; ResponseHeaders response_headers3; RequestHeaders request_headers; request_headers.Add(HttpAttributes::kIfNoneMatch, kEtag0); FetchFromProxy("text.txt", request_headers, true, &text3, &response_headers3); EXPECT_EQ(HttpStatus::kNotModified, response_headers3.status_code()); EXPECT_STREQ(NULL, response_headers3.Lookup1(HttpAttributes::kEtag)); EXPECT_EQ("", text3); // One lookup for ajax metadata and one for the HTTP response. The metadata is // not found but the HTTP response is found. EXPECT_EQ(1, lru_cache()->num_misses()); EXPECT_EQ(0, http_cache()->cache_misses()->Get()); EXPECT_EQ(1, lru_cache()->num_hits()); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); } TEST_F(ProxyInterfaceTest, EtagMatching) { ResponseHeaders headers; const char kContent[] = "A very compelling article"; SetDefaultLongCacheHeaders(&kContentTypeText, &headers); headers.Replace(HttpAttributes::kEtag, "etag"); headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl("text.txt"), headers, kContent); // The first response served by the fetcher has an Etag in the response. GoogleString text; ResponseHeaders response_headers; FetchFromProxy("text.txt", true, &text, &response_headers); EXPECT_EQ(HttpStatus::kOK, response_headers.status_code()); EXPECT_STREQ("etag", response_headers.Lookup1(HttpAttributes::kEtag)); EXPECT_EQ(kContent, text); // One lookup for ajax metadata and one for the HTTP response. Neither are // found. EXPECT_EQ(2, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(0, lru_cache()->num_hits()); EXPECT_EQ(0, http_cache()->cache_hits()->Get()); ClearStats(); // The next response is served from cache. GoogleString text2; ResponseHeaders response_headers2; FetchFromProxy("text.txt", true, &text2, &response_headers2); EXPECT_EQ(HttpStatus::kOK, response_headers2.status_code()); EXPECT_STREQ("etag", response_headers2.Lookup1(HttpAttributes::kEtag)); EXPECT_EQ(kContent, text2); // One lookup for ajax metadata and one for the HTTP response. The metadata is // not found but the HTTP response is found. EXPECT_EQ(1, lru_cache()->num_misses()); EXPECT_EQ(0, http_cache()->cache_misses()->Get()); EXPECT_EQ(1, lru_cache()->num_hits()); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); ClearStats(); // The Etag matches and a 304 is served out. GoogleString text3; ResponseHeaders response_headers3; RequestHeaders request_headers; request_headers.Add(HttpAttributes::kIfNoneMatch, "etag"); FetchFromProxy("text.txt", request_headers, true, &text3, &response_headers3); EXPECT_EQ(HttpStatus::kNotModified, response_headers3.status_code()); EXPECT_STREQ(NULL, response_headers3.Lookup1(HttpAttributes::kEtag)); EXPECT_EQ("", text3); // One lookup for ajax metadata and one for the HTTP response. The metadata is // not found but the HTTP response is found. EXPECT_EQ(1, lru_cache()->num_misses()); EXPECT_EQ(0, http_cache()->cache_misses()->Get()); EXPECT_EQ(1, lru_cache()->num_hits()); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); ClearStats(); // The Etag doesn't match and the full response is returned. GoogleString text4; ResponseHeaders response_headers4; request_headers.Replace(HttpAttributes::kIfNoneMatch, "mismatch"); FetchFromProxy("text.txt", request_headers, true, &text4, &response_headers4); EXPECT_EQ(HttpStatus::kOK, response_headers4.status_code()); EXPECT_STREQ("etag", response_headers4.Lookup1(HttpAttributes::kEtag)); EXPECT_EQ(kContent, text4); // One lookup for ajax metadata and one for the HTTP response. The metadata is // not found but the HTTP response is found. EXPECT_EQ(1, lru_cache()->num_misses()); EXPECT_EQ(0, http_cache()->cache_misses()->Get()); EXPECT_EQ(1, lru_cache()->num_hits()); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); } TEST_F(ProxyInterfaceTest, LastModifiedMatch) { ResponseHeaders headers; const char kContent[] = "A very compelling article"; SetDefaultLongCacheHeaders(&kContentTypeText, &headers); headers.SetLastModified(MockTimer::kApr_5_2010_ms); headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl("text.txt"), headers, kContent); // The first response served by the fetcher has an Etag in the response. GoogleString text; ResponseHeaders response_headers; FetchFromProxy("text.txt", true, &text, &response_headers); EXPECT_EQ(HttpStatus::kOK, response_headers.status_code()); EXPECT_STREQ(start_time_string_, response_headers.Lookup1(HttpAttributes::kLastModified)); EXPECT_EQ(kContent, text); // One lookup for ajax metadata and one for the HTTP response. Neither are // found. EXPECT_EQ(2, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(0, lru_cache()->num_hits()); EXPECT_EQ(0, http_cache()->cache_hits()->Get()); ClearStats(); // The next response is served from cache. GoogleString text2; ResponseHeaders response_headers2; FetchFromProxy("text.txt", true, &text2, &response_headers2); EXPECT_EQ(HttpStatus::kOK, response_headers2.status_code()); EXPECT_STREQ(start_time_string_, response_headers2.Lookup1(HttpAttributes::kLastModified)); EXPECT_EQ(kContent, text2); // One lookup for ajax metadata and one for the HTTP response. The metadata is // not found but the HTTP response is found. EXPECT_EQ(1, lru_cache()->num_misses()); EXPECT_EQ(0, http_cache()->cache_misses()->Get()); EXPECT_EQ(1, lru_cache()->num_hits()); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); ClearStats(); // The last modified timestamp matches and a 304 is served out. GoogleString text3; ResponseHeaders response_headers3; RequestHeaders request_headers; request_headers.Add(HttpAttributes::kIfModifiedSince, start_time_string_); FetchFromProxy("text.txt", request_headers, true, &text3, &response_headers3); EXPECT_EQ(HttpStatus::kNotModified, response_headers3.status_code()); EXPECT_STREQ(NULL, response_headers3.Lookup1(HttpAttributes::kLastModified)); EXPECT_EQ("", text3); // One lookup for ajax metadata and one for the HTTP response. The metadata is // not found but the HTTP response is found. EXPECT_EQ(1, lru_cache()->num_misses()); EXPECT_EQ(0, http_cache()->cache_misses()->Get()); EXPECT_EQ(1, lru_cache()->num_hits()); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); ClearStats(); // The last modified timestamp doesn't match and the full response is // returned. GoogleString text4; ResponseHeaders response_headers4; request_headers.Replace(HttpAttributes::kIfModifiedSince, "Fri, 02 Apr 2010 18:51:26 GMT"); FetchFromProxy("text.txt", request_headers, true, &text4, &response_headers4); EXPECT_EQ(HttpStatus::kOK, response_headers4.status_code()); EXPECT_STREQ(start_time_string_, response_headers4.Lookup1(HttpAttributes::kLastModified)); EXPECT_EQ(kContent, text4); // One lookup for ajax metadata and one for the HTTP response. The metadata is // not found but the HTTP response is found.` EXPECT_EQ(1, lru_cache()->num_misses()); EXPECT_EQ(0, http_cache()->cache_misses()->Get()); EXPECT_EQ(1, lru_cache()->num_hits()); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); } TEST_F(ProxyInterfaceTest, AjaxRewritingForCss) { ResponseHeaders headers; SetTimeMs(MockTimer::kApr_5_2010_ms); headers.Add(HttpAttributes::kContentType, kContentTypeCss.mime_type()); headers.SetDate(MockTimer::kApr_5_2010_ms); headers.SetStatusAndReason(HttpStatus::kOK); headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl("text.css"), headers, kCssContent); // The first response served by the fetcher and is not rewritten. An ajax // rewrite is triggered. GoogleString text; ResponseHeaders response_headers; FetchFromProxy("text.css", true, &text, &response_headers); EXPECT_STREQ(max_age_300_, response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(start_time_plus_300s_string_, response_headers.Lookup1(HttpAttributes::kExpires)); EXPECT_STREQ(start_time_string_, response_headers.Lookup1(HttpAttributes::kDate)); EXPECT_EQ(kCssContent, text); CheckBackgroundFetch(response_headers, false); CheckNumBackgroundFetches(0); // One lookup for ajax metadata, one for the HTTP response and one by the css // filter which looks up metadata while rewriting. None are found. EXPECT_EQ(3, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(0, lru_cache()->num_hits()); ClearStats(); // The rewrite is complete and the optimized version is served. text.clear(); response_headers.Clear(); FetchFromProxy("text.css", true, &text, &response_headers); EXPECT_STREQ(max_age_300_, response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(start_time_plus_300s_string_, response_headers.Lookup1(HttpAttributes::kExpires)); EXPECT_STREQ(start_time_string_, response_headers.Lookup1(HttpAttributes::kDate)); EXPECT_EQ(kMinimizedCssContent, text); // One hit for ajax metadata and one for the rewritten HTTP response. EXPECT_EQ(2, lru_cache()->num_hits()); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); EXPECT_EQ(0, lru_cache()->num_misses()); CheckNumBackgroundFetches(0); ClearStats(); // Advance close to expiry. AdvanceTimeUs(270 * Timer::kSecondUs); // The rewrite is complete and the optimized version is served. A freshen is // triggered to refresh the original CSS file. text.clear(); response_headers.Clear(); FetchFromProxy("text.css", true, &text, &response_headers); EXPECT_STREQ("max-age=30", response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(start_time_plus_300s_string_, response_headers.Lookup1(HttpAttributes::kExpires)); EXPECT_STREQ("Mon, 05 Apr 2010 18:55:56 GMT", response_headers.Lookup1(HttpAttributes::kDate)); EXPECT_EQ(kMinimizedCssContent, text); // One hit for ajax metadata, one for the rewritten HTTP response and one for // the original HTTP response while freshening. EXPECT_EQ(3, lru_cache()->num_hits()); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); EXPECT_EQ(0, lru_cache()->num_misses()); // One background fetch is triggered while freshening. CheckNumBackgroundFetches(1); // Disable ajax rewriting. We now received the response fetched while // freshening. This response has kBackgroundFetchHeader set to 1. RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->set_in_place_rewriting_enabled(false); server_context()->ComputeSignature(options); ClearStats(); text.clear(); response_headers.Clear(); FetchFromProxy("text.css", true, &text, &response_headers); EXPECT_STREQ(max_age_300_, response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ("Mon, 05 Apr 2010 19:00:56 GMT", response_headers.Lookup1(HttpAttributes::kExpires)); EXPECT_STREQ("Mon, 05 Apr 2010 18:55:56 GMT", response_headers.Lookup1(HttpAttributes::kDate)); EXPECT_EQ(kCssContent, text); CheckNumBackgroundFetches(0); CheckBackgroundFetch(response_headers, true); // Done HTTP cache hit for the original response. EXPECT_EQ(1, lru_cache()->num_hits()); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); EXPECT_EQ(0, lru_cache()->num_misses()); } TEST_F(ProxyInterfaceTest, FallbackNoAcceptGzip) { RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->set_http_cache_compression_level(9); options->set_serve_stale_while_revalidate_threshold_sec( 1000 * Timer::kDayMs); server_context()->ComputeSignature(options); ResponseHeaders headers; SetTimeMs(MockTimer::kApr_5_2010_ms); headers.Add(HttpAttributes::kContentType, kContentTypeCss.mime_type()); headers.SetDate(MockTimer::kApr_5_2010_ms); headers.SetStatusAndReason(HttpStatus::kOK); headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl("text.css"), headers, kCssContent); // The first response served by the fetcher and is not rewritten. An ajax // rewrite is triggered. GoogleString text; ResponseHeaders response_headers; FetchFromProxy("text.css", true, &text, &response_headers); EXPECT_STREQ(max_age_300_, response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(start_time_plus_300s_string_, response_headers.Lookup1(HttpAttributes::kExpires)); EXPECT_STREQ(start_time_string_, response_headers.Lookup1(HttpAttributes::kDate)); EXPECT_EQ(kCssContent, text); CheckBackgroundFetch(response_headers, false); CheckNumBackgroundFetches(0); // One lookup for ajax metadata, one for the HTTP response and one by the css // filter which looks up metadata while rewriting. None are found. EXPECT_EQ(3, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(0, lru_cache()->num_hits()); ClearStats(); // The rewrite is complete and the optimized version is served. text.clear(); response_headers.Clear(); AdvanceTimeUs(400 * Timer::kSecondUs); // expired FetchFromProxy("text.css", true, &text, &response_headers); EXPECT_FALSE(response_headers.IsGzipped()); } TEST_F(ProxyInterfaceTest, NoAjaxRewritingWhenAuthorizationSent) { // We should not do ajax rewriting when sending over an authorization // header if the original isn't cache-control: public. ResponseHeaders headers; SetTimeMs(MockTimer::kApr_5_2010_ms); headers.Add(HttpAttributes::kContentType, kContentTypeCss.mime_type()); headers.SetDate(MockTimer::kApr_5_2010_ms); headers.SetStatusAndReason(HttpStatus::kOK); headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl("text.css"), headers, kCssContent); // The first response served by the fetcher and is not rewritten. An ajax // rewrite is triggered. GoogleString text; ResponseHeaders response_headers; RequestHeaders request_headers; request_headers.Add(HttpAttributes::kAuthorization, "Paperwork"); FetchFromProxy("text.css", request_headers, true, &text, &response_headers); EXPECT_EQ(kCssContent, text); // The second version should still be unoptimized, since original wasn't // cacheable. text.clear(); response_headers.Clear(); FetchFromProxy("text.css", request_headers, true, &text, &response_headers); EXPECT_EQ(kCssContent, text); } TEST_F(ProxyInterfaceTest, AjaxRewritingWhenAuthorizationButPublic) { // We should do ajax rewriting when sending over an authorization // header if the original is cache-control: public. ResponseHeaders headers; SetTimeMs(MockTimer::kApr_5_2010_ms); headers.Add(HttpAttributes::kContentType, kContentTypeCss.mime_type()); headers.SetDate(MockTimer::kApr_5_2010_ms); headers.SetStatusAndReason(HttpStatus::kOK); headers.Add(HttpAttributes::kCacheControl, "public, max-age=400"); headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl("text.css"), headers, kCssContent); // The first response served by the fetcher and is not rewritten. An ajax // rewrite is triggered. GoogleString text; ResponseHeaders response_headers; RequestHeaders request_headers; request_headers.Add(HttpAttributes::kAuthorization, "Paperwork"); FetchFromProxy("text.css", request_headers, true, &text, &response_headers); EXPECT_EQ(kCssContent, text); // The second version should be optimized in this case. text.clear(); response_headers.Clear(); FetchFromProxy("text.css", request_headers, true, &text, &response_headers); EXPECT_EQ(kMinimizedCssContent, text); } TEST_F(ProxyInterfaceTest, AjaxRewritingDisabledByGlobalDisable) { RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->set_enabled(RewriteOptions::kEnabledOff); server_context()->ComputeSignature(options); SetResponseWithDefaultHeaders("a.css", kContentTypeCss, kCssContent, kHtmlCacheTimeSec * 2); GoogleString text; ResponseHeaders response_headers; FetchFromProxy("a.css", true, &text, &response_headers); // First fetch will not get rewritten no matter what. EXPECT_STREQ(kCssContent, text); // Second fetch would get minified if ajax rewriting were on; but // it got disabled by the global toggle. text.clear(); FetchFromProxy("a.css", true, &text, &response_headers); EXPECT_STREQ(kCssContent, text); } TEST_F(ProxyInterfaceTest, AjaxRewritingSkippedIfBlacklisted) { ResponseHeaders headers; SetTimeMs(MockTimer::kApr_5_2010_ms); headers.Add(HttpAttributes::kContentType, kContentTypeCss.mime_type()); headers.SetDate(MockTimer::kApr_5_2010_ms); headers.SetStatusAndReason(HttpStatus::kOK); headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl("blacklist.css"), headers, kCssContent); // The first response is served by the fetcher. Since the url is blacklisted, // no ajax rewriting happens. GoogleString text; ResponseHeaders response_headers; FetchFromProxy("blacklist.css", true, &text, &response_headers); EXPECT_STREQ(max_age_300_, response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(start_time_plus_300s_string_, response_headers.Lookup1(HttpAttributes::kExpires)); EXPECT_STREQ(start_time_string_, response_headers.Lookup1(HttpAttributes::kDate)); EXPECT_EQ(kCssContent, text); // Since no ajax rewriting happens, there is only a single cache lookup for // the resource. EXPECT_EQ(1, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); EXPECT_EQ(0, lru_cache()->num_hits()); ClearStats(); // The same thing happens on the second request. text.clear(); response_headers.Clear(); FetchFromProxy("blacklist.css", true, &text, &response_headers); EXPECT_STREQ(max_age_300_, response_headers.Lookup1(HttpAttributes::kCacheControl)); EXPECT_STREQ(start_time_plus_300s_string_, response_headers.Lookup1(HttpAttributes::kExpires)); EXPECT_STREQ(start_time_string_, response_headers.Lookup1(HttpAttributes::kDate)); EXPECT_EQ(kCssContent, text); // The resource is found in cache this time. EXPECT_EQ(0, lru_cache()->num_misses()); EXPECT_EQ(0, http_cache()->cache_misses()->Get()); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); EXPECT_EQ(1, lru_cache()->num_hits()); } TEST_F(ProxyInterfaceTest, AjaxRewritingBlacklistReject) { // Makes sure that we honor reject_blacklisted() when ajax rewriting may // have normally happened. RejectBlacklisted(); ResponseHeaders headers; SetTimeMs(MockTimer::kApr_5_2010_ms); headers.Add(HttpAttributes::kContentType, kContentTypeCss.mime_type()); headers.SetDate(MockTimer::kApr_5_2010_ms); headers.SetStatusAndReason(HttpStatus::kOK); headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl("blacklistCoffee.css"), headers, kCssContent); SetFetchResponse(AbsolutifyUrl("tea.css"), headers, kCssContent); GoogleString text; ResponseHeaders response_headers; FetchFromProxy("blacklistCoffee.css", true, &text, &response_headers); EXPECT_EQ(HttpStatus::kImATeapot, response_headers.status_code()); EXPECT_TRUE(text.empty()); // Non-blacklisted stuff works OK. FetchFromProxy("tea.css", true, &text, &response_headers); EXPECT_EQ(HttpStatus::kOK, response_headers.status_code()); EXPECT_EQ(kCssContent, text); } TEST_F(ProxyInterfaceTest, EatCookiesOnReconstructFailure) { // Make sure we don't pass through a Set-Cookie[2] when reconstructing // a resource on demand fails. GoogleString abs_path = AbsolutifyUrl("a.css"); ResponseHeaders response_headers; SetDefaultLongCacheHeaders(&kContentTypeCss, &response_headers); response_headers.Add(HttpAttributes::kSetCookie, "a cookie"); response_headers.Add(HttpAttributes::kSetCookie2, "a weird old-time cookie"); response_headers.ComputeCaching(); SetFetchResponse(abs_path, response_headers, "broken_css{"); ResponseHeaders out_response_headers; RequestHeaders request_headers; GoogleString text; FetchFromProxy(Encode("", "cf", "0", "a.css", "css"), request_headers, true, /* expect_success */ &text, &out_response_headers, false /* proxy_fetch_property_callback_collector_created */); EXPECT_EQ(NULL, out_response_headers.Lookup1(HttpAttributes::kSetCookie)); EXPECT_EQ(NULL, out_response_headers.Lookup1(HttpAttributes::kSetCookie2)); } TEST_F(ProxyInterfaceTest, RewriteHtml) { GoogleString text; ResponseHeaders headers; RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->SetRewriteLevel(RewriteOptions::kPassThrough); options->EnableFilter(RewriteOptions::kRewriteCss); server_context()->ComputeSignature(options); headers.Add(HttpAttributes::kEtag, "something"); headers.SetDateAndCaching(MockTimer::kApr_5_2010_ms, kHtmlCacheTimeSec * 2 * Timer::kSecondMs); headers.SetLastModified(MockTimer::kApr_5_2010_ms); headers.Add(HttpAttributes::kContentType, kContentTypeHtml.mime_type()); headers.SetStatusAndReason(HttpStatus::kOK); headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl(kPageUrl), headers, CssLinkHref("a.css")); SetResponseWithDefaultHeaders("a.css", kContentTypeCss, kCssContent, kHtmlCacheTimeSec * 2); text.clear(); headers.Clear(); FetchFromProxy(kPageUrl, true, &text, &headers); CheckBackgroundFetch(headers, false); CheckNumBackgroundFetches(1); CheckHeaders(headers, kContentTypeHtml); EXPECT_EQ(CssLinkHref(Encode("", "cf", "0", "a.css", "css")), text); headers.ComputeCaching(); EXPECT_LE(start_time_ms_ + kHtmlCacheTimeSec * Timer::kSecondMs, headers.CacheExpirationTimeMs()); EXPECT_EQ(NULL, headers.Lookup1(HttpAttributes::kEtag)); EXPECT_EQ(NULL, headers.Lookup1(HttpAttributes::kLastModified)); EXPECT_STREQ("cf", AppliedRewriterStringFromLog()); // Fetch the rewritten resource as well. text.clear(); headers.Clear(); ClearStats(); RequestHeaders request_headers; FetchFromProxy(Encode("", "cf", "0", "a.css", "css"), request_headers, true, /* expect_success */ &text, &headers, false /* proxy_fetch_property_callback_collector_created */); CheckHeaders(headers, kContentTypeCss); // Note that the fetch for the original resource was triggered as a result of // the initial HTML request. Hence, its headers indicate that it is a // background request // This response has kBackgroundFetchHeader set to 1 since a fetch was // triggered for it in the background while rewriting the original html. CheckBackgroundFetch(headers, true); CheckNumBackgroundFetches(0); headers.ComputeCaching(); EXPECT_LE(start_time_ms_ + Timer::kYearMs, headers.CacheExpirationTimeMs()); EXPECT_EQ(kMinimizedCssContent, text); } TEST_F(ProxyInterfaceTest, LogChainedResourceRewrites) { GoogleString text; ResponseHeaders headers; SetResponseWithDefaultHeaders("1.js", kContentTypeJavascript, "var wxyz=1;", kHtmlCacheTimeSec * 2); SetResponseWithDefaultHeaders("2.js", kContentTypeJavascript, "var abcd=2;", kHtmlCacheTimeSec * 2); GoogleString combined_js_url = Encode( kTestDomain, "jc", "0", "1.js.pagespeed.jm.0.jsX2.js.pagespeed.jm.0.js", "js"); combined_js_url[combined_js_url.find('X')] = '+'; RequestHeaders request_headers; FetchFromProxy( combined_js_url, request_headers, true, /* expect_success */ &text, &headers, false /* proxy_fetch_property_callback_collector_created */); EXPECT_STREQ("jc,jm", AppliedRewriterStringFromLog()); } TEST_F(ProxyInterfaceTest, FlushHugeHtml) { // Test the forced flushing of HTML controlled by flush_buffer_limit_bytes(). RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->set_flush_buffer_limit_bytes(8); // 2 self-closing tags ("<p/>") options->set_flush_html(true); options->DisableFilter(RewriteOptions::kAddHead); rewrite_driver()->AddFilters(); server_context()->ComputeSignature(options); SetResponseWithDefaultHeaders("page.html", kContentTypeHtml, "<a/><b/><c/><d/><e/><f/><g/><h/>", kHtmlCacheTimeSec * 2); GoogleString out; FetchFromProxyLoggingFlushes("page.html", true /*success*/, &out); EXPECT_EQ( "<a/><b/>|Flush|<c/><d/>|Flush|<e/><f/>|Flush|<g/><h/>|Flush||Flush|", out); // Now tell to flush after 3 self-closing tags. options->ClearSignatureForTesting(); options->set_flush_buffer_limit_bytes(12); // 3 self-closing tags server_context()->ComputeSignature(options); FetchFromProxyLoggingFlushes("page.html", true /*success*/, &out); EXPECT_EQ( "<a/><b/><c/>|Flush|<d/><e/><f/>|Flush|<g/><h/>|Flush|", out); // And now with 2.5. This means we will flush 2 (as that many are complete), // then 5, and 7. options->ClearSignatureForTesting(); options->set_flush_buffer_limit_bytes(10); server_context()->ComputeSignature(options); FetchFromProxyLoggingFlushes("page.html", true /*success*/, &out); EXPECT_EQ( "<a/><b/>|Flush|<c/><d/><e/>|Flush|<f/><g/>|Flush|<h/>|Flush|", out); // Now 9 bytes, e.g. 2 1/4 of a self-closing tag. Looks almost the same as // every 2 self-closing tags (8 bytes), but we don't get an extra flush // at the end. options->ClearSignatureForTesting(); options->set_flush_buffer_limit_bytes(9); server_context()->ComputeSignature(options); FetchFromProxyLoggingFlushes("page.html", true /*success*/, &out); EXPECT_EQ( "<a/><b/>|Flush|<c/><d/>|Flush|<e/><f/>|Flush|<g/><h/>|Flush|", out); } TEST_F(ProxyInterfaceTest, DontRewriteDisallowedHtml) { // Blacklisted URL should not be rewritten. SetResponseWithDefaultHeaders("blacklist.html", kContentTypeHtml, CssLinkHref("a.css"), kHtmlCacheTimeSec * 2), SetResponseWithDefaultHeaders("a.css", kContentTypeCss, kCssContent, kHtmlCacheTimeSec * 2); GoogleString text; ResponseHeaders headers; FetchFromProxy("blacklist.html", true, &text, &headers); CheckHeaders(headers, kContentTypeHtml); EXPECT_EQ(CssLinkHref("a.css"), text); } TEST_F(ProxyInterfaceTest, DontRewriteDisallowedHtmlRejectMode) { // If we're in reject_blacklisted mode, we should just respond with the // configured status. RejectBlacklisted(); SetResponseWithDefaultHeaders("blacklistCoffee.html", kContentTypeHtml, CssLinkHref("a.css"), kHtmlCacheTimeSec * 2), SetResponseWithDefaultHeaders("tea.html", kContentTypeHtml, "tasty", kHtmlCacheTimeSec * 2); SetResponseWithDefaultHeaders("a.css", kContentTypeCss, kCssContent, kHtmlCacheTimeSec * 2); GoogleString text; ResponseHeaders headers; FetchFromProxy("blacklistCoffee.html", true, &text, &headers); EXPECT_EQ(HttpStatus::kImATeapot, headers.status_code()); EXPECT_TRUE(text.empty()); // Fetching non-blacklisted one works fine. FetchFromProxy("tea.html", true, &text, &headers); EXPECT_EQ(HttpStatus::kOK, headers.status_code()); EXPECT_STREQ("tasty", text); } TEST_F(ProxyInterfaceTest, DontRewriteMislabeledAsHtml) { // Make sure we don't rewrite things that claim to be HTML, but aren't. GoogleString text; ResponseHeaders headers; SetResponseWithDefaultHeaders("page.js", kContentTypeHtml, StrCat("//", CssLinkHref("a.css")), kHtmlCacheTimeSec * 2); SetResponseWithDefaultHeaders("a.css", kContentTypeCss, kCssContent, kHtmlCacheTimeSec * 2); FetchFromProxy("page.js", true, &text, &headers); CheckHeaders(headers, kContentTypeHtml); EXPECT_EQ(StrCat("//", CssLinkHref("a.css")), text); } TEST_F(ProxyInterfaceTest, ReconstructResource) { GoogleString text; ResponseHeaders headers; // Fetching of a rewritten resource we did not just create // after an HTML rewrite. SetResponseWithDefaultHeaders("a.css", kContentTypeCss, kCssContent, kHtmlCacheTimeSec * 2); RequestHeaders request_headers; FetchFromProxy(Encode("", "cf", "0", "a.css", "css"), request_headers, true, /* expect_success */ &text, &headers, false /* proxy_fetch_property_callback_collector_created */); CheckHeaders(headers, kContentTypeCss); headers.ComputeCaching(); CheckBackgroundFetch(headers, false); EXPECT_LE(start_time_ms_ + Timer::kYearMs, headers.CacheExpirationTimeMs()); EXPECT_EQ(kMinimizedCssContent, text); EXPECT_STREQ("cf", AppliedRewriterStringFromLog()); } TEST_F(ProxyInterfaceTest, ReconstructResourceCustomOptions) { const char kCssWithEmbeddedImage[] = "*{background-image:url(%s)}"; const char kBackgroundImage[] = "1.png"; GoogleString text; ResponseHeaders headers; // We're not going to image-compress so we don't need our mock image // to really be an image. SetResponseWithDefaultHeaders(kBackgroundImage, kContentTypePng, "image", kHtmlCacheTimeSec * 2); GoogleString orig_css = StringPrintf(kCssWithEmbeddedImage, kBackgroundImage); SetResponseWithDefaultHeaders("embedded.css", kContentTypeCss, orig_css, kHtmlCacheTimeSec * 2); // By default, cache extension is off in the default options. server_context()->global_options()->SetDefaultRewriteLevel( RewriteOptions::kPassThrough); ASSERT_FALSE(options()->Enabled(RewriteOptions::kExtendCacheCss)); ASSERT_FALSE(options()->Enabled(RewriteOptions::kExtendCacheImages)); ASSERT_FALSE(options()->Enabled(RewriteOptions::kExtendCacheScripts)); ASSERT_FALSE(options()->Enabled(RewriteOptions::kExtendCachePdfs)); ASSERT_EQ(RewriteOptions::kPassThrough, options()->level()); // Because cache-extension was turned off, the image in the CSS file // will not be changed. RequestHeaders request_headers; FetchFromProxy("I.embedded.css.pagespeed.cf.0.css", request_headers, true, /* expect_success */ &text, &headers, false /* proxy_fetch_property_callback_collector_created */); EXPECT_EQ(orig_css, text); // Now turn on cache-extension for custom options. Invalidate cache entries // up to and including the current timestamp and advance by 1ms, otherwise // the previously stored embedded.css.pagespeed.cf.0.css will get re-used. scoped_ptr<RewriteOptions> custom_options(factory()->NewRewriteOptions()); custom_options->EnableFilter(RewriteOptions::kExtendCacheCss); custom_options->EnableFilter(RewriteOptions::kExtendCacheImages); custom_options->EnableFilter(RewriteOptions::kExtendCacheScripts); custom_options->EnableFilter(RewriteOptions::kExtendCachePdfs); custom_options->UpdateCacheInvalidationTimestampMs(timer()->NowMs()); AdvanceTimeUs(Timer::kMsUs); // Inject the custom options into the flow via a RewriteOptionsManager. SetRewriteOptions(custom_options.get()); // Use EncodeNormal because it matches the logic used by ProxyUrlNamer. const GoogleString kExtendedBackgroundImage = EncodeNormal("", "ce", "0", kBackgroundImage, "png"); // Now when we fetch the options, we'll find the image in the CSS // cache-extended. text.clear(); FetchFromProxy("I.embedded.css.pagespeed.cf.0.css", request_headers, true, /* expect_success */ &text, &headers, false /* proxy_fetch_property_callback_collector_created */); EXPECT_EQ(StringPrintf(kCssWithEmbeddedImage, kExtendedBackgroundImage.c_str()), text); } TEST_F(ProxyInterfaceTest, MinResourceTimeZero) { RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->SetRewriteLevel(RewriteOptions::kPassThrough); options->EnableFilter(RewriteOptions::kRewriteCss); options->set_min_resource_cache_time_to_rewrite_ms( kHtmlCacheTimeSec * Timer::kSecondMs); SetRewriteOptions(options); SetResponseWithDefaultHeaders(kPageUrl, kContentTypeHtml, CssLinkHref("a.css"), kHtmlCacheTimeSec * 2); SetResponseWithDefaultHeaders("a.css", kContentTypeCss, kCssContent, kHtmlCacheTimeSec * 2); GoogleString text; ResponseHeaders headers; FetchFromProxy(kPageUrl, true, &text, &headers); EXPECT_EQ(CssLinkHref(Encode("", "cf", "0", "a.css", "css")), text); } TEST_F(ProxyInterfaceTest, MinResourceTimeLarge) { RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->SetRewriteLevel(RewriteOptions::kPassThrough); options->EnableFilter(RewriteOptions::kRewriteCss); options->set_min_resource_cache_time_to_rewrite_ms( 4 * kHtmlCacheTimeSec * Timer::kSecondMs); server_context()->ComputeSignature(options); SetResponseWithDefaultHeaders(kPageUrl, kContentTypeHtml, CssLinkHref("a.css"), kHtmlCacheTimeSec * 2); SetResponseWithDefaultHeaders("a.css", kContentTypeCss, kCssContent, kHtmlCacheTimeSec * 2); GoogleString text; ResponseHeaders headers; FetchFromProxy(kPageUrl, true, &text, &headers); EXPECT_EQ(CssLinkHref("a.css"), text); } TEST_F(ProxyInterfaceTest, CacheRequests) { ResponseHeaders html_headers; DefaultResponseHeaders(kContentTypeHtml, kHtmlCacheTimeSec, &html_headers); SetFetchResponse(AbsolutifyUrl(kPageUrl), html_headers, "1"); ResponseHeaders resource_headers; DefaultResponseHeaders(kContentTypeCss, kHtmlCacheTimeSec, &resource_headers); SetFetchResponse(AbsolutifyUrl("style.css"), resource_headers, "a"); GoogleString text; ResponseHeaders actual_headers; FetchFromProxy(kPageUrl, true, &text, &actual_headers); EXPECT_EQ("1", text); text.clear(); FetchFromProxy("style.css", true, &text, &actual_headers); EXPECT_EQ("a", text); SetFetchResponse(AbsolutifyUrl(kPageUrl), html_headers, "2"); SetFetchResponse(AbsolutifyUrl("style.css"), resource_headers, "b"); // Original response is still cached in both cases, so we do not // fetch the new values. text.clear(); FetchFromProxy(kPageUrl, true, &text, &actual_headers); EXPECT_EQ("1", text); text.clear(); FetchFromProxy("style.css", true, &text, &actual_headers); EXPECT_EQ("a", text); } // Verifies that we proxy uncacheable resources, but do not insert them in the // cache. TEST_F(ProxyInterfaceTest, UncacheableResourcesNotCachedOnProxy) { ResponseHeaders resource_headers; DefaultResponseHeaders(kContentTypeCss, kHtmlCacheTimeSec, &resource_headers); resource_headers.SetDateAndCaching(http_cache()->timer()->NowMs(), 300 * Timer::kSecondMs, ", private"); resource_headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl("style.css"), resource_headers, "a"); ProxyUrlNamer url_namer; server_context()->set_url_namer(&url_namer); ResponseHeaders out_headers; GoogleString out_text; // We should not cache while fetching via kProxyHost. FetchFromProxy( StrCat("http://", ProxyUrlNamer::kProxyHost, "/test.com/test.com/style.css"), true, &out_text, &out_headers); EXPECT_EQ("a", out_text); EXPECT_EQ(0, lru_cache()->num_hits()); EXPECT_EQ(0, http_cache()->cache_hits()->Get()); EXPECT_EQ(2, lru_cache()->num_misses()); // mapping, input resource EXPECT_EQ(1, http_cache()->cache_misses()->Get()); // input resource EXPECT_EQ(0, lru_cache()->num_inserts()); EXPECT_EQ(0, http_cache()->cache_inserts()->Get()); // We should likewise not cache while fetching on the origin domain. out_text.clear(); ClearStats(); FetchFromProxy("style.css", true, &out_text, &out_headers); EXPECT_EQ("a", out_text); EXPECT_EQ(0, lru_cache()->num_hits()); EXPECT_EQ(0, http_cache()->cache_hits()->Get()); EXPECT_EQ(2, lru_cache()->num_misses()); // mapping, input resource EXPECT_EQ(1, http_cache()->cache_misses()->Get()); // input resource EXPECT_EQ(0, lru_cache()->num_inserts()); EXPECT_EQ(0, http_cache()->cache_inserts()->Get()); // Since the original response is not cached, we should pick up changes in the // input resource immediately. SetFetchResponse(AbsolutifyUrl("style.css"), resource_headers, "b"); out_text.clear(); ClearStats(); FetchFromProxy("style.css", true, &out_text, &out_headers); EXPECT_EQ("b", out_text); EXPECT_EQ(0, lru_cache()->num_hits()); EXPECT_EQ(0, http_cache()->cache_hits()->Get()); EXPECT_EQ(2, lru_cache()->num_misses()); // mapping, input resource EXPECT_EQ(1, http_cache()->cache_misses()->Get()); // input resource EXPECT_EQ(0, lru_cache()->num_inserts()); EXPECT_EQ(0, http_cache()->cache_inserts()->Get()); } // Verifies that we retrieve and serve uncacheable resources, but do not insert // them in the cache. TEST_F(ProxyInterfaceTest, UncacheableResourcesNotCachedOnResourceFetch) { ResponseHeaders resource_headers; RequestHeaders request_headers; DefaultResponseHeaders(kContentTypeCss, kHtmlCacheTimeSec, &resource_headers); resource_headers.SetDateAndCaching(http_cache()->timer()->NowMs(), 300 * Timer::kSecondMs, ", private"); resource_headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl("style.css"), resource_headers, "a"); RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->SetRewriteLevel(RewriteOptions::kPassThrough); options->EnableFilter(RewriteOptions::kRewriteCss); server_context()->ComputeSignature(options); ResponseHeaders out_headers; GoogleString out_text; // cf is not on-the-fly, and we can reconstruct it while keeping it private. FetchFromProxy(Encode("", "cf", "0", "style.css", "css"), request_headers, true, /* expect_success */ &out_text, &out_headers, false /* proxy_fetch_property_callback_collector_created */); EXPECT_TRUE(out_headers.HasValue(HttpAttributes::kCacheControl, "private")); EXPECT_EQ("a", out_text); EXPECT_EQ(0, lru_cache()->num_hits()); EXPECT_EQ(0, http_cache()->cache_hits()->Get()); EXPECT_EQ(3, lru_cache()->num_misses()); // 2x output, metadata, input EXPECT_EQ(2, http_cache()->cache_misses()->Get()); // 2x output, input EXPECT_EQ(2, lru_cache()->num_inserts()); // mapping, uncacheable memo EXPECT_EQ(1, http_cache()->cache_inserts()->Get()); // uncacheable memo out_text.clear(); ClearStats(); // ce is on-the-fly, and we can recover even though style.css is private. FetchFromProxy(Encode("", "ce", "0", "style.css", "css"), request_headers, true, /* expect_success */ &out_text, &out_headers, false /* proxy_fetch_property_callback_collector_created */); EXPECT_TRUE(out_headers.HasValue(HttpAttributes::kCacheControl, "private")); EXPECT_EQ("a", out_text); EXPECT_EQ(1, lru_cache()->num_hits()); // input uncacheable memo EXPECT_EQ(0, http_cache()->cache_hits()->Get()); EXPECT_EQ(1, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); // input uncacheable memo EXPECT_EQ(1, lru_cache()->num_inserts()); // mapping EXPECT_EQ(1, lru_cache()->num_identical_reinserts()); // uncacheable memo EXPECT_EQ(1, http_cache()->cache_inserts()->Get()); // uncacheable memo out_text.clear(); ClearStats(); FetchFromProxy(Encode("", "ce", "0", "style.css", "css"), request_headers, true, /* expect_success */ &out_text, &out_headers, false /* proxy_fetch_property_callback_collector_created */); EXPECT_TRUE(out_headers.HasValue(HttpAttributes::kCacheControl, "private")); EXPECT_EQ("a", out_text); EXPECT_EQ(2, lru_cache()->num_hits()); // uncacheable memo & modified check EXPECT_EQ(0, http_cache()->cache_hits()->Get()); EXPECT_EQ(0, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()); // uncacheable memo EXPECT_EQ(0, lru_cache()->num_inserts()); EXPECT_EQ(1, lru_cache()->num_identical_reinserts()) << "uncacheable memo"; EXPECT_EQ(1, http_cache()->cache_inserts()->Get()); // uncacheable memo // Since the original response is not cached, we should pick up changes in the // input resource immediately. SetFetchResponse(AbsolutifyUrl("style.css"), resource_headers, "b"); out_text.clear(); ClearStats(); FetchFromProxy(Encode("", "ce", "0", "style.css", "css"), request_headers, true, /* expect_success */ &out_text, &out_headers, false /* proxy_fetch_property_callback_collector_created */); EXPECT_TRUE(out_headers.HasValue(HttpAttributes::kCacheControl, "private")); EXPECT_EQ("b", out_text); EXPECT_EQ(2, lru_cache()->num_hits()); // uncacheable memo & modified-check EXPECT_EQ(0, http_cache()->cache_hits()->Get()); EXPECT_EQ(0, lru_cache()->num_misses()); EXPECT_EQ(1, http_cache()->cache_misses()->Get()) << "uncacheable memo"; EXPECT_EQ(0, lru_cache()->num_inserts()); EXPECT_EQ(1, lru_cache()->num_identical_reinserts()) << "uncacheable memo"; EXPECT_EQ(1, http_cache()->cache_inserts()->Get()) << "uncacheable memo"; } // No matter what options->respect_vary() is set to we will respect HTML Vary // headers. TEST_F(ProxyInterfaceTest, NoCacheVaryHtml) { RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->set_respect_vary(false); server_context()->ComputeSignature(options); ResponseHeaders html_headers; DefaultResponseHeaders(kContentTypeHtml, kHtmlCacheTimeSec, &html_headers); html_headers.Add(HttpAttributes::kVary, HttpAttributes::kUserAgent); html_headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl(kPageUrl), html_headers, "1"); ResponseHeaders resource_headers; DefaultResponseHeaders(kContentTypeCss, kHtmlCacheTimeSec, &resource_headers); resource_headers.Add(HttpAttributes::kVary, HttpAttributes::kUserAgent); resource_headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl("style.css"), resource_headers, "a"); GoogleString text; ResponseHeaders actual_headers; FetchFromProxy(kPageUrl, true, &text, &actual_headers); EXPECT_EQ("1", text); text.clear(); FetchFromProxy("style.css", true, &text, &actual_headers); EXPECT_EQ("a", text); SetFetchResponse(AbsolutifyUrl(kPageUrl), html_headers, "2"); SetFetchResponse(AbsolutifyUrl("style.css"), resource_headers, "b"); // HTML was not cached because of Vary: User-Agent header. // So we do fetch the new value. text.clear(); FetchFromProxy(kPageUrl, true, &text, &actual_headers); EXPECT_EQ("2", text); // Resource was cached because we have respect_vary == false. // So we serve the old value. text.clear(); FetchFromProxy("style.css", true, &text, &actual_headers); EXPECT_EQ("a", text); } // Test https HTML responses are never cached, while https resources are cached. TEST_F(ProxyInterfaceTest, NoCacheHttpsHtml) { RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->set_respect_vary(false); server_context()->ComputeSignature(options); http_cache()->set_disable_html_caching_on_https(true); ResponseHeaders html_headers(options->ComputeHttpOptions()); DefaultResponseHeaders(kContentTypeHtml, kHtmlCacheTimeSec, &html_headers); html_headers.ComputeCaching(); SetFetchResponse(kHttpsPageUrl, html_headers, "1"); ResponseHeaders resource_headers(options->ComputeHttpOptions()); DefaultResponseHeaders(kContentTypeCss, kHtmlCacheTimeSec, &resource_headers); resource_headers.ComputeCaching(); SetFetchResponse(kHttpsCssUrl, resource_headers, "a"); GoogleString text; ResponseHeaders actual_headers(options->ComputeHttpOptions()); FetchFromProxy(kHttpsPageUrl, true, &text, &actual_headers); EXPECT_EQ("1", text); text.clear(); FetchFromProxy(kHttpsCssUrl, true, &text, &actual_headers); EXPECT_EQ("a", text); SetFetchResponse(kHttpsPageUrl, html_headers, "2"); SetFetchResponse(kHttpsCssUrl, resource_headers, "b"); ClearStats(); // HTML was not cached because it was via https. So we do fetch the new value. text.clear(); FetchFromProxy(kHttpsPageUrl, true, &text, &actual_headers); EXPECT_EQ("2", text); EXPECT_EQ(0, lru_cache()->num_hits()); // Resource was cached, so we serve the old value. text.clear(); FetchFromProxy(kHttpsCssUrl, true, &text, &actual_headers); EXPECT_EQ("a", text); EXPECT_EQ(1, http_cache()->cache_hits()->Get()); } // Respect Vary for resources if options tell us to. TEST_F(ProxyInterfaceTest, NoCacheVaryAll) { RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->set_respect_vary(true); server_context()->ComputeSignature(options); ResponseHeaders html_headers(options->ComputeHttpOptions()); DefaultResponseHeaders(kContentTypeHtml, kHtmlCacheTimeSec, &html_headers); html_headers.Add(HttpAttributes::kVary, HttpAttributes::kUserAgent); html_headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl(kPageUrl), html_headers, "1"); ResponseHeaders resource_headers(options->ComputeHttpOptions()); DefaultResponseHeaders(kContentTypeCss, kHtmlCacheTimeSec, &resource_headers); resource_headers.Add(HttpAttributes::kVary, HttpAttributes::kUserAgent); resource_headers.ComputeCaching(); SetFetchResponse(AbsolutifyUrl("style.css"), resource_headers, "a"); GoogleString text; ResponseHeaders actual_headers(options->ComputeHttpOptions()); FetchFromProxy(kPageUrl, true, &text, &actual_headers); EXPECT_EQ("1", text); text.clear(); FetchFromProxy("style.css", true, &text, &actual_headers); EXPECT_EQ("a", text); SetFetchResponse(AbsolutifyUrl(kPageUrl), html_headers, "2"); SetFetchResponse(AbsolutifyUrl("style.css"), resource_headers, "b"); // Original response was not cached in either case, so we do fetch the // new value. text.clear(); FetchFromProxy(kPageUrl, true, &text, &actual_headers); EXPECT_EQ("2", text); text.clear(); FetchFromProxy("style.css", true, &text, &actual_headers); EXPECT_EQ("b", text); } TEST_F(ProxyInterfaceTest, Blacklist) { const char content[] = "<html>\n" " <head/>\n" " <body>\n" " <script src='tiny_mce.js'></script>\n" " </body>\n" "</html>\n"; SetResponseWithDefaultHeaders("tiny_mce.js", kContentTypeJavascript, "", 100); ValidateNoChanges("blacklist", content); SetResponseWithDefaultHeaders(kPageUrl, kContentTypeHtml, content, 0); GoogleString text_out; ResponseHeaders headers_out; FetchFromProxy(kPageUrl, true, &text_out, &headers_out); EXPECT_STREQ(content, text_out); } TEST_F(ProxyInterfaceTest, RepairMismappedResource) { // Teach the mock fetcher to serve origin content for // "http://test.com/foo.js". const char kContent[] = "function f() {alert('foo');}"; SetResponseWithDefaultHeaders("foo.js", kContentTypeHtml, kContent, kHtmlCacheTimeSec * 2); // Set up a Mock Namer that will mutate output resources to // be served on proxy_host.com, encoding the origin URL. ProxyUrlNamer url_namer; ResponseHeaders headers; GoogleString text; server_context()->set_url_namer(&url_namer); // Now fetch the origin content. This will simply hit the // mock fetcher and always worked. FetchFromProxy("foo.js", true, &text, &headers); EXPECT_EQ(kContent, text); // Now make a weird URL encoding of the origin resource using the // proxy host. This may happen via javascript that detects its // own path and initiates a 'load()' of another js file from the // same path. In this variant, the resource is served from the // "source domain", so it is automatically whitelisted. text.clear(); FetchFromProxy( StrCat("http://", ProxyUrlNamer::kProxyHost, "/test.com/test.com/foo.js"), true, &text, &headers); EXPECT_EQ(kContent, text); // In the next case, the resource is served from a different domain. This // is an open-proxy vulnerability and thus should fail. text.clear(); url_namer.set_authorized(false); FetchFromProxy( StrCat("http://", ProxyUrlNamer::kProxyHost, "/test.com/evil.com/foo.js"), false, &text, &headers); } TEST_F(ProxyInterfaceTest, CrossDomainHeaders) { // If we're serving content from test.com via kProxyHost URL, we need to make // sure that cookies are not propagated, as evil.com could also be potentially // proxied via kProxyHost. const char kText[] = "* { pretty; }"; ResponseHeaders orig_headers; DefaultResponseHeaders(kContentTypeCss, 100, &orig_headers); orig_headers.Add(HttpAttributes::kSetCookie, "tasty"); SetFetchResponse("http://test.com/file.css", orig_headers, kText); ProxyUrlNamer url_namer; server_context()->set_url_namer(&url_namer); ResponseHeaders out_headers; GoogleString out_text; FetchFromProxy( StrCat("http://", ProxyUrlNamer::kProxyHost, "/test.com/test.com/file.css"), true, &out_text, &out_headers); EXPECT_STREQ(kText, out_text); EXPECT_STREQ(NULL, out_headers.Lookup1(HttpAttributes::kSetCookie)); } TEST_F(ProxyInterfaceTest, CrossDomainRedirectIfBlacklisted) { ProxyUrlNamer url_namer; server_context()->set_url_namer(&url_namer); ResponseHeaders out_headers; GoogleString out_text; FetchFromProxy( StrCat("http://", ProxyUrlNamer::kProxyHost, "/test.com/test1.com/blacklist.css"), false, &out_text, &out_headers); EXPECT_STREQ("", out_text); EXPECT_EQ(HttpStatus::kFound, out_headers.status_code()); EXPECT_STREQ("http://test1.com/blacklist.css", out_headers.Lookup1(HttpAttributes::kLocation)); } TEST_F(ProxyInterfaceTest, CrossDomainAuthorization) { // If we're serving content from evil.com via kProxyHostUrl, we need to make // sure we don't propagate through any (non-proxy) authorization headers, as // they may have been cached from good.com (as both would look like // kProxyHost to the browser). ReflectingTestFetcher reflect; server_context()->set_default_system_fetcher(&reflect); ProxyUrlNamer url_namer; server_context()->set_url_namer(&url_namer); RequestHeaders request_headers; request_headers.Add("Was", "Here"); request_headers.Add(HttpAttributes::kAuthorization, "Secret"); request_headers.Add(HttpAttributes::kProxyAuthorization, "OurSecret"); ResponseHeaders out_headers; GoogleString out_text; // Using .txt here so we don't try any AJAX rewriting. FetchFromProxy(StrCat("http://", ProxyUrlNamer::kProxyHost, "/test.com/test.com/file.txt"), request_headers, true, &out_text, &out_headers); EXPECT_STREQ("Here", out_headers.Lookup1("Was")); EXPECT_FALSE(out_headers.Has(HttpAttributes::kAuthorization)); EXPECT_FALSE(out_headers.Has(HttpAttributes::kProxyAuthorization)); mock_scheduler()->AwaitQuiescence(); } TEST_F(ProxyInterfaceTest, CrossDomainHeadersWithUncacheableResourceOnProxy) { // Check that we do not propagate cookies from test.com via kProxyHost URL, // as in CrossDomainHeaders above. Also check that we do propagate cache // control. const char kText[] = "* { pretty; }"; ResponseHeaders orig_headers; DefaultResponseHeaders(kContentTypeCss, 100, &orig_headers); orig_headers.Add(HttpAttributes::kSetCookie, "tasty"); orig_headers.SetDateAndCaching(http_cache()->timer()->NowMs(), 400 * Timer::kSecondMs, ", private"); orig_headers.ComputeCaching(); SetFetchResponse("http://test.com/file.css", orig_headers, kText); ProxyUrlNamer url_namer; server_context()->set_url_namer(&url_namer); ResponseHeaders out_headers; GoogleString out_text; FetchFromProxy( StrCat("http://", ProxyUrlNamer::kProxyHost, "/test.com/test.com/file.css"), true, &out_text, &out_headers); // Check that we ate the cookies. EXPECT_STREQ(kText, out_text); ConstStringStarVector values; out_headers.Lookup(HttpAttributes::kSetCookie, &values); EXPECT_EQ(0, values.size()); // Check that the resource Cache-Control has been preserved. values.clear(); out_headers.Lookup(HttpAttributes::kCacheControl, &values); ASSERT_EQ(2, values.size()); EXPECT_STREQ("max-age=400", *values[0]); EXPECT_STREQ("private", *values[1]); } TEST_F(ProxyInterfaceTest, CrossDomainHeadersWithUncacheableResourceOnFetch) { // Check that we do not propagate cookies from test.com via a resource fetch, // as in CrossDomainHeaders above. Also check that we do propagate cache // control, and that we run the filter specified in the resource fetch URL. // Note that the running of filters at present can only happen if // the filter is on the-fly. const char kText[] = "* { pretty; }"; ResponseHeaders orig_headers; DefaultResponseHeaders(kContentTypeCss, 100, &orig_headers); orig_headers.Add(HttpAttributes::kSetCookie, "tasty"); orig_headers.SetDateAndCaching(http_cache()->timer()->NowMs(), 400 * Timer::kSecondMs, ", private"); orig_headers.ComputeCaching(); SetFetchResponse("http://test.com/file.css", orig_headers, kText); ProxyUrlNamer url_namer; server_context()->set_url_namer(&url_namer); ResponseHeaders out_headers; GoogleString out_text; RequestHeaders request_headers; FetchFromProxy(Encode("", "ce", "0", "file.css", "css"), request_headers, true, &out_text, &out_headers, false); // Check that we passed through the CSS. EXPECT_STREQ(kText, out_text); // Check that we ate the cookies. ConstStringStarVector values; out_headers.Lookup(HttpAttributes::kSetCookie, &values); EXPECT_EQ(0, values.size()); // Check that the resource Cache-Control has been preserved. // max-age actually gets smaller, though, since this also triggers // a rewrite failure. values.clear(); EXPECT_STREQ("max-age=300, private", out_headers.LookupJoined( HttpAttributes::kCacheControl)); } TEST_F(ProxyInterfaceTest, CrossDomainHeadersWithUncacheableResourceOnFetch2) { // Variant of the above with a non-on-the-fly filter. const char kText[] = "* { pretty; }"; ResponseHeaders orig_headers; DefaultResponseHeaders(kContentTypeCss, 100, &orig_headers); orig_headers.Add(HttpAttributes::kSetCookie, "tasty"); orig_headers.SetDateAndCaching(http_cache()->timer()->NowMs(), 400 * Timer::kSecondMs, ", private"); orig_headers.ComputeCaching(); SetFetchResponse("http://test.com/file.css", orig_headers, kText); ProxyUrlNamer url_namer; server_context()->set_url_namer(&url_namer); ResponseHeaders out_headers; GoogleString out_text; RequestHeaders request_headers; FetchFromProxy(Encode("", "cf", "0", "file.css", "css"), request_headers, true, /* expect_success */ &out_text, &out_headers, false /* proxy_fetch_property_callback_collector_created */); // Proper output EXPECT_STREQ("*{pretty}", out_text); // Private. EXPECT_STREQ("max-age=400, private", out_headers.LookupJoined( HttpAttributes::kCacheControl)); // Check that we ate the cookies. EXPECT_FALSE(out_headers.Has(HttpAttributes::kSetCookie)); } TEST_F(ProxyInterfaceTest, ProxyResourceQueryOnly) { // At one point we had a bug where if we optimized a pagespeed resource // whose original name was a bare query, we would loop infinitely when // trying to fetch it from a separate-domain proxy. const char kUrl[] = "?somestuff"; SetResponseWithDefaultHeaders(kUrl, kContentTypeJavascript, "var a = 2;// stuff", kHtmlCacheTimeSec * 2); ProxyUrlNamer url_namer; server_context()->set_url_namer(&url_namer); ResponseHeaders out_headers; GoogleString out_text; RequestHeaders request_headers; FetchFromProxy( StrCat("http://", ProxyUrlNamer::kProxyHost, "/test.com/test.com/", EncodeNormal("", "jm", "0", kUrl, "css")), request_headers, true, /* expect_success */ &out_text, &out_headers, false /* proxy_fetch_property_callback_collector_created */); EXPECT_STREQ("var a=2;", out_text); CheckBackgroundFetch(out_headers, false); } TEST_F(ProxyInterfaceTest, NoRehostIncompatMPS) { // Make sure we don't try to interpret a URL from an incompatible // mod_pagespeed version at our proxy host level. // This url will be rejected by CssUrlEncoder const char kOldName[] = "style.css.pagespeed.cf.0.css"; const char kContent[] = "* {}"; SetResponseWithDefaultHeaders(kOldName, kContentTypeCss, kContent, 100); ProxyUrlNamer url_namer; server_context()->set_url_namer(&url_namer); ResponseHeaders out_headers; GoogleString out_text; RequestHeaders request_headers; FetchFromProxy( StrCat("http://", ProxyUrlNamer::kProxyHost, "/test.com/test.com/", EncodeNormal("", "ce", "0", kOldName, "css")), request_headers, true, /* expect_success */ &out_text, &out_headers, false /* proxy_fetch_property_callback_collector_created */); EXPECT_EQ(HttpStatus::kOK, out_headers.status_code()); EXPECT_STREQ(kContent, out_text); } // Test that we serve "Cache-Control: no-store" only when original page did. TEST_F(ProxyInterfaceTest, NoStore) { RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->set_max_html_cache_time_ms(0); server_context()->ComputeSignature(options); // Most headers get converted to "no-cache, max-age=0". EXPECT_STREQ("max-age=0, no-cache", RewriteHtmlCacheHeader("empty", "")); EXPECT_STREQ("max-age=0, no-cache", RewriteHtmlCacheHeader("private", "private, max-age=100")); EXPECT_STREQ("max-age=0, no-cache", RewriteHtmlCacheHeader("no-cache", "no-cache")); // Headers with "no-store", preserve that header as well. EXPECT_STREQ("max-age=0, no-cache, no-store", RewriteHtmlCacheHeader("no-store", "no-cache, no-store")); EXPECT_STREQ("max-age=0, no-cache, no-store", RewriteHtmlCacheHeader("no-store2", "no-store, max-age=300")); } TEST_F(ProxyInterfaceTest, PropCacheFilter) { RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->DisableFilter(RewriteOptions::kAddHead); server_context()->ComputeSignature(options); CreateFilterCallback create_filter_callback; factory()->AddCreateFilterCallback(&create_filter_callback); EnableDomCohortWritesWithDnsPrefetch(); SetResponseWithDefaultHeaders(kPageUrl, kContentTypeHtml, "<div><p></p></div>", 0); GoogleString text_out; ResponseHeaders headers_out; FetchFromProxy(kPageUrl, true, &text_out, &headers_out); EXPECT_EQ("<!-- --><div><p></p></div>", text_out); FetchFromProxy(kPageUrl, true, &text_out, &headers_out); EXPECT_EQ("<!-- 2 elements unstable --><div><p></p></div>", text_out); // How many refreshes should we require before it's stable? That // tuning can be done in the PropertyCacheTest. For this // system-test just do a hundred blind refreshes and check again for // stability. const int kFetchIterations = 100; for (int i = 0; i < kFetchIterations; ++i) { FetchFromProxy(kPageUrl, true, &text_out, &headers_out); } // Must be stable by now! EXPECT_EQ("<!-- 2 elements stable --><div><p></p></div>", text_out); // In this algorithm we will spend a property-cache-write per fetch. // // We'll also check that we do no cache writes when there are no properties // to save. EXPECT_EQ(2 + kFetchIterations, lru_cache()->num_inserts()); // Now change the HTML and watch the #elements change. SetResponseWithDefaultHeaders(kPageUrl, kContentTypeHtml, "<div><span><p></p></span></div>", 0); FetchFromProxy(kPageUrl, true, &text_out, &headers_out); FetchFromProxy(kPageUrl, true, &text_out, &headers_out); EXPECT_EQ("<!-- 3 elements stable --><div><span><p></p></span></div>", text_out); ClearStats(); // Finally, disable the property-cache and note that the element-count // annotatation reverts to "unknown mode" server_context_->set_enable_property_cache(false); FetchFromProxy(kPageUrl, true, &text_out, &headers_out); EXPECT_EQ("<!-- --><div><span><p></p></span></div>", text_out); } TEST_F(ProxyInterfaceTest, DomCohortWritten) { // Other than the write of DomCohort, there will be no properties added to // the cache in this test because we have not enabled the filter with // CreateFilterCallback create_filter_callback; // factory()->AddCreateFilterCallback(&callback); DisableAjax(); GoogleString text_out; ResponseHeaders headers_out; // No writes should occur if no filter that uses the dom cohort is enabled. FetchFromProxy(kPageUrl, true, &text_out, &headers_out); EXPECT_EQ(0, lru_cache()->num_inserts()); EXPECT_EQ(2, lru_cache()->num_misses()); // 1 property-cache + 1 http-cache // Enable a filter that uses the dom cohort and make sure property cache is // updated. ClearStats(); EnableDomCohortWritesWithDnsPrefetch(); FetchFromProxy(kPageUrl, true, &text_out, &headers_out); EXPECT_EQ(1, lru_cache()->num_inserts()); EXPECT_EQ(2, lru_cache()->num_misses()); // 1 property-cache + 1 http-cache ClearStats(); server_context_->set_enable_property_cache(false); FetchFromProxy(kPageUrl, true, &text_out, &headers_out); EXPECT_EQ(0, lru_cache()->num_inserts()); EXPECT_EQ(1, lru_cache()->num_misses()); // http-cache only. } TEST_F(ProxyInterfaceTest, StatusCodePropertyWritten) { DisableAjax(); EnableDomCohortWritesWithDnsPrefetch(); GoogleString text_out; ResponseHeaders headers_out; // Status code 404 gets written when page is not available. SetFetchResponse404(kPageUrl); FetchFromProxy(kPageUrl, true, &text_out, &headers_out); EXPECT_EQ(HttpStatus::kNotFound, GetStatusCodeInPropertyCache(StrCat(kTestDomain, kPageUrl))); // Status code 200 gets written when page is available. SetResponseWithDefaultHeaders(kPageUrl, kContentTypeHtml, "<html></html>", kHtmlCacheTimeSec); lru_cache()->Clear(); FetchFromProxy(kPageUrl, true, &text_out, &headers_out); EXPECT_EQ(HttpStatus::kOK, GetStatusCodeInPropertyCache(StrCat(kTestDomain, kPageUrl))); // Status code 301 gets written when it is a permanent redirect. headers_out.Clear(); text_out.clear(); headers_out.SetStatusAndReason(HttpStatus::kMovedPermanently); SetFetchResponse(StrCat(kTestDomain, kPageUrl), headers_out, text_out); lru_cache()->Clear(); FetchFromProxy(kPageUrl, true, &text_out, &headers_out); EXPECT_EQ(HttpStatus::kMovedPermanently, GetStatusCodeInPropertyCache(StrCat(kTestDomain, kPageUrl))); } TEST_F(ProxyInterfaceTest, PropCacheNoWritesIfHtmlEndsWithTxt) { CreateFilterCallback create_filter_callback; factory()->AddCreateFilterCallback(&create_filter_callback); // There will be no properties added to the cache set in this test because // we have not enabled the filter with // CreateFilterCallback create_filter_callback; // factory()->AddCreateFilterCallback(&callback); DisableAjax(); SetResponseWithDefaultHeaders("page.txt", kContentTypeHtml, "<div><p></p></div>", 0); GoogleString text_out; ResponseHeaders headers_out; FetchFromProxy("page.txt", true, &text_out, &headers_out); EXPECT_EQ(0, lru_cache()->num_inserts()); EXPECT_EQ(1, lru_cache()->num_misses()); // http-cache only ClearStats(); server_context_->set_enable_property_cache(false); FetchFromProxy("page.txt", true, &text_out, &headers_out); EXPECT_EQ(0, lru_cache()->num_inserts()); EXPECT_EQ(1, lru_cache()->num_misses()); // http-cache only } TEST_F(ProxyInterfaceTest, PropCacheNoWritesForNonGetRequests) { CreateFilterCallback create_filter_callback; factory()->AddCreateFilterCallback(&create_filter_callback); DisableAjax(); SetResponseWithDefaultHeaders("page.txt", kContentTypeHtml, "<div><p></p></div>", 0); GoogleString text_out; ResponseHeaders headers_out; RequestHeaders request_headers; request_headers.set_method(RequestHeaders::kPost); FetchFromProxy("page.txt", true, &text_out, &headers_out); EXPECT_EQ(0, lru_cache()->num_inserts()); EXPECT_EQ(1, lru_cache()->num_misses()); // http-cache only ClearStats(); server_context_->set_enable_property_cache(false); FetchFromProxy("page.txt", true, &text_out, &headers_out); EXPECT_EQ(0, lru_cache()->num_inserts()); EXPECT_EQ(1, lru_cache()->num_misses()); // http-cache only } TEST_F(ProxyInterfaceTest, PropCacheNoWritesIfNonHtmlDelayedCache) { DisableAjax(); TestPropertyCache(kImageFilenameLackingExt, true, false, true); } TEST_F(ProxyInterfaceTest, PropCacheNoWritesIfNonHtmlImmediateCache) { // Tests rewriting a file that turns out to be a jpeg, but lacks an // extension, where the property-cache lookup is delivered immediately. DisableAjax(); TestPropertyCache(kImageFilenameLackingExt, false, false, true); } TEST_F(ProxyInterfaceTest, PropCacheNoWritesIfNonHtmlThreadedCache) { // Tests rewriting a file that turns out to be a jpeg, but lacks an // extension, where the property-cache lookup is delivered in a // separate thread. DisableAjax(); TestPropertyCache(kImageFilenameLackingExt, true, true, true); } TEST_F(ProxyInterfaceTest, StatusCodeUpdateRace) { // Tests rewriting a file that turns out to be a jpeg, but lacks an // extension, where the property-cache lookup is delivered in a // separate thread. Use sync points to ensure that Done() deletes the // collector just after the Detach() critical block is executed. DisableAjax(); TestPropertyCache(kImageFilenameLackingExt, false, true, true); } TEST_F(ProxyInterfaceTest, ThreadedHtml) { // Tests rewriting HTML resource where property-cache lookup is delivered // in a separate thread. DisableAjax(); EnableDomCohortWritesWithDnsPrefetch(); TestPropertyCache(kPageUrl, true, true, true); } TEST_F(ProxyInterfaceTest, ThreadedHtmlFetcherFailure) { // Tests rewriting HTML resource where property-cache lookup is delivered // in a separate thread, but the HTML lookup fails after emitting the // body. DisableAjax(); EnableDomCohortWritesWithDnsPrefetch(); mock_url_fetcher()->SetResponseFailure(AbsolutifyUrl(kPageUrl)); TestPropertyCache(kPageUrl, true, true, false); } TEST_F(ProxyInterfaceTest, HtmlFetcherFailure) { // Tests rewriting HTML resource where property-cache lookup is // delivered in a blocking fashion, and the HTML lookup fails after // emitting the body. DisableAjax(); EnableDomCohortWritesWithDnsPrefetch(); mock_url_fetcher()->SetResponseFailure(AbsolutifyUrl(kPageUrl)); TestPropertyCache(kPageUrl, false, false, false); } TEST_F(ProxyInterfaceTest, HeadersSetupRace) { // // This crash occured where an Idle-callback is used to flush HTML. // In this bug, we were connecting the property-cache callback to // the ProxyFetch and then mutating response-headers. The property-cache // callback was waking up the QueuedWorkerPool::Sequence used by // the ProxyFetch, which was waking up and calling HeadersComplete. // If the implementation of HeadersComplete mutated headers itself, // we'd have a deadly race. // // This test uses the ThreadSynchronizer class to induce the desired // race, with strategically placed calls to Signal and Wait. // // Note that the fix for the race means that one of the Signals does // not occur at all, so we have to declare it as "Sloppy" so the // ThreadSynchronizer class doesn't vomit on destruction. const int kIdleCallbackTimeoutMs = 10; RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->set_idle_flush_time_ms(kIdleCallbackTimeoutMs); options->set_flush_html(true); server_context()->ComputeSignature(options); DisableAjax(); EnableDomCohortWritesWithDnsPrefetch(); ThreadSynchronizer* sync = server_context()->thread_synchronizer(); sync->EnableForPrefix(ProxyFetch::kHeadersSetupRacePrefix); ThreadSystem* thread_system = server_context()->thread_system(); QueuedWorkerPool pool(1, "test", thread_system); QueuedWorkerPool::Sequence* sequence = pool.NewSequence(); WorkerTestBase::SyncPoint sync_point(thread_system); sequence->Add(MakeFunction(static_cast<ProxyInterfaceTestBase*>(this), &ProxyInterfaceTest::TestHeadersSetupRace)); sequence->Add(new WorkerTestBase::NotifyRunFunction(&sync_point)); sync->TimedWait(ProxyFetch::kHeadersSetupRaceAlarmQueued, ProxyFetch::kTestSignalTimeoutMs); { // Trigger the idle-callback, if it has been queued. ScopedMutex lock(mock_scheduler()->mutex()); mock_scheduler()->ProcessAlarmsOrWaitUs( kIdleCallbackTimeoutMs * Timer::kMsUs); } sync->Wait(ProxyFetch::kHeadersSetupRaceDone); sync_point.Wait(); pool.ShutDown(); sync->AllowSloppyTermination(ProxyFetch::kHeadersSetupRaceAlarmQueued); } // TODO(jmarantz): add a test with a simulated slow cache to see what happens // when the rest of the system must block, buffering up incoming HTML text, // waiting for the property-cache lookups to complete. // Test that we set the Experiment cookie up appropriately. TEST_F(ProxyInterfaceTest, ExperimentTest) { RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->set_ga_id("123-455-2341"); options->set_running_experiment(true); NullMessageHandler handler; options->AddExperimentSpec("id=2;enable=extend_cache;percent=100", &handler); server_context()->ComputeSignature(options); SetResponseWithDefaultHeaders("example.jpg", kContentTypeJpeg, "image data", 300); ResponseHeaders headers; const char kContent[] = "<html><head></head><body>A very compelling " "article with an image: <img src=example.jpg></body></html>"; headers.Add(HttpAttributes::kContentType, kContentTypeHtml.mime_type()); headers.SetStatusAndReason(HttpStatus::kOK); SetFetchResponse(AbsolutifyUrl("text.html"), headers, kContent); headers.Clear(); GoogleString text; FetchFromProxy("text.html", true, &text, &headers); // Assign all visitors to an experiment_spec. EXPECT_TRUE(headers.Has(HttpAttributes::kSetCookie)); ConstStringStarVector values; headers.Lookup(HttpAttributes::kSetCookie, &values); bool found = false; for (int i = 0, n = values.size(); i < n; ++i) { if (values[i]->find(experiment::kExperimentCookie) == 0) { found = true; break; } } EXPECT_TRUE(found); // Image cache-extended and including experiment_spec 'a'. EXPECT_TRUE(text.find("example.jpg.pagespeed.a.ce") != GoogleString::npos); headers.Clear(); headers.Add(HttpAttributes::kContentType, kContentTypeHtml.mime_type()); headers.SetStatusAndReason(HttpStatus::kOK); SetFetchResponse(AbsolutifyUrl("text2.html"), headers, kContent); headers.Clear(); text.clear(); RequestHeaders req_headers; req_headers.Add(HttpAttributes::kCookie, "PageSpeedExperiment=2"); FetchFromProxy("text2.html", req_headers, true, &text, &headers); // Visitor already has cookie with id=2; don't give them a new one. EXPECT_FALSE(headers.Has(HttpAttributes::kSetCookie)); // Image cache-extended and including experiment_spec 'a'. EXPECT_TRUE(text.find("example.jpg.pagespeed.a.ce") != GoogleString::npos); // Check that we don't include an experiment_spec index in urls for the "no // experiment" group (id=0). headers.Clear(); headers.Add(HttpAttributes::kContentType, kContentTypeHtml.mime_type()); headers.SetStatusAndReason(HttpStatus::kOK); SetFetchResponse(AbsolutifyUrl("text3.html"), headers, kContent); headers.Clear(); text.clear(); RequestHeaders req_headers2; req_headers2.Add(HttpAttributes::kCookie, "PageSpeedExperiment=0"); FetchFromProxy("text3.html", req_headers2, true, &text, &headers); EXPECT_FALSE(headers.Has(HttpAttributes::kSetCookie)); EXPECT_TRUE(text.find("example.jpg.pagespeed.ce") != GoogleString::npos); } TEST_F(ProxyInterfaceTest, UrlAttributeTest) { RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->EnableFilter(RewriteOptions::kRewriteDomains); options->set_domain_rewrite_hyperlinks(true); NullMessageHandler handler; options->WriteableDomainLawyer()->AddRewriteDomainMapping( "http://dst.example.com", "http://src.example.com", &handler); options->AddUrlValuedAttribute( "span", "src", semantic_type::kHyperlink); options->AddUrlValuedAttribute("hr", "imgsrc", semantic_type::kImage); server_context()->ComputeSignature(options); SetResponseWithDefaultHeaders( "http://src.example.com/null", kContentTypeHtml, "", 0); ResponseHeaders headers; const char kContent[] = "<html><head></head><body>" "<img src=\"http://src.example.com/null\">" "<hr imgsrc=\"http://src.example.com/null\">" "<span src=\"http://src.example.com/null\"></span>" "<other src=\"http://src.example.com/null\"></other></body></html>"; headers.Add(HttpAttributes::kContentType, kContentTypeHtml.mime_type()); headers.SetStatusAndReason(HttpStatus::kOK); SetFetchResponse(AbsolutifyUrl("text.html"), headers, kContent); headers.Clear(); GoogleString text; FetchFromProxy("text.html", true, &text, &headers); // img.src, hr.imgsrc, and span.src are all rewritten EXPECT_TRUE(text.find("<img src=\"http://dst.example.com/null\"") != GoogleString::npos); EXPECT_TRUE(text.find("<hr imgsrc=\"http://dst.example.com/null\"") != GoogleString::npos); EXPECT_TRUE(text.find("<span src=\"http://dst.example.com/null\"") != GoogleString::npos); // other.src not rewritten EXPECT_TRUE(text.find("<other src=\"http://src.example.com/null\"") != GoogleString::npos); } TEST_F(ProxyInterfaceTest, TestFallbackPropertiesUsageWithQueryParams) { GoogleString url("http://www.test.com/a/b.html?withquery=some"); GoogleString fallback_url("http://www.test.com/a/b.html?withquery=different"); TestFallbackPageProperties(url, fallback_url); } TEST_F(ProxyInterfaceTest, TestFallbackPropertiesUsageWithLeafNode) { GoogleString url("http://www.test.com/a/b.html"); GoogleString fallback_url("http://www.test.com/a/c.html"); TestFallbackPageProperties(url, fallback_url); } TEST_F(ProxyInterfaceTest, TestFallbackPropertiesUsageWithLeafNodeHavingTrailingSlash) { GoogleString url("http://www.test.com/a/b/"); GoogleString fallback_url("http://www.test.com/a/c/"); TestFallbackPageProperties(url, fallback_url); } TEST_F(ProxyInterfaceTest, TestNoFallbackCallWithNoLeaf) { GoogleUrl gurl("http://www.test.com/"); options()->set_use_fallback_property_cache_values(true); StringAsyncFetch callback( RequestContext::NewTestRequestContext( server_context()->thread_system())); RequestHeaders request_headers; callback.set_request_headers(&request_headers); scoped_ptr<ProxyFetchPropertyCallbackCollector> callback_collector( proxy_interface_->InitiatePropertyCacheLookup( false, gurl, options(), &callback, false)); PropertyPage* fallback_page = callback_collector->fallback_property_page() ->property_page_with_fallback_values(); // No PropertyPage with fallback values. EXPECT_EQ(NULL, fallback_page); } TEST_F(ProxyInterfaceTest, TestSkipBlinkCohortLookUp) { GoogleUrl gurl("http://www.test.com/"); StringAsyncFetch callback( RequestContext::NewTestRequestContext(server_context()->thread_system())); RequestHeaders request_headers; callback.set_request_headers(&request_headers); scoped_ptr<ProxyFetchPropertyCallbackCollector> callback_collector( proxy_interface_->InitiatePropertyCacheLookup( false, gurl, options(), &callback, false)); // Cache lookup only for dom cohort. EXPECT_EQ(0, lru_cache()->num_hits()); EXPECT_EQ(1, lru_cache()->num_misses()); } TEST_F(ProxyInterfaceTest, TestSkipBlinkCohortLookUpInFallbackPage) { GoogleUrl gurl("http://www.test.com/1.html?a=b"); options()->set_use_fallback_property_cache_values(true); StringAsyncFetch callback( RequestContext::NewTestRequestContext(server_context()->thread_system())); RequestHeaders request_headers; callback.set_request_headers(&request_headers); scoped_ptr<ProxyFetchPropertyCallbackCollector> callback_collector( proxy_interface_->InitiatePropertyCacheLookup( false, gurl, options(), &callback, true)); // Cache lookup for: // dom and blink cohort for actual property page. // dom cohort for fallback property page. EXPECT_EQ(0, lru_cache()->num_hits()); EXPECT_EQ(3, lru_cache()->num_misses()); } TEST_F(ProxyInterfaceTest, BailOutOfParsing) { RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->EnableExtendCacheFilters(); options->set_max_html_parse_bytes(60); options->DisableFilter(RewriteOptions::kAddHead); server_context()->ComputeSignature(options); SetResponseWithDefaultHeaders(StrCat(kTestDomain, "1.jpg"), kContentTypeJpeg, "image", kHtmlCacheTimeSec * 2); // This is larger than 60 bytes. const char kContent[] = "<html><head></head><body>" "<img src=\"1.jpg\">" "<p>Some very long and very boring text</p>" "</body></html>"; SetResponseWithDefaultHeaders(kPageUrl, kContentTypeHtml, kContent, 0); ResponseHeaders headers; GoogleString text; FetchFromProxy(kPageUrl, true, &text, &headers); // For the first request, we bail out of parsing and insert the redirect. We // also update the pcache. EXPECT_STREQ( "<html><script type=\"text/javascript\">" "window.location=\"http://test.com/page.html?PageSpeed=off\";" "</script></html>", text); headers.Clear(); text.clear(); // We look up the pcache and find that we should skip parsing. Hence, we just // pass the bytes through. FetchFromProxy(kPageUrl, true, &text, &headers); EXPECT_EQ(kContent, text); // This is smaller than 60 bytes. const char kNewContent[] = "<html><head></head><body>" "<img src=\"1.jpg\"></body></html>"; SetResponseWithDefaultHeaders(kPageUrl, kContentTypeHtml, kNewContent, 0); headers.Clear(); text.clear(); // We still remember that we should skip parsing. Hence, we pass the bytes // through. However, after this request, we update the pcache to indicate that // we should no longer skip parsing. FetchFromProxy(kPageUrl, true, &text, &headers); EXPECT_EQ(kNewContent, text); headers.Clear(); text.clear(); // This request is rewritten. FetchFromProxy(kPageUrl, true, &text, &headers); EXPECT_EQ("<html><head></head><body>" "<img src=\"1.jpg.pagespeed.ce.0.jpg\">" "</body></html>", text); } TEST_F(ProxyInterfaceTest, LoggingInfoRewriteInfoMaxSize) { RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->set_max_rewrite_info_log_size(10); server_context()->ComputeSignature(options); SetResponseWithDefaultHeaders(StrCat(kTestDomain, "1.jpg"), kContentTypeJpeg, "image", kHtmlCacheTimeSec * 2); GoogleString content = "<html><head></head><body>"; for (int i = 0; i < 50; ++i) { StrAppend(&content, "<img src=\"1.jpg\">"); } StrAppend(&content, "</body></html>"); SetResponseWithDefaultHeaders(kPageUrl, kContentTypeHtml, content, 0); ResponseHeaders headers; GoogleString text; FetchFromProxy(kPageUrl, true, &text, &headers); GoogleString expected_response(content); GlobalReplaceSubstring("1.jpg", "1.jpg.pagespeed.ce.0.jpg", &expected_response); EXPECT_STREQ(expected_response, text); EXPECT_EQ(10, logging_info()->rewriter_info_size()); EXPECT_TRUE(logging_info()->rewriter_info_size_limit_exceeded()); } TEST_F(ProxyInterfaceTest, WebpImageReconstruction) { RewriteOptions* options = server_context()->global_options(); options->ClearSignatureForTesting(); options->EnableFilter(RewriteOptions::kConvertJpegToWebp); server_context()->ComputeSignature(options); AddFileToMockFetcher(StrCat(kTestDomain, "1.jpg"), "Puzzle.jpg", kContentTypeJpeg, 100); ResponseHeaders response_headers; GoogleString text; RequestHeaders request_headers; request_headers.Replace(HttpAttributes::kUserAgent, "webp"); request_headers.Replace(HttpAttributes::kAccept, "image/webp"); const GoogleString kWebpUrl = Encode("", "ic", "0", "1.jpg", "webp"); FetchFromProxy( kWebpUrl, request_headers, true, /* expect_success */ &text, &response_headers, false /* proxy_fetch_property_callback_collector_created */); response_headers.ComputeCaching(); EXPECT_STREQ(kContentTypeWebp.mime_type(), response_headers.Lookup1(HttpAttributes::kContentType)); EXPECT_EQ(ServerContext::kGeneratedMaxAgeMs, response_headers.cache_ttl_ms()); const char kCssWithEmbeddedImage[] = "*{background-image:url(%s)}"; SetResponseWithDefaultHeaders( "embedded.css", kContentTypeCss, StringPrintf(kCssWithEmbeddedImage, "1.jpg"), kHtmlCacheTimeSec * 2); FetchFromProxy(Encode("", "cf", "0", "embedded.css", "css"), request_headers, true, /* expect_success */ &text, &response_headers, false /* proxy_fetch_property_callback_collector_created */); response_headers.ComputeCaching(); EXPECT_EQ(ServerContext::kGeneratedMaxAgeMs, response_headers.cache_ttl_ms()); EXPECT_EQ(StringPrintf(kCssWithEmbeddedImage, kWebpUrl.c_str()), text); } class ProxyInterfaceOriginPropertyPageTest : public ProxyInterfaceTest { protected: class PerOriginPageReaderFilter : public EmptyHtmlFilter { public: explicit PerOriginPageReaderFilter(RewriteDriver* driver) : driver_(driver) {} virtual void StartDocument() { // This keeps a little per-site visits counter in per-origin pcache // and dumps it into a comment. PropertyPage* sitewide_page = driver_->origin_property_page(); const PropertyCache::Cohort* dom_cohort = driver_->server_context()->dom_cohort(); const char kVisits[] = "visits"; PropertyValue* val = sitewide_page->GetProperty(dom_cohort, kVisits); int count = 0; if (val->has_value()) { EXPECT_TRUE(StringToInt(val->value(), &count)); } driver_->InsertComment(StrCat("Site visit:", IntegerToString(count))); // Update counter. sitewide_page->UpdateValue(dom_cohort, kVisits, IntegerToString(count + 1)); sitewide_page->WriteCohort(dom_cohort); } virtual void StartElement(HtmlElement* element) {} virtual void EndDocument() {} virtual const char* Name() const { return "PerOriginPageReaderFilter"; } private: RewriteDriver* driver_; DISALLOW_COPY_AND_ASSIGN(PerOriginPageReaderFilter); }; class PerOriginPageReaderFilterCreator : public TestRewriteDriverFactory::CreateFilterCallback { public: PerOriginPageReaderFilterCreator() {} virtual ~PerOriginPageReaderFilterCreator() {} virtual HtmlFilter* Done(RewriteDriver* driver) { return new PerOriginPageReaderFilter(driver); } private: DISALLOW_COPY_AND_ASSIGN(PerOriginPageReaderFilterCreator); }; virtual void SetUp() { RewriteOptions* options = server_context()->global_options(); // mobilizer turns on the per-domain page. options->ClearSignatureForTesting(); options->EnableFilter(RewriteOptions::kMobilize); ProxyInterfaceTest::SetUp(); } }; TEST_F(ProxyInterfaceOriginPropertyPageTest, Basic) { PerOriginPageReaderFilterCreator filter_creator; factory()->AddCreateFilterCallback(&filter_creator); ResponseHeaders headers; GoogleString body; FetchFromProxy(kPageUrl, true, &body, &headers); EXPECT_TRUE(HasPrefixString(body, "<!--Site visit:0-->")) << body; FetchFromProxy(kPageUrl, true, &body, &headers); EXPECT_TRUE(HasPrefixString(body, "<!--Site visit:1-->")) << body; // Count increases on a different page, too. GoogleString other_page = StrCat("totally/different/from/", kPageUrl); SetResponseWithDefaultHeaders(other_page, kContentTypeHtml, "<div><p></p></div>", 0); FetchFromProxy(other_page, true, &body, &headers); EXPECT_TRUE(HasPrefixString(body, "<!--Site visit:2-->")) << body; } TEST_F(ProxyInterfaceOriginPropertyPageTest, PostWithDelayCache) { // Test for not crashing. PerOriginPageReaderFilterCreator filter_creator; factory()->AddCreateFilterCallback(&filter_creator); RequestHeaders request_headers; ResponseHeaders headers; request_headers.set_method(RequestHeaders::kPost); SetCacheDelayUs(100); FetchFromProxyNoWait(kPageUrl, request_headers, true /*expect_success*/, false /*log_flush*/, &headers); mock_scheduler()->AdvanceTimeUs(200); WaitForFetch(true); } } // namespace net_instaweb
[ "morlovich@google.com" ]
morlovich@google.com
d6cbfb348b772e8586fa595069a7e9a12bf9bb7a
8aa8a0b1a15b5546a65a50487eded2e49621df0a
/createschedule.cpp
fe08b1c810c19826a58f4fa4758ede877c8d1897
[]
no_license
gilgameshAlex/MasterWork
bff53c01118e363d7484bb945284fd7a0f96d9cb
181372b7f04bdff3a8a5cea6a3cf79a9b3113ddb
refs/heads/master
2020-05-25T21:22:14.537780
2017-03-14T22:03:55
2017-03-14T22:03:55
84,970,745
0
0
null
null
null
null
UTF-8
C++
false
false
2,100
cpp
#include "createschedule.h" #include "ui_createschedule.h" #include "genetic.h" #include "ubd_faculty.h" #include "ubdc_ranks.h" CreateSchedule::CreateSchedule(QWidget *parent) : QMainWindow(parent), ui(new Ui::CreateSchedule) { ui->setupUi(this); db = QSqlDatabase::addDatabase("QPSQL"); QSettings settings("GatesB", "MakeMeSchedule"); db.setHostName(settings.value("SETTING/ADDRESS_DB","").toString()); db.setDatabaseName(settings.value("SETTING/NAME_DB","").toString()); db.setUserName(settings.value("SETTING/USER_DB","").toString()); db.setPassword(settings.value("SETTING/PASSWORD_DB","").toString()); db.setPort(settings.value("SETTING/PORT_DB","").toInt()); qDebug() << "CreateSchedule"; } CreateSchedule::~CreateSchedule() { delete ui; } void CreateSchedule::valueChanged() { ui->progressBar->setValue(ui->progressBar->value() + 1); } void CreateSchedule::on_createSchedule_clicked() { if (db.open()) { /*int size; ubd_Faculty *fac = new ubd_Faculty [fac->getQuatityRow()]; fac->downloadFromDB_All(fac); for(int i = 0; i < fac->getQuatityRow(); i++){ fac[i].debugData(); } ubdc_Ranks *rank = new ubdc_Ranks [rank->getQuantityRow()]; rank->downloadFromDB_All(rank); for(int i = 0; i < rank->getQuantityRow(); i++){ rank[i].debugData(); } size = (new ubd_Groups)->getQuantityRow(); ubd_Groups *gro = new ubd_Groups [size]; gro->downloadFromDB_All(gro, 7); for(int i = 0; i < gro->getQuantityRow(); i++){ gro[i].debugData(); }*/ Genetic gena; gena.setSizePopulation(ui->sizePopulation->text().toInt()); gena.setQuatityStudyDays(ui->quantityDay->text().toInt()); ui->progressBar->setValue(0); connect(&gena, SIGNAL(_ChangeValue()), this, SLOT(valueChanged())); gena.StartGenetic(); } else { qDebug() << "Off"; } db.close(); }
[ "hazerot.work@yandex.ru" ]
hazerot.work@yandex.ru
262038c0f6b8250e693213349ee58a6437da9ebe
d8868916e5e7f12ef5c6d1098b97c400a95017c2
/Classes/SureStageLayer.cpp
ea3e9bb2b55f75c37bf7584248fa33bf79aa17d6
[]
no_license
AndyZhou3087/hllm-v1
4bdd3e60e8694fc0dc8dea9ec427d0971aa518c8
1ac419919609e18f9c4034bc97adfbf05d6e4ee4
refs/heads/master
2021-01-22T06:53:47.387811
2017-02-15T07:28:23
2017-02-15T07:28:23
82,029,487
1
0
null
null
null
null
UTF-8
C++
false
false
33,693
cpp
#include "SureStageLayer.h" #include "tinyxml2/tinyxml2.h" #include "GlobalData.h" #include "HintBox.h" #include "MyParticle.h" #include "SoundManager.h" #include "HpBuyLayer.h" #include "FourTypeGift.h" #include "ShopLayer.h" #include "SuccLayer.h" #include "ThemeScene.h" #include "CommonLayer.h" #include "CommonFuncs.h" #include "HttpUtil.h" Label* SureStageLayer::desclbl = NULL; cocos2d::ui::ScrollView* SureStageLayer::scrollview = NULL; bool SureStageLayer::isShowing = false; std::string propdesc[] = { "快速变身:开局随机将5对元件变为同一种元件", "超级炸弹:开局随机将3对元件变成炸弹并消除", "冻结时间:开局冻结时间持续15秒钟" }; SureStageLayer::SureStageLayer() :pNode(NULL) { desclbl = NULL; scrollview = NULL; isShowing = true; for (int i = 0; i < 3; i++) { usenum[i] = useGoldGemNum[i]; } passBtn = NULL; } SureStageLayer::~SureStageLayer() { desclbl = NULL; scrollview = NULL; isShowing = false; } void SureStageLayer::onExit() { Layer::onExit(); } bool SureStageLayer::init() { if (!Layer::init()) { return false; } isClick = false; visibleSize = Director::getInstance()->getVisibleSize(); LayerColor* color = LayerColor::create(Color4B(11, 32, 22, 192)); color->setPosition(Vec2(0,0)); this->addChild(color); cmode = GlobalData::getChallengeMode(); if (cmode == CMBOSS) { pNode = CSLoader::createNode("bosschallenge.csb"); string name; cocos2d::ui::ScrollView* scrollview = (cocos2d::ui::ScrollView*)pNode->getChildByName("ScrollView_1"); int itemwidth = 135; int totalBossCount = GlobalData::getMapCount(); scrollview->setInnerContainerSize(Size(totalBossCount*itemwidth, scrollview->getContentSize().height)); for (int i = 0; i < totalBossCount; i++) { Sprite* dy = Sprite::createWithSpriteFrameName("UI/dy.png"); dy->setPosition(Vec2(60 + i*itemwidth, 60)); scrollview->addChild(dy); string str = StringUtils::format("vsboss%d.png", i + 1); Sprite* vsboss = Sprite::createWithSpriteFrameName(str); vsboss->setPosition(Vec2(60 + i*itemwidth, 110)); vsboss->setScale(0.6f); str = StringUtils::format("vsboss%d", i + 1); scrollview->addChild(vsboss, 1, str); str = StringUtils::format("boss%dhei.png", i + 1); Sprite* bosshei = Sprite::createWithSpriteFrameName(str); bosshei->setPosition(Vec2(60 + i*itemwidth, 110)); bosshei->setScale(0.6f); str = StringUtils::format("boss%dhei", i + 1); scrollview->addChild(bosshei, 1, str); Sprite* pass = Sprite::createWithSpriteFrameName("UI/loginrewardget.png"); pass->setPosition(Vec2(80 + i*itemwidth, 60)); str = StringUtils::format("pass%d", i + 1); scrollview->addChild(pass,1, str); } int passedcount = GlobalData::getBestDefeatedBossCount(); float totalW = scrollview->getInnerContainerSize().width; if (passedcount > 3) { int offset = (passedcount)* itemwidth; float percent = offset*100.0f / totalW; scrollview->scrollToPercentHorizontal(percent, 3.0f, true); } if (passedcount < totalBossCount) { for (int i = passedcount; i < totalBossCount; i++) { name = StringUtils::format("pass%d", i + 1); scrollview->getChildByName(name)->setVisible(false); name = StringUtils::format("vsboss%d", i + 1); scrollview->getChildByName(name)->setVisible(false); } } for (int i = 0; i < passedcount; i++) { name = StringUtils::format("boss%dhei", i + 1); scrollview->getChildByName(name)->setVisible(false); } cocos2d::ui::TextBMFont* bestpassedcountLbl = (cocos2d::ui::TextBMFont*)pNode->getChildByName("bestpassedcount"); bestpassedcountLbl->setString(StringUtils::format("x%d", passedcount)); } else if (cmode == CMCLASIC || cmode == CMFLASH) { pNode = CSLoader::createNode("CMStartLayer.csb"); cocos2d::ui::Widget* hpIcon = (cocos2d::ui::Widget*)pNode->getChildByName("SureStartBtn")->getChildByName("hpicon"); cocos2d::ui::TextBMFont* hpbmLbl = (cocos2d::ui::TextBMFont*)pNode->getChildByName("SureStartBtn")->getChildByName("usehpbmlbl"); cocos2d::ui::Widget* startText = (cocos2d::ui::Widget*)pNode->getChildByName("SureStartBtn")->getChildByName("starttext"); cocos2d::ui::ImageView* title = (cocos2d::ui::ImageView*)pNode->getChildByName("title"); hpIcon->setVisible(true); hpbmLbl->setVisible(true); startText->setVisible(true); if (cmode == CMCLASIC) { if (GlobalData::getCModeCount(CMCLASIC) > 0) { hpbmLbl->setVisible(false); pNode->getChildByName("SureStartBtn")->getChildByName("freetext")->setVisible(true); } } else { std::string str = StringUtils::format("UI/flashtitle.png"); title->loadTexture(str, cocos2d::ui::TextureResType::PLIST); title->setContentSize(Sprite::createWithSpriteFrameName(str)->getContentSize()); if (GlobalData::getCModeCount(CMFLASH) > 0) { hpbmLbl->setVisible(false); pNode->getChildByName("SureStartBtn")->getChildByName("freetext")->setVisible(true); } } } else { pNode = CSLoader::createNode("SureStartLayer.csb"); scrollview = (cocos2d::ui::ScrollView*)pNode->getChildByName("ScrollView"); desclbl = Label::createWithSystemFont(CommonFuncs::gbk2utf("获取数据中!"), FONT_NAME, 25); desclbl->setColor(Color3B(151, 80, 1)); desclbl->setPosition(Vec2(270, 160)); pNode->addChild(desclbl); } pNode->setAnchorPoint(Vec2(0.5f, 0.5f)); pNode->setPosition(Vec2(270, 480)); pNode->setScale(0.1f); pNode->runAction(Speed::create(EaseSineIn::create(ScaleTo::create(0.5f, 1)), 2)); addChild(pNode, 10); SureStart(cmode); int tipsindex[] = { 1, 2, 3, 11, 12, 13 }; int rand_seed = GlobalData::getSystemSecTime(); srand(rand_seed); int tipszise = sizeof(tipsindex) / sizeof(tipsindex[0]); int r = rand() % tipszise; tipsbmlbl = (cocos2d::ui::TextBMFont*)pNode->getChildByName("tipsbmlbl"); tipsbmlbl->setString(tips[tipsindex[r]]); cocos2d::ui::Widget* m_sureCloseBtn = (cocos2d::ui::Widget*)pNode->getChildByName("close"); m_sureCloseBtn->addTouchEventListener(CC_CALLBACK_2(SureStageLayer::close, this)); auto listener = EventListenerTouchOneByOne::create(); listener->onTouchBegan = [=](Touch *touch, Event *event) { return true; }; listener->setSwallowTouches(true); _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); int stage = GlobalData::getPlayingStage() + 1; if (cmode == CMNORMAL && stage % 3 == 0) { if (passBtn != NULL) passBtn->setEnabled(false); m_sureStartBtn->setEnabled(false); this->scheduleOnce(schedule_selector(SureStageLayer::delayShowGift), 0.8f); } return true; } void SureStageLayer::isAnimFinished(float dt) { isShowing = false; } void SureStageLayer::delayShowGift(float dt) { CommonLayer::showGift(1); if (passBtn != NULL) passBtn->setEnabled(true); m_sureStartBtn->setEnabled(true); } void SureStageLayer::onEnterTransitionDidFinish() { if (cmode == CMNORMAL) { this->scheduleOnce(schedule_selector(SureStageLayer::isAnimFinished), 0.5f); int stage = GlobalData::getPlayingStage() + 1; GlobalData::rankData.clear(); string headimgname; for (int i = 1; i <= 3; i++) { headimgname = StringUtils::format("srhead%02d.png", i); std::string fullpath = FileUtils::getInstance()->getWritablePath() + headimgname; bool isHasfile = FileUtils::getInstance()->isFileExist(fullpath); if (isHasfile) FileUtils::getInstance()->removeFile(fullpath); } getStageRankData(stage); } } void SureStageLayer::getStageRankData(int stage) { string url; url.append(HTTPURL); url.append("llk_stageranklist"); url.append("&id="); url.append(GlobalData::getMyID()); url.append("&stage="); std::string stagestr = StringUtils::format("%d", stage); url.append(stagestr); url.append("&cid="); url.append(GlobalData::getCid()); HttpUtil::getInstance()->doData(url, httpCompleteCB); } void SureStageLayer::httpCompleteCB(std::string retdata, int code, std::string tag) { rapidjson::Document doc; if (code == 0) { doc.Parse<0>(retdata.c_str()); if (doc.HasParseError()) //打印解析错误 { //log("GetParseError %s\n", doc.GetParseError()); } else { int myrank = 0; RankData myrankdata; if (doc.IsObject() && doc.HasMember("ret")) { rapidjson::Value& objectData = doc["ret"]; myrank = objectData.GetInt(); myrankdata.rank = myrank; strcpy(myrankdata.name, GlobalData::getMyName().c_str()); strcpy(myrankdata.headimg, GlobalData::getHeadImg().c_str()); GlobalData::rankData.push_back(myrankdata); } if (doc.IsObject() && doc.HasMember("data")) { rapidjson::Value& objectData = doc["data"]; if (objectData.IsObject() && objectData.HasMember("list")) { rapidjson::Value& jsonArray = objectData["list"]; if (jsonArray.IsArray()) { int size = jsonArray.Size(); for (int i = 0; i < size; i++) { rapidjson::Value& arraydoc = jsonArray[i]; RankData rankdata; rankdata.rank = i + 1; rapidjson::Value& jsondata = arraydoc["nickname"]; strcpy(rankdata.name, jsondata.GetString()); jsondata = arraydoc["headportrait"]; strcpy(rankdata.headimg, jsondata.GetString()); jsondata = arraydoc["score"]; rankdata.score = jsondata.GetInt(); GlobalData::rankData.push_back(rankdata); } } } } } } if (GlobalData::rankData.size() > 1) { HttpUtil::getInstance()->doData(GlobalData::rankData[1].headimg, httpDownImgCB, "srhead01.png", HTTPTYPE::GET, "", "1"); } else { if (desclbl != NULL) desclbl->setString(CommonFuncs::gbk2utf("")); } } void SureStageLayer::httpDownImgCB(std::string retdata, int code, std::string tag) { int next = atoi(tag.c_str()) + 1; int size = GlobalData::rankData.size(); if (size - 1 >= next) { string url = GlobalData::rankData[next].headimg; string headfilename = StringUtils::format("srhead%02d.png", next); string tag = StringUtils::format("%d", next); HttpUtil::getInstance()->doData(GlobalData::rankData[next].headimg, httpDownImgCB, headfilename, HTTPTYPE::GET, "", tag); } else { showRankData(); } } void SureStageLayer::showRankData() { if (scrollview == NULL) return; std::string myrankstr; cocos2d::ui::Text* myranktext = (cocos2d::ui::Text*)scrollview->getParent()->getChildByName("myranktext"); int stage = GlobalData::getPlayingStage() + 1; if (GlobalData::rankData.size() > 0 && GlobalData::getstagebestscore(stage) > 0) { myrankstr = StringUtils::format("%d", GlobalData::rankData[0].rank); myranktext->setString(myrankstr); } int size = GlobalData::rankData.size(); if (size > 0) { for (int i = 1; i < size; i++) { SRankItem* item = SRankItem::createWithData(GlobalData::rankData[i], i); item->setPosition(Vec2(72 + 135 * (i - 1), 42)); std::string str = StringUtils::format("item%d", i); if (scrollview != NULL) scrollview->addChild(item, 0, str); } if (desclbl != NULL) desclbl->setString(""); } else { if (desclbl != NULL) desclbl->setString(CommonFuncs::gbk2utf("获取数据失败,请检查网络")); } } void SureStageLayer::SureStart(ChallengeMode mode) { if (mode == CMBOSS) { _useHpCount = 3; int size = GlobalData::mapBossSkillData.size(); for (int i = 0; i < size; i++) { GlobalData::mapBossSkillData[i].tdata.clear(); GlobalData::mapBossSkillData[i].edata.clear(); } parseBossSkillConfig(GlobalData::getXMLDataPath("data/boss/bossskill.xml")); } else if (mode == CMCLASIC) { _useHpCount = CLASICUSEHP; if (GlobalData::getCModeCount(CMCLASIC) > 0) _useHpCount = 0; GlobalData::CPData.clear(); if (GlobalData::CPData.size() <= 0) { parseCPConfig(GlobalData::getXMLDataPath("data/clasic/clasicprop.xml")); } } else if (mode == CMFLASH) { _useHpCount = 3; if (GlobalData::getCModeCount(CMFLASH) > 0) _useHpCount = 0; GlobalData::CPData.clear(); if (GlobalData::CPData.size() <= 0) { parseCPConfig(GlobalData::getXMLDataPath("data/flash/flashprop.xml")); } if (GlobalData::FRuleData.size() <= 0) parseFlashRuleConfig(GlobalData::getXMLDataPath("data/flash/rule.xml")); } else { int chapter = GlobalData::getPlayingStage() / 10; int stage = GlobalData::getPlayingStage() % 10; string filename = StringUtils::format("data/%d-%d-%d.xml", chapter + 1, stage + 1, 1); ReadConfig(GlobalData::getXMLDataPath(filename)); if ((GlobalData::getPlayingStage() + 1) % BOSSSTAGEPOS == 0) { int size = GlobalData::mapBossSkillData.size(); for (int i = 0; i < size; i++) { GlobalData::mapBossSkillData[i].tdata.clear(); GlobalData::mapBossSkillData[i].edata.clear(); } parseBossSkillConfig(GlobalData::getXMLDataPath("data/bossskill.xml")); } passBtn = (cocos2d::ui::Widget*)pNode->getChildByName("passbtn"); passBtn->addTouchEventListener(CC_CALLBACK_2(SureStageLayer::passstage, this)); passBtn->setVisible(GlobalData::getCurStageContinueFailCount() >= 3 ? true : false); string stageStr = StringUtils::format("%d", GlobalData::getPlayingStage() + 1); cocos2d::ui::TextBMFont* stagebmlbl = (cocos2d::ui::TextBMFont*)pNode->getChildByName("surestagebmlbl"); stagebmlbl->setString(stageStr); std::string timeStr = StringUtils::format("%02d:%02d", _timeNum / 60, _timeNum % 60); cocos2d::ui::TextBMFont* timebmlbl = (cocos2d::ui::TextBMFont*)pNode->getChildByName("suretimebmlbl"); timebmlbl->setString(timeStr); } m_sureStartBtn = (cocos2d::ui::Widget*)pNode->getChildByName("SureStartBtn"); m_sureStartBtn->addTouchEventListener(CC_CALLBACK_2(SureStageLayer::start, this)); cocos2d::ui::TextBMFont* hpbmLbl = (cocos2d::ui::TextBMFont*)pNode->getChildByName("SureStartBtn")->getChildByName("usehpbmlbl"); GlobalData::setCurStageUseHp(_useHpCount); string usehpstr = StringUtils::format("x%d", _useHpCount); hpbmLbl->setString(usehpstr); cocos2d::ui::Widget* selectpropNode = (cocos2d::ui::Widget*)pNode->getChildByName("selectpropnode"); std::string str; for (int i = 0; i<3; i++) { str = StringUtils::format("surepropbtn%d",i); propBtn[i] = (cocos2d::ui::Widget*)selectpropNode->getChildByName(str); propBtn[i]->setTag(i); propBtn[i]->addTouchEventListener(CC_CALLBACK_2(SureStageLayer::selectProp, this)); str = StringUtils::format("smallgold_%d", i + 1); goldIcon[i] = (cocos2d::ui::Widget*)selectpropNode->getChildByName(str); str = StringUtils::format("suregoldnumlbl_%d", i + 1); goldNum[i] = (cocos2d::ui::TextBMFont*)selectpropNode->getChildByName(str); std::string numstr = StringUtils::format("x%d", usenum[i]); goldNum[i]->setVisible(true); goldNum[i]->setString(numstr); str = StringUtils::format("startisbuy_%d", i); isbuyText[i] = (cocos2d::ui::Widget*)selectpropNode->getChildByName(str); isbuyText[i]->setVisible(false); str = StringUtils::format("select%d", i); select[i] = (cocos2d::ui::Widget*)selectpropNode->getChildByName(str); if (GlobalData::getIsFirst(mode, i)) { goldIcon[i]->setVisible(false); goldNum[i]->setVisible(false); str = StringUtils::format("freetext_%d", i + 1); freeText[i] = (cocos2d::ui::Widget*)selectpropNode->getChildByName(str); freeText[i]->setVisible(true); } } } int SureStageLayer::ReadConfig(string fileName) { tinyxml2::XMLDocument *pDoc = new tinyxml2::XMLDocument(); unsigned char pBuffer[5000]; memset(pBuffer, 0x00, sizeof(pBuffer)); strcpy((char *)pBuffer, FileUtils::getInstance()->getStringFromFile(fileName).c_str()); int err = pDoc->Parse((const char*)pBuffer); if (err != 0) { delete pDoc; return err; } tinyxml2::XMLElement *rootEle = pDoc->RootElement(); tinyxml2::XMLElement *element = rootEle->FirstChildElement(); if (element != NULL) { if (strcmp(element->Name(), "s") == 0) { _timeNum = element->IntAttribute("t"); _useHpCount = element->IntAttribute("fb"); } } delete pDoc; return 0; } void SureStageLayer::parseFlashRuleConfig(string filepath) { tinyxml2::XMLDocument *pDoc = new tinyxml2::XMLDocument(); unsigned char pBuffer[5000]; memset(pBuffer, 0x00, sizeof(pBuffer)); strcpy((char *)pBuffer, FileUtils::getInstance()->getStringFromFile(filepath).c_str()); int err = pDoc->Parse((const char*)pBuffer); if (err != 0) { delete pDoc; return; } tinyxml2::XMLElement *rootEle = pDoc->RootElement(); tinyxml2::XMLElement *element = rootEle->FirstChildElement(); while (element != NULL) { if (strcmp(element->Name(), "r") == 0) { vector<string> tmp; CommonFuncs::split(element->Attribute("ttime"), tmp, ","); vector<string> tmp2; CommonFuncs::split(element->Attribute("ecount"), tmp2, ","); vector<string> tmp3; CommonFuncs::split(element->Attribute("ele"), tmp3, ","); for (unsigned int i = 0; i < tmp.size(); i++) { FlashRuleData data; data.ttime = atof(tmp[i].c_str()); data.ecount = atoi(tmp2[i].c_str()); data.ele = atoi(tmp3[i].c_str()); data.isdone = false; GlobalData::FRuleData.push_back(data); } } element = element->NextSiblingElement(); } delete pDoc; } void SureStageLayer::parseCPConfig(string filepath) { tinyxml2::XMLDocument *pDoc = new tinyxml2::XMLDocument(); unsigned char pBuffer[5000]; memset(pBuffer, 0x00, sizeof(pBuffer)); strcpy((char *)pBuffer, FileUtils::getInstance()->getStringFromFile(filepath).c_str()); int err = pDoc->Parse((const char*)pBuffer); if (err != 0) { delete pDoc; return; } tinyxml2::XMLElement *rootEle = pDoc->RootElement(); tinyxml2::XMLElement *element = rootEle->FirstChildElement(); while (element != NULL) { if (strcmp(element->Name(), "p") == 0) { vector<string> tmp; CommonFuncs::split(element->Attribute("tcount"), tmp, ","); vector<string> tmp2; CommonFuncs::split(element->Attribute("type"), tmp2, ","); for (unsigned int i = 0; i < tmp.size(); i++) { ClasicPropData cpdata; cpdata.tcount = atoi(tmp[i].c_str()); cpdata.etype = atoi(tmp2[i].c_str()); GlobalData::CPData.push_back(cpdata); } } element = element->NextSiblingElement(); } delete pDoc; } void SureStageLayer::parseBossSkillConfig(string filepath) { tinyxml2::XMLDocument *pDoc = new tinyxml2::XMLDocument(); unsigned char pBuffer[5000]; memset(pBuffer, 0x00, sizeof(pBuffer)); strcpy((char *)pBuffer, FileUtils::getInstance()->getStringFromFile(filepath).c_str()); int err = pDoc->Parse((const char*)pBuffer); if (err != 0) { delete pDoc; return; } tinyxml2::XMLElement *rootEle = pDoc->RootElement(); tinyxml2::XMLElement *element = rootEle->FirstChildElement(); while (element != NULL) { if (strcmp(element->Name(), "s") == 0) { int bid = element->IntAttribute("bid"); vector<string> tmp; CommonFuncs::split(element->Attribute("tcount"), tmp, ","); vector<string> tmp2; CommonFuncs::split(element->Attribute("ecount"), tmp2, ","); int type = element->IntAttribute("type"); GlobalData::mapBossSkillData[bid - 1].id = bid; GlobalData::mapBossSkillData[bid - 1].type = type; for (unsigned int i = 0; i < tmp.size(); i++) GlobalData::mapBossSkillData[bid - 1].tdata.push_back(atoi(tmp[i].c_str())); for (unsigned int i = 0; i < tmp2.size(); i++) GlobalData::mapBossSkillData[bid - 1].edata.push_back(atoi(tmp2[i].c_str())); } element = element->NextSiblingElement(); } delete pDoc; } void SureStageLayer::close(cocos2d::Ref *pSender, cocos2d::ui::Widget::TouchEventType type) { CommonLayer::Action(pSender, type); if (type == ui::Widget::TouchEventType::ENDED) { if (isClick) return; for (int i = 0; i < 3; i++) { if (!propBtn[i]->isBright()) { GlobalData::setGemCount(GlobalData::getGemCount() + usenum[i]); } } if (g_commomLayer != NULL) g_commomLayer->scheduleOnce(schedule_selector(CommonLayer::delayShowNewerGuide), 0.2f); this->removeFromParentAndCleanup(true); } } void SureStageLayer::start(cocos2d::Ref *pSender, cocos2d::ui::Widget::TouchEventType type) { CommonLayer::Action(pSender, type); if (type == ui::Widget::TouchEventType::ENDED) { if (isClick) return; isClick = true; int hpcount = GlobalData::getHpCount(); bool useChange = false; bool useBomb = false; bool useIce = false; if (hpcount >= _useHpCount) { for (int i = 0; i < 3; i++) { if (!propBtn[i]->isBright()) { if (i == 0) { useChange = true; } else if (i == 1) { useBomb = true; } else if (i == 2) { useIce = true; } } } if (useChange) { GlobalData::setIsFirst(cmode, 0, false); Achieve* data = GlobalData::getAchieveDataByID(19); data = GlobalData::getAchieveDataByID(12); if (data->finish != -1) { data->finish ++; GlobalData::SaveAchieveData(); } data = GlobalData::getAchieveDataByID(26);; if (data->finish != -1) { data->finish++; GlobalData::SaveAchieveData(); } } if (useBomb) { GlobalData::setIsFirst(cmode, 1, false); Achieve* data = GlobalData::getAchieveDataByID(19); data = GlobalData::getAchieveDataByID(11); if (data->finish != -1) { data->finish ++; GlobalData::SaveAchieveData(); } data = GlobalData::getAchieveDataByID(26); if (data->finish != -1) { data->finish++; GlobalData::SaveAchieveData(); } data = GlobalData::getTaskDataByID(1); if (data->finish != -1) { data->finish++; GlobalData::SaveTaskData(); } } if (useIce) { GlobalData::setIsFirst(cmode, 2, false); Achieve* data = GlobalData::getAchieveDataByID(10); if (data->finish != -1) { data->finish++; GlobalData::SaveAchieveData(); } data = GlobalData::getAchieveDataByID(26); if (data->finish != -1) { data->finish++; GlobalData::SaveAchieveData(); } data = GlobalData::getTaskDataByID(5); if (data->finish != -1) { data->finish++; GlobalData::SaveTaskData(); } } #ifdef ANALYTICS if (useChange) { JniMethodInfo methodInfo; char p_str[32] = { 0 }; sprintf(p_str, "%s", "change"); if (JniHelper::getStaticMethodInfo(methodInfo, "com/kuxx/hllm/Analysis", "buy", "(Ljava/lang/String;IF)V")) { jstring para1 = methodInfo.env->NewStringUTF(p_str); methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, para1, 1, 0.0f); } sprintf(p_str, "%s", "change"); if (JniHelper::getStaticMethodInfo(methodInfo, "com/kuxx/hllm/Analysis", "use", "(Ljava/lang/String;I)V")) { jstring para1 = methodInfo.env->NewStringUTF(p_str); methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, para1, 1); } sprintf(p_str, "%s", "coin"); if (JniHelper::getStaticMethodInfo(methodInfo, "com/kuxx/hllm/Analysis", "use", "(Ljava/lang/String;I)V")) { jstring para1 = methodInfo.env->NewStringUTF(p_str); methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, para1, 100); } } if (useBomb) { JniMethodInfo methodInfo; char p_str[32] = { 0 }; sprintf(p_str, "%s", "bomb"); if (JniHelper::getStaticMethodInfo(methodInfo, "com/kuxx/hllm/Analysis", "buy", "(Ljava/lang/String;IF)V")) { jstring para1 = methodInfo.env->NewStringUTF(p_str); methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, para1, 1, 0.0f); } sprintf(p_str, "%s", "bomb"); if (JniHelper::getStaticMethodInfo(methodInfo, "com/kuxx/hllm/Analysis", "use", "(Ljava/lang/String;I)V")) { jstring para1 = methodInfo.env->NewStringUTF(p_str); methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, para1, 1); } sprintf(p_str, "%s", "coin"); if (JniHelper::getStaticMethodInfo(methodInfo, "com/kuxx/hllm/Analysis", "use", "(Ljava/lang/String;I)V")) { jstring para1 = methodInfo.env->NewStringUTF(p_str); methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, para1, 200); } } if (useIce) { JniMethodInfo methodInfo; char p_str[32] = { 0 }; sprintf(p_str, "%s", "ice"); if (JniHelper::getStaticMethodInfo(methodInfo, "com/kuxx/hllm/Analysis", "buy", "(Ljava/lang/String;IF)V")) { jstring para1 = methodInfo.env->NewStringUTF(p_str); methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, para1, 1, 20.0f); } sprintf(p_str, "%s", "ice"); if (JniHelper::getStaticMethodInfo(methodInfo, "com/kuxx/hllm/Analysis", "use", "(Ljava/lang/String;I)V")) { jstring para1 = methodInfo.env->NewStringUTF(p_str); methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, para1, 1); } } JniMethodInfo methodInfo; char p_str[32] = { 0 }; sprintf(p_str, "%s", "hp"); if (JniHelper::getStaticMethodInfo(methodInfo, "com/kuxx/hllm/Analysis", "use", "(Ljava/lang/String;I)V")) { jstring para1 = methodInfo.env->NewStringUTF(p_str); methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, para1, _useHpCount); } #endif GlobalData::setIsUseChange(useChange); GlobalData::setIsUseBomb(useBomb); GlobalData::setIsUseIce(useIce); GlobalData::setHpCount(hpcount - _useHpCount); auto sprite = Sprite::createWithSpriteFrameName("UI/hp.png"); sprite->setPosition(Vec2(35, 920)); addChild(sprite, 1000, 90); ccBezierConfig bezierCon; bezierCon.controlPoint_1 = Vec2(270, 700);//控制点1 bezierCon.controlPoint_2 = Vec2(100, 320);//控制点2 bezierCon.endPosition = m_sureStartBtn->getPosition();// 结束位置 ActionInterval * action = BezierTo::create(0.9f, bezierCon); sprite->runAction(Sequence::create(action, CallFunc::create(CC_CALLBACK_0(SureStageLayer::PlaySpecially, this)), NULL)); SoundManager::sharedManager()->playSound(SoundManager::SOUND_ID_USEHP); if (_useHpCount > 0) { Achieve *data = GlobalData::getTaskDataByID(7); if (data->finish != -1) { data->finish += _useHpCount; GlobalData::SaveTaskData(); } } } else { isClick = false; HpBuyLayer::AnimType = A_UPTODOWN; HpBuyLayer* layer = HpBuyLayer::create(); this->addChild(layer, 100); } } } void SureStageLayer::passstage(cocos2d::Ref *pSender, cocos2d::ui::Widget::TouchEventType type) { CommonLayer::Action(pSender, type); if (type == ui::Widget::TouchEventType::ENDED) { passColorLayer = LayerColor::create(Color4B(11, 32, 22, 192)); this->addChild(passColorLayer, 111); passlayernode = CSLoader::createNode("passStageLayer.csb"); this->addChild(passlayernode, 111); auto listener = EventListenerTouchOneByOne::create(); listener->onTouchBegan = [=](Touch *touch, Event *event) { return true; }; listener->setSwallowTouches(true); _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, passlayernode); cocos2d::ui::Widget* passclosebtn = (cocos2d::ui::Widget*)passlayernode->getChildByName("closebtn"); passclosebtn->addTouchEventListener(CC_CALLBACK_2(SureStageLayer::passstage_close, this)); cocos2d::ui::Widget* passokbtn = (cocos2d::ui::Widget*)passlayernode->getChildByName("okbtn"); passokbtn->addTouchEventListener(CC_CALLBACK_2(SureStageLayer::passstage_ok, this)); } } void SureStageLayer::passstage_close(cocos2d::Ref *pSender, cocos2d::ui::Widget::TouchEventType type) { CommonLayer::Action(pSender, type); if (type == ui::Widget::TouchEventType::ENDED) { passColorLayer->removeFromParentAndCleanup(true); passlayernode->removeFromParentAndCleanup(true); } } void SureStageLayer::passstage_ok(cocos2d::Ref *pSender, cocos2d::ui::Widget::TouchEventType type) { CommonLayer::Action(pSender, type); if (type == ui::Widget::TouchEventType::ENDED) { if (GlobalData::getGemCount() >= 50) { GlobalData::setGemCount(GlobalData::getGemCount() - 50); GlobalData::setStageStars(3); SuccLayer::saveData(); if (g_ThemeScene != NULL) g_ThemeScene->showHereMove(GlobalData::getPlayingStage() + 1); for (int i = 0; i < 3; i++) { if (!propBtn[i]->isBright()) { GlobalData::setGemCount(GlobalData::getGemCount() + usenum[i]); } } this->removeFromParentAndCleanup(true); } else { FourTypeGift::AnimType = A_UPTODOWN; FourTypeGift::_type = GEMGIFT; FourTypeGift* giftLayer = FourTypeGift::create(); Director::getInstance()->getRunningScene()->addChild(giftLayer, 0, "giftlayer"); } } } void SureStageLayer::ReplaceScene(float t) { GlobalData::setCModeYearOfDay(cmode, GlobalData::getDayOfYear()); GlobalData::setCModeCount(cmode, GlobalData::getCModeCount(cmode) - 1); this->removeFromParentAndCleanup(true); Director::getInstance()->replaceScene(GameScene::scene()); } void SureStageLayer::PlaySpecially() { removeChildByTag(90); MyParticle::Show(this, SpeciallyName[0], m_sureStartBtn->getPositionX(), m_sureStartBtn->getPositionY(), false, 0.3f, 350); MyParticle::Show(this, SpeciallyName[1], m_sureStartBtn->getPositionX(), m_sureStartBtn->getPositionY(), true, 0.3f, 350); scheduleOnce(schedule_selector(SureStageLayer::ReplaceScene), 1); } void SureStageLayer::selectProp(cocos2d::Ref *pSender, cocos2d::ui::Widget::TouchEventType type) { CommonLayer::Action(pSender, type); Node* sender = (Node*)pSender; int index = sender->getTag(); if (type == ui::Widget::TouchEventType::ENDED) { selectindex = index; propBtn[index]->setBright(!propBtn[index]->isBright()); if (propBtn[index]->isBright()) { GlobalData::setGemCount(GlobalData::getGemCount() + usenum[index]); select[index]->stopAllActions(); select[index]->setRotation(0); select[index]->setVisible(false); tipsbmlbl->setString(CommonFuncs::gbk2utf(tips[0].c_str())); } else { if (GlobalData::getIsFirst(cmode, index)) { usenum[index] = 0; } else if (GlobalData::getGemCount() < usenum[index]) { propBtn[index]->setBright(!propBtn[index]->isBright()); HintBox* hint = HintBox::create("钻石不足", 1); addChild(hint, 1000); return; } GlobalData::setGemCount(GlobalData::getGemCount() - usenum[index]); this->scheduleOnce(schedule_selector(SureStageLayer::delayShowSelectAnim), 0.1f); tipsbmlbl->setString(CommonFuncs::gbk2utf(propdesc[index].c_str())); } if (GlobalData::getIsFirst(cmode, index)) { goldIcon[index]->setVisible(false); goldNum[index]->setVisible(false); isbuyText[index]->setVisible(false); freeText[index]->setVisible(true); } else { goldIcon[index]->setVisible(propBtn[index]->isBright()); goldNum[index]->setVisible(propBtn[index]->isBright()); isbuyText[index]->setVisible(!goldNum[index]->isVisible()); } } else if (type == ui::Widget::TouchEventType::BEGAN) { select[index]->setVisible(false); } } void SureStageLayer::delayShowSelectAnim(float dt) { select[selectindex]->setVisible(true); select[selectindex]->runAction(RepeatForever::create(RotateTo::create(4, 720))); } SRankItem::SRankItem() { head = NULL; } SRankItem::~SRankItem() { head = NULL; } SRankItem* SRankItem::createWithData(RankData data, int index) { SRankItem* item = new SRankItem; item->init(data, index); item->autorelease(); return item; } bool SRankItem::init(RankData data, int index) { if (Sprite::initWithSpriteFrameName("UI/stagerankitem.png")) { Label * mname = Label::createWithSystemFont(data.name, FONT_NAME, 13); mname->setWidth(65); mname->setColor(Color3B(41, 60, 1)); mname->setAnchorPoint(Vec2(0, 0.5)); mname->setPosition(Vec2(65, 62)); addChild(mname); Sprite* sepline= Sprite::createWithSpriteFrameName("UI/stageranksep.png"); sepline->setPosition(Vec2(this->getContentSize().width - sepline->getContentSize().width / 2, this->getContentSize().height / 2 + 5)); addChild(sepline); std::string str = StringUtils::format("%d", data.score); for (int i = (int)str.length() - 3; i > 0; i -= 3) str.insert(i, ","); Label * score = Label::createWithSystemFont(str, FONT_NAME, 18); score->setColor(Color3B(41, 60, 1)); score->setAnchorPoint(Vec2(0, 0.5)); score->setPosition(Vec2(65, 30)); addChild(score); if (index > 0) { if (data.score == GlobalData::rankData[index - 1].score) data.rank = GlobalData::rankData[index - 1].rank; } if (index > 0) { std::string rankstr = StringUtils::format("%d", data.rank); Label* ranklbl = Label::createWithBMFont("fonts/slvnum.fnt", rankstr); ranklbl->setAnchorPoint(Vec2(0, 0.5)); ranklbl->setPosition(0, this->getContentSize().height - 8); addChild(ranklbl,1); upataheadimg(index); } } return true; } void SRankItem::upataheadimg(int index) { if (head == NULL) { head = Sprite::createWithSpriteFrameName("UI/settinghead.png"); head->setScale(0.8f); head->setPosition(Vec2(33, this->getContentSize().height / 2 + 4)); this->addChild(head); } std::string headimgname = StringUtils::format("srhead%02d.png", index); std::string path = FileUtils::getInstance()->getWritablePath() + headimgname; bool isHasfile = FileUtils::getInstance()->isFileExist(path); if (isHasfile) { Data filedata = FileUtils::getInstance()->getDataFromFile(path.c_str()); if (!filedata.isNull()) { Image* img = new Image; img->initWithImageData(filedata.getBytes(), filedata.getSize()); Texture2D* texture = new cocos2d::Texture2D(); bool isImg = texture->initWithImage(img); if (isImg) { head->setTexture(texture); int w = img->getWidth(); int h = img->getHeight(); head->setTextureRect(Rect(0, 0, w, h)); head->setScaleX(60.0f / w); head->setScaleY(60.0f / h); texture->release(); } img->release(); } } }
[ "jian zhou" ]
jian zhou
422fa567b2819b96f54682eed637a419a55fb70b
b4e41c5247c9b0beaaafa0174b62a1a122a80db1
/UVA/11586-TrainTracks.cpp
655b263bc2f49196b01a7194c29d333a0ba1f9c4
[]
no_license
DarkNacho/ICPC-Problems
c3cd32d4b2e85c73fcc6f9196bf3b5118737f131
220b841e2462aa9964c00021fd278eaa567ce50d
refs/heads/master
2020-05-15T09:47:56.894298
2019-04-19T04:26:04
2019-04-19T04:26:04
182,183,292
0
0
null
null
null
null
UTF-8
C++
false
false
527
cpp
#include <iostream> #include <string> int main(void) { int n; std::cin >> n; int m,f; std::string line; while(std::getline(std::cin, line)) { m=0;f=0; for(int i=0; i<line.length(); i=i+3) { if(line[i] == 'M') ++m; else ++f; if(line[i+1] == 'M') ++m; else ++f; } //std::cout << line << "\t" << m << "\t" <<f << std::endl; if(m || f) std::cout << (m==f && m>1 && f>1? "LOOP" : "NO LOOP") << std::endl; } }
[ "dark_nacho_xd@hotmail.cl" ]
dark_nacho_xd@hotmail.cl
6d2873241c34739d8a0d115121f4f4a4a47c9f87
65e3391b6afbef10ec9429ca4b43a26b5cf480af
/TRD/TRDbase/AliTRDCalDCSGTUSegment.h
942c2d2085f59ce3b315efad260b7b65c14e9a7f
[]
permissive
alisw/AliRoot
c0976f7105ae1e3d107dfe93578f819473b2b83f
d3f86386afbaac9f8b8658da6710eed2bdee977f
refs/heads/master
2023-08-03T11:15:54.211198
2023-07-28T12:39:57
2023-07-28T12:39:57
53,312,169
61
299
BSD-3-Clause
2023-07-28T13:19:50
2016-03-07T09:20:12
C++
UTF-8
C++
false
false
5,454
h
#ifndef ALITRDCALDCSGTUSEGMENT_H #define ALITRDCALDCSGTUSEGMENT_H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /* $Id: AliTRDCalDCSGTUSegment.h 18952 2007-06-08 11:36:12Z cblume $ */ /////////////////////////////////////////////////////////////////////////////// // // // TRD calibration class for TRD GTU configuration parameters // // // /////////////////////////////////////////////////////////////////////////////// #include "TNamed.h" class TString; class TObjArray; class AliTRDCalDCSGTUBoardInfo; class AliTRDCalDCSGTUSegment : public TNamed { public: AliTRDCalDCSGTUSegment(); AliTRDCalDCSGTUSegment(const char *name, const char *title); AliTRDCalDCSGTUSegment(const AliTRDCalDCSGTUSegment &); AliTRDCalDCSGTUSegment& operator=(const AliTRDCalDCSGTUSegment& sh); virtual ~AliTRDCalDCSGTUSegment() { }; Int_t GetId() const { return fId; } Int_t GetFromRunNumber() const { return fFromRunNumber; } Int_t GetFromSORFlag() const { return fFromSORFlag; } Int_t GetFromChild() const { return fChild; } void SetId(Int_t id) { fId = id; } void SetFromRunNumber(Int_t rn) { fFromRunNumber = rn; } void SetFromSORFlag(Int_t fg) { fFromSORFlag = fg; } void SetFromChild(Int_t ch) { fChild = ch; } TObjArray* GetTmuArray() const { return fTmuArr; } void SetTmuArray(TObjArray * const ta) { fTmuArr = ta; } TString GetSmuStackMask() const { return fSmuStackMask; } Int_t GetSmuTracklets() const { return fSmuTracklets; } Int_t GetSmuTracks() const { return fSmuTracks; } Int_t GetSmuIdelay() const { return fSmuIdelay; } Int_t GetSmuTriggerWindowL1Low() const { return fSmuTriggerWindowL1Low; } Int_t GetSmuTriggerWindowL1High() const { return fSmuTriggerWindowL1High; } Int_t GetSmuTriggerWindowL2Low() const { return fSmuTriggerWindowL2Low; } Int_t GetSmuTriggerWindowL2High() const { return fSmuTriggerWindowL2High; } Int_t GetSmuTtcEmulatorEnable() const { return fSmuTtcEmulatorEnable; } void SetSmuStackMask(TString sm) { fSmuStackMask = sm; } void SetSmuTracklets(Int_t ts) { fSmuTracklets = ts; } void SetSmuTracks(Int_t tk) { fSmuTracks = tk; } void SetSmuIdelay(Int_t id) { fSmuIdelay = id; } void SetSmuTriggerWindowL1Low(Int_t ll) { fSmuTriggerWindowL1Low = ll; } void SetSmuTriggerWindowL1High(Int_t lh) { fSmuTriggerWindowL1High = lh; } void SetSmuTriggerWindowL2Low(Int_t ml) { fSmuTriggerWindowL2Low = ml; } void SetSmuTriggerWindowL2High(Int_t mh) { fSmuTriggerWindowL2High = mh; } void SetSmuTtcEmulatorEnable(Int_t te) { fSmuTtcEmulatorEnable = te; } AliTRDCalDCSGTUBoardInfo* GetSmuBoardInfo() const { return fSmuBoardInfo; } void SetSmuBoardInfo(AliTRDCalDCSGTUBoardInfo * const bi) { fSmuBoardInfo = bi; } protected: Int_t fId; // this is the number of the segment Int_t fFromRunNumber; // this is the run number from when this configuration data was saved Int_t fFromSORFlag; // this indicates when the data was saved (1 = start of run and 2 = end) Int_t fChild; // this comes from the value of the child attribute of the tag named from TObjArray *fTmuArr; // an array of objects holding the segment's tmu information TString fSmuStackMask; // value of the attribute named value within the stackmask tag Int_t fSmuTracklets; // value of the attribute named send within the tracklets tag Int_t fSmuTracks; // value of the attribute named send within the tracklets tag Int_t fSmuIdelay; // value of the attribute named value within the idelay tag Int_t fSmuTriggerWindowL1Low; // value of the attribute named l1_low within the trigger_window tag Int_t fSmuTriggerWindowL1High; // value of the attribute named l1_high within the trigger_window tag Int_t fSmuTriggerWindowL2Low; // value of the attribute named l2_low within the trigger_window tag Int_t fSmuTriggerWindowL2High; // value of the attribute named l2_high within the trigger_window tag Int_t fSmuTtcEmulatorEnable; // value of the attribute named enable within the ttc_emulator tag AliTRDCalDCSGTUBoardInfo *fSmuBoardInfo; // the boardinfo for the smu ClassDef(AliTRDCalDCSGTUSegment,1) // TRD calibration class for TRD GTU parameters }; #endif
[ "cblume@f7af4fe6-9843-0410-8265-dc069ae4e863" ]
cblume@f7af4fe6-9843-0410-8265-dc069ae4e863
65a97e3cd559c39fa9fce6a4b0f992edd03e1ae5
08b8cf38e1936e8cec27f84af0d3727321cec9c4
/data/crawl/git/old_hunk_3484.cpp
1eeadccaaf0878a914831a0966e207395e5a76a1
[]
no_license
ccdxc/logSurvey
eaf28e9c2d6307140b17986d5c05106d1fd8e943
6b80226e1667c1e0760ab39160893ee19b0e9fb1
refs/heads/master
2022-01-07T21:31:55.446839
2018-04-21T14:12:43
2018-04-21T14:12:43
null
0
0
null
null
null
null
UTF-8
C++
false
false
173
cpp
our_head_points_at = remote_head_points_at; } else { warning(_("You appear to have cloned an empty repository.")); mapped_refs = NULL; our_head_points_at = NULL;
[ "993273596@qq.com" ]
993273596@qq.com
9f0ed969e53be05243693e0e2b307512d591fb5c
e5ece75db7c75eaa6accc9a80ed2075978b06eea
/Bundles/LeafSimu/echoEdSimu/include/echoEdSimu/SProbePosition.hpp
f07a8df6220ae6c6dfa1eba9a2c82d97928cdd76
[]
no_license
schweitzer/fw4spl-ar
eeb45f2a7b10488c4a7c78fe13a0f501fa46e355
e1ea73c71684e071a83bb07db3d63a79e0ab8d7a
refs/heads/fw4spl_0.11.0
2020-06-22T07:22:26.218643
2016-11-02T16:28:43
2016-11-02T16:28:43
74,599,111
1
0
null
2016-11-23T17:25:39
2016-11-23T17:25:39
null
UTF-8
C++
false
false
2,241
hpp
/* ***** BEGIN LICENSE BLOCK ***** * FW4SPL - Copyright (C) IRCAD, 2014-2016. * Distributed under the terms of the GNU Lesser General Public License (LGPL) as * published by the Free Software Foundation. * ****** END LICENSE BLOCK ****** */ #ifndef __ECHOEDSIMU_SPROBEPOSITION_HPP__ #define __ECHOEDSIMU_SPROBEPOSITION_HPP__ #include "echoEdSimu/config.hpp" #include <arServices/ISimulator.hpp> #include <fwCom/Signal.hpp> #include <fwCom/Signals.hpp> #include <fwData/TransformationMatrix3D.hpp> namespace echoEdSimu { /** * @brief Generate (i,j) indices from the projection of translation of a transformation matrix on a imaginary plane. * * The scale of the image is hardcoded and match the size of the physical plane used in the demo of echo101 during * the Hacking Health Camp 2015. */ class ECHOEDSIMU_CLASS_API SProbePosition : public ::arServices::ISimulator { public: fwCoreServiceClassDefinitionsMacro ( (SProbePosition)(::arServices::ISimulator) ); ECHOEDSIMU_API static const ::fwCom::Signals::SignalKeyType s_POSITION_MODIFIED_SIG; typedef ::fwCom::Signal<void (int,int)> PositionModifiedSignalType; /// Constructor. ECHOEDSIMU_API SProbePosition() throw(); /// Destructor. Does nothing ECHOEDSIMU_API virtual ~SProbePosition() throw(); protected: /** * @brief method description: * @code{.xml} <service uid="SProbePositionInstance" impl="::echoEdSimu::SProbePosition" type="::arServices::ISimulator" /> @endcode */ ECHOEDSIMU_API virtual void configuring() throw ( ::fwTools::Failed ); /// Do nothing. ECHOEDSIMU_API virtual void starting() throw ( ::fwTools::Failed ); /// Do nothing. ECHOEDSIMU_API virtual void stopping() throw ( ::fwTools::Failed ); /// Generate the indices (i,j) corresponding to the translation of the matrix. ECHOEDSIMU_API virtual void updating() throw ( ::fwTools::Failed ); private: /// Key of the matrix in the composite std::string m_matrixKey; /// Matrix ::fwData::TransformationMatrix3D::sptr m_matrix; /// Signal position change PositionModifiedSignalType::sptr m_sigPositionChanged; }; } // echoEdSimu #endif // __ECHOEDSIMU_SPROBEPOSITION_HPP__
[ "fbridault@ircad.fr" ]
fbridault@ircad.fr
7765121dc956f8d61a2e8c5430ae657edd0d7abd
d535bb728f490011643df7c726ff61fb3369594f
/src/cpp/main.cpp
8ccc5474c5832e73d1eeb8645fa8493efe2d5818
[ "MIT" ]
permissive
pkoretic/HeliVolt
c0bd314425727112eb8c4979ac29112523e2cc73
81d3f4cef7ee8875586c94229414160a28e8bd8d
refs/heads/master
2023-08-28T07:40:47.542644
2018-10-21T13:44:19
2018-10-21T13:44:19
76,195,630
3
1
null
null
null
null
UTF-8
C++
false
false
751
cpp
#include <QGuiApplication> #include <QQmlApplicationEngine> #include <QQmlContext> #include <QQuickStyle> #include "platform.h" int main(int argc, char *argv[]) { QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication app(argc, argv); QQmlApplicationEngine engine; Platform platform(&engine); // expose C++ classes to QML engine.rootContext()->setContextProperty("__platform", &platform); // load main file engine.load(QUrl(QLatin1String("qrc:/qml/loader.qml"))); // set debug mode as QML property #ifdef DEBUG engine.rootObjects().first()->setProperty("_DEBUG_MODE", true); #else engine.rootObjects().first()->setProperty("_DEBUG_MODE", false); #endif return app.exec(); }
[ "petar.koretic@gmail.com" ]
petar.koretic@gmail.com
d8247f8a1553edca478f938246a1e3a7ff9f4220
baaaaea93a277f95f8f1652d8bbf3da07d2b0f54
/inference-engine/tests/functional/shared_test_classes/src/subgraph/convert_pad_to_group_conv.cpp
027d2c7fb8b6318f78750151e2532d50c5c62465
[ "Apache-2.0" ]
permissive
Drizshko/openvino
7c0fa3449dd2f3b10b6972842a1fdf1b696a9cd5
a6989bb0471d734ed0ea207fbae7f357fc60aa2d
refs/heads/master
2023-03-09T09:14:58.390464
2021-02-22T16:03:23
2021-02-22T16:03:23
267,969,920
0
0
Apache-2.0
2020-05-29T22:50:51
2020-05-29T22:50:50
null
UTF-8
C++
false
false
2,015
cpp
// Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include "shared_test_classes/subgraph/convert_pad_to_group_conv.hpp" namespace SubgraphTestsDefinitions { std::string ConvertPadToConvTests::getTestCaseName(const testing::TestParamInfo<PadParams> &obj) { ngraph::Shape input_shape; std::string targetName; std::vector<int64_t> pad_begin, pad_end; ngraph::op::PadMode mode; float value; std::tie(input_shape, pad_begin, pad_end, value, mode, targetName) = obj.param; std::ostringstream results; results << "Input" << CommonTestUtils::vec2str(input_shape); results << "PadBegin" << CommonTestUtils::vec2str(pad_begin); results << "PadEnd" << CommonTestUtils::vec2str(pad_end); results << "Value" << value; results << "Mode" << mode; results << "targetDevice=" << targetName << "_"; return results.str(); } void ConvertPadToConvTests::SetUp() { ngraph::Shape input_shape; std::vector<int64_t> pad_begin, pad_end; ngraph::op::PadMode mode; float value; std::tie(input_shape, pad_begin, pad_end, value, mode, targetDevice) = this->GetParam(); { auto param = std::make_shared<ngraph::opset4::Parameter>(ngraph::element::f32, input_shape); auto pad = std::make_shared<ngraph::opset4::Pad>(param, ngraph::opset4::Constant::create(ngraph::element::i64, ngraph::Shape{pad_begin.size()}, pad_begin), ngraph::opset4::Constant::create(ngraph::element::i64, ngraph::Shape{pad_end.size()}, pad_end), ngraph::opset4::Constant::create(ngraph::element::f32, ngraph::Shape{}, {value}), mode); auto relu = std::make_shared<ngraph::opset4::Relu>(pad); function = std::make_shared<ngraph::Function>(ngraph::OutputVector{relu}, ngraph::ParameterVector{param}, "pad"); } } } // namespace SubgraphTestsDefinitions
[ "noreply@github.com" ]
noreply@github.com
7719a895d9a9a41153dc8f1d82bd3537b43f8889
73ee941896043f9b3e2ab40028d24ddd202f695f
/external/chromium_org/chrome/browser/ui/autofill/new_credit_card_bubble_controller.h
2b7f6d901c65642ee5e67dc23e5442c9bf757c57
[ "BSD-3-Clause" ]
permissive
CyFI-Lab-Public/RetroScope
d441ea28b33aceeb9888c330a54b033cd7d48b05
276b5b03d63f49235db74f2c501057abb9e79d89
refs/heads/master
2022-04-08T23:11:44.482107
2016-09-22T20:15:43
2016-09-22T20:15:43
58,890,600
5
3
null
null
null
null
UTF-8
C++
false
false
4,599
h
// Copyright 2013 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 CHROME_BROWSER_UI_AUTOFILL_NEW_CREDIT_CARD_BUBBLE_CONTROLLER_H_ #define CHROME_BROWSER_UI_AUTOFILL_NEW_CREDIT_CARD_BUBBLE_CONTROLLER_H_ #include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/strings/string16.h" #include "ui/gfx/image/image.h" class Profile; namespace autofill { class NewCreditCardBubbleView; class AutofillProfile; class CreditCard; // A simple wrapper that contains descriptive information about a credit card // that should be shown in the content of the bubble. struct CreditCardDescription { CreditCardDescription(); ~CreditCardDescription(); // The icon of the credit card issuer (i.e. Visa, Mastercard). gfx::Image icon; // The display name of the card. Shown next to the icon. base::string16 name; // A longer description of the card being shown in the bubble. base::string16 description; }; //////////////////////////////////////////////////////////////////////////////// // // NewCreditCardBubbleController // // A class to control showing/hiding a bubble after saved a new card in Chrome. // Here's a visual reference to what this bubble looks like: // // @----------------------------------------@ // | Bubble title text | // | | // | [ Card icon ] Card name | // | Card description that will probably | // | also span multiple lines. | // | | // | Learn more link | // @----------------------------------------@ // //////////////////////////////////////////////////////////////////////////////// class NewCreditCardBubbleController { public: virtual ~NewCreditCardBubbleController(); // Show a bubble informing the user that new credit card data has been saved. // This bubble points to the settings menu. Ownership of |new_card| // and |billing_profile| are transferred by this call. static void Show(Profile* profile, scoped_ptr<CreditCard> new_card, scoped_ptr<AutofillProfile> billing_profile); // The bubble's title text. const base::string16& TitleText() const; // A card description to show in the bubble. const CreditCardDescription& CardDescription() const; // The text of the link shown at the bubble of the bubble. const base::string16& LinkText() const; // Called when |bubble_| is destroyed. void OnBubbleDestroyed(); // Called when the link at the bottom of the bubble is clicked. void OnLinkClicked(); // Returns the profile this bubble is associated with. Profile* profile() { return profile_; } protected: // Create a bubble attached to |profile|. explicit NewCreditCardBubbleController(Profile* profile); // Creates and returns an Autofill credit card bubble. Exposed for testing. virtual base::WeakPtr<NewCreditCardBubbleView> CreateBubble(); // Returns a weak reference to |bubble_|. May be invalid/NULL. virtual base::WeakPtr<NewCreditCardBubbleView> bubble(); // Show a bubble notifying the user that new credit card data has been saved. // Exposed for testing. virtual void SetupAndShow(scoped_ptr<CreditCard> new_card, scoped_ptr<AutofillProfile> billing_profile); private: // Hides |bubble_| if it exists. void Hide(); // The profile this bubble is associated with. Profile* const profile_; // The newly saved credit card and assocated billing information. scoped_ptr<CreditCard> new_card_; scoped_ptr<AutofillProfile> billing_profile_; // The title text of the bubble. const base::string16 title_text_; // The bubble's link text. const base::string16 link_text_; // Strings and descriptions that are generated based on |new_card_| and // |billing_profile_|. struct CreditCardDescription card_desc_; // A bubble view that's created by calling either |Show*()| method; owned by // the native widget/hierarchy, not this class (though this class must outlive // |bubble_|). NULL in many cases. base::WeakPtr<NewCreditCardBubbleView> bubble_; // A weak pointer factory for |Create()|. base::WeakPtrFactory<NewCreditCardBubbleController> weak_ptr_factory_; DISALLOW_COPY_AND_ASSIGN(NewCreditCardBubbleController); }; } // namespace autofill #endif // CHROME_BROWSER_UI_AUTOFILL_NEW_CREDIT_CARD_BUBBLE_CONTROLLER_H_
[ "ProjectRetroScope@gmail.com" ]
ProjectRetroScope@gmail.com
0386a7077a9e19ebc0e2208c08a166cf83d6ae08
c5b0e08053a942c5b708f6538e91e199af7032c0
/src/pgsaconfig.cpp
6dd9d64cb14f6b1229d00445c28a0a4e8126dd8a
[]
no_license
kowallus/PgSA
5deae9330d44f4349ca9fd5f30ddb2d361f9863e
f2ebf2a66143376bf53a61b371598fc041657449
refs/heads/master
2022-06-17T02:31:12.030972
2022-05-27T07:17:59
2022-05-27T07:17:59
30,666,968
4
4
null
null
null
null
UTF-8
C++
false
false
647
cpp
#include "pseudogenome/persistence/PseudoGenomePersistence.h" #include "suffixarray/persistence/SuffixArrayPersistence.h" #include "index/cache/persistence/CountQueriesCachePersistence.h" namespace PgSAIndex { const string PseudoGenomeBase::PSEUDOGENOME_FILE_SUFFIX = ".pgen"; const string PseudoGenomeHeader::PSEUDOGENOME_HEADER = "PGEN"; const string SuffixArrayBase::PGSA_FILE_SUFFIX = ".pgsa"; const string SuffixArrayHeader::PGSA_HEADER = "PgSA"; const string CountQueriesCacheBase::CACHE_FILE_SUFFIX = ".pgc"; const string CountQueriesCacheHeader::CACHE_HEADER = "PgCache"; }
[ "kowallus@o2.pl" ]
kowallus@o2.pl
34ed9f5a63c3a14ee0ffe5aa8c0a01e7752a36b4
77dfdb5f38d5fb496f844b28f56e806e847ed470
/wireframe/drawingarea.cpp
da2a80beead62a8335eafa8d94b1e44447f1a231
[]
no_license
synchro10/graphics
2feb7f9d29f2ab62a767bca24b1b915c5167abc5
a4bba25c34b72d5e849b2fa8febc3bc417cc8734
refs/heads/master
2020-12-02T06:40:06.192799
2017-07-11T09:32:00
2017-07-11T09:32:00
96,874,762
0
0
null
2017-07-11T09:25:00
2017-07-11T09:17:14
C++
UTF-8
C++
false
false
1,235
cpp
#include "drawingarea.h" DrawingArea::DrawingArea(QWidget *parent) : QWidget(parent) { setFixedSize(width, height); image = QSharedPointer<QImage>(new QImage(width, height, QImage::Format_RGB32)); } void DrawingArea::paintEvent(QPaintEvent *event) { QPainter painter(this); QRect dirtyRect = event->rect(); painter.drawImage(dirtyRect, *image.data(), dirtyRect); } void DrawingArea::setBufferImage(const QSharedPointer<QImage> &value) { bufferImage = value; } void DrawingArea::getFrame(const QSharedPointer<QImage> &value) { setBufferImage(value); image.swap(bufferImage); update(); } int DrawingArea::getHeight() const { return height; } void DrawingArea::setHeight(int value) { height = value; } void DrawingArea::mouseMoveEvent(QMouseEvent *e) { // if (e->buttons() == Qt::RightButton){ emit(mouseMove(*e)); // } } void DrawingArea::wheelEvent(QWheelEvent *event) { emit(wheelMove(*event)); } void DrawingArea::mousePressEvent(QMouseEvent *event) { // if (event->buttons() == Qt::RightButton){ emit(mousePress(*event)); // } } int DrawingArea::getWidth() const { return width; } void DrawingArea::setWidth(int value) { width = value; }
[ "mmvb1000@gmail.com" ]
mmvb1000@gmail.com
a8c2ffd0082901cfebb1c20d2a097e148995fb0e
ce420020aa4bcbbc562c55db16804e6f10013aef
/1028_Hanoi_Tower_Sequence.cpp
710dad68e1a59141d343896056de8265f2a3a7f6
[]
no_license
pbking1/cplusplus--algorithm
b0cfba3fd8d5e9fd7cba0a7d745219de69f925d6
c6fbae99d77e3af6a433e9ae6a42885f9fb54bec
refs/heads/master
2020-03-30T15:44:39.755972
2014-01-08T12:51:46
2014-01-08T12:51:46
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,885
cpp
///* //【题目大意】 //汉诺塔,将其移动的每一步的盘号列出作为序列,求第p步需要移动的盘的盘号 //序列如下:1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1.... //【解决方案】 //输入的p将达到10^100,使用string接收 //注意每个case之间要多一个空行 //1、移动盘子的规律:把前n-1个盘子移到二号柱子,移动n号盘,然后再移动前n-1个盘到三好柱子即可 //移动一个盘子要1步,移动k(k>1)个盘子要f(k)=f(k-1)+1+f(k-1)=2^k-1步 //也即在序列中,当p=2^k时,f(p)=k+1,并且这是k+1号盘子的第一次出现; //2、直观上看,如果某一位数字是k,那么它的前2^(k-1)-1个数和后2^(k-1)-1个数是一样的 //3、根据第二条,对于某个p,如果2^k < p < 2(k+1),那么f(p)和f(p-2^k)是相等的 //这里如果根据二进制来看:把p化成二进制数,假设现在p里有超过1个位为1,设最高位为k, //则在2^k步前和2^k步后对称,因此第p步移的盘子与第p-2^k步移的盘子一样。 //4、根据第三条,一直往前循环,从二进制的角度看,p排在高位的1一个个被减掉,直到p里只有1个位为1, //设此时p=2^m,对应的二进制数是1后面跟着m个0,则此步移动的是第m+1个盘子。 //直观上看,这是第m+1号盘子的第一次移动(结合第一条),而这个m+1就是我们想要的结果 //5、可以得知:如果p1=11010101011101010110111000,根据第三条,可以一直往前追朔到p2=1000,并且f(p1)=f(p2) // 从第一条我们可以知道f(p1)=f(p2)=f(2^3)=3+1=4 //6、由以上可得:对于p,如果其二进制表示时结尾0的数量为m,那么第p位就是m+1, //我们知道,一个整数除以2时表现为二进制右移一位, //所以:对于p,求得其可整除2的次数m,即可得结果为m+1 //7、于是这一题就变成了吃果果的大数求余了。 #include<iostream> #include<string> using namespace std; //大数求模 inline int Mod(const string& a, const int& b){ int result = 0; for(int i = 0; i < a.length(); i++){ int num = result * 10 + (a[i] - '0'); result = num % b; } return result; } //大数除法 inline string Div(const string& a, const int& b){ int buf = 0; string result = ""; for(int i = 0; i < a.length(); i++){ int num = buf * 10 + (a[i] - '0'); buf = num % b; result += (num/b + '0'); //可以肯定只有一位所以可以直接用这种方法得到char } return result; } int compute(string num){ int result = 1; while(1){ if(Mod(num, 2) == 0){ result++; num = Div(num, 2); }else{ return result; } } } int main(){ int cases; cin>>cases; int m = cases; string num; while(cases--){ cin>>num; if(m - cases != 1) cout<<endl; cout<<"Case "<<m - cases<<": "<<compute(num)<<endl; } return 0; }
[ "731849410@qq.com" ]
731849410@qq.com
f8dcd7999b6c8f9995f4d525551a6760d6bb6663
e123e12e7bfab0c21903bb6713650f92cfda32b3
/qrenderdoc/Windows/EventBrowser.h
fd82abb12a9eda76db0e74878783279d727bafae
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
Velro/renderdoc
6f4c2e2ab66601ed4055f0bf211b473cb0799dd8
682af9aa24e30dcfffce0845581a1b9806090d8c
refs/heads/master
2020-05-29T11:46:45.744492
2017-07-21T04:49:27
2017-07-21T04:49:27
67,476,436
1
0
null
2016-09-06T05:32:26
2016-09-06T05:32:25
null
UTF-8
C++
false
false
4,933
h
/****************************************************************************** * The MIT License (MIT) * * Copyright (c) 2016-2017 Baldur Karlsson * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. ******************************************************************************/ #pragma once #include <QFrame> #include <QIcon> #include "Code/CaptureContext.h" namespace Ui { class EventBrowser; } class QSpacerItem; class QToolButton; class RDTreeWidgetItem; class QTimer; class QTextStream; class FlowLayout; struct EventItemTag; class EventBrowser : public QFrame, public IEventBrowser, public ILogViewer { private: Q_OBJECT Q_PROPERTY(QVariant persistData READ persistData WRITE setPersistData DESIGNABLE false SCRIPTABLE false) public: explicit EventBrowser(ICaptureContext &ctx, QWidget *parent = 0); ~EventBrowser(); // IEventBrowser QWidget *Widget() override { return this; } void UpdateDurationColumn() override; // ILogViewerForm void OnLogfileLoaded() override; void OnLogfileClosed() override; void OnSelectedEventChanged(uint32_t eventID) override {} void OnEventChanged(uint32_t eventID) override; QVariant persistData(); void setPersistData(const QVariant &persistData); private slots: // automatic slots void on_find_clicked(); void on_gotoEID_clicked(); void on_timeDraws_clicked(); void on_bookmark_clicked(); void on_HideFindJump(); void on_jumpToEID_returnPressed(); void on_findEvent_returnPressed(); void on_findEvent_keyPress(QKeyEvent *event); void on_findEvent_textEdited(const QString &arg1); void on_events_currentItemChanged(RDTreeWidgetItem *current, RDTreeWidgetItem *previous); void on_findNext_clicked(); void on_findPrev_clicked(); void on_stepNext_clicked(); void on_stepPrev_clicked(); void on_exportDraws_clicked(); void on_colSelect_clicked(); // manual slots void findHighlight_timeout(); void events_keyPress(QKeyEvent *event); void events_contextMenu(const QPoint &pos); public slots: void clearBookmarks(); bool hasBookmark(uint32_t EID); void toggleBookmark(uint32_t EID); void jumpToBookmark(int idx); private: QPair<uint32_t, uint32_t> AddDrawcalls(RDTreeWidgetItem *parent, const rdctype::array<DrawcallDescription> &draws); void SetDrawcallTimes(RDTreeWidgetItem *node, const rdctype::array<CounterResult> &results); void ExpandNode(RDTreeWidgetItem *node); bool FindEventNode(RDTreeWidgetItem *&found, RDTreeWidgetItem *parent, uint32_t eventID); bool SelectEvent(uint32_t eventID); void ClearFindIcons(RDTreeWidgetItem *parent); void ClearFindIcons(); int SetFindIcons(RDTreeWidgetItem *parent, QString filter); int SetFindIcons(QString filter); void highlightBookmarks(); bool hasBookmark(RDTreeWidgetItem *node); RDTreeWidgetItem *FindNode(RDTreeWidgetItem *parent, QString filter, uint32_t after); int FindEvent(RDTreeWidgetItem *parent, QString filter, uint32_t after, bool forward); int FindEvent(QString filter, uint32_t after, bool forward); void Find(bool forward); QString GetExportDrawcallString(int indent, bool firstchild, const DrawcallDescription &drawcall); double GetDrawTime(const DrawcallDescription &drawcall); void GetMaxNameLength(int &maxNameLength, int indent, bool firstchild, const DrawcallDescription &drawcall); void ExportDrawcall(QTextStream &writer, int maxNameLength, int indent, bool firstchild, const DrawcallDescription &drawcall); TimeUnit m_TimeUnit = TimeUnit::Count; rdctype::array<CounterResult> m_Times; QTimer *m_FindHighlight; FlowLayout *m_BookmarkStripLayout; QSpacerItem *m_BookmarkSpacer; QList<int> m_Bookmarks; QList<QToolButton *> m_BookmarkButtons; void RefreshIcon(RDTreeWidgetItem *item, EventItemTag tag); Ui::EventBrowser *ui; ICaptureContext &m_Ctx; };
[ "baldurk@baldurk.org" ]
baldurk@baldurk.org
9fc1201f25f9791f024c50b589cb7124e1dbdf42
f29c1696ed88c9241a1598fbfd2968fb0e90685a
/src/emitter/pointer_serialization.cpp
e481b649bb5a24b7df059f1f6176f92eb8e34347
[ "BSD-3-Clause" ]
permissive
OasisUnofficial/keyedge
3ca5f8456d419bfcf0bb3987e608fc65be03c864
10c62883d92127e345ee5a151a9cab018cceab86
refs/heads/master
2022-03-24T08:17:11.594529
2019-12-18T07:36:44
2019-12-18T07:36:44
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,852
cpp
#include "index.h" std::string emit_serialize_pointer(const std::string& name, const std::string& serialized_name, std::shared_ptr<pointer_information> type, size_t indent) { std::string data_name = std::string("__keyedge_pointer_data_") + std::to_string(indent); return emit( "if ($(NAME)) {\n" "\t$(POINTEE_FLATCC_REFERENCE) $(DATA_NAME);\n" "\t$(SERIALIZE_POINTEE)\n" "\t$(SERIALIZED_NAME) = $(FLATCC_PREFIX)_create(&builder, 0, $(DATA_NAME));\n" "} else {\n" "\t$(FLATCC_PREFIX)_start(&builder);\n" "\t$(FLATCC_PREFIX)___is_null_add(&builder, 1);\n" "\t$(SERIALIZED_NAME) = $(FLATCC_PREFIX)_end(&builder);\n" "}", { {"$(NAME)", name}, {"$(POINTEE_FLATCC_REFERENCE)", (*type -> type) -> flatcc_reference()}, {"$(DATA_NAME)", data_name}, {"$(SERIALIZE_POINTEE)", emit_serialize(emit("(*$(NAME))", {{"$(NAME)", name}}), data_name, *type -> type, indent + 1)}, {"$(SERIALIZED_NAME)", serialized_name}, {"$(FLATCC_PREFIX)", type -> flatcc_prefix()} }, indent); } std::string emit_deserialize_pointer(const std::string& name, const std::string& serialized_name, std::shared_ptr<pointer_information> type, size_t indent) { return emit( "if ($(FLATCC_PREFIX)___is_null($(SERIALIZED_NAME))) {\n" "\t$(NAME) = 0;\n" "} else {\n" "\t$(NAME) = ($(TYPE)) malloc(sizeof($(POINTEE_TYPE)));\n" "\t$(DESERIALIZE_POINTEE)\n" "}", { {"$(FLATCC_PREFIX)", type -> flatcc_prefix()}, {"$(SERIALIZED_NAME)", serialized_name}, {"$(NAME)", name}, {"$(TYPE)", type -> str()}, {"$(POINTEE_TYPE)", (*type -> type) -> str()}, {"$(DESERIALIZE_POINTEE)", emit_deserialize(emit("(*$(NAME))", {{"$(NAME)", name}}), emit("$(FLATCC_PREFIX)___data($(SERIALIZED_NAME))", {{"$(FLATCC_PREFIX)", type -> flatcc_prefix()}, {"$(SERIALIZED_NAME)", serialized_name}}), *type -> type, indent + 1)} }, indent); }
[ "Nisiyama_Suzune@icloud.com" ]
Nisiyama_Suzune@icloud.com
654a50f57c6ec570aaabef4f529aa4df6069c655
1843f6ec459b8eae4d5c663e02c369e203f818c9
/d912pxy/d912pxy_pso_item.h
a1c2700a7dd55aabe561b463cc6669d9ccb0fecb
[ "MIT", "LicenseRef-scancode-public-domain" ]
permissive
cssoz3/d912pxy
abd57fe0fab7db3850202bedb7fe89289368d32c
8bc386e1ae48df5a258620727738c0f3140f28f3
refs/heads/master
2023-02-11T00:53:14.535985
2021-01-11T14:28:31
2021-01-11T14:28:31
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,085
h
/* MIT License Copyright(c) 2018-2020 megai2 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions : The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #pragma once #include "stdafx.h" class d912pxy_pso_item : public d912pxy_vtable, public d912pxy_comhandler { public: static d912pxy_pso_item* d912pxy_pso_item_com(d912pxy_trimmed_pso_desc* sDsc); ~d912pxy_pso_item(); void Compile(); void MarkPushedToCompile(); bool RetryDerivedPresence(); void DerivedCompile(); void PSOCompile(); char* GetDerivedName() { return derivedName; } ID3D12PipelineState* GetPtr(); static size_t GetTotalPendingItems(); private: void CreatePSO(D3D12_GRAPHICS_PIPELINE_STATE_DESC& fullDesc); void CreatePSODerived(char* alias, D3D12_GRAPHICS_PIPELINE_STATE_DESC& fullDesc); void RealtimeIntegrityCheck(D3D12_GRAPHICS_PIPELINE_STATE_DESC& fullDesc); char* GetDerivedNameByAlias(char* alias); bool RCELinkDerivedCSO(d912pxy_mem_block* src, char* alias); bool RCECompileDerivedCSO(d912pxy_mem_block* src, char* derivedName); bool RCEIsDerivedPresent(char* derivedName); //RCE part that work with HLSL code bool PerformRCE(char* alias, D3D12_GRAPHICS_PIPELINE_STATE_DESC& fullDesc); void RCELoadIOBlock(char* source, const char* marker, char** out, UINT& outCnt); void RCEUpdateVSInputByVDecl(char* source, D3D12_GRAPHICS_PIPELINE_STATE_DESC& fullDesc); void RCEUpdateIOBlock(char* source, const char* marker, char** data, UINT elements); void RCEFilterUnusedRegs(char** ioBlock, UINT elements); void RCEFixIOBlocksOrdering(char** vsOut, char** psIn, UINT vsOutCnt, UINT psInCnt); void RCEApplyPCFSampler(char* source, UINT stage); void AfterCompileRelease(); bool ValidateFullDesc(D3D12_GRAPHICS_PIPELINE_STATE_DESC& fullDesc); d912pxy_pso_item(d912pxy_trimmed_pso_desc* inDesc); //MT transfers void MT_DerivedCompile(); void MT_PSOCompile(); std::atomic<ID3D12PipelineState*> psoPtr; D3D12_GRAPHICS_PIPELINE_STATE_DESC* dx12Desc; d912pxy_trimmed_pso_desc* desc; d912pxy_mem_block HLSLsource[2]; char derivedAlias[255]; char* derivedName = nullptr; bool fallbacktoNonDerived = false; static std::atomic<size_t> itemsInCompile; };
[ "megai2@ya.ru" ]
megai2@ya.ru
b7a9f83b37a9ea9b8077f653712d79ee33564643
4aa7f00d6ea5dd3b60d14a8c31ccc34ac53eeb49
/CodeC2/TrongTin_C2_Bai11.cpp
aae43d02acdd57b665267d90b3ac5cd9607f7dea
[]
no_license
hieu-ln/IT82-09
6ed0a85184f534e73ab4d80d72f6b1d9bf3c88a0
5d228b06bf2df5110992cab02e88ce5802aa4492
refs/heads/master
2020-06-11T06:49:04.696956
2019-08-16T18:12:15
2019-08-16T18:12:15
193,881,207
1
1
null
null
null
null
UTF-8
C++
false
false
1,653
cpp
//Project: C2_Bai11.cpp #include <iostream> using namespace std; struct node { int info; node *link; }; node *front, *rear; void init() { front = NULL; rear = NULL; } void push(int x) { node *p; p = new node; p -> info = x; p -> link = NULL; if(rear == NULL) front = p; else rear -> link = p; rear = p; } int pop( int &x) { if (front != NULL) { node *p = front; x = p -> info; front = front -> link; if (front == NULL) rear = NULL; delete p; return 1; } return 0; } int isempty() { if (front == NULL) return 1; return 0; } void xuat() { node *p; p = front; while (p != NULL) { cout << p -> info << endl; p = p -> link; } } int main() { int x,t,chon; char tt; do{ cout << "\nNhap chon:\n" << "1. Khoi tao\n" << "2. Kiem tra rong\n" << "3. Them 1 phan tu\n" << "4. Xoa 1 phan tu\n" << "5. Xuat danh sach\n" << "Chon: "; cin >> chon; switch(chon) { case 1: init(); cout << "Khoi tao danh sach thanh cong\n"; break; case 2: if (isempty() != 0) cout << "Danh sach rong\n"; else cout << "Danh sach khong rong\n"; break; case 3: cout << "Nhap gia tri muon them: "; cin >> x; push(x); cout << "Them thanh cong!\n"; break; case 4: t = pop(x); if (t != 0) cout << "Phan tu lay ra co gia tri la "<<x<<"\n"; else cout << "queue rong!\n"; break; case 5: cout << "Danh sach cua queue:\n"; xuat(); break; default: cout << "Gia tri chon khong hop le!\n"; break; } cout << "Ban muon tiep tuc khong(Y/N):"; cin >> tt; } while(tt =='y'|| tt =='Y'); return 0; }
[ "1851050148tin@ou.edu.vn" ]
1851050148tin@ou.edu.vn
f6983b2262b534a4e6c1a8f8516c9f53d2def280
267e68d92a23361eec4eb63c30951550d90e1c54
/agent/mmstore_base.hpp
05b02df3e4d9874db7383bcaf1d9e1bf4fe6fb59
[]
no_license
yangacer/agent
dff36833daa96750bdee3af0eae0d123354cc4e7
22e6eabfbf58369b9c97c70faed2b2b42e07ca4e
refs/heads/master
2021-01-10T01:22:03.397720
2013-08-25T06:01:19
2013-08-25T06:01:19
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,213
hpp
#ifndef AGENT_MMSTORE_IMPL_HPP_ #define AGENT_MMSTORE_IMPL_HPP_ #include <string> #include <boost/asio/io_service.hpp> #include <boost/enable_shared_from_this.hpp> #include "agent/mmstore.hpp" class mmstore_impl : public boost::enable_shared_from_this<mmstore_impl> { public: typedef mmtore::handle_type handle_type; typedef mmstore::offset_type offset_type; typedef mmstore::size_type size_type; typedef mmstore::handler_type handler_type; boost::asio::io_service &io_service(); void configure(size_type page_number = 128 << 20, size_type page_size = 64 << 10); void destroy(); handle create(std::string const &path, size_type size=0); handle import(std::string const &path); void del(std::string const &path); void async_map(handle_type handle, offset_type offset, handler_type handler); void async_commit(handle_type handle, page_type page, handler_type handler); void async_read(handle_type handle, offset_type offset, handler_type handler); private: boost::mutex mutex_; boost::mutex work_mutex_; boost::shared_ptr<boost::asio::io_service> io_service_; boost::shared_ptr<boost::thread> thread_; boost::shared_ptr<boost::asio::io_service::work> work_; }; #endif
[ "yangacer@gmail.com" ]
yangacer@gmail.com
499dd3a7aa86cb43737b993f96e731ff7c6484e9
c18e3cba4f445613b2ed7503061cdfe088d46da5
/docs/atl-mfc-shared/reference/codesnippet/CPP/cfilefind-class_1.cpp
325048069830354b14dfd9e484db7ce8c391ae73
[ "CC-BY-4.0", "MIT" ]
permissive
MicrosoftDocs/cpp-docs
dad03e548e13ca6a6e978df3ba84c4858c77d4bd
87bacc85d5a1e9118a69122d84c43d70f6893f72
refs/heads/main
2023-09-01T00:19:22.423787
2023-08-28T17:27:40
2023-08-28T17:27:40
73,740,405
1,354
1,213
CC-BY-4.0
2023-09-08T21:27:46
2016-11-14T19:38:32
PowerShell
UTF-8
C++
false
false
257
cpp
CFileFind finder; BOOL bWorking = finder.FindFile(_T("*.*")); while (bWorking) { bWorking = finder.FindNextFile(); TRACE(_T("%s\n"), (LPCTSTR)finder.GetFileName()); }
[ "v-zhecai@microsoft.com" ]
v-zhecai@microsoft.com
4cea82bfe0f2b83869ae71587e8ea0471728eb22
e34122f6a021addaaa7976f2e7ff00772758686a
/paralution-1.1.0/src/base/ocl/ocl_matrix_csr.cpp
c8d241e755d223e0a7f3373ec5c461b599e5b5a0
[]
no_license
skakarla1982/paralution
03fe46948d0780bd96583e758fbfa4027ace386c
71ebab58a41982ab56ebba895013c275f39d6b7a
refs/heads/master
2022-07-13T16:24:23.991662
2020-05-05T20:55:02
2020-05-05T20:55:02
261,564,726
1
0
null
null
null
null
UTF-8
C++
false
false
55,497
cpp
// ************************************************************************** // // PARALUTION www.paralution.com // // Copyright (C) 2015 PARALUTION Labs UG (haftungsbeschränkt) & Co. KG // Am Hasensprung 6, 76571 Gaggenau // Handelsregister: Amtsgericht Mannheim, HRA 706051 // Vertreten durch: // PARALUTION Labs Verwaltungs UG (haftungsbeschränkt) // Am Hasensprung 6, 76571 Gaggenau // Handelsregister: Amtsgericht Mannheim, HRB 721277 // Geschäftsführer: Dimitar Lukarski, Nico Trost // // 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/>. // // ************************************************************************** // PARALUTION version 1.1.0 #include "../../utils/def.hpp" #include "../../utils/log.hpp" #include "../../utils/allocate_free.hpp" #include "kernels_ocl.hpp" #include "ocl_allocate_free.hpp" #include "ocl_utils.hpp" #include "ocl_matrix_csr.hpp" #include "ocl_vector.hpp" #include "../host/host_matrix_csr.hpp" #include "../backend_manager.hpp" #include <vector> namespace paralution { template <typename ValueType> OCLAcceleratorMatrixCSR<ValueType>::OCLAcceleratorMatrixCSR() { // no default constructors LOG_INFO("no default constructor"); FATAL_ERROR(__FILE__, __LINE__); } template <typename ValueType> OCLAcceleratorMatrixCSR<ValueType>::OCLAcceleratorMatrixCSR(const Paralution_Backend_Descriptor local_backend) { LOG_DEBUG(this, "OCLAcceleratorMatrixCSR::OCLAcceleratorMatrixCSR()", "constructor with local_backend"); this->mat_.row_offset = NULL; this->mat_.col = NULL; this->mat_.val = NULL; this->set_backend(local_backend); this->tmp_vec_ = NULL; } template <typename ValueType> OCLAcceleratorMatrixCSR<ValueType>::~OCLAcceleratorMatrixCSR() { LOG_DEBUG(this, "OCLAcceleratorMatrixCSR::~OCLAcceleratorMatrixCSR()", "destructor"); this->Clear(); } template <typename ValueType> void OCLAcceleratorMatrixCSR<ValueType>::info(void) const { LOG_INFO("OCLAcceleratorMatrixCSR<ValueType>"); } template <typename ValueType> void OCLAcceleratorMatrixCSR<ValueType>::AllocateCSR(const int nnz, const int nrow, const int ncol) { assert (nnz >= 0); assert (ncol >= 0); assert (nrow >= 0); if (this->nnz_ > 0) this->Clear(); if (nnz > 0) { allocate_ocl(nrow+1, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &this->mat_.row_offset); allocate_ocl(nnz, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &this->mat_.col); allocate_ocl(nnz, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &this->mat_.val); // Set entries of device object to zero ocl_set_to(nrow+1, (int) 0, this->mat_.row_offset, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); ocl_set_to(nnz, (int) 0, this->mat_.col, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); ocl_set_to(nnz, (ValueType) 0, this->mat_.val, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); this->nrow_ = nrow; this->ncol_ = ncol; this->nnz_ = nnz; } } template <typename ValueType> void OCLAcceleratorMatrixCSR<ValueType>::SetDataPtrCSR(int **row_offset, int **col, ValueType **val, const int nnz, const int nrow, const int ncol) { assert (*row_offset != NULL); assert (*col != NULL); assert (*val != NULL); assert (nnz > 0); assert (nrow > 0); assert (ncol > 0); this->Clear(); this->nrow_ = nrow; this->ncol_ = ncol; this->nnz_ = nnz; cl_int err = clFinish(OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); CHECK_OCL_ERROR(err, __FILE__, __LINE__); this->mat_.row_offset = *row_offset; this->mat_.col = *col; this->mat_.val = *val; } template <typename ValueType> void OCLAcceleratorMatrixCSR<ValueType>::LeaveDataPtrCSR(int **row_offset, int **col, ValueType **val) { assert (this->nrow_ > 0); assert (this->ncol_ > 0); assert (this->nnz_ > 0); cl_int err = clFinish(OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); CHECK_OCL_ERROR(err, __FILE__, __LINE__); // see free_host function for details *row_offset = this->mat_.row_offset; *col = this->mat_.col; *val = this->mat_.val; this->mat_.row_offset = NULL; this->mat_.col = NULL; this->mat_.val = NULL; this->nrow_ = 0; this->ncol_ = 0; this->nnz_ = 0; } template <typename ValueType> void OCLAcceleratorMatrixCSR<ValueType>::Clear(void) { if (this->nnz_ > 0) { free_ocl(&this->mat_.row_offset); free_ocl(&this->mat_.col); free_ocl(&this->mat_.val); this->nrow_ = 0; this->ncol_ = 0; this->nnz_ = 0; } } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::Zeros() { if (this->nnz_ > 0) { // Set entries of device object to zero ocl_set_to(this->nnz_, (ValueType) 0, this->mat_.val, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); } return true; } template <typename ValueType> void OCLAcceleratorMatrixCSR<ValueType>::CopyFromHost(const HostMatrix<ValueType> &src) { assert (&src != NULL); // copy only in the same format assert (this->get_mat_format() == src.get_mat_format()); const HostMatrixCSR<ValueType> *cast_mat; // CPU to OCL copy if ((cast_mat = dynamic_cast<const HostMatrixCSR<ValueType>*> (&src)) != NULL) { if (this->nnz_ == 0) this->AllocateCSR(cast_mat->nnz_, cast_mat->nrow_, cast_mat->ncol_); assert (this->nnz_ == cast_mat->nnz_); assert (this->nrow_ == cast_mat->nrow_); assert (this->ncol_ == cast_mat->ncol_); if (this->nnz_ > 0) { // Copy object from host to device memory ocl_host2dev(this->nrow_+1, // size cast_mat->mat_.row_offset, // src this->mat_.row_offset, // dst OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); // Copy object from host to device memory ocl_host2dev(this->nnz_, // size cast_mat->mat_.col, // src this->mat_.col, // dst OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); // Copy object from host to device memory ocl_host2dev(this->nnz_, // size cast_mat->mat_.val, // src this->mat_.val, // dst OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); } } else { LOG_INFO("Error unsupported OpenCL matrix type"); this->info(); src.info(); FATAL_ERROR(__FILE__, __LINE__); } } template <typename ValueType> void OCLAcceleratorMatrixCSR<ValueType>::CopyToHost(HostMatrix<ValueType> *dst) const { assert (dst != NULL); HostMatrixCSR<ValueType> *cast_mat; // copy only in the same format assert (this->get_mat_format() == dst->get_mat_format()); // OCL to CPU copy if ((cast_mat = dynamic_cast<HostMatrixCSR<ValueType>*> (dst)) != NULL) { cast_mat->set_backend(this->local_backend_); if (cast_mat->nnz_ == 0) cast_mat->AllocateCSR(this->nnz_, this->nrow_, this->ncol_ ); assert (this->nnz_ == cast_mat->nnz_); assert (this->nrow_ == cast_mat->nrow_); assert (this->ncol_ == cast_mat->ncol_); if (this->nnz_ > 0) { // Copy object from device to host memory ocl_dev2host(this->nrow_+1, // size this->mat_.row_offset, // src cast_mat->mat_.row_offset, // dst OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); // Copy object from device to host memory ocl_dev2host(this->nnz_, // size this->mat_.col, // src cast_mat->mat_.col, // dst OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); // Copy object from device to host memory ocl_dev2host(this->nnz_, // size this->mat_.val, // src cast_mat->mat_.val, // dst OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); } } else { LOG_INFO("Error unsupported OpenCL matrix type"); this->info(); dst->info(); FATAL_ERROR(__FILE__, __LINE__); } } template <typename ValueType> void OCLAcceleratorMatrixCSR<ValueType>::CopyFrom(const BaseMatrix<ValueType> &src) { assert (&src != NULL); const OCLAcceleratorMatrixCSR<ValueType> *ocl_cast_mat; const HostMatrix<ValueType> *host_cast_mat; // copy only in the same format assert (this->get_mat_format() == src.get_mat_format()); // OCL to OCL copy if ((ocl_cast_mat = dynamic_cast<const OCLAcceleratorMatrixCSR<ValueType>*> (&src)) != NULL) { if (this->nnz_ == 0) this->AllocateCSR(ocl_cast_mat->nnz_, ocl_cast_mat->nrow_, ocl_cast_mat->ncol_ ); assert (this->nnz_ == ocl_cast_mat->nnz_); assert (this->nrow_ == ocl_cast_mat->nrow_); assert (this->ncol_ == ocl_cast_mat->ncol_); if (this->nnz_ > 0) { // Copy object from device to device memory (internal copy) ocl_dev2dev(this->nrow_+1, // size ocl_cast_mat->mat_.row_offset, // src this->mat_.row_offset, // dst OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); // Copy object from device to device memory (internal copy) ocl_dev2dev(this->nnz_, // size ocl_cast_mat->mat_.col, // src this->mat_.col, // dst OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); // Copy object from device to device memory (internal copy) ocl_dev2dev(this->nnz_, // size ocl_cast_mat->mat_.val, // src this->mat_.val, // dst OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); } } else { //CPU to OCL if ((host_cast_mat = dynamic_cast<const HostMatrix<ValueType>*> (&src)) != NULL) { this->CopyFromHost(*host_cast_mat); } else { LOG_INFO("Error unsupported OpenCL matrix type"); this->info(); src.info(); FATAL_ERROR(__FILE__, __LINE__); } } } template <typename ValueType> void OCLAcceleratorMatrixCSR<ValueType>::CopyTo(BaseMatrix<ValueType> *dst) const { assert (dst != NULL); OCLAcceleratorMatrixCSR<ValueType> *ocl_cast_mat; HostMatrix<ValueType> *host_cast_mat; // copy only in the same format assert (this->get_mat_format() == dst->get_mat_format()); // OCL to OCL copy if ((ocl_cast_mat = dynamic_cast<OCLAcceleratorMatrixCSR<ValueType>*> (dst)) != NULL) { ocl_cast_mat->set_backend(this->local_backend_); if (ocl_cast_mat->nnz_ == 0) ocl_cast_mat->AllocateCSR(this->nnz_, this->nrow_, this->ncol_); assert (this->nnz_ == ocl_cast_mat->nnz_); assert (this->nrow_ == ocl_cast_mat->nrow_); assert (this->ncol_ == ocl_cast_mat->ncol_); if (this->nnz_ > 0) { // Copy object from device to device memory (internal copy) ocl_dev2dev(this->nrow_+1, // size this->mat_.row_offset, // src ocl_cast_mat->mat_.row_offset, // dst OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); // Copy object from device to device memory (internal copy) ocl_dev2dev(this->nnz_, // size this->mat_.col, // src ocl_cast_mat->mat_.col, // dst OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); // Copy object from device to device memory (internal copy) ocl_dev2dev(this->nnz_, // size this->mat_.val, // src ocl_cast_mat->mat_.val, // dst OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); } } else { //OCL to CPU if ((host_cast_mat = dynamic_cast<HostMatrix<ValueType>*> (dst)) != NULL) { this->CopyToHost(host_cast_mat); } else { LOG_INFO("Error unsupported OpenCL matrix type"); this->info(); dst->info(); FATAL_ERROR(__FILE__, __LINE__); } } } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::ConvertFrom(const BaseMatrix<ValueType> &mat) { this->Clear(); // empty matrix is empty matrix if (mat.get_nnz() == 0) return true; return false; } template <typename ValueType> void OCLAcceleratorMatrixCSR<ValueType>::CopyFromHostCSR(const int *row_offset, const int *col, const ValueType *val, const int nnz, const int nrow, const int ncol) { assert(nnz >= 0); assert(ncol >= 0); assert(nrow >= 0); assert(row_offset != NULL); assert(col != NULL); assert(val != NULL); // Allocate matrix if (this->nnz_ > 0) this->Clear(); if (nnz > 0) { allocate_ocl(nrow+1, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &this->mat_.row_offset); allocate_ocl(nnz, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &this->mat_.col); allocate_ocl(nnz, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &this->mat_.val); this->nrow_ = nrow; this->ncol_ = ncol; this->nnz_ = nnz; // Copy object from host to device memory ocl_host2dev(this->nrow_+1, // size row_offset, // src this->mat_.row_offset, // dst OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); // Copy object from host to device memory ocl_host2dev(this->nnz_, // size col, // src this->mat_.col, // dst OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); // Copy object from host to device memory ocl_host2dev(this->nnz_, // size val, // src this->mat_.val, // dst OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); } } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::Permute(const BaseVector<int> &permutation) { // TODO fix error in extrapolation kernel return false; if (this->nnz_ > 0) { assert (&permutation != NULL); assert (permutation.get_size() == this->nrow_); assert (permutation.get_size() == this->ncol_); const OCLAcceleratorVector<int> *cast_perm = dynamic_cast<const OCLAcceleratorVector<int>*> (&permutation); assert (cast_perm != NULL); int *d_nnzr = NULL; int *d_nnzrPerm = NULL; int *d_nnzPerm = NULL; int *d_offset = NULL; ValueType *d_data = NULL; allocate_ocl(this->nrow_, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &d_nnzr); allocate_ocl(this->nrow_, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &d_nnzrPerm); allocate_ocl((this->nrow_+1), OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &d_nnzPerm); allocate_ocl(this->nnz_, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &d_data); allocate_ocl(this->nnz_, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &d_offset); int nrow = this->nrow_; size_t LocalSize = this->local_backend_.OCL_max_work_group_size; size_t GlobalSize = (nrow / LocalSize + 1 ) * LocalSize; cl_int err = ocl_kernel<ValueType>(CL_KERNEL_CSR_CALC_ROW_NNZ, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, nrow, this->mat_.row_offset, d_nnzr); CHECK_OCL_ERROR(err, __FILE__, __LINE__); err = ocl_kernel<ValueType>(CL_KERNEL_CSR_PERMUTE_ROW_NNZ, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, nrow, d_nnzr, cast_perm->vec_, d_nnzrPerm); CHECK_OCL_ERROR(err, __FILE__, __LINE__); // Set entries of device object to zero ocl_set_to(nrow+1, (int) 0, d_nnzPerm, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); int *d_temp = NULL; allocate_ocl(this->nrow_+1, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &d_temp); // Set entries of device object to zero ocl_set_to(nrow+1, (int) 0, d_temp, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); int shift = 1; err = ocl_kernel<ValueType>(CL_KERNEL_RED_PARTIAL_SUM, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, d_nnzPerm, d_nnzrPerm, nrow, shift); CHECK_OCL_ERROR(err, __FILE__, __LINE__); int nrowp = nrow+1; GlobalSize = (nrow / (LocalSize * LocalSize) + 1) * LocalSize; err = ocl_kernel<ValueType>(CL_KERNEL_RED_RECURSE, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, d_temp, d_nnzPerm, nrowp); CHECK_OCL_ERROR(err, __FILE__, __LINE__); shift = 1; err = ocl_kernel<ValueType>(CL_KERNEL_RED_EXTRAPOLATE, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, d_nnzPerm, d_temp, d_nnzrPerm, nrow, shift); CHECK_OCL_ERROR(err, __FILE__, __LINE__); free_ocl(&d_temp); GlobalSize = (nrow / LocalSize + 1) * LocalSize; err = ocl_kernel<ValueType>(CL_KERNEL_CSR_PERMUTE_ROWS, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, nrow, this->mat_.row_offset, d_nnzPerm, this->mat_.col, this->mat_.val, cast_perm->vec_, d_nnzr, d_offset, d_data); CHECK_OCL_ERROR(err, __FILE__, __LINE__); free_ocl(&this->mat_.row_offset); this->mat_.row_offset = d_nnzPerm; err = ocl_kernel<ValueType>(CL_KERNEL_CSR_PERMUTE_COLS, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, nrow, this->mat_.row_offset, cast_perm->vec_, d_nnzrPerm, d_offset, d_data, this->mat_.col, this->mat_.val); CHECK_OCL_ERROR(err, __FILE__, __LINE__); free_ocl(&d_offset); free_ocl(&d_data); free_ocl(&d_nnzrPerm); free_ocl(&d_nnzr); } return true; } template <typename ValueType> void OCLAcceleratorMatrixCSR<ValueType>::Apply(const BaseVector<ValueType> &in, BaseVector<ValueType> *out) const { if (this->nnz_ > 0) { assert (&in != NULL); assert (out != NULL); assert (in. get_size() >= 0); assert (out->get_size() >= 0); assert (in. get_size() == this->ncol_); assert (out->get_size() == this->nrow_); const OCLAcceleratorVector<ValueType> *cast_in = dynamic_cast<const OCLAcceleratorVector<ValueType>*> (&in); OCLAcceleratorVector<ValueType> *cast_out = dynamic_cast< OCLAcceleratorVector<ValueType>*> (out); assert (cast_in != NULL); assert (cast_out != NULL); size_t LocalSize = this->local_backend_.OCL_max_work_group_size; size_t GlobalSize = (this->nrow_ / LocalSize + 1) * LocalSize; cl_int err = ocl_kernel<ValueType>(CL_KERNEL_CSR_SPMV_SCALAR, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->nrow_, this->mat_.row_offset, this->mat_.col, this->mat_.val, cast_in->vec_, cast_out->vec_); CHECK_OCL_ERROR(err, __FILE__, __LINE__); } } template <typename ValueType> void OCLAcceleratorMatrixCSR<ValueType>::ApplyAdd(const BaseVector<ValueType> &in, const ValueType scalar, BaseVector<ValueType> *out) const { if (this->nnz_ > 0) { assert (&in != NULL); assert (out != NULL); assert (in. get_size() >= 0); assert (out->get_size() >= 0); assert (in. get_size() == this->ncol_); assert (out->get_size() == this->nrow_); const OCLAcceleratorVector<ValueType> *cast_in = dynamic_cast<const OCLAcceleratorVector<ValueType>*> (&in); OCLAcceleratorVector<ValueType> *cast_out = dynamic_cast< OCLAcceleratorVector<ValueType>*> (out); assert (cast_in != NULL); assert (cast_out != NULL); size_t LocalSize = this->local_backend_.OCL_max_work_group_size; size_t GlobalSize = (this->nrow_ / LocalSize + 1) * LocalSize; cl_int err = ocl_kernel<ValueType>(CL_KERNEL_CSR_ADD_SPMV_SCALAR, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->nrow_, this->mat_.row_offset, this->mat_.col, this->mat_.val, scalar, cast_in->vec_, cast_out->vec_); CHECK_OCL_ERROR(err, __FILE__, __LINE__); } } template <typename ValueType> void OCLAcceleratorMatrixCSR<ValueType>::LUAnalyse(void) { } template <typename ValueType> void OCLAcceleratorMatrixCSR<ValueType>::LUAnalyseClear(void) { } template <typename ValueType> void OCLAcceleratorMatrixCSR<ValueType>::LLAnalyse(void) { } template <typename ValueType> void OCLAcceleratorMatrixCSR<ValueType>::LLAnalyseClear(void) { } template <typename ValueType> void OCLAcceleratorMatrixCSR<ValueType>::LAnalyse(const bool diag_unit) { } template <typename ValueType> void OCLAcceleratorMatrixCSR<ValueType>::UAnalyse(const bool diag_unit) { } template <typename ValueType> void OCLAcceleratorMatrixCSR<ValueType>::LAnalyseClear(void) { } template <typename ValueType> void OCLAcceleratorMatrixCSR<ValueType>::UAnalyseClear(void) { } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::ExtractDiagonal(BaseVector<ValueType> *vec_diag) const { if (this->nnz_ > 0) { assert (vec_diag != NULL); assert (vec_diag->get_size() == this->nrow_); OCLAcceleratorVector<ValueType> *cast_diag = dynamic_cast<OCLAcceleratorVector<ValueType>*> (vec_diag); assert (cast_diag != NULL); size_t LocalSize = this->local_backend_.OCL_max_work_group_size; size_t GlobalSize = (this->nrow_ / LocalSize + 1) * LocalSize; cl_int err = ocl_kernel<ValueType>(CL_KERNEL_CSR_EXTRACT_DIAG, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->nrow_, this->mat_.row_offset, this->mat_.col, this->mat_.val, cast_diag->vec_); CHECK_OCL_ERROR(err, __FILE__, __LINE__); } return true; } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::ExtractInverseDiagonal(BaseVector<ValueType> *vec_inv_diag) const { if (this->nnz_ > 0) { assert (vec_inv_diag != NULL); assert (vec_inv_diag->get_size() == this->nrow_); OCLAcceleratorVector<ValueType> *cast_inv_diag = dynamic_cast<OCLAcceleratorVector<ValueType>*> (vec_inv_diag); assert (cast_inv_diag != NULL); size_t LocalSize = this->local_backend_.OCL_max_work_group_size; size_t GlobalSize = (this->nrow_ / LocalSize + 1) * LocalSize; cl_int err = ocl_kernel<ValueType>(CL_KERNEL_CSR_EXTRACT_INV_DIAG, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->nrow_, this->mat_.row_offset, this->mat_.col, this->mat_.val, cast_inv_diag->vec_); CHECK_OCL_ERROR(err, __FILE__, __LINE__); } return true; } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::ExtractSubMatrix(const int row_offset, const int col_offset, const int row_size, const int col_size, BaseMatrix<ValueType> *mat) const { assert (mat != NULL); assert (row_offset >= 0); assert (col_offset >= 0); assert (this->nrow_ > 0); assert (this->ncol_ > 0); OCLAcceleratorMatrixCSR<ValueType> *cast_mat = dynamic_cast<OCLAcceleratorMatrixCSR<ValueType>*> (mat); assert (cast_mat != NULL); int mat_nnz = 0; int *row_nnz = NULL; int *red_row_nnz = NULL; allocate_host(row_size+1, &red_row_nnz); allocate_ocl(row_size+1, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &row_nnz); size_t LocalSize = this->local_backend_.OCL_max_work_group_size; size_t GlobalSize = ((row_size+1) / LocalSize + 1) * LocalSize; // compute the nnz per row in the new matrix cl_int err = ocl_kernel<ValueType>(CL_KERNEL_CSR_EXTRACT_SUBMATRIX_ROW_NNZ, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->mat_.row_offset, this->mat_.col, this->mat_.val, row_offset, col_offset, row_size, col_size, row_nnz); CHECK_OCL_ERROR(err, __FILE__, __LINE__); // compute the new nnz by reduction on CPU // Copy object from device to host memory ocl_dev2host(row_size+1, row_nnz, red_row_nnz, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); int sum = 0; for (int i=0; i<row_size; ++i) { int tmp = red_row_nnz[i]; red_row_nnz[i] = sum; sum += tmp; } mat_nnz = red_row_nnz[row_size] = sum; // TODO // redSubSum // not empty submatrix if (mat_nnz > 0) { cast_mat->AllocateCSR(mat_nnz, row_size, col_size); // part of the CPU reduction section // Copy object from host to device memory ocl_host2dev(row_size+1, // size red_row_nnz, // src cast_mat->mat_.row_offset, // dst OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); // copying the sub matrix err = ocl_kernel<ValueType>(CL_KERNEL_CSR_EXTRACT_SUBMATRIX_COPY, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->mat_.row_offset, this->mat_.col, this->mat_.val, row_offset, col_offset, row_size, col_size, cast_mat->mat_.row_offset, cast_mat->mat_.col, cast_mat->mat_.val); CHECK_OCL_ERROR(err, __FILE__, __LINE__); } free_ocl(&row_nnz); free_host(&red_row_nnz); return true; } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::ExtractL(BaseMatrix<ValueType> *L) const { assert (L != NULL); assert (this->nrow_ > 0); assert (this->ncol_ > 0); OCLAcceleratorMatrixCSR<ValueType> *cast_L = dynamic_cast<OCLAcceleratorMatrixCSR<ValueType>*> (L); assert (cast_L != NULL); cast_L->Clear(); // compute nnz per row allocate_ocl(this->nrow_+1, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &cast_L->mat_.row_offset); size_t LocalSize = this->local_backend_.OCL_max_work_group_size; size_t GlobalSize = (this->nrow_ / LocalSize + 1) * LocalSize; // compute the nnz per row in the new matrix cl_int err = ocl_kernel<ValueType>(CL_KERNEL_CSR_SLOWER_NNZ_PER_ROW, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->nrow_, this->mat_.row_offset, this->mat_.col, cast_L->mat_.row_offset); CHECK_OCL_ERROR(err, __FILE__, __LINE__); // partial sum row_nnz to obtain row_offset vector // TODO currently performing partial sum on host int *h_buffer = NULL; allocate_host(this->nrow_+1, &h_buffer); ocl_dev2host(this->nrow_+1, cast_L->mat_.row_offset, h_buffer, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); h_buffer[0] = 0; for (int i=1; i<this->nrow_+1; ++i) h_buffer[i] += h_buffer[i-1]; int nnz_L = h_buffer[this->nrow_]; ocl_host2dev(this->nrow_+1, // size h_buffer, // src cast_L->mat_.row_offset, // dst OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); free_host(&h_buffer); // end TODO // allocate lower triangular part structure allocate_ocl(nnz_L, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &cast_L->mat_.col); allocate_ocl(nnz_L, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &cast_L->mat_.val); // compute the nnz per row in the new matrix err = ocl_kernel<ValueType>(CL_KERNEL_CSR_EXTRACT_L_TRIANGULAR, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->nrow_, this->mat_.row_offset, this->mat_.col, this->mat_.val, cast_L->mat_.row_offset, cast_L->mat_.col, cast_L->mat_.val); CHECK_OCL_ERROR(err, __FILE__, __LINE__); cast_L->nrow_ = this->nrow_; cast_L->ncol_ = this->ncol_; cast_L->nnz_ = nnz_L; return true; } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::ExtractLDiagonal(BaseMatrix<ValueType> *L) const { assert (L != NULL); assert (this->nrow_ > 0); assert (this->ncol_ > 0); OCLAcceleratorMatrixCSR<ValueType> *cast_L = dynamic_cast<OCLAcceleratorMatrixCSR<ValueType>*> (L); assert (cast_L != NULL); cast_L->Clear(); // compute nnz per row allocate_ocl(this->nrow_+1, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &cast_L->mat_.row_offset); size_t LocalSize = this->local_backend_.OCL_max_work_group_size; size_t GlobalSize = (this->nrow_ / LocalSize + 1) * LocalSize; // compute the nnz per row in the new matrix cl_int err = ocl_kernel<ValueType>(CL_KERNEL_CSR_LOWER_NNZ_PER_ROW, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->nrow_, this->mat_.row_offset, this->mat_.col, cast_L->mat_.row_offset); CHECK_OCL_ERROR(err, __FILE__, __LINE__); // partial sum row_nnz to obtain row_offset vector // TODO currently performing partial sum on host int *h_buffer = NULL; allocate_host(this->nrow_+1, &h_buffer); ocl_dev2host(this->nrow_+1, cast_L->mat_.row_offset, h_buffer, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); h_buffer[0] = 0; for (int i=1; i<this->nrow_+1; ++i) h_buffer[i] += h_buffer[i-1]; int nnz_L = h_buffer[this->nrow_]; ocl_host2dev(this->nrow_+1, // size h_buffer, // src cast_L->mat_.row_offset, // dst OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); free_host(&h_buffer); // end TODO // allocate lower triangular part structure allocate_ocl(nnz_L, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &cast_L->mat_.col); allocate_ocl(nnz_L, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &cast_L->mat_.val); err = ocl_kernel<ValueType>(CL_KERNEL_CSR_EXTRACT_L_TRIANGULAR, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->nrow_, this->mat_.row_offset, this->mat_.col, this->mat_.val, cast_L->mat_.row_offset, cast_L->mat_.col, cast_L->mat_.val); CHECK_OCL_ERROR(err, __FILE__, __LINE__); cast_L->nrow_ = this->nrow_; cast_L->ncol_ = this->ncol_; cast_L->nnz_ = nnz_L; return true; } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::ExtractU(BaseMatrix<ValueType> *U) const { assert (U != NULL); assert (this->nrow_ > 0); assert (this->ncol_ > 0); OCLAcceleratorMatrixCSR<ValueType> *cast_U = dynamic_cast<OCLAcceleratorMatrixCSR<ValueType>*> (U); assert (cast_U != NULL); cast_U->Clear(); // compute nnz per row allocate_ocl(this->nrow_+1, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &cast_U->mat_.row_offset); size_t LocalSize = this->local_backend_.OCL_max_work_group_size; size_t GlobalSize = (this->nrow_ / LocalSize + 1) * LocalSize; // compute the nnz per row in the new matrix cl_int err = ocl_kernel<ValueType>(CL_KERNEL_CSR_SUPPER_NNZ_PER_ROW, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->nrow_, this->mat_.row_offset, this->mat_.col, cast_U->mat_.row_offset); CHECK_OCL_ERROR(err, __FILE__, __LINE__); // partial sum row_nnz to obtain row_offset vector // TODO currently performing partial sum on host int *h_buffer = NULL; allocate_host(this->nrow_+1, &h_buffer); ocl_dev2host(this->nrow_+1, cast_U->mat_.row_offset, h_buffer, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); h_buffer[0] = 0; for (int i=1; i<this->nrow_+1; ++i) h_buffer[i] += h_buffer[i-1]; int nnz_L = h_buffer[this->nrow_]; ocl_host2dev(this->nrow_+1, // size h_buffer, // src cast_U->mat_.row_offset, // dst OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); free_host(&h_buffer); // end TODO // allocate lower triangular part structure allocate_ocl(nnz_L, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &cast_U->mat_.col); allocate_ocl(nnz_L, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &cast_U->mat_.val); err = ocl_kernel<ValueType>(CL_KERNEL_CSR_EXTRACT_U_TRIANGULAR, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->nrow_, this->mat_.row_offset, this->mat_.col, this->mat_.val, cast_U->mat_.row_offset, cast_U->mat_.col, cast_U->mat_.val); CHECK_OCL_ERROR(err, __FILE__, __LINE__); cast_U->nrow_ = this->nrow_; cast_U->ncol_ = this->ncol_; cast_U->nnz_ = nnz_L; return true; } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::ExtractUDiagonal(BaseMatrix<ValueType> *U) const { assert (U != NULL); assert (this->nrow_ > 0); assert (this->ncol_ > 0); OCLAcceleratorMatrixCSR<ValueType> *cast_U = dynamic_cast<OCLAcceleratorMatrixCSR<ValueType>*> (U); assert (cast_U != NULL); cast_U->Clear(); // compute nnz per row allocate_ocl(this->nrow_+1, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &cast_U->mat_.row_offset); size_t LocalSize = this->local_backend_.OCL_max_work_group_size; size_t GlobalSize = (this->nrow_ / LocalSize + 1) * LocalSize; // compute the nnz per row in the new matrix cl_int err = ocl_kernel<ValueType>(CL_KERNEL_CSR_UPPER_NNZ_PER_ROW, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->nrow_, this->mat_.row_offset, this->mat_.col, cast_U->mat_.row_offset); CHECK_OCL_ERROR(err, __FILE__, __LINE__); // partial sum row_nnz to obtain row_offset vector // TODO currently performing partial sum on host int *h_buffer = NULL; allocate_host(this->nrow_+1, &h_buffer); ocl_dev2host(this->nrow_+1, cast_U->mat_.row_offset, h_buffer, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); h_buffer[0] = 0; for (int i=1; i<this->nrow_+1; ++i) h_buffer[i] += h_buffer[i-1]; int nnz_L = h_buffer[this->nrow_]; ocl_host2dev(this->nrow_+1, h_buffer, cast_U->mat_.row_offset, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); free_host(&h_buffer); // end TODO // allocate lower triangular part structure allocate_ocl(nnz_L, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &cast_U->mat_.col); allocate_ocl(nnz_L, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &cast_U->mat_.val); err = ocl_kernel<ValueType>(CL_KERNEL_CSR_EXTRACT_U_TRIANGULAR, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->nrow_, this->mat_.row_offset, this->mat_.col, this->mat_.val, cast_U->mat_.row_offset, cast_U->mat_.col, cast_U->mat_.val); CHECK_OCL_ERROR(err, __FILE__, __LINE__); cast_U->nrow_ = this->nrow_; cast_U->ncol_ = this->ncol_; cast_U->nnz_ = nnz_L; return true; } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::MaximalIndependentSet(int &size, BaseVector<int> *permutation) const { assert (permutation != NULL); OCLAcceleratorVector<int> *cast_perm = dynamic_cast<OCLAcceleratorVector<int>*> (permutation); assert (cast_perm != NULL); assert (this->nrow_ == this->ncol_); int *h_row_offset = NULL; int *h_col = NULL; allocate_host(this->nrow_+1, &h_row_offset); allocate_host(this->nnz_, &h_col); ocl_dev2host(this->nrow_+1, this->mat_.row_offset, h_row_offset, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); ocl_dev2host(this->nnz_, this->mat_.col, h_col, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); int *mis = NULL; allocate_host(this->nrow_, &mis); set_to_zero_host(this->nrow_, mis); size = 0; for (int ai=0; ai<this->nrow_; ++ai) { if (mis[ai] == 0) { // set the node mis[ai] = 1; ++size ; //remove all nbh nodes (without diagonal) for (int aj=h_row_offset[ai]; aj<h_row_offset[ai+1]; ++aj) if (ai != h_col[aj]) mis[h_col[aj]] = -1; } } int *h_perm = NULL; allocate_host(this->nrow_, &h_perm); int pos = 0; for (int ai=0; ai<this->nrow_; ++ai) { if (mis[ai] == 1) { h_perm[ai] = pos; ++pos; } else { h_perm[ai] = size + ai - pos; } } // Check the permutation // // for (int ai=0; ai<this->nrow_; ++ai) { // assert ( h_perm[ai] >= 0 ); // assert ( h_perm[ai] < this->nrow_ ); // } cast_perm->Allocate(this->nrow_); ocl_host2dev(permutation->get_size(), // size h_perm, // src cast_perm->vec_, // dst OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); free_host(&h_row_offset); free_host(&h_col); free_host(&h_perm); free_host(&mis); return true; } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::MultiColoring(int &num_colors, int **size_colors, BaseVector<int> *permutation) const { assert (permutation != NULL); OCLAcceleratorVector<int> *cast_perm = dynamic_cast<OCLAcceleratorVector<int>*> (permutation); assert (cast_perm != NULL); // node colors (init value = 0 i.e. no color) int *color = NULL; int *h_row_offset = NULL; int *h_col = NULL; int size = this->nrow_; allocate_host(size, &color); allocate_host(this->nrow_+1, &h_row_offset); allocate_host(this->nnz_, &h_col); ocl_dev2host(this->nrow_+1, this->mat_.row_offset, h_row_offset, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); ocl_dev2host(this->nnz_, this->mat_.col, h_col, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); set_to_zero_host(size, color); num_colors = 0; std::vector<bool> row_col; for (int ai=0; ai<this->nrow_; ++ai) { color[ai] = 1; row_col.clear(); row_col.assign(num_colors+2, false); for (int aj=h_row_offset[ai]; aj<h_row_offset[ai+1]; ++aj) if (ai != h_col[aj]) row_col[color[h_col[aj]]] = true; for (int aj=h_row_offset[ai]; aj<h_row_offset[ai+1]; ++aj) if (row_col[color[ai]] == true) ++color[ai]; if (color[ai] > num_colors) num_colors = color[ai]; } free_host(&h_row_offset); free_host(&h_col); allocate_host(num_colors, size_colors); set_to_zero_host(num_colors, *size_colors); int *offsets_color = NULL; allocate_host(num_colors, &offsets_color); set_to_zero_host(num_colors, offsets_color); for (int i=0; i<this->nrow_; ++i) ++(*size_colors)[color[i]-1]; int total=0; for (int i=1; i<num_colors; ++i) { total += (*size_colors)[i-1]; offsets_color[i] = total; // LOG_INFO("offsets = " << total); } int *h_perm = NULL; allocate_host(this->nrow_, &h_perm); for (int i=0; i<this->nrow_; ++i) { h_perm[i] = offsets_color[color[i]-1]; ++offsets_color[color[i]-1]; } cast_perm->Allocate(this->nrow_); ocl_host2dev(permutation->get_size(), // size h_perm, // src cast_perm->vec_, // dst OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); free_host(&h_perm); free_host(&color); free_host(&offsets_color); return true; } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::Scale(const ValueType alpha) { if (this->nnz_ > 0) { size_t LocalSize = this->local_backend_.OCL_max_work_group_size; size_t GlobalSize = (this->nnz_ / LocalSize + 1) * LocalSize; cl_int err = ocl_kernel<ValueType>(CL_KERNEL_SCALE, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->nnz_, alpha, this->mat_.val); CHECK_OCL_ERROR(err, __FILE__, __LINE__); } return true; } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::ScaleDiagonal(const ValueType alpha) { if (this->nnz_ > 0) { size_t LocalSize = this->local_backend_.OCL_max_work_group_size; size_t GlobalSize = (this->nrow_ / LocalSize + 1) * LocalSize; cl_int err = ocl_kernel<ValueType>(CL_KERNEL_CSR_SCALE_DIAGONAL, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->nrow_, this->mat_.row_offset, this->mat_.col, alpha, this->mat_.val); CHECK_OCL_ERROR(err, __FILE__, __LINE__); } return true; } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::ScaleOffDiagonal(const ValueType alpha) { if (this->nnz_ > 0) { size_t LocalSize = this->local_backend_.OCL_max_work_group_size; size_t GlobalSize = (this->nrow_ / LocalSize + 1) * LocalSize; cl_int err = ocl_kernel<ValueType>(CL_KERNEL_CSR_SCALE_OFFDIAGONAL, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->nrow_, this->mat_.row_offset, this->mat_.col, alpha, this->mat_.val); CHECK_OCL_ERROR(err, __FILE__, __LINE__); } return true; } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::AddScalarDiagonal(const ValueType alpha) { if (this->nnz_ > 0) { size_t LocalSize = this->local_backend_.OCL_max_work_group_size; size_t GlobalSize = (this->nrow_ / LocalSize + 1) * LocalSize; cl_int err = ocl_kernel<ValueType>(CL_KERNEL_CSR_ADD_DIAGONAL, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->nrow_, this->mat_.row_offset, this->mat_.col, alpha, this->mat_.val); CHECK_OCL_ERROR(err, __FILE__, __LINE__); } return true; } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::AddScalarOffDiagonal(const ValueType alpha) { if (this->nnz_ > 0) { size_t LocalSize = this->local_backend_.OCL_max_work_group_size; size_t GlobalSize = (this->nrow_ / LocalSize + 1) * LocalSize; cl_int err = ocl_kernel<ValueType>(CL_KERNEL_CSR_ADD_OFFDIAGONAL, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->nrow_, this->mat_.row_offset, this->mat_.col, alpha, this->mat_.val); CHECK_OCL_ERROR(err, __FILE__, __LINE__); } return true; } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::AddScalar(const ValueType alpha) { if (this->nnz_ > 0) { size_t LocalSize = this->local_backend_.OCL_max_work_group_size; size_t GlobalSize = (this->nnz_ / LocalSize + 1) * LocalSize; cl_int err = ocl_kernel<ValueType>(CL_KERNEL_BUFFER_ADDSCALAR, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->nnz_, alpha, this->mat_.val); CHECK_OCL_ERROR(err, __FILE__, __LINE__); } return true; } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::DiagonalMatrixMultR(const BaseVector<ValueType> &diag) { if (this->nnz_ > 0) { assert (&diag != NULL); assert (diag.get_size() == this->ncol_); const OCLAcceleratorVector<ValueType> *cast_diag = dynamic_cast<const OCLAcceleratorVector<ValueType>*> (&diag); assert (cast_diag != NULL); size_t LocalSize = this->local_backend_.OCL_max_work_group_size; size_t GlobalSize = (this->nrow_ / LocalSize + 1) * LocalSize; cl_int err = ocl_kernel<ValueType>(CL_KERNEL_CSR_DIAGMATMULT_R, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->nrow_, this->mat_.row_offset, this->mat_.col, cast_diag->vec_, this->mat_.val); CHECK_OCL_ERROR(err, __FILE__, __LINE__); } return true; } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::DiagonalMatrixMultL(const BaseVector<ValueType> &diag) { if (this->nnz_ > 0) { assert (&diag != NULL); assert (diag.get_size() == this->ncol_); const OCLAcceleratorVector<ValueType> *cast_diag = dynamic_cast<const OCLAcceleratorVector<ValueType>*> (&diag); assert (cast_diag!= NULL); size_t LocalSize = this->local_backend_.OCL_max_work_group_size; size_t GlobalSize = (this->nrow_ / LocalSize + 1) * LocalSize; cl_int err = ocl_kernel<ValueType>(CL_KERNEL_CSR_DIAGMATMULT_L, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->nrow_, this->mat_.row_offset, this->mat_.col, cast_diag->vec_, this->mat_.val); CHECK_OCL_ERROR(err, __FILE__, __LINE__); } return true; } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::MatrixAdd(const BaseMatrix<ValueType> &mat, const ValueType alpha, const ValueType beta, const bool structure) { if (this->nnz_ > 0) { assert (&mat != NULL); const OCLAcceleratorMatrixCSR<ValueType> *cast_mat = dynamic_cast<const OCLAcceleratorMatrixCSR<ValueType>*> (&mat); assert (cast_mat != NULL); assert (cast_mat->nrow_ == this->nrow_); assert (cast_mat->ncol_ == this->ncol_); assert (this->nnz_ > 0); assert (cast_mat->nnz_ > 0); if (structure == false) { size_t LocalSize = this->local_backend_.OCL_max_work_group_size; size_t GlobalSize = (this->nrow_ / LocalSize + 1) * LocalSize; cl_int err = ocl_kernel<ValueType>(CL_KERNEL_CSR_ADD_CSR_SAME_STRUCT, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->nrow_, this->mat_.row_offset, this->mat_.col, cast_mat->mat_.row_offset, cast_mat->mat_.col, cast_mat->mat_.val, alpha, beta, this->mat_.val); CHECK_OCL_ERROR(err, __FILE__, __LINE__); } else { return false; } } return true; } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::Compress(const double drop_off) { if (this->nnz_ > 0) { OCLAcceleratorMatrixCSR<ValueType> tmp(this->local_backend_); tmp.CopyFrom(*this); int mat_nnz = 0; int *row_offset = NULL; allocate_ocl(this->nrow_+1, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &row_offset); ocl_set_to(this->nrow_+1, (int) 0, row_offset, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); size_t LocalSize = this->local_backend_.OCL_max_work_group_size; size_t GlobalSize = (this->nrow_ / LocalSize + 1) * LocalSize; cl_int err = ocl_kernel<ValueType>(CL_KERNEL_CSR_COMPRESS_COUNT_NROW, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->mat_.row_offset, this->mat_.col, this->mat_.val, this->nrow_, drop_off, row_offset); CHECK_OCL_ERROR(err, __FILE__, __LINE__); int *red_row_offset = NULL; allocate_host(this->nrow_+1, &red_row_offset); // Copy object from device to host memory ocl_dev2host(this->nrow_+1, row_offset, red_row_offset, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); int sum = 0; for (int i=0; i<this->nrow_; ++i) { int tmp = red_row_offset[i]; red_row_offset[i] = sum; sum += tmp; } mat_nnz = red_row_offset[this->nrow_] = sum; this->AllocateCSR(mat_nnz, this->nrow_, this->ncol_); ocl_host2dev(this->nrow_+1, // size red_row_offset, // src this->mat_.row_offset, // dst OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); free_host(&red_row_offset); err = ocl_kernel<ValueType>(CL_KERNEL_CSR_COMPRESS_COPY, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, tmp.mat_.row_offset, tmp.mat_.col, tmp.mat_.val, tmp.nrow_, drop_off, this->mat_.row_offset, this->mat_.col, this->mat_.val); CHECK_OCL_ERROR(err, __FILE__, __LINE__); free_ocl(&row_offset); } return true; } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::ReplaceColumnVector(const int idx, const BaseVector<ValueType> &vec) { if (this->nnz_ > 0) { assert (idx >= 0); assert (&vec != NULL); assert (vec.get_size() == this->nrow_); const OCLAcceleratorVector<ValueType> *cast_vec = dynamic_cast<const OCLAcceleratorVector<ValueType>*> (&vec); assert (cast_vec != NULL); int *row_offset = NULL; int *col = NULL; ValueType *val = NULL; int nrow = this->nrow_; int ncol = this->ncol_; allocate_ocl(nrow+1, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &row_offset); size_t LocalSize = this->local_backend_.OCL_max_work_group_size; size_t GlobalSize = (nrow / LocalSize + 1) * LocalSize; cl_int err = ocl_kernel<ValueType>(CL_KERNEL_CSR_REPLACE_COLUMN_VECTOR_OFFSET, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->mat_.row_offset, this->mat_.col, nrow, idx, cast_vec->vec_, row_offset); CHECK_OCL_ERROR(err, __FILE__, __LINE__); int *host_offset = NULL; allocate_host(nrow+1, &host_offset); ocl_dev2host(nrow+1, row_offset, host_offset, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); host_offset[0] = 0; for (int i=0; i<nrow; ++i) host_offset[i+1] += host_offset[i]; int nnz = host_offset[nrow]; ocl_host2dev(nrow+1, host_offset, row_offset, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue); allocate_ocl(nnz, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &col); allocate_ocl(nnz, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_context, &val); err = ocl_kernel<ValueType>(CL_KERNEL_CSR_REPLACE_COLUMN_VECTOR, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->mat_.row_offset, this->mat_.col, this->mat_.val, nrow, idx, cast_vec->vec_, row_offset, col, val); CHECK_OCL_ERROR(err, __FILE__, __LINE__); this->Clear(); this->nrow_ = nrow; this->ncol_ = ncol; this->nnz_ = nnz; this->mat_.row_offset = row_offset; this->mat_.col = col; this->mat_.val = val; } return true; } template <typename ValueType> bool OCLAcceleratorMatrixCSR<ValueType>::ExtractColumnVector(const int idx, BaseVector<ValueType> *vec) const { if (this->nnz_ > 0) { assert (idx >= 0); assert (vec != NULL); assert (vec->get_size() == this->nrow_); OCLAcceleratorVector<ValueType> *cast_vec = dynamic_cast<OCLAcceleratorVector<ValueType>*> (vec); assert (cast_vec != NULL); size_t LocalSize = this->local_backend_.OCL_max_work_group_size; size_t GlobalSize = (this->nrow_ / LocalSize + 1) * LocalSize; cl_int err = ocl_kernel<ValueType>(CL_KERNEL_CSR_EXTRACT_COLUMN_VECTOR, OCL_HANDLE(this->local_backend_.OCL_handle)->OCL_cmdQueue, LocalSize, GlobalSize, this->mat_.row_offset, this->mat_.col, this->mat_.val, this->nrow_, idx, cast_vec->vec_); CHECK_OCL_ERROR(err, __FILE__, __LINE__); } return true; } template class OCLAcceleratorMatrixCSR<double>; template class OCLAcceleratorMatrixCSR<float>; }
[ "skakarla@amd.com" ]
skakarla@amd.com
1c55c42ed5dfa8a989d351b51d39467549f65518
84fb8481f94965925f7bb8b12d84a3b4624d2c9c
/LifeBrush/Source/LifeBrush/Tools/RegionGrowingTool.h
69484575d7b7710f7d2f27577e6cd37094629f96
[ "MIT" ]
permissive
PeterZhouSZ/LifeBrush
64d3a5330d078bd7f5f3dec7029f8f1d6b7be6d3
dbc65bcc0ec77f9168e08cf7b39539af94420725
refs/heads/master
2022-07-12T07:43:52.701152
2020-04-12T00:34:25
2020-04-12T00:34:25
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,669
h
// Copyright 2018, Timothy Davison. All rights reserved. #pragma once #include "VRTool.h" #include "RegionGrowingToolInit.h" #include "RegionGrowingTool.generated.h" UENUM( BlueprintType ) enum class EGenerativeTickMode : uint8 { Generating, Erasing, }; UENUM( BlueprintType ) enum class EGenerativeDrawMode : uint8 { Volumetric, Surface }; UENUM(BlueprintType) enum class EAutomaticDrawMode : uint8 { Disabled, ByNearestSurface, ByElementHint }; UINTERFACE( BlueprintType ) class UGenerativeBrushToolDelegate : public UInterface { GENERATED_BODY() }; class IGenerativeBrushToolDelegate { GENERATED_BODY() public: UFUNCTION( BlueprintCallable, BlueprintImplementableEvent, Category = "LifeBrush" ) void setGenerativeBrush( class UGenerativeBrushTool * brush ); UFUNCTION( BlueprintCallable, BlueprintImplementableEvent, Category = "LifeBrush" ) void didChangeDrawMode(EGenerativeDrawMode newMode, EGenerativeDrawMode oldMode ); UFUNCTION( BlueprintCallable, BlueprintImplementableEvent, Category = "LifeBrush" ) void didChangeTickMode( EGenerativeTickMode newMode, EGenerativeTickMode oldMode ); }; UCLASS( Blueprintable ) class UGenerativeBrushTool : public UBrushTool { GENERATED_BODY() public: virtual ~UGenerativeBrushTool(); UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Automatic Draw Mode") EAutomaticDrawMode automaticDrawMode = EAutomaticDrawMode::Disabled; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Automatic Draw Mode") float minSurfaceDistanceThreshold = 10.0f; // If we start painting within this minimum distance, we will start painting in surface mode. UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "LifeBrush", meta = (MustImplement="GenerativeBrushToolDelegate") ) TSubclassOf<class UUserWidget> widgetClass; UPROPERTY( EditAnywhere, BlueprintReadWrite, Category = "LifeBrush", meta = (MustImplement = "GenerativeBrushToolDelegate") ) TSubclassOf<class UUserWidget> selectionPointWidgetClass; virtual TSubclassOf<class UUserWidget> getWidgetClass() { return widgetClass; } virtual TSubclassOf<class UUserWidget> getSelectionWidgetClass() { return selectionPointWidgetClass; } public: UFUNCTION( BlueprintCallable, Category = Generation ) void setDrawMode(EGenerativeDrawMode mode ); UFUNCTION( BlueprintCallable, Category = Generation ) EGenerativeDrawMode getDrawMode() { return _drawMode; } UFUNCTION( BlueprintCallable, Category = Generation ) void setTickMode( EGenerativeTickMode mode ); UFUNCTION( BlueprintCallable, Category = Generation ) EGenerativeTickMode getTickMode() { return _tickMode; } public: void init(FRGC_UToolInitProperties& initProperties) { UTool::init(initProperties); } virtual void gainFocus() override; virtual void twoHandStart( UPrimitiveComponent * handA, UPrimitiveComponent * handB ) override {} virtual void twoHandEnd( UPrimitiveComponent * handA, UPrimitiveComponent * handB ) override {} virtual void tickTwoHand ( float dt, UPrimitiveComponent * handA, UPrimitiveComponent * handB, FTransform transformA, FTransform transformB ) override {} virtual void faceDown_released() override; virtual void faceUp_released(USceneComponent * interactionPoint = nullptr) override; protected: EGenerativeDrawMode _drawMode = EGenerativeDrawMode::Volumetric; EGenerativeTickMode _tickMode = EGenerativeTickMode::Generating; }; UCLASS(Blueprintable) class URegionGrowing_GenerativeBrushTool : public UGenerativeBrushTool { GENERATED_BODY() public: virtual ~URegionGrowing_GenerativeBrushTool(); URegionGrowingComponent * regionGrowingComponent = nullptr; public: void init(FRGC_UToolInitProperties& initProperties) { UTool::init(initProperties); regionGrowingComponent = initProperties.regionGrowingComponent; } virtual void gainFocus() override; virtual void loseFocus() override; virtual void oneHandStart( UPrimitiveComponent * hand ) override; virtual void oneHandEnd( UPrimitiveComponent * hand ) override; virtual void twoHandStart( UPrimitiveComponent * handA, UPrimitiveComponent * handB ) override {} virtual void twoHandEnd( UPrimitiveComponent * handA, UPrimitiveComponent * handB ) override {} virtual void tickOneHand( float dt, UPrimitiveComponent * hand, FTransform lastTransform ) override; virtual void tickTwoHand ( float dt, UPrimitiveComponent * handA, UPrimitiveComponent * handB, FTransform transformA, FTransform transformB ) override {} protected: void _tickOneHand_generate( float dt, UPrimitiveComponent * hand, FTransform lastTransform ); void _tickOneHand_erase( float dt, UPrimitiveComponent * hand, FTransform lastTransform ); };
[ "timtimmy@gmail.com" ]
timtimmy@gmail.com
b048e7bf4089dd5c77a5c06c46023e005d34e505
21da454a8f032d6ad63ca9460656c1e04440310e
/src/wcpp/net/wscNetworkLibrary.h
55e7f07bdbc9c03d7b480964032987ed607ff98b
[]
no_license
merezhang/wcpp
d9879ffb103513a6b58560102ec565b9dc5855dd
e22eb48ea2dd9eda5cd437960dd95074774b70b0
refs/heads/master
2021-01-10T06:29:42.908096
2009-08-31T09:20:31
2009-08-31T09:20:31
46,339,619
0
0
null
null
null
null
UTF-8
C++
false
false
1,627
h
#pragma once #include <wcpp/wspr/ws_id.h> #include <wcpp/wscom/wscFactory.h> #include "wsiNetworkLibrary.h" #include "wsiDatagramSocketImplFactory.h" #include "wsiAddressImplFactory.h" #define WS_ClassName_OF_wscNetworkLibrary "wcpp.net.wscNetworkLibrary" #define WS_ContractID_OF_wscNetworkLibrary "@worldscale.net/network;1" #define WS_CID_OF_wscNetworkLibrary \ { 0x379c9069, 0x554a, 0x41bb, { 0x97, 0xad, 0x7f, 0x92, 0x9a, 0x19, 0xaf, 0x3a } } // {379C9069-554A-41bb-97AD-7F929A19AF3A} class wscNetworkLibrary : public wscObject , public wsiNetworkLibrary { WS_IMPL_QUERY_INTERFACE_BEGIN( wscNetworkLibrary ) WS_IMPL_QUERY_INTERFACE_BODY( wsiNetworkLibrary ) WS_IMPL_QUERY_INTERFACE_END() public: public: static const ws_cid sCID; static const ws_char * const sContractID; static const ws_char * const s_class_name; private: ws_safe_ptr<wsiDatagramSocketImplFactory> m_DatagramSocketImplFactory; ws_safe_ptr<wsiAddressImplFactory> m_AddressImplFactory; public: static ws_result GetNetworkLibrary(wsiNetworkLibrary ** ret); protected: ws_result InternalSetDatagramSocketImplFactory(wsiDatagramSocketImplFactory * aImplFactory); ws_result InternalSetAddressImplFactory(wsiAddressImplFactory * aImplFactory); protected: WS_METHOD( ws_result , GetAddressImplFactory )(wsiAddressImplFactory ** ret); WS_METHOD( ws_result , GetDatagramSocketImplFactory )(wsiDatagramSocketImplFactory ** ret); WS_METHOD( ws_result , SetDatagramSocketImplFactory )(wsiDatagramSocketImplFactory * aImplFactory); };
[ "xukun0217@98f29a9a-77f1-11de-91f8-ab615253d9e8" ]
xukun0217@98f29a9a-77f1-11de-91f8-ab615253d9e8
9062f1ec11507eccfd5a38749462b30372007a8f
89dedd7f3c7acc81d12e2bcb2e716f9af9e5fa04
/ash/display/display_color_manager_chromeos_unittest.cc
36314933729ee3748dc38f1b8b6381b04b1a1263
[ "BSD-3-Clause" ]
permissive
bino7/chromium
8d26f84a1b6e38a73d1b97fea6057c634eff68cb
4666a6bb6fdcb1114afecf77bdaa239d9787b752
refs/heads/master
2022-12-22T14:31:53.913081
2016-09-06T10:05:11
2016-09-06T10:05:11
67,410,510
1
3
BSD-3-Clause
2022-12-17T03:08:52
2016-09-05T10:11:59
null
UTF-8
C++
false
false
13,247
cc
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ash/display/display_color_manager_chromeos.h" #include "base/files/file_util.h" #include "base/memory/scoped_vector.h" #include "base/message_loop/message_loop.h" #include "base/path_service.h" #include "base/run_loop.h" #include "base/strings/pattern.h" #include "base/test/scoped_path_override.h" #include "base/test/sequenced_worker_pool_owner.h" #include "chromeos/chromeos_paths.h" #include "components/quirks/quirks_manager.h" #include "net/url_request/url_request_context_getter.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/display/chromeos/test/action_logger_util.h" #include "ui/display/chromeos/test/test_display_snapshot.h" #include "ui/display/chromeos/test/test_native_display_delegate.h" namespace ash { namespace { const char kResetGammaAction[] = "*set_color_correction(id=123)"; const char kSetGammaAction[] = "set_color_correction(id=123,gamma[0]*gamma[255]=???????????\?)"; const char kSetFullCTMAction[] = "set_color_correction(id=123,degamma[0]*gamma[0]*ctm[0]*ctm[8]*)"; class DisplayColorManagerForTest : public DisplayColorManager { public: DisplayColorManagerForTest(ui::DisplayConfigurator* configurator, base::SequencedWorkerPool* blocking_pool) : DisplayColorManager(configurator, blocking_pool) {} void SetOnFinishedForTest(base::Closure on_finished_for_test) { on_finished_for_test_ = on_finished_for_test; } private: void FinishLoadCalibrationForDisplay(int64_t display_id, int64_t product_id, bool has_color_correction_matrix, ui::DisplayConnectionType type, const base::FilePath& path, bool file_downloaded) override { DisplayColorManager::FinishLoadCalibrationForDisplay( display_id, product_id, has_color_correction_matrix, type, path, file_downloaded); // If path is empty, there is no icc file, and the DCM's work is done. if (path.empty() && !on_finished_for_test_.is_null()) { on_finished_for_test_.Run(); on_finished_for_test_.Reset(); } } void UpdateCalibrationData( int64_t display_id, int64_t product_id, std::unique_ptr<ColorCalibrationData> data) override { DisplayColorManager::UpdateCalibrationData(display_id, product_id, std::move(data)); if (!on_finished_for_test_.is_null()) { on_finished_for_test_.Run(); on_finished_for_test_.Reset(); } } base::Closure on_finished_for_test_; DISALLOW_COPY_AND_ASSIGN(DisplayColorManagerForTest); }; // Implementation of QuirksManager::Delegate to fake chrome-restricted parts. class QuirksManagerDelegateTestImpl : public quirks::QuirksManager::Delegate { public: QuirksManagerDelegateTestImpl(base::FilePath color_path) : color_path_(color_path) {} // Unused by these tests. std::string GetApiKey() const override { return std::string(); } base::FilePath GetBuiltInDisplayProfileDirectory() const override { return color_path_; } // Unused by these tests. base::FilePath GetDownloadDisplayProfileDirectory() const override { return base::FilePath(); } // |false| prevents attempts at Quirks Server contact. bool DevicePolicyEnabled() const override { return false; } private: ~QuirksManagerDelegateTestImpl() override = default; base::FilePath color_path_; DISALLOW_COPY_AND_ASSIGN(QuirksManagerDelegateTestImpl); }; } // namespace class DisplayColorManagerTest : public testing::Test { public: void SetUp() override { pool_owner_.reset( new base::SequencedWorkerPoolOwner(3, "DisplayColorManagerTest")); log_.reset(new ui::test::ActionLogger()); native_display_delegate_ = new ui::test::TestNativeDisplayDelegate(log_.get()); configurator_.SetDelegateForTesting( std::unique_ptr<ui::NativeDisplayDelegate>(native_display_delegate_)); color_manager_.reset(new DisplayColorManagerForTest( &configurator_, pool_owner_->pool().get())); EXPECT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &color_path_)); color_path_ = color_path_.Append(FILE_PATH_LITERAL("ash")) .Append(FILE_PATH_LITERAL("display")) .Append(FILE_PATH_LITERAL("test_data")); path_override_.reset(new base::ScopedPathOverride( chromeos::DIR_DEVICE_COLOR_CALIBRATION_PROFILES, color_path_)); quirks::QuirksManager::Initialize( std::unique_ptr<quirks::QuirksManager::Delegate>( new QuirksManagerDelegateTestImpl(color_path_)), pool_owner_->pool().get(), nullptr, nullptr); } void TearDown() override { quirks::QuirksManager::Shutdown(); pool_owner_->pool()->Shutdown(); } void WaitOnColorCalibration() { base::RunLoop run_loop; color_manager_->SetOnFinishedForTest(run_loop.QuitClosure()); run_loop.Run(); } DisplayColorManagerTest() : test_api_(&configurator_) {} ~DisplayColorManagerTest() override {} protected: std::unique_ptr<base::ScopedPathOverride> path_override_; base::FilePath color_path_; std::unique_ptr<ui::test::ActionLogger> log_; ui::DisplayConfigurator configurator_; ui::DisplayConfigurator::TestApi test_api_; ui::test::TestNativeDisplayDelegate* native_display_delegate_; // not owned std::unique_ptr<DisplayColorManagerForTest> color_manager_; base::MessageLoopForUI ui_message_loop_; std::unique_ptr<base::SequencedWorkerPoolOwner> pool_owner_; private: DISALLOW_COPY_AND_ASSIGN(DisplayColorManagerTest); }; TEST_F(DisplayColorManagerTest, VCGTOnly) { std::vector<std::unique_ptr<const ui::DisplayMode>> modes; ui::DisplayMode mode(gfx::Size(1024, 768), false, 60.0f); modes.push_back(mode.Clone()); const ui::DisplayMode* mode_ptr = modes.back().get(); ui::TestDisplaySnapshot snapshot( 123, gfx::Point(0, 0), /* origin */ gfx::Size(0, 0), /* physical_size */ ui::DISPLAY_CONNECTION_TYPE_INTERNAL, /* type */ false, /* is_aspect_preserving_scaling */ 0x06af5c10, /* product_id */ false, /* has_color_correction_matrix */ std::move(modes), /* modes */ mode_ptr /* current_mode */, mode_ptr /* native_mode */); std::vector<ui::DisplaySnapshot*> outputs; outputs.push_back(&snapshot); native_display_delegate_->set_outputs(outputs); configurator_.OnConfigurationChanged(); EXPECT_TRUE(test_api_.TriggerConfigureTimeout()); EXPECT_TRUE( base::MatchPattern(log_->GetActionsAndClear(), kResetGammaAction)); WaitOnColorCalibration(); EXPECT_TRUE(base::MatchPattern(log_->GetActionsAndClear(), kSetGammaAction)); } TEST_F(DisplayColorManagerTest, VCGTOnlyWithPlatformCTM) { std::vector<std::unique_ptr<const ui::DisplayMode>> modes; ui::DisplayMode mode(gfx::Size(1024, 768), false, 60.0f); modes.push_back(mode.Clone()); const ui::DisplayMode* mode_ptr = modes.back().get(); ui::TestDisplaySnapshot snapshot( 123, gfx::Point(0, 0), /* origin */ gfx::Size(0, 0), /* physical_size */ ui::DISPLAY_CONNECTION_TYPE_INTERNAL, /* type */ false, /* is_aspect_preserving_scaling */ 0x06af5c10, /* product_id */ true, /* has_color_correction_matrix */ std::move(modes), /* modes */ mode_ptr /* current_mode */, mode_ptr /* native_mode */); std::vector<ui::DisplaySnapshot*> outputs; outputs.push_back(&snapshot); native_display_delegate_->set_outputs(outputs); log_->GetActionsAndClear(); configurator_.OnConfigurationChanged(); EXPECT_TRUE(test_api_.TriggerConfigureTimeout()); EXPECT_TRUE( base::MatchPattern(log_->GetActionsAndClear(), kResetGammaAction)); WaitOnColorCalibration(); EXPECT_TRUE(base::MatchPattern(log_->GetActionsAndClear(), kSetGammaAction)); } TEST_F(DisplayColorManagerTest, FullWithPlatformCTM) { std::vector<std::unique_ptr<const ui::DisplayMode>> modes; ui::DisplayMode mode(gfx::Size(1024, 768), false, 60.0f); modes.push_back(mode.Clone()); const ui::DisplayMode* mode_ptr = modes.back().get(); ui::TestDisplaySnapshot snapshot( 123, gfx::Point(0, 0), /* origin */ gfx::Size(0, 0), /* physical_size */ ui::DISPLAY_CONNECTION_TYPE_INTERNAL, /* type */ false, /* is_aspect_preserving_scaling */ 0x4c834a42, /* product_id */ true, /* has_color_correction_matrix */ std::move(modes), /* modes */ mode_ptr /* current_mode */, mode_ptr /* native_mode */); std::vector<ui::DisplaySnapshot*> outputs; outputs.push_back(&snapshot); native_display_delegate_->set_outputs(outputs); configurator_.OnConfigurationChanged(); EXPECT_TRUE(test_api_.TriggerConfigureTimeout()); EXPECT_TRUE( base::MatchPattern(log_->GetActionsAndClear(), kResetGammaAction)); WaitOnColorCalibration(); EXPECT_TRUE( base::MatchPattern(log_->GetActionsAndClear(), kSetFullCTMAction)); } TEST_F(DisplayColorManagerTest, FullWithoutPlatformCTM) { std::vector<std::unique_ptr<const ui::DisplayMode>> modes; ui::DisplayMode mode(gfx::Size(1024, 768), false, 60.0f); modes.push_back(mode.Clone()); const ui::DisplayMode* mode_ptr = modes.back().get(); ui::TestDisplaySnapshot snapshot( 123, gfx::Point(0, 0), /* origin */ gfx::Size(0, 0), /* physical_size */ ui::DISPLAY_CONNECTION_TYPE_INTERNAL, /* type */ false, /* is_aspect_preserving_scaling */ 0x4c834a42, /* product_id */ false, /* has_color_correction_matrix */ std::move(modes), /* modes */ mode_ptr /* current_mode */, mode_ptr /* native_mode */); std::vector<ui::DisplaySnapshot*> outputs; outputs.push_back(&snapshot); native_display_delegate_->set_outputs(outputs); configurator_.OnConfigurationChanged(); EXPECT_TRUE(test_api_.TriggerConfigureTimeout()); EXPECT_TRUE( base::MatchPattern(log_->GetActionsAndClear(), kResetGammaAction)); WaitOnColorCalibration(); EXPECT_STREQ("", log_->GetActionsAndClear().c_str()); } TEST_F(DisplayColorManagerTest, NoMatchProductID) { std::vector<std::unique_ptr<const ui::DisplayMode>> modes; ui::DisplayMode mode(gfx::Size(1024, 768), false, 60.0f); modes.push_back(mode.Clone()); const ui::DisplayMode* mode_ptr = modes.back().get(); ui::TestDisplaySnapshot snapshot( 123, gfx::Point(0, 0), /* origin */ gfx::Size(0, 0), /* physical_size */ ui::DISPLAY_CONNECTION_TYPE_INTERNAL, /* type */ false, /* is_aspect_preserving_scaling */ 0, /* product_id */ false, /* has_color_correction_matrix */ std::move(modes), /* modes */ mode_ptr /* current_mode */, mode_ptr /* native_mode */); std::vector<ui::DisplaySnapshot*> outputs; outputs.push_back(&snapshot); native_display_delegate_->set_outputs(outputs); configurator_.OnConfigurationChanged(); EXPECT_TRUE(test_api_.TriggerConfigureTimeout()); EXPECT_TRUE( base::MatchPattern(log_->GetActionsAndClear(), kResetGammaAction)); WaitOnColorCalibration(); EXPECT_STREQ("", log_->GetActionsAndClear().c_str()); } TEST_F(DisplayColorManagerTest, NoVCGT) { std::vector<std::unique_ptr<const ui::DisplayMode>> modes; ui::DisplayMode mode(gfx::Size(1024, 768), false, 60.0f); modes.push_back(mode.Clone()); const ui::DisplayMode* mode_ptr = modes.back().get(); ui::TestDisplaySnapshot snapshot( 123, gfx::Point(0, 0), /* origin */ gfx::Size(0, 0), /* physical_size */ ui::DISPLAY_CONNECTION_TYPE_INTERNAL, /* type */ false, /* is_aspect_preserving_scaling */ 0x0dae3211, /* product_id */ false, /* has_color_correction_matrix */ std::move(modes), /* modes */ mode_ptr /* current_mode */, mode_ptr /* native_mode */); std::vector<ui::DisplaySnapshot*> outputs; outputs.push_back(&snapshot); native_display_delegate_->set_outputs(outputs); configurator_.OnConfigurationChanged(); EXPECT_TRUE(test_api_.TriggerConfigureTimeout()); EXPECT_TRUE( base::MatchPattern(log_->GetActionsAndClear(), kResetGammaAction)); WaitOnColorCalibration(); EXPECT_STREQ("", log_->GetActionsAndClear().c_str()); } } // namespace ash
[ "bino.zh@gmail.com" ]
bino.zh@gmail.com
88409f89362af8d059e39de9d2a6215ca1cae220
4678c8eefa11d62b8b40ccfc8fb67e3ce8b50d18
/Classes/GameScene/Powerups/TimeFreezerBird.cpp
a6375273f811df255459a99af6bb2aff8d6b7970
[]
no_license
hasan-kamal/Smashball
c3d441a4a230683172ad622ab2a6d7f09932ce14
95b9bdf55bf1af8a569c38b3f3493352a2604e82
refs/heads/master
2020-07-22T11:39:30.792632
2019-09-10T05:41:51
2019-09-10T05:41:51
207,188,632
0
0
null
null
null
null
UTF-8
C++
false
false
2,635
cpp
// // TimeFreezerBird.cpp // SmashballBox2dPreBeta // // Created by Hasan Kamal on 02/08/16. // // #include "TimeFreezerBird.hpp" #include <iostream> using namespace std; TimeFreezerBird::TimeFreezerBird(Layer *parentCocosLayer, float worldToPixelScale, Vec2 haltPositionVector, GameScene *gameSceneCaller){ this->gameScene = gameSceneCaller; this->stopPos = haltPositionVector; auto origin = Director::getInstance()->getVisibleOrigin(); auto visibleSize = Director::getInstance()->getVisibleSize(); SpriteBatchNode* spritebatch = SpriteBatchNode::create("bird_left_spritesheet.png"); // load the Sprite Sheet auto spritecache = SpriteFrameCache::getInstance(); // the .plist file can be generated with any of the tools mentioned below spritecache->addSpriteFramesWithFile("bird_left_spritesheet.plist"); mysprite = Sprite::createWithSpriteFrameName("bird1.png"); mysprite->setAnchorPoint(Vec2(0, 1.0)); mysprite->setPosition(Vec2(origin.x+visibleSize.width, stopPos.y)); mysprite->setScale(this->heightInWorld*worldToPixelScale/mysprite->getContentSize().height); spritebatch->addChild(mysprite); parentCocosLayer->addChild(spritebatch, 6); cocos2d::Vector<SpriteFrame*> animFrames(8); char str[100] = {0}; for(int i = 1; i < 8; i++) { sprintf(str, "bird%d.png", i); SpriteFrame* frame = spritecache->getSpriteFrameByName( str ); animFrames.pushBack(frame); } Animation* animation = Animation::createWithSpriteFrames(animFrames, 0.10f); mysprite->runAction( RepeatForever::create( Animate::create(animation) ) ); } TimeFreezerBird::~TimeFreezerBird(){ cout<<"TimeFreezerBird has been destructed"<<endl; } void TimeFreezerBird::updateState(float dt, float worldToPixelScale){ } void TimeFreezerBird::startPowerup(){ auto visibleSize = Director::getInstance()->getVisibleSize(); auto origin = Director::getInstance()->getVisibleOrigin(); float speed = (visibleSize.width-stopPos.x)/3.0; auto moveInAction = MoveTo::create(3.0, stopPos); this->mysprite->runAction(moveInAction); auto callbackHalt = CallFunc::create([this](){ this->gameScene->haltTimerForSeconds(5.0); }); auto moveOutAction = MoveBy::create((mysprite->getContentSize().width+stopPos.x-origin.x)/speed, Vec2(-1*(mysprite->getContentSize().width+stopPos.x-origin.x), 0)); auto delay = DelayTime::create(5.0); auto seq = Sequence::create(moveInAction, callbackHalt, delay, moveOutAction, nullptr); mysprite->runAction(seq); }
[ "hasankamal007@gmail.com" ]
hasankamal007@gmail.com
9658f39cb9eec74467e0decbeedf8307a39aba1c
152e68f0d96f5f8147aa0f207bd77dde85b4d0ae
/AtCoder(151,152,153)/AtCoder153F.cpp
84e694f492d5c2355244e5794a64d8c3461b2994
[]
no_license
MatijaEskicWork/Algorithmic-Problems
904d08e297b66a2827e2b38b7bb77ce3a4db51d8
b5fd4182b23df64b241e089b9341261c5cb6e21c
refs/heads/master
2023-08-28T20:41:40.132887
2021-11-16T00:32:35
2021-11-16T00:32:35
257,648,823
1
0
null
null
null
null
UTF-8
C++
false
false
1,914
cpp
#include <bits/stdc++.h> using namespace std; #define MOD7 1000000007 #define MOD9 1e9 + 9 #define SCD(t) scanf("%d",&t) #define SCLD(t) scanf("%ld",&t) #define SCLLD(t) scanf("%lld",&t) #define SCC(t) scanf("%c",&t) #define SCS(t) scanf("%s",t) #define SCF(t) scanf("%f",&t) #define SCLF(t) scanf("%lf",&t) #define MEM(a, b) memset(a, (b), sizeof(a)) typedef long long ll; typedef long double ld; typedef string str; typedef double d; typedef unsigned u; typedef unsigned long long ull; const long long BIGINF = 2e18 + 7; const int INF = 2e9 + 7; long long dp[200005]; vector<pair<int, int>> v; int binSearch(int target,int low, int high) { int ans = -1; while (low <= high) { int mid = low + (high - low)/2; if (v[mid].first == target) return mid; else if (v[mid].first < target) { ans = max(mid, ans); low = mid + 1; } else high = mid - 1; } return ans; } int main () { #ifndef ONLINE_JUDGE freopen("inputf.txt", "r", stdin); freopen("outputf.txt", "w", stdout); #endif int n, range, damage; SCD(n); SCD(range); SCD(damage); int x, h; for (int i = 0; i < n; i++) { SCD(x); SCD(h); v.emplace_back(x, h); } sort(v.begin(), v.end()); long long ans = 0; for (int i = 0; i < n; i++) { //printf("%d %d\n", v[i].first, v[i].second); dp[i] = dp[i] + (i > 0? dp[i - 1] : 0); printf("dp[%d] = %lld, ", i, dp[i]); if (v[i].second - dp[i] <= 0) { puts(""); continue; } v[i].second -= dp[i]; long long dam = v[i].second / damage; if (v[i].second % damage != 0) dam++; ans += dam; dam = 1LL * dam * damage; int end = binSearch(v[i].first + range*2, i, n-1); printf("end = %d ", end); end = (end != -1? end + 1: n); dp[i] += dam; dp[end] -= dam; printf("ans = %lld, dam = %lld, end = %d\n", ans, dam, end); } printf("%lld\n", ans); return 0; }
[ "noreply@github.com" ]
noreply@github.com
6da825a35e511eda94281c8c68e44dd47003fc49
ba9aef6b97c46d9a314b21857c836438a6d91aa1
/SLP-dev/AdditionOp.cpp
93e9ddbf8f66271aee798f93df78814563e7cd03
[]
no_license
matthewniemerg/b2
f92ac9fbe10558bd9f10de6dbd4c57c28cd0e8de
c4fdf3855b8ece3c530c7d87d4c9adbce413e5a5
refs/heads/master
2021-01-18T14:44:03.165135
2014-04-15T17:02:13
2014-04-15T17:02:13
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,315
cpp
// // AdditionOp.cpp // Bertini2 // // Created by James Collins on 11/19/13. // Copyright (c) 2013 James Collins. All rights reserved. // #include "LeafOperand.h" #include "AdditionOp.h" #include <string> #include <cstring> #include <sstream> AdditionOp::AdditionOp(int nOperands, std::vector<Operand*> inOperands) { numOperands = nOperands; operands = inOperands; isExp = false; } double AdditionOp::evaluate(double* vars) { double retval = 0; for(int ii = 0; ii < numOperands; ii++) { if(operands[ii]->IsLeaf()) { retval += operands[ii]->evaluate(vars); } else { retval += operands[ii]->evaluate(vars); } } return retval; } std::string AdditionOp::print() { std::stringstream ret; /* if(operands.size() > 0) { std::stringstream term; term << operands[0]->print().str(); ret << term.str(); for(int ii = 1; ii < operands.size(); ii++) { // term.str(""); // term << ( operands[ii]->print().str() ); ret << " + " << term.str(); } } */ for (int ii = 0; ii < operands.size(); ++ii){ ret << operands[ii]->print() << (operands.size() > 1 && ii != operands.size() - 1 ? " + " : "" ); } return ret.str(); }
[ "matthewniemerg@Matthews-MacBook-Pro-2.local" ]
matthewniemerg@Matthews-MacBook-Pro-2.local
6ea56bee3568a93543b933dfb17ca66af58e810c
cddeddc8b3e0f4a53be49507a4bc57707021d153
/00-prewritten_algorithms/log.cpp
20a11cb8191f353e86755f1858e20655241fd1ed
[]
no_license
clarencekks/Codility-1
d02264ba367fc2b2ce5accb84e0638b8ee6f722d
02c2e19fe1ab1a32d84e3a9e4e8a8cdb155a8431
refs/heads/master
2023-01-19T19:08:19.176917
2020-11-26T10:46:17
2020-11-26T10:46:17
null
0
0
null
null
null
null
UTF-8
C++
false
false
105
cpp
#define debug #ifdef debug #define LOG(X) cout << X << endl #else #define LOG(X) (void)0 #endif
[ "vocabmonster.ir@gmail.com" ]
vocabmonster.ir@gmail.com
109fa34d68e00c487e210e10b53bda5fffa3ef98
a2111a80faf35749d74a533e123d9da9da108214
/raw/pmbs12/pmsb13-data-20120615/sources/brbym28nz827lxic/776/sandbox/meyerclp/apps/dreme/dreme.h
a7ef9b19e6899ee8d99210fc83c793c66e463408
[ "MIT" ]
permissive
bkahlert/seqan-research
f2c550d539f511825842a60f6b994c1f0a3934c2
21945be863855077eec7cbdb51c3450afcf560a3
refs/heads/master
2022-12-24T13:05:48.828734
2015-07-01T01:56:22
2015-07-01T01:56:22
21,610,669
1
0
null
null
null
null
UTF-8
C++
false
false
64,916
h
#ifndef SANDBOX_MEYERCLP_APPS_DREME_H_ #define SANDBOX_MEYERCLP_APPS_DREME_H_ #include <fstream> #include <iostream> #include <map> #include <vector> #include <math.h> #include <stdlib.h> #include <seqan/basic.h> #include <seqan/file.h> #include <seqan/find.h> #include <seqan/stream.h> #include <seqan/find_motif.h> #include <seqan/index.h> #include <seqan/sequence.h> #include <seqan/misc/misc_interval_tree.h> using namespace seqan; struct Seq { StringSet<CharString> ids; unsigned c; // Anzahl der Motive, provisorisch StringSet<String<Dna5> > seqs;// Index< StringSet<String<Dna5> > > SArray; unsigned seed; unsigned int SeqsNumber; std::map<String<Dna5>,unsigned int > seqCounter;//maps the Sequence-Kmere to a Counter for the Sequence std::map<String<Iupac>,unsigned int> generalizedKmer; std::map<String<Iupac>,double > SortedPValueReversed; std::multimap<double,String<Dna5> > SortedPValue; std::multimap<double,String<Iupac> > generalizedSortedPValue; std::map<unsigned int,std::map<Iupac,double> > freqMatrix; String< std::map<unsigned int,std::map<Iupac,double> > > allPWMs; std::map<unsigned int,std::map<Iupac,double> > weightMatrix; std::map<unsigned int, double > seqLogoMatrix; std::map<unsigned int, double > columnEntropy; std::map<unsigned int,std::map<Iupac,double> > InformationContentMatrix; FrequencyDistribution<Dna5> frequencies; /** In BuildFrequencyMatrix werden die gefundenen Intervalle des Top-Motivs an Intervalls gehängt Am Ende der while wird dann ein IntervallTree für jede Sequenz erzeugt, sodass im nächsten Schritt direkt geschaut werden kann ob ein Motiv mit einem schon gefundenen überlappt **/ typedef IntervalAndCargo<unsigned, unsigned> TInterval; String<String<TInterval> > intervals;//String<TInterval> enthält alle Intervalle einer Sequenz. String<String<..>> enthält alle Sequenzen String<IntervalTree<unsigned> > intervalTrees; // Tree für schnellere Suche erstellen --> String von Trees, da mehrere Sequenzen String<unsigned> results; double pValue; }; struct IupacMaps { std::map<unsigned int,char> IupacMap; std::map<char,unsigned int> IupacMapReversed; std::map<char,String<Iupac> > IupacMapReplace; //stores the replacement-chars std::map<char,String<Dna5> > IupacMapReplaceReversed; std::map<String<Dna5>, char > IupacMapInversed; }; struct Cluster { unsigned left; unsigned right; String<int> content; double Dr; }; struct Euklidisch_; typedef Tag<Euklidisch_> Euklidisch; struct Pearson_; typedef Tag<Pearson_> Pearson; struct Mahalanobis_; typedef Tag<Mahalanobis_> Mahalanobis; struct Entropy_; typedef Tag<Entropy_> Entropy; struct CompleteLinkage_; typedef Tag<CompleteLinkage_> CompleteLinkage; struct SingleLinkage_; typedef Tag<SingleLinkage_> SingleLinkage; struct AverageLinkage_; typedef Tag<AverageLinkage_> AverageLinkage; void readFastA(struct Seq &seq, CharString fname); template <typename TStream> void PrintFastA(TStream & stream, Seq &seq); void initST(Seq &seq); void PrintST(Seq &seq); void priorFreq(Seq &seq); void initExactKmer(Seq &seq,Seq &back,unsigned int kmer_len,unsigned int kmer_len_end); void CountKmer(Seq &seq, Finder<Index<StringSet<String<Dna5> > > > &finder, String<Dna5> &Kmer); void CountKmer(std::map<String<Iupac>,unsigned int > &Dna5CounterMap, Finder<Index<StringSet<String<Iupac> > > > &finder, String<Iupac> &Kmer,Seq &seq,IupacMaps &IMap); void PrintMap(std::map<String<Dna5>,unsigned int > &Dna5CounterMap,unsigned int SeqsNumber); void PrintMap(std::map<String<Iupac>,unsigned int > &Dna5CounterMap,unsigned int SeqsNumber); void PrintMap(std::multimap<double,String<Dna5> > &pValueMap); void PrintMap(std::map<String<Iupac>,unsigned int> &generalizedKmer); void PrintMap(Seq &seq,bool foreground); void DebugMap(Seq &seq,Seq &back,std::map<String<Dna5>,unsigned int > &sequencesCounter,std::map<String<Dna5>,unsigned int > &backgroundCounter); void DebugMultiMap(std::map<String<Dna5>,unsigned int > &sequencesCounter,std::multimap<double,String<Dna5> > &SortedPValue); double* logFac; void logFactorial(unsigned int len); double calcFET(unsigned int a,unsigned int b,unsigned int c,unsigned int d); void modifyFET(unsigned int a,unsigned int b,unsigned int c,unsigned int d, double &pValue); void DebugFisherExact(unsigned int a,unsigned int b,unsigned int c,unsigned int d); void FisherExactTest(Seq &seq, Seq &back); void FisherExactTest(std::map<String<Iupac>,unsigned int > &SequenceCounter,std::map<String<Iupac>,unsigned int > &BackgroundCounter, Seq &seq, Seq &back); double FisherExactTest(Seq &seq, Seq &back,std::multimap<double,String<Dna5> > &GeneralizedSortedPValueTemp); void MapIupac(IupacMaps &IMaps); void InitGeneralization(IupacMaps &IMaps,Seq &seq, Seq &back); void loopOverKmer(Seq &seq,String<Iupac> &temp,String<Iupac> &Kmer,Iterator<String<Iupac> >::Type &tempIt,Finder<Index<StringSet<String<Dna5> > > > &finder,unsigned int &counter,std::vector<int> &CounterV,IupacMaps &IMap); void FindKmer(Seq &seq,String<Iupac> &temp,Finder<Index<StringSet<String<Dna5> > > > &finder,unsigned int &counter,std::vector<int> &CounterV); void GeneralizeKmer(String<Dna5> Kmer, IupacMaps &IMaps,Seq &seq, Seq &back); void GeneralizeKmer(String<Iupac> Kmer,std::map<String<Iupac>,unsigned int> &generalizedKmerTemp,std::map<String<Iupac>,unsigned int> &generalizedKmerBackgroundTemp,IupacMaps &IMaps,Seq &seq, Seq &back); void estimateCounter(Seq &seq,String<Iupac> temp,String<Iupac> temp2,unsigned int &counter); void estimateCounter(Seq &seq,std::map<String<Iupac>,unsigned int> &generalizedKmer,String<Iupac> temp,String<Iupac> temp2,unsigned int &counter); void exactGeneralizeCount(std::multimap<double,String<Iupac> > &SortedPValueG,std::map<String<Iupac>,unsigned int > &seqCounter,std::map<String<Iupac>,unsigned int > &backCounter,Finder<Index<StringSet<String<Dna5> > > > &finder,Finder<Index<StringSet<String<Dna5> > > > &finderB,Seq &seq, Seq &back,IupacMaps &IMap); void FindTopKmer(Seq &seq,String<Iupac> &temp,Finder<Index<StringSet<String<Dna5> > > > &finder,unsigned int &counter,std::vector<int> &CounterV); void FindTopKmer(Seq &seq,String<Dna5> &temp,Finder<Index<StringSet<String<Dna5> > > > &finder,unsigned int &counter,std::vector<int> &CounterV); void loopOverTopKmer( Seq &seq,String<Iupac> &temp,String<Iupac> &Kmer,Iterator<String<Iupac> >::Type &tempIt,Finder<Index<StringSet<String<Dna5> > > > &finder,unsigned int &counter,std::vector<int> &CounterV,IupacMaps &IMap); void BuildFrequencyMatrix( Finder<Index<StringSet<String<Dna5> > > > &finder, String<Iupac> &Kmer,Seq &seq, IupacMaps &IMaps); void BuildFrequencyMatrix( Finder<Index<StringSet<String<Dna5> > > > &finder,String<Dna5> &Kmer,Seq &seq, IupacMaps &IMaps); void BuildWeightMatrix(Seq &seq); void BuildInformationContentMatrix(Seq &seq); double ComparePWM(Seq &seq,std::map<unsigned int,std::map<Iupac,double> > &freqMatrix1,std::map<unsigned int,std::map<Iupac,double> > &freqMatrix2, Entropy const & tag); double ComparePWM(Seq &seq,std::map<unsigned int,std::map<Iupac,double> > &freqMatrix1,std::map<unsigned int,std::map<Iupac,double> > &freqMatrix2, Euklidisch const & tag); void PWMClustering(Seq &seq); void UpdateDistantMatrix(int n, int x, int y, std::vector<std::vector<String<double > > > &compare, CompleteLinkage const & tag); void UpdateDistantMatrix(int n, int x, int y, std::vector<std::vector<String<double > > > &compare,std::vector<unsigned> &weights, AverageLinkage const & tag); void minDifferenceInMatrix(unsigned n,String<double> &minDifference,std::vector<std::vector<String<double > > > compare); void replaceKmer(Seq &seq,unsigned int stringNumber, unsigned int begin, unsigned int end); void saveData(Seq &seq,std::ofstream &PWM,unsigned c); void computesDistantMatrix(Seq &seq,std::vector<std::vector<String<double > > > &compare, unsigned allPWMsLength); String<double> AlignPWMs(std::map<unsigned int,std::map<Iupac,double> > &freqMatrix1,std::map<unsigned int,std::map<Iupac,double> > &freqMatrix2); double computeDr(Cluster &cluster,std::vector<std::vector<String<double> > > copyCompare); void readFastA( struct Seq &seq, CharString fname){ //########### einlesen in ids und seqs //Variable um Sequenz und ID zu speichern std::fstream fasta(toCString(fname), std:: ios_base::in | std::ios_base::binary); if(!fasta.good()){ std::cerr << "Could not open file: \"" << fname << "\"" << std::endl; std::exit(1); } typedef String<char,MMap<> > TMMapString; TMMapString mmapString; if(!open(mmapString, toCString(fname), OPEN_RDONLY)) std::exit(1); RecordReader<TMMapString, DoublePass<Mapped> > reader(mmapString); AutoSeqStreamFormat formatTag; if(!checkStreamFormat(reader,formatTag)){ std::cerr<<"Could not determine file format!"<<std::endl; std::exit(1); } std::cout<<"File format is "<<getAutoSeqStreamFormatName(formatTag)<<'\n'; StringSet<CharString> ids; StringSet<String<Dna5> > seqs;// if(read2(ids,seqs,reader,formatTag) !=0){ std::cerr<<"ERROR reading FASTA"<<std::endl; std::exit(1); } seq.ids = ids; seq.seqs = seqs; } template <typename TStream> void PrintFastA(TStream & stream, Seq &seq){ SEQAN_ASSERT_EQ(length(seq.ids), length(seq.seqs)); typedef Iterator<StringSet<CharString>, Rooted>::Type TIdIter; typedef Iterator<StringSet<String<Dna5> >, Standard>::Type TSeqIter;//Dna5Q TIdIter idIt =begin(seq.ids, Rooted()); TSeqIter seqIt=begin(seq.seqs, Standard()); for(;!atEnd(idIt);++idIt,++seqIt){ stream <<*idIt<<'\t'<<*seqIt<<std::endl; } } void initST(Seq &seq){ //creates a index based on an enhanced suffix array indexText(seq.SArray) = seq.seqs; } void PrintST(Seq &seq){ typedef Index<StringSet<String<Dna5> > > TMyIndex;//Dna5Q Iterator<TMyIndex, BottomUp<> >::Type myIterator(seq.SArray); for(;!atEnd(myIterator);++myIterator){ std::cout<<representative(myIterator)<<std::endl; } } /*** Berechnet relative Hintergrund-Wahrscheinlichkeit von ACGT ***/ void priorFreq(Seq &seq){ typedef Iterator<StringSet<String<Dna5> >, Standard>::Type TSeqIter; TSeqIter seqItbegin=begin(seq.seqs, Standard()); TSeqIter seqItend=end(seq.seqs, Standard()); absFreqOfLettersInSetOfSeqs(seq.frequencies,seqItbegin,seqItend); normalize(seq.frequencies); } //iniate Search in Fore- and Background void initExactKmer( Seq &seq, Seq &back, unsigned int kmer_len, unsigned int kmer_len_end){ Finder<Index<StringSet<String<Dna5> > > > finder(seq.SArray); Finder<Index<StringSet<String<Dna5> > > > finderB(back.SArray);//finder background typedef Index< StringSet<String<Dna5> > > TMyIndex; //kmer_len= 3;//minimal kmer-length //kmer_len_end=8;//maximal length if(kmer_len<1) kmer_len=3; if(kmer_len_end<kmer_len) kmer_len_end=kmer_len+1; //std::cout<<"kmer: "<<kmer_len<<std::endl; //std::cout<<"end: "<<kmer_len_end<<std::endl; typedef Iterator<StringSet<String<Dna5> > >::Type TStringSetIterator; unsigned int slen=0; String<Dna5> Kmer;//current Kmer std::cout<<std::endl<<std::endl; for(;kmer_len<=kmer_len_end;++kmer_len){//loop over all possible Kmer-length -->3-8 for(TStringSetIterator it=begin(seq.seqs);it!=end(seq.seqs);++it){//loop over all sequences slen=length(value(it));//length of the current seq if(slen==0) continue; else if(slen<kmer_len) continue; //std::cout<<"Sequence: "<<value(it)<<std::endl; for(unsigned int i=0;i<slen-kmer_len+1;++i){//loop over all Kmere in the current sequence Kmer=infix(value(it),i,i+kmer_len);//optimieren //std::cout<<Kmer<<" "; //if(Kmer[kmer_len-1]=='N'){//'AAAN'AAAA ---> AAA'NAAA'A --> after continue AAAN'AAAA' // i+=kmer_len; // continue; //} if(seq.seqCounter.find(Kmer)!=seq.seqCounter.end()) continue;// if Kmer is in the Map -->nothing to do // //Pattern<String<Dna5> > pattern(Kmer); // std::cout<<"count"; CountKmer(back,finderB,Kmer); CountKmer(seq,finder,Kmer); } } } //} } //gets the current Kmer and searches it in the index //max(cumulated sum of the counter)=SeqsNumber --> counts number of sequences containing the motif void CountKmer( Seq &seq, Finder<Index<StringSet<String<Dna5> > > > &finder, String<Dna5> &Kmer){ std::vector<int> CounterV(seq.SeqsNumber+1,0);//counter for storing 1 or 0 for each Seq + the cumulated sum of the counter in the last field //std::cout<<"vor while "; clear(finder); while(find(finder,Kmer)){//search the current Kmer in all sequences //std::cout<<'[' <<beginPosition(finder)<<','<<endPosition(finder)<<")\t"<<infix(finder)<<std::endl;//Debug if(seq.c>1){//nur im foreground clear(seq.results); findIntervals(seq.intervalTrees[beginPosition(finder).i1], beginPosition(finder).i2, endPosition(finder).i2, seq.results); }// wenn results>0, dann überlappt das Kmer --> nicht aufzählen if(CounterV[beginPosition(finder).i1] == 0 && length(seq.results)==0){//count number of sequences containing the motif, not the occurrences to avoid problems with self-overlapping ++CounterV[beginPosition(finder).i1]; ++CounterV[seq.SeqsNumber];//last Position in CounterV is cumulated sum } } seq.seqCounter[Kmer]=CounterV[seq.SeqsNumber]; CounterV.clear(); } void loopOverKmer( Seq &seq, String<Iupac> &temp, String<Iupac> &Kmer, Iterator<String<Iupac> >::Type &tempIt, Finder<Index<StringSet<String<Dna5> > > > &finder, unsigned int &counter, std::vector<int> &CounterV, IupacMaps &IMap){ String<Dna5> replace; Iterator<String<Dna5> >::Type replaceIt; Iterator<String<Iupac> >::Type tempIttemp; char resetTemp; if(tempIt==end(temp)) return; if((*tempIt == 'A' || *tempIt == 'C' ||*tempIt == 'G' ||*tempIt == 'T')){ loopOverKmer(seq,temp,temp,++tempIt,finder,counter,CounterV,IMap);//only replace the position with a wildcard return; } replace=IMap.IupacMapReplaceReversed[*tempIt]; replaceIt = begin(replace); for(;replaceIt!=end(replace);++replaceIt){ temp = Kmer;// reset temp resetTemp = IMap.IupacMapInversed[replace]; *tempIt = *replaceIt; //if not end call fkt. with temp // if end call find --> &counter tempIttemp=tempIt;//der rekursive aufruf mit diesem, da die schleife mit tempIt weitergehen soll if(tempIt+1!=end(temp)){ loopOverKmer(seq,temp,temp,++tempIttemp,finder,counter,CounterV,IMap); } if((*tempIttemp == 'A' || *tempIttemp == 'C' || *tempIttemp == 'G' || *tempIttemp == 'T' || tempIttemp == end(temp))){ FindKmer(seq,temp,finder,counter,CounterV); } *tempIt=resetTemp; } //} } void FindKmer( Seq &seq, String<Iupac> &temp, Finder<Index<StringSet<String<Dna5> > > > &finder, unsigned int &counter, std::vector<int> &CounterV){ clear(finder); while(find(finder,temp)){//search the current Kmer in all sequences //std::cout<<'[' <<beginPosition(finder)<<','<<endPosition(finder)<<")\t"<<infix(finder)<<std::endl;//Debug if(seq.c>1){//nur im foreground clear(seq.results); findIntervals(seq.intervalTrees[beginPosition(finder).i1], beginPosition(finder).i2, endPosition(finder).i2, seq.results); } if(CounterV[beginPosition(finder).i1] == 0 && length(seq.results)==0){//count number of sequences containing the motif, not the occurrences to avoid problems with self-overlapping //ansonsten m√ºsste das array noch einmal durch gegangen werden und an jeder stellt !=0 ++ ++CounterV[beginPosition(finder).i1]; ++CounterV[seq.SeqsNumber];//last Position in CounterV is cumulated sum ++counter; } } } /* for counting the top 100 generalizedKmere exact todo -->template */ void CountKmer( std::map<String<Iupac>,unsigned int > &seqCounter, Finder<Index<StringSet<String<Dna5> > > > &finder, String<Iupac> &Kmer, Seq &seq, IupacMaps &IMap){ String<Iupac> temp; Iterator<String<Iupac> >::Type tempIt; temp=Kmer; tempIt = begin(temp); unsigned int counter=0; std::vector<int> CounterV(seq.SeqsNumber+1,0);//counter for storing 1 or 0 for each Seq + the cumulated sum of the counter in the last field //std::cout<<"Kmer "<<Kmer<<std::endl; loopOverKmer(seq,temp,Kmer,tempIt,finder,counter,CounterV,IMap); seqCounter[Kmer]=counter; //std::cout<<Kmer<<" "<<seqCounter[Kmer]<<" "; //std::cout<<temp<<" "<<CounterV[SeqsNumber]<<std::endl; CounterV.clear(); /* Der clear hier bewirkt, dass bei ASG entweder ACG oder AGG vorkommen darf, falls beide vorkommen(in einer Sequenz) wird der counter trotzdem nur um 1 erh√∂ht -->Counter f√ºr AGG ist falsch, ASG stimmt jedoch wieder. Counter[AGG] --> irrelevant -->AGG wird jedes mal wenns ben√∂tigt wird neu berechnet-->optimieren */ } //void replaceKmer( Seq &seq, // String<unsigned int> &replaceString){ // // unsigned int beg =0; // unsigned int endP =0; // unsigned int Snumber =0; // // //std::cout<<stringNumber<<" "<<begin<<" "<<end<<std::endl; // Iterator<String<unsigned int> >::Type StringIt; // StringIt = begin(replaceString); // for(;StringIt!=end(replaceString);++StringIt){ // Snumber = *StringIt; // ++StringIt; // beg = *StringIt; // ++StringIt; // endP = *StringIt; // //std::cout<<Snumber<<" "<<beg<<" "<<endP<<std::endl; // for(;beg<endP;++beg) // { // seq.seqs[Snumber][beg]='N'; // } // //replace(seq.seqs[*StringIt],*(++StringIt),*(++StringIt),'N'); // } // // //} /////////////////////////////////// void FindTopKmer(Seq &seq, String<Iupac> &temp, Finder<Index<StringSet<String<Dna5> > > > &finder, unsigned int &counter, std::vector<int> &CounterV){ typedef IntervalAndCargo<unsigned, unsigned> TInterval; clear(finder); //std::cout<<temp<<" vor-while"<<std::endl; while(find(finder,temp)){//search the current Kmer in all sequences if(seq.c==1){//nur im ersten Schritt in Intervals speichern, danach kann direkt an den Tree angefügt werden appendValue(seq.intervals[beginPosition(finder).i1], TInterval(beginPosition(finder).i2, endPosition(finder).i2, 0)); } else if(seq.c>1) addInterval(seq.intervalTrees[beginPosition(finder).i1], TInterval(beginPosition(finder).i2, endPosition(finder).i2, 0)); if(CounterV[beginPosition(finder).i1] == 0){//count number of sequences containing the motif, not the occurrences to avoid problems with self-overlapping ++CounterV[beginPosition(finder).i1]; ++CounterV[seq.SeqsNumber];//last Position in CounterV is cumulated sum ++counter; } } for( unsigned int k =0;k< length(temp);++k){//berechnet Frequenz der Nukleotide, wobei jedes Motiv wieder nur einmal pro Sequenz zählt! seq.freqMatrix[k][temp[k]]+=CounterV[seq.SeqsNumber]; //GCAGCA --> counter der einzelnen wird um die gleiche anzahl hochgezählt, GCAGTA --> usw. Nicht-Wildcards haben W'keit 1 } CounterV.clear(); } void FindTopKmer(Seq &seq, String<Dna5> &temp, Finder<Index<StringSet<String<Dna5> > > > &finder, unsigned int &counter, std::vector<int> &CounterV){ typedef IntervalAndCargo<unsigned, unsigned> TInterval; clear(finder); //std::cout<<temp<<" vor-while"<<std::endl; while(find(finder,temp)){//search the current Kmer in all sequences if(seq.c==1){//nur im ersten Schritt in Intervals speichern, danach kann direkt an den Tree angefügt werden appendValue(seq.intervals[beginPosition(finder).i1], TInterval(beginPosition(finder).i2, endPosition(finder).i2, 0)); } else if(seq.c>1) addInterval(seq.intervalTrees[beginPosition(finder).i1], TInterval(beginPosition(finder).i2, endPosition(finder).i2, 0)); if(CounterV[beginPosition(finder).i1] == 0){//count number of sequences containing the motif, not the occurrences to avoid problems with self-overlapping ++CounterV[beginPosition(finder).i1]; ++CounterV[seq.SeqsNumber];//last Position in CounterV is cumulated sum ++counter; } } for( unsigned int k =0;k< length(temp);++k){//berechnet Frequenz der Nukleotide, wobei jedes Motiv wieder nur einmal pro Sequenz zählt! seq.freqMatrix[k][temp[k]]+=CounterV[seq.SeqsNumber]; //GCAGCA --> counter der einzelnen wird um die gleiche anzahl hochgezählt, GCAGTA --> usw. Nicht-Wildcards haben W'keit 1 } CounterV.clear(); } void loopOverTopKmer( Seq &seq, String<Iupac> &temp, String<Iupac> &Kmer, Iterator<String<Iupac> >::Type &tempIt, Finder<Index<StringSet<String<Dna5> > > > &finder, unsigned int &counter, std::vector<int> &CounterV, IupacMaps &IMaps){ String<Dna5> replace; Iterator<String<Dna5> >::Type replaceIt; Iterator<String<Iupac> >::Type tempIttemp; char resetTemp;//bei mehr als einer wildcard, müssen die weiter hinten liegenden nach abarbeitung resetet werden, ansonsten werden diese im nächsten schritt übergangen if(tempIt==end(temp)) return;//&&(tempIt+1!=end(temp)) /*freq[*tempIt]=1; freqMatrix[pos]=freq; freqMatrix[pos]['A']=1; freq.clear();*/ //std::cout<<" "<<*tempIt<<" "; if((*tempIt == 'A' || *tempIt == 'C' ||*tempIt == 'G' ||*tempIt == 'T')){ loopOverTopKmer(seq,temp,temp,++tempIt,finder,counter,CounterV,IMaps);//only replace the position with a wildcard return;//nach diesem schritt immer return, sonst gelangt man in eine loop } replace=IMaps.IupacMapReplaceReversed[*tempIt]; replaceIt = begin(replace); for(;replaceIt!=end(replace);++replaceIt){ //std::cout<<" "<<temp<<" "<<Kmer<<" "<<*replaceIt<<std::endl; temp = Kmer;// reset temp resetTemp = IMaps.IupacMapInversed[replace]; //falls Y ersetzt wird, ist replace CT --> also resetTemp wieder Y //std::cout<<" resetTemp "<<resetTemp<<std::endl; *tempIt = *replaceIt; //std::cout<<" re "<<temp<<" "; tempIttemp=tempIt;//der rekursive aufruf mit diesem, da die schleife mit tempIt weitergehen soll // std::cout<<" "<<temp<<" "<<Kmer<<" "<<*replaceIt<<std::endl; if(tempIt+1!=end(temp)){ //std::cout<<"vor if "<<temp<<std::endl; loopOverTopKmer(seq,temp,temp,++tempIttemp,finder,counter,CounterV,IMaps); //std::cout<<*tempIttemp<<" tempittemp "<<std::endl; } //zu häufig aufgerufen if((*tempIttemp == 'A' || *tempIttemp == 'C' || *tempIttemp == 'G' || *tempIttemp == 'T' || tempIttemp == end(temp))){//falls nicht, dann kann dies übersprungen werden /** posTemp gibt die Stelle an, an der man sich grad befindet --> freqMatrix enthält für jede Position die W'keit für ACGT --> counter ist die Anzahl wie oft das Wildcard Motiv insgesamt gefunden wurde --> CounterV an letzter Stelle die Anzahl für das jeweilige nicht-Wildcard Motiv --> bei GSAKYA z.B. als Motiv wird jedes Motiv bei 'S' vier mal gesucht(durch die anderen 2 Wildcards) --> CounterV für 1 bis posTemp aufaddieren --> in freqMatrix und zwar für die jeweiligen *tempIt-chars --> am Ende alle durch counter teilen --> aufpassen, für jeweilige pos gibts verschiedene counter --> FindKmer wird nur mit ganzen aufgerufen, also alle addieren, dann ist der counter auch gleich? **/ std::vector<int> CounterV(seq.SeqsNumber+1,0); FindTopKmer(seq,temp,finder,counter,CounterV); } *tempIt=resetTemp; //if ende von replaceIt, dann begin(replace) in temp speichern und mitübergeben--> referenz? } } /*** Computes PWM ***/ void BuildFrequencyMatrix( Finder<Index<StringSet<String<Dna5> > > > &finder, String<Iupac> &Kmer, Seq &seq, IupacMaps &IMaps){ //std::cout<<Kmer<<std::endl; //freqMatrix -->unsigned int = position in Kmer, position 1 in map = prob. for A, pos. 2 = prob. for C... String<Iupac> temp; Iterator<String<Iupac> >::Type tempIt; temp=Kmer; tempIt = begin(temp); unsigned int counter=0; std::vector<int> CounterV(seq.SeqsNumber+1,0); loopOverTopKmer(seq,temp,Kmer,tempIt,finder,counter,CounterV,IMaps); CounterV.clear(); //loopOver funktionier, aber jetzt wird der counter nicht mehr richtig berechnet --> fixen + andere loop anpassen //Durch die wildcards mehrere Vorkommen pro Sequence möglich: //seqCounter[temp]=CounterV[seq.SeqsNumber]; //std::cout<<temp<<" "<<*replaceIt<<" "; if(counter>0){//normalisieren des Counters for( unsigned int k =0;k< length(temp);++k){ seq.freqMatrix[k]['A']=(seq.freqMatrix[k]['A']+seq.frequencies[0])/(counter+1);//corrected freq (with pseudocount) seq.freqMatrix[k]['C']=(seq.freqMatrix[k]['C']+seq.frequencies[1])/(counter+1); seq.freqMatrix[k]['G']=(seq.freqMatrix[k]['G']+seq.frequencies[2])/(counter+1); seq.freqMatrix[k]['T']=(seq.freqMatrix[k]['T']+seq.frequencies[3])/(counter+1); } } else seq.freqMatrix.clear(); } /** Version für nicht generalisierte **/ void BuildFrequencyMatrix( Finder<Index<StringSet<String<Dna5> > > > &finder, String<Dna5> &Kmer, Seq &seq, IupacMaps &IMaps){ //std::cout<<Kmer<<std::endl; //freqMatrix -->unsigned int = position in Kmer, position 1 in map = prob. for A, pos. 2 = prob. for C... String<Iupac> temp; Iterator<String<Iupac> >::Type tempIt; temp=Kmer; tempIt = begin(temp); unsigned int counter=0; std::vector<int> CounterV(seq.SeqsNumber+1,0); FindTopKmer(seq,Kmer,finder,counter,CounterV); CounterV.clear(); if(counter>0){//normalisieren des Counters for( unsigned int k =0;k< length(temp);++k){ seq.freqMatrix[k]['A']=(seq.freqMatrix[k]['A']+seq.frequencies[0])/(counter+1);//corrected freq (with pseudocount) seq.freqMatrix[k]['C']=(seq.freqMatrix[k]['C']+seq.frequencies[1])/(counter+1); seq.freqMatrix[k]['G']=(seq.freqMatrix[k]['G']+seq.frequencies[2])/(counter+1); seq.freqMatrix[k]['T']=(seq.freqMatrix[k]['T']+seq.frequencies[3])/(counter+1); } } else seq.freqMatrix.clear(); } ////////////////////////////////////// //FreqMatrix output void PrintMap( Seq &seq, bool foreground){ std::map<Iupac,double> freq; std::cout<<std::endl; if(foreground) std::cout<<"foreground: "<<std::endl; else std::cout<<"background: "<<std::endl; for(unsigned int j=0;j<length(seq.freqMatrix);++j){ freq=seq.freqMatrix[j]; std::cout<<"Position: "<<j<<" A: "<<freq['A']<<std::endl; std::cout<<"Position: "<<j<<" C: "<<freq['C']<<std::endl; std::cout<<"Position: "<<j<<" G: "<<freq['G']<<std::endl; std::cout<<"Position: "<<j<<" T: "<<freq['T']<<std::endl; std::cout<<std::endl; } } void BuildWeightMatrix(Seq &seq){ for(unsigned int j=0;j<length(seq.freqMatrix);++j){ seq.weightMatrix[j]['A'] = log(seq.freqMatrix[j]['A']/seq.frequencies[0]); seq.weightMatrix[j]['C'] = log(seq.freqMatrix[j]['C']/seq.frequencies[1]); seq.weightMatrix[j]['G'] = log(seq.freqMatrix[j]['G']/seq.frequencies[2]); seq.weightMatrix[j]['T'] = log(seq.freqMatrix[j]['T']/seq.frequencies[3]); } } void saveData(Seq &seq,std::ofstream &PWM,unsigned c){ String<char> pwm; char *buffer= new char[33]; append(pwm,"PWM"); append(pwm,itoa(c,buffer,10)); append(pwm,".txt"); PWM.open(toCString(pwm),std::ios::out|std::ios::app); for(unsigned i=0;i<length(seq.freqMatrix);++i){ PWM<<seq.freqMatrix[i]['A']; write(PWM," "); } write(PWM,"\r\n");// windows PWM.close(); PWM.open(toCString(pwm),std::ios::out|std::ios::app); for(unsigned i=0;i<length(seq.freqMatrix);++i){ PWM<<seq.freqMatrix[i]['C']; write(PWM," "); } write(PWM,"\r\n"); PWM.close(); PWM.open(toCString(pwm),std::ios::out|std::ios::app); for(unsigned i=0;i<length(seq.freqMatrix);++i){ PWM<<seq.freqMatrix[i]['G']; write(PWM," "); } write(PWM,"\r\n"); PWM.close(); PWM.open(toCString(pwm),std::ios::out|std::ios::app); for(unsigned i=0;i<length(seq.freqMatrix);++i){ PWM<<seq.freqMatrix[i]['T']; write(PWM," "); } write(PWM,"\r\n"); PWM.close(); delete[] buffer; } void BuildInformationContentMatrix(Seq &seq){ double e = 3/(2*log(2)*seq.SeqsNumber);//4-1 = 3, 4= Anzahl Nukleotide --> small-error correction for(unsigned int j=0;j<length(seq.freqMatrix);++j){ seq.InformationContentMatrix[j]['A'] = seq.freqMatrix[j]['A']*seq.weightMatrix[j]['A']; seq.InformationContentMatrix[j]['C'] = seq.freqMatrix[j]['C']*seq.weightMatrix[j]['C']; seq.InformationContentMatrix[j]['G'] = seq.freqMatrix[j]['G']*seq.weightMatrix[j]['G']; seq.InformationContentMatrix[j]['T'] = seq.freqMatrix[j]['T']*seq.weightMatrix[j]['T']; seq.seqLogoMatrix[j]= 2- (-(seq.InformationContentMatrix[j]['A']+seq.InformationContentMatrix[j]['C']+seq.InformationContentMatrix[j]['G']+seq.InformationContentMatrix[j]['T'])+ e); } } double ComparePWM(std::map<Iupac,double> &freqMatrix1,std::map<Iupac,double> &freqMatrix2, Entropy const & tag){ /**** Für die übergebenen Spalten der Matrizen wird die Entropy berechnet Eintrag ist = 0, wenn die Werte identisch sind. Je größer die Zahl, desto unterschiedlicher die Werte Was wenn Wert = Hintergrundverteilung? --> Eintrag wäre = 0, obwohl das nichts mit dem Motiv zu tun hat Für jede Spalte berechnen und durch Spaltenanzahl teilen --> im Nachhinein ****/ double columnEntropy=0; columnEntropy = freqMatrix1['A']*log(freqMatrix1['A']/freqMatrix2['A']); columnEntropy += freqMatrix1['C']*log(freqMatrix1['C']/freqMatrix2['C']); columnEntropy += freqMatrix1['G']*log(freqMatrix1['G']/freqMatrix2['G']); columnEntropy += freqMatrix1['T']*log(freqMatrix1['T']/freqMatrix2['T']); columnEntropy += freqMatrix2['A']*log(freqMatrix2['A']/freqMatrix1['A']); columnEntropy += freqMatrix2['C']*log(freqMatrix2['C']/freqMatrix1['C']); columnEntropy += freqMatrix2['G']*log(freqMatrix2['G']/freqMatrix1['G']); columnEntropy += freqMatrix2['T']*log(freqMatrix2['T']/freqMatrix1['T']); columnEntropy = columnEntropy/2; return columnEntropy; } double ComparePWM(std::map<Iupac,double> &freqMatrix1,std::map<Iupac,double> &freqMatrix2, Euklidisch const & tag){ double columnEntropy = 0; columnEntropy = (freqMatrix1['A'] - freqMatrix2['A'])*(freqMatrix1['A'] - freqMatrix2['A']); columnEntropy += (freqMatrix1['C'] - freqMatrix2['C'])*(freqMatrix1['C'] - freqMatrix2['C']); columnEntropy += (freqMatrix1['G'] - freqMatrix2['G'])*(freqMatrix1['G'] - freqMatrix2['G']); columnEntropy += (freqMatrix1['T'] - freqMatrix2['T'])*(freqMatrix1['T'] - freqMatrix2['T']); columnEntropy = sqrt(columnEntropy); return columnEntropy; } /**** Speichert die jeweiligen Mittelwerte der 2 übergebenen Matrizen ****/ void BuildMeanOf2PWMs(Seq &seq,std::map<unsigned int,std::map<Iupac,double> > &freqMatrix1,std::map<unsigned int,std::map<Iupac,double> > &freqMatrix2){ for(unsigned int j=0;j<length(freqMatrix1);++j){ freqMatrix1[j]['A'] = (freqMatrix1[j]['A']+freqMatrix2[j]['A'])/2; freqMatrix1[j]['C'] = (freqMatrix1[j]['C']+freqMatrix2[j]['C'])/2; freqMatrix1[j]['G'] = (freqMatrix1[j]['G']+freqMatrix2[j]['G'])/2; freqMatrix1[j]['T'] = (freqMatrix1[j]['T']+freqMatrix2[j]['T'])/2; } } void UpdateDistantMatrix(int n, int x, int y, std::vector<std::vector<String<double> > > &compare, CompleteLinkage const & tag ){ /**** Updates the distance with Complete Linkage Replaces PWM x with the new one ****/ unsigned j; for (j = 0; j < x; j++) compare[x][j][0] = std::max(compare[y][j][0],compare[x][j][0]); for (j = x+1; j < y; j++) compare[j][x][0] = std::max(compare[y][j][0],compare[j][x][0]); for (j = y+1; j < n; j++) compare[j][x][0] = std::max(compare[j][y][0],compare[j][x][0]); for (j = 0; j < y; j++) compare[y][j][0] = compare[n-1][j][0]; for (j = y+1; j < n-1; j++) compare[j][y][0] = compare[n-1][j][0]; } void UpdateDistantMatrix(int n, int x, int y, std::vector<std::vector<String<double> > > &compare,std::vector<unsigned> &weights, AverageLinkage const & tag ){ /*** Die alten Einträge gewichtet addieren --> Gewichte am Anfang =1 ^= Clustergröße Zur Normierung durch die addierten Gewichte teilen ***/ unsigned j; unsigned sumOfweights = weights[x] + weights[y]; for (j = 0; j < x; j++) compare[x][j][0] = (compare[y][j][0]*weights[y]+compare[x][j][0]*weights[x])/sumOfweights; for (j = x+1; j < y; j++) compare[j][x][0] = (compare[y][j][0]*weights[y]+compare[j][x][0]*weights[x])/sumOfweights; for (j = y+1; j < n; j++) compare[j][x][0] = (compare[j][y][0]*weights[y]+compare[j][x][0]*weights[x])/sumOfweights; for (j = 0; j < y; j++) compare[y][j][0] = compare[n-1][j][0]; for (j = y+1; j < n-1; j++) compare[j][y][0] = compare[n-1][j][0]; weights[x]=sumOfweights; for(j=0;j+y<length(weights)-1;++j) weights[y+j]=weights[y+j+1]; } void minDifferenceInMatrix(unsigned n,String<double> &minDifference,std::vector<std::vector<String<double> > > compare){ minDifference[0]=0; for(unsigned i=0;i<n-1;++i){ for(unsigned j=i+1;j<n;++j){ if(minDifference[0]==0 || minDifference[0]>compare[j][i][0]){ minDifference[0]=compare[j][i][0]; minDifference[1]=i; minDifference[2]=j; //std::cout<<i<<" "<<j<<" "<<compare[j][i][0]; } } } std::cout<<std::endl<<minDifference[0]<<" "<<minDifference[1]<<" "<<minDifference[2]<<std::endl<<std::endl; } void computesDistantMatrix(Seq &seq,std::vector<std::vector<String<double> > > &compare, unsigned allPWMsLength){ unsigned j; unsigned i; for(i=0;i<allPWMsLength-1;++i){//computes distances with ComparePWM and saves it in the matrix compare for( j=i+1;j<allPWMsLength;++j){ compare[j][i]=AlignPWMs(seq.allPWMs[i],seq.allPWMs[j]); } } } double computeDr(Cluster &cluster,std::vector<std::vector<String<double> > > copyCompare){ double Dr=0; std::cout<<length(cluster.content)<<" "; for(unsigned i=0;i<length(cluster.content);++i){ std::cout<<"for1 "; for(unsigned j=0;j<length(cluster.content);++i){ std::cout<<"for2 "<<i<<" "<<j<<" "; system("PAUSE"); if(cluster.content[i]<cluster.content[j]){ std::cout<<"if "<<cluster.content[i]<<" "<<cluster.content[j]<<std::endl; Dr+= copyCompare[cluster.content[j]][cluster.content[i]][0];//copyCompare[i][j] --> i>j, daher falls i<j umdrehen } else if(cluster.content[j]<cluster.content[i]){ std::cout<<"else if "<<cluster.content[i]<<" "<<cluster.content[j]<<std::endl; std::cout<<copyCompare[cluster.content[i]][cluster.content[j]][0]; Dr+= copyCompare[cluster.content[i]][cluster.content[j]][0]; std::cout<<"nach else if "; } } } return Dr; } void PWMClustering(Seq &seq){ unsigned allPWMsLength=length(seq.allPWMs); String<Cluster> cluster; resize(cluster,allPWMsLength); String<double> minDifference; String<int> traceback; resize(minDifference,3); minDifference[0]=0; std::vector<std::vector<String<double> > > compare(allPWMsLength, std::vector<String<double> >(allPWMsLength)); std::vector<int> clusterId(allPWMsLength); unsigned j; for (j = 0; j < allPWMsLength; j++) clusterId[j] = j;//to assign which PWM is in which cluster /*** Average Linkage: ***/ std::vector<unsigned> weights(allPWMsLength,1); //vorher per local alignment feststellen wo die beste Überlappung ist! computesDistantMatrix(seq,compare,allPWMsLength); std::vector<std::vector<String<double> > > copyCompare(compare); String<int> temp; for(unsigned n=allPWMsLength;n>1 ;--n){//treshold noch bestimmen --> && minDifference[0]<0.8 minDifferenceInMatrix(n,minDifference,compare); //BuildMeanOf2PWMs(seq,seq.allPWMs[int(minDifference[1])],seq.allPWMs[int(minDifference[2])]);//bildet aus 2PWMs die Mittelwerte und speichert sie in for(unsigned k=0;k<allPWMsLength-1;++k){ for(unsigned l=k+1;l<allPWMsLength;++l){ std::cout<<compare[l][k][0]<<" "; } std::cout<<std::endl; } std::cout<<std::endl; //einmalige kopie von compare anlegen --> alle paarweisen abstände enthalten -->ist schon halbiert--> formel abändern //nicht left right, sondern liste mit den clustern --> liste in funktion auslesen UpdateDistantMatrix(n,int(minDifference[1]),int(minDifference[2]),compare,weights,AverageLinkage()); /*** cluster[0] = 1 2 --> clusterId=-1 cluster[1] = -1 3 --> clusterId=-2 --> traceback: -(-1)-1: 0 -->cluster[0] ***/ /**** Erzeuge Vector mit allen Objekten des Clusters -> für computeDr ****/ if(clusterId[int(minDifference[1])]<0){ cluster[allPWMsLength-n].content=cluster[-clusterId[int(minDifference[1])] - 1].content; } else{ appendValue(temp,clusterId[int(minDifference[1])],Exact()); } if(clusterId[int(minDifference[2])]<0){ append(temp,cluster[-clusterId[int(minDifference[2])] - 1].content,Exact()); } else{ appendValue(temp,clusterId[int(minDifference[2])],Exact()); } cluster[allPWMsLength-n].content=temp; clear(temp); /**** Dr berechnet ****/ cluster[allPWMsLength-n].Dr=computeDr(cluster[allPWMsLength-n],copyCompare); /*std::cout<<"Cluster: "; for(unsigned o=0;o<length(cluster[allPWMsLength-n].content);++o){ std::cout<<cluster[allPWMsLength-n].content[o]<<" "; } std::cout<<std::endl;*/ cluster[allPWMsLength-n].left=clusterId[int(minDifference[1])]; cluster[allPWMsLength-n].right=clusterId[int(minDifference[2])]; appendValue(traceback,clusterId[int(minDifference[1])]); appendValue(traceback,clusterId[int(minDifference[2])]); std::cout<<"clusterId: "<<clusterId[0]<<" "<<clusterId[1]<<" "<<clusterId[2]<<" "<<n<<" "<<allPWMsLength<<std::endl; clusterId[int(minDifference[1])]=n-allPWMsLength-1; for(j=0;j+minDifference[2]<allPWMsLength-1;++j) clusterId[int(minDifference[2])+j]=clusterId[int(minDifference[2])+j+1]; std::cout<<"clusterId: "<<clusterId[0]<<" "<<clusterId[1]<<" "<<clusterId[2]<<std::endl; //Update ClusterIds for(unsigned k=0;k<allPWMsLength-1;++k){ for(unsigned l=k+1;l<allPWMsLength;++l){ std::cout<<compare[l][k][0]<<" "; } std::cout<<std::endl; } std::cout<<std::endl; } clear(clusterId); clear(minDifference); Iterator<String<int> >::Type tracebackIt; std::cout<<"Traceback: "<<std::endl; for(tracebackIt=begin(traceback);tracebackIt!=end(traceback);++tracebackIt){ std::cout<<*tracebackIt<<" "; ++tracebackIt; std::cout<<*tracebackIt<<std::endl; } } /*Prints the Mapping: Kmer Seq1 Seq2 ... Seqn CumulatedCounter -->Template */ void PrintMap( std::map<String<Dna5>,unsigned int> &Dna5CounterMap, unsigned int SeqsNumber){ std::cout<<std::endl; std::map<String<Dna5>,unsigned int>::iterator MapIterator; for(MapIterator=Dna5CounterMap.begin(); MapIterator !=Dna5CounterMap.end();++MapIterator){ std::cout<<(*MapIterator).first<<" "; std::cout<<(*MapIterator).second<<" "; std::cout<<std::endl; } } void PrintMap( std::map<String<Iupac>,unsigned int > &Dna5CounterMap, unsigned int SeqsNumber){ std::cout<<std::endl; std::map<String<Iupac>,unsigned int >::iterator MapIterator; for(MapIterator=Dna5CounterMap.begin(); MapIterator !=Dna5CounterMap.end();++MapIterator){ std::cout<<(*MapIterator).first<<" "; std::cout<<(*MapIterator).second<<" "; std::cout<<std::endl; } } void PrintMap(std::multimap<double,String<Dna5> > &pValueMap){ std::multimap<double,String<Dna5> >::iterator MapIterator; for(MapIterator=pValueMap.begin();MapIterator !=pValueMap.end();++MapIterator){ std::cout<<(*MapIterator).first<<" "; std::cout<<(*MapIterator).second<<std::endl; } } void PrintMap(std::multimap<double,String<Iupac> > &pValueMap){ std::multimap<double,String<Iupac> >::iterator MapIterator; //std::cout<<pValueMap.size()<<std::endl; int i=0; for(MapIterator=pValueMap.begin();MapIterator !=pValueMap.end() && i<10;++MapIterator,++i){ std::cout<<(*MapIterator).first<<" "; std::cout<<(*MapIterator).second<<std::endl; } } //to print the generalizedKmerMap void PrintMap(std::map<String<Iupac>,unsigned int> &generalizedKmer){ std::map<String<Iupac>, unsigned int>::iterator MapIterator; int i=0; for(MapIterator=generalizedKmer.begin();MapIterator!=generalizedKmer.end() && i<20;++MapIterator,++i){ std::cout<<(*MapIterator).first<<" "; std::cout<<(*MapIterator).second<<" "; } } //Test the Map-lengths match eachother and with the sequences void DebugMap( Seq &seq, Seq &back, std::map<String<Dna5>,std::vector<int> > &sequencesCounter, std::map<String<Dna5>,std::vector<int> > &backgroundCounter){ typedef std::map<String<Dna5>,std::vector<int> > Dna5CounterMap; Dna5CounterMap::iterator MapIterator; MapIterator=sequencesCounter.begin(); Dna5CounterMap::iterator MapIteratorB; MapIteratorB=backgroundCounter.begin(); SEQAN_ASSERT_EQ(length(sequencesCounter),length(backgroundCounter)); SEQAN_ASSERT_EQ(length((*MapIterator).second),(length(seq.ids)+1));//+1, because of the last field in vector SEQAN_ASSERT_EQ(length((*MapIteratorB).second),(length(back.ids)+1)); //std::cout<<length(sequencesCounter)<<std::endl; //std::cout<<length((*MapIterator).second)<<std::endl; //std::cout<<length(backgroundCounter)<<std::endl; //std::cout<<length((*MapIteratorB).second)<<std::endl; //std::cout<<length(seq.ids)<<std::endl; //std::cout<<length(back.ids)<<std::endl; } void DebugMultiMap( std::map<String<Dna5>,std::vector<int> > &sequencesCounter, std::multimap<double,String<Dna5> > &SortedPValue){ SEQAN_ASSERT_EQ(length(sequencesCounter),SortedPValue.size()); } void logFactorial(unsigned int len){ double* p; unsigned int i=1; p = (double*)malloc(sizeof(double)*(len+1)); p[0]=0; for(;i<=len;++i){ p[i]= p[i-1] + log(i); } logFac =p; } double calcFET( unsigned int a, unsigned int b, unsigned int c, unsigned int d){ return exp(logFac[a+b] + logFac[c+d] + logFac[a+c] + logFac[b+d] - (logFac[a+b+c+d] + logFac[a]+ logFac[b] + logFac[c] +logFac[d])); } void modifyFET( unsigned int a, unsigned int b, unsigned int c, unsigned int d, double &pValue){ pValue= calcFET(a,b,c,d); // //std::cout<<(*MapI).first<<" "<<pValue<<" "; while(b!=0 && c!=0){//modify to be more extrem ++a; --b; --c; ++d; pValue += calcFET(a,b,c,d); // //std::cout<<pValue<<" "; } } /*************************** log((a+b)!(c+d)!(a+c)!(b+d)!/a!b!c!d!n!) = logFactorial(a+b) + logFactorial(c+d) + logFactorial(a+c) + logFactorial(b+d) - (logFactorial(a+b+c+d) + logFactorial(a)+ logFactorial(b) + logFactorial(c) + logFactorial(d)) pValue = exp(log((a+b)!(c+d)!(a+c)!(b+d)!/a!b!c!d!n!)) a=In Sequenz gefunden b=In Background gefunden c=In Sequenz !gefunden d=In Background !gefunden a = sequenceCounter b= backgroundCounter a+c=SeqsNumber b+d=backgroundNumber --> c= SeqsNumber - cumulated(sequenceCounter) d= backgroundNumber - cumulated(backgroundCounter) F√ºr den einseitigen Test zus√§tzlich: ++a und --c F√ºr den zweiseitigen Test: ++a und --c --a und ++c ****************************/ void FisherExactTest(Seq &seq, Seq &back){ double pValue=0; typedef std::map<String<Dna5>,unsigned int >::iterator MapIterator; MapIterator MapI=seq.seqCounter.begin(); MapIterator MapIB=back.seqCounter.begin(); //std::cout<<(*MapI).first<<" "<<(*MapI).second.back()<<std::endl; //std::cout<<(*MapIB).first<<" "<<(*MapIB).second.back()<<std::endl; for(;MapI!=seq.seqCounter.end();++MapI,++MapIB){ modifyFET((*MapI).second,(*MapIB).second,(seq.SeqsNumber - (*MapI).second),(back.SeqsNumber - (*MapIB).second),pValue); //std::cout<<pValue<<std::endl; //SortedPValue[pValue]=(*MapI).first; seq.SortedPValue.insert(std::pair<double,String<Dna5> > (pValue, (*MapI).first)); seq.SortedPValueReversed.insert(std::pair<String<Iupac>,double > ((*MapI).first,pValue)); } } //--> templates verwenden void FisherExactTest(std::map<String<Iupac>,unsigned int > &SequenceCounter, std::map<String<Iupac>,unsigned int > &BackgroundCounter, Seq &seq, Seq &back){ double pValue=0; typedef std::map<String<Iupac>,unsigned int >::iterator MapIterator; MapIterator MapI=SequenceCounter.begin(); MapIterator MapIB=BackgroundCounter.begin(); //std::cout<<(*MapI).first<<" "<<(*MapI).second.back()<<std::endl; //std::cout<<(*MapIB).first<<" "<<(*MapIB).second.back()<<std::endl; for(;MapI!=SequenceCounter.end();++MapI,++MapIB){ modifyFET((*MapI).second,(*MapIB).second,(seq.SeqsNumber - (*MapI).second),(back.SeqsNumber - (*MapIB).second),pValue); seq.generalizedSortedPValue.insert(std::pair<double,String<Iupac> > (pValue, (*MapI).first)); seq.SortedPValueReversed.insert(std::pair< String<Iupac>,double> ((*MapI).first,pValue)); } } /* Fisher-Exact-Test for generalized Kmere */ double FisherExactTest( Seq &seq, Seq &back, std::multimap<double,String<Iupac> > &GeneralizedSortedPValueTemp){ //std::cout<<"begin Fisher "<<seq.generalizedKmer.size()<<" "<<back.generalizedKmer.size()<<std::endl; if(seq.generalizedKmer.size()==0) return 2; typedef std::map<String<Iupac>,unsigned int >::iterator MapIterator; std::multimap<double,String<Iupac> >::iterator MapIterator2; MapIterator MapI = seq.generalizedKmer.begin(); MapIterator MapIB= back.generalizedKmer.begin(); double pValue=0; //std::cout<<generalizedKmerSequence.size(); for(;MapI!=seq.generalizedKmer.end();++MapI,++MapIB){ if((*MapI).second > seq.SeqsNumber || (*MapIB).second > back.SeqsNumber){ std::cout<<(*MapI).first<<" "<<(*MapI).second<<" "<<(*MapIB).first<<" "<<(*MapIB).second<<std::endl;} modifyFET((*MapI).second,(*MapIB).second,seq.SeqsNumber - (*MapI).second,back.SeqsNumber - (*MapIB).second,pValue); GeneralizedSortedPValueTemp.insert(std::pair<double,String<Iupac> > (pValue, (*MapI).first));//not seq.generalizedSortedPValue, because this is the temp one seq.SortedPValueReversed.insert(std::pair<String<Iupac>,double > ((*MapI).first,pValue)); } return GeneralizedSortedPValueTemp.begin()->first; } //void DebugFisherExact(unsigned int a,unsigned int b,unsigned int c,unsigned int d){ // // double pValue=0; // if(c<a || d < b){ // std::cerr<<"Cumulated Counter too large"; // exit(1); // } // c=c-a; // d=d-b; // SEQAN_ASSERT_EQ((logFactorial(2+1+4+2)),(logFactorial(9))); // // std::cout<<"a: "<<a<<" b: "<<b<<" c: "<<c<<" d: "<<d<<std::endl; // pValue= logFactorial(a+b) + logFactorial(c+d) + logFactorial(a+c) + logFactorial(b+d) - (logFactorial(a+b+c+d) + logFactorial(a)+ logFactorial(b) + logFactorial(c) +logFactorial(d)); // std::cout<<"log(pValue) "<<pValue<<std::endl; // pValue=logFactorial(a+b) + logFactorial(c+d) + logFactorial(a+c) + logFactorial(b+d) ; // std::cout<<"the dividend: "<<pValue<<std::endl; // pValue=- (logFactorial(2+1+4+2) + logFactorial(2)+ logFactorial(1) + logFactorial(4) +logFactorial(2)); // std::cout<<"the divisor: "<<pValue<<std::endl; // pValue= (logFactorial(1)); // std::cout<<"logFactorial(1): "<<pValue<<std::endl; // pValue= (logFactorial(0)); // std::cout<<"logFactorial(0): "<<pValue<<std::endl; // // //} void MapIupac(IupacMaps &IMaps ){ IMaps.IupacMap.get_allocator().allocate(16); IMaps.IupacMap[0]='U'; IMaps.IupacMap[1]='T'; IMaps.IupacMap[2]='A'; IMaps.IupacMap[3]='W'; IMaps.IupacMap[4]='C'; IMaps.IupacMap[5]='Y'; IMaps.IupacMap[6]='M'; IMaps.IupacMap[7]='H'; IMaps.IupacMap[8]='G'; IMaps.IupacMap[9]='K'; IMaps.IupacMap[10]='R'; IMaps.IupacMap[11]='D'; IMaps.IupacMap[12]='S'; IMaps.IupacMap[13]='B'; IMaps.IupacMap[14]='V'; IMaps.IupacMap[15]='N'; IMaps.IupacMapReversed.get_allocator().allocate(16); IMaps.IupacMapReversed['U']=0; IMaps.IupacMapReversed['T']=1; IMaps.IupacMapReversed['A']=2; IMaps.IupacMapReversed['W']=3; IMaps.IupacMapReversed['C']=4; IMaps.IupacMapReversed['Y']=5; IMaps.IupacMapReversed['M']=6; IMaps.IupacMapReversed['H']=7; IMaps.IupacMapReversed['G']=8; IMaps.IupacMapReversed['K']=9; IMaps.IupacMapReversed['R']=10; IMaps.IupacMapReversed['D']=11; IMaps.IupacMapReversed['S']=12; IMaps.IupacMapReversed['B']=13; IMaps.IupacMapReversed['V']=14; IMaps.IupacMapReversed['N']=15; IMaps.IupacMapReplace.get_allocator().allocate(14); IMaps.IupacMapReplace['R']="CT";//in Iupac-notation R=AG --> CT left IMaps.IupacMapReplace['Y']="AG"; IMaps.IupacMapReplace['S']="AT"; IMaps.IupacMapReplace['W']="CG"; IMaps.IupacMapReplace['K']="AC"; IMaps.IupacMapReplace['M']="GT"; IMaps.IupacMapReplace['D']="C"; IMaps.IupacMapReplace['H']="G"; IMaps.IupacMapReplace['B']="A"; IMaps.IupacMapReplace['V']="T"; IMaps.IupacMapReplace['A']="CGT"; IMaps.IupacMapReplace['C']="AGT"; IMaps.IupacMapReplace['G']="ACT"; IMaps.IupacMapReplace['T']="ACG"; IMaps.IupacMapReplaceReversed.get_allocator().allocate(11); IMaps.IupacMapReplaceReversed['R']="AG"; IMaps.IupacMapReplaceReversed['Y']="CT"; IMaps.IupacMapReplaceReversed['S']="CG"; IMaps.IupacMapReplaceReversed['W']="AT"; IMaps.IupacMapReplaceReversed['K']="GT"; IMaps.IupacMapReplaceReversed['M']="AC"; IMaps.IupacMapReplaceReversed['D']="AGT"; IMaps.IupacMapReplaceReversed['H']="ACT"; IMaps.IupacMapReplaceReversed['B']="CGT"; IMaps.IupacMapReplaceReversed['V']="ACG"; IMaps.IupacMapReplaceReversed['N']="ACGT"; IMaps.IupacMapInversed.get_allocator().allocate(11); IMaps.IupacMapInversed["AG"]='R'; IMaps.IupacMapInversed["CT"]='Y'; IMaps.IupacMapInversed["CG"]='S'; IMaps.IupacMapInversed["AT"]='W'; IMaps.IupacMapInversed["GT"]='K'; IMaps.IupacMapInversed["AC"]='M'; IMaps.IupacMapInversed["AGT"]='D'; IMaps.IupacMapInversed["ACT"]='H'; IMaps.IupacMapInversed["CGT"]='B'; IMaps.IupacMapInversed["ACG"]='V'; IMaps.IupacMapInversed["ACGT"]='N'; } /* - initiate by repeatedly picking the top motifs from SortedPValue - calls GeneralizeKmer and the EstimateFunction */ void InitGeneralization(IupacMaps &IMaps, Seq &seq, Seq &back){ std::multimap<double,String<Dna5> >::iterator MapIterator; std::multimap<double,String<Iupac> >::iterator MapIteratorT; std::multimap<double,String<Iupac> > generalizedSortedPValueTemp; std::map<String<Iupac>,unsigned int> generalizedKmerTemp; std::map<String<Iupac>,unsigned int> generalizedKmerBackgroundTemp; unsigned int i=0; unsigned int limit; if(seq.SortedPValue.size()>seq.seed) limit=seq.seed;//seed meist = 100 else if(seq.SortedPValue.size()==0) return; else limit = seq.SortedPValue.size(); for(MapIterator=seq.SortedPValue.begin();i<limit;++MapIterator,++i){//iterate over Top100 GeneralizeKmer((*MapIterator).second,IMaps,seq,back); } /* - only do the next function call, if in the last at least one pValue<treshold - call GeneralizeKmer in loop */ //PrintMap(seq.generalizedKmer); //seq.generalizedSortedPValue.insert(seq.SortedPValue.begin(),seq.SortedPValue.end()); double topPValue = FisherExactTest(seq,back,generalizedSortedPValueTemp);// lowest pValue from the first generalization double topPValueOld =seq.SortedPValue.begin()->first;//lowest pValue before generalization while(topPValue<0.05 && topPValue<topPValueOld){//only start a new round, if the top PValue is an improvement of the old one /* while wird das erste mal mit generalizedKmer aufgerufen und dem tempor√§ren mapping der pValues das tempor√§re mapping wird in das richtige mapping gemerged und gecleant, damit geschaut werden kann, ob bei den neuen pValues ein wert √ºber dem treshold ist --> falls nicht bricht die while ab falls doch wird generalizedKmer kopiert und gecleant aus dem gleichen grund, damit, nur die neuen generalisierten Kmere untersucht werden --> das Temp hier, um √ºber alle alten zu gehen, um diese weiter zu generalisieren */ seq.generalizedSortedPValue.insert(generalizedSortedPValueTemp.begin(),generalizedSortedPValueTemp.end()); generalizedKmerTemp.clear(); generalizedKmerBackgroundTemp.clear(); generalizedKmerTemp=seq.generalizedKmer; generalizedKmerBackgroundTemp=back.generalizedKmer; back.generalizedKmer.clear(); seq.generalizedKmer.clear(); // generalizedMapIterator= generalizedKmerTemp.begin(); if(generalizedSortedPValueTemp.size()>seq.seed) limit=seq.seed; else if(generalizedSortedPValueTemp.size()==0) return; else limit = generalizedSortedPValueTemp.size(); i=0;//only Top100 for(MapIteratorT=generalizedSortedPValueTemp.begin();i<limit;++MapIteratorT,++i){//iterate over Top100 //Temp ums zu finden, aber das normale auch √ºbergeben, zum neu bef√ºllen GeneralizeKmer((*MapIteratorT).second,generalizedKmerTemp,generalizedKmerBackgroundTemp,IMaps,seq,back); } generalizedSortedPValueTemp.clear(); //std::cout<<"nach for"<<std::endl; topPValueOld =topPValue; topPValue = FisherExactTest(seq,back,generalizedSortedPValueTemp); //std::cout<<"nach Fisher "<<topPValue<<" "<<topPValueOld<<std::endl; }; } /* - gets a Kmer and replaces each position successively with each possible ambiguity Code(Iupac) - only one wildcard per String at one time - the unsigned int corresponds to the estimated counter - String<Dna5> for initialization */ void GeneralizeKmer(String<Dna5> Kmer, IupacMaps &IMaps, Seq &seq, Seq &back){ String<Iupac> temp;//temporary String --> generalizedKmer[temp] String<Iupac> temp2;//Kmer with replaced position--> relevant for estimateCounter Iterator<String<Iupac> >::Type tempIt;//Iterator over temp --> same length as Kmer String<Dna5> replace = "ACGT";//replace the current position with each possible ambiguity code --> A,C,G or T Iterator<String<Dna5> >::Type replaceIt; unsigned int counter =0; char tempChar; //replaceIt = begin(replace); temp = Kmer; temp2=Kmer; tempIt = begin(temp); for(;tempIt!=end(temp);++tempIt){//loop over each position in kmer replaceIt = begin(replace); for(;replaceIt!=end(replace);++replaceIt){// loop over ACGT temp = Kmer;// reset temp if(*tempIt == *replaceIt) continue; // there is no Iupac for "AA", in return "AG" = "R" //std::cout<<temp<<" "; tempChar =*tempIt;//stores the current char because of temp2 *tempIt=*replaceIt; temp2=temp;//temp2 ist nun das mit dem char für die neue wildcard *tempIt=tempChar;//temp wieder das alte, wird aber im nächsten schritt mit einer neuen wildcard ergänzt *tempIt =IMaps.IupacMap[IMaps.IupacMapReversed[*tempIt] + IMaps.IupacMapReversed[*replaceIt]];//compute Iupac-letter--> A + G = R and replace the current location in temp //std::cout<<Kmer<<" "<<temp<<" "<<temp2<<std::endl; if(seq.generalizedKmer.find(temp)!=seq.generalizedKmer.end()) continue;// if Kmer is in the Map -->nothing to do //estimateCounter mit Kmer und temp2 aufrufen --> Kmer=AAA temp2=TAA temp=WAA estimateCounter(seq,Kmer,temp2,counter); seq.generalizedKmer[temp]=counter;//temp ist das neue motiv estimateCounter(back,Kmer,temp2,counter); back.generalizedKmer[temp]=counter; } } //PrintMap(seq.generalizedKmer); } /* - the same as above except that each String has already a wildcard */ void GeneralizeKmer(String<Iupac> Kmer, std::map<String<Iupac>,unsigned int> &generalizedKmerTemp, std::map<String<Iupac>,unsigned int> &generalizedKmerBackgroundTemp, IupacMaps &IMaps, Seq &seq, Seq &back){ String<Iupac> temp;//temporary String --> generalizedKmer[temp] String<Iupac> temp2;//Kmer with replaced position--> relevant for estimateCounter Iterator<String<Iupac> >::Type tempIt;//Iterator over temp --> same length as Kmer String<Iupac> replace; Iterator<String<Iupac> >::Type replaceIt; unsigned int counter =0; char tempChar; temp = Kmer; tempIt = begin(temp); //std::cout<<temp<<" "; for(;tempIt!=end(temp);++tempIt){//loop over each position in kmer //if(*tempIt == 'A' || *tempIt == 'C' ||*tempIt == 'G' ||*tempIt == 'T') continue;//only replace the position with a wildcard if(*tempIt =='N')continue;//gibt nichts mehr zu ersetzen replace=IMaps.IupacMapReplace[*tempIt]; replaceIt = begin(replace); for(;replaceIt!=end(replace);++replaceIt){// loop over the replacement-chars, W=AT --> replace=CG temp = Kmer;// reset temp //std::cout<<*replaceIt<<std::endl; tempChar =*tempIt;//stores the current char because of temp2 *tempIt=*replaceIt;//replace the current char for temp2 temp2=temp; *tempIt=tempChar; *tempIt =IMaps.IupacMap[IMaps.IupacMapReversed[*tempIt] + IMaps.IupacMapReversed[*replaceIt]]; if(seq.SortedPValueReversed[Kmer] >= 0.05 || seq.SortedPValueReversed[temp2] >= 0.05) continue;//only if Kmer and temp2 are significant estimate the counter if(generalizedKmerTemp.find(temp)!=generalizedKmerTemp.end()) continue; //std::cout<<Kmer<<" "<<temp<<" "<<temp2<<std::endl; estimateCounter(seq,generalizedKmerTemp,Kmer,temp2,counter); seq.generalizedKmer[temp]=counter; estimateCounter(back,generalizedKmerBackgroundTemp,Kmer,temp2,counter); back.generalizedKmer[temp]=counter; //std::cout<<temp<<" "<<counter<<std::endl; } } /** - gehe √ºber Kmer --> if ACGT continue - else rufe IupacMapReplace auf - -->for(;replaceIt!=end(replace);++replaceIt) --> loop √ºber den String aus IupacMapReplace - temp ist das neue Kmer und temp2 die neue wildcard--> estimateCounter aufrufen --> f√ºr fore- und background - funktion wird in for-schleife aufgerufen --> geht √ºber alle - clear generaliedKmer vor der for-schleife - --> wird neu bef√ºllt und kann mit FisherExact aufgerufen werden - SortedPValue wird berechnet (in temp) und √ºberpr√ºft ob noch ein wert drunter ist-->falls ja insertiere temp in den rest - falls nein nehme die top100 und rufe exactSearch auf **/ } //void loopOverRecplacement(String<Iupac> &temp,String<Iupac> &temp2,String<Iupac> Kmer,Iterator<String<Iupac> >::Type tempIt,unsigned int counter){ // char tempChar; // String<Iupac> replace; // Iterator<String<Iupac> >::Type replaceIt; // // replace=IupacMapReplace[*tempIt]; // replaceIt = begin(replace); // // for(;replaceIt!=end(replace);++replaceIt){// loop over the replacement-chars // temp = Kmer;// reset temp // tempChar =*tempIt;//stores the current char because of temp2 // *tempIt=*replaceIt;//replace the current char for temp2 // temp2=temp; // *tempIt=tempChar; // // *tempIt =IupacMap[IupacMapReversed[*tempIt] + IupacMapReversed[*replaceIt]]; // //only if Kmer and temp2 are significant estimate the counter // if(generalizedKmerTemp.find(temp)!=generalizedKmerTemp.end()) continue; // estimateCounter(SequenceCounter,generalizedKmerTemp,Kmer,temp2,counter,SeqsNumber); // generalizedKmer[temp]=counter; // estimateCounter(BackgroundCounter,generalizedKmerBackgroundTemp,Kmer,temp2,counter,BackgroundNumber); // generalizedKmerBackground[temp]=counter; // //std::cout<<temp<<" "<<counter<<std::endl; // } // //} /* - estimates the Counter for the initial wildcard-Kmere - SequencesCounter and BackgroundCounter */ void estimateCounter(Seq &seq, String<Iupac> temp, String<Iupac> temp2, unsigned int &counter){ //std::cout<<temp<<" "<<temp2<<std::endl; unsigned int RE1=seq.seqCounter.find(temp)->second;//das alte motiv aus dem letzten schritt if(seq.seqCounter.find(temp2)!=seq.seqCounter.end()){//falls temp2 ein altes motiv ist, hat es einen counter counter= RE1+ seq.seqCounter.find(temp2)->second - (RE1*seq.seqCounter.find(temp2)->second)/seq.SeqsNumber; //std::cout<<temp<<" "<<temp2<<" "<<RE1<<" "<<SequenceCounter.find(temp2)->second.back()<<" "<<counter<<std::endl; if(counter>seq.SeqsNumber){ std::cout<<"if "<<counter<<" "<<temp<<" "<<RE1<<" "<<temp2<<" "<<seq.seqCounter.find(temp2)->second<<" SeqsNumer "<<seq.SeqsNumber<<std::endl; system("PAUSE"); } } else{ counter=RE1;//RE2=0, da noch nicht vorhanden //std::cout<<"else "<<counter<<std::endl; if(counter>seq.SeqsNumber){ std::cout<<"else "<<counter<<" "<<temp<<" "<<RE1<<" "<<temp2<<" SeqsNumer "<<seq.SeqsNumber<<std::endl; system("PAUSE"); } } } /* - estimated the Counter for the next Kmer */ void estimateCounter(Seq &seq, std::map<String<Iupac>,unsigned int> &generalizedKmer, String<Iupac> temp, String<Iupac> temp2, unsigned int &counter){ if(generalizedKmer.find(temp)== generalizedKmer.end()){ std::cerr<<"Error, could not find "<<temp<<" in generalizedKmer"<<std::endl; std::exit(1); } //String<Iupac>="AAWR"; unsigned int RE1=(*generalizedKmer.find(temp)).second;//the new seed RE is a Kmer with wildcard //temp2 may be in generalizedKmer or in SequenceCounter if(seq.seqCounter.find(temp2)!=seq.seqCounter.end()){// if temp2 is in SequenceCounter do the same as above --> has no wildcard counter= RE1+ seq.seqCounter.find(temp2)->second- (RE1*seq.seqCounter.find(temp2)->second)/seq.SeqsNumber; //std::cout<<temp<<" "<<temp2<<" "<<RE1<<" "<<SequenceCounter.find(temp2)->second.back()<<" "<<counter<<std::endl; if(counter>seq.SeqsNumber){ std::cout<<"if "<<counter<<" "<<temp<<" "<<RE1<<" "<<temp2<<" "<<seq.seqCounter.find(temp2)->second<<" SeqsNumer "<<seq.SeqsNumber<<std::endl; system("PAUSE"); } } else if(generalizedKmer.find(temp2)!=generalizedKmer.end()){//if temp2 has a wildcard and is found in generalizedKmer counter= RE1+ generalizedKmer.find(temp2)->second - (RE1*generalizedKmer.find(temp2)->second)/seq.SeqsNumber; //std::cout<<temp<<" "<<temp2<<" "<<RE1<<" "<<generalizedKmer.find(temp2)->second<<" "<<counter<<std::endl; if(counter>seq.SeqsNumber){ std::cout<<"elif "<<counter<<" "<<temp<<" "<<RE1<<" "<<temp2<<" "<<generalizedKmer.find(temp2)->second<<" SeqsNumer "<<seq.SeqsNumber<<std::endl; system("PAUSE"); } } else{//if temp2 is not found counter= RE1;//RE2=0 if(counter>seq.SeqsNumber){ std::cout<<"else "<<counter<<" "<<temp<<" "<<RE1<<" "<<temp2<<" SeqsNumer "<<seq.SeqsNumber<<std::endl; system("PAUSE"); } } } void exactGeneralizeCount( std::map<String<Iupac>,unsigned int > &seqCounter, std::map<String<Iupac>,unsigned int > &backCounter, Finder<Index<StringSet<String<Dna5> > > > &finder, Finder<Index<StringSet<String<Dna5> > > > &finderB, Seq &seq, Seq &back, IupacMaps &IMap){ std::multimap<double,String<Iupac> >::iterator generalizedSortedPValueIt; //std::map<String<Iupac>,double > generalizedSortedPValueReversed; generalizedSortedPValueIt = seq.generalizedSortedPValue.begin(); for(unsigned int i=0;i<seq.seed && generalizedSortedPValueIt!=seq.generalizedSortedPValue.end() ;++i,++generalizedSortedPValueIt){ //std::cout<<length(seq.generalizedSortedPValue)<<" "<<seq.generalizedSortedPValue.size()<<" "; //std::cout<<(*generalizedSortedPValueIt).second<<" "; if(seqCounter.find((*generalizedSortedPValueIt).second)!=seqCounter.end()) continue; CountKmer(seqCounter,finder,(*generalizedSortedPValueIt).second,seq,IMap); CountKmer(backCounter,finderB,(*generalizedSortedPValueIt).second,back,IMap); } seq.generalizedSortedPValue.clear(); //PrintMap(seqCounter,seq.SeqsNumber); FisherExactTest(seqCounter,backCounter,seq,back);//computes the pValue of each Motif due to the counter std::cout<<std::endl; //PrintMap(seq.generalizedSortedPValue); seqCounter.clear(); backCounter.clear(); } String<double> AlignPWMs(std::map<unsigned int,std::map<Iupac,double> > &freqMatrix1,std::map<unsigned int,std::map<Iupac,double> > &freqMatrix2){ int freqL1 = length(freqMatrix1); int freqL2 = length(freqMatrix2); std::vector<std::vector<double> > M(freqL1+1,std::vector<double>(freqL2+1)); for(unsigned i=0;i<=freqL1;++i){ for(unsigned j=0;j<=freqL2;++j){ M[i][j]=0; } } //traceback wird nicht benötigt, da zwischen den anfangs- und end-gaps keine erlaubt sind String<double> Mmax; appendValue(Mmax,100); appendValue(Mmax,0); appendValue(Mmax,0); for(unsigned i=1;i<=freqL1;++i){ for(unsigned j=1;j<=freqL2;++j){ M[i][j]=M[i-1][j-1]+ComparePWM(freqMatrix1[i-1],freqMatrix2[j-1],Entropy());//je größer, desto unterschiedlicher --> Problem: je weniger abgezogen wird, desto größer if((i==freqL1 && j>freqL2/2 && M[i][j]/j<Mmax[0])){//auf die Länge der Überlappung normalisieren --> /j --> über die Hälfte des Kmers soll überlappen Mmax[0]=M[i][j]/j; Mmax[1]=i; Mmax[2]=j; } else if((j==freqL2 &&i>freqL1/2 && M[i][j]/i<Mmax[0])){ Mmax[0]=M[i][j]/i; Mmax[1]=i; Mmax[2]=j; } } } return Mmax; } #endif // #ifndef SANDBOX_MEYERCLP_APPS_DREME_H_
[ "mail@bkahlert.com" ]
mail@bkahlert.com
f1d1d36556b9fd881bfc5122714a9413c761c378
f12391a7a98a79b4a5a667ae287cec3a26a4f306
/src/demo/main.cpp
b91bb4ecac8ed05270a6186574d067e10290a0a9
[]
no_license
hooone/OCR
615fbf50fd0d5a7479cd85c6f579c4c442bbe1f9
e7ab577303d82ace8bad63a7f462284150ac9384
refs/heads/main
2023-08-25T06:13:16.398512
2021-10-16T06:47:14
2021-10-16T06:47:14
416,996,301
0
0
null
null
null
null
UTF-8
C++
false
false
1,198
cpp
#include <iostream> #include <opencv2/core.hpp> #include <opencv2/imgcodecs.hpp> #include <opencv2/highgui.hpp> #include <opencv2/imgproc.hpp> #include <gflags/gflags.h> #include <include/ocr_rec.h> using namespace std; using namespace cv; DEFINE_string(image_path, "C:/Users/hooone/Pictures/mhd/vsop.jpg", "Path of input image."); DEFINE_string(rec_model_dir, "./model/", "Path of char model."); DEFINE_string(char_list_file, "./model/en_dict.txt", "Path of char dict."); /// 检查是否指定了图片 void check_params() { if (FLAGS_image_path.empty()) { std::cout << "请指定图片路径 --image_path=" << std::endl; exit(1); } } int main_rec(cv::String cv_all_img_name) { PaddleOCR::CRNNRecognizer rec(FLAGS_rec_model_dir, FLAGS_char_list_file); return 0; } int main(int argc, char **argv) { system("chcp 65001"); std::cout << "hello world!" << endl; // 解析输入的参数 google::ParseCommandLineFlags(&argc, &argv, true); check_params(); std::cout << "image_path:" << FLAGS_image_path << endl; // 识别图片 cv::String cv_all_img_name(FLAGS_image_path); return main_rec(cv_all_img_name); }
[ "331474547@qq.com" ]
331474547@qq.com
be77cb0f53f581cef43b0edb0a411676e48e1643
13a32b92b1ba8ffb07e810dcc8ccdf1b8b1671ab
/home--tommy--mypy/mypy/lib/python2.7/site-packages/pystan/stan/lib/stan_math/stan/math/prim/mat/fun/log_determinant_spd.hpp
a339cf53f8c8eb223792a3b7972714dbe57c1811
[ "Unlicense", "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
tommybutler/mlearnpy2
8ec52bcd03208c9771d8d02ede8eaa91a95bda30
9e5d377d0242ac5eb1e82a357e6701095a8ca1ff
refs/heads/master
2022-10-24T23:30:18.705329
2022-10-17T15:41:37
2022-10-17T15:41:37
118,529,175
0
2
Unlicense
2022-10-15T23:32:18
2018-01-22T23:27:10
Python
UTF-8
C++
false
false
1,017
hpp
#ifndef STAN_MATH_PRIM_MAT_FUN_LOG_DETERMINANT_SPD_HPP #define STAN_MATH_PRIM_MAT_FUN_LOG_DETERMINANT_SPD_HPP #include <stan/math/prim/mat/fun/Eigen.hpp> #include <stan/math/prim/mat/err/check_square.hpp> #include <cmath> namespace stan { namespace math { /** * Returns the log absolute determinant of the specified square matrix. * * @param m Specified matrix. * @return log absolute determinant of the matrix. * @throw std::domain_error if matrix is not square. */ template <typename T, int R, int C> inline T log_determinant_spd(const Eigen::Matrix<T, R, C>& m) { using std::log; check_square("log_determinant_spd", "m", m); // Eigen::TriangularView< Eigen::Matrix<T, R, C>, Eigen::Lower > // L(m.llt().matrixL()); // T ret(0.0); // for (size_t i = 0; i < L.rows(); i++) // ret += log(L(i, i)); // return 2*ret; return m.ldlt().vectorD().array().log().sum(); } } } #endif
[ "tbutler.github@internetalias.net" ]
tbutler.github@internetalias.net
ff6e9ed258ab7f1f01090758933079e42be5f728
a688e32e6be470572d40539fb367e750fbd545df
/Bubble_Sort.h
0ed57ebefddd475172f179bdab2df22eb34b70c4
[]
no_license
kiren11/csci24000_spring2017_A6
7937b2484b64af273761c2e3bb1b28c31099d328
df1af8eb72eeae32fe2f990983865b5936f9b3a2
refs/heads/master
2020-03-18T13:31:47.861685
2018-05-25T01:56:37
2018-05-25T01:56:37
134,789,717
0
0
null
null
null
null
UTF-8
C++
false
false
381
h
// Honor Pledge: I pledge that I have neither given nor received any help on this assignment //Bubble Sort Header file #ifndef BUBBLE_SORT #define BUBBLE_SORT #include <iostream> #include "Sort.h" class Bubble_Sort: public Sort { public: // Bubble_Sort(int unsortedNum); // ~Bubble_Sort(); void SortIt(int unsortedNum[]); }; #endif //BUBBLE_SORT
[ "noreply@github.com" ]
noreply@github.com
1c7f0dda46a597fc6126fc98d2b0b2c7d48ab9a5
1e92196f98f38ab2ed1a9fcd02944effab0913c0
/example/src/ofApp.h
366c7ab36e344fc14c666aafa9f7f4e617223d1a
[]
no_license
motoi1484/ofxWatchBoot
f4ada1b506bc29f3cf3f89bec84cb0cd95318350
7d31ad7ff7a8e35b97de5b268c47faebe8d144bd
refs/heads/master
2021-01-25T11:27:19.308566
2018-03-01T07:18:36
2018-03-01T07:18:36
123,397,279
1
0
null
null
null
null
UTF-8
C++
false
false
599
h
#pragma once #include "ofMain.h" #include "ofxWatchBoot.h" class ofApp : public ofBaseApp{ public: void setup(); void update(); void draw(); void keyPressed(int key); void keyReleased(int key); void mouseMoved(int x, int y ); void mouseDragged(int x, int y, int button); void mousePressed(int x, int y, int button); void mouseReleased(int x, int y, int button); void mouseEntered(int x, int y); void mouseExited(int x, int y); void windowResized(int w, int h); void dragEvent(ofDragInfo dragInfo); void gotMessage(ofMessage msg); ofxWatchBoot watchBT; };
[ "motoi@rhizomatiks.com" ]
motoi@rhizomatiks.com
7775fab6777a15a3966b9e858c48980fc8f48095
b07d2d91f5fb5b0dc07c0dc22335bfc2eaad84f7
/program/src/extern/assimp/src/code/BlenderScene.h
1e12389325ec286a4c5e42e8f02e617f95e916b3
[]
no_license
arundev/AREngine
4beb30ba64ce4fb92397a25dfbc7a4c9afb6a687
7e0e722cea51a42be63da2302c26a54d9f3ad7ac
refs/heads/master
2020-04-05T14:36:52.049573
2019-07-03T01:36:03
2019-07-03T01:36:03
38,149,640
1
1
null
null
null
null
UTF-8
C++
false
false
18,622
h
/* Open Asset Import Library (assimp) ---------------------------------------------------------------------- Copyright (c) 2006-2012, assimp team All rights reserved. Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the assimp team, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission of the assimp team. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---------------------------------------------------------------------- */ /** @file BlenderScene.h * @brief Intermediate representation of a BLEND scene. */ #ifndef INCLUDED_AI_BLEND_SCENE_H #define INCLUDED_AI_BLEND_SCENE_H #include "BlenderDNA.h" namespace Assimp { namespace Blender { // Minor parts of this file are extracts from blender data structures, // declared in the ./source/blender/makesdna directory. // Stuff that is not used by Assimp is commented. // NOTE // this file serves as input data to the `./scripts/genblenddna.py` // script. This script generates the actual binding code to read a // blender file with a possibly different DNA into our structures. // Only `struct` declarations are considered and the following // rules must be obeyed in order for the script to work properly: // // * C++ style comments only // // * Structures may include the primitive types char, int, short, // float, double. Signedness specifiers are not allowed on // integers. Enum types are allowed, but they must have been // defined in this header. // // * Structures may aggregate other structures, unless not defined // in this header. // // * Pointers to other structures or primitive types are allowed. // No references or double pointers or arrays of pointers. // A pointer to a T is normally written as boost::shared_ptr, while a // pointer to an array of elements is written as boost:: // shared_array. To avoid cyclic pointers, use raw pointers in // one direction. // // * Arrays can have maximally two-dimensions. Any non-pointer // type can form them. // // * Multiple fields can be declare in a single line (i.e `int a,b;`) // provided they are neither pointers nor arrays. // // * One of WARN, FAIL can be appended to the declaration ( // prior to the semiolon to specifiy the error handling policy if // this field is missing in the input DNA). If none of those // is specified the default policy is to subtitute a default // value for the field. // #define WARN // warn if field is missing, substitute default value #define FAIL // fail the import if the field does not exist struct Object; struct MTex; struct Image; #define AI_BLEND_MESH_MAX_VERTS 2000000000L // ------------------------------------------------------------------------------- struct ID : ElemBase { char name[24] WARN; short flag; }; // ------------------------------------------------------------------------------- struct ListBase : ElemBase { boost::shared_ptr<ElemBase> first; boost::shared_ptr<ElemBase> last; }; // ------------------------------------------------------------------------------- struct PackedFile : ElemBase { int size WARN; int seek WARN; boost::shared_ptr< FileOffset > data WARN; }; // ------------------------------------------------------------------------------- struct GroupObject : ElemBase { boost::shared_ptr<GroupObject> prev,next FAIL; boost::shared_ptr<Object> ob; }; // ------------------------------------------------------------------------------- struct Group : ElemBase { ID id FAIL; int layer; boost::shared_ptr<GroupObject> gobject; }; // ------------------------------------------------------------------------------- struct World : ElemBase { ID id FAIL; }; // ------------------------------------------------------------------------------- struct MVert : ElemBase { float co[3] FAIL; float no[3] FAIL; char flag; int mat_nr WARN; int bweight; }; // ------------------------------------------------------------------------------- struct MEdge : ElemBase { int v1, v2 FAIL; char crease, bweight; short flag; }; // ------------------------------------------------------------------------------- struct MLoop : ElemBase { int v, e; }; // ------------------------------------------------------------------------------- struct MLoopUV : ElemBase { float uv[2]; int flag; }; // ------------------------------------------------------------------------------- // Note that red and blue are not swapped, as with MCol struct MLoopCol : ElemBase { char r, g, b, a; }; // ------------------------------------------------------------------------------- struct MPoly : ElemBase { int loopstart; int totloop; short mat_nr; char flag; }; // ------------------------------------------------------------------------------- struct MTexPoly : ElemBase { Image* tpage; char flag, transp; short mode, tile, pad; }; // ------------------------------------------------------------------------------- struct MCol : ElemBase { char r,g,b,a FAIL; }; // ------------------------------------------------------------------------------- struct MFace : ElemBase { int v1,v2,v3,v4 FAIL; int mat_nr FAIL; char flag; }; // ------------------------------------------------------------------------------- struct TFace : ElemBase { float uv[4][2] FAIL; int col[4] FAIL; char flag; short mode; short tile; short unwrap; }; // ------------------------------------------------------------------------------- struct MTFace : ElemBase { float uv[4][2] FAIL; char flag; short mode; short tile; short unwrap; // boost::shared_ptr<Image> tpage; }; // ------------------------------------------------------------------------------- struct MDeformWeight : ElemBase { int def_nr FAIL; float weight FAIL; }; // ------------------------------------------------------------------------------- struct MDeformVert : ElemBase { vector<MDeformWeight> dw WARN; int totweight; }; // ------------------------------------------------------------------------------- struct Material : ElemBase { ID id FAIL; float r,g,b WARN; float specr,specg,specb WARN; short har; float ambr,ambg,ambb WARN; float mirr,mirg,mirb; float emit WARN; float alpha WARN; float ref; float translucency; float roughness; float darkness; float refrac; boost::shared_ptr<Group> group; short diff_shader WARN; short spec_shader WARN; boost::shared_ptr<MTex> mtex[18]; }; // ------------------------------------------------------------------------------- struct Mesh : ElemBase { ID id FAIL; int totface FAIL; int totedge FAIL; int totvert FAIL; int totloop; int totpoly; short subdiv; short subdivr; short subsurftype; short smoothresh; vector<MFace> mface FAIL; vector<MTFace> mtface; vector<TFace> tface; vector<MVert> mvert FAIL; vector<MEdge> medge WARN; vector<MLoop> mloop; vector<MLoopUV> mloopuv; vector<MLoopCol> mloopcol; vector<MPoly> mpoly; vector<MTexPoly> mtpoly; vector<MDeformVert> dvert; vector<MCol> mcol; vector< boost::shared_ptr<Material> > mat FAIL; }; // ------------------------------------------------------------------------------- struct Library : ElemBase { ID id FAIL; char name[240] WARN; char filename[240] FAIL; boost::shared_ptr<Library> parent WARN; }; // ------------------------------------------------------------------------------- struct Camera : ElemBase { enum Type { Type_PERSP = 0 ,Type_ORTHO = 1 }; ID id FAIL; // struct AnimData *adt; Type type,flag WARN; float angle WARN; //float passepartalpha, angle; //float clipsta, clipend; //float lens, ortho_scale, drawsize; //float shiftx, shifty; //float YF_dofdist, YF_aperture; //short YF_bkhtype, YF_bkhbias; //float YF_bkhrot; }; // ------------------------------------------------------------------------------- struct Lamp : ElemBase { enum FalloffType { FalloffType_Constant = 0x0 ,FalloffType_InvLinear = 0x1 ,FalloffType_InvSquare = 0x2 //,FalloffType_Curve = 0x3 //,FalloffType_Sliders = 0x4 }; enum Type { Type_Local = 0x0 ,Type_Sun = 0x1 ,Type_Spot = 0x2 ,Type_Hemi = 0x3 ,Type_Area = 0x4 //,Type_YFPhoton = 0x5 }; ID id FAIL; //AnimData *adt; Type type FAIL; short flags; //int mode; short colormodel, totex; float r,g,b,k WARN; //float shdwr, shdwg, shdwb; float energy, dist, spotsize, spotblend; //float haint; float att1, att2; //struct CurveMapping *curfalloff; FalloffType falloff_type; //float clipsta, clipend, shadspotsize; //float bias, soft, compressthresh; //short bufsize, samp, buffers, filtertype; //char bufflag, buftype; //short ray_samp, ray_sampy, ray_sampz; //short ray_samp_type; //short area_shape; //float area_size, area_sizey, area_sizez; //float adapt_thresh; //short ray_samp_method; //short texact, shadhalostep; //short sun_effect_type; //short skyblendtype; //float horizon_brightness; //float spread; float sun_brightness; //float sun_size; //float backscattered_light; //float sun_intensity; //float atm_turbidity; //float atm_inscattering_factor; //float atm_extinction_factor; //float atm_distance_factor; //float skyblendfac; //float sky_exposure; //short sky_colorspace; // int YF_numphotons, YF_numsearch; // short YF_phdepth, YF_useqmc, YF_bufsize, YF_pad; // float YF_causticblur, YF_ltradius; // float YF_glowint, YF_glowofs; // short YF_glowtype, YF_pad2; //struct Ipo *ipo; //struct MTex *mtex[18]; // short pr_texture; //struct PreviewImage *preview; }; // ------------------------------------------------------------------------------- struct ModifierData : ElemBase { enum ModifierType { eModifierType_None = 0, eModifierType_Subsurf, eModifierType_Lattice, eModifierType_Curve, eModifierType_Build, eModifierType_Mirror, eModifierType_Decimate, eModifierType_Wave, eModifierType_Armature, eModifierType_Hook, eModifierType_Softbody, eModifierType_Boolean, eModifierType_Array, eModifierType_EdgeSplit, eModifierType_Displace, eModifierType_UVProject, eModifierType_Smooth, eModifierType_Cast, eModifierType_MeshDeform, eModifierType_ParticleSystem, eModifierType_ParticleInstance, eModifierType_Explode, eModifierType_Cloth, eModifierType_Collision, eModifierType_Bevel, eModifierType_Shrinkwrap, eModifierType_Fluidsim, eModifierType_Mask, eModifierType_SimpleDeform, eModifierType_Multires, eModifierType_Surface, eModifierType_Smoke, eModifierType_ShapeKey }; boost::shared_ptr<ElemBase> next WARN; boost::shared_ptr<ElemBase> prev WARN; int type, mode; char name[32]; }; // ------------------------------------------------------------------------------- struct SubsurfModifierData : ElemBase { enum Type { TYPE_CatmullClarke = 0x0, TYPE_Simple = 0x1 }; enum Flags { // some omitted FLAGS_SubsurfUV =1<<3 }; ModifierData modifier FAIL; short subdivType WARN; short levels FAIL; short renderLevels ; short flags; }; // ------------------------------------------------------------------------------- struct MirrorModifierData : ElemBase { enum Flags { Flags_CLIPPING =1<<0, Flags_MIRROR_U =1<<1, Flags_MIRROR_V =1<<2, Flags_AXIS_X =1<<3, Flags_AXIS_Y =1<<4, Flags_AXIS_Z =1<<5, Flags_VGROUP =1<<6 }; ModifierData modifier FAIL; short axis, flag; float tolerance; boost::shared_ptr<Object> mirror_ob; }; // ------------------------------------------------------------------------------- struct Object : ElemBase { ID id FAIL; enum Type { Type_EMPTY = 0 ,Type_MESH = 1 ,Type_CURVE = 2 ,Type_SURF = 3 ,Type_FONT = 4 ,Type_MBALL = 5 ,Type_LAMP = 10 ,Type_CAMERA = 11 ,Type_WAVE = 21 ,Type_LATTICE = 22 }; Type type FAIL; float obmat[4][4] WARN; float parentinv[4][4] WARN; char parsubstr[32] WARN; Object* parent WARN; boost::shared_ptr<Object> track WARN; boost::shared_ptr<Object> proxy,proxy_from,proxy_group WARN; boost::shared_ptr<Group> dup_group WARN; boost::shared_ptr<ElemBase> data FAIL; ListBase modifiers; }; // ------------------------------------------------------------------------------- struct Base : ElemBase { Base* prev WARN; boost::shared_ptr<Base> next WARN; boost::shared_ptr<Object> object WARN; }; // ------------------------------------------------------------------------------- struct Scene : ElemBase { ID id FAIL; boost::shared_ptr<Object> camera WARN; boost::shared_ptr<World> world WARN; boost::shared_ptr<Base> basact WARN; ListBase base; }; // ------------------------------------------------------------------------------- struct Image : ElemBase { ID id FAIL; char name[240] WARN; //struct anim *anim; short ok, flag; short source, type, pad, pad1; int lastframe; short tpageflag, totbind; short xrep, yrep; short twsta, twend; //unsigned int bindcode; //unsigned int *repbind; boost::shared_ptr<PackedFile> packedfile; //struct PreviewImage * preview; float lastupdate; int lastused; short animspeed; short gen_x, gen_y, gen_type; }; // ------------------------------------------------------------------------------- struct Tex : ElemBase { // actually, the only texture type we support is Type_IMAGE enum Type { Type_CLOUDS = 1 ,Type_WOOD = 2 ,Type_MARBLE = 3 ,Type_MAGIC = 4 ,Type_BLEND = 5 ,Type_STUCCI = 6 ,Type_NOISE = 7 ,Type_IMAGE = 8 ,Type_PLUGIN = 9 ,Type_ENVMAP = 10 ,Type_MUSGRAVE = 11 ,Type_VORONOI = 12 ,Type_DISTNOISE = 13 ,Type_POINTDENSITY = 14 ,Type_VOXELDATA = 15 }; enum ImageFlags { ImageFlags_INTERPOL = 1 ,ImageFlags_USEALPHA = 2 ,ImageFlags_MIPMAP = 4 ,ImageFlags_IMAROT = 16 ,ImageFlags_CALCALPHA = 32 ,ImageFlags_NORMALMAP = 2048 ,ImageFlags_GAUSS_MIP = 4096 ,ImageFlags_FILTER_MIN = 8192 ,ImageFlags_DERIVATIVEMAP = 16384 }; ID id FAIL; // AnimData *adt; //float noisesize, turbul; //float bright, contrast, rfac, gfac, bfac; //float filtersize; //float mg_H, mg_lacunarity, mg_octaves, mg_offset, mg_gain; //float dist_amount, ns_outscale; //float vn_w1; //float vn_w2; //float vn_w3; //float vn_w4; //float vn_mexp; //short vn_distm, vn_coltype; //short noisedepth, noisetype; //short noisebasis, noisebasis2; //short flag; ImageFlags imaflag; Type type FAIL; //short stype; //float cropxmin, cropymin, cropxmax, cropymax; //int texfilter; //int afmax; //short xrepeat, yrepeat; //short extend; //short fie_ima; //int len; //int frames, offset, sfra; //float checkerdist, nabla; //float norfac; //ImageUser iuser; //bNodeTree *nodetree; //Ipo *ipo; boost::shared_ptr<Image> ima WARN; //PluginTex *plugin; //ColorBand *coba; //EnvMap *env; //PreviewImage * preview; //PointDensity *pd; //VoxelData *vd; //char use_nodes; }; // ------------------------------------------------------------------------------- struct MTex : ElemBase { enum Projection { Proj_N = 0 ,Proj_X = 1 ,Proj_Y = 2 ,Proj_Z = 3 }; enum Flag { Flag_RGBTOINT = 0x1 ,Flag_STENCIL = 0x2 ,Flag_NEGATIVE = 0x4 ,Flag_ALPHAMIX = 0x8 ,Flag_VIEWSPACE = 0x10 }; enum BlendType { BlendType_BLEND = 0 ,BlendType_MUL = 1 ,BlendType_ADD = 2 ,BlendType_SUB = 3 ,BlendType_DIV = 4 ,BlendType_DARK = 5 ,BlendType_DIFF = 6 ,BlendType_LIGHT = 7 ,BlendType_SCREEN = 8 ,BlendType_OVERLAY = 9 ,BlendType_BLEND_HUE = 10 ,BlendType_BLEND_SAT = 11 ,BlendType_BLEND_VAL = 12 ,BlendType_BLEND_COLOR = 13 }; enum MapType { MapType_COL = 1 ,MapType_NORM = 2 ,MapType_COLSPEC = 4 ,MapType_COLMIR = 8 ,MapType_REF = 16 ,MapType_SPEC = 32 ,MapType_EMIT = 64 ,MapType_ALPHA = 128 ,MapType_HAR = 256 ,MapType_RAYMIRR = 512 ,MapType_TRANSLU = 1024 ,MapType_AMB = 2048 ,MapType_DISPLACE = 4096 ,MapType_WARP = 8192 }; // short texco, maptoneg; MapType mapto; BlendType blendtype; boost::shared_ptr<Object> object; boost::shared_ptr<Tex> tex; char uvname[32]; Projection projx,projy,projz; char mapping; float ofs[3], size[3], rot; int texflag; short colormodel, pmapto, pmaptoneg; //short normapspace, which_output; //char brush_map_mode; float r,g,b,k WARN; //float def_var, rt; //float colfac, varfac; float norfac; //float dispfac, warpfac; float colspecfac, mirrfac, alphafac; float difffac, specfac, emitfac, hardfac; //float raymirrfac, translfac, ambfac; //float colemitfac, colreflfac, coltransfac; //float densfac, scatterfac, reflfac; //float timefac, lengthfac, clumpfac; //float kinkfac, roughfac, padensfac; //float lifefac, sizefac, ivelfac, pvelfac; //float shadowfac; //float zenupfac, zendownfac, blendfac; }; } } #endif
[ "fuchu.ruan@mokun.net" ]
fuchu.ruan@mokun.net
1ec8e6351eea0bbe22b176245fdd15d159657474
803c6439a86c56dc1cd1d219974bd2bef4b02d0a
/15CalcArrayCube/15CalcArrayCube/Main.cpp
9994d08287a9da8c7beb5f403d333a0e8877d35c
[]
no_license
BennyFranco/assemblycourse
fc715b05efd3e4470c3d02b975e5dff397659236
69c17b8e4ef1431122d752222dcc9155777ca26b
refs/heads/master
2020-04-24T06:17:02.825418
2019-08-06T00:57:24
2019-08-06T00:57:24
171,759,868
0
0
null
null
null
null
UTF-8
C++
false
false
1,272
cpp
#include <iostream> void CalcArrayCube(int* y, const int* x, int nrows, int ncols) { for (int i = 0; i < nrows; i++) { for (int j = 0; j < ncols; j++) { int k = i * ncols + j; y[k] = x[k] * x[k] * x[k]; } } } void PrintArrayResults(const int* x, int nrows, int ncols, int* rowSum, int* colSum) { for (int i = 0; i < nrows; i++) { for (int j = 0; j < ncols; j++) { printf("%5d", x[i*ncols+j]); } printf("%5d\n", rowSum[i]); } printf("\n"); for (int j = 0; j < ncols; j++) printf("%5d\n", colSum[j]); printf("\n"); } extern "C" int CalcArrayRowColSum(const int* x, int nrows, int ncols, int* rowSum, int* colSum); int main() { const int nrows = 4; const int ncols = 3; int x[nrows][ncols] = { {1,2,3},{4,5,6},{7,8,9},{10,11,12} }; int y[nrows][ncols]; CalcArrayCube(&y[0][0], &x[0][0], nrows, ncols); for (int i = 0; i < nrows; i++) { for (int j = 0; j < ncols; j++) { printf("(%2d,%2d): %6d, %6d\n", i, j, x[i][j], y[i][j]); } } for (int i = 0; i < nrows; i++) { for (int j = 0; j < ncols; j++) { x[i][j] = i + j; } } int rowSum[nrows], colSum[ncols]; CalcArrayRowColSum((const int*)x, nrows, ncols, rowSum, colSum); PrintArrayResults((const int*)x, nrows, ncols, rowSum, colSum); return 0; }
[ "bennyfranco@icloud.com" ]
bennyfranco@icloud.com
dce5d892bc8e4bb9bd88b74c978aca7890dc431e
60dc62c38337693e9756191d4ee1b69163070690
/Selection/2017conf/2017/treeplot.h
557043f6838053ae434153ab689be8aa3eb61c9f
[]
no_license
XL-Seb-Yan/WGammaAnalyzer
caf0564a2e7f93c9512c8c851bfd762adc06b9ca
8011352c04161fa5a79a40c0d4e352cc4613e4ca
refs/heads/master
2023-06-11T21:37:32.827853
2021-07-08T10:31:01
2021-07-08T10:31:01
182,307,098
0
0
null
null
null
null
UTF-8
C++
false
false
3,849
h
////////////////////////////////////////////////////////// // This class has been automatically generated on // Wed Jan 15 06:43:19 2020 by ROOT version 6.10/09 // from TTree Events/Events // found on file: SinglePhoton2017_WGamma_full_full_Jan12.root ////////////////////////////////////////////////////////// #ifndef treeplot_h #define treeplot_h #include <TROOT.h> #include <TChain.h> #include <TFile.h> #include <TSelector.h> #include <TTreeReader.h> #include <TTreeReaderValue.h> #include <TTreeReaderArray.h> // Headers needed by this particular selector class treeplot : public TSelector { public : TTreeReader fReader; //!the tree reader TTree *fChain = 0; //!pointer to the analyzed TTree or TChain // Readers to access the data (delete the ones you do not need). TTreeReaderValue<Float_t> photon_pt = {fReader, "photon_pt"}; TTreeReaderValue<Float_t> photon_eta = {fReader, "photon_eta"}; TTreeReaderValue<Float_t> photon_phi = {fReader, "photon_phi"}; TTreeReaderValue<Float_t> photon_e = {fReader, "photon_e"}; TTreeReaderValue<Float_t> photon_mvaval = {fReader, "photon_mvaval"}; TTreeReaderValue<Float_t> photon_mvacat = {fReader, "photon_mvacat"}; TTreeReaderValue<Float_t> ak8puppijet_pt = {fReader, "ak8puppijet_pt"}; TTreeReaderValue<Float_t> ak8puppijet_eta = {fReader, "ak8puppijet_eta"}; TTreeReaderValue<Float_t> ak8puppijet_phi = {fReader, "ak8puppijet_phi"}; TTreeReaderValue<Float_t> ak8puppijet_e = {fReader, "ak8puppijet_e"}; TTreeReaderValue<Float_t> ak8puppijet_masssoftdropcorr = {fReader, "ak8puppijet_masssoftdropcorr"}; TTreeReaderValue<Float_t> ak8puppijet_tau21 = {fReader, "ak8puppijet_tau21"}; TTreeReaderValue<Float_t> ak8puppijet_massdiff = {fReader, "ak8puppijet_massdiff"}; TTreeReaderValue<Float_t> sys_costhetastar = {fReader, "sys_costhetastar"}; TTreeReaderValue<Float_t> sys_ptoverm = {fReader, "sys_ptoverm"}; TTreeReaderValue<Float_t> sys_invmass = {fReader, "sys_invmass"}; TTreeReaderValue<Float_t> sys_seperation = {fReader, "sys_seperation"}; TTreeReaderValue<Float_t> xsec_weight = {fReader, "xsec_weight"}; treeplot(TTree * /*tree*/ =0) { } virtual ~treeplot() { } virtual Int_t Version() const { return 2; } virtual void Begin(TTree *tree); virtual void SlaveBegin(TTree *tree); virtual void Init(TTree *tree); virtual Bool_t Notify(); virtual Bool_t Process(Long64_t entry); virtual Int_t GetEntry(Long64_t entry, Int_t getall = 0) { return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0; } virtual void SetOption(const char *option) { fOption = option; } virtual void SetObject(TObject *obj) { fObject = obj; } virtual void SetInputList(TList *input) { fInput = input; } virtual TList *GetOutputList() const { return fOutput; } virtual void SlaveTerminate(); virtual void Terminate(); ClassDef(treeplot,0); }; #endif #ifdef treeplot_cxx void treeplot::Init(TTree *tree) { // The Init() function is called when the selector needs to initialize // a new tree or chain. Typically here the reader is initialized. // It is normally not necessary to make changes to the generated // code, but the routine can be extended by the user if needed. // Init() will be called many times when running on PROOF // (once per file to be processed). fReader.SetTree(tree); } Bool_t treeplot::Notify() { // The Notify() function is called when a new file is opened. This // can be either for a new TTree in a TChain or when when a new TTree // is started when using PROOF. It is normally not necessary to make changes // to the generated code, but the routine can be extended by the // user if needed. The return value is currently not used. return kTRUE; } #endif // #ifdef treeplot_cxx
[ "xlyan0636@gmail.com" ]
xlyan0636@gmail.com
01d8759ff9f0a82b8ab9b909277bae441f8ed9fa
bc997f47b4cffef395f0ce85d72f113ceb1466e6
/ICPC/Japan/icpc2020_e.cpp
54883308d77c1128f4433588a385ad83141b5c65
[ "LicenseRef-scancode-public-domain" ]
permissive
koosaga/olympiad
1f069dd480004c9df033b73d87004b765d77d622
fcb87b58dc8b5715b3ae2fac788bd1b7cac9bffe
refs/heads/master
2023-09-01T07:37:45.168803
2023-08-31T14:18:03
2023-08-31T14:18:03
45,691,895
246
49
null
2020-10-20T16:52:45
2015-11-06T16:01:57
C++
UTF-8
C++
false
false
1,120
cpp
#include <bits/stdc++.h> using namespace std; using lint = long long; using llf = long double; using pi = pair<int, int>; #define sz(v) ((int)(v).size()) #define all(v) (v).begin(), (v).end() const int MAXN = 2005; const int mod = 1e9 + 7; int n, a[MAXN]; double trial2(double m){ double the = 0; for(int j = 0; j < n-1; j++) the += 2 * asin(a[j] / (2.0 * m)); the -= 2 * asin(a[n-1] / (2.0 * m)); return the; } double trial1(double m){ double the = 0; for(int j = 0; j < n; j++) the += 2 * asin(a[j] / (2.0 * m)); return the; } int main(){ cin >> n; for(int i = 0; i < n; i++) cin >> a[i]; sort(a, a + n); double s = 0, e = 1e9; s = a[n-1] / 2.0; for(int i = 0; i < 69; i++){ double m = (s + e) / 2; if(trial1(m) >= 2 * acos(-1)) s = m; else e = m; } if(fabs(trial1(s) - 2 * acos(-1)) < 1e-8){ printf("%.10f\n", s); return 0; } s = 0, e = 1e9; for(int i = 0; i < 69; i++){ double m = (s + e) / 2; if(trial2(m) >= 0) e = m; else s = m; } printf("%.10f\n", s); }
[ "koosaga@gmail.com" ]
koosaga@gmail.com
d873830dd861cd576c37aab89ed5c78ccb216a86
a7ec2352a5e667721ee84fa8f8e3528f3f457738
/sources/engine/graphics/transformation.cpp
39d2bf2dff01efc4fb2f6d14d6327faecd12cfe9
[]
no_license
sergiymomot/openGL-Demo-Project
1416a66eb664184d41afba8f6f35230b24e680e3
1bf081a9bb504a2ac4f2f1dba94556723f9dd92b
refs/heads/master
2021-08-07T06:48:40.589701
2017-11-07T19:59:12
2017-11-07T19:59:12
109,876,265
0
0
null
null
null
null
UTF-8
C++
false
false
2,058
cpp
#include "transformation.h" void Transformation::restorePosition() { mPosition = glm::vec3(0.0f); } void Transformation::restoreAll() { mPosition = glm::vec3(0.0f); mScale = glm::vec3(1.0f); mRotation = glm::vec3(0.0f); } glm::mat4 Transformation::getModelMatrix() const { glm::mat4 model(1.0f); model = glm::translate(model, mPosition); model = glm::rotate(model, mRotation.x, glm::vec3(1.0f, 0.0f, 0.0f)); model = glm::rotate(model, mRotation.y, glm::vec3(0.0f, 1.0f, 0.0f)); model = glm::rotate(model, mRotation.z, glm::vec3(0.0f, 0.0f, 1.0f)); model = glm::scale(model, mScale); return model; } void Transformation::rotate(glm::vec3 newRotation) { mRotation = newRotation; } void Transformation::rotateBy(float dx, float dy, float dz) { mRotation += glm::vec3(dx, dy, dz); } void Transformation::rotateBy(glm::vec3 rotationVector) { mRotation += rotationVector; } void Transformation::restoreRotation() { mRotation = glm::vec3(0.0f); } void Transformation::restoreScale() { mScale = glm::vec3(1.0f); } void Transformation::moveTo(float x, float y, float z) { mPosition = glm::vec3(x, y, z); } void Transformation::moveTo(glm::vec3 newPosition) { mPosition = newPosition; } void Transformation::moveBy(float dx, float dy, float dz) { mPosition += glm::vec3(dx, dy, dz); } void Transformation::moveBy(glm::vec3 displacement) { mPosition += displacement; } void Transformation::scale(float uniform) { mScale = glm::vec3(uniform); } void Transformation::scale(float xScale, float yScale, float zScale) { mScale = glm::vec3(xScale, yScale, zScale); } void Transformation::scale(glm::vec3 newScale) { mScale = newScale; } void Transformation::scaleBy(float dx, float dy, float dz) { mScale += glm::vec3(dx, dy, dz); } void Transformation::scaleBy(glm::vec3 scaleVector) { mScale += scaleVector; } void Transformation::rotateX(float degrees) { mRotation.x = degrees; } void Transformation::rotateY(float degrees) { mRotation.y = degrees; } void Transformation::rotateZ(float degrees) { mRotation.z = degrees; }
[ "sergiy.momot@outlook.com" ]
sergiy.momot@outlook.com
fa24de99ddd1e37ee1e63d98111ac5ea58e80d0d
b1a68db5d4bd862264c9ff9dd9a3b8b8a5f289ff
/external/opencore/codecs_v2/omx/omx_h264enc/src/omx_avcenc_component.cpp
8e914b2f35395593163f5e88a7134dad2ff428ae
[ "MIT", "LicenseRef-scancode-other-permissive", "Artistic-2.0", "LicenseRef-scancode-philippe-de-muyter", "Apache-2.0", "LicenseRef-scancode-mpeg-iso", "LicenseRef-scancode-unknown-license-reference" ]
permissive
ghsecuritylab/androux_donut
2d327be2779c7fcc791004f47d4186fa22ed4e91
d2dc30eb834ab020e9f39f4ec2619e9254e14620
refs/heads/master
2021-03-02T01:14:29.159418
2015-05-15T07:39:19
2015-05-15T07:39:19
245,826,111
0
0
null
2020-03-08T14:08:33
2020-03-08T14:08:32
null
UTF-8
C++
false
false
52,281
cpp
/* ------------------------------------------------------------------ * Copyright (C) 1998-2009 PacketVideo * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. * See the License for the specific language governing permissions * and limitations under the License. * ------------------------------------------------------------------- */ #include "omx_avcenc_component.h" #if PROXY_INTERFACE #include "omx_proxy_interface.h" #endif const uint8 NAL_START_CODE[4] = {0, 0, 0, 1}; #define CONFIG_SIZE_AND_VERSION(param) \ param.nSize=sizeof(param); \ param.nVersion.s.nVersionMajor = SPECVERSIONMAJOR; \ param.nVersion.s.nVersionMinor = SPECVERSIONMINOR; \ param.nVersion.s.nRevision = SPECREVISION; \ param.nVersion.s.nStep = SPECSTEP; // This function is called by OMX_GetHandle and it creates an instance of the avc component AO OMX_ERRORTYPE AvcEncOmxComponentFactory(OMX_OUT OMX_HANDLETYPE* pHandle, OMX_IN OMX_PTR pAppData, OMX_PTR pProxy, OMX_STRING aOmxLibName, OMX_PTR &aOmxLib, OMX_PTR aOsclUuid, OMX_U32 &aRefCount) { OSCL_UNUSED_ARG(aOmxLibName); OSCL_UNUSED_ARG(aOmxLib); OSCL_UNUSED_ARG(aOsclUuid); OSCL_UNUSED_ARG(aRefCount); OmxComponentAvcEncAO* pOpenmaxAOType; OMX_ERRORTYPE Status; // move InitAvcOmxComponentFields content to actual constructor pOpenmaxAOType = (OmxComponentAvcEncAO*) OSCL_NEW(OmxComponentAvcEncAO, ()); if (NULL == pOpenmaxAOType) { return OMX_ErrorInsufficientResources; } //Call the construct component to initialize OMX types Status = pOpenmaxAOType->ConstructComponent(pAppData, pProxy); *pHandle = pOpenmaxAOType->GetOmxHandle(); return Status; } // This function is called by OMX_FreeHandle when component AO needs to be destroyed OMX_ERRORTYPE AvcEncOmxComponentDestructor(OMX_IN OMX_HANDLETYPE pHandle, OMX_PTR &aOmxLib, OMX_PTR aOsclUuid, OMX_U32 &aRefCount) { OSCL_UNUSED_ARG(aOmxLib); OSCL_UNUSED_ARG(aOsclUuid); OSCL_UNUSED_ARG(aRefCount); // get pointer to component AO OmxComponentAvcEncAO* pOpenmaxAOType = (OmxComponentAvcEncAO*)((OMX_COMPONENTTYPE*)pHandle)->pComponentPrivate; // clean up decoder, OMX component stuff pOpenmaxAOType->DestroyComponent(); // destroy the AO class OSCL_DELETE(pOpenmaxAOType); return OMX_ErrorNone; } #if DYNAMIC_LOAD_OMX_AVCENC_COMPONENT class AvcEncOmxSharedLibraryInterface: public OsclSharedLibraryInterface, public OmxSharedLibraryInterface { public: OsclAny *QueryOmxComponentInterface(const OsclUuid& aOmxTypeId, const OsclUuid& aInterfaceId) { if (PV_OMX_AVCENC_UUID == aOmxTypeId) { if (PV_OMX_CREATE_INTERFACE == aInterfaceId) { return ((OsclAny*)(&AvcEncOmxComponentFactory)); } else if (PV_OMX_DESTROY_INTERFACE == aInterfaceId) { return ((OsclAny*)(&AvcEncOmxComponentDestructor)); } } return NULL; }; OsclAny *SharedLibraryLookup(const OsclUuid& aInterfaceId) { if (aInterfaceId == PV_OMX_SHARED_INTERFACE) { return OSCL_STATIC_CAST(OmxSharedLibraryInterface*, this); } return NULL; }; AvcEncOmxSharedLibraryInterface() {}; }; // function to obtain the interface object from the shared library extern "C" { OSCL_EXPORT_REF OsclAny* PVGetInterface() { return (OsclAny*) OSCL_NEW(AvcEncOmxSharedLibraryInterface, ()); } OSCL_EXPORT_REF void PVReleaseInterface(OsclSharedLibraryInterface* aInstance) { AvcEncOmxSharedLibraryInterface* module = (AvcEncOmxSharedLibraryInterface*)aInstance; OSCL_DELETE(module); } } #endif OMX_ERRORTYPE OmxComponentAvcEncAO::ConstructComponent(OMX_PTR pAppData, OMX_PTR pProxy) { ComponentPortType *pInPort, *pOutPort; OMX_ERRORTYPE Status; iNumPorts = 2; iCompressedFormatPortNum = OMX_PORT_OUTPUTPORT_INDEX; iOmxComponent.nSize = sizeof(OMX_COMPONENTTYPE); iOmxComponent.pComponentPrivate = (OMX_PTR) this; // pComponentPrivate points to THIS component AO class ipComponentProxy = pProxy; iOmxComponent.pApplicationPrivate = pAppData; // init the App data oscl_memset((void *)iNALSizeArray, 0, MAX_NAL_PER_FRAME * sizeof(int32)); iNALCount = 0; iNALSizeSum = 0; iEndOfOutputFrame = OMX_FALSE; #if PROXY_INTERFACE iPVCapabilityFlags.iIsOMXComponentMultiThreaded = OMX_TRUE; iOmxComponent.SendCommand = OmxComponentAvcEncAO::BaseComponentProxySendCommand; iOmxComponent.GetParameter = OmxComponentAvcEncAO::BaseComponentProxyGetParameter; iOmxComponent.SetParameter = OmxComponentAvcEncAO::BaseComponentProxySetParameter; iOmxComponent.GetConfig = OmxComponentAvcEncAO::BaseComponentProxyGetConfig; iOmxComponent.SetConfig = OmxComponentAvcEncAO::BaseComponentProxySetConfig; iOmxComponent.GetExtensionIndex = OmxComponentAvcEncAO::BaseComponentProxyGetExtensionIndex; iOmxComponent.GetState = OmxComponentAvcEncAO::BaseComponentProxyGetState; iOmxComponent.UseBuffer = OmxComponentAvcEncAO::BaseComponentProxyUseBuffer; iOmxComponent.AllocateBuffer = OmxComponentAvcEncAO::BaseComponentProxyAllocateBuffer; iOmxComponent.FreeBuffer = OmxComponentAvcEncAO::BaseComponentProxyFreeBuffer; iOmxComponent.EmptyThisBuffer = OmxComponentAvcEncAO::BaseComponentProxyEmptyThisBuffer; iOmxComponent.FillThisBuffer = OmxComponentAvcEncAO::BaseComponentProxyFillThisBuffer; #else iPVCapabilityFlags.iIsOMXComponentMultiThreaded = OMX_FALSE; iOmxComponent.SendCommand = OmxComponentAvcEncAO::BaseComponentSendCommand; iOmxComponent.GetParameter = OmxComponentAvcEncAO::BaseComponentGetParameter; iOmxComponent.SetParameter = OmxComponentAvcEncAO::BaseComponentSetParameter; iOmxComponent.GetConfig = OmxComponentAvcEncAO::BaseComponentGetConfig; iOmxComponent.SetConfig = OmxComponentAvcEncAO::BaseComponentSetConfig; iOmxComponent.GetExtensionIndex = OmxComponentAvcEncAO::BaseComponentGetExtensionIndex; iOmxComponent.GetState = OmxComponentAvcEncAO::BaseComponentGetState; iOmxComponent.UseBuffer = OmxComponentAvcEncAO::BaseComponentUseBuffer; iOmxComponent.AllocateBuffer = OmxComponentAvcEncAO::BaseComponentAllocateBuffer; iOmxComponent.FreeBuffer = OmxComponentAvcEncAO::BaseComponentFreeBuffer; iOmxComponent.EmptyThisBuffer = OmxComponentAvcEncAO::BaseComponentEmptyThisBuffer; iOmxComponent.FillThisBuffer = OmxComponentAvcEncAO::BaseComponentFillThisBuffer; #endif iOmxComponent.SetCallbacks = OmxComponentAvcEncAO::BaseComponentSetCallbacks; iOmxComponent.nVersion.s.nVersionMajor = SPECVERSIONMAJOR; iOmxComponent.nVersion.s.nVersionMinor = SPECVERSIONMINOR; iOmxComponent.nVersion.s.nRevision = SPECREVISION; iOmxComponent.nVersion.s.nStep = SPECSTEP; // PV capability #if defined(TEST_FULL_AVC_FRAME_MODE) /* output buffers based on frame boundaries instead of NAL boundaries and specify NAL boundaries through * through OMX_EXTRADATA structures appended on the end of the buffer */ iPVCapabilityFlags.iOMXComponentSupportsExternalInputBufferAlloc = OMX_TRUE; iPVCapabilityFlags.iOMXComponentSupportsExternalOutputBufferAlloc = OMX_TRUE; iPVCapabilityFlags.iOMXComponentSupportsMovableInputBuffers = OMX_TRUE; iPVCapabilityFlags.iOMXComponentSupportsPartialFrames = OMX_TRUE; iPVCapabilityFlags.iOMXComponentUsesNALStartCodes = OMX_FALSE; iPVCapabilityFlags.iOMXComponentCanHandleIncompleteFrames = OMX_TRUE; iPVCapabilityFlags.iOMXComponentUsesFullAVCFrames = OMX_TRUE; #elif defined(TEST_FULL_AVC_FRAME_MODE_SC) /* output buffers based on frame boundaries instead of NAL boundaries and specify NAL boundaries * with NAL start codes */ iPVCapabilityFlags.iOMXComponentSupportsExternalInputBufferAlloc = OMX_TRUE; iPVCapabilityFlags.iOMXComponentSupportsExternalOutputBufferAlloc = OMX_TRUE; iPVCapabilityFlags.iOMXComponentSupportsMovableInputBuffers = OMX_TRUE; iPVCapabilityFlags.iOMXComponentSupportsPartialFrames = OMX_TRUE; iPVCapabilityFlags.iOMXComponentUsesNALStartCodes = OMX_TRUE; iPVCapabilityFlags.iOMXComponentCanHandleIncompleteFrames = OMX_TRUE; iPVCapabilityFlags.iOMXComponentUsesFullAVCFrames = OMX_TRUE; #else iPVCapabilityFlags.iOMXComponentSupportsExternalInputBufferAlloc = OMX_TRUE; iPVCapabilityFlags.iOMXComponentSupportsExternalOutputBufferAlloc = OMX_TRUE; iPVCapabilityFlags.iOMXComponentSupportsMovableInputBuffers = OMX_TRUE; iPVCapabilityFlags.iOMXComponentSupportsPartialFrames = OMX_TRUE; iPVCapabilityFlags.iOMXComponentUsesNALStartCodes = OMX_FALSE; iPVCapabilityFlags.iOMXComponentCanHandleIncompleteFrames = OMX_TRUE; iPVCapabilityFlags.iOMXComponentUsesFullAVCFrames = OMX_FALSE; #endif if (ipAppPriv) { oscl_free(ipAppPriv); ipAppPriv = NULL; } ipAppPriv = (ComponentPrivateType*) oscl_malloc(sizeof(ComponentPrivateType)); if (NULL == ipAppPriv) { return OMX_ErrorInsufficientResources; } //Construct base class now Status = ConstructBaseComponent(pAppData); if (OMX_ErrorNone != Status) { return Status; } /** Domain specific section for input raw port */ //OMX_PARAM_PORTDEFINITIONTYPE ipPorts[OMX_PORT_INPUTPORT_INDEX]->PortParam.nPortIndex = OMX_PORT_INPUTPORT_INDEX; ipPorts[OMX_PORT_INPUTPORT_INDEX]->PortParam.eDomain = OMX_PortDomainVideo; ipPorts[OMX_PORT_INPUTPORT_INDEX]->PortParam.format.video.cMIMEType = (OMX_STRING)"raw"; ipPorts[OMX_PORT_INPUTPORT_INDEX]->PortParam.format.video.eCompressionFormat = OMX_VIDEO_CodingUnused; ipPorts[OMX_PORT_INPUTPORT_INDEX]->PortParam.format.video.pNativeRender = 0; ipPorts[OMX_PORT_INPUTPORT_INDEX]->PortParam.format.video.bFlagErrorConcealment = OMX_FALSE; ipPorts[OMX_PORT_INPUTPORT_INDEX]->PortParam.format.video.eColorFormat = OMX_COLOR_FormatYUV420Planar; ipPorts[OMX_PORT_INPUTPORT_INDEX]->PortParam.format.video.nFrameWidth = 176; ipPorts[OMX_PORT_INPUTPORT_INDEX]->PortParam.format.video.nFrameHeight = 144; ipPorts[OMX_PORT_INPUTPORT_INDEX]->PortParam.format.video.nBitrate = 64000; ipPorts[OMX_PORT_INPUTPORT_INDEX]->PortParam.format.video.xFramerate = (15 << 16); ipPorts[OMX_PORT_INPUTPORT_INDEX]->PortParam.eDir = OMX_DirInput; //Set to a default value, will change later during setparameter call ipPorts[OMX_PORT_INPUTPORT_INDEX]->PortParam.nBufferCountActual = NUMBER_INPUT_BUFFER_AVCENC; ipPorts[OMX_PORT_INPUTPORT_INDEX]->PortParam.nBufferCountMin = 1; ipPorts[OMX_PORT_INPUTPORT_INDEX]->PortParam.nBufferSize = INPUT_BUFFER_SIZE_AVCENC; ipPorts[OMX_PORT_INPUTPORT_INDEX]->PortParam.bEnabled = OMX_TRUE; ipPorts[OMX_PORT_INPUTPORT_INDEX]->PortParam.bPopulated = OMX_FALSE; /** Domain specific section for output avc port */ ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->PortParam.nPortIndex = OMX_PORT_OUTPUTPORT_INDEX; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->PortParam.eDomain = OMX_PortDomainVideo; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->PortParam.format.video.cMIMEType = (OMX_STRING)"video/avc"; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->PortParam.format.video.eCompressionFormat = OMX_VIDEO_CodingAVC; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->PortParam.format.video.pNativeRender = 0; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->PortParam.format.video.bFlagErrorConcealment = OMX_FALSE; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->PortParam.format.video.eColorFormat = OMX_COLOR_FormatUnused; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->PortParam.format.video.nFrameWidth = 176; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->PortParam.format.video.nFrameHeight = 144; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->PortParam.format.video.nBitrate = 64000; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->PortParam.format.video.xFramerate = (15 << 16); ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->PortParam.eDir = OMX_DirOutput; //Set to a default value, will change later during setparameter call ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->PortParam.nBufferCountActual = NUMBER_OUTPUT_BUFFER_AVCENC; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->PortParam.nBufferCountMin = 1; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->PortParam.nBufferSize = OUTPUT_BUFFER_SIZE_AVCENC; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->PortParam.bEnabled = OMX_TRUE; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->PortParam.bPopulated = OMX_FALSE; //OMX_VIDEO_PARAM_AVCTYPE //Default values for avc video output param port oscl_memset(&ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoAvc, 0, sizeof(OMX_VIDEO_PARAM_AVCTYPE)); SetHeader(&ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoAvc, sizeof(OMX_VIDEO_PARAM_AVCTYPE)); ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoAvc.nPortIndex = OMX_PORT_OUTPUTPORT_INDEX; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoAvc.eProfile = OMX_VIDEO_AVCProfileBaseline; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoAvc.eLevel = OMX_VIDEO_AVCLevel1b; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoAvc.nPFrames = 0xFFFFFFFF; //Default value ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoAvc.nBFrames = 0; //No support for B frames ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoAvc.nAllowedPictureTypes = OMX_VIDEO_PictureTypeI | OMX_VIDEO_PictureTypeP; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoAvc.nRefFrames = 1; //Only support this value ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoAvc.eLoopFilterMode = OMX_VIDEO_AVCLoopFilterEnable; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoAvc.bEnableFMO = OMX_FALSE; //Default value is false ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoAvc.bFrameMBsOnly = OMX_TRUE; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoAvc.bMBAFF = OMX_FALSE; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoAvc.bEntropyCodingCABAC = OMX_FALSE; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoAvc.bWeightedPPrediction = OMX_FALSE; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoAvc.bDirect8x8Inference = OMX_FALSE; //OMX_VIDEO_PARAM_PROFILELEVELTYPE structure ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->ProfileLevel.nPortIndex = OMX_PORT_OUTPUTPORT_INDEX; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->ProfileLevel.nProfileIndex = 0; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->ProfileLevel.eProfile = OMX_VIDEO_AVCProfileBaseline; ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->ProfileLevel.eLevel = OMX_VIDEO_AVCLevel1b; iPortTypesParam.nPorts = 2; iPortTypesParam.nStartPortNumber = 0; pInPort = (ComponentPortType*) ipPorts[OMX_PORT_INPUTPORT_INDEX]; pOutPort = (ComponentPortType*) ipPorts[OMX_PORT_OUTPUTPORT_INDEX]; pInPort->ActualNumPortFormatsSupported = 4; //OMX_VIDEO_PARAM_PORTFORMATTYPE INPUT PORT SETTINGS //On input port for index 0 SetHeader(&pInPort->VideoParam[0], sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE)); pInPort->VideoParam[0].nPortIndex = OMX_PORT_INPUTPORT_INDEX; pInPort->VideoParam[0].nIndex = 0; pInPort->VideoParam[0].eCompressionFormat = OMX_VIDEO_CodingUnused; pInPort->VideoParam[0].eColorFormat = OMX_COLOR_FormatYUV420Planar; pInPort->VideoParam[0].xFramerate = (15 << 16); //On input port for index 1 SetHeader(&pInPort->VideoParam[1], sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE)); pInPort->VideoParam[1].nPortIndex = OMX_PORT_INPUTPORT_INDEX; pInPort->VideoParam[1].nIndex = 1; pInPort->VideoParam[1].eCompressionFormat = OMX_VIDEO_CodingUnused; pInPort->VideoParam[1].eColorFormat = OMX_COLOR_Format24bitRGB888; pInPort->VideoParam[1].xFramerate = (15 << 16); //On input port for index 2 SetHeader(&pInPort->VideoParam[2], sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE)); pInPort->VideoParam[2].nPortIndex = OMX_PORT_INPUTPORT_INDEX; pInPort->VideoParam[2].nIndex = 2; pInPort->VideoParam[2].eCompressionFormat = OMX_VIDEO_CodingUnused; pInPort->VideoParam[2].eColorFormat = OMX_COLOR_Format12bitRGB444; pInPort->VideoParam[2].xFramerate = (15 << 16); //On input port for index 3 SetHeader(&pInPort->VideoParam[3], sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE)); pInPort->VideoParam[3].nPortIndex = OMX_PORT_INPUTPORT_INDEX; pInPort->VideoParam[3].nIndex = 3; pInPort->VideoParam[3].eCompressionFormat = OMX_VIDEO_CodingUnused; pInPort->VideoParam[3].eColorFormat = OMX_COLOR_FormatYUV420SemiPlanar; pInPort->VideoParam[3].xFramerate = (15 << 16); pOutPort->ActualNumPortFormatsSupported = 1; //OMX_VIDEO_PARAM_PORTFORMATTYPE OUTPUT PORT SETTINGS //On output port for index 0 SetHeader(&pOutPort->VideoParam[0], sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE)); pOutPort->VideoParam[0].nPortIndex = OMX_PORT_OUTPUTPORT_INDEX; pOutPort->VideoParam[0].nIndex = 0; pOutPort->VideoParam[0].eColorFormat = OMX_COLOR_FormatUnused; pOutPort->VideoParam[0].eCompressionFormat = OMX_VIDEO_CodingAVC; pOutPort->VideoParam[0].xFramerate = (15 << 16); //OMX_CONFIG_ROTATIONTYPE SETTINGS ON INPUT PORT SetHeader(&pInPort->VideoOrientationType, sizeof(OMX_CONFIG_ROTATIONTYPE)); pInPort->VideoOrientationType.nPortIndex = OMX_PORT_INPUTPORT_INDEX; pInPort->VideoOrientationType.nRotation = -1; //For all the YUV formats that are other than RGB //OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE settings of output port oscl_memset(&pOutPort->VideoErrorCorrection, 0, sizeof(OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE)); SetHeader(&pOutPort->VideoErrorCorrection, sizeof(OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE)); pOutPort->VideoErrorCorrection.nPortIndex = OMX_PORT_OUTPUTPORT_INDEX; pOutPort->VideoErrorCorrection.bEnableDataPartitioning = OMX_FALSE; //OMX_VIDEO_PARAM_BITRATETYPE settings of output port SetHeader(&pOutPort->VideoRateType, sizeof(OMX_VIDEO_PARAM_BITRATETYPE)); pOutPort->VideoRateType.nPortIndex = OMX_PORT_OUTPUTPORT_INDEX; pOutPort->VideoRateType.eControlRate = OMX_Video_ControlRateConstant; pOutPort->VideoRateType.nTargetBitrate = 64000; //OMX_CONFIG_FRAMERATETYPE default seetings (specified in khronos conformance test) SetHeader(&pOutPort->VideoConfigFrameRateType, sizeof(OMX_CONFIG_FRAMERATETYPE)); pOutPort->VideoConfigFrameRateType.nPortIndex = OMX_PORT_OUTPUTPORT_INDEX; pOutPort->VideoConfigFrameRateType.xEncodeFramerate = (15 << 16); //OMX_VIDEO_CONFIG_BITRATETYPE default settings (specified in khronos conformance test) SetHeader(&pOutPort->VideoConfigBitRateType, sizeof(OMX_VIDEO_CONFIG_BITRATETYPE)); pOutPort->VideoConfigBitRateType.nPortIndex = OMX_PORT_OUTPUTPORT_INDEX; pOutPort->VideoConfigBitRateType.nEncodeBitrate = 64000; //OMX_VIDEO_PARAM_QUANTIZATIONTYPE settings of output port SetHeader(&pOutPort->VideoQuantType, sizeof(OMX_VIDEO_PARAM_QUANTIZATIONTYPE)); pOutPort->VideoQuantType.nPortIndex = OMX_PORT_OUTPUTPORT_INDEX; pOutPort->VideoQuantType.nQpI = 0; //Not required by encoder pOutPort->VideoQuantType.nQpP = 0; //Default is 0 pOutPort->VideoQuantType.nQpB = 0; //Not required by encoder //OMX_VIDEO_PARAM_VBSMCTYPE settings of output port oscl_memset(&pOutPort->VideoBlockMotionSize, 0, sizeof(OMX_VIDEO_PARAM_VBSMCTYPE)); SetHeader(&pOutPort->VideoBlockMotionSize, sizeof(OMX_VIDEO_PARAM_VBSMCTYPE)); pOutPort->VideoBlockMotionSize.nPortIndex = OMX_PORT_OUTPUTPORT_INDEX; pOutPort->VideoBlockMotionSize.b16x16 = OMX_TRUE; //Encoder only support this mode //OMX_VIDEO_PARAM_MOTIONVECTORTYPE settings of output port oscl_memset(&pOutPort->VideoMotionVector, 0, sizeof(OMX_VIDEO_PARAM_MOTIONVECTORTYPE)); SetHeader(&pOutPort->VideoMotionVector, sizeof(OMX_VIDEO_PARAM_MOTIONVECTORTYPE)); pOutPort->VideoMotionVector.nPortIndex = OMX_PORT_OUTPUTPORT_INDEX; pOutPort->VideoMotionVector.eAccuracy = OMX_Video_MotionVectorQuarterPel; pOutPort->VideoMotionVector.bUnrestrictedMVs = OMX_TRUE; //Only support true pOutPort->VideoMotionVector.sXSearchRange = 16; pOutPort->VideoMotionVector.sYSearchRange = 16; //OMX_VIDEO_PARAM_INTRAREFRESHTYPE settings of output port oscl_memset(&pOutPort->VideoIntraRefresh, 0, sizeof(OMX_VIDEO_PARAM_INTRAREFRESHTYPE)); SetHeader(&pOutPort->VideoIntraRefresh, sizeof(OMX_VIDEO_PARAM_INTRAREFRESHTYPE)); pOutPort->VideoIntraRefresh.nPortIndex = OMX_PORT_OUTPUTPORT_INDEX; pOutPort->VideoIntraRefresh.eRefreshMode = OMX_VIDEO_IntraRefreshCyclic; pOutPort->VideoIntraRefresh.nCirMBs = 0; //OMX_VIDEO_PARAM_AVCSLICEFMO settings on output port oscl_memset(&pOutPort->AvcSliceFMO, 0, sizeof(OMX_VIDEO_PARAM_AVCSLICEFMO)); SetHeader(&pOutPort->AvcSliceFMO, sizeof(OMX_VIDEO_PARAM_AVCSLICEFMO)); pOutPort->AvcSliceFMO.nPortIndex = OMX_PORT_OUTPUTPORT_INDEX; pOutPort->AvcSliceFMO.eSliceMode = OMX_VIDEO_SLICEMODE_AVCDefault; pOutPort->AvcSliceFMO.nNumSliceGroups = 1; pOutPort->AvcSliceFMO.nSliceGroupMapType = 1; //Only support map type of 1 //OMX_CONFIG_INTRAREFRESHVOPTYPE settings of output port oscl_memset(&pOutPort->VideoIFrame, 0, sizeof(OMX_CONFIG_INTRAREFRESHVOPTYPE)); SetHeader(&pOutPort->VideoIFrame, sizeof(OMX_CONFIG_INTRAREFRESHVOPTYPE)); pOutPort->VideoIFrame.nPortIndex = OMX_PORT_OUTPUTPORT_INDEX; pOutPort->VideoIFrame.IntraRefreshVOP = OMX_FALSE; //Construct the encoder object if (ipAvcEncoderObject) { OSCL_DELETE(ipAvcEncoderObject); ipAvcEncoderObject = NULL; } ipAvcEncoderObject = OSCL_NEW(AvcEncoder_OMX, ()); #if PROXY_INTERFACE ((ProxyApplication_OMX*)ipComponentProxy)->ComponentSendCommand = BaseComponentSendCommand; ((ProxyApplication_OMX*)ipComponentProxy)->ComponentGetParameter = BaseComponentGetParameter; ((ProxyApplication_OMX*)ipComponentProxy)->ComponentSetParameter = BaseComponentSetParameter; ((ProxyApplication_OMX*)ipComponentProxy)->ComponentGetConfig = BaseComponentGetConfig; ((ProxyApplication_OMX*)ipComponentProxy)->ComponentSetConfig = BaseComponentSetConfig; ((ProxyApplication_OMX*)ipComponentProxy)->ComponentGetExtensionIndex = BaseComponentGetExtensionIndex; ((ProxyApplication_OMX*)ipComponentProxy)->ComponentGetState = BaseComponentGetState; ((ProxyApplication_OMX*)ipComponentProxy)->ComponentUseBuffer = BaseComponentUseBuffer; ((ProxyApplication_OMX*)ipComponentProxy)->ComponentAllocateBuffer = BaseComponentAllocateBuffer; ((ProxyApplication_OMX*)ipComponentProxy)->ComponentFreeBuffer = BaseComponentFreeBuffer; ((ProxyApplication_OMX*)ipComponentProxy)->ComponentEmptyThisBuffer = BaseComponentEmptyThisBuffer; ((ProxyApplication_OMX*)ipComponentProxy)->ComponentFillThisBuffer = BaseComponentFillThisBuffer; #endif return OMX_ErrorNone; } /** This function is called by the omx core when the component * is disposed by the IL client with a call to FreeHandle(). */ OMX_ERRORTYPE OmxComponentAvcEncAO::DestroyComponent() { if (OMX_FALSE != iIsInit) { ComponentDeInit(); } //Destroy the base class now DestroyBaseComponent(); if (ipAvcEncoderObject) { OSCL_DELETE(ipAvcEncoderObject); ipAvcEncoderObject = NULL; } if (ipAppPriv) { ipAppPriv->CompHandle = NULL; oscl_free(ipAppPriv); ipAppPriv = NULL; } return OMX_ErrorNone; } void OmxComponentAvcEncAO::ProcessData() { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : ProcessData IN")); QueueType* pInputQueue = ipPorts[OMX_PORT_INPUTPORT_INDEX]->pBufferQueue; QueueType* pOutputQueue = ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->pBufferQueue; ComponentPortType* pInPort = ipPorts[OMX_PORT_INPUTPORT_INDEX]; OMX_U8* pOutBuffer; OMX_U32 OutputLength; AVCEnc_Status EncodeReturn = AVCENC_SUCCESS; OMX_COMPONENTTYPE* pHandle = &iOmxComponent; if ((!iIsInputBufferEnded) || (iEndofStream)) { //Check whether prev output bufer has been released or not if (OMX_TRUE == iNewOutBufRequired) { //Check whether a new output buffer is available or not if (0 == (GetQueueNumElem(pOutputQueue))) { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : ProcessData OUT output buffer unavailable")); return; } ipOutputBuffer = (OMX_BUFFERHEADERTYPE*) DeQueue(pOutputQueue); OSCL_ASSERT(NULL != ipOutputBuffer); if (ipOutputBuffer == NULL) { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_ERR, (0, "OmxComponentAvcEncAO : ProcessData ERR OUT output buffer cannot be dequeued")); return; } ipOutputBuffer->nFilledLen = 0; iNewOutBufRequired = OMX_FALSE; oscl_memset((void *)iNALSizeArray, 0, iNALCount * sizeof(int32)); iNALCount = 0; iNALSizeSum = 0; if (iPVCapabilityFlags.iOMXComponentUsesNALStartCodes) { oscl_memcpy(ipOutputBuffer->pBuffer + ipOutputBuffer->nOffset + ipOutputBuffer->nFilledLen, &NAL_START_CODE, sizeof(uint8) * 4); ipOutputBuffer->nFilledLen += 4; iNALSizeSum += 4; } /* If some output data was left to be send from the last processing due to * unavailability of required number of output buffers, * copy it now and send back before processing new input frame */ if (iInternalOutBufFilledLen > 0) { if (OMX_FALSE == CopyDataToOutputBuffer()) { //We fell short of output buffers, exit now and wait for some more buffers to get queued PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : ProcessData OUT output buffer unavailable")); return; } else { ManageFrameBoundaries(); //Dequeue new output buffer to continue encoding the next frame if (0 == (GetQueueNumElem(pOutputQueue))) { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : ProcessData OUT output buffer unavailable")); return; } ipOutputBuffer = (OMX_BUFFERHEADERTYPE*) DeQueue(pOutputQueue); OSCL_ASSERT(NULL != ipOutputBuffer); if (ipOutputBuffer == NULL) { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_ERR, (0, "OmxComponentAvcEncAO : ProcessData OUT ERR output buffer cannot be dequeued")); return; } ipOutputBuffer->nFilledLen = 0; iNewOutBufRequired = OMX_FALSE; } } } /* Code for the marking buffer. Takes care of the OMX_CommandMarkBuffer * command and hMarkTargetComponent as given by the specifications */ if (ipMark != NULL) { ipOutputBuffer->hMarkTargetComponent = ipMark->hMarkTargetComponent; ipOutputBuffer->pMarkData = ipMark->pMarkData; ipMark = NULL; } if (ipTargetComponent != NULL) { ipOutputBuffer->hMarkTargetComponent = ipTargetComponent; ipOutputBuffer->pMarkData = iTargetMarkData; ipTargetComponent = NULL; } //Mark buffer code ends here //Call the encoder only if there is some data to encode if (iInputCurrLength > 0) { OMX_S32 filledLength = ipOutputBuffer->nOffset + ipOutputBuffer->nFilledLen; pOutBuffer = ipOutputBuffer->pBuffer + (OMX_U32)filledLength; if (iPVCapabilityFlags.iOMXComponentUsesFullAVCFrames && !iPVCapabilityFlags.iOMXComponentUsesNALStartCodes) { OutputLength = (OMX_U32)(((OMX_S32)ipOutputBuffer->nAllocLen - filledLength - (46 + 4 * (iNALCount + 1))) > 0) ? (ipOutputBuffer->nAllocLen - filledLength - (46 + 4 * (iNALCount + 1))) : 0; // (20 + 4 * (iNALCount + 1) + 20 + 6) is size of extra data } else { OutputLength = (OMX_U32)(((OMX_S32)ipOutputBuffer->nAllocLen - filledLength) > 0) ? (ipOutputBuffer->nAllocLen - filledLength) : 0; } //Output buffer is passed as a short pointer EncodeReturn = ipAvcEncoderObject->AvcEncodeVideo(pOutBuffer, &OutputLength, &iBufferOverRun, &ipInternalOutBuffer, ipFrameDecodeBuffer, &iInputCurrLength, iFrameTimestamp, &iOutputTimeStamp, &iSyncFlag); //Chk whether output data has been generated or not if (OutputLength > 0) { //offset not required in our case, set it to zero ipOutputBuffer->nOffset = 0; ipOutputBuffer->nTimeStamp = iOutputTimeStamp; if (OMX_FALSE == iBufferOverRun) { //No internal buffer is maintained ipOutputBuffer->nFilledLen += OutputLength; } else { iInternalOutBufFilledLen = OutputLength; iBufferOverRun = OMX_FALSE; CopyDataToOutputBuffer(); } //else loop of if (OMX_FALSE == iMantainOutInternalBuffer) } //if (OutputLength > 0) loop //If encoder returned error in case of frame skip/corrupt frame, report it to the client via a callback if (((AVCENC_SKIPPED_PICTURE == EncodeReturn) || (AVCENC_FAIL == EncodeReturn)) && (OMX_FALSE == iEndofStream)) { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : Frame skipped, ProcessData ErrorStreamCorrupt callback send")); (*(ipCallbacks->EventHandler)) (pHandle, iCallbackData, OMX_EventError, OMX_ErrorStreamCorrupt, 0, NULL); } //Return the input buffer that has been consumed fully if ((AVCENC_PICTURE_READY == EncodeReturn) || (AVCENC_SKIPPED_PICTURE == EncodeReturn) || (AVCENC_FAIL == EncodeReturn)) { ipInputBuffer->nFilledLen = 0; ReturnInputBuffer(ipInputBuffer, pInPort); ipInputBuffer = NULL; iIsInputBufferEnded = OMX_TRUE; iInputCurrLength = 0; iFrameCount++; } if (AVCENC_PICTURE_READY == EncodeReturn) { iEndOfOutputFrame = OMX_TRUE; } } /* If EOS flag has come from the client & there are no more * input buffers to decode, send the callback to the client */ if (OMX_TRUE == iEndofStream) { if (((0 == iInputCurrLength) || (AVCENC_FAIL == EncodeReturn)) && (0 == iInternalOutBufFilledLen)) { (*(ipCallbacks->EventHandler)) (pHandle, iCallbackData, OMX_EventBufferFlag, 1, OMX_BUFFERFLAG_EOS, NULL); PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : ProcessData EOS callback sent")); ManageFrameBoundaries(); //Mark this flag false once the callback has been send back iEndofStream = OMX_FALSE; PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : ProcessData OUT")); return; } } if (!iPVCapabilityFlags.iOMXComponentUsesNALStartCodes) { if (iEndOfOutputFrame || ((ipOutputBuffer->nFilledLen > 0) && (OMX_FALSE == iNewOutBufRequired))) { ManageFrameBoundaries(); } } else if (ipOutputBuffer->nFilledLen > 4) // therefore only if more than just start code in buffer { if (iEndOfOutputFrame || (OMX_FALSE == iNewOutBufRequired)) { ManageFrameBoundaries(); } } /* If there is some more processing left with current buffers, re-schedule the AO * Do not go for more than one round of processing at a time. * This may block the AO longer than required. */ if ((iInputCurrLength != 0 || GetQueueNumElem(pInputQueue) > 0) && (GetQueueNumElem(pOutputQueue) > 0)) { RunIfNotReady(); } } PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : ProcessData OUT")); } OMX_BOOL OmxComponentAvcEncAO::CopyDataToOutputBuffer() { ComponentPortType* pOutPort = ipPorts[OMX_PORT_OUTPUTPORT_INDEX]; QueueType* pOutputQueue = ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->pBufferQueue; while (iInternalOutBufFilledLen > 0) { if (ipOutputBuffer->nAllocLen >= iInternalOutBufFilledLen) { //Pack the whole data into the output buffer Alloc length data in one buffer and return it oscl_memcpy(ipOutputBuffer->pBuffer, ipInternalOutBuffer, iInternalOutBufFilledLen); ipOutputBuffer->nFilledLen = iInternalOutBufFilledLen; } else { oscl_memcpy(ipOutputBuffer->pBuffer, ipInternalOutBuffer, ipOutputBuffer->nAllocLen); ipOutputBuffer->nFilledLen = ipOutputBuffer->nAllocLen; } iInternalOutBufFilledLen -= ipOutputBuffer->nFilledLen; ipInternalOutBuffer += ipOutputBuffer->nFilledLen; if (0 != iInternalOutBufFilledLen) { //Mark the sync Flag in every piece of IDR NAL if (OMX_TRUE == iSyncFlag) { ipOutputBuffer->nFlags |= OMX_BUFFERFLAG_SYNCFRAME; } //Return the partial output buffer and try to fetch a new output buffer for filling the remaining data ReturnOutputBuffer(ipOutputBuffer, pOutPort); //Check whether a new output buffer is available or not if (0 == (GetQueueNumElem(pOutputQueue))) { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : CopyDatatoOutputBuffer OUT output buffer unavailable")); return OMX_FALSE; } ipOutputBuffer = (OMX_BUFFERHEADERTYPE*) DeQueue(pOutputQueue); OSCL_ASSERT(NULL != ipOutputBuffer); if (ipOutputBuffer == NULL) { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_ERR, (0, "OmxComponentAvcEncAO : CopyDatatoOutputBuffer ERR OUT output buffer cannot be dequeued")); return OMX_FALSE; } ipOutputBuffer->nFilledLen = 0; ipOutputBuffer->nTimeStamp = iOutputTimeStamp; ipOutputBuffer->nOffset = 0; iNewOutBufRequired = OMX_FALSE; } } //while (iInternalOutBufFilledLen > 0) return OMX_TRUE; } //Not implemented & supported in case of base profile components void OmxComponentAvcEncAO::ComponentGetRolesOfComponent(OMX_STRING* aRoleString) { *aRoleString = (OMX_STRING)"video_encoder.avc"; } //Component constructor OmxComponentAvcEncAO::OmxComponentAvcEncAO() { ipAvcEncoderObject = NULL; ipInternalOutBuffer = NULL; iInternalOutBufFilledLen = 0; iSyncFlag = OMX_FALSE; iBufferOverRun = OMX_FALSE; if (!IsAdded()) { AddToScheduler(); } PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : constructed")); } //Active object destructor OmxComponentAvcEncAO::~OmxComponentAvcEncAO() { if (IsAdded()) { RemoveFromScheduler(); } PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : destructed")); } OMX_ERRORTYPE OmxComponentAvcEncAO::SetConfig( OMX_IN OMX_HANDLETYPE hComponent, OMX_IN OMX_INDEXTYPE nIndex, OMX_IN OMX_PTR pComponentConfigStructure) { OSCL_UNUSED_ARG(hComponent); PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : SetConfig IN")); OMX_U32 PortIndex; OMX_ERRORTYPE ErrorType = OMX_ErrorNone; OMX_CONFIG_INTRAREFRESHVOPTYPE* pAvcIFrame; OMX_VIDEO_CONFIG_BITRATETYPE* pBitRateType; OMX_CONFIG_FRAMERATETYPE* pFrameRateType; if (NULL == pComponentConfigStructure) { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : SetConfig error bad parameter")); return OMX_ErrorBadParameter; } switch (nIndex) { case OMX_IndexConfigVideoIntraVOPRefresh: { pAvcIFrame = (OMX_CONFIG_INTRAREFRESHVOPTYPE*) pComponentConfigStructure; PortIndex = pAvcIFrame->nPortIndex; if (PortIndex != iCompressedFormatPortNum) { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : SetConfig error invalid port index")); return OMX_ErrorBadPortIndex; } /*Check Structure Header*/ ErrorType = CheckHeader(pAvcIFrame, sizeof(OMX_CONFIG_INTRAREFRESHVOPTYPE)); if (ErrorType != OMX_ErrorNone) { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : SetConfig error param check failed")); return ErrorType; } //Call the RequestI frame routine of the encoder in case of setconfig call if (OMX_TRUE == pAvcIFrame->IntraRefreshVOP) { ipAvcEncoderObject->AvcRequestIFrame(); } } break; case OMX_IndexConfigVideoBitrate: { pBitRateType = (OMX_VIDEO_CONFIG_BITRATETYPE*) pComponentConfigStructure; PortIndex = pBitRateType->nPortIndex; if (PortIndex != iCompressedFormatPortNum) { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : SetConfig error invalid port index")); return OMX_ErrorBadPortIndex; } /*Check Structure Header*/ ErrorType = CheckHeader(pBitRateType, sizeof(OMX_VIDEO_CONFIG_BITRATETYPE)); if (ErrorType != OMX_ErrorNone) { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : SetConfig error param check failed")); return ErrorType; } //Call the corresponding routine of the encoder in case of setconfig call if (OMX_FALSE == (ipAvcEncoderObject->AvcUpdateBitRate(pBitRateType->nEncodeBitrate))) { return OMX_ErrorBadParameter; } ipPorts[PortIndex]->VideoConfigBitRateType.nEncodeBitrate = pBitRateType->nEncodeBitrate; } break; case OMX_IndexConfigVideoFramerate: { pFrameRateType = (OMX_CONFIG_FRAMERATETYPE*) pComponentConfigStructure; PortIndex = pFrameRateType->nPortIndex; if (PortIndex != iCompressedFormatPortNum) { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : SetConfig error invalid port index")); return OMX_ErrorBadPortIndex; } /*Check Structure Header*/ ErrorType = CheckHeader(pFrameRateType, sizeof(OMX_CONFIG_FRAMERATETYPE)); if (ErrorType != OMX_ErrorNone) { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : SetConfig error param check failed")); return ErrorType; } //Call the corresponding routine of the encoder in case of setconfig call if (OMX_FALSE == (ipAvcEncoderObject->AvcUpdateFrameRate(pFrameRateType->xEncodeFramerate))) { return OMX_ErrorBadParameter; } ipPorts[PortIndex]->VideoConfigFrameRateType.xEncodeFramerate = pFrameRateType->xEncodeFramerate; } break; default: { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : SetConfig error Unsupported Index")); return OMX_ErrorUnsupportedIndex; } break; } PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : SetConfig OUT")); return OMX_ErrorNone; } /** The Initialization function */ OMX_ERRORTYPE OmxComponentAvcEncAO::ComponentInit() { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : ComponentInit IN")); OMX_ERRORTYPE Status = OMX_ErrorNone; if (OMX_TRUE == iIsInit) { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : ComponentInit error incorrect operation")); return OMX_ErrorIncorrectStateOperation; } iIsInit = OMX_TRUE; if (!iCodecReady) { iCodecReady = OMX_TRUE; } //Verify the parameters and return failure in case they cannot be supported by our encoder OMX_VIDEO_PARAM_AVCTYPE* pAvcParam = (OMX_VIDEO_PARAM_AVCTYPE*) & ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoAvc; OMX_VIDEO_PARAM_AVCSLICEFMO* pAvcSliceFMO = (OMX_VIDEO_PARAM_AVCSLICEFMO*) & ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->AvcSliceFMO; //FMO enabled is not supported in the encoder if ((pAvcParam->nBFrames > 0) || (0 == (pAvcParam->nAllowedPictureTypes & (OMX_VIDEO_PictureTypeI | OMX_VIDEO_PictureTypeP))) || (OMX_FALSE == pAvcParam->bFrameMBsOnly) || (OMX_TRUE == pAvcParam->bMBAFF) || (OMX_TRUE == pAvcParam->bEntropyCodingCABAC) || (OMX_TRUE == pAvcParam->bWeightedPPrediction) || (OMX_TRUE == pAvcParam->bDirect8x8Inference) || (OMX_TRUE == pAvcParam->bEnableFMO) || (1 != pAvcSliceFMO->nSliceGroupMapType)) { return OMX_ErrorUnsupportedSetting; } //Library init routine Status = ipAvcEncoderObject->AvcEncInit( ipPorts[OMX_PORT_INPUTPORT_INDEX]->PortParam.format.video, ipPorts[OMX_PORT_INPUTPORT_INDEX]->VideoOrientationType, ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->PortParam.format.video, ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoAvc, ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoRateType, ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoQuantType, ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoMotionVector, ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoIntraRefresh, ipPorts[OMX_PORT_OUTPUTPORT_INDEX]->VideoBlockMotionSize); iInputCurrLength = 0; //Used in dynamic port reconfiguration iFrameCount = 0; PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : ComponentInit OUT")); return Status; } /** This function is called upon a transition to the idle or invalid state. * Also it is called by the ComponentDestructor() function */ OMX_ERRORTYPE OmxComponentAvcEncAO::ComponentDeInit() { PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : ComponentDeInit IN")); OMX_ERRORTYPE Status = OMX_ErrorNone; iIsInit = OMX_FALSE; if (iCodecReady) { Status = ipAvcEncoderObject->AvcEncDeinit(); iCodecReady = OMX_FALSE; } PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO : ComponentDeInit OUT")); return Status; } /* A component specific routine called from BufferMgmtWithoutMarker */ void OmxComponentAvcEncAO::ProcessInBufferFlag() { iIsInputBufferEnded = OMX_FALSE; } ///////////////////////////////////////////////////////////////////////////// OMX_BOOL OmxComponentAvcEncAO::AppendExtraDataToBuffer(OMX_BUFFERHEADERTYPE* aOutputBuffer, OMX_EXTRADATATYPE aType, OMX_U8* aExtraData, OMX_U8 aDataLength) { // This function is used to append AVC NAL info to the buffer using the OMX_EXTRADATA_TYPE structure, when // a component requires buffers with full AVC frames rather than just NALs PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO::AppendExtraDataToBuffer() In")); if ((aType != OMX_ExtraDataNone) && (aExtraData != NULL) && (aOutputBuffer->pBuffer != NULL)) { const uint32 sizeOfExtraDataStruct = 20; // 20 is the number of bytes for the OMX_OTHER_EXTRADATATYPE structure (minus the data hint member) OMX_OTHER_EXTRADATATYPE extra; OMX_OTHER_EXTRADATATYPE terminator; CONFIG_SIZE_AND_VERSION(extra); CONFIG_SIZE_AND_VERSION(terminator); extra.nPortIndex = OMX_PORT_OUTPUTPORT_INDEX; terminator.nPortIndex = OMX_PORT_OUTPUTPORT_INDEX; extra.eType = aType; extra.nSize = (sizeOfExtraDataStruct + aDataLength + 3) & ~3; // size + padding for byte alignment extra.nDataSize = aDataLength; // fill in fields for terminator terminator.eType = OMX_ExtraDataNone; terminator.nDataSize = 0; // make sure there is enough room in the buffer if (aOutputBuffer->nAllocLen < (aOutputBuffer->nOffset + aOutputBuffer->nFilledLen + sizeOfExtraDataStruct + aDataLength + terminator.nSize + 6)) { PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE, (0, "OmxComponentAvcEncAO::AppendExtraDataToBuffer() - Error (not enough room in buffer) appending extra data to Buffer 0x%x, TS=%d", aOutputBuffer->pBuffer, iOutputTimeStamp)); PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE, (0, "OmxComponentAvcEncAO::AppendExtraDataToBuffer() Out")); return OMX_FALSE; } // copy extra data into buffer // need to align to 4 bytes OMX_U8* buffer = aOutputBuffer->pBuffer + aOutputBuffer->nOffset + aOutputBuffer->nFilledLen; buffer = (OMX_U8*)(((OMX_U32) buffer + 3) & ~3); oscl_memcpy(buffer, &extra, sizeOfExtraDataStruct); oscl_memcpy(buffer + sizeOfExtraDataStruct, aExtraData, aDataLength); buffer += extra.nSize; oscl_memcpy(buffer, &terminator, terminator.nSize); // flag buffer aOutputBuffer->nFlags |= OMX_BUFFERFLAG_EXTRADATA; PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE, (0, "OmxComponentAvcEncAO::AppendExtraDataToBuffer() - Appending extra data to Buffer 0x%x, TS=%d", aOutputBuffer->pBuffer, iOutputTimeStamp)); PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE, (0, "OmxComponentAvcEncAO::AppendExtraDataToBuffer() Out")); return OMX_TRUE; } else { PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE, (0, "OmxComponentAvcEncAO::AppendExtraDataToBuffer() Out")); return OMX_FALSE; } } void OmxComponentAvcEncAO::ManageFrameBoundaries() { PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO::ManageFrameBoundaries() In")); ComponentPortType* pOutPort = ipPorts[OMX_PORT_OUTPUTPORT_INDEX]; if (!iPVCapabilityFlags.iOMXComponentUsesFullAVCFrames || !ipAvcEncoderObject->GetSpsPpsHeaderFlag()) { if (iPVCapabilityFlags.iOMXComponentUsesNALStartCodes && ipOutputBuffer->nFilledLen == 4) { ipOutputBuffer->nFilledLen = 0; } //Attach the end of frame flag while sending out the last piece of output buffer if (iEndofStream) { ipOutputBuffer->nFlags |= OMX_BUFFERFLAG_EOS; } else { ipOutputBuffer->nFlags |= OMX_BUFFERFLAG_ENDOFFRAME; } if (OMX_TRUE == iSyncFlag) { ipOutputBuffer->nFlags |= OMX_BUFFERFLAG_SYNCFRAME; iSyncFlag = OMX_FALSE; } ReturnOutputBuffer(ipOutputBuffer, pOutPort); } else /* append extra data structure to buffer if iOMXComponentUsesFullAVCFrames is set and the buffer does not contain SPS or PPS NALs */ { OMX_U32 CurrNALSize = ipOutputBuffer->nFilledLen - iNALSizeSum; if (CurrNALSize > 0) { if (iPVCapabilityFlags.iOMXComponentUsesNALStartCodes && !iEndOfOutputFrame && !iEndofStream) { oscl_memcpy(ipOutputBuffer->pBuffer + ipOutputBuffer->nOffset + ipOutputBuffer->nFilledLen, &NAL_START_CODE, sizeof(uint8) * 4); ipOutputBuffer->nFilledLen += 4; iNALSizeSum += 4; } iNALSizeArray[iNALCount] = CurrNALSize; iNALSizeSum += iNALSizeArray[iNALCount]; iNALCount++; } if (iEndOfOutputFrame || iEndofStream) { if (!iPVCapabilityFlags.iOMXComponentUsesNALStartCodes) { if (OMX_FALSE == AppendExtraDataToBuffer(ipOutputBuffer, (OMX_EXTRADATATYPE) OMX_ExtraDataNALSizeArray, (OMX_U8*) iNALSizeArray, sizeof(uint32) * iNALCount)) { ipOutputBuffer->nFlags |= OMX_BUFFERFLAG_DATACORRUPT; PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE, (0, "OmxComponentAvcEncAO::ManageFrameBoundaries() - Error appending extra data to Buffer 0x%x, TS=%d, returning anyway with data corrupt flag", ipOutputBuffer->pBuffer, iOutputTimeStamp)); } } else if (0 == iNALCount) { iNALSizeSum = 0; ipOutputBuffer->nFilledLen = 0; } //Attach the end of frame flag while sending out the last piece of output buffer if (iEndOfOutputFrame) { ipOutputBuffer->nFlags |= OMX_BUFFERFLAG_ENDOFFRAME; } //Attach the end of stream flag if (iEndofStream) { ipOutputBuffer->nFlags |= OMX_BUFFERFLAG_EOS; } if (OMX_TRUE == iSyncFlag) { ipOutputBuffer->nFlags |= OMX_BUFFERFLAG_SYNCFRAME; iSyncFlag = OMX_FALSE; } ReturnOutputBuffer(ipOutputBuffer, pOutPort); oscl_memset((void *)iNALSizeArray, 0, iNALCount * sizeof(int32)); iNALCount = 0; iNALSizeSum = 0; iEndOfOutputFrame = OMX_FALSE; } } PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_NOTICE, (0, "OmxComponentAvcEncAO::ManageFrameBoundaries() Out")); }
[ "nxhk83@zebra.com" ]
nxhk83@zebra.com
fd700aee4b5a61e2081a0210e79480000469663d
f1dae21a8ff9e0d5ede4b22bd0f042180647c768
/src/mb4d_gui/work_queue.hpp
ab6fc058f80f7dd6af000557a26511451f96c00f
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
valera-rozuvan/mandelbulb-4d
b82797f8b7b1f544f54ebdaade9b37927b982033
2baf35f73802947ca28c35a19381818282b634e0
refs/heads/main
2022-12-23T15:09:39.294676
2022-11-30T18:08:20
2022-11-30T18:08:20
66,010,912
4
0
null
null
null
null
UTF-8
C++
false
false
488
hpp
#ifndef WORK_QUEUE_HPP #define WORK_QUEUE_HPP #include "work_queue_item.hpp" class WorkQueue { unsigned int num_of_queue_items; WorkQueueItem* workQueueItems; public: void initNewQueueItem(unsigned int, unsigned int, unsigned int, unsigned int); void pushItem(WorkQueueItem*); void clearQueue(void); WorkQueueItem* popNthItem(const unsigned int); WorkQueueItem* popRndItem(void); WorkQueue(void); ~WorkQueue(void); }; #endif // WORK_QUEUE_HPP
[ "valera.rozuvan@gmail.com" ]
valera.rozuvan@gmail.com
25c65306c37808cc0ed0c07a8eebcf7745c52b15
53556aa77553a697db5b7a05fd35e41bdd869000
/Chapter 2 - Feb 2021/Day 20/Unique Paths II.cpp
92f4b39c301ebe9cd8f93b8bfaba6ff48d048b3c
[]
no_license
Shree987/WinterOfCP
abace1707609475d96f9dedaef3e4a1ad2d801e4
66c989100bba0de22cf25035fe25c26172df948b
refs/heads/master
2023-04-25T01:19:01.719978
2021-05-07T18:04:49
2021-05-07T18:04:49
298,263,911
0
0
null
null
null
null
UTF-8
C++
false
false
911
cpp
/* Author : Shreeraksha R Aithal Problem name : Unique Paths II Problem link : https://leetcode.com/problems/unique-paths-ii/ Difficulty : Medium Tags : Array, Dynamic Programming */ class Solution { public: int uniquePathsWithObstacles(vector<vector<int>>& obstacleGrid) { int i, j, m = obstacleGrid.size(), n = obstacleGrid[0].size(); if(obstacleGrid[0][0] == 1 || obstacleGrid[m-1][n-1] == 1) return 0; int dp[m][n]; memset(dp, 0, sizeof(dp)); dp[0][0] = 1 - obstacleGrid[0][0]; for(i=1;i<m || i<n;i++){ if(i<m) dp[i][0] = (1 - obstacleGrid[i][0])*dp[i-1][0]; if(i<n) dp[0][i] = (1 - obstacleGrid[0][i])*dp[0][i-1]; } for(i=1;i<m;i++){ for(j=1;j<n;j++){ dp[i][j] = (dp[i-1][j] + dp[i][j-1])*(1 - obstacleGrid[i][j]); } } return dp[m-1][n-1]; } };
[ "shreeraksharaithal.181co149@nitk.edu.in" ]
shreeraksharaithal.181co149@nitk.edu.in
d65e09e45c88ec605ea0a7901994543914cc94ff
199ca5d98eadcdb354ee6ce3f7042f59770ee58b
/src/uint512.h
9285f7e0b04673666ee93d6ceb75bf047adcff5e
[ "MIT" ]
permissive
miraesni/bitmos
f0c518844c457f76c59abe692525ea8d8576b022
94a48392aa73d4b05af3d4259d335d080dcd6d04
refs/heads/master
2020-04-22T15:02:16.017100
2019-07-10T06:00:12
2019-07-10T06:00:12
170,464,520
0
0
null
null
null
null
UTF-8
C++
false
false
1,246
h
// Copyright (c) 2017 The PIVX Core developers // Copyright (c) 2018-2019 The BitmosCoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #pragma once #include "arith_uint256.h" #include "uint256.h" /** 512-bit unsigned big integer. */ class uint512 : public base_blob<512> { public: uint512() {} uint512(const base_blob<512>& b) : base_blob<512>(b) {} //explicit uint512(const std::vector<unsigned char>& vch) : base_uint<512>(vch) {} explicit uint512(const std::vector<unsigned char>& vch) : base_blob<512>(vch) {} //explicit uint512(const std::string& str) : base_blob<512>(str) {} uint256 trim256() const { std::vector<unsigned char> vch; const unsigned char* p = this->begin(); for (unsigned int i = 0; i < 32; i++) { vch.push_back(*p++); } uint256 retval(vch); return retval; } }; /* uint256 from const char *. * This is a separate function because the constructor uint256(const char*) can result * in dangerously catching uint256(0). */ inline uint512 uint512S(const char* str) { uint512 rv; rv.SetHex(str); return rv; }
[ "vric.team@gmail.com" ]
vric.team@gmail.com
c797b64d67391ad209311c66b8f3cc49caded7ce
83adae1e1ea5ce7afdaac5fe59da386662b5fc36
/poli/src/ValuCommon.cpp
d34b7ccd5eb1c088c735a36185ff0dc18790505e
[ "LicenseRef-scancode-unknown-license-reference", "AFL-3.0", "AFL-2.1" ]
permissive
Humhu/percepto
74da23a3404c3099759d469f91a79762c083e86d
4a45cce7dd294a8ce0b962bb68cae5c2b48c3b7f
refs/heads/master
2021-04-22T12:51:47.097356
2018-04-10T18:04:51
2018-04-10T18:04:51
55,803,557
2
0
null
null
null
null
UTF-8
C++
false
false
914
cpp
#include "valu/ValuCommon.h" #include "argus_utils/utils/MatrixUtils.h" using namespace argus; namespace percepto { SRSTuple::SRSTuple() {} SRSTuple::SRSTuple( const MsgType& msg ) { time = msg.header.stamp; state = GetVectorView( msg.state ); reward = msg.reward; nextTime = msg.next_time; nextState = GetVectorView( msg.next_state ); } SRSTuple::MsgType SRSTuple::ToMsg() const { MsgType msg; msg.header.stamp = time; SerializeMatrix( state, msg.state ); msg.reward = reward; msg.next_time = nextTime; SerializeMatrix( nextState, msg.next_state ); return msg; } std::ostream& operator<<( std::ostream& os, const SRSTuple& srs ) { os << "time: " << srs.time << std::endl; os << "state: " << srs.state.transpose() << std::endl; os << "reward: " << srs.reward << std::endl; os << "next time: " << srs.nextTime << std::endl; os << "next state: " << srs.nextState.transpose(); return os; } }
[ "humhu@cmu.edu" ]
humhu@cmu.edu
88723bc2fdd090125691ec0dadfee40d36123da1
9140fdf215886683b46773633fbb5c83b8570518
/problems/Question12.cpp
40e2e5facf41e04852160c4a599c78ede9de504e
[]
no_license
udbhav-sharma/Data-Structures-and-Algorithms-
13c2455755f9cccbd51e91357847ffe3273aaa33
7667282b97db24f629a220b602762a6e699c67d7
refs/heads/master
2021-07-10T15:19:40.954746
2016-10-15T19:04:20
2016-10-15T19:04:20
30,752,170
0
0
null
null
null
null
UTF-8
C++
false
false
410
cpp
//Whether a tree is BST or not class Node { int key; Node* left; Node* right; Node() { left=NULL; right=NULL; } }; bool isBST(Node* T) { static Node *prev = NULL; if(T!=NULL) { if (!isBST(T->left)) return false; if (prev != NULL && T->key < prev->key) return false; prev = T; return isBST(T->right); } return true; }
[ "udbhav.sharma15@gmail.com" ]
udbhav.sharma15@gmail.com
65809238e2bb3c0f07ff5ed3a4b8d6af1d0ba130
cd788d5d1b3b88da0d2572fb18f9ec9763348b4c
/source/vcl/aptFrames/TABProcessSequencerFrame.h
5f357d80e3f959fe25e984dc1e7c079413fc15df
[ "BSL-1.0", "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
TotteKarlsson/atapi
09af89b355358e365a5c44a306ab5429b25763f0
c91accb9f01f0effdfe1e7a493388ae4b1a9145c
refs/heads/master
2020-12-24T10:58:18.114903
2018-12-17T20:14:12
2018-12-17T20:14:12
73,213,670
0
0
NOASSERTION
2018-12-17T18:22:22
2016-11-08T18:12:22
C++
UTF-8
C++
false
false
2,626
h
#ifndef TABProcessSequencerFrameH #define TABProcessSequencerFrameH #include <System.Classes.hpp> #include <Vcl.Controls.hpp> #include <Vcl.StdCtrls.hpp> #include <Vcl.Forms.hpp> #include "dslTFloatLabeledEdit.h" #include "dslTFloatLabeledEdit.h" #include <Vcl.ExtCtrls.hpp> #include "arraybot/process/atProcessSequencer.h" #include <System.Actions.hpp> #include <Vcl.ActnList.hpp> #include "TMotorMoveProcessFrame.h" #include "TParallelProcessesFrame.h" #include "dslTFloatLabeledEdit.h" #include "TTimeDelayFrame.h" #include "TSequenceInfoFrame.h" #include "TArrayBotBtn.h" #include <Vcl.Buttons.hpp> //--------------------------------------------------------------------------- class ArrayBot; class PACKAGE TABProcessSequencerFrame : public TFrame { __published: // IDE-managed Components TButton *mStartBtn; TComboBox *mSequencesCB; TTimer *mSequenceStatusTimer; TLabel *mStatusLbl; TActionList *Actions; TAction *addCombinedMovesProcessA; TAction *removeProcessA; TGroupBox *GroupBox2; TPanel *Panel1; TAction *addTimeDelayProcess; TPanel *mMainPanel; TPanel *mLeftPanel; TPanel *Panel2; TCheckBox *mSteppedExecutionCB; TButton *mRewindButton; TArrayBotButton *mAddSeqBtn; TArrayBotButton *mDeleteSequenceBtn; TArrayBotButton *EditBtn; TScrollBox *mProcessPanel; TSplitter *Splitter1; TArrayBotButton *ArrayBotButton1; void __fastcall mDeleteSequenceBtnClick(TObject *Sender); void __fastcall mAddSeqBtnClick(TObject *Sender); void __fastcall StartBtnClick(TObject *Sender); void __fastcall mSaveSequenceBtnClick(TObject *Sender); void __fastcall mSequencesCBChange(TObject *Sender); void __fastcall mSequenceTimerTimer(TObject *Sender); void __fastcall mRewindButtonClick(TObject *Sender); void __fastcall EditBtnClick(TObject *Sender); void __fastcall BtnClick(TObject *Sender); private: static int mFrameNr; ProcessSequencer& mProcessSequencer; ArrayBot& mAB; string mProcessFileExtension; string mAppDataFolder; string getCurrentlySelectedSequenceName(); void __fastcall refreshSequencesCB(); void saveSequence(); //!The SequenceInfo frame is dynamically allocated TSequenceInfoFrame* TSequenceInfoFrame1; public: __fastcall TABProcessSequencerFrame(ProcessSequencer& ps, const string& appFolder, TComponent* Owner); __fastcall ~TABProcessSequencerFrame(); void init(); }; extern PACKAGE TABProcessSequencerFrame *ABProcessSequencerFrame; #endif
[ "tottek@gmail.com" ]
tottek@gmail.com
f2d9323e7ef61d3ab326cdb912d3839816386c57
bc76e59dfeb0d6ceb0db55cc78ce182b67283a88
/D3D11Demo/Sample/BaseDemo/SpecularLight/SpecularLight.cpp
08123bbc1576e82932e0c9f5d5168d5f8b88892b
[]
no_license
luoxz-ai/D3D11Demo
bea4fc37e18887300c8834b321d7634b74e9e94c
4f36383bee35bbe4449d170935c03c742912e740
refs/heads/master
2021-05-29T06:18:29.837708
2015-09-03T12:55:23
2015-09-03T12:55:23
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,997
cpp
#include "SpecularLight.h" #include "SwapChain.h" #include "Texture/DDSTextureLoader.h" #include "D3D11RendererMesh.h" #include "D3D11RendererMaterial.h" #include "TrackballCameraController.h" #include "CommonStates.h" SpecularLight::SpecularLight(HINSTANCE hInstance, int nWidth /*= 1024*/, int nHeight /*= 600*/) : D3D11App(hInstance) { mClientWidth = nWidth; mClientHeight = nHeight; } SpecularLight::~SpecularLight() { SAFE_RELEASE(srv); } void SpecularLight::InitResource() { RendererMaterialDesc desc; desc.vertexShaderPath = "SpecularLight\\SpecularLightVS.hlsl"; desc.pixelShaderPath = "SpecularLight\\SpecularLightPS.hlsl"; desc.vecPass.push_back("main"); m_Material = std::make_shared<D3D11RendererMaterial>(desc); m_MeshModel = std::make_shared<D3D11RendererMesh>(); MeshData meshData; GeoGen::CreateSphere(1, 50, 50, meshData); //GeoGen::CreateBox(1, 1, 1, meshData); bool bBuild = m_MeshModel->BuildBuffers(meshData); ID3D11Texture2D* pTexture2D; HRESULT ret = DirectX::CreateDDSTextureFromFile( m_d3dDevice, L"seafloor.dds", (ID3D11Resource**)&pTexture2D, &srv ); SAFE_RELEASE(pTexture2D); } void SpecularLight::UpdateScene(float dt) { } void SpecularLight::DrawScene() { SwapChainPtr->Begin(); m_deviceContext->OMSetDepthStencilState(g_objStates.DepthDefault(), 1); ID3D11SamplerState* LinearClamp = g_objStates.AnisotropicWrap(); m_deviceContext->PSSetSamplers(0, 1, &LinearClamp); m_Material->PSSetShaderResources("shaderTexture", &srv); Matrix mWorld; Matrix mView; Matrix mProj; Matrix mWorldViewProjection; mView = g_objTrackballCameraController.View(); mProj = g_objTrackballCameraController.Proj(); mWorldViewProjection = mView * mProj; Matrix worldMatrix = Matrix::CreateTranslation(0, 0, 0); XMMATRIX rz = XMMatrixRotationY(XM_PIDIV4 * mTimer.TotalTime()); // lightDirection = lightDirection.Transform(lightDirection, rz); Vector4 ambientColor = { 0.15f, 0.15f, 0.15f, 1.0f }; m_Material->PSSetConstantBuffers("ambientColor", &ambientColor); Vector4 diffuseColor = { 1.0f, 1.0f, 1.0f, 1.0f }; m_Material->PSSetConstantBuffers("diffuseColor", &diffuseColor); Vector3 lightDirection = { 0.0f, 0.0f, 1.0f }; m_Material->PSSetConstantBuffers("lightDirection", &lightDirection); float specularPower = 32.0f; m_Material->PSSetConstantBuffers("specularPower", &specularPower); Vector4 specularColor = { 1.0f, 1.0f, 1.0f, 1.0f }; m_Material->PSSetConstantBuffers("specularColor", &specularColor); m_Material->SetMatrix(rz, mView, mProj); Vector3 cameraPosition = g_objTrackballCameraController.EyePos(); m_Material->VSSetConstantBuffers("cameraPosition", &cameraPosition); m_deviceContext->OMSetDepthStencilState(g_objStates.DepthDefault(), 1); m_MeshModel->render(m_Material.get()); worldMatrix = Matrix::CreateTranslation(lightDirection) * Matrix::CreateScale(0.2f, 0.2f, 0.2f); // m_Material->SetMatrix(worldMatrix, mView, mProj); // m_MeshModel->render(m_Material.get()); SwapChainPtr->Flip(); }
[ "wumi_liu@foxitsoftware.com" ]
wumi_liu@foxitsoftware.com
47310456866a73ce85b2bc67b855ebcc50efb163
91113f3b0174829a4936f965bd4f3b3aa64be0a5
/1865/1865/1865.cpp
59fb57a3bd4532d5b9ff5158cde67856e383556d
[]
no_license
bae-sh/BOJ
cc35a7506814b07e6224282fa279b67127e09834
88b2daba61dbab0c7d2844151ffd4018069b76a1
refs/heads/master
2023-07-10T01:30:30.636339
2023-07-09T04:29:32
2023-07-09T04:29:32
146,845,143
1
0
null
null
null
null
UTF-8
C++
false
false
991
cpp
#include<iostream> #include<cstring> #include<vector> #define INF 987654321 using namespace std; int T; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> T; while (T-- > 0) { int N, M, W; cin >> N >> M >> W; long long Dist[501]; vector<pair<int, pair<int, int>>> v; bool negative_cycle = false; fill(Dist, Dist + 501, 0); for (int i = 0; i < M; i++) { int s, e, t; cin >> s >> e >> t; v.push_back({ s,{e,t} }); v.push_back({ e,{s,t} }); } for (int i = 0; i < W; i++) { int s, e, t; cin >> s >> e >> t; v.push_back({ s,{e,-t} }); } for (int i = 1; i <= N; i++) { for (int j = 0; j < v.size(); j++) { int from = v[j].first; int to = v[j].second.first; int cost = v[j].second.second; if (Dist[to] > Dist[from] + cost) { Dist[to] = Dist[from] + cost; if (i == N) { negative_cycle = true; } } } } if (negative_cycle) { cout << "YES\n"; } else { cout << "NO\n"; } } }
[ "b5460881@naver.com" ]
b5460881@naver.com
0d7022e9cb6aaa66a5f3943487823c2037eb76d5
7a07262ccc563634a1b5e42dbdfc3b3cdd1ee573
/Program5/GUIWidgetScript.cpp
26815534365b124aa1d2f7127fdd3bc20df6f2c8
[]
no_license
celand42/MoonLanding
365976f9cb470a427682b59aa6dc86b50240dea3
e35af06ff4bbce8e4a21fc89fb7cfaa2612c26a8
refs/heads/master
2021-01-20T05:31:35.290548
2015-05-04T02:42:12
2015-05-04T02:42:12
32,902,252
0
0
null
null
null
null
UTF-8
C++
false
false
899
cpp
#include "GUIWidgetScript.h" GUIWidgetScript::GUIWidgetScript(MyGUI::Widget* w, string wn) { widget = w; widget_name = wn; } GUIWidgetScript::~GUIWidgetScript() { widget = NULL; } string* GUIWidgetScript::getKey() { return &widget_name; } string& GUIWidgetScript::getFileName() { return file_name; } string& GUIWidgetScript::getScriptName() { return script_name; } void GUIWidgetScript::setFileName(string fn) { file_name = fn; } void GUIWidgetScript::setScriptName(string sn) { script_name = sn; } int GUIWidgetScript::compare_items(GUIWidgetScript* widget_1, GUIWidgetScript* widget_2) { string* key_1 = widget_1->getKey(); return compare_keys(key_1, widget_2); } int GUIWidgetScript::compare_keys(string* key, GUIWidgetScript* widget) { const char* key_1 = key->c_str(); const char* key_2 = widget->getKey()->c_str(); return strcmp(key_1, key_2); }
[ "landchase4@gmail.com" ]
landchase4@gmail.com
72d6d42610d5ef726c7aa3d8b02a95ac502b15a5
ac2f2177fc4709f3c94d66e29b5e140e62dcce80
/library/lock.cpp
ae5bb0eea1b9ac3ef2a610cfa0693a4760a3083d
[ "BSL-1.0" ]
permissive
leojenns/touchless-safe-
53f11f8b4cbe6e001731f52390e9049b9b99d0db
d57f82b9cacf043775a140aa92cbea667874c705
refs/heads/master
2021-01-17T20:08:45.278640
2016-06-20T09:53:53
2016-06-20T09:53:53
59,851,145
0
0
null
null
null
null
UTF-8
C++
false
false
1,823
cpp
/**************************************************************************************************************************** * auther :: Leo Jenneskens * File :: lock.cpp * Date:: 18 - june - 2016 * copyright: Leo Jenneskens 2016 * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) *******************************************************************************************************************************/ #include "lock.hpp" lock::lock(hwlib::target::pin_out & pinout, hwlib::target::pin_in & pinin ): motor(pinout),movement(pinin){} void lock::open(){ if (status==0){ turnto0(); status =1; } } void lock::close(){ if (status==1){ turnto90(); status = 0; } } void lock::pir(){ if(get() ==1){ close(); // wait for 1,5 second hwlib::wait_ms(1500); } }
[ "leo.jenns.s2@gmail.com" ]
leo.jenns.s2@gmail.com
0a4027b18226d3b86c06cd0fa632fe2fd6aaa9d5
04b1803adb6653ecb7cb827c4f4aa616afacf629
/chrome/browser/sessions/tab_loader_tester.cc
c1d1a644e0ee07bfe312777964c19f94d36a9639
[ "BSD-3-Clause" ]
permissive
Samsung/Castanets
240d9338e097b75b3f669604315b06f7cf129d64
4896f732fc747dfdcfcbac3d442f2d2d42df264a
refs/heads/castanets_76_dev
2023-08-31T09:01:04.744346
2021-07-30T04:56:25
2021-08-11T05:45:21
125,484,161
58
49
BSD-3-Clause
2022-10-16T19:31:26
2018-03-16T08:07:37
null
UTF-8
C++
false
false
3,388
cc
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/sessions/tab_loader_tester.h" #include "base/run_loop.h" #include "base/test/bind_test_util.h" TabLoaderTester::TabLoaderTester() = default; TabLoaderTester::TabLoaderTester(TabLoader* tab_loader) : tab_loader_(tab_loader) {} TabLoaderTester::~TabLoaderTester() = default; void TabLoaderTester::SetTabLoader(TabLoader* tab_loader) { tab_loader_ = tab_loader; } // static void TabLoaderTester::SetMaxLoadedTabCountForTesting(size_t value) { TabLoader::SetMaxLoadedTabCountForTesting(value); } // static void TabLoaderTester::SetConstructionCallbackForTesting( base::RepeatingCallback<void(TabLoader*)>* callback) { TabLoader::SetConstructionCallbackForTesting(callback); } void TabLoaderTester::SetMaxSimultaneousLoadsForTesting(size_t loading_slots) { tab_loader_->SetMaxSimultaneousLoadsForTesting(loading_slots); } void TabLoaderTester::SetTickClockForTesting(base::TickClock* tick_clock) { tab_loader_->SetTickClockForTesting(tick_clock); } void TabLoaderTester::MaybeLoadSomeTabsForTesting() { tab_loader_->MaybeLoadSomeTabsForTesting(); } void TabLoaderTester::ForceLoadTimerFired() { tab_loader_->ForceLoadTimerFired(); } void TabLoaderTester::OnMemoryPressure( base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level) { tab_loader_->OnMemoryPressure(memory_pressure_level); } void TabLoaderTester::SetTabLoadingEnabled(bool enabled) { tab_loader_->SetTabLoadingEnabled(enabled); } bool TabLoaderTester::IsLoadingEnabled() const { return tab_loader_->IsLoadingEnabled(); } size_t TabLoaderTester::force_load_delay_multiplier() const { return tab_loader_->force_load_delay_multiplier_; } base::TimeTicks TabLoaderTester::force_load_time() const { return tab_loader_->force_load_time_; } base::OneShotTimer& TabLoaderTester::force_load_timer() { return tab_loader_->force_load_timer_; } const TabLoader::TabVector& TabLoaderTester::tabs_to_load() const { return tab_loader_->tabs_to_load_; } size_t TabLoaderTester::scheduled_to_load_count() const { return tab_loader_->scheduled_to_load_count_; } // static TabLoader* TabLoaderTester::shared_tab_loader() { return TabLoader::shared_tab_loader_; } resource_coordinator::SessionRestorePolicy* TabLoaderTester::GetPolicy() { return tab_loader_->delegate_->GetPolicyForTesting(); } bool TabLoaderTester::IsSharedTabLoader() const { return tab_loader_ == TabLoader::shared_tab_loader_; } bool TabLoaderTester::HasTimedOutLoads() const { if (tab_loader_->tabs_loading_.empty()) return false; base::TimeTicks expiry_time = tab_loader_->tabs_loading_.begin()->loading_start_time + tab_loader_->GetLoadTimeoutPeriod(); return expiry_time <= tab_loader_->clock_->NowTicks(); } void TabLoaderTester::WaitForTabLoadingEnabled() { base::RunLoop run_loop; TabLoader* tab_loader = tab_loader_; auto callback = base::BindLambdaForTesting([&run_loop, tab_loader](bool loading_enabled) { if (loading_enabled && tab_loader->IsLoadingEnabled()) run_loop.Quit(); }); tab_loader_->SetTabLoadingEnabledCallbackForTesting(&callback); run_loop.Run(); tab_loader_->SetTabLoadingEnabledCallbackForTesting(nullptr); }
[ "sunny.nam@samsung.com" ]
sunny.nam@samsung.com
e76b1a7ab4a89a256fdadd2b4f2c8ddc8f541c5a
b90a96f487dfc62377dab3d93f3044cf63d05b65
/ZRXSDK/2012/inc/zgelibver.h
511817f7747d09875ce7505ab19f9dff3eb358f3
[ "MIT" ]
permissive
yaochq/ZRXSDKMod
bde5bd5248c3d303565a704c47a096792b55f048
2d2de60ab45db535439e6608fb4764835fd72ff7
refs/heads/master
2021-01-22T08:28:29.168802
2014-05-04T01:01:35
2014-05-04T01:01:35
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,676
h
#ifndef ZC_GELIBVERSION_H #define ZC_GELIBVERSION_H #include "zadesk.h" #include "zgedll.h" #pragma pack (push, 8) #define IMAGE_MAJOR_VER 2 #define IMAGE_MINOR_VER 0 #define IMAGE_CORRECTIVE_VER 0 #define IMAGE_INTERNAL_VER 0 class GE_DLLEXPIMPORT ZcGeLibVersion { public: ZcGeLibVersion(); ZcGeLibVersion(const ZcGeLibVersion&); ZcGeLibVersion(ZSoft::UInt8 major, ZSoft::UInt8 minor, ZSoft::UInt8 corrective, ZSoft::UInt8 internal_version); ZSoft::UInt8 majorVersion () const; ZSoft::UInt8 minorVersion () const; ZSoft::UInt8 correctiveVersion () const; ZSoft::UInt8 schemaVersion () const; ZcGeLibVersion& setMajorVersion (ZSoft::UInt8 val); ZcGeLibVersion& setMinorVersion (ZSoft::UInt8 val); ZcGeLibVersion& setCorrectiveVersion (ZSoft::UInt8 val); ZcGeLibVersion& setSchemaVersion (ZSoft::UInt8 val); ZSoft::Boolean operator == (const ZcGeLibVersion&) const; ZSoft::Boolean operator != (const ZcGeLibVersion&) const; ZSoft::Boolean operator < (const ZcGeLibVersion&) const; ZSoft::Boolean operator <= (const ZcGeLibVersion&) const; ZSoft::Boolean operator > (const ZcGeLibVersion&) const; ZSoft::Boolean operator >= (const ZcGeLibVersion&) const; static const ZcGeLibVersion kRelease0_95; static const ZcGeLibVersion kReleaseSed; static const ZcGeLibVersion kReleaseTah; private: ZSoft::UInt8 mVersion[10]; }; #pragma pack (pop) #endif
[ "kevinzhwl@gmail.com" ]
kevinzhwl@gmail.com
60370d8b92f9d453b45f5cc556169effb8157413
ee762a7468148835a4e375168d4acc507abfc67d
/Goblin.h
82ce1fc7d6abbd11b36c9c217d96a70452a8903a
[]
no_license
MatudaGames/Classes
a7c6ddfadd630bf3a34b33f7a8970a6553ce0221
b2ac0e22f647d916c4842c6c50f8d1f68d40f8d5
refs/heads/master
2020-05-29T16:01:56.421884
2015-04-09T18:07:51
2015-04-09T18:07:51
32,596,808
0
0
null
null
null
null
UTF-8
C++
false
false
2,867
h
// // Goblin.h // DwarfForest // // Created by Kristaps Auzins on 01/09/14. // // #pragma once #include <cocos2d.h> #include "Dwarf.h" #include "Crystal.h" class GameScene; class SpriteAnimation; class Effect; class Goblin: public cocos2d::CCNode, public cocos2d::CCTargetedTouchDelegate { public: static Goblin* create(GameScene* game); Goblin(); virtual ~Goblin(); virtual bool init(GameScene* game); virtual void update(float delta); virtual void onEnter(); virtual void onExit(); virtual bool ccTouchBegan(cocos2d::CCTouch* touch, cocos2d::CCEvent* event); virtual void ccTouchMoved(cocos2d::CCTouch* touch, cocos2d::CCEvent* event); virtual void ccTouchEnded(cocos2d::CCTouch* touch, cocos2d::CCEvent* event); bool _touched; bool mRunToExit; int mExit_X; int mExit_Y; int mTimesTaped; float mTimeDown; void HitGoblin(bool theRemove); bool mTutorfix; Crystal* mCrystalCatch; float mGoblinScale; bool mTutorialGoblin; bool mMoveByNodes; int mMoveIndex; bool mMoveClock; int mMoveCurrentDir; //Special stuff bool mPatrolPoints; bool mMoveToControl_1; cocos2d::CCPoint mGoblinPatrolPoint_1; cocos2d::CCPoint mGoblinPatrolPoint_2; cocos2d::CCSprite* mDrawLine; int mDrawLineID; void setAngle(float value); void setAnimation(SpriteAnimation* animation); bool getTouchable(); void setFadeIn(); void setVictory(); void removeFromSave(); void setForceRemove(); void setAnimationVisibility(bool theValue); float GetAngle(); void setEffect(Effect* value); void removeEffect(); void SetDrawLine(int theLine); bool getCanMove() const { return _canMove; } void setCanMove(bool value) { _canMove = value; } bool getForceRemove() const { return _forceRemove; } bool getIsDisabled() { return _isDisabled; } bool blitzHit; SpriteAnimation* _animation; bool _canMove; float _waitForReturn; float _angle; float _speed; float _lastSetAngle; float _timeInGame; void CatchDwarf(Dwarf* theDwarf); void CancelDwarfCatch(Dwarf* theCancelDwarf); bool mCatchingCrystal; float mStartCatchCrystal; Dwarf* mDwarfToCatch; cocos2d::CCSprite* mCatchRadar; cocos2d::CCSprite* mWarnIcon; float mGoblinStartY; cocos2d::CCSprite* mHeadIcon; SpriteAnimation* _crashAnimation; bool _touchable; private: GameScene* _game; SpriteAnimation* _leftDownAnimation; SpriteAnimation* _leftUpAnimation; SpriteAnimation* _leftAnimation; SpriteAnimation* _upAnimation; SpriteAnimation* _downAnimation; SpriteAnimation* _victory; SpriteAnimation* _removeSmoke; bool _isDisabled; bool _forceRemove; };
[ "kristapsauzins@Kristapss-iMac.local" ]
kristapsauzins@Kristapss-iMac.local
fed91130fc29fcf9f4cac838becfea9ee879d8dc
c205090aeba439c1d2fcc6960b26b6e9ff060f05
/Caribbean Training 2017/contest0/G.cpp
c5e1e5774b285b9f4d71aa8b5396d8ad0c897cd4
[]
no_license
frcepeda/Contest-Archive
3c407faeec383943e1992f236c199ecf20e2dd41
4d4684bb0310a113d8f9b8ac3419367b840c5771
refs/heads/master
2023-05-28T10:17:23.298665
2023-05-22T17:27:44
2023-05-22T17:27:44
6,360,042
21
16
null
null
null
null
UTF-8
C++
false
false
1,148
cpp
#include <cstdio> #include <map> #include <vector> #include <queue> #include <algorithm> using namespace std; #define mp make_pair #define fst first #define snd second typedef pair<int,int> pii; int M, N, p, q; pii s, t; map<pii,pii> pr; int dx[8], dy[8]; vector<pii> go(){ queue<pii> q; pr[s] = mp(0,0); q.push(s); while (!q.empty()){ pii c = q.front(); q.pop(); for (int i = 0; i < 8; i++){ pii d = mp(c.fst + dx[i], c.snd + dy[i]); if (d.fst < 1 || d.fst > M || d.snd < 1 || d.snd > N || pr.find(d) != pr.end()) continue; pr[d] = c; q.push(d); } } vector<pii> v; if (pr.find(t) == pr.end()) return v; for (pii c = t; c != mp(0,0); c = pr[c]) v.push_back(c); return v; } int main(){ scanf("%d %d %d %d %d %d %d %d", &M, &N, &p, &q, &s.fst, &s.snd, &t.fst, &t.snd); for (int i = 0; i < (1<<3); i++){ int a = (i&1) ? p : q; int b = (i&1) ? q : p; dx[i] = a * ((i&2)?1:-1); dy[i] = b * ((i&4)?1:-1); } vector<pii> v = go(); printf("%d\n", ((int)v.size())-1); for (vector<pii>::reverse_iterator i = v.rbegin(); i != v.rend(); i++) printf("%d %d\n", i->fst, i->snd); }
[ "me@freddy.mx" ]
me@freddy.mx
9a29f8ca8b3c77c12f57dcb838bde61cf12b5e11
fc3d33e19eec1c2238d2e0d63d57f6c9dec72c4b
/VGEEarthCLR/VGEGlobe.h
308f03a4d48facfa6a105354d97697c3a15e84ab
[]
no_license
wplwj123/VGEEarth
3b130f5d31218402b2bb787c4a7e0cba393c635a
68421c41126d70bbdd53316a30935cb4b5dba4e0
refs/heads/master
2021-07-25T02:51:43.258528
2017-11-06T12:48:52
2017-11-06T12:48:52
108,487,284
0
0
null
null
null
null
UTF-8
C++
false
false
9,820
h
#pragma once #include "VGEEnum.h" #include "VGE3DAnalysis.h" #include "VGEAnimationPages.h" #include "VGE3DMeasure.h" #include "VGEEnvironment.h" #include "VGECamera.h" #include "VGEControl.h" #include "VGEDataManager.h" #include "VGELayer.h" #include "VGELatLonGrid.h" #include "VGEOcean.h" using namespace VGE::GeoData; namespace VGE{ namespace Globe{ class VGEGlobe{ public: VGEGlobe(); ~VGEGlobe(); public: void AddFeatureToSelection(VGEFeature feature, bool bAllowEdit); void AddHudControl(VGEHudControl control); int AddPit(std::string strName, VGEGeoPit geoPit); bool AddToEditHistroy(VGELayer layer, VGEFeature feature, EnumEditType eType); bool AddToEditHistroy(VGELayer layer, VGEFeature feature, VGEFeature oldFeature, EnumEditType eType); void ButtjointPipelineDataset(VGEDataset dataset, bool bIgnoreZ, double dTolerance); void ButtjointPipelineDataset(VGEDataset dataset); void ButtjointSelPipeline(bool bIgnoreZ, double dTolerance); void ButtjointSelPipeline(); void ButtjointSelPipelineWithIntersect(); void CancelPipelineDatasetJoint(VGEDataset dataset, bool bCancelHeadJoint, bool bCanchelTailJoint); void CancelSelPipelineJoint(bool bCancelHeadJoint, bool bCanchelTailJoint); void ClearAnalysis(); void ClearLastTrackPolygon(); void ClearLastTrackPolyline(); void ClearMeasure(); void ClearSelection(); bool ConnectServer(std::string strIP, int nPort, std::string strUser, std::string strPsw); int ConnectServer2(std::string strIP, int nPort, std::string strUser, std::string strPsw); void ContinueFly(); void DecjointSelPipeline(double dDecHead, double dDecTail); void FlyAlongWithLine(VGEGeoPolyline3D geoLine, double dHeightAboveLine, double dHeading, double dTilt); void FlyAroundCenter(double dRepeatValue, EnumFlyRepeatValueType enValueType); void FlyAroundCenter(); void FlyAroundEye(double dRepeatValue, EnumFlyRepeatValueType enValueType); void FlyAroundEye(); void FlyAroundFeature(VGEFeature feature, bool bAlwaysFly, double dRepeatValue, EnumFlyRepeatValueType enValueType); void FlyAroundGeometry(VGEGeometry geometry, bool bAlwaysFly, double dRepeatValue, EnumFlyRepeatValueType enValueType); void FlyAroundPosition(VGEPoint3D position, bool bAlwaysFly, double dRepeatValue, EnumFlyRepeatValueType enValueType); void FlyEyeAlongWithLine(VGEGeoPolyline3D geoLine); void FlyEyeAlongWithLine(VGEGeoPolyline3D geoLine, EnumAltitudeMode altMode, double dHeightAboveLine, double dTilt, bool bUseParamTilt, double dHeading, bool bUseParamHeading); void FlyEyeAlongWithLine(VGEGeoPolyline3D geoLine, double dHeightAboveLine, double dTilt, bool bUseParamTilt, double dHeading, bool bUseParamHeading); void FlyToCameraState(VGECameraState cameraState); void FlyToFeature(VGEFeature feature, double dHeading, double dTilt, double dDistance); void FlyToFeature(VGEFeature feature); void FlyToGeometry(VGEGeometry geometry, double dHeading, double dTilt, double dDistance); void FlyToGeometry(VGEGeometry geometry); void FlyToPosition(VGEPoint3D position, EnumAltitudeMode altMode, double dHeading, double dTilt, double dDistance); void FlyToPosition(VGEPoint3D position, EnumAltitudeMode altMode); void FullExtent(); double Get2PointDist(VGEPoint3D pnt1, VGEPoint3D pnt2); double Get2PointEulaDist(VGEPoint3D pnt1, VGEPoint3D pnt2); VGEHudControl GetHudControlByName(std::string name); VGEGeoPit GetPitByID(int nID); VGEGeoPit GetPitByName(std::string strName); void GetSelectObject(int nIndex, VGEFeature resFeature, VGELayer resLayer); double GetZ(double lon, double lat); VGEFeature HitTest(int x, int y, bool isIgnore2DObject, bool isIgnoreLayerSelectable); VGEFeature HitTest(int x, int y, VGELayer resLayer, VGEPoint3D geoPoint, bool isIgnore2DObject, bool isIgnoreLayerSelectable, int nSelLevel); VGEFeature InsertJointPipeline(bool bAddToDestLayer); VGEGeoPolyline3D InsertJointPipeline1(VGEPipeLineStyle3D resultStyle); bool IsCameraChanged(); bool IsVideoRecording(); void JumpTo(VGECameraLookAt cameraLookAt); void JumpToCameraState(VGECameraState cameraState); void JumpToFeature(VGEFeature feature, double dDistance); void JumpToGeometry(VGEGeometry geometry, double dDistance); void JumpToPosition(VGEPoint3D position, EnumAltitudeMode altMode, double dDistance); bool OpenWorkSpace(std::string strPath); bool OutputHighPic(float dWidthPix, float dHightPix, std::string strFilePath); void PaseRecordVideo(); void PauseFly(); void ReDoEdit(); void Refresh(); void RefreshAnalysis(); void RemoveAllPits(); void RemoveLastPit(); void RemovePitByID(int nID); void RemovePitByName(std::string strName); void ResumeRecordVideo(); void SaveAsWorkSpace(std::string strPath); VGEPoint2D SceneToScreen(VGEPoint3D pnt); VGEPoint3D ScreenToScene(int x, int y); void StartRecordVideo(); void StopFly(); void StopRecordVideo(); void UnDoEdit(); private: EnumAction3D action; //set, get EnumCameraMode cameraMode; //set, get EnumRenderDetail ModelRenderDetail; //set, get VGECameraLookAt cameraLookAt; //set, get VGECameraState cameraState; //set, get VGEAtmosphere Atmosphere; //get VGEClouds clouds; //get VGEOcean ocean; //get VGERain rain; //get VGELight sceneLight; //get VGESkyBox skyBox; //get VGESnow snow; //get VGESun sun; //get VGEUnderGroundFloor UnderGroundFloor; //get VGEControlPanel controlPanel; //get VGEHudControl overviewControl; //get VGEHudControl scalerControl; //get VGEStatusBar statusBar; //get VGELayers layers; //get VGETerrains Terrains; //get VGELayer destLayerFeatureAdd; //set, get VGELatLonGrid latlonGrid; //get VGEMemoryLayer memoryLayer; //get VGELayer selectedObjectLayer; //get VGEFeature selectedObject; //get VGEPoint3D selNodePos; //get VGERect2D viewBounds; //get VGEAnimationPages animationPages; //get VGE3DAnalysis analysis3D; //get VGEViewEnvelopeAnalysis viewEnvelopeAnalysis; //get VGEViewshedAnalysis ViewshedAnalysis; //get VGEViewshed3DAnalysis Viewshed3DAnalysis; //get VGEAreaRuler areaRuler; //get VGEDistanceRuler distanceRuler; //get VGEHeightRuler heightRuler; //get VGETrackPolygonTool trackPolygonTool; //get VGETrackPolylineTool trackPolylineTool; //get VGETrackRectTool trackRectTool; //get VGEElecLineStyle3D defaultElecLineStyle3D; //set, get VGEElecLineStyle3D defaultInnerElecLineStyle3D; //set, get VGEElecLineStyle3D highlightElecLineStyle3D; //set, get VGEPipeLineStyle3D defaultJointPipelineStyle; //set, get VGEEntityStyle3D highlightEntityStyle3D; //set, get VGEMarkerStyle3D highlightMarkerStyle3D; //set, get VGETextStyle highlightTextStyle; //set, get VGE::DataManager::VGEDataManager dataManager; //get bool antialiasing; //set, get std::string bkImage; //set float blurEnhance; //set, get float blurWidth; //set, get bool bothFaceRendered; //set, get double buttjointTolerance; //set, get std::string cachePath; //set, get int cacheSize; //set, get int curFlyID; //set, get float decjointValue; //set, get std::string DefaultRelativeDir; //set, get bool editClampObject; //set, get int editHistorySize; //set, get bool editSnapObject; //set, get bool featureMouseOverEnable; //set, get bool featureMouseOverHighLight; //set, get double flyAlongLineRotateSpeed; //set, get double flyAlongLineSpeed; //set, get double flyToPointSpeed; //set, get int groundOpaque; //set, get bool hasSelNode; //get bool isAudioRecorded; //set, get bool isCADPointLoaded; //set, get bool isEditSelectLocked; //set, get bool isReleaseMemOutOfView; //set, get bool isUnderGroundLocked; //set, get bool keyBoradRoamingEnable; //set, get bool marbleVisible; //set, get double maxUserBackgroundAlt; //set, get int minModelVisibleSize; //set, get double minUserBackgroundAlt; //set, get int minVectorVisibleSize; //set, get float modelBlurEnhance; //set, get float modelBlurWidth; //set, get bool modelUseLighting; //set, get bool mouseRoamingEnable; //set, get bool object2DMouseOverEnable; //set, get double onePixelRealLenInNearest; //get double powerLineLinkVisibleDistance; //set, get double powerLineNodeVisibleDistance; //set, get Color sceneAmbient; //set, get int selLevel; //set, get int selObjectCount; //get bool starsVisible; //set, get double terrainExra; //set, get bool terrainUseLighting; //set, get Color userBackgroundColor; //set, get bool userBackgroundColorValid; //set, get double userFarProDist; //set, get double userNearProDist; //set, get bool usingFBO; //set, get bool usingVBO; //set, get std::string videoPath; //set, get int videoRecordInterval; //set, get double viewRange; //get float walkCrossHeight; //set, get float walkEyeHeight; //set, get float walkJumpHeight; //set, get }; } }
[ "wplwj123@users.noreply.github.com" ]
wplwj123@users.noreply.github.com
8d04368c2b1c8782e7a4786a03434cd5b8965b2f
3fdb0447dbb68c77262f8d7a87342577a2ef32f8
/src/type-feedback-vector-inl.h
43e768ee5df86601fe070ff05e102b4798b78bb1
[ "BSD-3-Clause", "bzip2-1.0.6" ]
permissive
AbhiAgarwal/v8
102f072135b3640e03f248f8942bb4c9d77b2f63
232c2ae265f31bb3d601c839b36c92506367e454
refs/heads/master
2022-11-08T21:17:59.806926
2014-10-07T04:58:34
2014-10-07T04:58:34
24,877,336
1
1
NOASSERTION
2022-10-27T05:58:00
2014-10-07T04:58:07
C++
UTF-8
C++
false
false
1,222
h
// 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. #ifndef V8_TYPE_FEEDBACK_VECTOR_INL_H_ #define V8_TYPE_FEEDBACK_VECTOR_INL_H_ #include "src/type-feedback-vector.h" namespace v8 { namespace internal { Handle<Object> TypeFeedbackVector::UninitializedSentinel(Isolate* isolate) { return isolate->factory()->uninitialized_symbol(); } Handle<Object> TypeFeedbackVector::MegamorphicSentinel(Isolate* isolate) { return isolate->factory()->megamorphic_symbol(); } Handle<Object> TypeFeedbackVector::PremonomorphicSentinel(Isolate* isolate) { return isolate->factory()->megamorphic_symbol(); } Handle<Object> TypeFeedbackVector::GenericSentinel(Isolate* isolate) { return isolate->factory()->generic_symbol(); } Handle<Object> TypeFeedbackVector::MonomorphicArraySentinel( Isolate* isolate, ElementsKind elements_kind) { return Handle<Object>(Smi::FromInt(static_cast<int>(elements_kind)), isolate); } Object* TypeFeedbackVector::RawUninitializedSentinel(Heap* heap) { return heap->uninitialized_symbol(); } } } // namespace v8::internal #endif // V8_TYPE_FEEDBACK_VECTOR_INL_H_
[ "me@abhiagarwal.com" ]
me@abhiagarwal.com
9babedf6389963b69a0e62e75334353ca6c5b642
a5c3b4d98ddc0d9f919fa5597580cceb39bd5072
/week_6/2018202098ZXK/src/Tag.cpp
fbd2271deccc2d80c4bb26429e74f2a8af9881cf
[]
no_license
WhiteCatFly/Turing_Student_Code_2019
17f4ed781327706b14b66ef90b0b90478792915b
4d744f6a3072dc9184c10c5daad60dee4a83a588
refs/heads/master
2021-06-15T02:32:07.977336
2019-07-05T07:06:32
2019-07-05T07:06:32
173,031,113
8
27
null
2020-01-09T01:44:23
2019-02-28T03:04:38
C++
UTF-8
C++
false
false
1,575
cpp
#include "HTMLParser.h" #define DEBUG 0 using std::string; //inline bool IsLink(const string& str) {return regex_match(str, link_re);} void delTagDfs(Tag* tag) { if(!tag) return; for(Tag* p = tag -> son(); p != NULL; p = p -> next()) delTagDfs(p); delete tag; } int output_dfs(Tag *tg, DFSMODE md, std::ofstream& oflie){ int num = 0; if(md == LINKMODE){ if(tg -> attrs.count("href")){ oflie << tg -> attrs["href"] << std::endl; num++; } } else if(md == TEXTMODE){ //if(DEBUG){std::cout << tg->getTagName() << " : " << tg->strs.size() << std::endl;} for(auto x: tg->strs){ oflie << x; num++; } } else{ return -1; //Error } for(Tag* p = tg->son(); p != nullptr; p = p -> next()) num += output_dfs(p, md, oflie); return num; } int output_dfs(Tag* tg, std::vector<string> &v){ int num = 0; //if(DEBUG) std::cout << "deep in output_dfs\n"; if(tg -> attrs.count("href")){ v.push_back(tg -> attrs["href"]); } for(Tag *p = tg->son(); p != nullptr; p = p -> next()){ num += output_dfs(p, v); } return num; } Tag* Tag::find(const string& tag_name){ Tag *res = nullptr; if(this->tagName == tag_name){ return this; } else{ for(Tag *p = this->son(); p != nullptr; p = p->next()){ res = p -> find(tag_name); if(res != nullptr) return res; } } return res; } int Tag::find_all(const string& tag_name, std::vector<Tag*> &v){ int num = 0; if(this->tagName == tag_name){ num++; v.push_back(this); } for(Tag *p = this->son(); p != nullptr; p = p -> next()){ num += p->find_all(tag_name, v); } return num; }
[ "noreply@github.com" ]
noreply@github.com
cf1cc37a699caabc48161028d5afd6cbcaab1d59
f1c01a3b5b35b59887bf326b0e2b317510deef83
/SDK/SoT_SDLetter_ExclusionEntitlement_Campaign024_classes.hpp
bc445df5603108680425443646a3bf83cbc97ac3
[]
no_license
codahq/SoT-SDK
0e4711e78a01f33144acf638202d63f573fa78eb
0e6054dddb01a83c0c1f3ed3e6cdad5b34b9f094
refs/heads/master
2023-03-02T05:00:26.296260
2021-01-29T13:03:35
2021-01-29T13:03:35
null
0
0
null
null
null
null
UTF-8
C++
false
false
844
hpp
#pragma once // Sea of Thieves (2.0) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "SoT_SDLetter_ExclusionEntitlement_Campaign024_structs.hpp" namespace SDK { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------------------------------- // BlueprintGeneratedClass SDLetter_ExclusionEntitlement_Campaign024.SDLetter_ExclusionEntitlement_Campaign024_C // 0x0000 (0x00D8 - 0x00D8) class USDLetter_ExclusionEntitlement_Campaign024_C : public UEntitlementDesc { public: static UClass* StaticClass() { static auto ptr = UObject::FindObject<UClass>(_xor_("BlueprintGeneratedClass SDLetter_ExclusionEntitlement_Campaign024.SDLetter_ExclusionEntitlement_Campaign024_C")); return ptr; } }; } #ifdef _MSC_VER #pragma pack(pop) #endif
[ "igromanru@yahoo.de" ]
igromanru@yahoo.de
1151f012782297f0689d477f21a4afbbfd1ab7fa
f2fbefc5da74eda95431607522e1c569bf117012
/build-NBABasketball-Desktop_Qt_5_11_2_clang_64bit-Debug/moc_tripselection.cpp
50e8ff41c501a2cbced923b0ad1a56e61fe9db82
[]
no_license
brandoryan/NBAPlanner
3bab9064766a96b1c6d1b62ab6e46b60db257123
e9dfaedb0a6386d14511237f25c4d77864e20126
refs/heads/master
2020-04-03T13:38:05.176501
2018-11-28T06:02:54
2018-11-28T06:02:54
155,291,236
0
0
null
null
null
null
UTF-8
C++
false
false
5,035
cpp
/**************************************************************************** ** Meta object code from reading C++ file 'tripselection.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.11.2) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "../NBABasketball/tripselection.h" #include <QtCore/qbytearray.h> #include <QtCore/qmetatype.h> #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'tripselection.h' doesn't include <QObject>." #elif Q_MOC_OUTPUT_REVISION != 67 #error "This file was generated using the moc from 5.11.2. 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 QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED struct qt_meta_stringdata_tripSelection_t { QByteArrayData data[8]; char stringdata0[152]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ qptrdiff(offsetof(qt_meta_stringdata_tripSelection_t, stringdata0) + ofs \ - idx * sizeof(QByteArrayData)) \ ) static const qt_meta_stringdata_tripSelection_t qt_meta_stringdata_tripSelection = { { QT_MOC_LITERAL(0, 0, 13), // "tripSelection" QT_MOC_LITERAL(1, 14, 17), // "BackButtonClicked" QT_MOC_LITERAL(2, 32, 0), // "" QT_MOC_LITERAL(3, 33, 20), // "on_addButton_clicked" QT_MOC_LITERAL(4, 54, 23), // "on_removeButton_clicked" QT_MOC_LITERAL(5, 78, 21), // "on_backButton_clicked" QT_MOC_LITERAL(6, 100, 26), // "on_beginTripButton_clicked" QT_MOC_LITERAL(7, 127, 24) // "on_refreshButton_clicked" }, "tripSelection\0BackButtonClicked\0\0" "on_addButton_clicked\0on_removeButton_clicked\0" "on_backButton_clicked\0on_beginTripButton_clicked\0" "on_refreshButton_clicked" }; #undef QT_MOC_LITERAL static const uint qt_meta_data_tripSelection[] = { // content: 7, // revision 0, // classname 0, 0, // classinfo 6, 14, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags 1, // signalCount // signals: name, argc, parameters, tag, flags 1, 0, 44, 2, 0x06 /* Public */, // slots: name, argc, parameters, tag, flags 3, 0, 45, 2, 0x08 /* Private */, 4, 0, 46, 2, 0x08 /* Private */, 5, 0, 47, 2, 0x08 /* Private */, 6, 0, 48, 2, 0x08 /* Private */, 7, 0, 49, 2, 0x08 /* Private */, // signals: parameters QMetaType::Void, // slots: parameters QMetaType::Void, QMetaType::Void, QMetaType::Void, QMetaType::Void, QMetaType::Void, 0 // eod }; void tripSelection::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { tripSelection *_t = static_cast<tripSelection *>(_o); Q_UNUSED(_t) switch (_id) { case 0: _t->BackButtonClicked(); break; case 1: _t->on_addButton_clicked(); break; case 2: _t->on_removeButton_clicked(); break; case 3: _t->on_backButton_clicked(); break; case 4: _t->on_beginTripButton_clicked(); break; case 5: _t->on_refreshButton_clicked(); break; default: ; } } else if (_c == QMetaObject::IndexOfMethod) { int *result = reinterpret_cast<int *>(_a[0]); { using _t = void (tripSelection::*)(); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&tripSelection::BackButtonClicked)) { *result = 0; return; } } } Q_UNUSED(_a); } QT_INIT_METAOBJECT const QMetaObject tripSelection::staticMetaObject = { { &QDialog::staticMetaObject, qt_meta_stringdata_tripSelection.data, qt_meta_data_tripSelection, qt_static_metacall, nullptr, nullptr} }; const QMetaObject *tripSelection::metaObject() const { return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; } void *tripSelection::qt_metacast(const char *_clname) { if (!_clname) return nullptr; if (!strcmp(_clname, qt_meta_stringdata_tripSelection.stringdata0)) return static_cast<void*>(this); return QDialog::qt_metacast(_clname); } int tripSelection::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QDialog::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 6) qt_static_metacall(this, _c, _id, _a); _id -= 6; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { if (_id < 6) *reinterpret_cast<int*>(_a[0]) = -1; _id -= 6; } return _id; } // SIGNAL 0 void tripSelection::BackButtonClicked() { QMetaObject::activate(this, &staticMetaObject, 0, nullptr); } QT_WARNING_POP QT_END_MOC_NAMESPACE
[ "brandoryan@gmail.com" ]
brandoryan@gmail.com
070811c2b0816d3f1cfd5d4ef46b587c4e663400
53c9375b2ff0028d0bfb0bd98c19d9efdc68c47d
/mooyomooyo.cpp
1c23ad14dc8fa0660c19ec852f362faf2b7488e5
[]
no_license
pocafup/my-code
a2fa6ec3bb0b70ec992f20ac90146e8ed00f2463
92a3785023e3e87f01b65a6c30ff91dd6055d7e8
refs/heads/master
2021-01-07T19:04:01.702122
2020-10-20T10:41:13
2020-10-20T10:41:13
241,790,879
0
0
null
null
null
null
UTF-8
C++
false
false
2,771
cpp
/* ID:dx424391 PROG: mooyomooyo LANG:C++ */ #include <iostream> #include <algorithm> #include <queue> #include <string> #include <fstream> #include <cstring> using namespace std; int main(){ ofstream fout("mooyomooyo.out"); ifstream fin("mooyomooyo.in"); int a,b; fin >> a >> b; string c[a]; queue<pair<int,int> > q; // memset(c,0,sizeof(c)); fin.ignore(); for (int i=0;i<a;i++){ getline(fin,c[i]); } string e[a]; int varx[4] = {-1,0,0,1}; int vary[4] = {0,1,-1,0}; bool visited[a][10]; //memset(visited,0,sizeof(visited)); bool n = true; queue<pair<int,int> > bb; while (n){ n = false; for (int i=1;i<10;i++){ //memset(visited,0,sizeof(visited)); for (int j=0;j<a;j++){ for (int k=0;k<10;k++){ if (visited[j][k] == false){ if (int(c[j][k]-48) != i){ visited[j][k] = true; }else{ pair<int,int> s; s.first = j; s.second = k; q.push(s); bb.push(s); visited[j][k] = true; int count = 1; while (!q.empty()){ for (int aa = 0;aa<4;aa++){ if (q.front().first+varx[aa]>=0 && q.front().first+varx[aa]<a && q.front().second+vary[aa]>=0 && q.front().second+vary[aa]<10){ if (visited[q.front().first+varx[aa]][q.front().second+vary[aa]]== false && int(c[q.front().first+varx[aa]][q.front().second+vary[aa]]-48) == i){ visited[q.front().first+varx[aa]][q.front().second+vary[aa]] = true; pair<int,int> s2; s2.first = q.front().first+varx[aa]; s2.second = q.front().second+vary[aa]; q.push(s2); count++; bb.push(s2); } } } q.pop(); } if (count>=b){ while(!bb.empty()){ c[bb.front().first][bb.front().second] = 48; bb.pop(); } }else{ while(!bb.empty()){ bb.pop(); } } } } } } } for (int i=0;i<a;i++){ for (int j=0;j<10;j++){ e[i][j] = c[i][j]; } } for (int i=0;i<10;i++){ int pos = a-1; for (int j=a-1;j>=0;j--){ if (c[j][i] != 48){ c[pos][i] = c[j][i]; c[j][i] = 48; if (pos!=j){ n=true; } pos--; } } } } for (int i=0;i<a;i++){ for (int j=0;j<10;j++){ fout << c[i][j]; } fout << endl; } return 0; }
[ "noreply@github.com" ]
noreply@github.com
08eb8b99fa5871d381cd9d8470377c2e9f5356bc
a9ea1d68a856dd802bb6ce783a23c218ecc3545b
/DailyPractice/699_falling_squares.cpp
01074f5a45c1917329e44980107386be57cabae0
[]
no_license
kiraclf/leetCodePractice
a5c2a9a9bdaed2d6b00805e7e91824cd76634d3b
61f791bd49c8ce8573c630bb86492e4993d8ad13
refs/heads/master
2022-12-12T22:43:34.956744
2022-11-28T01:32:47
2022-11-28T01:32:47
249,493,614
0
0
null
null
null
null
UTF-8
C++
false
false
192
cpp
#include <vector> using namespace std; class Solution { public: vector<int> fallingSquares(vector<vector<int>>& positions) { vector<int> res(positions.size(), 0); return res; } };
[ "kiraclf@outlook.com" ]
kiraclf@outlook.com
2fe941843fd552989e43394d87c13e58b990ec89
2ac6ce8ca2010c407bedbb51e82e5df76d19c90b
/Aircraft.cpp
cc02c0695fcf51aadaa078652f479dc097e9cbb8
[]
no_license
sykocus/viz1090-go
65efee08d366c6bca56d748a2b46ef4f36752e4e
fb0bc9d53cc268ee4d90680ee530b6a20c2479ef
refs/heads/main
2023-06-18T01:39:50.797590
2021-07-21T05:14:23
2021-07-21T05:14:23
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,814
cpp
// viz1090, a vizualizer for dump1090 ADSB output // // Copyright (C) 2020, Nathan Matsuda <info@nathanmatsuda.com> // Copyright (C) 2014, Malcolm Robb <Support@ATTAvionics.com> // Copyright (C) 2012, Salvatore Sanfilippo <antirez at gmail dot com> // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // * Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // // 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 "Aircraft.h" #include "AircraftLabel.h" Aircraft::Aircraft(uint32_t addr) { this->addr = addr; prev_seen = 0; lon = 0; lat = 0; label = NULL; next = NULL; } Aircraft::~Aircraft() { }
[ "nathan.matsuda@gmail.com" ]
nathan.matsuda@gmail.com
361f2d42195e6b11e1c7fbe5f5629d3ba3534d40
34b0e1de3970d5af2a1321e854fd93b06bc95342
/extends/DBResultReader.hpp
d48ce5f045ca6e12da5c2a36d39ba2f9fee55f1e
[]
no_license
Yujun-Qian/fpnn
a6e0f2cdf08bbeeba514a2608b241240aabfbe74
3bd608b9092c6b7ce42df945929dbbc02d08da2f
refs/heads/master
2020-05-14T15:20:35.628996
2019-08-28T02:48:05
2019-08-28T02:48:05
181,851,403
0
0
null
2019-04-17T08:40:33
2019-04-17T08:40:31
null
UTF-8
C++
false
false
3,947
hpp
#ifndef Data_Router_Result_Reader_H #define Data_Router_Result_Reader_H #include <stdlib.h> #include <vector> #include "FpnnError.h" #include "FPReader.h" namespace fpnn { FPNN_(FpnnError, DBResultError) class DBResultReader { fpnn::FPAReader _reader; std::vector<std::string> *_fields; std::vector<std::vector<std::string>> *_rows; std::vector<int64_t> *_invalidIds; std::vector<int64_t> *_failedIntIds; std::vector<std::string> *_failedStringIds; inline void readFieldsRows() { if (_rows) return; _fields = new std::vector<std::string>(); _rows = new std::vector<std::vector<std::string>>(); *_fields = _reader.want("fields", std::vector<std::string>()); *_rows = _reader.want("rows", std::vector<std::vector<std::string>>()); } public: DBResultReader(const fpnn::FPAnswerPtr& answer): _reader(answer), _fields(NULL), _rows(NULL), _invalidIds(NULL), _failedIntIds(NULL), _failedStringIds(NULL) { } ~DBResultReader() { if (_fields) delete _fields; if (_rows) delete _rows; if (_invalidIds) delete _invalidIds; if (_failedIntIds) delete _failedIntIds; if (_failedStringIds) delete _failedStringIds; } //---------------[ for exception ]-----------------// void exception() { if (_reader.status()) throw DBResultError("DBRouter", "DBResultReader", __LINE__, code(), ex()); } inline bool isException() { return _reader.status(); } inline int code() { return (int)_reader.wantInt("code"); } inline std::string ex() { return _reader.wantString("ex"); } inline std::string raiser() { return _reader.wantString("raiser"); } //---------------[ for write options ]-----------------// inline int affectedRows() { return (int)_reader.wantInt("affectedRows"); } inline int insertId() { return (int)_reader.wantInt("insertId"); } //---------------[ for invalied & failed Ids ]-----------------// inline const std::vector<int64_t>& invalidIds() { if (!_invalidIds) { _invalidIds = new std::vector<int64_t>(); *_invalidIds = _reader.get("invalidIds", std::vector<int64_t>()); } return *_invalidIds; } inline const std::vector<int64_t>& failedIds(int) { if (!_failedIntIds) { _failedIntIds = new std::vector<int64_t>(); *_failedIntIds = _reader.get("failedIds", std::vector<int64_t>()); } return *_failedIntIds; } inline const std::vector<std::string>& failedIds(const std::string&) { if (!_failedStringIds) { _failedStringIds = new std::vector<std::string>(); *_failedStringIds = _reader.get("failedIds", std::vector<std::string>()); } return *_failedStringIds; } //---------------[ for select & desc options ]-----------------// inline const std::vector<std::string>& fields() { readFieldsRows(); return *_fields; } inline int fieldIndex(const std::string &fieldName) { readFieldsRows(); for (size_t i = 0; i < _fields->size(); i++) { if (fieldName == (*_fields)[i]) return i; } return -1; } inline int rowsCount() { readFieldsRows(); return (int)_rows->size(); } inline const std::vector<std::string>& row(int index) { readFieldsRows(); return (*_rows)[index]; } inline const std::vector<std::vector<std::string> >& rows() { readFieldsRows(); return *_rows; } inline const std::string& cell(int rowIndex, int fieldIndex) { readFieldsRows(); return (*_rows)[rowIndex][fieldIndex]; } inline const std::string& cell(int rowIndex, const std::string& fieldName) { return cell(rowIndex, fieldIndex(fieldName)); } inline int64_t intCell(int rowIndex, int fieldIndex) { return atoll(cell(rowIndex, fieldIndex).c_str()); } inline int64_t intCell(int rowIndex, const std::string& fieldName) { return atoll(cell(rowIndex, fieldName).c_str()); } inline double realCell(int rowIndex, int fieldIndex) { return atof(cell(rowIndex, fieldIndex).c_str()); } inline double realCell(int rowIndex, const std::string& fieldName) { return atof(cell(rowIndex, fieldName).c_str()); } }; } #endif
[ "xiaoxiang.du@funplus.com" ]
xiaoxiang.du@funplus.com
7b0b1a6bac8175af43b8b5b765fe8d3a96960cbd
4442197b3c30bc2e2efdc67c04512cca3f26d462
/matrisYol.cpp
6df5f8616f82193ee57dd60316f2788726f962a4
[]
no_license
ZelihaArslan/C_examples
18e6662987a8d27aa7952fea06a2e352f245aa80
61a1315b97a17b8e8a34eb9b522f7807e5f0076a
refs/heads/master
2022-03-25T21:57:24.085458
2019-12-17T15:54:36
2019-12-17T15:54:36
77,088,083
1
0
null
null
null
null
UTF-8
C++
false
false
842
cpp
#include<stdio.h> void kisayol(int,int); int matris[8][6]={{1,0,0,0,0,0}, {1,1,0,0,0,0}, {1,1,1,1,1,1}, {1,1,1,0,0,1}, {1,0,1,1,1,1}, {1,0,0,0,1,1}, {1,1,1,0,1,1}, {0,0,1,1,1,1}}; int yol[8][6]={0}; int main() { int j=0,k=0; while(j<8) { while(k<6) { printf( "%d\t", matris[j][k]); k++; } k=0; printf("\n"); j++; } matris[0][0]=1; kisayol(0,0); return 0; } void kisayol(int x,int y) { yol[x][y]=1; printf("koordinatlar: %d ,%d\n",x,y); if(y>0 && matris[x][y-1]==1 && yol[x][y-1]==0) kisayol(x,y-1); if(x>0 && matris[x-1][y]==1 && yol[x-1][y]==0) kisayol(x-1,y); if(y<6 && matris[x][y+1]==1 && yol[x][y+1]==0) kisayol(x,y+1); if(x<8 && matris[x+1][y]==1 && yol[x+1][y]==0) kisayol(x+1,y); }
[ "noreply@github.com" ]
noreply@github.com
fd41979b42a29f5d79ffafc15880f9eefe4f7d16
590c2340f08488fb04347ac7cff9f2f9a59019e7
/common/redll_mngr.cpp
ef65b088905dbb0a75f69749350abbe35af695a0
[]
no_license
masaki-sugiura/DengakuSeriesV2
d2aa03f5c5d7c2be8332bad3cfbfded14d91a03f
f8c5fcd2b782146663d0db3c1a7d6e685a696da9
refs/heads/main
2023-01-03T07:24:32.403381
2020-10-20T12:14:48
2020-10-20T12:14:48
303,745,911
0
0
null
null
null
null
SHIFT_JIS
C++
false
false
505
cpp
// DengakuServer v1: Copyright(C) 1999-2000, M. Sugiura /* * redll_mngr.cpp * REDLL_Manager クラスの実装 */ #include "redll_mngr.h" REDLL_Manager::REDLL_Manager(const StringBuffer& filename) { m_hModuleDll = ::LoadLibrary(filename); if (m_hModuleDll == NULL) throw DllNotFoundError(); } REDLL_Manager::~REDLL_Manager() { // DLL のアンロードの順序によりアクセス違反が起こる可能性あり if (m_hModuleDll) { ::FreeLibrary(m_hModuleDll); } }
[ "sugiura@dbae0eb6-3e9f-11e0-a136-39064ccb452b" ]
sugiura@dbae0eb6-3e9f-11e0-a136-39064ccb452b
b2ed8733b9205f9677ca906553b5e0eb4fc65b03
0770aa1a96e2fdc75a812df9dd82d72f7e5437f0
/src/BehaviorTree/Tick.h
5022c4ba162c12a351d1f4d64fb3f8b271042506
[]
no_license
conankzhang/decision-making-behaviors
3d6ce700243a3f57ae86bebc7165499f51bf3003
44565b938c1435d0bcdf5118d99dcb501a9f5dc6
refs/heads/master
2020-05-07T15:34:31.278475
2019-04-13T08:48:49
2019-04-13T08:48:49
180,642,506
2
0
null
null
null
null
UTF-8
C++
false
false
484
h
#pragma once class CBehaviorTree; class CBlackBoard; class CTask; //======================================================================================================================= class CTick { public: CTick(CBehaviorTree* InBehaviorTree, CBlackBoard* InBlackBoard); ~CTick(); inline CBlackBoard* GetBlackBoard(){ return BlackBoard; } inline CBehaviorTree* GetBehaviorTree(){ return BehaviorTree; } private: CBehaviorTree* BehaviorTree; CBlackBoard* BlackBoard; };
[ "conankzhang@gmail.com" ]
conankzhang@gmail.com
cb422e26760b715548fcb35c413007b5984c8035
b022df16bc29f61c2f1eec3170f38170e96aae86
/NewSimulation/Framework/src/framework/Options.h
ad40efda9a6321215f6cd97e593bc455793a3491
[]
no_license
jqnorris/Misc
6daa7f3dcdff49fdb0d13a99c2e0fcd784a4a4ac
fb9bf1b277d17eb01505f602f30913a268bd8491
refs/heads/master
2020-12-30T14:56:25.933596
2015-05-28T21:44:15
2015-05-28T21:44:15
36,399,850
0
0
null
null
null
null
UTF-8
C++
false
false
360
h
/* * Options.h * * Created on: Nov 29, 2012 * Author: jqnorris */ #ifndef OPTIONS_H_ #define OPTIONS_H_ #include <string> class Options { public: Options(); virtual ~Options(); std::string jobName; long int maxSteps; int N; int latticeType; bool trapping; bool error; void loadFromFile(); void setDefault(); }; #endif /* OPTIONS_H_ */
[ "jqnorris@ucdavis.edu" ]
jqnorris@ucdavis.edu
14f3a987f9ae500e16daf085e535b0863863f401
0eff74b05b60098333ad66cf801bdd93becc9ea4
/second/download/rtorrent/gumtree/rtorrent_repos_function_173.cpp
4cb5b1d03e7c63841c32883f8e878cd56ce2eb18
[]
no_license
niuxu18/logTracker-old
97543445ea7e414ed40bdc681239365d33418975
f2b060f13a0295387fe02187543db124916eb446
refs/heads/master
2021-09-13T21:39:37.686481
2017-12-11T03:36:34
2017-12-11T03:36:34
null
0
0
null
null
null
null
UTF-8
C++
false
false
271
cpp
void parse_whole_value(const char* src, int64_t* value, int base, int unit) { const char* last = parse_value_nothrow(src, value, base, unit); if (last == src || *parse_skip_wspace(last) != '\0') throw torrent::input_error("Could not convert string to value."); }
[ "993273596@qq.com" ]
993273596@qq.com
ebd5bb8cbad86f47afddc8a372e0e2fe9c4810f3
c88d718cb76f53c6bf578dbd1cb11c9f6480f97a
/structure.cpp
43b9acd2d1ede3c279ef674ce730127cac4b073d
[]
no_license
Amrisha0306/structure
0035dd468dad28050df2f231070d1ee7dae769c9
cf8c363bcc4d98e1ddb1032f7668097b9c5a4aad
refs/heads/main
2023-04-19T01:12:24.531288
2021-04-30T08:17:15
2021-04-30T08:17:15
363,073,694
0
0
null
null
null
null
UTF-8
C++
false
false
859
cpp
#include<stdio.h> struct employees { int Empno; char name[100], phn_no[10], age[2]; float Salary; }; main() { int i; struct employees e1[10]; for(i=0;i<20;i++) { printf("\nEnter details of employee %d",i+1); printf("\nEmployee name:"); scanf("%s",e1[i].name); printf("\nPhone Number :"); scanf("%s",e1[i].phn_no); printf("\nAge :"); scanf("%s",e1[i].age); printf("\nSalary:"); scanf("%f",&e1[i].Salary); } for(i=0;i<20;i++) { printf("\n\nDetails of employee %d",i+1); printf("\n\tEmployee nam :%s",e1[i].name); printf("\n\tEmployee phone number :%d",e1[i].phn_no); printf("\n\tEmployee age :%d",e1[i].age); printf("\n\tSalary=%.2f",e1[i].Salary); } }
[ "noreply@github.com" ]
noreply@github.com
a82521d5133be6db0e2a854b47adb68f2dd0b09c
3d1ac1bf86db78a86364bb4ece729a2de6fddd5d
/Source/Alimer/IO/Windows/WindowsFileSystem.h
39169435b47f1fd1a3f8aefc42c377e1ef32909d
[ "MIT" ]
permissive
whztt07/alimer
a7afd2e65819ee546ec6c6973ea645433877ee23
7a968a1b1efced29e6e88e1f51dbb0e80ba628fe
refs/heads/master
2020-03-24T23:09:09.600306
2018-07-29T17:52:26
2018-07-29T17:52:26
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,108
h
// // Copyright (c) 2018 Amer Koleci and contributors. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // #pragma once #include "../../PlatformIncl.h" #include "../FileSystem.h" namespace Alimer { class WindowsFileStream final : public Stream { public: WindowsFileStream(const std::string &path, StreamMode mode); ~WindowsFileStream() override; bool CanSeek() const override { return _handle != nullptr; } size_t Read(void* dest, size_t size) override; void Write(const void* data, size_t size) override; private: HANDLE _handle = nullptr; }; /// OS file system protocol protocol for file system. class OSFileSystemProtocol final : public FileSystemProtocol { public: OSFileSystemProtocol(const std::string &rootDirectory); ~OSFileSystemProtocol(); std::string GetFileSystemPath(const std::string& path) override; std::unique_ptr<Stream> Open(const std::string &path, StreamMode mode) override; protected: std::string _rootDirectory; }; }
[ "amerkoleci@gmail.com" ]
amerkoleci@gmail.com
19e5ecd96e10ecf87976d2c4f8971eb27e8c8460
ec76c1297252070d72fd194baebca3146bafac59
/damBreak_turbulence/damBreak/4.75/phi
58c6d52cdc856dca5d1fd814fccff8bb2f98b207
[]
no_license
Shivam-IITKGP/CFD_InterFoam_BottleFill
413cdb5536cf71d95da882821fa36c7bd138e17e
be711e0f19a5331bb1094b8e54982c9ad101da5c
refs/heads/main
2023-04-13T12:58:09.332312
2021-04-15T16:24:42
2021-04-15T16:24:42
358,315,309
1
0
null
null
null
null
UTF-8
C++
false
false
225,635
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class surfaceScalarField; location "4.75"; object phi; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 3 -1 0 0 0 0]; internalField nonuniform List<scalar> 18095 ( 1.58559e-07 -9.65453e-07 8.06893e-07 1.65431e-07 -1.24823e-06 1.24136e-06 1.22246e-07 -1.24223e-06 1.28542e-06 6.53867e-08 -1.26348e-06 1.32034e-06 8.88588e-11 -1.28048e-06 1.34578e-06 -6.52248e-08 -1.2805e-06 1.34581e-06 -1.22124e-07 -1.26353e-06 1.32043e-06 -1.65352e-07 -1.24228e-06 1.28551e-06 -1.58528e-07 -1.24827e-06 1.24145e-06 -9.65551e-07 8.07023e-07 1.11041e-07 -1.07649e-06 9.94386e-08 -1.23662e-06 7.28928e-08 -1.21569e-06 4.00803e-08 -1.23067e-06 5.97574e-11 -1.24046e-06 -3.99697e-08 -1.24047e-06 -7.28049e-08 -1.23069e-06 -9.93729e-08 -1.21571e-06 -1.11005e-07 -1.23664e-06 -1.07656e-06 6.7173e-08 -1.14367e-06 5.27753e-08 -1.22223e-06 4.21687e-08 -1.20508e-06 2.38917e-08 -1.21239e-06 3.81932e-11 -1.21661e-06 -2.38202e-08 -1.21661e-06 -4.21109e-08 -1.2124e-06 -5.27313e-08 -1.20509e-06 -6.71414e-08 -1.22223e-06 -1.1437e-06 3.96324e-08 -1.1833e-06 2.66355e-08 -1.20923e-06 2.20299e-08 -1.20048e-06 1.25445e-08 -1.20291e-06 2.15282e-11 -1.20408e-06 -1.2504e-08 -1.20408e-06 -2.19966e-08 -1.20291e-06 -2.66105e-08 -1.20048e-06 -3.96112e-08 -1.20923e-06 -1.18331e-06 1.67006e-08 7.47117e-09 6.99581e-09 4.09069e-09 7.17036e-12 -4.07719e-09 -6.98494e-09 -7.46376e-09 -1.66918e-08 -1.74577e-07 -1.16346e-06 1.33803e-06 -2.18682e-07 -1.21618e-06 1.26028e-06 -1.64566e-07 -1.21266e-06 1.15854e-06 -8.62901e-08 -1.20386e-06 1.12558e-06 9.68598e-10 -1.20242e-06 1.11516e-06 8.81834e-08 -1.20257e-06 1.11535e-06 1.66273e-07 -1.20426e-06 1.12617e-06 2.2024e-07 -1.21324e-06 1.15927e-06 1.7599e-07 -1.21698e-06 1.26123e-06 -1.16438e-06 1.34037e-06 -9.27324e-08 -1.07072e-06 -9.52873e-08 -1.21362e-06 -7.88513e-08 -1.22909e-06 -4.37303e-08 -1.23898e-06 5.46443e-10 -1.2467e-06 4.47785e-08 -1.2468e-06 7.97875e-08 -1.23927e-06 9.60514e-08 -1.2295e-06 9.31657e-08 -1.2141e-06 -1.07122e-06 -5.7865e-08 -1.01286e-06 -5.49894e-08 -1.2165e-06 -4.62843e-08 -1.2378e-06 -2.68449e-08 -1.25842e-06 3.29103e-10 -1.27387e-06 2.74714e-08 -1.27394e-06 4.68211e-08 -1.25862e-06 5.53801e-08 -1.23806e-06 5.80552e-08 -1.21677e-06 -1.01316e-06 -7.47644e-08 -9.38095e-07 -6.19048e-08 -1.22936e-06 -4.84691e-08 -1.25123e-06 -2.76115e-08 -1.27928e-06 2.04681e-10 -1.30169e-06 2.79981e-08 -1.30174e-06 4.87902e-08 -1.27941e-06 6.21215e-08 -1.25139e-06 7.48655e-08 -1.22952e-06 -9.38296e-07 -1.31202e-07 -1.19204e-07 -8.50206e-08 -4.39593e-08 1.33203e-10 4.42094e-08 8.52252e-08 1.19343e-07 1.31273e-07 -2.61167e-08 -9.17741e-07 9.43857e-07 1.59436e-08 -1.339e-06 1.29694e-06 1.83711e-08 -1.2759e-06 1.27347e-06 1.32922e-08 -1.22698e-06 1.23206e-06 8.26038e-09 -1.2236e-06 1.22863e-06 3.35502e-09 -1.22467e-06 1.22958e-06 -2.62095e-09 -1.22691e-06 1.23288e-06 5.50598e-09 -1.27352e-06 1.26539e-06 5.90385e-08 -1.34312e-06 1.28959e-06 -9.48565e-07 1.0076e-06 1.93378e-08 -9.37079e-07 2.6958e-08 -1.34662e-06 1.89136e-08 -1.26786e-06 1.27834e-08 -1.22085e-06 6.29657e-09 -1.21711e-06 -4.30208e-10 -1.21795e-06 -6.48955e-09 -1.22085e-06 -1.13834e-08 -1.26863e-06 -5.49592e-09 -1.34901e-06 -9.54061e-07 3.20351e-08 -9.69114e-07 2.34203e-08 -1.338e-06 1.45235e-08 -1.25896e-06 9.74787e-09 -1.21607e-06 3.94726e-09 -1.21131e-06 -2.46933e-09 -1.21153e-06 -6.84546e-09 -1.21647e-06 -1.5618e-08 -1.25985e-06 -2.48096e-08 -1.33982e-06 -9.7887e-07 8.20333e-08 -1.05115e-06 5.62285e-08 -1.3122e-06 3.7026e-08 -1.23976e-06 2.35441e-08 -1.20259e-06 2.54543e-09 -1.19031e-06 -1.84681e-08 -1.19052e-06 -3.14483e-08 -1.20349e-06 -5.03936e-08 -1.24091e-06 -7.71858e-08 -1.31303e-06 -1.05606e-06 2.86887e-07 2.34972e-07 1.53757e-07 7.67521e-08 1.5998e-09 -7.35625e-08 -1.50887e-07 -2.32524e-07 -2.84316e-07 5.2587e-08 2.99854e-09 -5.55856e-08 4.96103e-08 2.97649e-09 4.66661e-08 2.94422e-09 4.37637e-08 2.90225e-09 4.09108e-08 2.8529e-09 3.81131e-08 2.79757e-09 3.53815e-08 2.73154e-09 3.2721e-08 2.66045e-09 3.01413e-08 2.57962e-09 2.49171e-09 2.76495e-08 4.97642e-08 6.27841e-09 -5.30442e-08 4.64845e-08 6.25586e-09 4.32223e-08 6.20629e-09 3.99936e-08 6.13083e-09 3.68144e-08 6.03196e-09 3.37012e-08 5.91059e-09 3.06654e-08 5.76726e-09 2.77241e-08 5.60163e-09 2.48866e-08 5.41698e-09 5.21428e-09 2.2164e-08 4.11276e-08 9.43457e-09 -4.42838e-08 3.79794e-08 9.40358e-09 3.48552e-08 9.33026e-09 3.17701e-08 9.21577e-09 2.87396e-08 9.06232e-09 2.57782e-08 8.87186e-09 2.28983e-08 8.64701e-09 2.01125e-08 8.38733e-09 1.74327e-08 8.09667e-09 7.77863e-09 1.48682e-08 3.23618e-08 1.24627e-08 -3.53901e-08 2.9351e-08 1.24137e-08 2.63727e-08 1.23084e-08 2.34395e-08 1.21487e-08 2.05641e-08 1.19375e-08 1.77598e-08 1.1676e-08 1.50393e-08 1.13674e-08 1.2412e-08 1.10144e-08 9.88731e-09 1.06213e-08 1.01924e-08 7.47349e-09 2.35021e-08 1.53903e-08 -2.64299e-08 2.05993e-08 1.53158e-08 1.77332e-08 1.51743e-08 1.49148e-08 1.49668e-08 1.21563e-08 1.46958e-08 9.46855e-09 1.43636e-08 6.86088e-09 1.39749e-08 4.34236e-09 1.35328e-08 1.92111e-09 1.30425e-08 1.25091e-08 -3.95688e-10 1.44282e-08 1.82527e-08 -1.7291e-08 1.15915e-08 1.81519e-08 8.79195e-09 1.79736e-08 6.03903e-09 1.77195e-08 3.34157e-09 1.7393e-08 7.08485e-10 1.69965e-08 -1.85111e-09 1.65344e-08 -4.32983e-09 1.60115e-08 -6.72068e-09 1.54333e-08 1.4806e-08 -9.01761e-09 5.03423e-09 2.1096e-08 -7.87774e-09 2.21211e-09 2.09734e-08 -5.80306e-10 2.07657e-08 -3.3355e-09 2.04744e-08 -6.04531e-09 2.01026e-08 -8.7029e-09 1.96539e-08 -1.13015e-08 1.91329e-08 -1.38349e-08 1.85448e-08 -1.62977e-08 1.78961e-08 1.71936e-08 -1.86854e-08 -4.78904e-09 2.39791e-08 1.90581e-09 -7.66456e-09 2.38485e-08 -1.05259e-08 2.36268e-08 -1.3368e-08 2.33164e-08 -1.61858e-08 2.29203e-08 -1.89745e-08 2.24426e-08 -2.17298e-08 2.18882e-08 -2.44483e-08 2.12632e-08 -2.71267e-08 2.05745e-08 1.98295e-08 -2.97627e-08 -1.51603e-08 2.69755e-08 1.21637e-08 -1.81732e-08 2.6861e-08 -2.11997e-08 2.66532e-08 -2.42383e-08 2.63549e-08 -2.72876e-08 2.59696e-08 -3.03467e-08 2.55018e-08 -3.34156e-08 2.49571e-08 -3.64945e-08 2.43421e-08 -3.95841e-08 2.3664e-08 2.29302e-08 -4.26847e-08 -2.62015e-08 3.01745e-08 2.30024e-08 -2.94546e-08 3.01137e-08 -3.2764e-08 2.99625e-08 -3.61335e-08 2.97245e-08 -3.95676e-08 2.94037e-08 -4.30712e-08 2.90054e-08 -4.66497e-08 2.85356e-08 -5.03089e-08 2.80013e-08 -5.40536e-08 2.74087e-08 2.67643e-08 -5.78877e-08 -3.80245e-08 3.36786e-08 3.45203e-08 -4.16352e-08 3.37241e-08 -4.53617e-08 3.3689e-08 -4.92151e-08 3.3578e-08 -5.32077e-08 3.33963e-08 -5.73508e-08 3.31486e-08 -6.16568e-08 3.28415e-08 -6.6137e-08 3.24815e-08 -7.07999e-08 3.20717e-08 3.16128e-08 -7.56484e-08 -5.07058e-08 3.75953e-08 4.67891e-08 -5.47954e-08 3.78134e-08 -5.90749e-08 3.79685e-08 -6.35632e-08 3.80663e-08 -6.82788e-08 3.81119e-08 -7.32407e-08 3.81106e-08 -7.84661e-08 3.8067e-08 -8.39681e-08 3.79835e-08 -8.97534e-08 3.78571e-08 3.76776e-08 -9.58182e-08 -6.42497e-08 4.20187e-08 5.98262e-08 -6.89208e-08 4.24843e-08 -7.38628e-08 4.29104e-08 -7.90983e-08 4.33018e-08 -8.46483e-08 4.3662e-08 -9.05317e-08 4.3994e-08 -9.6763e-08 4.42982e-08 -1.03349e-07 4.45694e-08 -1.10285e-07 4.47938e-08 4.49442e-08 -1.17552e-07 -7.8552e-08 4.7007e-08 7.35637e-08 -8.38622e-08 4.77943e-08 -8.95173e-08 4.85654e-08 -9.55343e-08 4.93188e-08 -1.01926e-07 5.00541e-08 -1.087e-07 5.07682e-08 -1.15855e-07 5.14533e-08 -1.23382e-07 5.2096e-08 -1.31261e-07 5.26735e-08 5.31358e-08 -1.39453e-07 -9.33761e-08 5.25722e-08 8.78108e-08 -9.9324e-08 5.37422e-08 -1.05665e-07 5.49062e-08 -1.124e-07 5.60546e-08 -1.1952e-07 5.71735e-08 -1.27002e-07 5.8251e-08 -1.34822e-07 5.92728e-08 -1.42945e-07 6.02192e-08 -1.51333e-07 6.10618e-08 6.17714e-08 -1.59969e-07 -1.08386e-07 5.86585e-08 1.023e-07 -1.14893e-07 6.02492e-08 -1.21808e-07 6.18207e-08 -1.29098e-07 6.33452e-08 -1.36719e-07 6.47944e-08 -1.4461e-07 6.61423e-08 -1.52701e-07 6.73637e-08 -1.60916e-07 6.84343e-08 -1.69185e-07 6.93309e-08 7.00169e-08 -1.7743e-07 -1.23099e-07 6.51665e-08 1.16591e-07 -1.30039e-07 6.71898e-08 -1.37368e-07 6.91498e-08 -1.45021e-07 7.09983e-08 -1.52916e-07 7.26892e-08 -1.60958e-07 7.41843e-08 -1.69043e-07 7.54492e-08 -1.77068e-07 7.64594e-08 -1.84934e-07 7.71972e-08 7.76418e-08 -1.92559e-07 -1.36937e-07 7.19259e-08 1.30177e-07 -1.44109e-07 7.43624e-08 -1.51621e-07 7.66624e-08 -1.59371e-07 7.87477e-08 -1.67241e-07 8.05596e-08 -1.7511e-07 8.20534e-08 -1.82849e-07 8.3188e-08 -1.90344e-07 8.39542e-08 -1.97497e-07 8.43499e-08 8.43442e-08 -2.04199e-07 -1.493e-07 7.86907e-08 1.42536e-07 -1.56448e-07 8.151e-08 -1.63859e-07 8.40735e-08 -1.71373e-07 8.62618e-08 -1.78835e-07 8.80217e-08 -1.86108e-07 8.93265e-08 -1.93071e-07 9.01504e-08 -1.99566e-07 9.04497e-08 -2.05577e-07 9.03605e-08 8.97471e-08 -2.1098e-07 -1.59723e-07 8.51491e-08 1.53265e-07 -1.66563e-07 8.83498e-08 -1.73588e-07 9.1099e-08 -1.80509e-07 9.31825e-08 -1.87104e-07 9.46169e-08 -1.9328e-07 9.55021e-08 -1.9888e-07 9.57496e-08 -2.03875e-07 9.54447e-08 -2.08212e-07 9.46977e-08 9.33386e-08 -2.11804e-07 -1.67902e-07 9.0981e-08 1.62071e-07 -1.74234e-07 9.46815e-08 -1.80744e-07 9.76088e-08 -1.86892e-07 9.9331e-08 -1.92269e-07 9.99936e-08 -1.96788e-07 1.00021e-07 -2.00685e-07 9.96463e-08 -2.03995e-07 9.87538e-08 -2.06552e-07 9.7255e-08 9.49639e-08 -2.08178e-07 -1.7387e-07 9.57268e-08 1.69125e-07 -1.79217e-07 1.00029e-07 -1.85433e-07 1.03825e-07 -1.90573e-07 1.04471e-07 -1.93846e-07 1.03266e-07 -1.96402e-07 1.02577e-07 -1.98315e-07 1.01559e-07 -1.99638e-07 1.00076e-07 -2.00246e-07 9.78632e-08 9.39369e-08 -1.99219e-07 -1.79082e-07 9.94247e-08 1.75384e-07 -1.83137e-07 1.04084e-07 -1.85913e-07 1.06601e-07 -1.87614e-07 1.06171e-07 -1.89308e-07 1.0496e-07 -1.90453e-07 1.03722e-07 -1.91016e-07 1.02122e-07 -1.90954e-07 1.00013e-07 -1.89808e-07 9.67168e-08 9.1207e-08 -1.87078e-07 -1.80421e-07 1.00969e-07 1.78877e-07 -1.80673e-07 1.04337e-07 -1.80272e-07 1.062e-07 -1.80092e-07 1.05991e-07 -1.80399e-07 1.05266e-07 -1.80785e-07 1.04108e-07 -1.80826e-07 1.02162e-07 -1.80067e-07 9.92537e-08 -1.78076e-07 9.47257e-08 8.76083e-08 -1.74478e-07 -1.75593e-07 9.90599e-08 1.77502e-07 -1.73133e-07 1.01877e-07 -1.7042e-07 1.03487e-07 -1.68766e-07 1.04336e-07 -1.68282e-07 1.04782e-07 -1.68621e-07 1.04448e-07 -1.6911e-07 1.02651e-07 -1.68779e-07 9.89228e-08 -1.6698e-07 9.29258e-08 8.35687e-08 -1.6294e-07 -1.68279e-07 9.41147e-08 1.73225e-07 -1.63e-07 9.65975e-08 -1.58274e-07 9.8761e-08 -1.54938e-07 1.01e-07 -1.53305e-07 1.0315e-07 -1.53627e-07 1.0477e-07 -1.55355e-07 1.04379e-07 -1.56076e-07 9.96437e-08 -1.54541e-07 9.13917e-08 8.12066e-08 -1.5218e-07 -1.62244e-07 8.67295e-08 1.69629e-07 -1.54752e-07 8.91055e-08 -1.47891e-07 9.19002e-08 -1.42128e-07 9.52374e-08 -1.38147e-07 9.91692e-08 -1.36805e-07 1.03428e-07 -1.39639e-07 1.07213e-07 -1.44456e-07 1.04461e-07 -1.43361e-07 9.02959e-08 7.63198e-08 -1.38474e-07 -1.63047e-07 7.85912e-08 1.71185e-07 -1.54785e-07 8.08434e-08 -1.46567e-07 8.36824e-08 -1.38951e-07 8.7622e-08 -1.33008e-07 9.32256e-08 -1.28941e-07 9.93608e-08 -1.27642e-07 1.05914e-07 -1.26449e-07 1.03268e-07 -1.22769e-07 8.66158e-08 7.29863e-08 -1.19436e-07 -1.68768e-07 7.10988e-08 1.7626e-07 -1.60731e-07 7.28069e-08 -1.52262e-07 7.52127e-08 -1.43322e-07 7.86824e-08 -1.34448e-07 8.43513e-08 -1.26464e-07 9.13768e-08 -1.15366e-07 9.48158e-08 -1.04176e-07 9.20775e-08 -1.01237e-07 8.36771e-08 7.35406e-08 -1.01792e-07 -1.74513e-07 6.53599e-08 1.80252e-07 -1.68286e-07 6.65793e-08 -1.61516e-07 6.84432e-08 -1.53917e-07 7.1083e-08 -1.44326e-07 7.47608e-08 -1.32921e-07 7.99706e-08 -1.21632e-07 8.35264e-08 -1.12934e-07 8.33789e-08 -1.08228e-07 7.89709e-08 7.13535e-08 -1.06041e-07 -1.76466e-07 6.09268e-08 1.80899e-07 -1.71699e-07 6.18118e-08 -1.66515e-07 6.32599e-08 -1.60715e-07 6.52829e-08 -1.53809e-07 6.78545e-08 -1.44888e-07 7.10489e-08 -1.3515e-07 7.37882e-08 -1.25962e-07 7.41906e-08 -1.20212e-07 7.32201e-08 6.82964e-08 -1.17155e-07 -1.73432e-07 5.69128e-08 1.77446e-07 -1.69139e-07 5.7518e-08 -1.64502e-07 5.86233e-08 -1.59401e-07 6.01816e-08 -1.53642e-07 6.20955e-08 -1.46651e-07 6.40572e-08 -1.38481e-07 6.5618e-08 -1.3053e-07 6.62393e-08 -1.22487e-07 6.51765e-08 6.18585e-08 -1.16049e-07 -1.67006e-07 5.26733e-08 1.71245e-07 -1.62473e-07 5.29852e-08 -1.57599e-07 5.37492e-08 -1.52306e-07 5.48885e-08 -1.46487e-07 5.62768e-08 -1.40132e-07 5.77015e-08 -1.33356e-07 5.88418e-08 -1.26474e-07 5.93573e-08 -1.20235e-07 5.89377e-08 5.73944e-08 -1.15771e-07 -1.59768e-07 4.80523e-08 1.64389e-07 -1.54889e-07 4.81063e-08 -1.49735e-07 4.85953e-08 -1.44306e-07 4.9459e-08 -1.38632e-07 5.06031e-08 -1.32809e-07 5.18778e-08 -1.27048e-07 5.30809e-08 -1.217e-07 5.40096e-08 -1.17276e-07 5.45136e-08 5.45066e-08 -1.14388e-07 -1.53569e-07 4.31443e-08 1.58477e-07 -1.48456e-07 4.29938e-08 -1.43138e-07 4.32766e-08 -1.3767e-07 4.39918e-08 -1.32187e-07 4.51198e-08 -1.26867e-07 4.65586e-08 -1.21917e-07 4.81312e-08 -1.17607e-07 4.96994e-08 -1.14333e-07 5.124e-08 5.27209e-08 -1.12548e-07 -1.49567e-07 3.81911e-08 1.5452e-07 -1.44423e-07 3.78502e-08 -1.39036e-07 3.78895e-08 -1.33485e-07 3.84414e-08 -1.28028e-07 3.96624e-08 -1.22957e-07 4.14875e-08 -1.18418e-07 4.35929e-08 -1.14494e-07 4.57757e-08 -1.11558e-07 4.83041e-08 5.13349e-08 -1.10172e-07 -1.48484e-07 3.35765e-08 1.53099e-07 -1.43659e-07 3.3025e-08 -1.38376e-07 3.26065e-08 -1.32651e-07 3.27169e-08 -1.26892e-07 3.39033e-08 -1.21779e-07 3.63751e-08 -1.17469e-07 3.92828e-08 -1.13384e-07 4.16905e-08 -1.09514e-07 4.44346e-08 4.9275e-08 -1.07454e-07 -1.50515e-07 2.95305e-08 1.54561e-07 -1.46582e-07 2.90916e-08 -1.41903e-07 2.79278e-08 -1.35914e-07 2.67282e-08 -1.29803e-07 2.77916e-08 -1.23859e-07 3.04315e-08 -1.18473e-07 3.38971e-08 -1.14048e-07 3.72653e-08 -1.10757e-07 4.11442e-08 4.6101e-08 -1.07583e-07 -1.55708e-07 2.53163e-08 1.59922e-07 -1.50598e-07 2.39819e-08 -1.45408e-07 2.27381e-08 -1.41622e-07 2.29419e-08 -1.37329e-07 2.34989e-08 -1.32002e-07 2.51046e-08 -1.25549e-07 2.74436e-08 -1.18046e-07 2.97624e-08 -1.11468e-07 3.4566e-08 4.10221e-08 -1.06389e-07 -1.60742e-07 2.13488e-08 1.64709e-07 -1.56652e-07 1.98919e-08 -1.52443e-07 1.85295e-08 -1.4781e-07 1.83088e-08 -1.43085e-07 1.87738e-08 -1.37869e-07 1.9889e-08 -1.32442e-07 2.20166e-08 -1.27869e-07 2.5189e-08 -1.23182e-07 2.98788e-08 3.58102e-08 -1.1797e-07 -1.63787e-07 1.88457e-08 1.6629e-07 -1.60939e-07 1.70431e-08 -1.58133e-07 1.57235e-08 -1.54875e-07 1.50516e-08 -1.51306e-07 1.52041e-08 -1.47593e-07 1.6176e-08 -1.43668e-07 1.80918e-08 -1.39605e-07 2.1126e-08 -1.35103e-07 2.5376e-08 3.07056e-08 -1.29998e-07 -1.704e-07 1.74985e-08 1.71747e-07 -1.68931e-07 1.55746e-08 -1.67271e-07 1.40631e-08 -1.65352e-07 1.31331e-08 -1.63054e-07 1.29061e-08 -1.60378e-07 1.34999e-08 -1.57319e-07 1.50329e-08 -1.5382e-07 1.76272e-08 -1.49817e-07 2.13724e-08 2.62485e-08 -1.4536e-07 -1.79255e-07 1.76425e-08 1.79111e-07 -1.79263e-07 1.55818e-08 -1.79077e-07 1.38771e-08 -1.78608e-07 1.26648e-08 -1.77773e-07 1.20703e-08 -1.7649e-07 1.22173e-08 -1.74701e-07 1.3244e-08 -1.72375e-07 1.53005e-08 -1.69541e-07 1.85381e-08 2.30754e-08 -1.66368e-07 -1.88181e-07 1.96127e-08 1.86211e-07 -1.90035e-07 1.74362e-08 -1.91704e-07 1.55457e-08 -1.93146e-07 1.41074e-08 -1.94277e-07 1.32006e-08 -1.94991e-07 1.2932e-08 -1.9518e-07 1.34325e-08 -1.94744e-07 1.48642e-08 -1.93633e-07 1.74278e-08 2.13587e-08 -1.91917e-07 -1.95816e-07 2.34685e-08 1.91961e-07 -1.99568e-07 2.11879e-08 -2.0329e-07 1.92672e-08 -2.06985e-07 1.78022e-08 -2.10601e-07 1.68162e-08 -2.14052e-07 1.63829e-08 -2.17223e-07 1.66039e-08 -2.19975e-07 1.76165e-08 -2.22157e-07 1.96095e-08 2.28278e-08 -2.23626e-07 -2.00307e-07 2.85319e-08 1.95243e-07 -2.05561e-07 2.64425e-08 -2.1108e-07 2.47859e-08 -2.16857e-07 2.35789e-08 -2.22897e-07 2.28557e-08 -2.29191e-07 2.26767e-08 -2.3572e-07 2.31334e-08 -2.42455e-07 2.43517e-08 -2.49348e-07 2.65018e-08 2.98134e-08 -2.56334e-07 -1.99529e-07 3.42052e-08 1.93855e-07 -2.05668e-07 3.25817e-08 -2.1213e-07 3.12476e-08 -2.18941e-07 3.03898e-08 -2.26121e-07 3.0036e-08 -2.33682e-07 3.02374e-08 -2.41618e-07 3.107e-08 -2.49903e-07 3.26369e-08 -2.58472e-07 3.50706e-08 3.85357e-08 -2.67194e-07 -1.93445e-07 3.97252e-08 1.87925e-07 -1.9929e-07 3.8426e-08 -2.05402e-07 3.73596e-08 -2.11774e-07 3.67615e-08 -2.18388e-07 3.66496e-08 -2.25208e-07 3.7058e-08 -2.32171e-07 3.80326e-08 -2.39164e-07 3.96293e-08 -2.46003e-07 4.191e-08 4.49291e-08 -2.52397e-07 -1.81559e-07 4.41873e-08 1.77097e-07 -1.86163e-07 4.30303e-08 -1.90898e-07 4.20949e-08 -1.95661e-07 4.15244e-08 -2.00395e-07 4.13835e-08 -2.05028e-07 4.1692e-08 -2.0946e-07 4.24646e-08 -2.13539e-07 4.3708e-08 -2.17039e-07 4.54106e-08 4.75377e-08 -2.19648e-07 -1.64514e-07 4.72028e-08 1.61498e-07 -1.67316e-07 4.5832e-08 -1.69927e-07 4.47055e-08 -1.72255e-07 4.38517e-08 -1.74237e-07 4.33653e-08 -1.75807e-07 4.32625e-08 -1.76876e-07 4.35327e-08 -1.77317e-07 4.41494e-08 -1.76938e-07 4.50315e-08 4.61003e-08 -1.75501e-07 -1.43782e-07 4.84008e-08 1.42584e-07 -1.44426e-07 4.64761e-08 -1.44471e-07 4.47499e-08 -1.43909e-07 4.32902e-08 -1.42713e-07 4.21697e-08 -1.40861e-07 4.14104e-08 -1.3831e-07 4.09816e-08 -1.35e-07 4.08405e-08 -1.30799e-07 4.08298e-08 4.07248e-08 -1.25423e-07 -1.20877e-07 4.76309e-08 1.21647e-07 -1.19321e-07 4.49195e-08 -1.16886e-07 4.23148e-08 -1.13504e-07 3.99075e-08 -1.09251e-07 3.79172e-08 -1.04191e-07 3.63494e-08 -9.82163e-08 3.5007e-08 -9.14059e-08 3.40301e-08 -8.36354e-08 3.30594e-08 3.15147e-08 -7.44253e-08 -9.81418e-08 4.52996e-08 1.00473e-07 -9.49136e-08 4.16911e-08 -9.05894e-08 3.79907e-08 -8.48305e-08 3.41488e-08 -7.77871e-08 3.08738e-08 -7.00056e-08 2.8568e-08 -6.04685e-08 2.54698e-08 -5.01818e-08 2.37434e-08 -3.69316e-08 1.98093e-08 1.69037e-08 -2.23206e-08 -7.74761e-08 4.19923e-08 8.07832e-08 -7.32786e-08 3.7493e-08 -6.81459e-08 3.2858e-08 -6.07269e-08 2.67299e-08 -4.95193e-08 1.9666e-08 -3.62388e-08 1.52874e-08 -2.10029e-08 1.02338e-08 -3.45739e-09 6.1981e-09 1.39893e-08 2.36267e-09 -1.12078e-09 3.20137e-08 -6.02797e-08 3.81682e-08 6.41036e-08 -5.40723e-08 3.12855e-08 -4.75088e-08 2.62944e-08 -3.53732e-08 1.45942e-08 -2.11074e-08 5.40018e-09 -1.09726e-09 -4.72292e-09 1.81654e-08 -9.02882e-09 3.61574e-08 -1.1794e-08 5.18844e-08 -1.33644e-08 -1.42432e-08 6.50068e-08 -5.09301e-08 3.55784e-08 5.35197e-08 -3.93984e-08 1.97536e-08 -2.00769e-08 6.973e-09 -9.87354e-10 -4.49531e-09 1.69533e-08 -1.25404e-08 3.06025e-08 -1.8372e-08 4.33177e-08 -2.1744e-08 5.45232e-08 -2.29996e-08 6.36513e-08 -2.24925e-08 -2.06394e-08 7.00475e-08 -3.3684e-08 1.74605e-08 5.18017e-08 -1.3943e-08 1.21209e-11 4.60781e-09 -1.15778e-08 1.94857e-08 -1.93731e-08 3.19449e-08 -2.49995e-08 4.19384e-08 -2.83655e-08 4.97281e-08 -2.95338e-08 5.50969e-08 -2.83684e-08 5.74768e-08 -2.48725e-08 -1.92028e-08 5.60402e-08 -2.16163e-08 -3.92065e-09 4.29973e-08 -5.49838e-09 -1.61062e-08 7.74472e-09 -2.48207e-08 1.90826e-08 -3.07107e-08 2.83864e-08 -3.43032e-08 3.54607e-08 -3.54398e-08 4.01704e-08 -3.42435e-08 4.27644e-08 -3.09624e-08 4.28541e-08 -2.49621e-08 -1.5948e-08 3.95993e-08 -2.55668e-08 -1.72972e-08 3.89433e-08 -1.455e-08 -2.71228e-08 -5.26421e-09 -3.41064e-08 2.42408e-09 -3.83989e-08 8.01228e-09 -3.98915e-08 1.09711e-08 -3.83988e-08 1.11598e-08 -3.44321e-08 1.13835e-08 -3.11861e-08 1.1425e-08 -2.5004e-08 7.16323e-09 -1.16863e-08 -4.10488e-08 -2.45568e-08 4.83085e-08 -3.49847e-08 -3.31864e-08 -3.05715e-08 -3.85196e-08 -2.81589e-08 -4.08114e-08 -2.71597e-08 -4.08908e-08 -2.67694e-08 -3.87889e-08 -3.72342e-08 -2.39673e-08 -3.64707e-08 -3.19489e-08 2.11316e-09 -6.35875e-08 -6.11434e-08 7.04189e-08 -6.17251e-08 -2.78765e-08 6.5045e-08 -5.9007e-08 -3.59042e-08 -5.77977e-08 -3.97288e-08 -5.78981e-08 -4.07108e-08 -6.01043e-08 -3.86845e-08 -4.48636e-08 -5.40293e-08 -2.21568e-09 -6.6615e-08 7.03811e-08 -1.04546e-07 1.66927e-07 -1.60131e-07 -1.7605e-07 2.81834e-07 -7.21518e-08 -3.10972e-08 7.53724e-08 -6.61616e-08 -4.18949e-08 -5.49298e-08 -5.09606e-08 -2.81532e-08 -6.74874e-08 2.23065e-08 -8.91444e-08 9.26757e-08 -1.24398e-07 1.72661e-07 -1.46599e-07 2.47051e-07 -1.78937e-07 2.96813e-07 -2.09893e-07 -2.3808e-07 3.58843e-07 -4.64419e-08 -4.18953e-08 5.724e-08 -2.65035e-08 -6.18328e-08 9.15432e-09 -8.66184e-08 5.93703e-08 -1.17703e-07 1.11952e-07 -1.41726e-07 1.58698e-07 -1.71144e-07 2.11633e-07 -1.99534e-07 2.59615e-07 -2.26919e-07 3.06148e-07 -2.56426e-07 -2.88147e-07 3.56215e-07 1.10482e-08 -6.22849e-08 9.34136e-09 3.64907e-08 -8.72749e-08 6.56327e-08 -1.15761e-07 9.54072e-08 -1.47478e-07 1.34743e-07 -1.81061e-07 1.7686e-07 -2.13261e-07 2.21336e-07 -2.44011e-07 2.68327e-07 -2.73909e-07 3.19674e-07 -3.07773e-07 -3.50379e-07 3.81906e-07 5.67614e-08 -8.39057e-08 -3.51405e-08 8.04935e-08 -1.11007e-07 1.05399e-07 -1.40666e-07 1.33763e-07 -1.75841e-07 1.67075e-07 -2.14374e-07 2.06612e-07 -2.52798e-07 2.50258e-07 -2.87657e-07 3.00303e-07 -3.23954e-07 3.66829e-07 -3.74299e-07 -4.41237e-07 4.57687e-07 9.38764e-08 -1.05154e-07 -7.26282e-08 1.16813e-07 -1.33944e-07 1.411e-07 -1.64952e-07 1.66131e-07 -2.00872e-07 2.01306e-07 -2.49549e-07 2.41717e-07 -2.93209e-07 2.90224e-07 -3.36164e-07 3.60572e-07 -3.94302e-07 4.57919e-07 -4.71646e-07 -5.59201e-07 5.75883e-07 1.18339e-07 -1.2381e-07 -9.96832e-08 1.39762e-07 -1.55367e-07 1.66285e-07 -1.91476e-07 1.99533e-07 -2.3412e-07 2.34086e-07 -2.84102e-07 2.77985e-07 -3.37108e-07 3.49134e-07 -4.07314e-07 4.51083e-07 -4.96251e-07 5.72236e-07 -5.928e-07 -6.79867e-07 6.92902e-07 1.30797e-07 -1.38855e-07 -1.15751e-07 1.51342e-07 -1.75912e-07 1.81146e-07 -2.2128e-07 2.182e-07 -2.71174e-07 2.60153e-07 -3.26054e-07 3.29677e-07 -4.06632e-07 4.32356e-07 -5.09992e-07 5.54523e-07 -6.18418e-07 6.72984e-07 -7.1126e-07 -7.77514e-07 7.70631e-07 1.35952e-07 -1.51812e-07 -1.22995e-07 1.56494e-07 -1.96455e-07 1.83975e-07 -2.48762e-07 2.2097e-07 -3.08169e-07 2.81797e-07 -3.86882e-07 3.86279e-07 -5.11115e-07 5.14934e-07 -6.38648e-07 6.3522e-07 -7.38704e-07 7.29848e-07 -8.05888e-07 -8.51486e-07 8.0382e-07 1.46221e-07 -1.65217e-07 -1.32816e-07 1.6579e-07 -2.16022e-07 1.90535e-07 -2.73506e-07 2.31299e-07 -3.48934e-07 3.29619e-07 -4.85202e-07 4.64408e-07 -6.45903e-07 5.86467e-07 -7.60707e-07 6.78332e-07 -8.30569e-07 7.5086e-07 -8.78416e-07 -9.14675e-07 8.14049e-07 1.59789e-07 -1.79364e-07 -1.45642e-07 1.75932e-07 -2.32165e-07 1.99509e-07 -2.97085e-07 2.72818e-07 -4.22243e-07 4.13151e-07 -6.25534e-07 5.38214e-07 -7.70966e-07 6.2589e-07 -8.48384e-07 6.95398e-07 -9.00076e-07 7.57124e-07 -9.40143e-07 -9.70237e-07 8.12686e-07 1.6699e-07 -1.85434e-07 -1.60919e-07 1.75403e-07 -2.40577e-07 2.08421e-07 -3.30102e-07 3.48086e-07 -5.61908e-07 4.8492e-07 -7.62368e-07 5.71207e-07 -8.57253e-07 6.37893e-07 -9.1507e-07 6.97685e-07 -9.59867e-07 7.51963e-07 -9.94421e-07 -1.01801e-06 7.9974e-07 1.49778e-07 -1.81217e-07 -1.53994e-07 1.53523e-07 -2.44322e-07 2.48796e-07 -4.25375e-07 4.0839e-07 -7.21501e-07 5.04817e-07 -8.58796e-07 5.73491e-07 -9.25926e-07 6.3357e-07 -9.75149e-07 6.87734e-07 -1.01403e-06 7.35631e-07 -1.04232e-06 -1.05871e-06 7.76328e-07 1.41677e-07 -1.68155e-07 -1.54739e-07 1.31202e-07 -2.33848e-07 3.17314e-07 -6.11487e-07 4.38103e-07 -8.42289e-07 5.11245e-07 -9.31938e-07 5.70537e-07 -9.85218e-07 6.23273e-07 -1.02788e-06 6.70412e-07 -1.06117e-06 7.11314e-07 -1.08322e-06 -1.09242e-06 7.45027e-07 1.50181e-07 -1.78047e-07 -1.40288e-07 2.24396e-07 -3.08063e-07 3.7744e-07 -7.64531e-07 4.5422e-07 -9.19069e-07 5.08903e-07 -9.86621e-07 5.58179e-07 -1.03449e-06 6.03375e-07 -1.07308e-06 6.43713e-07 -1.10151e-06 6.78166e-07 -1.11767e-06 -1.12006e-06 7.05802e-07 6.35039e-08 -1.4917e-07 -9.23805e-08 2.78926e-07 -5.23484e-07 3.80076e-07 -8.65681e-07 4.41253e-07 -9.80247e-07 4.89857e-07 -1.03523e-06 5.33494e-07 -1.07813e-06 5.72898e-07 -1.11248e-06 6.07415e-07 -1.13602e-06 6.36126e-07 -1.14638e-06 -1.14224e-06 6.58305e-07 7.27977e-08 -1.45847e-07 -7.61226e-08 2.86476e-07 -7.37162e-07 3.7771e-07 -9.56915e-07 4.28145e-07 -1.03068e-06 4.68738e-07 -1.07582e-06 5.0465e-07 -1.11404e-06 5.36663e-07 -1.1445e-06 5.64188e-07 -1.16355e-06 5.86232e-07 -1.16843e-06 -1.15804e-06 6.02035e-07 2.24068e-07 -2.26953e-07 -1.42963e-07 3.5085e-07 -8.63945e-07 3.91457e-07 -9.97522e-07 4.18192e-07 -1.05742e-06 4.44187e-07 -1.10181e-06 4.69929e-07 -1.13978e-06 4.93872e-07 -1.16844e-06 5.14118e-07 -1.1838e-06 5.29027e-07 -1.18334e-06 -1.16667e-06 5.37653e-07 2.76065e-07 -4.63096e-07 -3.99224e-08 3.25521e-07 -9.134e-07 3.5683e-07 -1.02883e-06 3.80731e-07 -1.08132e-06 4.03589e-07 -1.12467e-06 4.25462e-07 -1.16166e-06 4.44824e-07 -1.1878e-06 4.59633e-07 -1.1986e-06 4.68257e-07 -1.19196e-06 -1.16846e-06 4.70051e-07 2.4991e-07 -6.81678e-07 -3.13283e-08 3.00885e-07 -9.64375e-07 3.26066e-07 -1.05401e-06 3.46154e-07 -1.10141e-06 3.64913e-07 -1.14343e-06 3.8262e-07 -1.17936e-06 3.97566e-07 -1.20275e-06 4.07482e-07 -1.20852e-06 4.10737e-07 -1.19522e-06 -1.16465e-06 4.06927e-07 2.29657e-07 -8.67658e-07 -4.36755e-08 2.85061e-07 -1.01978e-06 3.01893e-07 -1.07084e-06 3.14315e-07 -1.11383e-06 3.27915e-07 -1.15703e-06 3.41922e-07 -1.19337e-06 3.53515e-07 -1.21434e-06 3.60058e-07 -1.21506e-06 3.60052e-07 -1.19521e-06 -1.15783e-06 3.53229e-07 2.70931e-07 -9.27043e-07 -2.11548e-07 2.70371e-07 -1.01922e-06 2.70243e-07 -1.07072e-06 2.76938e-07 -1.12052e-06 2.88644e-07 -1.16874e-06 3.01647e-07 -1.20637e-06 3.12099e-07 -1.22479e-06 3.17439e-07 -1.2204e-06 3.16638e-07 -1.19441e-06 -1.1508e-06 3.09608e-07 2.01998e-07 -9.27996e-07 -2.01044e-07 2.07372e-07 -1.02459e-06 2.16949e-07 -1.08029e-06 2.31069e-07 -1.13464e-06 2.47344e-07 -1.18501e-06 2.62613e-07 -1.22164e-06 2.73927e-07 -1.23611e-06 2.79801e-07 -1.22628e-06 2.80028e-07 -1.19463e-06 -1.14554e-06 2.7477e-07 1.55403e-07 -9.48522e-07 -1.34877e-07 1.66577e-07 -1.03577e-06 1.80252e-07 -1.09397e-06 1.96819e-07 -1.15121e-06 2.14335e-07 -1.20253e-06 2.29931e-07 -1.23724e-06 2.41265e-07 -1.24744e-06 2.47731e-07 -1.23274e-06 2.49696e-07 -1.1966e-06 -1.143e-06 2.47162e-07 1.22343e-07 -9.67897e-07 -1.02968e-07 1.35607e-07 -1.04903e-06 1.5124e-07 -1.1096e-06 1.69102e-07 -1.16907e-06 1.87063e-07 -1.22049e-06 2.02336e-07 -1.25251e-06 2.1328e-07 -1.25839e-06 2.20281e-07 -1.23975e-06 2.24254e-07 -1.20057e-06 -1.14378e-06 2.25029e-07 1.0149e-07 -9.79173e-07 -9.02142e-08 1.14224e-07 -1.06176e-06 1.30828e-07 -1.1262e-06 1.48955e-07 -1.1872e-06 1.66175e-07 -1.23771e-06 1.80098e-07 -1.26644e-06 1.90121e-07 -1.26841e-06 1.97677e-07 -1.2473e-06 2.04095e-07 -1.20699e-06 -1.14864e-06 2.08959e-07 8.89916e-08 -9.80372e-07 -8.7792e-08 1.01079e-07 -1.07385e-06 1.17548e-07 -1.14267e-06 1.3434e-07 -1.20399e-06 1.49249e-07 -1.25262e-06 1.60514e-07 -1.2777e-06 1.6879e-07 -1.27668e-06 1.76539e-07 -1.25505e-06 1.85789e-07 -1.21624e-06 -1.16068e-06 1.97829e-07 7.68783e-08 -9.8818e-07 -6.90701e-08 9.14491e-08 -1.08842e-06 1.07341e-07 -1.15856e-06 1.21753e-07 -1.2184e-06 1.33205e-07 -1.26407e-06 1.40484e-07 -1.28498e-06 1.4537e-07 -1.28157e-06 1.5065e-07 -1.26033e-06 1.57983e-07 -1.22357e-06 -1.17115e-06 1.6845e-07 6.77122e-08 -1.00572e-06 -5.01719e-08 8.33917e-08 -1.1041e-06 9.7671e-08 -1.17284e-06 1.09507e-07 -1.23024e-06 1.17363e-07 -1.27193e-06 1.20525e-07 -1.28814e-06 1.21913e-07 -1.28296e-06 1.24438e-07 -1.26285e-06 1.29177e-07 -1.22831e-06 -1.17809e-06 1.36116e-07 5.87439e-08 -1.02612e-06 -3.83468e-08 7.44326e-08 -1.11979e-06 8.77779e-08 -1.18619e-06 9.81999e-08 -1.24066e-06 1.03093e-07 -1.27682e-06 1.02882e-07 -1.28793e-06 1.0153e-07 -1.28161e-06 1.01923e-07 -1.26325e-06 1.0481e-07 -1.2312e-06 -1.18157e-06 1.08289e-07 5.29895e-08 -1.04827e-06 -3.08324e-08 6.77047e-08 -1.13451e-06 8.0065e-08 -1.19855e-06 8.93602e-08 -1.24996e-06 9.16376e-08 -1.2791e-06 8.9593e-08 -1.28589e-06 8.76019e-08 -1.27962e-06 8.83179e-08 -1.26396e-06 9.34545e-08 -1.23634e-06 -1.18975e-06 1.0164e-07 4.89964e-08 -1.05612e-06 -4.11517e-08 5.91478e-08 -1.14466e-06 7.0418e-08 -1.20982e-06 7.90346e-08 -1.25857e-06 7.96623e-08 -1.27972e-06 7.77661e-08 -1.28399e-06 7.70989e-08 -1.27895e-06 7.96317e-08 -1.2665e-06 8.89015e-08 -1.24561e-06 -1.20914e-06 1.08288e-07 2.19812e-08 -1.07675e-06 -1.35269e-09 3.95104e-08 -1.16219e-06 5.53138e-08 -1.22562e-06 6.50772e-08 -1.26834e-06 6.50996e-08 -1.27975e-06 6.37026e-08 -1.28259e-06 6.38314e-08 -1.27908e-06 6.64307e-08 -1.2691e-06 7.62772e-08 -1.25545e-06 -1.23576e-06 1.02898e-07 9.88857e-09 -1.10471e-06 1.80701e-08 2.96375e-08 -1.18193e-06 4.6059e-08 -1.24204e-06 5.32655e-08 -1.27554e-06 5.10724e-08 -1.27755e-06 4.83558e-08 -1.27988e-06 4.69998e-08 -1.27772e-06 4.56424e-08 -1.26774e-06 4.67119e-08 -1.25652e-06 -1.24624e-06 5.71905e-08 1.57134e-08 -1.12275e-06 2.32627e-09 2.87735e-08 -1.19499e-06 4.22414e-08 -1.25551e-06 4.4536e-08 -1.27784e-06 3.97561e-08 -1.27277e-06 3.49748e-08 -1.2751e-06 3.22278e-08 -1.27498e-06 2.81847e-08 -1.2637e-06 2.21381e-08 -1.25048e-06 -1.24227e-06 1.81654e-08 2.10117e-08 -1.1396e-06 -4.15273e-09 3.14016e-08 -1.20538e-06 4.25998e-08 -1.26671e-06 3.91508e-08 -1.27439e-06 3.15068e-08 -1.26513e-06 2.39755e-08 -1.26756e-06 1.97733e-08 -1.27077e-06 1.47429e-08 -1.25867e-06 4.21072e-09 -1.23994e-06 -1.2289e-06 -9.15495e-09 3.91515e-08 -1.11867e-06 -6.00815e-08 3.86722e-08 -1.2049e-06 4.34352e-08 -1.27147e-06 3.39331e-08 -1.26489e-06 2.44139e-08 -1.25561e-06 1.50043e-08 -1.25815e-06 9.57713e-09 -1.26535e-06 6.86341e-09 -1.25595e-06 -4.90611e-09 -1.22817e-06 -1.20891e-06 -2.49009e-08 1.68826e-08 -1.09671e-06 -3.8843e-08 3.02698e-08 -1.21829e-06 3.68349e-08 -1.27804e-06 2.66587e-08 -1.25471e-06 1.72934e-08 -1.24625e-06 7.34663e-09 -1.24821e-06 -6.3658e-12 -1.25799e-06 2.90971e-09 -1.25887e-06 -2.93434e-09 -1.22233e-06 -1.17845e-06 -3.33926e-08 1.33222e-09 -1.04299e-06 -5.50528e-08 3.18893e-08 -1.24885e-06 3.41634e-08 -1.28031e-06 2.20645e-08 -1.24261e-06 1.19975e-08 -1.23618e-06 1.29681e-09 -1.23751e-06 -1.09728e-08 -1.24572e-06 -3.20325e-09 -1.26664e-06 1.35232e-08 -1.23906e-06 -1.1235e-06 -4.14306e-08 -1.36367e-08 -8.54998e-08 3.44498e-08 2.76117e-08 1.70572e-08 9.50862e-09 1.5781e-09 -1.12604e-08 -1.25053e-08 3.80278e-08 -7.7864e-08 2.49628e-08 2.68672e-09 2.24036e-08 2.55909e-09 1.9981e-08 2.42257e-09 1.77037e-08 2.27737e-09 1.55781e-08 2.12573e-09 1.36088e-08 1.9694e-09 1.1798e-08 1.81094e-09 1.01461e-08 1.65204e-09 8.65156e-09 1.49463e-09 7.31258e-09 1.33912e-09 6.13724e-09 1.17549e-09 5.11671e-09 1.02068e-09 4.24823e-09 8.686e-10 3.53726e-09 7.11058e-10 2.98222e-09 5.55093e-10 2.57262e-09 4.0965e-10 2.30471e-09 2.68014e-10 2.17865e-09 1.2622e-10 2.19135e-09 -1.25393e-11 2.3352e-09 -1.43776e-10 2.60453e-09 -2.69344e-10 2.98774e-09 -3.83277e-10 3.47085e-09 -4.83199e-10 4.03197e-09 -5.6123e-10 4.6193e-09 -5.87436e-10 5.1833e-09 -5.64023e-10 5.63541e-09 -4.5202e-10 5.99121e-09 -3.5568e-10 6.24595e-09 -2.54717e-10 6.32392e-09 -7.80394e-11 6.17724e-09 1.46595e-10 5.77827e-09 3.9892e-10 5.11928e-09 6.58978e-10 4.18837e-09 9.30953e-10 3.01611e-09 1.17234e-09 1.71604e-09 1.30017e-09 4.88202e-10 1.22799e-09 -3.99689e-10 8.8803e-10 -6.70985e-10 2.71359e-10 -6.70943e-10 1.92465e-08 5.60416e-09 1.64981e-08 5.30755e-09 1.39271e-08 4.99361e-09 1.15399e-08 4.66481e-09 9.34025e-09 4.32552e-09 7.32992e-09 3.97991e-09 5.50896e-09 3.63205e-09 3.87418e-09 3.28696e-09 2.42535e-09 2.94362e-09 1.15976e-09 2.60493e-09 6.39133e-11 2.27161e-09 -8.62106e-10 1.94696e-09 -1.62405e-09 1.63073e-09 -2.23255e-09 1.31965e-09 -2.69284e-09 1.01546e-09 -3.00287e-09 7.19798e-10 -3.16712e-09 4.32452e-10 -3.19461e-09 1.53927e-10 -3.09091e-09 -1.16089e-10 -2.86591e-09 -3.68785e-10 -2.53158e-09 -6.03815e-10 -2.09754e-09 -8.17496e-10 -1.57612e-09 -1.00473e-09 -9.76851e-10 -1.16051e-09 -2.92664e-10 -1.27153e-09 4.64021e-10 -1.32054e-09 1.29703e-09 -1.28486e-09 2.12244e-09 -1.18105e-09 2.90528e-09 -1.03766e-09 3.63849e-09 -8.11352e-10 4.23729e-09 -4.52195e-10 4.60229e-09 3.40012e-11 4.66084e-09 6.00477e-10 4.41792e-09 1.17394e-09 3.90641e-09 1.684e-09 3.17492e-09 2.03185e-09 2.29545e-09 2.10765e-09 1.37178e-09 1.81186e-09 5.32875e-10 1.11037e-09 -1.38082e-10 1.21305e-08 8.34191e-09 9.55913e-09 7.87891e-09 7.16192e-09 7.39089e-09 4.94343e-09 6.88337e-09 2.90602e-09 6.36301e-09 1.0503e-09 5.83572e-09 -6.24346e-10 5.30683e-09 -2.11903e-09 4.78178e-09 -3.44045e-09 4.26517e-09 -4.59317e-09 3.75777e-09 -5.58405e-09 3.26258e-09 -6.41768e-09 2.78066e-09 -7.0985e-09 2.31157e-09 -7.63255e-09 1.85372e-09 -8.023e-09 1.40599e-09 -8.27169e-09 9.68655e-10 -8.38242e-09 5.43374e-10 -8.36255e-09 1.34234e-10 -8.22471e-09 -2.53806e-10 -7.97944e-09 -6.13959e-10 -7.63998e-09 -9.4317e-10 -7.21539e-09 -1.242e-09 -6.70594e-09 -1.51415e-09 -6.10382e-09 -1.76258e-09 -5.38412e-09 -1.9911e-09 -4.53795e-09 -2.16653e-09 -3.54361e-09 -2.27906e-09 -2.43138e-09 -2.29323e-09 -1.26263e-09 -2.20638e-09 -1.06586e-10 -1.96732e-09 9.60071e-10 -1.51875e-09 1.86126e-09 -8.67093e-10 2.52974e-09 -6.79433e-11 2.91222e-09 7.91507e-10 2.99842e-09 1.59789e-09 2.7898e-09 2.2406e-09 2.31978e-09 2.57775e-09 1.68488e-09 2.44681e-09 9.34854e-10 1.86045e-09 7.96818e-10 4.89865e-09 1.09167e-08 2.48221e-09 1.02953e-08 2.30455e-10 9.64264e-09 -1.85295e-09 8.96682e-09 -3.76603e-09 8.27616e-09 -5.50818e-09 7.57797e-09 -7.08121e-09 6.87997e-09 -8.48799e-09 6.18864e-09 -9.73189e-09 5.50913e-09 -1.08189e-08 4.84483e-09 -1.17538e-08 4.19747e-09 -1.25397e-08 3.56665e-09 -1.31788e-08 2.95071e-09 -1.36718e-08 2.34683e-09 -1.40187e-08 1.75301e-09 -1.42201e-08 1.17014e-09 -1.42799e-08 6.03314e-10 -1.42107e-08 6.5246e-11 -1.40278e-08 -4.36498e-10 -1.37541e-08 -8.87489e-10 -1.34114e-08 -1.28569e-09 -1.30095e-08 -1.64373e-09 -1.25425e-08 -1.981e-09 -1.19842e-08 -2.32062e-09 -1.12959e-08 -2.67917e-09 -1.04136e-08 -3.04863e-09 -9.31694e-09 -3.37569e-09 -8.00969e-09 -3.60043e-09 -6.55771e-09 -3.65821e-09 -5.03638e-09 -3.48847e-09 -3.54582e-09 -3.00922e-09 -2.19203e-09 -2.22078e-09 -1.07399e-09 -1.18581e-09 -2.40179e-10 -4.21537e-11 2.9017e-10 1.06761e-09 4.83789e-10 2.047e-09 3.89409e-10 2.67208e-09 2.73488e-10 2.56273e-09 2.69885e-10 1.86408e-09 1.06679e-09 -2.86955e-09 1.33905e-08 -5.19593e-09 1.26217e-08 -7.36945e-09 1.18161e-08 -9.38678e-09 1.09842e-08 -1.12464e-08 1.01359e-08 -1.29485e-08 9.28021e-09 -1.44942e-08 8.42577e-09 -1.58863e-08 7.5808e-09 -1.71286e-08 6.75157e-09 -1.82254e-08 5.94167e-09 -1.91787e-08 5.15077e-09 -1.99874e-08 4.37542e-09 -2.06484e-08 3.61177e-09 -2.11549e-08 2.8534e-09 -2.14993e-08 2.09754e-09 -2.16772e-08 1.34816e-09 -2.16861e-08 6.12312e-10 -2.15471e-08 -7.36658e-11 -2.12969e-08 -6.86497e-10 -2.09856e-08 -1.19854e-09 -2.06505e-08 -1.62047e-09 -2.03132e-08 -1.98075e-09 -1.99636e-08 -2.33047e-09 -1.95482e-08 -2.73575e-09 -1.89627e-08 -3.26455e-09 -1.80662e-08 -3.94499e-09 -1.68765e-08 -4.56523e-09 -1.53696e-08 -5.10719e-09 -1.36196e-08 -5.40795e-09 -1.17281e-08 -5.37981e-09 -9.8127e-09 -4.92446e-09 -8.05569e-09 -3.97764e-09 -6.61248e-09 -2.62881e-09 -5.49768e-09 -1.15675e-09 -4.59049e-09 1.60445e-10 -3.96201e-09 1.41853e-09 -3.7381e-09 2.4482e-09 -2.97036e-09 1.79502e-09 -1.32302e-09 2.16718e-10 -2.5625e-10 -1.14832e-08 1.5856e-08 -1.38171e-08 1.49556e-08 -1.60152e-08 1.40142e-08 -1.8075e-08 1.3044e-08 -1.99949e-08 1.20559e-08 -2.17751e-08 1.10605e-08 -2.34165e-08 1.00673e-08 -2.49214e-08 9.0858e-09 -2.6294e-08 8.12428e-09 -2.75374e-08 7.18526e-09 -2.86473e-08 6.26088e-09 -2.96132e-08 5.34149e-09 -3.04193e-08 4.4179e-09 -3.10581e-08 3.49231e-09 -3.14861e-08 2.52562e-09 -3.16789e-08 1.54093e-09 -3.16432e-08 5.76679e-10 -3.1418e-08 -2.98699e-10 -3.10988e-08 -1.0056e-09 -3.07619e-08 -1.53527e-09 -3.04778e-08 -1.90431e-09 -3.0286e-08 -2.17238e-09 -3.01691e-08 -2.44714e-09 -3.00314e-08 -2.87325e-09 -2.96522e-08 -3.64357e-09 -2.88781e-08 -4.71893e-09 -2.75944e-08 -5.84874e-09 -2.5883e-08 -6.81822e-09 -2.38069e-08 -7.48383e-09 -2.14721e-08 -7.71428e-09 -1.90452e-08 -7.35088e-09 -1.68011e-08 -6.22145e-09 -1.50795e-08 -4.35026e-09 -1.37974e-08 -2.43879e-09 -1.25231e-08 -1.11378e-09 -1.08165e-08 -2.88117e-10 -9.4473e-09 1.07899e-09 -6.84966e-09 -8.02748e-10 -3.02688e-09 -3.60616e-09 -3.28327e-09 -2.12768e-08 1.84474e-08 -2.3764e-08 1.74429e-08 -2.61444e-08 1.63947e-08 -2.84163e-08 1.53161e-08 -3.05792e-08 1.42189e-08 -3.26319e-08 1.31133e-08 -3.45735e-08 1.20091e-08 -3.64046e-08 1.09171e-08 -3.81297e-08 9.84958e-09 -3.97515e-08 8.80734e-09 -4.1261e-08 7.7705e-09 -4.26076e-08 6.68816e-09 -4.37606e-08 5.57093e-09 -4.46833e-08 4.41515e-09 -4.53674e-08 3.20973e-09 -4.57014e-08 1.87497e-09 -4.56314e-08 5.06729e-10 -4.53263e-08 -6.03667e-10 -4.49687e-08 -1.363e-09 -4.47126e-08 -1.79114e-09 -4.4654e-08 -1.96278e-09 -4.47791e-08 -2.04715e-09 -4.50964e-08 -2.12964e-09 -4.54288e-08 -2.54071e-09 -4.54991e-08 -3.57318e-09 -4.48115e-08 -5.40633e-09 -4.34131e-08 -7.24681e-09 -4.15028e-08 -8.72813e-09 -3.91529e-08 -9.83328e-09 -3.64481e-08 -1.04188e-08 -3.35225e-08 -1.0276e-08 -3.06445e-08 -9.09908e-09 -2.8323e-08 -6.67166e-09 -2.60543e-08 -4.70749e-09 -2.36475e-08 -3.52065e-09 -2.03413e-08 -3.59437e-09 -1.50247e-08 -4.23773e-09 -9.51339e-09 -6.31427e-09 -4.79186e-09 -8.32785e-09 -8.07529e-09 -3.26755e-08 2.13601e-08 -3.55308e-08 2.02983e-08 -3.83284e-08 1.91924e-08 -4.10679e-08 1.80557e-08 -4.37484e-08 1.68996e-08 -4.63655e-08 1.57306e-08 -4.89081e-08 1.45519e-08 -5.13713e-08 1.33805e-08 -5.37559e-08 1.22343e-08 -5.6075e-08 1.11266e-08 -5.82795e-08 9.97516e-09 -6.02923e-08 8.70111e-09 -6.2004e-08 7.28272e-09 -6.34273e-08 5.83842e-09 -6.44707e-08 4.2532e-09 -6.50908e-08 2.49504e-09 -6.48813e-08 2.9718e-10 -6.43216e-08 -1.16329e-09 -6.39748e-08 -1.70973e-09 -6.41798e-08 -1.58611e-09 -6.48685e-08 -1.27399e-09 -6.5701e-08 -1.21439e-09 -6.67401e-08 -1.09036e-09 -6.75776e-08 -1.70287e-09 -6.76771e-08 -3.47339e-09 -6.68249e-08 -6.25809e-09 -6.55984e-08 -8.47287e-09 -6.39066e-08 -1.04196e-08 -6.17302e-08 -1.20093e-08 -5.91469e-08 -1.30018e-08 -5.62634e-08 -1.31593e-08 -5.30944e-08 -1.22681e-08 -4.93202e-08 -1.04459e-08 -4.45152e-08 -9.51247e-09 -3.89858e-08 -9.05015e-09 -3.23773e-08 -1.0203e-08 -2.47598e-08 -1.18555e-08 -1.64068e-08 -1.46675e-08 -8.37752e-09 -1.63574e-08 -1.64529e-08 -4.61868e-08 2.48622e-08 -4.97043e-08 2.38158e-08 -5.32363e-08 2.27244e-08 -5.6782e-08 2.16015e-08 -6.03378e-08 2.04554e-08 -6.38873e-08 1.92802e-08 -6.73825e-08 1.80472e-08 -7.07789e-08 1.6777e-08 -7.41081e-08 1.55635e-08 -7.73858e-08 1.44044e-08 -8.06419e-08 1.32313e-08 -8.34893e-08 1.15486e-08 -8.577e-08 9.56363e-09 -8.74992e-08 7.56762e-09 -8.89353e-08 5.68937e-09 -8.92882e-08 2.84781e-09 -8.86119e-08 -3.79103e-10 -8.78441e-08 -1.93113e-09 -8.76217e-08 -1.93215e-09 -8.8593e-08 -6.14711e-10 -9.08781e-08 1.0112e-09 -9.31526e-08 1.06028e-09 -9.4039e-08 -2.0381e-10 -9.45865e-08 -1.15508e-09 -9.44432e-08 -3.61636e-09 -9.45229e-08 -6.17802e-09 -9.42872e-08 -8.70835e-09 -9.33959e-08 -1.13108e-08 -9.15299e-08 -1.3875e-08 -8.84731e-08 -1.60584e-08 -8.43701e-08 -1.72623e-08 -7.86085e-08 -1.80298e-08 -7.04529e-08 -1.86015e-08 -6.06283e-08 -1.93369e-08 -4.86829e-08 -2.09956e-08 -3.71256e-08 -2.17605e-08 -2.62338e-08 -2.27474e-08 -1.67004e-08 -2.4201e-08 -7.71336e-09 -2.53448e-08 -2.41664e-08 -6.23082e-08 2.92828e-08 -6.68371e-08 2.83448e-08 -7.14633e-08 2.73507e-08 -7.617e-08 2.63083e-08 -8.0955e-08 2.52405e-08 -8.57748e-08 2.41e-08 -9.04982e-08 2.27705e-08 -9.50269e-08 2.13056e-08 -9.92129e-08 1.97497e-08 -1.03315e-07 1.85068e-08 -1.06991e-07 1.69071e-08 -1.1143e-07 1.59879e-08 -1.13508e-07 1.16416e-08 -1.15047e-07 9.10624e-09 -1.14993e-07 5.63581e-09 -1.14831e-07 2.6858e-09 -1.1444e-07 -7.70422e-10 -1.1384e-07 -2.53172e-09 -1.13862e-07 -1.90946e-09 -1.15058e-07 5.81177e-10 -1.17958e-07 3.91176e-09 -1.21272e-07 4.37453e-09 -1.23483e-07 2.00704e-09 -1.24692e-07 5.41651e-11 -1.26445e-07 -1.86339e-09 -1.28595e-07 -4.02808e-09 -1.30614e-07 -6.68902e-09 -1.31668e-07 -1.02569e-08 -1.30997e-07 -1.45459e-08 -1.27984e-07 -1.90708e-08 -1.21855e-07 -2.33912e-08 -1.12528e-07 -2.73568e-08 -9.98237e-08 -3.1306e-08 -8.39851e-08 -3.51754e-08 -6.66124e-08 -3.83684e-08 -4.88202e-08 -3.95526e-08 -3.14919e-08 -4.00755e-08 -1.73505e-08 -3.83425e-08 -6.47139e-09 -3.62239e-08 -3.06378e-08 -8.1318e-08 3.49524e-08 -8.71933e-08 3.42201e-08 -9.32302e-08 3.33877e-08 -9.93561e-08 3.24341e-08 -1.05511e-07 3.13948e-08 -1.11725e-07 3.03145e-08 -1.17734e-07 2.87795e-08 -1.23155e-07 2.67263e-08 -1.28372e-07 2.4967e-08 -1.31997e-07 2.21318e-08 -1.34798e-07 1.97081e-08 -1.3473e-07 1.59193e-08 -1.37585e-07 1.44968e-08 -1.39954e-07 1.14749e-08 -1.42324e-07 8.00566e-09 -1.43962e-07 4.32371e-09 -1.4391e-07 -8.22427e-10 -1.43197e-07 -3.24435e-09 -1.43154e-07 -1.95273e-09 -1.4432e-07 1.74757e-09 -1.46309e-07 5.90081e-09 -1.48927e-07 6.9923e-09 -1.52457e-07 5.53762e-09 -1.56575e-07 4.17238e-09 -1.61151e-07 2.71287e-09 -1.67074e-07 1.8952e-09 -1.73375e-07 -3.88093e-10 -1.78232e-07 -5.40045e-09 -1.80455e-07 -1.23233e-08 -1.79159e-07 -2.03659e-08 -1.73465e-07 -2.90849e-08 -1.62515e-07 -3.83066e-08 -1.461e-07 -4.77209e-08 -1.24982e-07 -5.6293e-08 -9.97798e-08 -6.35709e-08 -7.08179e-08 -6.85143e-08 -4.45861e-08 -6.63072e-08 -2.21801e-08 -6.07485e-08 -7.11461e-09 -5.12893e-08 -3.77523e-08 -1.02953e-07 4.20874e-08 -1.10372e-07 4.1639e-08 -1.17998e-07 4.10135e-08 -1.25647e-07 4.00828e-08 -1.3301e-07 3.87587e-08 -1.40194e-07 3.7498e-08 -1.46253e-07 3.48379e-08 -1.51412e-07 3.18856e-08 -1.548e-07 2.83555e-08 -1.58472e-07 2.58035e-08 -1.60974e-07 2.22092e-08 -1.64032e-07 1.89774e-08 -1.65806e-07 1.62708e-08 -1.68496e-07 1.41648e-08 -1.71875e-07 1.13843e-08 -1.74572e-07 7.02159e-09 -1.74318e-07 -1.07707e-09 -1.74368e-07 -3.19424e-09 -1.75289e-07 -1.03176e-09 -1.75385e-07 1.84421e-09 -1.74531e-07 5.0464e-09 -1.73958e-07 6.41993e-09 -1.76611e-07 8.19072e-09 -1.82565e-07 1.01258e-08 -1.9254e-07 1.26879e-08 -2.05259e-07 1.4615e-08 -2.19106e-07 1.34586e-08 -2.30782e-07 6.27524e-09 -2.38758e-07 -4.34651e-09 -2.42402e-07 -1.67212e-08 -2.40663e-07 -3.08245e-08 -2.31999e-07 -4.69698e-08 -2.15068e-07 -6.46519e-08 -1.89038e-07 -8.2323e-08 -1.54774e-07 -9.7835e-08 -1.1707e-07 -1.06218e-07 -7.38305e-08 -1.09546e-07 -3.36782e-08 -1.00901e-07 -6.03117e-09 -7.89361e-08 -4.37834e-08 -1.26069e-07 5.06043e-08 -1.3484e-07 5.04108e-08 -1.43748e-07 4.99208e-08 -1.52727e-07 4.90622e-08 -1.60815e-07 4.68467e-08 -1.67355e-07 4.40381e-08 -1.73257e-07 4.07396e-08 -1.78471e-07 3.70996e-08 -1.8307e-07 3.2955e-08 -1.85628e-07 2.83608e-08 -1.88198e-07 2.47791e-08 -1.90811e-07 2.15909e-08 -1.92553e-07 1.80127e-08 -1.92952e-07 1.45633e-08 -1.91435e-07 9.86762e-09 -1.90843e-07 6.42949e-09 -1.93656e-07 1.73566e-09 -1.96881e-07 3.12965e-11 -1.97795e-07 -1.17367e-10 -1.9575e-07 -2.00849e-10 -1.9468e-07 3.97639e-09 -1.94862e-07 6.60237e-09 -1.98231e-07 1.15591e-08 -2.04309e-07 1.62043e-08 -2.18478e-07 2.6857e-08 -2.41634e-07 3.77706e-08 -2.65838e-07 3.76624e-08 -2.85043e-07 2.54806e-08 -3.0044e-07 1.10514e-08 -3.11701e-07 -5.46053e-09 -3.1721e-07 -2.53147e-08 -3.14813e-07 -4.93671e-08 -3.02135e-07 -7.73298e-08 -2.77542e-07 -1.06916e-07 -2.40843e-07 -1.34534e-07 -1.90843e-07 -1.56219e-07 -1.32747e-07 -1.67642e-07 -7.13161e-08 -1.62331e-07 -1.88988e-08 -1.31353e-07 -6.26821e-08 -1.48907e-07 6.00589e-08 -1.58468e-07 5.99722e-08 -1.67971e-07 5.94234e-08 -1.76481e-07 5.75728e-08 -1.83977e-07 5.43424e-08 -1.90672e-07 5.07333e-08 -1.95953e-07 4.60207e-08 -1.99773e-07 4.09189e-08 -2.03162e-07 3.63438e-08 -2.06486e-07 3.16847e-08 -2.07628e-07 2.59209e-08 -2.07379e-07 2.1342e-08 -2.05844e-07 1.64775e-08 -2.04265e-07 1.29849e-08 -2.04003e-07 9.60531e-09 -2.03758e-07 6.18501e-09 -2.03774e-07 1.75134e-09 -2.03816e-07 7.34582e-11 -2.05455e-07 1.52187e-09 -2.08564e-07 2.90786e-09 -2.10119e-07 5.53141e-09 -2.12698e-07 9.18189e-09 -2.15708e-07 1.45693e-08 -2.22736e-07 2.32317e-08 -2.33102e-07 3.72232e-08 -2.57119e-07 6.17869e-08 -2.88521e-07 6.90647e-08 -3.15595e-07 5.25549e-08 -3.38304e-07 3.37606e-08 -3.55614e-07 1.18503e-08 -3.66535e-07 -1.43939e-08 -3.70619e-07 -4.5283e-08 -3.64611e-07 -8.3338e-08 -3.44697e-07 -1.2683e-07 -3.09656e-07 -1.69574e-07 -2.61552e-07 -2.04323e-07 -2.01676e-07 -2.27518e-07 -1.29717e-07 -2.3429e-07 -5.1592e-08 -2.09478e-07 -1.14274e-07 -1.69892e-07 6.99828e-08 -1.7943e-07 6.95098e-08 -1.88044e-07 6.80376e-08 -1.96293e-07 6.58219e-08 -2.03797e-07 6.18471e-08 -2.09164e-07 5.61002e-08 -2.14076e-07 5.09328e-08 -2.17318e-07 4.41607e-08 -2.18673e-07 3.76988e-08 -2.16509e-07 2.95199e-08 -2.14518e-07 2.39305e-08 -2.11944e-07 1.87677e-08 -2.09562e-07 1.40953e-08 -2.06691e-07 1.01145e-08 -2.04012e-07 6.92569e-09 -2.0221e-07 4.38378e-09 -2.03429e-07 2.96999e-09 -2.06987e-07 3.63186e-09 -2.10821e-07 5.35563e-09 -2.15813e-07 7.8999e-09 -2.21289e-07 1.10076e-08 -2.27238e-07 1.51304e-08 -2.33987e-07 2.13183e-08 -2.4177e-07 3.1015e-08 -2.50861e-07 4.63145e-08 -2.57234e-07 6.81593e-08 -2.73402e-07 8.52334e-08 -3.00689e-07 7.98417e-08 -3.24424e-07 5.74956e-08 -3.38257e-07 2.56832e-08 -3.45739e-07 -6.91163e-09 -3.52208e-07 -3.88142e-08 -3.51739e-07 -8.38067e-08 -3.35401e-07 -1.43169e-07 -3.05399e-07 -1.99576e-07 -2.66739e-07 -2.42983e-07 -2.20222e-07 -2.74036e-07 -1.62228e-07 -2.92284e-07 -8.46597e-08 -2.87046e-07 -1.98934e-07 -1.86672e-07 7.92246e-08 -1.95603e-07 7.84412e-08 -2.03708e-07 7.61428e-08 -2.10265e-07 7.23783e-08 -2.17196e-07 6.87784e-08 -2.22551e-07 6.1455e-08 -2.23991e-07 5.23723e-08 -2.23973e-07 4.41433e-08 -2.21881e-07 3.56068e-08 -2.19788e-07 2.74262e-08 -2.1619e-07 2.03331e-08 -2.11785e-07 1.43625e-08 -2.07175e-07 9.48589e-09 -2.02825e-07 5.76423e-09 -1.99284e-07 3.38544e-09 -1.97497e-07 2.59635e-09 -1.98238e-07 3.71096e-09 -2.01574e-07 6.96802e-09 -2.07767e-07 1.15491e-08 -2.16027e-07 1.61593e-08 -2.25276e-07 2.02568e-08 -2.34902e-07 2.47564e-08 -2.44641e-07 3.10569e-08 -2.53743e-07 4.0117e-08 -2.60153e-07 5.27249e-08 -2.60917e-07 6.89234e-08 -2.58133e-07 8.24495e-08 -2.59722e-07 8.14302e-08 -2.65416e-07 6.31897e-08 -2.67297e-07 2.75638e-08 -2.69607e-07 -4.60129e-09 -2.7532e-07 -3.31011e-08 -2.83085e-07 -7.60416e-08 -2.65491e-07 -1.60762e-07 -2.3355e-07 -2.31518e-07 -2.01441e-07 -2.75091e-07 -1.6924e-07 -3.06237e-07 -1.32801e-07 -3.28724e-07 -8.00917e-08 -3.39755e-07 -2.79026e-07 -2.00735e-07 8.74002e-08 -2.08722e-07 8.64281e-08 -2.15662e-07 8.30833e-08 -2.22591e-07 7.93069e-08 -2.2574e-07 7.19281e-08 -2.26236e-07 6.19509e-08 -2.24859e-07 5.0995e-08 -2.21915e-07 4.11993e-08 -2.1817e-07 3.18619e-08 -2.13935e-07 2.31906e-08 -2.09142e-07 1.55411e-08 -2.03901e-07 9.12124e-09 -1.98505e-07 4.09001e-09 -1.93437e-07 6.96596e-10 -1.89313e-07 -7.38446e-10 -1.86894e-07 1.77383e-10 -1.87006e-07 3.82302e-09 -1.90672e-07 1.06334e-08 -1.99542e-07 2.04197e-08 -2.11903e-07 2.85203e-08 -2.24525e-07 3.28784e-08 -2.36749e-07 3.69805e-08 -2.48459e-07 4.27669e-08 -2.58588e-07 5.02457e-08 -2.64464e-07 5.86012e-08 -2.62121e-07 6.65806e-08 -2.50887e-07 7.12158e-08 -2.39034e-07 6.95765e-08 -2.29794e-07 5.39501e-08 -2.34993e-07 3.27629e-08 -2.38449e-07 -1.14558e-09 -2.3737e-07 -3.41799e-08 -2.05355e-07 -1.08057e-07 -1.63727e-07 -2.0239e-07 -1.36681e-07 -2.58564e-07 -1.14585e-07 -2.97188e-07 -9.49931e-08 -3.25829e-07 -7.62784e-08 -3.47439e-07 -5.28255e-08 -3.63208e-07 -3.31851e-07 -2.10951e-07 9.41518e-08 -2.16953e-07 9.24298e-08 -2.22239e-07 8.83696e-08 -2.24048e-07 8.11157e-08 -2.23172e-07 7.10524e-08 -2.20409e-07 5.91873e-08 -2.17189e-07 4.77753e-08 -2.13093e-07 3.71029e-08 -2.0838e-07 2.71494e-08 -2.03244e-07 1.80541e-08 -1.97774e-07 1.00717e-08 -1.92114e-07 3.46112e-09 -1.86532e-07 -1.49158e-09 -1.81402e-07 -4.43324e-09 -1.77207e-07 -4.93346e-09 -1.74551e-07 -2.47854e-09 -1.74222e-07 3.49335e-09 -1.77106e-07 1.35181e-08 -1.87196e-07 3.05098e-08 -2.06242e-07 4.75663e-08 -2.22452e-07 4.90882e-08 -2.38417e-07 5.29458e-08 -2.54422e-07 5.87717e-08 -2.69184e-07 6.50081e-08 -2.81272e-07 7.06892e-08 -2.87542e-07 7.28502e-08 -2.86844e-07 7.05176e-08 -2.80127e-07 6.28592e-08 -2.73922e-07 4.77457e-08 -2.66769e-07 2.56099e-08 -2.42057e-07 -2.58571e-08 -1.79644e-07 -9.65922e-08 -1.15915e-07 -1.71785e-07 -8.59493e-08 -2.32355e-07 -6.89629e-08 -2.7555e-07 -5.654e-08 -3.09611e-07 -4.59004e-08 -3.36468e-07 -3.64895e-08 -3.5685e-07 -2.70975e-08 -3.726e-07 -3.58948e-07 -2.16318e-07 9.9489e-08 -2.19562e-07 9.56734e-08 -2.20083e-07 8.88908e-08 -2.17987e-07 7.90199e-08 -2.14045e-07 6.71103e-08 -2.09817e-07 5.49584e-08 -2.05285e-07 4.32436e-08 -2.00316e-07 3.21341e-08 -1.94996e-07 2.1829e-08 -1.89466e-07 1.25247e-08 -1.83888e-07 4.49368e-09 -1.78483e-07 -1.94386e-09 -1.73564e-07 -6.41089e-09 -1.69534e-07 -8.46337e-09 -1.66884e-07 -7.58364e-09 -1.66169e-07 -3.19357e-09 -1.68004e-07 5.32894e-09 -1.73134e-07 1.86482e-08 -1.80625e-07 3.8001e-08 -1.93268e-07 6.02087e-08 -2.15846e-07 7.16666e-08 -2.40104e-07 7.72031e-08 -2.63411e-07 8.20787e-08 -2.8466e-07 8.62576e-08 -3.02065e-07 8.80941e-08 -3.14484e-07 8.52693e-08 -3.20015e-07 7.60481e-08 -3.159e-07 5.8744e-08 -2.98539e-07 3.03846e-08 -2.54114e-07 -1.88155e-08 -1.9058e-07 -8.93923e-08 -1.27866e-07 -1.59307e-07 -8.80421e-08 -2.11609e-07 -6.53338e-08 -2.55064e-07 -4.91635e-08 -2.91721e-07 -3.65431e-08 -3.22231e-07 -2.65674e-08 -3.46444e-07 -1.86505e-08 -3.64767e-07 -1.28539e-08 -3.78396e-07 -3.71802e-07 -2.1419e-07 1.01874e-07 -2.14276e-07 9.57591e-08 -2.11825e-07 8.64403e-08 -2.07174e-07 7.43685e-08 -2.01871e-07 6.18065e-08 -1.96434e-07 4.9522e-08 -1.90802e-07 3.76113e-08 -1.85035e-07 2.63671e-08 -1.79199e-07 1.59927e-08 -1.73432e-07 6.75744e-09 -1.6794e-07 -9.98885e-10 -1.63015e-07 -6.86863e-09 -1.59043e-07 -1.03837e-08 -1.56502e-07 -1.10039e-08 -1.55969e-07 -8.11708e-09 -1.58068e-07 -1.09409e-09 -1.63386e-07 1.06468e-08 -1.72277e-07 2.75396e-08 -1.84219e-07 4.99428e-08 -1.99599e-07 7.55888e-08 -2.21508e-07 9.3575e-08 -2.49931e-07 1.05627e-07 -2.79462e-07 1.11609e-07 -3.04862e-07 1.11658e-07 -3.25469e-07 1.08701e-07 -3.38941e-07 9.87421e-08 -3.41505e-07 7.8612e-08 -3.33149e-07 5.03874e-08 -2.8204e-07 -2.07236e-08 -2.07377e-07 -9.34781e-08 -1.48134e-07 -1.48635e-07 -1.09781e-07 -1.97659e-07 -8.20397e-08 -2.39351e-07 -6.06714e-08 -2.76432e-07 -4.36963e-08 -3.08696e-07 -3.03494e-08 -3.35578e-07 -1.97654e-08 -3.57028e-07 -1.15269e-08 -3.73005e-07 -6.04211e-09 -3.8388e-07 -3.77844e-07 -2.07985e-07 1.01681e-07 -2.05222e-07 9.29957e-08 -1.99746e-07 8.09644e-08 -1.93529e-07 6.81509e-08 -1.87251e-07 5.55289e-08 -1.80819e-07 4.30897e-08 -1.74358e-07 3.115e-08 -1.6795e-07 1.99586e-08 -1.61709e-07 9.75155e-09 -1.55762e-07 8.108e-10 -1.50367e-07 -6.39432e-09 -1.45893e-07 -1.13428e-08 -1.42808e-07 -1.34689e-08 -1.41675e-07 -1.21366e-08 -1.43184e-07 -6.60806e-09 -1.4807e-07 3.79182e-09 -1.57023e-07 1.95999e-08 -1.70193e-07 4.07096e-08 -1.86712e-07 6.6462e-08 -2.06556e-07 9.54319e-08 -2.34248e-07 1.21267e-07 -2.68094e-07 1.39472e-07 -3.00542e-07 1.44056e-07 -3.29366e-07 1.40482e-07 -3.49626e-07 1.2896e-07 -3.5675e-07 1.05866e-07 -3.45568e-07 6.74295e-08 -2.86844e-07 -8.33743e-09 -2.1977e-07 -8.77988e-08 -1.7291e-07 -1.40338e-07 -1.34855e-07 -1.86691e-07 -1.0543e-07 -2.27084e-07 -8.05192e-08 -2.64261e-07 -5.98269e-08 -2.97124e-07 -4.31799e-08 -3.25343e-07 -2.99042e-08 -3.48854e-07 -1.92415e-08 -3.67691e-07 -1.03982e-08 -3.81848e-07 -3.70209e-09 -3.90577e-07 -3.81546e-07 -1.95971e-07 9.84323e-08 -1.90754e-07 8.77781e-08 -1.84479e-07 7.46885e-08 -1.77894e-07 6.15663e-08 -1.70995e-07 4.86295e-08 -1.63984e-07 3.60787e-08 -1.56985e-07 2.41509e-08 -1.50119e-07 1.3092e-08 -1.43566e-07 3.19914e-09 -1.37484e-07 -5.27159e-09 -1.32151e-07 -1.17279e-08 -1.28046e-07 -1.54486e-08 -1.25744e-07 -1.57708e-08 -1.25912e-07 -1.19683e-08 -1.29399e-07 -3.12114e-09 -1.3741e-07 1.18035e-08 -1.51e-07 3.31897e-08 -1.70281e-07 5.99899e-08 -1.94029e-07 9.02105e-08 -2.20641e-07 1.22043e-07 -2.53246e-07 1.53873e-07 -2.918e-07 1.78026e-07 -3.33955e-07 1.86211e-07 -3.69744e-07 1.76271e-07 -3.8872e-07 1.47936e-07 -3.73062e-07 9.02083e-08 -3.09019e-07 3.38616e-09 -2.4091e-07 -7.64462e-08 -1.97328e-07 -1.31381e-07 -1.60586e-07 -1.7708e-07 -1.29616e-07 -2.17661e-07 -1.02063e-07 -2.54637e-07 -7.8781e-08 -2.87543e-07 -5.96332e-08 -3.16272e-07 -4.41223e-08 -3.40854e-07 -3.15689e-08 -3.61407e-07 -2.12138e-08 -3.78046e-07 -1.23184e-08 -3.90743e-07 -4.55472e-09 -3.9834e-07 -3.86101e-07 -1.82265e-07 9.36185e-08 -1.76063e-07 8.15764e-08 -1.6928e-07 6.79056e-08 -1.62195e-07 5.44807e-08 -1.54878e-07 4.13124e-08 -1.47462e-07 2.86632e-08 -1.40123e-07 1.68116e-08 -1.32985e-07 5.95387e-09 -1.2623e-07 -3.55641e-09 -1.20098e-07 -1.14038e-08 -1.14813e-07 -1.70131e-08 -1.10995e-07 -1.92672e-08 -1.09328e-07 -1.74374e-08 -1.10419e-07 -1.08772e-08 -1.1552e-07 1.97904e-09 -1.26367e-07 2.26512e-08 -1.4481e-07 5.16327e-08 -1.72919e-07 8.8099e-08 -2.08463e-07 1.25754e-07 -2.45659e-07 1.59239e-07 -2.86674e-07 1.94888e-07 -3.37982e-07 2.29333e-07 -3.93939e-07 2.42168e-07 -4.44208e-07 2.2654e-07 -4.28729e-07 1.32457e-07 -3.50749e-07 1.22284e-08 -2.76007e-07 -7.13563e-08 -2.26151e-07 -1.26302e-07 -1.86583e-07 -1.70948e-07 -1.52128e-07 -2.11535e-07 -1.22065e-07 -2.47723e-07 -9.67867e-08 -2.79916e-07 -7.5976e-08 -3.08354e-07 -5.90214e-08 -3.33227e-07 -4.51565e-08 -3.54719e-07 -3.35793e-08 -3.72985e-07 -2.35176e-08 -3.88108e-07 -1.43167e-08 -3.99945e-07 -5.51241e-09 -4.07144e-07 -3.91613e-07 -1.68804e-07 8.79449e-08 -1.62159e-07 7.49307e-08 -1.55119e-07 6.08657e-08 -1.47838e-07 4.71997e-08 -1.40393e-07 3.38668e-08 -1.32893e-07 2.11635e-08 -1.25454e-07 9.37221e-09 -1.18257e-07 -1.24345e-09 -1.11422e-07 -1.03921e-08 -1.05293e-07 -1.75324e-08 -1.00313e-07 -2.1994e-08 -9.6666e-08 -2.2914e-08 -9.49142e-08 -1.91892e-08 -9.60133e-08 -9.77811e-09 -1.00991e-07 6.95678e-09 -1.11569e-07 3.32288e-08 -1.3208e-07 7.21443e-08 -1.71963e-07 1.27982e-07 -2.31654e-07 1.85445e-07 -2.85378e-07 2.12964e-07 -3.37545e-07 2.47054e-07 -4.02445e-07 2.94234e-07 -4.80396e-07 3.20119e-07 -4.66956e-07 2.13101e-07 -3.76321e-07 4.18226e-08 -2.98288e-07 -6.5805e-08 -2.44736e-07 -1.24908e-07 -2.0228e-07 -1.68758e-07 -1.65524e-07 -2.07704e-07 -1.34812e-07 -2.42247e-07 -1.09474e-07 -2.73061e-07 -8.8779e-08 -3.00611e-07 -7.19004e-08 -3.25232e-07 -5.79753e-08 -3.47152e-07 -4.61723e-08 -3.66522e-07 -3.57293e-08 -3.83428e-07 -2.59842e-08 -3.97853e-07 -1.64072e-08 -4.09522e-07 -6.66008e-09 -4.16891e-07 -3.98273e-07 -1.56779e-07 8.17833e-08 -1.5006e-07 6.82115e-08 -1.43053e-07 5.38588e-08 -1.35839e-07 3.9986e-08 -1.28596e-07 2.66238e-08 -1.21447e-07 1.40143e-08 -1.14472e-07 2.39639e-09 -1.0778e-07 -7.93517e-09 -1.0148e-07 -1.66929e-08 -9.59023e-08 -2.31103e-08 -9.13284e-08 -2.65682e-08 -8.77613e-08 -2.64813e-08 -8.5734e-08 -2.12165e-08 -8.56875e-08 -9.82466e-09 -8.8243e-08 9.51223e-09 -9.72218e-08 4.22076e-08 -1.21794e-07 9.67164e-08 -1.87973e-07 1.94161e-07 -2.86562e-07 2.84033e-07 -3.75489e-07 3.01891e-07 -4.78602e-07 3.50167e-07 -5.76772e-07 3.92405e-07 -5.50352e-07 2.937e-07 -3.981e-07 6.08505e-08 -2.93227e-07 -6.30499e-08 -2.35915e-07 -1.23117e-07 -1.95413e-07 -1.6541e-07 -1.62013e-07 -2.02158e-07 -1.3488e-07 -2.34837e-07 -1.12874e-07 -2.64254e-07 -9.49773e-08 -2.90958e-07 -8.02677e-08 -3.1532e-07 -6.79178e-08 -3.37582e-07 -5.7181e-08 -3.57889e-07 -4.73916e-08 -3.76311e-07 -3.79708e-08 -3.92849e-07 -2.84378e-08 -4.07386e-07 -1.84435e-08 -4.19516e-07 -7.96692e-09 -4.27367e-07 -4.0624e-07 -1.47106e-07 7.67096e-08 -1.40072e-07 6.11774e-08 -1.33107e-07 4.6894e-08 -1.2631e-07 3.31887e-08 -1.19829e-07 2.01424e-08 -1.13742e-07 7.92731e-09 -1.08101e-07 -3.24454e-09 -1.02938e-07 -1.30988e-08 -9.84016e-08 -2.12295e-08 -9.44364e-08 -2.70759e-08 -9.10785e-08 -2.99265e-08 -8.86237e-08 -2.89362e-08 -8.67558e-08 -2.30846e-08 -8.53743e-08 -1.12063e-08 -8.67077e-08 1.08456e-08 -1.03948e-07 5.94477e-08 -2.05955e-07 1.98724e-07 -3.43327e-07 3.31531e-07 -4.73958e-07 4.14661e-07 -6.00755e-07 4.28684e-07 -6.70764e-07 4.20173e-07 -6.06512e-07 3.2815e-07 -3.99421e-07 8.66071e-08 -2.66738e-07 -7.18331e-08 -2.06858e-07 -1.2293e-07 -1.71238e-07 -1.58737e-07 -1.44911e-07 -1.91737e-07 -1.2441e-07 -2.2266e-07 -1.08055e-07 -2.51191e-07 -9.47425e-08 -2.77567e-07 -8.3631e-08 -3.02069e-07 -7.40379e-08 -3.24913e-07 -6.5377e-08 -3.46243e-07 -5.71274e-08 -3.66138e-07 -4.88251e-08 -3.84614e-07 -4.00732e-08 -4.01601e-07 -3.0564e-08 -4.16895e-07 -2.01295e-08 -4.29951e-07 -8.96163e-09 -4.38535e-07 -4.15201e-07 -1.32585e-07 7.0821e-08 -1.27317e-07 5.59098e-08 -1.22295e-07 4.18712e-08 -1.17644e-07 2.85381e-08 -1.13474e-07 1.5972e-08 -1.09881e-07 4.33463e-09 -1.06958e-07 -6.16762e-09 -1.04798e-07 -1.52594e-08 -1.03494e-07 -2.25342e-08 -1.03182e-07 -2.73873e-08 -1.04075e-07 -2.90345e-08 -1.06342e-07 -2.66687e-08 -1.09677e-07 -1.97504e-08 -1.1409e-07 -6.79254e-09 -1.26976e-07 2.37312e-08 -2.61546e-07 1.94018e-07 -4.3281e-07 3.69988e-07 -5.74445e-07 4.73164e-07 -6.48152e-07 4.88369e-07 -6.57815e-07 4.38347e-07 -5.69005e-07 3.31363e-07 -3.56595e-07 1.15739e-07 -2.07386e-07 -6.26023e-08 -1.65205e-07 -1.14014e-07 -1.41646e-07 -1.46489e-07 -1.24125e-07 -1.76258e-07 -1.10324e-07 -2.05539e-07 -9.94102e-08 -2.33574e-07 -9.05281e-08 -2.60074e-07 -8.30215e-08 -2.85073e-07 -7.63786e-08 -3.08712e-07 -7.01544e-08 -3.31137e-07 -6.3935e-08 -3.52462e-07 -5.73279e-08 -3.72745e-07 -4.99742e-08 -3.91968e-07 -4.1582e-08 -4.09993e-07 -3.19786e-08 -4.26499e-07 -2.11715e-08 -4.40758e-07 -9.54676e-09 -4.5016e-07 -4.24747e-07 -1.16047e-07 6.74313e-08 -1.13723e-07 5.35867e-08 -1.12154e-07 4.03017e-08 -1.11049e-07 2.74334e-08 -1.10414e-07 1.5337e-08 -1.10466e-07 4.38663e-09 -1.11442e-07 -5.1916e-09 -1.1354e-07 -1.31618e-08 -1.16983e-07 -1.90914e-08 -1.22066e-07 -2.23045e-08 -1.29196e-07 -2.19043e-08 -1.38818e-07 -1.70466e-08 -1.51901e-07 -6.66757e-09 -1.76048e-07 1.73541e-08 -2.49249e-07 9.69317e-08 -4.65199e-07 4.09965e-07 -6.27852e-07 5.32635e-07 -6.79612e-07 5.24921e-07 -6.21236e-07 4.29992e-07 -4.65267e-07 2.82377e-07 -2.75184e-07 1.41279e-07 -1.38426e-07 -2.10204e-08 -1.16874e-07 -8.41536e-08 -1.08967e-07 -1.21921e-07 -1.02075e-07 -1.53381e-07 -9.50824e-08 -1.83251e-07 -8.88165e-08 -2.11805e-07 -8.34379e-08 -2.38952e-07 -7.88052e-08 -2.64706e-07 -7.46784e-08 -2.892e-07 -7.07681e-08 -3.12622e-07 -6.67459e-08 -3.35158e-07 -6.22499e-08 -3.56958e-07 -5.68953e-08 -3.781e-07 -5.031e-08 -3.98553e-07 -4.22083e-08 -4.18095e-07 -3.25273e-08 -4.3618e-07 -2.15444e-08 -4.5174e-07 -9.80159e-09 -4.61902e-07 -4.34549e-07 -1.01714e-07 6.73536e-08 -1.03934e-07 5.5807e-08 -1.06737e-07 4.31043e-08 -1.09188e-07 2.98851e-08 -1.11965e-07 1.81139e-08 -1.15821e-07 8.24233e-09 -1.20993e-07 -1.90092e-11 -1.27752e-07 -6.40284e-09 -1.36374e-07 -1.04699e-08 -1.47179e-07 -1.14992e-08 -1.60655e-07 -8.42823e-09 -1.7772e-07 1.89461e-11 -2.01096e-07 1.67076e-08 -2.44294e-07 6.05522e-08 -3.84479e-07 2.37118e-07 -5.84409e-07 6.09894e-07 -6.81075e-07 6.293e-07 -6.03089e-07 4.46933e-07 -4.38193e-07 2.65091e-07 -2.57535e-07 1.01715e-07 -1.21663e-07 5.40474e-09 -9.44967e-08 -4.81867e-08 -8.8159e-08 -9.04913e-08 -8.47195e-08 -1.25361e-07 -8.07969e-08 -1.57304e-07 -7.68722e-08 -1.87175e-07 -7.33568e-08 -2.1532e-07 -7.0407e-08 -2.41902e-07 -6.79879e-08 -2.67125e-07 -6.59381e-08 -2.91249e-07 -6.40113e-08 -3.14548e-07 -6.18869e-08 -3.37283e-07 -5.91638e-08 -3.59681e-07 -5.53639e-08 -3.819e-07 -4.99672e-08 -4.0395e-07 -4.25187e-08 -4.25543e-07 -3.28455e-08 -4.45853e-07 -2.15147e-08 -4.63071e-07 -9.56939e-09 -4.73847e-07 -4.44118e-07 -1.08177e-07 6.94895e-08 -1.10067e-07 5.76973e-08 -1.11942e-07 4.4979e-08 -1.14132e-07 3.20754e-08 -1.18736e-07 2.27179e-08 -1.25259e-07 1.47654e-08 -1.33787e-07 8.50938e-09 -1.44457e-07 4.26732e-09 -1.57446e-07 2.51877e-09 -1.72949e-07 4.0042e-09 -1.90965e-07 9.58815e-09 -2.12585e-07 2.16381e-08 -2.40847e-07 4.49697e-08 -2.90209e-07 1.09915e-07 -4.54191e-07 4.01099e-07 -5.87837e-07 7.43544e-07 -4.94204e-07 5.35674e-07 -2.9971e-07 2.52443e-07 -1.4838e-07 1.13763e-07 -9.03283e-08 4.36633e-08 -7.42343e-08 -1.06892e-08 -6.70498e-08 -5.53712e-08 -6.35946e-08 -9.39464e-08 -6.07111e-08 -1.28244e-07 -5.8455e-08 -1.5956e-07 -5.66242e-08 -1.89006e-07 -5.51737e-08 -2.16771e-07 -5.41695e-08 -2.42906e-07 -5.36597e-08 -2.67635e-07 -5.35817e-08 -2.91327e-07 -5.37846e-08 -3.14345e-07 -5.40128e-08 -3.37054e-07 -5.38637e-08 -3.5983e-07 -5.27469e-08 -3.83017e-07 -4.98971e-08 -4.068e-07 -4.45076e-08 -4.30933e-07 -3.60291e-08 -4.54331e-07 -2.4435e-08 -4.74665e-07 -1.06545e-08 -4.87627e-07 -4.54772e-07 -1.13293e-07 6.56281e-08 -1.11922e-07 5.63257e-08 -1.13387e-07 4.64442e-08 -1.18422e-07 3.71106e-08 -1.25401e-07 2.96966e-08 -1.34506e-07 2.38709e-08 -1.45796e-07 1.97991e-08 -1.59316e-07 1.77875e-08 -1.75107e-07 1.83101e-08 -1.93024e-07 2.19215e-08 -2.12975e-07 2.95386e-08 -2.3441e-07 4.30738e-08 -2.58092e-07 6.86518e-08 -2.88193e-07 1.40015e-07 -3.82288e-07 4.95194e-07 -3.55382e-07 7.16634e-07 -1.67264e-07 3.47552e-07 -8.34418e-08 1.6862e-07 -5.31783e-08 8.34995e-08 -3.73064e-08 2.77914e-08 -3.0502e-08 -1.74937e-08 -2.77551e-08 -5.8118e-08 -2.72269e-08 -9.44744e-08 -2.81147e-08 -1.27356e-07 -2.97801e-08 -1.57894e-07 -3.12659e-08 -1.8752e-07 -3.21303e-08 -2.15907e-07 -3.30446e-08 -2.41992e-07 -3.43399e-08 -2.6634e-07 -3.61748e-08 -2.89492e-07 -3.86458e-08 -3.11874e-07 -4.17302e-08 -3.33969e-07 -4.51657e-08 -3.56394e-07 -4.82954e-08 -3.79887e-07 -4.9948e-08 -4.05148e-07 -4.86068e-08 -4.32274e-07 -4.29768e-08 -4.59962e-07 -3.22096e-08 -4.85432e-07 -1.53083e-08 -5.04528e-07 -4.70081e-07 -1.14089e-07 6.36683e-08 -1.14569e-07 5.68056e-08 -1.17532e-07 4.94074e-08 -1.23457e-07 4.3035e-08 -1.31875e-07 3.81151e-08 -1.42665e-07 3.46609e-08 -1.55732e-07 3.28658e-08 -1.70959e-07 3.30144e-08 -1.88131e-07 3.54831e-08 -2.06879e-07 4.06694e-08 -2.26501e-07 4.91606e-08 -2.45813e-07 6.23851e-08 -2.63761e-07 8.66003e-08 -2.75553e-07 1.51808e-07 -3.14038e-07 5.33684e-07 -2.0752e-07 6.1012e-07 -8.98017e-08 2.29834e-07 -3.43246e-08 1.13142e-07 -8.84826e-09 5.8023e-08 1.63093e-09 1.73121e-08 5.13378e-09 -2.09967e-08 4.8593e-09 -5.78437e-08 2.58134e-09 -9.21962e-08 -5.21736e-10 -1.24253e-07 -3.62785e-09 -1.54788e-07 -6.02108e-09 -1.85127e-07 -7.56625e-09 -2.14362e-07 -9.07194e-09 -2.40487e-07 -1.0943e-08 -2.64469e-07 -1.35978e-08 -2.86837e-07 -1.753e-08 -3.07942e-07 -2.31647e-08 -3.28335e-07 -3.06928e-08 -3.48866e-07 -3.95674e-08 -3.71012e-07 -4.78482e-08 -3.96867e-07 -5.25235e-08 -4.27599e-07 -5.07112e-08 -4.61774e-07 -4.0786e-08 -4.95357e-07 -2.12932e-08 -5.24021e-07 -4.91374e-07 -1.13686e-07 6.15834e-08 -1.14591e-07 5.77101e-08 -1.18895e-07 5.3712e-08 -1.26074e-07 5.02135e-08 -1.35706e-07 4.77468e-08 -1.47597e-07 4.6552e-08 -1.61552e-07 4.68214e-08 -1.77356e-07 4.88181e-08 -1.9471e-07 5.28365e-08 -2.13166e-07 5.91252e-08 -2.32051e-07 6.80463e-08 -2.50251e-07 8.05845e-08 -2.68665e-07 1.05014e-07 -2.92525e-07 1.75667e-07 -2.92362e-07 5.33518e-07 -1.60199e-07 4.77957e-07 -7.22421e-08 1.4188e-07 -2.72274e-08 6.81279e-08 -4.5014e-09 3.52969e-08 7.19454e-09 5.616e-09 1.30492e-08 -2.68515e-08 1.5188e-08 -5.99824e-08 1.52807e-08 -9.22889e-08 1.48494e-08 -1.23821e-07 1.48748e-08 -1.54814e-07 1.50988e-08 -1.85351e-07 1.5208e-08 -2.14471e-07 1.5357e-08 -2.40636e-07 1.51204e-08 -2.64232e-07 1.39308e-08 -2.85648e-07 1.08725e-08 -3.04883e-07 4.61561e-09 -3.22078e-07 -6.05856e-09 -3.38192e-07 -2.17692e-08 -3.55302e-07 -4.0219e-08 -3.78417e-07 -5.42127e-08 -4.13606e-07 -5.76267e-08 -4.5836e-07 -4.84774e-08 -5.04507e-07 -2.78233e-08 -5.44675e-07 -5.19197e-07 -1.13524e-07 6.07196e-08 -1.15437e-07 5.96228e-08 -1.20174e-07 5.84493e-08 -1.27597e-07 5.7636e-08 -1.37405e-07 5.7555e-08 -1.49328e-07 5.84747e-08 -1.63135e-07 6.06284e-08 -1.78566e-07 6.42489e-08 -1.95293e-07 6.9564e-08 -2.12974e-07 7.68061e-08 -2.31097e-07 8.61689e-08 -2.49791e-07 9.9279e-08 -2.73658e-07 1.28882e-07 -3.26319e-07 2.28328e-07 -2.86161e-07 4.93357e-07 -9.82662e-08 2.90056e-07 -4.18707e-08 8.5481e-08 -2.19968e-08 4.82536e-08 -9.3735e-09 2.26733e-08 1.0632e-09 -4.82102e-09 9.04797e-09 -3.48364e-08 1.4522e-08 -6.54565e-08 1.85301e-08 -9.62969e-08 2.23919e-08 -1.27683e-07 2.63918e-08 -1.58813e-07 3.03733e-08 -1.89333e-07 3.42482e-08 -2.18346e-07 3.80145e-08 -2.44402e-07 4.16613e-08 -2.67879e-07 4.47348e-08 -2.88721e-07 4.6289e-08 -3.06437e-07 4.45892e-08 -3.20378e-07 3.58851e-08 -3.29487e-07 1.57072e-08 -3.35124e-07 -2.04817e-08 -3.42228e-07 -5.44307e-08 -3.79657e-07 -6.2531e-08 -4.5026e-07 -5.34383e-08 -5.136e-07 -3.22804e-08 -5.65833e-07 -5.51478e-07 -1.12653e-07 6.08253e-08 -1.15087e-07 6.2056e-08 -1.19869e-07 6.32313e-08 -1.26944e-07 6.4711e-08 -1.36148e-07 6.67596e-08 -1.47289e-07 6.96158e-08 -1.60177e-07 7.35166e-08 -1.74608e-07 7.86789e-08 -1.90342e-07 8.52985e-08 -2.07112e-07 9.35755e-08 -2.24829e-07 1.03886e-07 -2.44818e-07 1.19268e-07 -2.76112e-07 1.60176e-07 -3.37101e-07 2.89318e-07 -2.03472e-07 3.59734e-07 -4.54408e-08 1.32028e-07 -3.05535e-08 7.05937e-08 -2.29858e-08 4.06857e-08 -1.42651e-08 1.39523e-08 -4.60363e-09 -1.44829e-08 4.42295e-09 -4.38632e-08 1.24617e-08 -7.34951e-08 1.99498e-08 -1.03785e-07 2.72508e-08 -1.34984e-07 3.43706e-08 -1.65933e-07 4.15096e-08 -1.96472e-07 4.85861e-08 -2.25423e-07 5.58432e-08 -2.5166e-07 6.35503e-08 -2.75586e-07 7.16061e-08 -2.96777e-07 7.9555e-08 -3.14386e-07 8.62964e-08 -3.2712e-07 8.98394e-08 -3.3303e-07 8.00726e-08 -3.25357e-07 2.37174e-08 -2.85873e-07 -5.39979e-08 -3.01941e-07 -6.16555e-08 -4.42602e-07 -5.08974e-08 -5.24358e-07 -3.40081e-08 -5.82723e-07 -5.85486e-07 -1.10659e-07 6.1312e-08 -1.13019e-07 6.44163e-08 -1.17201e-07 6.74125e-08 -1.23291e-07 7.08014e-08 -1.31192e-07 7.46607e-08 -1.40726e-07 7.91503e-08 -1.51757e-07 8.45474e-08 -1.64117e-07 9.10386e-08 -1.77562e-07 9.87435e-08 -1.91707e-07 1.07721e-07 -2.06048e-07 1.18227e-07 -2.20116e-07 1.33335e-07 -2.30328e-07 1.70388e-07 -2.33594e-07 2.92582e-07 -7.5846e-08 2.01982e-07 -4.29842e-08 9.91665e-08 -3.42877e-08 6.18972e-08 -2.72687e-08 3.36666e-08 -1.83728e-08 5.05615e-09 -8.66421e-09 -2.41915e-08 1.18126e-09 -5.37086e-08 1.09319e-08 -8.32456e-08 2.05247e-08 -1.13377e-07 2.96869e-08 -1.44146e-07 3.85689e-08 -1.74815e-07 4.71474e-08 -2.05051e-07 5.55255e-08 -2.33802e-07 6.41212e-08 -2.60256e-07 7.3116e-08 -2.84581e-07 8.24233e-08 -3.06084e-07 9.1744e-08 -3.23707e-07 1.00466e-07 -3.35841e-07 1.07359e-07 -3.39923e-07 1.08346e-07 -3.26345e-07 8.03411e-08 -2.57869e-07 8.66246e-09 -2.30265e-07 -2.72549e-08 -4.06687e-07 -2.72592e-08 -5.24355e-07 -2.18188e-08 -5.88163e-07 -6.07305e-07 -1.08336e-07 6.21943e-08 -1.09315e-07 6.53948e-08 -1.1204e-07 7.01379e-08 -1.1665e-07 7.54115e-08 -1.22611e-07 8.06215e-08 -1.29838e-07 8.63774e-08 -1.38251e-07 9.29601e-08 -1.47824e-07 1.00611e-07 -1.585e-07 1.0942e-07 -1.70073e-07 1.19293e-07 -1.81871e-07 1.30024e-07 -1.92311e-07 1.43775e-07 -1.97596e-07 1.75674e-07 -1.31504e-07 2.2649e-07 -6.19492e-08 1.32425e-07 -4.61888e-08 8.34058e-08 -3.77638e-08 5.3472e-08 -2.90723e-08 2.49748e-08 -1.94945e-08 -4.52185e-09 -9.25253e-09 -3.44335e-08 1.27083e-09 -6.42319e-08 1.19407e-08 -9.39154e-08 2.20327e-08 -1.23469e-07 3.12818e-08 -1.53395e-07 4.02187e-08 -1.83752e-07 4.8237e-08 -2.13069e-07 5.59732e-08 -2.41538e-07 6.37374e-08 -2.6802e-07 7.13892e-08 -2.92233e-07 7.86635e-08 -3.13358e-07 8.52527e-08 -3.30297e-07 9.08382e-08 -3.41427e-07 9.51266e-08 -3.44212e-07 9.91819e-08 -3.30399e-07 1.11602e-07 -2.70289e-07 8.91299e-08 -2.07795e-07 1.97003e-08 -3.37257e-07 9.58712e-10 -5.05612e-07 -5.39527e-09 -5.81809e-07 -6.12701e-07 -1.02728e-07 5.73385e-08 -1.01976e-07 6.46427e-08 -1.04122e-07 7.22843e-08 -1.0718e-07 7.84694e-08 -1.11164e-07 8.46056e-08 -1.15736e-07 9.09487e-08 -1.21064e-07 9.82885e-08 -1.27306e-07 1.06854e-07 -1.34725e-07 1.16838e-07 -1.43591e-07 1.28159e-07 -1.54123e-07 1.40556e-07 -1.69179e-07 1.58831e-07 -1.71053e-07 1.77549e-07 -1.08317e-07 1.63756e-07 -7.18518e-08 9.59601e-08 -5.49052e-08 6.64591e-08 -4.17588e-08 4.03257e-08 -3.00053e-08 1.32213e-08 -1.80853e-08 -1.64419e-08 -6.00492e-09 -4.65139e-08 5.72954e-09 -7.59664e-08 1.68957e-08 -1.05082e-07 2.72854e-08 -1.33859e-07 3.61305e-08 -1.6224e-07 4.29056e-08 -1.90527e-07 4.91428e-08 -2.19306e-07 5.49606e-08 -2.47356e-07 6.06904e-08 -2.7375e-07 6.59384e-08 -2.97481e-07 7.03546e-08 -3.17775e-07 7.37911e-08 -3.33733e-07 7.64019e-08 -3.44038e-07 7.89408e-08 -3.46751e-07 8.55116e-08 -3.36971e-07 1.10467e-07 -2.95247e-07 1.13194e-07 -2.10525e-07 5.40702e-08 -2.78134e-07 2.65958e-08 -4.78138e-07 1.12633e-08 -5.66477e-07 -6.01438e-07 -1.03799e-07 5.47478e-08 -9.94432e-08 6.02869e-08 -9.67451e-08 6.95862e-08 -9.63435e-08 7.80676e-08 -9.77018e-08 8.59636e-08 -9.89254e-08 9.21721e-08 -1.00136e-07 9.94986e-08 -1.00967e-07 1.07685e-07 -1.01684e-07 1.17555e-07 -1.02261e-07 1.28737e-07 -1.01867e-07 1.40161e-07 -9.77769e-08 1.54741e-07 -9.90448e-08 1.78816e-07 -6.70656e-08 1.31775e-07 -5.70863e-08 8.59807e-08 -4.65089e-08 5.58817e-08 -3.49716e-08 2.87884e-08 -2.25304e-08 7.79946e-10 -8.88854e-09 -3.0084e-08 4.3471e-09 -5.97499e-08 1.67737e-08 -8.83933e-08 2.82516e-08 -1.1656e-07 3.83479e-08 -1.43955e-07 4.60258e-08 -1.69918e-07 5.07169e-08 -1.95218e-07 5.36621e-08 -2.22251e-07 5.67092e-08 -2.50403e-07 5.99171e-08 -2.76958e-07 6.24533e-08 -3.00017e-07 6.38893e-08 -3.19211e-07 6.42691e-08 -3.34113e-07 6.40463e-08 -3.43815e-07 6.41966e-08 -3.46901e-07 6.82527e-08 -3.41027e-07 8.93763e-08 -3.1637e-07 1.07417e-07 -2.28562e-07 7.89855e-08 -2.49698e-07 4.93198e-08 -4.48471e-07 2.50109e-08 -5.42168e-07 -5.76427e-07 -1.11011e-07 4.77888e-08 -1.06039e-07 5.53152e-08 -1.00645e-07 6.41921e-08 -9.63467e-08 7.37687e-08 -9.22241e-08 8.18407e-08 -8.93961e-08 8.93439e-08 -8.70062e-08 9.71086e-08 -8.46019e-08 1.05281e-07 -8.31291e-08 1.16082e-07 -8.32357e-08 1.28843e-07 -8.57714e-08 1.42697e-07 -9.24552e-08 1.61425e-07 -8.62595e-08 1.7262e-07 -6.90694e-08 1.14584e-07 -5.47922e-08 7.17035e-08 -4.11905e-08 4.22801e-08 -2.61199e-08 1.37178e-08 -9.23609e-09 -1.6104e-08 6.45093e-09 -4.57714e-08 2.03342e-08 -7.36333e-08 3.25111e-08 -1.0057e-07 4.36091e-08 -1.27658e-07 5.38491e-08 -1.54195e-07 6.2195e-08 -1.78263e-07 6.51377e-08 -1.98161e-07 6.22325e-08 -2.19346e-07 6.28535e-08 -2.51024e-07 6.40798e-08 -2.78184e-07 6.39958e-08 -2.99933e-07 6.25688e-08 -3.17784e-07 6.00669e-08 -3.31611e-07 5.71217e-08 -3.4087e-07 5.47882e-08 -3.44568e-07 5.5103e-08 -3.41342e-07 6.25001e-08 -3.23767e-07 8.94944e-08 -2.55558e-07 8.59325e-08 -2.46143e-07 6.2456e-08 -4.25e-07 3.35819e-08 -5.13295e-07 -5.42845e-07 -1.23946e-07 4.17362e-08 -1.18546e-07 4.99149e-08 -1.12968e-07 5.86139e-08 -1.06788e-07 6.75885e-08 -9.94585e-08 7.45109e-08 -9.17126e-08 8.15979e-08 -8.48079e-08 9.02038e-08 -7.94261e-08 9.98988e-08 -7.61899e-08 1.12846e-07 -7.6417e-08 1.2907e-07 -8.51769e-08 1.51457e-07 -1.04584e-07 1.80831e-07 -9.21402e-08 1.60176e-07 -6.81423e-08 9.05866e-08 -4.87877e-08 5.23491e-08 -2.91237e-08 2.26162e-08 -7.58566e-09 -7.82037e-09 1.23391e-08 -3.60292e-08 2.86669e-08 -6.20994e-08 4.10127e-08 -8.59793e-08 5.01264e-08 -1.09684e-07 5.82322e-08 -1.35763e-07 6.70943e-08 -1.63057e-07 7.56036e-08 -1.86772e-07 8.16167e-08 -2.04174e-07 7.94223e-08 -2.17152e-07 7.59936e-08 -2.47596e-07 7.39141e-08 -2.76105e-07 7.08669e-08 -2.96886e-07 6.64402e-08 -3.13357e-07 6.10604e-08 -3.26231e-07 5.54175e-08 -3.35227e-07 5.05139e-08 -3.39664e-07 4.76544e-08 -3.38482e-07 5.00555e-08 -3.26169e-07 7.5664e-08 -2.81165e-07 8.96186e-08 -2.60098e-07 6.98517e-08 -4.05234e-07 3.86348e-08 -4.82079e-07 -5.0421e-07 -1.40154e-07 3.653e-08 -1.35166e-07 4.4927e-08 -1.30185e-07 5.36333e-08 -1.24284e-07 6.16872e-08 -1.17855e-07 6.80814e-08 -1.09163e-07 7.29066e-08 -9.81707e-08 7.9211e-08 -8.80591e-08 8.9787e-08 -7.85747e-08 1.03362e-07 -6.8716e-08 1.19212e-07 -5.44126e-08 1.37153e-07 -7.10484e-08 1.97467e-07 -4.74865e-08 1.36614e-07 -2.72824e-08 7.03825e-08 -8.77292e-09 3.38396e-08 1.04287e-08 3.41448e-09 2.88738e-08 -2.62657e-08 4.57974e-08 -5.29529e-08 5.92004e-08 -7.55024e-08 6.77753e-08 -9.45542e-08 7.06445e-08 -1.12553e-07 7.33682e-08 -1.38487e-07 8.03975e-08 -1.70086e-07 8.92769e-08 -1.95652e-07 9.6556e-08 -2.11453e-07 9.85562e-08 -2.19153e-07 8.9132e-08 -2.38172e-07 8.41133e-08 -2.71086e-07 7.89252e-08 -2.91698e-07 7.207e-08 -3.06502e-07 6.40098e-08 -3.1817e-07 5.55247e-08 -3.26742e-07 4.75865e-08 -3.31726e-07 4.13603e-08 -3.32256e-07 4.01482e-08 -3.24958e-07 5.99559e-08 -3.00976e-07 8.78691e-08 -2.88014e-07 7.16626e-08 -3.89028e-07 4.06593e-08 -4.51074e-07 -4.63551e-07 -1.62847e-07 3.30096e-08 -1.60168e-07 4.22471e-08 -1.58963e-07 5.24288e-08 -1.58193e-07 6.09168e-08 -1.55148e-07 6.50362e-08 -1.47819e-07 6.55777e-08 -1.38147e-07 6.95389e-08 -1.30885e-07 8.25251e-08 -1.27496e-07 9.99727e-08 -1.22546e-07 1.14262e-07 -1.06903e-07 1.21509e-07 -4.75555e-08 1.3812e-07 -1.49894e-09 9.05579e-08 1.85455e-08 5.03385e-08 3.27815e-08 1.96037e-08 4.54476e-08 -9.2516e-09 5.78226e-08 -3.86408e-08 7.09083e-08 -6.60385e-08 8.18035e-08 -8.63976e-08 9.01999e-08 -1.02951e-07 8.53671e-08 -1.0772e-07 9.05964e-08 -1.43716e-07 1.02555e-07 -1.82045e-07 1.09869e-07 -2.02966e-07 1.15387e-07 -2.16972e-07 1.17723e-07 -2.21489e-07 1.08375e-07 -2.28823e-07 9.60846e-08 -2.58796e-07 8.71215e-08 -2.82734e-07 7.80185e-08 -2.97399e-07 6.73306e-08 -3.07483e-07 5.57505e-08 -3.15162e-07 4.42054e-08 -3.2018e-07 3.37957e-08 -3.21846e-07 2.77875e-08 -3.1895e-07 3.71733e-08 -3.10362e-07 8.59716e-08 -3.36812e-07 6.3529e-08 -3.66585e-07 3.49634e-08 -4.2251e-07 -4.28588e-07 -1.896e-07 3.06932e-08 -1.87813e-07 4.04601e-08 -1.89116e-07 5.37314e-08 -1.95857e-07 6.76577e-08 -2.05642e-07 7.48212e-08 -2.05612e-07 6.55476e-08 -1.98448e-07 6.23745e-08 -1.93964e-07 7.80414e-08 -2.00749e-07 1.06757e-07 -2.10168e-07 1.2368e-07 -2.01524e-07 1.12865e-07 -1.44216e-07 8.08111e-08 -8.96791e-08 3.60208e-08 -3.9006e-08 -3.3453e-10 -3.50619e-09 -1.5896e-08 2.17675e-08 -3.45253e-08 2.94753e-08 -4.63486e-08 3.90963e-08 -7.56595e-08 5.11896e-08 -9.84906e-08 6.33087e-08 -1.15069e-07 8.56749e-08 -1.30087e-07 1.07972e-07 -1.66014e-07 1.19403e-07 -1.93477e-07 1.25407e-07 -2.08971e-07 1.24022e-07 -2.15587e-07 1.26729e-07 -2.24196e-07 1.23992e-07 -2.26086e-07 1.07845e-07 -2.42649e-07 9.63583e-08 -2.71248e-07 8.52749e-08 -2.86316e-07 7.2708e-08 -2.94916e-07 5.84556e-08 -3.00909e-07 4.35275e-08 -3.05252e-07 2.90038e-08 -3.07322e-07 1.69834e-08 -3.06929e-07 1.05348e-08 -3.03914e-07 4.19527e-08 -3.68228e-07 3.84158e-08 -3.63047e-07 1.87458e-08 -4.02839e-07 -4.09842e-07 -2.242e-07 3.12668e-08 -2.23335e-07 3.95957e-08 -2.2282e-07 5.32164e-08 -2.26606e-07 7.14428e-08 -2.34318e-07 8.2534e-08 -2.5493e-07 8.61604e-08 -2.89325e-07 9.67691e-08 -3.23552e-07 1.12269e-07 -3.40738e-07 1.23944e-07 -3.34746e-07 1.17689e-07 -3.15615e-07 9.37354e-08 -2.93436e-07 5.86329e-08 -2.7589e-07 1.84762e-08 -2.52825e-07 -2.33987e-08 -2.09776e-07 -5.89437e-08 -1.61167e-07 -8.31334e-08 -9.93344e-08 -1.08181e-07 -5.42767e-08 -1.20716e-07 -1.58267e-08 -1.3694e-07 3.10003e-08 -1.61896e-07 7.78549e-08 -1.76941e-07 1.11037e-07 -1.99196e-07 1.28781e-07 -2.1122e-07 1.34771e-07 -2.14961e-07 1.40088e-07 -2.20905e-07 1.40741e-07 -2.24849e-07 1.41442e-07 -2.26787e-07 1.34312e-07 -2.3552e-07 1.15529e-07 -2.52466e-07 9.90836e-08 -2.6987e-07 8.48917e-08 -2.80724e-07 7.00346e-08 -2.86052e-07 5.44981e-08 -2.89715e-07 3.95774e-08 -2.92402e-07 2.72413e-08 -2.94593e-07 2.05591e-08 -2.97231e-07 4.87664e-09 -3.52547e-07 1.20842e-08 -3.70254e-07 3.14358e-09 -3.93899e-07 -4.06698e-07 -2.64355e-07 3.92879e-08 -2.72965e-07 4.82049e-08 -2.80491e-07 6.07429e-08 -2.87094e-07 7.80444e-08 -2.9151e-07 8.69491e-08 -3.16657e-07 1.11306e-07 -3.37009e-07 1.1712e-07 -3.40291e-07 1.1555e-07 -3.14673e-07 9.83263e-08 -2.77281e-07 8.02959e-08 -2.31202e-07 4.76562e-08 -1.86833e-07 1.4264e-08 -1.50263e-07 -1.80935e-08 -1.23344e-07 -5.03183e-08 -1.01371e-07 -8.09158e-08 -7.52024e-08 -1.09302e-07 -4.89162e-08 -1.34466e-07 -1.42855e-08 -1.55347e-07 2.28924e-08 -1.74117e-07 5.27505e-08 -1.91755e-07 8.20827e-08 -2.06274e-07 1.00387e-07 -2.17501e-07 1.13567e-07 -2.244e-07 1.26451e-07 -2.27845e-07 1.3569e-07 -2.30143e-07 1.43169e-07 -2.32329e-07 1.4999e-07 -2.33608e-07 1.49674e-07 -2.35205e-07 1.39681e-07 -2.42473e-07 1.24332e-07 -2.54521e-07 1.08889e-07 -2.6528e-07 9.51801e-08 -2.72343e-07 8.1639e-08 -2.76174e-07 6.93574e-08 -2.8012e-07 6.01584e-08 -2.85394e-07 5.82626e-08 -2.95336e-07 3.30173e-08 -3.27301e-07 1.87632e-08 -3.55999e-07 5.06378e-09 -3.80199e-07 -4.01634e-07 -2.76895e-07 4.8989e-08 -2.8568e-07 5.699e-08 -2.924e-07 6.74622e-08 -2.93785e-07 7.94295e-08 -2.96187e-07 8.93526e-08 -2.80497e-07 9.56161e-08 -2.58017e-07 9.46403e-08 -2.28682e-07 8.62159e-08 -2.01808e-07 7.14532e-08 -1.71702e-07 5.01904e-08 -1.46827e-07 2.27807e-08 -1.24231e-07 -8.33196e-09 -1.01844e-07 -4.04801e-08 -7.92987e-08 -7.28633e-08 -5.60609e-08 -1.04154e-07 -3.18058e-08 -1.33557e-07 -6.17261e-09 -1.60099e-07 2.14167e-08 -1.82936e-07 4.9379e-08 -2.0208e-07 7.52554e-08 -2.17631e-07 9.82968e-08 -2.29315e-07 1.17928e-07 -2.37132e-07 1.34577e-07 -2.41049e-07 1.48475e-07 -2.41742e-07 1.59963e-07 -2.41632e-07 1.68216e-07 -2.40582e-07 1.73761e-07 -2.39153e-07 1.75858e-07 -2.37302e-07 1.71482e-07 -2.38096e-07 1.59776e-07 -2.42815e-07 1.45832e-07 -2.51335e-07 1.30996e-07 -2.57507e-07 1.17622e-07 -2.628e-07 1.04853e-07 -2.67351e-07 9.35869e-08 -2.74128e-07 8.3114e-08 -2.84862e-07 5.91029e-08 -3.0329e-07 3.63803e-08 -3.33276e-07 1.53223e-08 -3.59141e-07 -3.86312e-07 -2.58501e-07 5.50932e-08 -2.62457e-07 6.09459e-08 -2.62576e-07 6.75803e-08 -2.56998e-07 7.38514e-08 -2.45711e-07 7.80665e-08 -2.28192e-07 7.80962e-08 -2.06621e-07 7.30697e-08 -1.83724e-07 6.3319e-08 -1.59888e-07 4.76179e-08 -1.36972e-07 2.72741e-08 -1.16041e-07 1.84944e-09 -9.61837e-08 -2.81891e-08 -7.56928e-08 -6.0971e-08 -5.38807e-08 -9.46754e-08 -3.02406e-08 -1.27794e-07 -4.68255e-09 -1.59115e-07 2.24828e-08 -1.87264e-07 5.07149e-08 -2.11168e-07 7.89807e-08 -2.30346e-07 1.06069e-07 -2.44719e-07 1.31146e-07 -2.54393e-07 1.53758e-07 -2.59745e-07 1.73809e-07 -2.611e-07 1.91153e-07 -2.59085e-07 2.04593e-07 -2.55073e-07 2.14025e-07 -2.50013e-07 2.18874e-07 -2.44002e-07 2.19525e-07 -2.37952e-07 2.15297e-07 -2.33869e-07 2.04797e-07 -2.32314e-07 1.89112e-07 -2.35651e-07 1.73497e-07 -2.41893e-07 1.56423e-07 -2.45726e-07 1.40068e-07 -2.50996e-07 1.23183e-07 -2.57243e-07 1.05425e-07 -2.67105e-07 8.37198e-08 -2.81585e-07 5.47e-08 -3.04257e-07 2.64418e-08 -3.30882e-07 -3.5987e-07 -2.21012e-07 5.64576e-08 -2.1992e-07 5.98541e-08 -2.15403e-07 6.30636e-08 -2.06892e-07 6.53403e-08 -1.94339e-07 6.55134e-08 -1.78654e-07 6.2411e-08 -1.61073e-07 5.54894e-08 -1.42268e-07 4.4514e-08 -1.23858e-07 2.92082e-08 -1.058e-07 9.21551e-09 -8.82319e-08 -1.57184e-08 -7.08987e-08 -4.55223e-08 -5.27929e-08 -7.90769e-08 -3.24277e-08 -1.1504e-07 -8.59779e-09 -1.51624e-07 1.90682e-08 -1.86781e-07 4.98697e-08 -2.18066e-07 8.24757e-08 -2.43774e-07 1.15348e-07 -2.63218e-07 1.47061e-07 -2.76432e-07 1.76546e-07 -2.83878e-07 2.03083e-07 -2.86281e-07 2.26252e-07 -2.84269e-07 2.45765e-07 -2.78598e-07 2.61395e-07 -2.70704e-07 2.71883e-07 -2.60501e-07 2.77466e-07 -2.49585e-07 2.78371e-07 -2.38858e-07 2.73863e-07 -2.2936e-07 2.63188e-07 -2.2164e-07 2.4404e-07 -2.16503e-07 2.20858e-07 -2.1871e-07 1.99917e-07 -2.24785e-07 1.77773e-07 -2.28852e-07 1.55347e-07 -2.34817e-07 1.31211e-07 -2.42969e-07 1.05073e-07 -2.55447e-07 7.3658e-08 -2.72841e-07 3.80223e-08 -2.95246e-07 -3.21847e-07 -1.72304e-07 5.32608e-08 -1.67008e-07 5.45577e-08 -1.59169e-07 5.5225e-08 -1.48666e-07 5.48371e-08 -1.36018e-07 5.28652e-08 -1.21382e-07 4.77756e-08 -1.05549e-07 3.96561e-08 -8.99262e-08 2.88917e-08 -7.42779e-08 1.35598e-08 -5.95849e-08 -5.47743e-09 -4.59708e-08 -2.93327e-08 -3.36261e-08 -5.78668e-08 -2.04516e-08 -9.22513e-08 -3.75163e-09 -1.3174e-07 1.93027e-08 -1.74678e-07 4.96154e-08 -2.17094e-07 8.55785e-08 -2.54029e-07 1.24439e-07 -2.82635e-07 1.63578e-07 -3.02358e-07 2.00981e-07 -3.13836e-07 2.35248e-07 -3.18145e-07 2.65418e-07 -3.16452e-07 2.91025e-07 -3.09875e-07 3.11941e-07 -2.99515e-07 3.27609e-07 -2.86372e-07 3.38403e-07 -2.71294e-07 3.44188e-07 -2.55369e-07 3.44519e-07 -2.39188e-07 3.39002e-07 -2.23844e-07 3.27656e-07 -2.10293e-07 3.10144e-07 -1.98991e-07 2.82213e-07 -1.90779e-07 2.49753e-07 -1.92324e-07 2.20035e-07 -1.99134e-07 1.89948e-07 -2.04729e-07 1.58641e-07 -2.11662e-07 1.24511e-07 -2.21318e-07 8.6745e-08 -2.35074e-07 4.50163e-08 -2.53517e-07 -2.76832e-07 -1.17874e-07 4.57113e-08 -1.08614e-07 4.52985e-08 -9.71241e-08 4.37349e-08 -8.36599e-08 4.1373e-08 -6.84315e-08 3.76369e-08 -5.22813e-08 3.16256e-08 -3.58664e-08 2.32412e-08 -1.89411e-08 1.19665e-08 -3.62711e-09 -1.7542e-09 9.31568e-09 -1.84202e-08 1.91904e-08 -3.92074e-08 2.64389e-08 -6.51155e-08 3.26664e-08 -9.84789e-08 4.2726e-08 -1.418e-07 6.39417e-08 -1.95894e-07 9.78404e-08 -2.50993e-07 1.40413e-07 -2.96601e-07 1.86401e-07 -3.28623e-07 2.31711e-07 -3.47669e-07 2.73835e-07 -3.55959e-07 3.11362e-07 -3.55672e-07 3.43535e-07 -3.48624e-07 3.69994e-07 -3.36335e-07 3.90585e-07 -3.20105e-07 4.05282e-07 -3.01068e-07 4.1422e-07 -2.80233e-07 4.17318e-07 -2.58467e-07 4.14919e-07 -2.36789e-07 4.06829e-07 -2.15754e-07 3.92799e-07 -1.96262e-07 3.72998e-07 -1.7919e-07 3.47489e-07 -1.6527e-07 3.10506e-07 -1.55341e-07 2.68402e-07 -1.5703e-07 2.284e-07 -1.64727e-07 1.88491e-07 -1.71753e-07 1.46443e-07 -1.79269e-07 1.00974e-07 -1.89605e-07 5.20033e-08 -2.04546e-07 -2.24828e-07 -6.19004e-08 3.31864e-08 -4.77561e-08 3.11542e-08 -3.137e-08 2.73487e-08 -1.3614e-08 2.36169e-08 5.48851e-09 1.85344e-08 2.53059e-08 1.18083e-08 4.4073e-08 4.47429e-09 6.19054e-08 -5.86593e-09 7.79856e-08 -1.78345e-08 9.22516e-08 -3.2686e-08 1.02729e-07 -4.96852e-08 1.10684e-07 -7.30704e-08 1.12352e-07 -1.00147e-07 1.14593e-07 -1.44041e-07 1.37144e-07 -2.18445e-07 1.78022e-07 -2.91871e-07 2.28499e-07 -3.47078e-07 2.80439e-07 -3.80563e-07 3.29147e-07 -3.96376e-07 3.72472e-07 -3.99283e-07 4.09568e-07 -3.92768e-07 4.40157e-07 -3.79214e-07 4.64217e-07 -3.60394e-07 4.81829e-07 -3.37716e-07 4.93105e-07 -3.12344e-07 4.98167e-07 -2.85295e-07 4.97196e-07 -2.57497e-07 4.90223e-07 -2.29816e-07 4.77508e-07 -2.03038e-07 4.59292e-07 -1.78047e-07 4.35415e-07 -1.55313e-07 4.05992e-07 -1.35846e-07 3.70833e-07 -1.20182e-07 3.23838e-07 -1.10035e-07 2.71563e-07 -1.12452e-07 2.20914e-07 -1.21104e-07 1.70254e-07 -1.28609e-07 1.16791e-07 -1.36141e-07 5.99456e-08 -1.47701e-07 -1.64882e-07 -4.2953e-09 1.5161e-08 1.66475e-08 1.02115e-08 3.69125e-08 7.08376e-09 5.61161e-08 4.41349e-09 7.45037e-08 1.46756e-10 9.19983e-08 -5.6863e-09 1.09295e-07 -1.28222e-08 1.25638e-07 -2.22088e-08 1.40318e-07 -3.25148e-08 1.52827e-07 -4.51946e-08 1.63806e-07 -6.06643e-08 1.86832e-07 -9.6097e-08 2.14311e-07 -1.27625e-07 2.18247e-07 -1.47977e-07 2.56815e-07 -2.57014e-07 3.10211e-07 -3.45267e-07 3.65558e-07 -4.02425e-07 4.17079e-07 -4.32084e-07 4.62171e-07 -4.41468e-07 5.00205e-07 -4.37318e-07 5.31252e-07 -4.23815e-07 5.55532e-07 -4.03493e-07 5.73269e-07 -3.78132e-07 5.8465e-07 -3.49097e-07 5.89814e-07 -3.17508e-07 5.88868e-07 -2.84349e-07 5.81913e-07 -2.50541e-07 5.69062e-07 -2.16965e-07 5.50483e-07 -1.84459e-07 5.26245e-07 -1.53809e-07 4.96801e-07 -1.25869e-07 4.62185e-07 -1.0123e-07 4.22452e-07 -8.04489e-08 3.7671e-07 -6.42926e-08 3.19456e-07 -5.51986e-08 2.56454e-07 -5.81023e-08 1.94058e-07 -6.6214e-08 1.31662e-07 -7.37454e-08 6.66183e-08 -8.26577e-08 -9.82632e-08 5.12974e-08 -4.12285e-09 6.77573e-08 -6.24843e-09 8.39616e-08 -9.12065e-09 9.98896e-08 -1.15145e-08 1.14345e-07 -1.43091e-08 1.26555e-07 -1.78961e-08 1.38395e-07 -2.46616e-08 1.48264e-07 -3.20783e-08 1.57931e-07 -4.21815e-08 1.81692e-07 -6.89556e-08 1.98554e-07 -7.75241e-08 2.10427e-07 -1.07971e-07 2.34184e-07 -1.51388e-07 3.10784e-07 -2.24578e-07 4.11484e-07 -3.57713e-07 4.88975e-07 -4.22758e-07 5.45345e-07 -4.58795e-07 5.88469e-07 -4.75208e-07 6.22454e-07 -4.75453e-07 6.49148e-07 -4.64012e-07 6.69378e-07 -4.44045e-07 6.83597e-07 -4.17713e-07 6.9205e-07 -3.86584e-07 6.9483e-07 -3.51877e-07 6.9195e-07 -3.14629e-07 6.83395e-07 -2.75795e-07 6.69159e-07 -2.36304e-07 6.49268e-07 -1.97074e-07 6.23813e-07 -1.59005e-07 5.92963e-07 -1.22959e-07 5.56847e-07 -8.97532e-08 5.15711e-07 -6.0094e-08 4.69711e-07 -3.44493e-08 4.18549e-07 -1.31303e-08 3.60431e-07 2.91933e-09 2.91547e-07 1.07812e-08 2.18109e-07 7.22416e-09 1.44674e-07 -3.09499e-10 7.22073e-08 -1.01906e-08 -2.60562e-08 7.75577e-08 -1.66738e-08 8.848e-08 -1.71707e-08 9.83124e-08 -1.8953e-08 1.0801e-07 -2.12118e-08 1.17317e-07 -2.3616e-08 1.24928e-07 -2.55069e-08 1.48365e-07 -4.80993e-08 1.62903e-07 -4.66166e-08 1.49276e-07 -2.85531e-08 6.98291e-08 1.04916e-08 2.06669e-08 -2.83636e-08 7.07117e-08 -1.5802e-07 2.42113e-07 -3.22794e-07 4.65549e-07 -4.48027e-07 6.05977e-07 -4.98144e-07 6.87188e-07 -5.03969e-07 7.35331e-07 -5.06938e-07 7.66032e-07 -5.05909e-07 7.8688e-07 -4.96301e-07 8.00958e-07 -4.7809e-07 8.09473e-07 -4.5256e-07 8.12938e-07 -4.21178e-07 8.11508e-07 -3.85154e-07 8.05135e-07 -3.45504e-07 7.93685e-07 -3.0318e-07 7.77017e-07 -2.59126e-07 7.55021e-07 -2.14308e-07 7.27654e-07 -1.69707e-07 6.94946e-07 -1.26297e-07 6.56997e-07 -8.50097e-08 6.13932e-07 -4.66877e-08 5.65869e-07 -1.20312e-08 5.12964e-07 1.84545e-08 4.55318e-07 4.45152e-08 3.92226e-07 6.60118e-08 3.2082e-07 8.21871e-08 2.4153e-07 8.65149e-08 1.59878e-07 8.13425e-08 7.88824e-08 7.08057e-08 5.28252e-08 7.34271e-08 -2.00535e-08 7.13984e-08 -1.51421e-08 6.22463e-08 -9.80085e-09 6.28417e-08 -2.18073e-08 8.1669e-08 -4.24433e-08 1.64428e-07 -1.08266e-07 2.67236e-07 -1.50907e-07 3.58293e-07 -1.37673e-07 2.98033e-07 3.17007e-08 2.47419e-07 6.11032e-08 3.38157e-07 -1.19103e-07 5.31899e-07 -3.51768e-07 7.1396e-07 -5.04854e-07 8.05748e-07 -5.39815e-07 8.48668e-07 -5.41064e-07 8.83338e-07 -5.38639e-07 9.09491e-07 -5.33091e-07 9.2626e-07 -5.22679e-07 9.3565e-07 -5.05691e-07 9.39325e-07 -4.81765e-07 9.38215e-07 -4.5145e-07 9.32661e-07 -4.15623e-07 9.22667e-07 -3.7516e-07 9.08082e-07 -3.30919e-07 8.88699e-07 -2.83796e-07 8.64319e-07 -2.34747e-07 8.34806e-07 -1.84795e-07 8.00112e-07 -1.35013e-07 7.60292e-07 -8.6476e-08 7.15485e-07 -4.0203e-08 6.65891e-07 2.907e-09 6.11735e-07 4.21247e-08 5.53265e-07 7.69241e-08 4.90709e-07 1.07071e-07 4.24145e-07 1.32576e-07 3.53195e-07 1.53138e-07 2.71747e-07 1.67963e-07 1.8375e-07 1.69339e-07 9.11905e-08 1.63365e-07 1.44016e-07 4.73418e-08 -1.13553e-08 2.63906e-08 5.80923e-09 -5.35573e-08 7.01479e-08 -8.24661e-08 7.10205e-09 -1.80921e-08 -1.06817e-07 8.38755e-08 -2.10235e-07 2.21715e-07 -2.88745e-07 3.52069e-07 -2.68023e-07 4.51839e-07 -6.80666e-08 5.8965e-07 -7.6713e-08 7.76689e-07 -3.06134e-07 9.25841e-07 -5.00925e-07 9.72708e-07 -5.51722e-07 9.94212e-07 -5.6132e-07 1.01495e-06 -5.61804e-07 1.03332e-06 -5.57005e-07 1.04707e-06 -5.46838e-07 1.05508e-06 -5.3069e-07 1.0575e-06 -5.08113e-07 1.05483e-06 -4.79092e-07 1.04744e-06 -4.44062e-07 1.03548e-06 -4.03667e-07 1.01893e-06 -3.58609e-07 9.97649e-07 -3.09638e-07 9.71449e-07 -2.57596e-07 9.40155e-07 -2.03452e-07 9.03667e-07 -1.48307e-07 8.62002e-07 -9.33482e-08 8.15302e-07 -3.97759e-08 7.63807e-07 1.12915e-08 7.07808e-07 5.89064e-08 6.47575e-07 1.02358e-07 5.83291e-07 1.41208e-07 5.14964e-07 1.75398e-07 4.42509e-07 2.0503e-07 3.65192e-07 2.30455e-07 2.8087e-07 2.52285e-07 1.88342e-07 2.61866e-07 9.45246e-08 2.57182e-07 2.38541e-07 2.88427e-08 -5.98695e-10 -4.4892e-08 7.95435e-08 -2.65922e-08 5.18494e-08 7.34197e-08 -9.29103e-08 1.56001e-07 -1.89398e-07 1.9717e-07 -2.51405e-07 2.14216e-07 -3.05792e-07 2.79506e-07 -3.33315e-07 5.17675e-07 -3.06235e-07 8.11212e-07 -3.70253e-07 1.00189e-06 -4.96812e-07 1.05579e-06 -5.54828e-07 1.07907e-06 -5.75002e-07 1.1003e-06 -5.82546e-07 1.11964e-06 -5.81146e-07 1.13563e-06 -5.72992e-07 1.14684e-06 -5.58053e-07 1.15244e-06 -5.36285e-07 1.15217e-06 -5.07848e-07 1.14619e-06 -4.73114e-07 1.13478e-06 -4.32649e-07 1.11817e-06 -3.87055e-07 1.09646e-06 -3.36902e-07 1.06962e-06 -2.82793e-07 1.0375e-06 -2.25477e-07 9.99976e-07 -1.6593e-07 9.5702e-07 -1.05351e-07 9.08762e-07 -4.50907e-08 8.55511e-07 1.34749e-08 7.97714e-07 6.90883e-08 7.35864e-07 1.20756e-07 6.7038e-07 1.67842e-07 6.01507e-07 2.10081e-07 5.29327e-07 2.47578e-07 4.53712e-07 2.80645e-07 3.74269e-07 3.09899e-07 2.89851e-07 3.36704e-07 1.97554e-07 3.54164e-07 9.9101e-08 3.55634e-07 3.37642e-07 -9.34844e-09 -2.93638e-09 9.94363e-08 -2.92429e-08 2.73683e-07 -1.22396e-07 3.7983e-07 -1.99057e-07 4.43596e-07 -2.53164e-07 4.92999e-07 -3.00808e-07 5.38476e-07 -3.51269e-07 6.15814e-07 -4.10653e-07 7.84805e-07 -4.75226e-07 9.58753e-07 -5.44202e-07 1.04386e-06 -5.81919e-07 1.09178e-06 -6.02748e-07 1.12941e-06 -6.12626e-07 1.16104e-06 -6.14185e-07 1.18758e-06 -6.07677e-07 1.20773e-06 -5.9315e-07 1.22074e-06 -5.71056e-07 1.22626e-06 -5.41807e-07 1.22437e-06 -5.05964e-07 1.21551e-06 -4.64252e-07 1.20027e-06 -4.17406e-07 1.17918e-06 -3.65973e-07 1.15258e-06 -3.10294e-07 1.12048e-06 -2.50693e-07 1.08273e-06 -1.87732e-07 1.03921e-06 -1.22411e-07 9.89959e-07 -5.60984e-08 9.35269e-07 9.59878e-09 8.75705e-07 7.30383e-08 8.12054e-07 1.32739e-07 7.45132e-07 1.87678e-07 6.7557e-07 2.37404e-07 6.03707e-07 2.81944e-07 5.29606e-07 3.21679e-07 4.53091e-07 3.5716e-07 3.73679e-07 3.8931e-07 2.9124e-07 4.19143e-07 2.00712e-07 4.44691e-07 1.01483e-07 4.54863e-07 4.39125e-07 1.82604e-07 -1.15117e-07 3.56257e-07 -2.02895e-07 4.95342e-07 -2.6148e-07 5.91388e-07 -2.95104e-07 6.60562e-07 -3.22339e-07 7.26653e-07 -3.66899e-07 7.99367e-07 -4.23983e-07 8.81072e-07 -4.92359e-07 9.70214e-07 -5.64368e-07 1.03824e-06 -6.12227e-07 1.09535e-06 -6.3903e-07 1.14499e-06 -6.52383e-07 1.18825e-06 -6.55891e-07 1.22424e-06 -6.50171e-07 1.25219e-06 -6.35626e-07 1.27168e-06 -6.12648e-07 1.28245e-06 -5.81827e-07 1.28452e-06 -5.43877e-07 1.27822e-06 -4.99661e-07 1.2642e-06 -4.50227e-07 1.24336e-06 -3.96573e-07 1.21657e-06 -3.39179e-07 1.18425e-06 -2.77979e-07 1.14634e-06 -2.12776e-07 1.10244e-06 -1.43837e-07 1.05238e-06 -7.23482e-08 9.96393e-07 -1.12177e-10 9.34965e-07 7.10267e-08 8.69059e-07 1.38944e-07 8.00072e-07 2.01726e-07 7.29285e-07 2.58466e-07 6.57515e-07 3.09173e-07 5.85057e-07 3.54402e-07 5.11781e-07 3.94955e-07 4.37208e-07 4.31733e-07 3.60764e-07 4.65755e-07 2.81858e-07 4.9805e-07 1.95014e-07 5.31535e-07 9.92771e-08 5.506e-07 5.38402e-07 4.09421e-07 -2.42702e-07 5.02321e-07 -2.95795e-07 5.66823e-07 -3.25982e-07 6.36264e-07 -3.64545e-07 7.18919e-07 -4.04993e-07 8.11681e-07 -4.59662e-07 9.11352e-07 -5.23653e-07 1.006e-06 -5.87009e-07 1.07967e-06 -6.38036e-07 1.13724e-06 -6.69794e-07 1.1864e-06 -6.88191e-07 1.22935e-06 -6.95339e-07 1.26546e-06 -6.92002e-07 1.29401e-06 -6.78712e-07 1.31442e-06 -6.56037e-07 1.32638e-06 -6.24614e-07 1.32975e-06 -5.85196e-07 1.32448e-06 -5.38604e-07 1.31063e-06 -4.8581e-07 1.28881e-06 -4.28412e-07 1.26031e-06 -3.68074e-07 1.22638e-06 -3.0525e-07 1.18728e-06 -2.38878e-07 1.14254e-06 -1.68036e-07 1.09097e-06 -9.2264e-08 1.03222e-06 -1.35974e-08 9.67875e-07 6.42297e-08 8.98525e-07 1.40376e-07 8.25788e-07 2.11682e-07 7.52284e-07 2.7523e-07 6.79805e-07 3.30945e-07 6.09e-07 3.79978e-07 5.39656e-07 4.23745e-07 4.71059e-07 4.63553e-07 4.02231e-07 5.0056e-07 3.32064e-07 5.35922e-07 2.59063e-07 5.71051e-07 1.79424e-07 6.11173e-07 9.15347e-08 6.38488e-07 6.29937e-07 4.24026e-07 -3.07886e-07 4.82779e-07 -3.54548e-07 5.57356e-07 -4.00558e-07 6.43472e-07 -4.50662e-07 7.53488e-07 -5.15009e-07 8.74248e-07 -5.80421e-07 9.87156e-07 -6.36561e-07 1.08132e-06 -6.81175e-07 1.15337e-06 -7.10083e-07 1.21069e-06 -7.27116e-07 1.257e-06 -7.34501e-07 1.29385e-06 -7.32188e-07 1.32186e-06 -7.20012e-07 1.34135e-06 -6.98199e-07 1.35251e-06 -6.67203e-07 1.3555e-06 -6.27599e-07 1.35032e-06 -5.80021e-07 1.33658e-06 -5.2486e-07 1.31384e-06 -4.6307e-07 1.2829e-06 -3.97477e-07 1.24681e-06 -3.31983e-07 1.20649e-06 -2.64924e-07 1.16024e-06 -1.92634e-07 1.10656e-06 -1.14352e-07 1.0426e-06 -2.83033e-08 9.69416e-07 5.95851e-08 8.88753e-07 1.44893e-07 8.07133e-07 2.21996e-07 7.28155e-07 2.90659e-07 6.5405e-07 3.49335e-07 5.85618e-07 3.99377e-07 5.22158e-07 4.43438e-07 4.62112e-07 4.83791e-07 4.038e-07 5.21864e-07 3.45658e-07 5.58702e-07 2.86183e-07 5.95397e-07 2.23622e-07 6.33612e-07 1.55037e-07 6.79759e-07 7.93413e-08 7.14184e-07 7.09278e-07 4.19968e-07 -3.71638e-07 4.96934e-07 -4.31514e-07 5.97933e-07 -5.01557e-07 7.23097e-07 -5.75826e-07 8.53092e-07 -6.45004e-07 9.70665e-07 -6.97995e-07 1.06813e-06 -7.34028e-07 1.14488e-06 -7.5792e-07 1.20669e-06 -7.71894e-07 1.25688e-06 -7.77304e-07 1.29602e-06 -7.73642e-07 1.32456e-06 -7.60727e-07 1.34325e-06 -7.38702e-07 1.35299e-06 -7.07947e-07 1.3547e-06 -6.68911e-07 1.34899e-06 -6.21883e-07 1.33628e-06 -5.6731e-07 1.31502e-06 -5.03609e-07 1.2828e-06 -4.30843e-07 1.247e-06 -3.61675e-07 1.21268e-06 -2.97662e-07 1.17383e-06 -2.26079e-07 1.12426e-06 -1.43067e-07 1.05428e-06 -4.4373e-08 9.54129e-07 7.18518e-08 8.47257e-07 1.66458e-07 7.19017e-07 2.73133e-07 6.17529e-07 3.23485e-07 5.4527e-07 3.62917e-07 4.87214e-07 4.07391e-07 4.37833e-07 4.48758e-07 3.93764e-07 4.87507e-07 3.52216e-07 5.2534e-07 3.1115e-07 5.62931e-07 2.69042e-07 6.00809e-07 2.24631e-07 6.39808e-07 1.76627e-07 6.81617e-07 1.22713e-07 7.33672e-07 6.32016e-08 7.73695e-07 7.72479e-07 4.70773e-07 -4.60506e-07 5.88578e-07 -5.49319e-07 7.23373e-07 -6.36351e-07 8.54167e-07 -7.0662e-07 9.64545e-07 -7.55383e-07 1.05329e-06 -7.8674e-07 1.12664e-06 -8.07376e-07 1.18799e-06 -8.19272e-07 1.23846e-06 -8.22359e-07 1.27739e-06 -8.16234e-07 1.30474e-06 -8.00997e-07 1.32105e-06 -7.77041e-07 1.3274e-06 -7.45051e-07 1.32522e-06 -7.05758e-07 1.31577e-06 -6.59465e-07 1.29979e-06 -6.05903e-07 1.27722e-06 -5.44739e-07 1.24711e-06 -4.73503e-07 1.218e-06 -4.01734e-07 1.19519e-06 -3.38856e-07 1.17265e-06 -2.75123e-07 1.14868e-06 -2.02113e-07 1.11489e-06 -1.09274e-07 1.0095e-06 6.1017e-08 8.19531e-07 2.61815e-07 6.32395e-07 3.53595e-07 4.23911e-07 4.81616e-07 3.42413e-07 4.04982e-07 3.04304e-07 4.01027e-07 2.81155e-07 4.30541e-07 2.63126e-07 4.66786e-07 2.46023e-07 5.0461e-07 2.27703e-07 5.43659e-07 2.06921e-07 5.83713e-07 1.82864e-07 6.24866e-07 1.54956e-07 6.67716e-07 1.2276e-07 7.13813e-07 8.44403e-08 7.71992e-07 4.27974e-08 8.15338e-07 8.15277e-07 5.87323e-07 -5.90142e-07 7.24749e-07 -6.86745e-07 8.49137e-07 -7.60739e-07 9.4926e-07 -8.06743e-07 1.03098e-06 -8.37106e-07 1.10101e-06 -8.56764e-07 1.16085e-06 -8.67221e-07 1.20964e-06 -8.68059e-07 1.24641e-06 -8.59128e-07 1.27079e-06 -8.40618e-07 1.28305e-06 -8.13253e-07 1.2841e-06 -7.78099e-07 1.27537e-06 -7.3632e-07 1.25837e-06 -6.88756e-07 1.23274e-06 -6.33835e-07 1.19857e-06 -5.71731e-07 1.15783e-06 -5.04001e-07 1.12161e-06 -4.3728e-07 1.09689e-06 -3.77017e-07 1.08008e-06 -3.22041e-07 1.06849e-06 -2.63534e-07 1.05838e-06 -1.92003e-07 1.03953e-06 -9.04224e-08 9.65716e-07 1.34829e-07 7.47609e-07 4.79923e-07 4.39596e-07 6.61606e-07 2.10719e-07 7.10492e-07 1.63753e-07 4.51946e-07 1.41185e-07 4.23594e-07 1.31703e-07 4.40023e-07 1.2813e-07 4.7036e-07 1.258e-07 5.0694e-07 1.22107e-07 5.47353e-07 1.15604e-07 5.90215e-07 1.05544e-07 6.34927e-07 9.15869e-08 6.81672e-07 7.38423e-08 7.31557e-07 5.00518e-08 7.95782e-07 2.46986e-08 8.40692e-07 8.39975e-07 7.13444e-07 -7.27703e-07 8.32044e-07 -8.05345e-07 9.24823e-07 -8.53518e-07 1.00238e-06 -8.84302e-07 1.0698e-06 -9.0452e-07 1.1275e-06 -9.14467e-07 1.17399e-06 -9.13707e-07 1.20805e-06 -9.02127e-07 1.22908e-06 -8.80153e-07 1.23719e-06 -8.48729e-07 1.23313e-06 -8.09195e-07 1.21802e-06 -7.62982e-07 1.19259e-06 -7.1089e-07 1.15499e-06 -6.51158e-07 1.10281e-06 -5.81655e-07 1.04233e-06 -5.11251e-07 9.83931e-07 -4.45605e-07 9.36921e-07 -3.90271e-07 9.04593e-07 -3.44688e-07 8.82638e-07 -3.00086e-07 8.68605e-07 -2.49501e-07 8.61336e-07 -1.84734e-07 8.47029e-07 -7.61151e-08 7.6754e-07 2.14319e-07 5.59389e-07 6.88072e-07 2.92462e-07 9.28541e-07 1.14704e-07 8.88261e-07 8.00651e-08 4.86587e-07 5.9557e-08 4.44102e-07 5.03307e-08 4.49249e-07 4.80751e-08 4.72616e-07 4.8867e-08 5.06148e-07 5.00573e-08 5.46163e-07 5.00504e-08 5.90222e-07 4.80004e-08 6.36978e-07 4.35816e-08 6.8609e-07 3.66987e-08 7.3844e-07 2.7022e-08 8.05458e-07 1.33357e-08 8.54379e-07 8.5331e-07 8.06911e-07 -8.41712e-07 8.9483e-07 -8.93264e-07 9.68365e-07 -9.27053e-07 1.03328e-06 -9.49213e-07 1.08858e-06 -9.59828e-07 1.13264e-06 -9.58526e-07 1.16417e-06 -9.45231e-07 1.18247e-06 -9.20434e-07 1.18753e-06 -8.85207e-07 1.17991e-06 -8.41108e-07 1.16057e-06 -7.89856e-07 1.12936e-06 -7.31772e-07 1.08222e-06 -6.63748e-07 1.01486e-06 -5.83799e-07 9.38791e-07 -5.0559e-07 8.64178e-07 -4.36637e-07 7.99493e-07 -3.80921e-07 7.49502e-07 -3.4028e-07 7.12066e-07 -3.07252e-07 6.8495e-07 -2.7297e-07 6.67255e-07 -2.31806e-07 6.54383e-07 -1.71862e-07 5.74632e-07 3.63548e-09 3.86389e-07 4.02561e-07 2.15131e-07 8.59327e-07 1.01837e-07 1.04183e-06 5.407e-08 9.36014e-07 3.86623e-08 5.0199e-07 2.34448e-08 4.59319e-07 1.39738e-08 4.58719e-07 9.73503e-09 4.76854e-07 8.73669e-09 5.07146e-07 9.29437e-09 5.45605e-07 1.02629e-08 5.89253e-07 1.10351e-08 6.36206e-07 1.14382e-08 6.85688e-07 1.09348e-08 7.38943e-07 7.7554e-09 8.08638e-07 3.24665e-09 8.58886e-07 8.56557e-07 8.55668e-07 -9.26749e-07 9.2689e-07 -9.64487e-07 9.89735e-07 -9.89898e-07 1.04307e-06 -1.00255e-06 1.08527e-06 -1.00202e-06 1.11506e-06 -9.88318e-07 1.1318e-06 -9.61966e-07 1.13535e-06 -9.23991e-07 1.1261e-06 -8.75958e-07 1.10481e-06 -8.19821e-07 1.0708e-06 -7.55837e-07 1.01821e-06 -6.7919e-07 9.43026e-07 -5.8856e-07 8.59558e-07 -5.00332e-07 7.78905e-07 -4.24936e-07 7.07748e-07 -3.65481e-07 6.5164e-07 -3.24813e-07 6.07645e-07 -2.96285e-07 5.71004e-07 -2.70611e-07 5.4277e-07 -2.44737e-07 5.19748e-07 -2.08784e-07 4.31827e-07 -8.39395e-08 1.90362e-07 2.45101e-07 -3.52132e-08 6.28139e-07 -9.5582e-08 9.19701e-07 -5.65059e-08 1.00276e-06 1.71032e-08 8.62408e-07 2.19882e-08 4.97111e-07 1.34062e-08 4.67901e-07 4.90951e-09 4.67216e-07 -1.3914e-09 4.83156e-07 -5.59236e-09 5.11347e-07 -8.15669e-09 5.48169e-07 -9.55055e-09 5.90646e-07 -9.93431e-09 6.36589e-07 -9.06457e-09 6.84817e-07 -8.30865e-09 7.38187e-07 -9.47529e-09 8.09804e-07 -9.00377e-09 8.58414e-07 8.47553e-07 8.7475e-07 -9.97678e-07 9.3731e-07 -1.02705e-06 9.90123e-07 -1.04271e-06 1.03166e-06 -1.04409e-06 1.06082e-06 -1.03118e-06 1.07714e-06 -1.00464e-06 1.08072e-06 -9.65544e-07 1.07193e-06 -9.15197e-07 1.05121e-06 -8.55234e-07 1.01765e-06 -7.86267e-07 9.64281e-07 -7.02467e-07 8.86009e-07 -6.00919e-07 7.99342e-07 -5.01892e-07 7.17534e-07 -4.18524e-07 6.46057e-07 -3.53459e-07 5.89939e-07 -3.09364e-07 5.44822e-07 -2.79695e-07 5.03811e-07 -2.55274e-07 4.67059e-07 -2.33858e-07 4.33505e-07 -2.11183e-07 3.80031e-07 -1.5531e-07 1.29139e-07 1.66951e-07 -1.63344e-07 5.37578e-07 -3.13013e-07 7.77802e-07 -2.89214e-07 8.95898e-07 -1.5954e-07 8.7308e-07 9.88527e-09 6.92978e-07 2.1505e-08 4.85492e-07 1.80188e-08 4.71386e-07 1.04285e-08 4.74806e-07 2.3988e-09 4.91186e-07 -4.82655e-09 5.18573e-07 -1.08414e-08 5.54185e-07 -1.56656e-08 5.95471e-07 -1.93169e-08 6.40241e-07 -2.10009e-08 6.86501e-07 -2.29888e-08 7.40175e-07 -2.82456e-08 8.1506e-07 -2.00614e-08 8.50229e-07 8.27492e-07 8.7719e-07 -1.06082e-06 9.30532e-07 -1.08039e-06 9.7257e-07 -1.08475e-06 1.0022e-06 -1.07372e-06 1.01904e-06 -1.04803e-06 1.02346e-06 -1.00906e-06 1.01633e-06 -9.58409e-07 9.98242e-07 -8.97112e-07 9.67981e-07 -8.24973e-07 9.17624e-07 -7.35909e-07 8.38994e-07 -6.23836e-07 7.49755e-07 -5.11681e-07 6.68228e-07 -4.20365e-07 5.98245e-07 -3.48541e-07 5.43914e-07 -2.99128e-07 4.99299e-07 -2.64748e-07 4.5563e-07 -2.36026e-07 4.11625e-07 -2.1127e-07 3.68674e-07 -1.90908e-07 3.17795e-07 -1.60303e-07 1.26696e-07 3.57887e-08 -2.07147e-07 5.00797e-07 -4.09059e-07 7.39497e-07 -4.52645e-07 8.21394e-07 -3.38166e-07 7.81422e-07 -1.34267e-07 6.69194e-07 2.41175e-08 5.34597e-07 3.12614e-08 4.78346e-07 2.74446e-08 4.75203e-07 1.93702e-08 4.8288e-07 9.96668e-09 5.00589e-07 9.70573e-10 5.27569e-07 -6.76077e-09 5.61916e-07 -1.30564e-08 6.01767e-07 -1.8213e-08 6.45397e-07 -2.25096e-08 6.90799e-07 -3.04339e-08 7.48099e-07 -3.27143e-08 8.17341e-07 -2.28362e-08 8.40351e-07 8.04657e-07 8.66555e-07 -1.11469e-06 9.09638e-07 -1.12347e-06 9.40671e-07 -1.11578e-06 9.59102e-07 -1.09215e-06 9.65206e-07 -1.05413e-06 9.6e-07 -1.00385e-06 9.44966e-07 -9.43375e-07 9.20332e-07 -8.72479e-07 8.76447e-07 -7.81087e-07 7.98048e-07 -6.5751e-07 7.01033e-07 -5.26821e-07 6.20106e-07 -4.30753e-07 5.54164e-07 -3.54423e-07 5.03315e-07 -2.97691e-07 4.59944e-07 -2.55757e-07 4.15772e-07 -2.20577e-07 3.68749e-07 -1.89003e-07 3.18718e-07 -1.61239e-07 2.61197e-07 -1.33387e-07 1.70932e-07 -7.00386e-08 -1.83687e-07 3.90405e-07 -4.29755e-07 7.46865e-07 -4.77734e-07 7.87474e-07 -3.59437e-07 7.03099e-07 -1.68841e-07 5.90823e-07 -1.24964e-08 5.12849e-07 3.54805e-08 4.86618e-07 3.50763e-08 4.7875e-07 2.90554e-08 4.81224e-07 2.00002e-08 4.91936e-07 9.85851e-09 5.1073e-07 4.65717e-10 5.36963e-07 -7.07129e-09 5.69453e-07 -1.23377e-08 6.07033e-07 -1.57245e-08 6.48784e-07 -2.0127e-08 6.95202e-07 -2.7433e-08 7.55405e-07 -3.13616e-08 8.2127e-07 -2.34768e-08 8.32465e-07 7.8118e-07 8.4422e-07 -1.15917e-06 8.77497e-07 -1.15675e-06 8.98815e-07 -1.1371e-06 9.08285e-07 -1.10162e-06 9.06766e-07 -1.05261e-06 8.95576e-07 -9.9266e-07 8.76225e-07 -9.24025e-07 8.42694e-07 -8.38948e-07 7.61724e-07 -7.00117e-07 6.49826e-07 -5.45613e-07 5.67251e-07 -4.44246e-07 5.0471e-07 -3.68212e-07 4.56624e-07 -3.06338e-07 4.1308e-07 -2.54146e-07 3.68621e-07 -2.11298e-07 3.22202e-07 -1.74158e-07 2.73196e-07 -1.39997e-07 2.18639e-07 -1.06682e-07 1.4295e-07 -5.76979e-08 -6.97217e-08 1.42632e-07 -4.04928e-07 7.25616e-07 -4.12261e-07 7.54194e-07 -2.5541e-07 6.30623e-07 -8.96519e-08 5.37345e-07 -4.73193e-09 5.05903e-07 2.00024e-08 4.88114e-07 2.53796e-08 4.8124e-07 2.22747e-08 4.81855e-07 1.48137e-08 4.88684e-07 4.87883e-09 5.01871e-07 -5.81402e-09 5.21423e-07 -1.56136e-08 5.46763e-07 -2.33096e-08 5.77149e-07 -2.81677e-08 6.11892e-07 -2.96807e-08 6.50297e-07 -2.93629e-08 6.94883e-07 -3.82965e-08 7.64338e-07 -3.50761e-08 8.18051e-07 -2.95583e-08 8.26946e-07 7.51622e-07 8.12391e-07 -1.19523e-06 8.37345e-07 -1.1817e-06 8.51272e-07 -1.15103e-06 8.55229e-07 -1.10558e-06 8.50763e-07 -1.04815e-06 8.39503e-07 -9.81401e-07 8.18287e-07 -9.02809e-07 7.64245e-07 -7.84906e-07 6.20212e-07 -5.56084e-07 5.16276e-07 -4.41677e-07 4.55378e-07 -3.83348e-07 4.01803e-07 -3.14638e-07 3.45697e-07 -2.50232e-07 2.96171e-07 -2.04621e-07 2.52426e-07 -1.67553e-07 2.0976e-07 -1.31493e-07 1.6365e-07 -9.38871e-08 1.03793e-07 -4.68253e-08 -6.25105e-09 5.2346e-08 -3.43747e-07 4.80129e-07 -3.39796e-07 7.21668e-07 -1.61552e-07 5.75951e-07 -5.32418e-08 5.22313e-07 -1.652e-08 5.00623e-07 -2.52454e-10 4.89636e-07 3.90429e-09 4.83957e-07 1.72894e-09 4.83416e-07 -4.44622e-09 4.88029e-07 -1.35913e-08 4.9783e-07 -2.46351e-08 5.12914e-07 -3.62494e-08 5.33038e-07 -4.7308e-08 5.57822e-07 -5.70282e-08 5.8687e-07 -6.50804e-08 6.19945e-07 -7.39197e-08 6.59137e-07 -8.78459e-08 7.08809e-07 -9.12201e-08 7.67712e-07 -6.99806e-08 7.96812e-07 -4.59059e-08 8.02872e-07 7.05716e-07 7.73468e-07 -1.22367e-06 7.91608e-07 -1.19984e-06 8.00326e-07 -1.15974e-06 8.01448e-07 -1.1067e-06 7.96565e-07 -1.04326e-06 7.83351e-07 -9.68186e-07 7.42622e-07 -8.6208e-07 5.84578e-07 -6.26861e-07 4.40661e-07 -4.12168e-07 3.88168e-07 -3.89184e-07 3.34195e-07 -3.29375e-07 2.64178e-07 -2.44621e-07 2.03209e-07 -1.89263e-07 1.61689e-07 -1.63101e-07 1.29314e-07 -1.35179e-07 9.80788e-08 -1.00257e-07 6.00462e-08 -5.5855e-08 -1.00563e-08 2.32771e-08 -2.21302e-07 2.63592e-07 -3.38214e-07 5.97038e-07 -1.48289e-07 5.31739e-07 -7.67665e-08 5.04431e-07 -4.79263e-08 4.93473e-07 -3.47329e-08 4.8743e-07 -2.93954e-08 4.84298e-07 -2.96528e-08 4.84214e-07 -3.40479e-08 4.8781e-07 -4.16187e-08 4.956e-07 -5.15462e-08 5.07758e-07 -6.28063e-08 5.24175e-07 -7.43632e-08 5.44595e-07 -8.52613e-08 5.68719e-07 -9.45292e-08 5.96138e-07 -1.0232e-07 6.27735e-07 -1.10064e-07 6.66882e-07 -1.2119e-07 7.19935e-07 -1.1236e-07 7.58881e-07 -8.65909e-08 7.71043e-07 -5.17764e-08 7.68057e-07 6.53939e-07 7.28099e-07 -1.24597e-06 7.41327e-07 -1.21307e-06 7.46989e-07 -1.16541e-06 7.4784e-07 -1.10755e-06 7.43751e-07 -1.03917e-06 7.1642e-07 -9.40854e-07 5.93906e-07 -7.39565e-07 4.4796e-07 -4.80915e-07 3.69029e-07 -3.33238e-07 2.88575e-07 -3.08731e-07 2.02861e-07 -2.43661e-07 1.39671e-07 -1.81432e-07 1.03235e-07 -1.52827e-07 7.48922e-08 -1.34758e-07 5.02037e-08 -1.10491e-07 2.73032e-08 -7.73564e-08 -6.04228e-09 -2.25093e-08 -1.24036e-07 1.41271e-07 -2.76343e-07 4.15899e-07 -1.72349e-07 4.93043e-07 -1.22356e-07 4.81747e-07 -9.66542e-08 4.78729e-07 -8.10921e-08 4.77911e-07 -7.23034e-08 4.78642e-07 -6.89904e-08 4.80985e-07 -7.03127e-08 4.85536e-07 -7.53671e-08 4.92865e-07 -8.32121e-08 5.03445e-07 -9.29473e-08 5.17493e-07 -1.03726e-07 5.34953e-07 -1.14733e-07 5.55604e-07 -1.25267e-07 5.79253e-07 -1.3608e-07 6.06951e-07 -1.48737e-07 6.40391e-07 -1.62282e-07 6.80427e-07 -1.57942e-07 7.15596e-07 -1.31416e-07 7.32354e-07 -9.68433e-08 7.3647e-07 -5.41565e-08 7.25371e-07 5.99782e-07 6.75126e-07 -1.26279e-06 6.83918e-07 -1.22186e-06 6.86911e-07 -1.1684e-06 6.85942e-07 -1.10658e-06 6.74984e-07 -1.02822e-06 5.82163e-07 -8.48033e-07 4.33784e-07 -5.91187e-07 3.33407e-07 -3.80541e-07 2.57411e-07 -2.57242e-07 1.63701e-07 -2.15021e-07 9.20399e-08 -1.72003e-07 5.89767e-08 -1.48368e-07 3.99195e-08 -1.33769e-07 2.30606e-08 -1.179e-07 8.83176e-09 -9.62619e-08 -4.93127e-09 -6.35937e-08 -5.59463e-08 2.8506e-08 -2.06246e-07 2.9157e-07 -2.23479e-07 4.33131e-07 -1.77426e-07 4.46991e-07 -1.49724e-07 4.54045e-07 -1.30426e-07 4.59432e-07 -1.17048e-07 4.64533e-07 -1.09221e-07 4.70813e-07 -1.0691e-07 4.78675e-07 -1.09024e-07 4.87651e-07 -1.1423e-07 4.98071e-07 -1.21614e-07 5.10829e-07 -1.30488e-07 5.26367e-07 -1.40172e-07 5.44637e-07 -1.49878e-07 5.6531e-07 -1.59184e-07 5.88559e-07 -1.7168e-07 6.19448e-07 -1.86488e-07 6.55199e-07 -1.89177e-07 6.83116e-07 -1.71238e-07 6.97658e-07 -1.38905e-07 7.00022e-07 -1.00612e-07 6.98176e-07 -5.42237e-08 6.78984e-07 5.45559e-07 6.12084e-07 -1.27284e-06 6.14507e-07 -1.22429e-06 6.10134e-07 -1.16402e-06 5.94675e-07 -1.09113e-06 5.43569e-07 -9.7711e-07 4.09046e-07 -7.1351e-07 2.87946e-07 -4.70086e-07 2.00595e-07 -2.93189e-07 1.3205e-07 -1.88698e-07 6.43426e-08 -1.47314e-07 2.88408e-08 -1.36501e-07 1.05446e-08 -1.30072e-07 -4.25116e-09 -1.18973e-07 -1.64353e-08 -1.05715e-07 -2.19339e-08 -9.07633e-08 -1.73304e-08 -6.81974e-08 -1.19086e-07 1.30263e-07 -2.19335e-07 3.91817e-07 -2.05538e-07 4.19334e-07 -1.8718e-07 4.28633e-07 -1.69522e-07 4.36387e-07 -1.53977e-07 4.43887e-07 -1.42031e-07 4.52587e-07 -1.35676e-07 4.64458e-07 -1.34945e-07 4.77944e-07 -1.38031e-07 4.90737e-07 -1.43103e-07 5.03142e-07 -1.49723e-07 5.17449e-07 -1.57814e-07 5.34457e-07 -1.67124e-07 5.53947e-07 -1.76788e-07 5.74973e-07 -1.88785e-07 6.00556e-07 -2.03741e-07 6.34404e-07 -2.10358e-07 6.61814e-07 -1.99468e-07 6.72226e-07 -1.72798e-07 6.70989e-07 -1.39323e-07 6.66546e-07 -9.92281e-08 6.58081e-07 -4.9684e-08 6.29439e-07 4.95876e-07 5.39717e-07 -1.2749e-06 5.33824e-07 -1.21839e-06 5.15161e-07 -1.14536e-06 4.69933e-07 -1.0459e-06 3.82708e-07 -8.89885e-07 2.65453e-07 -5.96255e-07 1.59865e-07 -3.645e-07 7.86563e-08 -2.1198e-07 2.63271e-08 -1.3637e-07 1.32438e-09 -1.22312e-07 -1.45649e-08 -1.20612e-07 -2.94167e-08 -1.1522e-07 -4.24804e-08 -1.0591e-07 -5.41319e-08 -9.40638e-08 -6.5909e-08 -7.89864e-08 -8.30892e-08 -5.10167e-08 -1.84513e-07 2.31686e-07 -1.94909e-07 4.02216e-07 -1.90447e-07 4.14872e-07 -1.82119e-07 4.20306e-07 -1.71683e-07 4.25951e-07 -1.61058e-07 4.33263e-07 -1.51192e-07 4.42721e-07 -1.44962e-07 4.58229e-07 -1.47022e-07 4.80003e-07 -1.49727e-07 4.93442e-07 -1.5399e-07 5.07405e-07 -1.59319e-07 5.22778e-07 -1.66217e-07 5.41355e-07 -1.75192e-07 5.62923e-07 -1.87328e-07 5.87109e-07 -2.06006e-07 6.19235e-07 -2.21817e-07 6.50215e-07 -2.21838e-07 6.61835e-07 -2.04568e-07 6.54955e-07 -1.77577e-07 6.43999e-07 -1.43468e-07 6.32438e-07 -9.9852e-08 6.14465e-07 -4.83554e-08 5.77942e-07 4.47519e-07 4.64719e-07 -1.26957e-06 4.49258e-07 -1.20293e-06 4.11433e-07 -1.10754e-06 3.47113e-07 -9.81578e-07 2.69499e-07 -8.12269e-07 1.75343e-07 -5.021e-07 8.13606e-08 -2.70517e-07 8.41354e-09 -1.39033e-07 -2.22999e-08 -1.05656e-07 -3.66409e-08 -1.07971e-07 -5.09622e-08 -1.0629e-07 -6.59396e-08 -1.00242e-07 -8.08528e-08 -9.09962e-08 -9.67686e-08 -7.81478e-08 -1.15897e-07 -5.98578e-08 -1.40121e-07 -2.67932e-08 -1.61572e-07 2.53136e-07 -1.65817e-07 4.06458e-07 -1.65954e-07 4.1501e-07 -1.63437e-07 4.17788e-07 -1.59096e-07 4.2161e-07 -1.53467e-07 4.27634e-07 -1.46977e-07 4.3623e-07 -1.39316e-07 4.50568e-07 -1.33342e-07 4.74028e-07 -1.35202e-07 4.95302e-07 -1.39928e-07 5.12132e-07 -1.44386e-07 5.27235e-07 -1.49972e-07 5.46941e-07 -1.61034e-07 5.73986e-07 -1.82794e-07 6.08869e-07 -2.16359e-07 6.52799e-07 -2.30395e-07 6.64251e-07 -2.21551e-07 6.52992e-07 -2.02287e-07 6.35691e-07 -1.75692e-07 6.17405e-07 -1.40478e-07 5.97223e-07 -9.63005e-08 5.70288e-07 -4.42337e-08 5.25875e-07 4.03286e-07 3.95641e-07 -1.25828e-06 3.71316e-07 -1.17861e-06 3.21346e-07 -1.05757e-06 2.64738e-07 -9.24969e-07 1.97169e-07 -7.44701e-07 1.1138e-07 -4.16312e-07 2.74479e-08 -1.86586e-07 -3.49518e-08 -7.66364e-08 -5.81704e-08 -8.24375e-08 -7.4545e-08 -9.15965e-08 -9.02647e-08 -9.05704e-08 -1.05844e-07 -8.46631e-08 -1.2216e-07 -7.46805e-08 -1.40074e-07 -6.02333e-08 -1.60079e-07 -3.98529e-08 -1.80495e-07 -6.37716e-09 -1.27282e-07 1.99923e-07 -1.26473e-07 4.05645e-07 -1.30055e-07 4.18592e-07 -1.32568e-07 4.20302e-07 -1.33276e-07 4.22318e-07 -1.31689e-07 4.26046e-07 -1.27714e-07 4.32255e-07 -1.201e-07 4.42954e-07 -1.09269e-07 4.63198e-07 -1.0443e-07 4.90462e-07 -1.06013e-07 5.13715e-07 -1.08584e-07 5.29806e-07 -1.10876e-07 5.49234e-07 -1.2224e-07 5.8535e-07 -1.7454e-07 6.61169e-07 -2.09904e-07 6.88163e-07 -2.09917e-07 6.64264e-07 -1.97325e-07 6.40399e-07 -1.77653e-07 6.16018e-07 -1.52288e-07 5.9204e-07 -1.21621e-07 5.66556e-07 -8.46176e-08 5.33284e-07 -4.0651e-08 4.81907e-07 3.62635e-07 3.38306e-07 -1.24336e-06 3.08054e-07 -1.14835e-06 2.55338e-07 -1.00485e-06 2.02536e-07 -8.72168e-07 1.14669e-07 -6.56833e-07 3.11572e-08 -3.32799e-07 -3.33324e-08 -1.22095e-07 -7.34555e-08 -3.65119e-08 -9.46104e-08 -6.12838e-08 -1.10798e-07 -7.54083e-08 -1.24768e-07 -7.66008e-08 -1.38796e-07 -7.0634e-08 -1.53686e-07 -5.97908e-08 -1.69953e-07 -4.39659e-08 -1.86862e-07 -2.2943e-08 -1.99448e-07 6.20845e-09 -1.15985e-07 1.16464e-07 -7.50025e-08 3.64663e-07 -8.43471e-08 4.27936e-07 -9.23853e-08 4.28339e-07 -9.79867e-08 4.27919e-07 -1.00233e-07 4.28292e-07 -9.98178e-08 4.3184e-07 -9.57751e-08 4.38912e-07 -8.41401e-08 4.51563e-07 -6.61506e-08 4.72473e-07 -5.56485e-08 5.03214e-07 -5.83429e-08 5.32501e-07 -6.28527e-08 5.53744e-07 -7.86425e-08 6.01139e-07 -1.5352e-07 7.36047e-07 -1.61038e-07 6.95682e-07 -1.55082e-07 6.5831e-07 -1.40929e-07 6.26245e-07 -1.2244e-07 5.9753e-07 -1.02311e-07 5.71912e-07 -8.38058e-08 5.48051e-07 -6.41694e-08 5.13648e-07 -3.54186e-08 4.53156e-07 3.27217e-07 2.93701e-07 -1.22746e-06 2.60858e-07 -1.11551e-06 2.05761e-07 -9.49752e-07 1.43606e-07 -8.10013e-07 4.07918e-08 -5.54022e-07 -4.21064e-08 -2.49901e-07 -9.20297e-08 -7.21729e-08 -1.09628e-07 -1.89145e-08 -1.21669e-07 -4.92457e-08 -1.32846e-07 -6.42315e-08 -1.43993e-07 -6.54539e-08 -1.5513e-07 -5.94967e-08 -1.67227e-07 -4.76942e-08 -1.80424e-07 -3.07694e-08 -1.94722e-07 -8.6448e-09 -2.08178e-07 1.96636e-08 -1.54994e-07 6.32807e-08 -3.24729e-08 2.42141e-07 -2.23934e-08 4.17854e-07 -4.15844e-08 4.4753e-07 -5.27475e-08 4.39081e-07 -5.99744e-08 4.35519e-07 -6.23577e-08 4.34224e-07 -5.98125e-08 4.36366e-07 -5.09396e-08 4.42689e-07 -3.32862e-08 4.5482e-07 -3.44797e-09 4.73375e-07 2.13804e-08 5.07672e-07 1.78315e-08 5.57292e-07 -4.07001e-08 6.5967e-07 -7.22063e-08 7.67551e-07 -7.21758e-08 6.95648e-07 -6.47518e-08 6.50887e-07 -5.43533e-08 6.15847e-07 -4.41916e-08 5.87368e-07 -3.23317e-08 5.60051e-07 -3.19972e-08 5.47717e-07 -4.6022e-08 5.27672e-07 -2.78816e-08 4.35017e-07 2.99335e-07 2.59658e-07 -1.21234e-06 2.21879e-07 -1.07773e-06 1.56663e-07 -8.84535e-07 8.56524e-08 -7.39002e-07 -6.46158e-09 -4.61906e-07 -8.07632e-08 -1.75599e-07 -1.2135e-07 -3.15859e-08 -1.20592e-07 -1.96722e-08 -1.2451e-07 -4.53258e-08 -1.33473e-07 -5.52683e-08 -1.42807e-07 -5.61193e-08 -1.52318e-07 -4.99855e-08 -1.62197e-07 -3.78141e-08 -1.7261e-07 -2.03559e-08 -1.835e-07 2.24503e-09 -1.94296e-07 3.04592e-08 -1.95462e-07 6.44459e-08 -6.96068e-08 1.16283e-07 5.69314e-08 2.91318e-07 5.86794e-08 4.45787e-07 9.52723e-09 4.88235e-07 -1.09262e-08 4.55973e-07 -2.07825e-08 4.4408e-07 -2.40996e-08 4.39683e-07 -1.99851e-08 4.38575e-07 -8.86701e-09 4.43702e-07 1.07905e-08 4.53716e-07 4.92697e-08 4.69194e-07 9.97265e-08 5.06834e-07 1.16164e-07 6.43244e-07 9.33343e-08 7.90386e-07 5.08947e-08 7.38085e-07 4.06611e-08 6.61122e-07 3.37613e-08 6.22746e-07 2.61911e-08 5.94939e-07 2.8288e-08 5.57954e-07 5.88349e-11 5.75946e-07 -3.97197e-08 5.6745e-07 -1.59047e-08 4.11202e-07 2.83429e-07 2.33587e-07 -1.19877e-06 1.86569e-07 -1.03071e-06 1.10506e-07 -8.08471e-07 3.3176e-08 -6.61673e-07 -4.08977e-08 -3.87833e-07 -9.91896e-08 -1.17308e-07 -1.23715e-07 -7.06233e-09 -1.1811e-07 -2.52775e-08 -1.21245e-07 -4.219e-08 -1.27777e-07 -4.87361e-08 -1.35559e-07 -4.83379e-08 -1.43865e-07 -4.16792e-08 -1.52363e-07 -2.93165e-08 -1.61002e-07 -1.17178e-08 -1.69862e-07 1.11052e-08 -1.78093e-07 3.86916e-08 -1.83499e-07 6.98511e-08 -1.73521e-07 1.06304e-07 -4.20138e-08 1.59809e-07 9.97805e-08 3.03994e-07 1.29444e-07 4.58572e-07 6.67891e-08 5.18628e-07 2.232e-08 4.88549e-07 7.55239e-09 4.54449e-07 3.0504e-10 4.45823e-07 -2.46906e-10 4.44254e-07 3.18157e-09 4.50287e-07 1.17994e-08 4.60577e-07 3.84692e-08 4.8016e-07 1.36232e-07 5.45481e-07 2.15524e-07 7.11089e-07 1.99346e-07 7.54261e-07 1.51572e-07 7.08898e-07 1.10016e-07 6.643e-07 7.24621e-08 6.32492e-07 2.53409e-08 6.05075e-07 -3.54575e-08 6.36745e-07 -4.66937e-10 5.32458e-07 1.12325e-08 3.99505e-07 2.9466e-07 2.1423e-07 -1.18797e-06 1.56998e-07 -9.73481e-07 7.30488e-08 -7.24521e-07 -1.91152e-08 -5.69509e-07 -7.37498e-08 -3.33199e-07 -1.17129e-07 -7.39288e-08 -1.2581e-07 1.61923e-09 -1.22756e-07 -2.83303e-08 -1.23564e-07 -4.13826e-08 -1.27338e-07 -4.4962e-08 -1.32752e-07 -4.29233e-08 -1.39006e-07 -3.54257e-08 -1.45626e-07 -2.26955e-08 -1.52396e-07 -4.94804e-09 -1.58919e-07 1.76279e-08 -1.64823e-07 4.45967e-08 -1.70272e-07 7.52996e-08 -1.73085e-07 1.09117e-07 -1.609e-07 1.47624e-07 -5.62735e-08 1.9937e-07 9.36172e-08 3.08684e-07 1.61418e-07 4.50828e-07 1.12718e-07 5.37251e-07 4.82717e-08 5.18896e-07 2.22701e-08 4.71823e-07 9.37968e-09 4.57144e-07 8.25933e-10 4.58842e-07 -5.53145e-09 4.66934e-07 -5.87605e-09 4.80505e-07 3.7392e-08 5.02215e-07 1.55036e-07 5.93435e-07 2.13155e-07 6.9614e-07 2.02612e-07 7.19441e-07 1.57292e-07 7.09616e-07 9.28735e-08 6.96913e-07 2.16419e-08 6.76305e-07 5.36176e-09 6.53028e-07 4.89779e-08 4.88839e-07 3.85022e-08 4.09981e-07 3.33162e-07 1.98345e-07 -1.17736e-06 1.37856e-07 -9.12993e-07 3.27782e-08 -6.19444e-07 -6.60297e-08 -4.70701e-07 -1.08212e-07 -2.91017e-07 -1.37461e-07 -4.4681e-08 -1.33204e-07 -2.63615e-09 -1.28439e-07 -3.30935e-08 -1.28715e-07 -4.11064e-08 -1.31064e-07 -4.26131e-08 -1.34606e-07 -3.93818e-08 -1.38845e-07 -3.11874e-08 -1.43448e-07 -1.80928e-08 -1.48197e-07 -1.99172e-10 -1.5301e-07 2.24412e-08 -1.57934e-07 4.95203e-08 -1.63062e-07 8.04262e-08 -1.68137e-07 1.14192e-07 -1.7047e-07 1.49958e-07 -1.59871e-07 1.88771e-07 -8.73252e-08 2.3614e-07 4.68227e-08 3.16678e-07 1.40907e-07 4.43165e-07 1.28566e-07 5.31241e-07 6.91476e-08 5.31239e-07 2.97888e-08 4.96501e-07 1.09681e-08 4.77664e-07 -5.36847e-09 4.8327e-07 -1.92049e-08 4.94341e-07 -2.79275e-08 5.10939e-07 2.66906e-08 5.38816e-07 1.07784e-07 6.15043e-07 1.4897e-07 6.78259e-07 1.48576e-07 7.10013e-07 1.27482e-07 7.18e-07 9.8739e-08 7.0505e-07 9.55142e-08 6.56254e-07 8.55825e-08 4.98771e-07 5.38706e-08 4.41692e-07 3.87033e-07 2.07348e-07 -1.18687e-06 1.15877e-07 -8.21522e-07 1.09949e-08 -5.14562e-07 -8.91578e-08 -3.70548e-07 -1.37534e-07 -2.42642e-07 -1.52056e-07 -3.01604e-08 -1.30012e-07 -2.46822e-08 -1.30326e-07 -3.27807e-08 -1.33153e-07 -3.82791e-08 -1.36274e-07 -3.94923e-08 -1.39619e-07 -3.60364e-08 -1.42956e-07 -2.78501e-08 -1.46158e-07 -1.48911e-08 -1.49284e-07 2.92708e-09 -1.52612e-07 2.57696e-08 -1.56613e-07 5.35213e-08 -1.61796e-07 8.56082e-08 -1.67647e-07 1.20043e-07 -1.72668e-07 1.5498e-07 -1.74177e-07 1.9028e-07 -1.65291e-07 2.27254e-07 -1.18015e-07 2.69402e-07 -3.09469e-09 3.28241e-07 1.0201e-07 4.26135e-07 1.19183e-07 5.14069e-07 6.87124e-08 5.46975e-07 2.41021e-08 5.22273e-07 -4.27538e-10 5.078e-07 -2.16552e-08 5.15569e-07 -3.74905e-08 5.26774e-07 -4.25362e-08 5.43863e-07 -6.71976e-10 5.73179e-07 5.92577e-08 6.18328e-07 1.01917e-07 6.67367e-07 1.27829e-07 6.92089e-07 1.4325e-07 6.8963e-07 1.54102e-07 6.45394e-07 1.02608e-07 5.50263e-07 5.62879e-08 4.88012e-07 4.4332e-07 1.77252e-07 -1.19568e-06 1.01518e-07 -7.45787e-07 2.94138e-08 -4.42458e-07 -3.48783e-08 -3.06256e-07 -1.22109e-07 -1.55411e-07 -1.30631e-07 -2.16367e-08 -1.32212e-07 -2.31011e-08 -1.36454e-07 -2.8539e-08 -1.41438e-07 -3.32956e-08 -1.46089e-07 -3.48417e-08 -1.50011e-07 -3.21146e-08 -1.53076e-07 -2.4785e-08 -1.55327e-07 -1.26401e-08 -1.56961e-07 4.56116e-09 -1.58418e-07 2.72252e-08 -1.61327e-07 5.64301e-08 -1.66658e-07 9.09388e-08 -1.74233e-07 1.27618e-07 -1.8031e-07 1.61057e-07 -1.83031e-07 1.93001e-07 -1.81532e-07 2.25754e-07 -1.72081e-07 2.59952e-07 -1.4122e-07 2.97381e-07 -5.84327e-08 3.43346e-07 4.22673e-08 4.13368e-07 8.19173e-08 5.07324e-07 4.32805e-08 5.60906e-07 5.59708e-09 5.4548e-07 -1.60086e-08 5.37175e-07 -3.36232e-08 5.44388e-07 -4.38515e-08 5.54092e-07 -3.86292e-08 5.67958e-07 -9.07427e-09 5.88773e-07 3.97158e-08 6.18574e-07 7.08276e-08 6.6098e-07 9.24113e-08 6.68052e-07 1.18932e-07 6.1887e-07 7.92097e-08 5.89985e-07 3.82669e-08 5.28955e-07 4.81587e-07 1.42871e-07 -1.20243e-06 6.27753e-08 -6.65693e-07 -2.48944e-08 -3.54788e-07 -1.04884e-07 -2.26266e-07 -1.87267e-07 -7.30301e-08 -1.69833e-07 -3.90701e-08 -1.63398e-07 -2.95365e-08 -1.62412e-07 -2.95253e-08 -1.64062e-07 -3.16452e-08 -1.66719e-07 -3.21844e-08 -1.69296e-07 -2.95379e-08 -1.71206e-07 -2.28756e-08 -1.72142e-07 -1.17035e-08 -1.71987e-07 4.40622e-09 -1.70818e-07 2.60562e-08 -1.70009e-07 5.5622e-08 -1.77252e-07 9.8182e-08 -1.87906e-07 1.38272e-07 -1.93898e-07 1.67049e-07 -1.95443e-07 1.94547e-07 -1.93251e-07 2.23562e-07 -1.87646e-07 2.54346e-07 -1.76686e-07 2.86421e-07 -1.53417e-07 3.20076e-07 -9.83984e-08 3.58351e-07 -7.73159e-09 4.16659e-07 3.75528e-08 5.15622e-07 1.26142e-08 5.70415e-07 -1.1607e-08 5.61396e-07 -2.40147e-08 5.56796e-07 -3.12949e-08 5.61371e-07 -3.19884e-08 5.68652e-07 -2.34747e-08 5.80259e-07 -4.81585e-09 5.99916e-07 2.90903e-08 6.27069e-07 5.07145e-08 6.46429e-07 4.44326e-08 6.25151e-07 3.16894e-08 6.02727e-07 1.0931e-08 5.49713e-07 4.92518e-07 1.03015e-07 -1.19716e-06 -3.78293e-08 -5.24849e-07 -1.15913e-07 -2.76704e-07 -1.80636e-07 -1.61543e-07 -1.89119e-07 -6.45472e-08 -1.89733e-07 -3.84558e-08 -1.88337e-07 -3.0933e-08 -1.87911e-07 -2.99514e-08 -1.88957e-07 -3.05987e-08 -1.9081e-07 -3.03323e-08 -1.92652e-07 -2.76963e-08 -1.93912e-07 -2.16155e-08 -1.94139e-07 -1.14779e-08 -1.92804e-07 3.07058e-09 -1.89306e-07 2.25588e-08 -1.82675e-07 4.89907e-08 -1.81217e-07 9.67255e-08 -1.93012e-07 1.50068e-07 -1.99366e-07 1.73403e-07 -2.00632e-07 1.95813e-07 -1.97884e-07 2.20814e-07 -1.92084e-07 2.48545e-07 -1.83717e-07 2.78054e-07 -1.71877e-07 3.08237e-07 -1.5211e-07 3.38584e-07 -1.08946e-07 3.73495e-07 -3.33908e-08 4.40066e-07 -5.65574e-09 5.42682e-07 -1.58591e-08 5.71598e-07 -2.51487e-08 5.66085e-07 -3.02939e-08 5.66516e-07 -3.21523e-08 5.70511e-07 -3.03364e-08 5.78444e-07 -2.18656e-08 5.91445e-07 -3.77475e-09 6.08979e-07 1.74759e-08 6.25179e-07 6.22212e-09 6.36405e-07 2.71397e-09 6.06235e-07 -4.03041e-09 5.56458e-07 4.88487e-07 9.91494e-08 -1.19467e-06 -5.90134e-08 -3.66686e-07 -1.42127e-07 -1.93591e-07 -1.91278e-07 -1.12392e-07 -2.01008e-07 -5.48174e-08 -2.05964e-07 -3.34998e-08 -2.08229e-07 -2.86684e-08 -2.09375e-07 -2.88054e-08 -2.11002e-07 -2.89724e-08 -2.13191e-07 -2.81433e-08 -2.15127e-07 -2.57603e-08 -2.16592e-07 -2.015e-08 -2.1748e-07 -1.05897e-08 -2.17237e-07 2.82815e-09 -2.15162e-07 2.04844e-08 -2.10695e-07 4.45237e-08 -1.99337e-07 8.53671e-08 -1.92891e-07 1.43623e-07 -1.91584e-07 1.72096e-07 -1.91412e-07 1.95641e-07 -1.88784e-07 2.18187e-07 -1.83022e-07 2.42784e-07 -1.74283e-07 2.69316e-07 -1.62867e-07 2.9682e-07 -1.48355e-07 3.24072e-07 -1.25803e-07 3.50942e-07 -7.19877e-08 3.86249e-07 -8.67726e-09 4.79373e-07 -1.4699e-08 5.7762e-07 -2.97378e-08 5.81123e-07 -3.66008e-08 5.7338e-07 -3.93705e-08 5.7328e-07 -3.80839e-08 5.77157e-07 -3.19776e-08 5.85339e-07 -2.10117e-08 5.98014e-07 -1.30674e-08 6.17234e-07 -8.0582e-09 6.31396e-07 -9.58971e-09 6.07765e-07 -6.64029e-09 5.53509e-07 4.81847e-07 1.41997e-07 -1.22838e-06 8.83742e-09 -2.33526e-07 -1.4995e-07 -3.48043e-08 -2.02696e-07 -5.96445e-08 -2.16199e-07 -4.13132e-08 -2.25599e-07 -2.40996e-08 -2.27713e-07 -2.65545e-08 -2.2583e-07 -3.0689e-08 -2.27568e-07 -2.7235e-08 -2.30596e-07 -2.51159e-08 -2.32041e-07 -2.43153e-08 -2.32328e-07 -1.98625e-08 -2.32635e-07 -1.02837e-08 -2.32131e-07 2.32424e-09 -2.28776e-07 1.71299e-08 -2.20343e-07 3.6091e-08 -1.98737e-07 6.37607e-08 -1.70355e-07 1.15242e-07 -1.64895e-07 1.66635e-07 -1.66979e-07 1.97724e-07 -1.6685e-07 2.18058e-07 -1.63075e-07 2.39009e-07 -1.55668e-07 2.61907e-07 -1.45324e-07 2.86476e-07 -1.33239e-07 3.11988e-07 -1.20115e-07 3.37818e-07 -1.02701e-07 3.68834e-07 -5.51453e-08 4.31816e-07 -4.10894e-08 5.63564e-07 -4.54034e-08 5.85439e-07 -5.07307e-08 5.78707e-07 -5.34349e-08 5.75985e-07 -5.27296e-08 5.76452e-07 -4.79275e-08 5.80537e-07 -4.01063e-08 5.90193e-07 -3.07353e-08 6.07862e-07 -1.58087e-08 6.16469e-07 -6.05141e-09 5.98007e-07 -3.16605e-10 5.47774e-07 4.81529e-07 1.97206e-07 -1.32269e-06 3.26966e-07 -3.63282e-07 -1.60724e-07 4.52896e-07 -2.08285e-07 -1.20816e-08 -2.23724e-07 -2.58733e-08 -2.38029e-07 -9.7938e-09 -2.34821e-07 -2.97649e-08 -2.27325e-07 -3.81849e-08 -2.36315e-07 -1.82459e-08 -2.43616e-07 -1.78142e-08 -2.42143e-07 -2.57893e-08 -2.39448e-07 -2.2558e-08 -2.3842e-07 -1.13112e-08 -2.37839e-07 1.74411e-09 -2.3706e-07 1.63502e-08 -2.33984e-07 3.30153e-08 -2.24149e-07 5.39265e-08 -1.94752e-07 8.58442e-08 -1.62817e-07 1.34701e-07 -1.47166e-07 1.82073e-07 -1.42241e-07 2.13134e-07 -1.37505e-07 2.34273e-07 -1.2999e-07 2.54392e-07 -1.19832e-07 2.76319e-07 -1.07764e-07 2.99919e-07 -9.47856e-08 3.2484e-07 -7.93511e-08 3.53399e-07 -5.24448e-08 4.04908e-07 -3.19745e-08 5.4309e-07 -5.0201e-08 6.03666e-07 -6.22521e-08 5.90757e-07 -6.98679e-08 5.836e-07 -7.33797e-08 5.79964e-07 -7.22998e-08 5.79457e-07 -6.58882e-08 5.8378e-07 -5.09841e-08 5.92959e-07 -2.68609e-08 5.92346e-07 -7.76074e-09 5.78908e-07 -6.31849e-10 5.40646e-07 4.80898e-07 1.07068e-07 -1.37256e-06 3.34879e-07 -5.91094e-07 3.40523e-07 4.47252e-07 2.62845e-09 3.25815e-07 -1.78438e-07 1.5519e-07 -2.14387e-07 2.61593e-08 -2.24088e-07 -2.00631e-08 -2.43285e-07 -1.89915e-08 -2.75547e-07 1.40205e-08 -2.59516e-07 -3.38431e-08 -2.39358e-07 -4.5948e-08 -2.36338e-07 -2.55776e-08 -2.34127e-07 -1.35224e-08 -2.31293e-07 -1.08961e-09 -2.29277e-07 1.43338e-08 -2.2643e-07 3.01686e-08 -2.19808e-07 4.73044e-08 -2.03808e-07 6.98442e-08 -1.71168e-07 1.02061e-07 -1.34444e-07 1.45349e-07 -1.12202e-07 1.90894e-07 -1.02024e-07 2.24094e-07 -9.33779e-08 2.45746e-07 -8.39807e-08 2.66923e-07 -7.27967e-08 2.88735e-07 -5.95072e-08 3.11551e-07 -4.45365e-08 3.38428e-07 -2.89069e-08 3.8928e-07 -2.68857e-08 5.41068e-07 -5.05508e-08 6.27329e-07 -7.00389e-08 6.10245e-07 -8.48683e-08 5.98429e-07 -9.54292e-08 5.90525e-07 -1.01097e-07 5.85124e-07 -9.97814e-08 5.82464e-07 -8.43219e-08 5.77499e-07 -5.24332e-08 5.60458e-07 -2.83018e-08 5.54776e-07 -1.99183e-08 5.32261e-07 4.6098e-07 3.2597e-08 -1.387e-06 1.38573e-07 -6.97055e-07 5.2109e-07 6.47436e-08 5.79179e-07 2.67731e-07 4.70443e-07 2.63937e-07 3.25018e-07 1.71563e-07 1.8369e-07 1.21268e-07 3.89403e-08 1.2576e-07 -8.24462e-08 1.35404e-07 -1.95882e-07 7.95982e-08 -2.44439e-07 2.61583e-09 -2.59416e-07 -1.06044e-08 -2.30268e-07 -4.267e-08 -2.09222e-07 -2.21351e-08 -2.03032e-07 8.14393e-09 -1.98889e-07 2.60251e-08 -1.87439e-07 3.5854e-08 -1.73527e-07 5.59321e-08 -1.50376e-07 7.89108e-08 -1.20328e-07 1.153e-07 -7.75916e-08 1.48158e-07 -5.3207e-08 1.9971e-07 -3.75463e-08 2.30085e-07 -2.86809e-08 2.58057e-07 -1.87608e-08 2.78814e-07 -6.69958e-09 2.99489e-07 4.00042e-09 3.27728e-07 8.02078e-09 3.8526e-07 -2.34959e-09 5.5144e-07 -2.76019e-08 6.52581e-07 -5.69932e-08 6.39637e-07 -8.36168e-08 6.25052e-07 -1.06053e-07 6.12961e-07 -1.22135e-07 6.01206e-07 -1.28126e-07 5.88454e-07 -1.20976e-07 5.70349e-07 -1.04289e-07 5.4377e-07 -7.78945e-08 5.28382e-07 -5.41356e-08 5.08503e-07 4.06843e-07 -1.82881e-08 -1.37787e-06 2.91725e-08 -7.44518e-07 3.53889e-07 -2.59968e-07 6.02825e-07 1.87811e-08 7.2428e-07 1.42486e-07 7.12861e-07 1.82994e-07 6.27924e-07 2.06208e-07 5.20889e-07 2.32794e-07 4.06467e-07 2.4982e-07 2.56125e-07 2.29939e-07 6.45224e-08 1.94219e-07 -9.87101e-08 1.52636e-07 -2.21903e-07 8.05272e-08 -2.29273e-07 -1.47613e-08 -1.90495e-07 -3.0632e-08 -1.56386e-07 -8.08361e-09 -1.35552e-07 1.50201e-08 -1.1679e-07 3.71694e-08 -9.06109e-08 5.27322e-08 -6.42559e-08 8.89461e-08 -4.26331e-08 1.26535e-07 -4.45169e-09 1.61528e-07 2.75885e-08 1.98045e-07 5.96001e-08 2.26045e-07 8.49454e-08 2.53469e-07 1.0071e-07 2.83724e-07 1.06296e-07 3.22142e-07 9.56735e-08 3.9588e-07 8.30112e-08 5.64101e-07 5.13762e-08 6.84216e-07 1.9749e-09 6.89039e-07 -4.97853e-08 6.76813e-07 -9.87847e-08 6.61961e-07 -1.38155e-07 6.40577e-07 -1.61521e-07 6.11821e-07 -1.68478e-07 5.77306e-07 -1.64275e-07 5.39565e-07 -1.3918e-07 5.03287e-07 -9.00285e-08 4.59351e-07 3.16814e-07 -4.43935e-08 -1.35838e-06 2.83337e-08 -8.17235e-07 2.28353e-07 -4.59982e-07 4.64063e-07 -2.16923e-07 6.56367e-07 -4.98115e-08 7.67677e-07 7.16798e-08 8.0344e-07 1.70459e-07 7.82836e-07 2.53397e-07 7.20844e-07 3.11813e-07 6.15413e-07 3.35378e-07 4.8338e-07 3.26259e-07 3.43762e-07 2.92257e-07 2.01197e-07 2.23081e-07 4.18786e-08 1.44569e-07 -7.41367e-08 8.53797e-08 -1.37138e-07 5.49219e-08 -1.0728e-07 -1.48383e-08 -6.52729e-08 -4.83755e-09 -2.14398e-08 8.90025e-09 2.5412e-08 4.20943e-08 6.89962e-08 8.29501e-08 1.14414e-07 1.16111e-07 1.60763e-07 1.51696e-07 2.0336e-07 1.83447e-07 2.4685e-07 2.09979e-07 2.8029e-07 2.50286e-07 2.99287e-07 3.03145e-07 2.9706e-07 3.98108e-07 2.96711e-07 5.6445e-07 2.2203e-07 7.58897e-07 1.31209e-07 7.7986e-07 2.99669e-08 7.78055e-07 -7.63992e-08 7.68327e-07 -1.7061e-07 7.34788e-07 -2.33999e-07 6.75209e-07 -2.60301e-07 6.03608e-07 -2.53942e-07 5.33206e-07 -2.11148e-07 4.60492e-07 -1.19937e-07 3.6814e-07 1.96877e-07 -6.80856e-08 -1.32368e-06 -1.81735e-08 -8.67146e-07 1.34258e-07 -6.12397e-07 3.32737e-07 -4.15394e-07 5.28456e-07 -2.45526e-07 6.89197e-07 -8.90654e-08 7.9622e-07 6.3439e-08 8.38627e-07 2.10989e-07 8.28491e-07 3.21947e-07 7.7459e-07 3.89282e-07 6.85017e-07 4.15829e-07 5.70633e-07 4.06649e-07 4.30005e-07 3.63708e-07 2.76186e-07 2.98399e-07 1.29947e-07 2.31627e-07 2.37851e-08 1.61084e-07 -7.35579e-08 8.2502e-08 -1.09792e-07 3.13986e-08 -7.8526e-08 -2.23725e-08 3.30195e-08 -6.94506e-08 1.70368e-07 -5.44016e-08 2.41534e-07 4.49436e-08 3.18508e-07 7.47225e-08 3.77659e-07 1.24296e-07 4.23854e-07 1.63784e-07 4.59961e-07 2.14179e-07 4.79268e-07 2.83837e-07 5.08318e-07 3.69059e-07 5.38886e-07 5.33883e-07 4.65395e-07 8.32388e-07 3.34534e-07 9.10721e-07 1.6215e-07 9.50439e-07 -4.67212e-08 9.77198e-07 -2.43089e-07 9.31155e-07 -3.68614e-07 8.00733e-07 -4.13637e-07 6.48631e-07 -3.96814e-07 5.16383e-07 -3.33837e-07 3.97515e-07 -1.96557e-07 2.30858e-07 3.19828e-10 -1.11502e-07 -1.25361e-06 -4.81716e-08 -9.30476e-07 1.10129e-07 -7.70701e-07 2.79987e-07 -5.85247e-07 4.39406e-07 -4.04947e-07 5.79567e-07 -2.29215e-07 6.88718e-07 -4.57207e-08 7.40054e-07 1.59651e-07 7.57498e-07 3.04499e-07 7.42238e-07 4.0454e-07 6.94193e-07 4.6387e-07 6.16477e-07 4.8435e-07 5.10442e-07 4.69757e-07 3.80008e-07 4.2883e-07 2.40308e-07 3.71331e-07 1.04346e-07 2.97046e-07 -1.50577e-08 2.01904e-07 -7.9555e-08 9.59043e-08 -8.06732e-08 -2.12455e-08 -3.22066e-08 -1.17918e-07 5.77043e-08 -1.44318e-07 2.2143e-07 -1.18775e-07 4.181e-07 -1.21949e-07 5.69567e-07 -2.717e-08 6.67025e-07 6.63242e-08 7.78122e-07 1.03083e-07 8.16606e-07 2.45353e-07 8.45518e-07 3.40147e-07 8.2944e-07 5.49962e-07 8.04274e-07 8.57554e-07 6.45944e-07 1.06905e-06 3.7363e-07 1.22275e-06 -8.20225e-09 1.35903e-06 -3.98817e-07 1.32177e-06 -6.54184e-07 1.0561e-06 -7.5332e-07 7.47766e-07 -7.30306e-07 4.93369e-07 -6.60839e-07 3.28047e-07 -3.20467e-07 -1.09515e-07 -3.20148e-07 -1.07733e-07 8.24047e-09 1.05384e-07 1.76746e-07 2.27165e-07 2.78377e-07 3.52596e-07 4.41393e-07 5.12953e-07 5.50783e-07 5.53303e-07 5.22238e-07 4.61017e-07 3.74865e-07 2.61236e-07 1.33664e-07 1.77441e-08 -7.48716e-08 -1.34637e-07 -1.34341e-07 -2.96358e-08 2.07153e-07 5.33978e-07 8.41147e-07 1.10394e-06 1.49543e-06 1.63218e-06 1.49306e-06 1.43478e-06 1.40642e-06 1.18264e-06 6.56159e-07 -7.04677e-08 -8.58101e-07 -1.49e-06 -1.7675e-06 -2.19797e-06 -1.89402e-06 -7.95108e-07 -2.34851e-09 2.34851e-09 -2.02849e-09 -3.19986e-10 3.01305e-10 -2.32977e-09 4.37394e-09 -4.07261e-09 1.00515e-08 -5.67753e-09 1.68268e-08 -6.77522e-09 2.41216e-08 -7.2948e-09 3.15932e-08 -7.47153e-09 3.89996e-08 -7.40633e-09 4.61747e-08 -7.17504e-09 5.30002e-08 -6.82541e-09 5.9393e-08 -6.39268e-09 6.52966e-08 -5.9035e-09 7.06757e-08 -5.37903e-09 7.55109e-08 -4.83515e-09 7.97945e-08 -4.28352e-09 8.35272e-08 -3.73269e-09 8.67159e-08 -3.18871e-09 8.93714e-08 -2.65562e-09 9.1507e-08 -2.13558e-09 9.31359e-08 -1.629e-09 9.427e-08 -1.13416e-09 9.49173e-08 -6.47344e-10 9.50831e-08 -1.65889e-10 9.4741e-08 3.42086e-10 9.39106e-08 8.30418e-10 9.26398e-08 1.27083e-09 9.0983e-08 1.65671e-09 8.89922e-08 1.99078e-09 8.67102e-08 2.28186e-09 8.41792e-08 2.53094e-09 8.14379e-08 2.74124e-09 7.85216e-08 2.91627e-09 7.54623e-08 3.05917e-09 7.22896e-08 3.17265e-09 6.90303e-08 3.25907e-09 6.57092e-08 3.32088e-09 6.23479e-08 3.36119e-09 5.89671e-08 3.38063e-09 3.38122e-09 3.33193e-09 -9.83385e-10 7.9895e-09 -4.97752e-09 1.35871e-08 -7.92729e-09 1.97164e-08 -1.02018e-08 2.60221e-08 -1.19832e-08 3.23975e-08 -1.31506e-08 3.87903e-08 -1.36876e-08 4.50688e-08 -1.37499e-08 5.11328e-08 -1.34702e-08 5.69051e-08 -1.29472e-08 6.23249e-08 -1.2245e-08 6.73462e-08 -1.14138e-08 7.19352e-08 -1.04924e-08 7.60692e-08 -9.51297e-09 7.97344e-08 -8.50023e-09 8.29242e-08 -7.47329e-09 8.56384e-08 -6.44694e-09 8.7882e-08 -5.43235e-09 8.96641e-08 -4.43785e-09 9.09978e-08 -3.46938e-09 9.18997e-08 -2.53099e-09 9.23906e-08 -1.62504e-09 9.24953e-08 -7.52171e-10 9.22335e-08 9.59361e-11 9.16763e-08 8.99251e-10 9.08303e-08 1.67637e-09 8.96883e-08 2.4128e-09 8.82444e-08 3.10047e-09 8.65008e-08 3.73438e-09 8.44705e-08 4.31203e-09 8.21693e-08 4.83207e-09 7.96161e-08 5.29427e-09 7.68329e-08 5.69929e-09 7.38436e-08 6.04819e-09 7.06737e-08 6.3423e-09 6.73494e-08 6.58315e-09 6.38974e-08 6.77253e-09 6.03456e-08 6.91271e-09 5.67192e-08 7.00683e-09 7.05595e-09 6.67574e-09 -7.65909e-09 1.40263e-08 -1.23281e-08 2.13483e-08 -1.52492e-08 2.84182e-08 -1.72717e-08 3.5055e-08 -1.862e-08 4.12515e-08 -1.93471e-08 4.7084e-08 -1.95201e-08 5.257e-08 -1.92359e-08 5.77e-08 -1.86002e-08 6.24524e-08 -1.76995e-08 6.68097e-08 -1.66022e-08 7.07571e-08 -1.53612e-08 7.42845e-08 -1.40196e-08 7.73852e-08 -1.26136e-08 8.00566e-08 -1.11716e-08 8.23e-08 -9.71657e-09 8.41198e-08 -8.26678e-09 8.55239e-08 -6.83641e-09 8.65225e-08 -5.43645e-09 8.71283e-08 -4.07521e-09 8.73562e-08 -2.7589e-09 8.72232e-08 -1.49207e-09 8.67489e-08 -2.77785e-10 8.59627e-08 8.82121e-10 8.48766e-08 1.98538e-09 8.35199e-08 3.03307e-09 8.19099e-08 4.02282e-09 8.00594e-08 4.95089e-09 7.79801e-08 5.81365e-09 7.56839e-08 6.60816e-09 7.31837e-08 7.33219e-09 7.04937e-08 7.98423e-09 6.76295e-08 8.56339e-09 6.46081e-08 9.06937e-09 6.1448e-08 9.50216e-09 5.81688e-08 9.86215e-09 5.47909e-08 1.01502e-08 5.13358e-08 1.03675e-08 4.78263e-08 1.05162e-08 1.05979e-08 8.00097e-09 -1.56601e-08 1.66308e-08 -2.09579e-08 2.48384e-08 -2.34569e-08 3.2433e-08 -2.48664e-08 3.93392e-08 -2.55263e-08 4.55807e-08 -2.55888e-08 5.12137e-08 -2.51531e-08 5.62945e-08 -2.43168e-08 6.08595e-08 -2.31652e-08 6.49346e-08 -2.17746e-08 6.85394e-08 -2.02069e-08 7.16889e-08 -1.85106e-08 7.43973e-08 -1.67279e-08 7.66774e-08 -1.48935e-08 7.85415e-08 -1.30356e-08 8.00022e-08 -1.11772e-08 8.10724e-08 -9.33698e-09 8.17665e-08 -7.5304e-09 8.20989e-08 -5.76886e-09 8.20852e-08 -4.06145e-09 8.17416e-08 -2.41526e-09 8.10853e-08 -8.35673e-10 8.01342e-08 6.733e-10 7.89074e-08 2.10893e-09 7.7423e-08 3.46984e-09 7.57008e-08 4.75529e-09 7.37593e-08 5.9643e-09 7.16151e-08 7.09506e-09 6.92833e-08 8.14547e-09 6.67779e-08 9.1135e-09 6.41127e-08 9.99734e-09 6.13014e-08 1.07955e-08 5.8358e-08 1.15066e-08 5.52974e-08 1.21298e-08 5.2135e-08 1.26643e-08 4.88871e-08 1.31099e-08 4.55706e-08 1.34665e-08 4.22033e-08 1.37347e-08 3.88035e-08 1.39156e-08 1.40106e-08 8.63273e-09 -2.42928e-08 1.77341e-08 -3.00594e-08 2.62409e-08 -3.19637e-08 3.39776e-08 -3.26032e-08 4.0907e-08 -3.24559e-08 4.7051e-08 -3.17329e-08 5.24646e-08 -3.05669e-08 5.72055e-08 -2.90578e-08 6.13308e-08 -2.72906e-08 6.48868e-08 -2.53306e-08 6.79132e-08 -2.32332e-08 7.04457e-08 -2.1043e-08 7.25149e-08 -1.87969e-08 7.41475e-08 -1.6526e-08 7.5368e-08 -1.4256e-08 7.61989e-08 -1.2008e-08 7.66615e-08 -9.79955e-09 7.67759e-08 -7.64471e-09 7.65616e-08 -5.55463e-09 7.6038e-08 -3.53776e-09 7.52235e-08 -1.60083e-09 7.41368e-08 2.51086e-10 7.27959e-08 2.01426e-09 7.12185e-08 3.68634e-09 6.94222e-08 5.26616e-09 6.74242e-08 6.75336e-09 6.52407e-08 8.1478e-09 6.28874e-08 9.44834e-09 6.03791e-08 1.06537e-08 5.77298e-08 1.17627e-08 5.49527e-08 1.27743e-08 5.20608e-08 1.36872e-08 4.90672e-08 1.45001e-08 4.59851e-08 1.52118e-08 4.28282e-08 1.58211e-08 3.96104e-08 1.63274e-08 3.63464e-08 1.67303e-08 3.30511e-08 1.70297e-08 2.97404e-08 1.72261e-08 1.73203e-08 8.90917e-09 -3.3202e-08 1.80533e-08 -3.92036e-08 2.64767e-08 -4.03872e-08 3.40375e-08 -4.01642e-08 4.07238e-08 -3.91422e-08 4.65706e-08 -3.75798e-08 5.1636e-08 -3.56324e-08 5.59849e-08 -3.34068e-08 5.96764e-08 -3.09821e-08 6.27661e-08 -2.84203e-08 6.53023e-08 -2.57693e-08 6.73278e-08 -2.30683e-08 6.88806e-08 -2.03497e-08 6.99951e-08 -1.76404e-08 7.07026e-08 -1.49634e-08 7.10323e-08 -1.23376e-08 7.1011e-08 -9.77828e-09 7.06636e-08 -7.29729e-09 7.00138e-08 -4.90495e-09 6.90842e-08 -2.60813e-09 6.78957e-08 -4.12403e-10 6.64683e-08 1.67845e-09 6.48205e-08 3.66211e-09 6.29701e-08 5.53664e-09 6.09342e-08 7.30206e-09 5.8728e-08 8.95957e-09 5.63663e-08 1.05095e-08 5.38633e-08 1.19514e-08 5.12321e-08 1.32848e-08 4.84856e-08 1.45092e-08 4.56356e-08 1.56241e-08 4.26941e-08 1.66286e-08 3.96726e-08 1.75215e-08 3.65828e-08 1.83014e-08 3.34365e-08 1.89673e-08 3.02457e-08 1.95181e-08 2.70227e-08 1.99531e-08 2.37804e-08 2.02718e-08 2.05321e-08 2.04742e-08 2.05608e-08 8.8763e-09 -4.20784e-08 1.78017e-08 -4.81291e-08 2.59001e-08 -4.84857e-08 3.30609e-08 -4.73252e-08 3.93058e-08 -4.53872e-08 4.46948e-08 -4.29689e-08 4.92984e-08 -4.0236e-08 5.31855e-08 -3.72939e-08 5.64193e-08 -3.42158e-08 5.90547e-08 -3.10557e-08 6.11405e-08 -2.7855e-08 6.27202e-08 -2.4648e-08 6.38335e-08 -2.1463e-08 6.45169e-08 -1.83239e-08 6.48041e-08 -1.52507e-08 6.47276e-08 -1.22612e-08 6.43173e-08 -9.368e-09 6.36014e-08 -6.58154e-09 6.26062e-08 -3.90981e-09 6.13566e-08 -1.35862e-09 5.98755e-08 1.06871e-09 5.81835e-08 3.37041e-09 5.63004e-08 5.54513e-09 5.42433e-08 7.59377e-09 5.20275e-08 9.51784e-09 4.96676e-08 1.13194e-08 4.71772e-08 1.29998e-08 4.45687e-08 1.45598e-08 4.18536e-08 1.59997e-08 3.90427e-08 1.73199e-08 3.61464e-08 1.85202e-08 3.31749e-08 1.96e-08 3.01379e-08 2.05583e-08 2.70453e-08 2.1394e-08 2.39067e-08 2.21059e-08 2.0732e-08 2.26928e-08 1.75312e-08 2.31537e-08 1.43149e-08 2.3488e-08 1.10935e-08 2.36954e-08 2.3776e-08 8.59473e-09 -5.06731e-08 1.71443e-08 -5.66788e-08 2.47394e-08 -5.60808e-08 3.13276e-08 -5.39134e-08 3.69853e-08 -5.1045e-08 4.18036e-08 -4.77872e-08 4.58663e-08 -4.42987e-08 4.92451e-08 -4.06727e-08 5.20007e-08 -3.69714e-08 5.41843e-08 -3.32392e-08 5.58403e-08 -2.9511e-08 5.70095e-08 -2.58172e-08 5.77294e-08 -2.2183e-08 5.80351e-08 -1.86297e-08 5.79612e-08 -1.5177e-08 5.75413e-08 -1.18414e-08 5.68068e-08 -8.63367e-09 5.57872e-08 -5.56204e-09 5.45111e-08 -2.63381e-09 5.30046e-08 1.47882e-10 5.12919e-08 2.78133e-09 4.93946e-08 5.26769e-09 4.73311e-08 7.60865e-09 4.51178e-08 9.80716e-09 4.2769e-08 1.18666e-08 4.02979e-08 1.37905e-08 3.77163e-08 1.55813e-08 3.50348e-08 1.72412e-08 3.22628e-08 1.87715e-08 2.94092e-08 2.01733e-08 2.64823e-08 2.14469e-08 2.34901e-08 2.25921e-08 2.04402e-08 2.36082e-08 1.734e-08 2.44942e-08 1.41968e-08 2.52492e-08 1.10178e-08 2.58718e-08 7.81041e-09 2.6361e-08 4.58213e-09 2.67162e-08 1.34078e-09 2.69366e-08 2.70221e-08 8.23185e-09 -5.8905e-08 1.62722e-08 -6.47192e-08 2.3181e-08 -6.29897e-08 2.90421e-08 -5.97746e-08 3.40019e-08 -5.60049e-08 3.81783e-08 -5.19636e-08 4.16583e-08 -4.77787e-08 4.4509e-08 -4.35234e-08 4.67817e-08 -3.92442e-08 4.85197e-08 -3.49772e-08 4.97605e-08 -3.0752e-08 5.05397e-08 -2.65966e-08 5.08914e-08 -2.25347e-08 5.08499e-08 -1.85883e-08 5.04485e-08 -1.47756e-08 4.97196e-08 -1.11127e-08 4.86962e-08 -7.61031e-09 4.74108e-08 -4.27669e-09 4.58928e-08 -1.11593e-09 4.41701e-08 1.8706e-09 4.22659e-08 4.68555e-09 4.02021e-08 7.33156e-09 3.7996e-08 9.81489e-09 3.56624e-08 1.21408e-08 3.32141e-08 1.4315e-08 3.06622e-08 1.63423e-08 2.8016e-08 1.82274e-08 2.52837e-08 1.99733e-08 2.24722e-08 2.15828e-08 1.9588e-08 2.30574e-08 1.66367e-08 2.43981e-08 1.36239e-08 2.5605e-08 1.05542e-08 2.66779e-08 7.43227e-09 2.76162e-08 4.2625e-09 2.8419e-08 1.04893e-09 2.90853e-08 -2.20451e-09 2.96144e-08 -5.49379e-09 3.00053e-08 -8.8148e-09 3.02573e-08 3.03706e-08 7.86382e-09 -6.67689e-08 1.52235e-08 -7.20789e-08 2.12753e-08 -6.90416e-08 2.63017e-08 -6.4801e-08 3.05107e-08 -6.02138e-08 3.40257e-08 -5.54787e-08 3.69236e-08 -5.06765e-08 3.92541e-08 -4.58539e-08 4.10553e-08 -4.10454e-08 4.23591e-08 -3.62811e-08 4.31966e-08 -3.15897e-08 4.35974e-08 -2.69975e-08 4.3592e-08 -2.25295e-08 4.32123e-08 -1.82087e-08 4.24917e-08 -1.40551e-08 4.14644e-08 -1.00855e-08 4.0166e-08 -6.31192e-09 3.86299e-08 -2.74057e-09 3.68878e-08 6.26254e-10 3.49676e-08 3.79087e-09 3.2894e-08 6.75928e-09 3.06864e-08 9.53924e-09 2.83614e-08 1.214e-08 2.59314e-08 1.45709e-08 2.34062e-08 1.68402e-08 2.07933e-08 1.89551e-08 1.80992e-08 2.09214e-08 1.53287e-08 2.27437e-08 1.24858e-08 2.44255e-08 9.57391e-09 2.59693e-08 6.59566e-09 2.73763e-08 3.55332e-09 2.86473e-08 4.4852e-10 2.97827e-08 -2.71763e-09 3.07824e-08 -5.94462e-09 3.16459e-08 -9.23239e-09 3.2373e-08 -1.25813e-08 3.29631e-08 -1.59919e-08 3.34157e-08 -1.94651e-08 3.37304e-08 3.39075e-08 7.48163e-09 -7.42505e-08 1.39058e-08 -7.85032e-08 1.89782e-08 -7.4114e-08 2.31518e-08 -6.89747e-08 2.66347e-08 -6.36967e-08 2.95258e-08 -5.83698e-08 3.18755e-08 -5.30263e-08 3.37135e-08 -4.7692e-08 3.50625e-08 -4.23945e-08 3.5945e-08 -3.71637e-08 3.63847e-08 -3.20295e-08 3.64076e-08 -2.70206e-08 3.60417e-08 -2.21637e-08 3.53177e-08 -1.74848e-08 3.42697e-08 -1.30071e-08 3.2935e-08 -8.75078e-09 3.13521e-08 -4.72901e-09 2.95594e-08 -9.47811e-10 2.75914e-08 2.59434e-09 2.54776e-08 5.90487e-09 2.32414e-08 8.9956e-09 2.09018e-08 1.1879e-08 1.84716e-08 1.45704e-08 1.59593e-08 1.70833e-08 1.33703e-08 1.94292e-08 1.07081e-08 2.16173e-08 7.97462e-09 2.36548e-08 5.1708e-09 2.55474e-08 2.29689e-09 2.72993e-08 -6.47406e-10 2.89135e-08 -3.6628e-09 3.03916e-08 -6.75053e-09 3.1735e-08 -9.9127e-09 3.29448e-08 -1.31525e-08 3.40221e-08 -1.64742e-08 3.49675e-08 -1.98829e-08 3.57815e-08 -2.33846e-08 3.64646e-08 -2.69863e-08 3.70171e-08 -3.06956e-08 3.74394e-08 3.7732e-08 7.03128e-09 -8.12819e-08 1.22801e-08 -8.3752e-08 1.63454e-08 -7.81792e-08 1.97168e-08 -7.23461e-08 2.25369e-08 -6.65167e-08 2.48608e-08 -6.06937e-08 2.67071e-08 -5.48725e-08 2.80822e-08 -4.90671e-08 2.89958e-08 -4.33081e-08 2.94629e-08 -3.7631e-08 2.95037e-08 -3.20705e-08 2.91409e-08 -2.66578e-08 2.83999e-08 -2.14228e-08 2.73106e-08 -1.63955e-08 2.59095e-08 -1.16061e-08 2.42389e-08 -7.08012e-09 2.23447e-08 -2.83481e-09 2.02727e-08 1.12426e-09 1.80626e-08 4.80455e-09 1.57457e-08 8.22192e-09 1.33463e-08 1.13952e-08 1.08789e-08 1.43465e-08 8.35069e-09 1.70988e-08 5.7642e-09 1.96699e-08 3.11912e-09 2.20743e-08 4.13032e-10 2.43234e-08 -2.35766e-09 2.64255e-08 -5.1967e-09 2.83864e-08 -8.10805e-09 3.02106e-08 -1.10956e-08 3.1901e-08 -1.41639e-08 3.34598e-08 -1.73183e-08 3.48892e-08 -2.05652e-08 3.61916e-08 -2.39128e-08 3.73696e-08 -2.73712e-08 3.84258e-08 -3.09521e-08 3.93622e-08 -3.46688e-08 4.01811e-08 -3.85366e-08 4.08847e-08 -4.25715e-08 4.14741e-08 4.19493e-08 6.54636e-09 -8.78283e-08 1.036e-08 -8.75655e-08 1.34907e-08 -8.13098e-08 1.61507e-08 -7.50059e-08 1.83757e-08 -6.87417e-08 2.01859e-08 -6.25039e-08 2.15688e-08 -5.62554e-08 2.25054e-08 -5.00037e-08 2.29925e-08 -4.37954e-08 2.3043e-08 -3.76815e-08 2.2677e-08 -3.17046e-08 2.19154e-08 -2.58963e-08 2.07787e-08 -2.02861e-08 1.92933e-08 -1.49102e-08 1.74977e-08 -9.81053e-09 1.5444e-08 -5.02636e-09 1.31924e-08 -5.83181e-10 1.08015e-08 3.51516e-09 8.32218e-09 7.28397e-09 5.78964e-09 1.07546e-08 3.22289e-09 1.39621e-08 6.29374e-10 1.69401e-08 -1.99148e-09 1.97197e-08 -4.64568e-09 2.23241e-08 -7.34224e-09 2.47709e-08 -1.0091e-08 2.70722e-08 -1.29015e-08 2.9236e-08 -1.57829e-08 3.12677e-08 -1.87431e-08 3.31709e-08 -2.17903e-08 3.49481e-08 -2.49325e-08 3.6602e-08 -2.81788e-08 3.81356e-08 -3.15405e-08 3.95532e-08 -3.50319e-08 4.08609e-08 -3.86704e-08 4.20642e-08 -4.2475e-08 4.31667e-08 -4.64671e-08 4.4173e-08 -5.06718e-08 4.50892e-08 -5.51169e-08 4.59192e-08 4.66585e-08 4.92805e-09 -9.27563e-08 8.02302e-09 -9.06602e-08 1.05105e-08 -8.37972e-08 1.25703e-08 -7.70655e-08 1.42536e-08 -7.04248e-08 1.55877e-08 -6.38378e-08 1.65401e-08 -5.72078e-08 1.70542e-08 -5.05179e-08 1.71188e-08 -4.386e-08 1.67505e-08 -3.73133e-08 1.59753e-08 -3.09294e-08 1.4807e-08 -2.47281e-08 1.32552e-08 -1.87344e-08 1.13347e-08 -1.29897e-08 9.08559e-09 -7.56149e-09 6.57737e-09 -2.51817e-09 3.90006e-09 2.09413e-09 1.13999e-09 6.27526e-09 -1.64018e-09 1.00642e-08 -4.4036e-09 1.35181e-08 -7.13817e-09 1.66967e-08 -9.84941e-09 1.96514e-08 -1.2552e-08 2.24223e-08 -1.52651e-08 2.50373e-08 -1.80086e-08 2.75144e-08 -2.0801e-08 2.98645e-08 -2.36581e-08 3.20932e-08 -2.65938e-08 3.42034e-08 -2.96198e-08 3.6197e-08 -3.27476e-08 3.80759e-08 -3.59884e-08 3.98428e-08 -3.93544e-08 4.15015e-08 -4.28607e-08 4.30594e-08 -4.65298e-08 4.453e-08 -5.03895e-08 4.59238e-08 -5.44658e-08 4.7243e-08 -5.87846e-08 4.84917e-08 -6.3383e-08 4.96876e-08 -6.83003e-08 5.08365e-08 5.19218e-08 3.40177e-09 -9.61579e-08 5.78424e-09 -9.30424e-08 7.69187e-09 -8.57045e-08 9.16846e-09 -7.85418e-08 1.02308e-08 -7.1487e-08 1.11017e-08 -6.47086e-08 1.16289e-08 -5.7735e-08 1.17116e-08 -5.06005e-08 1.13674e-08 -4.35158e-08 1.05879e-08 -3.65338e-08 9.42511e-09 -2.97666e-08 7.87124e-09 -2.31742e-08 5.89785e-09 -1.6761e-08 3.49049e-09 -1.05824e-08 6.99359e-10 -4.77037e-09 -2.37064e-09 5.51825e-10 -5.57354e-09 5.29703e-09 -8.77011e-09 9.47185e-09 -1.18762e-08 1.31704e-08 -1.48667e-08 1.65086e-08 -1.77474e-08 1.95775e-08 -2.05503e-08 2.24543e-08 -2.33127e-08 2.51847e-08 -2.60708e-08 2.77954e-08 -2.88571e-08 3.03008e-08 -3.16984e-08 3.27059e-08 -3.46157e-08 3.50107e-08 -3.76249e-08 3.72128e-08 -4.07397e-08 3.93118e-08 -4.39737e-08 4.131e-08 -4.73409e-08 4.32102e-08 -5.08537e-08 4.50143e-08 -5.4528e-08 4.67338e-08 -5.83987e-08 4.84006e-08 -6.25118e-08 5.00369e-08 -6.69003e-08 5.16315e-08 -7.15893e-08 5.31809e-08 -7.66034e-08 5.47017e-08 -8.19961e-08 5.62292e-08 5.77365e-08 2.65224e-09 -9.88099e-08 3.91278e-09 -9.43026e-08 4.99966e-09 -8.67912e-08 5.84868e-09 -7.93907e-08 6.46638e-09 -7.21045e-08 6.71451e-09 -6.49566e-08 6.66884e-09 -5.76892e-08 6.33701e-09 -5.02687e-08 5.65638e-09 -4.28351e-08 4.62711e-09 -3.55045e-08 3.15703e-09 -2.82965e-08 1.23788e-09 -2.1255e-08 -1.20839e-09 -1.43147e-08 -4.18959e-09 -7.60111e-09 -7.65854e-09 -1.30138e-09 -1.14593e-08 4.35267e-09 -1.53247e-08 9.16242e-09 -1.90122e-08 1.31594e-08 -2.24397e-08 1.65979e-08 -2.55978e-08 1.96668e-08 -2.85637e-08 2.25433e-08 -3.14109e-08 2.53015e-08 -3.42032e-08 2.7977e-08 -3.69946e-08 3.05868e-08 -3.98285e-08 3.31347e-08 -4.27374e-08 3.56149e-08 -4.5743e-08 3.80164e-08 -4.8858e-08 4.0328e-08 -5.20925e-08 4.25465e-08 -5.54599e-08 4.46776e-08 -5.89809e-08 4.67313e-08 -6.26679e-08 4.87014e-08 -6.65176e-08 5.05835e-08 -7.05735e-08 5.24566e-08 -7.49297e-08 5.43932e-08 -7.96379e-08 5.63398e-08 -8.46884e-08 5.82316e-08 -9.00979e-08 6.01113e-08 -9.59557e-08 6.20871e-08 6.40809e-08 1.50244e-09 -1.00312e-07 1.894e-09 -9.4694e-08 2.22085e-09 -8.71179e-08 2.51222e-09 -7.96819e-08 2.62617e-09 -7.22183e-08 2.43821e-09 -6.47685e-08 1.92014e-09 -5.7171e-08 1.17804e-09 -4.95265e-08 1.74448e-10 -4.18314e-08 -1.17461e-09 -3.41554e-08 -2.94292e-09 -2.65281e-08 -5.26525e-09 -1.89326e-08 -8.20275e-09 -1.13771e-08 -1.18149e-08 -3.98884e-09 -1.61132e-08 2.99709e-09 -2.08616e-08 9.10115e-09 -2.55058e-08 1.38067e-08 -2.97144e-08 1.73681e-08 -3.3283e-08 2.01666e-08 -3.64685e-08 2.28523e-08 -3.94235e-08 2.54984e-08 -4.22618e-08 2.81398e-08 -4.50672e-08 3.07823e-08 -4.79024e-08 3.3422e-08 -5.08157e-08 3.6048e-08 -5.38404e-08 3.86398e-08 -5.69921e-08 4.11682e-08 -6.02685e-08 4.36046e-08 -6.36679e-08 4.59461e-08 -6.71952e-08 4.8205e-08 -7.08703e-08 5.04066e-08 -7.47672e-08 5.25984e-08 -7.88148e-08 5.46311e-08 -8.30526e-08 5.66945e-08 -8.76077e-08 5.89483e-08 -9.24952e-08 6.12274e-08 -9.77912e-08 6.35277e-08 -1.03545e-07 6.58648e-08 -1.09793e-07 6.83355e-08 7.08795e-08 3.03842e-10 -1.00616e-07 3.19958e-11 -9.4422e-08 -3.21187e-10 -8.67646e-08 -7.92299e-10 -7.92107e-08 -1.37401e-09 -7.16365e-08 -2.04366e-09 -6.40987e-08 -2.92815e-09 -5.62864e-08 -4.03874e-09 -4.84158e-08 -5.42795e-09 -4.04421e-08 -7.15457e-09 -3.24286e-08 -9.32307e-09 -2.43594e-08 -1.20597e-08 -1.61957e-08 -1.54741e-08 -7.96249e-09 -1.96752e-08 2.12502e-10 -2.48098e-08 8.13189e-09 -3.08236e-08 1.5115e-08 -3.66423e-08 1.96256e-08 -4.07294e-08 2.14553e-08 -4.40889e-08 2.35262e-08 -4.70917e-08 2.58551e-08 -4.99515e-08 2.83581e-08 -5.27833e-08 3.09715e-08 -5.56492e-08 3.36481e-08 -5.85965e-08 3.63693e-08 -6.16703e-08 3.91218e-08 -6.49059e-08 4.18756e-08 -6.83091e-08 4.45716e-08 -7.18325e-08 4.71281e-08 -7.54449e-08 4.95586e-08 -7.91995e-08 5.19598e-08 -8.30139e-08 5.4221e-08 -8.69134e-08 5.64979e-08 -9.11021e-08 5.88199e-08 -9.55889e-08 6.11814e-08 -1.00259e-07 6.36189e-08 -1.05274e-07 6.62418e-08 -1.10689e-07 6.89432e-08 -1.16628e-07 7.18038e-08 -1.23116e-07 7.48243e-08 7.79409e-08 -7.36902e-10 -9.98789e-08 -1.80982e-09 -9.33489e-08 -2.87343e-09 -8.57008e-08 -4.00535e-09 -7.80786e-08 -5.198e-09 -7.04437e-08 -6.56806e-09 -6.27285e-08 -8.02811e-09 -5.48262e-08 -9.5999e-09 -4.68438e-08 -1.14814e-08 -3.85603e-08 -1.36772e-08 -3.02327e-08 -1.63427e-08 -2.16937e-08 -1.96043e-08 -1.29339e-08 -2.3598e-08 -3.96851e-09 -2.84347e-08 5.04944e-09 -3.42051e-08 1.39025e-08 -4.13802e-08 2.22903e-08 -4.66611e-08 2.49067e-08 -5.02007e-08 2.49949e-08 -5.33284e-08 2.6654e-08 -5.63345e-08 2.88611e-08 -5.93682e-08 3.13918e-08 -6.24657e-08 3.40691e-08 -6.56235e-08 3.68059e-08 -6.8866e-08 3.96118e-08 -7.22496e-08 4.25055e-08 -7.58235e-08 4.54495e-08 -7.9616e-08 4.83641e-08 -8.35281e-08 5.10403e-08 -8.73582e-08 5.33888e-08 -9.11013e-08 5.5703e-08 -9.50096e-08 5.81294e-08 -9.90636e-08 6.05519e-08 -1.03286e-07 6.30421e-08 -1.07731e-07 6.56268e-08 -1.12489e-07 6.8377e-08 -1.17541e-07 7.12933e-08 -1.23004e-07 7.44069e-08 -1.28958e-07 7.77579e-08 -1.35455e-07 8.1321e-08 8.50225e-08 -1.57981e-09 -9.82991e-08 -3.42726e-09 -9.15013e-08 -5.35406e-09 -8.37738e-08 -7.3006e-09 -7.61319e-08 -9.29312e-09 -6.8451e-08 -1.13297e-08 -6.06918e-08 -1.34297e-08 -5.27261e-08 -1.56923e-08 -4.4581e-08 -1.80656e-08 -3.61868e-08 -2.07683e-08 -2.75298e-08 -2.39316e-08 -1.85302e-08 -2.77343e-08 -9.1309e-09 -3.24157e-08 7.13078e-10 -3.85536e-08 1.11875e-08 -4.51919e-08 2.0541e-08 -4.97945e-08 2.68931e-08 -5.27582e-08 2.78705e-08 -5.63329e-08 2.85696e-08 -5.98829e-08 3.02041e-08 -6.35571e-08 3.25353e-08 -6.73668e-08 3.52014e-08 -7.12175e-08 3.79197e-08 -7.50115e-08 4.05999e-08 -7.87807e-08 4.3381e-08 -8.26326e-08 4.63575e-08 -8.66537e-08 4.94707e-08 -9.09694e-08 5.26798e-08 -9.52607e-08 5.53317e-08 -9.91364e-08 5.72647e-08 -1.03076e-07 5.9643e-08 -1.07101e-07 6.21539e-08 -1.11258e-07 6.47086e-08 -1.15569e-07 6.73538e-08 -1.20007e-07 7.00641e-08 -1.24611e-07 7.29814e-08 -1.29468e-07 7.61502e-08 -1.34692e-07 7.9631e-08 -1.4036e-07 8.34261e-08 -1.46535e-07 8.74967e-08 9.17527e-08 -2.55579e-09 -9.57432e-08 -5.34476e-09 -8.8712e-08 -8.15534e-09 -8.0963e-08 -1.0891e-08 -7.3396e-08 -1.35776e-08 -6.57642e-08 -1.62746e-08 -5.79946e-08 -1.89836e-08 -5.00169e-08 -2.17508e-08 -4.18135e-08 -2.45637e-08 -3.33738e-08 -2.75282e-08 -2.4565e-08 -3.07286e-08 -1.53296e-08 -3.4269e-08 -5.59022e-09 -3.83532e-08 4.79746e-09 -4.3213e-08 1.60475e-08 -4.80939e-08 2.54221e-08 -5.21277e-08 3.0927e-08 -5.63232e-08 3.20659e-08 -6.07075e-08 3.29539e-08 -6.52903e-08 3.47869e-08 -7.00331e-08 3.72782e-08 -7.49626e-08 4.0131e-08 -7.99044e-08 4.28616e-08 -8.44583e-08 4.51538e-08 -8.87051e-08 4.76279e-08 -9.31226e-08 5.07751e-08 -9.75745e-08 5.39226e-08 -1.01773e-07 5.6878e-08 -1.05935e-07 5.94947e-08 -1.10241e-07 6.15705e-08 -1.14509e-07 6.39106e-08 -1.18862e-07 6.65068e-08 -1.23302e-07 6.9149e-08 -1.27662e-07 7.17137e-08 -1.31908e-07 7.43106e-08 -1.36237e-07 7.73104e-08 -1.40741e-07 8.06542e-08 -1.45498e-07 8.43882e-08 -1.50584e-07 8.85124e-08 -1.5608e-07 9.29929e-08 9.77432e-08 -3.46137e-09 -9.22816e-08 -7.1054e-09 -8.50676e-08 -1.0693e-08 -7.73751e-08 -1.42317e-08 -6.98571e-08 -1.77151e-08 -6.22806e-08 -2.11599e-08 -5.45496e-08 -2.45796e-08 -4.65969e-08 -2.79723e-08 -3.84206e-08 -3.13942e-08 -2.99516e-08 -3.48783e-08 -2.10806e-08 -3.84845e-08 -1.17232e-08 -4.22844e-08 -1.79013e-09 -4.63796e-08 8.89283e-09 -5.08911e-08 2.05591e-08 -5.47857e-08 2.93168e-08 -5.83527e-08 3.44941e-08 -6.24367e-08 3.615e-08 -6.72095e-08 3.77267e-08 -7.23448e-08 3.99223e-08 -7.78166e-08 4.27501e-08 -8.3606e-08 4.59206e-08 -8.93714e-08 4.86271e-08 -9.45816e-08 5.03641e-08 -9.93177e-08 5.23641e-08 -1.04064e-07 5.55219e-08 -1.08704e-07 5.85619e-08 -1.1327e-07 6.14444e-08 -1.17487e-07 6.37122e-08 -1.21935e-07 6.60182e-08 -1.26484e-07 6.84599e-08 -1.30953e-07 7.09764e-08 -1.35246e-07 7.34418e-08 -1.39351e-07 7.58192e-08 -1.43413e-07 7.83725e-08 -1.47395e-07 8.12924e-08 -1.51388e-07 8.46472e-08 -1.55473e-07 8.84733e-08 -1.59734e-07 9.2774e-08 -1.64247e-07 9.75054e-08 1.02621e-07 -4.22788e-09 -8.80536e-08 -8.65005e-09 -8.06452e-08 -1.30417e-08 -7.29832e-08 -1.7359e-08 -6.55396e-08 -2.16166e-08 -5.80228e-08 -2.58303e-08 -5.03356e-08 -2.99857e-08 -4.24413e-08 -3.41262e-08 -3.42798e-08 -3.82385e-08 -2.58391e-08 -4.23649e-08 -1.69539e-08 -4.65172e-08 -7.57069e-09 -5.07024e-08 2.39526e-09 -5.48771e-08 1.30676e-08 -5.86899e-08 2.43719e-08 -6.25099e-08 3.31368e-08 -6.6296e-08 3.82802e-08 -7.1006e-08 4.086e-08 -7.62217e-08 4.29426e-08 -8.14012e-08 4.5102e-08 -8.71771e-08 4.85262e-08 -9.24967e-08 5.12403e-08 -9.74397e-08 5.35703e-08 -1.02386e-07 5.53103e-08 -1.07818e-07 5.77965e-08 -1.13011e-07 6.07152e-08 -1.18208e-07 6.37591e-08 -1.23252e-07 6.64882e-08 -1.28202e-07 6.86627e-08 -1.33164e-07 7.09803e-08 -1.38053e-07 7.33491e-08 -1.42698e-07 7.56215e-08 -1.47035e-07 7.77789e-08 -1.51042e-07 7.98269e-08 -1.54765e-07 8.20955e-08 -1.58237e-07 8.47645e-08 -1.6154e-07 8.79507e-08 -1.64794e-07 9.17274e-08 -1.68134e-07 9.61136e-08 -1.71658e-07 1.0103e-07 1.06347e-07 -4.92801e-09 -8.31253e-08 -1.00562e-08 -7.55167e-08 -1.5147e-08 -6.78921e-08 -2.01832e-08 -6.05032e-08 -2.51541e-08 -5.30516e-08 -3.00797e-08 -4.54097e-08 -3.49621e-08 -3.75586e-08 -3.98378e-08 -2.94038e-08 -4.47201e-08 -2.09564e-08 -4.96022e-08 -1.20716e-08 -5.44842e-08 -2.6885e-09 -5.93479e-08 7.25912e-09 -6.4199e-08 1.79188e-08 -6.85882e-08 2.87611e-08 -7.25861e-08 3.71348e-08 -7.70835e-08 4.27777e-08 -8.24671e-08 4.62437e-08 -8.79613e-08 4.84369e-08 -9.34411e-08 5.0582e-08 -9.81633e-08 5.32486e-08 -1.02564e-07 5.5641e-08 -1.074e-07 5.84066e-08 -1.12777e-07 6.06879e-08 -1.18283e-07 6.33024e-08 -1.23678e-07 6.61098e-08 -1.28864e-07 6.8946e-08 -1.3383e-07 7.14539e-08 -1.39156e-07 7.39895e-08 -1.44576e-07 7.64005e-08 -1.4983e-07 7.86034e-08 -1.54699e-07 8.04902e-08 -1.58982e-07 8.20622e-08 -1.62729e-07 8.35738e-08 -1.65917e-07 8.5284e-08 -1.68582e-07 8.74298e-08 -1.70835e-07 9.02031e-08 -1.7285e-07 9.37433e-08 -1.74776e-07 9.80392e-08 -1.76808e-07 1.03062e-07 1.08416e-07 -5.53423e-09 -7.75909e-08 -1.12622e-08 -6.97885e-08 -1.69745e-08 -6.21796e-08 -2.26396e-08 -5.48377e-08 -2.82584e-08 -4.74326e-08 -3.3811e-08 -3.98569e-08 -3.93383e-08 -3.2031e-08 -4.48363e-08 -2.39055e-08 -5.03402e-08 -1.54522e-08 -5.58278e-08 -6.58381e-09 -6.1286e-08 2.76988e-09 -6.67107e-08 1.26839e-08 -7.22454e-08 2.34535e-08 -7.71886e-08 3.37043e-08 -8.18833e-08 4.18295e-08 -8.67131e-08 4.76075e-08 -9.17633e-08 5.1294e-08 -9.63464e-08 5.30201e-08 -1.012e-07 5.54358e-08 -1.06152e-07 5.82004e-08 -1.11033e-07 6.05224e-08 -1.1587e-07 6.32433e-08 -1.21295e-07 6.61134e-08 -1.26823e-07 6.88301e-08 -1.32487e-07 7.17748e-08 -1.38048e-07 7.45064e-08 -1.43771e-07 7.71779e-08 -1.49604e-07 7.98227e-08 -1.5546e-07 8.2256e-08 -1.61127e-07 8.4271e-08 -1.66321e-07 8.56842e-08 -1.70747e-07 8.64884e-08 -1.74241e-07 8.70684e-08 -1.7675e-07 8.77929e-08 -1.78322e-07 8.90021e-08 -1.79076e-07 9.0957e-08 -1.7925e-07 9.39173e-08 -1.79148e-07 9.79381e-08 -1.78632e-07 1.02546e-07 1.07286e-07 -5.99595e-09 -7.15949e-08 -1.22179e-08 -6.35664e-08 -1.84299e-08 -5.59675e-08 -2.46252e-08 -4.86422e-08 -3.07796e-08 -4.12779e-08 -3.68877e-08 -3.37486e-08 -4.29748e-08 -2.59436e-08 -4.90114e-08 -1.78687e-08 -5.50073e-08 -9.45617e-09 -6.09346e-08 -6.56401e-10 -6.67535e-08 8.58891e-09 -7.24569e-08 1.83874e-08 -7.80774e-08 2.90739e-08 -8.30549e-08 3.86818e-08 -8.7682e-08 4.64567e-08 -9.22959e-08 5.22215e-08 -9.65152e-08 5.55133e-08 -1.01111e-07 5.76157e-08 -1.05983e-07 6.03084e-08 -1.10967e-07 6.31842e-08 -1.1654e-07 6.60954e-08 -1.22333e-07 6.90369e-08 -1.28158e-07 7.19386e-08 -1.34244e-07 7.49161e-08 -1.40431e-07 7.79618e-08 -1.46661e-07 8.07367e-08 -1.52983e-07 8.35005e-08 -1.59331e-07 8.61701e-08 -1.65677e-07 8.8602e-08 -1.71926e-07 9.05201e-08 -1.77704e-07 9.14624e-08 -1.82453e-07 9.12377e-08 -1.85714e-07 9.03302e-08 -1.87418e-07 8.94965e-08 -1.87738e-07 8.93227e-08 -1.86822e-07 9.00417e-08 -1.8483e-07 9.19251e-08 -1.82106e-07 9.52142e-08 -1.78149e-07 9.85885e-08 1.02362e-07 -6.35621e-09 -6.52385e-08 -1.29524e-08 -5.697e-08 -1.95719e-08 -4.93478e-08 -2.61693e-08 -4.20446e-08 -3.27536e-08 -3.46935e-08 -3.93323e-08 -2.71697e-08 -4.58679e-08 -1.94079e-08 -5.23631e-08 -1.13734e-08 -5.87819e-08 -3.03732e-09 -6.50712e-08 5.63291e-09 -7.11511e-08 1.46688e-08 -7.69234e-08 2.41597e-08 -8.22976e-08 3.44481e-08 -8.66797e-08 4.30638e-08 -9.09254e-08 5.07024e-08 -9.49722e-08 5.62683e-08 -9.92914e-08 5.98326e-08 -1.04652e-07 6.29762e-08 -1.10452e-07 6.61088e-08 -1.16555e-07 6.92871e-08 -1.22889e-07 7.2429e-08 -1.29371e-07 7.55192e-08 -1.35988e-07 7.85558e-08 -1.42717e-07 8.16454e-08 -1.49266e-07 8.4511e-08 -1.55833e-07 8.73038e-08 -1.62364e-07 9.00317e-08 -1.68943e-07 9.27492e-08 -1.75632e-07 9.52907e-08 -1.82499e-07 9.73874e-08 -1.89067e-07 9.80305e-08 -1.94151e-07 9.63218e-08 -1.96672e-07 9.28519e-08 -1.97233e-07 9.00572e-08 -1.96237e-07 8.83267e-08 -1.93859e-07 8.76648e-08 -1.90085e-07 8.81506e-08 -1.84644e-07 8.97734e-08 -1.77604e-07 9.15483e-08 9.43874e-08 -6.59832e-09 -5.86401e-08 -1.34636e-08 -5.01045e-08 -2.03755e-08 -4.24358e-08 -2.72869e-08 -3.51331e-08 -3.4202e-08 -2.77783e-08 -4.11111e-08 -2.02606e-08 -4.79919e-08 -1.2527e-08 -5.4812e-08 -4.55336e-09 -6.15186e-08 3.6693e-09 -6.80266e-08 1.21409e-08 -7.42127e-08 2.08548e-08 -7.98532e-08 2.98001e-08 -8.4554e-08 3.91488e-08 -8.88084e-08 4.73183e-08 -9.34067e-08 5.53007e-08 -9.8123e-08 6.09847e-08 -1.03631e-07 6.53407e-08 -1.09873e-07 6.92182e-08 -1.16623e-07 7.28587e-08 -1.23675e-07 7.63398e-08 -1.30922e-07 7.96754e-08 -1.38259e-07 8.2857e-08 -1.45564e-07 8.58608e-08 -1.52605e-07 8.86867e-08 -1.59469e-07 9.13746e-08 -1.66136e-07 9.39708e-08 -1.72713e-07 9.66096e-08 -1.79262e-07 9.92976e-08 -1.8597e-07 1.01999e-07 -1.93224e-07 1.04642e-07 -2.01491e-07 1.06298e-07 -2.05266e-07 1.00097e-07 -2.05616e-07 9.3202e-08 -2.0447e-07 8.8911e-08 -2.02054e-07 8.59109e-08 -1.98459e-07 8.40701e-08 -1.93578e-07 8.32703e-08 -1.87048e-07 8.32437e-08 -1.79497e-07 8.39967e-08 8.60758e-08 -6.72009e-09 -5.19199e-08 -1.37536e-08 -4.3071e-08 -2.087e-08 -3.53193e-08 -2.80164e-08 -2.79867e-08 -3.51791e-08 -2.06156e-08 -4.23425e-08 -1.30972e-08 -4.94859e-08 -5.38364e-09 -5.65783e-08 2.53894e-09 -6.35733e-08 1.06643e-08 -7.04016e-08 1.89692e-08 -7.69656e-08 2.74187e-08 -8.31385e-08 3.59731e-08 -8.84664e-08 4.44767e-08 -9.31511e-08 5.20031e-08 -9.82329e-08 6.03826e-08 -1.03838e-07 6.65903e-08 -1.10151e-07 7.16536e-08 -1.17122e-07 7.61887e-08 -1.24538e-07 8.02748e-08 -1.32253e-07 8.40551e-08 -1.40181e-07 8.76038e-08 -1.48221e-07 9.0897e-08 -1.56165e-07 9.38049e-08 -1.6369e-07 9.62118e-08 -1.70968e-07 9.86526e-08 -1.77948e-07 1.00951e-07 -1.8488e-07 1.03542e-07 -1.91911e-07 1.06328e-07 -1.99202e-07 1.0929e-07 -2.06406e-07 1.11845e-07 -2.09077e-07 1.08969e-07 -2.08769e-07 9.97893e-08 -2.0809e-07 9.25237e-08 -2.06351e-07 8.71723e-08 -2.03682e-07 8.32413e-08 -2.00075e-07 8.04641e-08 -1.95479e-07 7.86743e-08 -1.90005e-07 7.77696e-08 -1.83778e-07 7.77696e-08 7.85583e-08 -6.72908e-09 -4.51908e-08 -1.38879e-08 -3.59122e-08 -2.11549e-08 -2.80524e-08 -2.84898e-08 -2.06519e-08 -3.58503e-08 -1.32551e-08 -4.32194e-08 -5.72825e-09 -5.05769e-08 1.97382e-09 -5.78974e-08 9.85938e-09 -6.51454e-08 1.79122e-08 -7.22739e-08 2.60976e-08 -7.92217e-08 3.43666e-08 -8.58962e-08 4.26476e-08 -9.22803e-08 5.0861e-08 -9.94081e-08 5.9131e-08 -1.05412e-07 6.63866e-08 -1.11597e-07 7.27754e-08 -1.18396e-07 7.84532e-08 -1.258e-07 8.3592e-08 -1.33573e-07 8.80483e-08 -1.4165e-07 9.21323e-08 -1.50001e-07 9.59544e-08 -1.58547e-07 9.9443e-08 -1.67077e-07 1.02336e-07 -1.75229e-07 1.04363e-07 -1.8231e-07 1.05734e-07 -1.89119e-07 1.0776e-07 -1.95766e-07 1.1019e-07 -2.02494e-07 1.13057e-07 -2.0804e-07 1.14835e-07 -2.09627e-07 1.13433e-07 -2.08469e-07 1.07811e-07 -2.07529e-07 9.88499e-08 -2.06373e-07 9.13673e-08 -2.04691e-07 8.54907e-08 -2.02352e-07 8.09029e-08 -1.99318e-07 7.74303e-08 -1.95594e-07 7.495e-08 -1.912e-07 7.33756e-08 -1.8608e-07 7.26495e-08 7.27311e-08 -6.80549e-09 -3.83853e-08 -1.40573e-08 -2.86605e-08 -2.14489e-08 -2.06609e-08 -2.89249e-08 -1.3176e-08 -3.64555e-08 -5.72453e-09 -4.40228e-08 1.83893e-09 -5.1614e-08 9.56502e-09 -5.92171e-08 1.74624e-08 -6.68193e-08 2.55143e-08 -7.44067e-08 3.3685e-08 -8.19622e-08 4.19221e-08 -8.94584e-08 5.01438e-08 -9.68725e-08 5.82751e-08 -1.03867e-07 6.61254e-08 -1.10925e-07 7.3445e-08 -1.18261e-07 8.01113e-08 -1.26e-07 8.61924e-08 -1.34057e-07 9.16493e-08 -1.42386e-07 9.63776e-08 -1.50999e-07 1.00746e-07 -1.59774e-07 1.04729e-07 -1.68708e-07 1.08377e-07 -1.77743e-07 1.11371e-07 -1.85375e-07 1.11996e-07 -1.92257e-07 1.12615e-07 -1.98548e-07 1.14052e-07 -2.04346e-07 1.15988e-07 -2.08913e-07 1.17623e-07 -2.10869e-07 1.16792e-07 -2.10121e-07 1.12684e-07 -2.07395e-07 1.05085e-07 -2.05228e-07 9.66822e-08 -2.03444e-07 8.95833e-08 -2.01511e-07 8.35582e-08 -1.99232e-07 7.8624e-08 -1.96511e-07 7.47095e-08 -1.93313e-07 7.17522e-08 -1.89635e-07 6.96979e-08 -1.8549e-07 6.85043e-08 6.81407e-08 -6.90026e-09 -3.14851e-08 -1.42444e-08 -2.13166e-08 -2.17495e-08 -1.3156e-08 -2.93582e-08 -5.56736e-09 -3.70456e-08 1.96277e-09 -4.4798e-08 9.59122e-09 -5.26077e-08 1.73746e-08 -6.04703e-08 2.53249e-08 -6.83844e-08 3.34283e-08 -7.63514e-08 4.16519e-08 -8.4366e-08 4.99367e-08 -9.24433e-08 5.82211e-08 -1.00404e-07 6.62357e-08 -1.08281e-07 7.40027e-08 -1.16209e-07 8.13733e-08 -1.24395e-07 8.8297e-08 -1.32871e-07 9.46685e-08 -1.41715e-07 1.00493e-07 -1.51001e-07 1.05664e-07 -1.60504e-07 1.10249e-07 -1.70132e-07 1.14357e-07 -1.79497e-07 1.17742e-07 -1.87387e-07 1.19261e-07 -1.93711e-07 1.18321e-07 -1.99665e-07 1.18569e-07 -2.04896e-07 1.19283e-07 -2.09057e-07 1.20149e-07 -2.10813e-07 1.19379e-07 -2.10213e-07 1.16192e-07 -2.07612e-07 1.10083e-07 -2.04414e-07 1.01887e-07 -2.01971e-07 9.42402e-08 -1.99721e-07 8.73331e-08 -1.97446e-07 8.12828e-08 -1.94962e-07 7.61401e-08 -1.92169e-07 7.19169e-08 -1.89023e-07 6.86063e-08 -1.85513e-07 6.61879e-08 -1.8165e-07 6.4641e-08 6.39375e-08 -7.00421e-09 -2.4481e-08 -1.44598e-08 -1.38612e-08 -2.20834e-08 -5.53253e-09 -2.98282e-08 2.17735e-09 -3.76721e-08 9.80658e-09 -4.56049e-08 1.75238e-08 -5.36217e-08 2.53913e-08 -6.17218e-08 3.34247e-08 -6.99078e-08 4.16141e-08 -7.81801e-08 4.9924e-08 -8.65678e-08 5.83244e-08 -9.50672e-08 6.67205e-08 -1.03692e-07 7.48605e-08 -1.12242e-07 8.25529e-08 -1.20899e-07 9.00298e-08 -1.29746e-07 9.71446e-08 -1.38944e-07 1.03867e-07 -1.48479e-07 1.10028e-07 -1.5833e-07 1.15515e-07 -1.68364e-07 1.20283e-07 -1.78042e-07 1.24035e-07 -1.86238e-07 1.25939e-07 -1.92496e-07 1.25519e-07 -1.99231e-07 1.25057e-07 -2.04583e-07 1.2392e-07 -2.08519e-07 1.23219e-07 -2.10334e-07 1.21964e-07 -2.09806e-07 1.18851e-07 -2.07674e-07 1.14059e-07 -2.04304e-07 1.06714e-07 -2.01334e-07 9.8916e-08 -1.98655e-07 9.15614e-08 -1.96027e-07 8.47055e-08 -1.93299e-07 7.85547e-08 -1.90364e-07 7.32048e-08 -1.87158e-07 6.87112e-08 -1.8365e-07 6.50989e-08 -1.79831e-07 6.23685e-08 -1.75698e-07 6.05078e-08 5.94854e-08 -7.12234e-09 -1.73588e-08 -1.46971e-08 -6.28673e-09 -2.24567e-08 2.22695e-09 -3.03499e-08 1.00704e-08 -3.83587e-08 1.78152e-08 -4.64768e-08 2.56418e-08 -5.47041e-08 3.36184e-08 -6.30451e-08 4.17656e-08 -7.15052e-08 5.0074e-08 -8.01106e-08 5.85293e-08 -8.88659e-08 6.70796e-08 -9.77222e-08 7.55767e-08 -1.06629e-07 8.37667e-08 -1.15623e-07 9.15478e-08 -1.24762e-07 9.91688e-08 -1.34161e-07 1.06544e-07 -1.43836e-07 1.13541e-07 -1.53817e-07 1.20009e-07 -1.64225e-07 1.25923e-07 -1.74499e-07 1.30557e-07 -1.83798e-07 1.33333e-07 -1.91813e-07 1.33954e-07 -1.99047e-07 1.32753e-07 -2.04938e-07 1.30948e-07 -2.09525e-07 1.28508e-07 -2.12122e-07 1.25816e-07 -2.11677e-07 1.21519e-07 -2.08799e-07 1.15972e-07 -2.05748e-07 1.11009e-07 -2.02541e-07 1.03507e-07 -1.99557e-07 9.59321e-08 -1.96473e-07 8.84782e-08 -1.93265e-07 8.14969e-08 -1.89873e-07 7.51633e-08 -1.86262e-07 6.95935e-08 -1.82408e-07 6.4858e-08 -1.78301e-07 6.09917e-08 -1.73935e-07 5.80027e-08 -1.69303e-07 5.58756e-08 5.45722e-08 -7.24779e-09 -1.01112e-08 -1.49644e-08 1.42959e-09 -2.28721e-08 1.01345e-08 -3.09221e-08 1.81201e-08 -3.90974e-08 2.59903e-08 -4.73937e-08 3.3938e-08 -5.58136e-08 4.20381e-08 -6.43635e-08 5.03154e-08 -7.30597e-08 5.87701e-08 -8.19254e-08 6.73948e-08 -9.08663e-08 7.60204e-08 -9.98133e-08 8.45237e-08 -1.08825e-07 9.27788e-08 -1.18043e-07 1.00765e-07 -1.27492e-07 1.08619e-07 -1.37212e-07 1.16263e-07 -1.4721e-07 1.2354e-07 -1.57637e-07 1.30436e-07 -1.68189e-07 1.36475e-07 -1.78258e-07 1.40627e-07 -1.87507e-07 1.42582e-07 -1.95557e-07 1.42004e-07 -2.0256e-07 1.39756e-07 -2.08057e-07 1.36444e-07 -2.11774e-07 1.32225e-07 -2.13064e-07 1.27106e-07 -2.12725e-07 1.2118e-07 -2.11253e-07 1.14501e-07 -2.07497e-07 1.07252e-07 -2.03799e-07 9.98093e-08 -1.9991e-07 9.20432e-08 -1.95907e-07 8.44753e-08 -1.91781e-07 7.7371e-08 -1.8752e-07 7.09024e-08 -1.83111e-07 6.51842e-08 -1.78541e-07 6.02879e-08 -1.738e-07 5.62517e-08 -1.68883e-07 5.30854e-08 -1.6378e-07 5.07731e-08 4.92693e-08 -7.41245e-09 -2.69889e-09 -1.52814e-08 9.29823e-09 -2.3351e-08 1.82039e-08 -3.15656e-08 2.63346e-08 -3.99074e-08 3.43319e-08 -4.83716e-08 4.2402e-08 -5.69601e-08 5.06265e-08 -6.56787e-08 5.90338e-08 -7.45593e-08 6.76506e-08 -8.35222e-08 7.63577e-08 -9.25056e-08 8.50038e-08 -1.01531e-07 9.35486e-08 -1.10611e-07 1.01859e-07 -1.19883e-07 1.10037e-07 -1.29378e-07 1.18114e-07 -1.39131e-07 1.26016e-07 -1.49251e-07 1.3366e-07 -1.59696e-07 1.40881e-07 -1.69992e-07 1.46771e-07 -1.7994e-07 1.50575e-07 -1.89028e-07 1.5167e-07 -1.97183e-07 1.5016e-07 -2.04245e-07 1.46818e-07 -2.0962e-07 1.41819e-07 -2.12963e-07 1.35569e-07 -2.14308e-07 1.2845e-07 -2.13835e-07 1.20708e-07 -2.11814e-07 1.1248e-07 -2.08613e-07 1.04052e-07 -2.04539e-07 9.57348e-08 -2.00087e-07 8.7592e-08 -1.95427e-07 7.98148e-08 -1.90634e-07 7.25786e-08 -1.85744e-07 6.60122e-08 -1.80767e-07 6.0207e-08 -1.75702e-07 5.52232e-08 -1.70545e-07 5.10948e-08 -1.65294e-07 4.78347e-08 -1.59954e-07 4.5433e-08 4.38354e-08 -7.59112e-09 4.89206e-09 -1.56623e-08 1.73692e-08 -2.39181e-08 2.64595e-08 -3.23135e-08 3.47299e-08 -4.08326e-08 4.2851e-08 -4.94691e-08 5.10385e-08 -5.8222e-08 5.93793e-08 -6.71081e-08 6.79199e-08 -7.61181e-08 7.66606e-08 -8.51585e-08 8.53981e-08 -9.42116e-08 9.40568e-08 -1.03212e-07 1.02549e-07 -1.12268e-07 1.10915e-07 -1.21449e-07 1.19218e-07 -1.30736e-07 1.27402e-07 -1.40129e-07 1.35409e-07 -1.49925e-07 1.43456e-07 -1.59663e-07 1.50619e-07 -1.69422e-07 1.5653e-07 -1.79137e-07 1.6029e-07 -1.88552e-07 1.61085e-07 -1.97551e-07 1.59159e-07 -2.05183e-07 1.54451e-07 -2.10713e-07 1.47349e-07 -2.13857e-07 1.38713e-07 -2.14775e-07 1.29368e-07 -2.13808e-07 1.19741e-07 -2.11417e-07 1.10089e-07 -2.08012e-07 1.00646e-07 -2.03847e-07 9.15696e-08 -1.99225e-07 8.29703e-08 -1.94351e-07 7.49411e-08 -1.89343e-07 6.75705e-08 -1.84263e-07 6.09325e-08 -1.7914e-07 5.50837e-08 -1.7398e-07 5.00637e-08 -1.68781e-07 4.58958e-08 -1.63541e-07 4.2594e-08 -1.58296e-07 4.01883e-08 3.86379e-08 -7.84418e-09 1.27361e-08 -1.61265e-08 2.56513e-08 -2.45849e-08 3.49178e-08 -3.31851e-08 4.33299e-08 -4.19073e-08 5.15731e-08 -5.07407e-08 5.98719e-08 -5.96795e-08 6.83181e-08 -6.87325e-08 7.69729e-08 -7.78482e-08 8.57763e-08 -8.69782e-08 9.45282e-08 -9.60898e-08 1.03168e-07 -1.05175e-07 1.11633e-07 -1.14279e-07 1.2002e-07 -1.23457e-07 1.28396e-07 -1.32529e-07 1.36473e-07 -1.41505e-07 1.44385e-07 -1.50095e-07 1.52046e-07 -1.58475e-07 1.58999e-07 -1.67309e-07 1.65364e-07 -1.76754e-07 1.69735e-07 -1.87053e-07 1.71384e-07 -1.97579e-07 1.69685e-07 -2.06517e-07 1.63389e-07 -2.12084e-07 1.52916e-07 -2.14501e-07 1.4113e-07 -2.14545e-07 1.29412e-07 -2.12848e-07 1.18044e-07 -2.09938e-07 1.07179e-07 -2.06205e-07 9.69128e-08 -2.01942e-07 8.73067e-08 -1.97367e-07 7.83951e-08 -1.92634e-07 7.02085e-08 -1.87842e-07 6.27784e-08 -1.83046e-07 5.61365e-08 -1.78273e-07 5.0311e-08 -1.73531e-07 4.53215e-08 -1.68809e-07 4.11737e-08 -1.64062e-07 3.78469e-08 -1.59233e-07 3.53591e-08 3.39657e-08 -8.06395e-09 2.07999e-08 -1.65833e-08 3.41705e-08 -2.52981e-08 4.36324e-08 -3.41564e-08 5.21882e-08 -4.31397e-08 6.05564e-08 -5.22321e-08 6.89643e-08 -6.14162e-08 7.75023e-08 -7.06801e-08 8.62368e-08 -7.99725e-08 9.50688e-08 -8.92663e-08 1.03822e-07 -9.86003e-08 1.12502e-07 -1.07772e-07 1.20805e-07 -1.16922e-07 1.2917e-07 -1.26047e-07 1.37521e-07 -1.35235e-07 1.45661e-07 -1.43521e-07 1.52671e-07 -1.50855e-07 1.5938e-07 -1.58264e-07 1.66408e-07 -1.66046e-07 1.73147e-07 -1.74561e-07 1.78249e-07 -1.84934e-07 1.81757e-07 -1.99624e-07 1.84375e-07 -2.10519e-07 1.74284e-07 -2.13928e-07 1.56325e-07 -2.1431e-07 1.41512e-07 -2.12757e-07 1.27859e-07 -2.10003e-07 1.15291e-07 -2.06528e-07 1.03704e-07 -2.0264e-07 9.30245e-08 -1.98536e-07 8.3203e-08 -1.9435e-07 7.4209e-08 -1.90169e-07 6.60279e-08 -1.86051e-07 5.86604e-08 -1.82036e-07 5.2121e-08 -1.78158e-07 4.64333e-08 -1.74441e-07 4.16044e-08 -1.70899e-07 3.7632e-08 -1.67472e-07 3.44197e-08 -1.63933e-07 3.18192e-08 2.99547e-08 -8.28236e-09 2.90822e-08 -1.70483e-08 4.29364e-08 -2.60454e-08 5.26294e-08 -3.52083e-08 6.13511e-08 -4.4529e-08 6.9877e-08 -5.39871e-08 7.84225e-08 -6.35577e-08 8.7073e-08 -7.31809e-08 9.58601e-08 -8.28429e-08 1.04731e-07 -9.25368e-08 1.13516e-07 -1.02309e-07 1.22275e-07 -1.12355e-07 1.3085e-07 -1.22357e-07 1.39173e-07 -1.31968e-07 1.47132e-07 -1.41236e-07 1.54929e-07 -1.49204e-07 1.60639e-07 -1.56411e-07 1.66587e-07 -1.62957e-07 1.72954e-07 -1.69212e-07 1.79402e-07 -1.7702e-07 1.86057e-07 -1.87657e-07 1.92394e-07 -2.01317e-07 1.98034e-07 -2.08321e-07 1.81288e-07 -2.0979e-07 1.57794e-07 -2.08588e-07 1.40311e-07 -2.06209e-07 1.2548e-07 -2.03218e-07 1.123e-07 -1.99938e-07 1.00424e-07 -1.96563e-07 8.96487e-08 -1.932e-07 7.98409e-08 -1.89913e-07 7.09213e-08 -1.86733e-07 6.28484e-08 -1.83679e-07 5.56067e-08 -1.80767e-07 4.92082e-08 -1.7803e-07 4.36964e-08 -1.75499e-07 3.90738e-08 -1.7305e-07 3.51832e-08 -1.70732e-07 3.21018e-08 -1.68019e-07 2.91062e-08 2.66441e-08 -8.49568e-09 3.75778e-08 -1.75188e-08 5.19595e-08 -2.67731e-08 6.18838e-08 -3.62307e-08 7.08088e-08 -4.59186e-08 7.9565e-08 -5.58707e-08 8.83747e-08 -6.59092e-08 9.71116e-08 -7.61011e-08 1.06052e-07 -8.64161e-08 1.15046e-07 -9.68891e-08 1.23989e-07 -1.07786e-07 1.33172e-07 -1.19145e-07 1.42209e-07 -1.30747e-07 1.50775e-07 -1.42105e-07 1.5849e-07 -1.50936e-07 1.63761e-07 -1.58385e-07 1.68088e-07 -1.65268e-07 1.7347e-07 -1.72078e-07 1.79764e-07 -1.7967e-07 1.86994e-07 -1.89435e-07 1.95822e-07 -1.99099e-07 2.02058e-07 -1.99494e-07 1.98429e-07 -1.99341e-07 1.81136e-07 -1.98822e-07 1.57276e-07 -1.97086e-07 1.38574e-07 -1.95003e-07 1.23398e-07 -1.92765e-07 1.10061e-07 -1.9051e-07 9.81688e-08 -1.88322e-07 8.74607e-08 -1.86244e-07 7.77634e-08 -1.84293e-07 6.89703e-08 -1.82467e-07 6.10221e-08 -1.8075e-07 5.38897e-08 -1.79115e-07 4.75734e-08 -1.77512e-07 4.20931e-08 -1.75977e-07 3.7539e-08 -1.74202e-07 3.34082e-08 -1.71898e-07 2.97972e-08 -1.69314e-07 2.65228e-08 2.36199e-08 -8.71295e-09 4.62907e-08 -1.79345e-08 6.11812e-08 -2.73857e-08 7.13351e-08 -3.70508e-08 8.04741e-08 -4.69722e-08 8.94866e-08 -5.72931e-08 9.86958e-08 -6.81229e-08 1.07942e-07 -7.87239e-08 1.16653e-07 -8.92803e-08 1.25603e-07 -1.00137e-07 1.34846e-07 -1.1124e-07 1.44274e-07 -1.22991e-07 1.5396e-07 -1.36056e-07 1.6384e-07 -1.48878e-07 1.71312e-07 -1.57254e-07 1.72138e-07 -1.64546e-07 1.7538e-07 -1.71269e-07 1.80193e-07 -1.78386e-07 1.86881e-07 -1.8691e-07 1.95518e-07 -1.94185e-07 2.03097e-07 -1.96304e-07 2.04177e-07 -1.93544e-07 1.95669e-07 -1.89043e-07 1.76634e-07 -1.85587e-07 1.53819e-07 -1.83589e-07 1.36576e-07 -1.82069e-07 1.21878e-07 -1.80872e-07 1.08864e-07 -1.79918e-07 9.72152e-08 -1.79162e-07 8.67046e-08 -1.78575e-07 7.71757e-08 -1.78131e-07 6.85269e-08 -1.77805e-07 6.06964e-08 -1.77563e-07 5.36469e-08 -1.77349e-07 4.73595e-08 -1.7709e-07 4.18341e-08 -1.76526e-07 3.69748e-08 -1.75411e-07 3.22933e-08 -1.74083e-07 2.84691e-08 -1.73044e-07 2.54842e-08 2.23229e-08 -9.03754e-09 5.53283e-08 -1.85227e-08 7.06666e-08 -2.82198e-08 8.10325e-08 -3.81331e-08 9.03877e-08 -4.83548e-08 9.97085e-08 -5.90071e-08 1.09348e-07 -7.00177e-08 1.18952e-07 -8.0881e-08 1.27517e-07 -9.17843e-08 1.36506e-07 -1.02777e-07 1.45838e-07 -1.13925e-07 1.55423e-07 -1.25903e-07 1.65937e-07 -1.39679e-07 1.77616e-07 -1.50248e-07 1.81881e-07 -1.59468e-07 1.81358e-07 -1.6678e-07 1.82692e-07 -1.72961e-07 1.86374e-07 -1.7967e-07 1.9359e-07 -1.85959e-07 2.01808e-07 -1.88369e-07 2.05507e-07 -1.86176e-07 2.01984e-07 -1.80373e-07 1.89866e-07 -1.73724e-07 1.69985e-07 -1.70673e-07 1.50768e-07 -1.69413e-07 1.35316e-07 -1.68967e-07 1.21432e-07 -1.69045e-07 1.08941e-07 -1.69463e-07 9.76339e-08 -1.70114e-07 8.73549e-08 -1.7093e-07 7.79919e-08 -1.71866e-07 6.94627e-08 -1.72881e-07 6.17115e-08 -1.73931e-07 5.46971e-08 -1.7496e-07 4.83889e-08 -1.75882e-07 4.27553e-08 -1.76611e-07 3.77038e-08 -1.77637e-07 3.332e-08 -1.78543e-07 2.93751e-08 -1.78831e-07 2.57716e-08 2.26038e-08 -9.40812e-09 6.47366e-08 -1.91508e-08 8.04098e-08 -2.90723e-08 9.09542e-08 -3.91929e-08 1.00509e-07 -4.96113e-08 1.10127e-07 -6.0544e-08 1.20281e-07 -7.14171e-08 1.29825e-07 -8.27756e-08 1.38875e-07 -9.43556e-08 1.48086e-07 -1.06506e-07 1.57989e-07 -1.19205e-07 1.68122e-07 -1.32536e-07 1.79269e-07 -1.45595e-07 1.90675e-07 -1.55064e-07 1.9135e-07 -1.63245e-07 1.8954e-07 -1.70137e-07 1.89584e-07 -1.75466e-07 1.91704e-07 -1.79254e-07 1.97377e-07 -1.80879e-07 2.03433e-07 -1.78397e-07 2.03025e-07 -1.72578e-07 1.96166e-07 -1.64915e-07 1.82203e-07 -1.59508e-07 1.64579e-07 -1.57697e-07 1.48956e-07 -1.57299e-07 1.34918e-07 -1.57825e-07 1.21958e-07 -1.5893e-07 1.10047e-07 -1.60411e-07 9.91141e-08 -1.62145e-07 8.90887e-08 -1.64058e-07 7.99055e-08 -1.66105e-07 7.15098e-08 -1.68252e-07 6.38582e-08 -1.7047e-07 5.69145e-08 -1.72728e-07 5.06477e-08 -1.74997e-07 4.50236e-08 -1.77313e-07 4.002e-08 -1.79548e-07 3.55546e-08 -1.81741e-07 3.1568e-08 -1.83984e-07 2.8015e-08 2.48307e-08 -9.59302e-09 7.43299e-08 -1.94831e-08 9.03002e-08 -2.9475e-08 1.00946e-07 -3.96099e-08 1.10644e-07 -4.99643e-08 1.20482e-07 -6.03782e-08 1.30695e-07 -7.11642e-08 1.40611e-07 -8.24891e-08 1.502e-07 -9.45628e-08 1.6016e-07 -1.07834e-07 1.71261e-07 -1.23064e-07 1.83353e-07 -1.38769e-07 1.94974e-07 -1.50765e-07 2.02671e-07 -1.58283e-07 1.98868e-07 -1.65526e-07 1.96782e-07 -1.72084e-07 1.96142e-07 -1.77378e-07 1.96998e-07 -1.79775e-07 1.99773e-07 -1.768e-07 2.00457e-07 -1.68143e-07 1.94368e-07 -1.60251e-07 1.88274e-07 -1.53267e-07 1.75218e-07 -1.49847e-07 1.61159e-07 -1.48727e-07 1.47836e-07 -1.48796e-07 1.34987e-07 -1.49728e-07 1.2289e-07 -1.51271e-07 1.11589e-07 -1.53252e-07 1.01096e-07 -1.55559e-07 9.1396e-08 -1.58118e-07 8.24639e-08 -1.60879e-07 7.42708e-08 -1.63809e-07 6.67885e-08 -1.66885e-07 5.99902e-08 -1.70087e-07 5.38501e-08 -1.73405e-07 4.83416e-08 -1.76816e-07 4.34312e-08 -1.80339e-07 3.90776e-08 -1.84008e-07 3.52374e-08 -1.87858e-07 3.18654e-08 2.89329e-08 -9.57102e-09 8.39012e-08 -1.92907e-08 1.0002e-07 -2.89441e-08 1.106e-07 -3.84994e-08 1.20199e-07 -4.78975e-08 1.2988e-07 -5.71683e-08 1.39966e-07 -6.63041e-08 1.49747e-07 -7.59242e-08 1.5982e-07 -8.60571e-08 1.70293e-07 -9.65405e-08 1.81744e-07 -1.07978e-07 1.94791e-07 -1.23714e-07 2.1071e-07 -1.35821e-07 2.14778e-07 -1.46743e-07 2.09791e-07 -1.55703e-07 2.05743e-07 -1.63003e-07 2.03442e-07 -1.68405e-07 2.024e-07 -1.6979e-07 2.01158e-07 -1.67421e-07 1.98089e-07 -1.62419e-07 1.89366e-07 -1.54399e-07 1.80254e-07 -1.48768e-07 1.69588e-07 -1.45644e-07 1.58035e-07 -1.44004e-07 1.46196e-07 -1.43631e-07 1.34614e-07 -1.44232e-07 1.23491e-07 -1.45588e-07 1.12945e-07 -1.47534e-07 1.03041e-07 -1.49945e-07 9.38073e-08 -1.52735e-07 8.52536e-08 -1.55841e-07 7.73773e-08 -1.59222e-07 7.01694e-08 -1.62849e-07 6.36173e-08 -1.66704e-07 5.77055e-08 -1.70779e-07 5.2416e-08 -1.75075e-07 4.77281e-08 -1.79618e-07 4.36205e-08 -1.84457e-07 4.0076e-08 -1.89665e-07 3.70734e-08 3.4511e-08 -9.5839e-09 9.34853e-08 -1.92191e-08 1.09656e-07 -2.86392e-08 1.2002e-07 -3.77848e-08 1.29345e-07 -4.66159e-08 1.38711e-07 -5.51065e-08 1.48457e-07 -6.37023e-08 1.58343e-07 -7.2851e-08 1.68969e-07 -8.28027e-08 1.80245e-07 -9.37469e-08 1.92688e-07 -1.06238e-07 2.07282e-07 -1.19305e-07 2.23777e-07 -1.28951e-07 2.24424e-07 -1.36805e-07 2.17645e-07 -1.43448e-07 2.12386e-07 -1.48755e-07 2.08748e-07 -1.52793e-07 2.06438e-07 -1.55211e-07 2.03577e-07 -1.53284e-07 1.96161e-07 -1.50637e-07 1.86719e-07 -1.46874e-07 1.76491e-07 -1.43287e-07 1.66001e-07 -1.40605e-07 1.55353e-07 -1.39055e-07 1.44645e-07 -1.38543e-07 1.34102e-07 -1.38939e-07 1.23888e-07 -1.40109e-07 1.14115e-07 -1.41928e-07 1.0486e-07 -1.44294e-07 9.61737e-08 -1.47126e-07 8.80859e-08 -1.50363e-07 8.06141e-08 -1.53959e-07 7.37658e-08 -1.57883e-07 6.75412e-08 -1.62112e-07 6.19347e-08 -1.66633e-07 5.69369e-08 -1.71441e-07 5.25367e-08 -1.76547e-07 4.8726e-08 -1.8198e-07 4.55095e-08 -1.87794e-07 4.28868e-08 4.05722e-08 -9.89774e-09 1.03383e-07 -1.9858e-08 1.19616e-07 -2.95394e-08 1.29702e-07 -3.89376e-08 1.38743e-07 -4.81028e-08 1.47877e-07 -5.71361e-08 1.5749e-07 -6.66166e-08 1.67824e-07 -7.68224e-08 1.79175e-07 -8.78305e-08 1.91253e-07 -9.96659e-08 2.04524e-07 -1.13904e-07 2.2152e-07 -1.2385e-07 2.33724e-07 -1.28496e-07 2.2907e-07 -1.32153e-07 2.21302e-07 -1.35041e-07 2.15274e-07 -1.37952e-07 2.11659e-07 -1.40195e-07 2.08682e-07 -1.41357e-07 2.04738e-07 -1.40088e-07 1.94892e-07 -1.38234e-07 1.84865e-07 -1.36307e-07 1.74564e-07 -1.34474e-07 1.64168e-07 -1.33005e-07 1.53884e-07 -1.32144e-07 1.43785e-07 -1.31982e-07 1.3394e-07 -1.3252e-07 1.24426e-07 -1.33716e-07 1.15312e-07 -1.35513e-07 1.06657e-07 -1.37849e-07 9.85094e-08 -1.40666e-07 9.09039e-08 -1.43919e-07 8.38668e-08 -1.47567e-07 7.74143e-08 -1.5158e-07 7.15539e-08 -1.5593e-07 6.62853e-08 -1.60596e-07 6.16022e-08 -1.65554e-07 5.74953e-08 -1.70788e-07 5.39597e-08 -1.76278e-07 5.0999e-08 -1.81993e-07 4.86024e-08 4.65038e-08 -1.05087e-08 1.13892e-07 -2.09125e-08 1.3002e-07 -3.10044e-08 1.39794e-07 -4.08598e-08 1.48598e-07 -5.05464e-08 1.57563e-07 -6.02032e-08 1.67147e-07 -7.00779e-08 1.77699e-07 -8.02266e-08 1.89324e-07 -9.11056e-08 2.02132e-07 -1.03897e-07 2.17315e-07 -1.17083e-07 2.34707e-07 -1.24411e-07 2.41052e-07 -1.2761e-07 2.32268e-07 -1.29545e-07 2.23237e-07 -1.30835e-07 2.16564e-07 -1.31869e-07 2.12692e-07 -1.32083e-07 2.08896e-07 -1.30216e-07 2.02872e-07 -1.29257e-07 1.93933e-07 -1.27897e-07 1.83506e-07 -1.26375e-07 1.73041e-07 -1.25099e-07 1.62892e-07 -1.24231e-07 1.53015e-07 -1.23864e-07 1.43418e-07 -1.24054e-07 1.34129e-07 -1.24813e-07 1.25184e-07 -1.26125e-07 1.16624e-07 -1.27959e-07 1.08492e-07 -1.30279e-07 1.00829e-07 -1.33045e-07 9.36702e-08 -1.36222e-07 8.7044e-08 -1.39777e-07 8.09688e-08 -1.43676e-07 7.54534e-08 -1.47888e-07 7.04969e-08 -1.52375e-07 6.60896e-08 -1.57095e-07 6.22151e-08 -1.61991e-07 5.88557e-08 -1.66995e-07 5.60025e-08 -1.72023e-07 5.36301e-08 5.15771e-08 -1.07549e-08 1.24647e-07 -2.1403e-08 1.40668e-07 -3.1776e-08 1.50167e-07 -4.19405e-08 1.58763e-07 -5.19247e-08 1.67547e-07 -6.16822e-08 1.76905e-07 -7.11543e-08 1.87171e-07 -8.06203e-08 1.9879e-07 -9.05769e-08 2.12089e-07 -1.02001e-07 2.2874e-07 -1.11184e-07 2.4389e-07 -1.17191e-07 2.4706e-07 -1.20815e-07 2.35892e-07 -1.23051e-07 2.25473e-07 -1.24137e-07 2.1765e-07 -1.23386e-07 2.11941e-07 -1.2179e-07 2.07301e-07 -1.19623e-07 2.00705e-07 -1.17937e-07 1.92248e-07 -1.1683e-07 1.82399e-07 -1.15508e-07 1.71719e-07 -1.14631e-07 1.62016e-07 -1.14224e-07 1.52608e-07 -1.14301e-07 1.43495e-07 -1.14862e-07 1.3469e-07 -1.15892e-07 1.26215e-07 -1.17372e-07 1.18104e-07 -1.19275e-07 1.10396e-07 -1.21575e-07 1.03129e-07 -1.24242e-07 9.63374e-08 -1.27246e-07 9.00488e-08 -1.30557e-07 8.42794e-08 -1.34137e-07 7.90335e-08 -1.37943e-07 7.43032e-08 -1.41923e-07 7.00698e-08 -1.46013e-07 6.63053e-08 -1.5013e-07 6.29723e-08 -1.54162e-07 6.00345e-08 -1.57973e-07 5.74411e-08 5.51022e-08 -1.02647e-08 1.34912e-07 -2.07498e-08 1.51153e-07 -3.11069e-08 1.60524e-07 -4.12617e-08 1.68918e-07 -5.12887e-08 1.77575e-07 -6.08677e-08 1.86484e-07 -6.95456e-08 1.95849e-07 -7.75539e-08 2.06799e-07 -8.57191e-08 2.20254e-07 -9.45903e-08 2.37611e-07 -9.93632e-08 2.48663e-07 -1.01614e-07 2.49311e-07 -1.0621e-07 2.40488e-07 -1.085e-07 2.27763e-07 -1.10227e-07 2.19378e-07 -1.10185e-07 2.11899e-07 -1.08981e-07 2.06097e-07 -1.06732e-07 1.98455e-07 -1.04694e-07 1.90209e-07 -1.03474e-07 1.81179e-07 -1.02898e-07 1.71142e-07 -1.02771e-07 1.61889e-07 -1.03056e-07 1.52893e-07 -1.03724e-07 1.44163e-07 -1.04748e-07 1.35714e-07 -1.06108e-07 1.27575e-07 -1.07783e-07 1.19779e-07 -1.09755e-07 1.12367e-07 -1.12001e-07 1.05375e-07 -1.14499e-07 9.88356e-08 -1.17222e-07 9.27723e-08 -1.20138e-07 8.71954e-08 -1.23206e-07 8.21012e-08 -1.26374e-07 7.74709e-08 -1.29576e-07 7.32719e-08 -1.32728e-07 6.94577e-08 -1.35728e-07 6.59715e-08 -1.38453e-07 6.27592e-08 -1.40764e-07 5.97525e-08 5.69213e-08 -9.382e-09 1.44294e-07 -1.91602e-08 1.60932e-07 -2.90592e-08 1.70423e-07 -3.90334e-08 1.78892e-07 -4.90665e-08 1.87608e-07 -5.93764e-08 1.96794e-07 -6.81972e-08 2.0467e-07 -7.52253e-08 2.13827e-07 -8.20693e-08 2.27098e-07 -8.7256e-08 2.42798e-07 -8.97619e-08 2.51169e-07 -9.08678e-08 2.50417e-07 -9.17791e-08 2.41399e-07 -9.27705e-08 2.28754e-07 -9.36606e-08 2.20268e-07 -9.43185e-08 2.12557e-07 -9.37278e-08 2.05506e-07 -9.21087e-08 1.96836e-07 -9.05865e-08 1.88687e-07 -8.9994e-08 1.80587e-07 -9.02842e-08 1.71432e-07 -9.09313e-08 1.62536e-07 -9.18796e-08 1.53842e-07 -9.30836e-08 1.45367e-07 -9.45117e-08 1.37142e-07 -9.61402e-08 1.29203e-07 -9.79492e-08 1.21589e-07 -9.99197e-08 1.14337e-07 -1.02031e-07 1.07486e-07 -1.0426e-07 1.01065e-07 -1.06577e-07 9.50897e-08 -1.08948e-07 8.95662e-08 -1.11329e-07 8.4482e-08 -1.13665e-07 7.98074e-08 -1.15889e-07 7.54966e-08 -1.1792e-07 7.14884e-08 -1.19658e-07 6.771e-08 -1.20962e-07 6.40628e-08 -1.21675e-07 6.04655e-08 5.68934e-08 -8.9888e-09 1.53283e-07 -1.81963e-08 1.70139e-07 -2.75167e-08 1.79744e-07 -3.68319e-08 1.88207e-07 -4.62519e-08 1.97028e-07 -5.59545e-08 2.06496e-07 -6.6014e-08 2.1473e-07 -7.40674e-08 2.2188e-07 -7.85612e-08 2.31592e-07 -8.04241e-08 2.44661e-07 -7.88417e-08 2.49586e-07 -7.70749e-08 2.4865e-07 -7.54659e-08 2.39791e-07 -7.59915e-08 2.2928e-07 -7.67006e-08 2.20977e-07 -7.73674e-08 2.13224e-07 -7.73398e-08 2.05479e-07 -7.80347e-08 1.97531e-07 -7.85768e-08 1.89229e-07 -7.86036e-08 1.80614e-07 -7.93037e-08 1.72132e-07 -8.03652e-08 1.63597e-07 -8.1688e-08 1.55164e-07 -8.32049e-08 1.46884e-07 -8.48646e-08 1.38802e-07 -8.66273e-08 1.30966e-07 -8.84603e-08 1.23422e-07 -9.03332e-08 1.1621e-07 -9.2215e-08 1.09368e-07 -9.40722e-08 1.02922e-07 -9.58689e-08 9.68863e-08 -9.75661e-08 9.12635e-08 -9.91211e-08 8.60371e-08 -1.00487e-07 8.1173e-08 -1.0161e-07 7.662e-08 -1.02435e-07 7.23134e-08 -1.02888e-07 6.81626e-08 -1.0285e-07 6.40243e-08 -1.02114e-07 5.97298e-08 5.52518e-08 -8.78191e-09 1.62065e-07 -1.78658e-08 1.79223e-07 -2.68059e-08 1.88684e-07 -3.53873e-08 1.96789e-07 -4.33975e-08 2.05038e-07 -5.1709e-08 2.14808e-07 -5.88777e-08 2.21898e-07 -6.54668e-08 2.2847e-07 -6.83367e-08 2.34462e-07 -6.67197e-08 2.43044e-07 -6.15359e-08 2.44403e-07 -5.82406e-08 2.45355e-07 -5.74348e-08 2.38985e-07 -5.89477e-08 2.30793e-07 -6.07462e-08 2.22776e-07 -6.23858e-08 2.14863e-07 -6.38192e-08 2.06912e-07 -6.50715e-08 1.98784e-07 -6.63094e-08 1.90467e-07 -6.77235e-08 1.82028e-07 -6.91786e-08 1.73587e-07 -7.07794e-08 1.65198e-07 -7.24963e-08 1.56881e-07 -7.42923e-08 1.4868e-07 -7.61298e-08 1.4064e-07 -7.79711e-08 1.32807e-07 -7.97776e-08 1.25228e-07 -8.15078e-08 1.17941e-07 -8.31161e-08 1.10976e-07 -8.4554e-08 1.0436e-07 -8.57743e-08 9.81069e-08 -8.6735e-08 9.22244e-08 -8.73984e-08 8.67009e-08 -8.77321e-08 8.15069e-08 -8.77084e-08 7.65965e-08 -8.73049e-08 7.19099e-08 -8.65179e-08 6.73756e-08 -8.53665e-08 6.28729e-08 -8.35724e-08 5.79355e-08 5.24625e-08 -8.49501e-09 1.7056e-07 -1.74995e-08 1.88228e-07 -2.64655e-08 1.9765e-07 -3.51512e-08 2.05475e-07 -4.32579e-08 2.13145e-07 -4.90825e-08 2.20633e-07 -5.38102e-08 2.26626e-07 -5.69471e-08 2.31607e-07 -5.79169e-08 2.35432e-07 -5.49134e-08 2.40041e-07 -5.02188e-08 2.39709e-07 -4.81619e-08 2.43299e-07 -4.77302e-08 2.38553e-07 -4.8813e-08 2.31876e-07 -5.04025e-08 2.24365e-07 -5.20787e-08 2.1654e-07 -5.37088e-08 2.08542e-07 -5.53321e-08 2.00407e-07 -5.70172e-08 1.92152e-07 -5.881e-08 1.8382e-07 -6.06957e-08 1.75473e-07 -6.26467e-08 1.67148e-07 -6.46396e-08 1.58874e-07 -6.66434e-08 1.50683e-07 -6.86211e-08 1.42617e-07 -7.05309e-08 1.34717e-07 -7.23251e-08 1.27022e-07 -7.39478e-08 1.19563e-07 -7.53333e-08 1.12362e-07 -7.641e-08 1.05436e-07 -7.71158e-08 9.88128e-08 -7.74099e-08 9.25185e-08 -7.72665e-08 8.65576e-08 -7.66715e-08 8.0912e-08 -7.56199e-08 7.55449e-08 -7.41188e-08 7.04087e-08 -7.21939e-08 6.54505e-08 -6.98042e-08 6.0483e-08 -6.70402e-08 5.51712e-08 4.95257e-08 -6.96794e-09 1.77528e-07 -1.46186e-08 1.95879e-07 -2.23356e-08 2.05367e-07 -2.99497e-08 2.13089e-07 -3.71439e-08 2.20339e-07 -4.31705e-08 2.26659e-07 -4.78654e-08 2.31321e-07 -4.93335e-08 2.33075e-07 -5.0002e-08 2.36101e-07 -4.81058e-08 2.38145e-07 -4.80714e-08 2.39674e-07 -4.5682e-08 2.40909e-07 -4.4341e-08 2.37212e-07 -4.41002e-08 2.31635e-07 -4.45904e-08 2.24855e-07 -4.55326e-08 2.17482e-07 -4.67747e-08 2.09784e-07 -4.82522e-08 2.01884e-07 -4.99421e-08 1.93842e-07 -5.18229e-08 1.85701e-07 -5.38528e-08 1.77503e-07 -5.59828e-08 1.69278e-07 -5.81661e-08 1.61057e-07 -6.03553e-08 1.52873e-07 -6.25005e-08 1.44762e-07 -6.45483e-08 1.36765e-07 -6.64416e-08 1.28915e-07 -6.81133e-08 1.21235e-07 -6.94726e-08 1.13721e-07 -7.04125e-08 1.06376e-07 -7.0857e-08 9.92574e-08 -7.07837e-08 9.24455e-08 -7.02062e-08 8.59803e-08 -6.91561e-08 7.9862e-08 -6.76794e-08 7.40683e-08 -6.58384e-08 6.85677e-08 -6.37722e-08 6.33843e-08 -6.14412e-08 5.81519e-08 -5.84236e-08 5.21534e-08 4.46214e-08 -4.00408e-09 1.81532e-07 -8.72015e-09 2.00595e-07 -1.35484e-08 2.10195e-07 -1.82697e-08 2.1781e-07 -2.27728e-08 2.24842e-07 -2.77056e-08 2.31592e-07 -3.09356e-08 2.34551e-07 -3.33107e-08 2.3545e-07 -3.42026e-08 2.36993e-07 -3.4972e-08 2.38914e-07 -3.69451e-08 2.41647e-07 -3.72786e-08 2.41243e-07 -3.77407e-08 2.37674e-07 -3.80602e-08 2.31955e-07 -3.86002e-08 2.25395e-07 -3.94479e-08 2.1833e-07 -4.06105e-08 2.10947e-07 -4.20748e-08 2.03349e-07 -4.38211e-08 1.95588e-07 -4.58194e-08 1.87699e-07 -4.80227e-08 1.79706e-07 -5.03768e-08 1.71632e-07 -5.28236e-08 1.63504e-07 -5.53028e-08 1.55352e-07 -5.77525e-08 1.47212e-07 -6.01111e-08 1.39123e-07 -6.23212e-08 1.31125e-07 -6.43347e-08 1.23248e-07 -6.60306e-08 1.15417e-07 -6.72451e-08 1.07591e-07 -6.78793e-08 9.98915e-08 -6.79744e-08 9.25405e-08 -6.76374e-08 8.56433e-08 -6.69882e-08 7.92128e-08 -6.61616e-08 7.32418e-08 -6.52258e-08 6.7632e-08 -6.41527e-08 6.23112e-08 -6.29631e-08 5.69622e-08 -5.96976e-08 4.8888e-08 3.67254e-08 -1.50193e-09 1.83034e-07 -3.57532e-09 2.02668e-07 -5.86228e-09 2.12482e-07 -8.32522e-09 2.20273e-07 -1.12543e-08 2.27772e-07 -1.44053e-08 2.34743e-07 -1.71992e-08 2.37345e-07 -1.95898e-08 2.37841e-07 -2.15145e-08 2.38917e-07 -2.33507e-08 2.4075e-07 -2.52975e-08 2.43594e-07 -2.83225e-08 2.44268e-07 -2.95068e-08 2.38859e-07 -3.04439e-08 2.32892e-07 -3.14157e-08 2.26367e-07 -3.25912e-08 2.19505e-07 -3.40214e-08 2.12377e-07 -3.57408e-08 2.05068e-07 -3.77588e-08 1.97606e-07 -4.00635e-08 1.90004e-07 -4.26203e-08 1.82262e-07 -4.53788e-08 1.7439e-07 -4.82806e-08 1.66405e-07 -5.126e-08 1.58331e-07 -5.42477e-08 1.502e-07 -5.71781e-08 1.42054e-07 -5.99971e-08 1.33944e-07 -6.26599e-08 1.25911e-07 -6.5239e-08 1.17996e-07 -6.72965e-08 1.09648e-07 -6.86416e-08 1.01237e-07 -6.96325e-08 9.35314e-08 -7.04973e-08 8.65083e-08 -7.15415e-08 8.02571e-08 -7.29394e-08 7.46398e-08 -7.48038e-08 6.94964e-08 -7.64117e-08 6.39191e-08 -7.75948e-08 5.81453e-08 -6.71223e-08 3.84154e-08 1.26007e-08 -4.30984e-10 1.83465e-07 -1.06261e-09 2.033e-07 -1.79951e-09 2.13219e-07 -2.69328e-09 2.21167e-07 -4.05272e-09 2.29131e-07 -5.40901e-09 2.361e-07 -7.51366e-09 2.3945e-07 -9.51021e-09 2.39837e-07 -1.09361e-08 2.40343e-07 -1.1862e-08 2.41676e-07 -1.24156e-08 2.44148e-07 -1.3746e-08 2.45598e-07 -1.69594e-08 2.42072e-07 -1.9728e-08 2.35661e-07 -2.2057e-08 2.28696e-07 -2.41855e-08 2.21634e-07 -2.63576e-08 2.14549e-07 -2.8659e-08 2.07369e-07 -3.12047e-08 2.00152e-07 -3.40465e-08 1.92845e-07 -3.71792e-08 1.85395e-07 -4.05666e-08 1.77778e-07 -4.41652e-08 1.70004e-07 -4.79132e-08 1.62079e-07 -5.17414e-08 1.54028e-07 -5.55807e-08 1.45893e-07 -5.9374e-08 1.37737e-07 -6.3078e-08 1.29615e-07 -6.65724e-08 1.2149e-07 -6.96234e-08 1.12699e-07 -7.21968e-08 1.0381e-07 -7.46385e-08 9.5973e-08 -7.72735e-08 8.91433e-08 -8.01946e-08 8.31783e-08 -8.40588e-08 7.85041e-08 -8.76985e-08 7.31361e-08 -8.78979e-08 6.41183e-08 -7.50598e-08 4.53071e-08 -5.53317e-08 1.86869e-08 -3.7876e-09 -2.79784e-10 1.83744e-07 -8.4133e-10 2.03861e-07 -1.18959e-09 2.13567e-07 -1.28875e-09 2.21266e-07 -9.45428e-10 2.28788e-07 -2.03666e-09 2.37191e-07 -2.77039e-09 2.40184e-07 -4.38641e-09 2.41453e-07 -5.81511e-09 2.41772e-07 -6.5248e-09 2.42386e-07 -6.71591e-09 2.44339e-07 -6.57511e-09 2.45458e-07 -7.61248e-09 2.4311e-07 -1.00705e-08 2.38119e-07 -1.28021e-08 2.31428e-07 -1.56624e-08 2.24494e-07 -1.82847e-08 2.17172e-07 -2.10447e-08 2.10129e-07 -2.41008e-08 2.03208e-07 -2.75319e-08 1.96276e-07 -3.13391e-08 1.89202e-07 -3.55005e-08 1.81939e-07 -3.99682e-08 1.74471e-07 -4.46856e-08 1.66796e-07 -4.95877e-08 1.5893e-07 -5.46029e-08 1.50908e-07 -5.96388e-08 1.42773e-07 -6.46087e-08 1.34584e-07 -6.90845e-08 1.25966e-07 -7.34183e-08 1.17033e-07 -7.74402e-08 1.07832e-07 -8.16389e-08 1.00172e-07 -8.62831e-08 9.37875e-08 -9.15026e-08 8.83979e-08 -9.62989e-08 8.33005e-08 -9.62417e-08 7.3079e-08 -8.69754e-08 5.48522e-08 -7.1244e-08 2.95758e-08 -5.82544e-08 5.69752e-09 -1.37332e-08 6.39552e-10 1.83105e-07 -5.33263e-10 2.05034e-07 -1.60308e-09 2.14637e-07 -2.64831e-09 2.22311e-07 -3.66006e-09 2.298e-07 -3.92515e-09 2.37457e-07 -4.51872e-09 2.40778e-07 -4.67961e-09 2.41615e-07 -4.86265e-09 2.41955e-07 -5.01589e-09 2.42539e-07 -3.88858e-09 2.43212e-07 -2.34107e-09 2.4391e-07 -1.88633e-09 2.42655e-07 -2.74049e-09 2.38973e-07 -4.83318e-09 2.33521e-07 -7.43806e-09 2.27099e-07 -9.85207e-09 2.19586e-07 -1.27705e-08 2.13047e-07 -1.62248e-08 2.06662e-07 -2.01969e-08 2.00248e-07 -2.46758e-08 1.93681e-07 -2.9623e-08 1.86886e-07 -3.49809e-08 1.79829e-07 -4.06794e-08 1.72495e-07 -4.66634e-08 1.64914e-07 -5.28658e-08 1.5711e-07 -5.91845e-08 1.49092e-07 -6.52852e-08 1.40685e-07 -7.11173e-08 1.31798e-07 -7.64865e-08 1.22402e-07 -8.22837e-08 1.13629e-07 -8.78124e-08 1.057e-07 -9.34565e-08 9.94314e-08 -9.84235e-08 9.33647e-08 -9.76946e-08 8.25713e-08 -9.05924e-08 6.59766e-08 -8.1069e-08 4.53287e-08 -7.33031e-08 2.18098e-08 -6.87628e-08 1.15746e-09 -1.74511e-08 3.61326e-09 1.79491e-07 3.46938e-09 2.05178e-07 3.22637e-09 2.14881e-07 3.01597e-09 2.22522e-07 3.13564e-09 2.29681e-07 3.73009e-09 2.36862e-07 3.02627e-09 2.41482e-07 2.17348e-09 2.42468e-07 1.41045e-09 2.42719e-07 1.22617e-09 2.42724e-07 1.8077e-09 2.4263e-07 3.14885e-09 2.42569e-07 3.94764e-09 2.41856e-07 4.17075e-09 2.3875e-07 4.08961e-09 2.33602e-07 2.83569e-09 2.28353e-07 1.71768e-10 2.2225e-07 -3.1251e-09 2.16344e-07 -7.07066e-09 2.10608e-07 -1.16179e-08 2.04795e-07 -1.67351e-08 1.98798e-07 -2.23746e-08 1.92525e-07 -2.84781e-08 1.85933e-07 -3.49808e-08 1.78997e-07 -4.18138e-08 1.71747e-07 -4.89297e-08 1.64226e-07 -5.62653e-08 1.56427e-07 -6.3657e-08 1.48076e-07 -7.10357e-08 1.39176e-07 -7.85509e-08 1.29917e-07 -8.59935e-08 1.21071e-07 -9.30884e-08 1.12795e-07 -9.91474e-08 1.0549e-07 -9.73816e-08 9.15988e-08 -8.89061e-08 7.40958e-08 -8.47047e-08 6.17754e-08 -8.00305e-08 4.06547e-08 -7.83334e-08 2.01129e-08 -7.70514e-08 -1.24446e-10 -1.91296e-08 7.13928e-09 1.72352e-07 9.5012e-09 2.02816e-07 1.10895e-08 2.13292e-07 1.24341e-08 2.21178e-07 1.38181e-08 2.28297e-07 1.56317e-08 2.35049e-07 1.4513e-08 2.42601e-07 1.24691e-08 2.44512e-07 1.02543e-08 2.44934e-07 9.08797e-09 2.4389e-07 8.95078e-09 2.42768e-07 9.72147e-09 2.41798e-07 1.10761e-08 2.40501e-07 1.21293e-08 2.37696e-07 1.25853e-08 2.33146e-07 1.19719e-08 2.28966e-07 9.92175e-09 2.243e-07 6.73337e-09 2.19533e-07 2.71959e-09 2.14621e-07 -2.05522e-09 2.0957e-07 -7.50846e-09 2.04251e-07 -1.35478e-08 1.98565e-07 -2.00854e-08 1.9247e-07 -2.70325e-08 1.85945e-07 -3.42794e-08 1.78994e-07 -4.17293e-08 1.71676e-07 -4.92536e-08 1.63951e-07 -5.66882e-08 1.55511e-07 -6.40429e-08 1.4653e-07 -7.10882e-08 1.36962e-07 -7.72465e-08 1.27229e-07 -8.15309e-08 1.17079e-07 -8.18683e-08 1.05828e-07 -8.06304e-08 9.03608e-08 -8.13969e-08 7.48623e-08 -7.65905e-08 5.6969e-08 -7.30021e-08 3.70663e-08 -6.91874e-08 1.6298e-08 -6.43091e-08 -5.00308e-09 -2.61987e-08 9.66438e-09 1.62688e-07 1.4071e-08 1.9841e-07 1.64778e-08 2.10886e-07 1.77637e-08 2.19892e-07 1.82353e-08 2.27826e-07 1.77867e-08 2.35498e-07 1.73197e-08 2.43069e-07 1.54079e-08 2.46424e-07 1.58071e-08 2.44535e-07 1.65615e-08 2.43136e-07 1.77129e-08 2.41616e-07 1.9353e-08 2.40158e-07 2.13931e-08 2.38461e-07 2.29759e-08 2.36114e-07 2.28506e-08 2.33271e-07 2.2046e-08 2.29771e-07 2.02312e-08 2.26115e-07 1.73885e-08 2.22375e-07 1.35295e-08 2.1848e-07 8.78911e-09 2.1431e-07 3.28272e-09 2.09757e-07 -2.86148e-09 2.04709e-07 -9.5032e-09 1.99112e-07 -1.64881e-08 1.9293e-07 -2.36361e-08 1.86142e-07 -3.07452e-08 1.78785e-07 -3.7568e-08 1.70774e-07 -4.40429e-08 1.61986e-07 -5.02339e-08 1.52721e-07 -5.59001e-08 1.42628e-07 -6.10981e-08 1.32427e-07 -6.46465e-08 1.20628e-07 -6.54619e-08 1.06643e-07 -6.45199e-08 8.94188e-08 -6.05882e-08 7.09306e-08 -5.51169e-08 5.14977e-08 -4.83501e-08 3.02995e-08 -3.91256e-08 7.07346e-09 -2.6577e-08 -1.75517e-08 -4.34347e-08 1.15933e-08 1.51095e-07 1.79551e-08 1.92049e-07 2.09855e-08 2.07856e-07 2.21795e-08 2.18698e-07 2.27218e-08 2.27284e-07 2.32011e-08 2.35019e-07 2.33432e-08 2.42927e-07 2.33586e-08 2.46409e-07 2.37744e-08 2.44119e-07 2.52547e-08 2.41656e-07 2.72386e-08 2.39633e-07 2.95069e-08 2.3789e-07 3.1715e-08 2.36253e-07 3.33234e-08 2.34505e-07 3.41046e-08 2.3249e-07 3.36808e-08 2.30195e-07 3.21299e-08 2.27666e-07 2.95399e-08 2.24966e-07 2.59258e-08 2.22095e-07 2.13494e-08 2.18887e-07 1.59503e-08 2.15156e-07 9.89285e-09 2.10766e-07 3.36876e-09 2.05636e-07 -3.3733e-09 1.99672e-07 -1.0046e-08 1.92814e-07 -1.63229e-08 1.85062e-07 -2.19271e-08 1.76378e-07 -2.66339e-08 1.66693e-07 -3.0484e-08 1.56572e-07 -3.37447e-08 1.45889e-07 -3.63575e-08 1.3504e-07 -3.94392e-08 1.23709e-07 -4.00974e-08 1.07301e-07 -3.61502e-08 8.54716e-08 -3.00881e-08 6.48686e-08 -2.35683e-08 4.49779e-08 -1.45059e-08 2.12371e-08 -1.90093e-09 -5.53147e-09 1.45291e-08 -3.39816e-08 -6.40462e-08 1.28056e-08 1.38289e-07 2.17686e-08 1.83086e-07 2.58553e-08 2.03769e-07 2.59774e-08 2.18576e-07 2.66695e-08 2.26592e-07 2.83539e-08 2.33335e-07 2.98463e-08 2.41435e-07 3.20834e-08 2.44172e-07 3.29001e-08 2.43303e-07 3.45638e-08 2.39993e-07 3.69393e-08 2.37257e-07 3.96841e-08 2.35145e-07 4.23231e-08 2.33614e-07 4.43557e-08 2.32473e-07 4.5593e-08 2.31253e-07 4.57419e-08 2.30046e-07 4.48639e-08 2.28544e-07 4.28876e-08 2.26942e-07 3.97953e-08 2.25187e-07 3.55314e-08 2.2315e-07 3.03784e-08 2.2031e-07 2.44629e-08 2.16682e-07 1.802e-08 2.12079e-07 1.13904e-08 2.06301e-07 4.97199e-09 1.99233e-07 -8.04865e-10 1.90839e-07 -5.61862e-09 1.81192e-07 -9.40238e-09 1.70476e-07 -1.18811e-08 1.5905e-07 -1.29606e-08 1.46968e-07 -1.28932e-08 1.34973e-07 -1.16496e-08 1.22466e-07 -8.54961e-09 1.04201e-07 -4.25136e-09 8.11734e-08 1.49077e-09 5.91264e-08 9.12298e-09 3.73456e-08 1.96535e-08 1.07063e-08 3.35836e-08 -1.94617e-08 5.13349e-08 -5.17332e-08 -8.53393e-08 1.11117e-08 1.27178e-07 2.24843e-08 1.71713e-07 2.97596e-08 1.96494e-07 2.98736e-08 2.18462e-07 2.8122e-08 2.28344e-07 2.84315e-08 2.33025e-07 3.19534e-08 2.37913e-07 3.52328e-08 2.40893e-07 3.85302e-08 2.40006e-07 4.13633e-08 2.3716e-07 4.49567e-08 2.33664e-07 4.88805e-08 2.31222e-07 5.26332e-08 2.29862e-07 5.56666e-08 2.2944e-07 5.73197e-08 2.296e-07 5.83652e-08 2.29001e-07 5.84406e-08 2.28468e-07 5.74003e-08 2.27982e-07 5.51487e-08 2.27438e-07 5.15289e-08 2.2677e-07 4.6634e-08 2.25204e-07 4.0687e-08 2.22629e-07 3.40132e-08 2.18753e-07 2.70069e-08 2.13307e-07 2.01458e-08 2.06094e-07 1.3904e-08 1.97081e-07 8.7083e-09 1.86388e-07 4.90794e-09 1.74277e-07 2.86217e-09 1.61096e-07 2.55177e-09 1.47279e-07 4.18186e-09 1.33343e-07 8.63389e-09 1.18014e-07 1.44361e-08 9.83989e-08 1.95937e-08 7.60162e-08 2.64036e-08 5.23167e-08 3.69207e-08 2.68285e-08 4.94402e-08 -1.81338e-09 6.39869e-08 -3.40089e-08 8.07036e-08 -6.84502e-08 -1.04319e-07 3.24961e-09 1.23928e-07 1.01399e-08 1.64823e-07 1.51174e-08 1.91516e-07 1.6801e-08 2.16779e-07 1.80555e-08 2.27089e-07 2.0844e-08 2.30237e-07 2.61186e-08 2.32639e-07 3.29824e-08 2.34029e-07 3.95792e-08 2.33409e-07 4.53357e-08 2.31403e-07 5.09578e-08 2.28042e-07 5.6294e-08 2.25886e-07 6.13855e-08 2.24771e-07 6.56594e-08 2.25166e-07 6.89914e-08 2.26268e-07 7.13186e-08 2.26674e-07 7.2595e-08 2.27192e-07 7.27041e-08 2.27873e-07 7.13833e-08 2.28759e-07 6.86395e-08 2.29514e-07 6.42602e-08 2.29584e-07 5.84245e-08 2.28465e-07 5.14056e-08 2.25772e-07 4.37389e-08 2.20974e-07 3.6085e-08 2.13748e-07 2.91004e-08 2.04066e-07 2.33557e-08 1.92133e-07 1.92998e-08 1.78333e-07 1.72467e-08 1.6315e-07 1.74644e-08 1.47061e-07 2.04742e-08 1.30333e-07 2.60635e-08 1.12425e-07 3.33756e-08 9.1087e-08 4.16199e-08 6.77718e-08 5.11012e-08 4.28353e-08 6.11237e-08 1.6806e-08 7.41628e-08 -1.48525e-08 8.82168e-08 -4.8063e-08 1.01954e-07 -8.21872e-08 -1.18117e-07 -4.09431e-09 1.28023e-07 -4.09916e-09 1.64827e-07 -2.89022e-09 1.90307e-07 9.67168e-10 2.12921e-07 5.68367e-09 2.22373e-07 1.25774e-08 2.23344e-07 2.09667e-08 2.2425e-07 3.1576e-08 2.2342e-07 4.12601e-08 2.23725e-07 4.96755e-08 2.22988e-07 5.64346e-08 2.21283e-07 6.27678e-08 2.19552e-07 6.88344e-08 2.18704e-07 7.51034e-08 2.18897e-07 8.07984e-08 2.20573e-07 8.49179e-08 2.22554e-07 8.77046e-08 2.24406e-07 8.90803e-08 2.26497e-07 8.9097e-08 2.28743e-07 8.74778e-08 2.31133e-07 8.39383e-08 2.33123e-07 7.82299e-08 2.34173e-07 7.06996e-08 2.33302e-07 6.20745e-08 2.29599e-07 5.33452e-08 2.22477e-07 4.54554e-08 2.11956e-07 3.91863e-08 1.98402e-07 3.51089e-08 1.8241e-07 3.35406e-08 1.64718e-07 3.46557e-08 1.45946e-07 3.86495e-08 1.26339e-07 4.55427e-08 1.05532e-07 5.4048e-08 8.25817e-08 6.42719e-08 5.75477e-08 7.47087e-08 3.23983e-08 8.61335e-08 5.38108e-09 9.59739e-08 -2.46932e-08 1.05021e-07 -5.71097e-08 1.13751e-07 -9.09178e-08 -1.2736e-07 -3.93681e-09 1.31959e-07 -5.98828e-09 1.66878e-07 -4.90043e-09 1.89219e-07 -8.32153e-10 2.08853e-07 4.91159e-09 2.16629e-07 1.40562e-08 2.14199e-07 2.49058e-08 2.13401e-07 3.60809e-08 2.12245e-07 4.65072e-08 2.13299e-07 5.58589e-08 2.13636e-07 6.3786e-08 2.13357e-07 7.08499e-08 2.12489e-07 7.79243e-08 2.1163e-07 8.51e-08 2.11722e-07 9.21275e-08 2.13546e-07 9.75791e-08 2.17103e-07 1.01668e-07 2.20317e-07 1.04745e-07 2.23421e-07 1.06805e-07 2.26682e-07 1.07229e-07 2.3071e-07 1.05144e-07 2.35209e-07 1.00082e-07 2.39235e-07 9.20597e-08 2.41325e-07 8.21848e-08 2.39474e-07 7.205e-08 2.32612e-07 6.30643e-08 2.20941e-07 5.62663e-08 2.052e-07 5.24128e-08 1.86264e-07 5.17513e-08 1.6538e-07 5.41116e-08 1.43586e-07 5.91487e-08 1.21302e-07 6.63843e-08 9.82959e-08 7.47832e-08 7.41829e-08 8.32875e-08 4.90435e-08 9.28004e-08 2.28855e-08 1.02518e-07 -4.33623e-09 1.11183e-07 -3.3358e-08 1.18245e-07 -6.41717e-08 1.24638e-07 -9.73111e-08 -1.35539e-07 2.3979e-09 1.29561e-07 3.82714e-09 1.65449e-07 7.74383e-09 1.85302e-07 1.30858e-08 2.03511e-07 2.01118e-08 2.09603e-07 2.75858e-08 2.06726e-07 3.53221e-08 2.05664e-07 4.33874e-08 2.0418e-07 5.28294e-08 2.03857e-07 6.1642e-08 2.04824e-07 6.97954e-08 2.05203e-07 7.71743e-08 2.0511e-07 8.42129e-08 2.04591e-07 9.16398e-08 2.04295e-07 9.92606e-08 2.05925e-07 1.05932e-07 2.10432e-07 1.11248e-07 2.15e-07 1.16809e-07 2.17859e-07 1.2188e-07 2.21611e-07 1.2559e-07 2.27e-07 1.26747e-07 2.34052e-07 1.23659e-07 2.42322e-07 1.15451e-07 2.49534e-07 1.0395e-07 2.50975e-07 9.2238e-08 2.44324e-07 8.18239e-08 2.31355e-07 7.41332e-08 2.12891e-07 7.04661e-08 1.89931e-07 7.07056e-08 1.6514e-07 7.41251e-08 1.40167e-07 7.98262e-08 1.15601e-07 8.69719e-08 9.115e-08 9.47882e-08 6.63665e-08 1.02838e-07 4.09941e-08 1.10736e-07 1.49869e-08 1.18371e-07 -1.1971e-08 1.25195e-07 -4.01819e-08 1.30704e-07 -6.96803e-08 1.35036e-07 -1.01643e-07 -1.46145e-07 7.41789e-09 1.22143e-07 1.45521e-08 1.58314e-07 2.30334e-08 1.76821e-07 3.40855e-08 1.92459e-07 4.03413e-08 2.03347e-07 4.40733e-08 2.02994e-07 4.77434e-08 2.01994e-07 5.23835e-08 1.9954e-07 5.85426e-08 1.97698e-07 6.57429e-08 1.97624e-07 7.29643e-08 1.97982e-07 8.00209e-08 1.98054e-07 8.64479e-08 1.98165e-07 9.26923e-08 1.98051e-07 1.00333e-07 1.98285e-07 1.0809e-07 2.02674e-07 1.15253e-07 2.07837e-07 1.23033e-07 2.1008e-07 1.31161e-07 2.13484e-07 1.39109e-07 2.19052e-07 1.45567e-07 2.27594e-07 1.4847e-07 2.39419e-07 1.4193e-07 2.56074e-07 1.27737e-07 2.65168e-07 1.15797e-07 2.56265e-07 1.03972e-07 2.4318e-07 9.38772e-08 2.22986e-07 8.97402e-08 1.94068e-07 9.06609e-08 1.6422e-07 9.46133e-08 1.36214e-07 1.00326e-07 1.09888e-07 1.06817e-07 8.46588e-08 1.13547e-07 5.96369e-08 1.20122e-07 3.44191e-08 1.26409e-07 8.69904e-09 1.32439e-07 -1.80007e-08 1.38098e-07 -4.58406e-08 1.44173e-07 -7.57555e-08 1.52039e-07 -1.09508e-07 -1.55025e-07 5.40586e-09 1.16737e-07 1.23606e-08 1.51359e-07 1.92861e-08 1.69895e-07 2.69303e-08 1.84815e-07 3.33754e-08 1.96902e-07 3.61727e-08 2.00196e-07 4.25292e-08 1.95638e-07 4.94607e-08 1.92609e-07 5.63082e-08 1.9085e-07 6.41314e-08 1.89801e-07 7.1916e-08 1.90198e-07 7.94694e-08 1.905e-07 8.60729e-08 1.91561e-07 9.18076e-08 1.92316e-07 9.6407e-08 1.93686e-07 1.02916e-07 1.96165e-07 1.1137e-07 1.99382e-07 1.19587e-07 2.01863e-07 1.28468e-07 2.04603e-07 1.37597e-07 2.09922e-07 1.46535e-07 2.18656e-07 1.53452e-07 2.32502e-07 1.55663e-07 2.53863e-07 1.5138e-07 2.69451e-07 1.39853e-07 2.67792e-07 1.27806e-07 2.55227e-07 1.17089e-07 2.33703e-07 1.11302e-07 1.99855e-07 1.11515e-07 1.64007e-07 1.15836e-07 1.31893e-07 1.20713e-07 1.05012e-07 1.25571e-07 7.98007e-08 1.30196e-07 5.50108e-08 1.34486e-07 3.01292e-08 1.38414e-07 4.77139e-09 1.41729e-07 -2.13151e-08 1.44235e-07 -4.83473e-08 1.45564e-07 -7.70835e-08 1.51113e-07 -1.15058e-07 -1.57906e-07 4.40171e-09 1.12335e-07 1.04475e-08 1.45314e-07 1.74612e-08 1.62882e-07 2.55107e-08 1.76765e-07 3.28907e-08 1.89523e-07 3.99289e-08 1.93158e-07 4.47197e-08 1.90847e-07 5.04737e-08 1.86855e-07 5.63661e-08 1.84958e-07 6.22813e-08 1.83886e-07 6.8729e-08 1.8375e-07 7.45333e-08 1.84696e-07 8.01346e-08 1.8596e-07 8.5151e-08 1.873e-07 8.97183e-08 1.89119e-07 9.47968e-08 1.91087e-07 1.00899e-07 1.9328e-07 1.07294e-07 1.95468e-07 1.13848e-07 1.98049e-07 1.20547e-07 2.03224e-07 1.2775e-07 2.11453e-07 1.35621e-07 2.24631e-07 1.42599e-07 2.46886e-07 1.47223e-07 2.64827e-07 1.46778e-07 2.68236e-07 1.43457e-07 2.58548e-07 1.39992e-07 2.37168e-07 1.35979e-07 2.03868e-07 1.36019e-07 1.63967e-07 1.38878e-07 1.29034e-07 1.41131e-07 1.02758e-07 1.42931e-07 7.80011e-08 1.44548e-07 5.33938e-08 1.46229e-07 2.84478e-08 1.48321e-07 2.67984e-09 1.51168e-07 -2.41623e-08 1.54623e-07 -5.18026e-08 1.59316e-07 -8.17758e-08 1.59448e-07 -1.15189e-07 -1.53197e-07 6.67389e-09 1.05661e-07 1.4086e-08 1.37902e-07 2.27037e-08 1.54264e-07 3.24835e-08 1.66986e-07 4.32121e-08 1.78794e-07 4.93047e-08 1.87066e-07 5.31577e-08 1.86994e-07 5.46948e-08 1.85318e-07 5.74769e-08 1.82176e-07 6.07749e-08 1.80588e-07 6.4326e-08 1.80199e-07 6.82876e-08 1.80735e-07 7.23943e-08 1.81854e-07 7.63383e-08 1.83356e-07 8.01201e-08 1.85337e-07 8.41566e-08 1.8705e-07 8.81089e-08 1.89327e-07 9.16458e-08 1.91931e-07 9.46858e-08 1.95009e-07 9.77733e-08 2.00136e-07 1.01616e-07 2.07611e-07 1.07913e-07 2.18334e-07 1.19485e-07 2.35314e-07 1.30146e-07 2.54165e-07 1.39e-07 2.59382e-07 1.46273e-07 2.51275e-07 1.51678e-07 2.31764e-07 1.55155e-07 2.00391e-07 1.58314e-07 1.60808e-07 1.57819e-07 1.2953e-07 1.56399e-07 1.04178e-07 1.54569e-07 7.98313e-08 1.52613e-07 5.53491e-08 1.50989e-07 3.00715e-08 1.50154e-07 3.51487e-09 1.50559e-07 -2.45674e-08 1.51994e-07 -5.32367e-08 1.55311e-07 -8.50925e-08 1.51165e-07 -1.11043e-07 -1.42321e-07 7.47073e-09 9.81905e-08 1.54267e-08 1.29946e-07 2.37486e-08 1.45943e-07 3.2079e-08 1.58656e-07 4.06368e-08 1.70237e-07 4.69484e-08 1.80755e-07 5.02414e-08 1.83702e-07 5.39718e-08 1.81588e-07 5.6905e-08 1.79243e-07 5.94437e-08 1.78049e-07 6.19808e-08 1.77662e-07 6.4627e-08 1.78089e-07 6.73602e-08 1.7912e-07 7.01164e-08 1.806e-07 7.28966e-08 1.82557e-07 7.5947e-08 1.84e-07 7.81544e-08 1.8712e-07 7.91936e-08 1.90892e-07 7.94035e-08 1.94799e-07 7.9481e-08 2.00059e-07 8.01362e-08 2.06955e-07 8.27229e-08 2.15747e-07 9.10925e-08 2.26944e-07 1.06019e-07 2.39239e-07 1.2391e-07 2.41491e-07 1.43512e-07 2.31673e-07 1.58631e-07 2.16646e-07 1.68517e-07 1.90504e-07 1.69925e-07 1.594e-07 1.667e-07 1.32755e-07 1.62374e-07 1.08504e-07 1.57485e-07 8.47199e-08 1.5235e-07 6.04838e-08 1.47258e-07 3.51637e-08 1.42271e-07 8.50206e-09 1.37479e-07 -1.9775e-08 1.32454e-07 -4.82115e-08 1.20533e-07 -7.31724e-08 1.09107e-07 -9.96171e-08 -1.25595e-07 7.28647e-09 9.09043e-08 1.56447e-08 1.21588e-07 2.43699e-08 1.37218e-07 3.35154e-08 1.4951e-07 4.33575e-08 1.60395e-07 5.37503e-08 1.70362e-07 5.86268e-08 1.78825e-07 6.02343e-08 1.7998e-07 6.04571e-08 1.7902e-07 6.14226e-08 1.77084e-07 6.27912e-08 1.76294e-07 6.44837e-08 1.76396e-07 6.64095e-08 1.77195e-07 6.84373e-08 1.78572e-07 7.06235e-08 1.8037e-07 7.17698e-08 1.82854e-07 7.27988e-08 1.86091e-07 7.36016e-08 1.90089e-07 7.36226e-08 1.94778e-07 7.34326e-08 2.00249e-07 7.37824e-08 2.06606e-07 7.5816e-08 2.13714e-07 8.18481e-08 2.20912e-07 9.46942e-08 2.26393e-07 1.1488e-07 2.21306e-07 1.38924e-07 2.07628e-07 1.55323e-07 2.00247e-07 1.6489e-07 1.80937e-07 1.66026e-07 1.58264e-07 1.63288e-07 1.35492e-07 1.58773e-07 1.1302e-07 1.53145e-07 9.03477e-08 1.4689e-07 6.67383e-08 1.40431e-07 4.1623e-08 1.34253e-07 1.46803e-08 1.2825e-07 -1.37723e-08 1.21243e-07 -4.12041e-08 1.13919e-07 -6.58483e-08 1.00201e-07 -8.58993e-08 -1.01517e-07 6.5286e-09 8.43759e-08 1.44606e-08 1.13656e-07 2.26839e-08 1.28995e-07 3.10888e-08 1.41106e-07 3.94601e-08 1.52024e-07 4.74888e-08 1.62334e-07 5.37719e-08 1.72542e-07 5.80807e-08 1.75671e-07 6.045e-08 1.76651e-07 6.21801e-08 1.75354e-07 6.37453e-08 1.74729e-07 6.54551e-08 1.74687e-07 6.73541e-08 1.75296e-07 6.93838e-08 1.76543e-07 7.13173e-08 1.78437e-07 7.31097e-08 1.81061e-07 7.47686e-08 1.84432e-07 7.63701e-08 1.88487e-07 7.78819e-08 1.93266e-07 7.95891e-08 1.98542e-07 8.23e-08 2.03895e-07 8.72024e-08 2.08811e-07 9.55662e-08 2.12548e-07 1.07989e-07 2.13971e-07 1.20094e-07 2.092e-07 1.28236e-07 1.99487e-07 1.41138e-07 1.87346e-07 1.50047e-07 1.72028e-07 1.53648e-07 1.54663e-07 1.53353e-07 1.35787e-07 1.50316e-07 1.16058e-07 1.45368e-07 9.52953e-08 1.39085e-07 7.3022e-08 1.31966e-07 4.87412e-08 1.2443e-07 2.22165e-08 1.16563e-07 -5.90482e-09 1.10802e-07 -3.54435e-08 1.10079e-07 -6.51249e-08 1.15478e-07 -9.12981e-08 -1.29003e-07 5.63419e-09 7.87416e-08 1.28488e-08 1.06442e-07 2.05644e-08 1.21279e-07 2.87301e-08 1.3294e-07 3.74831e-08 1.43271e-07 4.69793e-08 1.52837e-07 5.7913e-08 1.61609e-07 6.19345e-08 1.7165e-07 6.38081e-08 1.74778e-07 6.41474e-08 1.75015e-07 6.52354e-08 1.73641e-07 6.68225e-08 1.73099e-07 6.88855e-08 1.73233e-07 7.12638e-08 1.74164e-07 7.38414e-08 1.75859e-07 7.66042e-08 1.78299e-07 7.95701e-08 1.81466e-07 8.27229e-08 1.85334e-07 8.60992e-08 1.8989e-07 8.93337e-08 1.95307e-07 9.32517e-08 1.99977e-07 9.87573e-08 2.03306e-07 1.05833e-07 2.05472e-07 1.14118e-07 2.05686e-07 1.23856e-07 1.99462e-07 1.32084e-07 1.91258e-07 1.39168e-07 1.80262e-07 1.4389e-07 1.67306e-07 1.46212e-07 1.52342e-07 1.46014e-07 1.35986e-07 1.43561e-07 1.1851e-07 1.39098e-07 9.97591e-08 1.32658e-07 7.94623e-08 1.23975e-07 5.74242e-08 1.12447e-07 3.37443e-08 9.78127e-08 8.72961e-09 7.98183e-08 -1.74493e-08 5.99222e-08 -4.52284e-08 4.46608e-08 -7.60366e-08 -1.24265e-07 4.74623e-09 7.39957e-08 1.09812e-08 1.00207e-07 1.77491e-08 1.14511e-07 2.48998e-08 1.2579e-07 3.23919e-08 1.35779e-07 4.01099e-08 1.45119e-07 4.75129e-08 1.54206e-07 5.57249e-08 1.63438e-07 5.99874e-08 1.70515e-07 6.29902e-08 1.72012e-07 6.45271e-08 1.72104e-07 6.6879e-08 1.70748e-07 6.96315e-08 1.70481e-07 7.26915e-08 1.71105e-07 7.60344e-08 1.72517e-07 7.96777e-08 1.74655e-07 8.36669e-08 1.77477e-07 8.80332e-08 1.80968e-07 9.27713e-08 1.85151e-07 9.79087e-08 1.9017e-07 1.02222e-07 1.95663e-07 1.06355e-07 1.99173e-07 1.11339e-07 2.00488e-07 1.17889e-07 1.99136e-07 1.23296e-07 1.94055e-07 1.28639e-07 1.85916e-07 1.33315e-07 1.75586e-07 1.37378e-07 1.63242e-07 1.40204e-07 1.49517e-07 1.41162e-07 1.35028e-07 1.40438e-07 1.19234e-07 1.3815e-07 1.02047e-07 1.34198e-07 8.34149e-08 1.2803e-07 6.35921e-08 1.18512e-07 4.32619e-08 1.04106e-07 2.31358e-08 8.39784e-08 2.67836e-09 5.9122e-08 -2.03721e-08 3.57864e-08 -5.27006e-08 -1.19806e-07 3.93848e-09 7.0057e-08 9.11966e-09 9.50255e-08 1.48047e-08 1.08826e-07 2.08176e-08 1.19777e-07 2.70499e-08 1.29547e-07 3.34186e-08 1.38751e-07 3.98761e-08 1.47749e-07 4.66413e-08 1.56673e-07 5.17314e-08 1.65425e-07 5.48369e-08 1.68907e-07 6.00245e-08 1.66916e-07 6.44683e-08 1.66304e-07 6.85217e-08 1.66427e-07 7.24792e-08 1.67147e-07 7.64731e-08 1.68523e-07 8.06162e-08 1.70512e-07 8.50052e-08 1.73088e-07 8.97066e-08 1.76266e-07 9.47501e-08 1.80108e-07 1.00155e-07 1.84765e-07 1.05349e-07 1.90469e-07 1.10096e-07 1.94426e-07 1.14616e-07 1.95968e-07 1.19001e-07 1.94751e-07 1.22777e-07 1.90279e-07 1.27099e-07 1.81594e-07 1.31394e-07 1.71291e-07 1.35171e-07 1.59465e-07 1.37843e-07 1.46845e-07 1.39637e-07 1.33234e-07 1.40622e-07 1.18249e-07 1.41009e-07 1.01661e-07 1.40817e-07 8.36072e-08 1.3951e-07 6.48983e-08 1.35714e-07 4.70575e-08 1.27326e-07 3.15244e-08 1.12032e-07 1.79726e-08 8.92994e-08 2.3605e-09 6.24005e-08 -2.5802e-08 -1.01081e-07 3.46038e-09 6.65966e-08 7.86568e-09 9.06203e-08 1.2773e-08 1.03919e-07 1.81013e-08 1.14448e-07 2.38463e-08 1.23802e-07 3.00711e-08 1.32526e-07 3.69516e-08 1.40868e-07 4.4793e-08 1.48832e-07 5.3743e-08 1.56475e-07 5.98558e-08 1.62794e-07 6.30348e-08 1.63737e-07 6.58304e-08 1.63508e-07 6.90451e-08 1.63213e-07 7.25527e-08 1.63639e-07 7.62675e-08 1.64808e-07 8.02035e-08 1.66576e-07 8.44111e-08 1.6888e-07 8.89559e-08 1.71722e-07 9.39122e-08 1.75152e-07 9.94449e-08 1.79233e-07 1.05591e-07 1.84323e-07 1.11268e-07 1.88748e-07 1.16626e-07 1.9061e-07 1.21698e-07 1.89679e-07 1.26555e-07 1.85423e-07 1.29704e-07 1.78445e-07 1.3226e-07 1.68736e-07 1.3491e-07 1.56815e-07 1.36916e-07 1.44839e-07 1.38264e-07 1.31886e-07 1.3918e-07 1.17333e-07 1.3983e-07 1.0101e-07 1.40033e-07 8.34037e-08 1.38862e-07 6.607e-08 1.345e-07 5.14189e-08 1.24475e-07 4.15493e-08 1.05535e-07 3.69122e-08 7.14922e-08 3.64042e-08 1.09997e-08 3.46899e-08 -3.01629e-07 3.29023e-09 6.33062e-08 7.21041e-09 8.67001e-08 1.14999e-08 9.96292e-08 1.61259e-08 1.09822e-07 2.10995e-08 1.18828e-07 2.64633e-08 1.27162e-07 3.22906e-08 1.35041e-07 3.85745e-08 1.42548e-07 4.54615e-08 1.49588e-07 5.23551e-08 1.559e-07 5.84617e-08 1.57631e-07 6.33673e-08 1.58603e-07 6.73981e-08 1.59182e-07 7.11092e-08 1.59928e-07 7.4732e-08 1.61185e-07 7.84454e-08 1.62863e-07 8.23789e-08 1.64947e-07 8.66436e-08 1.67457e-07 9.13644e-08 1.70431e-07 9.66728e-08 1.73924e-07 1.03048e-07 1.77948e-07 1.09602e-07 1.82194e-07 1.1577e-07 1.84443e-07 1.21479e-07 1.8397e-07 1.26404e-07 1.80497e-07 1.30845e-07 1.74004e-07 1.33818e-07 1.65763e-07 1.34754e-07 1.55879e-07 1.34737e-07 1.44856e-07 1.33959e-07 1.32664e-07 1.32416e-07 1.18876e-07 1.29935e-07 1.03492e-07 1.25792e-07 8.75463e-08 1.18483e-07 7.33793e-08 1.05839e-07 6.40631e-08 8.50431e-08 6.2345e-08 5.14663e-08 7.04888e-08 -7.61445e-09 9.54854e-08 -1.57704e-07 1.84781e-07 -6.60378e-07 3.33942e-09 5.99669e-08 7.16309e-09 8.28763e-08 1.12179e-08 9.55743e-08 1.55115e-08 1.05529e-07 2.0087e-08 1.14253e-07 2.50051e-08 1.22245e-07 3.035e-08 1.29697e-07 3.62636e-08 1.36635e-07 4.29539e-08 1.42898e-07 5.06799e-08 1.48175e-07 5.74732e-08 1.50838e-07 6.25709e-08 1.53505e-07 6.59593e-08 1.55793e-07 6.91341e-08 1.56753e-07 7.23353e-08 1.57984e-07 7.57019e-08 1.59496e-07 7.93308e-08 1.61318e-07 8.33172e-08 1.6347e-07 8.77796e-08 1.65969e-07 9.28865e-08 1.68817e-07 9.88808e-08 1.71954e-07 1.05624e-07 1.75451e-07 1.12026e-07 1.78041e-07 1.18003e-07 1.77994e-07 1.23091e-07 1.7541e-07 1.26823e-07 1.70272e-07 1.2913e-07 1.63456e-07 1.29608e-07 1.55401e-07 1.28269e-07 1.46195e-07 1.25297e-07 1.35636e-07 1.20692e-07 1.23481e-07 1.14228e-07 1.09956e-07 1.05395e-07 9.63794e-08 9.34554e-08 8.53185e-08 7.75803e-08 7.99383e-08 5.68565e-08 8.30687e-08 3.00652e-08 9.728e-08 -5.79403e-09 1.31344e-07 -4.5205e-08 2.24191e-07 -8.40459e-07 3.26832e-09 5.66986e-08 7.1405e-09 7.90039e-08 1.12101e-08 9.15045e-08 1.55043e-08 1.01235e-07 2.00856e-08 1.09672e-07 2.50108e-08 1.1732e-07 3.03208e-08 1.24386e-07 3.60283e-08 1.30927e-07 4.20496e-08 1.36877e-07 4.82839e-08 1.4194e-07 5.28918e-08 1.4623e-07 5.67222e-08 1.49675e-07 6.08942e-08 1.51621e-07 6.44636e-08 1.53184e-07 6.78989e-08 1.54548e-07 7.13801e-08 1.56015e-07 7.50085e-08 1.57689e-07 7.88754e-08 1.59604e-07 8.30888e-08 1.61755e-07 8.77824e-08 1.64123e-07 9.30707e-08 1.66665e-07 9.92638e-08 1.69258e-07 1.05636e-07 1.71668e-07 1.11639e-07 1.71991e-07 1.16781e-07 1.70268e-07 1.19928e-07 1.67125e-07 1.21843e-07 1.61541e-07 1.21602e-07 1.55642e-07 1.1893e-07 1.48867e-07 1.13624e-07 1.40943e-07 1.05445e-07 1.3166e-07 9.42968e-08 1.21104e-07 8.05477e-08 1.10129e-07 6.50664e-08 1.008e-07 4.88664e-08 9.61383e-08 3.29922e-08 9.89429e-08 1.8993e-08 1.11279e-07 1.1028e-08 1.39309e-07 3.02724e-08 2.04947e-07 -9.13153e-07 2.64581e-09 5.40526e-08 6.15023e-09 7.54995e-08 9.95137e-09 8.77033e-08 1.40788e-08 9.71072e-08 1.8587e-08 1.05164e-07 2.34937e-08 1.12413e-07 2.87598e-08 1.1912e-07 3.42681e-08 1.25419e-07 3.97934e-08 1.31352e-07 4.48404e-08 1.36893e-07 4.90864e-08 1.41984e-07 5.28485e-08 1.45913e-07 5.60189e-08 1.48451e-07 5.93015e-08 1.49901e-07 6.2792e-08 1.51058e-07 6.64308e-08 1.52376e-07 7.01862e-08 1.53934e-07 7.40753e-08 1.55714e-07 7.81562e-08 1.57674e-07 8.25166e-08 1.59763e-07 8.72718e-08 1.6191e-07 9.25612e-08 1.63969e-07 9.84231e-08 1.65807e-07 1.04304e-07 1.6611e-07 1.09572e-07 1.65e-07 1.13196e-07 1.63502e-07 1.14473e-07 1.60264e-07 1.13259e-07 1.56855e-07 1.09068e-07 1.53059e-07 1.01234e-07 1.48777e-07 8.8998e-08 1.43896e-07 7.20869e-08 1.38015e-07 5.25705e-08 1.29645e-07 3.32623e-08 1.20108e-07 1.72415e-08 1.12159e-07 6.49517e-09 1.09689e-07 3.77532e-09 1.13999e-07 1.65424e-08 1.26542e-07 8.56157e-08 1.35874e-07 -9.17749e-07 1.21809e-09 5.28344e-08 3.49097e-09 7.32263e-08 6.30644e-09 8.48877e-08 9.72759e-09 9.3686e-08 1.37834e-08 1.01108e-07 1.84543e-08 1.07742e-07 2.3633e-08 1.13942e-07 2.91019e-08 1.1995e-07 3.45056e-08 1.25948e-07 3.93315e-08 1.32068e-07 4.31174e-08 1.38198e-07 4.66641e-08 1.42366e-07 4.9409e-08 1.45706e-07 5.30216e-08 1.46289e-07 5.7129e-08 1.46951e-07 6.13837e-08 1.48121e-07 6.55994e-08 1.49718e-07 6.97526e-08 1.51561e-07 7.39155e-08 1.53511e-07 7.81834e-08 1.55495e-07 8.26445e-08 1.57449e-07 8.73379e-08 1.59275e-07 9.24451e-08 1.607e-07 9.75088e-08 1.61047e-07 1.02432e-07 1.60077e-07 1.05734e-07 1.602e-07 1.06491e-07 1.59507e-07 1.047e-07 1.58646e-07 9.96651e-08 1.58094e-07 9.03005e-08 1.58141e-07 7.51612e-08 1.59035e-07 5.30322e-08 1.60144e-07 2.54149e-08 1.57262e-07 1.96573e-09 1.43557e-07 -1.33142e-08 1.27439e-07 -1.91725e-08 1.15548e-07 -1.3008e-08 1.07835e-07 2.11856e-08 9.23491e-08 1.3426e-07 2.28009e-08 -8.71281e-07 -1.18914e-09 5.40236e-08 -1.14594e-09 7.31829e-08 -8.7034e-11 8.38288e-08 2.02647e-09 9.15727e-08 5.23406e-09 9.79001e-08 9.47613e-09 1.035e-07 1.46195e-08 1.08798e-07 2.04362e-08 1.14133e-07 2.65647e-08 1.1982e-07 3.25066e-08 1.26126e-07 3.74973e-08 1.33207e-07 3.8576e-08 1.41288e-07 4.24484e-08 1.41834e-07 4.75365e-08 1.41201e-07 5.28679e-08 1.41619e-07 5.80141e-08 1.42975e-07 6.27077e-08 1.45025e-07 6.70026e-08 1.47266e-07 7.11177e-08 1.49396e-07 7.52308e-08 1.51382e-07 7.94539e-08 1.53226e-07 8.38567e-08 1.54872e-07 8.8374e-08 1.56182e-07 9.23098e-08 1.57111e-07 9.4605e-08 1.57782e-07 9.65534e-08 1.58252e-07 9.68781e-08 1.59183e-07 9.48122e-08 1.60712e-07 8.95661e-08 1.6334e-07 8.00112e-08 1.67695e-07 6.49235e-08 1.74123e-07 4.12479e-08 1.83819e-07 1.51742e-09 1.96993e-07 -2.4468e-08 1.69543e-07 -3.73681e-08 1.40339e-07 -3.97312e-08 1.17911e-07 -2.87718e-08 9.68754e-08 9.99626e-09 5.3581e-08 1.10266e-07 -7.74681e-08 -8.30085e-07 -4.68291e-09 5.87062e-08 -7.47197e-09 7.59715e-08 -8.48842e-09 8.48452e-08 -7.80191e-09 9.08863e-08 -5.52747e-09 9.56256e-08 -1.79318e-09 9.97656e-08 3.2357e-09 1.03769e-07 9.34001e-09 1.08029e-07 1.62095e-08 1.12951e-07 2.33073e-08 1.19028e-07 2.98804e-08 1.26635e-07 3.67473e-08 1.34421e-07 4.21086e-08 1.36473e-07 4.78375e-08 1.35472e-07 5.37574e-08 1.357e-07 5.91937e-08 1.37539e-07 6.36106e-08 1.40608e-07 6.72001e-08 1.43676e-07 7.04776e-08 1.46118e-07 7.36746e-08 1.48185e-07 7.68134e-08 1.50087e-07 7.98591e-08 1.51827e-07 8.26493e-08 1.53392e-07 8.49604e-08 1.548e-07 8.65684e-08 1.56174e-07 8.69962e-08 1.57824e-07 8.60161e-08 1.60163e-07 8.29208e-08 1.63807e-07 7.66829e-08 1.69578e-07 6.61125e-08 1.78265e-07 4.99461e-08 1.9029e-07 2.66473e-08 2.07118e-07 1.60555e-09 2.22035e-07 -2.43213e-08 1.95469e-07 -3.93866e-08 1.55405e-07 -4.31817e-08 1.21706e-07 -3.46439e-08 8.83378e-08 -7.29605e-09 2.62334e-08 4.17255e-08 -1.2649e-07 -8.38532e-07 -8.60412e-09 6.73102e-08 -1.37355e-08 8.11029e-08 -1.61283e-08 8.72381e-08 -1.62301e-08 9.09881e-08 -1.4351e-08 9.37465e-08 -1.07313e-08 9.61459e-08 -5.58048e-09 9.86186e-08 8.922e-10 1.01557e-07 8.46128e-09 1.05382e-07 1.68657e-08 1.10624e-07 2.56401e-08 1.17861e-07 3.62351e-08 1.23826e-07 4.54425e-08 1.27266e-07 5.28413e-08 1.28073e-07 6.01176e-08 1.28423e-07 6.63245e-08 1.31332e-07 6.96024e-08 1.3733e-07 7.17371e-08 1.41541e-07 7.35249e-08 1.44331e-07 7.51036e-08 1.46606e-07 7.64197e-08 1.48771e-07 7.74313e-08 1.50815e-07 7.81091e-08 1.52714e-07 7.83684e-08 1.54541e-07 7.80686e-08 1.56474e-07 7.70399e-08 1.58852e-07 7.49654e-08 1.62237e-07 7.12974e-08 1.67475e-07 6.51186e-08 1.75757e-07 5.44407e-08 1.88943e-07 3.63138e-08 2.08417e-07 1.63555e-08 2.27076e-07 6.41536e-09 2.31975e-07 -7.13116e-09 2.09016e-07 -2.01039e-08 1.68377e-07 -2.79206e-08 1.29523e-07 -2.73262e-08 8.77434e-08 -1.72377e-08 1.61451e-08 3.00274e-09 -1.4673e-07 -8.73876e-07 -1.11341e-08 7.84442e-08 -1.68369e-08 8.68056e-08 -1.89681e-08 8.93692e-08 -1.84471e-08 9.0467e-08 -1.58071e-08 9.11066e-08 -1.13665e-08 9.17056e-08 -5.32862e-09 9.25809e-08 2.16802e-09 9.40604e-08 1.10484e-08 9.65015e-08 2.11985e-08 1.00474e-07 3.28876e-08 1.06172e-07 4.51302e-08 1.11583e-07 5.64764e-08 1.15919e-07 6.58166e-08 1.18733e-07 7.35631e-08 1.20677e-07 7.91721e-08 1.25723e-07 8.28677e-08 1.33634e-07 8.29911e-08 1.41418e-07 8.29164e-08 1.44405e-07 8.20373e-08 1.47485e-07 8.04152e-08 1.50392e-07 7.83088e-08 1.52921e-07 7.58433e-08 1.5518e-07 7.3134e-08 1.5725e-07 7.02559e-08 1.59352e-07 6.72512e-08 1.61856e-07 6.4133e-08 1.65355e-07 6.08245e-08 1.70783e-07 5.70587e-08 1.79522e-07 5.22399e-08 1.93761e-07 4.41356e-08 2.16521e-07 3.87006e-08 2.3251e-07 3.62112e-08 2.34464e-07 2.98583e-08 2.15368e-07 2.25593e-08 1.75677e-07 1.34498e-08 1.38633e-07 7.42312e-09 9.37701e-08 -3.87734e-10 2.3956e-08 -3.68698e-09 -1.43431e-07 -9.08394e-07 -9.94045e-09 8.83846e-08 -1.33604e-08 9.02255e-08 -1.29847e-08 8.89936e-08 -1.01608e-08 8.76432e-08 -5.5425e-09 8.64884e-08 5.8307e-10 8.55801e-08 8.08692e-09 8.50771e-08 1.69039e-08 8.52434e-08 2.7077e-08 8.63284e-08 3.87802e-08 8.8771e-08 5.18273e-08 9.31246e-08 6.52574e-08 9.81533e-08 7.78622e-08 1.03315e-07 8.82555e-08 1.0834e-07 9.51356e-08 1.13797e-07 1.00452e-07 1.20407e-07 1.03392e-07 1.30694e-07 1.04534e-07 1.40276e-07 1.01199e-07 1.4774e-07 9.58325e-08 1.52852e-07 8.95615e-08 1.56664e-07 8.2615e-08 1.59868e-07 7.54146e-08 1.6238e-07 6.83495e-08 1.64316e-07 6.17261e-08 1.65974e-07 5.58117e-08 1.67771e-07 5.09099e-08 1.70257e-07 4.7516e-08 1.74177e-07 4.59825e-08 1.81055e-07 4.72398e-08 1.92504e-07 5.36145e-08 2.10146e-07 6.8264e-08 2.17861e-07 8.06831e-08 2.22045e-07 8.47781e-08 2.11273e-07 7.87886e-08 1.81666e-07 7.39649e-08 1.43456e-07 6.83442e-08 9.93909e-08 5.60047e-08 3.6296e-08 7.75675e-09 -9.5183e-08 -9.41788e-07 -2.67984e-09 9.10643e-08 -3.83672e-10 8.79296e-08 4.76969e-09 8.38405e-08 1.13145e-08 8.10986e-08 1.8686e-08 7.9117e-08 2.68863e-08 7.73798e-08 3.60129e-08 7.59505e-08 4.60333e-08 7.52232e-08 5.68897e-08 7.54722e-08 6.88098e-08 7.68511e-08 8.19238e-08 8.00106e-08 9.53103e-08 8.47668e-08 1.078e-07 9.08252e-08 1.17677e-07 9.84624e-08 1.24454e-07 1.0702e-07 1.28365e-07 1.16496e-07 1.31144e-07 1.27915e-07 1.29791e-07 1.41629e-07 1.24104e-07 1.53427e-07 1.14008e-07 1.62948e-07 1.01475e-07 1.69197e-07 8.75289e-08 1.73814e-07 7.33594e-08 1.76549e-07 5.99878e-08 1.77687e-07 4.81069e-08 1.77855e-07 3.81517e-08 1.77726e-07 3.08587e-08 1.77549e-07 2.67321e-08 1.78303e-07 2.69478e-08 1.80839e-07 3.31125e-08 1.86339e-07 4.78459e-08 1.95413e-07 6.36683e-08 2.02038e-07 8.24055e-08 2.03308e-07 9.64813e-08 1.97198e-07 9.23905e-08 1.85757e-07 8.53466e-08 1.505e-07 7.10777e-08 1.1366e-07 4.04893e-08 6.68843e-08 -3.03305e-08 -2.43628e-08 -9.73471e-07 1.2336e-08 7.87283e-08 2.3856e-08 7.64098e-08 3.55715e-08 7.21249e-08 4.64343e-08 7.02358e-08 5.63933e-08 6.9158e-08 6.63305e-08 6.74426e-08 7.68821e-08 6.5399e-08 8.79805e-08 6.41248e-08 9.9307e-08 6.41457e-08 1.1075e-07 6.54085e-08 1.22817e-07 6.79433e-08 1.35313e-07 7.22705e-08 1.48366e-07 7.77724e-08 1.59395e-07 8.74341e-08 1.67108e-07 9.93061e-08 1.71914e-07 1.1169e-07 1.71826e-07 1.28003e-07 1.67505e-07 1.4595e-07 1.5597e-07 1.64962e-07 1.3767e-07 1.81249e-07 1.1405e-07 1.92818e-07 8.82624e-08 1.99601e-07 6.28084e-08 2.02004e-07 3.96096e-08 2.00885e-07 1.99086e-08 1.97556e-07 4.35753e-09 1.93277e-07 -7.01315e-09 1.8892e-07 -1.42031e-08 1.85493e-07 -1.70543e-08 1.8369e-07 -1.46322e-08 1.83917e-07 -4.0876e-09 1.84868e-07 1.47104e-08 1.8324e-07 3.94118e-08 1.78606e-07 5.9609e-08 1.77e-07 7.66248e-08 1.68741e-07 7.58274e-08 1.51298e-07 5.65446e-08 1.32943e-07 1.57126e-08 1.07716e-07 -6.03441e-08 5.16942e-08 -1.01575e-06 3.25298e-08 4.61987e-08 5.63745e-08 5.2565e-08 7.66081e-08 5.18912e-08 9.15567e-08 5.52871e-08 1.02734e-07 5.79804e-08 1.13444e-07 5.67332e-08 1.25207e-07 5.36354e-08 1.37434e-07 5.18985e-08 1.49238e-07 5.23412e-08 1.60334e-07 5.43128e-08 1.71189e-07 5.70889e-08 1.82855e-07 6.06041e-08 1.94723e-07 6.59049e-08 2.07125e-07 7.50323e-08 2.18802e-07 8.76283e-08 2.24036e-07 1.06456e-07 2.21515e-07 1.30525e-07 2.11339e-07 1.56127e-07 1.91085e-07 1.85215e-07 1.60018e-07 2.12316e-07 1.18928e-07 2.33908e-07 7.42811e-08 2.44248e-07 3.14232e-08 2.44861e-07 -5.26056e-09 2.37569e-07 -3.39497e-08 2.26245e-07 -5.48229e-08 2.1415e-07 -6.8786e-08 2.02882e-07 -7.66391e-08 1.93346e-07 -7.85861e-08 1.85637e-07 -7.51691e-08 1.805e-07 -6.60508e-08 1.75749e-07 -4.8254e-08 1.65443e-07 -2.74381e-08 1.5779e-07 1.9294e-09 1.47633e-07 2.73222e-08 1.43348e-07 3.61129e-08 1.42507e-07 3.53428e-08 1.33713e-07 1.41344e-08 1.28924e-07 -6.25687e-08 1.28398e-07 -1.07599e-06 5.24803e-08 -6.28115e-09 9.024e-08 1.48054e-08 1.21393e-07 2.07382e-08 1.39748e-07 3.69321e-08 1.497e-07 4.80283e-08 1.60846e-07 4.55874e-08 1.74614e-07 3.98672e-08 1.88082e-07 3.8431e-08 2.00183e-07 4.02398e-08 2.10866e-07 4.36298e-08 2.21232e-07 4.67233e-08 2.33148e-07 4.86878e-08 2.47301e-07 5.17518e-08 2.63024e-07 5.93096e-08 2.76774e-07 7.38781e-08 2.86384e-07 9.68459e-08 2.86693e-07 1.30215e-07 2.71132e-07 1.71688e-07 2.38829e-07 2.17519e-07 1.84366e-07 2.66778e-07 1.1252e-07 3.05753e-07 3.40549e-08 3.22713e-07 -3.57919e-08 3.14708e-07 -9.04893e-08 2.92266e-07 -1.29138e-07 2.64894e-07 -1.54166e-07 2.39177e-07 -1.68644e-07 2.1736e-07 -1.7505e-07 1.99753e-07 -1.72411e-07 1.82997e-07 -1.62163e-07 1.70253e-07 -1.37899e-07 1.51485e-07 -1.11221e-07 1.38764e-07 -8.46304e-08 1.312e-07 -5.7513e-08 1.20515e-07 -3.45498e-08 1.20385e-07 -1.46466e-08 1.22604e-07 -7.05165e-09 1.26118e-07 -1.78694e-08 1.39742e-07 -2.81085e-08 1.38637e-07 -1.10825e-06 5.33026e-08 -5.95842e-08 1.09005e-07 -4.08971e-08 1.44112e-07 -1.43672e-08 1.70517e-07 1.05272e-08 1.88771e-07 2.97732e-08 2.07303e-07 2.70562e-08 2.21447e-07 2.57228e-08 2.33865e-07 2.60134e-08 2.45256e-07 2.8848e-08 2.55614e-07 3.32724e-08 2.65882e-07 3.64548e-08 2.79263e-07 3.5307e-08 2.96486e-07 3.45288e-08 3.1544e-07 4.03562e-08 3.34475e-07 5.48426e-08 3.50154e-07 8.11672e-08 3.56592e-07 1.23777e-07 3.43632e-07 1.84648e-07 2.98947e-07 2.62204e-07 2.12251e-07 3.53475e-07 8.60541e-08 4.3195e-07 -4.75362e-08 4.56303e-07 -1.55492e-07 4.22664e-07 -2.27622e-07 3.64395e-07 -2.70034e-07 3.07307e-07 -2.90986e-07 2.60129e-07 -2.95472e-07 2.21846e-07 -2.87163e-07 1.91444e-07 -2.71351e-07 1.67185e-07 -2.47772e-07 1.46673e-07 -2.23151e-07 1.26864e-07 -1.91887e-07 1.075e-07 -1.50431e-07 8.97436e-08 -1.14762e-07 8.48462e-08 -8.15225e-08 8.71454e-08 -4.96395e-08 9.07209e-08 -1.079e-08 8.72687e-08 6.00906e-08 6.8862e-08 4.09152e-08 1.57812e-07 -1.12742e-06 4.40044e-08 -1.03597e-07 8.75433e-08 -8.44275e-08 1.23876e-07 -5.07045e-08 1.62289e-07 -2.7889e-08 2.0755e-07 -1.54876e-08 2.36272e-07 -1.66461e-09 2.47918e-07 1.40766e-08 2.58981e-07 1.49506e-08 2.73554e-07 1.42748e-08 2.90759e-07 1.60679e-08 3.09431e-07 1.77826e-08 3.29013e-07 1.57252e-08 3.47762e-07 1.57802e-08 3.68582e-07 1.95355e-08 3.92446e-07 3.09795e-08 4.19176e-07 5.44374e-08 4.37838e-07 1.05114e-07 4.33469e-07 1.89017e-07 3.89159e-07 3.06515e-07 2.70115e-07 4.72518e-07 6.06937e-08 6.41371e-07 -1.63487e-07 6.80484e-07 -3.21609e-07 5.80785e-07 -4.05046e-07 4.47832e-07 -4.38481e-07 3.40742e-07 -4.42419e-07 2.64067e-07 -4.26026e-07 2.05453e-07 -3.98618e-07 1.64036e-07 -3.67868e-07 1.36435e-07 -3.37181e-07 1.15987e-07 -3.05249e-07 9.49316e-08 -2.69371e-07 7.16218e-08 -2.30812e-07 5.11849e-08 -1.90973e-07 4.50066e-08 -1.4934e-07 4.55133e-08 -1.11242e-07 5.26237e-08 -7.87663e-08 5.47929e-08 -2.65703e-08 1.6666e-08 -1.34575e-08 1.447e-07 -1.17971e-06 -3.77315e-08 -6.58491e-08 -7.7743e-09 -1.14384e-07 4.78205e-08 -1.0631e-07 1.09385e-07 -8.94546e-08 1.61914e-07 -6.80128e-08 2.01302e-07 -4.1052e-08 2.28783e-07 -1.34054e-08 2.47074e-07 -3.34044e-09 2.66299e-07 -4.95134e-09 2.97808e-07 -1.54423e-08 3.3861e-07 -2.30199e-08 3.66846e-07 -1.25106e-08 3.88109e-07 -5.484e-09 4.17998e-07 -1.0353e-08 4.6141e-07 -1.24331e-08 5.19654e-07 -3.80626e-09 5.98774e-07 2.59943e-08 6.50987e-07 1.36804e-07 6.2296e-07 3.34542e-07 4.22195e-07 6.73283e-07 4.91822e-08 1.01438e-06 -3.39387e-07 1.06905e-06 -5.91695e-07 8.33093e-07 -6.86019e-07 5.42157e-07 -6.88136e-07 3.42859e-07 -6.45676e-07 2.21606e-07 -5.8806e-07 1.47837e-07 -5.26115e-07 1.02092e-07 -4.76975e-07 8.72944e-08 -4.27548e-07 6.65606e-08 -3.7146e-07 3.88426e-08 -3.19231e-07 1.93925e-08 -2.68956e-07 9.10615e-10 -2.21728e-07 -2.22015e-09 -1.83631e-07 7.41588e-09 -1.86132e-07 5.51254e-08 -2.0512e-07 7.3781e-08 -1.56231e-07 -3.22204e-08 9.77795e-08 -1.09306e-07 -1.13699e-06 -6.10359e-08 -2.42964e-08 7.0054e-09 2.3831e-08 3.47714e-08 4.66714e-08 6.55794e-08 9.01604e-08 1.28004e-07 1.85637e-07 2.64237e-07 3.37985e-07 3.91538e-07 4.43523e-07 5.18692e-07 6.85069e-07 1.07853e-06 1.43872e-06 1.33366e-06 8.694e-07 5.9948e-08 -7.51088e-07 -1.28118e-06 -1.46222e-06 -1.45283e-06 -1.05188e-06 -7.43244e-07 -5.97831e-07 -5.6393e-07 -4.65153e-07 -3.66672e-07 -2.81701e-07 -2.06975e-07 -1.7428e-07 -2.72589e-07 -4.21e-07 -4.37955e-07 -2.80436e-07 8.31042e-08 ) ; boundaryField { inlet { type calculated; value uniform -1.2e-06; } inletWall { type calculated; value uniform 0; } bottleWall { type calculated; value uniform 0; } atmosphere { type calculated; value nonuniform List<scalar> 80 ( -1.22374e-06 -1.04645e-06 -8.67843e-07 -6.56612e-07 -4.55365e-07 -2.80435e-07 -1.19943e-07 7.08512e-08 2.32941e-07 3.66721e-07 4.61363e-07 5.15421e-07 5.30968e-07 5.14987e-07 4.84944e-07 4.2462e-07 3.17831e-07 1.88497e-07 3.85214e-08 -1.18216e-07 -2.4903e-07 -3.55562e-07 -4.48775e-07 -3.34337e-07 -1.96463e-07 -2.88416e-07 1.086e-07 4.79273e-07 6.08242e-07 8.85908e-07 1.29283e-06 1.74924e-06 2.08566e-06 2.1094e-06 1.688e-06 1.02527e-06 9.23839e-07 2.4091e-08 -1.20843e-06 -1.11526e-06 -4.81945e-09 -1.5113e-07 -1.37611e-07 -1.06278e-07 -7.8954e-08 -5.29538e-08 -3.23128e-08 -2.79205e-08 -4.27941e-08 -7.30748e-08 -1.01618e-07 -8.62586e-08 -5.90383e-08 -6.23369e-08 -8.76003e-08 -1.70184e-07 -3.67464e-07 -2.23395e-07 4.39608e-07 1.13754e-06 1.82384e-06 1.88009e-06 1.36319e-06 7.23191e-07 3.33474e-07 -1.79344e-07 -1.60801e-07 -4.33215e-08 5.33933e-08 -3.22172e-08 -5.96392e-08 -6.55776e-08 -7.38138e-08 -3.49155e-08 1.05727e-07 2.03541e-07 9.0737e-08 -1.89735e-07 -4.72844e-07 -1.13938e-06 ) ; } frontAndBack { type empty; value nonuniform List<scalar> 0(); } } // ************************************************************************* //
[ "shivamshahi12@gmail.com" ]
shivamshahi12@gmail.com
13013bf96b3383467c3e1e7c9a904664438a51ae
4d225291de30585a96ddd473f7037bcaf359d6a1
/build/src/modules/users/users_internal_autogen/EWIEGA46WW/moc_Config.cpp
74a93f6b73b1dfbb26b810adccf5f581afe24a83
[ "CC0-1.0" ]
permissive
yjc2021/kiyung_partition_module_2
a67b383f567300910094badea7b9410d21a504bc
5a9ce9c06a39e703d71e54ad2b24b30a3aee2ba5
refs/heads/master
2023-08-19T08:20:49.451838
2021-10-06T16:05:29
2021-10-06T16:05:29
414,142,931
0
0
null
null
null
null
UTF-8
C++
false
false
27,574
cpp
/**************************************************************************** ** Meta object code from reading C++ file 'Config.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.12.8) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "Config.h" #include <QtCore/qbytearray.h> #include <QtCore/qmetatype.h> #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'Config.h' doesn't include <QObject>." #elif Q_MOC_OUTPUT_REVISION != 67 #error "This file was generated using the moc from 5.12.8. 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 QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED struct qt_meta_stringdata_Config_t { QByteArrayData data[65]; char stringdata0[1063]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ qptrdiff(offsetof(qt_meta_stringdata_Config_t, stringdata0) + ofs \ - idx * sizeof(QByteArrayData)) \ ) static const qt_meta_stringdata_Config_t qt_meta_stringdata_Config = { { QT_MOC_LITERAL(0, 0, 6), // "Config" QT_MOC_LITERAL(1, 7, 16), // "userShellChanged" QT_MOC_LITERAL(2, 24, 0), // "" QT_MOC_LITERAL(3, 25, 21), // "autoLoginGroupChanged" QT_MOC_LITERAL(4, 47, 19), // "sudoersGroupChanged" QT_MOC_LITERAL(5, 67, 15), // "fullNameChanged" QT_MOC_LITERAL(6, 83, 16), // "loginNameChanged" QT_MOC_LITERAL(7, 100, 22), // "loginNameStatusChanged" QT_MOC_LITERAL(8, 123, 15), // "hostNameChanged" QT_MOC_LITERAL(9, 139, 21), // "hostNameStatusChanged" QT_MOC_LITERAL(10, 161, 16), // "autoLoginChanged" QT_MOC_LITERAL(11, 178, 31), // "reuseUserPasswordForRootChanged" QT_MOC_LITERAL(12, 210, 29), // "requireStrongPasswordsChanged" QT_MOC_LITERAL(13, 240, 19), // "userPasswordChanged" QT_MOC_LITERAL(14, 260, 28), // "userPasswordSecondaryChanged" QT_MOC_LITERAL(15, 289, 25), // "userPasswordStatusChanged" QT_MOC_LITERAL(16, 315, 19), // "rootPasswordChanged" QT_MOC_LITERAL(17, 335, 28), // "rootPasswordSecondaryChanged" QT_MOC_LITERAL(18, 364, 25), // "rootPasswordStatusChanged" QT_MOC_LITERAL(19, 390, 12), // "readyChanged" QT_MOC_LITERAL(20, 403, 12), // "setUserShell" QT_MOC_LITERAL(21, 416, 4), // "path" QT_MOC_LITERAL(22, 421, 17), // "setAutoLoginGroup" QT_MOC_LITERAL(23, 439, 5), // "group" QT_MOC_LITERAL(24, 445, 15), // "setSudoersGroup" QT_MOC_LITERAL(25, 461, 11), // "setFullName" QT_MOC_LITERAL(26, 473, 4), // "name" QT_MOC_LITERAL(27, 478, 12), // "setLoginName" QT_MOC_LITERAL(28, 491, 5), // "login" QT_MOC_LITERAL(29, 497, 11), // "setHostName" QT_MOC_LITERAL(30, 509, 4), // "host" QT_MOC_LITERAL(31, 514, 12), // "setAutoLogin" QT_MOC_LITERAL(32, 527, 1), // "b" QT_MOC_LITERAL(33, 529, 27), // "setReuseUserPasswordForRoot" QT_MOC_LITERAL(34, 557, 5), // "reuse" QT_MOC_LITERAL(35, 563, 25), // "setRequireStrongPasswords" QT_MOC_LITERAL(36, 589, 6), // "strong" QT_MOC_LITERAL(37, 596, 15), // "setUserPassword" QT_MOC_LITERAL(38, 612, 24), // "setUserPasswordSecondary" QT_MOC_LITERAL(39, 637, 15), // "setRootPassword" QT_MOC_LITERAL(40, 653, 24), // "setRootPasswordSecondary" QT_MOC_LITERAL(41, 678, 9), // "userShell" QT_MOC_LITERAL(42, 688, 14), // "autoLoginGroup" QT_MOC_LITERAL(43, 703, 12), // "sudoersGroup" QT_MOC_LITERAL(44, 716, 11), // "doAutoLogin" QT_MOC_LITERAL(45, 728, 8), // "fullName" QT_MOC_LITERAL(46, 737, 9), // "loginName" QT_MOC_LITERAL(47, 747, 15), // "loginNameStatus" QT_MOC_LITERAL(48, 763, 8), // "hostName" QT_MOC_LITERAL(49, 772, 14), // "hostNameStatus" QT_MOC_LITERAL(50, 787, 15), // "hostNameActions" QT_MOC_LITERAL(51, 803, 15), // "HostNameActions" QT_MOC_LITERAL(52, 819, 12), // "userPassword" QT_MOC_LITERAL(53, 832, 21), // "userPasswordSecondary" QT_MOC_LITERAL(54, 854, 20), // "userPasswordValidity" QT_MOC_LITERAL(55, 875, 19), // "userPasswordMessage" QT_MOC_LITERAL(56, 895, 12), // "rootPassword" QT_MOC_LITERAL(57, 908, 21), // "rootPasswordSecondary" QT_MOC_LITERAL(58, 930, 20), // "rootPasswordValidity" QT_MOC_LITERAL(59, 951, 19), // "rootPasswordMessage" QT_MOC_LITERAL(60, 971, 17), // "writeRootPassword" QT_MOC_LITERAL(61, 989, 24), // "reuseUserPasswordForRoot" QT_MOC_LITERAL(62, 1014, 19), // "permitWeakPasswords" QT_MOC_LITERAL(63, 1034, 22), // "requireStrongPasswords" QT_MOC_LITERAL(64, 1057, 5) // "ready" }, "Config\0userShellChanged\0\0autoLoginGroupChanged\0" "sudoersGroupChanged\0fullNameChanged\0" "loginNameChanged\0loginNameStatusChanged\0" "hostNameChanged\0hostNameStatusChanged\0" "autoLoginChanged\0reuseUserPasswordForRootChanged\0" "requireStrongPasswordsChanged\0" "userPasswordChanged\0userPasswordSecondaryChanged\0" "userPasswordStatusChanged\0rootPasswordChanged\0" "rootPasswordSecondaryChanged\0" "rootPasswordStatusChanged\0readyChanged\0" "setUserShell\0path\0setAutoLoginGroup\0" "group\0setSudoersGroup\0setFullName\0" "name\0setLoginName\0login\0setHostName\0" "host\0setAutoLogin\0b\0setReuseUserPasswordForRoot\0" "reuse\0setRequireStrongPasswords\0strong\0" "setUserPassword\0setUserPasswordSecondary\0" "setRootPassword\0setRootPasswordSecondary\0" "userShell\0autoLoginGroup\0sudoersGroup\0" "doAutoLogin\0fullName\0loginName\0" "loginNameStatus\0hostName\0hostNameStatus\0" "hostNameActions\0HostNameActions\0" "userPassword\0userPasswordSecondary\0" "userPasswordValidity\0userPasswordMessage\0" "rootPassword\0rootPasswordSecondary\0" "rootPasswordValidity\0rootPasswordMessage\0" "writeRootPassword\0reuseUserPasswordForRoot\0" "permitWeakPasswords\0requireStrongPasswords\0" "ready" }; #undef QT_MOC_LITERAL static const uint qt_meta_data_Config[] = { // content: 8, // revision 0, // classname 0, 0, // classinfo 31, 14, // methods 23, 266, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags 18, // signalCount // signals: name, argc, parameters, tag, flags 1, 1, 169, 2, 0x06 /* Public */, 3, 1, 172, 2, 0x06 /* Public */, 4, 1, 175, 2, 0x06 /* Public */, 5, 1, 178, 2, 0x06 /* Public */, 6, 1, 181, 2, 0x06 /* Public */, 7, 1, 184, 2, 0x06 /* Public */, 8, 1, 187, 2, 0x06 /* Public */, 9, 1, 190, 2, 0x06 /* Public */, 10, 1, 193, 2, 0x06 /* Public */, 11, 1, 196, 2, 0x06 /* Public */, 12, 1, 199, 2, 0x06 /* Public */, 13, 1, 202, 2, 0x06 /* Public */, 14, 1, 205, 2, 0x06 /* Public */, 15, 2, 208, 2, 0x06 /* Public */, 16, 1, 213, 2, 0x06 /* Public */, 17, 1, 216, 2, 0x06 /* Public */, 18, 2, 219, 2, 0x06 /* Public */, 19, 1, 224, 2, 0x06 /* Public */, // slots: name, argc, parameters, tag, flags 20, 1, 227, 2, 0x0a /* Public */, 22, 1, 230, 2, 0x0a /* Public */, 24, 1, 233, 2, 0x0a /* Public */, 25, 1, 236, 2, 0x0a /* Public */, 27, 1, 239, 2, 0x0a /* Public */, 29, 1, 242, 2, 0x0a /* Public */, 31, 1, 245, 2, 0x0a /* Public */, 33, 1, 248, 2, 0x0a /* Public */, 35, 1, 251, 2, 0x0a /* Public */, 37, 1, 254, 2, 0x0a /* Public */, 38, 1, 257, 2, 0x0a /* Public */, 39, 1, 260, 2, 0x0a /* Public */, 40, 1, 263, 2, 0x0a /* Public */, // signals: parameters QMetaType::Void, QMetaType::QString, 2, QMetaType::Void, QMetaType::QString, 2, QMetaType::Void, QMetaType::QString, 2, QMetaType::Void, QMetaType::QString, 2, QMetaType::Void, QMetaType::QString, 2, QMetaType::Void, QMetaType::QString, 2, QMetaType::Void, QMetaType::QString, 2, QMetaType::Void, QMetaType::QString, 2, QMetaType::Void, QMetaType::Bool, 2, QMetaType::Void, QMetaType::Bool, 2, QMetaType::Void, QMetaType::Bool, 2, QMetaType::Void, QMetaType::QString, 2, QMetaType::Void, QMetaType::QString, 2, QMetaType::Void, QMetaType::Int, QMetaType::QString, 2, 2, QMetaType::Void, QMetaType::QString, 2, QMetaType::Void, QMetaType::QString, 2, QMetaType::Void, QMetaType::Int, QMetaType::QString, 2, 2, QMetaType::Void, QMetaType::Bool, 2, // slots: parameters QMetaType::Void, QMetaType::QString, 21, QMetaType::Void, QMetaType::QString, 23, QMetaType::Void, QMetaType::QString, 23, QMetaType::Void, QMetaType::QString, 26, QMetaType::Void, QMetaType::QString, 28, QMetaType::Void, QMetaType::QString, 30, QMetaType::Void, QMetaType::Bool, 32, QMetaType::Void, QMetaType::Bool, 34, QMetaType::Void, QMetaType::Bool, 36, QMetaType::Void, QMetaType::QString, 2, QMetaType::Void, QMetaType::QString, 2, QMetaType::Void, QMetaType::QString, 2, QMetaType::Void, QMetaType::QString, 2, // properties: name, type, flags 41, QMetaType::QString, 0x00495103, 42, QMetaType::QString, 0x00495103, 43, QMetaType::QString, 0x00495103, 44, QMetaType::Bool, 0x00495003, 45, QMetaType::QString, 0x00495103, 46, QMetaType::QString, 0x00495103, 47, QMetaType::QString, 0x00495001, 48, QMetaType::QString, 0x00495103, 49, QMetaType::QString, 0x00495001, 50, 0x80000000 | 51, 0x00095409, 52, QMetaType::QString, 0x00495103, 53, QMetaType::QString, 0x00495103, 54, QMetaType::Int, 0x00485001, 55, QMetaType::QString, 0x00485001, 56, QMetaType::QString, 0x00495103, 57, QMetaType::QString, 0x00495103, 58, QMetaType::Int, 0x00485001, 59, QMetaType::QString, 0x00485001, 60, QMetaType::Bool, 0x00095401, 61, QMetaType::Bool, 0x00495103, 62, QMetaType::Bool, 0x00095401, 63, QMetaType::Bool, 0x00495103, 64, QMetaType::Bool, 0x00485001, // properties: notify_signal_id 0, 1, 2, 8, 3, 4, 5, 6, 7, 0, 11, 12, 13, 13, 14, 15, 16, 16, 0, 9, 0, 10, 17, 0 // eod }; void Config::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { auto *_t = static_cast<Config *>(_o); Q_UNUSED(_t) switch (_id) { case 0: _t->userShellChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 1: _t->autoLoginGroupChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 2: _t->sudoersGroupChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 3: _t->fullNameChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 4: _t->loginNameChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 5: _t->loginNameStatusChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 6: _t->hostNameChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 7: _t->hostNameStatusChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 8: _t->autoLoginChanged((*reinterpret_cast< bool(*)>(_a[1]))); break; case 9: _t->reuseUserPasswordForRootChanged((*reinterpret_cast< bool(*)>(_a[1]))); break; case 10: _t->requireStrongPasswordsChanged((*reinterpret_cast< bool(*)>(_a[1]))); break; case 11: _t->userPasswordChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 12: _t->userPasswordSecondaryChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 13: _t->userPasswordStatusChanged((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< const QString(*)>(_a[2]))); break; case 14: _t->rootPasswordChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 15: _t->rootPasswordSecondaryChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 16: _t->rootPasswordStatusChanged((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< const QString(*)>(_a[2]))); break; case 17: _t->readyChanged((*reinterpret_cast< bool(*)>(_a[1]))); break; case 18: _t->setUserShell((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 19: _t->setAutoLoginGroup((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 20: _t->setSudoersGroup((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 21: _t->setFullName((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 22: _t->setLoginName((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 23: _t->setHostName((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 24: _t->setAutoLogin((*reinterpret_cast< bool(*)>(_a[1]))); break; case 25: _t->setReuseUserPasswordForRoot((*reinterpret_cast< bool(*)>(_a[1]))); break; case 26: _t->setRequireStrongPasswords((*reinterpret_cast< bool(*)>(_a[1]))); break; case 27: _t->setUserPassword((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 28: _t->setUserPasswordSecondary((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 29: _t->setRootPassword((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 30: _t->setRootPasswordSecondary((*reinterpret_cast< const QString(*)>(_a[1]))); break; default: ; } } else if (_c == QMetaObject::IndexOfMethod) { int *result = reinterpret_cast<int *>(_a[0]); { using _t = void (Config::*)(const QString & ); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Config::userShellChanged)) { *result = 0; return; } } { using _t = void (Config::*)(const QString & ); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Config::autoLoginGroupChanged)) { *result = 1; return; } } { using _t = void (Config::*)(const QString & ); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Config::sudoersGroupChanged)) { *result = 2; return; } } { using _t = void (Config::*)(const QString & ); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Config::fullNameChanged)) { *result = 3; return; } } { using _t = void (Config::*)(const QString & ); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Config::loginNameChanged)) { *result = 4; return; } } { using _t = void (Config::*)(const QString & ); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Config::loginNameStatusChanged)) { *result = 5; return; } } { using _t = void (Config::*)(const QString & ); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Config::hostNameChanged)) { *result = 6; return; } } { using _t = void (Config::*)(const QString & ); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Config::hostNameStatusChanged)) { *result = 7; return; } } { using _t = void (Config::*)(bool ); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Config::autoLoginChanged)) { *result = 8; return; } } { using _t = void (Config::*)(bool ); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Config::reuseUserPasswordForRootChanged)) { *result = 9; return; } } { using _t = void (Config::*)(bool ); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Config::requireStrongPasswordsChanged)) { *result = 10; return; } } { using _t = void (Config::*)(const QString & ); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Config::userPasswordChanged)) { *result = 11; return; } } { using _t = void (Config::*)(const QString & ); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Config::userPasswordSecondaryChanged)) { *result = 12; return; } } { using _t = void (Config::*)(int , const QString & ); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Config::userPasswordStatusChanged)) { *result = 13; return; } } { using _t = void (Config::*)(const QString & ); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Config::rootPasswordChanged)) { *result = 14; return; } } { using _t = void (Config::*)(const QString & ); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Config::rootPasswordSecondaryChanged)) { *result = 15; return; } } { using _t = void (Config::*)(int , const QString & ); if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Config::rootPasswordStatusChanged)) { *result = 16; return; } } { using _t = void (Config::*)(bool ) const; if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&Config::readyChanged)) { *result = 17; return; } } } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { auto *_t = static_cast<Config *>(_o); Q_UNUSED(_t) void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QString*>(_v) = _t->userShell(); break; case 1: *reinterpret_cast< QString*>(_v) = _t->autoLoginGroup(); break; case 2: *reinterpret_cast< QString*>(_v) = _t->sudoersGroup(); break; case 3: *reinterpret_cast< bool*>(_v) = _t->doAutoLogin(); break; case 4: *reinterpret_cast< QString*>(_v) = _t->fullName(); break; case 5: *reinterpret_cast< QString*>(_v) = _t->loginName(); break; case 6: *reinterpret_cast< QString*>(_v) = _t->loginNameStatus(); break; case 7: *reinterpret_cast< QString*>(_v) = _t->hostName(); break; case 8: *reinterpret_cast< QString*>(_v) = _t->hostNameStatus(); break; case 9: *reinterpret_cast< HostNameActions*>(_v) = _t->hostNameActions(); break; case 10: *reinterpret_cast< QString*>(_v) = _t->userPassword(); break; case 11: *reinterpret_cast< QString*>(_v) = _t->userPasswordSecondary(); break; case 12: *reinterpret_cast< int*>(_v) = _t->userPasswordValidity(); break; case 13: *reinterpret_cast< QString*>(_v) = _t->userPasswordMessage(); break; case 14: *reinterpret_cast< QString*>(_v) = _t->rootPassword(); break; case 15: *reinterpret_cast< QString*>(_v) = _t->rootPasswordSecondary(); break; case 16: *reinterpret_cast< int*>(_v) = _t->rootPasswordValidity(); break; case 17: *reinterpret_cast< QString*>(_v) = _t->rootPasswordMessage(); break; case 18: *reinterpret_cast< bool*>(_v) = _t->writeRootPassword(); break; case 19: *reinterpret_cast< bool*>(_v) = _t->reuseUserPasswordForRoot(); break; case 20: *reinterpret_cast< bool*>(_v) = _t->permitWeakPasswords(); break; case 21: *reinterpret_cast< bool*>(_v) = _t->requireStrongPasswords(); break; case 22: *reinterpret_cast< bool*>(_v) = _t->isReady(); break; default: break; } } else if (_c == QMetaObject::WriteProperty) { auto *_t = static_cast<Config *>(_o); Q_UNUSED(_t) void *_v = _a[0]; switch (_id) { case 0: _t->setUserShell(*reinterpret_cast< QString*>(_v)); break; case 1: _t->setAutoLoginGroup(*reinterpret_cast< QString*>(_v)); break; case 2: _t->setSudoersGroup(*reinterpret_cast< QString*>(_v)); break; case 3: _t->setAutoLogin(*reinterpret_cast< bool*>(_v)); break; case 4: _t->setFullName(*reinterpret_cast< QString*>(_v)); break; case 5: _t->setLoginName(*reinterpret_cast< QString*>(_v)); break; case 7: _t->setHostName(*reinterpret_cast< QString*>(_v)); break; case 10: _t->setUserPassword(*reinterpret_cast< QString*>(_v)); break; case 11: _t->setUserPasswordSecondary(*reinterpret_cast< QString*>(_v)); break; case 14: _t->setRootPassword(*reinterpret_cast< QString*>(_v)); break; case 15: _t->setRootPasswordSecondary(*reinterpret_cast< QString*>(_v)); break; case 19: _t->setReuseUserPasswordForRoot(*reinterpret_cast< bool*>(_v)); break; case 21: _t->setRequireStrongPasswords(*reinterpret_cast< bool*>(_v)); break; default: break; } } else if (_c == QMetaObject::ResetProperty) { } #endif // QT_NO_PROPERTIES } QT_INIT_METAOBJECT const QMetaObject Config::staticMetaObject = { { &Calamares::ModuleSystem::Config::staticMetaObject, qt_meta_stringdata_Config.data, qt_meta_data_Config, qt_static_metacall, nullptr, nullptr } }; const QMetaObject *Config::metaObject() const { return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; } void *Config::qt_metacast(const char *_clname) { if (!_clname) return nullptr; if (!strcmp(_clname, qt_meta_stringdata_Config.stringdata0)) return static_cast<void*>(this); return Calamares::ModuleSystem::Config::qt_metacast(_clname); } int Config::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = Calamares::ModuleSystem::Config::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 31) qt_static_metacall(this, _c, _id, _a); _id -= 31; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { if (_id < 31) *reinterpret_cast<int*>(_a[0]) = -1; _id -= 31; } #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 -= 23; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 23; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 23; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 23; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 23; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 23; } #endif // QT_NO_PROPERTIES return _id; } // SIGNAL 0 void Config::userShellChanged(const QString & _t1) { void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 0, _a); } // SIGNAL 1 void Config::autoLoginGroupChanged(const QString & _t1) { void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 1, _a); } // SIGNAL 2 void Config::sudoersGroupChanged(const QString & _t1) { void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 2, _a); } // SIGNAL 3 void Config::fullNameChanged(const QString & _t1) { void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 3, _a); } // SIGNAL 4 void Config::loginNameChanged(const QString & _t1) { void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 4, _a); } // SIGNAL 5 void Config::loginNameStatusChanged(const QString & _t1) { void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 5, _a); } // SIGNAL 6 void Config::hostNameChanged(const QString & _t1) { void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 6, _a); } // SIGNAL 7 void Config::hostNameStatusChanged(const QString & _t1) { void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 7, _a); } // SIGNAL 8 void Config::autoLoginChanged(bool _t1) { void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 8, _a); } // SIGNAL 9 void Config::reuseUserPasswordForRootChanged(bool _t1) { void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 9, _a); } // SIGNAL 10 void Config::requireStrongPasswordsChanged(bool _t1) { void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 10, _a); } // SIGNAL 11 void Config::userPasswordChanged(const QString & _t1) { void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 11, _a); } // SIGNAL 12 void Config::userPasswordSecondaryChanged(const QString & _t1) { void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 12, _a); } // SIGNAL 13 void Config::userPasswordStatusChanged(int _t1, const QString & _t2) { void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)), const_cast<void*>(reinterpret_cast<const void*>(&_t2)) }; QMetaObject::activate(this, &staticMetaObject, 13, _a); } // SIGNAL 14 void Config::rootPasswordChanged(const QString & _t1) { void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 14, _a); } // SIGNAL 15 void Config::rootPasswordSecondaryChanged(const QString & _t1) { void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 15, _a); } // SIGNAL 16 void Config::rootPasswordStatusChanged(int _t1, const QString & _t2) { void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)), const_cast<void*>(reinterpret_cast<const void*>(&_t2)) }; QMetaObject::activate(this, &staticMetaObject, 16, _a); } // SIGNAL 17 void Config::readyChanged(bool _t1)const { void *_a[] = { nullptr, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(const_cast< Config *>(this), &staticMetaObject, 17, _a); } QT_WARNING_POP QT_END_MOC_NAMESPACE
[ "yongjae.choi20@gmail.com" ]
yongjae.choi20@gmail.com
4be6011099b71ff52a15817e6e7116cbd48a6dd4
556ab468222ca238dcaa50334f69cfe34207601f
/Consumer-Productor/SingleProductorConsumerModel/ConsumerProductorModel/ConsumerProductorModel.cpp
71986a58573c725ee25e087a1196cc63e4721231
[]
no_license
ldm9958/WinC-Learning
14efedbc942406c9ac24f20424b5c54cc7d2063c
c635aed16f77c2bdac682b785cbc37c220a752aa
refs/heads/master
2021-09-13T16:54:15.052846
2018-05-02T10:38:52
2018-05-02T10:38:52
110,516,248
0
0
null
null
null
null
GB18030
C++
false
false
4,287
cpp
// ConsumerProductorModel.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <stdlib.h> #include <iostream> #include <Windows.h> using namespace std; CRITICAL_SECTION g_csRepo; int iCountProduct; int iCountConsume; HANDLE g_ProductSemaphore; HANDLE g_consumeSemaphore; HANDLE g_RepoEmpty; HANDLE g_RepoFull; const int REPO_SIZE = 10; const int PRODUCT_TOTAL = 100; struct Repo { int iBuffer[REPO_SIZE]; int iProductPosition; int iConsumePosition; BOOL bIsEmpty; BOOL bIsFull; }g_repo; //struct Repo *g_repo; void InitRepo() { iCountProduct = 0; iCountConsume = 0; g_repo.bIsEmpty = TRUE; g_repo.bIsFull = FALSE; g_repo.iConsumePosition = 0; g_repo.iProductPosition = 0; } DWORD WINAPI ProductTask(LPVOID param) { while(TRUE) { Sleep(50); EnterCriticalSection(&g_csRepo); //任务是否完成 if (PRODUCT_TOTAL == iCountProduct) { cout<<"生产任务完成"<<endl; LeaveCriticalSection(&g_csRepo); ReleaseSemaphore(g_ProductSemaphore,1,NULL); return NULL; } //仓库是否满了 if (g_repo.bIsFull) { cout<<"仓库满了"<<endl; LeaveCriticalSection(&g_csRepo); continue; } else { int iTemp = (int)10*rand()/RAND_MAX; g_repo.iBuffer[g_repo.iProductPosition] = iTemp; iCountProduct ++; cout << "Product No." << iCountProduct <<"=" << iTemp <<" ProductPositon ="<< g_repo.iProductPosition <<"ConsumePosition = " << g_repo.iConsumePosition <<endl; g_repo.iProductPosition++; if (g_repo.iProductPosition == REPO_SIZE) { g_repo.iProductPosition = 0; } if (g_repo.iProductPosition == g_repo.iConsumePosition) { cout<<"仓库满了,修改标志位"<<endl; g_repo.bIsFull = TRUE; } g_repo.bIsEmpty = FALSE; } LeaveCriticalSection(&g_csRepo); } return NULL; } DWORD WINAPI ConsumeTask(LPVOID param) { while(TRUE) { Sleep(50); EnterCriticalSection(&g_csRepo); if (PRODUCT_TOTAL == iCountConsume) { LeaveCriticalSection(&g_csRepo); cout<<"消费任务完成"<<endl; ReleaseSemaphore(g_consumeSemaphore,1,NULL); return NULL; } if (g_repo.bIsEmpty) { cout << "仓库空了"<<endl; LeaveCriticalSection(&g_csRepo); continue; } else { int iTemp = 0; iTemp = g_repo.iBuffer[g_repo.iConsumePosition] ; iCountConsume ++; cout << "Consume No." << iCountConsume << "=" << iTemp <<" ProductPositon ="<< g_repo.iProductPosition <<"ConsumePosition = " << g_repo.iConsumePosition << endl; g_repo.bIsFull = FALSE; g_repo.iConsumePosition++; if(g_repo.iConsumePosition == REPO_SIZE ) { g_repo.iConsumePosition = 0; } if (g_repo.iConsumePosition == g_repo.iProductPosition) { cout <<"仓库空了,置标志位" <<endl; g_repo.bIsEmpty = TRUE; } } LeaveCriticalSection(&g_csRepo); } return NULL; } int _tmain(int argc, _TCHAR* argv[]) { InitializeCriticalSection(&g_csRepo); InitRepo(); g_ProductSemaphore = CreateSemaphore(NULL,0,1,NULL); g_consumeSemaphore = CreateSemaphore(NULL,0,1,NULL); HANDLE ThreadProduct = CreateThread( NULL, 0, ProductTask, NULL, NULL, NULL); HANDLE ThreadConsume = CreateThread( NULL, 0, ConsumeTask, NULL, NULL, NULL); CloseHandle(ThreadConsume); CloseHandle(ThreadProduct); WaitForSingleObject(g_ProductSemaphore,INFINITE); WaitForSingleObject(g_consumeSemaphore,INFINITE); CloseHandle(g_ProductSemaphore); CloseHandle(g_consumeSemaphore); DeleteCriticalSection(&g_csRepo); system("pause"); return 0; }
[ "364576019@qq.com" ]
364576019@qq.com
14f9ae4809fd4a8bcf3d8fa030672e9b9cf5cd1e
31bf87dd738db9d6b789a4f008a0411b70103548
/Runner/src/Input/NetworkInput.h
fc69acdb97bf9a0d819b290007ee6c3108a295f7
[]
no_license
nhrjr/OutRunner
cf2dd9db4b11fd5bcf1d75bafb03df71cf1977ce
e0bd437546ab771673931522c89bf3fec715e92a
refs/heads/master
2021-01-17T13:19:13.322077
2017-05-14T15:34:01
2017-05-14T15:34:01
57,307,962
1
0
null
null
null
null
UTF-8
C++
false
false
692
h
#pragma once #include "Core/Game.h" #include "IPlayerInput.h" class NetworkInput : public IPlayerInput { public: NetworkInput(Game* game); ~NetworkInput(); virtual void getInput(float dt, const std::stack<NetworkPlayerEvent>& events); virtual float getAngle(); virtual sf::Vector2f getPosition(sf::Vector2f lastPos); virtual int getAction(); virtual int getAlternateAction(); virtual void handleInput(); virtual void handleEvent(const sf::Event& event); virtual std::vector<int> getEvent(); private: Game* game; sf::Vector2f up; sf::Vector2f down; sf::Vector2f left; sf::Vector2f right; sf::Vector2f networkPos; float networkAngle; int action; int alternateAction; };
[ "jester.raced@gmail.com" ]
jester.raced@gmail.com
4cbb6ada1b796760738b6bbc5b5125374ee65112
045bd1b87752839210609b67670f9a0e2a0b19de
/src/preferencesdialog.cpp
90ccd6ffc7de5ec5b56c2b413f4cbca5ce287d16
[]
no_license
maxavadallat/translationeditor
804bdb103452d131699c7c495f41573f38a88b87
1452dbab72ef15c8ef4f074c8e101a7d106bf5ab
refs/heads/master
2020-06-12T10:21:00.305628
2019-07-05T22:13:13
2019-07-05T22:13:13
194,269,990
0
0
null
null
null
null
UTF-8
C++
false
false
33,940
cpp
#include <QDebug> #include <QDialogButtonBox> #include <QColorDialog> #include <QFontDialog> #include <QRgb> #include <QPushButton> #include <QJsonObject> #include <QPluginLoader> #include <QFileInfo> #include <QFileDialog> #include <QQmlEngine> #include <QQmlContext> #include "preferencesdialog.h" #include "ui_preferencesdialog.h" #include "preferences.h" #include "plugininfo.h" #include "shared/translationeditorexportplugininterface.h" #include "shared/translationeditorimportplugininterface.h" #include "constants.h" #include "settings_defaults.h" // GUI Font select Buton Font Size #define GUI_FONT_SELECT_BUTTON_FONT_SIZE 11 // Default Sizes #define PREFERENCES_DIALOG_WIDTH_DEFAULT 480 #define PREFERENCES_DIALOG_WIDTH_COLORS 980 // Context Property Names #define COLORS_PREVIEW_CONTEXT_PROPERTY_FONT_SIZE "cpFontSize" #define COLORS_PREVIEW_CONTEXT_PROPERTY_ROW_SIZE "cpRowSize" #define COLORS_PREVIEW_CONTEXT_PROPERTY_ALT_ROWS "cpAltRows" #define COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_TEXT "cpColorText" #define COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_BACKGROUND "cpColorBackground" #define COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_BORDER "cpColorBorder" #define COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_ROWALT "cpColorRowAlt" #define COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_HEADER "cpColorHeader" #define COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_HIGHLIGHT "cpColorHighlight" //============================================================================== // RGB To String //============================================================================== QString rgb2string(const QRgb& aColor) { // Convert To Result QString result = QString("#%1%2%3%4").arg(qAlpha(aColor), 2, 16, QChar('0')) .arg(qRed(aColor), 2, 16, QChar('0')) .arg(qGreen(aColor), 2, 16, QChar('0')) .arg(qBlue(aColor), 2, 16, QChar('0')); return result; } //============================================================================== // String To RGB //============================================================================== QRgb string2Rgb(const QString& aColor) { // Convert To Result QRgb result = qRgba(aColor.mid(3, 2).toInt(nullptr, 16), aColor.mid(5, 2).toInt(nullptr, 16), aColor.mid(7, 2).toInt(nullptr, 16), aColor.mid(1, 2).toInt(nullptr, 16)); return result; } //============================================================================== // Constructor //============================================================================== PreferencesDialog::PreferencesDialog(QWidget* aParent) : QDialog(aParent) , ui(new Ui::PreferencesDialog) , mPreferences(Preferences::getInstance()) , mDirty(false) , mLastPluginDir("") , mCustomColorsView(false) , mColorsQMLContext(nullptr) { qDebug() << "PreferencesDialog created."; // Setup UI ui->setupUi(this); // Init init(); } //============================================================================== // Init //============================================================================== void PreferencesDialog::init() { qDebug() << "PreferencesDialog::init"; // Connect Button Box Signal connect(ui->buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(buttonClicked(QAbstractButton*))); // Connect Preferences Dirty Changed Signal connect(mPreferences, SIGNAL(dirtyChanged(bool)), this, SLOT(dirtyStateChanged(bool))); // Set Enabled State - Apply ui->buttonBox->button(QDialogButtonBox::Apply)->setEnabled(mDirty); // Get Color Preview Quick Widget Engine QQmlEngine* mainEngine = ui->colorPreviewQuickWidget->engine(); // Get Color Preview Quick Widget Context mColorsQMLContext = mainEngine ? mainEngine->rootContext() : nullptr; // Check Colors Preview QML Context if (mColorsQMLContext) { // Set Context Property - Preferences mColorsQMLContext->setContextProperty(CONTEXT_PROPERTY_PREFERENCES, mPreferences); // Init Context Properties mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_FONT_SIZE, SETTINGS_DEFAULT_GUI_FONTSIZE); mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_ROW_SIZE, SETTINGS_DEFAULT_GUI_ROWHEIGHT); mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_ALT_ROWS, true); mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_TEXT, SETTINGS_DEFAULT_COLOR_TEXT); mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_BACKGROUND, SETTINGS_DEFAULT_COLOR_BACKGROUND); mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_BORDER, SETTINGS_DEFAULT_COLOR_BORDER); mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_ROWALT, SETTINGS_DEFAULT_COLOR_ROW_ALT); mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_HEADER, SETTINGS_DEFAULT_COLOR_HEADER); mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_HIGHLIGHT, SETTINGS_DEFAULT_COLOR_HIGHLIGHT); } // Set Main Quick Widget Source ui->colorPreviewQuickWidget->setSource(QUrl(COLOR_PREVIEW_SOURCE)); //qDebug() << "#### error: " << ui->colorPreviewQuickWidget->status(); // Load Preferences loadPreferences(); } //============================================================================== // Clear //============================================================================== void PreferencesDialog::clear() { qDebug() << "PreferencesDialog::clear"; // Clear Plugin List mPluginsList.clear(); } //============================================================================== // Shut Down //============================================================================== void PreferencesDialog::shutDown() { qDebug() << "PreferencesDialog::shutDown"; // Clear clear(); } //============================================================================== // Set Dirty State //============================================================================== void PreferencesDialog::setDirty(const bool& aDirty) { // Check Dirty State if (mDirty != aDirty) { qDebug() << "PreferencesDialog::setDirty - aDirty: " << aDirty; // Set Dirty State mDirty = aDirty; // ... // Update Buttons updateButtons(); } } //============================================================================== // Load PLugins //============================================================================== void PreferencesDialog::loadPluginsList() { qDebug() << "PreferencesDialog::loadPluginsList"; // Get Plugin List QStringList pluginList = mPreferences->pluginList(); // Iterate Through Plugins List for (QString pluginPath : pluginList) { // Add Plugin Info addPluginInfo(loadPlugin(pluginPath), false); } } //============================================================================== // Update Buttons //============================================================================== void PreferencesDialog::updateButtons() { qDebug() << "PreferencesDialog::updateButtons"; // Set Enabled State - Apply ui->buttonBox->button(QDialogButtonBox::Apply)->setEnabled(mDirty); // ... } //============================================================================== // Update PLugin List //============================================================================== void PreferencesDialog::updatePluginList() { qDebug() << "PreferencesDialog::updatePluginList"; // Clear List View ui->pluginListView->clear(); // Iterate Through Plugin List for (int i=0; i<mPluginsList.count(); i++) { // Add New Item ui->pluginListView->addItem(mPluginsList[i].mName + " (" + mPluginsList[i].mVersion + ")"); } } //============================================================================== // Add Plugin Info //============================================================================== void PreferencesDialog::addPluginInfo(const PluginInfo& aPluginInfo, const bool& aUpdateList) { // Check Plugin Type if (aPluginInfo.mType != -1) { qDebug() << "PreferencesDialog::addPluginInfo - name: " << aPluginInfo.mName << " - aUpdateList: " << aUpdateList; // Append PLugin Info mPluginsList << aPluginInfo; // Check Update List if (aUpdateList) { // Update Plugin List updatePluginList(); } // Set Dirty State setDirty(); } } //============================================================================== // Remove Plugin Info //============================================================================== void PreferencesDialog::removePluginInfo(const int& aIndex, const bool& aUpdateList) { // Check Index if (aIndex >= 0 && aIndex < mPluginsList.count()) { // Remove Plugin Info mPluginsList.removeAt(aIndex); // Check Update List if (aUpdateList) { // Update Plugin List updatePluginList(); } // Set Dirty State setDirty(); } } //============================================================================== // Load Plugin //============================================================================== PluginInfo PreferencesDialog::loadPlugin(const QString& aPath) { return PluginInfo::loadPlugin(aPath); } //============================================================================== // Load Preferences //============================================================================== void PreferencesDialog::loadPreferences() { // Clear First clear(); qDebug() << "PreferencesDialog::loadPreferences"; // Set GUI Theme ui->themeComboBox->setCurrentIndex(mPreferences->guiTheme()); // Init Updaed Font QFont currentFont(mPreferences->guiFontName(), GUI_FONT_SELECT_BUTTON_FONT_SIZE); // Set GUI Font Name ui->fontSelectButton->setText(mPreferences->guiFontName()); // Set Font ui->fontSelectButton->setFont(currentFont); // Set GUI Font Size ui->fontSizeSpinner->setValue(mPreferences->guiFontSize()); // Set Row Size ui->rowHeightSpinner->setValue(mPreferences->listRowHeight()); // Set Alternate Row Colors ui->alternateRowColorsCheckBox->setChecked(mPreferences->alternateRowColors()); // Set Default Font Dir ui->fontDirEditTextBox->setText(mPreferences->defaultFontDir()); // Set Qt Dir ui->qtDirEditTextBox->setText(mPreferences->qtDir()); // Set Colors ui->colorPickerButtonText->setColor(string2Rgb(mPreferences->colorText())); ui->colorPickerButtonBackground->setColor(string2Rgb(mPreferences->colorBackground())); ui->colorPickerButtonBorder->setColor(string2Rgb(mPreferences->colorBorder())); ui->colorPickerButtonAltRow->setColor(string2Rgb(mPreferences->colorRowAlt()) | 0xFF000000); ui->colorPickerButtonHeader->setColor(string2Rgb(mPreferences->colorHeader())); ui->colorPickerButtonHighlight->setColor(string2Rgb(mPreferences->colorHighlight()) | 0xFF000000); // Check Colors Preview Context if (mColorsQMLContext) { // Set Context Properties mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_FONT_SIZE, mPreferences->guiFontSize()); mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_ROW_SIZE, mPreferences->listRowHeight()); mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_ALT_ROWS, mPreferences->alternateRowColors()); mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_TEXT, mPreferences->colorText()); mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_BACKGROUND, mPreferences->colorBackground()); mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_BORDER, mPreferences->colorBorder()); mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_ROWALT, mPreferences->colorRowAlt()); mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_HEADER, mPreferences->colorHeader()); mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_HIGHLIGHT, mPreferences->colorHighlight()); } // Set Custom Colors View mCustomColorsView = (ui->themeComboBox->currentIndex() == 2); // Resize Dialog resize(mCustomColorsView ? PREFERENCES_DIALOG_WIDTH_COLORS : PREFERENCES_DIALOG_WIDTH_DEFAULT, height()); // ... // Load Plugins List loadPluginsList(); // ... // Update Buttons updateButtons(); // Update Plugin List updatePluginList(); // Reset Dirty State setDirty(false); } //============================================================================== // Load Defults //============================================================================== void PreferencesDialog::restoreDefaults() { qDebug() << "PreferencesDialog::restoreDefaults"; // Load Defaults mPreferences->loadDefaults(); // Load Preferences loadPreferences(); } //============================================================================== // Apply Settings //============================================================================== void PreferencesDialog::applyPreferences() { qDebug() << "PreferencesDialog::applyPreferences"; // Save Preferences savePreferences(); } //============================================================================== // Save Preferences //============================================================================== void PreferencesDialog::savePreferences() { // Check Dirty State if (mDirty) { qDebug() << "PreferencesDialog::savePreferences"; // Set GUI Theme mPreferences->setGuiTheme(ui->themeComboBox->currentIndex()); // Set GUI Font Name mPreferences->setGuiFontName(ui->fontSelectButton->text()); // Set GUI Font Size mPreferences->setGuiFontSize(ui->fontSizeSpinner->value()); // Set List Row Size mPreferences->setListRowHeight(ui->rowHeightSpinner->value()); // Set Alternate Row Colors mPreferences->setAlternateRowColors(ui->alternateRowColorsCheckBox->isChecked()); // Set Default Font Dir mPreferences->setDefaultFontDir(ui->fontDirEditTextBox->text()); // Set Qt Dir mPreferences->setQtDir(ui->qtDirEditTextBox->text()); // Set Colors mPreferences->setColorText(rgb2string(ui->colorPickerButtonText->getColor())); mPreferences->setColorBackground(rgb2string(ui->colorPickerButtonBackground->getColor())); mPreferences->setColorBorder(rgb2string(ui->colorPickerButtonBorder->getColor())); // Get Button Color QRgb rowAltColor = ui->colorPickerButtonAltRow->getColor(); // Init New Row Alternative Color QString newRowAltColor = QString("#%1%2%3%4").arg(SETTINGS_DEFAULT_ROWALT_ALPHA, 2, 16, QChar('0')) .arg(qRed(rowAltColor), 2, 16, QChar('0')) .arg(qGreen(rowAltColor), 2, 16, QChar('0')) .arg(qBlue(rowAltColor), 2, 16, QChar('0')); // Set Color mPreferences->setColorRowAlt(newRowAltColor); // Set Color mPreferences->setColorHeader(rgb2string(ui->colorPickerButtonHeader->getColor())); // Get Button Color QRgb highlightColor = ui->colorPickerButtonHighlight->getColor(); // Init New Highlight Color QString newHighlightColor = QString("#%1%2%3%4").arg(SETTINGS_DEFAULT_HIGHLIGHT_ALPHA, 2, 16, QChar('0')) .arg(qRed(highlightColor), 2, 16, QChar('0')) .arg(qGreen(highlightColor), 2, 16, QChar('0')) .arg(qBlue(highlightColor), 2, 16, QChar('0')); // Set Highlight Color mPreferences->setColorHighlight(newHighlightColor); // ... // Clear Plugins List mPreferences->clearPluginList(); // Iterate Through Plugins for (int i=0; i<mPluginsList.count(); i++) { // Set Plugins List mPreferences->addPlugin(mPluginsList[i].mPath); } // Save Settings mPreferences->saveSettings(); // ... // Reset Dirty State setDirty(false); } } //============================================================================== // Button Clicked Slot //============================================================================== void PreferencesDialog::buttonClicked(QAbstractButton* aButton) { // Get Role QDialogButtonBox::ButtonRole buttonRole = ui->buttonBox->buttonRole(aButton); qDebug() << "PreferencesDialog::buttonClicked - buttonRole: " << buttonRole; // Switch Role switch (buttonRole) { case QDialogButtonBox::AcceptRole: case QDialogButtonBox::ApplyRole: applyPreferences(); return; case QDialogButtonBox::ResetRole: restoreDefaults(); return; case QDialogButtonBox::RejectRole: clear(); return; default: break; } } //============================================================================== // Dirty State Changed Slot //============================================================================== void PreferencesDialog::dirtyStateChanged(const bool& aDirty) { qDebug() << "PreferencesDialog::dirtyStateChanged - aDirty: " << aDirty; // Set Enabled State - Apply //ui->buttonBox->button(QDialogButtonBox::Apply)->setEnabled(aDirty); // ... } //============================================================================== // On Font Select Button Clicked Slot //============================================================================== void PreferencesDialog::on_fontSelectButton_clicked() { // Init Font Dialog QFontDialog fontDialog; // Exec Font Dialog if (fontDialog.exec()) { // Get Current Font QFont currentFont = fontDialog.currentFont(); // Set Size currentFont.setPixelSize(GUI_FONT_SELECT_BUTTON_FONT_SIZE); // Set Button Font ui->fontSelectButton->setFont(currentFont); // Set Button Text ui->fontSelectButton->setText(currentFont.family()); // Set Dirty State setDirty(); } } //============================================================================== // GUI Theme Combo Box Current Index Changed Slot //============================================================================== void PreferencesDialog::on_themeComboBox_currentIndexChanged(int index) { // Check Visibility if (isVisible()) { qDebug() << "PreferencesDialog::on_themeComboBox_currentIndexChanged - index: " << index; // Set Custom Colors Button Enabled State ui->customColorsButton->setEnabled(index == 2); // Set Custom Colors View mCustomColorsView = (index == 2); // Resize Dialog resize(mCustomColorsView ? PREFERENCES_DIALOG_WIDTH_COLORS : PREFERENCES_DIALOG_WIDTH_DEFAULT, height()); // // Check Index // if (index == 2) { // // Set Custom Colors View // mCustomColorsView = true; // // Resize Dialog // resize(PREFERENCES_DIALOG_WIDTH_COLORS, height()); // } else { // // Reset Custom Colors View // mCustomColorsView = false; // // Resize Dialog // resize(PREFERENCES_DIALOG_WIDTH_DEFAULT, height()); // } // Set Dirty State setDirty(); // ... } } //============================================================================== // On Custom Colors Button Clicked Slot //============================================================================== void PreferencesDialog::on_customColorsButton_clicked() { // Set Custom Colors View mCustomColorsView = !mCustomColorsView; // Resize Dialog resize(mCustomColorsView ? PREFERENCES_DIALOG_WIDTH_COLORS : PREFERENCES_DIALOG_WIDTH_DEFAULT, height()); } //============================================================================== // Font Dir Select Button Clicked Slot //============================================================================== void PreferencesDialog::on_fontDirSelectButton_clicked() { // Get Dir Path QString newDirPath = QFileDialog::getExistingDirectory(nullptr, tr("Select Directory"), mPreferences->defaultFontDir()); // Check New Dir Path if (!newDirPath.isEmpty()) { // Set Default Font Dir Text Box Text ui->fontDirEditTextBox->setText(newDirPath); } } //============================================================================== // Font Dir Edit Text Changed Slot //============================================================================== void PreferencesDialog::on_fontDirEditTextBox_textChanged(const QString&) { // Check Visibility if (isVisible()) { qDebug() << "PreferencesDialog::on_fontDirEditTextBox_textChanged"; // Set Dirty State setDirty(); // ... } } //============================================================================== // Qt Dir Select Button Clicked Slot //============================================================================== void PreferencesDialog::on_qtDirSelectButton_clicked() { // Get Dir Path QString newDirPath = QFileDialog::getExistingDirectory(nullptr, tr("Select Directory"), mPreferences->qtDir()); // Check New Dir Path if (!newDirPath.isEmpty()) { // Set Qt Dir Text Box Text ui->qtDirEditTextBox->setText(newDirPath); } } //============================================================================== // Qt Dir Edit Text Box Text Changed Slot //============================================================================== void PreferencesDialog::on_qtDirEditTextBox_textChanged(const QString&) { // Check Visibility if (isVisible()) { qDebug() << "PreferencesDialog::on_qtDirEditTextBox_textChanged"; // Set Dirty State setDirty(); // ... } } //============================================================================== // Add Plugin Button Clicked Slot //============================================================================== void PreferencesDialog::on_addPluginButton_clicked() { #if defined(Q_OS_WIN) // Init Filter QString filter = "Plugins (*.dll)"; #elif defined(Q_OS_MAC) // Init Filter QString filter = "Plugins (*.dylib)"; #else // Linux/Unix // Init Filter QString filter = "Plugins (*.so)"; #endif // Check Last Plugin Dir if (mLastPluginDir.isEmpty()) { // Set Last Plugin Dir mLastPluginDir = QDir::homePath(); } // Get Plugin File Path QString pluginFilePath = QFileDialog::getOpenFileName(nullptr, "Add Plug-in", mLastPluginDir, filter); // Check Plugin Path if (!pluginFilePath.isEmpty()) { // Update Last Plugin Dir mLastPluginDir = QFileInfo(pluginFilePath).absolutePath(); } // Load PLugin Info PluginInfo pluginInfo = loadPlugin(pluginFilePath); // Add Plugin Info addPluginInfo(pluginInfo); } //============================================================================== // Remove Plugin Button Clicked Slot //============================================================================== void PreferencesDialog::on_removePluginButton_clicked() { // TODO: Confirmation // Remove Plugin Info removePluginInfo(ui->pluginListView->currentRow()); } //============================================================================== // On Color Picker Button Text Clicked Slot //============================================================================== void PreferencesDialog::on_colorPickerButtonText_clicked() { // Init Color Dialog QColorDialog colorDialog; // Exec Color Dialog if (colorDialog.exec()) { // Get Current Color QRgb currentColor = colorDialog.currentColor().rgba(); // Set Color Picker Button Color ui->colorPickerButtonText->setColor(currentColor); // Check Color Preview Context if (mColorsQMLContext) { // Set Context Property mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_TEXT, rgb2string(currentColor)); } // Set Dirty State setDirty(); } } //============================================================================== // On Color Picker Button Background Clicked Slot //============================================================================== void PreferencesDialog::on_colorPickerButtonBackground_clicked() { // Init Color Dialog QColorDialog colorDialog; // Exec Color Dialog if (colorDialog.exec()) { // Get Current Color QRgb currentColor = colorDialog.currentColor().rgba(); // Set Color Picker Button Color ui->colorPickerButtonBackground->setColor(currentColor); // Check Color Preview Context if (mColorsQMLContext) { // Set Context Property mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_BACKGROUND, rgb2string(currentColor)); } // Set Dirty State setDirty(); } } //============================================================================== // On Color Picker Button Border Clicked Slot //============================================================================== void PreferencesDialog::on_colorPickerButtonBorder_clicked() { // Init Color Dialog QColorDialog colorDialog; // Exec Color Dialog if (colorDialog.exec()) { // Get Current Color QRgb currentColor = colorDialog.currentColor().rgba(); // Set Color Picker Button Color ui->colorPickerButtonBorder->setColor(currentColor); // Check Color Preview Context if (mColorsQMLContext) { // Set Context Property mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_BORDER, rgb2string(currentColor)); } // Set Dirty State setDirty(); } } //============================================================================== // On Color Picker Button Alternative Row Clicked Slot //============================================================================== void PreferencesDialog::on_colorPickerButtonAltRow_clicked() { // Init Color Dialog QColorDialog colorDialog; // Exec Color Dialog if (colorDialog.exec()) { // Get Current Color QRgb currentColor = colorDialog.currentColor().rgba(); // Set Color Picker Button Color ui->colorPickerButtonAltRow->setColor(currentColor); // Check Color Preview Context if (mColorsQMLContext) { // Init New Alternative Row Color QString newRowAltColor = QString("#%1%2%3%4").arg(SETTINGS_DEFAULT_ROWALT_ALPHA, 2, 16, QChar('0')) .arg(qRed(currentColor), 2, 16, QChar('0')) .arg(qGreen(currentColor), 2, 16, QChar('0')) .arg(qBlue(currentColor), 2, 16, QChar('0')); // Set Context Property mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_ROWALT, newRowAltColor); } // Set Dirty State setDirty(); } } //============================================================================== // On Color Picker Button Header Clicked Slot //============================================================================== void PreferencesDialog::on_colorPickerButtonHeader_clicked() { // Init Color Dialog QColorDialog colorDialog; // Exec Color Dialog if (colorDialog.exec()) { // Get Current Color QRgb currentColor = colorDialog.currentColor().rgba(); // Set Color Picker Button Color ui->colorPickerButtonHeader->setColor(currentColor); // Check Color Preview Context if (mColorsQMLContext) { // Set Context Property mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_HEADER, rgb2string(currentColor)); } // Set Dirty State setDirty(); } } //============================================================================== // On Color Picker Button Highlight Clicked Slot //============================================================================== void PreferencesDialog::on_colorPickerButtonHighlight_clicked() { // Init Color Dialog QColorDialog colorDialog; // Exec Color Dialog if (colorDialog.exec()) { // Get Current Color QRgb currentColor = colorDialog.currentColor().rgba(); // Set Color Picker Button Color ui->colorPickerButtonHighlight->setColor(currentColor); // Check Color Preview Context if (mColorsQMLContext) { // Init New Highlight Color QString newHighlightColor = QString("#%1%2%3%4").arg(SETTINGS_DEFAULT_HIGHLIGHT_ALPHA, 2, 16, QChar('0')) .arg(qRed(currentColor), 2, 16, QChar('0')) .arg(qGreen(currentColor), 2, 16, QChar('0')) .arg(qBlue(currentColor), 2, 16, QChar('0')); // Set Context Property mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_COLOR_HIGHLIGHT, newHighlightColor); } // Set Dirty State setDirty(); } } //============================================================================== // On Font Size Spinner Value Changed Slot //============================================================================== void PreferencesDialog::on_fontSizeSpinner_valueChanged(int arg1) { // Check Visibility if (isVisible()) { qDebug() << "PreferencesDialog::on_fontSizeSpinner_valueChanged - arg1: " << arg1; // Check Color Preview Context if (mColorsQMLContext) { // Set Context Property mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_FONT_SIZE, arg1); } // Set Dirty State setDirty(); // ... } } //============================================================================== // On Row Height Spinner Value Changed Slot //============================================================================== void PreferencesDialog::on_rowHeightSpinner_valueChanged(int arg1) { // Check Visibility if (isVisible()) { qDebug() << "PreferencesDialog::on_rowHeightSpinner_valueChanged - arg1: " << arg1; // Check Color Preview Context if (mColorsQMLContext) { // Set Context Property mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_ROW_SIZE, arg1); } // Set Dirty State setDirty(); // ... } } //============================================================================== // On Alternate Row Colors Toggled Slot //============================================================================== void PreferencesDialog::on_alternateRowColorsCheckBox_toggled(bool checked) { // Check Visibility if (isVisible()) { qDebug() << "PreferencesDialog::on_alternateRowColorsCheckBox_toggled - checked: " << checked; // Check Color Preview Context if (mColorsQMLContext) { // Set Context Property mColorsQMLContext->setContextProperty(COLORS_PREVIEW_CONTEXT_PROPERTY_ALT_ROWS, checked); } // Set Dirty State setDirty(); // ... } } //============================================================================== // Destructor //============================================================================== PreferencesDialog::~PreferencesDialog() { // Shut Down shutDown(); // ... // Delete UI delete ui; // Check Preferences if (mPreferences) { // Release Instance mPreferences->release(); } qDebug() << "PreferencesDialog deleted."; }
[ "zoltan.petracs@harman.com" ]
zoltan.petracs@harman.com
8213b4f355c352fa3ad775526d6047bf4f2a9cd7
73d952e71373f8decdd0253617c03ad32b6db555
/app/mediaPlayer/Util/DefaultMutex.cpp
f37f51a0fc40a51629ea73333a51121202daff16
[]
no_license
SulfredLee/nameLess
50acf9438ab09c4267e93040664382cd66766092
af5045dc8b95be33e56ce2a2f5f15853f69663ac
refs/heads/master
2021-06-24T22:51:17.346583
2020-10-17T11:46:23
2020-10-17T11:46:23
140,074,086
0
0
null
null
null
null
UTF-8
C++
false
false
666
cpp
#include "DefaultMutex.h" DefaultMutex::DefaultMutex() { pthread_mutexattr_init(&m_Attr); pthread_mutexattr_settype(&m_Attr, PTHREAD_MUTEX_DEFAULT); pthread_mutex_init(&m_Mutex, &m_Attr); } DefaultMutex::~DefaultMutex() { pthread_mutex_destroy(&m_Mutex); } void DefaultMutex::Lock() { pthread_mutex_lock(&m_Mutex); } void DefaultMutex::Unlock() { pthread_mutex_unlock(&m_Mutex); } pthread_mutex_t* DefaultMutex::GetMutex() { return &m_Mutex; } DefaultLock::DefaultLock(DefaultMutex* pDefaultMutex) { m_pDefaultMutex = pDefaultMutex; m_pDefaultMutex->Lock(); } DefaultLock::~DefaultLock() { m_pDefaultMutex->Unlock(); }
[ "sflee1112@gmail.com" ]
sflee1112@gmail.com
ac9f0ddb8023027dc41597840fe7639546b07469
82ad47f1b9b7c83bae80b49cb353126323827698
/src/icSim/main.cpp
908b039ab204f5e411b74693aab7ab401f8ba514
[]
no_license
Juxi/icVision
bdf0decb86d1edea2475ac60d5c960fed45b3e5c
a564d37336e9f0da4357e712dd40534417918a57
refs/heads/master
2021-01-10T18:45:06.297971
2014-09-17T14:15:51
2014-09-17T14:15:51
14,870,548
8
2
null
null
null
null
UTF-8
C++
false
false
908
cpp
// Copyright: (C) 2012-2013 Juxi Leitner // Author: Juxi Leitner <juxi.leitner@gmail.com> // find more information at http://Juxi.net/projects/icVision/ // CopyPolicy: Released under the terms of the GNU GPL v2.0. #include <cstdio> #include <iostream> #include <yarp/os/all.h> #include <yarp/sig/all.h> #include "simulatedRobot.h" using namespace yarp::os; //using namespace yarp::sig; int main(int argc, char * argv[]) { Network::init(); if( ! Network::checkNetwork() ) { std::cout << "I am afraid but I could not find a YARP server!" << std::endl; return 1; } std::string version = "v0.1"; printf("Launching icVision Simulated Robot (%s)...\n", version.c_str()); icSimulatedRobot module; /* run the module: runModule() calls configure first and, if successful, it then runs the module*/ module.runModule(argc, argv); //module.interrupt(); module.close(); return 0; }
[ "juxi.leitner@gmail.com" ]
juxi.leitner@gmail.com
119eb1b2dc74f0fffcd85fc540ae0029c88dab78
77175d4ea07c21ae29b774568f9728fa0d033776
/management/ControlStreams.cc
33c6987d2b0817b4dce4ad8e202ec85d8e0ddca2
[]
no_license
lcls-daq/pds
e7c8e33250df6bf172d26966d687fb6b4b9eb2d4
2f23434a8b215a0b17097732226e9f56fb208d1b
refs/heads/master
2023-08-31T20:03:35.704427
2023-08-17T10:16:05
2023-08-17T10:16:05
87,124,361
0
1
null
null
null
null
UTF-8
C++
false
false
1,449
cc
#include "ControlStreams.hh" #include "pds/utility/ToEventWire.hh" #include "pds/utility/OpenOutlet.hh" //#include "pds/utility/Occurrence.hh" #include "pds/service/BitList.hh" #include "pds/collection/Node.hh" #include "pds/service/Task.hh" #include "pds/service/VmonSourceId.hh" #include "pds/management/PartitionMember.hh" #include "EventBuilder.hh" #include "pds/xtc/XtcType.hh" using namespace Pds; ControlStreams::ControlStreams(PartitionMember& cmgr) : WiredStreams(VmonSourceId(cmgr.header().level(), 0)) { // VmonEb vmoneb(vmon()); Level::Type level = cmgr.header().level(); int ipaddress = cmgr.header().ip(); unsigned eventpooldepth = 32; for (int s = 0; s < StreamParams::NumberOfStreams; s++) { _outlets[s] = new OpenOutlet(*stream(s)->outlet()); // _outlets[s] = new ToEventWire(*stream(s)->outlet(), // cmgr, // ipaddress, // MaxSize*netbufdepth, // cmgr.occurrences()); EventBuilder* eb = new EventBuilder(cmgr.header().procInfo(), _xtcType, level, *stream(s)->inlet(), *_outlets[s], s, ipaddress, MaxSize, eventpooldepth, cmgr.slowEb()); // vmoneb); eb->no_build(Sequence::Event,1<<TransitionId::L1Accept); _inlet_wires[s] = eb; } } ControlStreams::~ControlStreams() { for (int s = 0; s < StreamParams::NumberOfStreams; s++) { delete _inlet_wires[s]; delete _outlets[s]; } }
[ "none@example.com" ]
none@example.com
c2759ccd951d06bccbbfebe29a8de58f2910e5f2
d80d6a39dbce7419933339f98be5988179bcde51
/project/src/local_test.cpp
05a0e062f33a9900626b8bdd85cb72d7a36eaae3
[]
no_license
Jamesuhao/Linux
3507f02f54321f35ab079882264a6b444e3e774d
53f5df13b504671a01b1ba917023da360cffb769
refs/heads/master
2020-07-13T12:18:14.466926
2020-04-13T15:23:56
2020-04-13T15:23:56
205,074,882
0
0
null
null
null
null
UTF-8
C++
false
false
1,696
cpp
#include "order_system.hpp" int main() { MYSQL* mysql = _order_sys::MysqlInit(); if(mysql==NULL) { return -1; } _order_sys::DishTable dish_tb(mysql); _order_sys::OrderTable order_tb(mysql); /* * 插入菜品信息 Json::Value dish; dish["name"]="红烧肉"; dish["price"]=3600; dish_tb.Insert(dish); */ /* * 查询单个菜品信息 Json::Value dish1; Json::StyledWriter writer; dish_tb.SelectOne(4,&dish1); std::cout<<"dish:"<<writer.write(dish1)<<std::endl; */ /* * 查询所有菜品信息 Json::Value dish2; Json::StyledWriter writer2; dish_tb.SelectAll(&dish2); std::cout<<"dish:"<<writer2.write(dish2)<<std::endl; */ /* * 更新菜品信息 Json::Value dish3; dish3["id"]=6; dish3["name"]="唐僧肉"; dish3["price"]=6800; dish_tb.Update(dish3); */ /* * 删除菜品信息 dish_tb.Delete(8); */ //订单数据管理测试 Json::Value order; Json::StyledWriter writer; /* * 订单插入测试 order["table_id"]=5; order["dishes"].append(6); order["dishes"].append(7); order["status"]=0; order_tb.Insert(order); */ /* * 查询单个订单信息 Json::Value order1; order_tb.SelectOne(1,&order1); std::cout<<"order:"<<writer.write(order1)<<std::endl; */ /*查询所有订单信息 Json::Value order2; order_tb.SelectAll(&order2); std::cout<<"order:"<<writer.write(order2)<<std::endl; */ /*更新订单信息 order["id"]=1; order["table_id"]=3; order["dishes"].append(6); order["status"]=0; order_tb.Update(order); */ /* * 删除订单信息 order_tb.Delete(1); */ _order_sys::MysqlDestroy(mysql); return 0; }
[ "1766727840@qq.com" ]
1766727840@qq.com
5ce073a8a6d09e9c15e2d08d65fc21524f330ecf
bf56756ca927621dc1b8362b248974f2a731ecfb
/src/DllEntry.cpp
d2b8eb89547064a47d83cbee63433df39a0caabb
[]
no_license
apprentice3d/3dsmax_gismo_howto
e66e567ab7911c57975a8fc9b78cccba42f06610
fe1ed62b441dc3710e7079f2e8c7c81c15cc87e6
refs/heads/master
2021-01-16T22:02:27.157047
2016-05-31T14:21:51
2016-05-31T14:21:51
60,093,500
1
0
null
null
null
null
UTF-8
C++
false
false
3,290
cpp
//**************************************************************************/ // Copyright (c) 1998-2007 Autodesk, Inc. // All rights reserved. // // These coded instructions, statements, and computer programs contain // unpublished proprietary information written by Autodesk, Inc., and are // protected by Federal copyright law. They may not be disclosed to third // parties or copied or duplicated in any form, in whole or in part, without // the prior written consent of Autodesk, Inc. //**************************************************************************/ // DESCRIPTION: Contains the Dll Entry stuff // AUTHOR: //***************************************************************************/ #include "Informix.h" extern ClassDesc2* GetInformixDesc(); HINSTANCE hInstance; int controlsInit = FALSE; // This function is called by Windows when the DLL is loaded. This // function may also be called many times during time critical operations // like rendering. Therefore developers need to be careful what they // do inside this function. In the code below, note how after the DLL is // loaded the first time only a few statements are executed. BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID /*lpvReserved*/) { if( fdwReason == DLL_PROCESS_ATTACH ) { // Hang on to this DLL's instance handle. hInstance = hinstDLL; DisableThreadLibraryCalls(hInstance); // DO NOT do any initialization here. Use LibInitialize() instead. } return(TRUE); } // This function returns a string that describes the DLL and where the user // could purchase the DLL if they don't have it. __declspec( dllexport ) const TCHAR* LibDescription() { return GetString(IDS_LIBDESCRIPTION); } // This function returns the number of plug-in classes this DLL //TODO: Must change this number when adding a new class __declspec( dllexport ) int LibNumberClasses() { return 1; } // This function returns the number of plug-in classes this DLL __declspec( dllexport ) ClassDesc* LibClassDesc(int i) { switch(i) { case 0: return GetInformixDesc(); default: return 0; } } // This function returns a pre-defined constant indicating the version of // the system under which it was compiled. It is used to allow the system // to catch obsolete DLLs. __declspec( dllexport ) ULONG LibVersion() { return VERSION_3DSMAX; } // This function is called once, right after your plugin has been loaded by 3ds Max. // Perform one-time plugin initialization in this method. // Return TRUE if you deem your plugin successfully loaded, or FALSE otherwise. If // the function returns FALSE, the system will NOT load the plugin, it will then call FreeLibrary // on your DLL, and send you a message. __declspec( dllexport ) int LibInitialize(void) { #pragma message(TODO("Perform initialization here.")) return TRUE; } // This function is called once, just before the plugin is unloaded. // Perform one-time plugin un-initialization in this method." // The system doesn't pay attention to a return value. __declspec( dllexport ) int LibShutdown(void) { #pragma message(TODO("Perform un-initialization here.")) return TRUE; } TCHAR *GetString(int id) { static TCHAR buf[256]; if (hInstance) return LoadString(hInstance, id, buf, _countof(buf)) ? buf : NULL; return NULL; }
[ "grigord@ads.autodesk.com" ]
grigord@ads.autodesk.com
fd306c3ff34ade7dfcb6a6ed6178e0ea8bd89d10
43924e6d2802a0de49ebc0e9a152336181dd11ac
/Geomtry/LineLineIntersect.cpp
3f8b5ef9ac2e0ed7353cd4ad3a1e23e3bcf84d5a
[]
no_license
neko-suki/icpc-library
c53b8a59e7dc4d8491b6a710632c50364921cf3b
a108d73c16be02794182f9152fe58786baed9953
refs/heads/master
2020-03-20T05:38:12.903281
2018-12-23T05:39:30
2018-12-23T05:39:30
137,221,638
0
0
null
null
null
null
UTF-8
C++
false
false
587
cpp
//Line Line intersection //accepter by UVa609 #include<iostream> #include<complex> using namespace std; #define EPS 0 #define EQ(a,b) abs(a-b) < EPS typedef complex<double> P; //外積 double cross(P a,P b){ return a.real()*b.imag()-a.imag()*b.real(); } // a1,a2を通る直線とb1,b2を通る直線の交差判定 bool is_intersect_ll(P a1,P a2,P b1,P b2){ return !EQ( cross(a1-a2,b1-b2),0.0); } // a1,a2を通る直線とb1,b2を通る直線の交点計算 P intersection_ll(P a1,P a2,P b1,P b2){ P a= a2-a1,b=b2-b1; return a1+ a*cross(b,b1-a1)/cross(b,a); } main(){ }
[ "hogehogehoge1111@gmail.com" ]
hogehogehoge1111@gmail.com
76840074bf651b6281a3b3dafc7cbdc662bcdd8d
6d48da9106dd6fa20630af71094d0790369cfb68
/cpp/levelOrder.h
69af9cd9d294a6b6520c721a27141157870a964d
[]
no_license
peanut-buttermilk/fun-run
968f587ea80f32be92c6825b9274ad25ff9ac275
187a11b41d14e4bf29380bdcd1c542d06545ee1a
refs/heads/master
2021-01-21T09:34:33.838314
2020-06-07T20:50:41
2020-06-07T20:50:41
53,075,983
0
0
null
null
null
null
UTF-8
C++
false
false
2,931
h
// // levelOrder.h // CPP Test9 // // Created by Balaji Cherukuri on 8/23/15. // Copyright (c) 2015 FooBar. All rights reserved. // #ifndef __CPP_Test9__levelOrder__ #define __CPP_Test9__levelOrder__ #include <vector> #include <queue> #include <iomanip> #include <iostream> namespace levelOrder { struct TreeNode { int val; TreeNode* left; TreeNode* right; TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} }; void printVVI(const std::vector<std::vector<int>>& vvi) { for (auto r : vvi) { std::cout << "[ "; for (auto c : r) { std::cout << std::setw(3) << c; } std::cout << "]\n"; } } std::vector<std::vector<int>> levelOrder(TreeNode *t) { std::vector<std::vector<int>> levels; if (!t) return levels; std::queue<TreeNode*> main; std::queue<TreeNode*>* qM = &main; std::queue<TreeNode*> alternate; std::queue<TreeNode*>* qA = &alternate; int curLevel = 0; levels.push_back(std::vector<int>(1)); levels[0][0] = t->val; qM->push(t); levels.push_back(std::vector<int>()); while (!qM->empty()) { TreeNode *n = qM->front(); qM->pop(); if (n->left) { qA->push(n->left); levels[curLevel+1].push_back(n->left->val); } if (n->right) { qA->push(n->right); levels[curLevel+1].push_back(n->right->val); } //printVVI(levels); if (qM->empty()) { if (qA->empty()) { levels.erase(levels.begin()+curLevel+1); break; } curLevel++; levels.push_back(std::vector<int>()); std::queue<TreeNode*>* tmp = qA; qA = qM; qM = tmp; } } return levels; } void unitTest() { { TreeNode *r10 = new TreeNode(10); TreeNode *l5 = new TreeNode(5); r10->left = l5; TreeNode *r15 = new TreeNode(15); r10->right = r15; TreeNode *l2 = new TreeNode(2); l5->left = l2; TreeNode *l1 = new TreeNode(1); l2->left = l1; TreeNode *r3 = new TreeNode(3); l2->right = r3; std::cout << "Level Order: \n"; printVVI(levelOrder(r10)); } } } #endif /* defined(__CPP_Test9__levelOrder__) */
[ "dharabalaji@Dharas-MacBook-Air.local" ]
dharabalaji@Dharas-MacBook-Air.local
bc147b9a9db84c8cacfb2424276e9a58b460d46f
600df3590cce1fe49b9a96e9ca5b5242884a2a70
/ui/ozone/demo/renderer_base.cc
85033c767d63f65602a2d578129bca31deb9bc41
[ "BSD-3-Clause" ]
permissive
metux/chromium-suckless
efd087ba4f4070a6caac5bfbfb0f7a4e2f3c438a
72a05af97787001756bae2511b7985e61498c965
refs/heads/orig
2022-12-04T23:53:58.681218
2017-04-30T10:59:06
2017-04-30T23:35:58
89,884,931
5
3
BSD-3-Clause
2022-11-23T20:52:53
2017-05-01T00:09:08
null
UTF-8
C++
false
false
665
cc
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/ozone/demo/renderer_base.h" #include <cmath> namespace ui { namespace { const int kAnimationSteps = 240; } // namespace RendererBase::RendererBase(gfx::AcceleratedWidget widget, const gfx::Size& size) : widget_(widget), size_(size) { } RendererBase::~RendererBase() { } float RendererBase::NextFraction() { float fraction = (sinf(iteration_ * 2 * M_PI / kAnimationSteps) + 1) / 2; iteration_++; iteration_ %= kAnimationSteps; return fraction; } } // namespace ui
[ "enrico.weigelt@gr13.net" ]
enrico.weigelt@gr13.net
1faaa3f797463cbdca35cdf02cca8b503f7d8311
36fd6a38645f8d24657c8d29bb3c46069c6a2c2d
/project1/src/main2.cpp
7556f9b5ecc6b75074e6722f512db9a24987de5f
[]
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
2,006
cpp
#include "segment.h" #include "merge.h" #include <cstdlib> int main() { int arrayTwo[25344],temp2[25344],Npixels=25344; uchar numbers[25344]; int indices[25344]; int pixelClass[144][176]; int *temp3; uchar *arrayOne; temp3 = (int*)pixelClass; //initialize indices for (int i=0;i<25344;i++) { indices[i]=i; temp3[i]=0; } //read image Mat image=imread("distance4.png",0); cvtColor(image,image2,CV_GRAY2RGB); //merge sort pixel depth values arrayOne = image.data; originalImage= image.data; for (int i=0;i<25344;i++) { numbers[i]=arrayOne[i]; } mergeSort(numbers,indices,arrayTwo, temp2, 25344); /* for (int i = 0; i < 25344; i++) { {//cout<<"ha"<<i<<" "<<indices[i]<<" "; cout<<int(numbers[i])<<" ";} } */ int xmax,xmin,ymax,ymin,zmax,zmin,objectNo,j2; objectNo=1; //run through pixels considering the closest pixel first (check this) for (int i=0;i<Npixels;i++) { //if pixel is not classified as object yet, seed the pixel xmax=0;xmin=imageWidth-1;ymax=0;ymin=imageHeight-1;zmax=0;zmin=255,j2=0; //if (i>25270) {cout<<"man"<<indices[i]/imageWidth<<" "<<indices[i]%imageWidth;cin>>temp2[2];} if (pixelClass[indices[i]/imageWidth][indices[i]%imageWidth]==0 && numbers[i]<thresh2 && numbers[i]>thresh3) { //cout<<objectNo<<" "<<indices[i]%imageWidth<<" "<<indices[i]/imageWidth<<" "<<i;cin>>temp2[2]; checkPixel(indices[i]%imageWidth,indices[i]/imageWidth,pixelClass,xmax,xmin,ymax,ymin,zmax,zmin,objectNo,j2); //Store details of segmented object location,width,hieght and depth of bb objects[objectNo][0]=xmin;objects[objectNo][1]=xmax;objects[objectNo][2]=ymin;objects[objectNo][3]=ymax; objects[objectNo][4]=zmin;objects[objectNo][5]=zmax; if (j2>1500) { //cout<<xmin<<" "; objectNo++; rectangle(image2, cvPoint(xmin,ymin), cvPoint(xmax,ymax), CV_RGB( rand()&255, rand()&255, rand()&255 ), 1); //imwrite("answer.bmp",image2);cin>>temp2[2]; } } } imwrite("answer.bmp",image2); return 0; }//end main2
[ "siddharth_oli@yahoo.com" ]
siddharth_oli@yahoo.com
8271bd9d744487992cb2173c2fb132813c9ec279
6d21d751bc283c36829c725806a4c4198280440a
/csce221/PA3/Part1/SimpleDoublyLinkedList/SimpleDoublyLinkedList.cpp
0a68b375e3a12bf87ce9cd1edacd6a1dc48ff1f8
[]
no_license
ComeauxC46/School
f6d6e8841522377cc50b75696ce56f463d1883b6
4d57cf4543e3769316e637ca75b3b39f36123b14
refs/heads/master
2020-04-05T22:57:38.490814
2018-01-16T21:40:24
2018-01-16T21:40:24
68,050,649
1
0
null
null
null
null
UTF-8
C++
false
false
3,756
cpp
#include <iostream> using namespace std; // list node struct Node { int data; // each node holds an integer data Node* previous; // pointer to the previous node Node* next; // pointer to the next node Node(int d=0, Node* prv=NULL, Node* nxt=NULL) : data(d), previous(prv), next(nxt) {} Node* get_previous() const { return previous; } Node* get_next() const { return next; } Node* insert_before(int d); // insert the int before this node // return a pointer to the inserted node Node* insert_after(int d); // insert the int after this node // return a pointer to the inserted node void delete_before(); // delete the node before this node void delete_after(); // delete the node after this node }; // insert the int before this node // return a pointer to the inserted node //O(1) Node* Node::insert_before(int d) { Node* newNode = new Node(d, previous, this); // create/initilize new node previous->next = newNode; // make node before this to point to newNode previous = newNode; // make this node point back to newNode return newNode; } // insert the int after this node // return a pointer to the inserted node //O(1) Node* Node::insert_after(int d) { Node* newNode = new Node(d, this, next); //create/initilize new node next->previous = newNode; // make node after this point to new node next = newNode; // make this.next point forward to newNode return newNode; } // delete the node before this node //O(1) void Node::delete_before() { Node *deleteNode = previous; // obtain adress of this.previous previous->previous->next = this; // make node before deleted node point to this node previous = previous->previous; // make this.previous point to node before deleted node delete deleteNode; //delete this.previous } // delete the node after this node //O(1) void Node::delete_after() { Node *deleteNode = next; // obtain adress of this.next next->next->previous = this; // make node after deleted node point to this node next = next->next; // make this.next point to node after deleted node delete deleteNode; //delete this.next } // Display the doubly linked list void display_list(Node* header, Node* trailer) { Node* p=header->get_next(); //Node* p=header; // uncomment this if want to display the header while (p!=trailer) { cout << p->data << ", "; p=p->get_next(); } //cout << p->data << ", "; // uncomment this if want to display the trailer cout << endl; } // Test program int main() { // Construct a linked list with header & trailer cout << "Create a new list" << endl; Node *header = new Node(-1); Node *trailer = new Node(-2); trailer->previous = header; header->next = trailer; cout << "list: "; display_list(header,trailer); cout << endl; // Insert 10 nodes at back with value 10,20,30,..,100 cout << "Insert 10 nodes at back with value 10,20,30,..,100" << endl; for (int i=10;i<=100;i+=10) { trailer->insert_before(i); } cout << "list: "; display_list(header,trailer); cout << endl; // Insert 10 nodes at front with value 100,90,80,..,10 cout << "Insert 10 nodes at front with value 100,90,80,..,10" << endl; for (int i=10;i<=100;i+=10) { header->insert_after(i); } cout << "list: "; display_list(header,trailer); cout << endl; // Delete the last 10 nodes cout << "Delete the last 10 nodes" << endl; for (int i=0;i<10;i++) { trailer->delete_before(); } cout << "list: "; display_list(header,trailer); cout << endl; // Delete the first 10 nodes cout << "Delete the first 10 nodes" << endl; for (int i=0;i<10;i++) { header->delete_after(); } cout << "list: "; display_list(header,trailer); return 0; }
[ "cmc236@tamu.edu" ]
cmc236@tamu.edu
cf0a15b4984e207c38e97bbd200cd9c2188792ec
ce73575cd0af12701d80d70f1bf9f24010c9b9ad
/PrgAPI.cpp
9d2edc0fed31fc7feb6bb9c105a85b1eb95ca235
[]
no_license
samithaj/Jaangle
6667fa1cedc1aaa0b443ae17291d09144a434919
c2695abeab25eaa9710be4fdbc71e12f052bd7f9
refs/heads/master
2020-05-20T18:48:21.525613
2013-02-25T19:53:04
2014-05-01T20:33:41
null
0
0
null
null
null
null
UTF-8
C++
false
false
70,262
cpp
// /* // * // * Copyright (C) 2003-2010 Alexandros Economou // * // * This file is part of Jaangle (http://www.jaangle.com) // * // * This Program is free software; you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by // * the Free Software Foundation; either version 2, 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 GNU Make; see the file COPYING. If not, write to // * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. // * http://www.gnu.org/copyleft/gpl.html // * // */ #include "stdafx.h" #include "PrgAPI.h" #include "TeenSpirit.h" #include "ObjFactory.h" #include "AppSettings/AppSettings.h" #include "LocalPictureManager.h" #include "InfoDownloadManager.h" #include "ActionManager.h" #include "ServicesRegistrationSrv.h" #include "TeenSpiritPlayer.h" #include "FileTagger.h" #include "ResourceUtils.h" #include "SkinManager.h" #include "MenuManager.h" #include "SQLManager.h" #include "CollectionManager.h" #include "UpdateChecker.h" #include "FlexButton.h" #include "InformationProviders/InfoProviderFactory.h" #include "MessageDlg.h" #include "InfoCtrl.h" #include "HotKeyManager.h" #include "ShortcutManager.h" #include "ConfigurationManager.h" #include "LastFMServices.h" #include "Trackers/MultiTracker.h" #include "UserProgressDlg.h" #include "TSOnlineServices.h" #include "VersionNo.h" #include "MediaPlayerUtilities.h" #include "ApplicationMonitor.h" #include "AppMonitor.h" #include "Language/LanguageManager.h" #include "ExceptionHandler.h" #include "BassInstance.h"//Is needed for initial bass configuration (Init) #include "TranslationManager.h" #include "StateManager.h" #include "MainTreeCtrl.h" #include "TSMenu.h" #include "TrayToolTipDlg.h" #include "MiniPlayerDlg.h" #include "QuickSearchDlg.h" #include "SearchDlg.h" #include "AppSettings/IniAppSettings.h" //=== For 0.99 Version //#define USE_YOUTUBEENGINE #ifdef _DEBUG #define new DEBUG_NEW #endif // DatabasePath=L:\TS-storage\db\ // StoragePath=L:\TS-storage\pix\ UINT cDefaultBaseFontSize = 14; LPCTSTR cDefaultBaseFontName = _T("Tahoma"); LPCTSTR const cGeneral = _T("General"); LPCTSTR const cPlayerSettings = _T("Player"); LPCTSTR const cInfoMgrSettings = _T("InfoManager"); LPCTSTR const cInfoControlSettings =_T("InfoControl"); LPCTSTR const cPaneSettings = _T("Panes"); LPCTSTR const cTagManager = _T("TagManager"); LPCTSTR const cViewerPane = _T("ViewerPane"); LPCTSTR const cMiniPlayer = _T("MiniPlayer"); LPCTSTR const cTree = _T("Tree"); LPCTSTR const cTrackList = _T("TrackList"); LPCTSTR const cPlayList = _T("PlayList"); LPCTSTR const cLastFM = _T("LastFM"); //LPCTSTR const SettingsCategory = _T("Main"); LPCTSTR const cOptionLanguage = _T("Language"); LPCTSTR const cOptionSkin = _T("Skin"); LPCTSTR const cOptionUser = _T("User"); LPCTSTR const cOptionPass = _T("Pass"); LPCTSTR const cErrStr = _T("ErrorString"); struct OptInfo { AppOptionsEnum optID; LPCTSTR valueName; LPCTSTR category; INT defVal; }; struct StringOptInfo { INT resID; LPCTSTR valueName; LPCTSTR category; LPCTSTR defVal; }; const OptInfo Option2Info[] = { {OPT_GEN_Debugging, _T("Debugging"), cGeneral, 0}, //OPT_GEN_Debugging {OPT_GEN_NotifyMSN, _T("NotifyMSN"), cGeneral, 1}, //OPT_GEN_NotifyMSN {OPT_GEN_LastFMScrobbler, _T("LastFMScrobbler"), cGeneral, 0}, //OPT_GEN_LastFMScrobbler, {OPT_GEN_NotifyHistory, _T("NotifyHistory"), cGeneral, 1}, //OPT_GEN_NotifyHistory, {OPT_GEN_CheckForUpdates, _T("CheckForUpdates"), cGeneral, 1}, //OPT_GEN_CheckForUpdates {OPT_GEN_DaysBetweenCheck, _T("DaysBetweenCheck"), cGeneral, 5}, //OPT_GEN_DaysBetweenCheck {OPT_GEN_CheckLastCheck, _T("CheckLastCheck"), cGeneral, 0}, //OPT_GEN_CheckLastCheck {OPT_GEN_DaysMeansNew, _T("DaysMeansNew"), cGeneral, 30}, //OPT_GEN_DaysMeansNew {OPT_GEN_LastVersion, _T("LastVersion"), cGeneral, 0}, //OPT_GEN_LastVersion {OPT_GEN_AutoUpdateDB, _T("AutoUpdateDB"), cGeneral, 0}, //, {OPT_GEN_AutoUpdateDBDelay, _T("AutoUpdateDBDelay"), cGeneral, 300}, //OPT_GEN_AutoUpdateDelay,(sec) {OPT_GEN_MinimizeToTray, _T("MinimizeToTray"), cGeneral, 1}, //OPT_GEN_MinimizeToTray {OPT_GEN_MultimediaKeysActive, _T("MultimediaKeysActive"), cGeneral, 1}, //OPT_GEN_MultimediaKeysActive {OPT_GEN_UseNativeOnlineServices, _T("UseNativeOnlineServices"), cGeneral, -1}, //OPT_GEN_UseTSOnlineServices {OPT_GEN_RelativeFontSize, _T("RelativeFontSize"), cGeneral, 0}, //OPT_GEN_RelativeFontSize {OPT_GEN_ForceClearTypeFonts, _T("ForceClearTypeFonts"), cGeneral, 1}, //OPT_GEN_ForceClearTypeFonts {OPT_GEN_ShowToolTipOnMediaChanged, _T("ShowToolTipOnMediaChanged"), cGeneral, 1}, //{0, _T("PaneLayoutStyle"), cPaneSettings, 0}, //OPT_PANES_PaneLayoutStyle {OPT_TAG_WriteComments, _T("WriteComments"), cTagManager, 1}, //, {OPT_TAG_WriteLyrics, _T("WriteLyrics"), cTagManager, 1}, //OPT_TAG_WriteLyrics, {OPT_TAG_WriteRating, _T("WriteRating"), cTagManager, 0}, //OPT_TAG_WriteRating, {OPT_TAG_SafetyOption, _T("SafetyOption"), cTagManager, 50}, //OPT_TAG_SafetyOption {OPT_TAG_SafetyOptionManual, _T("SafetyOptionManual"), cTagManager, 100}, //OPT_TAG_SafetyOptionManual {OPT_TAG_MP3, _T("mp3"), cTagManager, 3}, //OPT_TAG_MP3, {OPT_TAG_OGG, _T("ogg"), cTagManager, 3}, //OPT_TAG_OGG, {OPT_TAG_OGA, _T("oga"), cTagManager, 3}, //OPT_TAG_OGA, {OPT_TAG_FLAC, _T("flac"), cTagManager, 3}, //OPT_TAG_FLAC, {OPT_TAG_MPC, _T("mpc"), cTagManager, 3}, //OPT_TAG_MPC, {OPT_TAG_WV, _T("wv"), cTagManager, 3}, //OPT_TAG_WV, {OPT_TAG_SPX, _T("spx"), cTagManager, 3}, //OPT_TAG_SPX, {OPT_TAG_TTA, _T("tta"), cTagManager, 3}, //OPT_TAG_TTA, {OPT_TAG_M4A, _T("m4a"), cTagManager, 0}, //OPT_TAG_M4A, {OPT_TAG_WMA, _T("wma"), cTagManager, 1}, //OPT_TAG_WMA, {OPT_TAG_AIF, _T("aif"), cTagManager, 3}, //OPT_TAG_AIF, {OPT_TAG_WAV, _T("wav"), cTagManager, 3}, //OPT_TAG_WAV, //{IDS_SHUFFLE, cPlayerSettings, 0}, //OPT_PL_Shuffle //{IDS_LOOP, cPlayerSettings, 0}, //OPT_PL_Loop, //{IDS_AUTOCONTINUE, cPlayerSettings, 1}, //OPT_PL_AutoContinue, {OPT_PL_PlayMode, _T("PlayMode"), cPlayerSettings, 3}, //OPT_PL_PlayMode, {OPT_PL_AutoContinueMode, _T("AutoContinueMode"), cPlayerSettings, RTM_All}, //OPT_PL_AutoContinueMode, {OPT_PL_Volume, _T("Volume"), cPlayerSettings, 90}, //OPT_PL_Volume, {OPT_PL_RememberLastTrack, _T("RememberLastTrack"), cPlayerSettings, 1}, //OPT_PL_RememberLastTrack, {OPT_PL_LastTrack, _T("LastTrack"), cPlayerSettings, 0}, //OPT_PL_LastTrackIndex, {OPT_PL_RememberLastTime, _T("RememberLastTime"), cPlayerSettings, 0}, //, {OPT_PL_LastTime, _T("LastTime"), cPlayerSettings, 0}, //OPT_PL_LastTime, {OPT_PL_AutoPlay, _T("AutoPlay"), cPlayerSettings, 0}, //OPT_PL_AutoPlay, {OPT_PL_Crossfade, _T("Crossfade"), cPlayerSettings, 1}, //OPT_PL_Crossfade, {OPT_PL_CrossfadeAtStart, _T("CrossfadeAtStart"), cPlayerSettings, 0}, //OPT_PL_CrossfadeAtStart, {OPT_PL_Mute, _T("Mute"), cPlayerSettings, 0}, {OPT_PL_DefaultAction, _T("DefaultAction"), cPlayerSettings, MPA_Play}, {OPT_PL_CrossfadeAtEnd, _T("CrossfadeAtEnd"), cPlayerSettings, 3000}, //OPT_PL_CrossfadeAtEnd, {OPT_PL_EqualizerMode, _T("EqualizerMode"), cPlayerSettings, 0}, //OPT_PL_EqualizerMode, {OPT_PL_UseSampleFloat, _T("UseSampleFloat"), cPlayerSettings, 1}, //OPT_PL_UseSampleFloat, {OPT_PL_UseFloatDSP, _T("UseFloatDSP"), cPlayerSettings, 1}, //OPT_PL_UseFloatDSP, {OPT_IM_AutoDlArtistBio, _T("AutoDlArtistBio"), cInfoMgrSettings, 1}, //OPT_IM_AutoDlArtistBio, {OPT_IM_AutoDlAlbumReview, _T("AutoDlAlbumReview"), cInfoMgrSettings, 1}, //OPT_IM_AutoDlAlbumReview, {OPT_IM_AutoDlLyrics, _T("AutoDlLyrics"), cInfoMgrSettings, 0}, //OPT_IM_AutoDlLyrics, {OPT_IM_AutoDlAlbumPicture, _T("AutoDlAlbumPicture"), cInfoMgrSettings, 1}, //OPT_IM_AutoDlArtistPicture, {OPT_IM_AutoDlArtistPicture, _T("AutoDlArtistPicture"), cInfoMgrSettings, 1}, //OPT_IM_AutoDlAlbumPicture, {OPT_IM_AutoDlActivationDelay, _T("AutoDlActivationDelay"), cInfoMgrSettings, 3}, //OPT_IM_AutoDlActivationDelay {OPT_IM_UseFolderImages, _T("UseFolderImages"), cInfoMgrSettings, 1}, //OPT_IM_UseFolderImages {OPT_MINIPLR_ShowAtStartup, _T("ShowAtStartup"), cMiniPlayer, 0}, //OPT_MINIPLR_ShowAtStartup {OPT_MINIPLR_Automatic, _T("Automatic"), cMiniPlayer, 1}, {OPT_MINIPLR_ForceOnTop, _T("ForceOntTop"), cMiniPlayer, 0}, {OPT_MINIPLR_ForceOnTopDelay, _T("ForceOntTopDelay"), cMiniPlayer, 15}, {OPT_MINIPLR_Transparency, _T("Transparency"), cMiniPlayer, 140}, //OPT_MINIPLR_Transparency, {OPT_MINIPLR_ShowTooltips, _T("ShowTooltips"), cMiniPlayer, 1}, //OPT_MINIPLR_ShowTooltips, {OPT_MINIPLR_ShowExtraInfo, _T("ShowExtraInfo"), cMiniPlayer, 1}, //OPT_MINIPLR_ShowExtraInfo, {OPT_MINIPLR_MaxSize, _T("MaxSize"), cMiniPlayer, 400}, //OPT_MINIPLR_MaxSize {OPT_MINIPLR_DisableTransparencyOnMouseOver, _T("DisableTransparencyOnMouseOver"), cMiniPlayer, 1}, //OPT_MINIPLR_MaxSize //{IDS_NUMBEROFTRACKS, 0, cTree, 1}, //OPT_TREE_ShowNumTracks, //{IDS_YEAR, 0, cTree, 1}, //OPT_TREE_ShowYear, //{IDS_ITEMGROUPING, 0, cTree, 0}, //OPT_TREE_GroupingEnabled, //{IDS_MINNUMOFTRACKS, 0, cTree, 3}, //OPT_TREE_GroupingNumber, //{IDS_MODE, 0, cTree, SMODE_ArtistsAlbums}, //OPT_TREE_Mode //{IDS_ARTIST, 0, cTree, RSO_Title}, //OPT_TREE_SortArtist, //{IDS_ALBUM, 0, cTree, RSO_Year}, //OPT_TREE_SortAlbum, //{IDS_GENRE, 0, cTree, RSO_Title}, //OPT_TREE_SortGenre, //{IDS_COLLECTION, 0, cTree, RSO_Title}, //OPT_TREE_SortCollection, //{IDS_YEAR, 0, cTree, RSO_Title}, //OPT_TREE_SortYear, //{IDS_MONTH, 0, cTree, RSO_Title}, //OPT_TREE_SortMonth, //{IDS_FILTER, 0, cTree, SFILT_All}, //OPT_TREE_Filter, //{IDS_STYLE, 0, cTree, SSTYL_3}, //OPT_TREE_Style, //{0, _T("LastSectionID"), cTree, 0}, //OPT_TREE_LastSectionID, //{0, _T("LastSectionType"), cTree, 0}, //OPT_TREE_LastSectionType, //{IDS_SHOWINFOICONS, 0, cTrackList, 1}, //OPT_TRACKLIST_ShowInfoIcons //{IDS_SHOWNUMBERS, 0, cPlayList, 0}, //OPT_PL_ShowNumbers {OPT_Last,0,0,0} }; const StringOptInfo StringOption2Info[] = { {0, _T("AppMonitoring"), cGeneral, NULL}, //SOPT_GEN_Monitoring {0, _T("PaneSorting"), cPaneSettings, NULL}, //SOPT_PANES_Sorting {0,0,0,0} }; PrgAPI* PrgAPI::m_pInst = NULL; PrgAPI* PrgAPI::Instance() { if (m_pInst == NULL) { m_pInst = new PrgAPI; m_pInst->Init(); } return m_pInst; } void PrgAPI::Shutdown() { if (m_pInst == NULL) return; delete m_pInst; } void PrgAPI::SaveSettings() { TRACEST(_T("PrgAPI::SaveSettings")); AppSettings* pAppSettings = GetAppSettings(); TCHAR monitor[500]; GetAppMonitor()->Save(monitor, 500); SetStringOption(SOPT_GEN_Monitoring, monitor); TranslationManager* pLM = GetTranslationManager(); pAppSettings->Write(cGeneral, cOptionLanguage, pLM->GetTranslationPath()); SkinManager* pSM = GetSkinManager(); pAppSettings->Write(cGeneral, cOptionSkin, pSM->GetSkin().GetSkinPath()); SetOption(OPT_GEN_RelativeFontSize, pSM->GetSkin().GetRelativeFontSize()); if (m_pInfoProviderFactory != NULL) m_pInfoProviderFactory->SaveSettings(); if (m_pHotKeyManager != NULL) m_pHotKeyManager->SaveSettings(); if (m_pTrayToolTipDlg != NULL) { //=== Save Settings } if (m_pMiniPlayerDlg != NULL) { //=== Save Settings } if (m_pQuickSearchDlg != NULL) { //=== Save Settings } if (m_pSearchDlg != NULL) { //=== Save Settings } if (m_pLastFMServices != NULL) { pAppSettings->Write(cLastFM, cOptionUser, m_pLastFMServices->GetUserName()); pAppSettings->Write(cLastFM, cOptionPass, m_pLastFMServices->GetMD5Password()); } WriteOptions(); pAppSettings->Save(); } #ifdef _UNITTESTING BOOL PrgAPI::UnitTest() { for (int i = 0; i < 250; i++) { FLOAT stars = Rating2Stars(i); UNITTEST(stars <= 6.0); if (i < 251) UNITTEST(Stars2Rating(stars) == i); } return TRUE; } #endif PrgAPI::PrgAPI(): m_pNotificationTarget(NULL), m_pAppSettings(NULL), m_pLocalPictureManager(NULL), m_pInfoDownloadManager(NULL), m_pMediaPlayer(NULL), m_pInfoProviderFactory(NULL), m_hInternet(0), m_pActionManager(NULL), m_pServicesRegistrationSrv(NULL), m_pFileTagger(NULL), m_pSkinManager(NULL), m_bDownloading(FALSE), m_pMenuManager(NULL), m_pTranslationManager(NULL), m_pSQLManager(NULL), //m_pTrackViewer(NULL), //m_pSectionViewer(NULL), m_pCollectionManager(NULL), m_pHotKeyManager(NULL), m_pTrayToolTipDlg(NULL), m_pMiniPlayerDlg(NULL), m_pQuickSearchDlg(NULL), m_pSearchDlg(NULL), m_pLastFMServices(NULL), m_pTracker(NULL), m_pTSOnlineServices(NULL), m_pShortcutManager(NULL), m_pConfigurationManager(NULL), m_pStateManager(NULL), m_pAppMonitor(NULL) { memset(m_pAppFonts, 0, sizeof(m_pAppFonts)); memset(m_AppIcons, 0, sizeof(m_AppIcons)); m_userRootPath[0] = 0; m_commonRootPath[0] = 0; } PrgAPI::~PrgAPI() { //=== YOU SHOULD NOT DESTROY A WINDOW HERE. // AN ERROR MAY OCCUR AS THE MFC DOES NOT LIKE TO DESTROY WINDOWS AFTER IT HAS DESTROYED // HIS MANIN WND. For example... if you try to destroy TrayToolTipDlg here // a premature exit may occur before reaching this point TRACEST(_T("PrgAPI::~PrgAPI")); GetAppMonitor()->StopMonitoring(); SaveSettings(); if (m_hInternet != 0) { InternetCloseHandle(m_hInternet); m_hInternet = NULL; } delete m_pSkinManager; m_pSkinManager = NULL; delete m_pHotKeyManager; m_pHotKeyManager = NULL; DestroyTrayToolTipDlg(); DestroyMiniPlayerDlg(); DestroyQuickSearchDlg(); DestroyAdvancedSearchDlg(); //TRACE(_T("@2*delete* m_pShortcutManager\r\n")); delete m_pShortcutManager; m_pShortcutManager = NULL; delete m_pConfigurationManager; m_pConfigurationManager = NULL; delete m_pStateManager; m_pStateManager = NULL; //TRACE(_T("@2*delete* m_pLastFMServices\r\n")); delete m_pLastFMServices; m_pLastFMServices = NULL; //TRACE(_T("@2*delete* m_pTracker\r\n")); delete m_pTracker; m_pTracker = NULL; //TRACE(_T("@2*delete* m_pTSOnlineServices\r\n")); delete m_pTSOnlineServices; m_pTSOnlineServices = NULL; //TRACE(_T("@2*delete* m_pCollectionManager\r\n")); delete m_pCollectionManager; m_pCollectionManager = NULL; //TRACE(_T("@2*delete* m_pServicesRegistrationSrv\r\n")); delete m_pServicesRegistrationSrv; m_pServicesRegistrationSrv = NULL; //TRACE(_T("@2*delete* m_pMediaPlayer\r\n")); delete m_pMediaPlayer; m_pMediaPlayer = NULL; //TRACE(_T("@2*delete* m_pLocalPictureManager\r\n")); delete m_pLocalPictureManager; m_pLocalPictureManager = NULL; //TRACE(_T("@2*delete* m_pInfoDownloadManager\r\n")); delete m_pInfoDownloadManager; m_pInfoDownloadManager = NULL; //TRACE(_T("@2*delete* m_pActionManager\r\n")); delete m_pActionManager; m_pActionManager = NULL; //TRACE(_T("@2*delete* m_pInfoProviderFactory\r\n")); delete m_pInfoProviderFactory; m_pInfoProviderFactory = NULL; //TRACE(_T("@2*delete* m_pFileTagger\r\n")); delete m_pFileTagger; m_pFileTagger = NULL; //TRACE(_T("@2*delete* m_pMenuManager\r\n")); delete m_pMenuManager; m_pMenuManager = NULL; //TRACE(_T("@2*delete* m_pLanguageManager\r\n")); delete m_pTranslationManager; m_pTranslationManager = NULL; //TRACE(_T("@2*delete* ObjFactory\r\n")); delete ObjFactory::Instance(); //TRACE(_T("@2*delete* m_pSQLManager\r\n")); delete m_pSQLManager; m_pSQLManager = NULL; //TRACE(_T("@2*delete* ..fonts...\r\n")); ClearFonts(); //TRACE(_T("@2*delete* ..icons...\r\n")); for (int i=0 ; i<ICO_Last; i++) { if (m_AppIcons[i] != NULL) { DestroyIcon(m_AppIcons[i]); m_AppIcons[i] = NULL; } } //TRACE(_T("@2*delete* m_pAppSettings\r\n")); if (m_pAppSettings != NULL) { m_pAppSettings->Save(); delete m_pAppSettings; m_pAppSettings = NULL; } delete m_pAppMonitor; m_pAppMonitor = NULL; } AppMonitor* PrgAPI::GetAppMonitor() { if (m_pAppMonitor == NULL) { m_pAppMonitor = new AppMonitor; TCHAR monitor[500]; if (GetStringOption(SOPT_GEN_Monitoring, monitor, 500)) { VERIFY(m_pAppMonitor->Load(monitor)); } AppMonitor::State& st = m_pAppMonitor->GetState(); if (st.TotalRuns == 0) { //=== This is the first time that this appmonitor runs [version >= 96b] //=== Check if ver 96 has ever been run ApplicationMonitor amJaangle(TRUE); amJaangle.InitByName(_T("Jaangle")); if (amJaangle.GetCount(ApplicationMonitor::CT_TotalRuns) > 0) { //=== Version 96 Found. Get the values st.TotalRuns = amJaangle.GetCount(ApplicationMonitor::CT_TotalRuns); st.TotalCrashes = amJaangle.GetCount(ApplicationMonitor::CT_TotalCrashes); amJaangle.GetInstallationDate(&st.InstallationDate); st.RunningTimeInMinutes = amJaangle.GetRunningTimeInMinutes(); st.AppUniqueID = amJaangle.GetAppUniqueID(); } //=== Check if ver < 96 (Teen Spirit) has ever been run ApplicationMonitor apTS(TRUE); apTS.InitByName(_T("Teen Spirit")); if (apTS.GetCount(ApplicationMonitor::CT_TotalRuns) > 0) { //=== Version Teen Spirit (<96) Found. if (st.TotalRuns == 0) { //=== Jaangle has never been run st.TotalRuns = apTS.GetCount(ApplicationMonitor::CT_TotalRuns); st.TotalCrashes = apTS.GetCount(ApplicationMonitor::CT_TotalCrashes); } //===The previous code has a bug and it couldn't take // the UniqueID & real installation Date. So we will re-grab it here apTS.GetInstallationDate(&st.InstallationDate); st.RunningTimeInMinutes = apTS.GetRunningTimeInMinutes(); st.AppUniqueID = apTS.GetAppUniqueID(); } } m_pAppMonitor->StartMonitoring(); m_pAppMonitor->IncreaseAppCount(); if (m_pAppMonitor->IsAfterCrash()) m_pAppMonitor->IncreaseCrashCount(); m_pAppMonitor->Save(monitor, 500); SetStringOption(SOPT_GEN_Monitoring, monitor); } return m_pAppMonitor; } BOOL PrgAPI::Init() { TRACEST(_T("PrgAPI::Init")); #ifdef _DEBUG for (INT i = 1; i < OPT_Last; i++) { if (Option2Info[i].optID != i) ASSERT(0); } #endif ReadOptions(); //===Check for Crash LPCTSTR files[] = CRASHREPORT_FILES; TCHAR crashLogPath[MAX_PATH]; GetPath(PATH_CrashLogFile, crashLogPath); BOOL bCrashLogExists = FALSE; if (_taccess(crashLogPath, 0) == 0) { bCrashLogExists = TRUE; TRACE(_T("@1 PrgAPI::Init Crash Log exists meaning that the app has crashed\r\n")); //=== Crash Log exists meaning that the app has crashed. //=== 1. Delete the file DeleteFile(crashLogPath); //=== 2. Increase the crash count //GetAppMonitor()->IncreaseCrashCount(); //=== 3. Change the debugging option if (GetOption(OPT_GEN_Debugging) == 0) { if (MessageBox(NULL, _T("Jaangle seems to have crashed. Do you want to enable crash logging?"), NULL, MB_YESNO) == IDYES) { SetOption(OPT_GEN_Debugging, 1); WriteOptions();//=== Save this info (in a case of a second crash) } } } if (GetAppMonitor()->IsAfterCrash()) { if (bCrashLogExists) TRACE(_T("@1 PrgAPI::Init Abnormal Ending Detected. CrashLog OK\r\n")); else { //ASSERT(0); TRACE(_T("@1 PrgAPI::Init Abnormal Ending Detected. CrashLog DOES NOT EXIST\r\n")); } } else { if (bCrashLogExists) { ASSERT(0); TRACE(_T("@1 PrgAPI::Init CrashLog Found but there was no crash detection\r\n")); } } #ifdef ALOG_ACTIVE if (GetOption(OPT_GEN_Debugging) == 1) { TCHAR debugLogPath[MAX_PATH]; ALog* pLog = ALog::Inst(); pLog->AddViewer(new PrunnedFileViewer(GetPath(PATH_LoggingFile, debugLogPath), 15)); pLog->SetOption(ALog::LO_MaxAllowedDepth, 5); pLog->SetOption(ALog::LO_DefaultDepth, 3); pLog->SetOption(ALog::LO_ShowDepth, 1); pLog->SetOption(ALog::LO_ShowTimeFromStartup, 1); pLog->SetOption(ALog::LO_ShowThreadID, 1); pLog->SetOption(ALog::LO_AlwaysCheckForLastError, 1); } #endif //=== Initial bass instance initialization BassInstance::bUseFloatDSP = GetOption(OPT_PL_UseFloatDSP) != 0; BassInstance::bUseSampleFloat = GetOption(OPT_PL_UseSampleFloat) != 0; std::tstring value; GetAppSettings()->Read(cGeneral, cOptionLanguage, value, _T("")); BOOL bLoaded = FALSE; TranslationManager* pLM = GetTranslationManager(); if (value.empty()) { //=== This value does not exist. Load lang ny langID pLM->LoadTranslationByLANGID(GetSystemDefaultLangID()); } else if (value[0] == '@') { //=== Default Language. Do not load anything } else { //=== Load the selected translation pLM->LoadTranslation(value.c_str()); } FileVersion fv; if (GetFileVersion(fv)) { if (fv.Build != GetOption(OPT_GEN_LastVersion)) { TRACE(_T("@2 New Version detected %d->%d\r\n"), GetOption(OPT_GEN_LastVersion), fv.Build); AppMonitor::State& state = GetAppMonitor()->GetState(); state.Runs = 1; state.Crashes = 0; SetOption(OPT_GEN_LastVersion, fv.Build); SetOption(OPT_GEN_CheckLastCheck, 0);//Make it perform an update check instantly after first time //Write it here. Otherwise if the program crash It ll reset the creashes for the current version GetAppSettings()->Write(Option2Info[OPT_GEN_LastVersion].category, GetStringForOption(OPT_GEN_LastVersion), fv.Build); } else TRACE(_T("@2Version: %d\r\n"), fv.Build); } return TRUE; } void PrgAPI::TryToTransferOldSettingsIfAvailable() { //Copy Jaangle.ini -> Settings.ini TCHAR legacyPath[MAX_PATH]; TCHAR newPath[MAX_PATH]; GetPath(PATH_ExeRoot, legacyPath); _tcscat(legacyPath, _T("Jaangle.ini")); GetPath(PATH_SettingsFile, newPath); if (!CopyFile(legacyPath, newPath, FALSE)) return; MessageBox(NULL, _T("Jaangle will try to transfer old settings. Press OK to continue."), _T("Upgrading"), 0); //Copy LastTracks.m3u GetPath(PATH_ExeRoot, legacyPath); _tcscat(legacyPath, _T("User\\LastTracks.m3u")); GetPath(PATH_LastTracksFile, newPath); CopyFile(legacyPath, newPath, FALSE); //Copy Music.mdb GetPathLegacy(PATHLEGACY_DatabaseRoot, legacyPath); _tcscat(legacyPath, _T("music.mdb")); GetPath(PATH_DatabaseRoot, newPath); _tcscat(newPath, _T("music.mdb")); CopyFile(legacyPath, newPath, FALSE); //Copy Images INT len = sizeof(legacyPath); memset(legacyPath, 0, sizeof(legacyPath)); memset(newPath, 0, sizeof(newPath)); GetPathLegacy(PATHLEGACY_StorageRoot, legacyPath); _tcscat(legacyPath, _T("*.*")); GetPath(PATH_ImagesRoot, newPath); SHFILEOPSTRUCT sfos; sfos.hwnd = NULL; sfos.wFunc = FO_COPY; sfos.pFrom = legacyPath; sfos.pTo = newPath; //sfos.fFlags = FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_SILENT | FOF_NO_UI | FOF_NOCONFIRMMKDIR; sfos.fFlags = FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_NOCONFIRMMKDIR; sfos.fAnyOperationsAborted = NULL; sfos.hNameMappings = NULL; sfos.lpszProgressTitle = _T("Jaange - Copying images"); SHFileOperation(&sfos); MessageBox(NULL, _T("Jaangle transfered all settings. Press OK to continue."), _T("Success"), 0); //MoveImages } //to BE removed AppSettings* PrgAPI::GetAppSettings() { if (m_pAppSettings == NULL) { TRACEST(_T("PrgAPI::GetAppSettings [CREATE]")); m_pAppSettings = new IniAppSettings(); TCHAR settingsPath[MAX_PATH]; if (!PathFileExists(GetPath(PATH_SettingsFile, settingsPath))) { TryToTransferOldSettingsIfAvailable(); } m_pAppSettings->Load(settingsPath); } return m_pAppSettings; } LPCTSTR PrgAPI::GetString(INT resID) { ASSERT(resID != 0); LPCTSTR ret = NULL; if (resID > 0) { ret = GetTranslationManager()->GetString(resID); //if (m_pTranslationManager != NULL && m_pLanguageManager->IsLanguageLoaded()) // ret = m_pLanguageManager->GetLanguage().GetString(resID); //if (ret == NULL) // ret = m_resourceBasedLanguage.GetString(resID); } else { TRACE(_T("@0 PrgAPI::GetString Unknown resID:%d\r\n"), resID); } if (ret == NULL) return _T(""); return ret; } LPCTSTR PrgAPI::GetStringForItemType(ItemTypeEnum it) { ASSERT(it >= IT_Unknown && it < IT_Last); INT resID = IDS_UNKNOWN; if (it >= IT_Unknown && it < IT_Last) { static const INT ItemTypeToStringResource[] = { IDS_UNKNOWN, IDS_VARIOUS, IDS_ARTIST, IDS_ALBUM, IDS_GENRE, IDS_YEAR, IDS_UNKNOWN, //???? IDS_COLLECTION, IDS_TITLE, IDS_UNKNOWN, //??? IDS_UNKNOWN }; resID = ItemTypeToStringResource[it]; } return GetString(resID); } LPCTSTR PrgAPI::GetStringForInfoItemType(InfoItemTypeEnum iit) { ASSERT(iit >= IIT_Unknown && iit < IIT_Last); INT resID = IDS_UNKNOWN; if (iit >= IIT_Unknown && iit < IIT_Last) { static const INT InfoItemTypeToStringResource[] = { IDS_UNKNOWN, IDS_ARTISTBIO, IDS_ALBUMREVIEW, IDS_COMMENTS, IDS_LYRICS, IDS_PERSONAL, IDS_TABLATURES, IDS_ARTISTPICTURE, IDS_ALBUMPICTURE, IDS_UNKNOWN }; resID = InfoItemTypeToStringResource[iit]; } return GetString(resID); } LPCTSTR PrgAPI::GetStringForCollectionType(CollectionTypesEnum ct) { ASSERT(ct >= CTYPE_Unknown && ct < CTYPE_Last); INT resID = IDS_UNKNOWN; if (ct >= CTYPE_Unknown && ct < CTYPE_Last) { static const INT CollectionTypeToStringResource[] = { IDS_UNKNOWN, //CTYPE_Unknown IDS_LOCALFOLDER, IDS_MEDIA, IDS_NETFOLDER, IDS_VIRTUALTRACKS, //CTYPE_Virtual IDS_REMOVABLE, IDS_AUDIOCD, IDS_UNKNOWN }; ASSERT(sizeof(CollectionTypeToStringResource) / sizeof(INT) == CTYPE_Last); resID = CollectionTypeToStringResource[ct]; } return GetString(resID); } const INT RandomModeToStringResource[] = { IDS_ALL, IDS_ARTIST, IDS_ALBUM, IDS_GENRE, IDS_YEAR, IDS_COLLECTION, IDS_NEW }; LPCTSTR PrgAPI::GetStringForRandomMode(RandomTrackModeEnum rtm) { ASSERT(rtm >= RTM_All && rtm < RTM_Last); INT resID = IDS_UNKNOWN; if (rtm >= RTM_All && rtm < RTM_Last) { ASSERT(sizeof(RandomModeToStringResource) / sizeof(INT) == RTM_Last); resID = RandomModeToStringResource[rtm]; } return GetString(resID); } const INT TrackTextTypeToStringResource[] = { IDS_TITLE, IDS_ALBUM, IDS_ARTIST }; LPCTSTR PrgAPI::GetStringForTrackTextType(TrackTextType ttt) { ASSERT(ttt >= 0 && ttt < TTT_Last); INT resID = IDS_UNKNOWN; if (ttt >= 0 && ttt < TTT_Last) { ASSERT(sizeof(TrackTextTypeToStringResource) / sizeof(INT) == TTT_Last); resID = TrackTextTypeToStringResource[ttt]; } return GetString(resID); } LPCTSTR PrgAPI::GetStringForOption(AppOptionsEnum option) { ASSERT(option > OPT_Unknown && option < OPT_Last); ASSERT((INT) option < sizeof(Option2Info) / sizeof(Option2Info[0])); ASSERT(Option2Info[option].optID == option); if (Option2Info[option].optID != option) return NULL; return Option2Info[option].valueName; //INT resID = Option2Info[option].resID; //if (resID == 0) //{ // ASSERT(bDefLang == TRUE); // ASSERT(Option2Info[option].valueName != NULL); // return Option2Info[option].valueName; //} //else //{ // if (bDefLang) // return GetTranslationManager()->GetDefaultTranslation().GetString(resID); // else // return GetString(resID); //} return NULL; } const INT PlayModeToStringResource[] = { IDS_NORMAL, IDS_SHUFFLE, IDS_LOOP, IDS_AUTOCONTINUE }; LPCTSTR PrgAPI::GetStringForPlayListMode(MediaPlayerNextMode mpm) { ASSERT(mpm >= MPNM_Normal && mpm < MPNM_Last); INT resID = IDS_NORMAL; if (mpm >= MPNM_Normal && mpm < MPNM_Last) { ASSERT(sizeof(PlayModeToStringResource) / sizeof(INT) == MPNM_Last); resID = PlayModeToStringResource[mpm]; } return GetString(resID); } LPCTSTR PrgAPI::GetStringForTrackType(TrackTypesEnum tt) { if (tt < TTYPE_FIRSTVIDEO) return GetString(IDS_AUDIO); else if (tt < TTYPE_FIRSTVIRTUAL) return GetString(IDS_VIDEO); return GetString(IDS_VIRTUALTRACKS); } LPCTSTR PrgAPI::GetStringForStars(UINT Stars) { ASSERT(Stars >= 0 && Stars < 6); //should be 1 - 5 if (!(Stars >= 0 && Stars < 6)) return cErrStr; const INT stars2res[] = {IDS_CLEAR, IDS_POOR, IDS_OK, IDS_GOOD, IDS_VERYGOOD, IDS_OUTSTANDING}; return GetString(stars2res[Stars]); } LPCTSTR PrgAPI::GetStringForCaseStyle(CaseStyleEnum cStyle) { ASSERT(cStyle < CASE_Last); //should be 1 - 5 if (!(cStyle < CASE_Last)) return cErrStr; const INT cstyle2res[] = {IDS_ALLCAPS, IDS_NOCAPS, IDS_FIRSTCAP, IDS_PROPERCASE}; return GetString(cstyle2res[cStyle]); } LPCTSTR PrgAPI::GetStringForRecordSortOption(RecordSortOptionsEnum rso) { ASSERT(rso>RSO_None && rso<RSO_Last); if (!(rso>RSO_None && rso<RSO_Last)) return cErrStr; INT RecordSortOptionsEnum2Res[] ={0, IDS_NAME, IDS_TRACKNO, IDS_ALBUM, IDS_ARTIST, IDS_RATING, IDS_LOCATION, IDS_SIZE, IDS_DURATION, IDS_BITRATE, IDS_YEAR, IDS_GENRE, IDS_COLLECTION, IDS_DATEADDED, IDS_NUMBEROFTRACKS}; return GetString(RecordSortOptionsEnum2Res[rso]); } LPCTSTR PrgAPI::GetStringForSectionFilter(SectionFiltersEnum sf) { ASSERT(sf>SFILT_First && sf<SFILT_Last); if (!(sf>SFILT_First && sf<SFILT_Last)) return cErrStr; const INT SectionFilterResource[] ={0,IDS_ALL,IDS_AUDIO,IDS_VIDEO, IDS_NEW}; return GetString(SectionFilterResource[sf]); } LPCTSTR PrgAPI::GetStringForSectionType(SectionTypeEnum st) { ASSERT(st > ST_Unknown && st <ST_Last); if (!(st > ST_Unknown && st < ST_Last)) return cErrStr; const INT SectionTypeEnumResource[] ={0,0,IDS_ARTIST,IDS_ALBUM,IDS_GENRE,IDS_YEAR,IDS_COLLECTION, IDS_ALBUM, IDS_MONTH, 0}; return GetString(SectionTypeEnumResource[st]); } void PrgAPI::GetStringForSectionMode(SectionModesEnum sm, LPTSTR bf, UINT bfLen) { INT curLen = 0; SectionTypeEnum st = CMainTreeCtrl::GetChildForSectionType(sm, ST_Root); bf[0] = 0; while (st != ST_Unknown) { LPCTSTR prefix = _T(""); if (bf[0] != 0) prefix = _T(" - "); //TRACE(_T("bf: %u(%s)\r\n"), (INT)&bf[0], bf); //TRACE(_T("bfLen:%u (%d)\r\n"), (INT)&bfLen, (INT) bfLen); //TRACE(_T("curLen:%u(%d)\r\n"), (INT)&curLen, (INT)curLen); INT len = _sntprintf(&bf[curLen], bfLen - curLen, _T("%s%s"), prefix, GetStringForSectionType(st)); curLen += len; st = CMainTreeCtrl::GetChildForSectionType(sm, st); } bf[bfLen - 1] = 0; } void PrgAPI::NotifyUser(LPCTSTR msg, LPCTSTR title/* = NULL*/, SEVERITY sev /*= SEV_InfoL1*/) { ASSERT(msg != NULL); PRGAPI()->GetActionManager()->LogUserMessage(msg, title, sev); if (m_pNotificationTarget != NULL) m_pNotificationTarget->Show(msg, title, sev); } void PrgAPI::NotifyUser(INT msgResID, INT titleResID/* = NULL*/, SEVERITY sev /*= SEV_InfoL1*/) { NotifyUser(GetString(msgResID), (titleResID > 0) ? GetString(titleResID) : 0, sev); } int PrgAPI::MessageBox(HWND parentHWND, LPCTSTR message, LPCTSTR caption, DWORD style) { CMessageDlg dlg; dlg.SetIcon(GetIcon(ICO_Main)); dlg.SetText(CMessageDlg::TT_Title, caption); dlg.SetText(CMessageDlg::TT_SubTitle, message); DWORD type = style & 0xF; switch (type) { case MB_OK: dlg.SetText(CMessageDlg::TT_ButtonRight, GetString(IDS_OK)); dlg.DoModal(); return IDOK; break; case MB_YESNO: dlg.SetText(CMessageDlg::TT_ButtonRight, GetString(IDS_NO_S)); dlg.SetText(CMessageDlg::TT_ButtonMid, GetString(IDS_YES_S)); switch (dlg.DoModal()) { case CMessageDlg::RES_Close: case CMessageDlg::RES_Right: return IDNO; case CMessageDlg::RES_Mid: return IDYES; } break; default: if (caption == NULL || caption[0] == 0) caption = CTeenSpiritApp::sAppTitle; return ::MessageBox(parentHWND, message, caption, style); } return IDCANCEL; } int PrgAPI::MessageBox(HWND parentHWND, INT messageID, INT captionID, DWORD style) { return MessageBox(parentHWND, GetString(messageID), (captionID > 0) ? GetString(captionID) : 0, style); } INT PrgAPI::GetOption(AppOptionsEnum opt) { ASSERT(opt>OPT_Unknown && opt<OPT_Last); return m_Options[opt]; } void PrgAPI::SetOption(AppOptionsEnum opt, INT val) { ASSERT(opt>OPT_Unknown && opt<OPT_Last); m_Options[opt] = val; } BOOL PrgAPI::GetStringOption(AppStringOptionsEnum opt, LPTSTR bf, UINT bfLen) { ASSERT(opt > SOPT_Unknown && opt < SOPT_Last); AppSettings* appSettings = GetAppSettings(); LPCTSTR valueName = NULL; INT resID = StringOption2Info[opt].resID; if (resID == 0) valueName = StringOption2Info[opt].valueName; else valueName = GetTranslationManager()->GetDefaultTranslation().GetString(resID); if (valueName == NULL) return FALSE; std::tstring tmp; if (appSettings->Read(StringOption2Info[opt].category, valueName, tmp, StringOption2Info[opt].defVal) == FALSE) return FALSE; if (tmp.size() >= bfLen) return FALSE; _tcscpy(bf, tmp.c_str()); return TRUE; } BOOL PrgAPI::SetStringOption(AppStringOptionsEnum opt, LPCTSTR value) { ASSERT(opt > SOPT_Unknown && opt < SOPT_Last); LPCTSTR valueName = NULL; INT resID = StringOption2Info[opt].resID; if (resID == 0) valueName = StringOption2Info[opt].valueName; else valueName = GetTranslationManager()->GetDefaultTranslation().GetString(resID); if (valueName == NULL) return FALSE; return GetAppSettings()->Write(StringOption2Info[opt].category, valueName, value); } void PrgAPI::ReadOptions() { TRACEST(_T("PrgAPI::ReadOptions")); AppSettings* appSettings = GetAppSettings(); for (int i = OPT_Unknown + 1; i < OPT_Last; i++) appSettings->Read(Option2Info[i].category, GetStringForOption(AppOptionsEnum(i)), m_Options[i], Option2Info[i].defVal); } void PrgAPI::WriteOptions() { TRACEST(_T("PrgAPI::WriteOptions.")); AppSettings* pAppSettings = GetAppSettings(); if (m_pMediaPlayer != NULL)//GetOption will fail to return Real Player Options { TCHAR playListFileName[MAX_PATH]; DeleteFile(GetPath(PATH_LastTracksFile, playListFileName)); MediaPlayerUtilities::SaveM3U(*m_pMediaPlayer, playListFileName); INT ACMode = 0; SetOption(OPT_PL_PlayMode, m_pMediaPlayer->GetNextMode(&ACMode));//OPT_PL_PlayMode, SetOption(OPT_PL_AutoContinueMode, ACMode); SetOption(OPT_PL_Volume, m_pMediaPlayer->GetVolume()); SetOption(OPT_PL_Crossfade, m_pMediaPlayer->GetEngineConfig(MECO_Crossfade)); SetOption(OPT_PL_CrossfadeAtStart, m_pMediaPlayer->GetEngineConfig(MECO_CrossfadeAtStart)); SetOption(OPT_PL_CrossfadeAtEnd, m_pMediaPlayer->GetEngineConfig(MECO_CrossfadeAtEnd)); SetOption(OPT_PL_EqualizerMode, m_pMediaPlayer->GetEngineConfig(MECO_EqualizerMode)); SetOption(OPT_PL_Mute, m_pMediaPlayer->GetMute()); if (m_pMediaPlayer->EngineSupports(MECO_EqualizerMode)) { for (INT i = MECO_EqualizerBandStart; i < MECO_EqualizerBandEnd; i++) { if (m_pMediaPlayer->EngineSupports(MediaEngineConfigOption(i))) { TCHAR bf[20]; _sntprintf(bf, 20, _T("EQ%d"), i - MECO_EqualizerBandStart); pAppSettings->Write(cPlayerSettings, bf, m_pMediaPlayer->GetEngineConfig(MediaEngineConfigOption(i))); } } } SetOption(OPT_PL_LastTrack, m_pMediaPlayer->GetPlayListPos()); SetOption(OPT_PL_LastTime, (INT)m_pMediaPlayer->GetMediaPos()); } for (int i = OPT_Unknown + 1; i < OPT_Last; i++) pAppSettings->Write(Option2Info[i].category, GetStringForOption(AppOptionsEnum(i)), GetOption(AppOptionsEnum(i))); } void PrgAPI::FormatDuration(LPTSTR bf, UINT bfLen, INT duration) { ASSERT(bf != NULL && bfLen > 1); INT h = duration / 3600; duration = duration - h * 3600; INT m = duration / 60; if (h == 0) _sntprintf(bf, bfLen, _T("%d:%02d"), m, duration - m * 60); else _sntprintf(bf, bfLen, _T("%d:%02d:%02d"), h, m, duration - m * 60); bf[bfLen - 1] = 0; } void PrgAPI::FormatDate(TCHAR* bf, size_t bfLen, SYSTEMTIME& st, BOOL bSmart) { SYSTEMTIME t; GetLocalTime(&t); DOUBLE dt, dst; SystemTimeToVariantTime(&t, &dt); SystemTimeToVariantTime(&st, &dst); if (dt - dst <= 4.0 && bSmart) { if (dt - dst > 1.0) GetDateFormat(LOCALE_SYSTEM_DEFAULT, NULL, &st, _T("dddd "), bf, bfLen); else bf[0] = 0; INT curLen = _tcslen(bf); GetTimeFormat(LOCALE_SYSTEM_DEFAULT, NULL, &st, _T("HH:mm:ss"), &bf[curLen], bfLen - curLen); } else { GetDateFormat(LOCALE_SYSTEM_DEFAULT, NULL, &st, _T("d MMM yyyy"), bf, bfLen); } } void PrgAPI::Monitor() { if (m_pMediaPlayer && m_pMediaPlayer->GetPlayState() == PS_Playing) GetActionManager()->TrackHistory(); if (InfoDownloadManagerExists()) m_pInfoDownloadManager->ConsumeResult(); if (CollectionManagerExists()) m_pCollectionManager->ConsumeResult(); } //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- //------------Global Objects acquisition //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- #include "TeenSpiritPlayer.h" #include "DShowEngine.h" #include "MultiEngine.h" #include "HttpLinkEngine.h" //#include "FullTracksPlaylist.h" //#include "ImplPlaylist.h" #include "WinampVisualization.h" #include "NativeVisualization.h" #include "FadeBassEngine.h" #include "VectorPlaylist.h" #include "YouTubePlayerEngine.h" //---GetMediaPlayer() //We Create on demand Using the objfactory and then we configure MediaPlayer* PrgAPI::GetMediaPlayer() { if (m_pMediaPlayer == NULL) { TRACEST(_T("PrgAPI::GetMediaPlayer [CREATION]")); HWND hwndPlayer = ::CreateWindow(_T("Static"), _T("PlayerWnd"), WS_CHILD, 0, 0, 0, 0, AfxGetMainWnd()->m_hWnd, 0, AfxGetInstanceHandle(), 0); m_pMediaPlayer = new TeenSpiritPlayer; MultiEngine* eng = new MultiEngine; eng->AddEngine(new FadeBassEngine); eng->AddEngine(new DShowEngine); #ifdef USE_YOUTUBEENGINE YouTubePlayerEngine* pYTEng = new YouTubePlayerEngine; //=== Try to make it use directly the resource without writing a file //=== Otherwise write it in the "User" sub folder and then use it. TCHAR bf[MAX_PATH]; GetPath(PATH_AppRoot, bf); _tcscat(bf, _T("youtubeapi.htm")); pYTEng->SetYouTubeAPIURL(bf); eng->AddEngine(pYTEng); #else eng->AddEngine(new HttpLinkEngine); #endif m_pMediaPlayer->SetMediaPlayerEngine(eng); MediaPlayList* pList = new VectorPlayList; m_pMediaPlayer->SetMediaPlayList(pList); WinampVisualization* pVis = new WinampVisualization; pVis->LoadPlugin(_T("vis_avs.dll")); //MediaVisualization* pVis = new NativeVisualization; m_pMediaPlayer->SetMediaVisualization(pVis); //m_pMediaPlayer->Init(eng, lst, pwVis, hwndPlayer); m_pMediaPlayer->SetNextMode(MediaPlayerNextMode(m_Options[OPT_PL_PlayMode]), m_Options[OPT_PL_AutoContinueMode]); eng->SetVolume(GetOption(OPT_PL_Volume)); eng->SetMute(GetOption(OPT_PL_Mute)); eng->SetConfig(MECO_Crossfade, GetOption(OPT_PL_Crossfade)); eng->SetConfig(MECO_CrossfadeAtStart, GetOption(OPT_PL_CrossfadeAtStart)); eng->SetConfig(MECO_CrossfadeAtEnd, GetOption(OPT_PL_CrossfadeAtEnd)); eng->SetConfig(MECO_EqualizerMode, GetOption(OPT_PL_EqualizerMode)); for (INT i = MECO_EqualizerBandStart; i < MECO_EqualizerBandEnd; i++) { TCHAR bf[20]; _sntprintf(bf, 20, _T("EQ%d"), i - MECO_EqualizerBandStart); INT val = 50; GetAppSettings()->Read(cPlayerSettings, bf, val, 50); eng->SetConfig(MediaEngineConfigOption(i), val); } //SendMessage(SM_PlayerSettingsChanged); //SendMessage(SM_PlayerVolumeChanged); //Parse command line BOOL bEnqueue = FALSE; for (INT i=1; i<__argc;i++) { if (_tcscmp(_T("-q"), __targv[i])) bEnqueue = FALSE; if (__targv[i][0] != '-' && __targv[i][0] !='\\') { if (bEnqueue) m_pMediaPlayer->Enqueue(__targv[i]); else m_pMediaPlayer->Play(__targv[i]); bEnqueue = TRUE; } } BOOL bLoadOldPlaylist = FALSE; if (m_pMediaPlayer->GetPlayListCount() == 0) { bLoadOldPlaylist = TRUE; TCHAR ltPath[MAX_PATH]; MediaPlayerUtilities::InsertM3U(*m_pMediaPlayer, GetPath(PATH_LastTracksFile, ltPath)); } if (bLoadOldPlaylist) { if (m_Options[OPT_PL_RememberLastTrack]) { if ((INT)m_pMediaPlayer->GetPlayListCount() > m_Options[OPT_PL_LastTrack]) { m_pMediaPlayer->SetPlayListPos(m_Options[OPT_PL_LastTrack]); if (m_Options[OPT_PL_RememberLastTime]) { //m_pMediaPlayer->Start(); //m_pMediaPlayer->Pause(); m_pMediaPlayer->SetMediaPos(DOUBLE(m_Options[OPT_PL_LastTime])); } } } } if (m_Options[OPT_PL_AutoPlay] && m_pMediaPlayer->GetPlayListCount() > 0) { m_pMediaPlayer->Start(); } } return m_pMediaPlayer; } //---GetInformationManager() //We Create on demand HERE and then we configure LocalPictureManager* PrgAPI::GetLocalPictureManager() { if (m_pLocalPictureManager == NULL) { TRACEST(_T("PrgAPI::GetLocalPictureManager [CREATION]")); m_pLocalPictureManager = new LocalPictureManager; TCHAR imagesPath[MAX_PATH]; m_pLocalPictureManager->Init(GetPath(PATH_ImagesRoot, imagesPath)); //m_pLocalPictureManager->LoadState(GetPath(PATH_UserRoot)); m_pLocalPictureManager->EnableFolderImages(GetOption(OPT_IM_UseFolderImages) != 0); } return m_pLocalPictureManager; } InfoDownloadManager* PrgAPI::GetInfoDownloadManager() { if (m_pInfoDownloadManager == NULL) { TRACEST(_T("PrgAPI::GetInfoDownloadManager [CREATION]")); m_pInfoDownloadManager = new InfoDownloadManager(*GetInfoProviderFactory()); } return m_pInfoDownloadManager; } HINTERNET PrgAPI::GetInternetHandle() { if (m_hInternet == NULL) { TRACEST(_T("PrgAPI::GetInternetHandle [CREATION]")); INT i = 0; GetAppSettings()->Read(_T("General"), _T("ImpersonateAgent"), (INT&) i, 0); std::tstring agent = _T("Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0"); if (i != 0) GetAppSettings()->Read(_T("General"), _T("FalseAgentName"), agent, _T("")); TRACE(_T("@2{Internet Handle Created}\n")); m_hInternet = InternetOpen(agent.c_str(), INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0); } return m_hInternet; } //---GetActionManager() //We Create on demand HERE ActionManager* PrgAPI::GetActionManager() { if (m_pActionManager == NULL) { TRACEST(_T("PrgAPI::GetActionManager")); m_pActionManager = new ActionManager; } return m_pActionManager; } //---GetCollectionManager() //We Create on demand HERE //CollectionManager* PrgAPI::GetCollectionManager(BOOL bForceCreate) //{ // if (m_pCollectionManager == NULL && bForceCreate) // { // m_pCollectionManager = new CollectionManager; // TRACE(_T("@2{Collection Manager Created}\n")); // } // return m_pCollectionManager; //} //---GetFileTagger() //We Create on demand Using the objfactory FileTagger* PrgAPI::GetFileTagger() { if (m_pFileTagger == NULL) { TRACEST(_T("PrgAPI::GetFileTagger")); m_pFileTagger = ObjFactory::Instance()->CreateFileTagger(); } m_pFileTagger->SetConfig(FileTagger::CONF_ReadDepth, GetOption(OPT_TAG_SafetyOptionManual)); return m_pFileTagger; } //---GetServicesRegistrationSrv() //We Create on demand HERE and we configure ServicesRegistrationSrv* PrgAPI::GetServicesRegistrationSrv() { if (m_pServicesRegistrationSrv == NULL) { TRACEST(_T("PrgAPI::GetServicesRegistrationSrv")); m_pServicesRegistrationSrv = new ServicesRegistrationSrv; TCHAR path[MAX_PATH]; m_pServicesRegistrationSrv->LoadServices(GetPath(PATH_WebServicesRoot, path)); } return m_pServicesRegistrationSrv; } CFont* PrgAPI::GetFont(APP_FONTS fon) { if (m_pAppFonts[fon] == NULL) { LOGFONT lf; lf.lfHeight = 13; lf.lfWidth = 0; lf.lfEscapement = 0; lf.lfOrientation = 0; lf.lfWeight = FW_NORMAL; lf.lfItalic = FALSE; lf.lfUnderline = FALSE; lf.lfStrikeOut = FALSE; lf.lfCharSet = DEFAULT_CHARSET; lf.lfOutPrecision = OUT_TT_ONLY_PRECIS;//OUT_DEFAULT_PRECIS; lf.lfClipPrecision = CLIP_DEFAULT_PRECIS; lf.lfQuality = DEFAULT_QUALITY;//ANTIALIASED_QUALITY; lf.lfPitchAndFamily = VARIABLE_PITCH | FF_DONTCARE; _tcscpy(lf.lfFaceName, _T("Tahoma")); switch (fon) { case FONT_Dialogs: break; case FONT_DialogsUnderline: lf.lfUnderline = TRUE; break; case FONT_DialogsItalics: lf.lfItalic = TRUE; break; case FONT_DialogsBold: lf.lfWeight = FW_BOLD; break; case FONT_DialogsBig: lf.lfHeight = 18; break; case FONT_DialogsBigBold: lf.lfHeight = 18; lf.lfWeight = FW_BOLD; break; case FONT_Fixed: lf.lfHeight = 15; lf.lfPitchAndFamily = FIXED_PITCH | FF_DONTCARE; _tcscpy(lf.lfFaceName, _T("Courier New")); break; //case FONT_Marlett: // lf.lfHeight = 11; // _tcscpy(lf.lfFaceName, _T("Marlett")); // break; default: ASSERT(0); break; } CFont* pFont = new CFont; pFont->CreateFontIndirect(&lf); m_pAppFonts[fon] = pFont; } return m_pAppFonts[fon]; } const int AppIcon2Resource[][2] = { {IDR_MAINFRAME, 48}, //ICO_Info, {IDI_INFO,16}, //ICO_Info, {IDI_WARN,16}, //ICO_Warning, {IDI_TSERROR,16}, //ICO_Error, {IDI_PREVIOUS24,24}, //ICO_Prev24, {IDI_PLAY24,24}, //ICO_Play24, {IDI_PAUSE24,24}, //ICO_Pause24, {IDI_STOP24,24}, //ICO_Stop24, {IDI_NEXT24,24}, //ICO_Next24 {IDI_CROSSFADE16,16}, //ICO_Crossfade16, {IDI_CROSSFADE_AC16,16}, //ICO_CrossfadeAc16, {IDI_EQUALIZER16,16}, //ICO_Equalizer16, {IDI_EQUALIZER_AC16,16}, //ICO_EqualizerAc16, {IDI_BACK16,16}, //ICO_Back16 {IDI_FORWARD16,16}, //ICO_Forward16 {IDI_HOME16,16}, //ICO_Home16 {IDI_REFRESH16,16}, //ICO_Refresh16 {IDI_INTERNET16,16},//ICO_Internet16 {IDI_ADD16, 16}, //ICO_Add16 {IDI_ARTISTS_ICON, 16}, //ICO_Artist16, {IDI_2STARS, 16}, //ICO_2Stars16, {IDI_3STARS, 16}, //ICO_3Stars16, {IDI_TOP1016, 16}, //ICO_Top1016, {IDI_TOP10016, 16}, //ICO_Top10016, {IDI_TOPREST16, 16}, //ICO_TopRest16, {IDI_PLAYED16, 16}, //ICO_Played16, {IDI_MOUSECLICK16, 16}, //ICO_MouseClick16, {IDI_AUDIO16, 16}, //ICO_Audio16, {IDI_VIDEO16, 16}, //ICO_Video16, {IDI_VIRTUAL16, 16}, //ICO_Virtual16, {IDI_COMMENTS16, 16}, //ICO_Comment16, {IDI_LYRICS16, 16}, //ICO_Lyrics16, {IDI_PERSONAL16, 16}, //ICO_Personal16, {IDI_TABLATURE16, 16}, //ICO_Tablature16, {IDI_STAREMPTY16, 16}, //ICO_StarEmpty16, {IDI_STARGOLD16, 16}, //ICO_StarGold16, {IDI_STARGOLDHALF16, 16}, //ICO_StarGoldHalf16, {IDI_STARBADEMPTY16, 16}, //ICO_StarEmptyBad16, {IDI_STARBAD16, 16}, //ICO_SrarBad16, {IDI_MINUS16, 16}, //ICO_Minus16, {IDI_NEW16, 16}, //ICO_New16 {IDI_COLLAPSED16, 16}, //ICO_Collapsed16, {IDI_EXPANDED16, 16}, //ICO_Expanded16, {IDI_LOCALFOLDER16, 16}, //ICO_LocalFolder16, {IDI_NETFOLDER16, 16}, //ICO_NetFolder16, {IDI_MEDIA16, 16}, //ICO_Media16, {IDI_AUDIOCD16, 16}, //ICO_AudioCD16, {IDI_REMOVABLE16, 16}, //ICO_Removable16, {IDI_PLAY16, 16}, //ICO_Play16, {IDI_COPY16, 16}, //ICO_Copy16, {IDI_DELETE16, 16}, //ICO_Delete16, {IDI_FIND16, 16}, //ICO_Find16, {IDI_PROPERTIES16, 16}, //ICO_Properties16, {IDI_PROVIDERS16, 16}, //ICO_Providers16, {IDI_BUY16, 16}, //ICO_Buy16 {IDI_OPTIONS16, 16}, //ICO_Options16 {IDI_WINDOW16, 16}, //ICO_Window16 {IDI_CLEAR16, 16}, //ICO_Clear16 {IDI_TEXT16, 16}, //ICO_Text16, {IDI_PICTURE16, 16}, //ICO_Picture16, {IDI_UP16, 16}, //ICO_Up16, {IDI_DOWN16, 16}, //ICO_Down16, {IDI_COLLECTIONS16, 16}, //ICO_Collections16, {IDI_HISTORY16, 16}, //ICO_History16, {IDI_GAMES16, 16}, //ICO_Games16, {IDR_MAINFRAME, 16}, //ICO_Main16 {IDI_SWITCHPANE16, 16}, //ICO_SwitchPane16 {IDI_MINIMIZE16, 16}, //ICO_Minimize16, {IDI_RESTORE16, 16}, //ICO_Restore16, {IDI_MAXIMIZE16, 16}, //ICO_Maximize16, {IDI_CLOSE16, 16}, //ICO_Close16, {IDI_INCREASEFONT16, 16}, //ICO_IncreaseFont16, {IDI_DECREASEFONT16, 16}, //ICO_DecreaseFont16, {IDI_RESETFONT16, 16}, //ICO_ResetFont16, {IDI_ALBUM16, 16}, //ICO_DecreaseFont16, {IDI_INSERT16, 16}, //ICO_ResetFont16, {IDI_REMOVE16, 16}, //ICO_ResetFont16, {IDI_MUTE16, 16}, //ICO_Mute16, {IDI_NOMUTE16, 16} //ICO_Unmute16, }; HICON PrgAPI::GetIcon(APP_ICONS icon) { ASSERT(sizeof(AppIcon2Resource)/(2*sizeof(INT)) == ICO_Last); ASSERT(icon < ICO_Last); if (m_AppIcons[icon] == NULL) { m_AppIcons[icon] = ( HICON ) ::LoadImage( AfxGetResourceHandle(), MAKEINTRESOURCE(AppIcon2Resource[icon][0]), IMAGE_ICON, AppIcon2Resource[icon][1], AppIcon2Resource[icon][1], LR_VGACOLOR /*| LR_LOADTRANSPARENT */); ASSERT(m_AppIcons[icon] != NULL); } return m_AppIcons[icon]; } HICON PrgAPI::GetIconForTrackType(TrackTypesEnum tt) { if (tt < TTYPE_FIRSTVIDEO) return GetIcon(ICO_Audio16); else if (tt < TTYPE_FIRSTVIRTUAL) return GetIcon(ICO_Video16); return GetIcon(ICO_Virtual16); } HICON PrgAPI::GetIconForRank(INT rank) { return GetIcon(GetAppIconForRank(rank)); } APP_ICONS PrgAPI::GetAppIconForRank(INT rank) { if (rank >=1 && rank <=10) return ICO_Top1016; else if (rank >10 && rank <=100) return ICO_Top10016; return ICO_TopRest16; } HICON PrgAPI::GetIconForStars(INT stars) { switch (stars) { case 0: return NULL; case 1: return GetIcon(ICO_StarBad16); default: return GetIcon(ICO_StarGold16); //case 0: //case 2: // return GetIcon(ICO_Minus16); //case 3: return GetIcon(ICO_StarGold16); //case 4: return GetIcon(ICO_2Stars16); //case 5: return GetIcon(ICO_3Stars16); } ASSERT(0); return AfxGetApp()->LoadStandardIcon(IDI_QUESTION); } HICON PrgAPI::GetIconForCollectionType(CollectionTypesEnum colType) { APP_ICONS icon = GetAppIconForCollectionType(colType); if (icon != ICO_Last) return GetIcon(icon); ASSERT(0); return NULL; } HICON PrgAPI::GetIconForInfoItemType(InfoItemTypeEnum iit) { switch (iit) { case IIT_AlbumPicture: case IIT_ArtistPicture: return GetIcon(ICO_Picture16); case IIT_AlbumReview: case IIT_ArtistBio: return GetIcon(ICO_Text16); case IIT_TrackLyrics: return GetIcon(ICO_Lyrics16); case IIT_TrackPersonal: return GetIcon(ICO_Personal16); case IIT_TrackComment: return GetIcon(ICO_Comment16); case IIT_TrackTablatures: return GetIcon(ICO_Tablature16); } return 0; } CImageList& PrgAPI::GetImageList16() { if (m_il16.m_hImageList == 0) { m_il16.Create(16,16,ILC_MASK|ILC_COLOR32,5,1); for (int i=0; i< ICO_Last; i++) m_il16.Add(GetIcon((APP_ICONS)i)); } return m_il16; } void PrgAPI::SetGlobalButtonStyle(FlexButton& btn, APP_ICONS ico) { btn.ApplyPredifinedButtonsStyle(FlexButton::PBS_HotButton); if (ico < ICO_Last) btn.SetIcon(GetIcon(ico), 16, 16); btn.SetTextStyle(FlexButton::TS_SingleLineCenter); } APP_ICONS PrgAPI::GetAppIconForCollectionType(CollectionTypesEnum colType) { switch (colType) { case CTYPE_LocalFolder: return ICO_LocalFolder16; case CTYPE_NetFolder: return ICO_NetFolder16; case CTYPE_Media: return ICO_Media16; case CTYPE_AudioCD: return ICO_AudioCD16; case CTYPE_Virtual: return ICO_Virtual16; case CTYPE_Removable: return ICO_Removable16; } ASSERT(0); return ICO_Last; } SkinManager* PrgAPI::GetSkinManager() { if (m_pSkinManager == NULL) { TRACEST(_T("PrgAPI::GetSkinManager [CREATION]")); m_pSkinManager = new SkinManager; TCHAR path[MAX_PATH]; m_pSkinManager->SetSkinsFolder(GetPath(PATH_SkinsRoot, path)); std::tstring SkinName; GetAppSettings()->Read(cGeneral, cOptionSkin, SkinName, _T("")); if (!SkinName.empty()) { if (m_pSkinManager->LoadSkin(SkinName.c_str()) == FALSE) { TRACE(_T("PrgAPI::GetSkinManager Skin not loaded\r\n")); } } if (m_pSkinManager->GetSkin().GetSkinPath()[0] == 0) m_pSkinManager->LoadSkin(_T("Default")); m_pSkinManager->GetSkin().SetFontQuality(GetOption(OPT_GEN_ForceClearTypeFonts) == 1 ? CLEARTYPE_QUALITY : DEFAULT_QUALITY); m_pSkinManager->GetSkin().SetRelativeFontSize(GetOption(OPT_GEN_RelativeFontSize)); } return m_pSkinManager; } LPCTSTR PrgAPI::GetPathLegacy(PathsLegacyEnum pathType, LPTSTR buffer) { //=== LEGACY ============================================================================= switch (pathType) { case PATHLEGACY_SkinRoot: { TCHAR appRoot[MAX_PATH]; _sntprintf(buffer, MAX_PATH, _T("%sSkins\\"), GetPath(PATH_ExeRoot, appRoot)); } break; case PATHLEGACY_TranslationsRoot: { TCHAR appRoot[MAX_PATH]; _sntprintf(buffer, MAX_PATH, _T("%sLangs\\"), GetPath(PATH_ExeRoot, appRoot)); //if (!PathFileExists(buffer)) // CreateDirectory(buffer, NULL); } break; case PATHLEGACY_WebServicesRoot: TCHAR appRoot[MAX_PATH]; _sntprintf(buffer, MAX_PATH, _T("%sWebServices\\"), GetPath(PATH_ExeRoot, appRoot)); //if (!PathFileExists(buffer)) // CreateDirectory(buffer, NULL); break; case PATHLEGACY_StorageRoot: case PATHLEGACY_DatabaseRoot: { LPCTSTR iniEntry = NULL; LPCTSTR defFolder = NULL; switch (pathType) { case PATHLEGACY_StorageRoot: iniEntry = _T("StoragePath"); defFolder = _T("Storage\\"); break; case PATHLEGACY_DatabaseRoot: iniEntry = _T("DatabasePath"); defFolder = _T(""); break; default: ASSERT(0); return NULL; } BOOL bUseDefaultPath = TRUE; std::tstring path; if (GetAppSettings()->Read(cGeneral, iniEntry, path, _T("")) && path.size() > 0) { if (path[path.size() - 1] != '\\') path.push_back('\\'); _tcscpy(buffer, path.c_str()); if (CreateDirectory(path.c_str(), NULL)) bUseDefaultPath = FALSE; else { INT le = GetLastError(); if (le == ERROR_ALREADY_EXISTS) bUseDefaultPath = FALSE; } } if (bUseDefaultPath) { //=== Default Path TCHAR appRoot[MAX_PATH]; _sntprintf(buffer, MAX_PATH, _T("%s%s"), GetPath(PATH_ExeRoot, appRoot), defFolder); //if (!PathFileExists(buffer)) // CreateDirectory(buffer, NULL); } } break; default: return NULL; } return buffer; } TCHAR PrgAPI::m_userRootPath[MAX_PATH] = {0}; TCHAR PrgAPI::m_commonRootPath[MAX_PATH] = {0}; LPCTSTR PrgAPI::GetPath(PathsEnum pathType, LPTSTR buffer) { ASSERT(buffer != NULL); BOOL bCreateDirectoryIfDoesNotExist = FALSE; switch (pathType) { case PATH_UserRoot: case PATH_CommonRoot: { LPTSTR targetPath = (pathType == PATH_UserRoot ? m_userRootPath : m_commonRootPath); //INT csidl = (pathType == PATH_UserRoot ? CSIDL_APPDATA : CSIDL_COMMON_APPDATA); if (targetPath[0] == 0) { TCHAR bf[MAX_PATH]; GetPath(PATH_ExeRoot, bf); _tcscat(bf, pathType == PATH_UserRoot ? _T("UserRootOverride.txt") : _T("CommonRootOverride.txt")); HANDLE h = CreateFile(bf, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0); if (h != INVALID_HANDLE_VALUE) { //=== Get the contents of the file CHAR bfA[MAX_PATH]; DWORD br = 0; ReadFile(h, bfA, MAX_PATH - 1, &br, 0); CloseHandle(h); LPSTR pos = strchr(bfA, '\r'); if (pos == NULL) pos = strchr(bfA, '\n'); if (pos != NULL) *pos = 0; else bfA[br] = 0; MultiByteToWideChar(CP_ACP, 0, bfA, -1, targetPath, MAX_PATH); //=== Check if it is a relative path if (targetPath[1] == '\\' && targetPath[0] != '.') { //=== Net path - Do nothing } else if (targetPath[1] == ':') { //=== Normal path - Do nothing } else { //=== Relative path (useful for mem stick operations) - Add the ExePath in front GetPath(PATH_ExeRoot, bf); _tcscat(bf, targetPath[0] == '\\' ? &targetPath[1] : targetPath); _tcsncpy(targetPath, bf, MAX_PATH); } INT len = _tcslen(targetPath); if (targetPath[len - 1] != '\\') _tcscat(targetPath, _T("\\")); bCreateDirectoryIfDoesNotExist = TRUE; } if (targetPath[0] == 0) { bCreateDirectoryIfDoesNotExist = TRUE; if (pathType == PATH_UserRoot) { HRESULT hr = SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 0, bf); _sntprintf(targetPath, MAX_PATH, _T("%s\\%s\\"), bf, CTeenSpiritApp::sAppTitle); } else { GetPath(PATH_ExeRoot, targetPath); //_sntprintf(targetPath, MAX_PATH, _T("%s\\%s\\"), bf, CTeenSpiritApp::sAppTitle); } } } _tcsncpy(buffer, targetPath, MAX_PATH); } break; case PATH_LastTracksFile: { TCHAR bf[MAX_PATH]; _sntprintf(buffer, MAX_PATH, _T("%sLastTracks.m3u"), GetPath(PATH_UserRoot, bf)); } break; case PATH_SettingsFile: { TCHAR bf[MAX_PATH]; _sntprintf(buffer, MAX_PATH, _T("%sSettings.ini"), GetPath(PATH_UserRoot, bf)); } break; case PATH_LoggingFile: { TCHAR bf[MAX_PATH]; _sntprintf(buffer, MAX_PATH, _T("%sDebug.log"), GetPath(PATH_UserRoot, bf)); } break; case PATH_CrashLogFile: { TCHAR bf[MAX_PATH]; _sntprintf(buffer, MAX_PATH, _T("%sCrash.log"), GetPath(PATH_UserRoot, bf)); } break; case PATH_SkinsRoot: { TCHAR bf[MAX_PATH]; _sntprintf(buffer, MAX_PATH, _T("%sSkins\\"), GetPath(PATH_CommonRoot, bf)); } break; case PATH_TranslationsRoot: { TCHAR bf[MAX_PATH]; _sntprintf(buffer, MAX_PATH, _T("%sTranslations\\"), GetPath(PATH_CommonRoot, bf)); } break; case PATH_TranslationsReferenceFile: { TCHAR bf[MAX_PATH]; _sntprintf(buffer, MAX_PATH, _T("%sTranslation.ref"), GetPath(PATH_TranslationsRoot, bf)); } break; case PATH_TranslationsReferenceFileUser: { TCHAR bf[MAX_PATH]; _sntprintf(buffer, MAX_PATH, _T("%sTranslation.ref"), GetPath(PATH_UserRoot, bf)); } break; case PATH_WebServicesRoot: { TCHAR bf[MAX_PATH]; _sntprintf(buffer, MAX_PATH, _T("%sWebServices\\"), GetPath(PATH_CommonRoot, bf)); } break; case PATH_TempRoot: GetTempPath(MAX_PATH, buffer); break; case PATH_StorageRoot: { bCreateDirectoryIfDoesNotExist = TRUE; TCHAR bf[MAX_PATH]; _sntprintf(buffer, MAX_PATH, _T("%sStorage\\"), GetPath(PATH_UserRoot, bf)); } break; case PATH_DatabaseRoot: { bCreateDirectoryIfDoesNotExist = TRUE; TCHAR bf[MAX_PATH]; _sntprintf(buffer, MAX_PATH, _T("%sDatabase\\"), GetPath(PATH_StorageRoot, bf)); } break; case PATH_ImagesRoot: { bCreateDirectoryIfDoesNotExist = TRUE; TCHAR bf[MAX_PATH]; _sntprintf(buffer, MAX_PATH, _T("%sImages\\"), GetPath(PATH_StorageRoot, bf)); } break; case PATH_ExeRoot: { ::GetModuleFileName(0, buffer, MAX_PATH); LPTSTR pszFileName = _tcsrchr(buffer, '\\'); pszFileName[1] = 0; } break; } if (bCreateDirectoryIfDoesNotExist) { if (!PathFileExists(buffer)) SHCreateDirectoryEx(NULL, buffer, NULL); } return buffer; } #include "URLEncDecHelper.h" BOOL PrgAPI::GetURLSystemID(std::string& systemID) { TRACEST(_T("PrgAPI::GetURLSystemID")); CHAR sysID[500]; DWORD volSerial = 0; GetWindowsDirectoryA(sysID, MAX_PATH); sysID[3] = 0; BOOL ret = GetVolumeInformationA(sysID, NULL, 0, &volSerial, 0,0,0,0); MEMORYSTATUSEX memStat; memStat.dwLength = sizeof(MEMORYSTATUSEX); GlobalMemoryStatusEx(&memStat); DWORD cpuFreq = 0; DWORD dwBufLen = sizeof(DWORD); HKEY hKey; if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("Hardware\\Description\\System\\CentralProcessor\\0"), 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) { if (RegQueryValueEx( hKey, _T("~MHz"), NULL, NULL, (LPBYTE) &cpuFreq, &dwBufLen) != ERROR_SUCCESS) cpuFreq = 0; RegCloseKey(hKey); } SQLManager* pSM = GetSQLManager(); SQLManager::HistoryLogStats logStats; pSM->GetHistoryLogStats(logStats); DOUBLE days = 0.0; if (logStats.firstTime.wYear > 0) SystemTimeToVariantTime(&logStats.firstTime, &days); UINT histFirstDateInDays = (UINT) days; AppMonitor::State& appMonitorState = GetAppMonitor()->GetState(); SYSTEMTIME installDate = appMonitorState.InstallationDate; SystemTimeToVariantTime(&installDate, &days); UINT installedDay = (UINT) days; #ifdef _DEBUG //Todays time GetLocalTime(&installDate); SystemTimeToVariantTime(&installDate, &days); #endif INT len = _snprintf(sysID, 500, "%X:%X:%X:%X:%X:%X:%X:%X:%X:%X:%X:%X:%X:%X:%X:%X", //===AppMonitor Stats (7) appMonitorState.AppUniqueID, appMonitorState.Runs, appMonitorState.TotalRuns, appMonitorState.Crashes, appMonitorState.TotalCrashes, installedDay, GetAppMonitor()->GetRunningTimeInMinutes(), //===System Stats (4) GetVersion(), GetSystemDefaultLangID(), (UINT)(memStat.ullTotalPhys/(1024.0*1024.0)), cpuFreq, //===DB Stats (3) pSM->GetTrackCount(TracksFilter()), logStats.plays, histFirstDateInDays, //===Other (1) volSerial, BUILD_VERSION ); CHAR* base64Data = URLEncDecHelper::EncodeData((LPBYTE)sysID, len, TRUE, FALSE); if (base64Data != NULL) { systemID = "8:"; systemID.append(base64Data, len); delete[] base64Data; return TRUE; } return FALSE; } BOOL PrgAPI::IsTrackNew(SYSTEMTIME& dateAdded, UINT DaysMeansNew/* = 0*/) { if (DaysMeansNew == 0) DaysMeansNew = m_Options[OPT_GEN_DaysMeansNew]; if (DaysMeansNew == 0) return FALSE; SYSTEMTIME dateCur; GetLocalTime(&dateCur); DOUBLE dAdded, dCur; SystemTimeToVariantTime(&dateAdded, &dAdded); SystemTimeToVariantTime(&dateCur, &dCur); return (dCur - dAdded < m_Options[OPT_GEN_DaysMeansNew]); } BOOL PrgAPI::GetSiteURL(LPTSTR url, UINT urlLen, SiteActionEnum actID, LPCTSTR p1, LPCTSTR p2) { TRACEST(_T("PrgAPI::GetSiteURL")); ASSERT(actID < SA_Last); if (p1 == NULL) p1 = _T(""); if (p2 == NULL) p2 = _T(""); LPCTSTR action = NULL; switch (actID) { case SA_Help: action=_T("hlp"); break; case SA_Navigate: action=_T("nav"); break; default: return FALSE; } FileVersion fv; GetFileVersion(fv); int len = _sntprintf(url, urlLen, _T("http://services.artificialspirit.com/jaangle-fw.php?ver=%d&uid=%u&lng=%d&act=%s&p1=%s&p2=%s"), fv.Build, GetAppMonitor()->GetState().AppUniqueID, GetSystemDefaultLangID(), action, p1, p2 ); url[urlLen - 1] = 0; return TRUE; } BOOL PrgAPI::GoToSiteURL(SiteActionEnum actID, LPCTSTR p1, LPCTSTR p2) { TRACEST(_T("PrgAPI::GoToSiteURL")); TCHAR url[1000]; if (!GetSiteURL(url, 1000, actID, p1, p2)) return FALSE; ShellExecute(NULL, _T("open"), url, NULL, NULL, SW_SHOWNORMAL); return TRUE; } MenuManager* PrgAPI::GetMenuManager() { if (m_pMenuManager == NULL) { TRACEST(_T("PrgAPI::GetMenuManager [CREATION]")); m_pMenuManager = new MenuManager; } return m_pMenuManager; } TranslationManager* PrgAPI::GetTranslationManager() { if (m_pTranslationManager == NULL) { TRACEST(_T("PrgAPI::GetTranslationManager [CREATION]")); m_pTranslationManager = new TranslationManager(); TCHAR path[MAX_PATH]; m_pTranslationManager->SetTranslationsFolder(GetPath(PATH_TranslationsRoot, path)); } return m_pTranslationManager; } CollectionManager* PrgAPI::GetCollectionManager() { if (m_pCollectionManager == NULL) { TRACEST(_T("PrgAPI::GetCollectionManager [CREATION]")); m_pCollectionManager = new CollectionManager; } return m_pCollectionManager; } InfoProviderFactory* PrgAPI::GetInfoProviderFactory() { if (m_pInfoProviderFactory == NULL) { TRACEST(_T("PrgAPI::GetInfoProviderFactory [CREATION]")); m_pInfoProviderFactory = new InfoProviderFactory; m_pInfoProviderFactory->Init(GetInternetHandle(), GetAppSettings()); //m_pInfoProviderFactory->LoadPlugins(GetPath(PATH_InfoProvidersRoot)); } return m_pInfoProviderFactory; } HotKeyManager* PrgAPI::GetHotKeyManager() { if (m_pHotKeyManager == NULL) { TRACEST(_T("PrgAPI::GetHotKeyManager [CREATION]")); m_pHotKeyManager = new HotKeyManager; } return m_pHotKeyManager; } TrayToolTipDlg* PrgAPI::GetTrayToolTipDlg() { if (m_pTrayToolTipDlg == NULL) { TRACEST(_T("PrgAPI::TrayToolTipDlg [CREATION]")); m_pTrayToolTipDlg = new TrayToolTipDlg; } return m_pTrayToolTipDlg; } void PrgAPI::DestroyTrayToolTipDlg() { if (m_pTrayToolTipDlg != NULL) { if (m_pTrayToolTipDlg->GetSafeHwnd()) m_pTrayToolTipDlg->DestroyWindow(); delete m_pTrayToolTipDlg; m_pTrayToolTipDlg = NULL; } } CMiniPlayerDlg* PrgAPI::GetMiniPlayerDlg(BOOL bForceCreate) { if (m_pMiniPlayerDlg == NULL && bForceCreate) { TRACEST(_T("PrgAPI::GetMiniPlayerDlg [CREATION]")); m_pMiniPlayerDlg = new CMiniPlayerDlg; m_pMiniPlayerDlg->Create(CWnd::GetDesktopWindow()); m_pMiniPlayerDlg->LoadOptions(); } return m_pMiniPlayerDlg; } void PrgAPI::DestroyMiniPlayerDlg() { if (m_pMiniPlayerDlg != NULL) { m_pMiniPlayerDlg->SaveOptions(); if (m_pMiniPlayerDlg->GetSafeHwnd()) m_pMiniPlayerDlg->DestroyWindow(); delete m_pMiniPlayerDlg; m_pMiniPlayerDlg = NULL; } } QuickSearchDlg* PrgAPI::GetQuickSearchDlg() { if (m_pQuickSearchDlg == NULL) { TRACEST(_T("PrgAPI::GetQuickSearchDlg [CREATION]")); m_pQuickSearchDlg = new QuickSearchDlg; } return m_pQuickSearchDlg; } void PrgAPI::DestroyQuickSearchDlg() { if (m_pQuickSearchDlg != NULL) { if (m_pQuickSearchDlg->GetSafeHwnd()) m_pQuickSearchDlg->DestroyWindow(); delete m_pQuickSearchDlg; m_pQuickSearchDlg = NULL; } } CSearchDlg* PrgAPI::GetAdvancedSearchDlg() { if (m_pSearchDlg == NULL) { TRACEST(_T("PrgAPI::GetAdvancedSearchDlg [CREATION]")); m_pSearchDlg = new CSearchDlg; m_pSearchDlg->Create(IDD_SEARCH, AfxGetMainWnd()); m_pSearchDlg->SetWindowText(PRGAPI()->GetString(IDS_SEARCH)); m_pSearchDlg->CenterWindow( AfxGetMainWnd()); } return m_pSearchDlg; } void PrgAPI::DestroyAdvancedSearchDlg() { if (m_pSearchDlg != NULL) { if (m_pSearchDlg->GetSafeHwnd()) m_pSearchDlg->DestroyWindow(); delete m_pSearchDlg; m_pSearchDlg = NULL; } } ShortcutManager* PrgAPI::GetShortcutManager() { if (m_pShortcutManager == NULL) { TRACEST(_T("PrgAPI::GetShortcutManager [CREATION]")); m_pShortcutManager = new ShortcutManager; } return m_pShortcutManager; } ConfigurationManager* PrgAPI::GetConfigurationManager() { if (m_pConfigurationManager == NULL) { TRACEST(_T("PrgAPI::GetConfigurationManager [CREATION]")); m_pConfigurationManager = new ConfigurationManager; } return m_pConfigurationManager; } StateManager* PrgAPI::GetStateManager() { if (m_pStateManager == NULL) { TRACEST(_T("PrgAPI::GetStateManager [CREATION]")); m_pStateManager = new StateManager; } return m_pStateManager; } SQLManager* PrgAPI::GetSQLManager() { if (m_pSQLManager == NULL) { TRACEST(_T("PrgAPI::GetSQLManager [CREATION]")); m_pSQLManager = new SQLManager; TCHAR path[MAX_PATH]; GetPath(PATH_DatabaseRoot, path); _tcscat(path, _T("music.mdb")); if (!m_pSQLManager->Init(path)) { delete m_pSQLManager; m_pSQLManager = 0; TRACE(_T("@0{Database Engine Failed to be created}\n")); } } return m_pSQLManager; } LastFMServices* PrgAPI::GetLastFMServices() { if (m_pLastFMServices == NULL) { TRACEST(_T("PrgAPI::GetLastFMServices")); m_pLastFMServices = new LastFMServices(); m_pLastFMServices->Init(GetInternetHandle()); AppSettings* pSettings = GetAppSettings(); std::tstring val; pSettings->Read(cLastFM, cOptionUser, val, _T("")); m_pLastFMServices->SetUserName(val.c_str()); pSettings->Read(cLastFM, cOptionPass, val, _T("")); m_pLastFMServices->SetMD5Password(val.c_str()); } return m_pLastFMServices; } ITracker* PrgAPI::GetTracker() { if (m_pTracker == NULL) { TRACEST(_T("PrgAPI::GetTracker [CREATION]")); m_pTracker= new MultiTracker(); } return m_pTracker; } TSOnlineServices* PrgAPI::GetTSOnlineServices() { if (m_pTSOnlineServices == NULL) { TRACEST(_T("PrgAPI::GetTSOnlineServices")); std::string str; GetURLSystemID(str); m_pTSOnlineServices = new TSOnlineServices(str.c_str(), GetInternetHandle()); } return m_pTSOnlineServices; } void PrgAPI::ClearFonts() { for (int i=0 ; i<FONT_Last; i++) { delete m_pAppFonts[i]; m_pAppFonts[i] = NULL; } } void PrgAPI::SendMessage(UINT stateMessage) { GetStateManager()->SendMessage(stateMessage); } void PrgAPI::PostMessage(UINT stateMessage) { GetStateManager()->PostMessage(stateMessage); } ITSMenu* PrgAPI::CreatePopupMenu() { return new TSMenu; } UINT Stars2Rating(FLOAT Stars) { ASSERT(Stars >= 0.0f && Stars <= 5.0f); //should be 1 - 5 return UINT(INT(Stars*100+.5) * 50 / 100); } //Returns: //0 for 0 (No Rating) //1 for (1-50) Bad //2 for (51-100) Neutral //3 for (101-150) 1 Star ... //4 for (151-200) 2 Star ... //5 for (201-) 3 Star ... FLOAT Rating2Stars(UINT Rating) { FLOAT stars = Rating / 50.0f; if (stars > 5.0f) stars = 5.0f; return stars; } BOOL CALLBACK SetFontToChilds(HWND hwnd, LPARAM lParam) { ASSERT(hwnd != NULL); ASSERT(lParam != NULL); if (lParam == NULL) return FALSE; SendMessage(hwnd, WM_SETFONT, (WPARAM)lParam, FALSE); return TRUE; }
[ "kurzedmetal@gmail.com" ]
kurzedmetal@gmail.com